nixos-config/user/sway/default.nix

127 lines
3 KiB
Nix
Raw Normal View History

2022-08-05 11:20:13 -03:00
{ config, pkgs, lib, ... }:
let
inherit (pkgs.uservars) 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
];
2023-04-19 00:25:28 -03:00
config = lib.mkIf (pkgs.uservars.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;
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 = "on";
bg = "${theme.background} fill";
2023-01-22 18:12:04 -03:00
};
2023-02-25 19:29:33 -03:00
"DP-1" = {
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;
};
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} ${
2022-08-07 23:58:05 -03:00
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 ${pkgs.dbus-sway-environment}/bin/dbus-sway-environment
exec swaymsg workspace 2
'';
};
2022-08-05 11:20:13 -03:00
services.gammastep = {
enable = true;
provider = "geoclue2";
};
2022-08-23 23:42:36 -03:00
home.packages = with pkgs; [
2022-12-02 16:13:10 -03:00
sway
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
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
2022-11-05 09:48:20 -03:00
swappy
2022-11-14 14:59:32 -03:00
tesseract5
2022-08-23 23:42:36 -03:00
];
2022-08-05 11:20:13 -03:00
};
}