From 02bfb24330f67c3638bbdf5b3915a96489ef5fc8 Mon Sep 17 00:00:00 2001 From: Hugo Thunnissen Date: Tue, 31 Jul 2018 17:09:41 +0200 Subject: [PATCH] FIX ubuntu 18.04 check and add screensaver/lockscreen --- config/openbox/autostart.sh | 5 +- config/openbox/rc.xml | 7 + config/xscreensaver/config-file | 281 ++++++++++++++++++++++++++++++++ setup.bash | 12 +- 4 files changed, 300 insertions(+), 5 deletions(-) create mode 100644 config/xscreensaver/config-file diff --git a/config/openbox/autostart.sh b/config/openbox/autostart.sh index 7f0c511..eac3845 100755 --- a/config/openbox/autostart.sh +++ b/config/openbox/autostart.sh @@ -5,7 +5,7 @@ # This script should be executed on startup of openbox. start() { - nohup "$@" & + nohup "$@" &>>/dev/null & } # The launcher @@ -19,3 +19,6 @@ start xcompmgr # The notification daemon start dunst + +# The lock screen +start xscreensaver diff --git a/config/openbox/rc.xml b/config/openbox/rc.xml index a64c4fd..627b5ad 100644 --- a/config/openbox/rc.xml +++ b/config/openbox/rc.xml @@ -192,6 +192,13 @@ C-g + + + + xscreensaver-command -lock + + + diff --git a/config/xscreensaver/config-file b/config/xscreensaver/config-file new file mode 100644 index 0000000..2d4e35f --- /dev/null +++ b/config/xscreensaver/config-file @@ -0,0 +1,281 @@ +# XScreenSaver Preferences File +# Written by xscreensaver-demo 5.36 for hugo on Tue Jul 31 16:55:30 2018. +# https://www.jwz.org/xscreensaver/ + +timeout: 0:10:00 +cycle: 0:10:00 +lock: False +lockTimeout: 0:00:00 +passwdTimeout: 0:00:30 +visualID: default +installColormap: True +verbose: False +timestamp: True +splash: True +splashDuration: 0:00:05 +demoCommand: xscreensaver-demo +prefsCommand: xscreensaver-demo -prefs +nice: 10 +memoryLimit: 0 +fade: True +unfade: False +fadeSeconds: 0:00:03 +fadeTicks: 20 +captureStderr: True +ignoreUninstalledPrograms:False +font: *-medium-r-*-140-*-m-* +dpmsEnabled: False +dpmsQuickOff: False +dpmsStandby: 2:00:00 +dpmsSuspend: 2:00:00 +dpmsOff: 4:00:00 +grabDesktopImages: False +grabVideoFrames: False +chooseRandomImages: False +imageDirectory: + +mode: one +selected: 37 + +textMode: url +textLiteral: XScreenSaver +textFile: +textProgram: fortune +textURL: http://feeds.feedburner.com/ubuntu-news + +programs: \ + maze -root \n\ +- GL: superquadrics -root \n\ + attraction -root \n\ + blitspin -root \n\ + greynetic -root \n\ + helix -root \n\ + hopalong -root \n\ + imsmap -root \n\ +- noseguy -root \n\ +- pyro -root \n\ + qix -root \n\ +- rocks -root \n\ + rorschach -root \n\ + decayscreen -root \n\ + flame -root \n\ + halo -root \n\ + slidescreen -root \n\ + pedal -root \n\ + bouboule -root \n\ +- braid -root \n\ + coral -root \n\ + deco -root \n\ + drift -root \n\ +- fadeplot -root \n\ + galaxy -root \n\ + goop -root \n\ + grav -root \n\ + ifs -root \n\ + unicode -root \n\ +- GL: jigsaw -root \n\ + julia -root \n\ +- kaleidescope -root \n\ +- GL: moebius -root \n\ + moire -root \n\ +- GL: morph3d -root \n\ + mountain -root \n\ + munch -root \n\ + penrose -root \n\ +- GL: pipes -root \n\ + rd-bomb -root \n\ +- GL: rubik -root \n\ +- sierpinski -root \n\ + slip -root \n\ +- GL: sproingies -root \n\ + starfish -root \n\ + strange -root \n\ + swirl -root \n\ + triangle -root \n\ + xjack -root \n\ + xlyap -root \n\ +- GL: atlantis -root \n\ + bsod -root \n\ +- GL: bubble3d -root \n\ +- GL: cage -root \n\ +- crystal -root \n\ + cynosure -root \n\ + discrete -root \n\ + distort -root \n\ + epicycle -root \n\ + flow -root \n\ +- GL: glplanet -root \n\ + interference -root \n\ + kumppa -root \n\ +- GL: lament -root \n\ + moire2 -root \n\ +- GL: sonar -root \n\ +- GL: stairs -root \n\ + truchet -root \n\ +- vidwhacker -root \n\ + blaster -root \n\ + bumps -root \n\ + ccurve -root \n\ + compass -root \n\ + deluxe -root \n\ +- demon -root \n\ +- GL: extrusion -root \n\ +- loop -root \n\ + penetrate -root \n\ + petri -root \n\ + phosphor -root \n\ +- GL: pulsar -root \n\ + ripples -root \n\ + shadebobs -root \n\ +- GL: sierpinski3d -root \n\ + spotlight -root \n\ + squiral -root \n\ + wander -root \n\ +- webcollage -root \n\ + xflame -root \n\ + xmatrix -root \n\ +- GL: gflux -root \n\ +- nerverot -root \n\ + xrayswarm -root \n\ + xspirograph -root \n\ +- GL: circuit -root \n\ +- GL: dangerball -root \n\ +- GL: engine -root \n\ +- GL: flipscreen3d -root \n\ +- GL: gltext -root \n\ +- GL: menger -root \n\ +- GL: molecule -root \n\ + rotzoomer -root \n\ + speedmine -root \n\ +- GL: starwars -root \n\ +- GL: stonerview -root \n\ + vermiculate -root \n\ + whirlwindwarp -root \n\ + zoom -root \n\ + anemone -root \n\ + apollonian -root \n\ +- GL: boxed -root \n\ +- GL: cubenetic -root \n\ +- GL: endgame -root \n\ + euler2d -root \n\ + fluidballs -root \n\ +- GL: flurry -root \n\ +- GL: glblur -root \n\ +- GL: glsnake -root \n\ + halftone -root \n\ +- GL: juggler3d -root \n\ +- GL: lavalite -root \n\ +- polyominoes -root \n\ +- GL: queens -root \n\ +- GL: sballs -root \n\ +- GL: spheremonics -root \n\ +- thornbird -root \n\ + twang -root \n\ +- GL: antspotlight -root \n\ + apple2 -root \n\ +- GL: atunnel -root \n\ + barcode -root \n\ +- GL: blinkbox -root \n\ +- GL: blocktube -root \n\ +- GL: bouncingcow -root \n\ + cloudlife -root \n\ +- GL: cubestorm -root \n\ + eruption -root \n\ +- GL: flipflop -root \n\ +- GL: flyingtoasters -root \n\ + fontglide -root \n\ +- GL: gleidescope -root \n\ +- GL: glknots -root \n\ +- GL: glmatrix -root \n\ +- GL: glslideshow -root \n\ +- GL: hypertorus -root \n\ +- GL: jigglypuff -root \n\ + metaballs -root \n\ +- GL: mirrorblob -root \n\ + piecewise -root \n\ +- GL: polytopes -root \n\ + pong -root \n\ + popsquares -root \n\ +- GL: surfaces -root \n\ + xanalogtv -root \n\ + abstractile -root \n\ + anemotaxis -root \n\ +- GL: antinspect -root \n\ + fireworkx -root \n\ + fuzzyflakes -root \n\ + interaggregate -root \n\ + intermomentary -root \n\ + memscroller -root \n\ +- GL: noof -root \n\ + pacman -root \n\ +- GL: pinion -root \n\ +- GL: polyhedra -root \n\ +- GL: providence -root \n\ + substrate -root \n\ + wormhole -root \n\ +- GL: antmaze -root \n\ +- GL: boing -root \n\ + boxfit -root \n\ +- GL: carousel -root \n\ + celtic -root \n\ +- GL: crackberg -root \n\ +- GL: cube21 -root \n\ + fiberlamp -root \n\ +- GL: fliptext -root \n\ +- GL: glhanoi -root \n\ +- GL: tangram -root \n\ +- GL: timetunnel -root \n\ +- GL: glschool -root \n\ +- GL: topblock -root \n\ +- GL: cubicgrid -root \n\ + cwaves -root \n\ +- GL: gears -root \n\ +- GL: glcells -root \n\ +- GL: lockward -root \n\ + m6502 -root \n\ +- GL: moebiusgears -root \n\ +- GL: voronoi -root \n\ +- GL: hypnowheel -root \n\ +- GL: klein -root \n\ +- lcdscrub -root \n\ +- GL: photopile -root \n\ +- GL: skytentacles -root \n\ +- GL: rubikblocks -root \n\ +- GL: companioncube -root \n\ +- GL: hilbert -root \n\ +- GL: tronbit -root \n\ +- GL: geodesic -root \n\ + hexadrop -root \n\ +- GL: kaleidocycle -root \n\ +- GL: quasicrystal -root \n\ +- GL: unknownpleasures -root \n\ + binaryring -root \n\ +- GL: cityflow -root \n\ +- GL: geodesicgears -root \n\ +- GL: projectiveplane -root \n\ +- GL: romanboy -root \n\ + tessellimage -root \n\ +- GL: winduprobot -root \n\ +- GL: splitflap -root \n\ +- GL: cubestack -root \n\ +- GL: cubetwist -root \n\ +- GL: discoball -root \n\ +- GL: dymaxionmap -root \n\ +- GL: energystream -root \n\ +- GL: hexstrut -root \n\ +- GL: hydrostat -root \n\ +- GL: raverhoop -root \n\ +- GL: splodesic -root \n\ +- GL: unicrud -root \n\ + + +pointerPollTime: 0:00:05 +pointerHysteresis: 10 +windowCreationTimeout:0:00:30 +initialDelay: 0:00:00 +GetViewPortIsFullOfLies:False +procInterrupts: True +xinputExtensionDev: False +overlayStderr: True +authWarningSlack: 20 + diff --git a/setup.bash b/setup.bash index 7617e9e..8c81e79 100755 --- a/setup.bash +++ b/setup.bash @@ -23,7 +23,8 @@ install-apt-dependencies() { numix-icon-theme-circle \ vorbis-tools \ sound-theme-freedesktop \ - terminator + terminator \ + xscreensaver set +x } @@ -40,7 +41,8 @@ asset-dirs-exist() { install-dependencies() { echo "=> Checking dependencies" - if ! are-in-path xcompmgr openbox dunst ogg123 terminator || ! asset-dirs-exist; then + if ! are-in-path xcompmgr openbox dunst ogg123 terminator xscreensaver \ + || ! asset-dirs-exist; then install-apt-dependencies fi @@ -82,6 +84,7 @@ copy-config() { copy-files-in-dir-to "$(here)/config/albert" "$(config-dir albert)" copy-files-in-dir-to "$(here)/config/openbox" "$(config-dir openbox)" copy-files-in-dir-to "$(here)/config/dunst" "$(config-dir dunst)" + cp "$(here)/config/xscreensaver/config-file" ~/.xscreensaver } add-custom-startup() { @@ -113,12 +116,13 @@ add-ppa-if-not-added() { } os-is-ubuntu-1804() { - [[ $(cat /etc/os-release | grep VERSION_ID | grep -qPo '(?<=").*(?=")') == '18.04' ]] + [[ $(cat /etc/os-release | grep VERSION_ID | grep -Po '(?<=").*(?=")') == '18.04' ]] } add-ppas() { if os-is-ubuntu-1804; then - add-ppa-if-not-added 'deb http://download.opensuse.org/repositories/home:/manuelschneid3r/xUbuntu_18.04/ /' + 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