using a modified version of jakoolits keybind script and fixing scripts

This commit is contained in:
Tyler Kelley 2025-02-17 14:50:36 -06:00
parent c2e17fbf15
commit 499a65cfd8
7 changed files with 325 additions and 371 deletions

View File

@ -68,6 +68,5 @@
v4l-utils v4l-utils
virt-viewer virt-viewer
wget wget
yad
]; ];
} }

View File

@ -1,21 +1,20 @@
{ pkgs, username, host, ... }:
{ {
pkgs,
username,
...
}: {
home.packages = [ home.packages = [
(import ./emopicker9000.nix { inherit pkgs; }) (import ./emopicker9000.nix {inherit pkgs;})
(import ./task-waybar.nix { inherit pkgs; }) (import ./keybinds.nix {inherit pkgs;})
(import ./squirtle.nix { inherit pkgs; }) (import ./task-waybar.nix {inherit pkgs;})
(import ./nvidia-offload.nix { inherit pkgs; }) (import ./squirtle.nix {inherit pkgs;})
(import ./nvidia-offload.nix {inherit pkgs;})
(import ./wallsetter.nix { (import ./wallsetter.nix {
inherit pkgs; inherit pkgs;
inherit username; inherit username;
}) })
(import ./web-search.nix { inherit pkgs; }) (import ./web-search.nix {inherit pkgs;})
(import ./rofi-launcher.nix { inherit pkgs; }) (import ./rofi-launcher.nix {inherit pkgs;})
(import ./screenshootin.nix { inherit pkgs; }) (import ./screenshootin.nix {inherit pkgs;})
(import ./list-hypr-bindings.nix {
inherit pkgs;
inherit host;
})
]; ];
} }

View File

@ -0,0 +1,15 @@
{pkgs}:
pkgs.writeShellScriptBin "list-keybinds" ''
# check if rofi is already running
if pidof rofi > /dev/null; then
pkill rofi
fi
rofi_theme="$HOME/.config/rofi/config-wide.rasi"
msg=' NOTE : Clicking with Mouse or Pressing ENTER will have NO function'
keybinds=$(cat ~/.config/hypr/hyprland.conf | grep modifier)
# use rofi to display the keybinds with the modified content
echo "$keybinds" | rofi -dmenu -i -config "$rofi_theme" -mesg "$msg"
''

View File

@ -1,62 +0,0 @@
{ pkgs, host, ... }:
let
inherit (import ../../../hosts/${host}/variables.nix) terminal browser;
in
pkgs.writeShellScriptBin "list-hypr-bindings" ''
yad --width=800 --height=650 \
--center \
--fixed \
--title="Hyprland Keybindings" \
--no-buttons \
--list \
--column=Key: \
--column=Description: \
--column=Command: \
--timeout=90 \
--timeout-indicator=right \
" = Windows/Super/CAPS LOCK" "Modifier Key, used for keybindings" "Doesn't really execute anything by itself." \
" + ENTER" "Terminal" "${terminal}" \
" + SHIFT + ENTER" "App Launcher" "rofi" \
" + ALT + W" "Change Wallpaper" "wallsetter" \
" + Q" "Kill Focused Window" "killactive" \
" + SHIFT + W" "Search Websites Like Nix Packages" "web-search" \
" + SHIFT + N" "Reload SwayNC Styling" "swaync-client -rs" \
" + W" "Launch Web Browser" "${browser}" \
" + E" "Launch Emoji Selector" "emopicker9000" \
" + S" "Take Screenshot" "screenshootin" \
" + D" "Launch Discord" "discord" \
" + O" "Launch OBS" "obs" \
" + G" "Launch GIMP" "gimp" \
" + N" "Launch New File Browser Window" "thunar" \
" + M" "Launch Spotify" "spotify" \
" + P" "Pseudo Tiling" "pseudo" \
" + SHIFT + I" "Toggle Split Direction" "togglesplit" \
" + F" "Toggle Focused Fullscreen" "fullscreen" \
" + SHIFT + F" "Toggle Focused Floating" "fullscreen" \
" + SHIFT + C" "Quit / Exit Hyprland" "exit" \
" + Left" "Move Focus To Window On The Left" "movefocus,l" \
" + Right" "Move Focus To Window On The Right" "movefocus,r" \
" + Up" "Move Focus To Window On The Up" "movefocus,u" \
" + Down" "Move Focus To Window On The Down" "movefocus,d" \
" + SHIFT + Left" "Move Focused Window Left" "movewindow,l" \
" + SHIFT + Right" "Move Focused Window Right" "movewindow,r" \
" + SHIFT + Up" "Move Focused Window Up" "movewindow,u" \
" + SHIFT + Down" "Move Focused Window Down" "movewindow,d" \
" + H" "Move Focus To Window On The Left" "movefocus,l" \
" + L" "Move Focus To Window On The Right" "movefocus,r" \
" + K" "Move Focus To Window On The Up" "movefocus,u" \
" + J" "Move Focus To Window On The Down" "movefocus,d" \
" + SHIFT + H" "Move Focused Window Left" "movewindow,l" \
" + SHIFT + L" "Move Focused Window Right" "movewindow,r" \
" + SHIFT + K" "Move Focused Window Up" "movewindow,u" \
" + SHIFT + J" "Move Focused Window Down" "movewindow,d" \
" + SPACE" "Toggle Special Workspace" "togglespecialworkspace" \
" + SHIFT + SPACE" "Send Focused Window To Special Workspace" "movetoworkspace,special" \
" + 1-0" "Move To Workspace 1 - 10" "workspace,X" \
" + SHIFT + 1-0" "Move Focused Window To Workspace 1 - 10" "movetoworkspace,X" \
" + MOUSE_LEFT" "Move/Drag Window" "movewindow" \
" + MOUSE_RIGHT" "Resize Window" "resizewindow" \
"ALT + TAB" "Cycle Window Focus + Bring To Front" "cyclenext & bringactivetotop" \
""
''

View File

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

View File

@ -1,5 +1,10 @@
{pkgs}: {pkgs}:
pkgs.writeShellScriptBin "web-search" '' pkgs.writeShellScriptBin "web-search" ''
# check if rofi is already running
if pidof rofi > /dev/null; then
pkill rofi
fi
declare -A URLS declare -A URLS
URLS=( URLS=(

View File

@ -4,14 +4,11 @@
host, host,
config, config,
... ...
}: }: let
let
betterTransition = "all 0.3s cubic-bezier(.55,-0.68,.48,1.682)"; betterTransition = "all 0.3s cubic-bezier(.55,-0.68,.48,1.682)";
inherit (import ../../hosts/${host}/variables.nix) clock24h; inherit (import ../../hosts/${host}/variables.nix) clock24h;
in in
with lib; with lib; {
{
# Configure & Theme Waybar # Configure & Theme Waybar
programs.waybar = { programs.waybar = {
enable = true; enable = true;
@ -20,7 +17,7 @@ with lib;
{ {
layer = "top"; layer = "top";
position = "top"; position = "top";
modules-center = [ "hyprland/workspaces" ]; modules-center = ["hyprland/workspaces"];
modules-left = [ modules-left = [
"custom/startmenu" "custom/startmenu"
"hyprland/window" "hyprland/window"
@ -49,7 +46,10 @@ with lib;
on-scroll-down = "hyprctl dispatch workspace e-1"; on-scroll-down = "hyprctl dispatch workspace e-1";
}; };
"clock" = { "clock" = {
format = if clock24h == true then '' {:L%H:%M}'' else '' {:L%I:%M %p}''; format =
if clock24h == true
then '' {:L%H:%M}''
else '' {:L%I:%M %p}'';
tooltip = true; tooltip = true;
tooltip-format = "<big>{:%A, %d.%B %Y }</big>\n<tt><small>{calendar}</small></tt>"; tooltip-format = "<big>{:%A, %d.%B %Y }</big>\n<tt><small>{calendar}</small></tt>";
}; };
@ -126,7 +126,7 @@ with lib;
"custom/hyprbindings" = { "custom/hyprbindings" = {
tooltip = false; tooltip = false;
format = "󱕴"; format = "󱕴";
on-click = "sleep 0.1 && list-hypr-bindings"; on-click = "sleep 0.1 && list-keybinds";
}; };
"idle_inhibitor" = { "idle_inhibitor" = {
format = "{icon}"; format = "{icon}";
@ -274,4 +274,4 @@ with lib;
'' ''
]; ];
}; };
} }