devos/users/profiles/sway/desktop.nix

90 lines
2.1 KiB
Nix
Raw Normal View History

2021-08-26 19:17:27 +02:00
{ pkgs, lib, ... }:
2021-07-15 18:51:27 +02:00
let
rofi = pkgs.rofi.override { plugins = [ pkgs.rofi-emoji ]; };
in
2021-04-15 01:06:10 +02:00
{
2021-07-15 18:51:27 +02:00
wayland.windowManager.sway = rec {
2021-04-15 01:06:10 +02:00
enable = true;
config = {
2021-07-15 18:51:27 +02:00
terminal = "${pkgs.alacritty}/bin/alacritty";
menu = "${rofi}/bin/rofi -show combi";
2021-04-15 01:06:10 +02:00
modifier = "Mod4";
input = {
"*" = {
xkb_layout = "pl";
accel_profile = "flat";
2021-06-06 12:22:12 +02:00
dwt = "disabled";
2021-07-15 18:51:27 +02:00
pointer_accel = "0.0";
2021-04-15 01:06:10 +02:00
};
};
bars = [{
id = "top";
statusCommand = "${pkgs.i3status-rust}/bin/i3status-rs";
position = "top";
trayOutput = "*";
}];
floating.criteria = [{ title = "Steam - Update News"; }];
};
wrapperFeatures.gtk = true;
systemdIntegration = true;
2021-05-07 12:06:29 +02:00
extraSessionCommands = ''
#export SDL_VIDEODRIVER=wayland
2021-05-07 12:06:29 +02:00
# needs qt5.qtwayland in systemPackages
export QT_QPA_PLATFORM=wayland
export QT_WAYLAND_DISABLE_WINDOWDECORATION="1"
# Fix for some Java AWT applications (e.g. Android Studio),
# use this if they aren't displayed properly:
export _JAVA_AWT_WM_NONREPARENTING=1
'';
2021-04-15 01:06:10 +02:00
};
2021-07-15 18:51:27 +02:00
programs.rofi = {
enable = true;
package = rofi;
theme = "purple";
extraConfig = {
modi = "combi";
combi-modi = "drun,emoji";
};
};
2021-04-15 01:06:10 +02:00
2021-08-15 00:45:20 +02:00
programs.mako = {
enable = true;
defaultTimeout = 2000;
};
2021-04-15 01:06:10 +02:00
programs.i3status-rust = {
enable = true;
bars.bar_0 = {
blocks = [
{ block = "hueshift"; }
{
block = "disk_space";
path = "/";
info_type = "available";
2021-05-30 19:48:55 +02:00
unit = "GB";
2021-04-15 01:06:10 +02:00
interval = 60;
warning = 20.0;
alert = 10.0;
}
{
block = "memory";
display_type = "memory";
2021-05-30 19:48:55 +02:00
format_mem = "{mem_used}/{mem_total}({mem_used_percents})";
format_swap = "{swap_used}/{swap_total}({swap_used_percents})";
2021-04-15 01:06:10 +02:00
}
{
block = "cpu";
interval = 1;
}
{ block = "sound"; }
{
block = "time";
interval = 60;
format = "%a %d/%m %R";
}
];
};
};
}