diff --git a/.circleci/config.yml b/.circleci/config.yml
new file mode 100644
index 00000000..58723389
--- /dev/null
+++ b/.circleci/config.yml
@@ -0,0 +1,33 @@
+version: 2
+jobs:
+ build:
+ working_directory: ~/i3wm-themer
+ docker:
+ - image: circleci/python:3.6.4
+ steps:
+ - checkout
+ - run: sudo chown -R circleci:circleci /usr/local/bin
+ - run: sudo chown -R circleci:circleci /usr/local/lib/python3.6/site-packages
+ - restore_cache:
+ key: deps10-{{ .Branch }}-{{ checksum "Pipfile.lock" }}
+ - run:
+ name: Setup testing environment
+ command: |
+ pip install coverage --user
+ pip install pytest --user
+ pip install -r requirements.txt
+ echo $HOME
+ - save_cache:
+ key: deps9-{{ .Branch }}-{{ checksum "Pipfile.lock" }}
+ paths:
+ - ".venv"
+ - "/usr/local/bin"
+ - "/usr/local/lib/python3.6/site-packages"
+ - run:
+ name: Running tests
+ command: |
+ $HOME/.local/bin/coverage run -m pytest
+ $HOME/.local/bin/coverage report --include="i3wmthemer/*"
+ $HOME/.local/bin/coverage html
+ - store_artifacts:
+ path: htmlcov
diff --git a/.gitignore b/.gitignore
index 7f316a4d..4cfeadb3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,9 @@
-src/__pycache__
-src/*.pyc
+test-reports/
+.pytest_cache/
+*__pycache__
+*.pyc
+.idea/
+*.iml
+./*.png
+./*.jpg
+.coverage
diff --git a/Pipfile b/Pipfile
new file mode 100644
index 00000000..e5a18092
--- /dev/null
+++ b/Pipfile
@@ -0,0 +1,12 @@
+[[source]]
+name = "pypi"
+url = "https://pypi.org/simple"
+verify_ssl = true
+
+[dev-packages]
+
+[packages]
+PyYAML = "==5.1"
+
+[requires]
+python_version = "3.6"
diff --git a/Pipfile.lock b/Pipfile.lock
new file mode 100644
index 00000000..be1eadb7
--- /dev/null
+++ b/Pipfile.lock
@@ -0,0 +1,38 @@
+{
+ "_meta": {
+ "hash": {
+ "sha256": "5556f4ae619d1b6aee3fb1082beca51e892dfaea4922d4ecbaf22b3f1b5a2c01"
+ },
+ "pipfile-spec": 6,
+ "requires": {
+ "python_version": "2.7"
+ },
+ "sources": [
+ {
+ "name": "pypi",
+ "url": "https://pypi.org/simple",
+ "verify_ssl": true
+ }
+ ]
+ },
+ "default": {
+ "pyyaml": {
+ "hashes": [
+ "sha256:3d7da3009c0f3e783b2c873687652d83b1bbfd5c88e9813fb7e5b03c0dd3108b",
+ "sha256:3ef3092145e9b70e3ddd2c7ad59bdd0252a94dfe3949721633e41344de00a6bf",
+ "sha256:40c71b8e076d0550b2e6380bada1f1cd1017b882f7e16f09a65be98e017f211a",
+ "sha256:558dd60b890ba8fd982e05941927a3911dc409a63dcb8b634feaa0cda69330d3",
+ "sha256:a7c28b45d9f99102fa092bb213aa12e0aaf9a6a1f5e395d36166639c1f96c3a1",
+ "sha256:aa7dd4a6a427aed7df6fb7f08a580d68d9b118d90310374716ae90b710280af1",
+ "sha256:bc558586e6045763782014934bfaf39d48b8ae85a2713117d16c39864085c613",
+ "sha256:d46d7982b62e0729ad0175a9bc7e10a566fc07b224d2c79fafb5e032727eaa04",
+ "sha256:d5eef459e30b09f5a098b9cea68bebfeb268697f78d647bd255a085371ac7f3f",
+ "sha256:e01d3203230e1786cd91ccfdc8f8454c8069c91bee3962ad93b87a4b2860f537",
+ "sha256:e170a9e6fcfd19021dd29845af83bb79236068bf5fd4df3327c1be18182b2531"
+ ],
+ "index": "pypi",
+ "version": "==3.13"
+ }
+ },
+ "develop": {}
+}
diff --git a/README.md b/README.md
index 4e149d41..277b9671 100644
--- a/README.md
+++ b/README.md
@@ -1,22 +1,16 @@
-
i3wm-themer
+i3wm-themer
+
+![](https://img.shields.io/circleci/build/github/unix121/i3wm-themer/master)
+![](https://img.shields.io/codacy/coverage/79aa404309114b25bdc87f00107a0b94/master)
+![](https://img.shields.io/codacy/grade/79aa404309114b25bdc87f00107a0b94/master)
+![](https://img.shields.io/github/last-commit/unix121/i3wm-themer/master)
+![](https://img.shields.io/github/license/unix121/i3wm-themer)
Personal collection of themes and scripts for i3wm.
![](workflow/workflow.gif?raw=true)
-Update [April 4, 2018]
-
-Due to the high amount of requests to update this repository, I took the time to *completely* rework
-it from the ground up. The old script is gone, the old configs are long gone. There is a new script used to apply/modify the themes for i3wm, polybar and .Xresources, all the old themes have been
-reworked and a few new added. The script now uses a configuration file used to locate your configs
-more accurately and the themes are now presented in a JSON format to make them easier to read/modify/add your own.
-This time I decided to add a few default configuration files for you to use, to avoid the "oh my dots are now
-messed up" complains. With all that said, I hope you enjoy the fully reworked repo, I put a lot of
-effort to make it meet everyone's needs/likings.
-
-
Why?
- You like CLI tools too much
@@ -65,7 +59,7 @@ Either manually or use one of the scripts created for some distros:
If you are not on one of the above, install them using your Package manager.
Make sure you have the requirements mentioned earlier installed.
-Edit the config.yaml file and add your full path of i3wm config, polybar config and .Xresources
+Edit the config.yaml file and add your full path of i3wm config, polybar config and .Xresources
files. In the end it should look something like this:
i3-config: /home/[USER]/.i3/config
@@ -74,11 +68,9 @@ files. In the end it should look something like this:
Where `[USER]` is your `$USER`.
-All further commands are to be executed from the /src directory.
-
Copy the script in the scripts folder to your polybar directory:
- cp -r ../scripts/* /home/$USER/.config/polybar/
+ cp -r scripts/* /home/$USER/.config/polybar/
Backup your files:
@@ -88,7 +80,7 @@ Backup your files:
This step will copy the files that you set in the `config.yaml` for safekeeping in case things go
wrong.
-Install the `config files` located in the src/defaults/ directory (not 100% required but
+Install the `config files` located in the defaults/ directory (not 100% required but
I suggest you do so just to be sure).
python i3wm-themer.py --config config.yaml --install defaults/
@@ -118,31 +110,17 @@ caution!
Available Themes
-Just take a look at the Theme collection and pick the ones you like.
+Just take a look at the Theme collection and pick the ones you like.
![](workflow/themepreview.png?raw=true)
-Contribute to the project
-
-If you want to contribute to the project you can do it in two ways:
-
-- Add new themes by following this guide
-- Help with the script by helping cross out more things from the TODO list
-
-
-
Author
-Support this project
-
-
Credits
This whole project wouldn't be possible without the creators of all those awesome tools:
diff --git a/__init__.py b/__init__.py
new file mode 100644
index 00000000..e69de29b
diff --git a/change.sh b/change.sh
index 8fd2a541..18316681 100755
--- a/change.sh
+++ b/change.sh
@@ -1,5 +1,4 @@
#!/bin/env sh
### Script written by James Shane ( github.com/jamesshane )
-cd src
-python i3wm-themer.py --config config.yaml --load themes/$1.json
+python i3wm-themer.py --config config.yaml --load themes/"$1".json
diff --git a/src/defaults/bg-saved.template b/defaults/bg-saved.template
similarity index 100%
rename from src/defaults/bg-saved.template
rename to defaults/bg-saved.template
diff --git a/src/defaults/config.yaml b/defaults/config.yaml
similarity index 100%
rename from src/defaults/config.yaml
rename to defaults/config.yaml
diff --git a/src/defaults/i3.template b/defaults/i3.template
similarity index 100%
rename from src/defaults/i3.template
rename to defaults/i3.template
diff --git a/src/defaults/polybar.template b/defaults/polybar.template
similarity index 100%
rename from src/defaults/polybar.template
rename to defaults/polybar.template
diff --git a/src/defaults/xresources.template b/defaults/xresources.template
similarity index 100%
rename from src/defaults/xresources.template
rename to defaults/xresources.template
diff --git a/i3wm-themer.py b/i3wm-themer.py
new file mode 100644
index 00000000..e288675e
--- /dev/null
+++ b/i3wm-themer.py
@@ -0,0 +1,46 @@
+#!/bin/env python3
+
+"""
+i3-wm theme changing utility.
+
+Author : Stavros Grigoriou (@unix121)
+"""
+
+import argparse
+
+from i3wmthemer.models.configuration import ConfigurationLoader
+from i3wmthemer.models.theme import Theme
+from i3wmthemer.utils.backup import BackupUtils
+from i3wmthemer.utils.fileutils import FileUtils
+from i3wmthemer.utils.install import InstallationUtils
+
+if __name__ == "__main__":
+ parser = argparse.ArgumentParser(description='i3wm-themer by Stavros Grigoriou (@unix121)')
+ parser.add_argument('-c', '--config', type=str, required=True, help='Load config file')
+ parser.add_argument('-b', '--backup', type=str, help='Backup files')
+ parser.add_argument('-i', '--install', type=str, help='Install i3wm-themer\'s default configuration files')
+ parser.add_argument('-l', '--load', type=str, help='Load theme from JSON file')
+ args = parser.parse_args()
+
+ # TODO :: Default
+ if args.config is None:
+ exit(0)
+
+ # Load the configuration
+ configLoader = ConfigurationLoader(args.config)
+ configuration = configLoader.load()
+
+ if args.backup is not None:
+ BackupUtils.backup_config(args.backup, configuration)
+ exit(0)
+
+ if args.install is not None:
+ InstallationUtils.install_defaults(args.install, configuration)
+ configuration.refresh_all('')
+ exit(0)
+
+ if args.load is not None:
+ file = FileUtils.load_theme_from_file(args.load)
+ theme = Theme(file)
+ theme.load(configuration)
+ exit(0)
diff --git a/i3wmthemer/__init__.py b/i3wmthemer/__init__.py
new file mode 100644
index 00000000..e69de29b
diff --git a/i3wmthemer/enumeration/__init__.py b/i3wmthemer/enumeration/__init__.py
new file mode 100644
index 00000000..e69de29b
diff --git a/i3wmthemer/enumeration/attributes.py b/i3wmthemer/enumeration/attributes.py
new file mode 100644
index 00000000..34132386
--- /dev/null
+++ b/i3wmthemer/enumeration/attributes.py
@@ -0,0 +1,84 @@
+from enum import Enum, unique
+
+
+@unique
+class XresourcesAttr(Enum):
+ """
+ Attributes that should be parsed from the configuration file for Xresources.
+ """
+ NAME = 'xresources'
+ BACKGROUND = 'background'
+ FOREGROUND = 'foreground'
+ CURSOR = 'cursorcolor'
+ COLOR0 = 'color0'
+ COLOR1 = 'color1'
+ COLOR2 = 'color2'
+ COLOR3 = 'color3'
+ COLOR4 = 'color4'
+ COLOR5 = 'color5'
+ COLOR6 = 'color6'
+ COLOR7 = 'color7'
+ COLOR8 = 'color8'
+ COLOR9 = 'color9'
+ COLOR10 = 'color10'
+ COLOR11 = 'color11'
+ COLOR12 = 'color12'
+ COLOR13 = 'color13'
+ COLOR14 = 'color14'
+ COLOR15 = 'color15'
+ ROFI_WIND = 'rofi.color-window'
+ ROFI_NORM = 'rofi.color-normal'
+ ROFI_ACTI = 'rofi.color-active'
+ ROFI_URGE = 'rofi.color-urgent'
+
+
+@unique
+class I3Attr(Enum):
+ """
+ Attributes that should be parsed from the configuration file for i3.
+ """
+ NAME = 'i3wm'
+ BACKGROUND = 'client.background'
+ FOCUSED = 'client.focused'
+ UNFOCUSED = 'client.unfocused'
+ INACTIVE = 'client.focused_inactive'
+ URGENT = 'client.urgent'
+ PLACEHOLDER = 'client.placeholder'
+
+
+@unique
+class PolybarAttr(Enum):
+ """
+ Attributes that should be parsed from the configuration file for Polybar.
+ """
+ NAME = 'polybar'
+ BACKGROUND = 'background'
+ FOREGROUND = 'foreground'
+ MOD_L = 'modules-left'
+ MOD_C = 'modules-center'
+ MOD_R = 'modules-right'
+ LABEL_UN_BACK = 'label-unfocused-background'
+ LABEL_UN_FORE = 'label-unfocused-foreground'
+ LABEL_MOD_BACK = 'label-mode-background'
+ LABEL_MOD_FORE = 'label-mode-foreground'
+ LABEL_FOC_BACK = 'label-focused-background'
+ LABEL_FOC_FORE = 'label-focused-foreground'
+ LABEL_VIS_BACK = 'label-visible-background'
+ LABEL_VIS_FORE = 'label-visible-foreground'
+ FORMAT_BACK = 'format-background'
+ FORMAT_FORE = 'format-foreground'
+ LABEL_OPEN_FORE = 'label-open-foreground'
+ LABEL_CLOSE_FORE = 'label-close-foreground'
+ LABEL_SEP_FOREGROUND = 'label-separator-foreground'
+ FORMAT_CON_FORE = 'format-connected-foreground'
+ FORMAT_CON_BACK = 'format-connected-background'
+ FORMAT_CON_PRE_FORE = 'format-connected-prefix-foreground'
+ RAMP_SIG_FOREGROUND = 'ramp-signal-foreground'
+
+
+@unique
+class NitrogenAttr(Enum):
+ """
+ Attributes that should be parsed from the configuration file for Nitrogen.
+ """
+ NAME = 'wallpaper'
diff --git a/i3wmthemer/models/__init__.py b/i3wmthemer/models/__init__.py
new file mode 100644
index 00000000..e69de29b
diff --git a/i3wmthemer/models/abstract_theme.py b/i3wmthemer/models/abstract_theme.py
new file mode 100644
index 00000000..1dab1d05
--- /dev/null
+++ b/i3wmthemer/models/abstract_theme.py
@@ -0,0 +1,17 @@
+from abc import ABC, abstractmethod
+
+
+class AbstractTheme(ABC):
+ """
+ Abstract Theme.
+ """
+
+ @abstractmethod
+ def load(self, configuration):
+ """
+ Method that must be implemented.
+ Should load the theme in the proper file in the configuration.
+
+ :param configuration: the configuration.
+ """
+ raise NotImplementedError
diff --git a/i3wmthemer/models/configuration.py b/i3wmthemer/models/configuration.py
new file mode 100644
index 00000000..ad2c220d
--- /dev/null
+++ b/i3wmthemer/models/configuration.py
@@ -0,0 +1,98 @@
+import logging
+from subprocess import call
+
+import yaml
+
+from i3wmthemer.utils.fileutils import FileUtils
+
+logger = logging.getLogger(__name__)
+
+
+class Configuration:
+ """
+ Basic configuration model.
+ Attributes stored:
+ * i3 Configuration filepath
+ * Polybar configuration filepath
+ * xResources configuration filepath
+ * Nitrogen configuration filepath
+ * Wallpaper path
+ """
+
+ def __init__(self, i3_config, polybar_config, xresources, nitrogen_config, wp_path):
+ """
+ Initializer method.
+
+ :param i3_config: i3 configuration filepath.
+ :param polybar_config: polybar configuration filepath.
+ :param xresources: xResources filepath.
+ :param nitrogen_config: nitrogen configuration filepath.
+ :param wp_path: wallpaper filepath.
+ """
+ # i3 config
+ self.i3_config = i3_config
+ # Polybar config
+ self.polybar_config = polybar_config
+ # xResources
+ self.xresources = xresources
+ # Nitrogen
+ self.nitrogen_config = nitrogen_config
+ # Wallpaper
+ self.wp_path = wp_path
+
+ def refresh_all(self, wallpaper):
+ """
+ Function that refreshes the configuration.
+
+ :param self: current instance.
+ :param wallpaper: the wallpaper file.
+ """
+
+ try:
+ logger.warning('Refreshing i3 and xrdb and setting wallpaper')
+ if self.wp_path is not None:
+ call(['nitrogen', '--set-zoom-fill', 'wallpapers/' + wallpaper])
+ call(['xrdb', self.xresources])
+ call(['i3-msg', 'restart'])
+ logger.warning('Done!')
+ except FileNotFoundError:
+ logger.error('Failed to reload the configuration!')
+
+
+class ConfigurationLoader:
+ """
+ Configuration loader helper class.
+ """
+
+ def __init__(self, filepath):
+ """
+ Initializer.
+
+ :param filepath: configuration file path.
+ """
+ self.filepath = filepath
+
+ def load(self):
+ """
+ Function used to load the path of each configuration file into the model.
+
+ :return: configuration model.
+ """
+ configuration = {}
+
+ if FileUtils.locate_file(self.filepath):
+ logger.warning('Located the config file')
+ config_path = open(self.filepath, 'r')
+ config = yaml.load_all(config_path)
+
+ for conf in config:
+ for n, v in conf.items():
+ configuration[n] = v
+
+ else:
+ logger.error('Failed to locate the config file')
+ exit(9)
+
+ # Set each property.
+ return Configuration(configuration['i3-config'], configuration['polybar-config'], configuration['xresources'],
+ configuration['nitrogen-config'], configuration['wallpaper-path'])
diff --git a/i3wmthemer/models/i3.py b/i3wmthemer/models/i3.py
new file mode 100644
index 00000000..d948ffcc
--- /dev/null
+++ b/i3wmthemer/models/i3.py
@@ -0,0 +1,52 @@
+import logging
+
+from i3wmthemer.enumeration.attributes import I3Attr
+from i3wmthemer.models.abstract_theme import AbstractTheme
+from i3wmthemer.utils.fileutils import FileUtils
+
+logger = logging.getLogger(__name__)
+
+
+class I3Theme(AbstractTheme):
+ """
+ Class that contains the attributes of the i3 theme that should be loaded.
+ """
+
+ def __init__(self, json_file):
+ """
+ Initializer.
+
+ :param json_file: JSON file that contains the theme data.
+ """
+ i3theme = json_file[I3Attr.NAME.value]
+
+ self.background = i3theme[I3Attr.BACKGROUND.value]
+ self.focused = i3theme[I3Attr.FOCUSED.value]
+ self.unfocused = i3theme[I3Attr.UNFOCUSED.value]
+ self.inactive = i3theme[I3Attr.INACTIVE.value]
+ self.urgent = i3theme[I3Attr.URGENT.value]
+ self.placeholder = i3theme[I3Attr.PLACEHOLDER.value]
+
+ def load(self, configuration):
+ """
+ Function that loads the i3 theme.
+
+ :param configuration: the configuration.
+ """
+ logger.warning('Applying changes to i3 configuration')
+
+ if FileUtils.locate_file(configuration.i3_config):
+ logger.warning('Located the i3 configuration file')
+
+ logger.warning('Found the i3wm info in the JSON file')
+ FileUtils.replace_line(configuration.i3_config, 'client.background', 'client.background ' + self.background)
+ FileUtils.replace_line(configuration.i3_config, 'client.focused ', 'client.focused ' + self.focused)
+ FileUtils.replace_line(configuration.i3_config, 'client.unfocused', 'client.unfocused ' + self.unfocused)
+ FileUtils.replace_line(configuration.i3_config, 'client.focused_inactive',
+ 'client.focused_inactive ' + self.inactive)
+ FileUtils.replace_line(configuration.i3_config, 'client.urgent',
+ 'client.urgent ' + self.urgent)
+ FileUtils.replace_line(configuration.i3_config, 'client.placeholder',
+ 'client.placeholder ' + self.placeholder)
+ else:
+ logger.warning('Failed to locate your i3 configuration file')
diff --git a/i3wmthemer/models/nitrogen.py b/i3wmthemer/models/nitrogen.py
new file mode 100644
index 00000000..6d02ea6a
--- /dev/null
+++ b/i3wmthemer/models/nitrogen.py
@@ -0,0 +1,46 @@
+import logging
+from shutil import copyfile
+
+from i3wmthemer.enumeration.attributes import NitrogenAttr
+from i3wmthemer.models.abstract_theme import AbstractTheme
+from i3wmthemer.utils.fileutils import FileUtils
+
+logger = logging.getLogger(__name__)
+
+
+class NitrogenTheme(AbstractTheme):
+ """
+ Class that contains the attributes needed for Nitrogen.
+ """
+
+ def __init__(self, json_file):
+ """
+ Initialized.
+ :param json_file: JSON file that contains the Nitrogen theme.
+ """
+
+ self.wallpaper = json_file[NitrogenAttr.NAME.value]
+
+ def load(self, configuration):
+
+ """
+ Function that loads the wallpaper using Nitrogen.
+
+ :param configuration: the configuration.
+ """
+ logger.warning('Loading wallpaper')
+
+ if FileUtils.locate_file(configuration.nitrogen_config):
+ logger.warning('Applying changes to Nitrogen configuration file')
+ FileUtils.replace_line(configuration.nitrogen_config, 'file',
+ 'file= ' + configuration.wp_path + self.wallpaper)
+ new_file = 'wallpapers/' + self.wallpaper
+ try:
+ copyfile(new_file, configuration.wp_path + self.wallpaper)
+ logger.warning('Loaded the wallpaper successfully!!')
+ return True
+ except IOError:
+ logger.error('Failed to install the new wallpaper!')
+ return False
+ else:
+ logger.error('Failed to locate nitrogen configuration file')
diff --git a/i3wmthemer/models/polybar.py b/i3wmthemer/models/polybar.py
new file mode 100644
index 00000000..b79e0471
--- /dev/null
+++ b/i3wmthemer/models/polybar.py
@@ -0,0 +1,98 @@
+import logging
+
+from i3wmthemer.enumeration.attributes import PolybarAttr
+from i3wmthemer.models.abstract_theme import AbstractTheme
+from i3wmthemer.utils.fileutils import FileUtils
+
+logger = logging.getLogger(__name__)
+
+
+class PolybarTheme(AbstractTheme):
+ """
+ Class that contains the Polybar theme attributes.
+ """
+
+ def __init__(self, json_file):
+ """
+ Initializer.
+ :param json_file: file that contains the polybar theme.
+ """
+ polybar_theme = json_file[PolybarAttr.NAME.value]
+
+ self.background = polybar_theme[PolybarAttr.BACKGROUND.value]
+ self.foreground = polybar_theme[PolybarAttr.FOREGROUND.value]
+ self.modules_l = polybar_theme[PolybarAttr.MOD_L.value]
+ self.modules_c = polybar_theme[PolybarAttr.MOD_C.value]
+ self.modules_r = polybar_theme[PolybarAttr.MOD_R.value]
+ self.label_un_back = polybar_theme[PolybarAttr.LABEL_UN_BACK.value]
+ self.label_un_fore = polybar_theme[PolybarAttr.LABEL_UN_FORE.value]
+ self.label_mod_back = polybar_theme[PolybarAttr.LABEL_MOD_BACK.value]
+ self.label_mod_fore = polybar_theme[PolybarAttr.LABEL_MOD_FORE.value]
+ self.label_foc_back = polybar_theme[PolybarAttr.LABEL_FOC_BACK.value]
+ self.label_foc_fore = polybar_theme[PolybarAttr.LABEL_FOC_FORE.value]
+ self.label_vis_back = polybar_theme[PolybarAttr.LABEL_VIS_BACK.value]
+ self.label_vis_fore = polybar_theme[PolybarAttr.LABEL_VIS_FORE.value]
+ self.format_back = polybar_theme[PolybarAttr.FORMAT_BACK.value]
+ self.format_fore = polybar_theme[PolybarAttr.FORMAT_FORE.value]
+ self.label_open_fore = polybar_theme[PolybarAttr.LABEL_OPEN_FORE.value]
+ self.label_close_fore = polybar_theme[PolybarAttr.LABEL_CLOSE_FORE.value]
+ self.label_sep_fore = polybar_theme[PolybarAttr.LABEL_SEP_FOREGROUND.value]
+ self.format_con_back = polybar_theme[PolybarAttr.FORMAT_CON_BACK.value]
+ self.format_con_fore = polybar_theme[PolybarAttr.FORMAT_CON_FORE.value]
+ self.format_con_pre_fore = polybar_theme[PolybarAttr.FORMAT_CON_PRE_FORE.value]
+ self.ramp_sign_fore = polybar_theme[PolybarAttr.RAMP_SIG_FOREGROUND.value]
+
+ def load(self, configuration):
+ """
+ Function that loads the Polybar theme.
+
+ :param configuration: the configuration.
+ """
+ logger.warning('Applying changes to Polybar configuration file')
+
+ if FileUtils.locate_file(configuration.polybar_config):
+ logger.warning('Located the Polybar configuration file')
+
+ logger.warning('Found the Polybar info in the JSON file')
+
+ FileUtils.replace_line(configuration.polybar_config, 'background =', 'background = ' + self.background)
+ FileUtils.replace_line(configuration.polybar_config, 'foreground =', 'foreground = ' + self.foreground)
+ FileUtils.replace_line(configuration.polybar_config, 'modules-left', 'modules-left = ' + self.modules_l)
+ FileUtils.replace_line(configuration.polybar_config, 'modules-center', 'modules-center = ' + self.modules_c)
+ FileUtils.replace_line(configuration.polybar_config, 'modules-right', 'modules-right = ' + self.modules_r)
+ FileUtils.replace_line(configuration.polybar_config, 'label-unfocused-background',
+ 'label-unfocused-background = ' + self.label_un_back)
+ FileUtils.replace_line(configuration.polybar_config, 'label-unfocused-foreground',
+ 'label-unfocused-foreground = ' + self.label_un_fore)
+ FileUtils.replace_line(configuration.polybar_config, 'label-focused-background',
+ 'label-focused-background = ' + self.label_foc_back)
+ FileUtils.replace_line(configuration.polybar_config, 'label-focused-foreground',
+ 'label-focused-foreground = ' + self.label_foc_fore)
+ FileUtils.replace_line(configuration.polybar_config, 'label-visible-background',
+ 'label-visible-background = ' + self.label_vis_back)
+ FileUtils.replace_line(configuration.polybar_config, 'label-visible-foreground',
+ 'label-visible-foreground = ' + self.label_vis_fore)
+ FileUtils.replace_line(configuration.polybar_config, 'label-mode-background',
+ 'label-mode-background = ' + self.label_mod_back)
+ FileUtils.replace_line(configuration.polybar_config, 'label-mode-foreground',
+ 'label-mode-foreground = ' + self.label_mod_fore)
+ FileUtils.replace_line(configuration.polybar_config, 'format-foreground',
+ 'format-foreground = ' + self.format_fore)
+ FileUtils.replace_line(configuration.polybar_config, 'format-background',
+ 'format-background = ' + self.format_back)
+ FileUtils.replace_line(configuration.polybar_config, 'label-open-foreground',
+ 'label-open-foreground = ' + self.label_open_fore)
+ FileUtils.replace_line(configuration.polybar_config, 'label-close-foreground',
+ 'label-close-foreground = ' + self.label_close_fore)
+ FileUtils.replace_line(configuration.polybar_config, 'label-separator-foreground',
+ 'label-separator-foreground = ' + self.label_sep_fore)
+ FileUtils.replace_line(configuration.polybar_config, 'format-connected-foreground',
+ 'format-connected-foreground = ' + self.format_con_back)
+ FileUtils.replace_line(configuration.polybar_config, 'format-connected-background',
+ 'format-connected-background = ' + self.format_con_back)
+ FileUtils.replace_line(configuration.polybar_config, 'format-connected-prefix-foreground',
+ 'format-connected-prefix-foreground = ' + self.format_con_pre_fore)
+ FileUtils.replace_line(configuration.polybar_config, 'ramp-signal-foreground',
+ 'ramp-signal-foreground = ' + self.ramp_sign_fore)
+ else:
+ logger.error('Failed to locate the Polybar configuration file')
diff --git a/i3wmthemer/models/theme.py b/i3wmthemer/models/theme.py
new file mode 100644
index 00000000..4b468a58
--- /dev/null
+++ b/i3wmthemer/models/theme.py
@@ -0,0 +1,34 @@
+from i3wmthemer.models.abstract_theme import AbstractTheme
+from i3wmthemer.models.i3 import I3Theme
+from i3wmthemer.models.nitrogen import NitrogenTheme
+from i3wmthemer.models.polybar import PolybarTheme
+from i3wmthemer.models.xresources import XresourcesTheme
+
+
+class Theme(AbstractTheme):
+ """
+ Class that contains the loaded theme.
+ """
+
+ def __init__(self, file):
+ """
+ Initializer.
+
+ :param file: the JSON file to load from.
+ """
+ self.x_resources = XresourcesTheme(file)
+ self.i3_theme = I3Theme(file)
+ self.polybar_theme = PolybarTheme(file)
+ self.nitrogen_theme = NitrogenTheme(file)
+
+ def load(self, configuration):
+ """
+ Batch apply all the themes.
+
+ :param configuration: the configuration.
+ """
+ self.x_resources.load(configuration)
+ self.i3_theme.load(configuration)
+ self.polybar_theme.load(configuration)
+ self.nitrogen_theme.load(configuration)
+ configuration.refresh_all(self.nitrogen_theme.wallpaper)
diff --git a/i3wmthemer/models/xresources.py b/i3wmthemer/models/xresources.py
new file mode 100644
index 00000000..c3b48e6e
--- /dev/null
+++ b/i3wmthemer/models/xresources.py
@@ -0,0 +1,101 @@
+import logging
+
+from i3wmthemer.enumeration.attributes import XresourcesAttr
+from i3wmthemer.models.abstract_theme import AbstractTheme
+from i3wmthemer.utils.fileutils import FileUtils
+
+logger = logging.getLogger(__name__)
+
+
+class XresourcesTheme(AbstractTheme):
+ """
+ .Xresources theme properties store.
+
+ Contains all the data tha should be loaded:
+ * Foreground
+ * Background
+ * 0-15 Colors
+ * Rofi
+ """
+
+ def __init__(self, json_file):
+ """
+ Initializer.
+ :param json_file: json file to parse.
+ """
+
+ # Locate the 'xresources' tag in the json_file
+ data = json_file[XresourcesAttr.NAME.value]
+
+ # Background and foreground.
+ self.background = data[XresourcesAttr.BACKGROUND.value]
+ self.foreground = data[XresourcesAttr.FOREGROUND.value]
+ self.cursor_color = data[XresourcesAttr.CURSOR.value]
+
+ # 16 colors.
+ self.color0 = data[XresourcesAttr.COLOR0.value]
+ self.color1 = data[XresourcesAttr.COLOR1.value]
+ self.color2 = data[XresourcesAttr.COLOR2.value]
+ self.color3 = data[XresourcesAttr.COLOR3.value]
+ self.color4 = data[XresourcesAttr.COLOR4.value]
+ self.color5 = data[XresourcesAttr.COLOR5.value]
+ self.color6 = data[XresourcesAttr.COLOR6.value]
+ self.color7 = data[XresourcesAttr.COLOR7.value]
+ self.color8 = data[XresourcesAttr.COLOR8.value]
+ self.color9 = data[XresourcesAttr.COLOR9.value]
+ self.color10 = data[XresourcesAttr.COLOR10.value]
+ self.color11 = data[XresourcesAttr.COLOR11.value]
+ self.color12 = data[XresourcesAttr.COLOR12.value]
+ self.color13 = data[XresourcesAttr.COLOR13.value]
+ self.color14 = data[XresourcesAttr.COLOR14.value]
+ self.color15 = data[XresourcesAttr.COLOR15.value]
+
+ # Rofi.
+ self.rofi_window = data[XresourcesAttr.ROFI_WIND.value]
+ self.rofi_normal = data[XresourcesAttr.ROFI_NORM.value]
+ self.rofi_urgent = data[XresourcesAttr.ROFI_URGE.value]
+ self.rofi_active = data[XresourcesAttr.ROFI_ACTI.value]
+
+ def load(self, configuration):
+ """
+ Function that loads the theme by replacing lines in the original file.
+
+ :param configuration: the configuration.
+ """
+ logger.warning('Applying changes to .Xresources')
+
+ if FileUtils.locate_file(configuration.xresources):
+ logger.warning('Located .Xresources file.')
+
+ FileUtils.replace_line(configuration.xresources, '*background:',
+ '*background: ' + self.background)
+ FileUtils.replace_line(configuration.xresources, '*foreground:',
+ '*foreground: ' + self.foreground)
+ FileUtils.replace_line(configuration.xresources, '*cursorColor:',
+ '*cursorColor: ' + self.cursor_color)
+ FileUtils.replace_line(configuration.xresources, '*color0:', '*color0: ' + self.color0)
+ FileUtils.replace_line(configuration.xresources, '*color1:', '*color1: ' + self.color1)
+ FileUtils.replace_line(configuration.xresources, '*color2:', '*color2: ' + self.color2)
+ FileUtils.replace_line(configuration.xresources, '*color3:', '*color3: ' + self.color3)
+ FileUtils.replace_line(configuration.xresources, '*color4:', '*color4: ' + self.color4)
+ FileUtils.replace_line(configuration.xresources, '*color5:', '*color5: ' + self.color5)
+ FileUtils.replace_line(configuration.xresources, '*color6:', '*color6: ' + self.color6)
+ FileUtils.replace_line(configuration.xresources, '*color7:', '*color7: ' + self.color7)
+ FileUtils.replace_line(configuration.xresources, '*color8:', '*color8: ' + self.color8)
+ FileUtils.replace_line(configuration.xresources, '*color9:', '*color9: ' + self.color9)
+ FileUtils.replace_line(configuration.xresources, '*color10:', '*color10: ' + self.color10)
+ FileUtils.replace_line(configuration.xresources, '*color11:', '*color11: ' + self.color11)
+ FileUtils.replace_line(configuration.xresources, '*color12:', '*color12: ' + self.color12)
+ FileUtils.replace_line(configuration.xresources, '*color13:', '*color13: ' + self.color13)
+ FileUtils.replace_line(configuration.xresources, '*color14:', '*color14: ' + self.color14)
+ FileUtils.replace_line(configuration.xresources, '*color15:', '*color15: ' + self.color15)
+ FileUtils.replace_line(configuration.xresources, 'rofi.color-window:',
+ 'rofi.color-window: ' + self.rofi_window)
+ FileUtils.replace_line(configuration.xresources, 'rofi.color-normal:',
+ 'rofi.color-normal: ' + self.rofi_normal)
+ FileUtils.replace_line(configuration.xresources, 'rofi.color-active:',
+ 'rofi.color-active: ' + self.rofi_active)
+ FileUtils.replace_line(configuration.xresources, 'rofi.color-urgent:',
+ 'rofi.color-urgent: ' + self.rofi_urgent)
+ else:
+ logger.error('Failed to locate your .Xresources file')
diff --git a/i3wmthemer/utils/__init__.py b/i3wmthemer/utils/__init__.py
new file mode 100644
index 00000000..e69de29b
diff --git a/i3wmthemer/utils/backup.py b/i3wmthemer/utils/backup.py
new file mode 100644
index 00000000..19e0428f
--- /dev/null
+++ b/i3wmthemer/utils/backup.py
@@ -0,0 +1,68 @@
+import logging
+from shutil import copyfile
+
+from i3wmthemer.utils.fileutils import FileUtils
+
+logger = logging.getLogger(__name__)
+
+
+class BackupUtils:
+ """
+ Basic file copy function.
+ """
+
+ @staticmethod
+ def backup_file(back_file, destination):
+ """
+ File backup function. Copies the given file to the given destination.
+
+ :param back_file: file to copy.
+ :param destination: destination.
+ :return: True if the operation is success.
+ """
+ if FileUtils.locate_file(back_file):
+ logger.warning('Located %s file!', back_file)
+ try:
+ copyfile(back_file, destination)
+ return True
+ except IOError:
+ logger.error('Failed to back it up!')
+ return False
+ else:
+ logger.error('Could not locate %s file!', back_file)
+ return False
+
+ @staticmethod
+ def backup_config(backup_folder, configuration):
+ """
+ Backup method. Backups up the given files:
+ * i3 configuration
+ * polybar configuration
+ * xResources
+
+ :param backup_folder: destination.
+ :param configuration: configuration.
+ """
+ logger.warning('Backing up your files.')
+
+ if FileUtils.locate_folder(backup_folder):
+ logger.warning('Located the backup folder.')
+
+ # Backup i3 file
+ if configuration.i3_config is not None:
+ if not BackupUtils.backup_file(configuration.i3_config, backup_folder + '/i3.config'):
+ logger.error('Failed!')
+
+ # Backup Polybar config
+ if configuration.polybar_config is not None:
+ if not BackupUtils.backup_file(configuration.polybar_config, backup_folder + '/polybar.config'):
+ logger.error('Failed!')
+
+ # Backup xresources
+ if configuration.xresources is not None:
+ if not BackupUtils.backup_file(configuration.xresources, backup_folder + '/xresources'):
+ logger.error('Failed!')
+
+ else:
+ logger.error('Failed to locate the backup folder.')
+ exit(9)
diff --git a/i3wmthemer/utils/fileutils.py b/i3wmthemer/utils/fileutils.py
new file mode 100644
index 00000000..75453af1
--- /dev/null
+++ b/i3wmthemer/utils/fileutils.py
@@ -0,0 +1,86 @@
+import json
+import logging
+import os.path
+from os import fdopen, remove
+from shutil import move
+from tempfile import mkstemp
+
+logger = logging.getLogger(__name__)
+
+
+class FileUtils:
+ """
+ File utilities method.
+ """
+
+ @staticmethod
+ def locate_folder(path):
+ """
+ Check if the given path is a directory.
+
+ :param path: path to check.
+ :return: True if the path is an existing directory.
+ """
+ return os.path.isdir(path)
+
+ @staticmethod
+ def locate_file(path):
+ """
+ Check if the given path is file.
+
+ :param path: path to check.
+ :return: true if the path is an existing file.
+ """
+ return os.path.isfile(path)
+
+ @staticmethod
+ def load_theme_from_file(path):
+ """
+ JSon file loader.
+
+ Loads the theme from the given JSON file and returns it.
+
+ :param path: json filepath.
+ :return: the loaded theme.
+ """
+ file = ''
+ if FileUtils.locate_file(path):
+ logger.warning('Located the Json file.')
+ with open(path) as json_data:
+ file = json.load(json_data)
+ else:
+ logger.error('Failed to locate the Json file.')
+ exit(9)
+
+ return file
+
+ @staticmethod
+ def replace_line(file, pattern, new_line):
+ """
+ Function that replaces the given line in the given file.
+
+ :param file: file to modify.
+ :param pattern: pattern to filter.
+ :param new_line: line to replace with.
+ """
+ fh, abs_path = mkstemp()
+ with fdopen(fh, 'w') as new_file:
+ with open(file) as old_file:
+ for line in old_file:
+ if line.startswith(pattern):
+ pl1 = line
+ pl1 = pl1.rstrip()
+ pl2 = new_line
+ pl2 = pl2.rstrip()
+ logger.warning('Replacing line: \'%s\' with \'%s\'', pl1, pl2)
+ try:
+ new_file.write(new_line + '\n')
+ except IOError:
+ logger.error('Failed!')
+ else:
+ try:
+ new_file.write(line)
+ except IOError:
+ logger.error('Failed!')
+ remove(file)
+ move(abs_path, file)
diff --git a/i3wmthemer/utils/install.py b/i3wmthemer/utils/install.py
new file mode 100644
index 00000000..900491a2
--- /dev/null
+++ b/i3wmthemer/utils/install.py
@@ -0,0 +1,71 @@
+import logging
+from shutil import copyfile
+
+from i3wmthemer.utils.fileutils import FileUtils
+
+logger = logging.getLogger(__name__)
+
+
+class InstallationUtils:
+ """
+ Installation utility class.
+ """
+
+ @staticmethod
+ def install_file(file, new_file):
+ """
+ Function that overrides the given file with the appropriate one
+ from the configuration.
+ :param file: destination.
+ :param new_file: file to copy.
+ :return: True if success.
+ """
+ if FileUtils.locate_file(file):
+ logger.warning('Located %s file!', file)
+ try:
+ copyfile(new_file, file)
+ logger.warning('Installed the new file successfully!')
+ return True
+ except IOError:
+ logger.error('Failed to install the new file!')
+ return False
+ else:
+ logger.error('Could not locate %s file!', file)
+ return False
+
+ @staticmethod
+ def install_defaults(temp_folder, configuration):
+ """
+ Function that installs each configuration template file to the proper
+ location in the system.
+
+ :param temp_folder: folder that contains the templates.
+ :param configuration: configuration.
+ """
+ logger.info('Installing the files from %s file', temp_folder)
+
+ if FileUtils.locate_folder(temp_folder):
+ logger.info('Located the folder')
+
+ # Install default i3 file
+ if configuration.i3_config is not None:
+ if not InstallationUtils.install_file(configuration.i3_config, temp_folder + 'i3.template'):
+ logger.error('Failed!')
+
+ # Install default polybar file
+ if configuration.polybar_config is not None:
+ if not InstallationUtils.install_file(configuration.polybar_config, temp_folder + 'polybar.template'):
+ logger.error('Failed!')
+
+ # Install default Xresources file
+ if configuration.xresources is not None:
+ if not InstallationUtils.install_file(configuration.xresources, temp_folder + 'xresources.template'):
+ logger.error('Failed!')
+
+ # Install default nitrogen file
+ if configuration.nitrogen_config is not None:
+ if not InstallationUtils.install_file(configuration.nitrogen_config, temp_folder + 'bg-saved.template'):
+ logger.error('Failed!')
+ else:
+ logger.error('Failed to locate the folder.')
+ exit(9)
diff --git a/install_arch.sh b/install_arch.sh
index bd71d080..7adf0dd6 100755
--- a/install_arch.sh
+++ b/install_arch.sh
@@ -8,80 +8,73 @@
#refrsh pacman
sudo pacman -Syy
-#added binutils,gcc,make,pkg-config,fakeroot for compilations, removed yaourt
-#added python-yaml, removed pip install
+# Added binutils,gcc,make,pkg-config,fakeroot for compilations, removed yaourt
+# Added python-yaml, removed pip install
sudo pacman -S git nitrogen rofi python-pip ttf-font-awesome adobe-source-code-pro-fonts binutils gcc make pkg-config fakeroot python-yaml --noconfirm
# Look for and use common AUR helpers from https://wiki.archlinux.org/index.php/AUR_helpers#Pacman_wrappers
if [ -x "$(command -v yay)" ]; then
- yay -S polybar-git ttf-nerd-fonts-symbols
+ yay -S polybar-git ttf-nerd-fonts-symbols
elif [ -x "$(command -v trizen)" ]; then
- trizen -S polybar-git ttf-nerd-fonts-symbols
+ trizen -S polybar-git ttf-nerd-fonts-symbols
elif [ -x "$(command -v pikaur)" ]; then
- pikaur -S polybar-git ttf-nerd-fonts-symbols
+ pikaur -S polybar-git ttf-nerd-fonts-symbols
elif [ -x "$(command -v pakku)" ]; then
- pakku -S polybar-git ttf-nerd-fonts-symbols
+ pakku -S polybar-git ttf-nerd-fonts-symbols
elif [ -x "$(command -v aura)" ]; then
- aura -SA polybar-git ttf-nerd-fonts-symbols
+ aura -SA polybar-git ttf-nerd-fonts-symbols
elif [ -x "$(command -v pacaur)" ]; then
- pacaur -S polybar-git ttf-nerd-fonts-symbols
+ pacaur -S polybar-git ttf-nerd-fonts-symbols
else
- echo "No common AUR Helpers found!"
- echo "This script requires an AUR Helper to install the following packages: polybar-git ttf-nerd-fonts-symbols"
- echo "Please install an AUR helper and try again"
- exit 1
+ echo "No common AUR Helpers found!"
+ echo "This script requires an AUR Helper to install the following packages: polybar-git ttf-nerd-fonts-symbols"
+ echo "Please install an AUR helper and try again"
+ exit 1
fi
-
-#file didn't exist for me, so test and touch
-if [ -e $HOME/.Xresources ]
-then
- echo "... .Xresources found."
+# File didn't exist for me, so test and touch
+if [ -e "$HOME"/.Xresources ]; then
+ echo "... .Xresources found."
else
- touch $HOME/.Xresources
+ touch "$HOME"/.Xresources
fi
-#file didn't exist for me, so test and touch
-if [ -e $HOME/.config/nitrogen/bg-saved.cfg ]
-then
- echo "... .bg-saved.cfg found."
+# File didn't exist for me, so test and touch
+if [ -e "$HOME"/.config/nitrogen/bg-saved.cfg ]; then
+ echo "... .bg-saved.cfg found."
else
- mkdir -p $HOME/.config/nitrogen
- touch $HOME/.config/nitrogen/bg-saved.cfg
+ mkdir -p "$HOME"/.config/nitrogen
+ touch "$HOME"/.config/nitrogen/bg-saved.cfg
fi
-#file didn't exist for me, so test and touch
-if [ -e $HOME/.config/polybar/config ]
-then
- echo "... polybar/config found."
+# File didn't exist for me, so test and touch
+if [ -e "$HOME"/.config/polybar/config ]; then
+ echo "... polybar/config found."
else
- mkdir -p $HOME/.config/polybar
- touch $HOME/.config/polybar/config
+ mkdir -p "$HOME"/.config/polybar
+ touch "$HOME"/.config/polybar/config
fi
-#file didn't exist for me, so test and touch
-if [ -e $HOME/.config/i3/config ]
-then
- echo "... i3/config found."
+# File didn't exist for me, so test and touch
+if [ -e "$HOME"/.config/i3/config ]; then
+ echo "... i3/config found."
else
- mkdir -p $HOME/.config/i3
- touch $HOME/.config/i3/config
+ mkdir -p "$HOME"/.config/i3
+ touch "$HOME"/.config/i3/config
fi
-#rework of user in config.yaml
-cd src
+# Rework of user in config.yaml
rm -f config.yaml
cp defaults/config.yaml .
sed -i -e "s/USER/$USER/g" config.yaml
-#backup
-mkdir $HOME/Backup
-python i3wm-themer.py --config config.yaml --backup $HOME/Backup
+# Backup
+mkdir "$HOME"/Backup
+python i3wm-themer.py --config config.yaml --backup "$HOME"/Backup
-#configure and set theme to 000
-cp -r ../scripts/* /home/$USER/.config/polybar/
+# Configure and set theme to 000
+cp -r scripts/* /home/"$USER"/.config/polybar/
python i3wm-themer.py --config config.yaml --install defaults/
echo ""
echo "Read the README.md"
-
diff --git a/install_debian.sh b/install_debian.sh
index da87d1eb..95615b3b 100755
--- a/install_debian.sh
+++ b/install_debian.sh
@@ -2,29 +2,30 @@
### 20180515 Script written and fully commented by James Shane ( github.com/jamesshane )
-#look for env command and link if not found to help make scripts uniform
-if [ -e /bin/env ]
-then
- echo "... /bin/env found."
+# Look for env command and link if not found to help make scripts uniform
+if [ -e /bin/env ]; then
+ echo "... /bin/env found."
else
- sudo ln -s /usr/bin/env /bin/env
+ sudo ln -s /usr/bin/env /bin/env
fi
-#ugh
+# ugh
sudo ln -s /sbin/reboot /usr/bin/reboot
sudo ln -s /sbin/poweroff /usr/bin/poweroff
-#refresh apt
+# Refresh apt
sudo apt update
sudo apt-get install libxcb1-dev libxcb-keysyms1-dev libpango1.0-dev libxcb-util0-dev libxcb-icccm4-dev libyajl-dev libstartup-notification0-dev libxcb-randr0-dev libev-dev libxcb-cursor-dev libxcb-xinerama0-dev libxcb-xkb-dev libxkbcommon-dev libxkbcommon-x11-dev autoconf xutils-dev dh-autoreconf unzip git -y
git clone --recursive https://github.com/Airblader/xcb-util-xrm.git
+# shellcheck disable=SC2164
cd xcb-util-xrm/
./autogen.sh
make
sudo make install
+# shellcheck disable=SC2103
cd ..
rm -fr xcb-util-xrm
@@ -35,33 +36,36 @@ sudo ldconfig
sudo ldconfig -p
git clone https://www.github.com/Airblader/i3 i3-gaps
+# shellcheck disable=SC2164
cd i3-gaps
autoreconf --force --install
rm -Rf build/
mkdir build
+# shellcheck disable=SC2164
cd build/
- ../configure --prefix=/usr --sysconfdir=/etc
- make
- sudo make install
+../configure --prefix=/usr --sysconfdir=/etc
+make
+sudo make install
# which i3
# ls -l /usr/bin/i3
cd ../..
rm -fr i3-gaps
-
-#added binutils,gcc,make,pkg-config,fakeroot for compilations, removed yaourt
+# Added binutils,gcc,make,pkg-config,fakeroot for compilations, removed yaourt
sudo apt install git nitrogen rofi python-pip binutils gcc make pkg-config fakeroot cmake python-xcbgen xcb-proto libxcb-ewmh-dev wireless-tools libiw-dev libasound2-dev libpulse-dev libcurl4-openssl-dev libmpdclient-dev pavucontrol -y
-#added PYTHONDONTWRITEBYTECODE to prevent __pycache__
+# Added PYTHONDONTWRITEBYTECODE to prevent __pycache__
export PYTHONDONTWRITEBYTECODE=1
sudo -H pip install -r requirements.txt
[ -d /usr/share/fonts/opentype ] || sudo mkdir /usr/share/fonts/opentype
sudo git clone https://github.com/adobe-fonts/source-code-pro.git /usr/share/fonts/opentype/scp
mkdir fonts
+# shellcheck disable=SC2164
cd fonts
wget https://use.fontawesome.com/releases/v5.0.13/fontawesome-free-5.0.13.zip
unzip fontawesome-free-5.0.13.zip
+# shellcheck disable=SC2164
cd fontawesome-free-5.0.13
sudo cp use-on-desktop/* /usr/share/fonts
sudo fc-cache -f -v
@@ -69,61 +73,58 @@ cd ../..
rm -fr fonts
git clone https://github.com/jaagr/polybar
+# shellcheck disable=SC2164
cd polybar
USE_GCC=ON ENABLE_I3=ON ENABLE_ALSA=ON ENABLE_PULSEAUDIO=ON ENABLE_NETWORK=ON ENABLE_MPD=ON ENABLE_CURL=ON ENABLE_IPC_MSG=ON INSTALL=OFF INSTALL_CONF=OFF ./build.sh -f
+# shellcheck disable=SC2164
cd build
sudo make install
make userconfig
cd ../..
rm -fr polybar
-#file didn't exist for me, so test and touch
-if [ -e $HOME/.Xresources ]
-then
- echo "... .Xresources found."
+# File didn't exist for me, so test and touch
+if [ -e "$HOME"/.Xresources ]; then
+ echo "... .Xresources found."
else
- touch $HOME/.Xresources
+ touch "$HOME"/.Xresources
fi
-#file didn't exist for me, so test and touch
-if [ -e $HOME/.config/nitrogen/bg-saved.cfg ]
-then
- echo "... .bg-saved.cfg found."
+# File didn't exist for me, so test and touch
+if [ -e "$HOME"/.config/nitrogen/bg-saved.cfg ]; then
+ echo "... .bg-saved.cfg found."
else
- mkdir $HOME/.config/nitrogen
- touch $HOME/.config/nitrogen/bg-saved.cfg
+ mkdir "$HOME"/.config/nitrogen
+ touch "$HOME"/.config/nitrogen/bg-saved.cfg
fi
-#file didn't excist for me, so test and touch
-if [ -e $HOME/.config/polybar/config ]
-then
- echo "... polybar/config found."
+# File didn't excist for me, so test and touch
+if [ -e "$HOME"/.config/polybar/config ]; then
+ echo "... polybar/config found."
else
- mkdir $HOME/.config/polybar
- touch $HOME/.config/polybar/config
+ mkdir "$HOME"/.config/polybar
+ touch "$HOME"/.config/polybar/config
fi
-#file didn't excist for me, so test and touch
-if [ -e $HOME/.config/i3/config ]
-then
- echo "... i3/config found."
+# File didn't excist for me, so test and touch
+if [ -e "$HOME"/.config/i3/config ]; then
+ echo "... i3/config found."
else
- mkdir $HOME/.config/i3
- touch $HOME/.config/i3/config
+ mkdir "$HOME"/.config/i3
+ touch "$HOME"/.config/i3/config
fi
-#rework of user in config.yaml
-cd src
+# Rework of user in config.yaml
rm -f config.yaml
cp defaults/config.yaml .
sed -i -e "s/USER/$USER/g" config.yaml
-#backup
-mkdir $HOME/Backup
-python i3wm-themer.py --config config.yaml --backup $HOME/Backup
+# Backup
+mkdir "$HOME"/Backup
+python i3wm-themer.py --config config.yaml --backup "$HOME"/Backup
-#configure and set theme to default
-cp -r ../scripts/* /home/$USER/.config/polybar/
+# Configure and set theme to default
+cp -r scripts/* /home/"$USER"/.config/polybar/
python i3wm-themer.py --config config.yaml --install defaults/
echo ""
diff --git a/install_ubuntu.sh b/install_ubuntu.sh
index c21802d4..dfd3dae1 100755
--- a/install_ubuntu.sh
+++ b/install_ubuntu.sh
@@ -2,24 +2,25 @@
### 20180515 Script written and fully commented by James Shane ( github.com/jamesshane )
-#look for env command and link if not found to help make scripts uniform
-if [ -e /bin/env ]
-then
- echo "... /bin/env found."
+# Look for env command and link if not found to help make scripts uniform
+if [ -e /bin/env ]; then
+ echo "... /bin/env found."
else
- sudo ln -s /usr/bin/env /bin/env
+ sudo ln -s /usr/bin/env /bin/env
fi
-#refresh apt
+# Refresh apt
sudo apt update
sudo apt-get install libxcb1-dev libxcb-keysyms1-dev libpango1.0-dev libxcb-composite0-dev libxcb-util0-dev libxcb-icccm4-dev libyajl-dev libstartup-notification0-dev libxcb-randr0-dev libev-dev libxcb-cursor-dev libxcb-xinerama0-dev libxcb-xkb-dev libxkbcommon-dev libxkbcommon-x11-dev autoconf xutils-dev dh-autoreconf unzip git -y
git clone --recursive https://github.com/Airblader/xcb-util-xrm.git
+# shellcheck disable=SC2164
cd xcb-util-xrm/
./autogen.sh
make
sudo make install
+# shellcheck disable=SC2103
cd ..
rm -fr xcb-util-xrm
@@ -30,33 +31,36 @@ sudo ldconfig
sudo ldconfig -p
git clone https://www.github.com/Airblader/i3 i3-gaps
+# shellcheck disable=SC2164
cd i3-gaps
autoreconf --force --install
rm -Rf build/
mkdir build
+# shellcheck disable=SC2164
cd build/
- ../configure --prefix=/usr --sysconfdir=/etc --disable-sanitizers
- make
- sudo make install
+../configure --prefix=/usr --sysconfdir=/etc --disable-sanitizers
+make
+sudo make install
# which i3
# ls -l /usr/bin/i3
cd ../..
rm -fr i3-gaps
-
-#added binutils,gcc,make,pkg-config,fakeroot for compilations, removed yaourt
+# Added binutils,gcc,make,pkg-config,fakeroot for compilations, removed yaourt
sudo apt install git nitrogen rofi python-pip binutils gcc make pkg-config fakeroot cmake python-xcbgen xcb-proto libxcb-ewmh-dev wireless-tools libiw-dev libasound2-dev libpulse-dev libcurl4-openssl-dev libmpdclient-dev -y
-#added PYTHONDONTWRITEBYTECODE to prevent __pycache__
+# Added PYTHONDONTWRITEBYTECODE to prevent __pycache__
export PYTHONDONTWRITEBYTECODE=1
sudo -H pip install -r requirements.txt
[ -d /usr/share/fonts/opentype ] || sudo mkdir /usr/share/fonts/opentype
sudo git clone https://github.com/adobe-fonts/source-code-pro.git /usr/share/fonts/opentype/scp
mkdir fonts
+# shellcheck disable=SC2164
cd fonts
wget https://use.fontawesome.com/releases/v5.0.13/fontawesome-free-5.0.13.zip
unzip fontawesome-free-5.0.13.zip
+# shellcheck disable=SC2164
cd fontawesome-free-5.0.13
sudo cp use-on-desktop/* /usr/share/fonts
sudo fc-cache -f -v
@@ -64,61 +68,59 @@ cd ../..
rm -fr fonts
git clone https://github.com/jaagr/polybar
+# shellcheck disable=SC2164
cd polybar
+# shellcheck disable=SC2164
USE_GCC=ON ENABLE_I3=ON ENABLE_ALSA=ON ENABLE_PULSEAUDIO=ON ENABLE_NETWORK=ON ENABLE_MPD=ON ENABLE_CURL=ON ENABLE_IPC_MSG=ON INSTALL=OFF INSTALL_CONF=OFF ./build.sh -f
+# shellcheck disable=SC2164
cd build
sudo make install
make userconfig
cd ../..
rm -fr polybar
-#file didn't exist for me, so test and touch
-if [ -e $HOME/.Xresources ]
-then
- echo "... .Xresources found."
+# File didn't exist for me, so test and touch
+if [ -e "$HOME"/.Xresources ]; then
+ echo "... .Xresources found."
else
- touch $HOME/.Xresources
+ touch "$HOME"/.Xresources
fi
-#file didn't exist for me, so test and touch
-if [ -e $HOME/.config/nitrogen/bg-saved.cfg ]
-then
- echo "... .bg-saved.cfg found."
+# File didn't exist for me, so test and touch
+if [ -e "$HOME"/.config/nitrogen/bg-saved.cfg ]; then
+ echo "... .bg-saved.cfg found."
else
- mkdir $HOME/.config/nitrogen
- touch $HOME/.config/nitrogen/bg-saved.cfg
+ mkdir "$HOME"/.config/nitrogen
+ touch "$HOME"/.config/nitrogen/bg-saved.cfg
fi
-#file didn't excist for me, so test and touch
-if [ -e $HOME/.config/polybar/config ]
-then
- echo "... polybar/config found."
+# File didn't excist for me, so test and touch
+if [ -e "$HOME"/.config/polybar/config ]; then
+ echo "... polybar/config found."
else
- mkdir $HOME/.config/polybar
- touch $HOME/.config/polybar/config
+ mkdir "$HOME"/.config/polybar
+ touch "$HOME"/.config/polybar/config
fi
-#file didn't excist for me, so test and touch
-if [ -e $HOME/.config/i3/config ]
-then
- echo "... i3/config found."
+# File didn't excist for me, so test and touch
+if [ -e "$HOME"/.config/i3/config ]; then
+ echo "... i3/config found."
else
- mkdir $HOME/.config/i3
- touch $HOME/.config/i3/config
+ mkdir "$HOME"/.config/i3
+ touch "$HOME"/.config/i3/config
fi
-#rework of user in config.yaml
-cd src
+# Rework of user in config.yaml
rm -f config.yaml
cp defaults/config.yaml .
sed -i -e "s/USER/$USER/g" config.yaml
-#backup
-mkdir $HOME/Backup
-python i3wm-themer.py --config config.yaml --backup $HOME/Backup
+# Backup
+mkdir "$HOME"/Backup
+python i3wm-themer.py --config config.yaml --backup "$HOME"/Backup
-#configure and set theme to default
-cp -r ../scripts/* /home/$USER/.config/polybar/
+# Configure and set theme to default
+cp -r scripts/* /home/"$USER"/.config/polybar/
python i3wm-themer.py --config config.yaml --install defaults/
echo ""
diff --git a/runcoverage.sh b/runcoverage.sh
new file mode 100755
index 00000000..64b7a486
--- /dev/null
+++ b/runcoverage.sh
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+coverage run -m pytest
+coverage xml --include="i3wmthemer/*"
+python-codacy-coverage -r coverage.xml
+rm -rf 000.png
+rm -rf coverage.xml
diff --git a/src/README.md b/src/README.md
deleted file mode 100644
index 47f0e609..00000000
--- a/src/README.md
+++ /dev/null
@@ -1,8 +0,0 @@
-TODO:
-
-- Code cleanup
-- Add theme import/export from dotfiles
-- Theme options for more CLI tools (terminal emulators and apps)
-- More WMs (?)
-- Bug fixes
-
diff --git a/src/backup.py b/src/backup.py
deleted file mode 100644
index 4a276f0f..00000000
--- a/src/backup.py
+++ /dev/null
@@ -1,50 +0,0 @@
-import os.path
-from shutil import copyfile
-
-import fileutils as fileu
-import msgfunc as prnt
-
-def backup_file( config, back_file, destination):
- if(fileu.locate_file(config[back_file])):
- prnt.prnt( '-s', 'Located your '+config[back_file]+' file!')
- try:
- copyfile( config[back_file], destination)
- prnt.prnt( '-s', 'Backed it up successfully!')
- return True
- except:
- prnt.prnt( '-f', 'Failed to back it up!')
- return False
- else:
- prnt.prnt( '-f', 'Could not locate '+config[back_file]+' file!')
- return False
-
-def backup_config( backup_folder, configuration):
- prnt.prnt( '-n', 'Backing up your files.')
-
- if( fileu.locate_folder(backup_folder) ):
- prnt.prnt( '-s', 'Located the backup folder.')
-
- # Backup i3 file
- if 'i3-config' in configuration:
- if( backup_file( configuration, 'i3-config', backup_folder+'/i3.config')):
- prnt.prnt( '-s', 'Success!')
- else:
- prnt.prnt( '-f', 'Failed!')
-
- # Backup Polybr config
- if 'polybar-config' in configuration:
- if( backup_file( configuration, 'polybar-config', backup_folder+'/polybar.config')):
- prnt.prnt( '-s', 'Success!')
- else:
- prnt.prnt( '-f', 'Failed!')
-
- # Backup xresources
- if 'xresources' in configuration:
- if( backup_file( configuration, 'xresources', backup_folder+'/xresources')):
- prnt.prnt( '-s', 'Success!')
- else:
- prnt.prnt( '-f', 'Failed!')
-
- else:
- prnt.prnt( '-f', 'Failed to locate the backup folder.')
- exit(9)
diff --git a/src/command.py b/src/command.py
deleted file mode 100644
index 0de67704..00000000
--- a/src/command.py
+++ /dev/null
@@ -1,11 +0,0 @@
-from subprocess import call
-
-import msgfunc as prnt
-
-def refresh_all( xresources, wallpaper):
- prnt.prnt( '-n', 'Refreshing i3 and xrdb and setting wallpaper')
- if wallpaper != '':
- call( ['nitrogen', '--set-zoom-fill', 'wallpapers/'+wallpaper])
- call( ['xrdb', xresources])
- call( ['i3-msg', 'restart'])
- prnt.prnt( '-s', 'Done!')
diff --git a/src/config.py b/src/config.py
deleted file mode 100644
index a4d69a2d..00000000
--- a/src/config.py
+++ /dev/null
@@ -1,22 +0,0 @@
-import yaml
-
-import fileutils as fileu
-import msgfunc as prnt
-
-def read_config( path ):
- configuration = {}
-
- if( fileu.locate_file( path ) ):
- prnt.prnt( '-n', 'Located the config file')
- config_path = open( path, 'r')
- config = yaml.load_all(config_path)
-
- for conf in config:
- for n, v in conf.items( ):
- configuration[n] = v
-
- else:
- prnt.prnt( '-f', 'Failed to locate the config file')
- exit(9)
-
- return configuration
diff --git a/src/config.yaml b/src/config.yaml
deleted file mode 100644
index e1d2ce5c..00000000
--- a/src/config.yaml
+++ /dev/null
@@ -1,5 +0,0 @@
-i3-config: /home/v/.config/i3/config
-polybar-config: /home/v/.config/polybar/config
-xresources: /home/v/.Xresources
-nitrogen-config: /home/v/.config/nitrogen/bg-saved.cfg
-wallpaper-path: /home/v/.config/nitrogen/
diff --git a/src/fileutils.py b/src/fileutils.py
deleted file mode 100644
index 6e39063f..00000000
--- a/src/fileutils.py
+++ /dev/null
@@ -1,7 +0,0 @@
-import os.path
-
-def locate_folder( path ):
- return os.path.isdir( path )
-
-def locate_file( path ):
- return os.path.isfile( path )
diff --git a/src/i3wm-themer.py b/src/i3wm-themer.py
deleted file mode 100644
index 1e557c8b..00000000
--- a/src/i3wm-themer.py
+++ /dev/null
@@ -1,56 +0,0 @@
-#!/bin/env python3
-
-# Author : Stavros Grigoriou
-
-import os
-import argparse
-import dis
-import yaml
-import os.path
-from pprint import pprint
-
-import msgfunc as prnt
-import fileutils as fileu
-import config as conf
-import backup
-import install
-import load_json as lj
-import replace_xresources as rx
-import replace_i3 as ri
-import replace_polybar as rp
-import replace_wallpaper as rw
-import command as com
-
-if __name__=="__main__":
-
- parser = argparse.ArgumentParser(description='i3wm-themer by Stavros Grigoriou')
- parser.add_argument('-c','--config', type=str, required=True, help='Load config file')
- parser.add_argument('-b','--backup', type=str, help='Backup files')
- parser.add_argument('-i','--install', type=str, help='Install i3wmthemer\'s default configuration files')
- parser.add_argument('-l','--load', type=str, help='Load theme from JSON file')
- args = parser.parse_args()
-
- configuration = {}
-
- if args.config != None :
- configuration = conf.read_config( args.config)
- else:
- exit(0)
-
- if args.backup != None :
- backup.backup_config( args.backup, configuration)
- exit(0)
-
- if args.install != None :
- install.install_defaults( args.install, configuration)
- com.refresh_all( configuration['xresources'], '')
- exit(0)
-
- if args.load != None:
- jfile = lj.load_json( args.load)
- rx.replace_xresources( configuration, jfile)
- ri.replace_i3( configuration, jfile)
- rp.replace_polybar( configuration, jfile)
- rw.replace_wallpaper( configuration, jfile)
- com.refresh_all( configuration['xresources'], jfile['wallpaper'])
- exit(0)
diff --git a/src/install.py b/src/install.py
deleted file mode 100644
index 606677ec..00000000
--- a/src/install.py
+++ /dev/null
@@ -1,56 +0,0 @@
-import os.path
-from shutil import copyfile
-
-import fileutils as fileu
-import msgfunc as prnt
-
-def install_file( config, install_file, new_file):
- if(fileu.locate_file(config[install_file])):
- prnt.prnt( '-s', 'Located '+config[install_file]+' file!')
- try:
- copyfile(new_file, config[install_file])
- prnt.prnt( '-s', 'Installed the new file successfully!')
- return True
- except:
- prnt.prnt( '-f', 'Failed to install the new file!')
- return False
- else:
- prnt.prnt( '-f', 'Could not locate '+config[install_file]+' file!')
- return False
-
-def install_defaults( temp_folder, configuration ):
- prnt.prnt( '-n', 'Intalling the files from '+temp_folder+' file.')
-
- if(fileu.locate_folder(temp_folder)):
- prnt.prnt( '-n', 'Located the folder.')
-
- # Install default i3 file
- if 'i3-config' in configuration:
- if( install_file( configuration, 'i3-config', temp_folder+'i3.template')):
- prnt.prnt( '-s', 'Success!')
- else:
- prnt.prnt( '-f', 'Failed!')
-
- # Install default polybar file
- if 'polybar-config' in configuration:
- if( install_file( configuration, 'polybar-config', temp_folder+'polybar.template')):
- prnt.prnt( '-s', 'Success!')
- else:
- prnt.prnt( '-f', 'Failed!')
-
- # Install default Xresources file
- if 'xresources' in configuration:
- if( install_file( configuration, 'xresources', temp_folder+'xresources.template')):
- prnt.prnt( '-s', 'Success!')
- else:
- prnt.prnt( '-f', 'Failed!')
-
- # Install default nitrogen file
- if 'nitrogen-config' in configuration:
- if( install_file( configuration, 'nitrogen-config', temp_folder+'bg-saved.template')):
- prnt.prnt( '-s', 'Success!')
- else:
- prnt.prnt( '-f', 'Failed!')
- else:
- prnt.prnt( '-f', 'Failed to locate the folder.')
- exit(9)
diff --git a/src/load_json.py b/src/load_json.py
deleted file mode 100644
index 72bfb359..00000000
--- a/src/load_json.py
+++ /dev/null
@@ -1,16 +0,0 @@
-import json
-
-import fileutils as fileu
-import msgfunc as prnt
-
-def load_json( path ):
- file = ''
- if( fileu.locate_file(path) ):
- prnt.prnt( '-s', 'Located the json file')
- with open( path ) as json_data:
- file = json.load(json_data)
- else:
- prnt.prnt( '-f', 'Failed to locate the json file')
- exit( 9 )
-
- return file
diff --git a/src/msgfunc.py b/src/msgfunc.py
deleted file mode 100644
index df2b2e10..00000000
--- a/src/msgfunc.py
+++ /dev/null
@@ -1,31 +0,0 @@
-def prnt( arg, msg ):
- prefix_blue = '\x1b[0;34;40m [>] '
- prefix_success = '\x1b[0;32;40m [>] \x1b[0m'
- prefix_fail = '\x1b[0;31;40m [x] \x1b[0m'
- prefix_fatal = '\x1b[0;31;40m [!] '
- prefix_normal = '\x1b[0m'
-
- class bcolors:
- HEADER = '\033[95m'
- OKBLUE = '\033[94m'
- OKGREEN = '\033[92m'
- WARNING = '\033[93m'
- FAIL = '\033[91m'
- ENDC = '\033[0m'
- BOLD = '\033[1m'
- UNDERLINE = '\033[4m'
-
- #print ("arg=",arg," msg=",msg)
- if arg == '-s':
- print (bcolors.OKGREEN + "[>] " + bcolors.ENDC + msg)
- #print( prefix_success, msg)
- elif arg == '-f':
- print (bcolors.FAIL + "[x] " + bcolors.ENDC + msg)
- #print( prefix_fail, msg)
- elif arg == '-n':
- print (bcolors.OKBLUE + "[>] " + bcolors.ENDC + msg)
- #print( prefix_blue, msg, prefix_normal)
- else:
- print (bcolors.WARNING + "[!] " + bcolors.ENDC + msg)
- #print( prefix_fatal, 'Wrong argument given in prnt() function!', prefix_normal)
- exit(9)
diff --git a/src/replace_i3.py b/src/replace_i3.py
deleted file mode 100644
index fe60146b..00000000
--- a/src/replace_i3.py
+++ /dev/null
@@ -1,22 +0,0 @@
-import json
-
-import replace_line as rl
-import msgfunc as prnt
-import fileutils as fileu
-
-def replace_i3( configuration, json_file):
- prnt.prnt( '-n', 'Replacing the colors in your i3 configuration file')
-
- if( fileu.locate_file(configuration['i3-config'])):
- prnt.prnt( '-s', 'Located your i3 configuration file')
- if 'i3wm' in json_file:
- i3wm = json_file['i3wm']
- prnt.prnt( '-s', 'Found the i3wm info in the JSON file')
- rl.replace_line( configuration['i3-config'], 'client.background', 'client.background '+i3wm['client.background'])
- rl.replace_line( configuration['i3-config'], 'client.focused ', 'client.focused '+i3wm['client.focused'])
- rl.replace_line( configuration['i3-config'], 'client.unfocused', 'client.unfocused '+i3wm['client.unfocused'])
- rl.replace_line( configuration['i3-config'], 'client.focused_inactive', 'client.focused_inactive '+i3wm['client.focused_inactive'])
- rl.replace_line( configuration['i3-config'], 'client.urgent', 'client.urgent '+i3wm['client.urgent'])
- rl.replace_line( configuration['i3-config'], 'client.placeholder', 'client.placeholder '+i3wm['client.placeholder'])
- else:
- prnt.prnt( '-f', 'Failed to locate your i3 configuration file')
diff --git a/src/replace_line.py b/src/replace_line.py
deleted file mode 100644
index 60006d3d..00000000
--- a/src/replace_line.py
+++ /dev/null
@@ -1,32 +0,0 @@
-from tempfile import mkstemp
-from shutil import move
-from os import fdopen, remove
-
-import msgfunc as prnt
-
-def replace_line(file, pattern, new_line):
- fh, abs_path = mkstemp()
- with fdopen(fh, 'w') as new_file:
- with open( file ) as old_file:
- for line in old_file:
- if line.startswith( pattern ):
- pl1 = line
- pl1 = pl1.rstrip()
- pl2 = new_line
- pl2 = pl2.rstrip()
- prnt.prnt( '-n', 'Replacing line: \''+pl1+'\' with \''+pl2+'\'')
- #print (new_file.write( new_line+'\n' )=="None")
- try:
- new_file.write( new_line+'\n' )
- prnt.prnt( '-s', 'Success!')
- except:
- prnt.prnt( '-f', 'Failed!')
- else:
- try:
- new_file.write( line )
- #prnt.prnt( '-s', 'Success!')
- except:
- prnt.prnt( '-f', 'Failed!')
- #new_file.write( new_line if pattern in line else line)
- remove(file)
- move(abs_path, file)
diff --git a/src/replace_polybar.py b/src/replace_polybar.py
deleted file mode 100644
index 9c17085e..00000000
--- a/src/replace_polybar.py
+++ /dev/null
@@ -1,41 +0,0 @@
-import json
-
-import replace_line as rl
-import msgfunc as prnt
-import fileutils as fileu
-
-def replace_polybar( configuration, json_file):
- prnt.prnt( '-n', 'Replacing your Polybar configuration file')
-
- if( fileu.locate_file( configuration['polybar-config'])):
- prnt.prnt( '-s', 'Located your polybar configuration file')
- if 'polybar' in json_file:
- polybar = json_file['polybar']
- prnt.prnt( '-s', 'Found you polybar info in the JSON file')
-
- rl.replace_line( configuration['polybar-config'], 'background =', 'background = '+polybar['background'])
- rl.replace_line( configuration['polybar-config'], 'foreground =', 'foreground = '+polybar['foreground'])
- rl.replace_line( configuration['polybar-config'], 'modules-left', 'modules-left = '+polybar['modules-left'])
- rl.replace_line( configuration['polybar-config'], 'modules-center', 'modules-center = '+polybar['modules-center'])
- rl.replace_line( configuration['polybar-config'], 'modules-right', 'modules-right = '+ polybar['modules-right'])
- rl.replace_line( configuration['polybar-config'], 'label-unfocused-background', 'label-unfocused-background = '+polybar['label-unfocused-background'])
- rl.replace_line( configuration['polybar-config'], 'label-unfocused-foreground', 'label-unfocused-foreground = '+polybar['label-unfocused-foreground'])
- rl.replace_line( configuration['polybar-config'], 'label-focused-background', 'label-focused-background = '+polybar['label-focused-background'])
- rl.replace_line( configuration['polybar-config'], 'label-focused-foreground', 'label-focused-foreground = '+polybar['label-focused-foreground'])
- rl.replace_line( configuration['polybar-config'], 'label-visible-background', 'label-visible-background = '+polybar['label-visible-background'])
- rl.replace_line( configuration['polybar-config'], 'label-visible-foreground', 'label-visible-foreground = '+polybar['label-visible-foreground'])
- rl.replace_line( configuration['polybar-config'], 'label-mode-background', 'label-mode-background = '+polybar['label-mode-background'])
- rl.replace_line( configuration['polybar-config'], 'label-mode-foreground', 'label-mode-foreground = '+polybar['label-mode-foreground'])
- rl.replace_line( configuration['polybar-config'], 'format-foreground', 'format-foreground = '+polybar['format-foreground'])
- rl.replace_line( configuration['polybar-config'], 'format-background', 'format-background = '+polybar['format-background'])
- rl.replace_line( configuration['polybar-config'], 'label-open-foreground', 'label-open-foreground = '+polybar['label-open-foreground'])
- rl.replace_line( configuration['polybar-config'], 'label-close-foreground', 'label-close-foreground = '+polybar['label-close-foreground'])
- rl.replace_line( configuration['polybar-config'], 'label-separator-foreground', 'label-separator-foreground = '+polybar['label-separator-foreground'])
- rl.replace_line( configuration['polybar-config'], 'format-connected-foreground', 'format-connected-foreground = '+polybar['format-connected-foreground'])
- rl.replace_line( configuration['polybar-config'], 'format-connected-background', 'format-connected-background = '+polybar['format-connected-background'])
- rl.replace_line( configuration['polybar-config'], 'format-connected-prefix-foreground', 'format-connected-prefix-foreground = '+polybar['format-connected-prefix-foreground'])
- rl.replace_line( configuration['polybar-config'], 'ramp-signal-foreground', 'ramp-signal-foreground = '+polybar['ramp-signal-foreground'])
- else:
- prnt.prnt( '-f', 'Failed to locate polybar info in the JSON file')
- else:
- prnt.prnt( '-f', 'Failed to locate your polybar configuration file')
diff --git a/src/replace_wallpaper.py b/src/replace_wallpaper.py
deleted file mode 100644
index 62de4c0a..00000000
--- a/src/replace_wallpaper.py
+++ /dev/null
@@ -1,29 +0,0 @@
-import json
-
-import os.path
-from shutil import copyfile
-
-import replace_line as rl
-import msgfunc as prnt
-import fileutils as fileu
-
-def replace_wallpaper( configuration, json_file):
- prnt.prnt( '-n', 'Replacing wallpaper')
-
- if( fileu.locate_file(configuration['nitrogen-config'])):
- prnt.prnt( '-s', 'Located your nitrogen configuration file')
- if 'wallpaper' in json_file:
- wallpaper = json_file['wallpaper']
- prnt.prnt( '-s', 'Found the wallpaper info in the JSON file')
-
- rl.replace_line( configuration['nitrogen-config'], 'file', 'file= '+configuration['wallpaper-path']+wallpaper)
- new_file='wallpapers/'+wallpaper
- try:
- copyfile(new_file, configuration['wallpaper-path']+wallpaper)
- prnt.prnt( '-s', 'Installed the new file successfully!')
- return True
- except:
- prnt.prnt( '-f', 'Failed to install the new file!')
- return False
- else:
- prnt.prnt( '-f', 'Failed to locate your nitrogen configuration file')
diff --git a/src/replace_xresources.py b/src/replace_xresources.py
deleted file mode 100644
index ec8f61d9..00000000
--- a/src/replace_xresources.py
+++ /dev/null
@@ -1,28 +0,0 @@
-import json
-
-import replace_line as rl
-import msgfunc as prnt
-import fileutils as fileu
-
-def replace_xresources( configuration, json_file):
- prnt.prnt( '-n', 'Replacing the colors in .Xresources')
-
- if( fileu.locate_file(configuration['xresources'])):
- prnt.prnt( '-s', 'Located your .Xresources file')
- if 'xresources' in json_file:
- xresources = json_file['xresources']
- prnt.prnt( '-s', 'Found the Xresources info in the JSON file')
- rl.replace_line( configuration['xresources'], '*background:', '*background: '+xresources['background'])
- rl.replace_line( configuration['xresources'], '*foreground:', '*foreground: '+xresources['foreground'])
- rl.replace_line( configuration['xresources'], '*cursorColor:', '*cursorColor: '+xresources['cursorcolor'])
- for i in range(15):
- rl.replace_line( configuration['xresources'], '*color'+str(i)+':', '*color'+str(i)+': '+xresources['color'+str(i)])
- rl.replace_line( configuration['xresources'], 'rofi.color-window:', 'rofi.color-window: '+xresources['rofi.color-window'])
- rl.replace_line( configuration['xresources'], 'rofi.color-normal:', 'rofi.color-normal: '+xresources['rofi.color-normal'])
- rl.replace_line( configuration['xresources'], 'rofi.color-active:', 'rofi.color-active: '+xresources['rofi.color-active'])
- rl.replace_line( configuration['xresources'], 'rofi.color-urgent:', 'rofi.color-urgent: '+xresources['rofi.color-urgent'])
-
- else:
- prnt.prnt( '-f', 'Failed to locate the Xresources info in the JSON file')
- else:
- prnt.prnt( '-f', 'Failed to locate your .Xresources file')
diff --git a/src/themes/000.json b/src/themes/000.json
deleted file mode 100644
index 8b88f0c0..00000000
--- a/src/themes/000.json
+++ /dev/null
@@ -1,60 +0,0 @@
-{
- "xresources": {
- "background": "#1d1f21",
- "foreground": "#c5c8c6",
- "cursorcolor": "#c5c8c6",
- "color0": "#282a2e",
- "color1": "#a54242",
- "color2": "#8c9440",
- "color3": "#de935f",
- "color4": "#5f819d",
- "color5": "#85678f",
- "color6": "#5e8d87",
- "color7": "#707880",
- "color8": "#373b41",
- "color9": "#cc6666",
- "color10": "#b5bd68",
- "color11": "#f0c674",
- "color12": "#81a2be",
- "color13": "#b294bb",
- "color14": "#8abeb7",
- "color15": "#c5c8c6",
- "rofi.color-window": "#282a2e, #b5bd68, #b5bd68",
- "rofi.color-normal": "#282a2e, #c5c8c6, #8c9440, #c5c8c6, #78824B",
- "rofi.color-active": "#282a2e, #c5c8c6, #8c9440, #c5c8c6, #78824B",
- "rofi.color-urgent": "#282a2e, #c5c8c6, #8c9440, #c5c8c6, #78824B"
- },
- "i3wm": {
- "client.background": "#1d1f21",
- "client.focused": "#c5c8c6 #1d1f21 #c5c8c6 #81a2be #81a2be",
- "client.unfocused": "#c5c8c6 #1d1f21 #c5c8c6 #5f819d #5f819d",
- "client.focused_inactive": "#c5c8c6 #1d1f21 #c5c8c6 #5f819d #5f819d",
- "client.urgent": "#c5c8c6 #1d1f21 #c5c8c6 #5f819d #5f819d",
- "client.placeholder": "#c5c8c6 #1d1f21 #c5c8c6 #5f819d #5f819d"
- },
- "polybar": {
- "background": "#1d1f21",
- "foreground": "#c5c8c6",
- "modules-left": "wlan eth",
- "modules-center": "i3",
- "modules-right": "date powermenu",
- "label-unfocused-background": "#81a2be",
- "label-unfocused-foreground": "#1d1f21",
- "label-mode-background": "#1d1f21",
- "label-mode-foreground": "#282a2e",
- "label-focused-foreground": "#1d1f21",
- "label-focused-background": "#5f819d",
- "label-visible-background": "#81a2be",
- "label-visible-foreground": "#1d1f21",
- "format-foreground": "#1d1f21",
- "format-background": "#81a2be",
- "label-open-foreground": "#81a2be",
- "label-close-foreground": "#81a2be",
- "label-separator-foreground": "#81a2be",
- "format-connected-foreground": "#1d1f21",
- "format-connected-background": "#81a2be",
- "format-connected-prefix-foreground": "#1d1f21",
- "ramp-signal-foreground": "#1d1f21"
- },
- "wallpaper": "000.png"
-}
diff --git a/src/themes/001.json b/src/themes/001.json
deleted file mode 100644
index e3030954..00000000
--- a/src/themes/001.json
+++ /dev/null
@@ -1,60 +0,0 @@
-{
- "xresources": {
- "background": "#1E272B",
- "foreground": "#EAD49B",
- "cursorcolor": "#EAD49B",
- "color0": "#1E272B",
- "color1": "#685742",
- "color2": "#9D6A47",
- "color3": "#B36D43",
- "color4": "#78824B",
- "color5": "#D99F57",
- "color6": "#C9A554",
- "color7": "#EAD49B",
- "color8": "#666666",
- "color9": "#685743",
- "color10": "#9D6A47",
- "color11": "#B36D43",
- "color12": "#78824B",
- "color13": "#D99F57",
- "color14": "#C9A554",
- "color15": "#EAD49B",
- "rofi.color-window": "#1E272B, #9D6A47, #9D6A47",
- "rofi.color-normal": "#1E272B, #EAD49B, #1E272B, #1E272B, #78824B",
- "rofi.color-active": "#1E272B, #EAD49B, #1E272B, #1E272B, #78824B",
- "rofi.color-urgent": "#1E272B, #EAD49B, #1E272B, #1E272B, #78824B"
- },
- "i3wm": {
- "client.background": "#1E272B",
- "client.focused": "#EAD49B #1E272B #EAD49B #9D6A47 #9D6A47",
- "client.unfocused": "#EAD49B #1E272B #EAD49B #78824B #78824B",
- "client.focused_inactive": "#EAD49B #1E272B #EAD49B #78824B #78824B",
- "client.urgent": "#EAD49B #1E272B #EAD49B #78824B #78824B",
- "client.placeholder": "#EAD49B #1E272B #EAD49B #78824B #78824B"
- },
- "polybar": {
- "background": "#1E272B",
- "foreground": "#EAD49B",
- "modules-left": "i3",
- "modules-center": "date",
- "modules-right": "wlan eth powermenu",
- "label-unfocused-background": "#78824b",
- "label-unfocused-foreground": "#1E272B",
- "label-mode-background": "#78824b",
- "label-mode-foreground": "#1E272B",
- "label-focused-foreground": "#6b7443",
- "label-focused-background": "#78824b",
- "label-visible-background": "#78824b",
- "label-visible-foreground": "#1E272B",
- "format-foreground": "#1E272B",
- "format-background": "#d99f57",
- "label-open-foreground": "#9d6a47",
- "label-close-foreground": "#9d6a47",
- "label-separator-foreground": "#9d6a47",
- "format-connected-foreground": "#1E272B",
- "format-connected-background": "#9d6a47",
- "format-connected-prefix-foreground": "#1E272B",
- "ramp-signal-foreground": "#1E272B"
- },
- "wallpaper": "001.png"
-}
diff --git a/src/themes/002.json b/src/themes/002.json
deleted file mode 100644
index 8584eeef..00000000
--- a/src/themes/002.json
+++ /dev/null
@@ -1,60 +0,0 @@
-{
- "xresources": {
- "background": "#162025",
- "foreground": "#bfbfbf",
- "cursorcolor": "#bfbfbf",
- "color0": "#162025",
- "color1": "#393843",
- "color2": "#39402e",
- "color3": "#39402e",
- "color4": "#75404b",
- "color5": "#4c584a",
- "color6": "#662b37",
- "color7": "#bfbfbf",
- "color8": "#5d6160",
- "color9": "#662b37",
- "color10": "#39402e",
- "color11": "#39402e",
- "color12": "#75404b",
- "color13": "#4c584a",
- "color14": "#4c584a",
- "color15": "#bfbfbf",
- "rofi.color-window": "#162025, #39402e, #39402e",
- "rofi.color-normal": "#162025, #bfbfbf, #162025, #162025, #75404b",
- "rofi.color-active": "#162025, #bfbfbf, #162025, #162025, #75404b",
- "rofi.color-urgent": "#162025, #bfbfbf, #162025, #162025, #75404b"
- },
- "i3wm": {
- "client.background": "#162025",
- "client.focused": "#bfbfbf #162025 #bfbfbf #39402e #39402e",
- "client.unfocused": "#bfbfbf #162025 #bfbfbf #75404b #75404b",
- "client.focused_inactive": "#bfbfbf #162025 #bfbfbf #75404b #75404b",
- "client.urgent": "#bfbfbf #162025 #bfbfbf #75404b #75404b",
- "client.placeholder": "#bfbfbf #162025 #bfbfbf #75404b #75404b"
- },
- "polybar": {
- "background": "#162025",
- "foreground": "#bfbfbf",
- "modules-left": "i3",
- "modules-center": "date",
- "modules-right": "wlan eth powermenu",
- "label-unfocused-background": "#75404b",
- "label-unfocused-foreground": "#162025",
- "label-mode-background": "#75404b",
- "label-mode-foreground": "#162025",
- "label-focused-foreground": "#6b7443",
- "label-focused-background": "#75404b",
- "label-visible-background": "#75404b",
- "label-visible-foreground": "#162025",
- "format-foreground": "#162025",
- "format-background": "#4c584a",
- "label-open-foreground": "#39402e",
- "label-close-foreground": "#39402e",
- "label-separator-foreground": "#39402e",
- "format-connected-foreground": "#162025",
- "format-connected-background": "#39402e",
- "format-connected-prefix-foreground": "#162025",
- "ramp-signal-foreground": "#162025"
- },
- "wallpaper": "002.png"
-}
diff --git a/src/themes/003.json b/src/themes/003.json
deleted file mode 100644
index f355a92c..00000000
--- a/src/themes/003.json
+++ /dev/null
@@ -1,60 +0,0 @@
-{
- "xresources": {
- "background": "#162025",
- "foreground": "#bfbfbf",
- "cursorcolor": "#bfbfbf",
- "color0": "#162025",
- "color1": "#393843",
- "color2": "#193a48",
- "color3": "#235964",
- "color4": "#193a48",
- "color5": "#2a474a",
- "color6": "#662b37",
- "color7": "#bfbfbf",
- "color8": "#365a5c",
- "color9": "#662b37",
- "color10": "#193a48",
- "color11": "#193a48",
- "color12": "#75404b",
- "color13": "#662b37",
- "color14": "#083842",
- "color15": "#bfbfbf",
- "rofi.color-window": "#162025, #193a48, #193a48",
- "rofi.color-normal": "#162025, #bfbfbf, #162025, #162025, #193a48",
- "rofi.color-active": "#162025, #bfbfbf, #162025, #162025, #193a48",
- "rofi.color-urgent": "#162025, #bfbfbf, #162025, #162025, #193a48"
- },
- "i3wm": {
- "client.background": "#162025",
- "client.focused": "#bfbfbf #162025 #bfbfbf #193a48 #193a48",
- "client.unfocused": "#bfbfbf #162025 #bfbfbf #193a48 #193a48",
- "client.focused_inactive": "#bfbfbf #162025 #bfbfbf #193a48 #193a48",
- "client.urgent": "#bfbfbf #162025 #bfbfbf #193a48 #193a48",
- "client.placeholder": "#bfbfbf #162025 #bfbfbf #193a48 #193a48"
- },
- "polybar": {
- "background": "#162025",
- "foreground": "#bfbfbf",
- "modules-left": "i3",
- "modules-center": "date",
- "modules-right": "wlan eth powermenu",
- "label-unfocused-background": "#193a48",
- "label-unfocused-foreground": "#162025",
- "label-mode-background": "#193a48",
- "label-mode-foreground": "#162025",
- "label-focused-foreground": "#6b7443",
- "label-focused-background": "#193a48",
- "label-visible-background": "#193a48",
- "label-visible-foreground": "#162025",
- "format-foreground": "#162025",
- "format-background": "#2a474a",
- "label-open-foreground": "#193a48",
- "label-close-foreground": "#193a48",
- "label-separator-foreground": "#193a48",
- "format-connected-foreground": "#162025",
- "format-connected-background": "#193a48",
- "format-connected-prefix-foreground": "#162025",
- "ramp-signal-foreground": "#162025"
- },
- "wallpaper": "003.png"
-}
diff --git a/src/themes/004.json b/src/themes/004.json
deleted file mode 100644
index 42675ec6..00000000
--- a/src/themes/004.json
+++ /dev/null
@@ -1,60 +0,0 @@
-{
- "xresources": {
- "background": "#1d1e26",
- "foreground": "#b0b287",
- "cursorcolor": "#b0b287",
- "color0": "#1d1e26",
- "color1": "#5a6c56",
- "color2": "#8c9440",
- "color3": "#73908b",
- "color4": "#789073",
- "color5": "#85678f",
- "color6": "#5e8d87",
- "color7": "#9297bf",
- "color8": "#373b41",
- "color9": "#907378",
- "color10": "#b5bd68",
- "color11": "#f0c674",
- "color12": "#789073",
- "color13": "#b294bb",
- "color14": "#8abeb7",
- "color15": "#b0b287",
- "rofi.color-window": "#1d1e26, #b5bd68, #b5bd68",
- "rofi.color-normal": "#1d1e26, #b0b287, #8c9440, #b0b287, #78824B",
- "rofi.color-active": "#1d1e26, #b0b287, #8c9440, #b0b287, #78824B",
- "rofi.color-urgent": "#1d1e26, #b0b287, #8c9440, #b0b287, #78824B"
- },
- "i3wm": {
- "client.background": "#1d1e26",
- "client.focused": "#b0b287 #1d1e26 #b0b287 #789073 #789073",
- "client.unfocused": "#b0b287 #1d1e26 #b0b287 #789073 #789073",
- "client.focused_inactive": "#b0b287 #1d1e26 #b0b287 #789073 #789073",
- "client.urgent": "#b0b287 #1d1e26 #b0b287 #789073 #789073",
- "client.placeholder": "#b0b287 #1d1e26 #b0b287 #789073 #789073"
- },
- "polybar": {
- "background": "#1d1e26",
- "foreground": "#b0b287",
- "modules-left": "wlan eth",
- "modules-center": "i3",
- "modules-right": "date powermenu",
- "label-unfocused-background": "#789073",
- "label-unfocused-foreground": "#1d1e26",
- "label-mode-background": "#1d1e26",
- "label-mode-foreground": "#1d1e26",
- "label-focused-foreground": "#ffffff",
- "label-focused-background": "#789073",
- "label-visible-background": "#789073",
- "label-visible-foreground": "#1d1e26",
- "format-foreground": "#1d1e26",
- "format-background": "#789073",
- "label-open-foreground": "#789073",
- "label-close-foreground": "#789073",
- "label-separator-foreground": "#789073",
- "format-connected-foreground": "#1d1e26",
- "format-connected-background": "#789073",
- "format-connected-prefix-foreground": "#1d1e26",
- "ramp-signal-foreground": "#1d1e26"
- },
- "wallpaper": "004.png"
-}
diff --git a/src/themes/005.json b/src/themes/005.json
deleted file mode 100644
index 944fce9f..00000000
--- a/src/themes/005.json
+++ /dev/null
@@ -1,60 +0,0 @@
-{
- "xresources": {
- "background": "#2f2f38",
- "foreground": "#b0c4bb",
- "cursorcolor": "#b0c4bb",
- "color0": "#34343e",
- "color1": "#9aafaa",
- "color2": "#759496",
- "color3": "#93b3b0",
- "color4": "#688486",
- "color5": "#668ca1",
- "color6": "#759496",
- "color7": "#b0c4bb",
- "color8": "#b0c4bb",
- "color9": "#9aafaa",
- "color10": "#759496",
- "color11": "#93b3b0",
- "color12": "#81a2be",
- "color13": "#668ca1",
- "color14": "#759496",
- "color15": "#b0c4bb",
- "rofi.color-window": "#34343e, #759496, #759496",
- "rofi.color-normal": "#34343e, #b0c4bb, #759496, #b0c4bb, #78824B",
- "rofi.color-active": "#34343e, #b0c4bb, #759496, #b0c4bb, #78824B",
- "rofi.color-urgent": "#34343e, #b0c4bb, #759496, #b0c4bb, #78824B"
- },
- "i3wm": {
- "client.background": "#2f2f38",
- "client.focused": "#b0c4bb #2f2f38 #b0c4bb #81a2be #81a2be",
- "client.unfocused": "#b0c4bb #2f2f38 #b0c4bb #688486 #688486",
- "client.focused_inactive": "#b0c4bb #2f2f38 #b0c4bb #688486 #688486",
- "client.urgent": "#b0c4bb #2f2f38 #b0c4bb #688486 #688486",
- "client.placeholder": "#b0c4bb #2f2f38 #b0c4bb #688486 #688486"
- },
- "polybar": {
- "background": "#2f2f38",
- "foreground": "#b0c4bb",
- "modules-left": "wlan eth",
- "modules-center": "i3",
- "modules-right": "date powermenu",
- "label-unfocused-background": "#81a2be",
- "label-unfocused-foreground": "#2f2f38",
- "label-mode-background": "#2f2f38",
- "label-mode-foreground": "#34343e",
- "label-focused-foreground": "#2f2f38",
- "label-focused-background": "#688486",
- "label-visible-background": "#81a2be",
- "label-visible-foreground": "#2f2f38",
- "format-foreground": "#2f2f38",
- "format-background": "#81a2be",
- "label-open-foreground": "#81a2be",
- "label-close-foreground": "#81a2be",
- "label-separator-foreground": "#81a2be",
- "format-connected-foreground": "#2f2f38",
- "format-connected-background": "#81a2be",
- "format-connected-prefix-foreground": "#2f2f38",
- "ramp-signal-foreground": "#2f2f38"
- },
- "wallpaper": "005.png"
-}
diff --git a/src/themes/006.json b/src/themes/006.json
deleted file mode 100644
index 9ba8b905..00000000
--- a/src/themes/006.json
+++ /dev/null
@@ -1,60 +0,0 @@
-{
- "xresources": {
- "background": "#1c1c22",
- "foreground": "#d9d6ca",
- "cursorcolor": "#d9d6ca",
- "color0": "#1c1c22",
- "color1": "#7e6565",
- "color2": "#85aab6",
- "color3": "#90a996",
- "color4": "#3e646f",
- "color5": "#817f98",
- "color6": "#9aa7c0",
- "color7": "#d9d6ca",
- "color8": "#59596c",
- "color9": "#807171",
- "color10": "#3e646f",
- "color11": "#badbc2",
- "color12": "#5c828d",
- "color13": "#9b98b7",
- "color14": "#b2b7c0",
- "color15": "#d9d6ca",
- "rofi.color-window": "#1c1c22, #3e646f, #3e646f",
- "rofi.color-normal": "#1c1c22, #d9d6ca, #85aab6, #d9d6ca, #78824B",
- "rofi.color-active": "#1c1c22, #d9d6ca, #85aab6, #d9d6ca, #78824B",
- "rofi.color-urgent": "#1c1c22, #d9d6ca, #85aab6, #d9d6ca, #78824B"
- },
- "i3wm": {
- "client.background": "#1c1c22",
- "client.focused": "#d9d6ca #1c1c22 #d9d6ca #5c828d #5c828d",
- "client.unfocused": "#d9d6ca #1c1c22 #d9d6ca #3e646f #3e646f",
- "client.focused_inactive": "#d9d6ca #1c1c22 #d9d6ca #3e646f #3e646f",
- "client.urgent": "#d9d6ca #1c1c22 #d9d6ca #3e646f #3e646f",
- "client.placeholder": "#d9d6ca #1c1c22 #d9d6ca #3e646f #3e646f"
- },
- "polybar": {
- "background": "#1c1c22",
- "foreground": "#d9d6ca",
- "modules-left": "wlan eth",
- "modules-center": "i3",
- "modules-right": "date powermenu",
- "label-unfocused-background": "#5c828d",
- "label-unfocused-foreground": "#1c1c22",
- "label-mode-background": "#1c1c22",
- "label-mode-foreground": "#1c1c22",
- "label-focused-foreground": "#1c1c22",
- "label-focused-background": "#3e646f",
- "label-visible-background": "#5c828d",
- "label-visible-foreground": "#1c1c22",
- "format-foreground": "#1c1c22",
- "format-background": "#5c828d",
- "label-open-foreground": "#5c828d",
- "label-close-foreground": "#5c828d",
- "label-separator-foreground": "#5c828d",
- "format-connected-foreground": "#1c1c22",
- "format-connected-background": "#5c828d",
- "format-connected-prefix-foreground": "#1c1c22",
- "ramp-signal-foreground": "#1c1c22"
- },
- "wallpaper": "006.png"
-}
diff --git a/src/themes/007.json b/src/themes/007.json
deleted file mode 100644
index d62363d7..00000000
--- a/src/themes/007.json
+++ /dev/null
@@ -1,60 +0,0 @@
-{
- "xresources": {
- "background": "#1f1f1f",
- "foreground": "#c6c6c6",
- "cursorcolor": "#c6c6c6",
- "color0": "#828282",
- "color1": "#cc6666",
- "color2": "#8abeb7",
- "color3": "#f0c674",
- "color4": "#8abeb7",
- "color5": "#b294bb",
- "color6": "#8abeb7",
- "color7": "#828282",
- "color8": "#828282",
- "color9": "#cc6666",
- "color10": "#8abeb7",
- "color11": "#f0c674",
- "color12": "#8abeb7",
- "color13": "#b294bb",
- "color14": "#8abeb7",
- "color15": "#c6c6c6",
- "rofi.color-window": "#828282, #8abeb7, #8abeb7",
- "rofi.color-normal": "#828282, #c6c6c6, #8abeb7, #c6c6c6, #78824B",
- "rofi.color-active": "#828282, #c6c6c6, #8abeb7, #c6c6c6, #78824B",
- "rofi.color-urgent": "#828282, #c6c6c6, #8abeb7, #c6c6c6, #78824B"
- },
- "i3wm": {
- "client.background": "#1f1f1f",
- "client.focused": "#c6c6c6 #1f1f1f #c6c6c6 #8abeb7 #8abeb7",
- "client.unfocused": "#c6c6c6 #1f1f1f #c6c6c6 #8abeb7 #8abeb7",
- "client.focused_inactive": "#c6c6c6 #1f1f1f #c6c6c6 #8abeb7 #8abeb7",
- "client.urgent": "#c6c6c6 #1f1f1f #c6c6c6 #8abeb7 #8abeb7",
- "client.placeholder": "#c6c6c6 #1f1f1f #c6c6c6 #8abeb7 #8abeb7"
- },
- "polybar": {
- "background": "#1f1f1f",
- "foreground": "#c6c6c6",
- "modules-left": "wlan eth",
- "modules-center": "i3",
- "modules-right": "date powermenu",
- "label-unfocused-background": "#8abeb7",
- "label-unfocused-foreground": "#1f1f1f",
- "label-mode-background": "#1f1f1f",
- "label-mode-foreground": "#828282",
- "label-focused-foreground": "#1f1f1f",
- "label-focused-background": "#8abeb7",
- "label-visible-background": "#8abeb7",
- "label-visible-foreground": "#1f1f1f",
- "format-foreground": "#1f1f1f",
- "format-background": "#8abeb7",
- "label-open-foreground": "#8abeb7",
- "label-close-foreground": "#8abeb7",
- "label-separator-foreground": "#8abeb7",
- "format-connected-foreground": "#1f1f1f",
- "format-connected-background": "#8abeb7",
- "format-connected-prefix-foreground": "#1f1f1f",
- "ramp-signal-foreground": "#1f1f1f"
- },
- "wallpaper": "007.png"
-}
diff --git a/src/themes/008.json b/src/themes/008.json
deleted file mode 100644
index 7ae1c915..00000000
--- a/src/themes/008.json
+++ /dev/null
@@ -1,60 +0,0 @@
-{
- "xresources": {
- "background": "#131822",
- "foreground": "#aab0bc",
- "cursorcolor": "#aab0bc",
- "color0": "#131822",
- "color1": "#7b8ba3",
- "color2": "#657893",
- "color3": "#4e6584",
- "color4": "#233f66",
- "color5": "#1c3251",
- "color6": "#15253d",
- "color7": "#aab0bc",
- "color8": "#626975",
- "color9": "#7b8ba3",
- "color10": "#657893",
- "color11": "#4e6584",
- "color12": "#233f66",
- "color13": "#1c3251",
- "color14": "#15253d",
- "color15": "#aab0bc",
- "rofi.color-window": "#131822, #233f66, #233f66",
- "rofi.color-normal": "#131822, #aab0bc, #233f66, #aab0bc, #78824B",
- "rofi.color-active": "#131822, #aab0bc, #233f66, #aab0bc, #78824B",
- "rofi.color-urgent": "#131822, #aab0bc, #233f66, #aab0bc, #78824B"
- },
- "i3wm": {
- "client.background": "#131822",
- "client.focused": "#aab0bc #131822 #aab0bc #233f66 #233f66",
- "client.unfocused": "#aab0bc #131822 #aab0bc #233f66 #233f66",
- "client.focused_inactive": "#aab0bc #131822 #aab0bc #233f66 #233f66",
- "client.urgent": "#aab0bc #131822 #aab0bc #233f66 #233f66",
- "client.placeholder": "#aab0bc #131822 #aab0bc #233f66 #233f66"
- },
- "polybar": {
- "background": "#131822",
- "foreground": "#aab0bc",
- "modules-left": "wlan eth",
- "modules-center": "i3",
- "modules-right": "date powermenu",
- "label-unfocused-background": "#233f66",
- "label-unfocused-foreground": "#131822",
- "label-mode-background": "#131822",
- "label-mode-foreground": "#131822",
- "label-focused-foreground": "#131822",
- "label-focused-background": "#233f66",
- "label-visible-background": "#233f66",
- "label-visible-foreground": "#131822",
- "format-foreground": "#131822",
- "format-background": "#233f66",
- "label-open-foreground": "#233f66",
- "label-close-foreground": "#233f66",
- "label-separator-foreground": "#233f66",
- "format-connected-foreground": "#131822",
- "format-connected-background": "#233f66",
- "format-connected-prefix-foreground": "#131822",
- "ramp-signal-foreground": "#131822"
- },
- "wallpaper": "008.png"
-}
diff --git a/src/themes/009.json b/src/themes/009.json
deleted file mode 100644
index 74bad804..00000000
--- a/src/themes/009.json
+++ /dev/null
@@ -1,60 +0,0 @@
-{
- "xresources": {
- "background": "#25252c",
- "foreground": "#ffffff",
- "cursorcolor": "#ffffff",
- "color0": "#25252c",
- "color1": "#9abfcd",
- "color2": "#679fb4",
- "color3": "#357f9b",
- "color4": "#036082",
- "color5": "#024c68",
- "color6": "#5e8d87",
- "color7": "#b3cfd9",
- "color8": "#b3cfd9",
- "color9": "#9abfcd",
- "color10": "#679fb4",
- "color11": "#357f9b",
- "color12": "#036082",
- "color13": "#024c68",
- "color14": "#01394e",
- "color15": "#b3cfd9",
- "rofi.color-window": "#25252c, #679fb4, #679fb4",
- "rofi.color-normal": "#25252c, #ffffff, #679fb4, #ffffff, #78824B",
- "rofi.color-active": "#25252c, #ffffff, #679fb4, #ffffff, #78824B",
- "rofi.color-urgent": "#25252c, #ffffff, #679fb4, #ffffff, #78824B"
- },
- "i3wm": {
- "client.background": "#25252c",
- "client.focused": "#ffffff #25252c #ffffff #036082 #036082",
- "client.unfocused": "#ffffff #25252c #ffffff #036082 #036082",
- "client.focused_inactive": "#ffffff #25252c #ffffff #036082 #036082",
- "client.urgent": "#ffffff #25252c #ffffff #036082 #036082",
- "client.placeholder": "#ffffff #25252c #ffffff #036082 #036082"
- },
- "polybar": {
- "background": "#25252c",
- "foreground": "#ffffff",
- "modules-left": "wlan eth",
- "modules-center": "i3",
- "modules-right": "date powermenu",
- "label-unfocused-background": "#036082",
- "label-unfocused-foreground": "#25252c",
- "label-mode-background": "#25252c",
- "label-mode-foreground": "#25252c",
- "label-focused-foreground": "#25252c",
- "label-focused-background": "#036082",
- "label-visible-background": "#036082",
- "label-visible-foreground": "#25252c",
- "format-foreground": "#25252c",
- "format-background": "#036082",
- "label-open-foreground": "#036082",
- "label-close-foreground": "#036082",
- "label-separator-foreground": "#036082",
- "format-connected-foreground": "#25252c",
- "format-connected-background": "#036082",
- "format-connected-prefix-foreground": "#25252c",
- "ramp-signal-foreground": "#25252c"
- },
- "wallpaper": "009.png"
-}
diff --git a/src/themes/010.json b/src/themes/010.json
deleted file mode 100644
index e7e0eaae..00000000
--- a/src/themes/010.json
+++ /dev/null
@@ -1,60 +0,0 @@
-{
- "xresources": {
- "background": "#1d1f21",
- "foreground": "#707880",
- "cursorcolor": "#707880",
- "color0": "#282a2e",
- "color1": "#a54242",
- "color2": "#8c9440",
- "color3": "#de935f",
- "color4": "#5f819d",
- "color5": "#85678f",
- "color6": "#5e8d87",
- "color7": "#707880",
- "color8": "#373b41",
- "color9": "#cc6666",
- "color10": "#707880",
- "color11": "#f0c674",
- "color12": "#5f819d",
- "color13": "#b294bb",
- "color14": "#8abeb7",
- "color15": "#c5c8c6",
- "rofi.color-window": "#1d1f21, #8c9440, #8c9440",
- "rofi.color-normal": "#1d1f21, #707880, #1d1f21, #1d1f21, #5f819d",
- "rofi.color-active": "#1d1f21, #707880, #1d1f21, #1d1f21, #5f819d",
- "rofi.color-urgent": "#1d1f21, #707880, #1d1f21, #1d1f21, #5f819d"
- },
- "i3wm": {
- "client.background": "#1d1f21",
- "client.focused": "#707880 #1d1f21 #707880 #8c9440 #8c9440",
- "client.unfocused": "#707880 #1d1f21 #707880 #5f819d #5f819d",
- "client.focused_inactive": "#707880 #1d1f21 #707880 #5f819d #5f819d",
- "client.urgent": "#707880 #1d1f21 #707880 #5f819d #5f819d",
- "client.placeholder": "#707880 #1d1f21 #707880 #5f819d #5f819d"
- },
- "polybar": {
- "background": "#1d1f21",
- "foreground": "#c5c8c6",
- "modules-left": "i3",
- "modules-center": "date",
- "modules-right": "wlan eth powermenu",
- "label-unfocused-background": "#282a2e",
- "label-unfocused-foreground": "#c5c8c6",
- "label-mode-background": "#282a2e",
- "label-mode-foreground": "#c5c8c6",
- "label-focused-foreground": "#6b7443",
- "label-focused-background": "#373b41",
- "label-visible-background": "#282a2e",
- "label-visible-foreground": "#c5c8c6",
- "format-foreground": "#c5c8c6",
- "format-background": "#282a2e",
- "label-open-foreground": "#c5c8c6",
- "label-close-foreground": "#c5c8c6",
- "label-separator-foreground": "#c5c8c6",
- "format-connected-foreground": "#c5c8c6",
- "format-connected-background": "#282a2e",
- "format-connected-prefix-foreground": "#c5c8c6",
- "ramp-signal-foreground": "#c5c8c6"
- },
- "wallpaper": "010.png"
-}
diff --git a/src/themes/011.json b/src/themes/011.json
deleted file mode 100644
index 7960c4a9..00000000
--- a/src/themes/011.json
+++ /dev/null
@@ -1,60 +0,0 @@
-{
- "xresources": {
- "background": "#1e1e20",
- "foreground": "#c5c8c6",
- "cursorcolor": "#c5c8c6",
- "color0": "#1e1e20",
- "color1": "#e6a57a",
- "color2": "#e39866",
- "color3": "#df8b54",
- "color4": "#dc7f41",
- "color5": "#85678f",
- "color6": "#b06534",
- "color7": "#f1cbb3",
- "color8": "#f4d8c6",
- "color9": "#e6a57a",
- "color10": "#e39866",
- "color11": "#df8b54",
- "color12": "#dc7f41",
- "color13": "#c6723a",
- "color14": "#b06534",
- "color15": "#f1cbb3",
- "rofi.color-window": "#1e1e20, #dc7f41, #dc7f41",
- "rofi.color-normal": "#1e1e20, #c5c8c6, #1e1e20, #1e1e20, #dc7f41",
- "rofi.color-active": "#1e1e20, #c5c8c6, #1e1e20, #1e1e20, #dc7f41",
- "rofi.color-urgent": "#1e1e20, #c5c8c6, #1e1e20, #1e1e20, #dc7f41"
- },
- "i3wm": {
- "client.background": "#1e1e20",
- "client.focused": "#e39866 #1e1e20 #e39866 #e39866 #e39866",
- "client.unfocused": "#e39866 #1e1e20 #e39866 #dc7f41 #dc7f41",
- "client.focused_inactive": "#e39866 #1e1e20 #e39866 #dc7f41 #dc7f41",
- "client.urgent": "#e39866 #1e1e20 #e39866 #dc7f41 #dc7f41",
- "client.placeholder": "#e39866 #1e1e20 #e39866 #dc7f41 #dc7f41"
- },
- "polybar": {
- "background": "#1e1e20",
- "foreground": "#c5c8c6",
- "modules-left": "i3",
- "modules-center": "date",
- "modules-right": "wlan eth powermenu",
- "label-unfocused-background": "#e39866",
- "label-unfocused-foreground": "#1e1e20",
- "label-mode-background": "#e39866",
- "label-mode-foreground": "#1e1e20",
- "label-focused-foreground": "#6b7443",
- "label-focused-background": "#dc7f41",
- "label-visible-background": "#e39866",
- "label-visible-foreground": "#1e1e20",
- "format-foreground": "#1e1e20",
- "format-background": "#c6723a",
- "label-open-foreground": "#e39866",
- "label-close-foreground": "#e39866",
- "label-separator-foreground": "#e6a57a",
- "format-connected-foreground": "#e6a57a",
- "format-connected-background": "#1e1e20",
- "format-connected-prefix-foreground": "#e6a57a",
- "ramp-signal-foreground": "#1e1e20"
- },
- "wallpaper": "011.png"
-}
diff --git a/src/themes/012.json b/src/themes/012.json
deleted file mode 100644
index 6a15c536..00000000
--- a/src/themes/012.json
+++ /dev/null
@@ -1,60 +0,0 @@
-{
- "xresources": {
- "background": "#1e1e20",
- "foreground": "#c5c8c6",
- "cursorcolor": "#c5c8c6",
- "color0": "#1e1e20",
- "color1": "#cbd1cd",
- "color2": "#c4cbc6",
- "color3": "#bdc4bf",
- "color4": "#919893",
- "color5": "#a3aba5",
- "color6": "#b06534",
- "color7": "#d3d8d4",
- "color8": "#cbd1cd",
- "color9": "#cbd1cd",
- "color10": "#c4cbc6",
- "color11": "#bdc4bf",
- "color12": "#919893",
- "color13": "#c6723a",
- "color14": "#b06534",
- "color15": "#d3d8d4",
- "rofi.color-window": "#1e1e20, #919893, #919893",
- "rofi.color-normal": "#1e1e20, #c5c8c6, #1e1e20, #1e1e20, #919893",
- "rofi.color-active": "#1e1e20, #c5c8c6, #1e1e20, #1e1e20, #919893",
- "rofi.color-urgent": "#1e1e20, #c5c8c6, #1e1e20, #1e1e20, #919893"
- },
- "i3wm": {
- "client.background": "#1e1e20",
- "client.focused": "#cbd1cd #1e1e20 #cbd1cd #cbd1cd #cbd1cd",
- "client.unfocused": "#cbd1cd #1e1e20 #cbd1cd #919893 #919893",
- "client.focused_inactive": "#cbd1cd #1e1e20 #cbd1cd #919893 #919893",
- "client.urgent": "#cbd1cd #1e1e20 #cbd1cd #919893 #919893",
- "client.placeholder": "#cbd1cd #1e1e20 #cbd1cd #919893 #919893"
- },
- "polybar": {
- "background": "#1e1e20",
- "foreground": "#c5c8c6",
- "modules-left": "i3",
- "modules-center": "date",
- "modules-right": "wlan eth powermenu",
- "label-unfocused-background": "#cbd1cd",
- "label-unfocused-foreground": "#1e1e20",
- "label-mode-background": "#cbd1cd",
- "label-mode-foreground": "#1e1e20",
- "label-focused-foreground": "#6b7443",
- "label-focused-background": "#919893",
- "label-visible-background": "#cbd1cd",
- "label-visible-foreground": "#1e1e20",
- "format-foreground": "#1e1e20",
- "format-background": "#bdc4df",
- "label-open-foreground": "#cbd1cd",
- "label-close-foreground": "#cbd1cd",
- "label-separator-foreground": "#cbd1cd",
- "format-connected-foreground": "#cbd1cd",
- "format-connected-background": "#1e1e20",
- "format-connected-prefix-foreground": "#cbd1cd",
- "ramp-signal-foreground": "#1e1e20"
- },
- "wallpaper": "012.png"
-}
diff --git a/src/themes/013.json b/src/themes/013.json
deleted file mode 100644
index 3532f3ce..00000000
--- a/src/themes/013.json
+++ /dev/null
@@ -1,60 +0,0 @@
-{
- "xresources": {
- "background": "#1e1e20",
- "foreground": "#c5c8c6",
- "cursorcolor": "#c5c8c6",
- "color0": "#1e1e20",
- "color1": "#80969b",
- "color2": "#56737a",
- "color3": "#416269",
- "color4": "#2c5159",
- "color5": "#274850",
- "color6": "#1e383e",
- "color7": "#a1abad",
- "color8": "#a1abad",
- "color9": "#80969b",
- "color10": "#56737a",
- "color11": "#416269",
- "color12": "#2c5159",
- "color13": "#274850",
- "color14": "#1e383e",
- "color15": "#a1abad",
- "rofi.color-window": "#1e1e20, #2c5159, #2c5159",
- "rofi.color-normal": "#1e1e20, #c5c8c6, #1e1e20, #1e1e20, #2c5159",
- "rofi.color-active": "#1e1e20, #c5c8c6, #1e1e20, #1e1e20, #2c5159",
- "rofi.color-urgent": "#1e1e20, #c5c8c6, #1e1e20, #1e1e20, #2c5159"
- },
- "i3wm": {
- "client.background": "#1e1e20",
- "client.focused": "#56737a #1e1e20 #56737a #56737a #56737a",
- "client.unfocused": "#56737a #1e1e20 #56737a #2c5159 #2c5159",
- "client.focused_inactive": "#56737a #1e1e20 #56737a #2c5159 #2c5159",
- "client.urgent": "#56737a #1e1e20 #56737a #2c5159 #2c5159",
- "client.placeholder": "#56737a #1e1e20 #56737a #2c5159 #2c5159"
- },
- "polybar": {
- "background": "#1e1e20",
- "foreground": "#c5c8c6",
- "modules-left": "i3",
- "modules-center": "date",
- "modules-right": "wlan eth powermenu",
- "label-unfocused-background": "#56737a",
- "label-unfocused-foreground": "#1e1e20",
- "label-mode-background": "#56737a",
- "label-mode-foreground": "#1e1e20",
- "label-focused-foreground": "#6b7443",
- "label-focused-background": "#2c5159",
- "label-visible-background": "#56737a",
- "label-visible-foreground": "#1e1e20",
- "format-foreground": "#1e1e20",
- "format-background": "#416269",
- "label-open-foreground": "#56737a",
- "label-close-foreground": "#56737a",
- "label-separator-foreground": "#80969b",
- "format-connected-foreground": "#80969b",
- "format-connected-background": "#1e1e20",
- "format-connected-prefix-foreground": "#80969b",
- "ramp-signal-foreground": "#1e1e20"
- },
- "wallpaper": "013.png"
-}
diff --git a/templates/README.md b/templates/README.md
index 3b5746eb..426e40db 100644
--- a/templates/README.md
+++ b/templates/README.md
@@ -1,8 +1,8 @@
How to add a new theme
diff --git a/tests/__init__.py b/tests/__init__.py
new file mode 100644
index 00000000..e69de29b
diff --git a/tests/enumeration/__init__.py b/tests/enumeration/__init__.py
new file mode 100644
index 00000000..e69de29b
diff --git a/tests/enumeration/test_attributes.py b/tests/enumeration/test_attributes.py
new file mode 100644
index 00000000..0cfe9290
--- /dev/null
+++ b/tests/enumeration/test_attributes.py
@@ -0,0 +1,91 @@
+import logging
+import unittest
+
+from i3wmthemer.enumeration.attributes import XresourcesAttr, I3Attr, PolybarAttr, NitrogenAttr
+
+logging.disable(logging.ERROR)
+
+
+class TestAttributes(unittest.TestCase):
+ """
+ Tests for enumeration.
+ """
+
+ def test_xresources_attributes(self):
+ """
+ Test for XresourcesAttr.
+ """
+ self.assertEqual(XresourcesAttr.NAME.value, 'xresources')
+ self.assertEqual(XresourcesAttr.BACKGROUND.value, 'background')
+ self.assertEqual(XresourcesAttr.FOREGROUND.value, 'foreground')
+ self.assertEqual(XresourcesAttr.CURSOR.value, 'cursorcolor')
+ self.assertEqual(XresourcesAttr.COLOR0.value, 'color0')
+ self.assertEqual(XresourcesAttr.COLOR1.value, 'color1')
+ self.assertEqual(XresourcesAttr.COLOR2.value, 'color2')
+ self.assertEqual(XresourcesAttr.COLOR3.value, 'color3')
+ self.assertEqual(XresourcesAttr.COLOR4.value, 'color4')
+ self.assertEqual(XresourcesAttr.COLOR5.value, 'color5')
+ self.assertEqual(XresourcesAttr.COLOR6.value, 'color6')
+ self.assertEqual(XresourcesAttr.COLOR7.value, 'color7')
+ self.assertEqual(XresourcesAttr.COLOR8.value, 'color8')
+ self.assertEqual(XresourcesAttr.COLOR9.value, 'color9')
+ self.assertEqual(XresourcesAttr.COLOR10.value, 'color10')
+ self.assertEqual(XresourcesAttr.COLOR11.value, 'color11')
+ self.assertEqual(XresourcesAttr.COLOR12.value, 'color12')
+ self.assertEqual(XresourcesAttr.COLOR13.value, 'color13')
+ self.assertEqual(XresourcesAttr.COLOR14.value, 'color14')
+ self.assertEqual(XresourcesAttr.COLOR15.value, 'color15')
+ self.assertEqual(XresourcesAttr.ROFI_WIND.value, 'rofi.color-window')
+ self.assertEqual(XresourcesAttr.ROFI_NORM.value, 'rofi.color-normal')
+ self.assertEqual(XresourcesAttr.ROFI_ACTI.value, 'rofi.color-active')
+ self.assertEqual(XresourcesAttr.ROFI_URGE.value, 'rofi.color-urgent')
+
+ def test_i3_attributes(self):
+ """
+ Test for I3Attr.
+ """
+ self.assertEqual(I3Attr.NAME.value, 'i3wm')
+ self.assertEqual(I3Attr.BACKGROUND.value, 'client.background')
+ self.assertEqual(I3Attr.FOCUSED.value, 'client.focused')
+ self.assertEqual(I3Attr.UNFOCUSED.value, 'client.unfocused')
+ self.assertEqual(I3Attr.INACTIVE.value, 'client.focused_inactive')
+ self.assertEqual(I3Attr.URGENT.value, 'client.urgent')
+ self.assertEqual(I3Attr.PLACEHOLDER.value, 'client.placeholder')
+
+ def test_polybar_attributes(self):
+ """
+ Test for PolybarAttri.
+ """
+ self.assertEqual(PolybarAttr.NAME.value, 'polybar')
+ self.assertEqual(PolybarAttr.BACKGROUND.value, 'background')
+ self.assertEqual(PolybarAttr.FOREGROUND.value, 'foreground')
+ self.assertEqual(PolybarAttr.MOD_L.value, 'modules-left')
+ self.assertEqual(PolybarAttr.MOD_C.value, 'modules-center')
+ self.assertEqual(PolybarAttr.MOD_R.value, 'modules-right')
+ self.assertEqual(PolybarAttr.LABEL_UN_BACK.value, 'label-unfocused-background')
+ self.assertEqual(PolybarAttr.LABEL_UN_FORE.value, 'label-unfocused-foreground')
+ self.assertEqual(PolybarAttr.LABEL_MOD_BACK.value, 'label-mode-background')
+ self.assertEqual(PolybarAttr.LABEL_MOD_FORE.value, 'label-mode-foreground')
+ self.assertEqual(PolybarAttr.LABEL_FOC_BACK.value, 'label-focused-background')
+ self.assertEqual(PolybarAttr.LABEL_FOC_FORE.value, 'label-focused-foreground')
+ self.assertEqual(PolybarAttr.LABEL_VIS_BACK.value, 'label-visible-background')
+ self.assertEqual(PolybarAttr.LABEL_VIS_FORE.value, 'label-visible-foreground')
+ self.assertEqual(PolybarAttr.FORMAT_BACK.value, 'format-background')
+ self.assertEqual(PolybarAttr.FORMAT_FORE.value, 'format-foreground')
+ self.assertEqual(PolybarAttr.LABEL_OPEN_FORE.value, 'label-open-foreground')
+ self.assertEqual(PolybarAttr.LABEL_CLOSE_FORE.value, 'label-close-foreground')
+ self.assertEqual(PolybarAttr.LABEL_SEP_FOREGROUND.value, 'label-separator-foreground')
+ self.assertEqual(PolybarAttr.FORMAT_CON_FORE.value, 'format-connected-foreground')
+ self.assertEqual(PolybarAttr.FORMAT_CON_BACK.value, 'format-connected-background')
+ self.assertEqual(PolybarAttr.FORMAT_CON_PRE_FORE.value, 'format-connected-prefix-foreground')
+ self.assertEqual(PolybarAttr.RAMP_SIG_FOREGROUND.value, 'ramp-signal-foreground')
+
+ def test_nitrogen_attributes(self):
+ """
+ Test for NitrogenAttr.
+ """
+ self.assertEqual(NitrogenAttr.NAME.value, 'wallpaper')
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/tests/models/__init__.py b/tests/models/__init__.py
new file mode 100644
index 00000000..e69de29b
diff --git a/tests/models/test_i3.py b/tests/models/test_i3.py
new file mode 100644
index 00000000..810577c9
--- /dev/null
+++ b/tests/models/test_i3.py
@@ -0,0 +1,66 @@
+import json
+import logging
+import unittest
+from unittest.mock import patch
+
+from i3wmthemer.models.configuration import Configuration
+from i3wmthemer.models.i3 import I3Theme
+from i3wmthemer.utils.fileutils import FileUtils
+
+logging.disable(logging.ERROR)
+
+
+class TestI3(unittest.TestCase):
+ """
+ Tests for i3 model.
+ """
+
+ theme_str = u' \
+ { \
+ "i3wm": { \
+ "client.background": "#1d1f21", \
+ "client.focused": "#c5c8c6 #1d1f21 #c5c8c6 #81a2be #81a2be", \
+ "client.unfocused": "#c5c8c6 #1d1f21 #c5c8c6 #5f819d #5f819d", \
+ "client.focused_inactive": "#c5c8c6 #1d1f21 #c5c8c6 #5f819d #5f819d", \
+ "client.urgent": "#c5c8c6 #1d1f21 #c5c8c6 #5f819d #5f819d", \
+ "client.placeholder": "#c5c8c6 #1d1f21 #c5c8c6 #5f819d #5f819d" \
+ } \
+ }'
+
+ def test_i3(self):
+ """
+ Test loading from JSON.
+ """
+ data = json.loads(self.theme_str)
+
+ i3 = I3Theme(data)
+
+ self.assertIsNotNone(i3.background)
+ self.assertIsNotNone(i3.focused)
+ self.assertIsNotNone(i3.unfocused)
+ self.assertIsNotNone(i3.inactive)
+ self.assertIsNotNone(i3.urgent)
+ self.assertIsNotNone(i3.placeholder)
+
+ @patch.object(FileUtils, 'locate_file')
+ @patch.object(FileUtils, 'replace_line')
+ def test_load(self, replace_line, locate_file):
+ """
+ Test load method.
+ """
+
+ configuration = Configuration('x', '', '', '', '')
+ data = json.loads(self.theme_str)
+
+ i3 = I3Theme(data)
+ i3.load(configuration)
+
+ self.assertTrue(locate_file.called)
+ self.assertEqual(locate_file.call_count, 1)
+
+ self.assertTrue(replace_line.called)
+ self.assertEqual(replace_line.call_count, 6)
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/tests/models/test_nitrogen.py b/tests/models/test_nitrogen.py
new file mode 100644
index 00000000..878ac30e
--- /dev/null
+++ b/tests/models/test_nitrogen.py
@@ -0,0 +1,51 @@
+import json
+import logging
+import unittest
+from unittest.mock import patch
+
+from i3wmthemer.models.configuration import Configuration
+from i3wmthemer.models.nitrogen import NitrogenTheme
+from i3wmthemer.utils.fileutils import FileUtils
+
+logging.disable(logging.ERROR)
+
+
+class TestNitrogen(unittest.TestCase):
+ """
+ Test nitrogen model.
+ """
+
+ theme_str = u'{"wallpaper": "000.png"}'
+
+ def test_something(self):
+ """
+ Test nitrogen model.
+ """
+ data = json.loads(self.theme_str)
+
+ nitro = NitrogenTheme(data)
+
+ self.assertIsNotNone(nitro.wallpaper)
+
+ @patch.object(FileUtils, 'locate_file')
+ @patch.object(FileUtils, 'replace_line')
+ def test_load(self, replace_line, locate_file):
+ """
+ Test load method.
+ """
+
+ configuration = Configuration('x', '', '', '', '')
+ data = json.loads(self.theme_str)
+
+ nitro = NitrogenTheme(data)
+ nitro.load(configuration)
+
+ self.assertTrue(locate_file.called)
+ self.assertEqual(locate_file.call_count, 1)
+
+ self.assertTrue(replace_line.called)
+ self.assertEqual(replace_line.call_count, 1)
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/tests/models/test_polybar.py b/tests/models/test_polybar.py
new file mode 100644
index 00000000..4a4e7415
--- /dev/null
+++ b/tests/models/test_polybar.py
@@ -0,0 +1,98 @@
+import json
+import logging
+import unittest
+from unittest.mock import patch
+
+from i3wmthemer.models.configuration import Configuration
+from i3wmthemer.models.polybar import PolybarTheme
+from i3wmthemer.utils.fileutils import FileUtils
+
+logging.disable(logging.ERROR)
+
+
+class TestPolybar(unittest.TestCase):
+ """
+ Test polybar model.
+ """
+
+ theme_str = u' \
+ { \
+ "polybar": { \
+ "background": "#1d1f21", \
+ "foreground": "#c5c8c6", \
+ "modules-left": "wlan eth", \
+ "modules-center": "i3", \
+ "modules-right": "date powermenu", \
+ "label-unfocused-background": "#81a2be", \
+ "label-unfocused-foreground": "#1d1f21", \
+ "label-mode-background": "#1d1f21", \
+ "label-mode-foreground": "#282a2e", \
+ "label-focused-foreground": "#1d1f21", \
+ "label-focused-background": "#5f819d", \
+ "label-visible-background": "#81a2be", \
+ "label-visible-foreground": "#1d1f21", \
+ "format-foreground": "#1d1f21", \
+ "format-background": "#81a2be", \
+ "label-open-foreground": "#81a2be", \
+ "label-close-foreground": "#81a2be", \
+ "label-separator-foreground": "#81a2be", \
+ "format-connected-foreground": "#1d1f21", \
+ "format-connected-background": "#81a2be", \
+ "format-connected-prefix-foreground": "#1d1f21", \
+ "ramp-signal-foreground": "#1d1f21" \
+ } \
+ }'
+
+ def test_something(self):
+ """
+ Test data loading from JSON.
+ """
+
+ data = json.loads(self.theme_str)
+
+ polybar = PolybarTheme(data)
+
+ self.assertIsNotNone(polybar.background)
+ self.assertIsNotNone(polybar.modules_r)
+ self.assertIsNotNone(polybar.modules_c)
+ self.assertIsNotNone(polybar.modules_l)
+ self.assertIsNotNone(polybar.label_un_fore)
+ self.assertIsNotNone(polybar.label_un_back)
+ self.assertIsNotNone(polybar.label_mod_back)
+ self.assertIsNotNone(polybar.label_mod_fore)
+ self.assertIsNotNone(polybar.label_foc_fore)
+ self.assertIsNotNone(polybar.label_foc_back)
+ self.assertIsNotNone(polybar.label_vis_back)
+ self.assertIsNotNone(polybar.label_vis_fore)
+ self.assertIsNotNone(polybar.format_fore)
+ self.assertIsNotNone(polybar.format_back)
+ self.assertIsNotNone(polybar.label_open_fore)
+ self.assertIsNotNone(polybar.label_close_fore)
+ self.assertIsNotNone(polybar.label_sep_fore)
+ self.assertIsNotNone(polybar.format_con_back)
+ self.assertIsNotNone(polybar.format_con_fore)
+ self.assertIsNotNone(polybar.format_con_pre_fore)
+ self.assertIsNotNone(polybar.ramp_sign_fore)
+
+ @patch.object(FileUtils, 'locate_file')
+ @patch.object(FileUtils, 'replace_line')
+ def test_load(self, replace_line, locate_file):
+ """
+ Test load method.
+ """
+
+ configuration = Configuration('x', '', '', '', '')
+ data = json.loads(self.theme_str)
+
+ polybar = PolybarTheme(data)
+ polybar.load(configuration)
+
+ self.assertTrue(locate_file.called)
+ self.assertEqual(locate_file.call_count, 1)
+
+ self.assertTrue(replace_line.called)
+ self.assertEqual(replace_line.call_count, 22)
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/tests/models/test_xresources.py b/tests/models/test_xresources.py
new file mode 100644
index 00000000..41492f6a
--- /dev/null
+++ b/tests/models/test_xresources.py
@@ -0,0 +1,99 @@
+import json
+import logging
+import unittest
+from unittest.mock import patch
+
+from i3wmthemer.models.configuration import Configuration
+from i3wmthemer.models.xresources import XresourcesTheme
+from i3wmthemer.utils.fileutils import FileUtils
+
+logging.disable(logging.ERROR)
+
+
+class TestXresources(unittest.TestCase):
+ """
+ Test case for Xresources model.
+ """
+
+ theme_str = u' \
+ { \
+ "xresources": { \
+ "background": "#1d1f21", \
+ "foreground": "#c5c8c6", \
+ "cursorcolor": "#c5c8c6", \
+ "color0": "#282a2e", \
+ "color1": "#a54242", \
+ "color2": "#8c9440", \
+ "color3": "#de935f", \
+ "color4": "#5f819d", \
+ "color5": "#85678f", \
+ "color6": "#5e8d87", \
+ "color7": "#707880", \
+ "color8": "#373b41", \
+ "color9": "#cc6666", \
+ "color10": "#b5bd68", \
+ "color11": "#f0c674", \
+ "color12": "#81a2be", \
+ "color13": "#b294bb", \
+ "color14": "#8abeb7", \
+ "color15": "#c5c8c6", \
+ "rofi.color-window": "#282a2e, #b5bd68, #b5bd68", \
+ "rofi.color-normal": "#282a2e, #c5c8c6, #8c9440, #c5c8c6, #78824B", \
+ "rofi.color-active": "#282a2e, #c5c8c6, #8c9440, #c5c8c6, #78824B", \
+ "rofi.color-urgent": "#282a2e, #c5c8c6, #8c9440, #c5c8c6, #78824B" \
+ } \
+ }'
+
+ def test_xresources(self):
+ """
+ Test loading from JSON file.
+ """
+ data = json.loads(self.theme_str)
+
+ xresources = XresourcesTheme(data)
+ self.assertIsNotNone(xresources.background)
+ self.assertIsNotNone(xresources.foreground)
+ self.assertIsNotNone(xresources.cursor_color)
+ self.assertIsNotNone(xresources.color0)
+ self.assertIsNotNone(xresources.color1)
+ self.assertIsNotNone(xresources.color2)
+ self.assertIsNotNone(xresources.color3)
+ self.assertIsNotNone(xresources.color4)
+ self.assertIsNotNone(xresources.color5)
+ self.assertIsNotNone(xresources.color6)
+ self.assertIsNotNone(xresources.color7)
+ self.assertIsNotNone(xresources.color8)
+ self.assertIsNotNone(xresources.color9)
+ self.assertIsNotNone(xresources.color10)
+ self.assertIsNotNone(xresources.color11)
+ self.assertIsNotNone(xresources.color12)
+ self.assertIsNotNone(xresources.color13)
+ self.assertIsNotNone(xresources.color14)
+ self.assertIsNotNone(xresources.color15)
+ self.assertIsNotNone(xresources.rofi_window)
+ self.assertIsNotNone(xresources.rofi_normal)
+ self.assertIsNotNone(xresources.rofi_active)
+ self.assertIsNotNone(xresources.rofi_urgent)
+
+ @patch.object(FileUtils, 'locate_file')
+ @patch.object(FileUtils, 'replace_line')
+ def test_xresources_load(self, replace_line, locate_file):
+ """
+ Test the load method of Xresources.
+ """
+
+ configuration = Configuration('x', '', '', '', '')
+ data = json.loads(self.theme_str)
+
+ xresources = XresourcesTheme(data)
+ xresources.load(configuration)
+
+ self.assertTrue(locate_file.called)
+ self.assertEqual(locate_file.call_count, 1)
+
+ self.assertTrue(replace_line.called)
+ self.assertEqual(replace_line.call_count, 23)
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/tests/utils/__init__.py b/tests/utils/__init__.py
new file mode 100644
index 00000000..e69de29b
diff --git a/tests/utils/test_backup.py b/tests/utils/test_backup.py
new file mode 100644
index 00000000..eadbd063
--- /dev/null
+++ b/tests/utils/test_backup.py
@@ -0,0 +1,44 @@
+import logging
+import unittest
+from unittest.mock import patch
+
+from i3wmthemer.models.configuration import Configuration
+from i3wmthemer.utils.backup import BackupUtils
+from i3wmthemer.utils.fileutils import FileUtils
+
+logging.disable(logging.ERROR)
+
+
+class TestBackup(unittest.TestCase):
+ """
+ Test case for Backup class.
+ """
+
+ @patch.object(FileUtils, 'locate_file', return_value=True)
+ def test_backup_file(self, copyfile_mock):
+ """
+ Test the backup_file function.
+ """
+ BackupUtils.backup_file('', '')
+
+ self.assertTrue(copyfile_mock.called)
+ self.assertEqual(copyfile_mock.call_count, 1)
+
+ @patch.object(FileUtils, 'locate_file', return_value=True)
+ @patch.object(FileUtils, 'locate_folder', return_value=True)
+ def test_backup_config(self, locate_folder, copyfile_mock):
+ """
+ Test the backup_config function.
+ """
+ configuration = Configuration('', '', '', '', '')
+ BackupUtils.backup_config('', configuration)
+
+ self.assertTrue(copyfile_mock.called)
+ self.assertEqual(copyfile_mock.call_count, 3)
+
+ self.assertTrue(locate_folder.called)
+ self.assertEqual(locate_folder.call_count, 1)
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/tests/utils/test_install.py b/tests/utils/test_install.py
new file mode 100644
index 00000000..ccad3ed9
--- /dev/null
+++ b/tests/utils/test_install.py
@@ -0,0 +1,34 @@
+import logging
+import unittest
+from unittest.mock import patch
+
+from i3wmthemer.models.configuration import Configuration
+from i3wmthemer.utils.fileutils import FileUtils
+from i3wmthemer.utils.install import InstallationUtils
+
+logging.disable(logging.ERROR)
+
+
+class TestInstall(unittest.TestCase):
+ """
+ Test case for Install class.
+ """
+
+ @patch.object(FileUtils, 'locate_file', return_value=True)
+ @patch.object(FileUtils, 'locate_folder', return_value=True)
+ def test_install_defaults(self, locate_folder, copyfile_mock):
+ """
+ Test the backup_config function.
+ """
+ configuration = Configuration('', '', '', '', '')
+ InstallationUtils.install_defaults('', configuration)
+
+ self.assertTrue(copyfile_mock.called)
+ self.assertEqual(copyfile_mock.call_count, 4)
+
+ self.assertTrue(locate_folder.called)
+ self.assertEqual(locate_folder.call_count, 1)
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/themes/000.json b/themes/000.json
new file mode 100644
index 00000000..aa4bbb22
--- /dev/null
+++ b/themes/000.json
@@ -0,0 +1,60 @@
+{
+ "xresources": {
+ "background": "#1d1f21",
+ "foreground": "#c5c8c6",
+ "cursorcolor": "#c5c8c6",
+ "color0": "#282a2e",
+ "color1": "#a54242",
+ "color2": "#8c9440",
+ "color3": "#de935f",
+ "color4": "#5f819d",
+ "color5": "#85678f",
+ "color6": "#5e8d87",
+ "color7": "#707880",
+ "color8": "#373b41",
+ "color9": "#cc6666",
+ "color10": "#b5bd68",
+ "color11": "#f0c674",
+ "color12": "#81a2be",
+ "color13": "#b294bb",
+ "color14": "#8abeb7",
+ "color15": "#c5c8c6",
+ "rofi.color-window": "#282a2e, #b5bd68, #b5bd68",
+ "rofi.color-normal": "#282a2e, #c5c8c6, #8c9440, #c5c8c6, #78824B",
+ "rofi.color-active": "#282a2e, #c5c8c6, #8c9440, #c5c8c6, #78824B",
+ "rofi.color-urgent": "#282a2e, #c5c8c6, #8c9440, #c5c8c6, #78824B"
+ },
+ "i3wm": {
+ "client.background": "#1d1f21",
+ "client.focused": "#c5c8c6 #1d1f21 #c5c8c6 #81a2be #81a2be",
+ "client.unfocused": "#c5c8c6 #1d1f21 #c5c8c6 #5f819d #5f819d",
+ "client.focused_inactive": "#c5c8c6 #1d1f21 #c5c8c6 #5f819d #5f819d",
+ "client.urgent": "#c5c8c6 #1d1f21 #c5c8c6 #5f819d #5f819d",
+ "client.placeholder": "#c5c8c6 #1d1f21 #c5c8c6 #5f819d #5f819d"
+ },
+ "polybar": {
+ "background": "#1d1f21",
+ "foreground": "#c5c8c6",
+ "modules-left": "wlan eth",
+ "modules-center": "i3",
+ "modules-right": "date powermenu",
+ "label-unfocused-background": "#81a2be",
+ "label-unfocused-foreground": "#1d1f21",
+ "label-mode-background": "#1d1f21",
+ "label-mode-foreground": "#282a2e",
+ "label-focused-foreground": "#1d1f21",
+ "label-focused-background": "#5f819d",
+ "label-visible-background": "#81a2be",
+ "label-visible-foreground": "#1d1f21",
+ "format-foreground": "#1d1f21",
+ "format-background": "#81a2be",
+ "label-open-foreground": "#81a2be",
+ "label-close-foreground": "#81a2be",
+ "label-separator-foreground": "#81a2be",
+ "format-connected-foreground": "#1d1f21",
+ "format-connected-background": "#81a2be",
+ "format-connected-prefix-foreground": "#1d1f21",
+ "ramp-signal-foreground": "#1d1f21"
+ },
+ "wallpaper": "000.png"
+}
diff --git a/themes/001.json b/themes/001.json
new file mode 100644
index 00000000..67ce29ea
--- /dev/null
+++ b/themes/001.json
@@ -0,0 +1,60 @@
+{
+ "xresources": {
+ "background": "#1E272B",
+ "foreground": "#EAD49B",
+ "cursorcolor": "#EAD49B",
+ "color0": "#1E272B",
+ "color1": "#685742",
+ "color2": "#9D6A47",
+ "color3": "#B36D43",
+ "color4": "#78824B",
+ "color5": "#D99F57",
+ "color6": "#C9A554",
+ "color7": "#EAD49B",
+ "color8": "#666666",
+ "color9": "#685743",
+ "color10": "#9D6A47",
+ "color11": "#B36D43",
+ "color12": "#78824B",
+ "color13": "#D99F57",
+ "color14": "#C9A554",
+ "color15": "#EAD49B",
+ "rofi.color-window": "#1E272B, #9D6A47, #9D6A47",
+ "rofi.color-normal": "#1E272B, #EAD49B, #1E272B, #1E272B, #78824B",
+ "rofi.color-active": "#1E272B, #EAD49B, #1E272B, #1E272B, #78824B",
+ "rofi.color-urgent": "#1E272B, #EAD49B, #1E272B, #1E272B, #78824B"
+ },
+ "i3wm": {
+ "client.background": "#1E272B",
+ "client.focused": "#EAD49B #1E272B #EAD49B #9D6A47 #9D6A47",
+ "client.unfocused": "#EAD49B #1E272B #EAD49B #78824B #78824B",
+ "client.focused_inactive": "#EAD49B #1E272B #EAD49B #78824B #78824B",
+ "client.urgent": "#EAD49B #1E272B #EAD49B #78824B #78824B",
+ "client.placeholder": "#EAD49B #1E272B #EAD49B #78824B #78824B"
+ },
+ "polybar": {
+ "background": "#1E272B",
+ "foreground": "#EAD49B",
+ "modules-left": "i3",
+ "modules-center": "date",
+ "modules-right": "wlan eth powermenu",
+ "label-unfocused-background": "#78824b",
+ "label-unfocused-foreground": "#1E272B",
+ "label-mode-background": "#78824b",
+ "label-mode-foreground": "#1E272B",
+ "label-focused-foreground": "#6b7443",
+ "label-focused-background": "#78824b",
+ "label-visible-background": "#78824b",
+ "label-visible-foreground": "#1E272B",
+ "format-foreground": "#1E272B",
+ "format-background": "#d99f57",
+ "label-open-foreground": "#9d6a47",
+ "label-close-foreground": "#9d6a47",
+ "label-separator-foreground": "#9d6a47",
+ "format-connected-foreground": "#1E272B",
+ "format-connected-background": "#9d6a47",
+ "format-connected-prefix-foreground": "#1E272B",
+ "ramp-signal-foreground": "#1E272B"
+ },
+ "wallpaper": "001.png"
+}
diff --git a/themes/002.json b/themes/002.json
new file mode 100644
index 00000000..c36f8ada
--- /dev/null
+++ b/themes/002.json
@@ -0,0 +1,60 @@
+{
+ "xresources": {
+ "background": "#162025",
+ "foreground": "#bfbfbf",
+ "cursorcolor": "#bfbfbf",
+ "color0": "#162025",
+ "color1": "#393843",
+ "color2": "#39402e",
+ "color3": "#39402e",
+ "color4": "#75404b",
+ "color5": "#4c584a",
+ "color6": "#662b37",
+ "color7": "#bfbfbf",
+ "color8": "#5d6160",
+ "color9": "#662b37",
+ "color10": "#39402e",
+ "color11": "#39402e",
+ "color12": "#75404b",
+ "color13": "#4c584a",
+ "color14": "#4c584a",
+ "color15": "#bfbfbf",
+ "rofi.color-window": "#162025, #39402e, #39402e",
+ "rofi.color-normal": "#162025, #bfbfbf, #162025, #162025, #75404b",
+ "rofi.color-active": "#162025, #bfbfbf, #162025, #162025, #75404b",
+ "rofi.color-urgent": "#162025, #bfbfbf, #162025, #162025, #75404b"
+ },
+ "i3wm": {
+ "client.background": "#162025",
+ "client.focused": "#bfbfbf #162025 #bfbfbf #39402e #39402e",
+ "client.unfocused": "#bfbfbf #162025 #bfbfbf #75404b #75404b",
+ "client.focused_inactive": "#bfbfbf #162025 #bfbfbf #75404b #75404b",
+ "client.urgent": "#bfbfbf #162025 #bfbfbf #75404b #75404b",
+ "client.placeholder": "#bfbfbf #162025 #bfbfbf #75404b #75404b"
+ },
+ "polybar": {
+ "background": "#162025",
+ "foreground": "#bfbfbf",
+ "modules-left": "i3",
+ "modules-center": "date",
+ "modules-right": "wlan eth powermenu",
+ "label-unfocused-background": "#75404b",
+ "label-unfocused-foreground": "#162025",
+ "label-mode-background": "#75404b",
+ "label-mode-foreground": "#162025",
+ "label-focused-foreground": "#6b7443",
+ "label-focused-background": "#75404b",
+ "label-visible-background": "#75404b",
+ "label-visible-foreground": "#162025",
+ "format-foreground": "#162025",
+ "format-background": "#4c584a",
+ "label-open-foreground": "#39402e",
+ "label-close-foreground": "#39402e",
+ "label-separator-foreground": "#39402e",
+ "format-connected-foreground": "#162025",
+ "format-connected-background": "#39402e",
+ "format-connected-prefix-foreground": "#162025",
+ "ramp-signal-foreground": "#162025"
+ },
+ "wallpaper": "002.png"
+}
diff --git a/themes/003.json b/themes/003.json
new file mode 100644
index 00000000..5d614df1
--- /dev/null
+++ b/themes/003.json
@@ -0,0 +1,60 @@
+{
+ "xresources": {
+ "background": "#162025",
+ "foreground": "#bfbfbf",
+ "cursorcolor": "#bfbfbf",
+ "color0": "#162025",
+ "color1": "#393843",
+ "color2": "#193a48",
+ "color3": "#235964",
+ "color4": "#193a48",
+ "color5": "#2a474a",
+ "color6": "#662b37",
+ "color7": "#bfbfbf",
+ "color8": "#365a5c",
+ "color9": "#662b37",
+ "color10": "#193a48",
+ "color11": "#193a48",
+ "color12": "#75404b",
+ "color13": "#662b37",
+ "color14": "#083842",
+ "color15": "#bfbfbf",
+ "rofi.color-window": "#162025, #193a48, #193a48",
+ "rofi.color-normal": "#162025, #bfbfbf, #162025, #162025, #193a48",
+ "rofi.color-active": "#162025, #bfbfbf, #162025, #162025, #193a48",
+ "rofi.color-urgent": "#162025, #bfbfbf, #162025, #162025, #193a48"
+ },
+ "i3wm": {
+ "client.background": "#162025",
+ "client.focused": "#bfbfbf #162025 #bfbfbf #193a48 #193a48",
+ "client.unfocused": "#bfbfbf #162025 #bfbfbf #193a48 #193a48",
+ "client.focused_inactive": "#bfbfbf #162025 #bfbfbf #193a48 #193a48",
+ "client.urgent": "#bfbfbf #162025 #bfbfbf #193a48 #193a48",
+ "client.placeholder": "#bfbfbf #162025 #bfbfbf #193a48 #193a48"
+ },
+ "polybar": {
+ "background": "#162025",
+ "foreground": "#bfbfbf",
+ "modules-left": "i3",
+ "modules-center": "date",
+ "modules-right": "wlan eth powermenu",
+ "label-unfocused-background": "#193a48",
+ "label-unfocused-foreground": "#162025",
+ "label-mode-background": "#193a48",
+ "label-mode-foreground": "#162025",
+ "label-focused-foreground": "#6b7443",
+ "label-focused-background": "#193a48",
+ "label-visible-background": "#193a48",
+ "label-visible-foreground": "#162025",
+ "format-foreground": "#162025",
+ "format-background": "#2a474a",
+ "label-open-foreground": "#193a48",
+ "label-close-foreground": "#193a48",
+ "label-separator-foreground": "#193a48",
+ "format-connected-foreground": "#162025",
+ "format-connected-background": "#193a48",
+ "format-connected-prefix-foreground": "#162025",
+ "ramp-signal-foreground": "#162025"
+ },
+ "wallpaper": "003.png"
+}
diff --git a/themes/004.json b/themes/004.json
new file mode 100644
index 00000000..b3df9d99
--- /dev/null
+++ b/themes/004.json
@@ -0,0 +1,60 @@
+{
+ "xresources": {
+ "background": "#1d1e26",
+ "foreground": "#b0b287",
+ "cursorcolor": "#b0b287",
+ "color0": "#1d1e26",
+ "color1": "#5a6c56",
+ "color2": "#8c9440",
+ "color3": "#73908b",
+ "color4": "#789073",
+ "color5": "#85678f",
+ "color6": "#5e8d87",
+ "color7": "#9297bf",
+ "color8": "#373b41",
+ "color9": "#907378",
+ "color10": "#b5bd68",
+ "color11": "#f0c674",
+ "color12": "#789073",
+ "color13": "#b294bb",
+ "color14": "#8abeb7",
+ "color15": "#b0b287",
+ "rofi.color-window": "#1d1e26, #b5bd68, #b5bd68",
+ "rofi.color-normal": "#1d1e26, #b0b287, #8c9440, #b0b287, #78824B",
+ "rofi.color-active": "#1d1e26, #b0b287, #8c9440, #b0b287, #78824B",
+ "rofi.color-urgent": "#1d1e26, #b0b287, #8c9440, #b0b287, #78824B"
+ },
+ "i3wm": {
+ "client.background": "#1d1e26",
+ "client.focused": "#b0b287 #1d1e26 #b0b287 #789073 #789073",
+ "client.unfocused": "#b0b287 #1d1e26 #b0b287 #789073 #789073",
+ "client.focused_inactive": "#b0b287 #1d1e26 #b0b287 #789073 #789073",
+ "client.urgent": "#b0b287 #1d1e26 #b0b287 #789073 #789073",
+ "client.placeholder": "#b0b287 #1d1e26 #b0b287 #789073 #789073"
+ },
+ "polybar": {
+ "background": "#1d1e26",
+ "foreground": "#b0b287",
+ "modules-left": "wlan eth",
+ "modules-center": "i3",
+ "modules-right": "date powermenu",
+ "label-unfocused-background": "#789073",
+ "label-unfocused-foreground": "#1d1e26",
+ "label-mode-background": "#1d1e26",
+ "label-mode-foreground": "#1d1e26",
+ "label-focused-foreground": "#ffffff",
+ "label-focused-background": "#789073",
+ "label-visible-background": "#789073",
+ "label-visible-foreground": "#1d1e26",
+ "format-foreground": "#1d1e26",
+ "format-background": "#789073",
+ "label-open-foreground": "#789073",
+ "label-close-foreground": "#789073",
+ "label-separator-foreground": "#789073",
+ "format-connected-foreground": "#1d1e26",
+ "format-connected-background": "#789073",
+ "format-connected-prefix-foreground": "#1d1e26",
+ "ramp-signal-foreground": "#1d1e26"
+ },
+ "wallpaper": "004.png"
+}
diff --git a/themes/005.json b/themes/005.json
new file mode 100644
index 00000000..0355a195
--- /dev/null
+++ b/themes/005.json
@@ -0,0 +1,60 @@
+{
+ "xresources": {
+ "background": "#2f2f38",
+ "foreground": "#b0c4bb",
+ "cursorcolor": "#b0c4bb",
+ "color0": "#34343e",
+ "color1": "#9aafaa",
+ "color2": "#759496",
+ "color3": "#93b3b0",
+ "color4": "#688486",
+ "color5": "#668ca1",
+ "color6": "#759496",
+ "color7": "#b0c4bb",
+ "color8": "#b0c4bb",
+ "color9": "#9aafaa",
+ "color10": "#759496",
+ "color11": "#93b3b0",
+ "color12": "#81a2be",
+ "color13": "#668ca1",
+ "color14": "#759496",
+ "color15": "#b0c4bb",
+ "rofi.color-window": "#34343e, #759496, #759496",
+ "rofi.color-normal": "#34343e, #b0c4bb, #759496, #b0c4bb, #78824B",
+ "rofi.color-active": "#34343e, #b0c4bb, #759496, #b0c4bb, #78824B",
+ "rofi.color-urgent": "#34343e, #b0c4bb, #759496, #b0c4bb, #78824B"
+ },
+ "i3wm": {
+ "client.background": "#2f2f38",
+ "client.focused": "#b0c4bb #2f2f38 #b0c4bb #81a2be #81a2be",
+ "client.unfocused": "#b0c4bb #2f2f38 #b0c4bb #688486 #688486",
+ "client.focused_inactive": "#b0c4bb #2f2f38 #b0c4bb #688486 #688486",
+ "client.urgent": "#b0c4bb #2f2f38 #b0c4bb #688486 #688486",
+ "client.placeholder": "#b0c4bb #2f2f38 #b0c4bb #688486 #688486"
+ },
+ "polybar": {
+ "background": "#2f2f38",
+ "foreground": "#b0c4bb",
+ "modules-left": "wlan eth",
+ "modules-center": "i3",
+ "modules-right": "date powermenu",
+ "label-unfocused-background": "#81a2be",
+ "label-unfocused-foreground": "#2f2f38",
+ "label-mode-background": "#2f2f38",
+ "label-mode-foreground": "#34343e",
+ "label-focused-foreground": "#2f2f38",
+ "label-focused-background": "#688486",
+ "label-visible-background": "#81a2be",
+ "label-visible-foreground": "#2f2f38",
+ "format-foreground": "#2f2f38",
+ "format-background": "#81a2be",
+ "label-open-foreground": "#81a2be",
+ "label-close-foreground": "#81a2be",
+ "label-separator-foreground": "#81a2be",
+ "format-connected-foreground": "#2f2f38",
+ "format-connected-background": "#81a2be",
+ "format-connected-prefix-foreground": "#2f2f38",
+ "ramp-signal-foreground": "#2f2f38"
+ },
+ "wallpaper": "005.png"
+}
diff --git a/themes/006.json b/themes/006.json
new file mode 100644
index 00000000..fd21d295
--- /dev/null
+++ b/themes/006.json
@@ -0,0 +1,60 @@
+{
+ "xresources": {
+ "background": "#1c1c22",
+ "foreground": "#d9d6ca",
+ "cursorcolor": "#d9d6ca",
+ "color0": "#1c1c22",
+ "color1": "#7e6565",
+ "color2": "#85aab6",
+ "color3": "#90a996",
+ "color4": "#3e646f",
+ "color5": "#817f98",
+ "color6": "#9aa7c0",
+ "color7": "#d9d6ca",
+ "color8": "#59596c",
+ "color9": "#807171",
+ "color10": "#3e646f",
+ "color11": "#badbc2",
+ "color12": "#5c828d",
+ "color13": "#9b98b7",
+ "color14": "#b2b7c0",
+ "color15": "#d9d6ca",
+ "rofi.color-window": "#1c1c22, #3e646f, #3e646f",
+ "rofi.color-normal": "#1c1c22, #d9d6ca, #85aab6, #d9d6ca, #78824B",
+ "rofi.color-active": "#1c1c22, #d9d6ca, #85aab6, #d9d6ca, #78824B",
+ "rofi.color-urgent": "#1c1c22, #d9d6ca, #85aab6, #d9d6ca, #78824B"
+ },
+ "i3wm": {
+ "client.background": "#1c1c22",
+ "client.focused": "#d9d6ca #1c1c22 #d9d6ca #5c828d #5c828d",
+ "client.unfocused": "#d9d6ca #1c1c22 #d9d6ca #3e646f #3e646f",
+ "client.focused_inactive": "#d9d6ca #1c1c22 #d9d6ca #3e646f #3e646f",
+ "client.urgent": "#d9d6ca #1c1c22 #d9d6ca #3e646f #3e646f",
+ "client.placeholder": "#d9d6ca #1c1c22 #d9d6ca #3e646f #3e646f"
+ },
+ "polybar": {
+ "background": "#1c1c22",
+ "foreground": "#d9d6ca",
+ "modules-left": "wlan eth",
+ "modules-center": "i3",
+ "modules-right": "date powermenu",
+ "label-unfocused-background": "#5c828d",
+ "label-unfocused-foreground": "#1c1c22",
+ "label-mode-background": "#1c1c22",
+ "label-mode-foreground": "#1c1c22",
+ "label-focused-foreground": "#1c1c22",
+ "label-focused-background": "#3e646f",
+ "label-visible-background": "#5c828d",
+ "label-visible-foreground": "#1c1c22",
+ "format-foreground": "#1c1c22",
+ "format-background": "#5c828d",
+ "label-open-foreground": "#5c828d",
+ "label-close-foreground": "#5c828d",
+ "label-separator-foreground": "#5c828d",
+ "format-connected-foreground": "#1c1c22",
+ "format-connected-background": "#5c828d",
+ "format-connected-prefix-foreground": "#1c1c22",
+ "ramp-signal-foreground": "#1c1c22"
+ },
+ "wallpaper": "006.png"
+}
diff --git a/themes/007.json b/themes/007.json
new file mode 100644
index 00000000..6dc65039
--- /dev/null
+++ b/themes/007.json
@@ -0,0 +1,60 @@
+{
+ "xresources": {
+ "background": "#1f1f1f",
+ "foreground": "#c6c6c6",
+ "cursorcolor": "#c6c6c6",
+ "color0": "#828282",
+ "color1": "#cc6666",
+ "color2": "#8abeb7",
+ "color3": "#f0c674",
+ "color4": "#8abeb7",
+ "color5": "#b294bb",
+ "color6": "#8abeb7",
+ "color7": "#828282",
+ "color8": "#828282",
+ "color9": "#cc6666",
+ "color10": "#8abeb7",
+ "color11": "#f0c674",
+ "color12": "#8abeb7",
+ "color13": "#b294bb",
+ "color14": "#8abeb7",
+ "color15": "#c6c6c6",
+ "rofi.color-window": "#828282, #8abeb7, #8abeb7",
+ "rofi.color-normal": "#828282, #c6c6c6, #8abeb7, #c6c6c6, #78824B",
+ "rofi.color-active": "#828282, #c6c6c6, #8abeb7, #c6c6c6, #78824B",
+ "rofi.color-urgent": "#828282, #c6c6c6, #8abeb7, #c6c6c6, #78824B"
+ },
+ "i3wm": {
+ "client.background": "#1f1f1f",
+ "client.focused": "#c6c6c6 #1f1f1f #c6c6c6 #8abeb7 #8abeb7",
+ "client.unfocused": "#c6c6c6 #1f1f1f #c6c6c6 #8abeb7 #8abeb7",
+ "client.focused_inactive": "#c6c6c6 #1f1f1f #c6c6c6 #8abeb7 #8abeb7",
+ "client.urgent": "#c6c6c6 #1f1f1f #c6c6c6 #8abeb7 #8abeb7",
+ "client.placeholder": "#c6c6c6 #1f1f1f #c6c6c6 #8abeb7 #8abeb7"
+ },
+ "polybar": {
+ "background": "#1f1f1f",
+ "foreground": "#c6c6c6",
+ "modules-left": "wlan eth",
+ "modules-center": "i3",
+ "modules-right": "date powermenu",
+ "label-unfocused-background": "#8abeb7",
+ "label-unfocused-foreground": "#1f1f1f",
+ "label-mode-background": "#1f1f1f",
+ "label-mode-foreground": "#828282",
+ "label-focused-foreground": "#1f1f1f",
+ "label-focused-background": "#8abeb7",
+ "label-visible-background": "#8abeb7",
+ "label-visible-foreground": "#1f1f1f",
+ "format-foreground": "#1f1f1f",
+ "format-background": "#8abeb7",
+ "label-open-foreground": "#8abeb7",
+ "label-close-foreground": "#8abeb7",
+ "label-separator-foreground": "#8abeb7",
+ "format-connected-foreground": "#1f1f1f",
+ "format-connected-background": "#8abeb7",
+ "format-connected-prefix-foreground": "#1f1f1f",
+ "ramp-signal-foreground": "#1f1f1f"
+ },
+ "wallpaper": "007.png"
+}
diff --git a/themes/008.json b/themes/008.json
new file mode 100644
index 00000000..4a2fbcd3
--- /dev/null
+++ b/themes/008.json
@@ -0,0 +1,60 @@
+{
+ "xresources": {
+ "background": "#131822",
+ "foreground": "#aab0bc",
+ "cursorcolor": "#aab0bc",
+ "color0": "#131822",
+ "color1": "#7b8ba3",
+ "color2": "#657893",
+ "color3": "#4e6584",
+ "color4": "#233f66",
+ "color5": "#1c3251",
+ "color6": "#15253d",
+ "color7": "#aab0bc",
+ "color8": "#626975",
+ "color9": "#7b8ba3",
+ "color10": "#657893",
+ "color11": "#4e6584",
+ "color12": "#233f66",
+ "color13": "#1c3251",
+ "color14": "#15253d",
+ "color15": "#aab0bc",
+ "rofi.color-window": "#131822, #233f66, #233f66",
+ "rofi.color-normal": "#131822, #aab0bc, #233f66, #aab0bc, #78824B",
+ "rofi.color-active": "#131822, #aab0bc, #233f66, #aab0bc, #78824B",
+ "rofi.color-urgent": "#131822, #aab0bc, #233f66, #aab0bc, #78824B"
+ },
+ "i3wm": {
+ "client.background": "#131822",
+ "client.focused": "#aab0bc #131822 #aab0bc #233f66 #233f66",
+ "client.unfocused": "#aab0bc #131822 #aab0bc #233f66 #233f66",
+ "client.focused_inactive": "#aab0bc #131822 #aab0bc #233f66 #233f66",
+ "client.urgent": "#aab0bc #131822 #aab0bc #233f66 #233f66",
+ "client.placeholder": "#aab0bc #131822 #aab0bc #233f66 #233f66"
+ },
+ "polybar": {
+ "background": "#131822",
+ "foreground": "#aab0bc",
+ "modules-left": "wlan eth",
+ "modules-center": "i3",
+ "modules-right": "date powermenu",
+ "label-unfocused-background": "#233f66",
+ "label-unfocused-foreground": "#131822",
+ "label-mode-background": "#131822",
+ "label-mode-foreground": "#131822",
+ "label-focused-foreground": "#131822",
+ "label-focused-background": "#233f66",
+ "label-visible-background": "#233f66",
+ "label-visible-foreground": "#131822",
+ "format-foreground": "#131822",
+ "format-background": "#233f66",
+ "label-open-foreground": "#233f66",
+ "label-close-foreground": "#233f66",
+ "label-separator-foreground": "#233f66",
+ "format-connected-foreground": "#131822",
+ "format-connected-background": "#233f66",
+ "format-connected-prefix-foreground": "#131822",
+ "ramp-signal-foreground": "#131822"
+ },
+ "wallpaper": "008.png"
+}
diff --git a/themes/009.json b/themes/009.json
new file mode 100644
index 00000000..8253db49
--- /dev/null
+++ b/themes/009.json
@@ -0,0 +1,60 @@
+{
+ "xresources": {
+ "background": "#25252c",
+ "foreground": "#ffffff",
+ "cursorcolor": "#ffffff",
+ "color0": "#25252c",
+ "color1": "#9abfcd",
+ "color2": "#679fb4",
+ "color3": "#357f9b",
+ "color4": "#036082",
+ "color5": "#024c68",
+ "color6": "#5e8d87",
+ "color7": "#b3cfd9",
+ "color8": "#b3cfd9",
+ "color9": "#9abfcd",
+ "color10": "#679fb4",
+ "color11": "#357f9b",
+ "color12": "#036082",
+ "color13": "#024c68",
+ "color14": "#01394e",
+ "color15": "#b3cfd9",
+ "rofi.color-window": "#25252c, #679fb4, #679fb4",
+ "rofi.color-normal": "#25252c, #ffffff, #679fb4, #ffffff, #78824B",
+ "rofi.color-active": "#25252c, #ffffff, #679fb4, #ffffff, #78824B",
+ "rofi.color-urgent": "#25252c, #ffffff, #679fb4, #ffffff, #78824B"
+ },
+ "i3wm": {
+ "client.background": "#25252c",
+ "client.focused": "#ffffff #25252c #ffffff #036082 #036082",
+ "client.unfocused": "#ffffff #25252c #ffffff #036082 #036082",
+ "client.focused_inactive": "#ffffff #25252c #ffffff #036082 #036082",
+ "client.urgent": "#ffffff #25252c #ffffff #036082 #036082",
+ "client.placeholder": "#ffffff #25252c #ffffff #036082 #036082"
+ },
+ "polybar": {
+ "background": "#25252c",
+ "foreground": "#ffffff",
+ "modules-left": "wlan eth",
+ "modules-center": "i3",
+ "modules-right": "date powermenu",
+ "label-unfocused-background": "#036082",
+ "label-unfocused-foreground": "#25252c",
+ "label-mode-background": "#25252c",
+ "label-mode-foreground": "#25252c",
+ "label-focused-foreground": "#25252c",
+ "label-focused-background": "#036082",
+ "label-visible-background": "#036082",
+ "label-visible-foreground": "#25252c",
+ "format-foreground": "#25252c",
+ "format-background": "#036082",
+ "label-open-foreground": "#036082",
+ "label-close-foreground": "#036082",
+ "label-separator-foreground": "#036082",
+ "format-connected-foreground": "#25252c",
+ "format-connected-background": "#036082",
+ "format-connected-prefix-foreground": "#25252c",
+ "ramp-signal-foreground": "#25252c"
+ },
+ "wallpaper": "009.png"
+}
diff --git a/themes/010.json b/themes/010.json
new file mode 100644
index 00000000..3e8c4267
--- /dev/null
+++ b/themes/010.json
@@ -0,0 +1,60 @@
+{
+ "xresources": {
+ "background": "#1d1f21",
+ "foreground": "#707880",
+ "cursorcolor": "#707880",
+ "color0": "#282a2e",
+ "color1": "#a54242",
+ "color2": "#8c9440",
+ "color3": "#de935f",
+ "color4": "#5f819d",
+ "color5": "#85678f",
+ "color6": "#5e8d87",
+ "color7": "#707880",
+ "color8": "#373b41",
+ "color9": "#cc6666",
+ "color10": "#707880",
+ "color11": "#f0c674",
+ "color12": "#5f819d",
+ "color13": "#b294bb",
+ "color14": "#8abeb7",
+ "color15": "#c5c8c6",
+ "rofi.color-window": "#1d1f21, #8c9440, #8c9440",
+ "rofi.color-normal": "#1d1f21, #707880, #1d1f21, #1d1f21, #5f819d",
+ "rofi.color-active": "#1d1f21, #707880, #1d1f21, #1d1f21, #5f819d",
+ "rofi.color-urgent": "#1d1f21, #707880, #1d1f21, #1d1f21, #5f819d"
+ },
+ "i3wm": {
+ "client.background": "#1d1f21",
+ "client.focused": "#707880 #1d1f21 #707880 #8c9440 #8c9440",
+ "client.unfocused": "#707880 #1d1f21 #707880 #5f819d #5f819d",
+ "client.focused_inactive": "#707880 #1d1f21 #707880 #5f819d #5f819d",
+ "client.urgent": "#707880 #1d1f21 #707880 #5f819d #5f819d",
+ "client.placeholder": "#707880 #1d1f21 #707880 #5f819d #5f819d"
+ },
+ "polybar": {
+ "background": "#1d1f21",
+ "foreground": "#c5c8c6",
+ "modules-left": "i3",
+ "modules-center": "date",
+ "modules-right": "wlan eth powermenu",
+ "label-unfocused-background": "#282a2e",
+ "label-unfocused-foreground": "#c5c8c6",
+ "label-mode-background": "#282a2e",
+ "label-mode-foreground": "#c5c8c6",
+ "label-focused-foreground": "#6b7443",
+ "label-focused-background": "#373b41",
+ "label-visible-background": "#282a2e",
+ "label-visible-foreground": "#c5c8c6",
+ "format-foreground": "#c5c8c6",
+ "format-background": "#282a2e",
+ "label-open-foreground": "#c5c8c6",
+ "label-close-foreground": "#c5c8c6",
+ "label-separator-foreground": "#c5c8c6",
+ "format-connected-foreground": "#c5c8c6",
+ "format-connected-background": "#282a2e",
+ "format-connected-prefix-foreground": "#c5c8c6",
+ "ramp-signal-foreground": "#c5c8c6"
+ },
+ "wallpaper": "010.png"
+}
diff --git a/themes/011.json b/themes/011.json
new file mode 100644
index 00000000..f9bf6333
--- /dev/null
+++ b/themes/011.json
@@ -0,0 +1,60 @@
+{
+ "xresources": {
+ "background": "#1e1e20",
+ "foreground": "#c5c8c6",
+ "cursorcolor": "#c5c8c6",
+ "color0": "#1e1e20",
+ "color1": "#e6a57a",
+ "color2": "#e39866",
+ "color3": "#df8b54",
+ "color4": "#dc7f41",
+ "color5": "#85678f",
+ "color6": "#b06534",
+ "color7": "#f1cbb3",
+ "color8": "#f4d8c6",
+ "color9": "#e6a57a",
+ "color10": "#e39866",
+ "color11": "#df8b54",
+ "color12": "#dc7f41",
+ "color13": "#c6723a",
+ "color14": "#b06534",
+ "color15": "#f1cbb3",
+ "rofi.color-window": "#1e1e20, #dc7f41, #dc7f41",
+ "rofi.color-normal": "#1e1e20, #c5c8c6, #1e1e20, #1e1e20, #dc7f41",
+ "rofi.color-active": "#1e1e20, #c5c8c6, #1e1e20, #1e1e20, #dc7f41",
+ "rofi.color-urgent": "#1e1e20, #c5c8c6, #1e1e20, #1e1e20, #dc7f41"
+ },
+ "i3wm": {
+ "client.background": "#1e1e20",
+ "client.focused": "#e39866 #1e1e20 #e39866 #e39866 #e39866",
+ "client.unfocused": "#e39866 #1e1e20 #e39866 #dc7f41 #dc7f41",
+ "client.focused_inactive": "#e39866 #1e1e20 #e39866 #dc7f41 #dc7f41",
+ "client.urgent": "#e39866 #1e1e20 #e39866 #dc7f41 #dc7f41",
+ "client.placeholder": "#e39866 #1e1e20 #e39866 #dc7f41 #dc7f41"
+ },
+ "polybar": {
+ "background": "#1e1e20",
+ "foreground": "#c5c8c6",
+ "modules-left": "i3",
+ "modules-center": "date",
+ "modules-right": "wlan eth powermenu",
+ "label-unfocused-background": "#e39866",
+ "label-unfocused-foreground": "#1e1e20",
+ "label-mode-background": "#e39866",
+ "label-mode-foreground": "#1e1e20",
+ "label-focused-foreground": "#6b7443",
+ "label-focused-background": "#dc7f41",
+ "label-visible-background": "#e39866",
+ "label-visible-foreground": "#1e1e20",
+ "format-foreground": "#1e1e20",
+ "format-background": "#c6723a",
+ "label-open-foreground": "#e39866",
+ "label-close-foreground": "#e39866",
+ "label-separator-foreground": "#e6a57a",
+ "format-connected-foreground": "#e6a57a",
+ "format-connected-background": "#1e1e20",
+ "format-connected-prefix-foreground": "#e6a57a",
+ "ramp-signal-foreground": "#1e1e20"
+ },
+ "wallpaper": "011.png"
+}
diff --git a/themes/012.json b/themes/012.json
new file mode 100644
index 00000000..5e5304e0
--- /dev/null
+++ b/themes/012.json
@@ -0,0 +1,60 @@
+{
+ "xresources": {
+ "background": "#1e1e20",
+ "foreground": "#c5c8c6",
+ "cursorcolor": "#c5c8c6",
+ "color0": "#1e1e20",
+ "color1": "#cbd1cd",
+ "color2": "#c4cbc6",
+ "color3": "#bdc4bf",
+ "color4": "#919893",
+ "color5": "#a3aba5",
+ "color6": "#b06534",
+ "color7": "#d3d8d4",
+ "color8": "#cbd1cd",
+ "color9": "#cbd1cd",
+ "color10": "#c4cbc6",
+ "color11": "#bdc4bf",
+ "color12": "#919893",
+ "color13": "#c6723a",
+ "color14": "#b06534",
+ "color15": "#d3d8d4",
+ "rofi.color-window": "#1e1e20, #919893, #919893",
+ "rofi.color-normal": "#1e1e20, #c5c8c6, #1e1e20, #1e1e20, #919893",
+ "rofi.color-active": "#1e1e20, #c5c8c6, #1e1e20, #1e1e20, #919893",
+ "rofi.color-urgent": "#1e1e20, #c5c8c6, #1e1e20, #1e1e20, #919893"
+ },
+ "i3wm": {
+ "client.background": "#1e1e20",
+ "client.focused": "#cbd1cd #1e1e20 #cbd1cd #cbd1cd #cbd1cd",
+ "client.unfocused": "#cbd1cd #1e1e20 #cbd1cd #919893 #919893",
+ "client.focused_inactive": "#cbd1cd #1e1e20 #cbd1cd #919893 #919893",
+ "client.urgent": "#cbd1cd #1e1e20 #cbd1cd #919893 #919893",
+ "client.placeholder": "#cbd1cd #1e1e20 #cbd1cd #919893 #919893"
+ },
+ "polybar": {
+ "background": "#1e1e20",
+ "foreground": "#c5c8c6",
+ "modules-left": "i3",
+ "modules-center": "date",
+ "modules-right": "wlan eth powermenu",
+ "label-unfocused-background": "#cbd1cd",
+ "label-unfocused-foreground": "#1e1e20",
+ "label-mode-background": "#cbd1cd",
+ "label-mode-foreground": "#1e1e20",
+ "label-focused-foreground": "#6b7443",
+ "label-focused-background": "#919893",
+ "label-visible-background": "#cbd1cd",
+ "label-visible-foreground": "#1e1e20",
+ "format-foreground": "#1e1e20",
+ "format-background": "#bdc4df",
+ "label-open-foreground": "#cbd1cd",
+ "label-close-foreground": "#cbd1cd",
+ "label-separator-foreground": "#cbd1cd",
+ "format-connected-foreground": "#cbd1cd",
+ "format-connected-background": "#1e1e20",
+ "format-connected-prefix-foreground": "#cbd1cd",
+ "ramp-signal-foreground": "#1e1e20"
+ },
+ "wallpaper": "012.png"
+}
diff --git a/themes/013.json b/themes/013.json
new file mode 100644
index 00000000..3f03a30e
--- /dev/null
+++ b/themes/013.json
@@ -0,0 +1,60 @@
+{
+ "xresources": {
+ "background": "#1e1e20",
+ "foreground": "#c5c8c6",
+ "cursorcolor": "#c5c8c6",
+ "color0": "#1e1e20",
+ "color1": "#80969b",
+ "color2": "#56737a",
+ "color3": "#416269",
+ "color4": "#2c5159",
+ "color5": "#274850",
+ "color6": "#1e383e",
+ "color7": "#a1abad",
+ "color8": "#a1abad",
+ "color9": "#80969b",
+ "color10": "#56737a",
+ "color11": "#416269",
+ "color12": "#2c5159",
+ "color13": "#274850",
+ "color14": "#1e383e",
+ "color15": "#a1abad",
+ "rofi.color-window": "#1e1e20, #2c5159, #2c5159",
+ "rofi.color-normal": "#1e1e20, #c5c8c6, #1e1e20, #1e1e20, #2c5159",
+ "rofi.color-active": "#1e1e20, #c5c8c6, #1e1e20, #1e1e20, #2c5159",
+ "rofi.color-urgent": "#1e1e20, #c5c8c6, #1e1e20, #1e1e20, #2c5159"
+ },
+ "i3wm": {
+ "client.background": "#1e1e20",
+ "client.focused": "#56737a #1e1e20 #56737a #56737a #56737a",
+ "client.unfocused": "#56737a #1e1e20 #56737a #2c5159 #2c5159",
+ "client.focused_inactive": "#56737a #1e1e20 #56737a #2c5159 #2c5159",
+ "client.urgent": "#56737a #1e1e20 #56737a #2c5159 #2c5159",
+ "client.placeholder": "#56737a #1e1e20 #56737a #2c5159 #2c5159"
+ },
+ "polybar": {
+ "background": "#1e1e20",
+ "foreground": "#c5c8c6",
+ "modules-left": "i3",
+ "modules-center": "date",
+ "modules-right": "wlan eth powermenu",
+ "label-unfocused-background": "#56737a",
+ "label-unfocused-foreground": "#1e1e20",
+ "label-mode-background": "#56737a",
+ "label-mode-foreground": "#1e1e20",
+ "label-focused-foreground": "#6b7443",
+ "label-focused-background": "#2c5159",
+ "label-visible-background": "#56737a",
+ "label-visible-foreground": "#1e1e20",
+ "format-foreground": "#1e1e20",
+ "format-background": "#416269",
+ "label-open-foreground": "#56737a",
+ "label-close-foreground": "#56737a",
+ "label-separator-foreground": "#80969b",
+ "format-connected-foreground": "#80969b",
+ "format-connected-background": "#1e1e20",
+ "format-connected-prefix-foreground": "#80969b",
+ "ramp-signal-foreground": "#1e1e20"
+ },
+ "wallpaper": "013.png"
+}
diff --git a/src/themes/README.md b/themes/README.md
similarity index 100%
rename from src/themes/README.md
rename to themes/README.md
diff --git a/src/themes/screenshots/000.png b/themes/screenshots/000.png
similarity index 100%
rename from src/themes/screenshots/000.png
rename to themes/screenshots/000.png
diff --git a/src/themes/screenshots/001.png b/themes/screenshots/001.png
similarity index 100%
rename from src/themes/screenshots/001.png
rename to themes/screenshots/001.png
diff --git a/src/themes/screenshots/002.png b/themes/screenshots/002.png
similarity index 100%
rename from src/themes/screenshots/002.png
rename to themes/screenshots/002.png
diff --git a/src/themes/screenshots/003.png b/themes/screenshots/003.png
similarity index 100%
rename from src/themes/screenshots/003.png
rename to themes/screenshots/003.png
diff --git a/src/themes/screenshots/004.png b/themes/screenshots/004.png
similarity index 100%
rename from src/themes/screenshots/004.png
rename to themes/screenshots/004.png
diff --git a/src/themes/screenshots/005.png b/themes/screenshots/005.png
similarity index 100%
rename from src/themes/screenshots/005.png
rename to themes/screenshots/005.png
diff --git a/src/themes/screenshots/006.png b/themes/screenshots/006.png
similarity index 100%
rename from src/themes/screenshots/006.png
rename to themes/screenshots/006.png
diff --git a/src/themes/screenshots/007.png b/themes/screenshots/007.png
similarity index 100%
rename from src/themes/screenshots/007.png
rename to themes/screenshots/007.png
diff --git a/src/themes/screenshots/008.png b/themes/screenshots/008.png
similarity index 100%
rename from src/themes/screenshots/008.png
rename to themes/screenshots/008.png
diff --git a/src/themes/screenshots/009.png b/themes/screenshots/009.png
similarity index 100%
rename from src/themes/screenshots/009.png
rename to themes/screenshots/009.png
diff --git a/src/themes/screenshots/010.png b/themes/screenshots/010.png
similarity index 100%
rename from src/themes/screenshots/010.png
rename to themes/screenshots/010.png
diff --git a/src/themes/screenshots/011.png b/themes/screenshots/011.png
similarity index 100%
rename from src/themes/screenshots/011.png
rename to themes/screenshots/011.png
diff --git a/src/themes/screenshots/012.png b/themes/screenshots/012.png
similarity index 100%
rename from src/themes/screenshots/012.png
rename to themes/screenshots/012.png
diff --git a/src/themes/screenshots/013.png b/themes/screenshots/013.png
similarity index 100%
rename from src/themes/screenshots/013.png
rename to themes/screenshots/013.png
diff --git a/src/wallpapers/000.png b/wallpapers/000.png
similarity index 100%
rename from src/wallpapers/000.png
rename to wallpapers/000.png
diff --git a/src/wallpapers/001.png b/wallpapers/001.png
similarity index 100%
rename from src/wallpapers/001.png
rename to wallpapers/001.png
diff --git a/src/wallpapers/002.png b/wallpapers/002.png
similarity index 100%
rename from src/wallpapers/002.png
rename to wallpapers/002.png
diff --git a/src/wallpapers/003.png b/wallpapers/003.png
similarity index 100%
rename from src/wallpapers/003.png
rename to wallpapers/003.png
diff --git a/src/wallpapers/004.png b/wallpapers/004.png
similarity index 100%
rename from src/wallpapers/004.png
rename to wallpapers/004.png
diff --git a/src/wallpapers/005.png b/wallpapers/005.png
similarity index 100%
rename from src/wallpapers/005.png
rename to wallpapers/005.png
diff --git a/src/wallpapers/006.png b/wallpapers/006.png
similarity index 100%
rename from src/wallpapers/006.png
rename to wallpapers/006.png
diff --git a/src/wallpapers/007.png b/wallpapers/007.png
similarity index 100%
rename from src/wallpapers/007.png
rename to wallpapers/007.png
diff --git a/src/wallpapers/008.png b/wallpapers/008.png
similarity index 100%
rename from src/wallpapers/008.png
rename to wallpapers/008.png
diff --git a/src/wallpapers/009.png b/wallpapers/009.png
similarity index 100%
rename from src/wallpapers/009.png
rename to wallpapers/009.png
diff --git a/src/wallpapers/010.png b/wallpapers/010.png
similarity index 100%
rename from src/wallpapers/010.png
rename to wallpapers/010.png
diff --git a/src/wallpapers/011.png b/wallpapers/011.png
similarity index 100%
rename from src/wallpapers/011.png
rename to wallpapers/011.png
diff --git a/src/wallpapers/012.png b/wallpapers/012.png
similarity index 100%
rename from src/wallpapers/012.png
rename to wallpapers/012.png
diff --git a/src/wallpapers/013.png b/wallpapers/013.png
similarity index 100%
rename from src/wallpapers/013.png
rename to wallpapers/013.png