Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Tim DuBois
committed
Jan 6, 2016
1 parent
89afc9c
commit 2a4da46
Showing
6 changed files
with
59 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
~/.scripts/wpchanger | ||
systemctl --user start bgchange.timer & #Start wallpaper changer | ||
trayer --width 5 --transparent true --alpha 0 --tint 0x000000 --edge bottom --expand false --SetDockType false --distance 50 & | ||
# trayer --width 5 --transparent true --alpha 0 --tint 0x000000 --edge bottom --expand false --SetDockType false --distance 20 & | ||
export _JAVA_AWT_WM_NONREPARENTING=1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/usr/bin/env python2 | ||
import gtk | ||
import sys | ||
|
||
count = 0 | ||
def handle_owner_change(clipboard, event): | ||
global count | ||
print 'clipboard.owner-change(%r, %r)' % (clipboard, event) | ||
count += 1 | ||
if count > 1: | ||
sys.exit(0) | ||
|
||
image = gtk.gdk.pixbuf_new_from_file(sys.argv[1]) | ||
clipboard = gtk.clipboard_get() | ||
clipboard.connect('owner-change', handle_owner_change) | ||
clipboard.set_image(image) | ||
clipboard.store() | ||
gtk.main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,30 @@ | ||
#!/bin/bash | ||
WALLPAPERS="/home/tim/Images/Wallpaper" | ||
|
||
sd=$(($RANDOM%2)) | ||
|
||
if [ $sd -eq 1 ] | ||
then | ||
WALLPAPERS="/home/tim/Images/Wallpaper/Single" | ||
else | ||
WALLPAPERS="/home/tim/Images/Wallpaper/Dual" | ||
fi | ||
|
||
ALIST=( `ls -w1 $WALLPAPERS` ) | ||
RANGE=${#ALIST[@]} | ||
let "number = $RANDOM" | ||
let LASTNUM="`cat $WALLPAPERS/.last` + $number" | ||
let "number = $LASTNUM % $RANGE" | ||
echo $number > $WALLPAPERS/.last | ||
nitrogen --set-scaled --save $WALLPAPERS/${ALIST[$number]} | ||
let "number0 = $RANDOM" | ||
let LASTNUM0="`cat $WALLPAPERS/.last0` + $number0" | ||
let "number0 = $LASTNUM0 % $RANGE" | ||
echo $number0 > $WALLPAPERS/.last0 | ||
|
||
if [ $sd -eq 1 ] | ||
then | ||
let "number1 = $RANDOM" | ||
let LASTNUM1="`cat $WALLPAPERS/.last1` + $number1" | ||
let "number1 = $LASTNUM1 % $RANGE" | ||
echo $number1 > $WALLPAPERS/.last1 | ||
#It'd be nice not to call twice, but I don't think this is a possibility at the moment. | ||
nitrogen --set-scaled --head=0 --save $WALLPAPERS/${ALIST[$number0]} | ||
nitrogen --set-scaled --head=1 --save $WALLPAPERS/${ALIST[$number1]} | ||
else | ||
nitrogen --set-scaled --save $WALLPAPERS/${ALIST[$number0]} | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters