configuring sway and login behaviour

This commit is contained in:
Ivan Dimitrov 2023-07-28 09:16:12 +03:00
parent 9908c108c3
commit 51b6675a4f
3 changed files with 22 additions and 8 deletions

View File

@ -6,6 +6,9 @@ set $right l
set $term kitty set $term kitty
set $menu bemenu-run | xargs swaymsg exec -- set $menu bemenu-run | xargs swaymsg exec --
exec swaymsg "workspace 1; exec kitty"
exec swaymsg "workspace 2; exec brave"
output * bg $HOME/pic/bg.png fill output * bg $HOME/pic/bg.png fill
# Start a terminal # Start a terminal
bindsym $mod+Return exec $term bindsym $mod+Return exec $term

View File

@ -130,10 +130,6 @@
enable = true; enable = true;
enableSSHSupport = true; enableSSHSupport = true;
}; };
sway = {
enable = true;
wrapperFeatures.gtk = true;
};
zsh.enable = true; zsh.enable = true;
nix-ld.enable = true; nix-ld.enable = true;
}; };

View File

@ -53,6 +53,14 @@
set -g base-index 1 set -g base-index 1
''; '';
}; };
swaylock = {
enable = true;
settings = {
color = "000000";
line-color = "ffffff";
show-failed-attempts = true;
};
};
neovim = { neovim = {
enable = true; enable = true;
viAlias = true; viAlias = true;
@ -99,6 +107,9 @@
enable = true; enable = true;
enableSyntaxHighlighting = true; enableSyntaxHighlighting = true;
enableAutosuggestions = true; enableAutosuggestions = true;
loginExtra = ''
[ "$(tty)" = "/dev/tty1" ] && exec sway
'';
shellAliases = { shellAliases = {
gad = "git add . && git diff --cached"; gad = "git add . && git diff --cached";
gac = "ga && gc"; gac = "ga && gc";
@ -134,15 +145,19 @@
]; ];
}; };
}; };
wayland = {
windowManager.sway = {
enable = true;
config = null;
extraConfig = builtins.readFile ./cfg/sway/config;
};
};
xdg.configFile = { xdg.configFile = {
"nix/nix.conf" = { "nix/nix.conf" = {
text = '' text = ''
experimental-features = nix-command flakes experimental-features = nix-command flakes
''; '';
}; };
"sway/config" = {
source = ./cfg/sway/config;
};
"user-dirs.dirs" = { "user-dirs.dirs" = {
source = pkgs.writeText "user-dirs.dirs" '' source = pkgs.writeText "user-dirs.dirs" ''
XDG_DESKTOP_DIR="dt" XDG_DESKTOP_DIR="dt"