Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Merge pull request #121 from ranisalt/master
Browse files Browse the repository at this point in the history
Add resource file for sway
  • Loading branch information
dylanaraps authored Oct 19, 2017
2 parents 43a4d50 + d6c988c commit a21f082
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pywal/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def get_args(args):
help="Print \"wal\" version.")

arg.add_argument("-e", action="store_true",
help="Skip Reloading Environment gtk/xrdb/i3/polybar")
help="Skip reloading gtk/xrdb/i3/sway/polybar")

return arg.parse_args(args)

Expand Down
1 change: 1 addition & 0 deletions pywal/export.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ def get_export_type(export_type):
"putty": "colors-putty.reg",
"scss": "colors.scss",
"shell": "colors.sh",
"sway": "colors-sway",
"xresources": "colors.Xresources",
"yaml": "colors.yml",
}.get(export_type, export_type)
Expand Down
7 changes: 7 additions & 0 deletions pywal/reload.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,18 @@ def polybar():
util.disown(["pkill", "-USR1", "polybar"])


def sway():
"""Reload sway colors."""
if shutil.which("swaymsg"):
util.disown(["swaymsg", "reload"])


def env(xrdb_file=None):
"""Reload environment."""
gtk()
xrdb(xrdb_file)
i3()
sway()
polybar()
print("reload: Reloaded environment.")

Expand Down
21 changes: 21 additions & 0 deletions pywal/templates/colors-sway
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
set $wallpaper "{wallpaper}"

set $background "{background}"
set $foreground "{foreground}"

set $color0 "{color0}"
set $color1 "{color1}"
set $color2 "{color2}"
set $color3 "{color3}"
set $color4 "{color4}"
set $color5 "{color5}"
set $color6 "{color6}"
set $color7 "{color7}"
set $color8 "{color8}"
set $color9 "{color9}"
set $color10 "{color10}"
set $color11 "{color11}"
set $color12 "{color12}"
set $color13 "{color13}"
set $color14 "{color14}"
set $color15 "{color15}"

0 comments on commit a21f082

Please sign in to comment.