Add a mode to force focus a window.
This commit is contained in:
parent
75ac4b91f3
commit
2c27d580f4
@ -262,6 +262,7 @@ in
|
|||||||
./rofimoji.nix
|
./rofimoji.nix
|
||||||
./lockscreen.nix
|
./lockscreen.nix
|
||||||
./screenshot.nix
|
./screenshot.nix
|
||||||
|
./force_focus.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
options.me.swayIncludes = lib.mkOption {
|
options.me.swayIncludes = lib.mkOption {
|
||||||
|
27
nix/configuration/roles/sway/force_focus.nix
Normal file
27
nix/configuration/roles/sway/force_focus.nix
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
|
let
|
||||||
|
force_focus_sway_config = pkgs.writeTextFile {
|
||||||
|
name = "force_focus.conf";
|
||||||
|
text = ''
|
||||||
|
mode "force focus" {
|
||||||
|
bindsym $mod+Shift+Escape fullscreen; mode "default"
|
||||||
|
}
|
||||||
|
bindsym $mod+Shift+f fullscreen; mode "force focus"
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
in
|
||||||
|
{
|
||||||
|
imports = [ ];
|
||||||
|
|
||||||
|
config = lib.mkIf config.me.graphical {
|
||||||
|
me.swayIncludes = [
|
||||||
|
force_focus_sway_config
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user