From 070a130d0a5b97bb25b588778058d4db9a8122df Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Tue, 13 Sep 2016 02:54:03 -0700 Subject: [PATCH] Attempt to figure out the various xinit files --- dotfiles/xinitrc | 18 ++++++++++++++++++ dotfiles/xsession | 18 ++++++++++++++++++ dotfiles/xsessionrc | 1 - 3 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 dotfiles/xsession diff --git a/dotfiles/xinitrc b/dotfiles/xinitrc index e69de29b..06037ad0 100644 --- a/dotfiles/xinitrc +++ b/dotfiles/xinitrc @@ -0,0 +1,18 @@ +function command_exists { + hash "$1" 2>/dev/null 1>/dev/null +} + +function run_if_exists { + command_exists "$1" && $@ +} + +setxkbmap -layout "$(setxkbmap -print | awk -F + '/xkb_symbols/ {print $2}')" -option ctrl:nocaps +xrdb -merge .Xresources + +run_if_exists stalonetray & +run_if_exists xscreensaver -no-splash & +run_if_exists nm-applet --sm-disable & +run_if_exists feh --bg-scale /usr/share/backgrounds/gnome/Blinds.jpg & +run_if_exists copyq & +run_if_exists copyq hide +run_if_exists rofi & diff --git a/dotfiles/xsession b/dotfiles/xsession new file mode 100644 index 00000000..db59908f --- /dev/null +++ b/dotfiles/xsession @@ -0,0 +1,18 @@ +#!/bin/bash -*- mode: sh; -*- +function command_exists { + hash "$1" 2>/dev/null 1>/dev/null +} + +function run_if_exists { + command_exists "$1" && $@ +} + +setxkbmap -layout "$(setxkbmap -print | awk -F + '/xkb_symbols/ {print $2}')" -option ctrl:nocaps +xrdb -merge .Xresources + +run_if_exists stalonetray & +run_if_exists xscreensaver -no-splash & +run_if_exists nm-applet --sm-disable & +run_if_exists feh --bg-scale /usr/share/backgrounds/gnome/Blinds.jpg & +run_if_exists copyq & +run_if_exists copyq hide diff --git a/dotfiles/xsessionrc b/dotfiles/xsessionrc index 492b77e3..e69de29b 100644 --- a/dotfiles/xsessionrc +++ b/dotfiles/xsessionrc @@ -1 +0,0 @@ -setxkbmap -layout "$(setxkbmap -print | awk -F + '/xkb_symbols/ {print $2}')" -option ctrl:nocaps \ No newline at end of file