mirror of
https://github.com/JaKooLit/Hyprland-Dots.git
synced 2026-01-12 07:21:00 -03:00
updated rofi.beats. initial boot, wallpaper copy.sh in preparation for the upcomming release
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
root = true
|
||||
[*]
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
indent_size = 2
|
||||
|
||||
|
||||
@@ -1,19 +1,11 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Directory music folder
|
||||
mDIR="$HOME/Music/"
|
||||
|
||||
# Directory for icons
|
||||
iDIR="$HOME/.config/swaync/icons"
|
||||
|
||||
# Directory music folder
|
||||
mDIR="$HOME/Music/*"
|
||||
|
||||
# Local Music
|
||||
declare -A local_music
|
||||
# Populate the menu_options array with music files from the Music folder
|
||||
for file in $mDIR; do
|
||||
filename=$(basename "$file")
|
||||
local_music["$filename"]="$file"
|
||||
done
|
||||
|
||||
# Online Stations
|
||||
declare -A online_music=(
|
||||
["AfroBeatz 2024 🎧"]="https://www.youtube.com/watch?v=7uB-Eh9XVZQ"
|
||||
@@ -30,6 +22,17 @@ 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=()
|
||||
filenames=()
|
||||
while IFS= read -r file; do
|
||||
local_music+=("$file")
|
||||
filenames+=("$(basename "$file")")
|
||||
done < <(find "$mDIR" -type f \( -iname "*.mp3" -o -iname "*.flac" -o -iname "*.wav" -o -iname "*.ogg" \))
|
||||
}
|
||||
|
||||
# Function for displaying notifications
|
||||
notification() {
|
||||
notify-send -u normal -i "$iDIR/music.png" "Playing: $@"
|
||||
@@ -37,26 +40,30 @@ notification() {
|
||||
|
||||
# Main function for playing local music
|
||||
play_local_music() {
|
||||
populate_local_music
|
||||
|
||||
# Prompt the user to select a song
|
||||
choice=$(printf "%s\n" "${!local_music[@]}" | rofi -i -dmenu -config ~/.config/rofi/config-rofi-Beats.rasi -p "Local Music")
|
||||
choice=$(printf "%s\n" "${filenames[@]}" | rofi -i -dmenu -config ~/.config/rofi/config-rofi-Beats.rasi -p "Local Music")
|
||||
|
||||
if [ -z "$choice" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
file="${local_music[$choice]}"
|
||||
# Find the corresponding file path based on user's choice
|
||||
for (( i=0; i<"${#filenames[@]}"; i++ )); do
|
||||
if [ "${filenames[$i]}" = "$choice" ]; then
|
||||
file="${local_music[$i]}"
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
notification "$choice"
|
||||
|
||||
# Play the selected local music file using mpv and shuffle the rest
|
||||
mpv --shuffle --vid=no "$file" && \
|
||||
for file in $mDIR; do
|
||||
if [ "$file" != "${local_music[$choice]}" ]; then
|
||||
mpv --shuffle --vid=no "$file"
|
||||
fi
|
||||
done
|
||||
# Play the selected local music file using mpv
|
||||
mpv --shuffle --vid=no "$file"
|
||||
}
|
||||
|
||||
|
||||
# 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")
|
||||
@@ -76,8 +83,8 @@ play_online_music() {
|
||||
# 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" || {
|
||||
|
||||
# Prompt the user to choose between local and online music
|
||||
user_choice=$(printf "Play from Music Folder\nPlay from Online Stations" | rofi -dmenu -config ~/.config/rofi/config-rofi-Beats-menu.rasi -p "Select music source")
|
||||
# Prompt the user to choose between local and online music
|
||||
user_choice=$(printf "Play from Music Folder\nPlay from Online Stations" | rofi -dmenu -config ~/.config/rofi/config-rofi-Beats-menu.rasi -p "Select music source")
|
||||
|
||||
case "$user_choice" in
|
||||
"Play from Music Folder")
|
||||
@@ -91,4 +98,3 @@ pkill mpv && notify-send -u low -i "$iDIR/music.png" "Online Music stopped" || {
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
|
||||
# Variables
|
||||
scriptsDir=$HOME/.config/hypr/scripts
|
||||
wallpaper=$HOME/Pictures/wallpapers/Lofi-Urban-Nightscape.png
|
||||
waybar_style="$HOME/.config/waybar/style/[Wallust] Chroma Tally.css"
|
||||
wallpaper=$HOME/Pictures/wallpapers/Fantasy-Waterfall.png
|
||||
waybar_style="$HOME/.config/waybar/style/[Dark] Latte-Wallust combined.css"
|
||||
kvantum_theme="Catppuccin-Mocha"
|
||||
|
||||
swww="swww img"
|
||||
@@ -26,8 +26,8 @@ if [ ! -f ~/.config/hypr/.initial_startup_done ]; then
|
||||
|
||||
# initiate GTK dark mode and apply icon and cursor theme
|
||||
gsettings set org.gnome.desktop.interface color-scheme prefer-dark > /dev/null 2>&1 &
|
||||
gsettings set org.gnome.desktop.interface gtk-theme Tokyonight-Dark-BL-LB > /dev/null 2>&1 &
|
||||
gsettings set org.gnome.desktop.interface icon-theme Tokyonight-Dark > /dev/null 2>&1 &
|
||||
gsettings set org.gnome.desktop.interface gtk-theme Tokyonight-Dark-Moon-BL-LB > /dev/null 2>&1 &
|
||||
gsettings set org.gnome.desktop.interface icon-theme Flat-Remix-Blue-Dark > /dev/null 2>&1 &
|
||||
gsettings set org.gnome.desktop.interface cursor-theme Bibata-Modern-Ice > /dev/null 2>&1 &
|
||||
gsettings set org.gnome.desktop.interface cursor-size 24 > /dev/null 2>&1 &
|
||||
|
||||
|
||||
6
copy.sh
6
copy.sh
@@ -3,8 +3,8 @@
|
||||
|
||||
clear
|
||||
|
||||
wallpaper=$HOME/Pictures/wallpapers/Lofi-Urban-Nightscape.png
|
||||
Waybar_Style="$HOME/.config/waybar/style/[Wallust] Chroma Tally.css"
|
||||
wallpaper=$HOME/Pictures/wallpapers/Fantasy-Waterfall.png
|
||||
waybar_style="$HOME/.config/waybar/style/[Dark] Latte-Wallust combined.css"
|
||||
|
||||
# Check if running as root. If root, script will exit
|
||||
if [[ $EUID -eq 0 ]]; then
|
||||
@@ -295,7 +295,7 @@ while true; do
|
||||
done
|
||||
|
||||
# symlinks for waybar style
|
||||
ln -sf "$Waybar_Style" "$HOME/.config/waybar/style.css" && \
|
||||
ln -sf "$waybar_Style" "$HOME/.config/waybar/style.css" && \
|
||||
|
||||
# initialize wallust to avoid config error on hyprland
|
||||
wallust run -s $wallpaper 2>&1 | tee -a "$LOG"
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 7.3 MiB |
BIN
wallpapers/Fantasy-Waterfall.png
Normal file
BIN
wallpapers/Fantasy-Waterfall.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 12 MiB |
Reference in New Issue
Block a user