mostly finished porting the config over. that's cool
This commit is contained in:
parent
57b7e38d2a
commit
ebaff5eea6
1 changed files with 198 additions and 190 deletions
388
sway.mod.nix
388
sway.mod.nix
|
@ -20,212 +20,220 @@
|
||||||
];
|
];
|
||||||
personal.home_modules = [
|
personal.home_modules = [
|
||||||
(
|
(
|
||||||
{ lib, pkgs, ... }:
|
|
||||||
{
|
{
|
||||||
wayland.windowManager.sway.config = {
|
lib,
|
||||||
modifier = "Mod4";
|
pkgs,
|
||||||
fonts = {
|
config,
|
||||||
names = [ "pango" ];
|
...
|
||||||
style = "monospace";
|
}:
|
||||||
size = 8.0;
|
{
|
||||||
};
|
wayland.windowManager.sway = {
|
||||||
terminal = "$\{pkgs.terminator}/bin/terminator";
|
enable = true;
|
||||||
|
systemd.enable = true;
|
||||||
|
|
||||||
keybindings =
|
package = pkgs.sway;
|
||||||
let
|
|
||||||
mod = wayland.windowManager.sway.config.modifier;
|
|
||||||
term = wayland.windowManager.sway.config.terminal;
|
|
||||||
rofi = "$\{pkgs.rofi-wayland}/bin/rofi";
|
|
||||||
in
|
|
||||||
lib.mkOptionDefault {
|
|
||||||
"${mod}+Return" = "exec ${term}"; # opens a terminal window
|
|
||||||
"${mod}+Shift+q" = "kill"; # kills the active window
|
|
||||||
|
|
||||||
"${mod}+s" = ''exec --no-startup-id ${rofi} -run-command "/bin/sh -i -c '{cmd}'" -show combi''; # opens rofi
|
config = lib.mkForce {
|
||||||
"${mod}+Tab" = "exec --no-startup-id ${rofi} -show window";
|
modifier = "Mod4";
|
||||||
|
fonts = {
|
||||||
# "${mod}+p" = ''mode "resize"'';
|
names = [ "pango" ];
|
||||||
"${mod}+o" = "exec \${pkgs.swaylock}/bin/swaylock"; # locks the session, requiring password to unlock.
|
style = "monospace";
|
||||||
|
size = 8.0;
|
||||||
### move focus
|
|
||||||
"${mod}+Left" = "focus left";
|
|
||||||
"${mod}+Down" = "focus down";
|
|
||||||
"${mod}+Up" = "focus up";
|
|
||||||
"${mod}+Right" = "focus right";
|
|
||||||
|
|
||||||
### move windows
|
|
||||||
"${mod}+Shift+Left" = "move left";
|
|
||||||
"${mod}+Shift+Down" = "move down";
|
|
||||||
"${mod}+Shift+Up" = "move up";
|
|
||||||
"${mod}+Shift+Right" = "move right";
|
|
||||||
|
|
||||||
"${mod}+Shift+m" = "split h"; # Horizontal split
|
|
||||||
"${mod}+Shift+v" = "split v"; # Vertical Split
|
|
||||||
|
|
||||||
"${mod}+t" = "fullscreen toggle"; # fullscreen
|
|
||||||
|
|
||||||
"${mod}+r" = "layout stacking";
|
|
||||||
"${mod}+w" = "layout tabbed";
|
|
||||||
"${mod}+e" = "layout toggle split";
|
|
||||||
|
|
||||||
"${mod}+Shift+Space" = "floating toggle";
|
|
||||||
"${mod}+Space" = "focus mode_toggle"; # change focus between tiling and floating
|
|
||||||
|
|
||||||
"${mod}+a" = "focus parent";
|
|
||||||
"${mod}+Shift+a" = "focus child";
|
|
||||||
|
|
||||||
"${mod}+Shift+c" = "reload"; # config hot-reload, probably gonna be useless cause we're on nixOS, though.
|
|
||||||
|
|
||||||
### moves user around
|
|
||||||
"${mod}+1" = "workspace number 1";
|
|
||||||
"${mod}+2" = "workspace number 2";
|
|
||||||
"${mod}+3" = "workspace number 3";
|
|
||||||
"${mod}+4" = "workspace number 4";
|
|
||||||
"${mod}+5" = "workspace number 5";
|
|
||||||
"${mod}+6" = "workspace number 6";
|
|
||||||
"${mod}+7" = "workspace number 7";
|
|
||||||
"${mod}+8" = "workspace number 8";
|
|
||||||
"${mod}+9" = "workspace number 9";
|
|
||||||
"${mod}+0" = "workspace number 10";
|
|
||||||
|
|
||||||
### moves containers around
|
|
||||||
"${mod}+Shift+1" = "move container to workspace number 1";
|
|
||||||
"${mod}+Shift+2" = "move container to workspace number 2";
|
|
||||||
"${mod}+Shift+3" = "move container to workspace number 3";
|
|
||||||
"${mod}+Shift+4" = "move container to workspace number 4";
|
|
||||||
"${mod}+Shift+5" = "move container to workspace number 5";
|
|
||||||
"${mod}+Shift+6" = "move container to workspace number 6";
|
|
||||||
"${mod}+Shift+7" = "move container to workspace number 7";
|
|
||||||
"${mod}+Shift+8" = "move container to workspace number 8";
|
|
||||||
"${mod}+Shift+9" = "move container to workspace number 9";
|
|
||||||
"${mod}+Shift+0" = "move container to workspace number 10";
|
|
||||||
};
|
};
|
||||||
|
terminal = "$\{pkgs.terminator}/bin/terminator";
|
||||||
|
|
||||||
### TODO : Resize mode and automatic floating
|
keybindings =
|
||||||
assigns = {
|
let
|
||||||
"1:说" = [ { title = "^Signal$|Discord$"; } ];
|
mod = config.wayland.windowManager.sway.config.modifier;
|
||||||
"2:main" = [ { title = "VSCodium$"; } ];
|
term = config.wayland.windowManager.sway.config.terminal;
|
||||||
"3:browsing" = [ { title = "Librewolf$"; } ];
|
rofi = "$\{pkgs.rofi-wayland}/bin/rofi";
|
||||||
"4:misc" = [ ];
|
in
|
||||||
"5:5" = [ ];
|
{
|
||||||
"6:6" = [ ];
|
"${mod}+Return" = "exec ${term}"; # opens a terminal window
|
||||||
"7:7" = [ ];
|
"${mod}+Shift+q" = "kill"; # kills the active window
|
||||||
"8:8" = [ ];
|
|
||||||
"9:9" = [ ];
|
|
||||||
"0:audio" = [ { title = "pwvucontrol$|noisetorch$"; } ];
|
|
||||||
};
|
|
||||||
|
|
||||||
colors = {
|
"${mod}+s" = ''exec --no-startup-id ${rofi} -run-command "/bin/sh -i -c '{cmd}'" -show combi''; # opens rofi
|
||||||
# should probably use a let ... in ... here
|
"${mod}+Tab" = "exec --no-startup-id ${rofi} -show window";
|
||||||
background = "#212121";
|
|
||||||
focused = {
|
|
||||||
border = "#2b83a6";
|
|
||||||
background = "#2b83a6";
|
|
||||||
text = "#ffffff";
|
|
||||||
indicator = "#dddddd";
|
|
||||||
childBorder = "#2b83a6";
|
|
||||||
};
|
|
||||||
focusedInactive = {
|
|
||||||
border = "#212121";
|
|
||||||
background = "#212121";
|
|
||||||
text = "#86888c";
|
|
||||||
indicator = "#292d2e";
|
|
||||||
childBorder = "#5a5a5a";
|
|
||||||
};
|
|
||||||
unfocused = {
|
|
||||||
border = "#212121";
|
|
||||||
background = "#212121";
|
|
||||||
text = "#86888c";
|
|
||||||
indicator = "#292d2e";
|
|
||||||
childBorder = "#5a5a5a";
|
|
||||||
};
|
|
||||||
urgent = {
|
|
||||||
border = "#d64e4e";
|
|
||||||
background = "#d64e4e";
|
|
||||||
text = "#ffffff";
|
|
||||||
indicator = "#d64e4e";
|
|
||||||
childBorder = "#d64e4e";
|
|
||||||
};
|
|
||||||
placeholder = {
|
|
||||||
border = "#212121";
|
|
||||||
background = "#0c0c0c";
|
|
||||||
text = "#ffffff";
|
|
||||||
indicator = "#212121";
|
|
||||||
childBorder = "#262626";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
bars = [
|
# "${mod}+p" = ''mode "resize"'';
|
||||||
{
|
"${mod}+o" = "exec \${pkgs.swaylock}/bin/swaylock"; # locks the session, requiring password to unlock.
|
||||||
statusCommand = "\${pkgs.swayrbar}/bin/swayrbar";
|
|
||||||
position = "bottom";
|
|
||||||
trayOutput = "primary";
|
|
||||||
separatorSymbol = "·";
|
|
||||||
workspaceButtons = true;
|
|
||||||
workspaceNumbers = false;
|
|
||||||
|
|
||||||
colors = {
|
### move focus
|
||||||
# again, should probably use a let ... in ... statement here.
|
"${mod}+Left" = "focus left";
|
||||||
background = "#212121";
|
"${mod}+Down" = "focus down";
|
||||||
statusline = "#dddddd";
|
"${mod}+Up" = "focus up";
|
||||||
separator = "#666666";
|
"${mod}+Right" = "focus right";
|
||||||
focusedWorkspace = {
|
|
||||||
border = "#2b83a6";
|
### move windows
|
||||||
background = "#2b83a6";
|
"${mod}+Shift+Left" = "move left";
|
||||||
text = "#ffffff";
|
"${mod}+Shift+Down" = "move down";
|
||||||
};
|
"${mod}+Shift+Up" = "move up";
|
||||||
activeWorkspace = {
|
"${mod}+Shift+Right" = "move right";
|
||||||
border = "#212121";
|
|
||||||
background = "#212121";
|
"${mod}+Shift+m" = "split h"; # Horizontal split
|
||||||
text = "#ffffff";
|
"${mod}+Shift+v" = "split v"; # Vertical Split
|
||||||
};
|
|
||||||
inactiveWorkspace = {
|
"${mod}+t" = "fullscreen toggle"; # fullscreen
|
||||||
border = "#212121";
|
|
||||||
background = "#212121";
|
"${mod}+r" = "layout stacking";
|
||||||
text = "#86888c";
|
"${mod}+w" = "layout tabbed";
|
||||||
};
|
"${mod}+e" = "layout toggle split";
|
||||||
urgentWorkspace = {
|
|
||||||
border = "#d64e4e";
|
"${mod}+Shift+Space" = "floating toggle";
|
||||||
background = "#d64e4e";
|
"${mod}+Space" = "focus mode_toggle"; # change focus between tiling and floating
|
||||||
text = "#ffffff";
|
|
||||||
};
|
"${mod}+a" = "focus parent";
|
||||||
bindingMode = {
|
"${mod}+Shift+a" = "focus child";
|
||||||
border = "#229c56";
|
|
||||||
background = "#229c56";
|
"${mod}+Shift+c" = "reload"; # config hot-reload, probably gonna be useless cause we're on nixOS, though.
|
||||||
text = "#ffffff";
|
|
||||||
};
|
### moves user around
|
||||||
|
"${mod}+1" = "workspace number 1";
|
||||||
|
"${mod}+2" = "workspace number 2";
|
||||||
|
"${mod}+3" = "workspace number 3";
|
||||||
|
"${mod}+4" = "workspace number 4";
|
||||||
|
"${mod}+5" = "workspace number 5";
|
||||||
|
"${mod}+6" = "workspace number 6";
|
||||||
|
"${mod}+7" = "workspace number 7";
|
||||||
|
"${mod}+8" = "workspace number 8";
|
||||||
|
"${mod}+9" = "workspace number 9";
|
||||||
|
"${mod}+0" = "workspace number 10";
|
||||||
|
|
||||||
|
### moves containers around
|
||||||
|
"${mod}+Shift+1" = "move container to workspace number 1";
|
||||||
|
"${mod}+Shift+2" = "move container to workspace number 2";
|
||||||
|
"${mod}+Shift+3" = "move container to workspace number 3";
|
||||||
|
"${mod}+Shift+4" = "move container to workspace number 4";
|
||||||
|
"${mod}+Shift+5" = "move container to workspace number 5";
|
||||||
|
"${mod}+Shift+6" = "move container to workspace number 6";
|
||||||
|
"${mod}+Shift+7" = "move container to workspace number 7";
|
||||||
|
"${mod}+Shift+8" = "move container to workspace number 8";
|
||||||
|
"${mod}+Shift+9" = "move container to workspace number 9";
|
||||||
|
"${mod}+Shift+0" = "move container to workspace number 10";
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
### TODO : Resize mode and automatic floating
|
||||||
];
|
assigns = {
|
||||||
output = {
|
"1:说" = [ { title = "^Signal$|Discord$"; } ];
|
||||||
DP-3 = {
|
"2:main" = [ { title = "VSCodium$"; } ];
|
||||||
mode = "3440x1440@144.000Hz";
|
"3:browsing" = [ { title = "Librewolf$"; } ];
|
||||||
|
"4:misc" = [ ];
|
||||||
|
"5:5" = [ ];
|
||||||
|
"6:6" = [ ];
|
||||||
|
"7:7" = [ ];
|
||||||
|
"8:8" = [ ];
|
||||||
|
"9:9" = [ ];
|
||||||
|
"0:audio" = [ { title = "pwvucontrol$|noisetorch$"; } ];
|
||||||
};
|
};
|
||||||
};
|
|
||||||
|
|
||||||
input = {
|
colors = {
|
||||||
"10429:2335:UGTABLET_11.6_inch_PenDisplay" = {
|
# should probably use a let ... in ... here
|
||||||
map_to_output = "UGD Artist 12 pro 0x19201012";
|
background = "#212121";
|
||||||
|
focused = {
|
||||||
|
border = "#2b83a6";
|
||||||
|
background = "#2b83a6";
|
||||||
|
text = "#ffffff";
|
||||||
|
indicator = "#dddddd";
|
||||||
|
childBorder = "#2b83a6";
|
||||||
|
};
|
||||||
|
focusedInactive = {
|
||||||
|
border = "#212121";
|
||||||
|
background = "#212121";
|
||||||
|
text = "#86888c";
|
||||||
|
indicator = "#292d2e";
|
||||||
|
childBorder = "#5a5a5a";
|
||||||
|
};
|
||||||
|
unfocused = {
|
||||||
|
border = "#212121";
|
||||||
|
background = "#212121";
|
||||||
|
text = "#86888c";
|
||||||
|
indicator = "#292d2e";
|
||||||
|
childBorder = "#5a5a5a";
|
||||||
|
};
|
||||||
|
urgent = {
|
||||||
|
border = "#d64e4e";
|
||||||
|
background = "#d64e4e";
|
||||||
|
text = "#ffffff";
|
||||||
|
indicator = "#d64e4e";
|
||||||
|
childBorder = "#d64e4e";
|
||||||
|
};
|
||||||
|
placeholder = {
|
||||||
|
border = "#212121";
|
||||||
|
background = "#0c0c0c";
|
||||||
|
text = "#ffffff";
|
||||||
|
indicator = "#212121";
|
||||||
|
childBorder = "#262626";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
"type:keyboard" = {
|
|
||||||
xkb_layout = [
|
bars = [
|
||||||
"us(colemak_dh)"
|
({
|
||||||
"us"
|
statusCommand = "\${pkgs.swayrbar}/bin/swayrbar";
|
||||||
# "rulemak"
|
position = "bottom";
|
||||||
];
|
trayOutput = "primary";
|
||||||
xkb_options = "grp:rctrl_toggle";
|
# separatorSymbol = "·";
|
||||||
|
workspaceButtons = true;
|
||||||
|
workspaceNumbers = false;
|
||||||
|
|
||||||
|
colors = {
|
||||||
|
# again, should probably use a let ... in ... statement here.
|
||||||
|
background = "#212121";
|
||||||
|
statusline = "#dddddd";
|
||||||
|
separator = "#666666";
|
||||||
|
focusedWorkspace = {
|
||||||
|
border = "#2b83a6";
|
||||||
|
background = "#2b83a6";
|
||||||
|
text = "#ffffff";
|
||||||
|
};
|
||||||
|
activeWorkspace = {
|
||||||
|
border = "#212121";
|
||||||
|
background = "#212121";
|
||||||
|
text = "#ffffff";
|
||||||
|
};
|
||||||
|
inactiveWorkspace = {
|
||||||
|
border = "#212121";
|
||||||
|
background = "#212121";
|
||||||
|
text = "#86888c";
|
||||||
|
};
|
||||||
|
urgentWorkspace = {
|
||||||
|
border = "#d64e4e";
|
||||||
|
background = "#d64e4e";
|
||||||
|
text = "#ffffff";
|
||||||
|
};
|
||||||
|
bindingMode = {
|
||||||
|
border = "#229c56";
|
||||||
|
background = "#229c56";
|
||||||
|
text = "#ffffff";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
})
|
||||||
|
];
|
||||||
|
output = {
|
||||||
|
DP-3 = {
|
||||||
|
mode = "3440x1440@144.000Hz";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
|
||||||
|
|
||||||
gaps = {
|
input = {
|
||||||
smartGaps = true;
|
"10429:2335:UGTABLET_11.6_inch_PenDisplay" = {
|
||||||
inner = 8.0;
|
map_to_output = ''"UGD Artist 12 pro 0x19201012"'';
|
||||||
outer = 2.0;
|
};
|
||||||
};
|
"type:keyboard" = {
|
||||||
|
xkb_layout = "us(colemak_dh),us";
|
||||||
|
xkb_options = "grp:rctrl_toggle";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
workspaceAutoBackAndForth = true;
|
gaps = {
|
||||||
workspaceLayout = "tabbed";
|
smartGaps = true;
|
||||||
|
inner = 8;
|
||||||
|
outer = 2;
|
||||||
|
};
|
||||||
|
|
||||||
|
workspaceAutoBackAndForth = true;
|
||||||
|
workspaceLayout = "tabbed";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue