add waybar eww and sway

This commit is contained in:
2026-06-08 15:09:08 -07:00
parent 050d923644
commit 07eb59bf2a
21 changed files with 881 additions and 33 deletions
+90
View File
@@ -0,0 +1,90 @@
{
"layer": "top",
"position": "bottom",
"spacing": 5,
"modules-left": ["sway/workspaces", "sway/mode", "wlr/taskbar", "sway/window"],
"modules-center": ["clock"],
"modules-right": ["cpu", "memory", "network", "pulseaudio", "battery", "tray", "custom/poweroff"],
"sway/workspaces": {
"disable-scroll": true,
"format": "{name}"
},
"wlr/taskbar" : {
"format": "{icon}",
"icon-size": 20,
"spacing": 3,
"on-click": "activate",
"on-click-middle": "close",
},
"cpu": {
"format": " {usage}%",
"tooltip": false
},
"memory": {
"format": "\uf4bc {used:0.1f}G | {avail:0.1f}G",
"tooltip": false,
},
"network": {
"family": "ipv4",
// "interface": "wlp2*", // (Optional) To force the use of this interface
"format-wifi": "<span color='#589df6'></span> {essid}",
"format-ethernet": "{ifname}: {ipaddr}/{cidr} ",
"format-disconnected": "<span color='red'>Disconnected ⚠</span>",
"tooltip-format": "{ifname}: {ipaddr}/{cidr}",
"interval": 5
},
"pulseaudio": {
"format": "{icon} {volume}%",
"format-muted": "\ueee8 ",
"format-source": "{volume}%",
"format-source-muted": "",
"on-click": "pactl set-sink-mute @DEFAULT_SINK@ toggle",
"format-icons": {
"headphones": "",
"handsfree": "",
"headset": "",
"phone": "",
"portable": "",
"car": "",
"default": ["\uf027", "\uf028 "]
},
},
"clock": {
"interval": 1,
"format": "{:%r}",
"format-alt": "{:%A, %B %d, %Y | %r}",
"tooltip-format": "<tt>{calendar}</tt>",
"calendar": {
"format": {
"today": "<span color='red'>{}</span>",
}
},
},
"battery": {
"states": {
// "good": 95,
"warning": 20,
"critical": 10
},
"format": "<span color='#e88939'></span> {capacity}%",
"format-charging": "<span color='#e88939'>\udb80\udc85</span> {capacity}%",
"format-plugged": "",
"format-icons": ["", "", "", "", ""]
},
"sway/window": {
"format": "{app_id}",
"icon" : true
},
"tray": {
"icon-size": 18,
"spacing": 5,
"show-passive-items": "true"
},
/*"custom/poweroff": {
"format": "<span>\udb81\udc25</span> ",
"on-click": "wlogout",
"tooltip": false,
}*/
}
+11
View File
@@ -0,0 +1,11 @@
#!/bin/bash
CONFIG_FILES="$HOME/.config/waybar/config $HOME/.config/waybar/style.css"
trap "killall waybar" EXIT
while true; do
waybar &
inotifywait -e create,modify $CONFIG_FILES
killall waybar
done
+57
View File
@@ -0,0 +1,57 @@
@define-color foreground #eff0f1;
@define-color foreground-inactive #7f8c8d;
@define-color background #161616;
@define-color background-alt #31363b;
* {
font-family: "NotoSans Nerd Font";
font-size: 16px;
}
window#waybar {
background-image: linear-gradient(to right,
#161616 0%,
#31363b 51%,
#161616 100%);
color: #ffffff;
transition-property: background-color;
transition-duration: .5s;
}
#waybar {
background-color: @background;
color: @foreground;
}
#workspaces button {
padding-left: 1em;
padding-right: 1.3em;
color: @foreground-inactive;
}
#workspaces button.focused {
background-color: @background-alt;
color: @foreground;
border-radius: 1px;
}
#taskbar {
color: @foreground;
}
#clock, #battery, #cpu, #memory, #network, #pulseaudio, #tray, #mode, #custom-poweroff {
padding-left: 0.25em;
padding-right: 0.25em;
}
#window {
padding-left: 0.25em;
padding-right: 0.5em;
}
#custom-poweroff {
padding-left: 0;
font-size: 22;
}
#custom-poweroff:hover {
color: red;
}