добавлен бинд для смены обоев
This commit is contained in:
1 parent
e96d3d4dc3
commit
031e8826e3
3 files changed
+44
-6
No files matched your search
@@ -148,10 +148,10 @@ gestures {
|
||||
|
||||
# Example per-device config
|
||||
# See https://wiki.hyprland.org/Configuring/Keywords/#per-device-input-configs for more
|
||||
device {
|
||||
name = epic-mouse-v1
|
||||
sensitivity = -0.3
|
||||
}
|
||||
# device {
|
||||
# name = epic-mouse-v1
|
||||
# sensitivity = -0.3
|
||||
# }
|
||||
|
||||
##############################
|
||||
### WINDOWS AND WORKSPACES ###
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
# See https://wiki.hyprland.org/Configuring/Keywords/
|
||||
$terminal = kitty
|
||||
$fileManager = dolphin
|
||||
$fileManager = nautilus
|
||||
$menu = rofi -show drun
|
||||
$editor = code
|
||||
$browser = brave
|
||||
@@ -13,10 +13,11 @@ $browser = brave
|
||||
### KEYBINDINGS ###
|
||||
###################
|
||||
|
||||
# See https://wiki.hyprland.org/Configuring/Binds/
|
||||
# See https://wiki.hyprland.org/Configuring/Keywords/
|
||||
$mainMod = SUPER # Sets "Windows" key as main modifier
|
||||
|
||||
# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more
|
||||
# Application shortcuts
|
||||
bind = $mainMod, W, exec, $terminal
|
||||
bind = $mainMod, R, exec, $menu
|
||||
bind = $mainMod, E, exec, $fileManager
|
||||
@@ -25,6 +26,11 @@ bind = $mainMod, B, exec, $browser
|
||||
bind = $mainMod, K, exec, keepassxc
|
||||
bind = $mainMod, V, exec, cliphist list | rofi -dmenu | cliphist decode | wl-copy
|
||||
|
||||
# Change wallpaper
|
||||
bind = CONTROL_ALT, B, exec, $HOME/.config/hypr/scripts/wallpaper.sh -prev
|
||||
bind = CONTROL_ALT, N, exec, $HOME/.config/hypr/scripts/wallpaper.sh -next
|
||||
|
||||
# Restart Waybar
|
||||
bind = $mainMod, F2, exec, killall waybar && waybar -c $HOME/.config/waybar/config.jsonc -s $HOME/.config/waybar/styles.css && dunstify "Waybar restarted"
|
||||
|
||||
bind = $mainMod, Q, killactive,
|
||||
|
||||
Executable
+32
@@ -0,0 +1,32 @@
|
||||
#!/bin/bash
|
||||
|
||||
WALLPAPER_DIR="$HOME/Pictures/Wallpapers"
|
||||
|
||||
INDEX_FILE="$HOME/.current_wallpaper_index"
|
||||
|
||||
if [ ! -f "$INDEX_FILE" ]; then
|
||||
echo 0 > "$INDEX_FILE"
|
||||
fi
|
||||
|
||||
WALLPAPERS=("$WALLPAPER_DIR"/*)
|
||||
WALLPAPER_COUNT=${#WALLPAPERS[@]}
|
||||
|
||||
CURRENT_INDEX=$(<"$INDEX_FILE")
|
||||
|
||||
if [[ "$1" == "-next" ]]; then
|
||||
((CURRENT_INDEX=(CURRENT_INDEX + 1) % WALLPAPER_COUNT))
|
||||
elif [[ "$1" == "-prev" ]]; then
|
||||
((CURRENT_INDEX=(CURRENT_INDEX - 1 + WALLPAPER_COUNT) % WALLPAPER_COUNT))
|
||||
else
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo "$CURRENT_INDEX" > "$INDEX_FILE"
|
||||
|
||||
SELECTED_WALLPAPER="${WALLPAPERS[$CURRENT_INDEX]}"
|
||||
CURRENT_WALLPAPER=$(hyprctl -j monitors | jq -r '.[] | select(.name=="eDP-1") | .wallpaper')
|
||||
|
||||
if [ "$CURRENT_WALLPAPER" != "$SELECTED_WALLPAPER" ]; then
|
||||
hyprctl hyprpaper preload "$SELECTED_WALLPAPER"
|
||||
hyprctl hyprpaper wallpaper "eDP-1,$SELECTED_WALLPAPER"
|
||||
fi
|
||||
Reference in new issue
Block a user