aboutsummaryrefslogtreecommitdiffstats
path: root/config/hypr
diff options
context:
space:
mode:
authorJaKooLit <ejhay.games@gmail.com>2025-02-10 01:16:17 +0900
committerJaKooLit <ejhay.games@gmail.com>2025-02-10 01:16:17 +0900
commitd404c8b6b94d973334a1136223fbf5c412083bdb (patch)
treee7394ffef88af10c76c34e1a3df7481ead33cb49 /config/hypr
parent752232f326fd82d28dac4107e5bf81818a657903 (diff)
Initial upload of various rofi themes
Diffstat (limited to 'config/hypr')
-rw-r--r--config/hypr/UserConfigs/UserKeybinds.conf2
-rwxr-xr-xconfig/hypr/UserScripts/QuickEdit.sh3
-rwxr-xr-xconfig/hypr/UserScripts/RofiBeats.sh12
-rwxr-xr-xconfig/hypr/UserScripts/RofiCalc.sh6
-rwxr-xr-xconfig/hypr/UserScripts/WallpaperEffects.sh15
-rwxr-xr-xconfig/hypr/UserScripts/WallpaperSelect.sh3
-rwxr-xr-xconfig/hypr/UserScripts/ZshChangeTheme.sh6
-rwxr-xr-xconfig/hypr/scripts/Animations.sh12
-rwxr-xr-xconfig/hypr/scripts/ClipManager.sh5
-rwxr-xr-xconfig/hypr/scripts/KeyBinds.sh3
-rwxr-xr-xconfig/hypr/scripts/RofiEmoji.sh5
-rwxr-xr-xconfig/hypr/scripts/RofiSearch.sh5
-rwxr-xr-xconfig/hypr/scripts/RofiThemeSelector.sh75
-rw-r--r--config/hypr/v2.3.11 (renamed from config/hypr/v2.3.10)0
14 files changed, 116 insertions, 36 deletions
diff --git a/config/hypr/UserConfigs/UserKeybinds.conf b/config/hypr/UserConfigs/UserKeybinds.conf
index 3975f60f..ebcd2e6d 100644
--- a/config/hypr/UserConfigs/UserKeybinds.conf
+++ b/config/hypr/UserConfigs/UserKeybinds.conf
@@ -23,6 +23,8 @@ bind = $mainMod, A, exec, pkill rofi || true && ags -t 'overview'
bind = $mainMod, Return, exec, $term #terminal
bind = $mainMod, T, exec, $files #file manager
+bind = $mainMod CTRL, R, exec, $scriptsDir/RofiThemeSelector.sh # modified Rofi Theme Selector
+
bind = $mainMod ALT, C, exec, $UserScripts/RofiCalc.sh # calculator (qalculate)
# pyprland
diff --git a/config/hypr/UserScripts/QuickEdit.sh b/config/hypr/UserScripts/QuickEdit.sh
index e0af9dce..c71fb166 100755
--- a/config/hypr/UserScripts/QuickEdit.sh
+++ b/config/hypr/UserScripts/QuickEdit.sh
@@ -9,6 +9,7 @@ tty=kitty
# Paths to configuration directories
configs="$HOME/.config/hypr/configs"
UserConfigs="$HOME/.config/hypr/UserConfigs"
+rofi_theme="~/.config/rofi/config-edit.rasi"
# Function to display the menu options
menu() {
@@ -29,7 +30,7 @@ EOF
# Main function to handle menu selection
main() {
- choice=$(menu | rofi -i -dmenu -config ~/.config/rofi/config-compact.rasi | cut -d. -f1)
+ choice=$(menu | rofi -i -dmenu -config $rofi_theme | cut -d. -f1)
# Map choices to corresponding files
case $choice in
diff --git a/config/hypr/UserScripts/RofiBeats.sh b/config/hypr/UserScripts/RofiBeats.sh
index 380f6b29..58241256 100755
--- a/config/hypr/UserScripts/RofiBeats.sh
+++ b/config/hypr/UserScripts/RofiBeats.sh
@@ -2,11 +2,11 @@
# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ##
# For Rofi Beats to play online Music or Locally save media files
-# Directory local music folder
+# Variables
mDIR="$HOME/Music/"
-
-# Directory for icons
iDIR="$HOME/.config/swaync/icons"
+rofi_theme="~/.config/rofi/config-rofi-Beats.rasi"
+rofi_theme_1="~/.config/rofi/config-rofi-Beats-menu.rasi"
# Online Stations. Edit as required
declare -A online_music=(
@@ -47,7 +47,7 @@ play_local_music() {
populate_local_music
# Prompt the user to select a song
- choice=$(printf "%s\n" "${filenames[@]}" | rofi -i -dmenu -config ~/.config/rofi/config-rofi-Beats.rasi)
+ choice=$(printf "%s\n" "${filenames[@]}" | rofi -i -dmenu -config $rofi_theme)
if [ -z "$choice" ]; then
exit 1
@@ -77,7 +77,7 @@ shuffle_local_music() {
# 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)
+ choice=$(printf "%s\n" "${!online_music[@]}" | rofi -i -dmenu -config $rofi_theme)
if [ -z "$choice" ]; then
exit 1
@@ -101,7 +101,7 @@ fi
# 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)
+user_choice=$(printf "Play from Online Stations\nPlay from Music Folder\nShuffle Play from Music Folder" | rofi -dmenu -config $rofi_theme_1)
case "$user_choice" in
"Play from Music Folder")
diff --git a/config/hypr/UserScripts/RofiCalc.sh b/config/hypr/UserScripts/RofiCalc.sh
index cef80b81..7bef4b6c 100755
--- a/config/hypr/UserScripts/RofiCalc.sh
+++ b/config/hypr/UserScripts/RofiCalc.sh
@@ -3,7 +3,7 @@
# /* Calculator (using qalculate) and rofi */
# /* Submitted by: https://github.com/JosephArmas */
-rofi_config="$HOME/.config/rofi/config-calc.rasi"
+rofi_theme="$HOME/.config/rofi/config-calc.rasi"
# Kill Rofi if already running before execution
if pgrep -x "rofi" >/dev/null; then
@@ -15,8 +15,8 @@ fi
while true; do
result=$(
rofi -i -dmenu \
- -config "$rofi_config" \
- -mesg "$result = $calc_result"
+ -config $rofi_theme \
+ -mesg "$result = $calc_result"
)
if [ $? -ne 0 ]; then
diff --git a/config/hypr/UserScripts/WallpaperEffects.sh b/config/hypr/UserScripts/WallpaperEffects.sh
index 215fdf6f..2573f5e0 100755
--- a/config/hypr/UserScripts/WallpaperEffects.sh
+++ b/config/hypr/UserScripts/WallpaperEffects.sh
@@ -8,6 +8,7 @@ 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}')
+rofi_theme="~/.config/rofi/config-wallpaper-effect.rasi"
# Directory for swaync
iDIR="$HOME/.config/swaync/images"
@@ -45,9 +46,7 @@ declare -A effects=(
# Function to apply no effects
no-effects() {
swww img -o "$focused_monitor" "$wallpaper_current" $SWWW_PARAMS &&
- # Wait for swww command to complete
wait $!
- # Run other commands after swww
wallust run "$wallpaper_current" -s &&
wait $!
# Refresh rofi, waybar, wallust palettes
@@ -67,7 +66,7 @@ main() {
[[ "$effect" != "No Effects" ]] && options+=("$effect")
done
- choice=$(printf "%s\n" "${options[@]}" | LC_COLLATE=C sort | rofi -dmenu -i -config ~/.config/rofi/config-wallpaper-effect.rasi)
+ choice=$(printf "%s\n" "${options[@]}" | LC_COLLATE=C sort | rofi -dmenu -i -config $rofi_theme)
# Process user choice
if [[ -n "$choice" ]]; then
@@ -77,16 +76,14 @@ main() {
# Apply selected effect
notify-send -u normal -i "$iDIR/ja.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
+
sleep 2
- # Wait for other commands to finish
+
wallust run "$wallpaper_output" -s &
- # Wait for other commands to finish
- sleep 0.5
+ sleep 1
# Refresh rofi, waybar, wallust palettes
"${SCRIPTSDIR}/Refresh.sh"
notify-send -u low -i "$iDIR/ja.png" "$choice" "effects applied"
diff --git a/config/hypr/UserScripts/WallpaperSelect.sh b/config/hypr/UserScripts/WallpaperSelect.sh
index 19bb145d..61253cb3 100755
--- a/config/hypr/UserScripts/WallpaperSelect.sh
+++ b/config/hypr/UserScripts/WallpaperSelect.sh
@@ -13,6 +13,7 @@ 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}')
# swww transition config
FPS=60
@@ -33,7 +34,7 @@ RANDOM_PIC="${PICS[$((RANDOM % ${#PICS[@]}))]}"
RANDOM_PIC_NAME=". random"
# Rofi command
-rofi_command="rofi -i -show -dmenu -config ~/.config/rofi/config-wallpaper.rasi"
+rofi_command="rofi -i -show -dmenu -config $rofi_theme"
# Sorting Wallpapers
menu() {
diff --git a/config/hypr/UserScripts/ZshChangeTheme.sh b/config/hypr/UserScripts/ZshChangeTheme.sh
index edfc2ecd..d43b6ff9 100755
--- a/config/hypr/UserScripts/ZshChangeTheme.sh
+++ b/config/hypr/UserScripts/ZshChangeTheme.sh
@@ -8,15 +8,16 @@
themes_dir="$HOME/.oh-my-zsh/themes"
file_extension=".zsh-theme"
-# Directory for swaync
+# Variables
iDIR="$HOME/.config/swaync/images"
+rofi_theme="~/.config/rofi/config-zsh-theme.rasi"
themes_array=($(find "$themes_dir" -type f -name "*$file_extension" -exec basename {} \; | sed -e "s/$file_extension//"))
# Add "Random" option to the beginning of the array
themes_array=("Random" "${themes_array[@]}")
-rofi_command="rofi -i -dmenu -config ~/.config/rofi/config-zsh-theme.rasi"
+rofi_command="rofi -i -dmenu -config $rofi_theme"
menu() {
for theme in "${themes_array[@]}"; do
@@ -29,7 +30,6 @@ main() {
# if nothing selected, script won't change anything
if [ -z "$choice" ]; then
- notify-send -u low -i "$iDIR/ja.png" "No theme selected." "No changes made!"
exit 0
fi
diff --git a/config/hypr/scripts/Animations.sh b/config/hypr/scripts/Animations.sh
index 7789cb05..b4d368e9 100755
--- a/config/hypr/scripts/Animations.sh
+++ b/config/hypr/scripts/Animations.sh
@@ -12,23 +12,19 @@ iDIR="$HOME/.config/swaync/images"
SCRIPTSDIR="$HOME/.config/hypr/scripts"
animations_dir="$HOME/.config/hypr/animations"
UserConfigs="$HOME/.config/hypr/UserConfigs"
+rofi_theme="~/.config/rofi/config-Animations.rasi"
# list of animation files, sorted alphabetically with numbers first
animations_list=$(find "$animations_dir" -maxdepth 1 -type f | sed 's/.*\///' | sed 's/\.conf$//' | sort -V)
# Rofi Menu
-chosen_file=$(echo "$animations_list" | rofi -i -dmenu -config ~/.config/rofi/config-Animations.rasi)
+chosen_file=$(echo "$animations_list" | rofi -i -dmenu -config $rofi_theme)
# Check if a file was selected
if [[ -n "$chosen_file" ]]; then
- # Find the full path of the chosen file
- full_path="$animations_dir/$chosen_file.conf"
-
- cp "$full_path" "$UserConfigs/UserAnimations.conf"
-
+ full_path="$animations_dir/$chosen_file.conf"
+ cp "$full_path" "$UserConfigs/UserAnimations.conf"
notify-send -u low -i "$iDIR/ja.png" "$chosen_file" "Hyprland Animation Loaded"
-else
- notify-send -u low -i "$iDIR/ja.png" "You chose NOT" "to apply other Hyprland animations"
fi
sleep 1
diff --git a/config/hypr/scripts/ClipManager.sh b/config/hypr/scripts/ClipManager.sh
index 13f90a9e..642adb82 100755
--- a/config/hypr/scripts/ClipManager.sh
+++ b/config/hypr/scripts/ClipManager.sh
@@ -2,6 +2,9 @@
# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ##
# Clipboard Manager. This script uses cliphist, rofi, and wl-copy.
+# Variables
+rofi_theme="~/.config/rofi/config-clipboard.rasi"
+
# Actions:
# CTRL Del to delete an entry
# ALT Del to wipe clipboard contents
@@ -16,7 +19,7 @@ while true; do
rofi -i -dmenu \
-kb-custom-1 "Control-Delete" \
-kb-custom-2 "Alt-Delete" \
- -config ~/.config/rofi/config-clipboard.rasi < <(cliphist list)
+ -config $rofi_theme < <(cliphist list)
)
case "$?" in
diff --git a/config/hypr/scripts/KeyBinds.sh b/config/hypr/scripts/KeyBinds.sh
index 9e01a7c3..f80211f5 100755
--- a/config/hypr/scripts/KeyBinds.sh
+++ b/config/hypr/scripts/KeyBinds.sh
@@ -14,6 +14,7 @@ fi
KEYBINDS_CONF="$HOME/.config/hypr/configs/Keybinds.conf"
USER_KEYBINDS_CONF="$HOME/.config/hypr/UserConfigs/UserKeybinds.conf"
LAPTOP_CONF="$HOME/.config/hypr/UserConfigs/Laptop.conf"
+rofi_theme="~/.config/rofi/config-keybinds.rasi"
# Combine the contents of the keybinds files and filter for keybinds
KEYBINDS=$(cat "$KEYBINDS_CONF" "$USER_KEYBINDS_CONF" | grep -E '^(bind|bindl|binde|bindm)')
@@ -31,4 +32,4 @@ if [[ -z "$KEYBINDS" ]]; then
fi
# Use rofi to display the keybinds
-echo "$KEYBINDS" | rofi -dmenu -i -p "Keybinds" -config ~/.config/rofi/config-keybinds.rasi \ No newline at end of file
+echo "$KEYBINDS" | rofi -dmenu -i -config $rofi_theme \ No newline at end of file
diff --git a/config/hypr/scripts/RofiEmoji.sh b/config/hypr/scripts/RofiEmoji.sh
index fa27a341..1079bfdd 100755
--- a/config/hypr/scripts/RofiEmoji.sh
+++ b/config/hypr/scripts/RofiEmoji.sh
@@ -2,13 +2,16 @@
# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ##
# Rofi Emoticons. Not my own. Cant remember the source
+# Variables
+rofi_theme="~/.config/rofi/config-emoji.rasi"
+
# Check if rofi is already running
if pidof rofi > /dev/null; then
pkill rofi
fi
sed '1,/^# # DATA # #$/d' "$0" | \
-rofi -i -dmenu -config ~/.config/rofi/config-emoji.rasi | \
+rofi -i -dmenu -config $rofi_theme | \
awk -F'\t' '{print $1}' | \
tr -d '\n' | \
wl-copy
diff --git a/config/hypr/scripts/RofiSearch.sh b/config/hypr/scripts/RofiSearch.sh
index faf07865..d9576a1a 100755
--- a/config/hypr/scripts/RofiSearch.sh
+++ b/config/hypr/scripts/RofiSearch.sh
@@ -4,7 +4,7 @@
# Opens rofi in dmenu mod and waits for input. Then pushes the input to the query of the URL.
-rofi_config="$HOME/.config/rofi/config-search.rasi"
+rofi_theme="$HOME/.config/rofi/config-search.rasi"
# Kill Rofi if already running before execution
if pgrep -x "rofi" >/dev/null; then
@@ -13,5 +13,6 @@ if pgrep -x "rofi" >/dev/null; then
fi
# Open rofi with a dmenu and pass the selected item to xdg-open for Google search
-echo "" | rofi -dmenu -config "$rofi_config" | xargs -I{} xdg-open "https://www.google.com/search?q={}"
+#echo "" | rofi -dmenu -config "$rofi_config" | xargs -I{} xdg-open "https://www.google.com/search?q={}"
+echo "" | rofi -dmenu -config $rofi_theme | xargs -I{} xdg-open "https://www.google.com/search?q={}"
diff --git a/config/hypr/scripts/RofiThemeSelector.sh b/config/hypr/scripts/RofiThemeSelector.sh
new file mode 100755
index 00000000..420316bd
--- /dev/null
+++ b/config/hypr/scripts/RofiThemeSelector.sh
@@ -0,0 +1,75 @@
+#!/bin/bash
+# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ##
+# Script for adding a selected theme to the Rofi config
+
+IFS=$'\n\t'
+
+# Define directories and variables
+rofi_theme_dir="$HOME/.local/share/rofi/themes"
+rofi_config_file="$HOME/.config/rofi/config.rasi"
+SED=$(which sed)
+iDIR="$HOME/.config/swaync/images"
+rofi_theme="$HOME/.config/rofi/config-rofi-theme.rasi"
+
+# Function to display menu options
+menu() {
+ options=()
+ while IFS= read -r file; do
+ options+=("$(basename "$file")")
+ done < <(find "$rofi_theme_dir" -maxdepth 1 -type f -exec basename {} \; | sort)
+
+ printf '%s\n' "${options[@]}"
+}
+
+# Function to add or update theme in the config.rasi
+add_theme_to_config() {
+ local theme_name="$1"
+ local theme_path="$rofi_theme_dir/$theme_name"
+
+ # if config in $HOME to write as $HOME
+ if [[ "$theme_path" == $HOME/* ]]; then
+ theme_path_with_tilde="~${theme_path#$HOME}"
+ else
+ theme_path_with_tilde="$theme_path"
+ fi
+
+ # If no @theme is in the file, add it
+ if ! grep -q '^\s*@theme' "$rofi_config_file"; then
+ echo -e "\n\n@theme \"$theme_path_with_tilde\"" >> "$rofi_config_file"
+ echo "Added @theme \"$theme_path_with_tilde\" to $rofi_config_file"
+ else
+ $SED -i "s/^\(\s*@theme.*\)/\/\/\1/" "$rofi_config_file"
+ echo -e "@theme \"$theme_path_with_tilde\"" >> "$rofi_config_file"
+ echo "Updated @theme line to $theme_path_with_tilde"
+ fi
+
+ # Ensure no more than max # of lines with //@theme lines
+ max_line="9"
+ total_lines=$(grep -c '^\s*//@theme' "$rofi_config_file")
+
+ if [ "$total_lines" -gt "$max_line" ]; then
+ excess=$((total_lines - max_line))
+ # Remove the oldest or the very top //@theme lines
+ for i in $(seq 1 "$excess"); do
+ $SED -i '0,/^\s*\/\/@theme/ { /^\s*\/\/@theme/ {d; q; }}' "$rofi_config_file"
+ done
+ echo "Removed excess //@theme lines"
+ fi
+}
+
+# Main function
+main() {
+ choice=$(menu | rofi rofi -dmenu -i -config $rofi_theme)
+
+ if [[ -z "$choice" ]]; then
+ exit 0
+ fi
+ add_theme_to_config "$choice"
+ notify-send -i "$iDIR/ja.png" -u low 'Rofi Theme' "$choice applied."
+}
+
+if pgrep -x "rofi" >/dev/null; then
+ pkill rofi
+fi
+
+main
diff --git a/config/hypr/v2.3.10 b/config/hypr/v2.3.11
index 31b3414d..31b3414d 100644
--- a/config/hypr/v2.3.10
+++ b/config/hypr/v2.3.11
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage