diff --git a/config/openbox/environment b/config/openbox/environment index 2e9fb9f..afb4f95 100755 --- a/config/openbox/environment +++ b/config/openbox/environment @@ -1 +1 @@ -export PATH="$HOME/.local/share/clopper-ob/bin:$HOME/.local/share/clopper-ob/notify-send.sh:$PATH" \ No newline at end of file +export PATH="$HOME/.local/share/clopper-ob/bin:$HOME/.local/share/clopper-ob/applications/notify-send.sh:$PATH" \ No newline at end of file diff --git a/setup.bash b/setup.bash index 57ba6f0..7617e9e 100755 --- a/setup.bash +++ b/setup.bash @@ -22,7 +22,8 @@ install-apt-dependencies() { dunst \ numix-icon-theme-circle \ vorbis-tools \ - sound-theme-freedesktop + sound-theme-freedesktop \ + terminator set +x } @@ -39,7 +40,7 @@ asset-dirs-exist() { install-dependencies() { echo "=> Checking dependencies" - if ! are-in-path xcompmgr openbox dunst ogg123 || ! asset-dirs-exist; then + if ! are-in-path xcompmgr openbox dunst ogg123 terminator || ! asset-dirs-exist; then install-apt-dependencies fi @@ -47,7 +48,7 @@ install-dependencies() { notify_send_dir="$(local-dir)/applications/notify-send.sh" if ! [[ -d "$notify_send_dir" ]]; then mkdir -p "$notify_send_dir" - git clone git@github.com:vlevit/notify-send.sh.git "$notify_send_dir" + git clone git@github.com:vlevit/notify-send.sh.git "$notify_send_dir" || rm "$notify_send_dir" fi } @@ -93,21 +94,35 @@ add-custom-startup() { } ppa-has-been-added() { - declare ppa="$1" - grep -q "^deb .*$ppa" /etc/apt/sources.list /etc/apt/sources.list.d/* + declare -r ppa="$1" + + if [[ $ppa == ppa:* ]]; then + ppa-has-been-added "${ppa#ppa:}" + return $? + fi + + grep -q "$ppa" /etc/apt/sources.list /etc/apt/sources.list.d/* } add-ppa-if-not-added() { declare ppa="$1" if ! ppa-has-been-added "$ppa"; then printf 'Adding ppa "%s"\n' "$ppa" - sudo add-apt-repository "ppa:$ppa" + sudo add-apt-repository "$ppa" fi } +os-is-ubuntu-1804() { + [[ $(cat /etc/os-release | grep VERSION_ID | grep -qPo '(?<=").*(?=")') == '18.04' ]] +} + add-ppas() { - add-ppa-if-not-added 'nilarimogard/webupd8' - add-ppa-if-not-added 'numix/ppa' + if os-is-ubuntu-1804; then + add-ppa-if-not-added 'deb http://download.opensuse.org/repositories/home:/manuelschneid3r/xUbuntu_18.04/ /' + else + add-ppa-if-not-added 'ppa:nilarimogard/webupd8' + fi + add-ppa-if-not-added 'ppa:numix/ppa' } cache-dir() {