summaryrefslogtreecommitdiff
path: root/home
diff options
context:
space:
mode:
Diffstat (limited to 'home')
-rw-r--r--home/desktop.nix182
-rw-r--r--home/graphics.nix5
-rw-r--r--home/path.nix3
3 files changed, 97 insertions, 93 deletions
diff --git a/home/desktop.nix b/home/desktop.nix
index f372a69..299031c 100644
--- a/home/desktop.nix
+++ b/home/desktop.nix
@@ -71,103 +71,111 @@ with lib; {
};
};
- xsession = {
+ wayland.windowManager.sway = {
enable = true;
- windowManager.i3 = {
- enable = true;
- package = pkgs.i3-gaps;
-
- config = {
- modifier = "Mod4";
- focus.followMouse = false;
-
- bars = singleton {
- mode = "dock";
- hiddenState = "hide";
- position = "top";
- workspaceButtons = true;
- workspaceNumbers = true;
- statusCommand = getExe pkgs.i3status;
- trayOutput = "primary";
- colors = {
- background = "#000000";
- statusline = "#ffffff";
- separator = "#666666";
- focusedWorkspace = {
- border = "#4c7899";
- background = "#285577";
- text = "#ffffff";
- };
- activeWorkspace = {
- border = "#333333";
- background = "#5f676a";
- text = "#ffffff";
- };
- inactiveWorkspace = {
- border = "#333333";
- background = "#222222";
- text = "#888888";
- };
- urgentWorkspace = {
- border = "#2f343a";
- background = "#900000";
- text = "#ffffff";
- };
- bindingMode = {
- border = "#2f343a";
- background = "#900000";
- text = "#ffffff";
- };
+ config = {
+ modifier = "Mod4";
+ focus.followMouse = false;
+
+ fonts = {
+ size = 11.0;
+ names = [ "DejaVu Sans Mono" ];
+ style = "Bold Semi-Condensed";
+ };
+
+ bars = singleton {
+ mode = "dock";
+ hiddenState = "hide";
+ position = "top";
+ workspaceButtons = true;
+ workspaceNumbers = true;
+ statusCommand = getExe pkgs.i3status;
+ trayOutput = "primary";
+ colors = {
+ background = "#000000";
+ statusline = "#ffffff";
+ separator = "#666666";
+ focusedWorkspace = {
+ border = "#4c7899";
+ background = "#285577";
+ text = "#ffffff";
+ };
+ activeWorkspace = {
+ border = "#333333";
+ background = "#5f676a";
+ text = "#ffffff";
+ };
+ inactiveWorkspace = {
+ border = "#333333";
+ background = "#222222";
+ text = "#888888";
+ };
+ urgentWorkspace = {
+ border = "#2f343a";
+ background = "#900000";
+ text = "#ffffff";
+ };
+ bindingMode = {
+ border = "#2f343a";
+ background = "#900000";
+ text = "#ffffff";
};
};
+ };
- fonts = {
- size = 11.0;
- names = [ "DejaVu Sans Mono" ];
- style = "Bold Semi-Condensed";
+ keybindings =
+ let
+ mod = config.wayland.windowManager.sway.config.modifier;
+ rofi = config.programs.rofi.finalPackage;
+
+ inherit (pkgs.local) st tmux-lift;
+ in
+ mkOptionDefault {
+ "${mod}+a" = "focus parent";
+ "${mod}+c" = "focus child";
+ "${mod}+d" = "exec --no-startup-id ${getExe rofi} -show run";
+ "${mod}+i" = "exec ${getExe pkgs.xcalib} -invert -alter";
+ "${mod}+o" = "exec ${getExe pkgs.xautolock} -locknow";
+ "${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";
};
- keybindings =
- let
- mod = config.xsession.windowManager.i3.config.modifier;
- rofi = config.programs.rofi.finalPackage;
-
- inherit (pkgs.local) st tmux-lift;
- in
- mkOptionDefault {
- "${mod}+a" = "focus parent";
- "${mod}+c" = "focus child";
- "${mod}+d" = "exec --no-startup-id ${getExe rofi} -show run";
- "${mod}+i" = "exec ${getExe pkgs.xcalib} -invert -alter";
- "${mod}+o" = "exec ${getExe pkgs.xautolock} -locknow";
- "${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'";
+ }
+ ];
- startup = [
- {
- command = "${getExe pkgs.xautolock} -time 10 -locker '${pkgs.i3lock-color}/bin/i3lock-color -fe -c222222'";
- notification = false;
- }
- ];
+ window.commands = [
+ # (No) Title Bars
+ {
+ command = "border pixel 5";
+ criteria.class = "^.*";
+ }
- window.commands = [
- # (No) Title Bars
- {
- command = "border pixel 5";
- criteria.class = "^.*";
- }
-
- {
- command = "floating enabled";
- criteria.class = "floating";
- }
- ];
- };
+ {
+ 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;
+ };
};
}
diff --git a/home/graphics.nix b/home/graphics.nix
index cf60475..f964a7b 100644
--- a/home/graphics.nix
+++ b/home/graphics.nix
@@ -25,9 +25,6 @@ with lib; {
};
};
- qt = {
- enable = true;
- platformTheme.name = "gtk";
- };
+ qt.enable = true;
};
}
diff --git a/home/path.nix b/home/path.nix
index eb07a60..5480f72 100644
--- a/home/path.nix
+++ b/home/path.nix
@@ -42,8 +42,7 @@ with lib; {
pkgs.tomb
pkgs.units
pkgs.usbutils
- pkgs.xautolock
- pkgs.xclip # keepassxc-cli clip
+ pkgs.wl-clipboard
pkgs.xsel
pkgs.xournalpp
pkgs.yubikey-manager