summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config.jsonc26
-rw-r--r--modules.jsonc196
-rw-r--r--power_menu.xml30
-rw-r--r--style.css100
4 files changed, 352 insertions, 0 deletions
diff --git a/config.jsonc b/config.jsonc
new file mode 100644
index 0000000..1dd56c4
--- /dev/null
+++ b/config.jsonc
@@ -0,0 +1,26 @@
+{
+ "output": ["Microstep MAG274QRF-QD CA8A391600566", "eDP-1"],
+ "position": "bottom",
+ "include": ["~/.config/waybar/modules.jsonc"],
+ "reload_style_on_change": true,
+
+ "modules-left": [
+ "custom/menu",
+ "sway/workspaces",
+ "wlr/taskbar"
+ ],
+
+ "modules-center": [
+ "mpris"
+ ],
+
+ "modules-right": [
+ "cpu",
+ "memory",
+ "network",
+ "wireplumber",
+ "clock#calendar",
+ "clock",
+ "tray"
+ ]
+}
diff --git a/modules.jsonc b/modules.jsonc
new file mode 100644
index 0000000..1d2b3b6
--- /dev/null
+++ b/modules.jsonc
@@ -0,0 +1,196 @@
+{
+ "custom/menu": {
+ "format" : "",
+ "tooltip": false,
+ "menu": "on-click",
+ "menu-file": "~/.config/waybar/power_menu.xml",
+ "menu-actions": {
+ "shutdown": "doas poweroff",
+ "reboot": "doas reboot"
+ }
+ },
+
+ "sway/workspaces": {
+ "format": "{icon}",
+ "format-icons": { "0": "󰄨" },
+ "on-click": "activate",
+ "sort-by-number": true
+ },
+
+ "sway/scratchpad": {
+ "format": "#{count}",
+ "show-empty": false,
+ "tooltip": true,
+ "tooltip-format": "{app}: {title}"
+ },
+
+ "niri/workspaces": {
+ "format": "{value}"
+ },
+
+ "clock": {
+ "format": "{:%R} 󱑊 ",
+ "format-alt": "{:%I:%M %p} 󱑊 ",
+ "tooltip-format": "{tz_list}",
+ "timezones": [
+ "Europe/London",
+ "Europe/Madrid",
+ "America/New_York",
+ "America/Los_Angeles"
+ ]
+ },
+
+ "clock#calendar": {
+ "format": "{:%a %d %b}  ",
+ "format-alt": "{:%Y-%m-%d}  ",
+ "tooltip-format": "<span background='#000'>{calendar}</span>",
+ "calendar": {
+ "mode": "month",
+ "mode-mon-col": 3,
+ "weeks-pos": "left",
+ "on-scroll": 1,
+ "format": {
+ "months": "<span color='#ffead3'>{}</span>",
+ "days": "<span color='#ecc6d9'>{}</span>",
+ "weeks": "<span color='#99ffdd'>W{}</span>",
+ "weekdays": "<span color='#ffcc66'>{}</span>",
+ "today": "<span color='black' bgcolor='white'>{}</span>"
+ }
+ },
+ "actions": {
+ "on-click": "mode"
+ }
+ },
+
+ "battery": {
+ "interval": 10,
+ "states": {
+ "warning": 20,
+ "critical": 10
+ },
+ "format": "{capacity}% {icon}",
+ "format-alt": "({time}) {capacity}% {icon}",
+ "format-icons": ["󰁺","󰁻","󰁼","󰁽","󰁾","󰁿","󰂀","󰂁","󰂂","󰁹"],
+ "format-time": "{H}:{m}"
+ },
+
+ "bluetooth": {
+ "format": "{status} ",
+ "format-disabled": "󰂲", // i.e. aeroplane mode
+ "format-no-controller": "", // i.e. bluetoothd not running
+ "format-connected": "{device_alias} ",
+ "tooltip-format": "{controller_alias}\t{controller_address}\n\n{num_connections} connected",
+ "tooltip-format-connected": "{controller_alias}\t{controller_address}\n\n{num_connections} connected\n\n{device_enumerate}",
+ "tooltip-format-enumerate-connected": "{device_alias}\t{device_address}",
+ "tooltip-format-enumerate-connected-battery": "{device_alias}\t{device_address}\t{device_battery_percentage}%",
+ "on-click": "pgrep bluetoothd && footclient bluetui"
+ },
+
+ "wireplumber": {
+ "format": "{volume}% {icon}",
+ "format-muted": " ",
+ "format-icons": [" ", " ", " "],
+ "tooltip-format": "{volume}% {node_name}",
+ "on-click": "foot ncpamixer",
+ "scroll-step": 0.5
+ },
+
+ "wireplumber#source": {
+ "node-type": "Audio/Source",
+ "format": "{volume}% 󰍬",
+ "format-muted": "󰍭",
+ "on-click": "wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle",
+ "scroll-step": 5
+ },
+
+ "tray": {
+ "spacing": 8,
+ "icon-size": 16,
+ "show-passive-items": true,
+ "icons": {
+ "steam": "/usr/share/icons/Papirus/64x64/apps/steam.svg",
+ "net.lutris.Lutris": "/usr/share/icons/Papirus/64x64/apps/lutris.svg",
+ "zeal": "/usr/share/icons/Papirus/64x64/apps/zeal.svg"
+ }
+ },
+
+ "wlr/taskbar": {
+ "format": "{icon}",
+ "icon-size": 20,
+ "icon-theme": "Papirus",
+ "tooltip-format": "{title}",
+ "on-click": "activate",
+ "on-click-middle": "close",
+ "ignore-list": [ "foot", "Picture-in-Picture" ],
+ "app_ids-mapping": {
+ "firefoxdeveloperedition": "firefox-developer-edition"
+ },
+ "rewrite": {
+ "Firefox Web Browser": "Firefox",
+ "Foot Server": "Terminal"
+ }
+ },
+
+ "network": {
+ "format": "{ifname}",
+ "format-disabled": "󰖪", // i.e. aeroplane mode
+ "format-wifi": "Online  ",
+ "format-ethernet": "{ipaddr}/{cidr}  ",
+ "format-disconnected": "offline 󰤮",
+ "tooltip-format": "{ifname} via {gwaddr} 󰊗 ",
+ "tooltip-format-wifi": "<b>{essid} ({signalStrength}%)  </b>\nSSID:\t {ifname}\nIP:\t {ipaddr}\nGateway: {gwaddr}\nNetmask: {netmask}\nCIDR:\t {cidr}bit subnet mask\nBSSID:\t {bssid}\nSignal:\t {signaldBm}dBm\nFreq:\t {frequency}",
+ "tooltip-format-ethernet": "{ifname} " ,
+ "tooltip-format-disconnected": "Disconnected",
+ "on-click": "footclient impala"
+ },
+
+ "memory": {
+ "interval": 30,
+ "format": "{used:0.1f}G  ",
+ "tooltip-format": "TYPE\tPERC\tUSED\tAVAIL\nRAM:\t{percentage}%\t{used:0.1f}G\t{total:1.0f}G\nSwap:\t{swapPercentage}%\t{swapUsed:0.1f}G\t{swapAvail}G"
+ },
+
+ "cpu": {
+ "interval": 10,
+ "format": "{usage}% {icon}",
+ "format-icons": [
+ "<span color='white'> </span>",
+ "<span color='white'> </span>",
+ "<span color='white'> </span>",
+ "<span color='white'> </span>",
+ "<span color='yellow'> </span>",
+ "<span color='yellow'> </span>",
+ "<span color='orange'> </span>",
+ "<span color='red'> </span>"
+ ]
+ },
+
+ "backlight": {
+ "format": "{percent}% {icon}",
+ "format-icons": ["󱩎 ","󱩏 ","󱩐 ","󱩑 ","󱩒 ","󱩓 ","󱩔 ","󱩕 ","󱩖 ","󰛨 "],
+ "scroll-step": 0.5,
+ "min-brightness": 0.1
+ },
+
+ "mpd": {
+ "format": "{stateIcon} {consumeIcon}{randomIcon}{repeatIcon}{singleIcon}{artist} - {album} - {title} ({elapsedTime:%M:%S}/{totalTime:%M:%S}) <U+F001>",
+ "format-disconnected": "Disconnected <U+F001>",
+ "format-stopped": "{consumeIcon}{randomIcon}{repeatIcon}{singleIcon}Stopped <U+F001>",
+ "interval": 2,
+ "tooltip-format": "MPD (connected)",
+ "tooltip-format-disconnected": "MPD (disconnected)"
+ },
+
+ "mpris": {
+ "format": "Now playing: {player_icon} {dynamic}",
+ "format-paused": "{status_icon} <i>{dynamic}</i>",
+ "player-icons": {
+ "default": "▶",
+ "mpv": "🎵"
+ },
+ "status-icons": {
+ "paused": "󰏤"
+ }
+ // "ignored-players": ["firefox"]
+ }
+}
diff --git a/power_menu.xml b/power_menu.xml
new file mode 100644
index 0000000..8b3ac50
--- /dev/null
+++ b/power_menu.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <object class="GtkMenu" id="menu">
+ <!--
+ <child>
+ <object class="GtkMenuItem" id="suspend">
+ <property name="label">Suspend</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkMenuItem" id="hibernate">
+ <property name="label">Hibernate</property>
+ </object>
+ </child>
+ -->
+ <child>
+ <object class="GtkMenuItem" id="shutdown">
+ <property name="label">Shutdown</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkSeparatorMenuItem" id="delimiter1"/>
+ </child>
+ <child>
+ <object class="GtkMenuItem" id="reboot">
+ <property name="label">Reboot</property>
+ </object>
+ </child>
+ </object>
+</interface>
diff --git a/style.css b/style.css
new file mode 100644
index 0000000..8186f91
--- /dev/null
+++ b/style.css
@@ -0,0 +1,100 @@
+/* GTK Colours */
+@define-color fg #eee;
+@define-color mg #888;
+@define-color bg #000;
+
+* {
+ font-family: "Hack Nerd Font", monospace;
+ font-size: 0.98em;
+ font-weight: normal;
+ text-shadow: none;
+ box-shadow: none;
+ transition-property: background;
+ transition-duration: .5s;
+}
+
+/* Colours */
+/* #clock { color: lightblue; } */
+/* #clock.calendar { color: pink; }*/
+/* #wireplumber { color: #f1c40f; }*/
+/* #battery { color: mediumpurple; }*/
+/* #network.linked{ color: seagreen; }*/
+/* #network.disconnected{ color: red; }*/
+/* #bluetooth { color: royalblue; }*/
+
+/* Bar */
+window#waybar {
+ color: @fg;
+ background: rgba(0,0,0,0.85);
+ border-top: 1px solid rgba(255,255,255,0.3);
+}
+
+window#waybar.hidded {
+ opacity: 0.0;
+}
+
+/* Labels */
+label.module {
+ padding: 8px 10px 5px 10px;
+}
+
+label:hover {
+ color: white;
+}
+
+/* Tray */
+#tray {
+ background: @bg;
+ border: 1px solid @fg;
+ border-radius: 5px;
+ padding: 0 8px;
+}
+
+/* MENU */
+#custom-menu {
+ padding:0 18px 0 14px;
+}
+
+#custom-menu:hover {
+ background: @fg;
+ color: @bg;
+}
+
+/* TASKBAR */
+/*
+#taskbar button {
+ color: @mg;
+ padding: 4px 10px 4px 10px;
+ border-radius: 0;
+}
+#taskbar button:hover {
+ color: @bg;
+ background: @fg;
+}
+*/
+
+
+/* WORKSPACES & TASKBAR*/
+#workspaces button,
+#taskbar button {
+ color: @mg;
+ padding: 4px 10px 4px 10px;
+ border-radius: 0;
+ border:none;
+}
+
+#workspaces button:hover,
+#workspaces button.focused:hover,
+#taskbar button:hover {
+ color: @bg;
+ background: @fg;
+}
+
+#workspaces button.focused {
+ color: @fg;
+}
+
+#workspaces button.urgent {
+ color: red;
+}
+