]> git.rmz.io Git - dotfiles.git/commitdiff
xinit: use xss-lock and refactor xprofile into separate files
authorSamir Benmendil <me@rmz.io>
Sun, 24 Nov 2019 14:10:05 +0000 (14:10 +0000)
committerSamir Benmendil <me@rmz.io>
Sun, 24 Nov 2019 14:10:05 +0000 (14:10 +0000)
Makefile
xinit/xprofile [moved from xprofile with 67% similarity]
xinit/xprofile.d/10-screensaver.sh [new file with mode: 0755]
xinit/xprofile.d/10-xkb.sh [new file with mode: 0755]
xinitrc
xkb/default.xkb [moved from xkb/hactar.xkb with 100% similarity]
xkb/skull-canyon.xkb [deleted file]

index 71ed29c8c8f791b79d997cda6b947f1d2071863c..0d3d068c5a111e2cd13b33a9c67d6403afbf4010 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -17,7 +17,7 @@ install: $(FILES) $(DOTFILES) $(CONFIGFILES)
 $(XDG_DATA_HOME) $(XDG_CONFIG_HOME):
        mkdir -p $@
 
-awesome: $(XDG_CONFIG_HOME)
+awesome: $(XDG_CONFIG_HOME) xinit
        ln -sfT $(APATH)/awesome $(XDG_CONFIG_HOME)/awesome
 .PHONY: awesome
 
@@ -102,9 +102,10 @@ yay: $(XDG_CONFIG_HOME)
        ln -sfT $(APATH)/yay $(XDG_CONFIG_HOME)/yay
        mkdir -p $(XDG_CACHE_HOME)/yay
 
-xprofile:
-       ln -sfT $(APATH)/xprofile ~/.xprofile
-.PHONY: xprofile
+xinit: $(XDG_CONFIG_HOME)
+       ln -sfT $(APATH)/$@rc ~/.$@rc
+       ln -sfT $(APATH)/$@   $(XDG_CONFIG_HOME)/$@
+.PHONY: xinit
 
 weechat: $(XDG_CONFIG_HOME) $(XDG_CACHE_HOME)
        ln -sfT $(APATH)/weechat $(XDG_CONFIG_HOME)/weechat
similarity index 67%
rename from xprofile
rename to xinit/xprofile
index 976785e7d469deebf88cb0920ca7a4382d1ebef7..e67b840b75dc735275914fee96fd7c1b07d2490a 100644 (file)
--- a/xprofile
@@ -7,15 +7,10 @@ URXVT_PERL_LIB=$URXVT_PERL_LIB:$HOME/src/dotfiles/urxvt/perls/deprecated
 export URXVT_PERL_LIB
 
 urxvtd -q -o &
+
 start-pulseaudio-x11
 compton --config ~/.config/compton.conf &
-xautolock -detectsleep \
-          -notify  600 -notifier "xset dpms force off" \
-          -time     20 -locker   "i3lock -nc 000000" \
-          -killtime 70 -killer   "systemctl suspend" &
 unclutter --timeout 1 &
-[[ -f "$XDG_CONFIG_HOME/xbindkeys/$(hostname)" ]] && xbindkeys --file $XDG_CONFIG_HOME/xbindkeys/$(hostname)
-xkbcomp -I$HOME/.config/xkb $HOME/.config/xkb/$(hostname).xkb $DISPLAY
 xcape -e "Control_L=Escape;Control_R=Escape"
 
 hash ncmpcpp && urxvtc -name ncmpcpp -icon ~/src/dotfiles/icons/bmp.png           -e ncmpcpp
@@ -23,3 +18,12 @@ hash weechat && urxvtc -name weechat -icon ~/src/dotfiles/icons/im-irc.png
 hash neomutt && urxvtc -name mutt    -icon ~/src/dotfiles/icons/internet-mail.png -e neomutt
 
 qutebrowser &
+
+rc_dir="$XDG_CONFIG_HOME/xinit/xprofile.d"
+if [[ -d "$rc_dir" ]] ; then
+    for f in "$rc_dir"/?*.sh ; do
+        [ -x "$f" ] && source "$f"
+    done
+    unset f
+fi
+unset rc_dir
diff --git a/xinit/xprofile.d/10-screensaver.sh b/xinit/xprofile.d/10-screensaver.sh
new file mode 100755 (executable)
index 0000000..0d16adc
--- /dev/null
@@ -0,0 +1,5 @@
+#!/usr/bin/env bash
+
+xset s 600
+xset dpms 300 900 1800  # 5m 15m 30m
+xss-lock -- i3lock -nc 000000 &
diff --git a/xinit/xprofile.d/10-xkb.sh b/xinit/xprofile.d/10-xkb.sh
new file mode 100755 (executable)
index 0000000..1606d1d
--- /dev/null
@@ -0,0 +1,5 @@
+#!/usr/bin/env bash
+
+xkb_file=default
+[[ -f $XDG_CONFIG_HOME/xkb/$(hostname).xkb ]] && xkb_file=$(hostname)
+xkbcomp -I$XDG_CONFIG_HOME/xkb $XDG_CONFIG_HOME/xkb/$xkb_file.xkb $DISPLAY
diff --git a/xinitrc b/xinitrc
index ec73319c2cd2fee6da8d234ca9eb7d1e315d50fa..996327e4becaf580e7635eb1d556f7783cc4ae85 100644 (file)
--- a/xinitrc
+++ b/xinitrc
@@ -3,7 +3,7 @@
 logfile=$XDG_DATA_HOME/xorg/xinit.log
 userresources=$HOME/.Xresources
 usermodmap=$HOME/.Xmodmap
-userprofile=$HOME/.xprofile
+userprofile=$XDG_CONFIG_HOME/xinit/xprofile
 sysresources=/etc/X11/xinit/.Xresources
 sysmodmap=/etc/X11/xinit/.Xmodmap
 
similarity index 100%
rename from xkb/hactar.xkb
rename to xkb/default.xkb
diff --git a/xkb/skull-canyon.xkb b/xkb/skull-canyon.xkb
deleted file mode 100644 (file)
index 7296dd1..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-xkb_keymap {
-    xkb_keycodes { include "evdev" };
-    xkb_types    { include "complete" };
-    xkb_compat   { include "complete" };
-    xkb_symbols  { include "pc+inet(evdev)+dvorak+dvorak(kinesis)" };
-    xkb_geometry { include "kinesis(model100)" };
-};