Skip to content

Instantly share code, notes, and snippets.

@nitheeshkm
Created November 9, 2021 15:40
Show Gist options
  • Save nitheeshkm/4206529581a6173b339cd623cee1aa4a to your computer and use it in GitHub Desktop.
Save nitheeshkm/4206529581a6173b339cd623cee1aa4a to your computer and use it in GitHub Desktop.

Revisions

  1. nitheeshkm created this gist Nov 9, 2021.
    8 changes: 8 additions & 0 deletions wallpaper.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,8 @@
    #!/bin/bash

    if [[ $(nmcli -t -f GENERAL.METERED dev show wlp111s0) = 'GENERAL.METERED:no (guessed)' ]]; then
    wget -O /var/tmp/wallpaper.jpg https://source.unsplash.com/3840x1080/?wallpaper,mars &&
    gsettings set org.gnome.desktop.background picture-uri file:///var/tmp/wallpaper.jpg
    fi

    eog /var/tmp/wallpaper.jpg