This commit is contained in:
alisceon 2026-01-19 18:22:45 +01:00
parent 03df32095d
commit 6c0aa6cf9b
5 changed files with 73 additions and 67 deletions

View file

@ -1,12 +1,13 @@
{ pkgs, config, hostName, lib, ... }:
let
# execs
uwsm = "${pkgs.uwsm}/bin/uwsm-app --";
swaymsg = "${pkgs.sway}/bin/swaymsg";
lock = "${pkgs.swaylock}/bin/swaylock --daemonize";
term = "${pkgs.kitty}/bin/kitty";
dmenu = "${pkgs.rofi}/bin/rofi -show drun";
notify = "${pkgs.libnotify}/bin/notify-send";
nag = "${pkgs.sway}/bin/swaynag --edge bottom";
dmenu = "${pkgs.rofi-unwrapped}/bin/rofi";
# keybinds
key_mod = "Mod4";
@ -110,11 +111,9 @@
modifier = "${key_mod}";
startup = [
{ command = "systemctl --user start libinput-gestures"; }
{ command = "swaybg -m fill -i /home/alisceon/Pictures/system/bg.png";}
];
bars = [
{ command = "${pkgs.waybar}/bin/waybar"; }
{ command = ''${uwsm} swaybg -m fill -i /home/alisceon/Pictures/system/bg.png'';}
];
bars = [ ];
input = {
"type:touchpad" = {
dwt = "enabled";
@ -196,19 +195,20 @@
"Mod4+space" = ''exec ${notify} -t 2000 "$(xonsh ~/.nixos_config/util/get_xkb.xsh)"'';
"${key_mod}+Shift+r" = "reload";
"${key_mod}+Ctrl+r" = "restart";
"${key_mod}+Escape" = "exec ${nag} -m 'Shutdown options:' -Z 'Power Off' 'systemctl poweroff' -Z 'Reboot' 'systemctl reboot' -Z 'Logout' 'swaymsg exit'";
"${key_mod}+Shift+Backspace" = "exec ${nag} -m 'TuneD profiles:' -Z 'Performance' 'tuned-adm profile accelerator-performance' -Z 'Balanced' 'tuned-adm profile balanced' -Z 'Power Save' 'tuned-adm profile powersave'";
"${key_mod}+Return" = "exec ${term}";
"${key_mod}+Shift+q" = "kill";
"Alt+F4" = "kill";
# Locking and idle
"${key_mod}+L" = "exec ${lock}";
"${key_mod}+Escape" = "exec ${nag} -m 'Shutdown options:' -Z 'Power Off' 'systemctl poweroff' -Z 'Reboot' 'systemctl reboot' -Z 'Logout' 'swaymsg exit'";
# Apps
"${key_mod}+d" = "exec ${dmenu}";
"${key_mod}+Return" = ''exec "${uwsm} ${term}"'';
"${key_mod}+d" = ''exec "${uwsm} ${dmenu} -show drun"'';
#Screenshot region
# Screenshot region
"${key_mod}+Shift+s" = "exec grimshot savecopy area";
"${key_mod}+Ctrl+s" = "exec grimshot savecopy output";
@ -270,14 +270,20 @@
programs = {
rofi = {
enable = true;
package = pkgs.rofi-unwrapped;
terminal = term;
}; # end rofi
waybar = {
enable = true;
systemd = {
enable = true;
target = "graphical-session.target";
};
settings = {
mainBar = {
layer = "bottom";
position = "top";
height = 32;
height = 28;
spacing = 0;
modules-left = [
"sway/workspaces"
@ -291,6 +297,7 @@
"network"
"pulseaudio"
"battery"
"sway/language"
"clock"
];
"sway/workspaces" = {
@ -306,47 +313,59 @@
spacing = 8;
};
"idle_inhibitor" = {
format = "| {icon} ";
format = "| {icon}";
start-activated = true;
format-icons = {
activated = "OuO";
deactivated = "=w=";
activated = "🫨";
deactivated = "😴";
};
};
"sway/language" = {
format = "| {flag}";
};
"clock" = {
interval = 60;
tooltip = true;
format = "| {:%Y-%m-%d %R} ";
format = "| {:%Y-%m-%d %R}";
tooltip-format = "{:%A}";
};
"battery" = {
interval = 60;
format = "| {icon}{capacity}%";
format-charging = "| {icon}{capacity}%";
format-plugged = "| {icon}🔌{capacity}%";
states = {
critical = 10;
warning = 20;
good = 90;
good = 100;
full = 100;
over = 101;
};
interval = 30;
format = "| Bat {capacity}% ";
format-charging = "| Chr {capacity}% ";
format-plugged = "| Plg {capacity}% ";
format-icons = [ "🪫" "🪫" "🔋" "🔋" "🔋"];
};
"network" = {
format-wifi = "| WiFi up ";
format-ethernet = "";
tooltip-format = "{ifname} = {ipaddr}/{cidr}";
format-linked = "| {ifname} (no ip) ";
format-disconnected = "| Disconnected ";
format-alt = "| {essid}: {ipaddr} ";
interval = 10;
format-wifi = "| ";
format-ethernet = "| ";
format-linked = "| 🔗";
format-disconnected = "| 💥";
format-alt = "| {essid}: {ipaddr}";
interval = 15;
};
"pulseaudio" = {
# "scroll-step" = 1; # %; can be a float
format = "| Sound: {volume}% ";
format-muted = "| Sound: x% ";
format = "| 🔊{volume}%";
format-muted = "| 🔈0%";
format-bluetooth = "| 🎧{volume}%";
};
}; # end mainbar
}; # end settings
style = ''
button {
box-shadow: inset 0 -8px transparent;
border: none;
border-radius: 0;
}
''; # end style
}; # end waybar
swaylock = {
enable = true;