feat: Add waybar to git

This commit is contained in:
2025-04-04 14:50:33 +11:00
parent 1cf3d139a5
commit 4d8c86df3f
3 changed files with 442 additions and 0 deletions

224
.config/waybar/config Normal file
View File

@@ -0,0 +1,224 @@
{
"height": 30,
"spacing": 4,
"modules-left": [
"custom/swaync",
"custom/media"
],
"modules-center": [
"custom/workspace1",
"custom/workspace2",
"custom/workspace3",
"custom/workspace4",
"custom/workspace5",
"custom/workspace6",
"custom/workspace7",
"custom/workspace8",
"custom/workspace9",
"custom/workspace10"
// "hyprland/workspaces"
],
"modules-right": [
"keyboard-state",
"tray",
"custom/separator",
"network",
"custom/tailscale",
"custom/separator",
"battery",
"custom/separator",
"custom/bluetooth",
"clock"
],
// Modules configuration
"custom/swaync": {
"on-click": "swaync-client -t -sw",
"tooltip": false,
"format": "  {} | ",
"interval": 1,
"exec": "~/.config/hypr/scripts/get-volume.sh"
},
"custom/separator": {
"format": "|"
},
"custom/media": {
"interval": 1,
"exec": "/home/nathan/scripts/music.sh waybar",
"tooltip": false
},
"custom/tailscale": {
"interval": 10,
"exec": "sleep 2 && /home/nathan/scripts/ts.sh short waybar",
"on-click": "/home/nathan/scripts/ts.sh en toggle",
"exec-on-event": true,
"tooltip": false
},
"custom/bluetooth": {
"interval": 10,
"exec": "/home/nathan/scripts/bt.sh waybar",
"on-click": "alacritty --class float -e bluetuith",
"exec-on-event": true,
"tooltip": false
},
"disk": {
"interval": 30,
"format": "{path} {percentage_used}%",
"path": "/",
"on-click": "/home/nathan/scripts/zellij.sh --cwd / zsh"
},
"keyboard-state": {
"numlock": false,
"capslock": true,
"format": "{icon}",
"format-icons": {
"locked": "Caps ",
"unlocked": ""
}
},
"clock": {
"tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>",
"format": "{:%Y-%m-%d %r}",
"interval": 1
},
"cpu": {
"format": "{usage}% ",
"tooltip": true,
"on-click": "/home/nathan/scripts/zellij.sh htop --sort-key=PERCENT_CPU"
},
"memory": {
"format": "{}% ",
"tooltip": true,
"on-click": "/home/nathan/scripts/zellij.sh htop --sort-key=PERCENT_MEM"
},
"temperature": {
"critical-threshold": 80,
// "format-critical": "{temperatureC}°C {icon}",
"format": "{temperatureC}°C {icon}",
"format-icons": [
"<span foreground='#60d090'></span>",
"<span foreground='#60d090'></span>",
"<span foreground='#ffff00'></span>",
"<span foreground='#ffff00'></span>",
"<span foreground='#ff0000'></span>"
]
},
"battery": {
"states": {
// "good": 95,
"warning": 30,
"critical": 15
},
"format": "{icon} {capacity}%",
"format-charging": "󱊥 {capacity}% ",
"format-plugged": " {capacity}%",
// "format-good": "", // An empty format will hide the module
// "format-full": "",
"format-icons": [
"<span foreground='#ff0000'></span>",
"<span foreground='#ffff00'></span>",
"<span foreground='#60d090'></span>",
"<span foreground='#60d090'></span>",
"<span foreground='#60d090'></span>"
]
},
"network": {
"format-wifi": "{essid} ", //({signalStrength}%)
"format-ethernet": "{ipaddr}/{cidr} ",
"tooltip-format": "{ifname} via {gwaddr} ",
"format-linked": "{ifname} (No IP) ",
"format-disconnected": "Disconnected ⚠",
// "format-alt": "{ifname}: {ipaddr}/{cidr}",
"on-click": "alacritty --class float -e iwctl"
},
"tray": {
"icon-size": 21,
"spacing": 10
},
"hyprland/submap": {
"format": "✌️ {}",
"max-length": 8,
"tooltip": false
},
"hyprland/workspaces": {
"format": "{name}: {icon}",
"format-icons": {
"1": "",
"2": "",
"3": "",
"4": "",
"5": "",
"active": "",
"default": ""
}
},
"custom/workspace1": {
"interval": 1,
"exec": "~/.config/hypr/scripts/desk.py -w -d 1",
"on-click": "~/.config/hypr/scripts/desk.py -d 1",
"exec-on-event": true,
"tooltip": false
},
"custom/workspace2": {
"interval": 1,
"exec": "~/.config/hypr/scripts/desk.py -w -d 2",
"on-click": "~/.config/hypr/scripts/desk.py -d 2",
"exec-on-event": true,
"tooltip": false
},
"custom/workspace3": {
"interval": 1,
"exec": "~/.config/hypr/scripts/desk.py -w -d 3",
"on-click": "~/.config/hypr/scripts/desk.py -d 3",
"exec-on-event": true,
"tooltip": false
},
"custom/workspace4": {
"interval": 1,
"exec": "~/.config/hypr/scripts/desk.py -w -d 4",
"on-click": "~/.config/hypr/scripts/desk.py -d 4",
"exec-on-event": true,
"tooltip": false
},
"custom/workspace5": {
"interval": 1,
"exec": "~/.config/hypr/scripts/desk.py -w -d 5",
"on-click": "~/.config/hypr/scripts/desk.py -d 5",
"exec-on-event": true,
"tooltip": false
},
"custom/workspace6": {
"interval": 1,
"exec": "~/.config/hypr/scripts/desk.py -w -d 6",
"on-click": "~/.config/hypr/scripts/desk.py -d 6",
"exec-on-event": true,
"tooltip": false
},
"custom/workspace7": {
"interval": 1,
"exec": "~/.config/hypr/scripts/desk.py -w -d 7",
"on-click": "~/.config/hypr/scripts/desk.py -d 7",
"exec-on-event": true,
"tooltip": false
},
"custom/workspace8": {
"interval": 1,
"exec": "~/.config/hypr/scripts/desk.py -w -d 8",
"on-click": "~/.config/hypr/scripts/desk.py -d 8",
"exec-on-event": true,
"tooltip": false
},
"custom/workspace9": {
"interval": 1,
"exec": "~/.config/hypr/scripts/desk.py -w -d 9",
"on-click": "~/.config/hypr/scripts/desk.py -d 9",
"exec-on-event": true,
"tooltip": false
},
"custom/workspace10": {
"interval": 1,
"exec": "~/.config/hypr/scripts/desk.py -w -d 10",
"on-click": "~/.config/hypr/scripts/desk.py -d 10",
"exec-on-event": true,
"tooltip": false
}
}

216
.config/waybar/style.css Normal file
View File

@@ -0,0 +1,216 @@
* {
/* `otf-font-awesome` is required to be installed for icons */
font-family: FiraCode Nerd Font Mono, FontAwesome, Roboto, Helvetica, Arial, sans-serif;
font-size: 15px;
}
window#waybar {
background-color: rgba(0, 0, 0,0.5);
color: #ffffff;
transition-property: background-color;
transition-duration: .5s;
}
window#waybar.hidden {
opacity: 0.2;
}
/*
window#waybar.empty {
background-color: transparent;
}
window#waybar.solo {
background-color: #FFFFFF;
}
*/
window#waybar.termite {
background-color: #3F3F3F;
}
window#waybar.chromium {
background-color: #000000;
border: none;
}
button {
/* Use box-shadow instead of border so the text isn't offset */
box-shadow: inset 0 -3px transparent;
/* Avoid rounded borders under each button name */
border: none;
border-radius: 0;
}
/* https://github.com/Alexays/Waybar/wiki/FAQ#the-workspace-buttons-have-a-strange-hover-effect */
button:hover {
background: inherit;
box-shadow: inset 0 -3px #ffffff;
}
#workspaces button {
padding: 0 5px;
background-color: transparent;
color: #ffffff;
}
#workspaces button:hover {
background: rgba(0, 0, 0, 0.2);
}
#workspaces button.focused {
background-color: #64727D;
box-shadow: inset 0 -3px #ffffff;
}
#workspaces button.urgent {
background-color: #eb4d4b;
}
#mode {
background-color: #64727D;
border-bottom: 3px solid #ffffff;
}
#clock,
#battery,
#cpu,
#memory,
#disk,
#temperature,
#backlight,
#network,
#pulseaudio,
#wireplumber,
#custom-media,
#tray,
#mode,
#idle_inhibitor,
#scratchpad,
#mpd {
padding: 0 10px;
color: #ffffff;
}
#window,
#workspaces {
margin: 0 4px;
}
/* If workspaces is the leftmost module, omit left margin */
.modules-left > widget:first-child > #workspaces {
margin-left: 0;
}
/* If workspaces is the rightmost module, omit right margin */
.modules-right > widget:last-child > #workspaces {
margin-right: 0;
}
#battery {
color: #ffffff;
}
#battery.charging, #battery.plugged {
color: #26A65B;
}
#battery.warning {
background-color: transparent;
}
@keyframes blink {
to {
background-color: #ffffff;
color: #000000;
}
}
#battery.critical:not(.charging) {
background-color: #f53c3c;
color: #ffffff;
animation-name: blink;
animation-duration: 0.5s;
animation-timing-function: linear;
animation-iteration-count: infinite;
animation-direction: alternate;
}
label:focus {
background-color: #000000;
}
#network.disconnected {
background-color: #f53c3c;
}
tray {
background-color: #2980b9;
}
#tray > .passive {
-gtk-icon-effect: dim;
}
#tray > .needs-attention {
-gtk-icon-effect: highlight;
background-color: #eb4d4b;
}
#idle_inhibitor {
background-color: #2d3436;
}
#idle_inhibitor.activated {
background-color: #ecf0f1;
color: #2d3436;
}
#mpd {
background-color: #66cc99;
color: #2a5c45;
}
#mpd.disconnected {
background-color: #f53c3c;
}
#mpd.stopped {
background-color: #90b1b1;
}
#mpd.paused {
background-color: #51a37a;
}
#language {
background: #00b093;
color: #740864;
padding: 0 5px;
margin: 0 5px;
min-width: 16px;
}
#keyboard-state {
/* background: #97e1ad; */
/* color: #000000; */
padding: 0;
/* margin: 0 5px; */
/* min-width: 16px; */
}
#keyboard-state > label {
padding: 0 5px;
}
/* #keyboard-state > label.locked {
background: rgba(0, 0, 0, 0.2);
} */
#scratchpad {
background: rgba(0, 0, 0, 0.2);
}
#scratchpad.empty {
background-color: transparent;
}