aboutsummaryrefslogtreecommitdiff
path: root/config/waybar
diff options
context:
space:
mode:
Diffstat (limited to 'config/waybar')
-rw-r--r--config/waybar/config.org110
-rw-r--r--config/waybar/style.org142
2 files changed, 252 insertions, 0 deletions
diff --git a/config/waybar/config.org b/config/waybar/config.org
new file mode 100644
index 0000000..a23d887
--- /dev/null
+++ b/config/waybar/config.org
@@ -0,0 +1,110 @@
+#+title: Waybar Configuration
+* Layout
+Define the layout of the bar.
+#+begin_src js-json :tangle config
+ {
+ "height": 30,
+ "spacing": 4,
+ "modules-left": ["sway/workspaces", "sway/scratchpad"],
+ "modules-center": ["sway/window"],
+ "modules-right": ["mpd", "pulseaudio", "network", "cpu", "memory", "clock", "tray"],
+#+end_src
+
+* Components
+Define scratchpad component.
+#+begin_src js-json :tangle config
+ "sway/scratchpad": {
+ "format": "{icon} {count}",
+ "show-empty": false,
+ "format-icons": ["", ""],
+ "tooltip": true,
+ "tooltip-format": "{app}: {title}"
+ },
+#+end_src
+
+Define music player daemon component.
+#+begin_src js-json :tangle config
+ "mpd": {
+ "format": "{stateIcon} {artist} - {album} - {title} ({elapsedTime:%M:%S}/{totalTime:%M:%S}) [{songPosition}|{queueLength}] 🎵",
+ "format-disconnected": "Disconnected 🎵",
+ "format-stopped": "{consumeIcon}Stopped 🎵",
+ "unknown-tag": "N/A",
+ "interval": 2,
+ "state-icons": {
+ "paused": "",
+ "playing": ""
+ },
+ "tooltip-format": "MPD (connected)",
+ "tooltip-format-disconnected": "MPD (disconnected)",
+ "on-click": "foot -e ncmpcpp"
+ },
+#+end_src
+
+Define tray component.
+#+begin_src js-json :tangle config
+ "tray": {
+ "icon-size": 21,
+ "spacing": 10,
+ "show-passive-items": true
+ },
+#+end_src
+
+Define clock component.
+#+begin_src js-json :tangle config
+ "clock": {
+ "format": "{:%H:%M\t%Y-%m-%d}",
+ "tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>"
+ },
+#+end_src
+
+Define CPU usage component.
+#+begin_src js-json :tangle config
+ "cpu": {
+ "format": "{usage}% ",
+ "tooltip": false
+ },
+#+end_src
+
+Define memory usage component.
+#+begin_src js-json :tangle config
+ "memory": {
+ "format": "{}% "
+ },
+#+end_src
+
+Define network component.
+#+begin_src js-json :tangle config
+ "network": {
+ // "interface": "wlp2*", // (Optional) To force the use of this interface
+ "format-wifi": "",
+ "tooltip": false,
+ "format-ethernet": "",
+ "format-linked": "",
+ "format-disconnected": "⚠",
+ "format-alt": "{ifname}: {ipaddr}/{cidr}"
+ },
+#+end_src
+
+Define audio component.
+#+begin_src js-json :tangle config
+ "pulseaudio": {
+ // "scroll-step": 1, // %, can be a float
+ "format": "{volume}% {icon}",
+ "format-bluetooth": "{volume}% {icon}",
+ "format-bluetooth-muted": " {icon}",
+ "format-muted": " ",
+ "format-source": "{volume}% ",
+ "format-source-muted": "",
+ "format-icons": {
+ "headphone": "",
+ "hands-free": "",
+ "headset": "",
+ "phone": "",
+ "portable": "",
+ "car": "",
+ "default": ["", "", ""]
+ },
+ "on-click": "pavucontrol"
+ }
+ }
+#+end_src
diff --git a/config/waybar/style.org b/config/waybar/style.org
new file mode 100644
index 0000000..193b465
--- /dev/null
+++ b/config/waybar/style.org
@@ -0,0 +1,142 @@
+#+title: Waybar Styling
+* Global
+Set global font, colours, and transitions.
+#+begin_src css :tangle yes
+ window#waybar {
+ font-family: FontAwesome, Roboto, Helvetica, Arial, sans-serif;
+ font-size: 13px;
+ background: transparent;
+ color: #ffffff;
+ text-shadow: 1px 1px #64727D;
+ transition-property: background-color;
+ transition-duration: .5s;
+ }
+#+end_src
+
+* Button
+Set global button styling.
+#+begin_src css :tangle yes
+ button {
+ box-shadow: inset 0 -3px transparent;
+ border: none;
+ border-radius: 0;
+ }
+#+end_src
+
+Set button hover styling
+#+begin_src css :tangle yes
+ button:hover {
+ background: inherit;
+ box-shadow: inset 0 -3px #ffffff;
+ }
+#+end_src
+
+Set workspace button styling.
+#+begin_src css :tangle yes
+ #workspaces button {
+ padding: 0 5px;
+ text-shadow: 1px 1px #64727D;
+ background-color: transparent;
+ color: #ffffff;
+ }
+#+end_src
+
+Set button hover styling in workspaces.
+#+begin_src css :tangle yes
+ #workspaces button:hover {
+ background: rgba(0, 0, 0, 0.2);
+ }
+#+end_src
+
+Set button focused styling in workspaces.
+#+begin_src css :tangle yes
+ #workspaces button.focused {
+ background: transparent;
+ text-shadow: 1px 1px #64727D;
+ box-shadow: inset 0 -3px #ffffff;
+ }
+#+end_src
+
+Set button urgent styling in workspaces.
+#+begin_src css :tangle yes
+ #workspaces button.urgent {
+ background-color: #eb4d4b;
+ }
+#+end_src
+
+* Modes
+Set global mode styling.
+#+begin_src css :tangle yes
+ #mode {
+ background-color: #64727D;
+ border-bottom: 3px solid #ffffff;
+ }
+#+end_src
+
+Set typical mode styling.
+#+begin_src css :tangle yes
+ #clock,
+ #cpu,
+ #memory,
+ #disk,
+ #network,
+ #pulseaudio,
+ #wireplumber,
+ #custom-media,
+ #tray,
+ #mode,
+ #scratchpad,
+ #mpd {
+ padding: 0 10px;
+ color: #ffffff;
+ }
+#+end_src
+
+Add margins for workspaces and windows.
+#+begin_src css :tangle yes
+ #window,
+ #workspaces {
+ margin: 0 4px;
+ }
+#+end_src
+
+Omit margins on leftmost and rightmost workspaces.
+#+begin_src css :tangle yes
+ .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;
+ }
+#+end_src
+
+Set focus styling.
+#+begin_src css :tangle yes
+ label:focus {
+ background-color: #000000;
+ }
+#+end_src
+
+Set important mode styling.
+#+begin_src css :tangle yes
+ #tray > .passive {
+ -gtk-icon-effect: dim;
+ }
+
+ #tray > .needs-attention {
+ -gtk-icon-effect: highlight;
+ }
+#+end_src
+
+Set scratchpad styling.
+#+begin_src css :tangle yes
+ #scratchpad {
+ background: rgba(0, 0, 0, 0.2);
+ }
+
+ #scratchpad.empty {
+ background-color: transparent;
+ }
+#+end_src