nixos-config/user/sway/default.nix

181 lines
4.2 KiB
Nix
Raw Normal View History

{
config,
pkgs,
lib,
...
}:
2022-08-05 11:20:13 -03:00
let
2024-06-05 01:18:48 -03:00
inherit (config.my)
key
accent
font
theme
;
inherit (theme) color;
2023-01-22 18:12:04 -03:00
in
{
2023-02-25 18:04:58 -03:00
imports = [
./kanshi.nix
./mako.nix
./sway-binds.nix
2023-02-25 18:47:49 -03:00
./sway-modes.nix
2023-02-25 19:29:33 -03:00
./sway-assigns.nix
2023-02-25 18:04:58 -03:00
./swayidle.nix
./swaylock.nix
./theme.nix
];
2024-06-05 01:18:48 -03:00
config = lib.mkIf (config.my.desktop == "sway") {
2023-06-02 22:42:56 -03:00
services.mako.enable = true;
2023-02-25 17:19:48 -03:00
services.swayidle.enable = true;
2023-02-25 18:04:58 -03:00
services.kanshi.enable = true;
2023-02-25 17:19:48 -03:00
2023-02-25 19:29:33 -03:00
wayland.windowManager.sway = {
enable = true;
package = pkgs.mySway;
2023-02-25 19:29:33 -03:00
config = {
bars = [ ];
floating.modifier = "Mod4";
terminal = pkgs.alacritty.executable;
window.titlebar = false;
gaps = {
smartGaps = true;
smartBorders = "on";
inner = 5;
};
colors =
let
acc = accent.color;
fg_acc = accent.fg;
fg_color = color.txt;
bg_color = color.bg_dark;
alert = "#000000";
client = border: background: text: indicator: childBorder: {
inherit
border
background
text
indicator
childBorder
;
2023-01-22 18:12:04 -03:00
};
2023-02-25 19:29:33 -03:00
in
{
focused = client acc acc fg_acc acc acc;
focusedInactive = client bg_color bg_color fg_color bg_color bg_color;
unfocused = client bg_color bg_color fg_color bg_color bg_color;
urgent = client alert alert fg_color alert alert;
2022-11-29 20:39:41 -03:00
};
2023-02-25 19:29:33 -03:00
output = {
"*" = {
adaptive_sync = "off";
2023-02-25 19:29:33 -03:00
bg = "${theme.background} fill";
mode = "1920x1080@144.000Hz";
2023-01-22 18:12:04 -03:00
};
2023-02-25 19:29:33 -03:00
};
fonts = {
names = [ font.interface ];
size = font.size.medium * 1.0;
};
# Ignore PS4 controller touchpad events
input."1356:2508:Wireless_Controller_Touchpad".events = "disabled";
2024-08-15 01:49:10 -03:00
input."1133:16537:Logitech_G502_X_PLUS" = {
accel_profile = "flat";
pointer_accel = "0";
};
2023-02-25 19:29:33 -03:00
input."type:touchpad" = {
# Disable While Typing
dwt = "enabled";
natural_scroll = "enabled";
tap = "enabled";
};
input."*" = {
xkb_layout = "us(colemak),br";
xkb_options = "lv3:lsgt_switch,grp:shifts_toggle";
xkb_numlock = "enabled";
repeat_rate = "30";
repeat_delay = "200";
};
# setup cursor based on home.pointerCursor
seat."*" = {
xcursor_theme = "${config.home.pointerCursor.name} ${toString config.home.pointerCursor.size}";
2023-02-25 19:29:33 -03:00
hide_cursor = "when-typing enable";
2023-01-22 18:12:04 -03:00
};
2022-08-05 11:20:13 -03:00
};
2023-02-25 19:29:33 -03:00
extraConfig = ''
for_window [title=.*] inhibit_idle fullscreen
exec swaymsg workspace 2
2024-03-15 23:09:46 -03:00
exec_always systemctl --user restart waybar.service
exec corectrl --minimize-systray
2023-02-25 19:29:33 -03:00
'';
};
2022-08-05 11:20:13 -03:00
services.gammastep = {
enable = true;
provider = "geoclue2";
};
2023-11-07 20:45:41 -03:00
services.kdeconnect = {
enable = true;
indicator = true;
};
systemd.user.services.vrr-fullscreen = {
Unit = {
Description = "Enable VRR for fullscreen windows";
PartOf = [ "graphical-session.target" ];
After = [ "graphical-session.target" ];
};
Service = {
ExecStart = "${lib.getExe pkgs.vrr-fullscreen}";
Restart = "on-failure";
};
Install = {
WantedBy = [ "sway-session.target" ];
};
};
services.gpg-agent.pinentryPackage = pkgs.pinentry-all;
2024-01-24 21:59:57 -03:00
xdg.configFile."OpenTabletDriver/settings.json".source = ./open-tablet-driver.json;
2022-08-23 23:42:36 -03:00
home.packages = with pkgs; [
mySway
2022-12-02 16:13:10 -03:00
swaybg
swaylock
2023-02-25 16:43:58 -03:00
wdisplays
2022-12-02 16:13:10 -03:00
2022-08-23 23:42:36 -03:00
waybar
dhist
2023-01-21 01:58:12 -03:00
demoji
2022-08-23 23:42:36 -03:00
bmenu
wdmenu
wlauncher
volumesh
2024-06-21 00:30:23 -03:00
brightnessctl
2022-11-14 15:27:25 -03:00
showkeys
2022-08-23 23:42:36 -03:00
pamixer
libnotify
xdg-utils
screenshotsh
color_picker
2022-10-17 00:18:10 -03:00
wf-recorder
2022-10-18 23:30:35 -03:00
wl-clipboard
2022-10-17 00:18:10 -03:00
wtype
2023-05-31 20:42:55 -03:00
wl-crosshair
2022-10-24 08:02:22 -03:00
2022-11-14 15:02:18 -03:00
grim
2024-08-09 01:41:01 -03:00
satty
xdg-user-dirs
(tesseract5.override {
enableLanguages = [
"eng"
"por"
];
})
2022-08-23 23:42:36 -03:00
];
2022-08-05 11:20:13 -03:00
};
}