sway: Some eyecandy

- new icontheme
- Sway notification center instead of mako
- gtklock instead of swaylock
- nwg-drawer instead of wofi
This commit is contained in:
fleaz 2025-02-18 22:16:36 +01:00
parent 5b3e6d859b
commit 3d77759129
No known key found for this signature in database
GPG key ID: 935474624265FE8F
4 changed files with 40 additions and 36 deletions

View file

@ -27,7 +27,6 @@ in
modules/foot.nix modules/foot.nix
modules/manual.nix modules/manual.nix
modules/tig.nix modules/tig.nix
modules/mako.nix
modules/nm-applet.nix modules/nm-applet.nix
modules/blueman-applet.nix modules/blueman-applet.nix
../secrets/ssh-config.nix ../secrets/ssh-config.nix
@ -78,8 +77,6 @@ in
usbutils usbutils
pciutils pciutils
swaylock
swayidle
brightnessctl brightnessctl
wl-clipboard wl-clipboard
sway-contrib.grimshot sway-contrib.grimshot
@ -132,10 +129,27 @@ in
gtk = { gtk = {
enable = true; enable = true;
font.name = "TeX Gyre Adventor 12";
theme = { theme = {
name = "Adwaita"; name = "Juno";
package = pkgs.adwaita-icon-theme; package = pkgs.juno-theme;
}; };
iconTheme = {
name = "Papirus-Dark";
package = pkgs.papirus-icon-theme;
};
gtk3.extraConfig = {
Settings = ''
gtk-application-prefer-dark-theme=1
'';
};
gtk4.extraConfig = {
Settings = ''
gtk-application-prefer-dark-theme=1
'';
};
}; };
xdg = { xdg = {

View file

@ -1,14 +0,0 @@
{
services.mako = {
enable = true;
groupBy = "app-name";
defaultTimeout = 5000;
extraConfig = ''
font=Inconsolata 10
background-color=#1d2021
border-color=#ebdbb2
border-radius=10
text-color=#ebdbb2
'';
};
}

View file

@ -1,6 +1,11 @@
{ pkgs, nixosConfig, lib, ... }: {
pkgs,
nixosConfig,
lib,
...
}:
let let
lockCmd = "${pkgs.swaylock}/bin/swaylock -i /etc/nixos/lockscreen.png"; lockCmd = "${pkgs.gtklock}/bin/gtklock";
in in
{ {
wayland.windowManager.sway = { wayland.windowManager.sway = {
@ -89,21 +94,20 @@ in
}; };
}; };
bars = [{ command = "${pkgs.waybar}/bin/waybar"; }]; bars = [{ command = "${pkgs.waybar}/bin/waybar"; }];
startup = [ startup = [
{ command = "${pkgs.swaynotificationcenter}/bin/swaync"; }
{ {
command = ''${pkgs.swayidle}/bin/swayidle -w \ command = ''
timeout 600 "${lockCmd}" \ ${pkgs.swayidle}/bin/swayidle -w \
timeout 900 "${pkgs.sway}/bin/swaymsg output * dpms off" \ timeout 600 "${lockCmd}" \
resume "${pkgs.sway}/bin/swaymsg output * dpms on" \ timeout 900 "${pkgs.sway}/bin/swaymsg output * dpms off" \
before-sleep "${lockCmd}"''; resume "${pkgs.sway}/bin/swaymsg output * dpms on" \
before-sleep "${lockCmd}"'';
} }
]; ];
keybindings = keybindings =
let let
mod = "Mod4"; mod = "Mod4";
@ -112,13 +116,14 @@ in
in in
{ {
"${mod}+Return" = "exec foot"; "${mod}+Return" = "exec foot";
"${mod}+p" = "exec ${pkgs.wofi}/bin/wofi --show drun --gtk-dark"; "${mod}+p" = "exec ${pkgs.nwg-drawer}/bin/nwg-drawer";
"${mod}+Shift+c" = "reload"; "${mod}+Shift+c" = "reload";
"${mod}+Shift+q" = "kill"; "${mod}+Shift+q" = "kill";
"${mod}+Shift+e" = "${mod}+Shift+e" =
"exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -b 'Yes, exit sway' 'swaymsg exit'"; "exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -b 'Yes, exit sway' 'swaymsg exit'";
"${mod}+x" = "move workspace to output right"; "${mod}+x" = "move workspace to output right";
"${mod}+n" = "exec ${pkgs.swaynotificationcenter}/bin/swaync-client -t";
"${mod}+h" = "focus left"; "${mod}+h" = "focus left";
"${mod}+j" = "focus down"; "${mod}+j" = "focus down";
@ -165,14 +170,11 @@ in
# Print, Pause, AudioRaiseVolume # Print, Pause, AudioRaiseVolume
"Print" = "exec grimshot save area"; "Print" = "exec grimshot save area";
"Pause" = "exec systemctl suspend"; "Pause" = "exec systemctl suspend";
"XF86AudioRaiseVolume" = "XF86AudioRaiseVolume" = "exec ${pactl} set-sink-volume @DEFAULT_SINK@ +5%";
"exec ${pactl} set-sink-volume @DEFAULT_SINK@ +5%";
# Tools, AudioMute, AudioLowerVolume # Tools, AudioMute, AudioLowerVolume
"XF86Tools" = "exec ${lockCmd}"; "XF86Tools" = "exec ${lockCmd}";
"XF86AudioMute" = "XF86AudioMute" = "exec ${pactl} set-sink-mute @DEFAULT_SINK@ toggle";
"exec ${pactl} set-sink-mute @DEFAULT_SINK@ toggle"; "XF86AudioLowerVolume" = "exec ${pactl} set-sink-volume @DEFAULT_SINK@ -5%";
"XF86AudioLowerVolume" =
"exec ${pactl} set-sink-volume @DEFAULT_SINK@ -5%";
# AudioPrev, AudioPlay, AudioNext # AudioPrev, AudioPlay, AudioNext
"XF86AudioNext" = "exec ${playerctl} next"; "XF86AudioNext" = "exec ${playerctl} next";

View file

@ -3,6 +3,8 @@
programs.sway.enable = true; programs.sway.enable = true;
programs.sway.package = null; programs.sway.package = null;
security.pam.services.gtklock = {};
# autologin # autologin
services.greetd = { services.greetd = {
enable = true; enable = true;