From 772411cd39370bca3a89b5ee92bda3c5ea8e1b7e Mon Sep 17 00:00:00 2001 From: JaKooLit Date: Wed, 12 Feb 2025 12:52:11 +0900 Subject: updated Keyhints and added Keyhints in the Window rules. --- config/hypr/UserConfigs/WindowRules.conf | 3 ++ config/hypr/scripts/KeyHints.sh | 57 ++++++++++---------------------- copy.sh | 20 +++++++---- 3 files changed, 35 insertions(+), 45 deletions(-) diff --git a/config/hypr/UserConfigs/WindowRules.conf b/config/hypr/UserConfigs/WindowRules.conf index fc23c079..01c5e674 100644 --- a/config/hypr/UserConfigs/WindowRules.conf +++ b/config/hypr/UserConfigs/WindowRules.conf @@ -76,6 +76,7 @@ windowrulev2 = tag +viewer, class:^(eog|org.gnome.Loupe)$ # image viewer # POSITION # windowrulev2 = center,floating:1 # warning, it cause even the menu to float and center. +windowrulev2 = center, title:^(KooL Quick Cheat Sheet)$ windowrulev2 = center, class:([Tt]hunar), title:negative:(.*[Tt]hunar.*) windowrulev2 = center, title:^(ROG Control)$ windowrulev2 = center, title:^(Keybindings)$ @@ -106,6 +107,7 @@ windowrulev2 = workspace 6 silent, class:^(.virt-manager-wrapped)$ windowrulev2 = workspace 9 silent, tag:multimedia* # FLOAT +windowrulev2 = float, title:^(KooL Quick Cheat Sheet)$ windowrulev2 = float, tag:wallpaper* windowrulev2 = float, tag:settings* windowrulev2 = float, tag:viewer* @@ -147,6 +149,7 @@ windowrulev2 = opacity 0.95 0.75, title:^(Picture-in-Picture)$ # SIZE +windowrulev2 = size 70% 90%, title:^(KooL Quick Cheat Sheet)$ windowrulev2 = size 70% 70%, tag:wallpaper* windowrulev2 = size 70% 70%, tag:settings* windowrulev2 = size 60% 70%, class:^([Ww]hatsapp-for-linux)$ diff --git a/config/hypr/scripts/KeyHints.sh b/config/hypr/scripts/KeyHints.sh index 49ee7e52..52e3ce41 100755 --- a/config/hypr/scripts/KeyHints.sh +++ b/config/hypr/scripts/KeyHints.sh @@ -1,44 +1,22 @@ #!/bin/bash # /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ## -# Keyhints. Idea got from Garuda Hyprland # GDK BACKEND. Change to either wayland or x11 if having issues BACKEND=wayland -# Check if rofi is running and kill it if it is -if pgrep -x "rofi" > /dev/null; then - pkill rofi +# Check if rofi or yad is running and kill them if they are +if pidof rofi > /dev/null; then + pkill rofi fi -# Detect monitor resolution and scale -x_mon=$(hyprctl -j monitors | jq '.[] | select(.focused==true) | .width') -y_mon=$(hyprctl -j monitors | jq '.[] | select(.focused==true) | .height') -hypr_scale=$(hyprctl -j monitors | jq '.[] | select (.focused == true) | .scale' | sed 's/\.//') - -# Calculate width and height based on percentages and monitor resolution -width=$((x_mon * hypr_scale / 100)) -height=$((y_mon * hypr_scale / 100)) - -# Set maximum width and height -max_width=1200 -max_height=1000 - -# Set percentage of screen size for dynamic adjustment -percentage_width=90 -percentage_height=100 - -# Calculate dynamic width and height -dynamic_width=$((width * percentage_width / 100)) -dynamic_height=$((height * percentage_height / 100)) - -# Limit width and height to maximum values -dynamic_width=$(($dynamic_width > $max_width ? $max_width : $dynamic_width)) -dynamic_height=$(($dynamic_height > $max_height ? $max_height : $dynamic_height)) +if pidof yad > /dev/null; then + pkill yad +fi # Launch yad with calculated width and height -GDK_BACKEND=$BACKEND yad --width=$dynamic_width --height=$dynamic_height \ +GDK_BACKEND=$BACKEND yad \ --center \ - --title="Keybindings" \ + --title="KooL Quick Cheat Sheet" \ --no-buttons \ --list \ --column=Key: \ @@ -49,10 +27,11 @@ GDK_BACKEND=$BACKEND yad --width=$dynamic_width --height=$dynamic_height \ " SHIFT K" "Searchable Keybinds" "(Search all Keybinds via rofi)" \ "" "" "" \ " enter" "Terminal" "(kitty)" \ -" SHIFT enter" "DropDown Terminal" "(Not available in Debian and Ubuntu)" \ +" SHIFT enter" "DropDown Terminal" "(kitty-pyprland)" \ +" SHIFT K" "Searchable Keybinds" "(Keybinds)" \ " A" "Desktop Overview" "(AGS Overview)" \ " D" "Application Launcher" "(rofi-wayland)" \ -" T" "Open File Manager" "(Thunar)" \ +" E" "Open File Manager" "(Thunar)" \ " S" "Google Search using rofi" "(rofi)" \ " Q" "close active window" "(not kill)" \ " Shift Q " "kills an active window" "(kill)" \ @@ -61,7 +40,7 @@ GDK_BACKEND=$BACKEND yad --width=$dynamic_width --height=$dynamic_height \ " W" "Choose wallpaper" "(Wallpaper Menu)" \ " Shift W" "Choose wallpaper effects" "(imagemagick + swww)" \ "CTRL ALT W" "Random wallpaper" "(via swww)" \ -" B" "Hide/UnHide Waybar" "waybar" \ +" CTRL ALT B" "Hide/UnHide Waybar" "waybar" \ " CTRL B" "Choose waybar styles" "(waybar styles)" \ " ALT B" "Choose waybar layout" "(waybar layout)" \ " ALT R" "Reload Waybar swaync Rofi" "CHECK NOTIFICATION FIRST!!!" \ @@ -75,17 +54,17 @@ GDK_BACKEND=$BACKEND yad --width=$dynamic_width --height=$dynamic_height \ "CTRL ALT P" "power-menu" "(wlogout)" \ "CTRL ALT L" "screen lock" "(hyprlock)" \ "CTRL ALT Del" "Hyprland Exit" "(SAVE YOUR WORK!!!)" \ -" F" "Fullscreen" "Toggles to full screen" \ +" SHIFT F" "Fullscreen" "Toggles to full screen" \ " CTL F" "Fake Fullscreen" "Toggles to fake full screen" \ " ALT L" "Toggle Dwindle | Master Layout" "Hyprland Layout" \ -" Shift F" "Toggle float" "single window" \ -" ALT F" "Toggle all windows to float" "all windows" \ -" Shift B" "Toggle Blur" "normal or less blur" \ +" SPACEBAR" "Toggle float" "single window" \ +" ALT SPACEBAR" "Toggle all windows to float" "all windows" \ +" ALT O" "Toggle Blur" "normal or less blur" \ " Shift A" "Animations Menu" "Choose Animations via rofi" \ " SHIFT G" "Gamemode! All animations OFF or ON" "toggle" \ " ALT E" "Rofi Emoticons" "Emoticon" \ " ALT V" "Clipboard Manager" "cliphist" \ -" H" "Launch this app" "" \ -" E" "View or EDIT Keybinds, Settings, Monitor" "" \ +" H" "Launch this QUICK CHEAT" "" \ +" SHIFT E" "View or EDIT Keybinds, Settings, Monitor" "" \ "" "" "" \ "More tips:" "https://github.com/JaKooLit/Hyprland-Dots/wiki" ""\ diff --git a/copy.sh b/copy.sh index ba642acb..467d7fb1 100755 --- a/copy.sh +++ b/copy.sh @@ -31,14 +31,20 @@ if [[ $EUID -eq 0 ]]; then exit 1 fi -printf "\n%.0s" {1..2} +printf "\n%.0s" {1..1} echo -e "\e[35m - ╦╔═┌─┐┌─┐╦ ╔╦╗┌─┐┌┬┐┌─┐ - ╠╩╗│ ││ │║ ║║│ │ │ └─┐ 2025 - ╩ ╩└─┘└─┘╩═╝ ═╩╝└─┘ ┴ └─┘ + ╦╔═┌─┐┌─┐╦ ╔╦╗┌─┐┌┬┐┌─┐ + ╠╩╗│ ││ │║ ║║│ │ │ └─┐ 2025 + ╩ ╩└─┘└─┘╩═╝ ═╩╝└─┘ ┴ └─┘ \e[0m" printf "\n%.0s" {1..1} - + +####### Announcement +echo "${MAGENTA} H - E - L - L - O !${RESET}" +echo "${SKY_BLUE}KooL Hyprland v2.3.11 have some Minor Keybinds changes!${RESET}" +echo "${YELLOW}SUPER H for Keyhints and/or SUPER SHIFT K to search for Keybinds ${RESET}" +printf "\n%.0s" {1..1} + # Create Directory for Copy Logs if [ ! -d Copy-Logs ]; then mkdir Copy-Logs @@ -99,6 +105,8 @@ if [ -d "$HOME/.icons/Bibata-Modern-Ice/hyprcursors" ]; then sed -i 's/^#env = HYPRCURSOR_SIZE,24/env = HYPRCURSOR_SIZE,24/' "$HYPRCURSOR_ENV_FILE" fi +printf "\n%.0s" {1..1} + # Function to detect keyboard layout using localectl or setxkbmap detect_layout() { if command -v localectl >/dev/null 2>&1; then @@ -151,7 +159,7 @@ ${MAGENTA} NOTE:${RESET} done fi -printf "${NOTE} Detecting keyboard layout to prepare proper Hyprland Settings\n\n" +printf "${NOTE} Detecting keyboard layout to prepare proper Hyprland Settings\n" # Prompt the user to confirm whether the detected layout is correct while true; do -- cgit v1.2.3