Added Waybar and Wallpaper Daemon

This commit is contained in:
zuma 2025-02-09 22:05:34 +01:00
parent 62ff6069b9
commit 0b271bc907
5 changed files with 270 additions and 36 deletions

View file

@ -2,7 +2,6 @@
wayland.windowManager.hyprland = {
enable = true;
settings = {
"$mod" = "SUPER"; # Windows key on classic keyboards
@ -22,6 +21,8 @@
"$mod, code:65, exec, rofi -show run"
"$mod, V, toggleFloating"
# Move to workspace
"$mod, code:10, workspace, 1"
"$mod, code:11, workspace, 2"
@ -47,11 +48,19 @@
# Move to adjacent workspaces
"$mod, code:113, workspace, -1"
"$mod, code:114, workspace, +1"
# Function keys
", code:121, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"
", code:122, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-"
", code:123, exec, wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SINK@ 5%+"
", code:198, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle"
", code:232, exec, brightnessctl s 5%-"
", code:233, exec, brightnessctl s 5%+"
];
bindm = [
"$mod, mouse:272, moveWindow"
"$mod, mouse:273, moveWindow"
"$mod, mouse:272, moveactive"
"$mod, mouse:273, resizeactive"
];
cursor = {
@ -122,6 +131,13 @@
gestures = {
workspace_swipe = "on";
};
exec-once = [
# Set Hyprland cursor the same as GTK apps
"hyprctl setcursor \"Bibata-Modern-Classic\" 24"
"swww-daemon"
"waybar"
];
};
};
}

187
commons/programs/waybar.nix Normal file
View file

@ -0,0 +1,187 @@
{ ... }:
{
programs.waybar = {
enable = true;
settings = [
{
layer = "top";
position = "top";
modules-left = [
"hyprland/workspaces"
];
modules-center = [ "hyprland/window" ];
modules-right = [
"custom/exit"
"pulseaudio"
"network"
"battery"
"tray"
"clock"
];
"hyprland/workspaces" = {
format = "{name}";
format-icons = {
default = " ";
active = " ";
urgent = " ";
};
};
"clock" = {
format = '' {:L%H:%M}'';
tooltip = true;
tooltip-format = "<big>{:%A, %d.%B %Y }</big>\n<tt><small>{calendar}</small></tt>";
};
"hyprland/window" = {
max-length = 22;
separate-outputs = false;
icon = true;
icon-size = 18;
};
"network" = {
format-icons = [
"󰤯 "
"󰤟 "
"󰤢 "
"󰤥 "
"󰤨 "
];
format-ethernet = " {bandwidthDownOctets}";
format-wifi = "{icon} {essid}";
format-disconnected = "󰤮 ";
tooltip = true;
tooltip-format = "ip : {ipaddr}\nstrength : {signaldBm}dBm";
on-click = "nm-connection-editor";
};
"tray" = {
spacing = 12;
};
"pulseaudio" = {
format = "{icon} {volume}% {format_source}";
format-bluetooth = "{volume}% {icon} {format_source}";
format-bluetooth-muted = " {icon} {format_source}";
format-muted = " {format_source}";
format-source = " {volume}%";
format-source-muted = " ";
format-icons = {
headphone = " ";
hands-free = " ";
headset = " ";
phone = " ";
portable = " ";
car = " ";
default = [
" "
" "
" "
];
};
on-click = "pavucontrol";
};
"custom/exit" = {
tooltip = false;
format = " ";
on-click = "shutdown now";
};
"battery" = {
states = {
warning = 30;
critical = 15;
};
format = "{icon} {capacity}%";
format-charging = "󰂄 {capacity}%";
format-plugged = "󱘖 {capacity}%";
format-icons = [
"󰁺"
"󰁻"
"󰁼"
"󰁽"
"󰁾"
"󰁿"
"󰂀"
"󰂁"
"󰂂"
"󰁹"
];
tooltip = false;
};
}
];
style = ''
* {
border: none;
font-family: Ubuntu Nerd Font;
font-size: 13px;
border-radius: 0px;
background: transparent;
min-height: 0px;
color: white;
}
tooltip {
color: white;
background: black;
}
window#waybar {
margin: 5px 0 0 0;
background: linear-gradient(180deg, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 100%);
color: black;
}
#window {
font-weight: bold;
}
#workspaces button {
padding: 0 5px;
background: transparent;
color: white;
border-top: 2px solid transparent;
}
#workspaces button.focused {
background: #64727D;
border-bottom: 3px solid white;
}
#workspaces button.active {
border-bottom: 1px solid white;
}
#clock, #battery, #network, #pulseaudio, #tray {
padding: 0 3px;
margin: 0 2px;
}
#clock {
font-weight: bold;
}
#battery {
}
#battery.charging {
}
#cpu {
}
#memory {
}
#network {
}
#pulseaudio {
}
#pulseaudio.muted {
}
#tray {
}
'';
};
}

View file

@ -4,6 +4,7 @@
enableCompletion = true;
shellAliases = {
update = "sudo nixos-rebuild switch --flake /home/zuma/nix_files#t0urn3s0l";
connect-h4ppy = "mosh --ssh=\"ssh -p 72\" globuzma@87.231.223.91";
};
oh-my-zsh = {
enable = true;