Gen 423: Converted shell scripts into nix files
This commit is contained in:
12
glasshouse-laptop/home/scripts/keybinds.nix
Normal file
12
glasshouse-laptop/home/scripts/keybinds.nix
Normal file
@@ -0,0 +1,12 @@
|
||||
{ pkgs }:
|
||||
|
||||
{
|
||||
keybinds = pkgs.writeShellScriptBin "keybinds" (''
|
||||
#!/usr/bin/env bash
|
||||
|
||||
config_file=~/.config/hypr/hyprland.conf
|
||||
keybinds=$(grep -oP '(?<=bind=).*' $config_file)
|
||||
keybinds=$(echo "$keybinds" | sed 's/,\([^,]*\)$/ = \1/' | sed 's/, exec//g' | sed 's/^,//g')
|
||||
rofi -dmenu -theme-str 'window {width: 50%;}' <<< "$keybinds"
|
||||
'');
|
||||
}
|
||||
Reference in New Issue
Block a user