Skip to content

Commit 208525a

Browse files
committed
feat(home-manager): update configurations for Waybar, Rofi, and Swaylock
- Refactored Waybar configuration: - Simplified module definitions and updated styling. - Removed custom weather script and added new modules for CPU, memory, and network. - Adjusted Rofi theme and configuration: - Reduced font size in Dracula theme. - Removed unused extraConfig options. - Updated Swaylock settings: - Standardized color codes and font name. - Enhanced Waybar CSS: - Improved styling for various modules and added animations for critical battery state. - Added `pavucontrol` to user packages in NixOS configuration.
1 parent f16f52d commit 208525a

File tree

9 files changed

+212
-121
lines changed

9 files changed

+212
-121
lines changed

flake.nix

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
inputs.nixpkgs.follows = "nixpkgs";
3030
inputs.home-manager.follows = "home-manager";
3131
};
32-
# };
3332
flake-parts.url = "github:hercules-ci/flake-parts";
3433
treefmt-nix = {
3534
url = "github:numtide/treefmt-nix";

home-manager/programs/rofi/default.nix

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,8 @@
1111
rofi-calc
1212
rofi-power-menu
1313
];
14-
1514
extraConfig = {
1615
show-icons = true;
17-
icon-theme = "Nordzy-dark";
18-
sidebar-mode = true;
19-
display-window = " Window";
20-
display-run = " Run";
21-
display-drun = " Application";
22-
display-filebrowser = " Filebrowser";
23-
disable-history = false;
2416
};
2517
};
2618
}

home-manager/programs/rofi/themes/dracula.rasi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
drac-yel: #f1fa8c;
1414

1515
font: "HackGenNerd";
16-
font-size: 16px;
16+
font-size: 14px;
1717

1818
foreground: @drac-fgd;
1919
background-color: @drac-bgd;

home-manager/programs/swaylock/default.nix

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -9,31 +9,31 @@
99
screenshot = true;
1010
effect-blur = "13x13";
1111
effect-vignette = "0.5:0.5";
12-
color = "282A36";
13-
font = "HackGenNerd";
12+
color = "#282A36";
13+
font = "HackGen";
1414
indicator = true;
1515
indicator-radius = 200;
1616
indicator-thickness = 20;
17-
line-color = "44475A";
18-
ring-color = "BD93F9";
19-
inside-color = "282A36";
20-
key-hl-color = "50FA7B";
21-
separator-color = "00000000";
22-
text-color = "F8F8F2";
23-
text-caps-lock-color = "FF79C6";
24-
line-ver-color = "BD93F9";
25-
ring-ver-color = "BD93F9";
26-
inside-ver-color = "282A36";
27-
text-ver-color = "8BE9FD";
28-
ring-wrong-color = "FF5555";
29-
text-wrong-color = "FF5555";
30-
inside-wrong-color = "282A36";
31-
inside-clear-color = "282A36";
32-
text-clear-color = "8BE9FD";
33-
ring-clear-color = "8BE9FD";
34-
line-clear-color = "8BE9FD";
35-
line-wrong-color = "44475A";
36-
bs-hl-color = "FFB86C";
17+
line-color = "#44475A";
18+
ring-color = "#BD93F9";
19+
inside-color = "#282A36";
20+
key-hl-color = "#50FA7B";
21+
separator-color = "#00000000";
22+
text-color = "#F8F8F2";
23+
text-caps-lock-color = "#FF79C6";
24+
line-ver-color = "#BD93F9";
25+
ring-ver-color = "#BD93F9";
26+
inside-ver-color = "#282A36";
27+
text-ver-color = "#8BE9FD";
28+
ring-wrong-color = "#FF5555";
29+
text-wrong-color = "#FF5555";
30+
inside-wrong-color = "#282A36";
31+
inside-clear-color = "#282A36";
32+
text-clear-color = "#8BE9FD";
33+
ring-clear-color = "#8BE9FD";
34+
line-clear-color = "#8BE9FD";
35+
line-wrong-color = "#44475A";
36+
bs-hl-color = "#FFB86C";
3737
grace = 2;
3838
grace-no-mouse = true;
3939
grace-no-touch = true;

home-manager/programs/waybar/config

Lines changed: 44 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,46 @@
11
{
2-
"layer": "top",
3-
"position": "top",
4-
"height": 24,
5-
"spacing": 4,
6-
"modules-left": [
7-
"wlr/workspaces",
8-
"wlr/taskbar"
9-
],
10-
"modules-center": [
11-
"hyprland/window"
12-
],
13-
"modules-right": [
14-
"tray",
15-
"hyprland/language",
16-
"custom/weather",
17-
"clock"
18-
],
19-
"wlr/taskbar": {
20-
"on-click": "activate",
21-
"on-click-middle": "close",
22-
"ignore-list": [
23-
"foot"
24-
]
25-
},
26-
"wlr/workspaces": {
27-
"on-click": "activate",
28-
"on-scroll-up": "hyprctl dispatch workspace e-1",
29-
"on-scroll-down": "hyprctl dispatch workspace e+1"
30-
},
31-
"hyprland/window": {
32-
"max-length": 128
33-
},
34-
"clock": {
35-
"format": "{:%c}",
36-
"tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>"
37-
},
38-
"tray": {
39-
"spacing": 4
40-
},
41-
"custom/weather": {
42-
"exec": "~/.config/waybar/wittr.sh",
43-
"return-type": "json",
44-
"format": "{}",
45-
"tooltip": true,
46-
"interval": 900
47-
},
48-
"hyprland/language": {
49-
"format-pl": "[pl]",
50-
"format-en": "[us]",
51-
"on-click": "hyprctl switchxkblayout at-translated-set-2-keyboard next"
52-
}
2+
"layer": "top",
3+
"modules-left": ["sway/workspaces"],
4+
"modules-right": ["cpu", "memory", "network", "pulseaudio", "battery", "clock"],
5+
"tray": {
6+
"spacing": 10
7+
},
8+
"clock": {
9+
"tooltip-format": "{:%Y-%m-%d | %H:%M}",
10+
"format-alt": "{:%Y-%m-%d}",
11+
"format": "{:%a %Y-%m-%d %I:%M %p}"
12+
},
13+
"cpu": {
14+
"format": " {usage}%"
15+
},
16+
"memory": {
17+
"format": " {}%"
18+
},
19+
"backlight": {
20+
"format": " {percent}%",
21+
"format-icons": ["", ""]
22+
},
23+
"battery": {
24+
"format": " {capacity}%"
25+
},
26+
"network": {
27+
"format-wifi": "",
28+
"format-ethernet": "{ifname}: {ipaddr}/{cidr} ethernet",
29+
"format-disconnected": "⚠"
30+
},
31+
"pulseaudio": {
32+
"format": " {volume}%",
33+
"format-bluetooth": "{volume}% {icon}",
34+
"format-muted": "",
35+
"format-icons": {
36+
"headphones": "",
37+
"handsfree": "",
38+
"headset": "",
39+
"phone": "",
40+
"portable": "",
41+
"car": "",
42+
"default": ["", ""]
43+
},
44+
"on-click": "pavucontrol"
45+
}
5346
}

home-manager/programs/waybar/default.nix

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
{ pkgs }:
22
{
3-
xdg.configFile = {
4-
"waybar/style.css".source = ./style.css;
5-
"waybar/config".source = ./config;
6-
"waybar/wittr.sh".source = ./wittr.sh;
3+
home.file = {
4+
".config/waybar/style.css".source = ./style.css;
5+
".config/waybar/config".source = ./config;
76
};
87

98
programs.waybar.enable = pkgs.stdenv.isLinux;
Lines changed: 141 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,167 @@
1-
/*
2-
* vim:ft=css
3-
*
4-
* Dracula
5-
*
6-
* @author Project Dracula
7-
* @link https://draculatheme.com/waybar
8-
*/
1+
@define-color background #282a36;
2+
3+
@define-color foreground #f8f8f2;
4+
@define-color comment #6272a4;
5+
@define-color cyan #8be9fd;
6+
@define-color green #50fa7b;
7+
@define-color orange #ffb86c;
8+
@define-color pink #ff79c6;
9+
@define-color purple #bd93f9;
10+
@define-color red #ff5555;
11+
@define-color yellow #f1fa8c;
912

1013
* {
1114
border: none;
1215
border-radius: 0;
13-
font-family: Iosevka;
14-
font-size: 11pt;
16+
/*font-family: "Hack", "Noto Color Emoji", sans-serif;*/
17+
font-size: 18px;
18+
/*font-weight: bold;*/
1519
min-height: 0;
1620
}
1721

1822
window#waybar {
19-
opacity: 0.9;
20-
background: @background-darker;
23+
background: @background;
24+
/*border-bottom: 3px solid rgba(100, 114, 125, 0.5);*/
2125
color: @foreground;
22-
border-bottom: 2px solid @background;
2326
}
2427

28+
/* https://github.com/Alexays/Waybar/wiki/FAQ#the-workspace-buttons-have-a-strange-hover-effect */
2529
#workspaces button {
26-
padding: 0 10px;
27-
background: @background;
30+
padding: 0 5px;
31+
background: transparent;
2832
color: @foreground;
33+
border-bottom: 3px solid transparent;
2934
}
3035

31-
#workspaces button:hover {
32-
box-shadow: inherit;
33-
text-shadow: inherit;
34-
background-image: linear-gradient(0deg, @selection, @background-darker);
36+
#workspaces button.focused {
37+
background: @current-line;
38+
border-bottom: 3px solid @foreground;
3539
}
3640

37-
#workspaces button.focused,
38-
#workspaces button.active {
39-
background-image: linear-gradient(0deg, @purple, @selection);
41+
#workspaces button.urgent {
42+
background-color: @red;
4043
}
4144

42-
#workspaces button.urgent {
43-
background-image: linear-gradient(0deg, @red, @background-darker);
45+
#mode {
46+
background: @comment;
47+
border-bottom: 3px solid @foreground;
4448
}
4549

46-
#taskbar button.active {
47-
background-image: linear-gradient(0deg, @selection, @background-darker);
50+
#clock,
51+
#battery,
52+
#cpu,
53+
#memory,
54+
#temperature,
55+
#backlight,
56+
#network,
57+
#pulseaudio,
58+
#custom-media,
59+
#tray,
60+
#mode,
61+
#idle_inhibitor {
62+
padding: 0 10px;
63+
margin: 0 5px;
4864
}
4965

5066
#clock {
51-
padding: 0 4px;
52-
background: @background;
67+
/*background-color: #64727D;*/
68+
color: @foreground;
69+
font-weight: bold;
70+
}
71+
72+
#battery {
73+
/*background-color: #000000;*/
74+
color: @foreground;
75+
}
76+
77+
#battery.charging {
78+
/*background-color: #000000;*/
79+
color: @foreground;
80+
}
81+
82+
@keyframes blink {
83+
to {
84+
/*background-color: #ffffff;*/
85+
color: @background;
86+
}
87+
}
88+
89+
#battery.critical:not(.charging) {
90+
background: @red;
91+
color: @foreground;
92+
animation-name: blink;
93+
animation-duration: 0.5s;
94+
animation-timing-function: linear;
95+
animation-iteration-count: infinite;
96+
animation-direction: alternate;
97+
}
98+
99+
#cpu {
100+
/*background: #2ecc71;*/
101+
color: @foreground;
102+
}
103+
104+
#memory {
105+
/*background: #9b59b6;*/
106+
color: @foreground;
107+
}
108+
109+
#backlight {
110+
/*background: #90b1b1;*/
111+
color: @foreground;
53112
}
54113

114+
#network {
115+
/*background: #2980b9;*/
116+
color: @foreground;
117+
}
118+
119+
#network.disconnected {
120+
/*background: #f53c3c;*/
121+
color: @foreground;
122+
}
123+
124+
#pulseaudio {
125+
/*background: #000000;*/
126+
color: @foreground;
127+
}
128+
129+
#pulseaudio.muted {
130+
/*background: #000000;*/
131+
color: @foreground;
132+
}
133+
134+
#custom-media {
135+
background: @green;
136+
color: @background;
137+
}
138+
139+
.custom-spotify {
140+
background: @green;
141+
}
142+
143+
.custom-vlc {
144+
background: @orange;
145+
}
146+
147+
#temperature {
148+
background: @orange;
149+
}
150+
151+
#temperature.critical {
152+
background: @red;
153+
}
154+
155+
#tray {
156+
/*background-color: #2980b9;*/
157+
color: @foreground;
158+
}
159+
160+
#idle_inhibitor {
161+
background-color: @comment;
162+
}
163+
164+
#idle_inhibitor.activated {
165+
background-color: @foreground;
166+
color: @background;
167+
}

0 commit comments

Comments
 (0)