mirror of
https://github.com/elkowar/dots-of-war.git
synced 2024-12-25 21:52:23 +00:00
bar stuff
This commit is contained in:
parent
de8bad20ec
commit
a83eac15ab
5 changed files with 19 additions and 12 deletions
|
@ -100,9 +100,13 @@
|
||||||
(defpoll month :interval "1h" "date +%m")
|
(defpoll month :interval "1h" "date +%m")
|
||||||
(defpoll year :interval "1h" "date +%y")
|
(defpoll year :interval "1h" "date +%y")
|
||||||
|
|
||||||
(deflisten workspaces_0_yuck "./workspaces.sh 0")
|
(defvar workspaces_1_yuck "")
|
||||||
(deflisten workspaces_1_yuck "./workspaces.sh 1")
|
(defvar workspaces_2_yuck "")
|
||||||
(deflisten workspaces_2_yuck "./workspaces.sh 2")
|
|
||||||
|
; 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
|
(defwindow bar_1
|
||||||
:monitor 1
|
:monitor 1
|
||||||
|
|
|
@ -1,17 +1,15 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
monitor="$1"
|
|
||||||
|
|
||||||
gib_workspace_names() {
|
gib_workspace_names() {
|
||||||
wmctrl -d \
|
wmctrl -d \
|
||||||
| awk '{ print $1 " " $2 " " $9 }' \
|
| awk '{ print $1 " " $2 " " $9 }' \
|
||||||
| grep -v NSP \
|
| grep -v NSP \
|
||||||
| grep "${monitor}_"
|
| grep "${1}_"
|
||||||
}
|
}
|
||||||
|
|
||||||
gib_workspace_yuck() {
|
gib_workspace_yuck() {
|
||||||
buffered=""
|
buffered=""
|
||||||
gib_workspace_names | while read -r id active name; do
|
gib_workspace_names $1 | while read -r id active name; do
|
||||||
name="${name#*_}"
|
name="${name#*_}"
|
||||||
if [ "$active" == '*' ]; then
|
if [ "$active" == '*' ]; then
|
||||||
active_class="active"
|
active_class="active"
|
||||||
|
@ -34,4 +32,8 @@ gib_workspace_yuck() {
|
||||||
done
|
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)"')'
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
:elkowar/antifennel-nvim {:config #(set vim.g.antifennel_executable "/home/leon/tmp/antifennel/antifennel")}
|
:elkowar/antifennel-nvim {:config #(set vim.g.antifennel_executable "/home/leon/tmp/antifennel/antifennel")}
|
||||||
:elkowar/kmonad.vim {}
|
:elkowar/kmonad.vim {}
|
||||||
|
|
||||||
|
:ruanyl/vim-gh-line {}
|
||||||
:rhysd/conflict-marker.vim {}
|
:rhysd/conflict-marker.vim {}
|
||||||
:wellle/visual-split.vim {}
|
:wellle/visual-split.vim {}
|
||||||
:sindrets/diffview.nvim {}
|
:sindrets/diffview.nvim {}
|
||||||
|
|
|
@ -402,8 +402,8 @@ myKeys = concat [ zoomRowBindings, tabbedBindings, multiMonitorBindings, program
|
||||||
, ("M-M1-<Delete>", sendMessage Rotate)
|
, ("M-M1-<Delete>", sendMessage Rotate)
|
||||||
|
|
||||||
-- Media
|
-- Media
|
||||||
, ("<XF86AudioRaiseVolume>", spawn "~/.config/eww/popup.sh 3 volume_popup && amixer sset Master 5%+")
|
, ("<XF86AudioRaiseVolume>", spawn "amixer sset Master 5%+")
|
||||||
, ("<XF86AudioLowerVolume>", spawn "~/.config/eww/popup.sh 3 volume_popup && 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-S-C-,", (notify "hi" (show $ map (\(a, _) -> show a) workspaceBindings)) >> (notify "ho" (show removedKeys)))
|
||||||
, ("M-<Backspace>", spawn "flash_window")
|
, ("M-<Backspace>", spawn "flash_window")
|
||||||
, ("M-g", incScreenWindowSpacing 5)
|
, ("M-g", incScreenWindowSpacing 5)
|
||||||
|
|
|
@ -51,9 +51,9 @@ promptRunCommand config = XCommands.runCommandConfig (Rofi.promptSimple config)
|
||||||
-- |prompt a single rofi mode. ex: `showNormal def "run"`
|
-- |prompt a single rofi mode. ex: `showNormal def "run"`
|
||||||
showNormal :: RofiConfig -> String -> X ()
|
showNormal :: RofiConfig -> String -> X ()
|
||||||
showNormal config mode =
|
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
|
-- |Show a rofi combi prompt, combining all given modes
|
||||||
showCombi :: RofiConfig -> [String] -> X ()
|
showCombi :: RofiConfig -> [String] -> X ()
|
||||||
showCombi config modi = spawn
|
showCombi config modi = spawn
|
||||||
$ asCommand config ["-sort -show combi", "-combi-modi " ++ intercalate "," modi]
|
$ asCommand config ["-show combi", "-combi-modi " ++ intercalate "," modi]
|
||||||
|
|
Loading…
Reference in a new issue