feat(home): Disable nixGL

This commit is contained in:
punkfairie 2025-01-06 20:29:08 -08:00
parent fefab6e9f4
commit 86259e05db
No known key found for this signature in database
GPG key ID: B3C5488E9A1A7CA6
4 changed files with 444 additions and 429 deletions

View file

@ -3,7 +3,6 @@
in { in {
marleyos = { marleyos = {
isDesktop = true; isDesktop = true;
nixGL = enabled;
appearance = { appearance = {
base = enabled; base = enabled;

View file

@ -14,7 +14,7 @@ in {
config = mkIf (cfg.enable && hasXorg) { config = mkIf (cfg.enable && hasXorg) {
services.picom = { services.picom = {
enable = true; enable = true;
package = config.lib.nixGL.wrap pkgs.picom; package = mkIf config.marleyos.nixGL.enable (config.lib.nixGL.wrap pkgs.picom);
}; };
# The module config options are a nightmare. # The module config options are a nightmare.

View file

@ -3,8 +3,7 @@
config, config,
pkgs, pkgs,
... ...
}: }: let
let
inherit (lib) mkEnableOption mkIf getExe; inherit (lib) mkEnableOption mkIf getExe;
cfg = config.marleyos.services.polybar; cfg = config.marleyos.services.polybar;
@ -12,16 +11,16 @@ let
xrandr = getExe pkgs.xorg.xrandr; xrandr = getExe pkgs.xorg.xrandr;
grep = getExe pkgs.gnugrep; grep = getExe pkgs.gnugrep;
cut = "${pkgs.coreutils}/bin/cut"; cut = "${pkgs.coreutils}/bin/cut";
in in {
{
options.marleyos.services.polybar.enable = mkEnableOption "polybar"; options.marleyos.services.polybar.enable = mkEnableOption "polybar";
config = mkIf (cfg.enable && hasXorg) { config = mkIf (cfg.enable && hasXorg) {
services.polybar = { services.polybar = {
enable = true; enable = true;
package = config.lib.nixGL.wrap pkgs.polybar; package = mkIf config.marleyos.nixGL.enable (config.lib.nixGL.wrap pkgs.polybar);
script = # bash script =
# bash
'' ''
for m in $(${xrandr} --query | ${grep} " connected" | ${cut} -d" " -f1); do for m in $(${xrandr} --query | ${grep} " connected" | ${cut} -d" " -f1); do
bar="main" bar="main"
@ -36,385 +35,398 @@ in
# colorblock theme from # colorblock theme from
# https://github.com/adi1090x/polybar-themes # https://github.com/adi1090x/polybar-themes
settings = settings = let
let color = rec {
color = rec { background = "#26232f";
background = "#26232f"; foreground = background;
foreground = background; foreground-alt = "#c8c8cb";
foreground-alt = "#c8c8cb"; alpha = "#00000000";
alpha = "#00000000"; shade1 = "#d6adb5";
shade1 = "#d6adb5"; shade2 = "#d7bdc3";
shade2 = "#d7bdc3"; dark = "#0a0a0a";
dark = "#0a0a0a"; };
};
fmt = { fmt = {
prefix.font = 2; prefix.font = 2;
padding = 2; padding = 2;
}; };
pref = { pref = {
font = 2; font = 2;
padding = 2;
};
hasRofi = config.marleyos.programs.rofi.enable;
cfgHome = config.xdg.configHome;
in {
# Global Settings - - - - - - - - - - - - - - - - - - - - - - - - - -
"settings" = {
screenchange.reload = true;
compositing = {
background = "source";
foreground = "over";
overline = "over";
underline = "over";
border = "over";
};
pseudo.transparency = false;
};
"global/wm" = {
margin.bottom = 0;
};
# Bars - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
"bar/main" = {
monitor.text = "\${env:MONITOR:}";
monitor.strict = false;
override.redirect = true;
bottom = false;
fixed.center = true;
width = "99%";
height = 40;
offset.x = "0.5%";
offset.y = "1%";
background = color.alpha;
inherit (color) foreground;
radius.top = 0.0;
radius.bottom = 0.0;
underline.size = 2;
underline.color = color.foreground;
border.size = 0;
border.color = color.background;
padding = 0;
module.margin.left = 0;
module.margin.right = 0;
font = let
mkFt = s: "Maple Mono NF:pixelsize=${toString s};4";
in [
(mkFt 10)
(mkFt 15)
];
modules.left = "launcher sep workspaces sep title sep mpd";
modules.right = "filesystem sep cpu memory pulseaudio network date sep sysmenu";
dim.value = 1.0;
wm.restack = "i3";
enable.ipc = true;
scroll.up = "i3-msg workspace next_on_output";
scroll.down = "i3-msg workspace prev_on_output";
};
"bar/tray" = {
"inherit" = "bar/main";
modules.right = "tray sep filesystem sep cpu memory pulseaudio network date sep sysmenu";
};
# Modules - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
"module/sep" = {
type = "custom/text";
format = " ";
content.background = color.alpha;
content-foreground = color.alpha;
};
"module/launcher" = {
type = "custom/text";
content = {
text = "";
inherit (color) background;
foreground = color.shade2;
padding = 2; padding = 2;
}; };
click.left = mkIf hasRofi "${cfgHome}/rofi/launchers/type-1/launcher.sh &";
click.right = mkIf hasRofi "${cfgHome}/rofi/applets/bin/screenshot.sh &";
};
hasRofi = config.marleyos.programs.rofi.enable; "module/workspaces" = {
cfgHome = config.xdg.configHome; type = "internal/xworkspaces";
in pin.workspaces = true;
{ enable.click = true;
# Global Settings - - - - - - - - - - - - - - - - - - - - - - - - - - enable.scroll = true;
"settings" = { icon.text = [
screenchange.reload = true; "1;1"
compositing = { "2;2"
background = "source"; "3;3"
foreground = "over"; "4;4"
overline = "over"; "5;5"
underline = "over"; "6;6"
border = "over"; "7;7"
}; "8;8"
pseudo.transparency = false; "9;9"
}; "10;10"
"global/wm" = { ];
margin.bottom = 0; icon.default = 0;
}; format = {
text = "<label-state>";
# Bars - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - inherit (color) background;
"bar/main" = {
monitor.text = "\${env:MONITOR:}";
monitor.strict = false;
override.redirect = true;
bottom = false;
fixed.center = true;
width = "99%";
height = 40;
offset.x = "0.5%";
offset.y = "1%";
background = color.alpha;
inherit (color) foreground; inherit (color) foreground;
radius.top = 0.0;
radius.bottom = 0.0;
underline.size = 2;
underline.color = color.foreground;
border.size = 0;
border.color = color.background;
padding = 0;
module.margin.left = 0;
module.margin.right = 0;
font =
let
mkFt = s: "Maple Mono NF:pixelsize=${toString s};4";
in
[
(mkFt 10)
(mkFt 15)
];
modules.left = "launcher sep workspaces sep title sep mpd";
modules.right = "filesystem sep cpu memory pulseaudio network date sep sysmenu";
dim.value = 1.0;
wm.restack = "i3";
enable.ipc = true;
scroll.up = "i3-msg workspace next_on_output";
scroll.down = "i3-msg workspace prev_on_output";
}; };
label = {
"bar/tray" = { monitor = "%name%";
"inherit" = "bar/main"; active = {
modules.right = "tray sep filesystem sep cpu memory pulseaudio network date sep sysmenu"; text = "%icon%";
}; background = color.shade2;
foreground = color.dark;
# Modules - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - padding = 2;
"module/sep" = { };
type = "custom/text"; occupied = {
format = " "; text = "%icon%";
content.background = color.alpha;
content-foreground = color.alpha;
};
"module/launcher" = {
type = "custom/text";
content = {
text = "";
inherit (color) background; inherit (color) background;
foreground = color.shade2; foreground = color.shade2;
padding = 2; padding = 2;
}; };
click.left = mkIf hasRofi "${cfgHome}/rofi/launchers/type-1/launcher.sh &"; urgent = {
click.right = mkIf hasRofi "${cfgHome}/rofi/applets/bin/screenshot.sh &"; text = "%icon%";
};
"module/workspaces" = {
type = "internal/xworkspaces";
pin.workspaces = true;
enable.click = true;
enable.scroll = true;
icon.text = [
"1;1"
"2;2"
"3;3"
"4;4"
"5;5"
"6;6"
"7;7"
"8;8"
"9;9"
"10;10"
];
icon.default = 0;
format = {
text = "<label-state>";
inherit (color) background; inherit (color) background;
inherit (color) foreground; foreground = "#cc6666";
padding = 2;
}; };
label = { empty = {
monitor = "%name%"; text = "%icon%";
active = { inherit (color) background;
text = "%icon%"; foreground = color.foreground-alt;
background = color.shade2; padding = 2;
foreground = color.dark;
padding = 2;
};
occupied = {
text = "%icon%";
inherit (color) background;
foreground = color.shade2;
padding = 2;
};
urgent = {
text = "%icon%";
inherit (color) background;
foreground = "#cc6666";
padding = 2;
};
empty = {
text = "%icon%";
inherit (color) background;
foreground = color.foreground-alt;
padding = 2;
};
}; };
}; };
};
"module/title" = { "module/title" = {
type = "internal/xwindow"; type = "internal/xwindow";
format.text = "<label>"; format.text = "<label>";
format.prefix = pref // { format.prefix =
pref
// {
text = ""; text = "";
background = color.shade2; background = color.shade2;
foreground = color.dark; foreground = color.dark;
}; };
label = { label = {
text = "%title%"; text = "%title%";
maxlen = 30; maxlen = 30;
inherit (color) background;
foreground = "${color.foreground-alt}";
padding = 2;
empty = {
text = "Desktop";
inherit (color) background; inherit (color) background;
foreground = "${color.foreground-alt}"; foreground = "${color.foreground-alt}";
padding = 2; padding = 2;
empty = {
text = "Desktop";
inherit (color) background;
foreground = "${color.foreground-alt}";
padding = 2;
};
}; };
}; };
};
"module/mpd" = { "module/mpd" = {
type = "internal/mpd"; type = "internal/mpd";
interval = 1; interval = 1;
format.online = "<icon-prev><toggle><icon-next><label-song>"; format.online = "<icon-prev><toggle><icon-next><label-song>";
format.offline = { format.offline = {
text = "<label-offline>"; text = "<label-offline>";
prefix = pref // { prefix =
pref
// {
text = ""; text = "";
background = color.shade1; background = color.shade1;
inherit (color) foreground; inherit (color) foreground;
}; };
};
label = {
song = {
text = "%artist% - %title%";
maxlen = 25;
ellipsis = true;
inherit (color) background;
foreground = color.foreground-alt;
padding = 2;
}; };
label = { time = "%elapsed / %total%";
song = { offline = {
text = "%artist% - %title%"; text = "Offline";
maxlen = 25; inherit (color) background;
ellipsis = true; foreground = color.foreground-alt;
inherit (color) background; padding = 2;
foreground = color.foreground-alt;
padding = 2;
};
time = "%elapsed / %total%";
offline = {
text = "Offline";
inherit (color) background;
foreground = color.foreground-alt;
padding = 2;
};
};
icon =
let
mkIcon =
i:
pref
// {
text = i;
foreground = color.dark;
background = color.shade1;
};
in
{
play = mkIcon "";
pause = mkIcon "";
stop = "";
prev = mkIcon " ";
next = mkIcon " ";
seekb = "";
seekf = "";
random = "";
repeat = "";
repeatone = "";
single = "";
consume = "";
};
toggle = {
on.foreground = color.foreground;
off.foreground = color.background;
}; };
}; };
icon = let
mkIcon = i:
pref
// {
text = i;
foreground = color.dark;
background = color.shade1;
};
in {
play = mkIcon "";
pause = mkIcon "";
stop = "";
prev = mkIcon " ";
next = mkIcon " ";
seekb = "";
seekf = "";
random = "";
repeat = "";
repeatone = "";
single = "";
consume = "";
};
toggle = {
on.foreground = color.foreground;
off.foreground = color.background;
};
};
"module/filesystem" = { "module/filesystem" = {
type = "internal/fs"; type = "internal/fs";
mount = [ mount = [
"/" "/"
"/mnt/babeshare/marley" "/mnt/babeshare/marley"
"/mnt/babeshare/babez" "/mnt/babeshare/babez"
]; ];
interval = 30; interval = 30;
fixed.values = true; fixed.values = true;
format = { format = {
mounted = fmt // { mounted =
fmt
// {
text = "<label-mounted>"; text = "<label-mounted>";
prefix.text = ""; prefix.text = "";
background = color.shade2; background = color.shade2;
}; };
unmounted = fmt // { unmounted =
fmt
// {
text = "<label-unmounted>"; text = "<label-unmounted>";
prefix.text = ""; prefix.text = "";
background = color.shade2; background = color.shade2;
}; };
};
label = {
mounted = " %free%";
unmounted = " %mountpoint: not mounted";
};
}; };
label = {
mounted = " %free%";
unmounted = " %mountpoint: not mounted";
};
};
"module/cpu" = { "module/cpu" = {
type = "internal/cpu"; type = "internal/cpu";
interval = 1; interval = 1;
format = fmt // { format =
fmt
// {
text = "<label>"; text = "<label>";
prefix.text = ""; prefix.text = "";
background = color.shade2; background = color.shade2;
inherit (color) foreground; inherit (color) foreground;
}; };
label = " %percentage%%"; label = " %percentage%%";
}; };
"module/memory" = { "module/memory" = {
type = "internal/memory"; type = "internal/memory";
interval = 1; interval = 1;
format = fmt // { format =
fmt
// {
text = "<label>"; text = "<label>";
prefix.text = ""; prefix.text = "";
background = color.shade1; background = color.shade1;
}; };
label = " %mb_used%"; label = " %mb_used%";
}; };
"module/pulseaudio" = { "module/pulseaudio" = {
type = "internal/pulseaudio"; type = "internal/pulseaudio";
sink = "alsa_output.pci-0000_03_00.6.analog-stereo"; sink = "alsa_output.pci-0000_03_00.6.analog-stereo";
use.ui.max = false; use.ui.max = false;
interval = 5; interval = 5;
format = { format = {
volume = { volume = {
text = "<ramp-volume> <label-volume>"; text = "<ramp-volume> <label-volume>";
background = color.shade2; background = color.shade2;
padding = 2; padding = 2;
}; };
muted = fmt // { muted =
fmt
// {
text = "<label-muted>"; text = "<label-muted>";
prefix.text = ""; prefix.text = "";
background = color.shade2; background = color.shade2;
}; };
};
ramp.volume = {
text = [
""
""
""
];
font = 2;
};
}; };
ramp.volume = {
text = [
""
""
""
];
font = 2;
};
};
"module/network" = { "module/network" = {
type = "internal/network"; type = "internal/network";
interface = "enp4s0"; interface = "enp4s0";
interval = 1.0; interval = 1.0;
accumulate.stats = true; accumulate.stats = true;
unknown.as.up = true; unknown.as.up = true;
format = { format = {
connected = fmt // { connected =
fmt
// {
text = "<label-connected>"; text = "<label-connected>";
prefix.text = ""; prefix.text = "";
background = color.shade2; background = color.shade2;
}; };
disconnected = fmt // { disconnected =
fmt
// {
text = "<label-disconnected>"; text = "<label-disconnected>";
prefix.text = ""; prefix.text = "";
background = color.shade2; background = color.shade2;
}; };
};
label = {
connected = "%{A1:networkmanager_dmenu &:} %netspeed%%{A}";
disconnected = "%{A1:networkmanager_dmenu &:} Offline%{A}";
};
}; };
label = {
connected = "%{A1:networkmanager_dmenu &:} %netspeed%%{A}";
disconnected = "%{A1:networkmanager_dmenu &:} Offline%{A}";
};
};
"module/date" = { "module/date" = {
type = "internal/date"; type = "internal/date";
interval = 1.0; interval = 1.0;
time.text = " %I:%M %p"; time.text = " %I:%M %p";
time.alt = " %a, %d %b %Y"; time.alt = " %a, %d %b %Y";
format = fmt // { format =
fmt
// {
text = "<label>"; text = "<label>";
prefix.text = ""; prefix.text = "";
background = color.shade1; background = color.shade1;
inherit (color) foreground; inherit (color) foreground;
}; };
label = "%time%"; label = "%time%";
}; };
"module/sysmenu" = { "module/sysmenu" = {
type = "custom/text"; type = "custom/text";
format = { format = {
text = ""; text = "";
inherit (color) background; inherit (color) background;
foreground = color.shade2; foreground = color.shade2;
padding = 2; padding = 2;
};
click.left = mkIf hasRofi "${cfgHome}/rofi/powermenu/type-1/powermenu.sh &";
}; };
click.left = mkIf hasRofi "${cfgHome}/rofi/powermenu/type-1/powermenu.sh &";
};
"module/tray" = { "module/tray" = {
type = "internal/tray"; type = "internal/tray";
tray = { tray = {
size = 16; size = 16;
background = color.shade2; background = color.shade2;
spacing = "5px"; spacing = "5px";
}; };
format = { format = {
background = color.shade2; background = color.shade2;
padding = 2; padding = 2;
};
}; };
}; };
};
}; };
}; };
} }

View file

@ -3,9 +3,9 @@
config, config,
pkgs, pkgs,
... ...
}: }: let
let inherit
inherit (lib) (lib)
mkEnableOption mkEnableOption
mkIf mkIf
concatMapAttrs concatMapAttrs
@ -18,8 +18,7 @@ let
cfg = config.marleyos.xorg.i3; cfg = config.marleyos.xorg.i3;
isGenericLinux = config.targets.genericLinux.enable; isGenericLinux = config.targets.genericLinux.enable;
in in {
{
options.marleyos.xorg.i3.enable = mkEnableOption "i3"; options.marleyos.xorg.i3.enable = mkEnableOption "i3";
config = mkIf cfg.enable { config = mkIf cfg.enable {
@ -30,7 +29,10 @@ in
picom = enabled; picom = enabled;
polybar = enabled; polybar = enabled;
# broken on non-nixOS # broken on non-nixOS
screen-locker = if isGenericLinux then disabled else enabled; screen-locker =
if isGenericLinux
then disabled
else enabled;
}; };
}; };
@ -41,138 +43,140 @@ in
xsession.windowManager.i3 = { xsession.windowManager.i3 = {
enable = true; enable = true;
package = config.lib.nixGL.wrap pkgs.i3; package = mkIf config.marleyos.nixGL.enable (config.lib.nixGL.wrap pkgs.i3);
extraConfig = "tiling_drag modifier titlebar"; extraConfig = "tiling_drag modifier titlebar";
config = config = let
let directions = {
directions = { left = "h";
left = "h"; down = "j";
down = "j"; up = "k";
up = "k"; right = "l";
right = "l"; };
}; in {
focus.followMouse = false;
window.border = 0;
floating.border = 0;
window.titlebar = false;
floating.titlebar = false;
gaps = {
smartBorders = "no_gaps";
inner = 10;
top = 50;
};
bars = [];
# Startup - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
startup = with pkgs; [
{command = "${getExe feh} --no-fehbg --bg-fill ${./bg.jpg}";}
{command = "${getExe networkmanagerapplet}";}
];
# Keybindings - - - - - - - - - - - - - - - - - - - - - - - - - - - -
modifier = "Mod4";
keybindings = let
mod = config.xsession.windowManager.i3.config.modifier;
workspaces = range 1 10;
getI = i:
if i == 10
then "0"
else toString i;
inherit (config.xdg) configHome;
isGenericLinux = config.targets.genericLinux.enable;
in in
{ {
focus.followMouse = false; "${mod}+Shift+c" = "reload";
window.border = 0; "${mod}+Shift+r" = "restart";
floating.border = 0; "${mod}+Shift+e" = "exec i3-nagbar -t warning -m 'Do you want to exit i3?' -b 'Yes' 'i3-msg exit'";
window.titlebar = false; "${mod}+e" = "layout toggle split";
floating.titlebar = false; "${mod}+Control+h" = "split -";
"${mod}+Control+v" = "split |";
gaps = { "${mod}+f" = "fullscreen toggle";
smartBorders = "no_gaps";
inner = 10;
top = 50;
};
bars = [ ]; "${mod}+Shift+space" = "floating toggle";
# Startup - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - "${mod}+Control+r" = "mode resize";
startup = with pkgs; [ "${mod}+q" = "kill";
{ command = "${getExe feh} --no-fehbg --bg-fill ${./bg.jpg}"; }
{ command = "${getExe networkmanagerapplet}"; }
];
# Keybindings - - - - - - - - - - - - - - - - - - - - - - - - - - - - "${mod}+r" = "exec ${configHome}/rofi/launchers/type-1/launcher.sh";
"${mod}+Return" = "exec ${
modifier = "Mod4"; if isGenericLinux
then "wezterm"
keybindings = else "${pkgs.wezterm}/bin/wezterm"
let }";
mod = config.xsession.windowManager.i3.config.modifier; }
workspaces = range 1 10; # PulseAudio Volume - - - - - - - - - - - - - - - - - - - - - - - -
getI = i: if i == 10 then "0" else toString i; // (
inherit (config.xdg) configHome; concatMapAttrs
isGenericLinux = config.targets.genericLinux.enable; (key: cmd: {
in "${key}" = "exec --no-startup-id pactl ${cmd} && killall -SIGUSR1 i3status";
})
{ {
"${mod}+Shift+c" = "reload"; XF86AudioRaiseVolume = "set-sink-volume @DEFAULT_SINK@ +10%";
"${mod}+Shift+r" = "restart"; XF86AudioLowerVolume = "set-sink-volume @DEFAULT_SINK@ -10%";
"${mod}+Shift+e" = "exec i3-nagbar -t warning -m 'Do you want to exit i3?' -b 'Yes' 'i3-msg exit'"; XF86AudioMute = "set-sink-mute @DEFAULT_SINK@ toggle";
XF86AudioMicMute = "set-source-mute @DEFAULT_SOURCE@ toggle";
"${mod}+e" = "layout toggle split";
"${mod}+Control+h" = "split -";
"${mod}+Control+v" = "split |";
"${mod}+f" = "fullscreen toggle";
"${mod}+Shift+space" = "floating toggle";
"${mod}+Control+r" = "mode resize";
"${mod}+q" = "kill";
"${mod}+r" = "exec ${configHome}/rofi/launchers/type-1/launcher.sh";
"${mod}+Return" = "exec ${if isGenericLinux then "wezterm" else "${pkgs.wezterm}/bin/wezterm"}";
} }
)
# PulseAudio Volume - - - - - - - - - - - - - - - - - - - - - - - - # Focus & Movement - - - - - - - - - - - - - - - - - - - - - - - - -
// (concatMapAttrs // (concatMapAttrs (direction: key: {
(key: cmd: {
"${key}" = "exec --no-startup-id pactl ${cmd} && killall -SIGUSR1 i3status";
})
{
XF86AudioRaiseVolume = "set-sink-volume @DEFAULT_SINK@ +10%";
XF86AudioLowerVolume = "set-sink-volume @DEFAULT_SINK@ -10%";
XF86AudioMute = "set-sink-mute @DEFAULT_SINK@ toggle";
XF86AudioMicMute = "set-source-mute @DEFAULT_SOURCE@ toggle";
}
)
# Focus & Movement - - - - - - - - - - - - - - - - - - - - - - - - -
// (concatMapAttrs (direction: key: {
"${mod}+${key}" = "focus ${direction}"; "${mod}+${key}" = "focus ${direction}";
"${mod}+Shift+${key}" = "move ${direction}"; "${mod}+Shift+${key}" = "move ${direction}";
}) directions) })
directions)
# Switch Workspaces - - - - - - - - - - - - - - - - - - - - - - - - -
// (listToAttrs (
(map (i: {
name = "${mod}+${getI i}";
value = "workspace number ${toString i}";
}))
workspaces
))
# Move Windows Between Workspaces - - - - - - - - - - - - - - - - - -
// (listToAttrs (
(map (i: {
name = "${mod}+Shift+${getI i}";
value = "move container to workspace number ${toString i}";
}))
workspaces
));
# Switch Workspaces - - - - - - - - - - - - - - - - - - - - - - - - - # Resize Windows - - - - - - - - - - - - - - - - - - - - - - - - - - -
// (listToAttrs ( modes.resize = let
(map (i: { mod = config.xsession.windowManager.i3.config.modifier;
name = "${mod}+${getI i}"; in
value = "workspace number ${toString i}"; {
})) Return = "mode default";
workspaces Escape = "mode default";
)) "${mod}+Control+r" = "mode default";
}
# Move Windows Between Workspaces - - - - - - - - - - - - - - - - - - // (
// (listToAttrs ( concatMapAttrs
(map (i: { (key: action: {
name = "${mod}+Shift+${getI i}"; "${key}" = "resize ${action} 10 px or 10 ppt";
value = "move container to workspace number ${toString i}"; })
})) rec {
workspaces Left = "shrink width";
)); Down = "shrink height";
Up = "grow height";
# Resize Windows - - - - - - - - - - - - - - - - - - - - - - - - - - - Right = "grow width";
modes.resize = "${directions.left}" = Left;
let "${directions.down}" = Down;
mod = config.xsession.windowManager.i3.config.modifier; "${directions.up}" = Up;
in "${directions.right}" = Right;
{
Return = "mode default";
Escape = "mode default";
"${mod}+Control+r" = "mode default";
} }
// (concatMapAttrs );
(key: action: { };
"${key}" = "resize ${action} 10 px or 10 ppt";
})
rec {
Left = "shrink width";
Down = "shrink height";
Up = "grow height";
Right = "grow width";
"${directions.left}" = Left;
"${directions.down}" = Down;
"${directions.up}" = Up;
"${directions.right}" = Right;
}
);
};
}; };
}; };
} }