2022-01-16 11:22:44 +00:00
|
|
|
{ config, pkgs, lib, tree, ... }: {
|
|
|
|
# import default terminal
|
2022-02-14 14:56:05 +00:00
|
|
|
imports = with tree; [ home.apps.kitty home.apps.rofi ];
|
2022-01-16 11:22:44 +00:00
|
|
|
|
2021-12-21 01:28:00 +00:00
|
|
|
home.sessionVariables = {
|
|
|
|
XDG_CURRENT_DESKTOP = "sway";
|
|
|
|
XDG_SESSION_TYPE = "wayland";
|
2022-02-13 15:25:14 +00:00
|
|
|
#WLR_DRM_DEVICES = "/dev/dri/card0";
|
2021-12-21 15:26:21 +00:00
|
|
|
SDL_VIDEODRIVER = "wayland";
|
|
|
|
QT_QPA_PLATFORM = "wayland";
|
|
|
|
QT_WAYLAND_DISABLE_WINDOWDECORATION = 1;
|
|
|
|
_JAVA_AWT_WM_NONREPARENTING = 1;
|
2022-01-09 21:30:13 +00:00
|
|
|
XCURSOR_SIZE = 64;
|
|
|
|
QT_AUTO_SCREEN_SCALE_FACTOR = 1;
|
2021-12-21 01:28:00 +00:00
|
|
|
};
|
|
|
|
|
2021-12-21 15:26:21 +00:00
|
|
|
home.packages = with pkgs; [
|
|
|
|
grim
|
|
|
|
slurp
|
|
|
|
wl-clipboard
|
|
|
|
jq
|
|
|
|
wofi
|
|
|
|
wmctrl
|
|
|
|
libnotify
|
|
|
|
light
|
2021-12-25 17:22:53 +00:00
|
|
|
gobar
|
2021-12-26 12:38:23 +00:00
|
|
|
libdbusmenu-gtk3
|
2021-12-21 15:26:21 +00:00
|
|
|
];
|
2021-12-21 01:28:00 +00:00
|
|
|
|
2022-01-29 22:47:32 +00:00
|
|
|
xdg.dataFile."wallpaper.jpg".source = ./wallpaper.jpg;
|
|
|
|
|
2021-12-21 15:26:21 +00:00
|
|
|
wayland.windowManager.sway = {
|
|
|
|
enable = true;
|
2021-12-26 12:38:23 +00:00
|
|
|
wrapperFeatures.base = true;
|
|
|
|
wrapperFeatures.gtk = true;
|
2021-12-26 14:07:09 +00:00
|
|
|
config = let
|
|
|
|
terminal = "${pkgs.kitty}/bin/kitty";
|
2022-02-14 14:56:05 +00:00
|
|
|
menu = "${pkgs.rofi}/bin/rofi -show run";
|
2021-12-26 14:07:09 +00:00
|
|
|
cfg = config.wayland.windowManager.sway.config;
|
2022-02-08 19:46:57 +00:00
|
|
|
pactl = "${pkgs.pulseaudio}/bin/pactl";
|
|
|
|
pacmd = "${pkgs.pulseaudio}/bin/pacmd";
|
2021-12-26 14:07:09 +00:00
|
|
|
in {
|
|
|
|
bars = [
|
|
|
|
{
|
|
|
|
position = "top";
|
|
|
|
fonts = {
|
|
|
|
names = [ "Comic Code" ];
|
|
|
|
size = 14.0;
|
2021-12-21 00:51:20 +00:00
|
|
|
};
|
2021-12-26 14:07:09 +00:00
|
|
|
statusCommand = lib.escapeShellArgs [
|
|
|
|
#"/home/chaoticryptidz/Projects/gobar/gobar "
|
|
|
|
"${pkgs.gobar}/bin/gobar"
|
2021-12-28 12:16:53 +00:00
|
|
|
"-config"
|
2021-12-26 14:07:09 +00:00
|
|
|
"cpu\\|mem\\|weather\\(Leighton\\ Buzzard\\)\\|bat\\(BAT0\\)\\|time"
|
|
|
|
];
|
2021-12-21 00:51:20 +00:00
|
|
|
|
2021-12-26 14:07:09 +00:00
|
|
|
}
|
|
|
|
{ command = "${pkgs.waybar}/bin/waybar"; }
|
|
|
|
];
|
2021-12-21 15:26:21 +00:00
|
|
|
|
2022-02-10 10:37:09 +00:00
|
|
|
output = { "*" = { bg = "~/.local/share/wallpaper.jpg fill"; }; };
|
2021-12-26 14:07:09 +00:00
|
|
|
input = { "*" = { xkb_layout = "gb"; }; };
|
2021-12-21 00:51:20 +00:00
|
|
|
|
2021-12-26 14:07:09 +00:00
|
|
|
fonts = {
|
|
|
|
names = [ "Comic Code" ];
|
|
|
|
size = 18.0;
|
|
|
|
};
|
2021-12-21 00:51:20 +00:00
|
|
|
|
2021-12-26 14:07:09 +00:00
|
|
|
modifier = "Mod1";
|
|
|
|
terminal = "${pkgs.kitty}/bin/kitty";
|
|
|
|
|
|
|
|
startup = [
|
|
|
|
# gets blueman applet working for some reason
|
|
|
|
{
|
|
|
|
command = "dbus-update-activation-environment DISPLAY";
|
|
|
|
always = true;
|
|
|
|
}
|
|
|
|
{
|
|
|
|
command = "nm-applet";
|
|
|
|
always = true;
|
|
|
|
}
|
|
|
|
];
|
|
|
|
|
|
|
|
seat = { "*" = { "xcursor_theme" = "Adwaita 24"; }; };
|
|
|
|
|
|
|
|
gaps = {
|
|
|
|
top = 10;
|
|
|
|
bottom = 10;
|
|
|
|
left = 10;
|
|
|
|
right = 10;
|
|
|
|
inner = 20;
|
|
|
|
outer = 20;
|
|
|
|
smartGaps = true;
|
2021-12-21 00:51:20 +00:00
|
|
|
};
|
|
|
|
|
2021-12-26 14:07:09 +00:00
|
|
|
window = {
|
|
|
|
border = 4;
|
|
|
|
titlebar = false;
|
|
|
|
};
|
2021-12-21 00:51:20 +00:00
|
|
|
|
2021-12-26 14:07:09 +00:00
|
|
|
keybindings = {
|
|
|
|
"${cfg.modifier}+Return" = "exec ${cfg.terminal}";
|
|
|
|
|
|
|
|
"${cfg.modifier}+Left" = "focus left";
|
|
|
|
"${cfg.modifier}+Down" = "focus down";
|
|
|
|
"${cfg.modifier}+Up" = "focus up";
|
|
|
|
"${cfg.modifier}+Right" = "focus right";
|
|
|
|
|
|
|
|
"${cfg.modifier}+Shift+Left" = "move left";
|
|
|
|
"${cfg.modifier}+Shift+Down" = "move down";
|
|
|
|
"${cfg.modifier}+Shift+Up" = "move up";
|
|
|
|
"${cfg.modifier}+Shift+Right" = "move right";
|
|
|
|
|
|
|
|
"${cfg.modifier}+Shift+space" = "floating toggle";
|
|
|
|
"${cfg.modifier}+space" = "focus mode_toggle";
|
|
|
|
|
|
|
|
"XF86AudioRaiseVolume" =
|
2022-02-08 19:46:57 +00:00
|
|
|
"exec ${pactl} set-sink-volume @DEFAULT_SINK@ +5%";
|
2021-12-26 14:07:09 +00:00
|
|
|
"XF86AudioLowerVolume" =
|
2022-02-08 19:46:57 +00:00
|
|
|
"exec ${pactl} set-sink-volume @DEFAULT_SINK@ -5%";
|
2022-02-10 10:37:09 +00:00
|
|
|
"XF86AudioMute" = "exec ${pactl} set-sink-mute @DEFAULT_SINK@ toggle";
|
2021-12-26 14:07:09 +00:00
|
|
|
"XF86AudioMicMute" =
|
2022-02-10 10:37:09 +00:00
|
|
|
"exec ${pactl} set-source-mute @DEFAULT_SOURCE@ toggle";
|
2021-12-29 14:15:52 +00:00
|
|
|
"XF86MonBrightnessDown" = "exec sudo xbacklight -time 1 -dec +5";
|
|
|
|
"XF86MonBrightnessUp" = "exec sudo xbacklight -time 1 -inc +5";
|
2021-12-26 14:07:09 +00:00
|
|
|
"Print" =
|
|
|
|
"exec ${pkgs.grim}/bin/grim -t png - | ${pkgs.wl-clipboard}/bin/wl-copy -t image/png";
|
|
|
|
"Shift+Print" = ''
|
|
|
|
exec ${pkgs.grim}/bin/grim -t png -g "$(${pkgs.slurp}/bin/slurp -d)" - | ${pkgs.wl-clipboard}/bin/wl-copy -t image/png'';
|
|
|
|
|
2022-02-14 14:56:05 +00:00
|
|
|
"${cfg.modifier}+d" = "exec ${menu}";
|
2021-12-26 14:07:09 +00:00
|
|
|
"${cfg.modifier}+f" = "fullscreen";
|
|
|
|
|
|
|
|
"${cfg.modifier}+Shift+q" = "kill";
|
|
|
|
"${cfg.modifier}+Shift+c" = "reload";
|
|
|
|
|
|
|
|
"${cfg.modifier}+r" = "mode resize";
|
|
|
|
} // (lib.foldl lib.recursiveUpdate { } (map (workspace: {
|
|
|
|
"${cfg.modifier}+${workspace}" = "workspace ${workspace}";
|
|
|
|
"${cfg.modifier}+Shift+${workspace}" =
|
|
|
|
"move container to workspace ${workspace}";
|
|
|
|
}) [ "1" "2" "3" "4" "5" "6" "7" "8" "9" ]));
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|
2021-12-21 00:51:20 +00:00
|
|
|
|