Run hlctl if present and not disabled

This commit is contained in:
emilis 2023-01-07 18:35:45 +00:00
parent 165bcdc08b
commit 71c32fff7b
2 changed files with 9 additions and 3 deletions

2
.gitignore vendored
View File

@ -3,3 +3,5 @@ fish/fish_variables
# openbsd crash core dumps
*.core
*.log
# hlctl config file
herbstluftwm/hlctl.toml

View File

@ -1,4 +1,11 @@
#!/usr/bin/env fish
alias hc=herbstclient
if command -sq "hlctl"; and test "$hlctl_enabled" != "false"
hc spawn "hlctl" "init"
exit $status
end
import fish_functions/notify
import fish_functions/restart_svcs
import fish_functions/group
@ -8,8 +15,6 @@ import fish_functions/remove_default
set -g THIS_PATH (pwd)
log "starting in $THIS_PATH"
alias hc=herbstclient
# default font if not set
set_default hlwm_font "-*-fixed-medium-*-*-*-12-*-*-*-*-*-*-*"
new_config -n Font -v "$hlwm_font"
@ -23,7 +28,6 @@ group_active_reset
# set -l Mod Mod1 # alt
set -g Mod Mod4
set -g AltMod Mod1
new_config -n ModKey -v $Mod
set -U hlwm_mod $Mod