Add auto change wallpaper
This commit is contained in:
@@ -1,9 +1,16 @@
|
|||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
|
|
||||||
|
function kill_program {
|
||||||
|
if ps -A | grep $1; then
|
||||||
|
killall -q $1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
bspc monitor -d
|
bspc monitor -d
|
||||||
|
|
||||||
bspc config border_width 2
|
bspc config border_width $(echo 1 \* $GDK_SCALE | bc)
|
||||||
bspc config window_gap 24
|
bspc config window_gap $(echo 12 \* $GDK_SCALE | bc)
|
||||||
|
|
||||||
bspc config split_ratio 0.52
|
bspc config split_ratio 0.52
|
||||||
bspc config borderless_monocle true
|
bspc config borderless_monocle true
|
||||||
@@ -22,12 +29,15 @@ bspc rule -a Org.gnome.Nautilus desktop='^5' follow=on
|
|||||||
bspc rule -a baka-mplayer state=floating sticky=on
|
bspc rule -a baka-mplayer state=floating sticky=on
|
||||||
bspc rule -a smplayer state=floating sticky=on
|
bspc rule -a smplayer state=floating sticky=on
|
||||||
|
|
||||||
function kill_program {
|
# restart subscribers
|
||||||
if ps -A | grep $1; then
|
kill_program bspc
|
||||||
killall -q $1
|
bash $HOME/.config/bspwm/set_subscribers.sh &
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
|
# set wallpaper
|
||||||
|
systemctl --user start wallpaper.timer
|
||||||
|
feh --bg-fill --randomize ${HOME}/.config/wallpaper/*
|
||||||
|
|
||||||
|
# restart programs
|
||||||
kill_program gnome-keyring-daemon
|
kill_program gnome-keyring-daemon
|
||||||
kill_program picom
|
kill_program picom
|
||||||
kill_program pasystray
|
kill_program pasystray
|
||||||
@@ -36,6 +46,7 @@ kill_program dunst
|
|||||||
kill_program polkit-gnome-authentication-agent-1
|
kill_program polkit-gnome-authentication-agent-1
|
||||||
kill_program gsd-xsettings
|
kill_program gsd-xsettings
|
||||||
kill_program nautilus
|
kill_program nautilus
|
||||||
|
kill_program blueman-applet
|
||||||
|
|
||||||
gnome-keyring-daemon --start --components=pkcs11 &
|
gnome-keyring-daemon --start --components=pkcs11 &
|
||||||
/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 &
|
/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 &
|
||||||
@@ -48,11 +59,24 @@ dunst &
|
|||||||
sxhkd &
|
sxhkd &
|
||||||
nautilus &
|
nautilus &
|
||||||
transgui &
|
transgui &
|
||||||
|
blueman-applet &
|
||||||
dex -a
|
dex -a
|
||||||
libinput-gestures-setup restart
|
libinput-gestures-setup restart
|
||||||
[[ -f ~/.Xmodmap ]] && xmodmap ~/.Xmodmap
|
[[ -f ~/.Xmodmap ]] && xmodmap ~/.Xmodmap
|
||||||
|
|
||||||
|
# Elan input setting
|
||||||
|
xinput set-prop 'Elan Touchpad' 'libinput Tapping Enabled' 1
|
||||||
|
xinput set-prop 'Elan Touchpad' 'libinput Natural Scrolling Enabled' 1
|
||||||
|
xinput set-prop 'Elan TrackPoint' 'libinput Accel Speed' -0.3
|
||||||
|
# Magic Trackpad 2
|
||||||
|
xinput set-prop 'Apple Inc. Magic Trackpad 2' 'libinput Natural Scrolling Enabled' 1
|
||||||
|
xinput set-prop 'Apple Inc. Magic Trackpad 2' 'libinput Accel Speed' 0.5
|
||||||
|
# Macbook Pro Trackpad
|
||||||
xinput set-prop "bcm5974" "libinput Natural Scrolling Enabled" 1
|
xinput set-prop "bcm5974" "libinput Natural Scrolling Enabled" 1
|
||||||
xinput set-prop "bcm5974" "libinput Accel Speed" 0.5
|
xinput set-prop "bcm5974" "libinput Accel Speed" 0.5
|
||||||
|
# Logitech G402
|
||||||
|
xinput set-prop 'Logitech Gaming Mouse G402' 'libinput Accel Speed' -0.8
|
||||||
|
# Logitech G102
|
||||||
xinput set-prop 'Logitech G102 LIGHTSYNC Gaming Mouse' 'libinput Natural Scrolling Enabled' 1
|
xinput set-prop 'Logitech G102 LIGHTSYNC Gaming Mouse' 'libinput Natural Scrolling Enabled' 1
|
||||||
xinput set-prop 'Logitech G102 LIGHTSYNC Gaming Mouse' 'libinput Accel Speed' -0.5
|
xinput set-prop 'Logitech G102 LIGHTSYNC Gaming Mouse' 'libinput Accel Speed' -0.5
|
||||||
|
|
||||||
|
|||||||
20
linux-hidpi/bspwm/set_subscribers.sh
Normal file
20
linux-hidpi/bspwm/set_subscribers.sh
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
bspc subscribe node_add | while read -r _ _ desktop _ node; do
|
||||||
|
num=$(bspc query -N -d $desktop | grep -f <(bspc query -N -n .leaf) | wc -l)
|
||||||
|
if [ $num = "1" ];then
|
||||||
|
xprop -id "$node" -f _PICOM_ROUNDED 32c -set _PICOM_ROUNDED 0
|
||||||
|
else
|
||||||
|
bspc query -N -d | while read -r node; do
|
||||||
|
xprop -id "$node" -remove _PICOM_ROUNDED
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
done &
|
||||||
|
bspc subscribe node_remove | while read -r _ _ desktop _ node; do
|
||||||
|
num=$(bspc query -N -d $desktop | grep -f <(bspc query -N -n .leaf) | wc -l)
|
||||||
|
if [ $num = "1" ];then
|
||||||
|
bspc query -N -d | while read -r node; do
|
||||||
|
xprop -id "$node" -f _PICOM_ROUNDED 32c -set _PICOM_ROUNDED 0
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
done &
|
||||||
Binary file not shown.
@@ -213,7 +213,7 @@
|
|||||||
# corners.
|
# corners.
|
||||||
# The radius will be automatically lowered if it exceeds half of the
|
# The radius will be automatically lowered if it exceeds half of the
|
||||||
# notification height to avoid clipping text and/or icons.
|
# notification height to avoid clipping text and/or icons.
|
||||||
corner_radius = 0
|
corner_radius = 20
|
||||||
|
|
||||||
### Legacy
|
### Legacy
|
||||||
|
|
||||||
|
|||||||
@@ -2,17 +2,12 @@
|
|||||||
# Corners #
|
# Corners #
|
||||||
#################################
|
#################################
|
||||||
# requires: https://github.com/sdhand/compton
|
# requires: https://github.com/sdhand/compton
|
||||||
corner-radius = 0.0;
|
corner-radius = 20.0;
|
||||||
rounded-corners-exclude = [
|
rounded-corners-exclude = [
|
||||||
#"window_type = 'normal'",
|
|
||||||
#"class_g = 'Rofi'",
|
|
||||||
"class_g = 'Polybar'",
|
"class_g = 'Polybar'",
|
||||||
"name = 'Polybar tray window'",
|
"name = 'Polybar tray window'",
|
||||||
"_NET_WM_STATE@:a *= '_NET_WM_STATE_SKIP_TASKBAR'",
|
"_NET_WM_STATE@:a *= '_NET_WM_STATE_SKIP_TASKBAR'",
|
||||||
#"class_g = 'code-oss'",
|
"_PICOM_ROUNDED@:32c = 0"
|
||||||
#"class_g = 'TelegramDesktop'",
|
|
||||||
#"class_g = 'firefox'",
|
|
||||||
#"class_g = 'Thunderbird'"
|
|
||||||
];
|
];
|
||||||
round-borders = 1;
|
round-borders = 1;
|
||||||
round-borders-exclude = [
|
round-borders-exclude = [
|
||||||
|
|||||||
@@ -38,6 +38,7 @@ offset-x = 0%
|
|||||||
offset-y = 0%
|
offset-y = 0%
|
||||||
radius = 0.0
|
radius = 0.0
|
||||||
fixed-center = false
|
fixed-center = false
|
||||||
|
wm-restack = bspwm
|
||||||
|
|
||||||
background = ${colors.background}
|
background = ${colors.background}
|
||||||
foreground = ${colors.foreground}
|
foreground = ${colors.foreground}
|
||||||
|
|||||||
@@ -12,14 +12,14 @@
|
|||||||
# available, otherwise `xterm-256color` is used.
|
# available, otherwise `xterm-256color` is used.
|
||||||
#TERM: alacritty
|
#TERM: alacritty
|
||||||
|
|
||||||
#window:
|
window:
|
||||||
# Window dimensions (changes require restart)
|
# Window dimensions (changes require restart)
|
||||||
#
|
#
|
||||||
# Specified in number of columns/lines, not pixels.
|
# Specified in number of columns/lines, not pixels.
|
||||||
# If both are `0`, this setting is ignored.
|
# If both are `0`, this setting is ignored.
|
||||||
#dimensions:
|
dimensions:
|
||||||
# columns: 0
|
columns: 80
|
||||||
# lines: 0
|
lines: 25
|
||||||
|
|
||||||
# Window position (changes require restart)
|
# Window position (changes require restart)
|
||||||
#
|
#
|
||||||
|
|||||||
@@ -37,6 +37,7 @@ offset-x = 0%
|
|||||||
offset-y = 0%
|
offset-y = 0%
|
||||||
radius = 0.0
|
radius = 0.0
|
||||||
fixed-center = false
|
fixed-center = false
|
||||||
|
wm-restack = bspwm
|
||||||
|
|
||||||
background = ${colors.background}
|
background = ${colors.background}
|
||||||
foreground = ${colors.foreground}
|
foreground = ${colors.foreground}
|
||||||
|
|||||||
@@ -2,7 +2,4 @@
|
|||||||
[[ -f ~/.Xmodmap ]] && xmodmap ~/.Xmodmap
|
[[ -f ~/.Xmodmap ]] && xmodmap ~/.Xmodmap
|
||||||
[[ -f ~/.Xresources ]] && xrdb -merge -I$HOME ~/.Xresources
|
[[ -f ~/.Xresources ]] && xrdb -merge -I$HOME ~/.Xresources
|
||||||
|
|
||||||
feh --bg-fill --randomize ${HOME}/.config/wallpaper/*
|
|
||||||
systemd-run --on-calendar="*:0/5" --user --setenv=DISPLAY=:0 -- /bin/feh --bg-fill --randomize ~/.config/wallpaper/*
|
|
||||||
|
|
||||||
exec bspwm
|
exec bspwm
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ export PATH=$HOME/.local/bin:/usr/local/bin:$PATH
|
|||||||
export DENO_INSTALL="/home/vbalien/.deno"
|
export DENO_INSTALL="/home/vbalien/.deno"
|
||||||
export PATH="$DENO_INSTALL/bin:$PATH"
|
export PATH="$DENO_INSTALL/bin:$PATH"
|
||||||
|
|
||||||
|
export PATH="$HOME/.yarn/bin:$PATH"
|
||||||
# Path to your oh-my-zsh installation.
|
# Path to your oh-my-zsh installation.
|
||||||
export ZSH="/home/vbalien/.oh-my-zsh"
|
export ZSH="/home/vbalien/.oh-my-zsh"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user