diff --git a/home/apps/colorscheme-sync.nix b/home/apps/colorscheme-sync.nix index f81a636..d4c3253 100644 --- a/home/apps/colorscheme-sync.nix +++ b/home/apps/colorscheme-sync.nix @@ -52,7 +52,7 @@ in settings = { lat = config.location.latitude; lng = config.location.longitude; - useGeoclue = false; + usegeoclue = false; }; lightModeScripts = { gtk-theme = '' diff --git a/home/apps/kitty.nix b/home/apps/kitty.nix index b7f9f3e..f071413 100644 --- a/home/apps/kitty.nix +++ b/home/apps/kitty.nix @@ -68,7 +68,7 @@ in "ctrl+s>m" = "detach_window ask"; # show index for easier switching, show number of panes - "ctrl+s>c" = "new_tab"; + "ctrl+s>c" = "launch --type=tab --cwd=current"; "ctrl+s>n" = "next_tab"; "ctrl+s>p" = "previous_tab"; "ctrl+s>1" = "goto_tab 1"; @@ -80,6 +80,18 @@ in "ctrl+s>7" = "goto_tab 7"; "ctrl+s>8" = "goto_tab 8"; "ctrl+s>9" = "goto_tab 9"; + "ctrl+s>0" = "goto_tab -1"; + + "super+1" = "goto_tab 1"; + "super+2" = "goto_tab 2"; + "super+3" = "goto_tab 3"; + "super+4" = "goto_tab 4"; + "super+5" = "goto_tab 5"; + "super+6" = "goto_tab 6"; + "super+7" = "goto_tab 7"; + "super+8" = "goto_tab 8"; + "super+9" = "goto_tab 9"; + "super+0" = "goto_tab -1"; "alt+enter" = "toggle_fullscreen"; }; diff --git a/home/apps/sway.nix b/home/apps/sway.nix index d9cd494..8c799c9 100644 --- a/home/apps/sway.nix +++ b/home/apps/sway.nix @@ -88,8 +88,9 @@ in { command = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1"; } ]; workspaceAutoBackAndForth = true; - terminal = "${config.programs.wezterm.package}/bin/wezterm"; - menu = "${config.programs.rofi.package}/bin/rofi"; + # TODO: change this back to wezterm whenever it works on sway + terminal = lib.getExe config.programs.kitty.package; + menu = lib.getExe config.programs.rofi.package; defaultWorkspace = "workspace number 1"; input."type:keyboard".xkb_options = "ctrl:nocaps,compose:ralt"; output."*" = { @@ -103,9 +104,9 @@ in modFocus = "${mod}+Ctrl"; hyper = "Mod4+Mod1+Shift+Ctrl"; - filebrowser = "${pkgs.nautilus}/bin/nautilus"; - screenshot = "${pkgs.sway-contrib.grimshot}/bin/grimshot copy area"; - playerctl = "${pkgs.playerctl}/bin/playerctl"; + filebrowser = lib.getExe pkgs.nautilus; + screenshot = "${lib.getExe pkgs.sway-contrib.grimshot} copy area"; + playerctl = lib.getExe pkgs.playerctl; swayosd = pkgs.swayosd + "/bin/swayosd-client"; in { diff --git a/machines/common/linux/default.nix b/machines/common/linux/default.nix index 5932165..0667ae8 100644 --- a/machines/common/linux/default.nix +++ b/machines/common/linux/default.nix @@ -5,6 +5,7 @@ ./cosmic.nix ./gnome.nix ./greeter.nix + ./hyprland.nix ./input.nix ./network.nix ./podman.nix diff --git a/machines/common/linux/greeter.nix b/machines/common/linux/greeter.nix index ad750dd..bc4fba8 100644 --- a/machines/common/linux/greeter.nix +++ b/machines/common/linux/greeter.nix @@ -4,18 +4,42 @@ pkgs, ... }: +let + condition = ( + builtins.elem config.dotfiles.desktop [ + "hyprland" + "sway" + ] + ); +in { - config = lib.mkIf (config.dotfiles.desktop == "sway") { - services.greetd = { + config = lib.mkIf condition { + programs.regreet = { enable = true; - settings.default_session = { - command = lib.concatStringsSep " " [ - "${pkgs.greetd.tuigreet}/bin/tuigreet" - "--remember" - "--remember-user-session" - "--sessions=${config.programs.sway.package}/share/wayland-sessions:${config.programs.hyprland.package}/share/wayland-sessions" - ]; - user = "greeter"; + settings = { + background = { + path = ../../../home/wallpapers/dhm_1610.png; + fit = "Cover"; + }; + GTK = { + cursor_theme_name = "macOS-Monterey"; + font_name = "IBM Plex Sans 16"; + icon_theme_name = "WhiteSur"; + theme_name = "WhiteSur-Dark"; + }; + }; + font.name = "IBM Plex Sans"; + cursorTheme = { + name = "macOS-Monterey"; + package = pkgs.apple-cursor; + }; + iconTheme = { + name = "WhiteSur-Dark"; + package = pkgs.whitesur-icon-theme; + }; + theme = { + name = "WhiteSur-Dark"; + package = pkgs.whitesur-gtk-theme; }; }; diff --git a/machines/common/linux/hyprland.nix b/machines/common/linux/hyprland.nix new file mode 100644 index 0000000..0b0bfc4 --- /dev/null +++ b/machines/common/linux/hyprland.nix @@ -0,0 +1,8 @@ +{ config, lib, ... }: + +{ + config = lib.mkIf (config.dotfiles.desktop == "hyprland") { + programs.hyprland.enable = true; + services.hypridle.enable = true; + }; +} diff --git a/machines/common/linux/sway.nix b/machines/common/linux/sway.nix index 26abbb4..2cca1df 100644 --- a/machines/common/linux/sway.nix +++ b/machines/common/linux/sway.nix @@ -26,8 +26,6 @@ environment.pathsToLink = [ "/share/nautilus-python/extensions" ]; environment.sessionVariables.NAUTILUS_4_EXTENSION_DIR = "${config.system.path}/lib/nautilus/extensions-4"; - programs.hyprland.enable = true; - programs.sway = { enable = true; package = pkgs.swayfx; @@ -56,16 +54,17 @@ services.dbus.packages = with pkgs; [ darkman nautilus-open-any-terminal - # gcr needed for gnome3 pinentry, managed in Home-Manager - gcr ]; xdg.portal = { enable = true; - wlr.enable = true; + config.sway = { + "org.freedesktop.impl.portal.Settings" = [ "darkman" ]; + }; extraPortals = with pkgs; [ darkman xdg-desktop-portal-gtk ]; + wlr.enable = true; xdgOpenUsePortal = true; };