summaryrefslogtreecommitdiff
path: root/dot-config/waybar
diff options
context:
space:
mode:
authorMathias Magnusson <mathias@magnusson.space>2025-06-29 22:28:05 +0200
committerMathias Magnusson <mathias@magnusson.space>2025-06-29 22:47:23 +0200
commita0b32034f7c557bcaa38e3610c8a97eeee7a00a8 (patch)
tree3f4f1b7252958ccd8fa3158a35aeb34cdacf94c1 /dot-config/waybar
downloadsleipner-a0b32034f7c557bcaa38e3610c8a97eeee7a00a8.tar.gz
Initial commit
Diffstat (limited to 'dot-config/waybar')
-rw-r--r--dot-config/waybar/config.jsonc171
-rw-r--r--dot-config/waybar/style.css193
2 files changed, 364 insertions, 0 deletions
diff --git a/dot-config/waybar/config.jsonc b/dot-config/waybar/config.jsonc
new file mode 100644
index 0000000..143dc31
--- /dev/null
+++ b/dot-config/waybar/config.jsonc
@@ -0,0 +1,171 @@
+[{
+ "output": ["eDP-1"],
+ // "layer": "top", // Waybar at top layer
+ "height": 32,
+ "position": "top", // Waybar position (top|bottom|left|right)
+ // "width": 1280, // Waybar width
+ "spacing": 4, // Gaps between modules (4px)
+ // Choose the order of the modules
+ "modules-left": [
+ "network",
+ "bluetooth",
+ "mpris"
+ ],
+ "modules-center": [
+ // "wlr/taskbar",
+ "clock"
+ ],
+ "modules-right": [
+ "privacy",
+
+ "idle_inhibitor",
+
+ "temperature",
+ "load",
+ "memory",
+
+ "wireplumber",
+ "backlight",
+ "battery",
+
+ "group/power",
+ "tray"
+ ],
+ "wlr/taskbar": {
+ "tooltip-format": "{title} | {app_id}"
+ },
+ "group/power": {
+ "orientation": "inherit",
+ "drawer": {
+ "children-class": "power-child",
+ "transition-left-to-right": false,
+ },
+ "modules": [
+ "custom/poweroff",
+ "custom/suspend",
+ "custom/reboot"
+ ]
+ },
+ "custom/reboot": {
+ "format": "󰜉",
+ "on-click": "reboot",
+ "tooltip": false
+ },
+ "custom/suspend": {
+ "format": "󰒲",
+ "on-click": "systemctl suspend",
+ "tooltip": false
+ },
+ "custom/poweroff": {
+ "format": "",
+ "on-click": "shutdown now",
+ "tooltip": false
+ },
+ "privacy": {
+ "icon-size": 17
+ },
+ "network": {
+ "format-wifi": " {essid} {ipaddr}/{cidr}",
+ "format-ethernet": " {ipaddr}/{cidr}",
+ "tooltip": false
+ },
+ "bluetooth": {
+ "format-on": "",
+ "format-disabled": "",
+ "format-off": "",
+ "on-click": "blueman-manager"
+ },
+ "mpris": {
+ "format": " {status_icon} {dynamic}",
+ "interval": 1,
+ "dynamic-len": 40,
+ "status-icons": {
+ "playing": "▶",
+ "paused": "⏸",
+ "stopped": ""
+ },
+ "dynamic-order": ["title", "artist"],
+ "ignored-players": ["brave"]
+ },
+ "idle_inhibitor": {
+ "format": "{icon}",
+ "format-icons": {
+ "activated": "",
+ "deactivated": ""
+ },
+ "tooltip": "Idle inhibitor"
+ },
+ "sway/mode": {
+ "format": "{}"
+ },
+ "sway/scratchpad": {
+ "format": "{icon} {count}",
+ "show-empty": false,
+ "format-icons": ["", ""],
+ "tooltip": true,
+ "tooltip-format": "{app}: {title}"
+ },
+ "tray": {
+ "icon-size": 14,
+ "spacing": 10
+ },
+ "load": {
+ "format": " {}"
+ },
+ "cpu": {
+ "format": "{usage}% ",
+ "tooltip": false
+ },
+ "memory": {
+ "format": " {}%"
+ },
+ "temperature": {
+ // "thermal-zone": 2,
+ // "hwmon-path": "/sys/class/hwmon/hwmon2/temp1_input",
+ "critical-threshold": 80,
+ // "format-critical": "{temperatureC}°C {icon}",
+ "format": "{temperatureC}°C {icon}",
+ "format-icons": ["", "", ""],
+ "tooltip": false
+ },
+ "backlight": {
+ "on-scroll-up": "brightnessctl set +1",
+ "on-scroll-down": "brightnessctl set 1-",
+ "format": " {percent}%",
+ "tooltip": false
+ },
+ "battery": {
+ "states": {
+ "warning": 30,
+ "critical": 15
+ },
+ "format": "{icon} {capacity}%",
+ "format-full": "{icon} {capacity}%",
+ "format-charging": " {capacity}%",
+ "format-plugged": " {capacity}%",
+ "format-icons": ["", "", "", "", ""]
+ },
+ "wireplumber": {
+ "scroll-step": 1, // %, can be a float
+ "format": "{icon} {volume}%",
+ "format-bluetooth": "{icon} {volume}% ",
+ "format-bluetooth-muted": " {icon}",
+ "format-muted": "",
+ "format-icons": {
+ "headphone": "",
+ "hands-free": "",
+ "headset": "",
+ "phone": "",
+ "portable": "",
+ "car": "",
+ "default": ["", "", ""]
+ },
+ "on-click": "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle",
+ "tooltip": false
+ },
+ "clock": {
+ "format": "{:%A %Y-%m-%d %H:%M:%S}",
+ "interval": 1,
+ "tooltip": false
+ }
+}]
diff --git a/dot-config/waybar/style.css b/dot-config/waybar/style.css
new file mode 100644
index 0000000..438d30f
--- /dev/null
+++ b/dot-config/waybar/style.css
@@ -0,0 +1,193 @@
+* {
+ font-size: 14px;
+ border-radius: 4px;
+}
+
+window#waybar {
+ /* `otf-font-awesome` is required to be installed for icons */
+ font-family: FontAwesome, monospace;
+ background-color: transparent;
+ border-bottom: 0px;
+ color: #ebdbb2;
+ transition-property: background-color;
+ transition-duration: .5s;
+}
+
+window#waybar.hidden {
+ opacity: 0.2;
+}
+
+window#waybar.empty #window {
+ background-color: transparent;
+}
+
+/*
+window#waybar.empty {
+ background-color: transparent;
+}
+window#waybar.solo {
+ background-color: #FFFFFF;
+}
+*/
+
+.modules-right {
+ margin: 10px 6px 0 0;
+}
+.modules-center {
+ margin: 10px 0 0 0;
+}
+.modules-left {
+ margin: 10px 0 0 6px;
+}
+
+button {
+ /* Use box-shadow instead of border so the text isn't offset */
+ /* box-shadow: inset 0 -3px transparent; */
+ border: none;
+}
+
+/* https://github.com/Alexays/Waybar/wiki/FAQ#the-workspace-buttons-have-a-strange-hover-effect */
+/*
+button:hover {
+ background: inherit;
+ box-shadow: inset 0 -3px #ebdbb2;
+} */
+
+#workspaces {
+ background-color: #282828;
+}
+
+#workspaces button {
+ padding: 0 5px;
+ background-color: transparent;
+ color: #ebdbb2;
+ border-radius: 0;
+}
+
+#workspaces button:first-child {
+ border-radius: 5px 0 0 5px;
+}
+
+#workspaces button:last-child {
+ border-radius: 0 5px 5px 0;
+}
+
+#workspaces button:hover {
+ color: #d79921;
+}
+
+#workspaces button.focused {
+ background-color: #665c54;
+ /* box-shadow: inset 0 -3px #ffffff; */
+}
+
+#workspaces button.urgent {
+ background-color: #b16286;
+}
+
+#idle_inhibitor,
+#cava,
+#scratchpad,
+#mode,
+#window,
+#clock,
+#battery,
+#backlight,
+#wireplumber,
+#tray,
+#mpris,
+#network,
+#temperature,
+#bluetooth,
+#memory,
+#custom-poweroff,
+#custom-reboot,
+#custom-suspend,
+#load {
+ padding: 0 10px;
+ background-color: #282828;
+ color: #ebdbb2;
+}
+
+#custom-reboot,
+#custom-suspend {
+ margin-right: 3px;
+}
+
+#privacy {
+ padding: 0 10px;
+ background-color: #bc4b3c;
+ color: #ebdbb2;
+}
+
+#mode {
+ background-color: #689d6a;
+ color: #282828;
+ /* box-shadow: inset 0 -3px #ffffff; */
+}
+
+/* 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;
+}
+
+#cava {
+ padding: 0 5px;
+}
+
+#battery.charging, #battery.plugged {
+ background-color: #98971a;
+ color: #282828;
+}
+
+@keyframes blink {
+ to {
+ background-color: #282828;
+ color: #ebdbb2;
+ }
+}
+
+/* Using steps() instead of linear as a timing function to limit cpu usage */
+#battery.critical:not(.charging) {
+ background-color: #cc241d;
+ color: #ebdbb2;
+ animation-name: blink;
+ animation-duration: 0.5s;
+ animation-timing-function: steps(12);
+ animation-iteration-count: infinite;
+ animation-direction: alternate;
+}
+
+label:focus {
+ background-color: #000000;
+}
+
+#wireplumber.muted {
+ background-color: #458588;
+}
+
+#tray > .passive {
+ -gtk-icon-effect: dim;
+}
+
+#tray > .needs-attention {
+ -gtk-icon-effect: highlight;
+}
+
+#mpris.playing {
+ background-color: #d79921;
+ color: #282828;
+}
+
+#tray menu {
+ font-family: sans-serif;
+}
+
+#scratchpad.empty {
+ background: transparent;
+}