Home-Manager_dotfiles/sway.nix

173 lines
3.6 KiB
Nix

{ config, pkgs, ... }:
{
# Wofi
programs.wofi = {
enable = true;
settings = {
gtk_dark = true;
location = "left";
allow_markup = true;
width = 250;
};
style = ''
* {
font-family: monospace;
}
window {
background-color: #242424;
}
#input {
margin: 5px;
border: none;
color: #ffffff;
background-color: #b30000;
}
#text {
margin: 5px;
border: none;
color: #ffffff;
}
#entry {
border: none;
}
#entry:focus {
border: none;
}
#entry:selected {
background-color: #b30000;
border-radius: 5px;
border: none;
}
'';
};
# Waybar
programs.waybar = {
enable = true;
systemd = {
enable = true;
target = "sway-session.target";
};
settings = {
mainBar = {
layer = "top";
position = "top";
height = 20;
modules-left = [ "sway/workspaces" "sway/mode" ];
"sway/workspaces" = {
disable-scroll = true;
all-outputs = true;
};
modules-center = [ "clock" ];
"clock" = {
format = "{:%H:%M}";
format-alt = "{ %A, %d %B, %Y}";
tooltip-format = "<big>{:%d %B, %Y}</big>\n<tt><small>{calendar}</small></tt>";
};
modules-right = [ "network" "battery" ];
"network" = {
format-wifi = "W{signalStrength} ";
format-ethernet = "E{signalStrength} ";
format-disconnected = "Offline";
tooltip-format = "{ifname}: {ipaddr}";
tooltip-format-wifi = "{essid} ({signalStrength}%): {ipaddr}";
};
"battery" = {
states = {
warning = 30;
critical = 15;
};
format = "B{capacity}% ";
format-alt = "{time} {icon}";
};
};
};
style = ''
* {
border: none;
border-radius: 0;
font-family: monospace;
}
window#waybar {
background: #242424;
color: #ffffff;
}
#workspaces button {
padding: 0 5px;
background-color: #1e1e1e;
color: #ffffff;
}
#workspaces button:hover {
background: #303030;
color: #ffffff;
}
#workspaces button.focused {
background: #b30000;
color: #ffffff;
}
'';
};
# Sway itself
wayland.windowManager.sway = {
enable = true;
wrapperFeatures.gtk = true;
systemd.enable = true;
config = rec {
modifier = "Mod4";
terminal = "alacritty";
menu = "wofi --show drun";
startup = [
{command = "export QT_QPA_PLATFORM=wayland";}
{command = "swaybg -i Afbeeldingen/AchterGronden/blobcat_hertog.svg";}
{command = "flatpak run org.keepassxc.KeePassXC";}
];
colors = {
background = "#242424";
focused = {
indicator = "#b30000";
background = "#b30000";
border = "#b30000";
childBorder = "#b30000";
text = "#ffffff";
};
focusedInactive = {
indicator = "#303030";
background = "#303030";
border = "#303030";
childBorder = "#303030";
text = "#ffffff";
};
unfocused = {
indicator = "#1e1e1e";
background = "#1e1e1e";
border = "#1e1e1e";
childBorder = "#1e1e1e";
text = "#ffffff";
};
};
bars = [
{
command = "waybar";
}
];
window = {
titlebar = false;
};
};
};
}