Add auto change wallpaper

This commit is contained in:
2020-07-22 17:47:43 +09:00
parent 5742e399fe
commit acddc8d3b4
10 changed files with 61 additions and 22 deletions

View File

@@ -1,9 +1,16 @@
#! /bin/sh
function kill_program {
if ps -A | grep $1; then
killall -q $1
fi
}
bspc monitor -d     
bspc config border_width 2
bspc config window_gap 24
bspc config border_width $(echo 1 \* $GDK_SCALE | bc)
bspc config window_gap $(echo 12 \* $GDK_SCALE | bc)
bspc config split_ratio 0.52
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 smplayer state=floating sticky=on
function kill_program {
if ps -A | grep $1; then
killall -q $1
fi
}
# restart subscribers
kill_program bspc
bash $HOME/.config/bspwm/set_subscribers.sh &
# set wallpaper
systemctl --user start wallpaper.timer
feh --bg-fill --randomize ${HOME}/.config/wallpaper/*
# restart programs
kill_program gnome-keyring-daemon
kill_program picom
kill_program pasystray
@@ -36,6 +46,7 @@ kill_program dunst
kill_program polkit-gnome-authentication-agent-1
kill_program gsd-xsettings
kill_program nautilus
kill_program blueman-applet
gnome-keyring-daemon --start --components=pkcs11 &
/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 &
@@ -48,11 +59,24 @@ dunst &
sxhkd &
nautilus &
transgui &
blueman-applet &
dex -a
libinput-gestures-setup restart
[[ -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 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 Accel Speed' -0.5

View 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.

View File

@@ -213,7 +213,7 @@
# corners.
# The radius will be automatically lowered if it exceeds half of the
# notification height to avoid clipping text and/or icons.
corner_radius = 0
corner_radius = 20
### Legacy

View File

@@ -2,17 +2,12 @@
# Corners #
#################################
# requires: https://github.com/sdhand/compton
corner-radius = 0.0;
corner-radius = 20.0;
rounded-corners-exclude = [
#"window_type = 'normal'",
#"class_g = 'Rofi'",
"class_g = 'Polybar'",
"name = 'Polybar tray window'",
"_NET_WM_STATE@:a *= '_NET_WM_STATE_SKIP_TASKBAR'",
#"class_g = 'code-oss'",
#"class_g = 'TelegramDesktop'",
#"class_g = 'firefox'",
#"class_g = 'Thunderbird'"
"_PICOM_ROUNDED@:32c = 0"
];
round-borders = 1;
round-borders-exclude = [

View File

@@ -38,6 +38,7 @@ offset-x = 0%
offset-y = 0%
radius = 0.0
fixed-center = false
wm-restack = bspwm
background = ${colors.background}
foreground = ${colors.foreground}

View File

@@ -12,14 +12,14 @@
# available, otherwise `xterm-256color` is used.
#TERM: alacritty
#window:
window:
# Window dimensions (changes require restart)
#
# Specified in number of columns/lines, not pixels.
# If both are `0`, this setting is ignored.
#dimensions:
# columns: 0
# lines: 0
dimensions:
columns: 80
lines: 25
# Window position (changes require restart)
#

View File

@@ -37,6 +37,7 @@ offset-x = 0%
offset-y = 0%
radius = 0.0
fixed-center = false
wm-restack = bspwm
background = ${colors.background}
foreground = ${colors.foreground}

View File

@@ -2,7 +2,4 @@
[[ -f ~/.Xmodmap ]] && xmodmap ~/.Xmodmap
[[ -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

View File

@@ -4,6 +4,7 @@ export PATH=$HOME/.local/bin:/usr/local/bin:$PATH
export DENO_INSTALL="/home/vbalien/.deno"
export PATH="$DENO_INSTALL/bin:$PATH"
export PATH="$HOME/.yarn/bin:$PATH"
# Path to your oh-my-zsh installation.
export ZSH="/home/vbalien/.oh-my-zsh"