niri: move back to swayidle
This commit is contained in:
@@ -236,6 +236,9 @@ layout {
|
|||||||
workspace "terminal" {
|
workspace "terminal" {
|
||||||
open-on-output "DP-1"
|
open-on-output "DP-1"
|
||||||
}
|
}
|
||||||
|
workspace "passwords" {
|
||||||
|
open-on-output "DP-1"
|
||||||
|
}
|
||||||
|
|
||||||
workspace "firefox" {
|
workspace "firefox" {
|
||||||
open-on-output "DP-1"
|
open-on-output "DP-1"
|
||||||
@@ -262,7 +265,13 @@ workspace "notes" {
|
|||||||
// This line starts waybar, a commonly used bar for Wayland compositors.
|
// This line starts waybar, a commonly used bar for Wayland compositors.
|
||||||
spawn-at-startup "mako"
|
spawn-at-startup "mako"
|
||||||
spawn-at-startup "waybar"
|
spawn-at-startup "waybar"
|
||||||
spawn-at-startup "hypridle"
|
spawn-at-startup "keepasxc"
|
||||||
|
// spawn-at-startup "hypridle"
|
||||||
|
spawn-at-startup "swayidle" "-w" \
|
||||||
|
"timeout" "300" "sh -c 'pgrep waylock || waylock -init-color 0x000000 -input-color 0x0000ff'" \
|
||||||
|
"timeout" "305" "sh -c 'niri msg action power-off-monitors'" \
|
||||||
|
"resume" "sh -c 'niri msg action power-on-monitors'" \
|
||||||
|
"before-sleep" "sh -c 'pgrep waylock || waylock -init-color 0x000000 -input-color 0x0000ff'"
|
||||||
//spawn-at-startup "noctalia-shell"
|
//spawn-at-startup "noctalia-shell"
|
||||||
|
|
||||||
// Uncomment this line to ask the clients to omit their client-side decorations if possible.
|
// Uncomment this line to ask the clients to omit their client-side decorations if possible.
|
||||||
@@ -321,6 +330,12 @@ window-rule {
|
|||||||
block-out-from "screen-capture"
|
block-out-from "screen-capture"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
window-rule {
|
||||||
|
match app-id="keepasxc"
|
||||||
|
open-floating false
|
||||||
|
block-out-from "screen-capture"
|
||||||
|
}
|
||||||
|
|
||||||
// Example: block out two password managers from screen capture.
|
// Example: block out two password managers from screen capture.
|
||||||
// (This example rule is commented out with a "/-" in front.)
|
// (This example rule is commented out with a "/-" in front.)
|
||||||
/-window-rule {
|
/-window-rule {
|
||||||
@@ -363,13 +378,15 @@ binds {
|
|||||||
// Suggested binds for running programs: terminal, app launcher, screen locker.
|
// Suggested binds for running programs: terminal, app launcher, screen locker.
|
||||||
Mod+return hotkey-overlay-title="Open a Terminal: ghostty" { spawn "ghostty"; }
|
Mod+return hotkey-overlay-title="Open a Terminal: ghostty" { spawn "ghostty"; }
|
||||||
Mod+space hotkey-overlay-title="Run an Application: wofi" { spawn "sh" "-c" "wofi --show dmenu,drun"; }
|
Mod+space hotkey-overlay-title="Run an Application: wofi" { spawn "sh" "-c" "wofi --show dmenu,drun"; }
|
||||||
Mod+Delete hotkey-overlay-title="Lock the Screen: hyprlock" { spawn "hyprlock"; }
|
Mod+Delete hotkey-overlay-title="Lock the Screen: swaylock" { spawn "sh" "-c" "(pgrep swaylock || swaylock -f -c 000000) ; sleep 2 ; niri msg action power-off-monitors"; }
|
||||||
|
|
||||||
|
|
||||||
// You can also use a shell. Do this if you need pipes, multiple commands, etc.
|
// You can also use a shell. Do this if you need pipes, multiple commands, etc.
|
||||||
// Note: the entire command goes as a single argument in the end.
|
// Note: the entire command goes as a single argument in the end.
|
||||||
// Mod+T { spawn "bash" "-c" "notify-send hello && exec wezterm"; }
|
// Mod+T { spawn "bash" "-c" "notify-send hello && exec wezterm"; }
|
||||||
|
|
||||||
Ctrl+Alt+W { spawn "firefox" "--ProfileManager"; }
|
Ctrl+Alt+W { spawn "firefox" "-P" "Work"; }
|
||||||
|
Ctrl+Alt+E { spawn "firefox" "--ProfileManager"; }
|
||||||
Ctrl+Alt+Q { spawn "chromium-browser" "--ozone-platform=wayland"; }
|
Ctrl+Alt+Q { spawn "chromium-browser" "--ozone-platform=wayland"; }
|
||||||
|
|
||||||
// Brightness control
|
// Brightness control
|
||||||
@@ -494,6 +511,7 @@ binds {
|
|||||||
Mod+2 { focus-workspace "firefox"; }
|
Mod+2 { focus-workspace "firefox"; }
|
||||||
Mod+3 { focus-workspace "notes"; }
|
Mod+3 { focus-workspace "notes"; }
|
||||||
Mod+4 { focus-workspace "agents"; }
|
Mod+4 { focus-workspace "agents"; }
|
||||||
|
Mod+p { focus-workspace "passwords"; }
|
||||||
//Mod+5 { focus-workspace "5"; }
|
//Mod+5 { focus-workspace "5"; }
|
||||||
//Mod+6 { focus-workspace "6"; }
|
//Mod+6 { focus-workspace "6"; }
|
||||||
//Mod+7 { focus-workspace "7"; }
|
//Mod+7 { focus-workspace "7"; }
|
||||||
@@ -505,6 +523,7 @@ binds {
|
|||||||
Mod+Ctrl+2 { move-column-to-workspace "firefox"; }
|
Mod+Ctrl+2 { move-column-to-workspace "firefox"; }
|
||||||
Mod+Ctrl+3 { move-column-to-workspace "notes"; }
|
Mod+Ctrl+3 { move-column-to-workspace "notes"; }
|
||||||
Mod+Ctrl+4 { move-column-to-workspace "agents"; }
|
Mod+Ctrl+4 { move-column-to-workspace "agents"; }
|
||||||
|
Mod+Ctrl+p { move-column-to-workspace "passwords"; }
|
||||||
//Mod+Ctrl+5 { move-column-to-workspace "5"; }
|
//Mod+Ctrl+5 { move-column-to-workspace "5"; }
|
||||||
//Mod+Ctrl+6 { move-column-to-workspace "6"; }
|
//Mod+Ctrl+6 { move-column-to-workspace "6"; }
|
||||||
//Mod+Ctrl+7 { move-column-to-workspace "7"; }
|
//Mod+Ctrl+7 { move-column-to-workspace "7"; }
|
||||||
|
|||||||
11
niri/.config/swayidle/config
Normal file
11
niri/.config/swayidle/config
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
# 1. Dim the screens first (after 4.5 minutes)
|
||||||
|
timeout 270 'niri msg action power-off-monitors' resume 'niri msg action power-on-monitors'
|
||||||
|
|
||||||
|
# 2. Lock the screen (after 5 minutes)
|
||||||
|
timeout 300 'hyprlock'
|
||||||
|
|
||||||
|
# 3. Turn off screens immediately if already locked (failsafe)
|
||||||
|
timeout 310 'niri msg action power-off-monitors' resume 'niri msg action power-on-monitors'
|
||||||
|
|
||||||
|
# 4. Lock immediately before the computer goes to sleep/suspend
|
||||||
|
before-sleep 'hyprlock'
|
||||||
Reference in New Issue
Block a user