Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install script #6

Merged
merged 22 commits into from Jul 22, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
@@ -1,4 +1,7 @@
.idea

# ready to deploy to gnome extensions
random-wallpaper-gnome3.zip

# Temporary ui files
**/*~
2 changes: 1 addition & 1 deletion LICENSE
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2014 ifl0w
Copyright (c) 2014 Wolfgang Rumpler

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
17 changes: 16 additions & 1 deletion README.md
Expand Up @@ -3,7 +3,18 @@ RandomWallpaperGnome3

Random Wallpapers for Gnome 3 is a gnome shell extension which fetches a random wallpaper from an online source and sets it as desktop background.

## Installation
![Screenshot](/assets/screenshot.png)

## Installation (symlink to repository)
Run `git clone git@github.com:ifl0w/RandomWallpaperGnome3.git` to clone the repository.
Run `./install.sh` to make a symbolic link from the extensions folder to the git repository.
This installation will depend on the repository folder, so do not delete the cloned folder.

__Installing this way has various advantages:__
* Switching between versions and branches.
* Updateing the extension with `git pull`

## Installation (manually)

Open the commandline and type the following lines:

Expand All @@ -15,6 +26,10 @@ cp -r RandomWallpaperGnome3/randomwallpaper@iflow.space ~/.local/share/gnome-she
Then open the command prompt (Alt+F2) end enter `r` without qotes.
Now you should be able to activate the extension through the gnome-tweak-tool.

## Uninstall
Run `./install uninstall` to delete the symbolic link.
If you installed the extension manually you have to delete the extension folder with `rm -rf ~/.local/share/gnome-shell/extensions/randomwallpaper@iflow.space`.

## Debuging
Debuging can be started via `sh debug.sh`. Information can be printed with `global.log()`.
To debug the prefs.js use `sh debug.sh perfs`. In this case you should print debug messages with `print()`.
Expand Down
Binary file added assets/icon.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
83 changes: 83 additions & 0 deletions assets/icon.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/screenshot.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions build.sh
@@ -0,0 +1,13 @@
#!/bin/bash

BASEDIR='randomwallpaper@iflow.space'
ZIPNAME='random-wallpaper-gnome3.zip'

rm $ZIPNAME
rm $BASEDIR/schemas/gschemas.compiled
rm $BASEDIR/wallpapers/*
glib-compile-schemas $BASEDIR/schemas/

cd $BASEDIR
zip -r $ZIPNAME .
mv $ZIPNAME ..
Binary file removed icon.png
Binary file not shown.
15 changes: 15 additions & 0 deletions install.sh
@@ -0,0 +1,15 @@
#!/bin/bash

extensionFolder="randomwallpaper@iflow.space"
sourcepath="$PWD/$extensionFolder"
targetpath="/home/$USER/.local/share/gnome-shell/extensions"

if [[ $1 == 'uninstall' ]]; then
echo "# Removing $targetpath/$extensionFolder"
rm "$targetpath/$extensionFolder"
else
echo "# Making extension directory"
mkdir -p $targetpath
echo "# Linking extension folder"
ln -s $sourcepath "$targetpath/$extensionFolder"
fi