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 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
|
||||
|
|
|
@ -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)"')'
|
||||
|
|
|
@ -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 {}
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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]
|
||||
|
|
Loading…
Reference in a new issue