This commit is contained in:
marked 2025-03-29 19:05:05 +01:00
commit 24a865004a
94 changed files with 6074 additions and 0 deletions

View file

@ -0,0 +1,13 @@
{ pkgs, username, ... }:
{
home.packages = [
(import ./keybinds.nix { inherit pkgs; })
(import ./rofi-launcher.nix { inherit pkgs; })
(import ./screenshotit.nix { inherit pkgs; })
(import ./volumeup.nix { inherit pkgs; })
(import ./volumedown.nix { inherit pkgs; })
(import ./volumemute.nix { inherit pkgs; })
(import ./nvidia-offload.nix { inherit pkgs; })
];
}

View file

@ -0,0 +1,18 @@
{ pkgs }:
pkgs.writeShellScriptBin "list-keybinds" ''
# check if rofi is already running
if pidof rofi > /dev/null; then
pkill rofi
fi
msg=' NOTE : Clicking with Mouse or Pressing ENTER will have NO function'
keybinds=$(cat ~/.config/hypr/hyprland.conf | grep -E '^bind')
# replace #modifier with SUPER in the displayed keybinds for rofi
display_keybinds=$(echo "$keybinds" | sed 's/\$modifier/SUPER/g')
# use rofi to display the keybinds with the modified content
echo "$display_keybinds" | rofi -dmenu -i -config ~/.config/rofi/config-long.rasi -mesg "$msg"
''

View file

@ -0,0 +1,9 @@
{ pkgs }:
pkgs.writeShellScriptBin "nvidia-offload" ''
export __NV_PRIME_RENDER_OFFLOAD=1
export __NV_PRIME_RENDER_OFFLOAD_PROVIDER=NVIDIA-GO
export __GLX_VENDOR_LIBRARY_NAME=nvidia
export __VK_LAYER_NV_optimus=NVIDIA_only
exec "$@"
''

View file

@ -0,0 +1,10 @@
{ pkgs }:
pkgs.writeShellScriptBin "rofi-launcher" ''
# check if rofi is already running
if pidof rofi > /dev/null; then
pkill rofi
fi
rofi -show drun
''

View file

@ -0,0 +1,5 @@
{ pkgs }:
pkgs.writeShellScriptBin "screenshotit" ''
grim -g "$(slurp)" - | swappy -f -
''

View file

@ -0,0 +1,6 @@
{ pkgs }:
pkgs.writeShellScriptBin "volumedown" ''
wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-
notify-send -t 1250 "$(wpctl get-volume @DEFAULT_AUDIO_SINK@)"
''

View file

@ -0,0 +1,6 @@
{ pkgs }:
pkgs.writeShellScriptBin "volumemute" ''
wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle
notify-send -t 1250 "$(wpctl get-volume @DEFAULT_AUDIO_SINK@)"
''

View file

@ -0,0 +1,6 @@
{ pkgs }:
pkgs.writeShellScriptBin "volumeup" ''
wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+
notify-send -t 1250 "$(wpctl get-volume @DEFAULT_AUDIO_SINK@)"
''