From: Samir Benmendil Date: Sun, 24 Nov 2019 14:10:05 +0000 (+0000) Subject: xinit: use xss-lock and refactor xprofile into separate files X-Git-Url: https://git.rmz.io/dotfiles.git/commitdiff_plain/31503eb98057db5ac2de69334641020fe6d1afab xinit: use xss-lock and refactor xprofile into separate files --- diff --git a/Makefile b/Makefile index 71ed29c..0d3d068 100644 --- 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 diff --git a/xprofile b/xinit/xprofile similarity index 67% rename from xprofile rename to xinit/xprofile index 976785e..e67b840 100644 --- a/xprofile +++ b/xinit/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 index 0000000..0d16adc --- /dev/null +++ b/xinit/xprofile.d/10-screensaver.sh @@ -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 index 0000000..1606d1d --- /dev/null +++ b/xinit/xprofile.d/10-xkb.sh @@ -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 ec73319..996327e 100644 --- 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 diff --git a/xkb/hactar.xkb b/xkb/default.xkb 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 index 7296dd1..0000000 --- a/xkb/skull-canyon.xkb +++ /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)" }; -};