Reformat everything
All checks were successful
/ test (push) Successful in 32s

This commit is contained in:
Andrea Ciceri 2024-09-20 11:37:17 +02:00
parent 5f644d0ccd
commit a394b9cefd
Signed by: aciceri
SSH key fingerprint: SHA256:/AagBweyV4Hlfg9u092n8hbHwD5fcB6A3qhDiDA65Rg
167 changed files with 2795 additions and 2122 deletions

View file

@ -3,7 +3,8 @@
lib,
config,
...
}: {
}:
{
imports = [
../waybar
../swayidle
@ -12,7 +13,7 @@
../kitty
];
config = {
home.packages = with pkgs; [wl-clipboard];
home.packages = with pkgs; [ wl-clipboard ];
systemd.user.sessionVariables = {
NIXOS_OZONE_WL = "1";
@ -35,98 +36,100 @@
};
wayland = {
windowManager.sway = let
modifier = "Mod4";
in {
enable = true;
wrapperFeatures.gtk = true;
config = {
inherit modifier;
menu = "${pkgs.fuzzel}/bin/fuzzel --background-color=253559cc --border-radius=5 --border-width=0";
output = let
bg = "${./wallpaper.svg} fill";
in {
DP-2 = {
res = "1900x1200";
pos = "0 0";
inherit bg;
transform = "90";
windowManager.sway =
let
modifier = "Mod4";
in
{
enable = true;
wrapperFeatures.gtk = true;
config = {
inherit modifier;
menu = "${pkgs.fuzzel}/bin/fuzzel --background-color=253559cc --border-radius=5 --border-width=0";
output =
let
bg = "${./wallpaper.svg} fill";
in
{
DP-2 = {
res = "1900x1200";
pos = "0 0";
inherit bg;
transform = "90";
};
DP-1 = {
res = "2560x1440";
pos = "1200 230";
inherit bg;
};
eDP-1 = {
res = "1920x1080";
pos = "3760 230";
inherit bg;
};
};
terminal = "${config.programs.kitty.package}/bin/kitty ${config.programs.kitty.package}/bin/kitty +kitten ssh mothership.fleet";
bars = [
{
mode = "hide";
position = "top";
command = "${pkgs.waybar}/bin/waybar";
}
];
gaps = {
smartBorders = "on";
};
DP-1 = {
res = "2560x1440";
pos = "1200 230";
inherit bg;
assigns = {
"1" = [
{ title = ".*Mozilla Firefox$"; }
{ title = ".*qutebrowser$"; }
];
"2" = [ { title = "^((?!qutebrowser-editor).)*Emacs$"; } ];
"3" = [ { title = "Slack.*"; } ];
"9" = [ { title = "^Element.*"; } ];
};
eDP-1 = {
res = "1920x1080";
pos = "3760 230";
inherit bg;
floating.criteria = [
{ title = "MetaMask Notification.*"; }
{ title = "Volume Control"; } # pavucontrol
{ title = "^.*editor - qutebrowser$"; } # Emacs opened by qutebrowser
];
input = {
"*" = {
xkb_layout = "us";
xkb_variant = "altgr-intl";
};
};
keybindings =
let
screenshotScript = pkgs.writeShellScript "screenshot.sh" ''
filename="$HOME/shots/$(date --iso-8601=seconds).png"
coords="$(${pkgs.slurp}/bin/slurp)"
${pkgs.grim}/bin/grim -t png -g "$coords" "$filename"
wl-copy -t image/png < $filename
'';
in
lib.mkOptionDefault {
"${modifier}+x" = "exec emacsclient -c";
"${modifier}+y" = "exec ${pkgs.waypipe}/bin/waypipe --compress lz4=10 ssh mothership.fleet emacsclient -c";
"${modifier}+b" = "exec qutebrowser";
"${modifier}+s" = "exec ${screenshotScript}";
# "${modifier}+g" = "exec ${screenrecordingScript}"; # FIXME
"${modifier}+t" = ''
exec emacsclient -c -F "\'(name . \\"VTerm\\"))" -q --eval '(vterm (getenv "SHELL"))'
'';
"${modifier}+u" = ''
exec ${pkgs.waypipe}/bin/waypipe --compress lz4=10 ssh mothership.fleet emacsclient -c -F "\'(name . \\"VTerm\\"))" -q --eval '(eat (getenv "SHELL"))'
'';
"XF86MonBrightnessUp" = "exec ${pkgs.brightnessctl}/bin/brightnessctl s +5%";
"XF86MonBrightnessDown" = "exec ${pkgs.brightnessctl}/bin/brightnessctl s 5%-";
};
};
terminal = "${config.programs.kitty.package}/bin/kitty ${config.programs.kitty.package}/bin/kitty +kitten ssh mothership.fleet";
bars = [
{
mode = "hide";
position = "top";
command = "${pkgs.waybar}/bin/waybar";
}
];
gaps = {
smartBorders = "on";
};
assigns = {
"1" = [{title = ".*Mozilla Firefox$";} {title = ".*qutebrowser$";}];
"2" = [{title = "^((?!qutebrowser-editor).)*Emacs$";}];
"3" = [{title = "Slack.*";}];
"9" = [{title = "^Element.*";}];
};
floating.criteria = [
{title = "MetaMask Notification.*";}
{title = "Volume Control";} # pavucontrol
{title = "^.*editor - qutebrowser$";} # Emacs opened by qutebrowser
];
input = {
"*" = {
xkb_layout = "us";
xkb_variant = "altgr-intl";
};
};
keybindings = let
screenshotScript = pkgs.writeShellScript "screenshot.sh" ''
filename="$HOME/shots/$(date --iso-8601=seconds).png"
coords="$(${pkgs.slurp}/bin/slurp)"
${pkgs.grim}/bin/grim -t png -g "$coords" "$filename"
wl-copy -t image/png < $filename
'';
screenrecordingScript = pkgs.writeShellScript "screenrecorder.sh" ''
filename="$HOME/shots/recording-$(date --iso-8601=seconds).mp4"
coords="$(${pkgs.slurp}/bin/slurp)"
${pkgs.wf-recorder}/bin/wf-recorder -g "$coords" -f "$filename"
wl-copy -t video/mp4 < $filename
'';
in
lib.mkOptionDefault {
"${modifier}+x" = "exec emacsclient -c";
"${modifier}+y" = "exec ${pkgs.waypipe}/bin/waypipe --compress lz4=10 ssh mothership.fleet emacsclient -c";
"${modifier}+b" = "exec qutebrowser";
"${modifier}+s" = "exec ${screenshotScript}";
# "${modifier}+g" = "exec ${screenrecordingScript}"; # FIXME
"${modifier}+t" = ''
exec emacsclient -c -F "\'(name . \\"VTerm\\"))" -q --eval '(vterm (getenv "SHELL"))'
'';
"${modifier}+u" = ''
exec ${pkgs.waypipe}/bin/waypipe --compress lz4=10 ssh mothership.fleet emacsclient -c -F "\'(name . \\"VTerm\\"))" -q --eval '(eat (getenv "SHELL"))'
'';
"XF86MonBrightnessUp" = "exec ${pkgs.brightnessctl}/bin/brightnessctl s +5%";
"XF86MonBrightnessDown" = "exec ${pkgs.brightnessctl}/bin/brightnessctl s 5%-";
};
extraConfig = ''
bindsym ${modifier}+p move workspace to output right
'';
xwayland = true;
systemdIntegration = true;
};
extraConfig = ''
bindsym ${modifier}+p move workspace to output right
'';
xwayland = true;
systemdIntegration = true;
};
};
};
}