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/manual.nix
modules/tig.nix
modules/mako.nix
modules/nm-applet.nix
modules/blueman-applet.nix
../secrets/ssh-config.nix
@ -78,8 +77,6 @@ in
usbutils
pciutils
swaylock
swayidle
brightnessctl
wl-clipboard
sway-contrib.grimshot
@ -132,10 +129,27 @@ in
gtk = {
enable = true;
font.name = "TeX Gyre Adventor 12";
theme = {
name = "Adwaita";
package = pkgs.adwaita-icon-theme;
name = "Juno";
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 = {

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
lockCmd = "${pkgs.swaylock}/bin/swaylock -i /etc/nixos/lockscreen.png";
lockCmd = "${pkgs.gtklock}/bin/gtklock";
in
{
wayland.windowManager.sway = {
@ -89,21 +94,20 @@ in
};
};
bars = [{ command = "${pkgs.waybar}/bin/waybar"; }];
startup = [
{ command = "${pkgs.swaynotificationcenter}/bin/swaync"; }
{
command = ''${pkgs.swayidle}/bin/swayidle -w \
timeout 600 "${lockCmd}" \
timeout 900 "${pkgs.sway}/bin/swaymsg output * dpms off" \
resume "${pkgs.sway}/bin/swaymsg output * dpms on" \
before-sleep "${lockCmd}"'';
command = ''
${pkgs.swayidle}/bin/swayidle -w \
timeout 600 "${lockCmd}" \
timeout 900 "${pkgs.sway}/bin/swaymsg output * dpms off" \
resume "${pkgs.sway}/bin/swaymsg output * dpms on" \
before-sleep "${lockCmd}"'';
}
];
keybindings =
let
mod = "Mod4";
@ -112,13 +116,14 @@ in
in
{
"${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+q" = "kill";
"${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'";
"${mod}+x" = "move workspace to output right";
"${mod}+n" = "exec ${pkgs.swaynotificationcenter}/bin/swaync-client -t";
"${mod}+h" = "focus left";
"${mod}+j" = "focus down";
@ -165,14 +170,11 @@ in
# Print, Pause, AudioRaiseVolume
"Print" = "exec grimshot save area";
"Pause" = "exec systemctl suspend";
"XF86AudioRaiseVolume" =
"exec ${pactl} set-sink-volume @DEFAULT_SINK@ +5%";
"XF86AudioRaiseVolume" = "exec ${pactl} set-sink-volume @DEFAULT_SINK@ +5%";
# Tools, AudioMute, AudioLowerVolume
"XF86Tools" = "exec ${lockCmd}";
"XF86AudioMute" =
"exec ${pactl} set-sink-mute @DEFAULT_SINK@ toggle";
"XF86AudioLowerVolume" =
"exec ${pactl} set-sink-volume @DEFAULT_SINK@ -5%";
"XF86AudioMute" = "exec ${pactl} set-sink-mute @DEFAULT_SINK@ toggle";
"XF86AudioLowerVolume" = "exec ${pactl} set-sink-volume @DEFAULT_SINK@ -5%";
# AudioPrev, AudioPlay, AudioNext
"XF86AudioNext" = "exec ${playerctl} next";

View file

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