diff --git a/dotfiles/binaries.org b/dotfiles/binaries.org index 67122b1..e8b1cca 100644 --- a/dotfiles/binaries.org +++ b/dotfiles/binaries.org @@ -788,3 +788,17 @@ fi check_smaller "$IFILE" "$OFILE" #+end_src +* =setbg= - Set Background +:PROPERTIES: +:header-args: :tangle ~/bin/setbg +:END: + +#+begin_src bash + bgloc="${XDG_CACHE_HOME:-$HOME/.cache/}/bg" + + [ -f "$1" ] && ln -sf "$(readlink -f "$1")" "$bgloc" + + [ -d "$1" ] && ln -sf "$(find "$(readlink -f "$1")" -iregex '.*.\(jpg\|jpeg\|png\|gif\)' -type f | shuf -n 1)" "$bgloc" + + xwallpaper --zoom "$bgloc" +#+end_src diff --git a/dotfiles/config.org b/dotfiles/config.org index ae8705b..8869645 100644 --- a/dotfiles/config.org +++ b/dotfiles/config.org @@ -223,24 +223,3 @@ target=github.com/tdehaeze #+END_SRC -* Nitrogen (Wallpaper manager) -:PROPERTIES: -:header-args: :tangle ~/.config/nitrogen/nitrogen.cfg -:header-args+: :comments both :mkdirp yes -:END: - -#+BEGIN_SRC conf - [geometry] - posx=560 - posy=65 - sizex=578 - sizey=591 - - [nitrogen] - view=list - recurse=false - sort=alpha - icon_caps=false - dirs=/home/thomas/.wallpapers; -#+END_SRC - diff --git a/dotfiles/image.org b/dotfiles/image.org index 270b695..0b52355 100644 --- a/dotfiles/image.org +++ b/dotfiles/image.org @@ -33,8 +33,6 @@ Press =C-x= to activate to key handler. convert -rotate 90 "$file" "$file" ;; "C-c") echo -n "$file" | xsel -ib ;; - "C-w") - nitrogen --save --set-zoom-fill "$file" ;; esac done #+end_src diff --git a/dotfiles/install.org b/dotfiles/install.org index 71cf65e..8475b90 100644 --- a/dotfiles/install.org +++ b/dotfiles/install.org @@ -1356,15 +1356,6 @@ Other commands: - =wunderline inbox= - =wunderline today= -* Background manager: nitrogen -https://github.com/l3ib/nitrogen/ - -** Configuration -=~/.config/nitrogen/nitrogen.cfg= - -** Wallpapers -=~/scripts/wallpaper.sh=: script to automatically change wallpaper each x minutes. - * PDF Reader: Zathura https://pwmt.org/projects/zathura/ ** Installation @@ -1517,6 +1508,7 @@ https://github.com/jotyGill/openpyn-nordvpn https://nordvpn.com/fr/tutorials/linux/openvpn/ * Others +** Wallpaper: =xwallpaper= ** Reddit on terminal: rtv #+begin_src bash yay -S rtv diff --git a/dotfiles/scripts.org b/dotfiles/scripts.org index 1467a74..954703d 100644 --- a/dotfiles/scripts.org +++ b/dotfiles/scripts.org @@ -20,18 +20,6 @@ #+PROPERTY: header-args:bash+ :shebang "#!/usr/bin/env bash" :END: -* Wallpapers -:PROPERTIES: -:header-args: :tangle ~/scripts/wallpapers.sh -:END: - -#+begin_src bash - while true; do - nitrogen --set-zoom-fill --random ".wallpapers" - sleep 10m - done -#+end_src - * LockScreen :PROPERTIES: :header-args: :tangle ~/scripts/lockscreen.sh diff --git a/dotfiles/xconfig.org b/dotfiles/xconfig.org index f3f9f90..6e4ec01 100644 --- a/dotfiles/xconfig.org +++ b/dotfiles/xconfig.org @@ -422,7 +422,7 @@ Start programs related to display. xrandr --output eDP1 --mode 1920x1080 --dpi 192 & # Set custom wallpaper script - $HOME/scripts/wallpapers.sh & + setbg & # Hide mouse cursor after x seconds pgrep -xu "$USER" unclutter >/dev/null || \