fixing swaybg and brave getting merked on reboot
This commit is contained in:
parent
d7810071cd
commit
89d863c084
@ -1,20 +1,25 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Built for sway with optional dependancy on swaybg for ease of setting
|
||||
|
||||
wallpapers_dir=~/.local/share/wallpapers
|
||||
finder="rofi-dmenu Wallpaper"
|
||||
cur_wallpaper="$HOME/.wallpaper"
|
||||
|
||||
# selection mode
|
||||
if [ "$1" == "-s" ] ; then
|
||||
cd "$wallpapers_dir"
|
||||
|
||||
if [ "$1" == "-s" ] ; then
|
||||
selection=$(find -L -type f -printf '%P\n' | $finder)
|
||||
if [ -n "$selection" ] ; then
|
||||
# didnt exit, overwrite wallpaper
|
||||
ln -sf "$wallpapers_dir/$selection" "$HOME/.wallpaper"
|
||||
ln -sf "$wallpapers_dir/$selection" "$cur_wallpaper"
|
||||
fi
|
||||
fi
|
||||
|
||||
# fill in wallpaper on each dispaly
|
||||
for display in $(swaymsg -t get_outputs | gojq '.[].name' | tr -d '"')
|
||||
do
|
||||
swaymsg output "$display" bg "$HOME/.wallpaper" fill '#000000'
|
||||
done
|
||||
# check that available wallpaper exists
|
||||
if [ ! -f "$cur_wallpaper" ] ; then
|
||||
echo "No wallpaper found" && exit 1
|
||||
fi
|
||||
|
||||
swaymsg output "*" bg "$cur_wallpaper" fill '#000000'
|
||||
|
@ -13,6 +13,7 @@ smart_gaps on
|
||||
# background
|
||||
exec_always wallpaper.sh
|
||||
|
||||
# waybar
|
||||
bar {
|
||||
swaybar_command waybar
|
||||
}
|
||||
@ -23,7 +24,7 @@ assign [class="Brave-browser"] 2
|
||||
|
||||
# launching default apps
|
||||
exec st -e tmux
|
||||
exec brave
|
||||
exec --no-startup-id brave
|
||||
|
||||
# Use Mouse+$mod to drag floating windows to their wanted position
|
||||
floating_modifier $mod
|
||||
@ -41,7 +42,7 @@ exec swayidle -w \
|
||||
# lock 'swaylock -f --screenshots --effect-blur 10x3 --clock'
|
||||
|
||||
# lock the screen
|
||||
bindsym $mod+q exec "swaylock -f --screenshots --effect-blur 10x3 --clock --indicator --timestr"
|
||||
bindsym $mod+q exec "swaylock -f --screenshots --effect-blur 10x3 --clock --indicator"
|
||||
# bindsym $mod+q exec sleep 1 && killall -SIGUSR1 swayidle
|
||||
|
||||
# kill focused window
|
||||
@ -168,4 +169,3 @@ mode "resize" {
|
||||
}
|
||||
|
||||
bindsym $mod+r mode "resize"
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user