Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

New template format #125

Merged
merged 46 commits into from
Feb 11, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
a59c6dc
use list() instead of an empty list
deviantfero Jan 20, 2019
c462491
change logging to be more brief
deviantfero Jan 20, 2019
70bd70d
remove openbox and tint2 reload options from wpgtk
deviantfero Jan 20, 2019
1c777f0
also reload kitty when applying themes
deviantfero Jan 20, 2019
bae9301
improve icon color generation, improve wpgtk dictionary to be pywal s…
deviantfero Jan 20, 2019
c5ab2bf
remove old icon function
deviantfero Jan 20, 2019
c0cd8ea
use format strings for templates instead of custom format
deviantfero Jan 20, 2019
6bf328b
add re for icon capturing
deviantfero Jan 20, 2019
9c7073d
remove options from default config file
deviantfero Jan 20, 2019
ddfb5d5
remove build_key function
deviantfero Jan 21, 2019
309745b
update pywal version required
deviantfero Jan 21, 2019
f22ca2f
update auto-complete for bash and zsh
deviantfero Jan 24, 2019
d0d7beb
use fallback on failure to generate a theme, create image on fail
deviantfero Jan 24, 2019
d3a8141
add auto_adjust setting to auto_adjust on add
deviantfero Jan 24, 2019
be3e392
write_script function for writing the script to execute at startup
deviantfero Jan 24, 2019
757a6cb
add function to update templates to new version
deviantfero Jan 24, 2019
adbec20
use new write_script function
deviantfero Jan 24, 2019
5282dcd
behave -s to directories and images like pywal
deviantfero Jan 24, 2019
9b60016
add setting to autoadjust on theme creation and behave accordingly
deviantfero Jan 24, 2019
db9389b
change -x flag for -t, and --pywal for --theme
deviantfero Jan 24, 2019
8aa835e
remove unnecessary imports
deviantfero Jan 24, 2019
20ca209
change -y flag for a more explicit --link flag
deviantfero Jan 24, 2019
193cdcc
add a --preview flag that behaves like pywal, and --update_template
deviantfero Jan 24, 2019
20f67fd
auto-adjust when light theme is on, this generates light themes via w…
deviantfero Jan 25, 2019
e02c06b
add switch for always auto_adjust in option_grid
deviantfero Jan 25, 2019
96d27d6
add whitespace to make code more readable
deviantfero Jan 25, 2019
8c60d4f
write the file once the formatting is finished
deviantfero Jan 25, 2019
2396d6e
fix active/inactive in light colorscheme
deviantfero Jan 28, 2019
a35ec53
remove create_sample repetition add it to render_sample instead
deviantfero Feb 3, 2019
d6e9298
separate rendering the theme to a different function
deviantfero Feb 3, 2019
ed3bb80
handle delete_theme errors outside function
deviantfero Feb 3, 2019
17f855d
add reset_theme function
deviantfero Feb 3, 2019
2937c10
add -R flag to reset themes to their original state
deviantfero Feb 3, 2019
4f2cd31
add -R flag to autocompletion
deviantfero Feb 3, 2019
c7a64f2
re-arrange buttons to include reset action in UI
deviantfero Feb 3, 2019
0d18eb7
add dark variant to icon-theme in installer
deviantfero Feb 3, 2019
cc64e02
use threads to process templates
deviantfero Feb 6, 2019
3fdb4c9
only reload GTK+ if option is enabled
deviantfero Feb 11, 2019
9c3341b
change update_template flag for just update
deviantfero Feb 11, 2019
6f0e297
change default configuration file
deviantfero Feb 11, 2019
c173226
change link order to be consistent with ln, thus more intuitive
deviantfero Feb 11, 2019
9998dc9
order flags in a more logical manner
deviantfero Feb 11, 2019
014acc0
ignore files that don't end with .base
deviantfero Feb 11, 2019
b7ce530
update completion functions
deviantfero Feb 11, 2019
eb11654
Merge branch 'master' of github.com:deviantfero/wpgtk into new-templates
deviantfero Feb 11, 2019
1f15384
update version tag
deviantfero Feb 11, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions completions/bash/wpg
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
function _wpg() {
local optforprofiles
local optforcolorschemes
_get_comp_words_by_ref cur
# themes
optforprofiles="-s -e -d -z -m -LA -A --brt --sat"
optforcolorschemes="-s -e -d -z -m -LA -A --brt --sat -R"
# themes, pywal themes
optforvariabletheme="-Ti"
# themes, filenames
optvariable="-i -o"
# filenames
optfordefault="-y -a -xa -ax"
optfordefault="--link -aL -La -a -ta -at --update"
# templates
optfortemplates="-xd -dx"
optfortemplates="-td -dt"
# pywal backends
optforbackends="--backends"
# pywal themes
optforthemes="--pywal"
optforthemes="--theme"

if [[ $COMP_CWORD = 1 ]]; then
COMPREPLY=($(compgen -W "$(_parse_usage wpg)" -- "$cur"))
elif [[ $COMP_CWORD < 4 || ${COMP_WORDS[1]} != "-s" ]]; then
for opt in $optforprofiles; do
for opt in $optforcolorschemes; do
if [[ $opt = ${COMP_WORDS[1]} ]]; then
COMPREPLY=($(compgen -W "$(wpg -l)" -- "$cur"))
fi
Expand All @@ -31,7 +31,7 @@ function _wpg() {
done
for opt in $optforthemes; do
if [[ $opt = ${COMP_WORDS[1]} ]]; then
COMPREPLY=($(compgen -W "$(wpg --pywal)" -- "$cur"))
COMPREPLY=($(compgen -W "$(wpg --theme)" -- "$cur"))
fi
done
for opt in $optvariable; do
Expand All @@ -45,7 +45,7 @@ function _wpg() {
if [[ $opt = ${COMP_WORDS[1]} && $COMP_CWORD < 3 ]]; then
COMPREPLY=($(compgen -W "$(wpg -l)" -- "$cur"))
elif [[ $opt = ${COMP_WORDS[1]} ]]; then
COMPREPLY=($(compgen -W "$(wpg --pywal)" -- "$cur"))
COMPREPLY=($(compgen -W "$(wpg --theme)" -- "$cur"))
fi
done
for opt in $optfordefault; do
Expand All @@ -55,7 +55,7 @@ function _wpg() {
done
for opt in $optfortemplates; do
if [[ $opt = ${COMP_WORDS[1]} ]]; then
COMPREPLY=($(compgen -W "$(wpg -xl)" -- "$cur"))
COMPREPLY=($(compgen -W "$(wpg -tl)" -- "$cur"))
fi
done
fi
Expand Down
44 changes: 22 additions & 22 deletions completions/zsh/_wpg
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
#compdef wpg

_profiles() {
local -a profiles
profiles=(`wpg -l`)
_describe 'profiles' profiles
_colorschemes() {
local -a colorschemes
colorschemes=(`wpg -l`)
_describe 'colorschemes' colorschemes
}

_templates() {
local -a templates
templates=(`wpg -xl`)
_describe 'templates' templates
local -a templates
templates=(`wpg -tl`)
_describe 'templates' templates
}

_backends() {
Expand All @@ -20,52 +20,52 @@ _backends() {

_themes() {
local -a themes
themes=(`wpg --pywal`)
themes=(`wpg --theme`)
_describe 'themes' themes
}

_wpg() {
local state optforprofiles
local state optforcolorschemes
# themes
optforprofiles=(-s -e -d -z -m -A -LA --brt --sat)
optforcolorschemes=(-s -e -d -z -m -A -LA --brt --sat -R)
# themes, filenames
optvariable=(-i -o)
# themes, pywal themes
optvariabletheme=(-Ti)
# filenames
optforgeneric=(-y -a -xa)
optforgeneric=(--link -a -La -aL -ta -at --update)
# templates
optfortemplates=(-xd -dx)
optfortemplates=(-td -dt)
# pywal backends
optforbackends=(--backend)
# pywal themes
optforthemes=(--pywal)
optforthemes=(--theme)

_arguments \
'1: :->generic' \
'*: :->listprofiles'
'*: :->listcolorschemes'

case $state in
(generic)
_gnu_generic
;;
(listprofiles)
(listcolorschemes)
if [[ $CURRENT < 5 || ${words[2]} != "-s" ]]; then
for opt in $optforprofiles; do
for opt in $optforcolorschemes; do
if [[ $opt = ${words[2]} ]]; then
_profiles
_colorschemes
fi
done
for opt in $optvariable; do
if [[ $opt = ${words[2]} && $CURRENT < 4 ]]; then
_profiles
_colorschemes
elif [[ $opt = ${words[2]} ]]; then
_gnu_generic
fi
done
for opt in $optvariabletheme; do
if [[ $opt = ${words[2]} && $CURRENT < 4 ]]; then
_profiles
_colorschemes
elif [[ $opt = ${words[2]} ]]; then
_themes
fi
Expand All @@ -90,9 +90,9 @@ _wpg() {
_themes
fi
done
fi
;;
esac
fi
;;
esac
}

_wpg "$@"
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
python_requires=">=3.5",
install_requires=[
'Pillow>=4.2.1',
'pywal>=2.0.0',
'pywal>=3.0.0',
],
include_package_data=True,
data_files=[('etc/wpgtk', ['wpgtk/misc/wpg.conf']),
Expand Down
Loading