From 2ec0ed3809171f08138be2020f97d500fff91667 Mon Sep 17 00:00:00 2001 From: JaKooLit Date: Wed, 15 May 2024 12:24:28 +0900 Subject: updated weather icons --- config/hypr/UserScripts/Weather.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'config/hypr/UserScripts') diff --git a/config/hypr/UserScripts/Weather.py b/config/hypr/UserScripts/Weather.py index 5cd11a66..b1b21fa3 100755 --- a/config/hypr/UserScripts/Weather.py +++ b/config/hypr/UserScripts/Weather.py @@ -8,12 +8,12 @@ import os # original code https://gist.github.com/Surendrajat/ff3876fd2166dd86fb71180f4e9342d7 # weather icons weather_icons = { - "sunnyDay": "", - "clearNight": "", - "cloudyFoggyDay": "", - "cloudyFoggyNight": "", - "rainyDay": "", - "rainyNight": "", + "sunnyDay": "󰖙", + "clearNight": "󰖔", + "cloudyFoggyDay": "", + "cloudyFoggyNight": "", + "rainyDay": "", + "rainyNight": "", "snowyIcyDay": "", "snowyIcyNight": "", "severe": "", -- cgit v1.2.3 From cf4e7e595c5b4660d73be38324d78a31c0d36cc1 Mon Sep 17 00:00:00 2001 From: JaKooLit Date: Wed, 15 May 2024 13:31:07 +0900 Subject: Fixed alignment of Weather.py for hyprlock - Man this is getting annoying already lmao --- config/hypr/UserScripts/Weather.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'config/hypr/UserScripts') diff --git a/config/hypr/UserScripts/Weather.py b/config/hypr/UserScripts/Weather.py index b1b21fa3..39f823af 100755 --- a/config/hypr/UserScripts/Weather.py +++ b/config/hypr/UserScripts/Weather.py @@ -123,7 +123,7 @@ out_data = { } print(json.dumps(out_data)) -simple_weather =f"{icon} {status}\n" + \ +simple_weather =f"{icon} {status}\n" + \ f" {temp} ({temp_feel_text})\n" + \ f"{wind_text} \n" + \ f"{humidity_text} \n" + \ -- cgit v1.2.3 From f8571e98d90df097769efb9d8404806f413e438e Mon Sep 17 00:00:00 2001 From: Daniel <48409433+darkeddie@users.noreply.github.com> Date: Mon, 20 May 2024 02:30:01 +0000 Subject: Add Shuffle to RofiBeats.sh --- config/hypr/UserScripts/RofiBeats.sh | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'config/hypr/UserScripts') diff --git a/config/hypr/UserScripts/RofiBeats.sh b/config/hypr/UserScripts/RofiBeats.sh index 1cf2a445..5753857b 100755 --- a/config/hypr/UserScripts/RofiBeats.sh +++ b/config/hypr/UserScripts/RofiBeats.sh @@ -79,11 +79,19 @@ play_online_music() { mpv --shuffle --vid=no "$link" } +# Main function for shuffling local music +shuffle_local_music() { + notification "Shuffle local music" + + # Play music in $mDIR on shuffle + mpv --shuffle --vid=no "$mDIR" +} + # Check if an online music process is running and send a notification, otherwise run the main function -pkill mpv && notify-send -u low -i "$iDIR/music.png" "Online Music stopped" || { +pkill mpv && notify-send -u low -i "$iDIR/music.png" "Music stopped" || { # Prompt the user to choose between local and online music -user_choice=$(printf "Play from Online Stations\nPlay from Music Folder" | rofi -dmenu -config ~/.config/rofi/config-rofi-Beats-menu.rasi -p "Select music source") +user_choice=$(printf "Play from Online Stations\nPlay from Music Folder\nShuffle from Music Folder" | rofi -dmenu -config ~/.config/rofi/config-rofi-Beats-menu.rasi -p "Select music source") case "$user_choice" in "Play from Music Folder") @@ -92,6 +100,9 @@ user_choice=$(printf "Play from Online Stations\nPlay from Music Folder" | rofi "Play from Online Stations") play_online_music ;; + "Shuffle from Music Folder") + shuffle_local_music + ;; *) echo "Invalid choice" ;; -- cgit v1.2.3 From bbb2c6d524df11b439ab3f79b31a80b06635fda2 Mon Sep 17 00:00:00 2001 From: JaKooLit Date: Mon, 20 May 2024 12:21:33 +0900 Subject: tweaked Rofi-Beats --- config/hypr/UserScripts/RofiBeats.sh | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'config/hypr/UserScripts') diff --git a/config/hypr/UserScripts/RofiBeats.sh b/config/hypr/UserScripts/RofiBeats.sh index 5753857b..5349930e 100755 --- a/config/hypr/UserScripts/RofiBeats.sh +++ b/config/hypr/UserScripts/RofiBeats.sh @@ -1,12 +1,14 @@ #!/bin/bash +# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ## +# This script Rofi Beats (Super Shift M) -# Directory music folder +# Directory music folder for Local Music mDIR="$HOME/Music/" # Directory for icons iDIR="$HOME/.config/swaync/icons" -# Online Stations +# Online Stations. Edit as required / want here declare -A online_music=( ["AfroBeatz 2024 🎧"]="https://www.youtube.com/watch?v=7uB-Eh9XVZQ" ["Lofi Girl ☕️🎶"]="https://play.streamafrica.net/lofiradio" @@ -22,7 +24,6 @@ declare -A online_music=( ["Korean Drama OST 📻🎶"]="https://youtube.com/playlist?list=PLUge_o9AIFp4HuA-A3e3ZqENh63LuRRlQ" ) -# Local Music # Populate local_music array with files from music directory and subdirectories populate_local_music() { local_music=() @@ -60,7 +61,7 @@ play_local_music() { notification "$choice" # Play the selected local music file using mpv - mpv --shuffle --vid=no "$file" + mpv --vid=no "$file" } # Main function for playing online music @@ -81,7 +82,7 @@ play_online_music() { # Main function for shuffling local music shuffle_local_music() { - notification "Shuffle local music" + notification "Shuffle Play Local music" # Play music in $mDIR on shuffle mpv --shuffle --vid=no "$mDIR" @@ -91,7 +92,7 @@ shuffle_local_music() { pkill mpv && notify-send -u low -i "$iDIR/music.png" "Music stopped" || { # Prompt the user to choose between local and online music -user_choice=$(printf "Play from Online Stations\nPlay from Music Folder\nShuffle from Music Folder" | rofi -dmenu -config ~/.config/rofi/config-rofi-Beats-menu.rasi -p "Select music source") +user_choice=$(printf "Play from Online Stations\nPlay from Music Folder\nShuffle Play from Music Folder" | rofi -dmenu -config ~/.config/rofi/config-rofi-Beats-menu.rasi -p "Select music source") case "$user_choice" in "Play from Music Folder") @@ -100,7 +101,7 @@ user_choice=$(printf "Play from Online Stations\nPlay from Music Folder\nShuffle "Play from Online Stations") play_online_music ;; - "Shuffle from Music Folder") + "Shuffle Play from Music Folder") shuffle_local_music ;; *) -- cgit v1.2.3 From 5f8eeeb4419fb18acc02b9bf84d36caa94844aa8 Mon Sep 17 00:00:00 2001 From: JaKooLit Date: Mon, 20 May 2024 17:17:33 +0900 Subject: to resolve conflict --- config/hypr/UserScripts/RofiBeats.sh | 37 ++++++++++++++++++++---------------- 1 file changed, 21 insertions(+), 16 deletions(-) (limited to 'config/hypr/UserScripts') diff --git a/config/hypr/UserScripts/RofiBeats.sh b/config/hypr/UserScripts/RofiBeats.sh index 5349930e..04af7222 100755 --- a/config/hypr/UserScripts/RofiBeats.sh +++ b/config/hypr/UserScripts/RofiBeats.sh @@ -1,14 +1,12 @@ #!/bin/bash -# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ## -# This script Rofi Beats (Super Shift M) -# Directory music folder for Local Music +# Directory music folder mDIR="$HOME/Music/" # Directory for icons iDIR="$HOME/.config/swaync/icons" -# Online Stations. Edit as required / want here +# Online Stations declare -A online_music=( ["AfroBeatz 2024 🎧"]="https://www.youtube.com/watch?v=7uB-Eh9XVZQ" ["Lofi Girl ☕️🎶"]="https://play.streamafrica.net/lofiradio" @@ -24,6 +22,7 @@ declare -A online_music=( ["Korean Drama OST 📻🎶"]="https://youtube.com/playlist?list=PLUge_o9AIFp4HuA-A3e3ZqENh63LuRRlQ" ) +# Local Music # Populate local_music array with files from music directory and subdirectories populate_local_music() { local_music=() @@ -50,18 +49,24 @@ play_local_music() { exit 1 fi - # Find the corresponding file path based on user's choice - for (( i=0; i<"${#filenames[@]}"; i++ )); do + # Find the corresponding file path based on user's choice and set that to play the song then continue on the list + for (( i=0; i<"${#filenames[@]}"; ++i )); do if [ "${filenames[$i]}" = "$choice" ]; then - file="${local_music[$i]}" + + notification "$choice" + # For some reason wont start playlist at 0 + if [[ $i -eq 0 ]]; then + # Play the selected local music file using mpv + mpv --loop-playlist --vid=no "$mDIR" + + else + file=$i + # Play the selected local music file using mpv + mpv --playlist-start="$file" --loop-playlist --vid=no "$mDIR" + fi break fi done - - notification "$choice" - - # Play the selected local music file using mpv - mpv --vid=no "$file" } # Main function for playing online music @@ -82,17 +87,17 @@ play_online_music() { # Main function for shuffling local music shuffle_local_music() { - notification "Shuffle Play Local music" + notification "Shuffle local music" # Play music in $mDIR on shuffle - mpv --shuffle --vid=no "$mDIR" + mpv --shuffle --loop-playlist --vid=no "$mDIR" } # Check if an online music process is running and send a notification, otherwise run the main function pkill mpv && notify-send -u low -i "$iDIR/music.png" "Music stopped" || { # Prompt the user to choose between local and online music -user_choice=$(printf "Play from Online Stations\nPlay from Music Folder\nShuffle Play from Music Folder" | rofi -dmenu -config ~/.config/rofi/config-rofi-Beats-menu.rasi -p "Select music source") +user_choice=$(printf "Play from Online Stations\nPlay from Music Folder\nShuffle from Music Folder" | rofi -dmenu -config ~/.config/rofi/config-rofi-Beats-menu.rasi -p "Select music source") case "$user_choice" in "Play from Music Folder") @@ -101,7 +106,7 @@ user_choice=$(printf "Play from Online Stations\nPlay from Music Folder\nShuffle "Play from Online Stations") play_online_music ;; - "Shuffle Play from Music Folder") + "Shuffle from Music Folder") shuffle_local_music ;; *) -- cgit v1.2.3 From 8f5c2af4cff0e5fae763e3f65b2cf90bacc85647 Mon Sep 17 00:00:00 2001 From: JaKooLit Date: Mon, 20 May 2024 17:27:21 +0900 Subject: Tweaked Rofi Beats --- config/hypr/UserScripts/RofiBeats.sh | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) (limited to 'config/hypr/UserScripts') diff --git a/config/hypr/UserScripts/RofiBeats.sh b/config/hypr/UserScripts/RofiBeats.sh index 04af7222..7fed687f 100755 --- a/config/hypr/UserScripts/RofiBeats.sh +++ b/config/hypr/UserScripts/RofiBeats.sh @@ -1,12 +1,14 @@ #!/bin/bash +# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ## +# For Rofi Beats to play online Music or Locally save media files -# Directory music folder +# Directory local music folder mDIR="$HOME/Music/" # Directory for icons iDIR="$HOME/.config/swaync/icons" -# Online Stations +# Online Stations. Edit as required declare -A online_music=( ["AfroBeatz 2024 🎧"]="https://www.youtube.com/watch?v=7uB-Eh9XVZQ" ["Lofi Girl ☕️🎶"]="https://play.streamafrica.net/lofiradio" @@ -22,7 +24,6 @@ declare -A online_music=( ["Korean Drama OST 📻🎶"]="https://youtube.com/playlist?list=PLUge_o9AIFp4HuA-A3e3ZqENh63LuRRlQ" ) -# Local Music # Populate local_music array with files from music directory and subdirectories populate_local_music() { local_music=() @@ -52,13 +53,14 @@ play_local_music() { # Find the corresponding file path based on user's choice and set that to play the song then continue on the list for (( i=0; i<"${#filenames[@]}"; ++i )); do if [ "${filenames[$i]}" = "$choice" ]; then + + notification "$choice" - notification "$choice" # For some reason wont start playlist at 0 if [[ $i -eq 0 ]]; then # Play the selected local music file using mpv - mpv --loop-playlist --vid=no "$mDIR" - + mpv --loop-playlist --vid=no "$mDIR" + else file=$i # Play the selected local music file using mpv @@ -69,6 +71,14 @@ play_local_music() { done } +# Main function for shuffling local music +shuffle_local_music() { + notification "Shuffle local music" + + # Play music in $mDIR on shuffle + mpv --shuffle --loop-playlist --vid=no "$mDIR" +} + # Main function for playing online music play_online_music() { choice=$(printf "%s\n" "${!online_music[@]}" | rofi -i -dmenu -config ~/.config/rofi/config-rofi-Beats.rasi -p "Online Music") @@ -85,19 +95,11 @@ play_online_music() { mpv --shuffle --vid=no "$link" } -# Main function for shuffling local music -shuffle_local_music() { - notification "Shuffle local music" - - # Play music in $mDIR on shuffle - mpv --shuffle --loop-playlist --vid=no "$mDIR" -} - # Check if an online music process is running and send a notification, otherwise run the main function pkill mpv && notify-send -u low -i "$iDIR/music.png" "Music stopped" || { # Prompt the user to choose between local and online music -user_choice=$(printf "Play from Online Stations\nPlay from Music Folder\nShuffle from Music Folder" | rofi -dmenu -config ~/.config/rofi/config-rofi-Beats-menu.rasi -p "Select music source") +user_choice=$(printf "Play from Online Stations\nPlay from Music Folder\nShuffle Play from Music Folder" | rofi -dmenu -config ~/.config/rofi/config-rofi-Beats-menu.rasi -p "Select music source") case "$user_choice" in "Play from Music Folder") @@ -106,7 +108,7 @@ user_choice=$(printf "Play from Online Stations\nPlay from Music Folder\nShuffle "Play from Online Stations") play_online_music ;; - "Shuffle from Music Folder") + "Shuffle Play from Music Folder") shuffle_local_music ;; *) -- cgit v1.2.3 From 67da07ee3fdaaf65123e52d1d596a70fc69f30bb Mon Sep 17 00:00:00 2001 From: JaKooLit Date: Mon, 20 May 2024 23:22:46 +0900 Subject: Wallpaper menu tweaked. New swww animation + can now detect wallpapers inside directories like the Dynamic Wallpapers --- config/hypr/UserScripts/WallpaperSelect.sh | 46 +++++++++++++++++------------- 1 file changed, 26 insertions(+), 20 deletions(-) (limited to 'config/hypr/UserScripts') diff --git a/config/hypr/UserScripts/WallpaperSelect.sh b/config/hypr/UserScripts/WallpaperSelect.sh index 9a087c7d..06859112 100755 --- a/config/hypr/UserScripts/WallpaperSelect.sh +++ b/config/hypr/UserScripts/WallpaperSelect.sh @@ -1,18 +1,18 @@ #!/bin/bash -# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ## +# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ # This script for selecting wallpapers (SUPER W) -SCRIPTSDIR="$HOME/.config/hypr/scripts" - -focused_monitor=$(hyprctl monitors | awk '/^Monitor/{name=$2} /focused: yes/{print name}') - # WALLPAPERS PATH wallDIR="$HOME/Pictures/wallpapers" -# Transition config -FPS=30 -TYPE="wipe" -DURATION=1 +# variables +SCRIPTSDIR="$HOME/.config/hypr/scripts" +focused_monitor=$(hyprctl monitors | awk '/^Monitor/{name=$2} /focused: yes/{print name}') + +# swww transition config +FPS=60 +TYPE="any" +DURATION=2 BEZIER=".43,1.19,1,.4" SWWW_PARAMS="--transition-fps $FPS --transition-type $TYPE --transition-duration $DURATION" @@ -22,31 +22,36 @@ if pidof swaybg > /dev/null; then fi # Retrieve image files -PICS=($(ls "${wallDIR}" | grep -E ".jpg$|.jpeg$|.png$|.gif$")) +PICS=($(find "${wallDIR}" -type f \( -iname \*.jpg -o -iname \*.jpeg -o -iname \*.png -o -iname \*.gif \))) RANDOM_PIC="${PICS[$((RANDOM % ${#PICS[@]}))]}" -RANDOM_PIC_NAME="${#PICS[@]}. random" +RANDOM_PIC_NAME=". random" # Rofi command rofi_command="rofi -i -show -dmenu -config ~/.config/rofi/config-wallpaper.rasi" + +# Sorting Wallpapers menu() { - for i in "${!PICS[@]}"; do + sorted_options=($(printf '%s\n' "${PICS[@]}" | sort)) + # Place ". random" at the beginning + printf "%s\n" "$RANDOM_PIC_NAME" + for pic_path in "${sorted_options[@]}"; do + pic_name=$(basename "$pic_path") # Displaying .gif to indicate animated images - if [[ -z $(echo "${PICS[$i]}" | grep .gif$) ]]; then - printf "$(echo "${PICS[$i]}" | cut -d. -f1)\x00icon\x1f${wallDIR}/${PICS[$i]}\n" + if [[ -z $(echo "$pic_name" | grep -i "\.gif$") ]]; then + printf "%s\x00icon\x1f%s\n" "$(echo "$pic_name" | cut -d. -f1)" "$pic_path" else - printf "${PICS[$i]}\n" + printf "%s\n" "$pic_name" fi done - - printf "$RANDOM_PIC_NAME\n" } +# initiate swww if not running swww query || swww-daemon --format xrgb +# Choice of wallpapers main() { choice=$(menu | ${rofi_command}) - # No choice case if [[ -z $choice ]]; then exit 0 @@ -54,7 +59,8 @@ main() { # Random choice case if [ "$choice" = "$RANDOM_PIC_NAME" ]; then - swww img "${wallDIR}/${RANDOM_PIC}" $SWWW_PARAMS + RANDOM_PIC="${PICS[$((RANDOM % ${#PICS[@]}))]}" + swww img -o $focused_monitor "${RANDOM_PIC}" $SWWW_PARAMS exit 0 fi @@ -69,7 +75,7 @@ main() { done if [[ $pic_index -ne -1 ]]; then - swww img -o $focused_monitor "${wallDIR}/${PICS[$pic_index]}" $SWWW_PARAMS + swww img -o $focused_monitor "${PICS[$pic_index]}" $SWWW_PARAMS else echo "Image not found." exit 1 -- cgit v1.2.3 From a5d4d4ee9550b820c8106881c69d85a73eaf5493 Mon Sep 17 00:00:00 2001 From: JaKooLit Date: Wed, 22 May 2024 10:55:21 +0900 Subject: reduced padding rofi on master config added a space on weather.py waybar data for better output --- config/hypr/UserScripts/Weather.py | 2 +- config/rofi/master-config.rasi | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'config/hypr/UserScripts') diff --git a/config/hypr/UserScripts/Weather.py b/config/hypr/UserScripts/Weather.py index 39f823af..1d2ea30b 100755 --- a/config/hypr/UserScripts/Weather.py +++ b/config/hypr/UserScripts/Weather.py @@ -116,7 +116,7 @@ tooltip_text = str.format( # print waybar module data out_data = { - "text": f"{icon} {temp}", + "text": f"{icon} {temp}", "alt": status, "tooltip": tooltip_text, "class": status_code, diff --git a/config/rofi/master-config.rasi b/config/rofi/master-config.rasi index 4ffa7ac8..fe24cd61 100644 --- a/config/rofi/master-config.rasi +++ b/config/rofi/master-config.rasi @@ -65,7 +65,7 @@ mainbox { /* ---- Inputbar ---- */ inputbar { enabled: true; - padding: 10px 10px 200px 10px; + padding: 10px 10px 100px 10px; margin: 10px; background-color: transparent; border-radius: 25px; -- cgit v1.2.3 From 57121a4bddf834545613b38dfa8510a1e7060d3c Mon Sep 17 00:00:00 2001 From: JaKooLit Date: Thu, 23 May 2024 20:27:41 +0900 Subject: RofiCalc script moved to UserScripts --- config/hypr/UserConfigs/UserKeybinds.conf | 2 +- config/hypr/UserScripts/RofiCalc.sh | 31 +++++++++++++++++++++++++++++++ config/hypr/scripts/RofiCalc.sh | 31 ------------------------------- 3 files changed, 32 insertions(+), 32 deletions(-) create mode 100755 config/hypr/UserScripts/RofiCalc.sh delete mode 100755 config/hypr/scripts/RofiCalc.sh (limited to 'config/hypr/UserScripts') diff --git a/config/hypr/UserConfigs/UserKeybinds.conf b/config/hypr/UserConfigs/UserKeybinds.conf index f3d03df8..85f3c1c3 100644 --- a/config/hypr/UserConfigs/UserKeybinds.conf +++ b/config/hypr/UserConfigs/UserKeybinds.conf @@ -21,7 +21,7 @@ bind = $mainMod, A, exec, pkill rofi || true && ags -t 'overview' bind = $mainMod, Return, exec, $term # Launch terminal bind = $mainMod, T, exec, $files # Launch file manager -bind = $mainMod ALT, C, exec, $scriptsDir/RofiCalc.sh # calculator (qalculate) +bind = $mainMod ALT, C, exec, $UserScripts/RofiCalc.sh # calculator (qalculate) # pyprland bind = $mainMod SHIFT, Return, exec, pypr toggle term # Dropdown terminal diff --git a/config/hypr/UserScripts/RofiCalc.sh b/config/hypr/UserScripts/RofiCalc.sh new file mode 100755 index 00000000..355130de --- /dev/null +++ b/config/hypr/UserScripts/RofiCalc.sh @@ -0,0 +1,31 @@ +#!/bin/bash +# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ +# /* Calculator (using qalculate) and rofi */ +# /* Submitted by: https://github.com/JosephArmas */ + +rofi_config="$HOME/.config/rofi/config-calc.rasi" + +# Kill Rofi if already running before execution +if pgrep -x "rofi" >/dev/null; then + pkill rofi + exit 0 +fi + +# main function + +while true; do + result=$( + rofi -i -dmenu \ + -config "$rofi_config" \ + -mesg "$result = $calc_result" + ) + + if [ $? -ne 0 ]; then + exit + fi + + if [ -n "$result" ]; then + calc_result=$(qalc -t "$result") + echo "$calc_result" | wl-copy + fi +done diff --git a/config/hypr/scripts/RofiCalc.sh b/config/hypr/scripts/RofiCalc.sh deleted file mode 100755 index 355130de..00000000 --- a/config/hypr/scripts/RofiCalc.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/bash -# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ -# /* Calculator (using qalculate) and rofi */ -# /* Submitted by: https://github.com/JosephArmas */ - -rofi_config="$HOME/.config/rofi/config-calc.rasi" - -# Kill Rofi if already running before execution -if pgrep -x "rofi" >/dev/null; then - pkill rofi - exit 0 -fi - -# main function - -while true; do - result=$( - rofi -i -dmenu \ - -config "$rofi_config" \ - -mesg "$result = $calc_result" - ) - - if [ $? -ne 0 ]; then - exit - fi - - if [ -n "$result" ]; then - calc_result=$(qalc -t "$result") - echo "$calc_result" | wl-copy - fi -done -- cgit v1.2.3