new desktop file for installing updating

This commit is contained in:
Sam Hewitt
2016-07-06 16:04:24 -04:00
parent ebc3ff2071
commit dca2ec1613
3 changed files with 14 additions and 169 deletions

View File

@@ -17,7 +17,13 @@ Software that is included is free software; you can redistribute it and/or modif
Download instructions and options are available on the [official site](https://snwh.org/paper/download).
###Installing From Source
###Install
You can install or update Paper on-demand via the provided `.desktop` file. Moving it to your local applications folder will allow it to appear in your applications menu.
cp -r org.snwh.paper.icons.desktop ~/.local/share/applications
###Build From Source
You can build and install the Paper icon themes from source:
@@ -27,10 +33,6 @@ You can build and install the Paper icon themes from source:
This procedure requires ```autotools``` on your system.
Or you can install Paper by running the provided installation script:
./install-icon-theme.sh
##Missing Icons & Requests
When filing an icon request or reporting a missing icon, please take care in providing the following useful information:

View File

@@ -1,164 +0,0 @@
#!/bin/bash
# -*- Mode: sh; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
#
# Authors:
# Sam Hewitt <sam@snwh.org>
#
# Description:
# An installation bash script for Paper Icon Theme
#
# Legal Stuff:
#
# This file is part of the Paper Icon Theme and is free software; you can redistribute it and/or modify it under
# the terms of the GNU Lesser General Public License as published by the Free Software
# Foundation; version 3.
#
# This file is part of the Paper Icon Theme and is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
# details.
#
# You should have received a copy of the GNU General Public License along with
# this program; if not, see <https://www.gnu.org/licenses/lgpl-3.0.txt>
tabs 4
clear
echo '#-----------------------------------------#'
echo '# Paper Icon Theme Install Script #'
echo '#-----------------------------------------#'
show_question() {
echo -e "\033[1;34m$@\033[0m"
}
show_info() {
echo -e "\033[1;33m$@\033[0m"
}
show_success() {
echo -e "\033[1;32m$@\033[0m"
}
show_error() {
echo -e "\033[1;31m$@\033[m" 1>&2
}
function continue {
echo
show_question '\tDo you want to continue? (Y)es, (N)o : '
echo
read INPUT
case $INPUT in
[Yy]* ) main;;
[Nn]* ) exit 99;;
* ) echo; echo "Sorry, try again."; continue;;
esac
}
function main {
if [ "$UID" -eq "$ROOT_UID" ]; then
if [ -d /usr/share/icons/Paper ]; then
echo
show_question '\tFound an existing installation. Replace it? (Y)es, (N)o : '
echo
read INPUT
case $INPUT in
[Yy]* ) rm -Rf /usr/share/icons/Paper 2>/dev/null;;
[Nn]* );;
* ) show_error '\tSorry, try again.'; main;;
esac
fi
echo "Installing..."
cp -RH ./Paper/ /usr/share/icons/
chmod -R 755 /usr/share/icons/Paper
show_success "Installation complete!"
echo
echo "You will have to set your theme manually."
end
elif [ "$UID" -ne "$ROOT_UID" ]; then
if [ -d $HOME/.local/share/icons/Paper ]; then
echo
show_question '\tFound an existing installation. Replace it? (Y)es, (N)o : '
echo
read INPUT
case $INPUT in
[Yy]* ) rm -Rf "$HOME/.local/share/icons/Paper" 2>/dev/null;;
[Nn]* );;
* ) show_error '\tSorry, try again.'; main;;
esac
fi
echo "Installing..."
# .local/share/icons
install -d $HOME/.local/share/icons
cp -RH ./Paper/ $HOME/.local/share/icons/
show_success "Installation complete!"
echo
useicons
fi
}
function useicons {
echo
show_question '\tDo you want to set Paper as your icon theme? (Y)es, (N)o : '
echo
read INPUT
case $INPUT in
[Yy]* )
echo "Setting Paper as desktop icon theme..."
gsettings reset org.gnome.desktop.interface icon-theme
gsettings set org.gnome.desktop.interface icon-theme "Paper"
show_success "Complete."
usecursors
;;
[Nn]* ) usecursors;;
* ) echo; show_error "\aUh oh, invalid response. Please retry."; useicons;;
esac
}
function usecursors {
echo
show_question '\tDo you want to set Paper as your cursor theme? (Y)es, (N)o : '
echo
read INPUT
case $INPUT in
[Yy]* )
echo "Setting Paper as desktop cursor theme..."
gsettings reset org.gnome.desktop.interface cursor-theme
gsettings set org.gnome.desktop.interface cursor-theme "Paper"
show_success "Complete."
show_info "You may need to log out & back in for the cursor change to take effect."
end
;;
[Nn]* ) end;;
* ) echo; show_error "\aUh oh, invalid response. Please retry."; usecursors;;
esac
}
function end {
echo
show_info "\tAll done. Press any key to exit."
echo
read -n1
exit 0
}
ROOT_UID=0
if [ "$UID" -ne "$ROOT_UID" ]; then
echo
echo "Paper will be installed in your home directory:"
echo
show_info '\t$HOME/.local/share/icons'
echo
echo "To make them available to all users, run this script as root."
continue
else
echo
echo "Paper will be installed in for system-wide use:"
echo
show_info '\t/usr/share/icons'
echo
echo "It will be available to all users."
continue
fi

View File

@@ -0,0 +1,7 @@
#!/usr/bin/env xdg-open
[Desktop Entry]
Type=Application
Terminal=false
Name=Paper Icon Theme
Icon=preferences-color
Exec=bash -c 'notify-send "Paper Icon Theme" "Getting the latest version of the Paper icons..." -i system-software-update; cd /tmp/; rm -Rf /tmp/paper-icon-theme.zip 2>/dev/null; rm -Rf /tmp/paper-icon-theme-master/ 2>/dev/null; wget https://github.com/snwh/paper-icon-theme/archive/master.zip -O paper-icon-theme.zip; unzip paper-icon-theme.zip; cd paper-icon-theme-master; rm -Rf "$HOME/.local/share/icons/Paper" 2>/dev/null; install -d $HOME/.local/share/icons; cp -R ./Paper/ $HOME/.local/share/icons/; install -d $HOME/.icons; cp -R ./Paper/ $HOME/.icons/;gsettings reset org.gnome.desktop.interface icon-theme; gsettings set org.gnome.desktop.interface icon-theme "Paper"; notify-send "All done!" "Enjoy the latest version of Paper!" -i face-smile'