From 20dcc7482e2b98fab5de4af9000cb694705e365e Mon Sep 17 00:00:00 2001 From: installer Date: Sun, 16 Feb 2025 19:23:42 +0900 Subject: updated rofi beats stations --- config/hypr/UserScripts/RofiBeats.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'config/hypr/UserScripts') diff --git a/config/hypr/UserScripts/RofiBeats.sh b/config/hypr/UserScripts/RofiBeats.sh index 38ff8829..1f2f3e48 100755 --- a/config/hypr/UserScripts/RofiBeats.sh +++ b/config/hypr/UserScripts/RofiBeats.sh @@ -10,20 +10,22 @@ rofi_theme_1="~/.config/rofi/config-rofi-Beats-menu.rasi" # Online Stations. Edit as required declare -A online_music=( - ["Radio - Lofi Girl 🎧🎶"]="https://play.streamafrica.net/lofiradio" - ["Radio - Chillhop 🎧🎶"]="http://stream.zeno.fm/fyn8eh3h5f8uv" ["FM - Easy Rock 96.3 📻🎶"]="https://radio-stations-philippines.com/easy-rock" ["FM - Easy Rock - Baguio 91.9 📻🎶"]="https://radio-stations-philippines.com/easy-rock-baguio" ["FM - Love Radio 90.7 📻🎶"]="https://radio-stations-philippines.com/love" ["FM - WRock - CEBU 96.3 📻🎶"]="https://onlineradio.ph/126-96-3-wrock.html" ["FM - Fresh Philippines 📻🎶"]="https://onlineradio.ph/553-fresh-fm.html" + ["Radio - Lofi Girl 🎧🎶"]="https://play.streamafrica.net/lofiradio" + ["Radio - Chillhop 🎧🎶"]="http://stream.zeno.fm/fyn8eh3h5f8uv" + ["Radio - Ibiza Global 🎧🎶"]="https://filtermusic.net/ibiza-global" + ["Radio - Metal Music 🎧🎶"]="https://tunein.com/radio/mETaLmuSicRaDio-s119867/" ["YT - Wish 107.5 YT Pinoy HipHop 📻🎶"]="https://youtube.com/playlist?list=PLkrzfEDjeYJnmgMYwCKid4XIFqUKBVWEs&si=vahW_noh4UDJ5d37" ["YT - Youtube Top 100 Songs Global 📹🎶"]="https://youtube.com/playlist?list=PL4fGSI1pDJn6puJdseH2Rt9sMvt9E2M4i&si=5jsyfqcoUXBCSLeu" ["YT - Wish 107.5 YT Wishclusives 📹🎶"]="https://youtube.com/playlist?list=PLkrzfEDjeYJn5B22H9HOWP3Kxxs-DkPSM&si=d_Ld2OKhGvpH48WO" ["YT - Relaxing Piano Music 🎹🎶"]="https://youtu.be/6H7hXzjFoVU?si=nZTPREC9lnK1JJUG" ["YT - Youtube Remix 📹🎶"]="https://youtube.com/playlist?list=PLeqTkIUlrZXlSNn3tcXAa-zbo95j0iN-0" ["YT - Korean Drama OST 📹🎶"]="https://youtube.com/playlist?list=PLUge_o9AIFp4HuA-A3e3ZqENh63LuRRlQ" - ["YT - AfroBeatz 2024 📹🎶"]="https://www.youtube.com/watch?v=7uB-Eh9XVZQ" + ["YT - lofi hip hop radio beats 📹🎶"]="https://www.youtube.com/live/jfKfPfyJRdk?si=PnJIA9ErQIAw6-qd" ["YT - Relaxing Piano Jazz Music 🎹🎶"]="https://youtu.be/85UEqRat6E4?si=jXQL1Yp2VP_G6NSn" ) -- cgit v1.2.3 From 68bad271f91fc8f332d852bb57b0f64868bf43fc Mon Sep 17 00:00:00 2001 From: JaKooLit Date: Mon, 17 Feb 2025 14:31:13 +0900 Subject: updated wlogout logic and quick edit menu --- config/hypr/UserScripts/QuickEdit.sh | 39 ++++++++-------- config/hypr/scripts/Wlogout.sh | 88 ++++++++++++++++++------------------ config/rofi/config-edit.rasi | 2 +- 3 files changed, 64 insertions(+), 65 deletions(-) (limited to 'config/hypr/UserScripts') diff --git a/config/hypr/UserScripts/QuickEdit.sh b/config/hypr/UserScripts/QuickEdit.sh index c71fb166..09530881 100755 --- a/config/hypr/UserScripts/QuickEdit.sh +++ b/config/hypr/UserScripts/QuickEdit.sh @@ -10,40 +10,41 @@ tty=kitty configs="$HOME/.config/hypr/configs" UserConfigs="$HOME/.config/hypr/UserConfigs" rofi_theme="~/.config/rofi/config-edit.rasi" +msg=' ⁉️ Choose which config to View or Edit ⁉️' # Function to display the menu options menu() { cat < /dev/null; then pkill -x "wlogout" exit 0 fi -# Detect monitor resolution and scaling factor -resolution=$(hyprctl -j monitors | jq -r '.[] | select(.focused==true) | .height / .scale' | awk -F'.' '{print $1}') -hypr_scale=$(hyprctl -j monitors | jq -r '.[] | select(.focused==true) | .scale') +# Detect the current monitor's native resolution and scale +monitor_info=$(hyprctl -j monitors | jq -r '.[] | select(.focused==true)') +# extract some info +resolution=$(echo "$monitor_info" | jq -r '.height') +width=$(echo "$monitor_info" | jq -r '.width') +hypr_scale=$(echo "$monitor_info" | jq -r '.scale') + +# If hypr_scale >= 1.25 or resolution can't be detected, run wlogout with -b 3 +if [[ -z "$resolution" || ! "$resolution" =~ ^[0-9]+$ || -z "$hypr_scale" || $(awk "BEGIN {exit !($hypr_scale >= 1.25)}") -eq 1 ]]; then + echo "Hypr_scale is greater than or equal to 1.25 or resolution could not be detected, running wlogout with -b 3" + wlogout --protocol layer-shell -b 3 -T 100 -B 100 & + exit 0 +fi -# Set parameters based on screen resolution and scaling factor +# Determine the appropriate resolution range and calculate T and B values if ((resolution >= 2160)); then - T_val=$(awk "BEGIN {printf \"%.0f\", $A_2160 * 2160 * $hypr_scale / $resolution}") - B_val=$(awk "BEGIN {printf \"%.0f\", $B_2160 * 2160 * $hypr_scale / $resolution}") - echo "Setting parameters for resolution >= 4k" - wlogout --protocol layer-shell -b 6 -T $T_val -B $B_val & -elif ((resolution >= 1600 && resolution < 2160)); then - T_val=$(awk "BEGIN {printf \"%.0f\", $A_1600 * 1600 * $hypr_scale / $resolution}") - B_val=$(awk "BEGIN {printf \"%.0f\", $B_1600 * 1600 * $hypr_scale / $resolution}") - echo "Setting parameters for resolution >= 2.5k and < 4k" - wlogout --protocol layer-shell -b 6 -T $T_val -B $B_val & -elif ((resolution >= 1440 && resolution < 1600)); then - T_val=$(awk "BEGIN {printf \"%.0f\", $A_1440 * 1440 * $hypr_scale / $resolution}") - B_val=$(awk "BEGIN {printf \"%.0f\", $B_1440 * 1440 * $hypr_scale / $resolution}") - echo "Setting parameters for resolution >= 2k and < 2.5k" - wlogout --protocol layer-shell -b 6 -T $T_val -B $B_val & -elif ((resolution >= 1080 && resolution < 1440)); then - T_val=$(awk "BEGIN {printf \"%.0f\", $A_1080 * 1080 * $hypr_scale / $resolution}") - B_val=$(awk "BEGIN {printf \"%.0f\", $B_1080 * 1080 * $hypr_scale / $resolution}") - echo "Setting parameters for resolution >= 1080p and < 2k" - wlogout --protocol layer-shell -b 6 -T $T_val -B $B_val & -elif ((resolution >= 720 && resolution < 1080)); then - T_val=$(awk "BEGIN {printf \"%.0f\", $A_720 * 720 * $hypr_scale / $resolution}") - B_val=$(awk "BEGIN {printf \"%.0f\", $B_720 * 720 * $hypr_scale / $resolution}") - echo "Setting parameters for resolution >= 720p and < 1080p" - wlogout --protocol layer-shell -b 3 -T $T_val -B $B_val & + res_key=2160 +elif ((resolution >= 1600)); then + res_key=1600 +elif ((resolution >= 1440)); then + res_key=1440 +elif ((resolution >= 1080)); then + res_key=1080 else - echo "Setting default parameters" - wlogout & + res_key=720 fi + +# Calculate T and B values based on selected resolution and scale +T_val=$(awk "BEGIN {printf \"%.0f\", ${resolutions[$res_key]} * $res_key * $hypr_scale / $resolution}") +B_val=$(awk "BEGIN {printf \"%.0f\", ${resolutions[$res_key]} * $res_key * $hypr_scale / $resolution}") + +# Output the resolution setting for debugging purposes +echo "Setting parameters for resolution >= $res_key" + +# Run wlogout with -b 6 and calculated T/B values +wlogout --protocol layer-shell -b 6 -T $T_val -B $B_val & \ No newline at end of file diff --git a/config/rofi/config-edit.rasi b/config/rofi/config-edit.rasi index 60d18e34..1902ab35 100644 --- a/config/rofi/config-edit.rasi +++ b/config/rofi/config-edit.rasi @@ -6,7 +6,7 @@ /* ---- Mainbox ---- */ mainbox { children: - [ "inputbar", "listview"]; + [ "inputbar", "message", "listview"]; } -- cgit v1.2.3 From 5678aa496a365804f53cc096c3fbb382dea2083a Mon Sep 17 00:00:00 2001 From: JaKooLit Date: Tue, 18 Feb 2025 23:02:05 +0900 Subject: minor update on wallpaper menu to have dynamically icon size depending on monitor sizes. Idea from @Abhra00 --- config/hypr/UserScripts/WallpaperEffects.sh | 6 +++--- config/hypr/UserScripts/WallpaperSelect.sh | 19 +++++++++++++++---- config/rofi/config-wallpaper.rasi | 19 ++++++++++++++----- config/rofi/config.rasi | 11 +---------- 4 files changed, 33 insertions(+), 22 deletions(-) (limited to 'config/hypr/UserScripts') diff --git a/config/hypr/UserScripts/WallpaperEffects.sh b/config/hypr/UserScripts/WallpaperEffects.sh index 2573f5e0..06c1d3ff 100755 --- a/config/hypr/UserScripts/WallpaperEffects.sh +++ b/config/hypr/UserScripts/WallpaperEffects.sh @@ -7,7 +7,7 @@ terminal=kitty wallpaper_current="$HOME/.config/hypr/wallpaper_effects/.wallpaper_current" wallpaper_output="$HOME/.config/hypr/wallpaper_effects/.wallpaper_modified" SCRIPTSDIR="$HOME/.config/hypr/scripts" -focused_monitor=$(hyprctl monitors | awk '/^Monitor/{name=$2} /focused: yes/{print name}') +focused_monitor=$(hyprctl monitors -j | jq -r '.[] | select(.focused) | .name') rofi_theme="~/.config/rofi/config-wallpaper-effect.rasi" # Directory for swaync @@ -15,9 +15,9 @@ iDIR="$HOME/.config/swaync/images" iDIRi="$HOME/.config/swaync/icons" # swww transition config -FPS=60 +FPS=30 TYPE="wipe" -DURATION=2 +DURATION=1 BEZIER=".43,1.19,1,.4" SWWW_PARAMS="--transition-fps $FPS --transition-type $TYPE --transition-duration $DURATION" diff --git a/config/hypr/UserScripts/WallpaperSelect.sh b/config/hypr/UserScripts/WallpaperSelect.sh index 86264775..a53b88d7 100755 --- a/config/hypr/UserScripts/WallpaperSelect.sh +++ b/config/hypr/UserScripts/WallpaperSelect.sh @@ -8,17 +8,28 @@ wallDIR="$HOME/Pictures/wallpapers" SCRIPTSDIR="$HOME/.config/hypr/scripts" wallpaper_current="$HOME/.config/hypr/wallpaper_effects/.wallpaper_current" +rofi_override="element-icon{size:${icon_size}px;}" + # Directory for swaync iDIR="$HOME/.config/swaync/images" iDIRi="$HOME/.config/swaync/icons" # variables rofi_theme="~/.config/rofi/config-wallpaper.rasi" -focused_monitor=$(hyprctl monitors | awk '/^Monitor/{name=$2} /focused: yes/{print name}') +focused_monitor=$(hyprctl monitors -j | jq -r '.[] | select(.focused) | .name') + +# Get monitor width and DPI +monitor_width=$(hyprctl monitors -j | jq -r --arg mon "$focused_monitor" '.[] | select(.name == $mon) | .width') +scale_factor=$(hyprctl monitors -j | jq -r --arg mon "$focused_monitor" '.[] | select(.name == $mon) | .scale') + +# Calculate icon size for rofi +icon_size=$(echo "scale=1; ($monitor_width * 14) / ($scale_factor * 100)" | bc) +rofi_override="element-icon{size:${icon_size}px;}" + # swww transition config -FPS=60 +FPS=30 TYPE="any" -DURATION=2 +DURATION=1 BEZIER=".43,1.19,1,.4" SWWW_PARAMS="--transition-fps $FPS --transition-type $TYPE --transition-duration $DURATION" @@ -34,7 +45,7 @@ RANDOM_PIC="${PICS[$((RANDOM % ${#PICS[@]}))]}" RANDOM_PIC_NAME=". random" # Rofi command -rofi_command="rofi -i -show -dmenu -config $rofi_theme" +rofi_command="rofi -i -show -dmenu -config $rofi_theme -theme-str $rofi_override" # Sorting Wallpapers menu() { diff --git a/config/rofi/config-wallpaper.rasi b/config/rofi/config-wallpaper.rasi index eab47606..ca2789d8 100644 --- a/config/rofi/config-wallpaper.rasi +++ b/config/rofi/config-wallpaper.rasi @@ -21,26 +21,35 @@ mainbox { entry { expand: true; placeholder: " 🎞️ Search / Choose Wallpaper"; - horizontal-align: 0.0; + horizontal-align: 0.5; } /* ---- Listview ---- */ listview { - columns: 5; - lines: 3; + columns: 4; + lines: 2; + spacing: 10px; + padding: 10px; flow: horizontal; + fixed-width: false; + fixed-height: true; } /* ---- Element ---- */ element { orientation: vertical; + border-radius: 12px; + spacing: 20px; + padding: 6px; } element-icon { - size: 10%; + vertical-align: 0.5; } element-text { - vertical-align: 0.5; + vertical-align: 1.0; horizontal-align: 0.5; + padding: 0px; + margin: 0px; } diff --git a/config/rofi/config.rasi b/config/rofi/config.rasi index 5769b508..b52ef00e 100644 --- a/config/rofi/config.rasi +++ b/config/rofi/config.rasi @@ -21,13 +21,4 @@ configuration { /* note: Element-text font and size, edit configs in ~/.config/rofi/themes/ */ -//@theme "~/.config/rofi/themes/KooL_style-2-Dark.rasi" -//@theme "~/.config/rofi/themes/KooL_style-1.rasi" -//@theme "~/.config/rofi/themes/KooL_LonerOrZ.rasi" -//@theme "~/.config/rofi/themes/KooL_style-1.rasi" -//@theme "~/.config/rofi/themes/KooL_style-10-Fancy-v2.rasi" -//@theme "~/.config/rofi/themes/KooL_style-10-Fancy.rasi" -//@theme "~/.config/rofi/themes/KooL_style-11-Win11-list-dark.rasi" -//@theme "~/.config/rofi/themes/KooL_style-2-Dark.rasi" -//@theme "~/.config/rofi/themes/KooL_style-12-TOP-Docu.rasi" -@theme "~/.config/rofi/themes/KooL_style-4.rasi" +@theme "~/.config/rofi/themes/KooL_style-2-Dark.rasi" -- cgit v1.2.3 From 0c97b538ac4ce00d69d9d170c11fd9cf2c2dc5c6 Mon Sep 17 00:00:00 2001 From: JaKooLit Date: Tue, 18 Feb 2025 23:33:46 +0900 Subject: danggit... sucks to maintain debian and ubuntu since I am making mistake cause of that --- config/hypr/UserScripts/WallpaperEffects.sh | 4 ++-- config/hypr/UserScripts/WallpaperSelect.sh | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'config/hypr/UserScripts') diff --git a/config/hypr/UserScripts/WallpaperEffects.sh b/config/hypr/UserScripts/WallpaperEffects.sh index 06c1d3ff..52cd0b4d 100755 --- a/config/hypr/UserScripts/WallpaperEffects.sh +++ b/config/hypr/UserScripts/WallpaperEffects.sh @@ -15,9 +15,9 @@ iDIR="$HOME/.config/swaync/images" iDIRi="$HOME/.config/swaync/icons" # swww transition config -FPS=30 +FPS=60 TYPE="wipe" -DURATION=1 +DURATION=2 BEZIER=".43,1.19,1,.4" SWWW_PARAMS="--transition-fps $FPS --transition-type $TYPE --transition-duration $DURATION" diff --git a/config/hypr/UserScripts/WallpaperSelect.sh b/config/hypr/UserScripts/WallpaperSelect.sh index a53b88d7..4d0f8320 100755 --- a/config/hypr/UserScripts/WallpaperSelect.sh +++ b/config/hypr/UserScripts/WallpaperSelect.sh @@ -27,9 +27,9 @@ icon_size=$(echo "scale=1; ($monitor_width * 14) / ($scale_factor * 100)" | bc) rofi_override="element-icon{size:${icon_size}px;}" # swww transition config -FPS=30 +FPS=60 TYPE="any" -DURATION=1 +DURATION=2 BEZIER=".43,1.19,1,.4" SWWW_PARAMS="--transition-fps $FPS --transition-type $TYPE --transition-duration $DURATION" -- cgit v1.2.3