diff --git a/profiles/graphical/default.nix b/profiles/graphical/default.nix index 15ea42f9..d50a12ef 100644 --- a/profiles/graphical/default.nix +++ b/profiles/graphical/default.nix @@ -4,6 +4,7 @@ imports = [ ./secret.nix ../../programs/dropbox/default.nix + ../../programs/i3/default.nix ../../programs/kitty/default.nix ../../programs/syncthing/default.nix ../../programs/sway/default.nix @@ -90,6 +91,10 @@ if [[ -z "$DISPLAY" ]] && [[ $(tty) = "/dev/tty1" ]]; then exec sway fi + + if [[ -z "$DISPLAY" ]] && [[ $(tty) = "/dev/tty2" ]]; then + exec startx + fi ''; dconf.settings = { "org/gnome/desktop/interface" = { diff --git a/programs/i3/default.nix b/programs/i3/default.nix new file mode 100644 index 00000000..0615170b --- /dev/null +++ b/programs/i3/default.nix @@ -0,0 +1,56 @@ +with import {}; +{ ... }: +let + launcher = import ../sway/launcher.nix { inherit pkgs stdenv; }; + status-configuration = import ../sway/status-configuration.nix { inherit pkgs; }; +in +{ + services.xserver = { + enable = true; + displayManager.startx.enable = true; + libinput = { + enable = true; + disableWhileTyping = true; + scrollMethod = "twofinger"; + tapping = true; + tappingDragLock = true; + }; + xkbVariant = "altgr-intl"; + }; + home-manager.users.charlotte = { pkgs, ... }: { + home.packages = [ pkgs.xorg.xauth ]; + home.file.".xinitrc".text = "source ~/.xsession"; + xsession = { + enable = true; + numlock.enable = true; + windowManager.i3 = { + enable = true; + config = { + bars = [ + { + colors = { + background = "#fbffff"; + statusline = "#535c65"; + focusedWorkspace = { background = "#2b7ab2"; border = "#2b7ab2"; text = "#fbffff"; }; + activeWorkspace = { background = "#6d7782"; border = "#6d7782"; text = "#fbffff"; }; + inactiveWorkspace = { background = "#fbffff"; border = "#fbffff"; text = "535c65"; }; + urgentWorkspace = { background = "#ae5865"; border = "#ae5865"; text = "#fbffff"; }; + }; + fonts = [ "Fira Code Normal 9" ]; + position = "top"; + statusCommand = "${pkgs.i3status-rust}/bin/i3status-rs ${status-configuration}"; + } + ]; + floating.criteria = [ { class = "launcher"; } { class = "accentor.Main"; } ]; + fonts = [ "Fira Code Normal 9" ]; + menu = "${pkgs.kitty}/bin/kitty --class launcher -e ${launcher}/bin/launcher"; + modifier = "Mod4"; + terminal = "${pkgs.kitty}/bin/kitty"; + }; + extraConfig = '' + default_border pixel + ''; + }; + }; + }; +}