Added random wallpaper service/script, updated i3.config to match locations

This commit is contained in:
Amarpreet Minhas 2014-08-23 17:33:34 -04:00
parent cbb0408245
commit 64405b77b8
3 changed files with 28 additions and 4 deletions

View file

@ -155,7 +155,7 @@ bar {
# F key commands
# Lock
bindsym $mod+F5 exec i3lock -n -c 000000 -i /home/george/.wallpaper
bindsym $mod+F5 exec i3lock -n -c 000000 -i /tmp/wallpaper
bindsym $mod+F6 exec xbacklight -dec 5
bindsym $mod+F7 exec xbacklight -inc 2
@ -171,8 +171,7 @@ assign [class="Thunderbird"] $ws7
assign [title="music"] $ws8
assign [class="Pidgin"] $ws9
# Load on start
# Load
exec xbacklight -set 20
exec feh --bg-fill '/home/george/.wallpaper'
exec nm-applet
exec feh --bg-fill /tmp/wallpaper

10
X/wallpaper.service Normal file
View file

@ -0,0 +1,10 @@
[Unit]
Description=Sets wallpaper across slim/i3/i3lock
Before=slim.service
[Service]
Type=oneshot
ExecStart=/home/USER/.wallpaper.sh
[Install]
WantedBy=multi-user.target

15
X/wallpaper.sh Executable file
View file

@ -0,0 +1,15 @@
#!/bin/bash
# Set Slim background file here
SLIM="/usr/share/slim/themes/default/background.jpg"
# Set directory with wallpapers here
WPDIR="/home/$USER/macros/wallpapers/"
WP=$WPDIR$(ls -a $WPDIR | shuf -n 1)
# Set random wallpaper as Slim background
cp $WP $SLIM
# Symlink the wallpaper
ln -s $WP /tmp/wallpaper