diff --git a/config/hypr/UserConfigs/Wallpaper.conf b/config/hypr/UserConfigs/Wallpaper.conf new file mode 100644 index 0000000..e75a9cd --- /dev/null +++ b/config/hypr/UserConfigs/Wallpaper.conf @@ -0,0 +1,9 @@ +$wallpaper_switcher=$HOME/.config/hypr/UserScripts/WallpaerSwitcher.sh +$wallpaper_dir=$HOME/Pictures/wallpapers + +windowrulev2=size 1200 500,title:^(FTQCW)$ +windowrulev2=center,title:^(FTQCW)$ + +#Move this to keybind files,i just want to avoid conflict. +$mainMod =SUPER +bind = $mainMod CTRL, W, exec,kitty -T "FTQCW" --class floating bash $wallpaper_switcher "$wallpaper_dir" diff --git a/config/hypr/UserScripts/WallpaperSwitcher.sh b/config/hypr/UserScripts/WallpaperSwitcher.sh new file mode 100644 index 0000000..78474c0 --- /dev/null +++ b/config/hypr/UserScripts/WallpaperSwitcher.sh @@ -0,0 +1,10 @@ +#!/bin/bash +cd $1 +result=$(find . -type f|fzf \ +--reverse --header="WallPaperSwitcher" --preview-window=44% \ +--preview='kitten icat --clear --transfer-mode=memory --place="$FZF_PREVIEW_COLUMNS"x"$FZF_PREVIEW_LINES"@$(math $COLUMNS+5)x1 --align center --stdin=no -z -1 {}') +#?? Maybe its a good idea to make a global function for changing wallpaper, something like :$hypr_dir/Scirpt/ChangeWallpapper.sh "SomePic.jpg" +#so if you change wallpaper somewhere else,the workflow stay the same. +#and you can move SWWW_PARAMS to the Wallpaper.conf so user can change that without touching the scirpt +swww img "$result" +exit 0 diff --git a/config/hypr/hyprland.conf b/config/hypr/hyprland.conf index 69f421c..01c8ffa 100644 --- a/config/hypr/hyprland.conf +++ b/config/hypr/hyprland.conf @@ -16,4 +16,5 @@ source= $UserConfigs/Laptops.conf source= $UserConfigs/LaptopDisplay.conf source= $UserConfigs/WindowRules.conf source= $UserConfigs/UserKeybinds.conf -source= $UserConfigs/UserSettings.conf \ No newline at end of file +source= $UserConfigs/UserSettings.conf +source= $UserConfigs/Wallpaper.conf