about summary refs log tree commit diff
diff options
context:
space:
mode:
authorBaitinq <manuelpalenzuelamerino@gmail.com>2022-07-06 20:01:31 +0200
committerBaitinq <manuelpalenzuelamerino@gmail.com>2022-07-06 20:01:31 +0200
commitbe9705f4f42954916aaf0c94b17e3ae57a699ebe (patch)
treecc9d1dfce4c249d785ed2f59e10f9301b3486b48
parentXMonad: Add proper fullscreen capabilities (diff)
downloadnixos-config-be9705f4f42954916aaf0c94b17e3ae57a699ebe.tar.gz
nixos-config-be9705f4f42954916aaf0c94b17e3ae57a699ebe.tar.bz2
nixos-config-be9705f4f42954916aaf0c94b17e3ae57a699ebe.zip
XMonad+XMobar: add clickable workspaces
Diffstat (limited to '')
-rw-r--r--dotfiles/xmobar.hs4
-rw-r--r--dotfiles/xmonad.hs6
-rw-r--r--hosts/home.nix1
3 files changed, 7 insertions, 4 deletions
diff --git a/dotfiles/xmobar.hs b/dotfiles/xmobar.hs
index 81e91c1..16325a1 100644
--- a/dotfiles/xmobar.hs
+++ b/dotfiles/xmobar.hs
@@ -12,7 +12,7 @@ Config {
    -- layout
    , sepChar =  "%"   -- delineator between plugin names and straight text
    , alignSep = "}{"  -- separator between left-right alignment
-   , template = "%XMonadLog% }{ %WM_NAME%"
+   , template = "%UnsafeXMonadLog% }{ %WM_NAME%"
 
    -- general behavior
    , lowerOnStart =     False    -- send to bottom of window stack on start
@@ -22,6 +22,6 @@ Config {
    , pickBroadest =     False   -- choose widest display (multi-monitor)
    , persistent =       False    -- enable/disable hiding (True = disabled)
 
-   , commands = [ Run XMonadLog,
+   , commands = [ Run UnsafeXMonadLog,
                   Run XPropertyLog "WM_NAME" ]
    }
diff --git a/dotfiles/xmonad.hs b/dotfiles/xmonad.hs
index 95f36a2..3280f51 100644
--- a/dotfiles/xmonad.hs
+++ b/dotfiles/xmonad.hs
@@ -46,6 +46,8 @@ import XMonad.Actions.CycleWS
 
 import XMonad.Hooks.EwmhDesktops
 
+import XMonad.Util.ClickableWorkspaces
+
 ------------------------------------------------------------------------
 -- Workspaces
 -- The default number of workspaces (virtual screens) and their names.
@@ -224,8 +226,8 @@ myStatusBar = statusBarProp "xmobar" (do
                                                   , ppTitle = id
                                                   , ppSep = " |  "
                                                   , ppLayout = (\_ -> "")
-                                                  , ppHidden = createDwmBox "#bbbbbb" . wrap "  " "  "
-                                                  , ppHiddenNoWindows = wrap "  " "  "
+                                                  , ppHidden = (\s -> clickableWrap ((read s::Int) - 1) (createDwmBox "#bbbbbb" ("  " ++ s ++ "  "))) --better way to clickablewrap . 
+                                                  , ppHiddenNoWindows = (\s -> clickableWrap ((read s::Int) - 1) ("  " ++ s ++ "  "))
                                           }
                                       )
                                       where
diff --git a/hosts/home.nix b/hosts/home.nix
index bd5864f..df4d005 100644
--- a/hosts/home.nix
+++ b/hosts/home.nix
@@ -35,6 +35,7 @@ in
       paperkey
       openjdk8
       virt-manager
+      xdotool#needed for xmobar clickable workspaces
     ] ++
     (with pkgs.custom; [
       smart-wallpaper