fixup! 🚀 add barebones sway config

This commit is contained in:
Moritz Böhme 2022-04-05 11:10:55 +02:00
parent e2052019d9
commit 8588090542
No known key found for this signature in database
GPG key ID: 213820E2795F5CF5

View file

@ -8,15 +8,65 @@ in {
enable = true; enable = true;
driSupport = true; driSupport = true;
}; };
environment.loginShellInit = ''
if [ -z $DISPLAY ] && [ "$(tty)" = "/dev/tty1" ]; then
exec sway
fi
'';
home-manager.users.moritz = { home-manager.users.moritz = {
home.packages = with pkgs; [ wl-clipboard wofi waybar feh ];
programs.waybar = {
enable = true;
systemd.enable = true;
settings = {
mainBar = {
layer = "top";
position = "top";
height = 30;
output = [ "eDP-1" "HDMI-A-1" ];
modules-left = [ "sway/workspaces" "sway/mode" "wlr/taskbar" ];
modules-center = [ "sway/window" "custom/hello-from-waybar" ];
modules-right =
[ "mpd" "custom/mymodule#with-css-id" "temperature" ];
"sway/workspaces" = { all-outputs = true; };
};
};
};
wayland.windowManager.sway = { wayland.windowManager.sway = {
enable = true; enable = true;
config = {
input = {
"*" = { xkb_layout = "de"; };
"type:touchpad" = {
natural_scroll = "enabled";
middle_emulation = "enabled";
};
};
terminal = "kitty"; terminal = "kitty";
menu = "wofi --show run"; menu = "wofi --show drun";
bars = [{ modifier = "Mod4";
fonts.size = 15.0; gaps = {
positiom = "bottom"; inner = 5;
}]; outer = 3;
smartBorders = "on";
};
bars = [ ];
keybindings = let
modifier =
config.home-manager.users.moritz.wayland.windowManager.sway.config.modifier;
in lib.mkOptionDefault {
"${modifier}+f" = "firefox";
"${modifier}+e" = "emacsclient -c -a emacs";
};
startup = [
{
command = "systemctl --user restart waybar";
always = true;
}
{ command = "synology-drive"; }
{ command = "randomWallpaper"; }
];
};
}; };
}; };
}; };