Reworked KDE Theme reminder to be a popup. Fixed Trayscale not working by default.
This commit is contained in:
47
plasma/autostart.nix
Normal file → Executable file
47
plasma/autostart.nix
Normal file → Executable file
@ -1,12 +1,16 @@
|
||||
{ config, pkgs, ... }:
|
||||
{
|
||||
|
||||
#To show logs of services run: journalctl --user-unit={service-name} --user
|
||||
|
||||
systemd.user.services.set-wallpaper = {
|
||||
enable = true;
|
||||
description = "Set KDE Plasma wallpaper";
|
||||
#after = [ "plasma-desktop.service" ];
|
||||
serviceConfig.ExecStart = [ "/run/current-system/sw/bin/plasma-apply-wallpaperimage /etc/nixos/other/wallpaper.png" ];
|
||||
wantedBy = [ "graphical-session.target" ];
|
||||
serviceConfig = {
|
||||
ExecStart = [ "/run/current-system/sw/bin/plasma-apply-wallpaperimage /etc/nixos/other/wallpaper.png" ];
|
||||
|
||||
Type = "oneshot";
|
||||
Restart = "on-failure";
|
||||
RestartSec = "5s";
|
||||
@ -17,9 +21,10 @@
|
||||
enable = true;
|
||||
description = "Automatically start Yakuake";
|
||||
after = [ "graphical-session.target" ];
|
||||
serviceConfig.ExecStart = [ "${pkgs.kdePackages.yakuake}/bin/yakuake" ];
|
||||
wantedBy = [ "graphical-session.target" ];
|
||||
serviceConfig = {
|
||||
ExecStart = [ "${pkgs.kdePackages.yakuake}/bin/yakuake" ];
|
||||
|
||||
Type = "oneshot";
|
||||
Restart = "on-failure";
|
||||
RestartSec = "5s";
|
||||
@ -27,16 +32,34 @@
|
||||
};
|
||||
};
|
||||
|
||||
systemd.user.services.theme-set-reminder = {
|
||||
enable = true;
|
||||
description = "Remind the user to apply the custom Plasma Theme shipped with this NixOS";
|
||||
after = [ "graphical-session.target" ];
|
||||
wantedBy = [ "graphical-session.target" ];
|
||||
serviceConfig = {
|
||||
# ExecStart = [ "${pkgs.kdePackages.kdialog}/bin/kdialog --passivepopup \"Dont forget to apply custom system theme! (run kde-theme-apply in terminal)\"" ];
|
||||
ExecStart = [ "/etc/nixos/plasma/theme-popup.sh" ];
|
||||
|
||||
Type = "oneshot";
|
||||
Restart = "on-failure";
|
||||
RestartSec = "5s";
|
||||
# Environment = "PATH=/run/current-system/sw/bin:/etc/profiles/per-user/$USER/bin";
|
||||
# Environment = "DISPLAY=:0";
|
||||
};
|
||||
};
|
||||
|
||||
systemd.user.services.autostart-trayscale = {
|
||||
enable = true;
|
||||
description = "Automatically start Trayscale";
|
||||
#after = [ "plasma-desktop.service" ];
|
||||
serviceConfig.ExecStart = [ "${pkgs.trayscale}/bin/trayscale --hide-window" ];
|
||||
wantedBy = [ "default.target" ];
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
Restart = "on-failure";
|
||||
RestartSec = "5s";
|
||||
};
|
||||
enable = true;
|
||||
description = "Automatically start Trayscale";
|
||||
#after = [ "plasma-desktop.service" ];
|
||||
wantedBy = [ "default.target" ];
|
||||
serviceConfig = {
|
||||
ExecStart = [ "${pkgs.trayscale}/bin/trayscale --hide-window" ];
|
||||
|
||||
Type = "oneshot";
|
||||
Restart = "on-failure";
|
||||
RestartSec = "5s";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
9
plasma/kde-plasma.nix
Normal file → Executable file
9
plasma/kde-plasma.nix
Normal file → Executable file
@ -32,13 +32,11 @@ in
|
||||
# variant = "";
|
||||
#};
|
||||
|
||||
#theme-reminder uses a definitive /home/cookiez path!!!
|
||||
system.activationScripts.script.text = ''
|
||||
source /etc/nixos/other/colors.sh
|
||||
source /etc/nixos/other/pfp.sh
|
||||
source /etc/nixos/other/pfp.sh
|
||||
|
||||
source /etc/nixos/plasma/theme-reminder.sh
|
||||
'';
|
||||
'';
|
||||
|
||||
#services.displayManager.sddm = {
|
||||
# enable = true;
|
||||
@ -55,7 +53,4 @@ in
|
||||
# background = "${background-package}"
|
||||
# '')
|
||||
];
|
||||
|
||||
|
||||
programs.steam.enable = true;
|
||||
}
|
||||
|
||||
0
plasma/konsave.sh
Normal file → Executable file
0
plasma/konsave.sh
Normal file → Executable file
11
plasma/theme-popup.sh
Executable file
11
plasma/theme-popup.sh
Executable file
@ -0,0 +1,11 @@
|
||||
#!/bin/sh
|
||||
|
||||
sleep 15
|
||||
FLAG_FILE="/home/cookiez/.flags/theme-flag"
|
||||
|
||||
|
||||
if [ ! -f "$FLAG_FILE" ]; then
|
||||
/run/current-system/sw/bin/kdialog --passivepopup "Dont forget to apply custom system theme! (run kde-theme-apply in terminal)" 60
|
||||
fi
|
||||
|
||||
echo "Finished Popup Script!"
|
||||
@ -1,9 +0,0 @@
|
||||
source /etc/nixos/other/colors.sh
|
||||
FLAG_FILE="/home/cookiez/.flags/theme-flag"
|
||||
|
||||
if [ ! -f "$FLAG_FILE" ]; then
|
||||
echo -e "${RED}Warning: Make sure to apply the custom system theme!${NOCOLOR} (source '/etc/nixos/plasma/konsave.sh')"
|
||||
fi
|
||||
#else
|
||||
# echo "Flag file exists - Theme should be applied already!"
|
||||
#fi
|
||||
0
plasma/theme.knsv
Normal file → Executable file
0
plasma/theme.knsv
Normal file → Executable file
Reference in New Issue
Block a user