presentation: Split out
This commit is contained in:
parent
c1d8bc65af
commit
1b008c1ae8
|
@ -11,6 +11,7 @@ in
|
|||
./i3.nix
|
||||
./lock
|
||||
./mpd
|
||||
./presentation
|
||||
./qutebrowser.nix
|
||||
./screenshots
|
||||
];
|
||||
|
|
|
@ -161,9 +161,6 @@ in
|
|||
hideEdgeBorders = "both";
|
||||
titlebar = false; # So that single-container screens are basically almost fullscreen
|
||||
commands = [
|
||||
# Open specific applications in floating mode
|
||||
{ criteria = { title = "^pdfpc.*"; window_role = "presenter"; }; command = "move to output left, fullscreen"; }
|
||||
{ criteria = { title = "^pdfpc.*"; window_role = "presentation"; }; command = "move to output right, fullscreen"; }
|
||||
# switch to workspace with urgent window automatically
|
||||
{ criteria = { urgent = "latest"; }; command = "focus"; }
|
||||
];
|
||||
|
@ -196,62 +193,39 @@ in
|
|||
in
|
||||
forEachWorkspace ({ w, workspace }: { output = builtins.elemAt x11_screens (lib.mod w (builtins.length x11_screens)); workspace = workspace.name; });
|
||||
};
|
||||
frogeye.desktop.i3.bindmodes =
|
||||
let
|
||||
mode_pres_main = "Presentation (main display)";
|
||||
mode_pres_sec = "Presentation (secondary display)";
|
||||
in
|
||||
{
|
||||
"Resize" = {
|
||||
bindings = {
|
||||
"h" = "resize shrink width 10 px or 10 ppt; ${focus}";
|
||||
"j" = "resize grow height 10 px or 10 ppt; ${focus}";
|
||||
"k" = "resize shrink height 10 px or 10 ppt; ${focus}";
|
||||
"l" = "resize grow width 10 px or 10 ppt; ${focus}";
|
||||
};
|
||||
mod_enter = "r";
|
||||
};
|
||||
"[L] Vérouillage [E] Déconnexion [S] Veille [H] Hibernation [R] Redémarrage [P] Extinction" = {
|
||||
bindings = {
|
||||
"l" = "exec --no-startup-id exec xlock, mode default";
|
||||
"e" = "exit, mode default";
|
||||
"s" = "exec --no-startup-id exec xlock & ${pkgs.systemd}/bin/systemctl suspend --check-inhibitors=no, mode default";
|
||||
"h" = "exec --no-startup-id exec xlock & ${pkgs.systemd}/bin/systemctl hibernate, mode default";
|
||||
"r" = "exec --no-startup-id ${pkgs.systemd}/bin/systemctl reboot, mode default";
|
||||
"p" = "exec --no-startup-id ${pkgs.systemd}/bin/systemctl poweroff -i, mode default";
|
||||
};
|
||||
mod_enter = "Escape";
|
||||
};
|
||||
"${mode_pres_main}" = {
|
||||
mod_enter = "Shift+p";
|
||||
bindings = {
|
||||
"b" = "workspace 3, workspace 4, mode ${mode_pres_sec}";
|
||||
"q" = "mode default";
|
||||
"Return" = "mode default";
|
||||
};
|
||||
return_bindings = false;
|
||||
};
|
||||
"${mode_pres_sec}" = {
|
||||
mod_enter = "Shift+p+2"; # Bogus, just so I don't have to implement no binding
|
||||
bindings = {
|
||||
"b" = "workspace 1, workspace 2, mode ${mode_pres_main}";
|
||||
"q" = "mode default";
|
||||
"Return" = "mode default";
|
||||
};
|
||||
return_bindings = false;
|
||||
};
|
||||
"Temperature [R] Red [D] Dust storm [C] Campfire [O] Normal [A] All nighter [B] Blue" = {
|
||||
bindings = {
|
||||
"r" = "exec ${pkgs.sct}/bin/sct 1000";
|
||||
"d" = "exec ${pkgs.sct}/bin/sct 2000";
|
||||
"c" = "exec ${pkgs.sct}/bin/sct 4500";
|
||||
"o" = "exec ${pkgs.sct}/bin/sct";
|
||||
"a" = "exec ${pkgs.sct}/bin/sct 8000";
|
||||
"b" = "exec ${pkgs.sct}/bin/sct 10000";
|
||||
};
|
||||
mod_enter = "y";
|
||||
frogeye.desktop.i3.bindmodes = {
|
||||
"Resize" = {
|
||||
bindings = {
|
||||
"h" = "resize shrink width 10 px or 10 ppt; ${focus}";
|
||||
"j" = "resize grow height 10 px or 10 ppt; ${focus}";
|
||||
"k" = "resize shrink height 10 px or 10 ppt; ${focus}";
|
||||
"l" = "resize grow width 10 px or 10 ppt; ${focus}";
|
||||
};
|
||||
mod_enter = "r";
|
||||
};
|
||||
"[L] Vérouillage [E] Déconnexion [S] Veille [H] Hibernation [R] Redémarrage [P] Extinction" = {
|
||||
bindings = {
|
||||
"l" = "exec --no-startup-id exec xlock, mode default";
|
||||
"e" = "exit, mode default";
|
||||
"s" = "exec --no-startup-id exec xlock & ${pkgs.systemd}/bin/systemctl suspend --check-inhibitors=no, mode default";
|
||||
"h" = "exec --no-startup-id exec xlock & ${pkgs.systemd}/bin/systemctl hibernate, mode default";
|
||||
"r" = "exec --no-startup-id ${pkgs.systemd}/bin/systemctl reboot, mode default";
|
||||
"p" = "exec --no-startup-id ${pkgs.systemd}/bin/systemctl poweroff -i, mode default";
|
||||
};
|
||||
mod_enter = "Escape";
|
||||
};
|
||||
"Temperature [R] Red [D] Dust storm [C] Campfire [O] Normal [A] All nighter [B] Blue" = {
|
||||
bindings = {
|
||||
"r" = "exec ${pkgs.sct}/bin/sct 1000";
|
||||
"d" = "exec ${pkgs.sct}/bin/sct 2000";
|
||||
"c" = "exec ${pkgs.sct}/bin/sct 4500";
|
||||
"o" = "exec ${pkgs.sct}/bin/sct";
|
||||
"a" = "exec ${pkgs.sct}/bin/sct 8000";
|
||||
"b" = "exec ${pkgs.sct}/bin/sct 10000";
|
||||
};
|
||||
mod_enter = "y";
|
||||
};
|
||||
};
|
||||
};
|
||||
options = {
|
||||
frogeye.desktop.i3.bindmodes = lib.mkOption {
|
||||
|
|
39
hm/desktop/presentation/default.nix
Normal file
39
hm/desktop/presentation/default.nix
Normal file
|
@ -0,0 +1,39 @@
|
|||
# Dual-screen presenting for slideshows and stuff.
|
||||
# Not tested since Nix.
|
||||
# Config mentions pdfpc, although the last thing I used was Impressive, even made patches to it.
|
||||
# UPST Add Impressive to nixpkgs
|
||||
{ pkgs, lib, config, ... }:
|
||||
let
|
||||
mode_pres_main = "Presentation (main display)";
|
||||
mode_pres_sec = "Presentation (secondary display)";
|
||||
in
|
||||
{
|
||||
config = lib.mkIf config.frogeye.desktop.xorg {
|
||||
frogeye.desktop.i3.bindmodes = {
|
||||
"${mode_pres_main}" = {
|
||||
mod_enter = "Shift+p";
|
||||
bindings = {
|
||||
"b" = "workspace 3, workspace 4, mode ${mode_pres_sec}";
|
||||
"q" = "mode default";
|
||||
"Return" = "mode default";
|
||||
};
|
||||
return_bindings = false;
|
||||
};
|
||||
"${mode_pres_sec}" = {
|
||||
mod_enter = "Shift+p+2"; # Bogus, just so I don't have to implement no binding
|
||||
bindings = {
|
||||
"b" = "workspace 1, workspace 2, mode ${mode_pres_main}";
|
||||
"q" = "mode default";
|
||||
"Return" = "mode default";
|
||||
};
|
||||
return_bindings = false;
|
||||
};
|
||||
};
|
||||
xsession.windowManager.i3.config.window.commands = [
|
||||
# Open specific applications in floating mode
|
||||
{ criteria = { title = "^pdfpc.*"; window_role = "presenter"; }; command = "move to output left, fullscreen"; }
|
||||
{ criteria = { title = "^pdfpc.*"; window_role = "presentation"; }; command = "move to output right, fullscreen"; }
|
||||
];
|
||||
};
|
||||
|
||||
}
|
Loading…
Reference in a new issue