migrated sway config to compatible i3 conf
This commit is contained in:
196
home.nix
196
home.nix
@@ -12,6 +12,7 @@
|
||||
home.stateVersion = "23.11"; # Please read the comment before changing.
|
||||
|
||||
home.packages = with pkgs; [
|
||||
feh
|
||||
killall
|
||||
sshfs
|
||||
hledger
|
||||
@@ -71,6 +72,8 @@
|
||||
libreoffice
|
||||
borgbackup
|
||||
gnupg
|
||||
i3lock-blur
|
||||
xclip
|
||||
];
|
||||
programs.taskwarrior = {
|
||||
enable = true;
|
||||
@@ -93,6 +96,7 @@
|
||||
foreground = "#fc28c3";
|
||||
background = "#230038";
|
||||
};
|
||||
font.size = 9;
|
||||
};
|
||||
};
|
||||
programs.starship = {
|
||||
@@ -148,101 +152,40 @@
|
||||
LEDGER_FILE = "$HOME/hledger/hledger.journal";
|
||||
};
|
||||
|
||||
wayland.windowManager.sway.enable = true;
|
||||
wayland.windowManager.sway.package = pkgs.swayfx;
|
||||
wayland.windowManager.sway.config = {
|
||||
bars = [{
|
||||
command = "waybar";
|
||||
position = "top";
|
||||
}];
|
||||
colors.focused = {
|
||||
border = "#ef5ffc";
|
||||
background = "#ef5ffc";
|
||||
text = "#333333";
|
||||
indicator = "#2e9ef4";
|
||||
childBorder = "#ef5ffc";
|
||||
};
|
||||
defaultWorkspace = "1";
|
||||
floating = {
|
||||
criteria = [
|
||||
{
|
||||
app_id = "org.keepassxc.KeePassXC";
|
||||
}
|
||||
];
|
||||
};
|
||||
gaps = {
|
||||
inner = 8;
|
||||
smartBorders = "on";
|
||||
smartGaps = true;
|
||||
};
|
||||
input = {
|
||||
"type:keyboard" = {
|
||||
xkb_layout = "us";
|
||||
xkb_variant = "altgr-intl";
|
||||
xkb_options = "caps:escape,compose:102,shift:both_capslock,eurosign:e";
|
||||
};
|
||||
};
|
||||
keybindings =
|
||||
let
|
||||
modifier = config.xsession.windowManager.i3.config.modifier;
|
||||
menu = config.xsession.windowManager.i3.config.menu;
|
||||
in lib.mkOptionDefault {
|
||||
"${modifier}+space" = "exec ${menu}";
|
||||
"${modifier}+Control+Space" = "focus mode_toggle";
|
||||
"XF86AudioLowerVolume" = "exec pactl set-sink-volume @DEFAULT_SINK@ -5%";
|
||||
"XF86AudioRaiseVolume" = "exec pactl set-sink-volume @DEFAULT_SINK@ +5%";
|
||||
"XF86AudioMute" = "exec pactl set-sink-mute @DEFAULT_SINK@ toggle";
|
||||
"XF86AudioMicMute" = "exec pactl set-source-mute @DEFAULT_SOURCE@ toggle";
|
||||
# "XF86Launch1" = "exec ~/scripts/sunset.sh";
|
||||
# "${modifier}+Control+p" = "exec swaylock -f -c ef5ffc";
|
||||
};
|
||||
menu = "dmenu_run";
|
||||
modifier = "Mod4";
|
||||
output = {
|
||||
"*" = {
|
||||
bg = "~/.config/sway/xenia.png fill";
|
||||
};
|
||||
};
|
||||
window.titlebar = false;
|
||||
terminal = "alacritty";
|
||||
window.border = 2;
|
||||
};
|
||||
wayland.windowManager.sway.extraConfig = ''
|
||||
blur enable
|
||||
blur_xray disable
|
||||
corner_radius 4
|
||||
shadows enable
|
||||
default_dim_inactive 0.1
|
||||
dim_inactive_colors.unfocused #fc28c3
|
||||
include ~/.config/sway/device-conf
|
||||
'';
|
||||
# Let Home Manager install and manage itself.
|
||||
xsession.windowManager.i3 = {
|
||||
enable = true;
|
||||
package = pkgs.i3-rounded;
|
||||
config = {
|
||||
bars = [{
|
||||
colors = {
|
||||
activeWorkspace = {
|
||||
background = "#a15ffc";
|
||||
border = "#a15ffc";
|
||||
text = "#333333";
|
||||
};
|
||||
background = "#ef5ffc";
|
||||
inactiveWorkspace = {
|
||||
background = "#ef5ffc";
|
||||
border = "#a15ffc";
|
||||
text = "#333333";
|
||||
};
|
||||
# seperator = "#a15fffc";
|
||||
statusline = "#333333";
|
||||
};
|
||||
xsession.windowManager.i3.enable = true;
|
||||
xsession.windowManager.i3.package = pkgs.i3-rounded;
|
||||
|
||||
xsession.windowManager.i3.config = {
|
||||
fonts = {
|
||||
names = [ "Ubuntu Mono" ];
|
||||
size = 13.0;
|
||||
names = [ "Ubuntu" ];
|
||||
style = "Regular";
|
||||
size = 12.0;
|
||||
};
|
||||
mode = "dock";
|
||||
defaultWorkspace = "workspace 1";
|
||||
bars = [{
|
||||
position = "top";
|
||||
colors.background = "#ef5ffc";
|
||||
colors.focusedWorkspace = {
|
||||
text = "#333333";
|
||||
border = "#ef5ffc";
|
||||
background = "#a15ffc";
|
||||
};
|
||||
colors.inactiveWorkspace = {
|
||||
text = "#333333";
|
||||
border = "#ef5ffc";
|
||||
background = "#ef5ffc";
|
||||
};
|
||||
colors.statusline = "#333333";
|
||||
fonts = {
|
||||
names = [ "Hack Nerd Font Mono" ];
|
||||
style = "Bold";
|
||||
size = 10.0;
|
||||
};
|
||||
statusCommand = "i3status";
|
||||
extraConfig = ''
|
||||
height 24
|
||||
'';
|
||||
}];
|
||||
colors.focused = {
|
||||
border = "#ef5ffc";
|
||||
@@ -251,7 +194,6 @@
|
||||
indicator = "#2e9ef4";
|
||||
childBorder = "#ef5ffc";
|
||||
};
|
||||
defaultWorkspace = "1";
|
||||
floating = {
|
||||
criteria = [
|
||||
{
|
||||
@@ -266,8 +208,8 @@
|
||||
};
|
||||
keybindings =
|
||||
let
|
||||
modifier = config.wayland.windowManager.sway.config.modifier;
|
||||
menu = config.wayland.windowManager.sway.config.menu;
|
||||
modifier = config.xsession.windowManager.i3.config.modifier;
|
||||
menu = config.xsession.windowManager.i3.config.menu;
|
||||
in lib.mkOptionDefault {
|
||||
"${modifier}+space" = "exec ${menu}";
|
||||
"${modifier}+Control+Space" = "focus mode_toggle";
|
||||
@@ -275,25 +217,49 @@
|
||||
"XF86AudioRaiseVolume" = "exec pactl set-sink-volume @DEFAULT_SINK@ +5%";
|
||||
"XF86AudioMute" = "exec pactl set-sink-mute @DEFAULT_SINK@ toggle";
|
||||
"XF86AudioMicMute" = "exec pactl set-source-mute @DEFAULT_SOURCE@ toggle";
|
||||
"XF86Launch1" = "exec ~/scripts/sunset.sh";
|
||||
"${modifier}+Control+p" = "exec swaylock -f -c ef5ffc";
|
||||
# "XF86Launch1" = "exec ~/scripts/sunset.sh";
|
||||
"${modifier}+Control+p" = "exec i3lock -n -c ef5ffc";
|
||||
};
|
||||
menu = "dmenu_run";
|
||||
modifier = "Mod4";
|
||||
window.titlebar = false;
|
||||
terminal = "alacritty";
|
||||
window.border = 2;
|
||||
startup = [
|
||||
{ command = "feh --bg-scale ~/.config/home-manager/xenia.png"; }
|
||||
{ command = "keepassxc"; }
|
||||
];
|
||||
};
|
||||
extraConfig = ''
|
||||
include ~/.config/sway/device-conf
|
||||
xsession.windowManager.i3.extraConfig = ''
|
||||
'';
|
||||
services.redshift = {
|
||||
enable = true;
|
||||
latitude = 49.0;
|
||||
longitude = 9.0;
|
||||
tray = true;
|
||||
};
|
||||
services.caffeine.enable = true;
|
||||
services.screen-locker.enable = true;
|
||||
services.screen-locker.lockCmd = "i3lock -n -c ef5ffc";
|
||||
programs.i3status = {
|
||||
enable = true;
|
||||
enableDefault = false;
|
||||
general = {
|
||||
colors = false;
|
||||
interval = 5;
|
||||
};
|
||||
modules = {
|
||||
"volume master".position = 1;
|
||||
"wireless wlp2s0".position = 2;
|
||||
"battery 0".position = 3;
|
||||
"time" = {
|
||||
position = 4;
|
||||
settings = {
|
||||
format = "%a, %d.%m.%Y - %H:%M";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
programs.home-manager.enable = true;
|
||||
@@ -387,24 +353,4 @@
|
||||
|
||||
services.gpg-agent.enable = true;
|
||||
services.syncthing.enable = true;
|
||||
services.swayidle = {
|
||||
enable = true;
|
||||
events = [
|
||||
{
|
||||
event = "before-sleep";
|
||||
command = "/run/current-system/sw/bin/swaylock -f -c ef5ffc";
|
||||
}
|
||||
];
|
||||
timeouts = [
|
||||
{
|
||||
command = "/run/current-system/sw/bin/swaylock -f -c ef5ffc";
|
||||
timeout = 300;
|
||||
}
|
||||
{
|
||||
command = "swaymsg \"output * dpms off\"";
|
||||
resumeCommand = "swaymsg \"output * dpms on\"";
|
||||
timeout = 600;
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user