forked from mirrors_public/oddlama_nix-config
feat: assign some programs to specific workspaces, and enable the per-workspace-layout tool
This commit is contained in:
parent
8f1773fdd0
commit
c93a5d63a9
2 changed files with 73 additions and 9 deletions
|
@ -28,8 +28,9 @@
|
||||||
appimage-run
|
appimage-run
|
||||||
chromium
|
chromium
|
||||||
feh
|
feh
|
||||||
pinentry # For yubikey
|
|
||||||
gamescope
|
gamescope
|
||||||
|
pavucontrol
|
||||||
|
pinentry # For yubikey
|
||||||
thunderbird
|
thunderbird
|
||||||
xdg-utils
|
xdg-utils
|
||||||
xdragon
|
xdragon
|
||||||
|
@ -37,6 +38,7 @@
|
||||||
zathura
|
zathura
|
||||||
];
|
];
|
||||||
|
|
||||||
|
# TODO pavucontrol shortcut or bar button
|
||||||
# TODO audible bell in qt pinentry drives me nuts
|
# TODO audible bell in qt pinentry drives me nuts
|
||||||
# TODO secureboot -> use pam yubikey login
|
# TODO secureboot -> use pam yubikey login
|
||||||
# TODO keyboard stays lit on poweroff -> add systemd service to disable it on shutdown
|
# TODO keyboard stays lit on poweroff -> add systemd service to disable it on shutdown
|
||||||
|
|
|
@ -14,6 +14,21 @@
|
||||||
|
|
||||||
bindWithModifier = mapAttrs' (k: nameValuePair (cfg.modifier + "+" + k));
|
bindWithModifier = mapAttrs' (k: nameValuePair (cfg.modifier + "+" + k));
|
||||||
cfg = config.xsession.windowManager.i3.config;
|
cfg = config.xsession.windowManager.i3.config;
|
||||||
|
|
||||||
|
i3-per-workspace-layout = pkgs.rustPlatform.buildRustPackage rec {
|
||||||
|
pname = "i3-per-workspace-layout";
|
||||||
|
version = "1.0.0";
|
||||||
|
|
||||||
|
src = ./i3-per-workspace-layout;
|
||||||
|
cargoHash = "sha256-bO/ZTkQLCeJajiW7cZoEBIIWDCyxYp4rO6ulbcu21YQ=";
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "A helper utility to allow assigning a layout to each workspace in i3";
|
||||||
|
license = licenses.mit;
|
||||||
|
maintainers = with maintainers; [oddlama];
|
||||||
|
mainProgram = "i3-per-workspace-layout";
|
||||||
|
};
|
||||||
|
};
|
||||||
in {
|
in {
|
||||||
xsession.numlock.enable = true;
|
xsession.numlock.enable = true;
|
||||||
xsession.windowManager.i3 = {
|
xsession.windowManager.i3 = {
|
||||||
|
@ -130,7 +145,7 @@ in {
|
||||||
"f" = "floating toggle";
|
"f" = "floating toggle";
|
||||||
"Return" = "fullscreen toggle";
|
"Return" = "fullscreen toggle";
|
||||||
"Space" = "focus mode_toggle";
|
"Space" = "focus mode_toggle";
|
||||||
# "a" = "focus parent";
|
"a" = "focus parent";
|
||||||
# "s" = "layout stacking";
|
# "s" = "layout stacking";
|
||||||
# "w" = "layout tabbed";
|
# "w" = "layout tabbed";
|
||||||
# "e" = "layout toggle split";
|
# "e" = "layout toggle split";
|
||||||
|
@ -165,15 +180,62 @@ in {
|
||||||
|
|
||||||
window.titlebar = false;
|
window.titlebar = false;
|
||||||
|
|
||||||
#assigns = {
|
floating.criteria = [
|
||||||
# "9" = [
|
{class = "Pavucontrol";}
|
||||||
# {class = "^steam_app_";}
|
];
|
||||||
# {app_id = "^Steam$";}
|
|
||||||
# {class = "^steam$";}
|
assigns = {
|
||||||
# ];
|
"1" = [
|
||||||
#};
|
{class = "^firefox$";}
|
||||||
|
];
|
||||||
|
"5" = [
|
||||||
|
{class = "^bottles$";}
|
||||||
|
{class = "^Steam$";}
|
||||||
|
{class = "^prismlauncher$";}
|
||||||
|
];
|
||||||
|
"7" = [
|
||||||
|
{class = "^obsidian$";}
|
||||||
|
{class = "^Discord$";}
|
||||||
|
{class = "^Signal$";}
|
||||||
|
{class = "^TelegramDesktop$";}
|
||||||
|
];
|
||||||
|
"8" = [
|
||||||
|
{class = "^Spotify$";}
|
||||||
|
];
|
||||||
|
};
|
||||||
# TODO eww -> bars = [ ];
|
# TODO eww -> bars = [ ];
|
||||||
|
|
||||||
|
workspaceOutputAssign =
|
||||||
|
{
|
||||||
|
kroma = let
|
||||||
|
monitorMain = "DP-2";
|
||||||
|
monitorLeft = "DP-4";
|
||||||
|
in
|
||||||
|
map (x: {
|
||||||
|
workspace = x;
|
||||||
|
output = monitorMain;
|
||||||
|
}) ["1" "2" "3" "4" "5" "6"]
|
||||||
|
++ map (x: {
|
||||||
|
workspace = x;
|
||||||
|
output = monitorLeft;
|
||||||
|
}) ["7" "8" "9"];
|
||||||
|
}
|
||||||
|
.${nixosConfig.node.name}
|
||||||
|
or {};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
extraConfig = let
|
||||||
|
configLayouts = (pkgs.formats.toml {}).generate "per-workspace-layouts.toml" {
|
||||||
|
layouts = {
|
||||||
|
"1" = "stacking";
|
||||||
|
"7" = "stacking";
|
||||||
|
"8" = "stacking";
|
||||||
|
"9" = "stacking";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
in ''
|
||||||
|
exec_always --no-startup-id ${i3-per-workspace-layout}/bin/i3-per-workspace-layout --config ${configLayouts}
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.autorandr.enable = true;
|
programs.autorandr.enable = true;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue