diff --git a/autostart b/autostart index 3e3b1b5..25b2567 100755 --- a/autostart +++ b/autostart @@ -1,5 +1,5 @@ #!/usr/bin/env bash -exec 2>&1 > >(tee -i /tmp/hlwm-autostart.log) +exec 2>&1 >> >(tee -i /tmp/hlwm-autostart.log) PIDS_FILE=/tmp/hlwm-autostart-pids @@ -15,8 +15,7 @@ cd $(dirname $0) source ./gruvbox_colors.sh -OLD_PIDS=$(cat $PIDS_FILE) -kill $(echo $OLD_PIDS) +cat $PIDS_FILE | xargs kill rm $PIDS_FILE hc emit_hook reload @@ -43,11 +42,8 @@ for monitor in $(hc list_monitors | cut -d: -f1) ; do ./statusbar.sh $monitor & store_pid done -./tray.sh & store_pid -udiskie --tray & store_pid - -systemctl --user restart sxhkd -systemctl --user restart xautolock -systemctl --user restart battery-warning.timer - wmname LG3D + +systemctl --user restart hlwm-session.target +#systemctl --user restart battery-warning.timer + diff --git a/bindings.sh b/bindings.sh index bca61ef..745f4c2 100755 --- a/bindings.sh +++ b/bindings.sh @@ -14,7 +14,7 @@ hc keybind $Mod-Shift-q close hc keybind $Mod-Shift-r reload # tags -TAG_NAMES=( {1..9} 0 ) +TAG_NAMES=( "www" "term" "code" "slack" "zoom" {6..9} 0) TAG_KEYS=( {1..9} 0 ) hc rename default "${TAG_NAMES[0]}" || true diff --git a/conky-bat/index.js b/conky-bat/index.js index 5e3328a..131f530 100755 --- a/conky-bat/index.js +++ b/conky-bat/index.js @@ -1,14 +1,18 @@ #!/usr/bin/env node 'use strict'; -var linuxBattery = require('linux-battery'); +const linuxBattery = require('linux-battery'); async function run() { try { const batteries = await linuxBattery(); batteries.forEach(battery => { - var color = battery.warningLevel !== 'none' ? '#ff0000' : '#eee8d5'; - var stateSymbol = battery.state === 'charging' ? '↑' : '↓'; + if (battery.powerSupply === 'no') { + return ''; + } + + const color = battery.warningLevel !== 'none' ? '#ff0000' : '#eee8d5'; + let stateSymbol = battery.state === 'charging' ? '↑' : '↓'; switch (battery.state) { case 'charging': stateSymbol = '↑'; @@ -22,9 +26,9 @@ async function run() { default: } - var timeLeft = battery.timeToFull || battery.timeToEmpty || ''; + const timeLeft = battery.timeToFull || battery.timeToEmpty || ''; - var text = `%{F${color}}${battery.percentage} ${stateSymbol} ${timeLeft}%{F-}`; + const text = `%{F${color}}${battery.percentage} ${stateSymbol} ${timeLeft}%{F-}`; process.stdout.write(text); }); } catch (error) { diff --git a/conkyrc b/conkyrc index 08070aa..f1bf5e5 100644 --- a/conkyrc +++ b/conkyrc @@ -36,5 +36,5 @@ conky.config = { }; conky.text = [[ -%{c} load: ${loadavg 1} ${loadavg 2} ${loadavg 3} | ram: ${memperc}% | swap: ${swapperc} | processes: ${processes} | ${if_up wlan0} wlan:${wireless_link_qual_perc wlan0}% ${wireless_essid wlan0} |$endif ${if_up eth0:} lan on |$endif bat ${exec $HOME/.config/herbstluftwm/conky-bat/index.js} +%{c} ${exec sensors | grep -A 3 acpitz-acpi-0 | grep temp1 | awk '{print $2}'} | load: ${loadavg 1} ${loadavg 2} ${loadavg 3} | ram: ${memperc}% | swap: ${swapperc} | processes: ${processes} | ${if_up wlan0} wlan: ${wireless_bitrate} ${wireless_link_qual_perc wlan0}% ${wireless_essid wlan0} |$endif ${if_up eth0:} lan on |$endif bat ${exec $HOME/.config/herbstluftwm/conky-bat/index.js} ]]; diff --git a/rules.sh b/rules.sh index 7d1b13f..148f41b 100755 --- a/rules.sh +++ b/rules.sh @@ -7,11 +7,17 @@ hc() { # rules hc unrule -F -hc rule focus=off # normally do not focus new clients +# eval: focus all new clients +hc rule focus=true # give focus to most common terminals -hc rule class~'(.*[Rr]xvt.*|.*[Tt]erm|Konsole)' focus=on +hc rule class~'(.*[Rr]xvt.*|.*[Tt]erm|Konsole|kitty)' 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_DIALOG' focus=on switchtag=on hc rule windowtype~'_NET_WM_WINDOW_TYPE_(NOTIFICATION|DOCK)' manage=off + +hc rule class='1Password' focus=on switchtag=on +hc rule class=zoom tag=zoom focus=on switchtag=on +hc rule class=Slack tag=slack focus=on switchtag=on +hc rule class=Pavucontrol tag=0 focus=on switchtag=on diff --git a/statusbar.sh b/statusbar.sh index 65c0c20..cbd0840 100755 --- a/statusbar.sh +++ b/statusbar.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -font="Fira Code:pixelsize=14" +font="PragmataPro Mono Liga:pixelsize=15" function uniq_linebuffered() { awk -W interactive '$0 != l { print ; l=$0 ; fflush(); }' "$@" diff --git a/wallpapers/gruvarch.png b/wallpapers/gruvarch.png new file mode 100644 index 0000000..d842812 Binary files /dev/null and b/wallpapers/gruvarch.png differ diff --git a/wallpapers/nerves.png b/wallpapers/nerves.png deleted file mode 100644 index c8b083e..0000000 Binary files a/wallpapers/nerves.png and /dev/null differ