Switch to uwsm
Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
@@ -4,7 +4,7 @@ export default () => (
|
||||
<button
|
||||
className="launcher"
|
||||
onClickRelease={() =>
|
||||
execAsync('bash -c "rofi -cache-dir $XDG_CACHE_HOME/rofi -show drun"')
|
||||
execAsync('bash -c "rofi -cache-dir $XDG_CACHE_HOME/rofi -show drun -run-command \"uwsm app -- {cmd}\""')
|
||||
}
|
||||
>
|
||||
<icon className="icon" icon="nix-snowflake-symbolic" />;
|
||||
|
@@ -39,6 +39,8 @@ in
|
||||
theme.template.".config/astal/theme.sass".source = ./theme.sass;
|
||||
|
||||
systemd.user = {
|
||||
services.ags.Unit.After = [ "graphical-session.target" ];
|
||||
|
||||
targets.tray.Unit = {
|
||||
BindsTo = [ "ags.service" ];
|
||||
After = [
|
||||
|
@@ -11,8 +11,5 @@
|
||||
{
|
||||
services.blueman.enable = true;
|
||||
|
||||
home-manager.users.${user} = {
|
||||
services.blueman-applet.enable = true;
|
||||
systemd.user.services.blueman-applet.Unit.After = [ "graphical-session.target" ];
|
||||
};
|
||||
home-manager.users.${user}.services.blueman-applet.enable = true;
|
||||
}
|
||||
|
@@ -1,21 +0,0 @@
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
home ? throw "home argument is required",
|
||||
}:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
home-manager.users.${user} = {
|
||||
services.cbatticon = {
|
||||
enable = true;
|
||||
lowLevelPercent = 20;
|
||||
criticalLevelPercent = 10;
|
||||
};
|
||||
|
||||
systemd.user.services.cbatticon.Unit.After = [ "graphical-session.target" ];
|
||||
};
|
||||
}
|
@@ -21,23 +21,26 @@ in
|
||||
cliphist = {
|
||||
Unit = {
|
||||
Description = "Clipboard manager";
|
||||
BindsTo = [ "graphical-session.target" ];
|
||||
After = [
|
||||
"graphical-session.target"
|
||||
config.environment.persistence."/persist/cache"."${home}/.cache/cliphist".mount
|
||||
];
|
||||
PartOf = [ "graphical-session.target" ];
|
||||
};
|
||||
|
||||
Service.ExecStart = lib.meta.getExe (
|
||||
pkgs.writeShellApplication {
|
||||
name = "init-cliphist";
|
||||
runtimeInputs = with pkgs; [
|
||||
wl-clipboard
|
||||
cliphist
|
||||
];
|
||||
text = "exec wl-paste --watch cliphist store";
|
||||
}
|
||||
);
|
||||
Service = {
|
||||
ExecStart = lib.meta.getExe (
|
||||
pkgs.writeShellApplication {
|
||||
name = "init-cliphist";
|
||||
runtimeInputs = with pkgs; [
|
||||
wl-clipboard
|
||||
cliphist
|
||||
];
|
||||
text = "exec wl-paste --watch cliphist store";
|
||||
}
|
||||
);
|
||||
Restart = "on-failure";
|
||||
};
|
||||
|
||||
Install.WantedBy = [ "graphical-session.target" ];
|
||||
};
|
||||
@@ -45,23 +48,26 @@ in
|
||||
cliphist-image = {
|
||||
Unit = {
|
||||
Description = "Clipboard manager (images)";
|
||||
BindsTo = [ "graphical-session.target" ];
|
||||
After = [
|
||||
"graphical-session.target"
|
||||
config.environment.persistence."/persist/cache"."${home}/.cache/cliphist".mount
|
||||
];
|
||||
PartOf = [ "graphical-session.target" ];
|
||||
};
|
||||
|
||||
Service.ExecStart = lib.meta.getExe (
|
||||
pkgs.writeShellApplication {
|
||||
name = "init-cliphist-image";
|
||||
runtimeInputs = with pkgs; [
|
||||
wl-clipboard
|
||||
cliphist
|
||||
];
|
||||
text = "exec wl-paste --type image --watch cliphist store";
|
||||
}
|
||||
);
|
||||
Service = {
|
||||
ExecStart = lib.meta.getExe (
|
||||
pkgs.writeShellApplication {
|
||||
name = "init-cliphist-image";
|
||||
runtimeInputs = with pkgs; [
|
||||
wl-clipboard
|
||||
cliphist
|
||||
];
|
||||
text = "exec wl-paste --type image --watch cliphist store";
|
||||
}
|
||||
);
|
||||
Restart = "on-failure";
|
||||
};
|
||||
|
||||
Install.WantedBy = [ "graphical-session.target" ];
|
||||
};
|
||||
|
@@ -20,13 +20,17 @@
|
||||
})
|
||||
];
|
||||
|
||||
programs.hyprland.enable = true;
|
||||
programs.hyprland = {
|
||||
enable = true;
|
||||
withUWSM = true;
|
||||
};
|
||||
|
||||
home-manager.users.${user} = {
|
||||
imports = [ ./options.nix ];
|
||||
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
systemd.enable = false;
|
||||
|
||||
settings = {
|
||||
"$mod" = "Super";
|
||||
@@ -47,7 +51,7 @@
|
||||
);
|
||||
in
|
||||
[
|
||||
"$mod, Return, exec, $term"
|
||||
"$mod, Return, exec, uwsm app -- $term"
|
||||
|
||||
"$mod, 1, exec, ${bindHelper} 1"
|
||||
"$mod, 2, exec, ${bindHelper} 2"
|
||||
@@ -96,7 +100,7 @@
|
||||
"$mod, Space, centerwindow"
|
||||
"$mod, q, killactive"
|
||||
|
||||
"Ctrl_Alt, Delete, exit"
|
||||
"Ctrl_Alt, Delete, exec, uwsm stop"
|
||||
];
|
||||
|
||||
binde = [
|
||||
@@ -157,8 +161,8 @@
|
||||
};
|
||||
|
||||
programs.zsh.loginExtra = lib.mkAfter ''
|
||||
if [ -z "$WAYLAND_DISPLAY" ] && [ -n "$XDG_VTNR" ] && [ "$XDG_VTNR" -eq 1 ]; then
|
||||
Hyprland 2> >(systemd-cat -p err -t hyprland) 1> >(systemd-cat -p info -t hyprland)
|
||||
if uwsm check may-start; then
|
||||
exec uwsm start hyprland-uwsm.desktop
|
||||
fi
|
||||
'';
|
||||
|
||||
|
@@ -12,18 +12,6 @@ in
|
||||
with lib;
|
||||
with types;
|
||||
{
|
||||
initExtraConfig = mkOption {
|
||||
type = lines;
|
||||
default = "";
|
||||
description = "Extra configuration lines to add to exec-once";
|
||||
};
|
||||
|
||||
reloadExtraConfig = mkOption {
|
||||
type = lines;
|
||||
default = "";
|
||||
description = "Extra configuration lines to add to exec";
|
||||
};
|
||||
|
||||
onMonitorChange.services = mkOption {
|
||||
type = listOf str;
|
||||
default = [ ];
|
||||
@@ -31,37 +19,29 @@ in
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
wayland.windowManager.hyprland.initExtraConfig =
|
||||
lib.mkIf (cfg.onMonitorChange.services != [ ])
|
||||
"${
|
||||
lib.meta.getExe (
|
||||
pkgs.writeShellApplication {
|
||||
name = "hyprland-monitor-change-services";
|
||||
runtimeInputs = with pkgs; [
|
||||
socat
|
||||
systemd
|
||||
];
|
||||
runtimeEnv.SERVICES = lib.strings.concatStringsSep " " cfg.onMonitorChange.services;
|
||||
text = builtins.readFile ./scripts/monitors.sh;
|
||||
}
|
||||
)
|
||||
} &";
|
||||
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
exec-once = lib.meta.getExe (
|
||||
pkgs.writeShellApplication {
|
||||
name = "init-hyprland";
|
||||
text = cfg.initExtraConfig;
|
||||
}
|
||||
);
|
||||
|
||||
exec = lib.meta.getExe (
|
||||
pkgs.writeShellApplication {
|
||||
name = "reload-hyprland";
|
||||
text = cfg.reloadExtraConfig;
|
||||
}
|
||||
);
|
||||
config.systemd.user.services.hyprland-monitor-watcher = {
|
||||
Unit = {
|
||||
Description = "Restarts services on monitor change";
|
||||
After = [ "graphical-session.target" ];
|
||||
PartOf = [ "graphical-session.target" ];
|
||||
};
|
||||
|
||||
Service = {
|
||||
ExecStart = lib.meta.getExe (
|
||||
pkgs.writeShellApplication {
|
||||
name = "hyprland-monitor-watcher";
|
||||
runtimeInputs = with pkgs; [
|
||||
socat
|
||||
systemd
|
||||
];
|
||||
runtimeEnv.SERVICES = lib.strings.concatStringsSep " " cfg.onMonitorChange.services;
|
||||
text = builtins.readFile ./scripts/monitors.sh;
|
||||
}
|
||||
);
|
||||
|
||||
Restart = "on-failure";
|
||||
};
|
||||
|
||||
Install.WantedBy = [ "graphical-session.target" ];
|
||||
};
|
||||
}
|
||||
|
@@ -33,17 +33,17 @@
|
||||
);
|
||||
in
|
||||
[
|
||||
", Print, exec, ${hyprshot} -m output -m active -f ${filename}"
|
||||
"Ctrl, Print, exec, ${hyprshot} -m output -m active -f ${filename} -- ${swappyWrapper}"
|
||||
", Print, exec, uwsm app -- ${hyprshot} -m output -m active -f ${filename}"
|
||||
"Ctrl, Print, exec, uwsm app -- ${hyprshot} -m output -m active -f ${filename} -- ${swappyWrapper}"
|
||||
|
||||
"$mod, s, exec, ${hyprshot} -m output -m active -f ${filename}"
|
||||
"$mod_Ctrl, s, exec, ${hyprshot} -m output -m active -f ${filename} -- ${swappyWrapper}"
|
||||
"$mod, s, exec, uwsm app -- ${hyprshot} -m output -m active -f ${filename}"
|
||||
"$mod_Ctrl, s, exec, uwsm app -- ${hyprshot} -m output -m active -f ${filename} -- ${swappyWrapper}"
|
||||
|
||||
", XF86SelectiveScreenshot, exec, ${hyprshot} -m region -z -f ${filename}"
|
||||
"Ctrl, XF86SelectiveScreenshot, exec, ${hyprshot} -m region -z -f ${filename} -- ${swappyWrapper}"
|
||||
", XF86SelectiveScreenshot, exec, uwsm app -- ${hyprshot} -m region -z -f ${filename}"
|
||||
"Ctrl, XF86SelectiveScreenshot, exec, uwsm app -- ${hyprshot} -m region -z -f ${filename} -- ${swappyWrapper}"
|
||||
|
||||
"$mod_Shift, S, exec, ${hyprshot} -m region -z -f ${filename}"
|
||||
"$mod_Shift_Ctrl, S, exec, ${hyprshot} -m region -z -f ${filename} -- ${swappyWrapper}"
|
||||
"$mod_Shift, S, exec, uwsm app -- ${hyprshot} -m region -z -f ${filename}"
|
||||
"$mod_Shift_Ctrl, S, exec, uwsm app -- ${hyprshot} -m region -z -f ${filename} -- ${swappyWrapper}"
|
||||
];
|
||||
};
|
||||
}
|
||||
|
@@ -7,6 +7,5 @@
|
||||
home-manager.users.${user} = {
|
||||
home.packages = with pkgs; [ networkmanagerapplet ];
|
||||
services.network-manager-applet.enable = true;
|
||||
systemd.user.services.network-manager-applet.Unit.After = [ "graphical-session.target" ];
|
||||
};
|
||||
}
|
||||
|
@@ -35,7 +35,7 @@
|
||||
};
|
||||
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
bind = [ ", XF86Calculator, exec, ${lib.meta.getExe pkgs.qalculate-gtk}" ];
|
||||
bind = [ ", XF86Calculator, exec, uwsm app -- ${lib.meta.getExe pkgs.qalculate-gtk}" ];
|
||||
windowrulev2 = [ "float, class:(qalculate-gtk)" ];
|
||||
};
|
||||
};
|
||||
|
@@ -22,7 +22,7 @@ in
|
||||
};
|
||||
|
||||
wayland.windowManager.hyprland.settings.bind = [
|
||||
"$mod, r, exec, ${lib.meta.getExe hmConfig.programs.rofi.finalPackage} -cache-dir ${home}/.cache/rofi -modi drun,window -show drun"
|
||||
"$mod, r, exec, ${lib.meta.getExe hmConfig.programs.rofi.finalPackage} -cache-dir ${home}/.cache/rofi -modi drun,window -show drun -run-command \"uwsm app -- {cmd}\""
|
||||
];
|
||||
};
|
||||
}
|
||||
|
@@ -20,6 +20,7 @@
|
||||
localNetworkGameTransfers.openFirewall = true;
|
||||
extest.enable = true;
|
||||
protontricks.enable = true;
|
||||
extraCompatPackages = with pkgs; [ proton-ge-bin ];
|
||||
};
|
||||
|
||||
gamescope = {
|
||||
@@ -33,53 +34,47 @@
|
||||
gamemode.enable = true;
|
||||
};
|
||||
|
||||
home-manager.users.${user} = {
|
||||
systemd.user = {
|
||||
services.steam-ln =
|
||||
let
|
||||
steamLn = lib.meta.getExe (
|
||||
pkgs.writeShellApplication {
|
||||
name = "steam-ln";
|
||||
runtimeInputs = with pkgs; [ coreutils ];
|
||||
text = builtins.readFile ./steam-ln.sh;
|
||||
}
|
||||
);
|
||||
in
|
||||
{
|
||||
Unit = {
|
||||
Description = "Sync Steam games with Games directory";
|
||||
After = [
|
||||
config.environment.persistence."/persist/state"."${home}/.local/share/Steam".mount
|
||||
config.environment.persistence."/persist/user"."${home}/Games".mount
|
||||
];
|
||||
DefaultDependencies = false;
|
||||
};
|
||||
|
||||
Service = {
|
||||
ExecStart = steamLn;
|
||||
Type = "oneshot";
|
||||
};
|
||||
|
||||
Install.WantedBy = [ "graphical-session.target" ];
|
||||
};
|
||||
|
||||
paths.steam-ln = {
|
||||
home-manager.users.${user}.systemd.user = {
|
||||
services.steam-ln =
|
||||
let
|
||||
steamLn = lib.meta.getExe (
|
||||
pkgs.writeShellApplication {
|
||||
name = "steam-ln";
|
||||
runtimeInputs = with pkgs; [ coreutils ];
|
||||
text = builtins.readFile ./steam-ln.sh;
|
||||
}
|
||||
);
|
||||
in
|
||||
{
|
||||
Unit = {
|
||||
Description = "Monitor Steam games directory for changes";
|
||||
Description = "Sync Steam games with Games directory";
|
||||
After = [
|
||||
config.environment.persistence."/persist/state"."${home}/.local/share/Steam".mount
|
||||
config.environment.persistence."/persist/user"."${home}/Games".mount
|
||||
];
|
||||
DefaultDependencies = false;
|
||||
};
|
||||
|
||||
Path.PathChanged = "${home}/.local/share/Steam/steamapps/common";
|
||||
Install.WantedBy = [ "graphical-session.target" ];
|
||||
};
|
||||
};
|
||||
Service = {
|
||||
ExecStart = steamLn;
|
||||
Type = "oneshot";
|
||||
};
|
||||
|
||||
home = {
|
||||
packages = with pkgs; [ protonup ];
|
||||
sessionVariables.STEAM_EXTRA_COMPAT_TOOLS_PATHS = "${home}/.steam/root/compatibilitytools.d";
|
||||
Install.WantedBy = [ "default.target" ];
|
||||
};
|
||||
|
||||
paths.steam-ln = {
|
||||
Unit = {
|
||||
Description = "Monitor Steam games directory for changes";
|
||||
After = [
|
||||
config.environment.persistence."/persist/state"."${home}/.local/share/Steam".mount
|
||||
config.environment.persistence."/persist/user"."${home}/Games".mount
|
||||
];
|
||||
};
|
||||
|
||||
Path.PathChanged = "${home}/.local/share/Steam/steamapps/common";
|
||||
|
||||
Install.WantedBy = [ "default.target" ];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
@@ -34,21 +34,19 @@ in
|
||||
systemd.user.services.swww = {
|
||||
Unit = {
|
||||
Description = "Wallpaper daemon";
|
||||
BindsTo = [ "graphical-session.target" ];
|
||||
After = [
|
||||
"graphical-session.target"
|
||||
config.environment.persistence."/persist/cache"."${home}/.cache/swww".mount
|
||||
];
|
||||
PartOf = [ "graphical-session.target" ];
|
||||
};
|
||||
|
||||
Service = {
|
||||
Type = "forking";
|
||||
|
||||
ExecStart = lib.meta.getExe (
|
||||
pkgs.writeShellApplication {
|
||||
name = "init-swww";
|
||||
runtimeInputs = with pkgs; [ swww ];
|
||||
text = "exec swww init";
|
||||
text = "exec swww-daemon -q";
|
||||
}
|
||||
);
|
||||
|
||||
@@ -61,6 +59,8 @@ in
|
||||
text = "exec swww kill";
|
||||
}
|
||||
);
|
||||
|
||||
Restart = "on-failure";
|
||||
};
|
||||
|
||||
Install.WantedBy = [ "graphical-session.target" ];
|
||||
|
@@ -49,8 +49,8 @@
|
||||
../common/configs/system/zsh
|
||||
|
||||
./configs/git
|
||||
./configs/globalprotect
|
||||
./configs/pki
|
||||
./configs/vpn
|
||||
|
||||
./users/nikara
|
||||
];
|
||||
|
@@ -1,18 +0,0 @@
|
||||
(
|
||||
charge_control_end_threshold: 60,
|
||||
disable_nvidia_powerd_on_battery: true,
|
||||
ac_command: "",
|
||||
bat_command: "",
|
||||
platform_profile_linked_epp: true,
|
||||
platform_profile_on_battery: Quiet,
|
||||
change_platform_profile_on_battery: true,
|
||||
platform_profile_on_ac: Quiet,
|
||||
change_platform_profile_on_ac: true,
|
||||
profile_quiet_epp: Power,
|
||||
profile_balanced_epp: BalancePower,
|
||||
profile_custom_epp: Performance,
|
||||
profile_performance_epp: Performance,
|
||||
ac_profile_tunings: {},
|
||||
dc_profile_tunings: {},
|
||||
armoury_settings: {},
|
||||
)
|
@@ -91,7 +91,26 @@
|
||||
enable = true;
|
||||
# FIXME: https://gitlab.com/asus-linux/asusctl/-/issues/532
|
||||
# enableUserService = true;
|
||||
asusdConfig.source = ./asusd.ron;
|
||||
asusdConfig.text = ''
|
||||
(
|
||||
charge_control_end_threshold: 60,
|
||||
disable_nvidia_powerd_on_battery: true,
|
||||
ac_command: "",
|
||||
bat_command: "",
|
||||
platform_profile_linked_epp: true,
|
||||
platform_profile_on_battery: Quiet,
|
||||
change_platform_profile_on_battery: true,
|
||||
platform_profile_on_ac: Quiet,
|
||||
change_platform_profile_on_ac: true,
|
||||
profile_quiet_epp: Power,
|
||||
profile_balanced_epp: BalancePower,
|
||||
profile_custom_epp: Performance,
|
||||
profile_performance_epp: Performance,
|
||||
ac_profile_tunings: {},
|
||||
dc_profile_tunings: {},
|
||||
armoury_settings: {},
|
||||
)
|
||||
'';
|
||||
};
|
||||
|
||||
supergfxd = {
|
||||
|
Reference in New Issue
Block a user