Updated README; improved settings setup
This commit is contained in:
parent
35383a95cb
commit
5e3eec9611
10
README.md
10
README.md
|
@ -1,13 +1,15 @@
|
|||
# GWinWrap
|
||||
GWinWrap is a Gtk with Python gui to select videos for XWinWrap, images for Nitrogen Wallpaper Manager, and gifs for Gifsicle.
|
||||
It includes the XWinWrap binary and source code for Shantanu Goel's version of XWinWrap.
|
||||
GWinWrap is a Python application with a Gtk UI to select videos, gifs (or other images), or an xscreensaver as your desktop wallpaper/background.
|
||||
This includes the XWinWrap binary and source code from Shantanu Goel's version of XWinWrap.
|
||||
|
||||
# Notes
|
||||
* Need python 2+
|
||||
* Need PyGObject
|
||||
* When you first run the application and save settings for a screen, you need to chmod 744 the new file(s) in your $HOME directory.
|
||||
* Need PyGObject and Gtk
|
||||
* A settings file per screen is generated.
|
||||
|
||||
# Install
|
||||
` sudo pacman -Sy mpv gifsicle nitrogen xscreensaver `
|
||||
|
||||
|
||||
# Images
|
||||
![1 Default view starting out. ](images/pic1.png)
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
PyGObject
|
||||
setproctitle
|
|
@ -19,22 +19,22 @@ class Settings:
|
|||
self._SCRIPT_PTH = os.path.dirname(os.path.realpath(__file__))
|
||||
self._USER_HOME = os.path.expanduser('~')
|
||||
self._USR_PATH = f"/usr/share/{app_name.lower()}"
|
||||
self._USR_PATH_CONFIG = f"{self._USR_PATH}/settings.json"
|
||||
self._CONFIG_PATH = f"{self._USER_HOME}/.config/{app_name.lower()}"
|
||||
self._GLADE_FILE = f"{self._CONFIG_PATH}/Main_Window.glade"
|
||||
self._CSS_FILE = f"{self._CONFIG_PATH}/stylesheet.css"
|
||||
self._DEFAULT_ICONS = f"{self._CONFIG_PATH}/icons"
|
||||
self._PID_FILE = f"{self._CONFIG_PATH}/{app_name.lower()}.pid"
|
||||
self._USR_CONFIG_FILE = f"{self._USR_PATH}/settings.json"
|
||||
self._HOME_CONFIG_PATH = f"{self._USER_HOME}/.config/{app_name.lower()}"
|
||||
self._DEFAULT_ICONS = f"{self._HOME_CONFIG_PATH}/icons"
|
||||
self._CONFIG_FILE = f"{self._HOME_CONFIG_PATH}/settings.json"
|
||||
self._GLADE_FILE = f"{self._HOME_CONFIG_PATH}/Main_Window.glade"
|
||||
self._CSS_FILE = f"{self._HOME_CONFIG_PATH}/stylesheet.css"
|
||||
self._PID_FILE = f"{self._HOME_CONFIG_PATH}/{app_name.lower()}.pid"
|
||||
self._WINDOW_ICON = f"{self._DEFAULT_ICONS}/{app_name.lower()}.png"
|
||||
self._CONFIG_FILE = f"{self._CONFIG_PATH}/settings.json"
|
||||
|
||||
if not os.path.exists(self._CONFIG_PATH):
|
||||
os.mkdir(self._CONFIG_PATH)
|
||||
if not os.path.exists(self._HOME_CONFIG_PATH):
|
||||
os.mkdir(self._HOME_CONFIG_PATH)
|
||||
|
||||
if not os.path.exists(self._CONFIG_FILE):
|
||||
import shutil
|
||||
try:
|
||||
shutil.copyfile(self._USR_PATH_CONFIG, self._CONFIG_FILE)
|
||||
shutil.copyfile(self._USR_CONFIG_FILE, self._CONFIG_FILE)
|
||||
except Exception as e:
|
||||
raise
|
||||
|
||||
|
@ -47,8 +47,11 @@ class Settings:
|
|||
if not os.path.exists(self._WINDOW_ICON):
|
||||
self._WINDOW_ICON = f"{self.DEFAULT_ICONS}/{app_name.lower()}.png"
|
||||
|
||||
thumbnail_path = f"{self._USER_HOME}/.thumbnails/normal"
|
||||
if not os.path.exists(thumbnail_path):
|
||||
os.system(f"mkdir -p '{thumbnail_path}'")
|
||||
|
||||
self._logger = Logger(self._CONFIG_PATH).get_logger()
|
||||
self._logger = Logger(self._HOME_CONFIG_PATH).get_logger()
|
||||
self._builder = Gtk.Builder()
|
||||
self._builder.add_from_file(self._GLADE_FILE)
|
||||
|
||||
|
|
Loading…
Reference in New Issue