From ef6e9aa6d2668df0c941614075a1618c068caf3b Mon Sep 17 00:00:00 2001 From: Sakooooo <78461130+Sakooooo@users.noreply.github.com> Date: Mon, 24 Jul 2023 00:15:51 +0300 Subject: [PATCH] WHAT IS LOVEnvim --- config/xmobar/xmobarrc | 3 ++- config/xmonad/xmonad.hs | 8 ++++++-- modules/desktop/xmonad/default.nix | 2 +- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/config/xmobar/xmobarrc b/config/xmobar/xmobarrc index 726294a4..04dea3fc 100644 --- a/config/xmobar/xmobarrc +++ b/config/xmobar/xmobarrc @@ -12,7 +12,7 @@ Config { -- layout , sepChar = "%" -- delineator between plugin names and straight text , alignSep = "}{" -- separator between left-right alignment - , template = "%StdinReader% | %battery% | %multicpu% | %memory% | %dynnetwork% }{ %date% | %kbd% " + , template = "%StdinReader% | %battery% | %multicpu% | %memory% | %dynnetwork% }{ %date% | %kbd% _XMONAD_TRAYPAD%" -- general behavior , lowerOnStart = True -- send to bottom of window stack on start @@ -79,6 +79,7 @@ Config { , "--normal" , "darkorange" , "--high" , "darkred" ] 10 + , Run XPropertyLog "_XMONAD_TRAYPAD", -- battery monitor , Run Battery [ "--template" , "Batt: " diff --git a/config/xmonad/xmonad.hs b/config/xmonad/xmonad.hs index 05301c9e..81b1cde9 100644 --- a/config/xmonad/xmonad.hs +++ b/config/xmonad/xmonad.hs @@ -22,6 +22,7 @@ import XMonad.Hooks.ManageDocks -- manage dock thingy xmobar hHAUISHFOAUISHDFUOI import XMonad.Hooks.DynamicLog -- supposed to be for xmobar import XMonad.Util.SpawnOnce -- for startup items import XMonad.Util.Run -- for xmobar startup +import XMonad.Util.Hacks -- tray import qualified XMonad.StackSet as W import qualified Data.Map as M @@ -135,7 +136,7 @@ myKeys conf@(XConfig {XMonad.modMask = modm}) = M.fromList $ , ((modm .|. shiftMask, xK_q ), io exitSuccess) -- Restart xmonad - , ((modm , xK_q ), spawn "xmonad --recompile; killall xmobar; xmonad --restart") + , ((modm , xK_q ), spawn "xmonad --recompile; killall stalonetray; killall xmobar; xmonad --restart") -- Run xmessage with a summary of the default keybindings (useful for beginners) , ((modm .|. shiftMask, xK_slash ), xmessage help) @@ -268,7 +269,10 @@ main = do logHook = myLogHook h, - manageHook = manageDocks <+> manageHook def + manageHook = manageDocks <+> manageHook def, + + handleEventHook = handleEventHook def + <> Hacks.trayerPaddingXmobarEventHook } -- A structure containing your configuration settings, overriding diff --git a/modules/desktop/xmonad/default.nix b/modules/desktop/xmonad/default.nix index caa55ca6..a2447f19 100644 --- a/modules/desktop/xmonad/default.nix +++ b/modules/desktop/xmonad/default.nix @@ -68,7 +68,7 @@ in # bar xmobar # tray - stalonetray + trayer ]; home-manager.users.sako = { pkgs , ...}: {