]> git.siccegge.de Git - dotfiles/herbstluftwm.git/blobdiff - autostart
Spawn ncmpcpp in ncmpcpp tag
[dotfiles/herbstluftwm.git] / autostart
index f52ec997a56a467cc4ab185ef2e1f10d853a5918..37a1d594d4f33aa302ed7457b2a90be5d9042eb3 100755 (executable)
--- a/autostart
+++ b/autostart
@@ -10,6 +10,12 @@ function hc() {
     herbstclient "$@"
 }
 
+spawn_with_rules() {(
+    herbstclient rule once maxage=10 "${RULES[@]}"
+    exec "$@"
+    ) &
+}
+
 Mod=Mod4
 
 # tags
@@ -19,6 +25,7 @@ for i in {0..9} ; do
     hc keybind "$Mod-$i" use "$i"
     hc keybind "$Mod-Shift-$i" move "$i"
 done
+hc add scratchpad
 
 case "$(hostname)" in
        hepworth)
@@ -52,7 +59,7 @@ hc keybind $Mod-p spawn dmenu_run
 hc keybind $Mod-u spawn /home/christoph/bin/utf8select
 hc keybind $Mod-w spawn /home/christoph/bin/windowselect
 hc keybind $Mod-n spawn /home/christoph/bin/q3terminal
-hc keybind $Mod-x spawn slock
+hc keybind $Mod-x spawn i3lock --color 000000 -d
 hc keybind $Mod-t spawn ncmpcpp toggle
 hc keybind $Mod-y spawn passin
 
@@ -108,18 +115,18 @@ hc set always_show_frame 1
 hc set frame_gap 4
 hc set frame_bg_transparent 1
 
-hc rule class=Pinentry focus=on
 hc rule instance=Dialog class=Iceweasel focus=on
 
 hc rule windowtype~'_NET_WM_WINDOW_TYPE_(DIALOG|UTILITY|SPLASH)' pseudotile=on
 hc rule windowtype='_NET_WM_WINDOW_TYPE_DIALOG' focus=on
 hc rule windowtype~'_NET_WM_WINDOW_TYPE_(NOTIFICATION|DOCK)' manage=off
 
-hc rule class=Pinentry focus=on
+hc rule class=Pinentry focus=on pseudotile=on
 
 xfsettingsd &!
 
 source .config/herbstluftwm/wallpaper.sh
 set_wallpaper
 
-hc setenv VDPAU_DRIVER radeonsi
+RULES=( instance=ncmpcpp tag=scratchpad focus=off )
+spawn_with_rules urxvtcd -name ncmpcpp -e ncmpcpp