{ config, lib, pkgs, ... }: with lib; { config = mkIf (!config.home.isolation.active) { home.pointerCursor = { package = pkgs.gnome.adwaita-icon-theme; gtk.enable = true; name = "Adwaita"; x11.enable = true; }; programs = { firefox = { enable = true; package = pkgs.firefox.override { nativeMessagingHosts = [ pkgs.passff-host ]; }; profiles."main.profile" = { id = 0; name = "default"; extensions = with pkgs.nur.repos.rycee.firefox-addons; [ decentraleyes darkreader old-reddit-redirect passff privacy-badger ublock-origin umatrix ]; }; }; swaylock = { enable = true; settings = { color = "222222"; font-size = 24; show-failed-attempts = true; }; }; tmux = { enable = true; aggressiveResize = true; clock24 = true; escapeTime = 10; terminal = "xterm-256color"; keyMode = "vi"; plugins = [ { plugin = pkgs.local.tmux-pass; extraConfig = '' set -g @pass-key BSpace set -g @pass-copy-to-clipboard on set -g @pass-window-size 15 set -g @pass-hide-pw-from-preview 'on' set -g @pass-hide-preview on ''; } ]; extraConfig = '' set -g mouse on set -ga update-environment " LIFT_PID" set -g set-titles on set -g renumber-windows on set -sa terminal-overrides ',xterm-termite:RGB' set -g status-right "#{?window_bigger,[#{window_offset_x}#,#{window_offset_y}] ,} %H:%M %d-%b-%y" bind-key X set-window-option synchronize-panes\; display-message "synchronize-panes is now #{?pane_synchronized,on,off}" ''; }; waybar.enable = true; wofi.enable = true; }; services = { swayidle = { enable = true; timeouts = [ { timeout = 600; command = "${getExe config.programs.swaylock.package} -fF"; } ]; }; }; systemd.user.services.wl-gammarelay-rs = { Unit.After = [ "sway-session.target" ]; Install.WantedBy = [ "sway-session.target" ]; Service.ExecStart = getExe pkgs.wl-gammarelay-rs; }; wayland.windowManager.sway = { enable = true; config = { modifier = "Mod4"; focus.followMouse = false; fonts = { size = 11.0; names = [ "DejaVu Sans Mono" ]; style = "Bold Semi-Condensed"; }; bars = singleton { command = "waybar"; position = "top"; }; keybindings = let mod = config.wayland.windowManager.sway.config.modifier; wofi = config.programs.wofi.package; inherit (pkgs.local) st tmux-lift; in mkOptionDefault { "${mod}+a" = "focus parent"; "${mod}+c" = "focus child"; "${mod}+d" = "exec --no-startup-id ${getExe wofi} -S run"; "${mod}+i" = "exec busctl --user call rs.wl-gammarelay / rs.wl.gammarelay ToggleInverted"; "${mod}+o" = "exec ${getExe config.programs.swaylock.package} -fF"; "${mod}+Return" = "exec ${getExe st} -e ${getExe tmux-lift}"; "${mod}+Shift+e" = "exec ${getExe pkgs.xorg.setxkbmap} latam"; "${mod}+Shift+u" = "exec ${getExe pkgs.xorg.setxkbmap} us"; }; startup = [ { command = "${getExe pkgs.xautolock} -time 10 -locker '${pkgs.i3lock-color}/bin/i3lock-color -fe -c222222'"; } ]; window.commands = [ # (No) Title Bars { command = "border pixel 5"; criteria.class = "^.*"; } { command = "floating enabled"; criteria.class = "floating"; } ]; }; extraSessionCommands = '' export SDL_VIDEODRIVER=wayland # 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 ''; swaynag.enable = true; systemd.enable = true; xwayland = true; }; }; }