Saataa andagii !
This commit is contained in:
parent
cf90f6147a
commit
56d5497961
8 changed files with 200 additions and 0 deletions
|
@ -13,6 +13,7 @@ monitor=,preferred,auto,auto
|
|||
$terminal = kitty
|
||||
$fileManager = nautilus
|
||||
$menu = wofi --show drun
|
||||
$wallpaper-changer = $HOME/.config/hypr/scripts/wallpaper-changer2.sh
|
||||
|
||||
|
||||
#################
|
||||
|
@ -163,6 +164,7 @@ bind = $mainMod SHIFT, S, exec, grim -g "$(slurp -d)" - | wl-copy
|
|||
bind = $mainMod, L, exec, hyprlock
|
||||
bind = $mainMod, D, exec, discord-canary
|
||||
bind = $mainMod, F, exec, zen-browser
|
||||
bind = $mainMod, W, exec, $HOME/.config/hypr/scripts/wallpaper-switcher2.sh
|
||||
|
||||
# move focus
|
||||
bind = $mainMod, left, movefocus, l
|
||||
|
|
90
.config/hypr/scripts/wallpaper-switcher2.sh
Executable file
90
.config/hypr/scripts/wallpaper-switcher2.sh
Executable file
|
@ -0,0 +1,90 @@
|
|||
#!/bin/bash
|
||||
|
||||
# borrowed from https://github.com/JaKooLit/wallpaper-switcher/
|
||||
|
||||
# WALLPAPERS PATH
|
||||
DIR=$HOME/.config/hypr/wallpapers
|
||||
|
||||
# Transition config (type swww img --help for more settings
|
||||
FPS=30
|
||||
TYPE="outer"
|
||||
DURATION=3
|
||||
|
||||
# wofi window config (in %)
|
||||
WIDTH=20
|
||||
HEIGHT=30
|
||||
|
||||
SWWW_PARAMS="--transition-fps $FPS --transition-type $TYPE --transition-duration $DURATION"
|
||||
|
||||
|
||||
PICS=($(ls ${DIR} | grep -e ".jpg$" -e ".jpeg$" -e ".png$" -e ".gif$"))
|
||||
|
||||
RANDOM_PIC=${PICS[ $RANDOM % ${#PICS[@]} ]}
|
||||
RANDOM_PIC_NAME="${#PICS[@]}. random"
|
||||
|
||||
|
||||
# WOFI STYLES
|
||||
CONFIG=$HOME/.config/hypr/wofi-wallpapers/config
|
||||
STYLE=$HOME/.config/hypr/wofi-wallpapers/style.css
|
||||
COLORS=$HOME/.config/hypr/wofi-wallpapers/colors
|
||||
|
||||
# to check if swaybg is running
|
||||
|
||||
if [[ $(pidof swaybg) ]]; then
|
||||
pkill swaybg
|
||||
fi
|
||||
|
||||
## Wofi Command
|
||||
wofi_command="wofi --show dmenu \
|
||||
--prompt choose...
|
||||
--conf $CONFIG --style $STYLE --color $COLORS \
|
||||
--width=$WIDTH% --height=$HEIGHT% \
|
||||
--cache-file=/dev/null \
|
||||
--hide-scroll --no-actions \
|
||||
--matching=fuzzy"
|
||||
|
||||
menu(){
|
||||
# Here we are looping in the PICS array that is composed of all images in the $DIR
|
||||
# folder
|
||||
for i in ${!PICS[@]}; do
|
||||
# keeping the .gif to make sue you know it is animated
|
||||
if [[ -z $(echo ${PICS[$i]} | grep .gif$) ]]; then
|
||||
printf "$i. $(echo ${PICS[$i]} | cut -d. -f1)\n" # n°. <name_of_file_without_identifier>
|
||||
else
|
||||
printf "$i. ${PICS[$i]}\n"
|
||||
fi
|
||||
done
|
||||
|
||||
printf "$RANDOM_PIC_NAME"
|
||||
}
|
||||
|
||||
swww query || swww-daemon
|
||||
|
||||
main() {
|
||||
choice=$(menu | ${wofi_command})
|
||||
|
||||
# no choice case
|
||||
if [[ -z $choice ]]; then return; fi
|
||||
|
||||
# random choice case
|
||||
if [ "$choice" = "$RANDOM_PIC_NAME" ]; then
|
||||
swww img ${DIR}/${RANDOM_PIC} $SWWW_PARAMS
|
||||
return
|
||||
fi
|
||||
|
||||
pic_index=$(echo $choice | cut -d. -f1)
|
||||
swww img ${DIR}/${PICS[$pic_index]} $SWWW_PARAMS
|
||||
}
|
||||
|
||||
# Check if wofi is already running
|
||||
if pidof wofi >/dev/null; then
|
||||
killall wofi
|
||||
exit 0
|
||||
else
|
||||
main
|
||||
fi
|
||||
|
||||
# Uncomment to launch something if a choice was made
|
||||
# if [[ -n "$choice" ]]; then
|
||||
# Restart Waybar
|
||||
# fi
|
BIN
.config/hypr/wallpapers/megumin1.jpeg
Normal file
BIN
.config/hypr/wallpapers/megumin1.jpeg
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.5 MiB |
BIN
.config/hypr/wallpapers/megumin2.png
Normal file
BIN
.config/hypr/wallpapers/megumin2.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.6 MiB |
BIN
.config/hypr/wallpapers/power2.cctgDbFY.png.part
Normal file
BIN
.config/hypr/wallpapers/power2.cctgDbFY.png.part
Normal file
Binary file not shown.
After Width: | Height: | Size: 1 MiB |
6
.config/hypr/wofi-wallpapers/colors
Normal file
6
.config/hypr/wofi-wallpapers/colors
Normal file
|
@ -0,0 +1,6 @@
|
|||
#2F3741
|
||||
#2F3741
|
||||
#d9e0ee
|
||||
#4B87CD
|
||||
#f38ba8
|
||||
#cba6f7
|
40
.config/hypr/wofi-wallpapers/config
Normal file
40
.config/hypr/wofi-wallpapers/config
Normal file
|
@ -0,0 +1,40 @@
|
|||
## Wofi Config
|
||||
|
||||
## General
|
||||
show=drun
|
||||
prompt=Apps
|
||||
normal_window=true
|
||||
layer=overlay
|
||||
term=foot
|
||||
columns=2
|
||||
|
||||
## Geometry
|
||||
width=30%
|
||||
height=30%
|
||||
location=top_left
|
||||
orientation=vertical
|
||||
halign=fill
|
||||
line_wrap=off
|
||||
dynamic_lines=false
|
||||
|
||||
## Images
|
||||
allow_markup=true
|
||||
allow_images=true
|
||||
image_size=24
|
||||
|
||||
## Search
|
||||
exec_search=false
|
||||
hide_search=false
|
||||
parse_search=false
|
||||
insensitive=false
|
||||
|
||||
## Other
|
||||
hide_scroll=true
|
||||
no_actions=true
|
||||
sort_order=default
|
||||
gtk_dark=true
|
||||
filter_rate=100
|
||||
|
||||
## Keys
|
||||
key_expand=Tab
|
||||
key_exit=Escape
|
62
.config/hypr/wofi-wallpapers/style.css
Normal file
62
.config/hypr/wofi-wallpapers/style.css
Normal file
|
@ -0,0 +1,62 @@
|
|||
{
|
||||
font-family: "Fantasque Sans Mono";
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
#window {
|
||||
/*background-color: --wofi-color0;*/
|
||||
background-color: rgba(50, 50, 50, 0.8);
|
||||
color: --wofi-color2;
|
||||
border: 2px solid --wofi-color1;
|
||||
border-radius: 0px;
|
||||
}
|
||||
|
||||
#outer-box {
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
#input {
|
||||
background-color: --wofi-color1;
|
||||
border: 1px solid --wofi-color3;
|
||||
padding: 8px 12px;
|
||||
}
|
||||
|
||||
#scroll {
|
||||
margin-top: 20px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
#inner-box {
|
||||
}
|
||||
|
||||
#img {
|
||||
padding-right: 10px;
|
||||
}
|
||||
|
||||
#text {
|
||||
color: --wofi-color2;
|
||||
}
|
||||
|
||||
#text:selected {
|
||||
color: --wofi-color0;
|
||||
}
|
||||
|
||||
#entry {
|
||||
padding: 6px;
|
||||
}
|
||||
|
||||
#entry:selected {
|
||||
background-color: --wofi-color3;
|
||||
background: linear-gradient(90deg, #bbccdd, #cca5dd);
|
||||
color: --wofi-color0;
|
||||
}
|
||||
|
||||
#unselected {
|
||||
}
|
||||
|
||||
#selected {
|
||||
}
|
||||
|
||||
#input, #entry:selected {
|
||||
border-radius: 4px;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue