From 71c32fff7ba22826f5b9b205a5e7919e06605f39 Mon Sep 17 00:00:00 2001 From: emilis Date: Sat, 7 Jan 2023 18:35:45 +0000 Subject: [PATCH] Run hlctl if present and not disabled --- .gitignore | 2 ++ herbstluftwm/main.fish | 10 +++++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 3698c52..2f6bfdb 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,5 @@ fish/fish_variables # openbsd crash core dumps *.core *.log +# hlctl config file +herbstluftwm/hlctl.toml diff --git a/herbstluftwm/main.fish b/herbstluftwm/main.fish index f0ae092..94fb0c0 100755 --- a/herbstluftwm/main.fish +++ b/herbstluftwm/main.fish @@ -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