summaryrefslogtreecommitdiff
path: root/hm/env
diff options
context:
space:
mode:
authoradikro <adikro@disroot.org>2026-01-08 17:15:02 +0100
committeradikro <adikro@disroot.org>2026-01-08 17:15:02 +0100
commit6fc5210d51c630dd944d3050328a784b4ece81ba (patch)
tree0c0759cccefe64fd7d1a00a95919a4e315934b73 /hm/env
parentdf6d72246bfe33f6f04617c201d45e2f92689560 (diff)
changed pc to stable drivers, updated amdgpu drivers and reverted to older kernel version, added swaylock and swayidle, revamped screenshots and niri keybinds
Diffstat (limited to 'hm/env')
-rw-r--r--hm/env/niri/binds.nix56
-rw-r--r--hm/env/niri/niri.nix10
-rw-r--r--hm/env/swayidle.nix15
3 files changed, 55 insertions, 26 deletions
diff --git a/hm/env/niri/binds.nix b/hm/env/niri/binds.nix
index 3cfce88..df5e34d 100644
--- a/hm/env/niri/binds.nix
+++ b/hm/env/niri/binds.nix
@@ -2,6 +2,7 @@
with config.lib.niri.actions;
let
playerctl = spawn "${pkgs.playerctl}/bin/playerctl";
+ ss = "/media/pics/ss/$(date +%Y-%m-%d_%H-%M-%S)";
in
{
"Mod+O" = {
@@ -11,20 +12,18 @@ in
"Mod+Slash".action = show-hotkey-overlay;
# Audio
- XF86AudioRaiseVolume.action = playerctl "volume" "0.02+";
- XF86AudioLowerVolume.action = playerctl "volume" "0.02-";
+ XF86AudioRaiseVolume.action = playerctl "volume" "0.03+";
+ XF86AudioLowerVolume.action = playerctl "volume" "0.03-";
# microphone
- XF86AudioMute.action = spawn "wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle";
- # headphones
- "Mod+XF86AudioMute".action = spawn "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle";
-
- "Super+Shift+L" = {
- allow-when-locked = true;
+ XF86AudioMute.action = spawn "wpctl" "set-mute" "@DEFAULT_AUDIO_SOURCE@" "toggle";
+ # # headphones
+ "Mod+XF86AudioMute".
action = spawn "sh" "-c" ''
wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle && \
wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle
'';
- };
+
+ "Super+Shift+L".action = spawn "swaylock" "-f";
# Media keys
XF86AudioPlay.action = playerctl "play-pause";
XF86AudioPrev.action = playerctl "previous";
@@ -43,20 +42,19 @@ in
"Mod+Shift+P".action = power-off-monitors;
"Mod+W".action = toggle-column-tabbed-display;
- "Mod+S".action = spawn "sh" "-c"
- ''
- filename="/media/pics/ss/$(date +%Y-%m-%d_%H-%M-%S).png"
- grim -g "$(slurp)" - | tee "$filename" | wl-copy
- '';
-
- "Mod+Shift+S".action = spawn "sh" "-c"
- ''
- filename="/media/pics/ss/$(date +%Y-%m-%d_%H-%M-%S).png"
- grim -g "$(slurp)" "$filename"
-
- edited="/media/pics/ss/$(date +%Y-%m-%d_%H-%M-%S)-edited.png"
- satty --filename "$filename" --output-filename "$edited"
- '';
+ "Mod+S" = {
+ action = spawn "sh" "-c" ''
+ grim -g "$(slurp)" - | tee ${ss}.png | wl-copy
+ '';
+ repeat = false;
+ };
+ "Mod+Shift+S" = {
+ action = spawn "sh" "-c" ''
+ grim -g "$(slurp)" ${ss}.png
+ satty --filename "${ss}.png" --output-filename "${ss}-edited.png"
+ '';
+ repeat = false;
+ };
"Mod+Shift+D".action = spawn "sh" "-c"
''
@@ -69,7 +67,17 @@ in
"Mod+C".action = spawn "qalculate-gtk";
"Mod+BracketLeft".action = consume-or-expel-window-left;
"Mod+BracketRight".action = consume-or-expel-window-right;
- "Super+L".action = spawn "swaylock";
+
+ "XF86Tools" = {
+ action = spawn "sh" "-c" ''
+ pkill -9 firefox || true
+ swaylock -f
+ wpctl set-mute @DEFAULT_AUDIO_SINK@ 1
+ wpctl set-mute @DEFAULT_AUDIO_SOURCE@ 1
+ niri msg action power-off-monitors
+ '';
+ repeat = false;
+ };
"Mod+R".action = switch-preset-column-width;
"Mod+Shift+R".action = reset-window-height;
diff --git a/hm/env/niri/niri.nix b/hm/env/niri/niri.nix
index fbbb5f2..577e52c 100644
--- a/hm/env/niri/niri.nix
+++ b/hm/env/niri/niri.nix
@@ -53,7 +53,7 @@ in
cursor = {
hide-when-typing = true;
size = 48;
- theme = "Hoshimi_Miyabi";
+ theme = "miyabi";
};
layout = {
empty-workspace-above-first = true;
@@ -81,6 +81,14 @@ in
position = "top";
};
};
+ window-rules = [
+ {
+ matches = [
+ { app-id = "Bitwarden"; }
+ ];
+ block-out-from = "screen-capture";
+ }
+ ];
gestures.hot-corners.enable = false;
spawn-at-startup = [
{ command = [ "${lib.getExe pkgs.xwayland-satellite}" ]; }
diff --git a/hm/env/swayidle.nix b/hm/env/swayidle.nix
index 41f64a2..1d703cc 100644
--- a/hm/env/swayidle.nix
+++ b/hm/env/swayidle.nix
@@ -1,4 +1,4 @@
-{ config, lib, ... }:
+{ config, lib, pkgs, ... }:
let
cfg = config.hm.env.swayidle;
in
@@ -7,6 +7,19 @@ in
config = lib.mkIf cfg.enable {
services.swayidle = {
enable = true;
+ systemdTarget = "graphical-session.target";
+ events = {
+ before-sleep = "${pkgs.swaylock-effects}/bin/swaylock -f";
+ lock = "${pkgs.swaylock-effects}/bin/swaylock -f";
+ };
+ timeouts = [
+ { timeout = 300; command = "${pkgs.swaylock-effects}/bin/swaylock -f"; }
+ {
+ timeout = 600;
+ command = "${pkgs.niri-unstable}/bin/niri msg action power-off-monitors";
+ resumeCommand = "${pkgs.niri-unstable}/bin/niri msg action power-on-monitors";
+ }
+ ];
};
};
}