diff --git a/nixos/home/apps/applications.nix b/nixos/home/apps/applications.nix index d9e8261..09f630a 100644 --- a/nixos/home/apps/applications.nix +++ b/nixos/home/apps/applications.nix @@ -33,6 +33,7 @@ inkscape gnome-disk-utility qbittorrent + prismlauncher (writeShellScriptBin "nvidia-offload" '' export __NV_PRIME_RENDER_OFFLOAD=1 diff --git a/nixos/home/desktop/hyprland/hyprlock.nix b/nixos/home/desktop/hyprland/hyprlock.nix index 8ce935a..4095333 100644 --- a/nixos/home/desktop/hyprland/hyprlock.nix +++ b/nixos/home/desktop/hyprland/hyprlock.nix @@ -50,6 +50,61 @@ echo "$battery_percentage% $battery_icon" '') + (writeShellScriptBin "battery-hyprlock-legacy" '' + show_avg=0 + show_charging=0 + show_plugged=0 + short_output=0 + + if [[ $# -eq 0 || " $* " == *" --help "* ]]; then + echo "Usage: $0 [--avg] [--charging] [--plugged] [--full] [--short]" + echo " --avg Show average battery percentage" + echo " --charging Show how many batteries are charging" + echo " --plugged Show if system is plugged in" + echo " --full Uses all show arguments" + echo " --short Use short output format" + exit 0 + fi + + for arg in "$@"; do + case $arg in + --avg) show_avg=1 ;; + --charging) show_charging=1 ;; + --plugged) show_plugged=1 ;; + --short) short_output=1 ;; + --full) show_avg=1; show_charging=1; show_plugged=1 ;; + *) echo "Unknown option: $arg"; echo "Use --help for usage."; exit 1 ;; + esac + done + + batteries=(/sys/class/power_supply/BAT*) + total=0 + count=0 + charging=0 + plugged_in=$(cat /sys/class/power_supply/AC*/online) + + for bat in "''${batteries[@]}"; do + capacity=$(cat "$bat/capacity") + status=$(cat "$bat/status") + total=$((total + capacity)) + count=$((count + 1)) + [[ "$status" == "Charging" ]] && charging=$((charging + 1)) + done + avg=$((total / count)) + + output=() + + if [[ $short_output -eq 1 ]]; then + [[ $show_avg -eq 1 ]] && output+=("$avg ") + [[ $show_charging -eq 1 ]] && output+=("$charging/$count ") + [[ $show_plugged -eq 1 ]] && output+=("$plugged_in ") + echo "''${output[*]}" + else + [[ $show_avg -eq 1 ]] && echo "Avg: $avg%" + [[ $show_charging -eq 1 ]] && echo "Charging: $charging/$count" + [[ $show_plugged -eq 1 ]] && echo "Plugged: $plugged_in" + fi'') + (writeShellScriptBin "playerctl-hyprlock" '' if [ $# -eq 0 ]; then diff --git a/nixos/home/packages/programming/git.nix b/nixos/home/packages/programming/git.nix index 947beb8..cc29c60 100644 --- a/nixos/home/packages/programming/git.nix +++ b/nixos/home/packages/programming/git.nix @@ -13,7 +13,7 @@ programs.git = { enable = true; userName = "${userSettings.username}"; - userEmail = "sigma@goon.cz"; + userEmail = "sigma@goon.com"; lfs.enable = true; }; diff --git a/nixos/home/packages/tools/oh-my-posh.nix b/nixos/home/packages/tools/oh-my-posh.nix index bd0d1a7..4d4b549 100644 --- a/nixos/home/packages/tools/oh-my-posh.nix +++ b/nixos/home/packages/tools/oh-my-posh.nix @@ -148,9 +148,5 @@ #useTheme = "catppuccin_mocha"; useTheme = "kali"; }; - - home.packages = with pkgs; [ - oh-my-posh - ]; }; }