From 4eeb3026223754754a826b340a0674feab7fdd22 Mon Sep 17 00:00:00 2001 From: Derek Taylor Date: Mon, 26 Apr 2021 13:32:23 -0500 Subject: [PATCH] Adding clickable events to xmobar widgets --- .bashrc | 3 --- .config/fish/config.fish | 3 --- .config/xmobar/xmobarrc0 | 6 ++++-- .config/xmobar/xmobarrc1 | 8 +++++--- .config/xmobar/xmobarrc2 | 8 +++----- .xmonad/README.org | 4 ++-- .xmonad/xmonad.hs | 4 ++-- .zshrc | 3 --- 8 files changed, 16 insertions(+), 23 deletions(-) diff --git a/.bashrc b/.bashrc index b6fbfce..01caed1 100644 --- a/.bashrc +++ b/.bashrc @@ -13,9 +13,6 @@ export ALTERNATE_EDITOR="" # setting for emacsclient export EDITOR="emacsclient -t -a ''" # $EDITOR use Emacs in terminal export VISUAL="emacsclient -c -a emacs" # $VISUAL use Emacs in GUI mode -### EXPORTS for dmscripts -export DMTERM="emacsclient -c -a emacs" - ### SET MANPAGER ### Uncomment only one of these! diff --git a/.config/fish/config.fish b/.config/fish/config.fish index 7c48f95..558768e 100644 --- a/.config/fish/config.fish +++ b/.config/fish/config.fish @@ -18,9 +18,6 @@ set TERM "xterm-256color" # Sets the terminal type set EDITOR "emacsclient -t -a ''" # $EDITOR use Emacs in terminal set VISUAL "emacsclient -c -a emacs" # $VISUAL use Emacs in GUI mode -### EXPORTS for dmscripts -set DMTERM "emacsclient -c -a emacs" - ### SET MANPAGER ### Uncomment only one of these! diff --git a/.config/xmobar/xmobarrc0 b/.config/xmobar/xmobarrc0 index 5940ed0..e89c3a8 100755 --- a/.config/xmobar/xmobarrc0 +++ b/.config/xmobar/xmobarrc0 @@ -15,7 +15,7 @@ Config { font = "xft:Ubuntu:weight=bold:pixelsize=11:antialias=true:hinting=t , persistent = True , iconRoot = "/home/dt/.xmonad/xpm/" -- default: "." , commands = [ - -- Time and date + -- Time and date Run Date "\xf133 %b %d %Y - (%H:%M) " "date" 50 -- Network up and down , Run Network "enp6s0" ["-t", "\xf0ab kb \xf0aa kb"] 20 @@ -30,11 +30,13 @@ Config { font = "xft:Ubuntu:weight=bold:pixelsize=11:antialias=true:hinting=t , Run Com "/home/dt/.local/bin/pacupdate" [] "pacupdate" 36000 -- Runs a standard shell command 'uname -r' to get kernel version , Run Com "uname" ["-r"] "" 3600 + -- Script that dynamically adjusts xmobar padding depending on number of trayer icons. + , Run Com "~/.config/xmobar/trayer-padding-icon.sh" [] "trayerpad" 20 -- Prints out the left side items such as workspaces, layout, etc. -- The workspaces are 'clickable' in my configs. , Run UnsafeStdinReader ] , sepChar = "%" , alignSep = "}{" - , template = " | %UnsafeStdinReader% }{ |  %uname% | %cpu% | %memory% | %disku% | %enp6s0% |  %pacupdate% | %date% " + , template = " | %UnsafeStdinReader% }{ | %uname% | %cpu% | %memory% | %disku% | %enp6s0% | %pacupdate% | %date% " } diff --git a/.config/xmobar/xmobarrc1 b/.config/xmobar/xmobarrc1 index 30aaeee..5c7c8ec 100755 --- a/.config/xmobar/xmobarrc1 +++ b/.config/xmobar/xmobarrc1 @@ -8,14 +8,14 @@ Config { font = "xft:Ubuntu:weight=bold:pixelsize=11:antialias=true:hinting=t ] , bgColor = "#282c34" , fgColor = "#ff6c6b" - , position = Static { xpos = 3840 , ypos = 0, width = 1920, height = 24 } + , position = Static { xpos = 1920 , ypos = 0, width = 1920, height = 24 } , lowerOnStart = True , hideOnStart = False , allDesktops = True , persistent = True , iconRoot = "/home/dt/.xmonad/xpm/" -- default: "." , commands = [ - -- Time and date + -- Time and date Run Date "\xf133 %b %d %Y - (%H:%M) " "date" 50 -- Network up and down , Run Network "enp6s0" ["-t", "\xf0ab kb \xf0aa kb"] 20 @@ -30,11 +30,13 @@ Config { font = "xft:Ubuntu:weight=bold:pixelsize=11:antialias=true:hinting=t , Run Com "/home/dt/.local/bin/pacupdate" [] "pacupdate" 36000 -- Runs a standard shell command 'uname -r' to get kernel version , Run Com "uname" ["-r"] "" 3600 + -- Script that dynamically adjusts xmobar padding depending on number of trayer icons. + , Run Com "~/.config/xmobar/trayer-padding-icon.sh" [] "trayerpad" 20 -- Prints out the left side items such as workspaces, layout, etc. -- The workspaces are 'clickable' in my configs. , Run UnsafeStdinReader ] , sepChar = "%" , alignSep = "}{" - , template = " | %UnsafeStdinReader% }{ |  %uname% | %cpu% | %memory% | %disku% | %enp6s0% |  %pacupdate% | %date% " + , template = " | %UnsafeStdinReader% }{ | %uname% | %cpu% | %memory% | %disku% | %enp6s0% | %pacupdate% | %date% | %trayerpad%" } diff --git a/.config/xmobar/xmobarrc2 b/.config/xmobar/xmobarrc2 index f286307..bb95d8f 100755 --- a/.config/xmobar/xmobarrc2 +++ b/.config/xmobar/xmobarrc2 @@ -8,14 +8,14 @@ Config { font = "xft:Ubuntu:weight=bold:pixelsize=11:antialias=true:hinting=t ] , bgColor = "#282c34" , fgColor = "#ff6c6b" - , position = Static { xpos = 1920 , ypos = 0, width = 1920, height = 24 } + , position = Static { xpos = 3840 , ypos = 0, width = 1920, height = 24 } , lowerOnStart = True , hideOnStart = False , allDesktops = True , persistent = True , iconRoot = "/home/dt/.xmonad/xpm/" -- default: "." , commands = [ - -- Time and date + -- Time and date Run Date "\xf133 %b %d %Y - (%H:%M) " "date" 50 -- Network up and down , Run Network "enp6s0" ["-t", "\xf0ab kb \xf0aa kb"] 20 @@ -30,13 +30,11 @@ Config { font = "xft:Ubuntu:weight=bold:pixelsize=11:antialias=true:hinting=t , Run Com "/home/dt/.local/bin/pacupdate" [] "pacupdate" 36000 -- Runs a standard shell command 'uname -r' to get kernel version , Run Com "uname" ["-r"] "" 3600 - -- Script that dynamically adjusts xmobar padding depending on number of trayer icons. - , Run Com "~/.config/xmobar/trayer-padding-icon.sh" [] "trayerpad" 20 -- Prints out the left side items such as workspaces, layout, etc. -- The workspaces are 'clickable' in my configs. , Run UnsafeStdinReader ] , sepChar = "%" , alignSep = "}{" - , template = " | %UnsafeStdinReader% }{ |  %uname% | %cpu% | %memory% | %disku% | %enp6s0% |  %pacupdate% | %date% |%trayerpad%" + , template = " | %UnsafeStdinReader% }{ | %uname% | %cpu% | %memory% | %disku% | %enp6s0% | %pacupdate% | %date% " } diff --git a/.xmonad/README.org b/.xmonad/README.org index 4002f4a..0117f0b 100644 --- a/.xmonad/README.org +++ b/.xmonad/README.org @@ -596,8 +596,8 @@ main :: IO () main = do -- Launching three instances of xmobar on their monitors. xmproc0 <- spawnPipe "xmobar -x 0 $HOME/.config/xmobar/xmobarrc0" - xmproc1 <- spawnPipe "xmobar -x 1 $HOME/.config/xmobar/xmobarrc2" - xmproc2 <- spawnPipe "xmobar -x 2 $HOME/.config/xmobar/xmobarrc1" + xmproc1 <- spawnPipe "xmobar -x 1 $HOME/.config/xmobar/xmobarrc1" + xmproc2 <- spawnPipe "xmobar -x 2 $HOME/.config/xmobar/xmobarrc2" -- the xmonad, ya know...what the WM is named after! xmonad $ ewmh def { manageHook = myManageHook <+> manageDocks diff --git a/.xmonad/xmonad.hs b/.xmonad/xmonad.hs index 598cc09..7ef8e50 100644 --- a/.xmonad/xmonad.hs +++ b/.xmonad/xmonad.hs @@ -485,8 +485,8 @@ main :: IO () main = do -- Launching three instances of xmobar on their monitors. xmproc0 <- spawnPipe "xmobar -x 0 $HOME/.config/xmobar/xmobarrc0" - xmproc1 <- spawnPipe "xmobar -x 1 $HOME/.config/xmobar/xmobarrc2" - xmproc2 <- spawnPipe "xmobar -x 2 $HOME/.config/xmobar/xmobarrc1" + xmproc1 <- spawnPipe "xmobar -x 1 $HOME/.config/xmobar/xmobarrc1" + xmproc2 <- spawnPipe "xmobar -x 2 $HOME/.config/xmobar/xmobarrc2" -- the xmonad, ya know...what the WM is named after! xmonad $ ewmh def { manageHook = myManageHook <+> manageDocks diff --git a/.zshrc b/.zshrc index fbbf1fd..d473b97 100644 --- a/.zshrc +++ b/.zshrc @@ -11,9 +11,6 @@ export HISTORY_IGNORE="(ls|cd|pwd|exit|sudo reboot|history|cd -|cd ..)" export EDITOR="emacsclient -t -a ''" # $EDITOR use Emacs in terminal export VISUAL="emacsclient -c -a emacs" # $VISUAL use Emacs in GUI mode -### EXPORTS for dmscripts -export DMTERM="emacsclient -c -a emacs" - ### SET MANPAGER ### Uncomment only one of these!