From d404c8b6b94d973334a1136223fbf5c412083bdb Mon Sep 17 00:00:00 2001 From: JaKooLit Date: Mon, 10 Feb 2025 01:16:17 +0900 Subject: Initial upload of various rofi themes --- config/hypr/scripts/RofiThemeSelector.sh | 75 ++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100755 config/hypr/scripts/RofiThemeSelector.sh (limited to 'config/hypr/scripts/RofiThemeSelector.sh') 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 -- cgit v1.2.3 From dd46262fdfaabebb6fd2213a9baec91dd4244086 Mon Sep 17 00:00:00 2001 From: JaKooLit Date: Thu, 13 Feb 2025 10:02:50 +0900 Subject: added -L on find command on some scripts to be more https://github.com/JaKooLit/Hyprland-Dots/issues/553 --- config/hypr/UserScripts/00-Readme | 0 config/hypr/UserScripts/RofiBeats.sh | 2 +- config/hypr/UserScripts/WallpaperRandom.sh | 2 +- config/hypr/UserScripts/WallpaperSelect.sh | 2 +- config/hypr/UserScripts/ZshChangeTheme.sh | 2 +- config/hypr/scripts/Animations.sh | 2 +- config/hypr/scripts/DarkLight.sh | 6 +++--- config/hypr/scripts/RofiThemeSelector.sh | 2 +- config/hypr/scripts/Sounds.sh | 8 ++++---- config/hypr/scripts/WaybarLayout.sh | 3 ++- config/hypr/scripts/WaybarStyles.sh | 4 +++- 11 files changed, 18 insertions(+), 15 deletions(-) mode change 100644 => 100755 config/hypr/UserScripts/00-Readme (limited to 'config/hypr/scripts/RofiThemeSelector.sh') diff --git a/config/hypr/UserScripts/00-Readme b/config/hypr/UserScripts/00-Readme old mode 100644 new mode 100755 diff --git a/config/hypr/UserScripts/RofiBeats.sh b/config/hypr/UserScripts/RofiBeats.sh index 58241256..38ff8829 100755 --- a/config/hypr/UserScripts/RofiBeats.sh +++ b/config/hypr/UserScripts/RofiBeats.sh @@ -34,7 +34,7 @@ populate_local_music() { 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" -o -iname "*.mp4" \)) + done < <(find -L "$mDIR" -type f \( -iname "*.mp3" -o -iname "*.flac" -o -iname "*.wav" -o -iname "*.ogg" -o -iname "*.mp4" \)) } # Function for displaying notifications diff --git a/config/hypr/UserScripts/WallpaperRandom.sh b/config/hypr/UserScripts/WallpaperRandom.sh index 1a5064e7..abaa9b03 100755 --- a/config/hypr/UserScripts/WallpaperRandom.sh +++ b/config/hypr/UserScripts/WallpaperRandom.sh @@ -7,7 +7,7 @@ SCRIPTSDIR="$HOME/.config/hypr/scripts" focused_monitor=$(hyprctl monitors | awk '/^Monitor/{name=$2} /focused: yes/{print name}') -PICS=($(find ${wallDIR} -type f \( -name "*.jpg" -o -name "*.jpeg" -o -name "*.png" -o -name "*.pnm" -o -name "*.tga" -o -name "*.tiff" -o -name "*.webp" -o -name "*.bmp" -o -name "*.farbfeld" -o -name "*.gif" \))) +PICS=($(find -L ${wallDIR} -type f \( -name "*.jpg" -o -name "*.jpeg" -o -name "*.png" -o -name "*.pnm" -o -name "*.tga" -o -name "*.tiff" -o -name "*.webp" -o -name "*.bmp" -o -name "*.farbfeld" -o -name "*.gif" \))) RANDOMPICS=${PICS[ $RANDOM % ${#PICS[@]} ]} diff --git a/config/hypr/UserScripts/WallpaperSelect.sh b/config/hypr/UserScripts/WallpaperSelect.sh index 61253cb3..86264775 100755 --- a/config/hypr/UserScripts/WallpaperSelect.sh +++ b/config/hypr/UserScripts/WallpaperSelect.sh @@ -28,7 +28,7 @@ if pidof swaybg > /dev/null; then fi # Retrieve image files using null delimiter to handle spaces in filenames -mapfile -d '' PICS < <(find "${wallDIR}" -type f \( -iname "*.jpg" -o -iname "*.jpeg" -o -iname "*.pnm" -o -iname "*.tga" -o -iname "*.tiff" -o -iname "*.webp" -o -iname "*.bmp" -o -iname "*.farbfeld" -o -iname "*.png" -o -iname "*.gif" \) -print0) +mapfile -d '' PICS < <(find -L "${wallDIR}" -type f \( -iname "*.jpg" -o -iname "*.jpeg" -o -iname "*.pnm" -o -iname "*.tga" -o -iname "*.tiff" -o -iname "*.webp" -o -iname "*.bmp" -o -iname "*.farbfeld" -o -iname "*.png" -o -iname "*.gif" \) -print0) RANDOM_PIC="${PICS[$((RANDOM % ${#PICS[@]}))]}" RANDOM_PIC_NAME=". random" diff --git a/config/hypr/UserScripts/ZshChangeTheme.sh b/config/hypr/UserScripts/ZshChangeTheme.sh index d43b6ff9..4ff43557 100755 --- a/config/hypr/UserScripts/ZshChangeTheme.sh +++ b/config/hypr/UserScripts/ZshChangeTheme.sh @@ -12,7 +12,7 @@ file_extension=".zsh-theme" 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//")) +themes_array=($(find -L "$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[@]}") diff --git a/config/hypr/scripts/Animations.sh b/config/hypr/scripts/Animations.sh index b4d368e9..62c32257 100755 --- a/config/hypr/scripts/Animations.sh +++ b/config/hypr/scripts/Animations.sh @@ -15,7 +15,7 @@ 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) +animations_list=$(find -L "$animations_dir" -maxdepth 1 -type f | sed 's/.*\///' | sed 's/\.conf$//' | sort -V) # Rofi Menu chosen_file=$(echo "$animations_list" | rofi -i -dmenu -config $rofi_theme) diff --git a/config/hypr/scripts/DarkLight.sh b/config/hypr/scripts/DarkLight.sh index 783fa31a..662e1954 100755 --- a/config/hypr/scripts/DarkLight.sh +++ b/config/hypr/scripts/DarkLight.sh @@ -68,7 +68,7 @@ set_waybar_style() { waybar_style_link="$HOME/.config/waybar/style.css" style_prefix="\\[${theme}\\].*\\.css$" - style_file=$(find "$waybar_styles" -maxdepth 1 -type f -regex ".*$style_prefix" | shuf -n 1) + style_file=$(find -L "$waybar_styles" -maxdepth 1 -type f -regex ".*$style_prefix" | shuf -n 1) if [ -n "$style_file" ]; then ln -sf "$style_file" "$waybar_style_link" @@ -117,9 +117,9 @@ fi # Set Dynamic Wallpaper for Dark or Light Mode if [ "$next_mode" = "Dark" ]; then - next_wallpaper="$(find "${dark_wallpapers}" -type f \( -iname "*.jpg" -o -iname "*.png" \) -print0 | shuf -n1 -z | xargs -0)" + next_wallpaper="$(find -L "${dark_wallpapers}" -type f \( -iname "*.jpg" -o -iname "*.png" \) -print0 | shuf -n1 -z | xargs -0)" else - next_wallpaper="$(find "${light_wallpapers}" -type f \( -iname "*.jpg" -o -iname "*.png" \) -print0 | shuf -n1 -z | xargs -0)" + next_wallpaper="$(find -L "${light_wallpapers}" -type f \( -iname "*.jpg" -o -iname "*.png" \) -print0 | shuf -n1 -z | xargs -0)" fi # Update wallpaper using swww command diff --git a/config/hypr/scripts/RofiThemeSelector.sh b/config/hypr/scripts/RofiThemeSelector.sh index 420316bd..cbce04b0 100755 --- a/config/hypr/scripts/RofiThemeSelector.sh +++ b/config/hypr/scripts/RofiThemeSelector.sh @@ -16,7 +16,7 @@ menu() { options=() while IFS= read -r file; do options+=("$(basename "$file")") - done < <(find "$rofi_theme_dir" -maxdepth 1 -type f -exec basename {} \; | sort) + done < <(find -L "$rofi_theme_dir" -maxdepth 1 -type f -exec basename {} \; | sort) printf '%s\n' "${options[@]}" } diff --git a/config/hypr/scripts/Sounds.sh b/config/hypr/scripts/Sounds.sh index 9ab9127d..8b2cc76e 100755 --- a/config/hypr/scripts/Sounds.sh +++ b/config/hypr/scripts/Sounds.sh @@ -58,13 +58,13 @@ iTheme=$(cat "$sDIR/index.theme" | grep -i "inherits" | cut -d "=" -f 2) iDIR="$sDIR/../$iTheme" # Find the sound file and play it. -sound_file=$(find $sDIR/stereo -name "$soundoption" -print -quit) +sound_file=$(find -L $sDIR/stereo -name "$soundoption" -print -quit) if ! test -f "$sound_file"; then - sound_file=$(find $iDIR/stereo -name "$soundoption" -print -quit) + sound_file=$(find -L $iDIR/stereo -name "$soundoption" -print -quit) if ! test -f "$sound_file"; then - sound_file=$(find $userDIR/$defaultTheme/stereo -name "$soundoption" -print -quit) + sound_file=$(find -L $userDIR/$defaultTheme/stereo -name "$soundoption" -print -quit) if ! test -f "$sound_file"; then - sound_file=$(find $systemDIR/$defaultTheme/stereo -name "$soundoption" -print -quit) + sound_file=$(find -L $systemDIR/$defaultTheme/stereo -name "$soundoption" -print -quit) if ! test -f "$sound_file"; then echo "Error: Sound file not found." exit 1 diff --git a/config/hypr/scripts/WaybarLayout.sh b/config/hypr/scripts/WaybarLayout.sh index d6c4db83..fe16d3e1 100755 --- a/config/hypr/scripts/WaybarLayout.sh +++ b/config/hypr/scripts/WaybarLayout.sh @@ -2,6 +2,7 @@ # /* ---- πŸ’« https://github.com/JaKooLit πŸ’« ---- */ ## # Script for waybar layout or configs +set -x IFS=$'\n\t' # Define directories @@ -15,7 +16,7 @@ menu() { options=() while IFS= read -r file; do options+=("$(basename "$file")") - done < <(find "$waybar_layouts" -maxdepth 1 -type f -exec basename {} \; | sort) + done < <(find -L "$waybar_layouts" -maxdepth 1 -type f -exec basename {} \; | sort) printf '%s\n' "${options[@]}" } diff --git a/config/hypr/scripts/WaybarStyles.sh b/config/hypr/scripts/WaybarStyles.sh index 62550ced..471c85e5 100755 --- a/config/hypr/scripts/WaybarStyles.sh +++ b/config/hypr/scripts/WaybarStyles.sh @@ -2,6 +2,8 @@ # /* ---- πŸ’« https://github.com/JaKooLit πŸ’« ---- */ ## # Script for waybar styles +set -x + IFS=$'\n\t' # Define directories @@ -17,7 +19,7 @@ menu() { if [ -f "$waybar_styles/$file" ]; then options+=("$(basename "$file" .css)") fi - done < <(find "$waybar_styles" -maxdepth 1 -type f -name '*.css' -exec basename {} \; | sort) + done < <(find -L "$waybar_styles" -maxdepth 1 -type f -name '*.css' -exec basename {} \; | sort) printf '%s\n' "${options[@]}" } -- cgit v1.2.3 From b478eef5f63d237eda06256bd4508c545bc6bcbe Mon Sep 17 00:00:00 2001 From: JaKooLit Date: Sat, 15 Feb 2025 12:45:34 +0900 Subject: updated keybinds search & rofi theme selector scripts --- config/hypr/scripts/KeyBinds.sh | 40 ++++++------ config/hypr/scripts/RofiThemeSelector-modified.sh | 75 ++++++++++++----------- config/hypr/scripts/RofiThemeSelector.sh | 4 +- 3 files changed, 63 insertions(+), 56 deletions(-) (limited to 'config/hypr/scripts/RofiThemeSelector.sh') diff --git a/config/hypr/scripts/KeyBinds.sh b/config/hypr/scripts/KeyBinds.sh index 639dd3a1..324a9d00 100755 --- a/config/hypr/scripts/KeyBinds.sh +++ b/config/hypr/scripts/KeyBinds.sh @@ -1,36 +1,40 @@ #!/bin/bash # /* ---- πŸ’« https://github.com/JaKooLit πŸ’« ---- */ ## -# Searchable enabled keybinds using rofi +# searchable enabled keybinds using rofi -# Kill yad to not interfere with this binds +# kill yad to not interfere with this binds pkill yad || true -# Check if rofi is already running +# check if rofi is already running if pidof rofi > /dev/null; then pkill rofi fi -# Define the config files -KEYBINDS_CONF="$HOME/.config/hypr/configs/Keybinds.conf" -USER_KEYBINDS_CONF="$HOME/.config/hypr/UserConfigs/UserKeybinds.conf" -LAPTOP_CONF="$HOME/.config/hypr/UserConfigs/Laptops.conf" +# define the config files +keybinds_conf="$HOME/.config/hypr/configs/Keybinds.conf" +user_keybinds_conf="$HOME/.config/hypr/UserConfigs/UserKeybinds.conf" +laptop_conf="$HOME/.config/hypr/UserConfigs/Laptops.conf" rofi_theme="$HOME/.config/rofi/config-keybinds.rasi" msg='☣️ NOTE ☣️: Clicking with Mouse or Pressing ENTER will have NO function' -# Combine the contents of the keybinds files and filter for keybinds -KEYBINDS=$(cat "$KEYBINDS_CONF" "$USER_KEYBINDS_CONF" | grep -E '^bind') +# combine the contents of the keybinds files and filter for keybinds +keybinds=$(cat "$keybinds_conf" "$user_keybinds_conf" | grep -E '^bind') -# Check if Laptop.conf exists and add its keybinds if present -if [[ -f "$LAPTOP_CONF" ]]; then - LAPTOP_BINDS=$(grep -E '^bind' "$LAPTOP_CONF") - KEYBINDS+=$'\n'"$LAPTOP_BINDS" +# check if laptop.conf exists and add its keybinds if present +if [[ -f "$laptop_conf" ]]; then + laptop_binds=$(grep -E '^bind' "$laptop_conf") + keybinds+=$'\n'"$laptop_binds" fi -# Check for any keybinds to display -if [[ -z "$KEYBINDS" ]]; then - echo "No keybinds found." +# check for any keybinds to display +if [[ -z "$keybinds" ]]; then + echo "no keybinds found." exit 1 fi -# Use rofi to display the keybinds -echo "$KEYBINDS" | rofi -dmenu -i -config "$rofi_theme" -mesg "$msg" +# replace $mainmod with super in the displayed keybinds for rofi +display_keybinds=$(echo "$keybinds" | sed 's/\$mainMod/SUPER/g') + +# use rofi to display the keybinds with the modified content +echo "$display_keybinds" | rofi -dmenu -i -config "$rofi_theme" -mesg "$msg" +s \ No newline at end of file diff --git a/config/hypr/scripts/RofiThemeSelector-modified.sh b/config/hypr/scripts/RofiThemeSelector-modified.sh index e4d476c3..2af75a73 100755 --- a/config/hypr/scripts/RofiThemeSelector-modified.sh +++ b/config/hypr/scripts/RofiThemeSelector-modified.sh @@ -36,7 +36,7 @@ then fi TMP_CONFIG_FILE=$(${MKTEMP}).rasi -rofi_theme_dir="${HOME}/.local/share/rofi/themes" +#rofi_theme_dir="${HOME}/.local/share/rofi/themes" rofi_config_file="${XDG_CONFIG_HOME:-${HOME}/.config}/rofi/config.rasi" ## @@ -50,32 +50,25 @@ declare -a theme_names # Function that tries to find all installed rofi themes. # This fills in #themes array and formats a displayable string #theme_names ## -find_themes() -{ - DIRS="${HOME}/.local/share" - OLDIFS=${IFS} - IFS=: - # Add user dir. - DIRS+=":${XDG_CONFIG_HOME:-${HOME}/.config}" - for p in ${DIRS}; do - p=${p%/} - TD=${p}/rofi/themes - if [ -n "${p}" ] && [ -d "${TD}" ] - then - echo "Checking themes in: ${TD}" - for file in ${TD}/*.rasi - do - if [ -f "${file}" ] - then - themes+=("${file}") - FN=$(basename "${file}") - NAME=${FN%.*} # Extract the file name without extension - theme_names+=("${NAME}") # Only add the base file name +# Find themes in defined directories +find_themes() { + directories=("$HOME/.local/share/rofi/themes" "$HOME/.config/rofi/themes") + + for TD in "${directories[@]}"; do + if [ -d "$TD" ]; then + echo "Checking themes in: $TD" + for file in "$TD"/*.rasi; do + if [ -f "$file" ] && [ ! -L "$file" ]; then + themes+=("$file") + theme_names+=("$(basename "${file%.*}")") + else + echo "Skipping symlink: $file" fi - done + done + else + echo "Directory does not exist: $TD" fi done - IFS=${OLDIFS} } ## @@ -83,16 +76,27 @@ find_themes() ## 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}" + local theme_path + + # Determine the correct path for the theme + if [[ -f "$HOME/.local/share/rofi/themes/$theme_name.rasi" ]]; then + theme_path="$HOME/.local/share/rofi/themes/$theme_name.rasi" + elif [[ -f "$HOME/.config/rofi/themes/$theme_name.rasi" ]]; then + theme_path="$HOME/.config/rofi/themes/$theme_name.rasi" else - theme_path_with_tilde="$theme_path" + echo "Theme not found: $theme_name" + return 1 fi - # If no @theme is in the file, add it + # Resolve symlinks if present + if [[ -L "$theme_path" ]]; then + theme_path=$(readlink -f "$theme_path") + fi + + # Convert path to use ~ for home directory + theme_path_with_tilde="~${theme_path#$HOME}" + + # Add or update @theme line in config 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" @@ -102,13 +106,12 @@ add_theme_to_config() { echo "Updated @theme line to $theme_path_with_tilde" fi - # Ensure no more than max # of lines with //@theme lines - max_line="9" + # Limit the number of @theme lines to a maximum of 9 + max_lines=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 + if [ "$total_lines" -gt "$max_lines" ]; then + excess=$((total_lines - max_lines)) for i in $(seq 1 "$excess"); do $SED -i '0,/^\s*\/\/@theme/ { /^\s*\/\/@theme/ {d; q; }}' "$rofi_config_file" done diff --git a/config/hypr/scripts/RofiThemeSelector.sh b/config/hypr/scripts/RofiThemeSelector.sh index cbce04b0..968d1f30 100755 --- a/config/hypr/scripts/RofiThemeSelector.sh +++ b/config/hypr/scripts/RofiThemeSelector.sh @@ -5,7 +5,7 @@ IFS=$'\n\t' # Define directories and variables -rofi_theme_dir="$HOME/.local/share/rofi/themes" +rofi_theme_dir="$HOME/.config/rofi/themes" rofi_config_file="$HOME/.config/rofi/config.rasi" SED=$(which sed) iDIR="$HOME/.config/swaync/images" @@ -25,7 +25,7 @@ menu() { 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}" -- cgit v1.2.3 From 0b00425dc338e739404bd200a1e2078237df71a9 Mon Sep 17 00:00:00 2001 From: installer Date: Sat, 15 Feb 2025 17:41:55 +0900 Subject: Updated rofi stuff --- config/hypr/UserConfigs/ENVariables.conf | 33 ++++++++++++++++------- config/hypr/scripts/Animations.sh | 4 +-- config/hypr/scripts/RofiThemeSelector-modified.sh | 2 +- config/hypr/scripts/RofiThemeSelector.sh | 2 +- config/rofi/config-Animations.rasi | 19 +++++++------ config/rofi/config-edit.rasi | 14 +++++----- config/rofi/config-keybinds.rasi | 1 + config/rofi/config-rofi-Beats.rasi | 10 +++---- config/rofi/config-rofi-theme.rasi | 15 +++++------ config/rofi/config-wallpaper-effect.rasi | 1 + config/rofi/config-waybar-layout.rasi | 17 ++++++------ config/rofi/config-waybar-style.rasi | 15 ++++++----- config/rofi/config-zsh-theme.rasi | 3 +-- config/rofi/config.rasi | 13 +++++---- 14 files changed, 80 insertions(+), 69 deletions(-) (limited to 'config/hypr/scripts/RofiThemeSelector.sh') diff --git a/config/hypr/UserConfigs/ENVariables.conf b/config/hypr/UserConfigs/ENVariables.conf index e5e5ab42..7dde28c4 100644 --- a/config/hypr/UserConfigs/ENVariables.conf +++ b/config/hypr/UserConfigs/ENVariables.conf @@ -4,30 +4,39 @@ # Set your defaults here #env = EDITOR,vim #default editor -#environment-variables -env = CLUTTER_BACKEND,wayland +# environment-variables +# Toolkit Backend Variables env = GDK_BACKEND,wayland,x11 -env = QT_AUTO_SCREEN_SCALE_FACTOR,1 env = QT_QPA_PLATFORM,wayland;xcb -env = QT_QPA_PLATFORMTHEME,qt5ct -env = QT_QPA_PLATFORMTHEME,qt6ct -env = QT_SCALE_FACTOR,1 -env = QT_WAYLAND_DISABLE_WINDOWDECORATION,1 +env = CLUTTER_BACKEND,wayland + +#Run SDL2 applications on Wayland. +#Remove or set to x11 if games that provide older versions of SDL cause compatibility issues +#env = SDL_VIDEODRIVER,wayland + +# xdg Specifications env = XDG_CURRENT_DESKTOP,Hyprland env = XDG_SESSION_DESKTOP,Hyprland env = XDG_SESSION_TYPE,wayland +# QT Variables +env = QT_AUTO_SCREEN_SCALE_FACTOR,1 +env = QT_WAYLAND_DISABLE_WINDOWDECORATION,1 +env = QT_QPA_PLATFORMTHEME,qt5ct +env = QT_QPA_PLATFORMTHEME,qt6ct + # hyprland-qt-support env = QT_QUICK_CONTROLS_STYLE,org.hyprland.style -# xwayland apps scale fix (useful if you are use monitor scaling) +# xwayland apps scale fix (useful if you are use monitor scaling). +# Set same value if you use scaling in Monitors.conf +# 1 is 100% 1.5 is 150% # see https://wiki.hyprland.org/Configuring/XWayland/ -# toolkit-specific scale env = GDK_SCALE,1 +env = QT_SCALE_FACTOR,1 # Bibata-Modern-Ice-Cursor # NOTE! You must have the hyprcursor version to activate this. -# If you installed from 26-Dec-2024 and choose GTK theme, then you have it. # https://wiki.hyprland.org/Hypr-Ecosystem/hyprcursor/ #env = HYPRCURSOR_THEME,Bibata-Modern-Ice #env = HYPRCURSOR_SIZE,24 @@ -41,6 +50,7 @@ env = ELECTRON_OZONE_PLATFORM_HINT,auto # NVIDIA # This is from Hyprland Wiki. Below will be activated nvidia gpu detected # See hyprland wiki https://wiki.hyprland.org/Nvidia/#environment-variables + #env = LIBVA_DRIVER_NAME,nvidia #env = __GLX_VENDOR_LIBRARY_NAME,nvidia #env = NVD_BACKEND,direct @@ -49,9 +59,12 @@ env = ELECTRON_OZONE_PLATFORM_HINT,auto #env = AQ_DRM_DEVICES,/dev/dri/card1 (nvidia) #env = AQ_DRM_DEVICES,/dev/dri/card0 +#env = AQ_NO_ATOMIC,1 #use legacy DRM interface + # additional ENV's for nvidia. Caution, activate with care #env = GBM_BACKEND,nvidia-drm +#env = __GL_GSYNC_ALLOWED,1 #adaptive Vsync #env = __NV_PRIME_RENDER_OFFLOAD,1 #env = __VK_LAYER_NV_optimus,NVIDIA_only #env = WLR_DRM_NO_ATOMIC,1 diff --git a/config/hypr/scripts/Animations.sh b/config/hypr/scripts/Animations.sh index 62c32257..4f49d47a 100755 --- a/config/hypr/scripts/Animations.sh +++ b/config/hypr/scripts/Animations.sh @@ -13,12 +13,12 @@ SCRIPTSDIR="$HOME/.config/hypr/scripts" animations_dir="$HOME/.config/hypr/animations" UserConfigs="$HOME/.config/hypr/UserConfigs" rofi_theme="~/.config/rofi/config-Animations.rasi" - +msg='❗NOTE:❗ This will copy animations into UserAnimations.conf' # list of animation files, sorted alphabetically with numbers first animations_list=$(find -L "$animations_dir" -maxdepth 1 -type f | sed 's/.*\///' | sed 's/\.conf$//' | sort -V) # Rofi Menu -chosen_file=$(echo "$animations_list" | rofi -i -dmenu -config $rofi_theme) +chosen_file=$(echo "$animations_list" | rofi -i -dmenu -config $rofi_theme -mesg "$msg") # Check if a file was selected if [[ -n "$chosen_file" ]]; then diff --git a/config/hypr/scripts/RofiThemeSelector-modified.sh b/config/hypr/scripts/RofiThemeSelector-modified.sh index 2af75a73..2cfc2d24 100755 --- a/config/hypr/scripts/RofiThemeSelector-modified.sh +++ b/config/hypr/scripts/RofiThemeSelector-modified.sh @@ -219,7 +219,7 @@ then # Send notification with the selected theme name selection="${theme_names[${SELECTED}]}" if [ -n "$NOTIFY_SEND" ]; then - notify-send -u low -i "$iDIR/ja.png" "Rofi Theme" "applied: $selection" + notify-send -u low -i "$iDIR/ja.png" "Rofi Theme applied:" "$selection" fi fi diff --git a/config/hypr/scripts/RofiThemeSelector.sh b/config/hypr/scripts/RofiThemeSelector.sh index 968d1f30..2e840ea1 100755 --- a/config/hypr/scripts/RofiThemeSelector.sh +++ b/config/hypr/scripts/RofiThemeSelector.sh @@ -65,7 +65,7 @@ main() { exit 0 fi add_theme_to_config "$choice" - notify-send -i "$iDIR/ja.png" -u low 'Rofi Theme' "$choice applied." + notify-send -i "$iDIR/ja.png" -u low 'Rofi Theme applied:' "$choice" } if pgrep -x "rofi" >/dev/null; then diff --git a/config/rofi/config-Animations.rasi b/config/rofi/config-Animations.rasi index 8aa22abf..7c458b09 100644 --- a/config/rofi/config-Animations.rasi +++ b/config/rofi/config-Animations.rasi @@ -6,10 +6,9 @@ /* ---- Mainbox ---- */ mainbox { children: - [ "inputbar", "listview"]; + [ "inputbar", "message", "listview"]; } - /* ---- Window ---- */ window { width: 30%; @@ -23,18 +22,18 @@ entry { /* ---- Listview ---- */ listview { - columns: 2; - lines: 9; - fixed-height: false; - margin: 10px; + columns: 2; + lines: 9; + fixed-height: false; + margin: 10px; } /* ---- Elements ---- */ element-icon { - size: 0%; + size: 0%; } element-text { - horizontal-align: 0.0; - vertical-align: 0.0; - margin: 5px 30px 5px 30px; + horizontal-align: 0.0; + vertical-align: 0.0; + margin: 5px 30px 5px 30px; } diff --git a/config/rofi/config-edit.rasi b/config/rofi/config-edit.rasi index 568de812..60d18e34 100644 --- a/config/rofi/config-edit.rasi +++ b/config/rofi/config-edit.rasi @@ -17,15 +17,15 @@ configuration { /* ---- Window ---- */ window { - width: 45%; + width: 45%; } /* ---- Listview ---- */ listview { - columns: 2; - lines: 6; - fixed-height: false; + columns: 2; + lines: 6; + fixed-height: false; } /* ---- Entry input ---- */ @@ -41,9 +41,9 @@ element { } element-icon { - size: 0%; + size: 0%; } element-text { - horizontal-align: 0.0; - margin: 5px 30px 5px 30px; + horizontal-align: 0.0; + margin: 5px 30px 5px 30px; } \ No newline at end of file diff --git a/config/rofi/config-keybinds.rasi b/config/rofi/config-keybinds.rasi index ccc8b4d7..2b19c271 100644 --- a/config/rofi/config-keybinds.rasi +++ b/config/rofi/config-keybinds.rasi @@ -21,6 +21,7 @@ listview { columns: 2; lines: 12; fixed-height: false; + scrollbar: true; } window { diff --git a/config/rofi/config-rofi-Beats.rasi b/config/rofi/config-rofi-Beats.rasi index b84b4260..b8121286 100644 --- a/config/rofi/config-rofi-Beats.rasi +++ b/config/rofi/config-rofi-Beats.rasi @@ -5,7 +5,7 @@ /* ---- Window ---- */ window { - width: 45%; + width: 45%; } /* ---- Mainbox ---- */ @@ -21,10 +21,10 @@ entry { /* ---- Listview ---- */ listview { - columns: 2; - lines: 8; - fixed-height: false; - margin: 10px; + columns: 2; + lines: 8; + fixed-height: false; + margin: 10px; } /* ---- Elements ---- */ diff --git a/config/rofi/config-rofi-theme.rasi b/config/rofi/config-rofi-theme.rasi index 14f1f971..d660f1f9 100644 --- a/config/rofi/config-rofi-theme.rasi +++ b/config/rofi/config-rofi-theme.rasi @@ -3,10 +3,9 @@ @import "~/.config/rofi/config.rasi" - /* ---- Window ---- */ window { - width: 45%; + width: 45%; } /* ---- Mainbox ---- */ @@ -17,10 +16,10 @@ mainbox { /* ---- Listview ---- */ listview { - columns: 2; - lines: 8; - fixed-height: false; - scrollbar: true; + columns: 2; + lines: 8; + fixed-height: false; + scrollbar: true; } /* ---- Entry input ---- */ @@ -39,7 +38,7 @@ element-icon { size: 0%; } element-text { - horizontal-align: 0.0; - margin: 5px 30px 5px 30px; + horizontal-align: 0.0; + margin: 5px 30px 5px 30px; } diff --git a/config/rofi/config-wallpaper-effect.rasi b/config/rofi/config-wallpaper-effect.rasi index 0fb534e3..de74747a 100644 --- a/config/rofi/config-wallpaper-effect.rasi +++ b/config/rofi/config-wallpaper-effect.rasi @@ -26,6 +26,7 @@ listview { columns: 2; lines: 8; fixed-height: false; + scrollbar: true; } /* ---- Inputbar ---- */ diff --git a/config/rofi/config-waybar-layout.rasi b/config/rofi/config-waybar-layout.rasi index cc24a170..c179a362 100644 --- a/config/rofi/config-waybar-layout.rasi +++ b/config/rofi/config-waybar-layout.rasi @@ -3,8 +3,6 @@ @import "~/.config/rofi/config.rasi" - - /* ---- Configuration ---- */ configuration { modi: "drun"; @@ -24,17 +22,18 @@ entry { /* ---- Listview ---- */ listview { - columns: 2; - lines: 9; - fixed-height: false; - margin: 10px; + columns: 2; + lines: 9; + fixed-height: false; + margin: 10px; + scrollbar: true; } /* ---- Elements ---- */ element-icon { - size: 0%; + size: 0%; } element-text { - horizontal-align: 0.0; - margin: 5px 30px 5px 30px; + horizontal-align: 0.0; + margin: 5px 30px 5px 30px; } diff --git a/config/rofi/config-waybar-style.rasi b/config/rofi/config-waybar-style.rasi index bfb3829a..12c5a757 100644 --- a/config/rofi/config-waybar-style.rasi +++ b/config/rofi/config-waybar-style.rasi @@ -23,17 +23,18 @@ entry { /* ---- Listview ---- */ listview { - columns: 2; - lines: 9; - fixed-height: false; - margin: 10px; + columns: 2; + lines: 9; + fixed-height: false; + margin: 10px; + scrollbar: true; } /* ---- Elements ---- */ element-icon { - size: 0%; + size: 0%; } element-text { - horizontal-align: 0.0; - margin: 5px 30px 5px 30px; + horizontal-align: 0.0; + margin: 5px 30px 5px 30px; } diff --git a/config/rofi/config-zsh-theme.rasi b/config/rofi/config-zsh-theme.rasi index c2293b4e..1b0b58f7 100644 --- a/config/rofi/config-zsh-theme.rasi +++ b/config/rofi/config-zsh-theme.rasi @@ -15,10 +15,9 @@ window { } mainbox { - children: [ "inputbar" , "listview" ]; + children: [ "inputbar" , "listview" ]; } - /* ---- Listbox ---- */ listbox { border-radius: 12px; diff --git a/config/rofi/config.rasi b/config/rofi/config.rasi index 586de76e..cda85e8a 100644 --- a/config/rofi/config.rasi +++ b/config/rofi/config.rasi @@ -1,25 +1,24 @@ /* ---- πŸ’« https://github.com/JaKooLit πŸ’« ---- */ /* Ja KooLit - Default -* All main themes or configs are located in ~/.local/share/rofi/themes +* All main themes or configs are located in ~/.config/rofi/themes/ * If you want to edit the config, that is where you should edit NOT here -* To load a new theme, manually edit the file path below or choose desired theme via rofi theme selector +* To load a new theme, manually edit the file path below or choose desired theme via rofi theme selector (choose via app menu) * Alternative way to Load (preferred) own cooked by Ja -* SUPER CTRL R - Choose style +* SUPER CTRL R - Choose style & SUPER CTRL SHIFT R * TIPS * If you have edited a config, rename it with a unique name. During update, the contents of -* ~/.local/share/rofi/themes will be replaced. However, it wont overwrite your own config if you -* renamed with your own unique file name */ +* ~/.config/rofi/themes/ will be replaced. /* ---- Configuration Fonts ---- */ configuration { font: "JetBrainsMono Nerd Font SemiBold 13"; } -/* note: Element-text font and size, edit configs in ~/.local/share/rofi/themes */ +/* note: Element-text font and size, edit configs in ~/.config/rofi/themes/ */ -@theme "~/.local/share/rofi/themes/KooL_style-2-Dark.rasi" +@theme "~/.config/rofi/themes/KooL_style-2-Dark.rasi" -- cgit v1.2.3