feat(hyprland): wallpaper switcher

using rofi and the browser-extended plugin to select a wallpaper for the system
also made a random wallpaper script for the start of the system
This commit is contained in:
Sergio Laín 2023-10-07 22:56:02 +02:00
parent a0e6cf42b9
commit 4812602708
No known key found for this signature in database
GPG key ID: 14C9B8080681777B
24 changed files with 36 additions and 20 deletions

View file

@ -58,6 +58,9 @@ bind=SUPER, space, exec, wleave
# Color picker # Color picker
bind=SUPER,Insert,exec,hyprpicker -a && notify-send -t 4000 "$(wl-paste)" bind=SUPER,Insert,exec,hyprpicker -a && notify-send -t 4000 "$(wl-paste)"
# Wallpaper
bind=SUPERSHIFT,w,exec, ~/.config/hypr/scripts/rofi/wallpaper_selection
# Keybindings Cheatsheet # Keybindings Cheatsheet
bind=SUPER,i,exec, ~/.config/hypr/scripts/keybindings bind=SUPER,i,exec, ~/.config/hypr/scripts/keybindings

View file

@ -23,7 +23,7 @@ udiskie &
devify & devify &
# Wallpaper # Wallpaper
$scripts/wallpaper & $scripts/random_wallpaper &
# Idle daemon to screen lock # Idle daemon to screen lock
/home/matt/.config/sway/idle.sh & /home/matt/.config/sway/idle.sh &

View file

@ -0,0 +1,10 @@
#!/usr/bin/bash
function load_wp() {
IMAGE=$(fd -e png -e jpg --base-directory "$HOME/.config/hypr/themes/luna/walls/" --type f . | shuf -n 1)
swww img --transition-type wipe --transition-pos top-right --transition-duration 3.8 --transition-step 255 $HOME/.config/hypr/themes/luna/walls/"$IMAGE"
}
swww init
load_wp

View file

@ -0,0 +1,11 @@
#!/usr/bin/bash
function load_wp() {
# IMAGE=$(fd -e png -e jpg --base-directory "$HOME/.config/hypr/themes/luna/walls/" --type f . | shuf -n 1)
IMAGE=$(rofi -show file-browser-extended -theme ~/.config/rofi/style.rasi -file-browser-stdout -file-browser-dir $HOME/.config/hypr/themes/luna/walls/)
swww img --transition-type wipe --transition-pos top-right --transition-duration 3.8 --transition-step 255 "$IMAGE"
}
swww init
load_wp

View file

@ -1,10 +0,0 @@
#!/bin/sh
# Change the path of the image to yours
function load_wp(){
swww img --transition-type wipe --transition-pos top-right --transition-duration 3.8 --transition-step 255 ~/.config/wallpaper.png
}
swww init
load_wp

Binary file not shown.

After

Width:  |  Height:  |  Size: 194 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 274 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 320 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 129 KiB

View file

Before

Width:  |  Height:  |  Size: 1.6 MiB

After

Width:  |  Height:  |  Size: 1.6 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 100 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 248 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 458 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 97 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 347 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 170 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 273 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 831 KiB

View file

@ -24,6 +24,8 @@
key: Alt + Insert key: Alt + Insert
- name: Color Picker - name: Color Picker
key: Win + Insert key: Win + Insert
- name: Wallpaper Picker
key: Win + Shift + W
- name: Zoom - name: Zoom
key: Win + Z key: Win + Z
- name: Logout Menu - name: Logout Menu

View file

@ -1,6 +1,6 @@
configuration { configuration {
/*---------- General setting ----------*/ /*---------- General setting ----------*/
modi: "drun,run,filebrowser,window"; modi: "drun,run,file-browser-extended,window";
case-sensitive: false; case-sensitive: false;
cycle: true; cycle: true;
filter: ""; filter: "";

View file

@ -1,6 +1,6 @@
/*****----- Configuration -----*****/ /*****----- Configuration -----*****/
configuration { configuration {
modi: "drun,filebrowser,window"; modi: "drun,file-browser-extended,window";
show-icons: true; show-icons: true;
display-drun: "Apps"; display-drun: "Apps";
display-run: "Run"; display-run: "Run";
@ -24,8 +24,8 @@ window {
anchor: center; anchor: center;
fullscreen: false; fullscreen: false;
border: 2px; border: 2px;
border-radius: 15px; border-radius: 10px;
border-color: #B7BDF87F; border-color: #B7BDF869;
width: 500px; width: 500px;
x-offset: 0px; x-offset: 0px;
y-offset: 0px; y-offset: 0px;
@ -34,7 +34,7 @@ window {
enabled: true; enabled: true;
margin: 0px; margin: 0px;
padding: 0px; padding: 0px;
border-radius: 20px; border-radius: 10px;
cursor: "default"; cursor: "default";
background-color: #24273A; background-color: #24273A;
} }
@ -110,7 +110,7 @@ element {
margin: 0px; margin: 0px;
padding: 10px; padding: 10px;
border: 0px solid; border: 0px solid;
border-radius: 15px; border-radius: 10px;
background-color: transparent; background-color: transparent;
text-color: #CAD3F5; text-color: #CAD3F5;
cursor: pointer; cursor: pointer;
@ -120,7 +120,7 @@ element normal.active {
text-color: #CAD3F5; text-color: #CAD3F5;
} }
element selected.normal { element selected.normal {
border-radius: 15px; border-radius: 10px;
background-image: linear-gradient(to right, #363A4F, #B7BDF89F); background-image: linear-gradient(to right, #363A4F, #B7BDF89F);
text-color: #CAD3F5; text-color: #CAD3F5;
} }
@ -151,7 +151,7 @@ mode-switcher{
button { button {
font: "JetBrains Mono Nerd Font 10"; font: "JetBrains Mono Nerd Font 10";
padding: 10px; padding: 10px;
border-radius: 100%; border-radius: 10px;
background-image: linear-gradient(#939ab7); background-image: linear-gradient(#939ab7);
text-color: #24273A; text-color: #24273A;
cursor: pointer; cursor: pointer;
@ -169,7 +169,7 @@ error-message {
} }
textbox { textbox {
padding: 0px; padding: 0px;
border-radius: 0px; border-radius: 10px;
text-color: #CAD3F5; text-color: #CAD3F5;
vertical-align: 0.5; vertical-align: 0.5;
horizontal-align: 0.0; horizontal-align: 0.0;