🔧 chore: add default wallpaper + default config, remove drun apps support

fixes a lot of issues related to color generation, since now there's a default wallpaper
This commit is contained in:
retrozinndev
2025-08-23 12:21:57 -03:00
parent 48ee49d867
commit 8ed04b6fed
13 changed files with 50 additions and 79 deletions
+1 -1
View File
@@ -7,7 +7,7 @@ general {
} }
listener { listener {
timeout = 3600 # 1800 -> 30m | 3600 -> 1h | 7200 -> 2h timeout = 1800 # 1800 -> 30m | 3600 -> 1h | 7200 -> 2h
on-timeout = hyprlock on-timeout = hyprlock
# on-resume = notify-send "Welcome back to Hyprland, $USER!" # on-resume = notify-send "Welcome back to Hyprland, $USER!"
} }
+5 -5
View File
@@ -42,8 +42,8 @@ background {
# Time # Time
label { label {
monitor = monitor =
text = cmd[update:30000] echo -e "$(date +"%R")" # 24-hours text = cmd[update:30000] echo -n "$(date +"%R")" # 24-hours
# text = cmd[update:30000] echo -e "$(date +"%I:%M %p")" # 12-hours (AM/PM) # text = cmd[update:30000] echo -n "$(date +"%I:%M %p")" # 12-hours (AM/PM)
color = $foreground color = $foreground
shadow_passes = 1 shadow_passes = 1
shadow_size = 2 shadow_size = 2
@@ -59,7 +59,7 @@ label {
# Date # Date
label { label {
monitor = monitor =
text = cmd[update:43200000] echo -e "$(date +"%A, %d %B %Y")" text = cmd[update:43200000] echo -n "$(date +"%A, %d %B %Y")"
color = $foreground color = $foreground
shadow_passes = 1 shadow_passes = 1
shadow_size = 2 shadow_size = 2
@@ -78,13 +78,13 @@ label {
font_size = 6 font_size = 6
font_family = $minimalFont font_family = $minimalFont
color = $foreground color = $foreground
text = Currently logged in as $USER text = cmd[update:0] echo -n "Logged as $USER in $(hostnamectl hostname)"
halign = center halign = center
valign = bottom valign = bottom
position = 0, 5 position = 0, 5
} }
Media # Media
label { label {
monitor = monitor =
font_size = 12 font_size = 12
+8
View File
@@ -0,0 +1,8 @@
# default hyprpaper config from colorshell
# hypr-chan is a mascot of Hyprland, it's not made by retrozinndev
$wallpaper = ~/wallpapers/Default Hypr-chan.jpg
preload = $wallpaper
wallpaper = , $wallpaper
splash = true
+11 -18
View File
@@ -1,7 +1,7 @@
#!usr/bin/env bash #!usr/bin/env bash
# Prompts the user with dmenu(or dmenu-like app, see hypr/scripts/get-dmenu.sh) # Prompts the user with dmenu(or dmenu-like app, see hypr/scripts/get-dmenu.sh)
# to choose an image file inside defined $WALLPAPERS_DIR. If the user selects # to choose an image file inside defined $WALLPAPERS. If the user selects
# an entry, it automatically writes changes to the hyprpaper.conf file and # an entry, it automatically writes changes to the hyprpaper.conf file and
# hot-reloads if hyprpaper is running. # hot-reloads if hyprpaper is running.
# -------------- # --------------
@@ -10,11 +10,7 @@
# From https://github.com/retrozinndev/colorshell # From https://github.com/retrozinndev/colorshell
style="lighten" # lighten / darken style="lighten" # lighten / darken
dmenu=$(sh "$XDG_CONFIG_HOME/hypr/scripts/get-dmenu.sh") WALLPAPERS=`[[ -z "$WALLPAPERS" ]] && echo -n "$HOME/wallpapers" || echo -n "$WALLPAPERS"`
if [[ -z "$WALLPAPERS_DIR" ]]; then
WALLPAPERS_DIR="$HOME/wallpapers"
fi
function Write_changes() { function Write_changes() {
echo "[LOG] Writing to hyprpaper config file" echo "[LOG] Writing to hyprpaper config file"
@@ -39,33 +35,30 @@ function Reload_pywal() {
wal -t --cols16 $style -i "$wall" wal -t --cols16 $style -i "$wall"
} }
if [[ -z "$dmenu" ]]; then if [[ -z $(ls -A -w1 $WALLPAPERS) ]]; then
notify-send -u normal -a "Wallpaper" "Dmenu not found" "Couldn't find anyrun or wofi for dmenu! Try installing one of these two before selecting wallpaper!"
exit 1
fi
if [[ -z $(ls -A $WALLPAPERS_DIR) ]]; then
notify-send -u normal -a "Wallpaper" "Wallpapers not found" "Couldn't find any wallpaper inside \`~/wallpapers\`, try putting an image you like in there to choose it!" notify-send -u normal -a "Wallpaper" "Wallpapers not found" "Couldn't find any wallpaper inside \`~/wallpapers\`, try putting an image you like in there to choose it!"
exit 1 exit 1
fi fi
if [[ -z $1 ]]; then if [[ -z $@ ]]; then
# Prompt wallpaper list # Prompt wallpaper list
wall="$WALLPAPERS_DIR/$(ls $WALLPAPERS_DIR | $dmenu)" selection=`ls -w1 "$WALLPAPERS" | wofi --show drun`
# Check if input wallpaper is empty # Check if input wallpaper is empty
if [[ $wall == "$WALLPAPERS_DIR/" ]]; then if [[ -z $selection ]]; then
echo "No wallpaper has been selected by user!" echo "No wallpaper has been selected by user!"
if [[ $RANDOM_WALLPAPER_WHEN_EMPTY == true ]]; then if [[ $RANDOM_WALLPAPER_WHEN_EMPTY == true ]]; then
wall="$WALLPAPERS_DIR/$(ls $WALLPAPERS_DIR | shuf -n 1)" wall="$WALLPAPERS/$(ls $WALLPAPERS | shuf -n 1)"
echo "Selected random from $WALLPAPERS_DIR: $wall" echo "Selected random from $WALLPAPERS: $wall"
else else
echo "Skipping hyprpaper changes and exiting." echo "Skipping hyprpaper changes and exiting."
exit 0 exit 0
fi fi
else
wall="$WALLPAPERS/$selection" # wofi if no wallpaper specified
fi fi
else else
wall=$1 wall=$@
fi fi
Reload_pywal Reload_pywal
-7
View File
@@ -1,7 +0,0 @@
#!/usr/bin/env bash
selection=$(cliphist list | anyrun --plugins libstdin.so | cliphist decode)
if [[ ! -z "$selection" ]]; then
printf "%s" "$selection" | sed -e 's/\\[n]$//g' | wl-copy
fi
+2 -1
View File
@@ -1,7 +1,8 @@
#!/usr/bin/env bash #!/usr/bin/env bash
function send_notification() { function send_notification() {
notify-send -u normal -a "color-picker" "$1" "$2" (notify-send -u normal -a "color-picker" "$1" "$2" > /dev/null 2>&1) || \
(echo "$1: $2")
} }
# Check if hyprpicker is installed # Check if hyprpicker is installed
+4 -8
View File
@@ -7,15 +7,11 @@
# Made by retrozinndev (João Dias) # Made by retrozinndev (João Dias)
# From https://github.com/retrozinndev/colorshell # From https://github.com/retrozinndev/colorshell
if ! [[ -f "$HOME/.config/hypr/hyprpaper.conf" ]]; then if ! [[ -f "$XDG_CONFIG_HOME/hypr/hyprpaper.conf" ]]; then
notify-send -a "Wallpaper" "Couldn't load" "Wallpaper file not found! Please check for the wallpaper: $wallpaper." echo "[error] wallpaper file not found!"
exit 1 exit 1
fi fi
wallpaper="$(cat $HOME'/.config/hypr/hyprpaper.conf' | grep '$wallpaper =' | sed -e 's/^$wallpaper = //')" wallpaper=`cat "$XDG_CONFIG_HOME/hypr/hyprpaper.conf" | grep '$wallpaper =' | sed -e 's/^$wallpaper = //'`
[[ -d "$XDG_CACHE_HOME/wal" ]] && wal -R || wal -q -t --cols16 darken -i "$wallpaper"
if [[ -d "$HOME/.cache/wal" ]]; then
wal -R
else
wal -q -t --cols16 darken -i "$wallpaper"
fi
-26
View File
@@ -1,26 +0,0 @@
#!/usr/bin/env bash
# Checks environment for dmenu or dmenu-like apps
# and prints out a command to pipe of.
# -----------
# Licensed under the MIT License
# Made by retrozinndev (João Dias)
# From: https://github.com/retrozinndev/colorshell
DMENUS=(
"anyrun:--plugins:libstdin.so"
"rofi:-dmenu"
"wofi:--show:dmenu"
"dmenu"
)
for dmenu in ${DMENUS[@]}; do
name=$(printf "$dmenu" | awk -F: '{ print $1 }')
cmd=$(env "$name" -h > /dev/null)
code=$?
if [[ ! $code == 127 ]]; then
echo "$dmenu" | sed 's/:/ /g'
break;
fi
done
+4 -6
View File
@@ -1,13 +1,11 @@
# color-shell specific configuration, please don't modify unless you know what you're doing! # color-shell specific configuration, please don't modify unless you know what you're doing!
# some commands don't need $exec (uwsm) if they're just process communication tools
# `astal` and some `*ctl` commands don't need $exec (uwsm), since they're just process communication tools
bind = $mainMod, SPACE, exec, $menu bind = $mainMod, SPACE, exec, $menu
bind = $mainMod, F11, fullscreen bind = $mainMod, F11, fullscreen
bind = , Print, exec, $exec sh $XDG_CONFIG_HOME/hypr/scripts/screenshot.sh bind = , Print, exec, $exec $scripts/screenshot.sh
bind = $mainMod, Print, exec, $exec sh $XDG_CONFIG_HOME/hypr/scripts/screenshot.sh full bind = $mainMod, Print, exec, $exec $scripts/screenshot.sh full
# restarts colorshell # restarts colorshell
bind = $mainMod, F7, exec, colorshell reload || $exec colorshell bind = $mainMod, F7, exec, colorshell reload || $exec colorshell
@@ -21,7 +19,7 @@ bind = $mainMod, J, togglesplit
bind = $mainMod, N, exec, colorshell toggle control-center bind = $mainMod, N, exec, colorshell toggle control-center
bind = $mainMod, M, exec, colorshell toggle center-window bind = $mainMod, M, exec, colorshell toggle center-window
bind = $mainMod, L, exec, $exec hyprlock bind = $mainMod, L, exec, $exec hyprlock
bind = $mainMod, V, exec, colorshell runner '>' || $exec sh $XDG_CONFIG_HOME/hypr/scripts/clipboard-menu.sh bind = $mainMod, V, exec, colorshell runner '>'
bind = $mainMod, W, exec, colorshell runner '\##' bind = $mainMod, W, exec, colorshell runner '\##'
# bind = $mainMod, $mainMod_L, exec, colorshell toggle apps-window # bind = $mainMod, $mainMod_L, exec, colorshell toggle apps-window
+3
View File
@@ -1,6 +1,9 @@
# color-shell configuration, please don't modify unless you know what you're doing! # color-shell configuration, please don't modify unless you know what you're doing!
# add colorshell to PATH by default
env = PATH, $PATH:$HOME/.local/bin
# XDG Vars # XDG Vars
env = XDG_CONFIG_HOME, $HOME/.config env = XDG_CONFIG_HOME, $HOME/.config
env = XDG_CACHE_HOME, $HOME/.cache env = XDG_CACHE_HOME, $HOME/.cache
+2 -1
View File
@@ -6,8 +6,9 @@
############### ###############
# Wiki: https://wiki.hyprland.org/Hypr-Ecosystem/hyprlang#defining-variables # Wiki: https://wiki.hyprland.org/Hypr-Ecosystem/hyprlang#defining-variables
$scripts = sh $XDG_CONFIG_HOME/hypr/scripts
# Use this variable to execute apps dinamically (runs with uwsm if being used by compositor) # Use this variable to execute apps dinamically (runs with uwsm if being used by compositor)
$exec = sh $XDG_CONFIG_HOME/hypr/scripts/exec.sh $exec = $scripts/exec.sh
$mainMod = SUPER $mainMod = SUPER
$terminal = kitty $terminal = kitty
+10 -6
View File
@@ -79,6 +79,9 @@ if [[ "$answer" == y ]] || [[ "$skip_prompts" ]]; then
Send_log "Installing $dir in $dest" Send_log "Installing $dir in $dest"
mkdir -p `dirname "$dest"` # create parents mkdir -p `dirname "$dest"` # create parents
[[ -d "$dest" ]] || [[ -f "$dest" ]] && \
rm -rf $dest
cp -rf $repo_directory/config/$dir "$dest" # copy cp -rf $repo_directory/config/$dir "$dest" # copy
done done
@@ -86,24 +89,25 @@ if [[ "$answer" == y ]] || [[ "$skip_prompts" ]]; then
prev_wd=`pwd` prev_wd=`pwd`
cd "$repo_directory" cd "$repo_directory"
pnpm build:release pnpm build:release
cd "$prev_wd"
Send_log "Installing colorshell" Send_log "Installing colorshell"
# install shell # install shell
mkdir -p $BIN_HOME mkdir -p $BIN_HOME
cp -f ./build/release/colorshell $BIN_HOME cp -f $repo_directory/build/release/colorshell $BIN_HOME
# install gresource # install gresource
mkdir -p $XDG_DATA_HOME/colorshell mkdir -p $XDG_DATA_HOME/colorshell
cp -f ./build/release/resources.gresource $XDG_DATA_HOME/colorshell cp -f $repo_directory/build/release/resources.gresource $XDG_DATA_HOME/colorshell
# install desktop entry # install desktop entry
mkdir -p $APPS_HOME mkdir -p $APPS_HOME
cp -f ./build/release/colorshell.desktop $APPS_HOME cp -f $repo_directory/build/release/colorshell.desktop $APPS_HOME
Send_log "Cleaning"
pnpm clean
cd "$prev_wd" Send_log "Adding default wallpaper in ~/wallpapers"
mkdir -p $HOME/wallpapers
cp -f $repo_directory/resources/wallpaper_default.jpg "$HOME/wallpapers/Default Hypr-chan.jpg"
if [[ -z "$skip_prompts" ]]; then if [[ -z "$skip_prompts" ]]; then
echo "Colorshell is installed! :D" echo "Colorshell is installed! :D"
Binary file not shown.

After

Width:  |  Height:  |  Size: 255 KiB