mirror of
https://github.com/donovanglover/nix-config.git
synced 2024-12-15 19:30:51 +01:00
meta: Add yambar
This commit is contained in:
parent
0f720ca3c0
commit
049dc47f2a
142
yambar/.config/yambar/config.yml
Normal file
142
yambar/.config/yambar/config.yml
Normal file
@ -0,0 +1,142 @@
|
||||
BMARGIN: &BMARGIN 10
|
||||
|
||||
bar:
|
||||
height: 30
|
||||
location: top
|
||||
background: 191919e6
|
||||
foreground: ffffffbb
|
||||
font: Noto Sans CJK JP:Bold:size=13,Font Awesome 6 Free:style=solid:size=13
|
||||
right-margin: *BMARGIN
|
||||
layer: bottom
|
||||
left:
|
||||
-
|
||||
script:
|
||||
path: /home/donovan/.config/yambar/hyprland.sh
|
||||
args: []
|
||||
content:
|
||||
string:
|
||||
on-click:
|
||||
left: sh -c 'hyprctl dispatch workspace e+1'
|
||||
right: sh -c 'hyprctl dispatch workspace empty'
|
||||
middle: sh -c 'kitty ranger ~'
|
||||
text: "{hypr_ws}"
|
||||
left-margin: *BMARGIN
|
||||
-
|
||||
river:
|
||||
anchors:
|
||||
- base: &river_base
|
||||
left-margin: *BMARGIN
|
||||
right-margin: *BMARGIN
|
||||
default: {string: {text: ''}}
|
||||
conditions:
|
||||
id == 1: {string: {text: 一}}
|
||||
id == 2: {string: {text: 二}}
|
||||
id == 3: {string: {text: 三}}
|
||||
id == 4: {string: {text: 四}}
|
||||
id == 5: {string: {text: 五}}
|
||||
id == 6: {string: {text: 六}}
|
||||
id == 7: {string: {text: 七}}
|
||||
id == 8: {string: {text: 八}}
|
||||
id == 9: {string: {text: 九}}
|
||||
id == 10: {string: {text: 十}}
|
||||
content:
|
||||
map:
|
||||
on-click:
|
||||
left: sh -c "riverctl set-focused-tags $((1 << ({id} - 1)))"
|
||||
right: sh -c "riverctl toggle-focused-tags $((1 << ({id} -1)))"
|
||||
middle: sh -c "riverctl toggle-view-tags $((1 << ({id} -1)))"
|
||||
conditions:
|
||||
state == urgent:
|
||||
map:
|
||||
<<: *river_base
|
||||
state == focused:
|
||||
map:
|
||||
<<: *river_base
|
||||
deco: {background: {color: ffffff33}}
|
||||
state == visible && ~occupied:
|
||||
map:
|
||||
<<: *river_base
|
||||
state == visible && occupied:
|
||||
map:
|
||||
<<: *river_base
|
||||
state == unfocused:
|
||||
map:
|
||||
<<: *river_base
|
||||
state == invisible && ~occupied: {empty: {}}
|
||||
state == invisible && occupied:
|
||||
map:
|
||||
<<: *river_base
|
||||
center:
|
||||
-
|
||||
foreign-toplevel:
|
||||
content:
|
||||
map:
|
||||
conditions:
|
||||
~activated: {empty: {}}
|
||||
activated:
|
||||
- string: {text: "{title}", max: 90, on-click: 'notify-send "app-id" "{app-id}"'}
|
||||
right:
|
||||
-
|
||||
battery:
|
||||
name: BAT0
|
||||
anchors:
|
||||
discharging: &discharging
|
||||
list:
|
||||
items:
|
||||
- ramp:
|
||||
tag: capacity
|
||||
items:
|
||||
- string: {text: , foreground: ff0000ff}
|
||||
- string: {text: , foreground: ffa600ff}
|
||||
- string: {text: }
|
||||
- string: {text: }
|
||||
- string: {text: }
|
||||
- string: {text: }
|
||||
- string: {text: }
|
||||
- string: {text: }
|
||||
- string: {text: }
|
||||
- string: {text: , foreground: 00ff00ff}
|
||||
- string: {text: "{capacity}% {estimate}", left-margin: *BMARGIN}
|
||||
content:
|
||||
map:
|
||||
conditions:
|
||||
state == unknown:
|
||||
<<: *discharging
|
||||
state == discharging:
|
||||
<<: *discharging
|
||||
state == charging:
|
||||
- string: {text: , foreground: 00ff00ff}
|
||||
- string: {text: "{capacity}% {estimate}"}
|
||||
state == full:
|
||||
- string: {text: , foreground: 00ff00ff}
|
||||
- string: {text: "{capacity}% full"}
|
||||
state == "not charging":
|
||||
- ramp:
|
||||
tag: capacity
|
||||
items:
|
||||
- string: {text: , foreground: ff0000ff}
|
||||
- string: {text: , foreground: ffa600ff}
|
||||
- string: {text: , foreground: 00ff00ff}
|
||||
- string: {text: , foreground: 00ff00ff}
|
||||
- string: {text: , foreground: 00ff00ff}
|
||||
- string: {text: , foreground: 00ff00ff}
|
||||
- string: {text: , foreground: 00ff00ff}
|
||||
- string: {text: , foreground: 00ff00ff}
|
||||
- string: {text: , foreground: 00ff00ff}
|
||||
- string: {text: , foreground: 00ff00ff}
|
||||
- string: {text: "{capacity}%"}
|
||||
-
|
||||
clock:
|
||||
time-format: "%H:%M %Z"
|
||||
content:
|
||||
- string: {text: , right-margin: 5, left-margin: *BMARGIN}
|
||||
- string: {text: "{date}", on-click: 'yad --calendar --title "今日は何の日"'}
|
||||
- string: {text: , right-margin: 5, left-margin: *BMARGIN}
|
||||
- string: {text: "{time}"}
|
||||
-
|
||||
label:
|
||||
content:
|
||||
string:
|
||||
on-click: sh -c 'rofi -show'
|
||||
text:
|
||||
left-margin: *BMARGIN
|
After Width: | Height: | Size: 5.1 KiB |
14
yambar/.config/yambar/hyprland.sh
Executable file
14
yambar/.config/yambar/hyprland.sh
Executable file
@ -0,0 +1,14 @@
|
||||
#!/bin/bash
|
||||
|
||||
declare hypr_ws
|
||||
|
||||
while true; do
|
||||
hypr_ws=$(hyprctl workspaces -j | jq -r 'sort_by(.id)[] | .name' | sed -e "s/^1:/ 一/g" -e "s/^1$/ 一/g" -e "s/^2/ 二/g" -e "s/^3/ 三/g" -e "s/^4/ 四/g" -e "s/^5/ 五/g" -e "s/^6/ 六/g" -e "s/^7/ 七/g" -e "s/^8/ 八/g" -e "s/^9/ 九/g" -e "s/^10/ 十/g" | tr '\n' ' ')
|
||||
|
||||
printf -- '%s\n' "hypr_ws|string|${hypr_ws}"
|
||||
printf -- '%s\n' ""
|
||||
|
||||
sleep 0.05
|
||||
done
|
||||
|
||||
unset hypr_ws
|
15
yambar/README.md
Normal file
15
yambar/README.md
Normal file
@ -0,0 +1,15 @@
|
||||
# yambar
|
||||
|
||||
[yambar][yambar] is an information panel with X11 and Wayland support.
|
||||
|
||||
## Use Cases
|
||||
|
||||
yambar can be used to:
|
||||
|
||||
- Have a panel that works natively in both X11 and Wayland.
|
||||
|
||||
You should not use yambar if:
|
||||
|
||||
- You want tray icons or taskbar support.
|
||||
|
||||
[yambar]: https://codeberg.org/dnkl/yambar
|
Loading…
Reference in New Issue
Block a user