updated home/scripts
This commit is contained in:
parent
f63a236b90
commit
6acf7a6d5d
4 changed files with 34 additions and 35 deletions
|
|
@ -1,20 +1,6 @@
|
|||
{ pkgs, config, homeDir, ... }:
|
||||
{ pkgs, wallpaper, ... }:
|
||||
let
|
||||
|
||||
battery-notif = pkgs.writeShellScriptBin "battery-notif" ''
|
||||
# Send notifications when low on battery and not in charge
|
||||
while true; do
|
||||
battery_level=$(cat /sys/class/power_supply/BAT*/capacity)
|
||||
battery_status=$(cat /sys/class/power_supply/BAT*/status)
|
||||
if [[ $battery_level -le 20 ]] && [[ $battery_status == "Discharging" ]]; then
|
||||
${pkgs.libnotify}/bin/notify-send " Low battery" "Battery level is $battery_level%"
|
||||
elif [[ $battery_level -le 10 ]] && [[ $battery_status == "Discharging" ]]; then
|
||||
${pkgs.libnotify}/bin/notify-send --urgency=critical " Very low battery" "Battery level is $battery_level%"
|
||||
fi
|
||||
sleep 60
|
||||
done
|
||||
'';
|
||||
|
||||
startup = pkgs.writeShellScriptBin "startup" ''
|
||||
# Because HM enabling services suck.
|
||||
|
||||
|
|
@ -22,28 +8,20 @@ let
|
|||
|
||||
systemctl --user start hyprpolkitagent
|
||||
|
||||
nicotine-plus
|
||||
|
||||
swww init & sleep 0.1
|
||||
|
||||
swww img ${config.theme.wallpaper}
|
||||
|
||||
swww img ${wallpaper}
|
||||
'';
|
||||
|
||||
startupExtra = pkgs.writeShellScriptBin "startupExtra" ''
|
||||
|
||||
otd-gui
|
||||
|
||||
vesktop
|
||||
|
||||
easyeffects
|
||||
|
||||
nicotine-plus
|
||||
|
||||
vesktop
|
||||
'';
|
||||
|
||||
in {
|
||||
home.packages = [
|
||||
startup
|
||||
startupExtra
|
||||
battery-notif
|
||||
];
|
||||
}
|
||||
in { home.packages = [ startup startupExtra ]; }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue