Commit d109192c79eebf27cdf43b414ca6f624e7f388b1
1 parent
dfb109ed3e
Exists in
master
themed xscreensaver
Showing 2 changed files with 47 additions and 0 deletions Inline Diff
link.sh
View file @
d109192
#!/usr/bin/env bash | 1 | 1 | #!/usr/bin/env bash | |
2 | 2 | |||
# the dir this script is in | 3 | 3 | # the dir this script is in | |
cwd="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | 4 | 4 | cwd="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | |
5 | 5 | |||
#helper functions | 6 | 6 | #helper functions | |
function link { | 7 | 7 | function link { | |
target=$1 | 8 | 8 | target=$1 | |
src=$2 | 9 | 9 | src=$2 | |
if [ -L $src ]; | 10 | 10 | if [ -L $src ]; | |
then | 11 | 11 | then | |
rm $src | 12 | 12 | rm $src | |
fi | 13 | 13 | fi | |
mkdir -p `dirname $src` | 14 | 14 | mkdir -p `dirname $src` | |
echo "Creating symlink for $src" | 15 | 15 | echo "Creating symlink for $src" | |
ln -sf $target $src | 16 | 16 | ln -sf $target $src | |
} | 17 | 17 | } | |
18 | 18 | |||
function downloadSubmodules { | 19 | 19 | function downloadSubmodules { | |
dir=$1 | 20 | 20 | dir=$1 | |
if [ -e $dir/submodules ]; | 21 | 21 | if [ -e $dir/submodules ]; | |
then | 22 | 22 | then | |
while read l; | 23 | 23 | while read l; | |
do | 24 | 24 | do | |
if [ -n "$l" ]; | 25 | 25 | if [ -n "$l" ]; | |
then | 26 | 26 | then | |
read -a array <<< $l | 27 | 27 | read -a array <<< $l | |
if [ ! -e $dir/${array[1]} ]; | 28 | 28 | if [ ! -e $dir/${array[1]} ]; | |
then | 29 | 29 | then | |
git clone ${array[0]} $dir/${array[1]} | 30 | 30 | git clone ${array[0]} $dir/${array[1]} | |
else | 31 | 31 | else | |
echo "Updating git repo ${array[1]}" | 32 | 32 | echo "Updating git repo ${array[1]}" | |
git --git-dir=$dir/${array[1]}/.git pull | 33 | 33 | git --git-dir=$dir/${array[1]}/.git pull | |
fi | 34 | 34 | fi | |
fi | 35 | 35 | fi | |
done < $dir/submodules | 36 | 36 | done < $dir/submodules | |
fi | 37 | 37 | fi | |
} | 38 | 38 | } | |
39 | 39 | |||
40 | 40 | |||
#config functions | 41 | 41 | #config functions | |
function vim { | 42 | 42 | function vim { | |
echo "Linking vim" | 43 | 43 | echo "Linking vim" | |
downloadSubmodules $cwd/vim | 44 | 44 | downloadSubmodules $cwd/vim | |
link $cwd/vim/vimrc ~/.vimrc | 45 | 45 | link $cwd/vim/vimrc ~/.vimrc | |
link $cwd/vim/vim ~/.vim | 46 | 46 | link $cwd/vim/vim ~/.vim | |
} | 47 | 47 | } | |
48 | 48 | |||
function conky { | 49 | 49 | function conky { | |
echo "Linking conky" | 50 | 50 | echo "Linking conky" | |
link $cwd/conky/conkyrc ~/.conkyrc | 51 | 51 | link $cwd/conky/conkyrc ~/.conkyrc | |
} | 52 | 52 | } | |
53 | 53 | |||
#can not be called git, conflicts with download submodules | 54 | 54 | #can not be called git, conflicts with download submodules | |
function git_config { | 55 | 55 | function git_config { | |
echo "Linking git" | 56 | 56 | echo "Linking git" | |
for file in $(ls $cwd/git); | 57 | 57 | for file in $(ls $cwd/git); | |
do | 58 | 58 | do | |
link $cwd/git/$file ~/.$file | 59 | 59 | link $cwd/git/$file ~/.$file | |
done | 60 | 60 | done | |
} | 61 | 61 | } | |
62 | 62 | |||
function shell { | 63 | 63 | function shell { | |
echo "Linking shell" | 64 | 64 | echo "Linking shell" | |
for file in $(ls $cwd/shell); | 65 | 65 | for file in $(ls $cwd/shell); | |
do | 66 | 66 | do | |
link $cwd/shell/$file ~/.$file | 67 | 67 | link $cwd/shell/$file ~/.$file | |
done | 68 | 68 | done | |
} | 69 | 69 | } | |
70 | 70 | |||
function tmux { | 71 | 71 | function tmux { | |
echo "Linking tmux" | 72 | 72 | echo "Linking tmux" | |
link $cwd/tmux/tmux.conf ~/.tmux.conf | 73 | 73 | link $cwd/tmux/tmux.conf ~/.tmux.conf | |
} | 74 | 74 | } | |
75 | 75 | |||
function xscreensaver { | 76 | 76 | function xscreensaver { | |
echo "Linking xscreensaver" | 77 | 77 | echo "Linking xscreensaver" | |
link $cwd/xscreensaver/xscreensaver ~/.xscreensaver | 78 | 78 | link $cwd/xscreensaver/xscreensaver ~/.xscreensaver | |
79 | link $cwd/xscreensaver/Xresourcess ~/.Xresourcess | |||
} | 79 | 80 | } | |
80 | 81 | |||
function awesome { | 81 | 82 | function awesome { | |
echo "Linking awesome" | 82 | 83 | echo "Linking awesome" | |
downloadSubmodules $cwd/awesome | 83 | 84 | downloadSubmodules $cwd/awesome | |
link $cwd/awesome/awesome ~/.config/awesome | 84 | 85 | link $cwd/awesome/awesome ~/.config/awesome | |
} | 85 | 86 | } | |
86 | 87 | |||
function openbox { | 87 | 88 | function openbox { | |
echo "Linking openbox" | 88 | 89 | echo "Linking openbox" | |
link $cwd/openbox/openbox ~/.config/openbox | 89 | 90 | link $cwd/openbox/openbox ~/.config/openbox | |
} | 90 | 91 | } | |
91 | 92 | |||
function terminator { | 92 | 93 | function terminator { | |
echo "Linking terminator" | 93 | 94 | echo "Linking terminator" | |
link $cwd/terminator/terminator ~/.config/terminator | 94 | 95 | link $cwd/terminator/terminator ~/.config/terminator | |
} | 95 | 96 | } | |
96 | 97 | |||
function tint2 { | 97 | 98 | function tint2 { | |
echo "Linking tint2" | 98 | 99 | echo "Linking tint2" | |
link $cwd/tint2/tint2 ~/.config/tint2 | 99 | 100 | link $cwd/tint2/tint2 ~/.config/tint2 | |
} | 100 | 101 | } | |
101 | 102 | |||
function sublime { | 102 | 103 | function sublime { | |
echo "Linking Sublime Text" | 103 | 104 | echo "Linking Sublime Text" | |
link $cwd/sublime-text-3/User ~/.config/sublime-text-3/Packages/User | 104 | 105 | link $cwd/sublime-text-3/User ~/.config/sublime-text-3/Packages/User | |
echo "Downloading Package Manager PLugin" | 105 | 106 | echo "Downloading Package Manager PLugin" | |
wget -P ~/.config/sublime-text-3/Installed\ Packages/ https://sublime.wbond.net/Package%20Control.sublime-package | 106 | 107 | wget -P ~/.config/sublime-text-3/Installed\ Packages/ https://sublime.wbond.net/Package%20Control.sublime-package | |
} | 107 | 108 | } | |
108 | 109 | |||
function scripts { | 109 | 110 | function scripts { | |
echo "Linking scripts" | 110 | 111 | echo "Linking scripts" | |
for script in $cwd/scripts/* | 111 | 112 | for script in $cwd/scripts/* | |
do | 112 | 113 | do | |
link $script ~/bin/$(basename $script) | 113 | 114 | link $script ~/bin/$(basename $script) | |
done | 114 | 115 | done | |
} | 115 | 116 | } | |
116 | 117 | |||
function ssh { | 117 | 118 | function ssh { | |
echo "Linking ssh" | 118 | 119 | echo "Linking ssh" | |
SSH_CONFIG=~/Dropbox/config/ssh | 119 | 120 | SSH_CONFIG=~/Dropbox/config/ssh | |
if [ -e "$SSH_CONFIG" ]; | 120 | 121 | if [ -e "$SSH_CONFIG" ]; | |
then | 121 | 122 | then | |
link $SSH_CONFIG ~/.ssh/config | 122 | 123 | link $SSH_CONFIG ~/.ssh/config | |
else | 123 | 124 | else | |
echo "$SSH_CONFIG does not exist!" | 124 | 125 | echo "$SSH_CONFIG does not exist!" | |
fi | 125 | 126 | fi | |
} | 126 | 127 | } | |
127 | 128 | |||
128 | 129 | |||
function run { | 129 | 130 | function run { | |
p="${1%/}" | 130 | 131 | p="${1%/}" | |
if [ $p == "git" ]; | 131 | 132 | if [ $p == "git" ]; | |
then | 132 | 133 | then | |
c="git_config" | 133 | 134 | c="git_config" | |
elif [ $p == "sublime-text-3" ]; | 134 | 135 | elif [ $p == "sublime-text-3" ]; | |
then | 135 | 136 | then | |
c="sublime" | 136 | 137 | c="sublime" | |
else | 137 | 138 | else | |
c=$p | 138 | 139 | c=$p | |
fi | 139 | 140 | fi | |
eval ${c} | 140 | 141 | eval ${c} |
xscreensaver/Xresources
View file @
d109192
File was created | 1 | ! font settings -------------------------------------------------------------- | ||
2 | ||||
3 | Xft.autohint: true | |||
4 | Xft.antialias: true | |||
5 | Xft.hinting: true | |||
6 | Xft.hintstyle: hintslight | |||
7 | !Xft.dpi: 96 | |||
8 | Xft.rgba: rgb | |||
9 | Xft.lcdfilter: lcddefault | |||
10 | ||||
11 | ! xscreensaver --------------------------------------------------------------- | |||
12 | ||||
13 | xscreensaver.splash: false | |||
14 | ||||
15 | !font settings | |||
16 | xscreensaver.Dialog.headingFont: -*-fixed-medium-r-*-*-14-*-*-*-*-*-*-* | |||
17 | xscreensaver.Dialog.bodyFont: -*-fixed-medium-r-*-*-14-*-*-*-*-*-*-* | |||
18 | xscreensaver.Dialog.labelFont: -*-fixed-medium-r-*-*-14-*-*-*-*-*-*-* | |||
19 | xscreensaver.Dialog.unameFont: -*-fixed-medium-r-*-*-14-*-*-*-*-*-*-* | |||
20 | xscreensaver.Dialog.buttonFont: -*-fixed-medium-r-*-*-14-*-*-*-*-*-*-* | |||
21 | xscreensaver.Dialog.dateFont: -*-fixed-medium-r-*-*-12-*-*-*-*-*-*-* | |||
22 | xscreensaver.passwd.passwdFont: -*-fixed-medium-r-*-*-14-*-*-*-*-*-*-* | |||
23 | ! | |||
24 | !general dialog box (affects main hostname, username, password text) | |||
25 | xscreensaver.Dialog.foreground: #ffffff | |||
26 | xscreensaver.Dialog.background: #111111 | |||
27 | xscreensaver.Dialog.topShadowColor: #111111 | |||
28 | xscreensaver.Dialog.bottomShadowColor: #111111 | |||
29 | xscreensaver.Dialog.Button.foreground: #666666 | |||
30 | xscreensaver.Dialog.Button.background: #ffffff | |||
31 | ||||
32 | !username/password input box and date text colour | |||
33 | xscreensaver.Dialog.text.foreground: #666666 | |||
34 | xscreensaver.Dialog.text.background: #ffffff | |||
35 | xscreensaver.Dialog.internalBorderWidth:24 | |||
36 | xscreensaver.Dialog.borderWidth: 0 | |||
37 | xscreensaver.Dialog.shadowThickness: 2 | |||
38 |