From f437f448970574de4feddda418014fef3995fbae Mon Sep 17 00:00:00 2001 From: Vinzenz Schroeter Date: Sat, 5 Apr 2025 11:40:13 +0200 Subject: [PATCH] more niri config --- home/vinzenz/default.nix | 1 + home/vinzenz/fuzzel.nix | 31 +++++++++++++++++++++++++++++++ home/vinzenz/niri.nix | 29 ----------------------------- home/vinzenz/swaylock.nix | 21 ++++++++++++++++----- home/vinzenz/waybar.nix | 2 +- 5 files changed, 49 insertions(+), 35 deletions(-) create mode 100644 home/vinzenz/fuzzel.nix diff --git a/home/vinzenz/default.nix b/home/vinzenz/default.nix index 95573f1..59c4747 100644 --- a/home/vinzenz/default.nix +++ b/home/vinzenz/default.nix @@ -25,6 +25,7 @@ home-manager.users.vinzenz.imports = [ ./configuration.nix ./editorconfig.nix + ./fuzzel.nix ./git.nix ./gnome.nix ./niri.nix diff --git a/home/vinzenz/fuzzel.nix b/home/vinzenz/fuzzel.nix new file mode 100644 index 0000000..db700e8 --- /dev/null +++ b/home/vinzenz/fuzzel.nix @@ -0,0 +1,31 @@ +{ pkgs, ... }: +{ + config.programs.fuzzel = { + enable = true; + settings = { + main = { + terminal = "${pkgs.alacritty}/bin/alacritty"; + icon-theme = "Adwaita"; + counter = true; + font = "sans:size=10"; + }; + colors = { + border = "0003B3FF"; + background = "0F0F0FFF"; + text = "657b83ff"; + prompt = "586e75ff"; + placeholder = "93a1a1ff"; + input = "657b83ff"; + match = "cb4b16ff"; + selection = "eee8d5ff"; + selection-text = "586e75ff"; + selection-match = "cb4b16ff"; + counter = "93a1a1ff"; + }; + border = { + radius = 30; + width = 3; + }; + }; + }; +} diff --git a/home/vinzenz/niri.nix b/home/vinzenz/niri.nix index 57c30eb..9c532ee 100644 --- a/home/vinzenz/niri.nix +++ b/home/vinzenz/niri.nix @@ -28,35 +28,6 @@ }; }; - programs.fuzzel = { - enable = true; - settings = { - main = { - terminal = "${pkgs.alacritty}/bin/alacritty"; - icon-theme = "Adwaita"; - counter = true; - font = "sans:size=10"; - }; - colors = { - border = "0003B3FF"; - background = "0F0F0FFF"; - text = "657b83ff"; - prompt = "586e75ff"; - placeholder = "93a1a1ff"; - input = "657b83ff"; - match = "cb4b16ff"; - selection = "eee8d5ff"; - selection-text = "586e75ff"; - selection-match = "cb4b16ff"; - counter = "93a1a1ff"; - }; - border = { - radius = 30; - width = 3; - }; - }; - }; - programs.niri.settings = { input.keyboard.xkb.layout = "de"; diff --git a/home/vinzenz/swaylock.nix b/home/vinzenz/swaylock.nix index 291a90c..9255f04 100644 --- a/home/vinzenz/swaylock.nix +++ b/home/vinzenz/swaylock.nix @@ -25,15 +25,26 @@ services.swayidle = { enable = true; + systemdTarget = "graphical-session.target"; timeouts = [ { - timeout = 60; + timeout = 30; + command = "${config.programs.swaylock.package}/bin/swaylock"; + } + { + timeout = 60 * 10; + command = "${pkgs.systemd}/bin/systemctl suspend"; + } + ]; + events = [ + { + event = "before-sleep"; + command = "${pkgs.playerctl}/bin/playerctl pause; ${config.programs.swaylock.package}/bin/swaylock"; + } + { + event = "lock"; command = "${config.programs.swaylock.package}/bin/swaylock"; } - #{ - # timeout = 90; - # command = "${pkgs.systemd}/bin/systemctl suspend"; - #} ]; }; }; diff --git a/home/vinzenz/waybar.nix b/home/vinzenz/waybar.nix index 0cd0c55..af276ac 100644 --- a/home/vinzenz/waybar.nix +++ b/home/vinzenz/waybar.nix @@ -6,7 +6,6 @@ }: { home.packages = with pkgs; [ - waybar playerctl cava ]; @@ -14,6 +13,7 @@ programs.waybar = { enable = true; systemd.enable = true; + systemd.target = "graphical-session.target"; settings = { mainBar = { layer = "top";