hyprland: split some config to its own module
This commit is contained in:
parent
2e72b14d49
commit
7b80013e74
|
@ -197,16 +197,11 @@ in
|
|||
extraConfig = /*hyprlang*/ ''
|
||||
exec-once=foot --server
|
||||
|
||||
exec-once=swww-daemon
|
||||
exec-once=bash -c "sleep 10; hypridle"
|
||||
exec-once=waybar
|
||||
exec-once=nm-applet
|
||||
exec-once=pasystray
|
||||
|
||||
source=${config.home.homeDirectory}/.cache/wallust/hyprland.conf
|
||||
exec-once=sleep 0.2 && swww img ${config.home.homeDirectory}/.cache/wallpaper/current
|
||||
|
||||
exec-once=bash -c "sleep 10; until ping -c 1 web.whatsapp.com; do sleep 1; done; whatsapp-for-linux"
|
||||
exec-once=bash -c "sleep 10; until ping -c 1 discord.com; do sleep 1; done; discord"
|
||||
exec-once=bash -c "sleep 10; until ping -c 1 google.com; do sleep 1; done; slack"
|
||||
exec-once=bash -c "sleep 10; until ping -c 1 nextcloud.tigor.web.id; do sleep 1; done; nextcloud --background"
|
||||
|
|
|
@ -22,7 +22,7 @@ in
|
|||
config = lib.mkIf cfg.enable {
|
||||
home.packages = [
|
||||
unstable.pyprland
|
||||
unstable.swww
|
||||
pkgs.swww
|
||||
];
|
||||
home.file.".config/hypr/pyprland.toml".source =
|
||||
let
|
||||
|
@ -40,7 +40,11 @@ in
|
|||
};
|
||||
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
exec-once = [ "pypr" ];
|
||||
exec-once = [
|
||||
"pypr"
|
||||
"swww-daemon"
|
||||
"sleep 0.2 && swww img ${config.home.homeDirectory}/.cache/wallpaper/current"
|
||||
];
|
||||
bind = [
|
||||
"$mod, W, exec, pypr wall next"
|
||||
];
|
||||
|
|
|
@ -148,6 +148,7 @@ in
|
|||
rofi-wayland
|
||||
];
|
||||
wayland.windowManager.hyprland.settings.exec-once = [
|
||||
"sleep 1 && waybar"
|
||||
"wl-paste --watch cliphist store"
|
||||
];
|
||||
programs.waybar = {
|
||||
|
|
|
@ -6,35 +6,8 @@ in
|
|||
config = lib.mkIf cfg.enable {
|
||||
home.packages = [ pkgs.whatsapp-for-linux ];
|
||||
|
||||
systemd.user = lib.mkIf cfg.autostart {
|
||||
services.whatsapp = {
|
||||
Unit = {
|
||||
Description = "WhatsApp for Linux";
|
||||
Wants = [ "graphical.target" ];
|
||||
After = [ "nss-lookup.target" ];
|
||||
StartLimitIntervalSec = 300;
|
||||
StartLimitBurst = 10;
|
||||
};
|
||||
Service =
|
||||
let
|
||||
bash = "${pkgs.bash}/bin/bash";
|
||||
ping = "${pkgs.unixtools.ping}/bin/ping";
|
||||
host = "web.whatsapp.com";
|
||||
sleep = "${pkgs.coreutils}/bin/sleep";
|
||||
whatsapp = "${pkgs.whatsapp-for-linux}/bin/whatsapp-for-linux";
|
||||
exec = ''${bash} -c "until ${ping} -c 1 ${host}; do ${sleep} 1; done; ${whatsapp}"'';
|
||||
in
|
||||
{
|
||||
Type = "simple";
|
||||
ExecStartPre = "${sleep} 10";
|
||||
ExecStart = exec;
|
||||
Restart = "on-failure";
|
||||
RemainAfterExit = "yes";
|
||||
};
|
||||
Install = {
|
||||
WantedBy = [ "default.target" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
wayland.windowManager.hyprland.settings.exec-once = lib.mkIf cfg.autostart [
|
||||
"sleep 10; until ${pkgs.unixtools.ping}/bin/ping -c 1 web.whatsapp.com; do sleep 1; done; whatsapp-for-linux"
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -50,7 +50,10 @@ in
|
|||
};
|
||||
discord.enable = true;
|
||||
slack.enable = true;
|
||||
whatsapp.enable = true;
|
||||
whatsapp = {
|
||||
enable = true;
|
||||
autostart = true;
|
||||
};
|
||||
obs.enable = true;
|
||||
avahi.enable = true;
|
||||
steam.enable = true;
|
||||
|
|
Loading…
Reference in a new issue