blackbeard420

blackbeard420 / waybar

Last active 2 hours ago

Like 0

blackbeard420 revised this gist 2 hours ago · f53961e

2 files changed, 229 insertions

config (file created)
@@ -0,0 +1,76 @@
1 + // waybar config — refined hacker-terminal: pill-shaped modules, Nerd Font
2 + // icons, subtle spacing/rounding. Ported from ~/.config/polybar/config;
3 + // polybar itself is untouched, this only runs under sway.
4 + {
5 + "layer": "top",
6 + "position": "top",
7 + "output": "DP-1",
8 + "height": 26,
9 + "spacing": 0,
10 + "margin-top": 0,
11 + "margin-bottom": 0,
12 + "margin-left": 0,
13 + "margin-right": 0,
14 + "modules-left": [
15 + "sway/workspaces",
16 + "sway/mode"
17 + ],
18 + "modules-center": [
19 + "custom/blackbeard420"
20 + ],
21 + "modules-right": [
22 + "disk",
23 + "memory",
24 + "cpu",
25 + "temperature",
26 + "network",
27 + "clock",
28 + "tray"
29 + ],
30 + "sway/workspaces": {
31 + "format": "{index}",
32 + "disable-scroll": false,
33 + "all-outputs": false
34 + },
35 + "sway/mode": {
36 + "format": " {} "
37 + },
38 + "custom/blackbeard420": {
39 + "format": "blackbeard420",
40 + "tooltip": false
41 + },
42 + "disk": {
43 + "path": "/",
44 + "interval": 25,
45 + "format": " {free}"
46 + },
47 + "memory": {
48 + "interval": 2,
49 + "format": " {used:0.1f}G/{total:0.1f}G ({percentage}%)"
50 + },
51 + "cpu": {
52 + "interval": 2,
53 + "format": " {usage}%"
54 + },
55 + "temperature": {
56 + "hwmon-path": "/sys/class/hwmon/hwmon2/temp1_input",
57 + "critical-threshold": 60,
58 + "format": " {temperatureC}°C",
59 + "format-critical": " {temperatureC}°C"
60 + },
61 + "network": {
62 + "interface": "enp42s0",
63 + "interval": 3,
64 + "format-ethernet": " <span color='#00ff00'>{ipaddr}</span>",
65 + "format-disconnected": " down",
66 + "tooltip-format-ethernet": "{ifname}: {ipaddr}/{cidr}"
67 + },
68 + "clock": {
69 + "interval": 5,
70 + "format": " {:%Y-%m-%d %H:%M}",
71 + "tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>"
72 + },
73 + "tray": {
74 + "spacing": 10
75 + }
76 + }
style.css (file created)
@@ -0,0 +1,153 @@
1 + /* waybar style — "refined hacker-terminal": black bg, amber primary #ffb52a,
2 + green accent #00ff00, pink/red alerts #e60053/#bd2c40. Evolution of the
3 + original flat/bracket-divided layout into per-module pill badges with
4 + subtle rounding, spacing, and hover states — still monospace, still flat
5 + black, still terminal-flavored. GTK3 CSS only: no ::before/::after,
6 + no @keyframes/animation (GTK's CSS engine does not implement them —
7 + that combination previously crashed waybar on launch, do not reintroduce). */
8 +
9 + * {
10 + font-family: "Hurmit Nerd Font Mono", "JetBrains Mono", monospace;
11 + font-size: 13px;
12 + min-height: 0;
13 + border-radius: 0;
14 + }
15 +
16 + window#waybar {
17 + background-color: rgba(0, 0, 0, 0.90);
18 + color: #dfdfdf;
19 + }
20 +
21 + /* --- shared pill treatment for every module badge --- */
22 +
23 + #workspaces button,
24 + #mode,
25 + #custom-blackbeard420,
26 + #disk,
27 + #memory,
28 + #cpu,
29 + #temperature,
30 + #network,
31 + #clock {
32 + margin: 1px 3px;
33 + padding: 2px 10px;
34 + border-radius: 6px;
35 + border: 1px solid transparent;
36 + transition: background-color 0.15s ease-in-out,
37 + color 0.15s ease-in-out,
38 + border-color 0.15s ease-in-out;
39 + }
40 +
41 + #tray {
42 + margin: 1px 3px;
43 + padding: 2px 8px;
44 + }
45 +
46 + /* --- left: workspaces --- */
47 +
48 + #workspaces {
49 + margin: 0 2px;
50 + }
51 +
52 + #workspaces button {
53 + color: #555555;
54 + background: transparent;
55 + }
56 +
57 + #workspaces button.focused {
58 + color: #dfdfdf;
59 + background: #444444;
60 + border-bottom: 2px solid #ffb52a;
61 + }
62 +
63 + #workspaces button.visible {
64 + color: #dfdfdf;
65 + background: #2a2a2a;
66 + }
67 +
68 + #workspaces button.urgent {
69 + color: #dfdfdf;
70 + background: #bd2c40;
71 + border-color: #bd2c40;
72 + }
73 +
74 + #workspaces button:hover {
75 + background: #222222;
76 + color: #ffb52a;
77 + border-color: #ffb52a;
78 + }
79 +
80 + #mode {
81 + color: #000000;
82 + background: #ffb52a;
83 + font-weight: bold;
84 + }
85 +
86 + /* --- center: the label --- */
87 +
88 + #custom-blackbeard420 {
89 + color: #00ff00;
90 + background: rgba(0, 255, 0, 0.06);
91 + border-color: rgba(0, 255, 0, 0.35);
92 + font-weight: bold;
93 + letter-spacing: 1px;
94 + text-shadow: 0 0 6px rgba(0, 255, 0, 0.55);
95 + }
96 +
97 + /* --- right: system info pills --- */
98 +
99 + #disk,
100 + #memory,
101 + #cpu,
102 + #temperature,
103 + #network,
104 + #clock {
105 + background: rgba(255, 255, 255, 0.04);
106 + border-color: rgba(255, 255, 255, 0.07);
107 + color: #999999;
108 + }
109 +
110 + #disk:hover,
111 + #memory:hover,
112 + #cpu:hover,
113 + #temperature:hover,
114 + #network:hover,
115 + #clock:hover {
116 + background: #222222;
117 + color: #ffb52a;
118 + border-color: #ffb52a;
119 + }
120 +
121 + #temperature {
122 + color: #dfdfdf;
123 + }
124 +
125 + #temperature.critical {
126 + color: #e60053;
127 + background: rgba(230, 0, 83, 0.12);
128 + border-color: #e60053;
129 + text-shadow: 0 0 6px rgba(230, 0, 83, 0.6);
130 + }
131 +
132 + #network.disconnected {
133 + color: #bd2c40;
134 + background: rgba(189, 44, 64, 0.12);
135 + border-color: #bd2c40;
136 + }
137 +
138 + #clock {
139 + color: #7ec9ff;
140 + }
141 +
142 + /* --- tray --- */
143 +
144 + #tray > .passive {
145 + -gtk-icon-effect: dim;
146 + }
147 +
148 + #tray > .needs-attention {
149 + -gtk-icon-effect: highlight;
150 + background-color: #bd2c40;
151 + border-radius: 6px;
152 + padding: 2px 4px;
153 + }