aboutsummaryrefslogtreecommitdiff
path: root/dotfiles/waybar
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--dotfiles/waybar/config.jsonc136
-rw-r--r--dotfiles/waybar/power_menu.xml28
-rw-r--r--dotfiles/waybar/style.css172
3 files changed, 336 insertions, 0 deletions
diff --git a/dotfiles/waybar/config.jsonc b/dotfiles/waybar/config.jsonc
new file mode 100644
index 0000000..00e32e4
--- /dev/null
+++ b/dotfiles/waybar/config.jsonc
@@ -0,0 +1,136 @@
+// -*- mode: jsonc -*-
+{
+ "layer": "top", // Waybar at top layer
+ "position": "left", // Waybar position (top|bottom|left|right)
+ // "height": 30, // Waybar height (to be removed for auto height)
+ // "width": 10, // Waybar width
+ "spacing": 4, // Gaps between modules (4px)
+ "reload_style_on_change": true,
+ // Choose the order of the modules
+ "modules-left": [
+ "wlr/taskbar",
+ ],
+ "modules-center": [
+ "wlr/workspaces"
+ ],
+ "modules-right": [
+ "network",
+ "battery",
+ "temperature",
+ "privacy",
+ "pulseaudio",
+ "clock",
+ "tray",
+ "custom/power"
+ ],
+ // Modules configuration
+ // "sway/workspaces": {
+ // "disable-scroll": true,
+ // "all-outputs": true,
+ // "warp-on-scroll": false,
+ // "format": "{name}: {icon}",
+ // "format-icons": {
+ // "1": "",
+ // "2": "",
+ // "3": "",
+ // "4": "",
+ // "5": "",
+ // "urgent": "",
+ // "focused": "",
+ // "default": ""
+ // }
+ // },
+ "tray": {
+ // "icon-size": 21,
+ "spacing": 10
+ },
+ "clock": {
+ "tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>",
+ "format": "{:%H:%M\n%a\n%d/%m}",
+ "justify": "center"
+ },
+ "temperature": {
+ // "thermal-zone": 2,
+ // "hwmon-path": "/sys/class/hwmon/hwmon2/temp1_input",
+ "critical-threshold": 80,
+ "justify": "center",
+ "tooltip": false,
+ "format": "{icon}\n{temperatureC}°C",
+ "format-icons": ["", "", ""]
+ },
+
+ "battery": {
+ "states": {
+ "good": 95,
+ "warning": 30,
+ "critical": 15
+ },
+ "justify": "center",
+ "tooltip": false,
+ "format": "{icon}\n{capacity}%",
+ "format-full": "\n{capacity}%",
+ "format-charging": "\n{capacity}%",
+ "format-plugged": "\n{capacity}%",
+ // "format-good": "", // An empty format will hide the module
+ "format-full": "",
+ "format-icons": ["", "", "", "", ""]
+ },
+
+ "network": {
+ // "interface": "wlp2*", // (Optional) To force the use of this interface
+ "justify": "center",
+ "format-wifi": " \n{signalStrength}%",
+ "format-ethernet": "  \n",
+ "tooltip-format-wifi": "{ipaddr} @ {essid}",
+ "tooltip-format-ethernet": "{ipaddr} @ {ifname}",
+ "format-disconnected": "⚠",
+ "format-disabled": "✘",
+ "on-click": "alacritty -e nmtui"
+ },
+
+ "pulseaudio": {
+ // "scroll-step": 1, // %, can be a float
+ "justify": "center",
+ "format": "{icon}\n{volume}%",
+ "format-bluetooth": "{volume}% {icon} {format_source}",
+ "format-bluetooth-muted": " {icon} {format_source}",
+ "format-muted": " {format_source}",
+ "format-source": "",
+ "format-source-muted": "",
+ "format-icons": {
+ "headphone": "",
+ "hands-free": "",
+ "headset": "",
+ "phone": "",
+ "portable": "",
+ "car": "",
+ "default": ["", "", ""],
+ "muted": [""]
+ },
+ "on-click": "wpctl set-mute @DEFAULT_SINK@ toggle",
+ "on-click-right": "pavucontrol"
+ },
+
+ "wlr/taskbar": {
+ "format": "{icon}",
+ "icon-size": 14,
+ "icon-theme": "Qogir",
+ "tooltip-format": "{title}",
+ "on-click": "activate",
+ "on-click-middle": "close",
+ },
+
+ "custom/power": {
+ "justify": "center",
+ "format": " ⏻ ",
+ "tooltip": false,
+ "menu": "on-click",
+ "menu-file": "$HOME/.config/waybar/power_menu.xml",
+ "menu-actions": {
+ "shutdown": "systemctl poweroff",
+ "reboot": "systemctl reboot",
+ "logout": "loginctl terminate-user $USER",
+ "hibernate": "systemctl hibernate"
+ }
+ }
+}
diff --git a/dotfiles/waybar/power_menu.xml b/dotfiles/waybar/power_menu.xml
new file mode 100644
index 0000000..539c20d
--- /dev/null
+++ b/dotfiles/waybar/power_menu.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <object class="GtkMenu" id="menu">
+ <child>
+ <object class="GtkMenuItem" id="lock">
+ <property name="label">Lock Screen</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkMenuItem" id="logout">
+ <property name="label">Log Out</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkSeparatorMenuItem" id="delimiter1"/>
+ </child>
+ <child>
+ <object class="GtkMenuItem" id="reboot">
+ <property name="label">Reboot</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkMenuItem" id="shutdown">
+ <property name="label">Shutdown</property>
+ </object>
+ </child>
+ </object>
+</interface>
diff --git a/dotfiles/waybar/style.css b/dotfiles/waybar/style.css
new file mode 100644
index 0000000..2c5d65a
--- /dev/null
+++ b/dotfiles/waybar/style.css
@@ -0,0 +1,172 @@
+* {
+ /* `otf-font-awesome` is required to be installed for icons */
+ font-family: FontAwesome, Roboto, Helvetica, Arial, sans-serif;
+ font-size: 9px;
+}
+
+@define-color bg-color #2b2b23;
+@define-color accent-color #4c5b3f;
+@define-color text-color #e4e4e4;
+@define-color dark-text-color #2b2b23;
+@define-color hover-color #8f8e84;
+@define-color warning-color #e8b54a;
+@define-color critical-color #c65858;
+
+window#waybar {
+ background-color: @bg-color;
+ color: @text-color;
+ padding: 0 5px;
+}
+
+/*
+window#waybar.empty {
+ background-color: transparent;
+}
+window#waybar.solo {
+ background-color: #FFFFFF;
+}
+*/
+
+button:hover {
+ transition: background-color 0.2s;
+}
+
+#workspaces button {
+ 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: @warning-color;
+}
+
+#battery,
+#temperature,
+#network,
+#pulseaudio,
+#wireplumber,
+#tray {
+ padding: 2px 0;
+ border-radius: 10px 15px 10px 15px;
+ transition: background-color 0.2s;
+}
+
+#network:hover,
+#pulseaudio:hover,
+#wireplumber:hover,
+#custom-power:hover {
+ color: @dark-text-color;
+ background-color: @hover-color;
+ transition: background-color 0.2s;
+}
+
+#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;
+}
+
+#pulseaudio {
+ background-color: @critical-color;
+ color: black;
+}
+
+#pulseaudio.muted {
+ background-color: @background-color;
+ color: @text-color;
+ padding: 4px 0;
+ font-size: 13px;
+}
+/* Using steps() instead of linear as a timing function to limit cpu usage */
+#battery.critical:not(.charging) {
+ background-color: @critical-color;
+ animation-name: blink;
+ animation-duration: 0.5s;
+ animation-timing-function: steps(12);
+ animation-iteration-count: infinite;
+ animation-direction: alternate;
+}
+
+#network.disabled,
+#network.disconnected {
+ color: black;
+ padding: 4px 0;
+ font-size: 18px;
+}
+
+#network.disconnected {
+ background-color: @warning-color;
+}
+
+#network.disabled {
+ background-color: @critical-color;
+}
+
+#temperature.critical {
+ background-color: @critical-color;
+}
+
+#tray {
+ background-color: @gb-color;
+}
+
+#tray > .passive {
+ -gtk-icon-effect: dim;
+}
+
+#tray > .needs-attention {
+ -gtk-icon-effect: highlight;
+ background-color: @warning-color;
+}
+
+#taskbar button {
+ padding: 5px 0;
+ border-radius: 10px 20px 10px 20px;
+ background-color: @accent-color;
+}
+
+#taskbar button:hover {
+ background-color: @hover-color;
+}
+
+#custom-power {
+ padding: 5px 0;
+ border-color: @text-color;
+}
+
+#custom-power:hover{
+ background-color: @critical-color;
+}
+
+menu {
+ padding: 0;
+ background-color: @bg-color;
+ color: @text-color;
+}
+menuitem {
+ padding: 5px 0;
+ margin: 2px 0;
+}
+menuitem:hover {
+ border-radius: 4px;
+ background-color: @hover-color;
+ color: @dark-text-color;
+}
Directive (EU) 2019/790, Article 4(3); all rights regarding Text and Data Mining (TDM) are reserved.