Skip to content

Commit 6b07efd

Browse files
committed
waybar: claude created a nice looking waybar
1 parent c23110e commit 6b07efd

File tree

10 files changed

+1270
-165
lines changed

10 files changed

+1270
-165
lines changed

.config/home-manager/flake.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.config/waybar-2/config.jsonc

Lines changed: 240 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,240 @@
1+
{
2+
"layer": "top",
3+
"position": "top", // Waybar position (top|bottom|left|right)
4+
"height": 30,
5+
"margin": "0 0 0 0",
6+
//"width": 1350, // Waybar width
7+
// Choose the order of the modules idle_inhibitor
8+
"modules-left": [
9+
"custom/launcher",
10+
"hyprland/workspaces",
11+
"hyprland/mode",
12+
"custom/cava-bar",
13+
"custom/player#prev",
14+
"custom/player#play",
15+
"custom/player#next",
16+
"custom/player#main"
17+
],
18+
"modules-center": [
19+
"hyprland/window"
20+
],
21+
"modules-right": [
22+
"tray",
23+
"cpu",
24+
"temperature",
25+
"memory",
26+
"clock#date",
27+
"pulseaudio",
28+
"battery",
29+
"network",
30+
"clock#clock",
31+
"custom/power"
32+
],
33+
// Modules configuration
34+
"hyprland/workspaces": {
35+
"disable-scroll": true,
36+
"all-outputs": true,
37+
"format": "{name}",
38+
"format-icons": {
39+
"active": "",
40+
"default": ""
41+
}
42+
},
43+
"custom/player#main": {
44+
"exec": "while true; do echo '$(playerctl metadata title); sleep 0.2; done",
45+
"on-click": "playerctl toggle"
46+
},
47+
"custom/player#prev": {
48+
"format": "",
49+
"on-click": "playerct previous"
50+
},
51+
"custom/player#play": {
52+
"exec": "while true; do playerctl status; sleep 0.2; done",
53+
"on-click": "playerctl play-pause"
54+
},
55+
"custom/player#next": {
56+
"format": "",
57+
"on-click": "playerctl next"
58+
},
59+
"custom/cava-bar": {
60+
"exec": "sh ~/.config/waybar/modules/cava.sh",
61+
"format": "{}",
62+
"tooltip": false,
63+
"on-click": "reload waybar",
64+
"layer": "below",
65+
"output": "all"
66+
},
67+
"hyprland/window": {
68+
"format": "{}"
69+
},
70+
"tray": {
71+
"icon-size": 14,
72+
"spacing": 5
73+
},
74+
"clock#clock": {
75+
// %I: hour (12hr) %H: hour (24hr)
76+
// %M: Minute %p: AM/PM
77+
"format": "{:%I:%M %p}"
78+
},
79+
// date
80+
"clock#date": {
81+
"tooltip-format": "<tt><small>{calendar}</small></tt>",
82+
"calendar": {
83+
"mode": "month",
84+
"mode-mon-col": 3,
85+
// "weeks-pos": "right",
86+
"on-scroll": 1,
87+
"on-click-right": "mode",
88+
"format": {
89+
"months": "<span color='#ffead3'><b>{}</b></span>",
90+
"days": "<span color='#ecc6d9'><b>{}</b></span>",
91+
// "weeks": "<span color='#99ffdd'><b>W{}</b></span>",
92+
"weekdays": "<span color='#ffcc66'><b>{}</b></span>",
93+
"today": "<span color='#ff6699'><b><u>{}</u></b></span>"
94+
}
95+
},
96+
"actions": {
97+
"on-click": "shift_down",
98+
"on-click-right": "shift_up",
99+
"on-scroll-up": "shift_up",
100+
"on-scroll-down": "shift_down"
101+
},
102+
// %Y: Year %m: Month %d: Date
103+
"format": "{:%b %d / %a}", //12 hour format
104+
// "format": " {:%d %m %Y  %H:%M}", //24 hour format
105+
// //"timezones": [ "Kolkata" ],
106+
// //"max-length": 200
107+
"interval": 1
108+
},
109+
// "clock": {
110+
// "format": " {:%H:%M:%S}",
111+
// "format-alt": " {:%A, %B %d, %Y (%R)}",
112+
// "tooltip-format": "<tt><small>{calendar}</small></tt>",
113+
// "calendar": {
114+
// "mode" : "month",
115+
// "mode-mon-col" : 3,
116+
// "weeks-pos" : "right",
117+
// "on-scroll" : 1,
118+
// "on-click-right": "mode",
119+
// "format": {
120+
// "months": "<span color='#ffead3'><b>{}</b></span>",
121+
// "days": "<span color='#ecc6d9'><b>{}</b></span>",
122+
// "weeks": "<span color='#99ffdd'><b>W{}</b></span>",
123+
// "weekdays": "<span color='#ffcc66'><b>{}</b></span>",
124+
// "today": "<span color='#ff6699'><b><u>{}</u></b></span>"
125+
// }
126+
// },
127+
// "actions": {
128+
// "on-click-right": "mode",
129+
// "on-click-forward": "tz_up",
130+
// "on-click-backward": "tz_down",
131+
// "on-scroll-up": "shift_up",
132+
// "on-scroll-down": "shift_down"
133+
// },
134+
// "interval": 1
135+
// },
136+
"cpu": {
137+
"format": " {usage: >3}%",
138+
"on-click": "alacritty -e htop"
139+
},
140+
"memory": {
141+
"format": " {: >3}%",
142+
"on-click": "alacritty -e htop"
143+
},
144+
"temperature": {
145+
// "thermal-zone": 2,
146+
"hwmon-path": "/sys/class/hwmon/hwmon1/temp1_input",
147+
"critical-threshold": 80,
148+
// "format-critical": "{temperatureC}°C ",
149+
"format": " {temperatureC}°C"
150+
},
151+
"backlight": {
152+
// "device": "acpi_video1",
153+
"format": "{icon} {percent: >3}%",
154+
"format-icons": [
155+
"",
156+
""
157+
],
158+
// "on-scroll-down": "brightnessctl -c backlight set 5%-",
159+
// "on-scroll-down": "light -A 5 && light -G | cut -d'.' -f1 > $SWAYSOCK.wob",
160+
// "on-scroll-up": "brightnessctl -c backlight set +5%"
161+
// "on-scroll-up": "light -U 5 && light -G | cut -d'.' -f1 > $SWAYSOCK.wob"
162+
},
163+
"battery": {
164+
"states": {
165+
// "good": 95,
166+
"warning": 30,
167+
"critical": 15
168+
},
169+
"format": "{icon} {capacity: >3}%",
170+
// "format-good": "", // An empty format will hide the module
171+
// "format-full": "",
172+
"format-icons": [
173+
"",
174+
"",
175+
"",
176+
"",
177+
""
178+
]
179+
//"format-icons": ["", "", "", "", "", "", "", "", "", ""]
180+
},
181+
"network": {
182+
// "interface": "wlp2s0", // (Optional) To force the use of this interface
183+
"format": "⚠ Disabled",
184+
"format-wifi": " {essid}",
185+
// "format-ethernet": " {ifname}: {ipaddr}/{cidr}",
186+
"format-ethernet": " Wired",
187+
"format-disconnected": "⚠ Disconnected",
188+
// "on-click": "alacritty -e nmtui"
189+
"on-click": "nm-connection-editor"
190+
},
191+
"pulseaudio": {
192+
"scroll-step": 1,
193+
"format": "{icon} {volume: >3}%",
194+
"format-bluetooth": "{icon} {volume: >3}%",
195+
"format-muted": " muted",
196+
"format-icons": {
197+
"headphones": "",
198+
"handsfree": "",
199+
"headset": "",
200+
"phone": "",
201+
"portable": "",
202+
"car": "",
203+
"default": [
204+
"",
205+
""
206+
]
207+
},
208+
"on-click": "pavucontrol"
209+
// "on-scroll-up": "pamixer -ui 2 && pamixer --get-volume > $SWAYSOCK.wob",
210+
// "on-scroll-down": "pamixer -ud 2 && pamixer --get-volume > $SWAYSOCK.wob"
211+
},
212+
"custom/pacman": {
213+
"format": " {}",
214+
"interval": 7200, // every two hours
215+
"exec": "i=$(checkupdates); echo \"$i\" |wc -l; echo \"$i\" |column -t |tr '\n' '\r'", // # of updates and tooltip details
216+
"exec-if": "exit 0", // always run; consider advanced run conditions
217+
"on-click": "alacritty -e sudo pacman -Syu", // update system
218+
"signal": 8
219+
},
220+
"custom/power": {
221+
"format": "",
222+
"on-click": "nwgbar",
223+
"tooltip": false
224+
},
225+
"custom/keyboard-layout": {
226+
// "exec": "swaymsg -t get_inputs | grep -m1 'xkb_active_layout_name' | cut -d '\"' -f4",
227+
// Interval set only as a fallback, as the value is updated by signal
228+
"interval": 1,
229+
"format": " {}", // Icon: keyboard
230+
// Signal sent by Sway key binding (~/.config/sway/key-bindings)
231+
"signal": 1, // SIGHUP
232+
"tooltip": false,
233+
"on-click": "~/.config/waybar/scripts/keyhint.sh"
234+
},
235+
"custom/launcher": {
236+
"format": "",
237+
"on-click": "exec nwg-drawer -c 7 -is 70 -spacing 23",
238+
"tooltip": false
239+
}
240+
}

.config/waybar-2/machiatto.css

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
/*
2+
*
3+
* Catppuccin Macchiato palette
4+
* Maintainer: rubyowo
5+
*
6+
*/
7+
8+
@define-color base #24273a;
9+
@define-color mantle #1e2030;
10+
@define-color crust #181926;
11+
12+
@define-color text #cad3f5;
13+
@define-color subtext0 #a5adcb;
14+
@define-color subtext1 #b8c0e0;
15+
16+
@define-color surface0 #363a4f;
17+
@define-color surface1 #494d64;
18+
@define-color surface2 #5b6078;
19+
20+
@define-color overlay0 #6e738d;
21+
@define-color overlay1 #8087a2;
22+
@define-color overlay2 #939ab7;
23+
24+
@define-color blue #8aadf4;
25+
@define-color lavender #b7bdf8;
26+
@define-color sapphire #7dc4e4;
27+
@define-color sky #91d7e3;
28+
@define-color teal #8bd5ca;
29+
@define-color green #a6da95;
30+
@define-color yellow #eed49f;
31+
@define-color peach #f5a97f;
32+
@define-color maroon #ee99a0;
33+
@define-color red #ed8796;
34+
@define-color mauve #c6a0f6;
35+
@define-color pink #f5bde6;
36+
@define-color flamingo #f0c6c6;
37+
@define-color rosewater #f4dbd6;

.config/waybar-2/modules/cava.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/usr/bin/env bash
2+
3+
is_cava_ServerExist=$(pgrep cava | wc -l)
4+
if [ "$is_cava_ServerExist" = "0" ]; then
5+
echo "cava_server not found" > /dev/null 2>&1
6+
# exit;
7+
elif [ "$is_cava_ServerExist" = "1" ]; then
8+
killall cava
9+
fi
10+
11+
exec cava -p ~/.config/cava/bar.config | sed -u 's/;//g;s/0/▁/g;s/1/▂/g;s/2/▃/g;s/3/▄/g;s/4/▅/g;s/5/▆/g;s/6/▇/g;s/7/█/g;'
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/bash
2+
i="$(checkupdates)"
3+
printf "%b%b" "$i" "${i:+\n}" |wc -l; echo "$i" |column -t #|tr '\n' '\r'
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/bin/sh
2+
yad --title="Garuda Sway-WM keybindings:" --no-buttons --geometry=400x345-15-400 --list --column=key: --column=description: --column=command: "ESC" "close this app" "" "=" "modkey" "(set mod Mod4)" "+enter" "Terminal" "(termite)" "+d" "Application Menu" "(wofi)" "+Shift+d" "Full Launcher" "(nwggrid)" "+p" "Activities" "(wofi)" "+o" "" "Open Broswer" "+n" "" "Open Files" "+q" "close focused app" "(kill)" "[Shift]+Print-key" "screenshot" "(grim)" "+Shift+e" "power-menu" "(wofi)" "+Shift+p" "open keybinding helper" "full list"

0 commit comments

Comments
 (0)