forked from mirrors_public/oddlama_nix-config
feat: add waybar configuration
This commit is contained in:
parent
426a305b67
commit
870a8b122e
5 changed files with 371 additions and 19 deletions
|
@ -20,6 +20,7 @@ writeShellApplication {
|
||||||
value=$(${bc}/bin/bc <<< "scale=0; 100*$value/$max")
|
value=$(${bc}/bin/bc <<< "scale=0; 100*$value/$max")
|
||||||
${libnotify}/bin/notify-send \
|
${libnotify}/bin/notify-send \
|
||||||
"Brightness" \
|
"Brightness" \
|
||||||
|
--transient \
|
||||||
--hint=string:image-path:"$image" \
|
--hint=string:image-path:"$image" \
|
||||||
--hint=int:value:"$value" \
|
--hint=int:value:"$value" \
|
||||||
--hint="string:wired-tag:indicator" \
|
--hint="string:wired-tag:indicator" \
|
||||||
|
|
|
@ -38,6 +38,7 @@ writeShellApplication {
|
||||||
|
|
||||||
${libnotify}/bin/notify-send \
|
${libnotify}/bin/notify-send \
|
||||||
"Volume" "$value%" \
|
"Volume" "$value%" \
|
||||||
|
--transient \
|
||||||
--hint=string:image-path:"$image" \
|
--hint=string:image-path:"$image" \
|
||||||
--hint=int:value:"$indicator_value" \
|
--hint=int:value:"$indicator_value" \
|
||||||
--hint="string:wired-tag:indicator" \
|
--hint="string:wired-tag:indicator" \
|
||||||
|
|
|
@ -74,6 +74,7 @@ in {
|
||||||
"ALT,tab,cyclenext,"
|
"ALT,tab,cyclenext,"
|
||||||
"SUPER + SHIFT,tab,cyclenext,prev"
|
"SUPER + SHIFT,tab,cyclenext,prev"
|
||||||
"ALT + SHIFT,tab,cyclenext,prev"
|
"ALT + SHIFT,tab,cyclenext,prev"
|
||||||
|
"SUPER,r,submap,resize"
|
||||||
|
|
||||||
"SUPER,left,movefocus,l"
|
"SUPER,left,movefocus,l"
|
||||||
"SUPER,right,movefocus,r"
|
"SUPER,right,movefocus,r"
|
||||||
|
@ -121,6 +122,7 @@ in {
|
||||||
|
|
||||||
input = {
|
input = {
|
||||||
kb_layout = "de";
|
kb_layout = "de";
|
||||||
|
kb_variant = "nodeadkeys";
|
||||||
follow_mouse = 2;
|
follow_mouse = 2;
|
||||||
numlock_by_default = true;
|
numlock_by_default = true;
|
||||||
repeat_rate = 60;
|
repeat_rate = 60;
|
||||||
|
@ -194,6 +196,14 @@ in {
|
||||||
];
|
];
|
||||||
|
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
|
submap=resize
|
||||||
|
binde=,right,resizeactive,10 0
|
||||||
|
binde=,left,resizeactive,-10 0
|
||||||
|
binde=,up,resizeactive,0 -10
|
||||||
|
binde=,down,resizeactive,0 10
|
||||||
|
bind=,escape,submap,reset
|
||||||
|
submap=reset
|
||||||
|
|
||||||
windowrulev2 = immediate, class:^(cs2)$
|
windowrulev2 = immediate, class:^(cs2)$
|
||||||
|
|
||||||
binds {
|
binds {
|
||||||
|
|
|
@ -0,0 +1,235 @@
|
||||||
|
* {
|
||||||
|
/* `otf-font-awesome` is required to be installed for icons */
|
||||||
|
font-family: "Symbols Nerd Font Mono", "JetBrains Mono";
|
||||||
|
font-size: 13px;
|
||||||
|
transition-duration: .1s;
|
||||||
|
}
|
||||||
|
|
||||||
|
window#waybar {
|
||||||
|
background-color: #000000;
|
||||||
|
border-bottom: 3px solid alpha(#485263, 0.7);
|
||||||
|
color: #ffffff;
|
||||||
|
transition-property: background-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
window#waybar.hidden {
|
||||||
|
opacity: 0.2;
|
||||||
|
}
|
||||||
|
|
||||||
|
button {
|
||||||
|
/* Avoid rounded borders under each button name */
|
||||||
|
border: none;
|
||||||
|
border-radius: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* https://github.com/Alexays/Waybar/wiki/FAQ#the-workspace-buttons-have-a-strange-hover-effect */
|
||||||
|
#clock:hover,
|
||||||
|
#custom-notification:hover,
|
||||||
|
#custom-pickcolor:hover,
|
||||||
|
#custom-scanqr:hover,
|
||||||
|
#wireplumber:hover,
|
||||||
|
#pulseaudio:hover,
|
||||||
|
button:hover {
|
||||||
|
background: inherit;
|
||||||
|
box-shadow: inset 0 -2px alpha(#ffffff, 0.8);
|
||||||
|
}
|
||||||
|
|
||||||
|
#backlight,
|
||||||
|
#battery,
|
||||||
|
#clock,
|
||||||
|
#cpu,
|
||||||
|
#custom-notification,
|
||||||
|
#custom-pickcolor,
|
||||||
|
#custom-scanqr,
|
||||||
|
#disk,
|
||||||
|
#idle_inhibitor,
|
||||||
|
#memory,
|
||||||
|
#mode,
|
||||||
|
#network,
|
||||||
|
#power-profiles-daemon,
|
||||||
|
#privacy-item,
|
||||||
|
#scratchpad,
|
||||||
|
#submap,
|
||||||
|
#temperature,
|
||||||
|
#tray,
|
||||||
|
#wireplumber,
|
||||||
|
#pulseaudio,
|
||||||
|
#workspaces,
|
||||||
|
#mpd {
|
||||||
|
padding: 0 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#cpu,
|
||||||
|
#memory,
|
||||||
|
#wireplumber {
|
||||||
|
min-width: 56px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#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;
|
||||||
|
}
|
||||||
|
|
||||||
|
#submap.resize {
|
||||||
|
background-color: #ffa000;
|
||||||
|
color: #000000;
|
||||||
|
}
|
||||||
|
|
||||||
|
#battery {
|
||||||
|
background-color: #ffffff;
|
||||||
|
color: #000000;
|
||||||
|
}
|
||||||
|
|
||||||
|
#battery.charging,
|
||||||
|
#battery.plugged {
|
||||||
|
background-color: #26A65B;
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes blink {
|
||||||
|
to {
|
||||||
|
background-color: #ffffff;
|
||||||
|
color: #000000;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Using steps() instead of linear as a timing function to limit cpu usage */
|
||||||
|
#battery.critical:not(.charging) {
|
||||||
|
background-color: #e05f65;
|
||||||
|
animation-name: blink;
|
||||||
|
animation-duration: 0.5s;
|
||||||
|
animation-timing-function: steps(12);
|
||||||
|
animation-iteration-count: infinite;
|
||||||
|
animation-direction: alternate;
|
||||||
|
}
|
||||||
|
|
||||||
|
#power-profiles-daemon {
|
||||||
|
padding-right: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#power-profiles-daemon.performance {
|
||||||
|
background-color: #e05f65;
|
||||||
|
}
|
||||||
|
|
||||||
|
#power-profiles-daemon.balanced {
|
||||||
|
background-color: #2980b9;
|
||||||
|
}
|
||||||
|
|
||||||
|
#power-profiles-daemon.power-saver {
|
||||||
|
background-color: #000000;
|
||||||
|
}
|
||||||
|
|
||||||
|
#memory.warning {
|
||||||
|
background-color: #f1c40f;
|
||||||
|
color: #000000;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#memory.critical,
|
||||||
|
#network.disconnected,
|
||||||
|
#pulseaudio.source-muted,
|
||||||
|
#temperature.critical,
|
||||||
|
#wireplumber.muted,
|
||||||
|
#mpd.disconnected {
|
||||||
|
background-color: #e05f65;
|
||||||
|
}
|
||||||
|
|
||||||
|
#tray>.passive {
|
||||||
|
-gtk-icon-effect: dim;
|
||||||
|
}
|
||||||
|
|
||||||
|
#tray>.needs-attention {
|
||||||
|
-gtk-icon-effect: highlight;
|
||||||
|
background-color: #e05f65;
|
||||||
|
}
|
||||||
|
|
||||||
|
#idle_inhibitor {
|
||||||
|
background-color: #2d3436;
|
||||||
|
}
|
||||||
|
|
||||||
|
#idle_inhibitor.activated {
|
||||||
|
background-color: #ecf0f1;
|
||||||
|
color: #2d3436;
|
||||||
|
}
|
||||||
|
|
||||||
|
#mpd.stopped {
|
||||||
|
background-color: #90b1b1;
|
||||||
|
}
|
||||||
|
|
||||||
|
#mpd.paused {
|
||||||
|
background-color: #51a37a;
|
||||||
|
}
|
||||||
|
|
||||||
|
#language {
|
||||||
|
background: #00b093;
|
||||||
|
color: #740864;
|
||||||
|
padding: 0 5px;
|
||||||
|
margin: 0 5px;
|
||||||
|
min-width: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#keyboard-state {
|
||||||
|
padding: 0 0px;
|
||||||
|
margin: 0 5px;
|
||||||
|
min-width: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#keyboard-state>label {
|
||||||
|
padding: 0 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#keyboard-state>label.locked {
|
||||||
|
background: rgba(0, 0, 0, 0.2);
|
||||||
|
}
|
||||||
|
|
||||||
|
#scratchpad {
|
||||||
|
background: rgba(0, 0, 0, 0.2);
|
||||||
|
}
|
||||||
|
|
||||||
|
#scratchpad.empty {
|
||||||
|
background-color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
#privacy-item {
|
||||||
|
padding: 0 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#privacy-item.screenshare {
|
||||||
|
box-shadow: inset 0 -2px #e05f65;
|
||||||
|
}
|
||||||
|
|
||||||
|
#privacy-item.audio-in {
|
||||||
|
box-shadow: inset 0 -2px #78dba9;
|
||||||
|
}
|
||||||
|
|
||||||
|
#privacy-item.audio-out {
|
||||||
|
box-shadow: inset 0 -2px #70a5eb;
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button {
|
||||||
|
padding: 0 5px;
|
||||||
|
background-color: transparent;
|
||||||
|
color: #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button.visible {
|
||||||
|
background-color: #2770de;
|
||||||
|
box-shadow: inset 0 -2px #70a5eb;
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button.urgent {
|
||||||
|
background-color: #e05f65;
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button:hover {
|
||||||
|
box-shadow: inset 0 -2px #ffffff;
|
||||||
|
}
|
|
@ -1,33 +1,139 @@
|
||||||
{
|
{
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
programs.waybar = {
|
programs.waybar = {
|
||||||
enable = true;
|
enable = true;
|
||||||
style = builtins.readFile ./waybar-style.css;
|
style = builtins.readFile ./waybar-style.css;
|
||||||
settings.main = {
|
settings.main = {
|
||||||
layer = "top";
|
layer = "top";
|
||||||
position = "top";
|
position = "bottom";
|
||||||
height = 30;
|
height = 28;
|
||||||
|
|
||||||
modules-left = ["wlr/workspaces" "wlr/taskbar"];
|
modules-left = [
|
||||||
modules-center = ["hyprland/window"];
|
"hyprland/workspaces"
|
||||||
modules-right = ["network" "clock" "bluetooth" "cpu" "memory" "tray"];
|
"tray"
|
||||||
|
"hyprland/submap"
|
||||||
|
"privacy"
|
||||||
|
];
|
||||||
|
modules-center = [
|
||||||
|
"hyprland/window"
|
||||||
|
];
|
||||||
|
modules-right = [
|
||||||
|
"custom/scanqr"
|
||||||
|
"custom/pickcolor"
|
||||||
|
#"custom/screencast"
|
||||||
|
#"custom/gpuscreenrecorder"
|
||||||
|
|
||||||
"wlr/workspaces" = {
|
#SPACER
|
||||||
format = "{icon}";
|
|
||||||
on-click = "activate";
|
#"brightness"
|
||||||
format-icons = {
|
"pulseaudio#source"
|
||||||
urgent = "";
|
"wireplumber"
|
||||||
|
|
||||||
|
"network"
|
||||||
|
"bluetooth"
|
||||||
|
|
||||||
|
#"temps"
|
||||||
|
"cpu"
|
||||||
|
"memory"
|
||||||
|
#"battery"
|
||||||
|
|
||||||
|
"custom/notification"
|
||||||
|
"clock"
|
||||||
|
];
|
||||||
|
|
||||||
|
"custom/scanqr" = {
|
||||||
|
tooltip = false;
|
||||||
|
format = "";
|
||||||
|
on-click = lib.getExe pkgs.scripts.screenshot-area-scan-qr;
|
||||||
};
|
};
|
||||||
sort-by-number = true;
|
|
||||||
all-outputs = true;
|
"custom/pickcolor" = {
|
||||||
|
tooltip = false;
|
||||||
|
format = "";
|
||||||
|
on-click = "${lib.getExe pkgs.hyprpicker} --autocopy";
|
||||||
|
};
|
||||||
|
|
||||||
|
"custom/notification" = {
|
||||||
|
tooltip = false;
|
||||||
|
format = "{icon} {}";
|
||||||
|
format-icons = {
|
||||||
|
notification = "<span foreground='red'><sup></sup></span>";
|
||||||
|
none = "";
|
||||||
|
dnd-notification = "<span foreground='red'><sup></sup></span>";
|
||||||
|
dnd-none = "";
|
||||||
|
inhibited-notification = "<span foreground='red'><sup></sup></span>";
|
||||||
|
inhibited-none = "";
|
||||||
|
dnd-inhibited-notification = "<span foreground='red'><sup></sup></span>";
|
||||||
|
dnd-inhibited-none = "";
|
||||||
|
};
|
||||||
|
return-type = "json";
|
||||||
|
exec = "swaync-client -swb";
|
||||||
|
on-click = "swaync-client -t -sw";
|
||||||
|
on-click-right = "swaync-client -d -sw";
|
||||||
|
on-click-middle = "swaync-client --close-all";
|
||||||
|
escape = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
privacy = {
|
||||||
|
icon-spacing = 4;
|
||||||
|
icon-size = 18;
|
||||||
|
transition-duration = 250;
|
||||||
|
modules = [
|
||||||
|
{
|
||||||
|
type = "screenshare";
|
||||||
|
tooltip = true;
|
||||||
|
tooltip-icon-size = 24;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
type = "audio-out";
|
||||||
|
tooltip = true;
|
||||||
|
tooltip-icon-size = 24;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
type = "audio-in";
|
||||||
|
tooltip = true;
|
||||||
|
tooltip-icon-size = 24;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
wireplumber = {
|
||||||
|
format = "<tt>{icon} {volume}%</tt>";
|
||||||
|
format-muted = "<tt> {volume}%</tt>";
|
||||||
|
format-icons = ["" ""];
|
||||||
|
on-click = "hyprctl dispatch exec \"[float;pin;move 80% 50%;size 20% 50%;noborder]\" ${lib.getExe pkgs.pwvucontrol}";
|
||||||
|
on-click-middle = "${pkgs.wireplumber}/bin/wpctl set-volume @DEFAULT_AUDIO_SINK@ 100%";
|
||||||
|
on-click-right = "${pkgs.wireplumber}/bin/wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle";
|
||||||
|
};
|
||||||
|
|
||||||
|
"pulseaudio#source" = {
|
||||||
|
format = "{format_source}";
|
||||||
|
format-source = "<tt> {volume}%</tt>";
|
||||||
|
format-source-muted = "<tt> {volume}%</tt>";
|
||||||
|
on-click = "${lib.getExe pkgs.helvum}";
|
||||||
|
on-click-middle = "${pkgs.wireplumber}/bin/wpctl set-volume @DEFAULT_AUDIO_SOURCE@ 100%";
|
||||||
|
on-click-right = "${pkgs.wireplumber}/bin/wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle";
|
||||||
|
on-scroll-up = "${pkgs.wireplumber}/bin/wpctl set-volume @DEFAULT_AUDIO_SOURCE@ 1%+";
|
||||||
|
on-scroll-down = "${pkgs.wireplumber}/bin/wpctl set-volume @DEFAULT_AUDIO_SOURCE@ 1%-";
|
||||||
|
};
|
||||||
|
|
||||||
|
"hyprland/workspaces" = {
|
||||||
|
format = "{icon}";
|
||||||
|
format-icons.urgent = "";
|
||||||
|
all-outputs = false;
|
||||||
|
sort-by = "id";
|
||||||
};
|
};
|
||||||
|
|
||||||
clock = {
|
clock = {
|
||||||
format = "{:%H:%M}";
|
format = "{:%H:%M}";
|
||||||
format-alt = "{:%A, %B %d, %Y (%R)}";
|
format-alt = "{:%A, %B %d, %Y (%R)}";
|
||||||
tooltip-format = "<tt><small>{calendar}</small></tt>";
|
tooltip-format = "<tt><span size='16pt' font='JetBrains Mono'>{calendar}</span></tt>";
|
||||||
calendar = {
|
calendar = {
|
||||||
mode = "year";
|
mode = "year";
|
||||||
mode-mon-col = 3;
|
mode-mon-col = 4;
|
||||||
weeks-pos = "right";
|
weeks-pos = "right";
|
||||||
on-scroll = 1;
|
on-scroll = 1;
|
||||||
on-click-right = "mode";
|
on-click-right = "mode";
|
||||||
|
@ -36,7 +142,7 @@
|
||||||
days = "<span color='#ecc6d9'><b>{}</b></span>";
|
days = "<span color='#ecc6d9'><b>{}</b></span>";
|
||||||
weeks = "<span color='#99ffdd'><b>W{}</b></span>";
|
weeks = "<span color='#99ffdd'><b>W{}</b></span>";
|
||||||
weekdays = "<span color='#ffcc66'><b>{}</b></span>";
|
weekdays = "<span color='#ffcc66'><b>{}</b></span>";
|
||||||
today = "<span color='#ff6699'><b><u>{}</u></b></span>";
|
today = "<span bgcolor='#ff6699' color='#000000'><b><u>{}</u></b></span>";
|
||||||
};
|
};
|
||||||
actions = {
|
actions = {
|
||||||
on-click-right = "mode";
|
on-click-right = "mode";
|
||||||
|
@ -50,9 +156,9 @@
|
||||||
|
|
||||||
network = {
|
network = {
|
||||||
interval = 5;
|
interval = 5;
|
||||||
format-ethernet = " {ipaddr}/{cidr}"; # Icon: ethernet
|
format-ethernet = " {ipaddr}/{cidr}";
|
||||||
format-disconnected = "⚠ Disconnected";
|
format-disconnected = "⚠ Disconnected";
|
||||||
tooltip-format = ": {bandwidthDownBytes} : {bandwidthUpBytes}";
|
tooltip-format = " {bandwidthUpBytes}\n {bandwidthDownBytes}";
|
||||||
};
|
};
|
||||||
|
|
||||||
bluetooth = {
|
bluetooth = {
|
||||||
|
@ -67,7 +173,7 @@
|
||||||
|
|
||||||
memory = {
|
memory = {
|
||||||
interval = 5;
|
interval = 5;
|
||||||
format = " {}%";
|
format = " {percentage}%";
|
||||||
states = {
|
states = {
|
||||||
warning = 70;
|
warning = 70;
|
||||||
critical = 90;
|
critical = 90;
|
||||||
|
@ -76,9 +182,8 @@
|
||||||
|
|
||||||
cpu = {
|
cpu = {
|
||||||
interval = 5;
|
interval = 5;
|
||||||
format = " {icon0} {icon1} {icon2} {icon3} {icon4} {icon5} {icon6} {icon7}";
|
format = " {usage}%";
|
||||||
tooltip-format = "{usage}";
|
tooltip-format = "{usage}";
|
||||||
format-icons = ["▁" "▂" "▃" "▄" "▅" "▆" "▇" "█"];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
tray = {
|
tray = {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue