diff --git a/config/hypr/UserConfigs/ENVariables.conf b/config/hypr/UserConfigs/ENVariables.conf index d5ca0273..b83480f3 100644 --- a/config/hypr/UserConfigs/ENVariables.conf +++ b/config/hypr/UserConfigs/ENVariables.conf @@ -11,11 +11,19 @@ env = XDG_CURRENT_DESKTOP,Hyprland env = XDG_SESSION_DESKTOP,Hyprland env = XDG_SESSION_TYPE,wayland +# xwayland apps scale fix (useful if you are use monitor scaling) +# see https://wiki.hyprland.org/Configuring/XWayland/ +# toolkit-specific scale +# env = GDK_SCALE,2 + # vulkan #env = WLR_RENDERER,vulkan # firefox env = MOZ_ENABLE_WAYLAND,1 firefox +# electron >28 apps (may help) +env = ELECTRON_OZONE_PLATFORM_HINT,auto + # Cursor size env = XCURSOR_SIZE,1 diff --git a/config/hypr/UserConfigs/UserKeybinds.conf b/config/hypr/UserConfigs/UserKeybinds.conf index 7e895b97..fc044019 100644 --- a/config/hypr/UserConfigs/UserKeybinds.conf +++ b/config/hypr/UserConfigs/UserKeybinds.conf @@ -31,17 +31,17 @@ bind = ALT, Q, exec, qutebrowser # FEATURES / EXTRAS bind = SHIFT_ALT, R, exec, $RunCMD reload_all bind = $mainMod_SHIFT, D, exec, $RunCMD toggle_touchpad -bind = $mainMod_SHIFT, A, exec, $RunCMD gamemode +bind = $mainMod_SHIFT, G, exec, $RunCMD gamemode bind = $mainMod, PERIOD, exec, $RunCMD emoji bind = ALT, F3, exec, $RunCMD kb_changer -bind = $mainMod_SHIFT, Q, exec, $RunCMD toggle_blur +bind = $mainMod_SHIFT, B, exec, $RunCMD toggle_blur bind = $mainMod, space, exec, $RunCMD change_layout bind = SHIFT_ALT, C, exec, $RunCMD clip bind = SHIFT_ALT, E, exec, $RunCMD edit bind = $mainMod, W, exec, $RunCMD select_wall bind = SHIFT_ALT,W, exec, $RunCMD random_wall bind = $mainMod_SHIFT, W, exec, $RunCMD apply_wallpaper_effects -bind = $mainMod, F1, exec, $RunCMD keybind +bind = $mainMod, F1, exec, $scriptsDir/KeyHints.sh bind = $mainMod_SHIFT, N, exec, swaync-client -C bind = $mainMod, COMMA, exec, pypr zoom bind = ALT, COMMA, exec, pypr zoom +1 diff --git a/config/hypr/UserConfigs/UserSettings.conf b/config/hypr/UserConfigs/UserSettings.conf index 68496472..b37335cc 100644 --- a/config/hypr/UserConfigs/UserSettings.conf +++ b/config/hypr/UserConfigs/UserSettings.conf @@ -137,3 +137,8 @@ binds { xwayland { force_zero_scaling = true } + +# cursor section for Hyprland v0.41.0 or newer +#cursor { +# enable_hyprcursor = true +#} diff --git a/config/hypr/configs/Keybinds.conf b/config/hypr/configs/Keybinds.conf index 9e41a7f1..05ee7bbe 100644 --- a/config/hypr/configs/Keybinds.conf +++ b/config/hypr/configs/Keybinds.conf @@ -18,6 +18,8 @@ bind = $mainMod SHIFT, M, exec, hyprctl dispatch splitratio -0.3 bind = $mainMod, C, killactive, #quit app bind = $mainMod_SHIFT, C, closewindow, bind = $mainMod, F, exec, hyprctl dispatch togglefloating && hyprctl dispatch centerwindow 1 +bind = $mainMod ALT, F, exec, hyprctl dispatch workspaceopt allfloat +bind = $mainMod SHIFT, F, togglefloating, bind = CTRL_ALT, Delete, exit, #exit hyprland bind = $mainMod_SHIFT, Space, fullscreen, 0 bind = $mainMod_SHIFT, O, toggleopaque diff --git a/config/hypr/initial-boot.sh b/config/hypr/initial-boot.sh index a47a3843..95f4cda6 100644 --- a/config/hypr/initial-boot.sh +++ b/config/hypr/initial-boot.sh @@ -5,7 +5,7 @@ # THIS SCRIPT CAN BE DELETED ONCE SUCCESSFULLY BOOTED!! # Variables -wallpaper=$HOME/Pictures/wallpapers/lord_krishn.jpg +wallpaper=$HOME/Pictures/wallpapers/wall-03.png kvantum_theme="Darker" swww="swww img" diff --git a/config/hypr/scripts/KeyHints.sh b/config/hypr/scripts/KeyHints.sh new file mode 100755 index 00000000..3aba1ba1 --- /dev/null +++ b/config/hypr/scripts/KeyHints.sh @@ -0,0 +1,67 @@ +#!/bin/bash +# Keyhints. Idea got from Garuda Hyprland + +# 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=70 +percentage_height=70 + +# 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)) + +# Launch yad with calculated width and height +yad --width=$dynamic_width --height=$dynamic_height \ + --center \ + --title="Keybindings" \ + --no-buttons \ + --list \ + --column=Key: \ + --column=Description: \ + --column=Command: \ + --timeout-indicator=bottom \ +"ESC" "close this app" "" "=" "SUPER KEY (Windows Key)" "(SUPER KEY)" \ +" enter" "Terminal" "(kitty)" \ +"SHIFT ALT enter" "DropDown Terminal" "(kitty-pyprland)" \ +" D" "App Launcher" "(rofi-wayland)" \ +" E" "Open File Manager" "(Thunar)" \ +" C" "close active window" "(not kill)" \ +" Shift C " "closes a specified window" "(window)" \ +" ," "Desktop Zoom" "(pyprland)" \ +"SHIFT Alt C" "Clipboard Manager" "(cliphist)" \ +" W" "Choose wallpaper" "(Wallpaper Menu)" \ +" Shift W" "Choose wallpaper effects" "(imagemagick + swww)" \ +"SHIFT ALT W" "Random wallpaper" "(via swww)" \ +" H" "Hide/UnHide Waybar" "waybar" \ +" ALT R" "Reload Waybar swaync Rofi" "CHECK NOTIFICATION FIRST!!!" \ +" Print" "screenshot" "(grim)" \ +" Z" "screenshot region" "(grim + slurp)" \ +"CTRL ALT P" "power-menu" "(wlogout)" \ +"CTRL ALT L" "screen lock" "(hyprlock)" \ +"CTRL ALT Del" "Hyprland Exit" "(SAVE YOUR WORK!!!)" \ +" SHIFT Space" "Fullscreen" "Toggles to full screen" \ +" Space" "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" \ +" SHIFT G" "Gamemode! All animations OFF or ON" "toggle" \ +" ALT E" "Rofi Emoticons" "Emoticon" \ +" F1" "Launch this app" "" \ +"SHIFT ALT E" "View or EDIT Keybinds, Settings, Monitor" "" \ +"" "" "" \ diff --git a/config/hypr/scripts/RunCMD.sh b/config/hypr/scripts/RunCMD.sh index ca44686c..6d86288b 100755 --- a/config/hypr/scripts/RunCMD.sh +++ b/config/hypr/scripts/RunCMD.sh @@ -6,6 +6,7 @@ source ~/dotfiles/hypr/scripts/Rofi_cmd.sh source ~/dotfiles/hypr/scripts/System_cmd.sh source ~/dotfiles/hypr/scripts/Music_cmd.sh + help() { declare -F } diff --git a/config/hypr/scripts/Xmenu.sh b/config/hypr/scripts/Xmenu.sh index 6959a865..7b020899 100755 --- a/config/hypr/scripts/Xmenu.sh +++ b/config/hypr/scripts/Xmenu.sh @@ -33,7 +33,7 @@ declare -A menu_options=( ["cb Clipboard"]="$RunCMD clip" ["rm Music"]="$RunCMD music -m" ["emj Emoji"]="$RunCMD emoji" - ["kb Kebinds"]="$RunCMD keybind" + ["kb Kebinds"]="$RunCMD KeyHints.sh" ["qe QuickEdits"]="$RunCMD edit" #System ["qq Shutdown"]="$RunCMD sys_poweroff" diff --git a/config/hypr/scripts/hyprshade.sh b/config/hypr/scripts/hyprshade.sh deleted file mode 100755 index 5356fc8f..00000000 --- a/config/hypr/scripts/hyprshade.sh +++ /dev/null @@ -1 +0,0 @@ -hyprshade_filter="blue-light-filter" diff --git a/config/hypr/scripts/wal_effect.sh b/config/hypr/scripts/wal_effect.sh deleted file mode 100755 index 5ca07c92..00000000 --- a/config/hypr/scripts/wal_effect.sh +++ /dev/null @@ -1,87 +0,0 @@ -#!/bin/bash - -# Wallpaper Effects using imagemagick -# Inspiration from ML4W - Stephan Raabe https://gitlab.com/stephan-raabe/dotfiles - -# variables -current_wallpaper="$HOME/dotfiles/hypr/wallpaper_effects/.wallpaper_current" -wallpaper_output="$HOME/dotfiles/hypr/wallpaper_effects/.wallpaper_modified" -SCRIPTSDIR="$HOME/dotfiles/hypr/scripts" -focused_monitor=$(hyprctl monitors | awk '/^Monitor/{name=$2} /focused: yes/{print name}') - -# Directory for swaync -iDIR="$HOME/dotfiles/hypr/assets/" - -# swww transition config -FPS=60 -TYPE="wipe" -DURATION=2 -BEZIER=".43,1.19,1,.4" -SWWW_PARAMS="--transition-fps $FPS --transition-type $TYPE --transition-duration $DURATION" - -# Define ImageMagick effects -# https://imagemagick.org/script/magick.php - -declare -A effects=( -["Black & White"]="magick $current_wallpaper -set colorspace Gray -separate -average $wallpaper_output" -["Blurred"]="magick $current_wallpaper -blur "20x30" $wallpaper_output" -["Solarize"]="magick $current_wallpaper -solarize 80% $wallpaper_output" -["Sepia Tone"]="magick $current_wallpaper -sepia-tone 65% $wallpaper_output" -["Negate"]="magick $current_wallpaper -negate $wallpaper_output" -["Charcoal"]="magick $current_wallpaper -charcoal "10x10" $wallpaper_output" -["No Effects"]="no-effects" -) - -# Function to apply no effects -no_effects() { - swww img -o "$focused_monitor" "$current_wallpaper" $SWWW_PARAMS & - # Wait for swww command to complete - wait $! - notify-send -u low -i "$iDIR/bell.png" "No wallpaper effects" - - # copying wallpaper for rofi menu - cp $current_wallpaper $wallpaper_output -} - -# Function to run rofi menu -main() { - # Populate rofi menu options - options="No Effects\n" - for effect in "${!effects[@]}"; do - if [ "$effect" != "No Effects" ]; then - options+="$effect\n" - fi - done - - # rofi - choice=$(echo -e "$options" | rofi -i -dmenu) - if [ ! -z "$choice" ]; then - # Check if the choice exists in the array - if [[ "${effects[$choice]+exists}" ]]; then - if [ "$choice" == "No Effects" ]; then - no_effects - else - # Apply selected effect - notify-send -u normal -i "$iDIR/bell.png" "Applying $choice effects" - eval "${effects[$choice]}" - # Wait for effects to be applied - sleep 1 - # Execute swww command after image conversion - swww img -o "$focused_monitor" "$wallpaper_output" $SWWW_PARAMS & - # Wait for swww command to complete - wait $! - notify-send -u low -i "$iDIR/bell.png" "$choice effects applied" - fi - else - echo "Effects not recognized." - fi - fi -} - -# Check if rofi is already running -if pidof rofi > /dev/null; then - pkill rofi - exit 0 -fi - -main diff --git a/config/hypr/wallpaper_effects/.wallpaper_current b/config/hypr/wallpaper_effects/.wallpaper_current index b8401e4d..c44c24ff 120000 --- a/config/hypr/wallpaper_effects/.wallpaper_current +++ b/config/hypr/wallpaper_effects/.wallpaper_current @@ -1 +1 @@ -/home/sankalp/Pictures/wallpapers/lordkrishna.jpg \ No newline at end of file +/home/sankalp/Pictures/wallpapers/wall-35.jpg \ No newline at end of file diff --git a/config/hypr/wallpaper_effects/.wallpaper_modified b/config/hypr/wallpaper_effects/.wallpaper_modified index 7c779d79..a7c14631 100644 Binary files a/config/hypr/wallpaper_effects/.wallpaper_modified and b/config/hypr/wallpaper_effects/.wallpaper_modified differ diff --git a/config/waybar/modules b/config/waybar/modules index 296d5683..db8c44ec 100644 --- a/config/waybar/modules +++ b/config/waybar/modules @@ -148,7 +148,7 @@ "all-outputs": true, "warp-on-scroll": false, "sort-by-number": true, - "show-special": true, + "show-special": false, "on-click": "activate", "on-scroll-up": "hyprctl dispatch workspace e+1", "on-scroll-down": "hyprctl dispatch workspace e-1", @@ -579,7 +579,7 @@ "exec": "echo ; echo  Key Hints SUPER F1", "interval": 86400, // once every day "tooltip": false, - "on-click": "~/dotfiles/hypr/scripts/RunCMD.sh keybind", + "on-click": "~/dotfiles/hypr/scripts/KeyHints.sh", }, "custom/keyboard": { diff --git a/setup b/setup index f74c5c1a..71e26e7c 100755 --- a/setup +++ b/setup @@ -4,7 +4,7 @@ INSTLOG="install.log" pkg=( hyprland fnm - keyb + yad fd imv brightnessctl