From 8d39e40bcf6da354c2e5ff2f1b4b8981c5fcf7f5 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Fri, 26 May 2023 13:09:02 +0200 Subject: ... --- accounts/gkleen@sif/xmonad/xmonad.hs | 7 ++++++- hosts/vidhar/pgbackrest/default.nix | 3 ++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/accounts/gkleen@sif/xmonad/xmonad.hs b/accounts/gkleen@sif/xmonad/xmonad.hs index d6e32aab..906cc663 100644 --- a/accounts/gkleen@sif/xmonad/xmonad.hs +++ b/accounts/gkleen@sif/xmonad/xmonad.hs @@ -896,7 +896,7 @@ myKeys' conf host = Map.fromList $ safeSpawn "loginctl" ["lock-session", sessId] ) , ((modm .|. shiftMask, xK_s ), safeSpawn "systemctl" ["suspend"]) - , ((modm .|. shiftMask, xK_h ), safeSpawn "systemctl" ["poweroff"]) + , ((modm .|. shiftMask, xK_h ), inputPromptWithCompl xPConfigMonospace "systemctl" powerActCompl ?+ powerAct) , ((modm, xK_v ), windows copyToAll) -- @@ Make focused window always visible , ((modm .|. shiftMask, xK_v ), killAllOtherCopies) -- @@ Toggle window state back , ((modm .|. shiftMask, xK_g ), windowPrompt xPConfig Goto wsWindows) @@ -925,3 +925,8 @@ myKeys' conf host = Map.fromList $ modm = XMonad.modMask conf brCycle = [0, 1 % 100, 1 % 10, 1 % 4, 1 % 2, 3 % 4, 1] + + powerActWords = ["poweroff", "reboot", "hibernate", "suspend"] + powerActCompl = mkComplFunFromList' xPConfigMonospace powerActWords + powerAct act | act `elem` powerActWords = safeSpawn "systemctl" $ pure act + | otherwise = return () diff --git a/hosts/vidhar/pgbackrest/default.nix b/hosts/vidhar/pgbackrest/default.nix index c3ba603a..899b0e0f 100644 --- a/hosts/vidhar/pgbackrest/default.nix +++ b/hosts/vidhar/pgbackrest/default.nix @@ -41,7 +41,8 @@ in { "srv01.uniworx.de" = { pg1-host-type = "tls"; - pg1-host = "2a03:4000:5e:e55::"; + # pg1-host = "2a03:4000:5e:e55::"; + pg1-host = "srv01.uniworx.de"; pg1-host-ca-file = toString ./ca/ca.crt; pg1-host-cert-file = toString ./ca/vidhar.crt; pg1-host-key-file = config.sops.secrets."pgbackrest.key".path; -- cgit v1.2.3