Skip to content

Commit

Permalink
feat: swayfx fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
nekowinston committed Aug 12, 2024
1 parent b4cfeb3 commit 02ff41c
Show file tree
Hide file tree
Showing 7 changed files with 67 additions and 22 deletions.
2 changes: 1 addition & 1 deletion home/apps/colorscheme-sync.nix
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ in
settings = {
lat = config.location.latitude;
lng = config.location.longitude;
useGeoclue = false;
usegeoclue = false;
};
lightModeScripts = {
gtk-theme = ''
Expand Down
14 changes: 13 additions & 1 deletion home/apps/kitty.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand All @@ -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";
};
Expand Down
11 changes: 6 additions & 5 deletions home/apps/sway.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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."*" = {
Expand All @@ -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
{
Expand Down
1 change: 1 addition & 0 deletions machines/common/linux/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
./cosmic.nix
./gnome.nix
./greeter.nix
./hyprland.nix
./input.nix
./network.nix
./podman.nix
Expand Down
44 changes: 34 additions & 10 deletions machines/common/linux/greeter.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};
};

Expand Down
8 changes: 8 additions & 0 deletions machines/common/linux/hyprland.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{ config, lib, ... }:

{
config = lib.mkIf (config.dotfiles.desktop == "hyprland") {
programs.hyprland.enable = true;
services.hypridle.enable = true;
};
}
9 changes: 4 additions & 5 deletions machines/common/linux/sway.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
};

Expand Down

0 comments on commit 02ff41c

Please sign in to comment.