Switching from sway -> i3
Wayland as a couple to man issues still. QT related applications being unable to function was the final straw.
This commit is contained in:
parent
8ec1376d93
commit
267a9cecfd
|
@ -9,7 +9,8 @@
|
|||
./kitty.nix
|
||||
./nextcloud.nix
|
||||
./spotify.nix
|
||||
./sway
|
||||
|
||||
./i3
|
||||
./sway
|
||||
];
|
||||
}
|
||||
|
|
|
@ -2,11 +2,12 @@
|
|||
let
|
||||
cfg = config.this.application.dunst;
|
||||
sway = config.this.application.sway;
|
||||
i3 = config.this.application.i3;
|
||||
graphical = config.this.graphical;
|
||||
in with lib; {
|
||||
options = {
|
||||
this.application.dunst.enable = mkOption {
|
||||
default = sway.enable;
|
||||
default = i3.enable || sway.enable;
|
||||
type = with types; bool;
|
||||
};
|
||||
};
|
||||
|
|
|
@ -13,11 +13,7 @@ in with lib; {
|
|||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
environment.sessionVariables = {
|
||||
MOZ_USE_XINPUT2 = "1";
|
||||
} // optionals (graphical.protocol == "Wayland") {
|
||||
MOZ_ENABLE_WAYLAND = "1";
|
||||
} // optionals (sway_cfg.enable) { XDG_CURRENT_DESKTOP = "sway"; };
|
||||
environment.sessionVariables = { MOZ_USE_XINPUT2 = "1"; };
|
||||
|
||||
home-manager.users.james = {
|
||||
programs.firefox = {
|
||||
|
|
|
@ -17,13 +17,139 @@ in with lib; {
|
|||
};
|
||||
};
|
||||
|
||||
config = mkif cfg.enable {
|
||||
this.graphical.protocol = "X11";
|
||||
config = mkIf cfg.enable {
|
||||
programs.dconf.enable = true;
|
||||
|
||||
services.xserver = {
|
||||
enable = true;
|
||||
|
||||
xkbOptions = "ctrl:nocaps";
|
||||
libinput = {
|
||||
enable = true;
|
||||
touchpad = {
|
||||
naturalScrolling = true;
|
||||
clickMethod = "clickfinger";
|
||||
tapping = false;
|
||||
tappingDragLock = false;
|
||||
};
|
||||
};
|
||||
|
||||
windowManager.i3 = {
|
||||
enable = true;
|
||||
package = pkgs.i3-gaps;
|
||||
extraPackages = with pkgs; [
|
||||
feh
|
||||
nitrogen
|
||||
dmenu # application launcher most people use
|
||||
i3status # gives you the default i3 status bar
|
||||
i3lock # default i3 screen locker
|
||||
i3blocks # if you are planning on using i3blocks over i3status
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
home-manager.users.james = {
|
||||
xsession.windowManager.i3 = {
|
||||
enable = true;
|
||||
package = "pkgs.i3-gaps";
|
||||
package = pkgs.i3-gaps;
|
||||
config = {
|
||||
colors = {
|
||||
focusedInactive = {
|
||||
background = "#1E1E2E";
|
||||
border = "#1E1E2E";
|
||||
childBorder = "#1E1E2E";
|
||||
indicator = "#1E1E2E";
|
||||
text = "#C9CBFF";
|
||||
};
|
||||
unfocused = {
|
||||
background = "#1E1E2E";
|
||||
border = "#1E1E2E";
|
||||
childBorder = "#1E1E2E";
|
||||
indicator = "#1E1E2E";
|
||||
text = "#C9CBFF";
|
||||
};
|
||||
focused = {
|
||||
background = "#131020";
|
||||
border = "#131020";
|
||||
childBorder = "#131020";
|
||||
indicator = "#131020";
|
||||
text = "#ABE9B3";
|
||||
};
|
||||
urgent = {
|
||||
background = "#F28FAD";
|
||||
border = "#F28FAD";
|
||||
childBorder = "#F28FAD";
|
||||
indicator = "#F28FAD";
|
||||
text = "#ABE9B3";
|
||||
};
|
||||
};
|
||||
fonts = {
|
||||
names = [ "Alegreya" "FontAwesome" ];
|
||||
size = 9.0;
|
||||
};
|
||||
gaps = {
|
||||
smartBorders = "off";
|
||||
smartGaps = true;
|
||||
inner = 5;
|
||||
outer = 2;
|
||||
};
|
||||
terminal = "${pkgs.kitty}/bin/kitty";
|
||||
keybindings = mkOptionDefault {
|
||||
"${modifier}+q" = "kill";
|
||||
"${modifier}+d" = "focus mode_toggle";
|
||||
"${modifier}+a" = "focus parent";
|
||||
"${modifier}+shift+s" = "sticky toggle";
|
||||
"${modifier}+shift+f" = "floating toggle";
|
||||
"${modifier}+space" =
|
||||
"exec $(${pkgs.dmenu}/bin/dmenu_path | ${pkgs.dmenu}/bin/dmenu)";
|
||||
Pause = "exec ${pkgs.playerctl}/bin/playerctl play-pause";
|
||||
XF86AudioLowerVolume = "exec ${pkgs.volume-sh}/bin/volume.sh down";
|
||||
XF86AudioMute = "exec ${pkgs.volume-sh}/bin/volume.sh mute";
|
||||
XF86AudioRaiseVolume = "exec ${pkgs.volume-sh}/bin/volume.sh up";
|
||||
XF86MonBrightnessDown =
|
||||
"exec ${pkgs.brightness-sh}/bin/brightness.sh down";
|
||||
XF86MonBrightnessUp =
|
||||
"exec ${pkgs.brightness-sh}/bin/brightness.sh up";
|
||||
};
|
||||
modifier = "Mod4";
|
||||
startup = [
|
||||
{ command = "${pkgs.autotiling}/bin/autotiling"; }
|
||||
{ command = "${pkgs.feh}/bin/feh --bg-scale ${wallpaper}"; }
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
systemd.user = {
|
||||
targets.i3-session = {
|
||||
description = "i3 compositor session";
|
||||
documentation = [ "man:systemd.special(7)" ];
|
||||
bindsTo = [ "graphical-session.target" ];
|
||||
wants = [ "graphical-session-pre.target" ];
|
||||
after = [ "graphical-session-pre.target" ];
|
||||
};
|
||||
services.i3 = {
|
||||
enable = true;
|
||||
description = "i3 - i3 window manager";
|
||||
documentation = [ "man:i3(5)" ];
|
||||
bindsTo = [ "default.target" ];
|
||||
wants = [ "graphical-session-pre.target" ];
|
||||
after = [ "graphical-session-pre.target" ];
|
||||
environment.PATH = lib.mkForce null;
|
||||
serviceConfig = {
|
||||
Type = "simple";
|
||||
ExecStart =
|
||||
"${pkgs.dbus}/bin/dbus-run-session ${pkgs.i3}/bin/i3 --debug";
|
||||
ExecStopPost =
|
||||
"/usr/bin/env systemctl --user unset-environment DISPLAY I3SOCK ";
|
||||
NotifyAccess = "all";
|
||||
Restart = "on-failure";
|
||||
RestartSec = 1;
|
||||
TimeoutStopSec = 10;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
users.users.james.extraGroups = [ "video" "audio" ];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -11,11 +11,6 @@ in with lib; {
|
|||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
|
||||
environment.sessionVariables = optionals (graphical.protocol == "Wayland") {
|
||||
QT_QPA_PLATFORM = "wayland";
|
||||
QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
|
||||
};
|
||||
# home-manager.users.james = {
|
||||
# services.kdeconnect = {
|
||||
# indicator = true;
|
||||
|
|
|
@ -2,10 +2,11 @@
|
|||
let
|
||||
cfg = config.this.application.gammastep;
|
||||
sway = config.this.application.sway;
|
||||
i3 = config.this.application.i3;
|
||||
in with lib; {
|
||||
options = {
|
||||
this.application.gammastep.enable = mkOption {
|
||||
default = sway.enable;
|
||||
default = i3.enable || sway.enable;
|
||||
type = with types; bool;
|
||||
};
|
||||
};
|
||||
|
@ -24,7 +25,7 @@ in with lib; {
|
|||
systemd.user.services.gammastep = {
|
||||
enable = true;
|
||||
description = "Nightly color shifting";
|
||||
wantedBy = [ "sway-session.target" ];
|
||||
wantedBy = [ "sway-session.target" "i3-session.target" ];
|
||||
partOf = [ "graphical-session.target" ];
|
||||
serviceConfig = {
|
||||
ExecStart = ''
|
||||
|
|
|
@ -13,14 +13,12 @@ let
|
|||
in with lib; {
|
||||
options = {
|
||||
this.application.sway.enable = mkOption {
|
||||
default = graphical.enable;
|
||||
default = false;
|
||||
type = with types; bool;
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
this.graphical.protocol = "Wayland";
|
||||
|
||||
home-manager.users.james = {
|
||||
home.sessionVariables = { XDG_CURRENT_DESKTOP = "sway"; };
|
||||
systemd.user.sessionVariables = { XDG_CURRENT_DESKTOP = "sway"; };
|
||||
|
|
|
@ -3,12 +3,8 @@ with lib;
|
|||
let
|
||||
in {
|
||||
|
||||
options.this.graphical.enable =
|
||||
mkEnableOption "Does this actually need X/Wayland";
|
||||
|
||||
options.this.graphical.protocol = mkOption {
|
||||
type = types.enum [ "X11" "Wayland" ];
|
||||
default = null;
|
||||
options.this.graphical = {
|
||||
enable = mkEnableOption "Does this actually need X/Wayland";
|
||||
};
|
||||
|
||||
imports = [ ./applications ./lang ./system ];
|
||||
|
|
Reference in New Issue
Block a user