more changes, all should work pretty nicely now
This commit is contained in:
@@ -1,9 +0,0 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
home.packages = with pkgs; [ blueman ];
|
||||
services = {
|
||||
mpris-proxy.enable = true;
|
||||
blueman-applet.enable = true;
|
||||
};
|
||||
}
|
||||
@@ -1,47 +0,0 @@
|
||||
{
|
||||
config,
|
||||
inputs,
|
||||
lib,
|
||||
pkgs,
|
||||
osConfig,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
hyprpicker
|
||||
hyprlock
|
||||
hypridle
|
||||
hyprpaper
|
||||
hyprland-protocols
|
||||
inputs.hyprsunset
|
||||
# inputs.hyprsysteminfo
|
||||
# hyprpolkit -- not in nixpkgs yet
|
||||
];
|
||||
|
||||
imports = [
|
||||
./waybar.nix
|
||||
];
|
||||
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
package = inputs.hyprland.packages.${pkgs.system}.hyprland;
|
||||
|
||||
xwayland.enable = true;
|
||||
systemd.enable = true;
|
||||
|
||||
# Tell home-manager not to manage the config file
|
||||
extraConfig = "";
|
||||
};
|
||||
|
||||
lib.inputMethod.fcitx5.waylandFrontend = true;
|
||||
|
||||
programs = {
|
||||
hyprlock.enable = true;
|
||||
};
|
||||
|
||||
services = {
|
||||
hyprpaper.enable = true;
|
||||
hypridle.enable = true;
|
||||
};
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
notif_id=$1
|
||||
|
||||
bat_alert_lvl=15
|
||||
bat_lvl=$(grep "" /sys/class/power_supply/BAT0/capacity )
|
||||
bat_status=$(grep Discharging /sys/class/power_supply/BAT0/status )
|
||||
|
||||
if (( $bat_lvl < $bat_alert_lvl )) && [ $bat_status == "Discharging" ]; then
|
||||
dunstify -u critical "Low Battery" "Connect Power Adapter" -i /usr/share/icons/Adwaita/symbolic/status/battery-caution-symbolic.svg -r $notif_id -t 60000
|
||||
else
|
||||
hist_check=$(dunstctl history | grep $notif_id)
|
||||
if [[ $hist_check == "" ]]; then
|
||||
dunstctl close
|
||||
fi
|
||||
dunstctl history-rm $notif_id
|
||||
fi
|
||||
|
||||
|
||||
@@ -1,83 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
notify='dunstify'
|
||||
|
||||
muteToggleNotify() {
|
||||
volume=$(pamixer --get-volume)
|
||||
muted=$(pamixer --get-mute)
|
||||
|
||||
icon=""
|
||||
|
||||
if [ $muted == "true" ]; then
|
||||
str="Muted"
|
||||
icon="audio-volume-muted"
|
||||
else
|
||||
if [ $volume -eq 0 ]; then
|
||||
icon="audio-volume-low"
|
||||
elif [ $volume -le 30 ]; then
|
||||
icon="audio-volume-medium"
|
||||
elif [ $volume -le 70 ]; then
|
||||
icon="audio-volume-high"
|
||||
else
|
||||
icon="audio-volume-muted"
|
||||
fi
|
||||
str="Unmuted"
|
||||
fi
|
||||
|
||||
$notify -a volume_indicator -h string:x-canonical-private-synchronous:audio "$str" -h int:value:"$volume" -t 1500 --icon $icon
|
||||
}
|
||||
|
||||
notifyMuted() {
|
||||
volume=$(pamixer --get-volume)
|
||||
muted=$(pamixer --get-mute)
|
||||
$notify -a volume_indicator -h string:x-canonical-private-synchronous:audio "Muted" -h int:value:"$volume" -t 1500 --icon audio-volume-muted
|
||||
}
|
||||
|
||||
notifyAudio() {
|
||||
volume=$(pamixer --get-volume)
|
||||
muted=$(pamixer --get-mute)
|
||||
|
||||
$muted && notifyMuted "$volume" && return
|
||||
|
||||
if [ $volume -eq 0 ]; then
|
||||
notifyMuted "$volume"
|
||||
elif [ $volume -le 30 ]; then
|
||||
$notify --appname=volume_indicator -h string:x-canonical-private-synchronous:audio "Volume: " -h int:value:"$volume" -t 1500 --icon audio-volume-low
|
||||
elif [ $volume -le 70 ]; then
|
||||
$notify --appname=volume_indicator -h string:x-canonical-private-synchronous:audio "Volume: " -h int:value:"$volume" -t 1500 --icon audio-volume-medium
|
||||
else
|
||||
$notify --appname=volume_indicator -h string:x-canonical-private-synchronous:audio "Volume: " -h int:value:"$volume" -t 1500 --icon audio-volume-high
|
||||
fi
|
||||
}
|
||||
|
||||
notifyBrightness() {
|
||||
base_brightness=$(brightnessctl g)
|
||||
brightness=$(( $(( $base_brightness * 5 )) + 5 ))
|
||||
if [ $brightness -eq 0 ]; then
|
||||
$notify --appname=brightness_indicator -h string:x-canonical-private-synchronous:brightness "Brightness: " -h int:value:"$brightness" -t 1500 --icon display-brightness-symbolic
|
||||
elif [ $brightness -le 30 ]; then
|
||||
$notify --appname=brightness_indicator -h string:x-canonical-private-synchronous:brightness "Brightness: " -h int:value:"$brightness" -t 1500 --icon display-brightness-symbolic
|
||||
elif [ $brightness -le 70 ]; then
|
||||
$notify --appname=brightness_indicator -h string:x-canonical-private-synchronous:brightness "Brightness: " -h int:value:"$brightness" -t 1500 --icon display-brightness-symbolic
|
||||
else
|
||||
$notify --appname=brightness_indicator -h string:x-canonical-private-synchronous:brightness "Brightness: " -h int:value:"$brightness" -t 1500 --icon display-brightness-symbolic
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
case "$1" in
|
||||
mute)
|
||||
muteToggleNotify
|
||||
;;
|
||||
audio)
|
||||
notifyAudio
|
||||
;;
|
||||
brightness)
|
||||
notifyBrightness
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Invalid Arguments:"
|
||||
echo "$1"
|
||||
exit 2
|
||||
esac
|
||||
Reference in New Issue
Block a user