Initial
This commit is contained in:
commit
24a865004a
94 changed files with 6074 additions and 0 deletions
13
modules/home/scripts/default.nix
Normal file
13
modules/home/scripts/default.nix
Normal 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; })
|
||||
];
|
||||
}
|
18
modules/home/scripts/keybinds.nix
Normal file
18
modules/home/scripts/keybinds.nix
Normal 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"
|
||||
|
||||
''
|
9
modules/home/scripts/nvidia-offload.nix
Normal file
9
modules/home/scripts/nvidia-offload.nix
Normal 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 "$@"
|
||||
''
|
10
modules/home/scripts/rofi-launcher.nix
Normal file
10
modules/home/scripts/rofi-launcher.nix
Normal 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
|
||||
''
|
||||
|
5
modules/home/scripts/screenshotit.nix
Normal file
5
modules/home/scripts/screenshotit.nix
Normal file
|
@ -0,0 +1,5 @@
|
|||
{ pkgs }:
|
||||
|
||||
pkgs.writeShellScriptBin "screenshotit" ''
|
||||
grim -g "$(slurp)" - | swappy -f -
|
||||
''
|
6
modules/home/scripts/volumedown.nix
Normal file
6
modules/home/scripts/volumedown.nix
Normal 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@)"
|
||||
''
|
6
modules/home/scripts/volumemute.nix
Normal file
6
modules/home/scripts/volumemute.nix
Normal 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@)"
|
||||
''
|
6
modules/home/scripts/volumeup.nix
Normal file
6
modules/home/scripts/volumeup.nix
Normal 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@)"
|
||||
''
|
Loading…
Add table
Add a link
Reference in a new issue