bar stuff

This commit is contained in:
elkowar 2021-08-14 11:06:01 +02:00
parent de8bad20ec
commit a83eac15ab
No known key found for this signature in database
GPG key ID: E321AD71B1D1F27F
5 changed files with 19 additions and 12 deletions

View file

@ -100,9 +100,13 @@
(defpoll month :interval "1h" "date +%m")
(defpoll year :interval "1h" "date +%y")
(deflisten workspaces_0_yuck "./workspaces.sh 0")
(deflisten workspaces_1_yuck "./workspaces.sh 1")
(deflisten workspaces_2_yuck "./workspaces.sh 2")
(defvar workspaces_1_yuck "")
(defvar workspaces_2_yuck "")
; these are not needed because updates are done via update-workspaces.sh triggered from xmonad
;(deflisten workspaces_0_yuck "./workspaces.sh 0")
;(deflisten workspaces_1_yuck "./workspaces.sh 1")
;(deflisten workspaces_2_yuck "./workspaces.sh 2")
(defwindow bar_1
:monitor 1

View file

@ -1,17 +1,15 @@
#!/usr/bin/env bash
monitor="$1"
gib_workspace_names() {
wmctrl -d \
| awk '{ print $1 " " $2 " " $9 }' \
| grep -v NSP \
| grep "${monitor}_"
| grep "${1}_"
}
gib_workspace_yuck() {
buffered=""
gib_workspace_names | while read -r id active name; do
gib_workspace_names $1 | while read -r id active name; do
name="${name#*_}"
if [ "$active" == '*' ]; then
active_class="active"
@ -34,4 +32,8 @@ gib_workspace_yuck() {
done
}
echo '(box :orientation "v" :class "workspaces" :space-evenly true :halign "center" :valign "center" :vexpand true '"$(gib_workspace_yuck)"')'
box_attrs=':orientation "v" :class "workspaces" :space-evenly true :halign "center" :valign "center" :vexpand true '
eww -c ~/.config/eww-bar update workspaces_1_yuck='(box '"$box_attrs"' '"$(gib_workspace_yuck 1)"')'
eww -c ~/.config/eww-bar update workspaces_2_yuck='(box '"$box_attrs"' '"$(gib_workspace_yuck 2)"')'

View file

@ -7,6 +7,7 @@
:elkowar/antifennel-nvim {:config #(set vim.g.antifennel_executable "/home/leon/tmp/antifennel/antifennel")}
:elkowar/kmonad.vim {}
:ruanyl/vim-gh-line {}
:rhysd/conflict-marker.vim {}
:wellle/visual-split.vim {}
:sindrets/diffview.nvim {}

View file

@ -402,8 +402,8 @@ myKeys = concat [ zoomRowBindings, tabbedBindings, multiMonitorBindings, program
, ("M-M1-<Delete>", sendMessage Rotate)
-- Media
, ("<XF86AudioRaiseVolume>", spawn "~/.config/eww/popup.sh 3 volume_popup && amixer sset Master 5%+")
, ("<XF86AudioLowerVolume>", spawn "~/.config/eww/popup.sh 3 volume_popup && amixer sset Master 5%-")
, ("<XF86AudioRaiseVolume>", spawn "amixer sset Master 5%+")
, ("<XF86AudioLowerVolume>", spawn "amixer sset Master 5%-")
, ("M-S-C-,", (notify "hi" (show $ map (\(a, _) -> show a) workspaceBindings)) >> (notify "ho" (show removedKeys)))
, ("M-<Backspace>", spawn "flash_window")
, ("M-g", incScreenWindowSpacing 5)

View file

@ -51,9 +51,9 @@ promptRunCommand config = XCommands.runCommandConfig (Rofi.promptSimple config)
-- |prompt a single rofi mode. ex: `showNormal def "run"`
showNormal :: RofiConfig -> String -> X ()
showNormal config mode =
spawn $ asCommand config ["-sort -modi " ++ mode, "-show " ++ mode]
spawn $ asCommand config ["-modi " ++ mode, "-show " ++ mode]
-- |Show a rofi combi prompt, combining all given modes
showCombi :: RofiConfig -> [String] -> X ()
showCombi config modi = spawn
$ asCommand config ["-sort -show combi", "-combi-modi " ++ intercalate "," modi]
$ asCommand config ["-show combi", "-combi-modi " ++ intercalate "," modi]