From 37ac499b62253ee45f3931a25f76ccd74bf65596 Mon Sep 17 00:00:00 2001 From: Emmet Date: Tue, 9 May 2023 16:13:06 -0500 Subject: [PATCH] Fixed workspace names + removed unused dmenu scripts --- user/wm/xmonad/xmonad.hs | 28 +++------ user/wm/xmonad/xmonad.org | 117 +++++++------------------------------- 2 files changed, 29 insertions(+), 116 deletions(-) diff --git a/user/wm/xmonad/xmonad.hs b/user/wm/xmonad/xmonad.hs index 8561909e..68ed5348 100644 --- a/user/wm/xmonad/xmonad.hs +++ b/user/wm/xmonad/xmonad.hs @@ -156,18 +156,16 @@ myModMask = mod4Mask myWorkspaces :: [String] myWorkspaces = - [ "\xf15c¹", -- document icon for writing - "\xfa9e²", -- globe icon for browsing - "\xf121³", -- dev icon for programming - "\xf001⁴", -- music file icon for composition - "\xf1fc⁵", -- paint icon for art - "\xead9⁶", -- video icon for recording/editing - "\xf0d6⁷", -- money icon for finances - "\xf19d⁸", -- cap icon for teaching - "\xf11b⁹" -- gamepad icon for gaming + [ "\xf15c¹", -- document icon for writing + "\xeb01 ²", -- globe icon for browsing + "\xf121³", -- dev icon for programming + "\xf001⁴", -- music file icon for composition + "\xf1fc⁵", -- paint icon for art + "\xf0bdc ⁶", -- video icon for recording/editing + "\xf0d6⁷", -- money icon for finances + "\xf19d⁸", -- cap icon for teaching + "\xf11b⁹" -- gamepad icon for gaming ] ---myWorkspaces = --- [ "doc", "www", "dev", "mus", "art", "vid", "fin", "edu", "game"] myWorkspaceIndices = M.fromList $ zipWith (,) myWorkspaces [1..] -- (,) == \x y -> (x,y) @@ -324,14 +322,6 @@ myKeys conf@(XConfig {XMonad.modMask = modm}) = ((modm, xK_semicolon), spawn ("rofi -show drun -show-icons")), ((modm, xK_p), spawn ("keepmenu")), - -- launch app template dmenu script - ((modm, xK_w), spawn ("~/.xmonad/template-select.sh '" ++ colorBgNormal ++ "' '" ++ color08Bright ++ "' '" ++ colorFocus ++ "' '" ++ color08Bright ++ "'")), - - -- launch virt-manager vm select dmenu script - ((modm, xK_v), spawn ("~/.xmonad/vm-select.sh '" ++ colorBgNormal ++ "' '" ++ color08Bright ++ "' '" ++ colorFocus ++ "' '" ++ color08Bright ++ "'")), - -- launch virt-manager vm select dmenu script - -- ((modm .|. shiftMask, xK_v), spawn ("~/.xmonad/vm-app-select.sh '" ++ colorBgNormal ++ "' '" ++ color08Bright ++ "' '" ++ colorFocus ++ "' '" ++ color08Bright ++ "'")), - -- close focused window ((modm, xK_q), kill), -- close all windows on current workspace diff --git a/user/wm/xmonad/xmonad.org b/user/wm/xmonad/xmonad.org index 88ff2f0f..62e204cf 100644 --- a/user/wm/xmonad/xmonad.org +++ b/user/wm/xmonad/xmonad.org @@ -205,18 +205,16 @@ By default, workspaces are simply numeric strings ("1", "2", "3", etc..), but an #+BEGIN_SRC haskell :tangle xmonad.hs myWorkspaces :: [String] myWorkspaces = - [ "\xf15c¹", -- document icon for writing - "\xfa9e²", -- globe icon for browsing - "\xf121³", -- dev icon for programming - "\xf001⁴", -- music file icon for composition - "\xf1fc⁵", -- paint icon for art - "\xead9⁶", -- video icon for recording/editing - "\xf0d6⁷", -- money icon for finances - "\xf19d⁸", -- cap icon for teaching - "\xf11b⁹" -- gamepad icon for gaming + [ "\xf15c¹", -- document icon for writing + "\xeb01 ²", -- globe icon for browsing + "\xf121³", -- dev icon for programming + "\xf001⁴", -- music file icon for composition + "\xf1fc⁵", -- paint icon for art + "\xf0bdc ⁶", -- video icon for recording/editing + "\xf0d6⁷", -- money icon for finances + "\xf19d⁸", -- cap icon for teaching + "\xf11b⁹" -- gamepad icon for gaming ] ---myWorkspaces = --- [ "doc", "www", "dev", "mus", "art", "vid", "fin", "edu", "game"] myWorkspaceIndices = M.fromList $ zipWith (,) myWorkspaces [1..] -- (,) == \x y -> (x,y) @@ -395,88 +393,14 @@ These setup standard bindings for brightness and audio control from the keyboard -- ((0, xK_F8), spawn "/home/librephoenix/.local/bin/setup_external_monitor.sh"), #+END_SRC -**** Dmenu Script Keybinds -I have =dmenu_run= bound to =S-;= for quick app access. +**** Launcher Keybinds +I have =rofi= bound to =S-;= for quick app access. #+BEGIN_SRC haskell :tangle xmonad.hs -- launch dmenu --((modm, xK_semicolon), spawn ("dmenu_run -nb '" ++ colorBgNormal ++ "' -nf '" ++ color08Bright ++ "' -sb '" ++ colorFocus ++ "' -sf '" ++ color08Bright ++ "' -fn 'UbuntuMono-R:regular:pixelsize=28' -l 4 -p '➤'")), ((modm, xK_semicolon), spawn ("rofi -show drun -show-icons")), ((modm, xK_p), spawn ("keepmenu")), -#+END_SRC -I also have some dmenu scripts bound to keybinds for quick use. -***** App Template Dmenu Script -I created another dmenu script which allows me to quickly select from a set of scripts in =~/.xmonad/workspace-templates/=. These templates simply launch multiple apps at once, and are useful for quickly opening all necessary programs for a given task. -#+BEGIN_SRC sh :tangle template-select.sh -#!/bin/sh - -nbColor=$1 -nfColor=$2 -sbColor=$3 -sfColor=$4 - -choices=$(/usr/bin/ls ~/.xmonad/workspace-templates/) - -promptarray[0]="What to do?" -promptarray[1]="Which template?" -promptarray[2]="... What do you want?" -promptarray[3]="What template?" -promptarray[4]="Your template is my command:" -promptarray[5]="What would you like to do?" -promptarray[6]="Yeas, boss?" -promptarray[7]="Which template again?" - -size=${#promptarray[@]} -index=$(($RANDOM % $size)) - -selectedprompt=${promptarray[$index]} - -choice=$(echo -e "$choices" | dmenu -i -nb ${nbColor} -nf ${nfColor} -sb ${sbColor} -sf ${sfColor} -fn 'UbuntuMono-R:regular:pixelsize=28' -p "$selectedprompt") && exec ~/.xmonad/workspace-templates/$choice - -#+END_SRC - -I have this dmenu script bound to =S-w=: -#+BEGIN_SRC haskell :tangle xmonad.hs - -- launch app template dmenu script - ((modm, xK_w), spawn ("~/.xmonad/template-select.sh '" ++ colorBgNormal ++ "' '" ++ color08Bright ++ "' '" ++ colorFocus ++ "' '" ++ color08Bright ++ "'")), - -#+END_SRC -***** VM Select Dmenu Script -I have another dmenu script which allows me to quickly select a particular QEMU virtual machine and immediately open it inside of virt-manager: -#+BEGIN_SRC sh :tangle vm-select.sh -#!/bin/sh - -nbColor=$1 -nfColor=$2 -sbColor=$3 -sfColor=$4 - -choices=$(/usr/bin/ls ~/.config/libvirt/qemu | grep .xml | cut -f 1 -d '.') - -promptarray[0]="What VM?" -promptarray[1]="Which VM?" -promptarray[2]="... What VM do you want?" -promptarray[3]="What VM do you need?" -promptarray[4]="I shall start the VM:" -promptarray[5]="Virtual time?" -promptarray[6]="VM, boss?" -promptarray[7]="Which VM again?" - -size=${#promptarray[@]} -index=$(($RANDOM % $size)) - -selectedprompt=${promptarray[$index]} - -choice=$(echo -e "$choices" | dmenu -i -nb ${nbColor} -nf ${nfColor} -sb ${sbColor} -sf ${sfColor} -fn 'UbuntuMono-R:regular:pixelsize=28' -p "$selectedprompt") && exec virt-manager -c qemu:///session --show-domain-console $choice -#+END_SRC - -This script is bound to =S-v=: -#+BEGIN_SRC haskell :tangle xmonad.hs - -- launch virt-manager vm select dmenu script - ((modm, xK_v), spawn ("~/.xmonad/vm-select.sh '" ++ colorBgNormal ++ "' '" ++ color08Bright ++ "' '" ++ colorFocus ++ "' '" ++ color08Bright ++ "'")), - -- launch virt-manager vm select dmenu script - -- ((modm .|. shiftMask, xK_v), spawn ("~/.xmonad/vm-app-select.sh '" ++ colorBgNormal ++ "' '" ++ color08Bright ++ "' '" ++ colorFocus ++ "' '" ++ color08Bright ++ "'")), - #+END_SRC **** Window Management Keybinds All of the following keybinds pertain to window management and layouts: @@ -963,14 +887,13 @@ main = do #+END_SRC * XMobar I utilize xmobar as a status bar on one of my monitors. To manage my xmobar configs, three main files are used: -- [[./../.config/xmobar/base-xmobarrc][~/.config/xmobar/base-xmobarrc]] which contains the structure of my xmobar config -- [[./../.config/xmobar/base-xmobarrc-trayer][~/.config/xmobar/base-xmobarrc-trayer]] which contains the structure of my xmobar config with a trayer pad (for when I use trayer) -- [[./startup.sh][~/.xmonad/startup.sh]] which has a section which generates a copy of my xmobarrcs for the current color scheme I set in [[./xmonad.hs][xmonad.hs]] +- [[./base-xmobarrc][base-xmobarrc]] which contains the structure of my xmobar config +- [[./startup.sh][startup.sh]] which has a section which generates a copy of my xmobarrcs for the current color scheme I set in [[./xmonad.hs][xmonad.hs]] ** Base xmobarrc -This is my base xmobarrc. This also depends on =UbuntuMono=, =Symbols Nerd Font= and =Inconsolata for Powerline=. -#+BEGIN_SRC haskell :tangle ~/.config/xmobar/base-xmobarrc -Config { font = "UbuntuMono-R 18" - , additionalFonts = ["Symbols Nerd Font 21","Inconsolata for Powerline 28"] +This is my base xmobarrc. This also depends on =Inconsolata= and =Symbols Nerd Font=. +#+BEGIN_SRC haskell :tangle base-xmobarrc +Config { font = "Inconsolata 18" + , additionalFonts = ["Symbols Nerd Font 14"] , border = NoBorder , bgColor = "colorBgNormal" , alpha = 200 @@ -991,9 +914,9 @@ Config { font = "UbuntuMono-R 18" , Run BatteryP ["BAT0"] ["-t", "", "-L", "10", "-H", "80", "-p", "3", "--", - "-O"," \xf303 \xf583% ", - "-i"," \xf303 \xf578% ", - "-o"," \xf303 \xf58b% ", + "-O"," \xf303 \xf17e3% ", + "-i"," \xf303 \xf17e7% ", + "-o"," \xf303 \xf17e4% ", "-L", "-15", "-H", "-5", "-l", "color02Normal", "-m", "color05Normal", "-h", "color03Normal"] 10 , Run Brightness