Skip to content

Commit

Permalink
Merge pull request aruhier#53 from erikbrinkman/master
Browse files Browse the repository at this point in the history
Unified dconf and gconf palette variations
  • Loading branch information
aruhier committed May 29, 2015
2 parents 8f981ec + 0665e66 commit 789f3a1
Show file tree
Hide file tree
Showing 11 changed files with 57 additions and 10 deletions.
16 changes: 16 additions & 0 deletions colors/dark/palette
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#070736364242
#DCDC32322F2F
#858599990000
#B5B589890000
#26268B8BD2D2
#D3D336368282
#2A2AA1A19898
#EEEEE8E8D5D5
#00002B2B3636
#CBCB4B4B1616
#58586E6E7575
#65657B7B8383
#838394949696
#6C6C7171C4C4
#9393A1A1A1A1
#FDFDF6F6E3E3
1 change: 0 additions & 1 deletion colors/dark/palette_dconf

This file was deleted.

1 change: 0 additions & 1 deletion colors/dark/palette_gconf

This file was deleted.

16 changes: 16 additions & 0 deletions colors/dark_alternative/palette
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#00002B2B3636
#CBCB4B4B1616
#58586E6E7575
#65657B7B8383
#838394949696
#6C6C7171C4C4
#9393A1A1A1A1
#FDFDF6F6E3E3
#070736364242
#DCDC32322F2F
#858599990000
#B5B589890000
#26268B8BD2D2
#D3D336368282
#2A2AA1A19898
#EEEEE8E8D5D5
2 changes: 0 additions & 2 deletions colors/dark_alternative/palette_dconf

This file was deleted.

1 change: 0 additions & 1 deletion colors/dark_alternative/palette_gconf

This file was deleted.

16 changes: 16 additions & 0 deletions colors/light/palette
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#070736364242
#DCDC32322F2F
#858599990000
#B5B589890000
#26268B8BD2D2
#D3D336368282
#2A2AA1A19898
#EEEEE8E8D5D5
#00002B2B3636
#CBCB4B4B1616
#58586E6E7575
#65657B7B8383
#838394949696
#6C6C7171C4C4
#9393A1A1A1A1
#FDFDF6F6E3E3
1 change: 0 additions & 1 deletion colors/light/palette_dconf

This file was deleted.

1 change: 0 additions & 1 deletion colors/light/palette_gconf

This file was deleted.

5 changes: 2 additions & 3 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ set_profile_colors() {
then local profile_path=$dconfdir/$profile

# set color palette
dconf write $profile_path/palette "[$(cat $scheme_dir/palette_dconf)]"
dconf write $profile_path/palette "$(to_dconf < $scheme_dir/palette)"

# set foreground, background and highlight color
dconf write $profile_path/bold-color "'$(cat $bd_color_file)'"
Expand All @@ -62,8 +62,7 @@ set_profile_colors() {
local profile_path=$gconfdir/$profile

# set color palette
gconftool-2 -s -t string $profile_path/palette $(cat \
$scheme_dir/palette_gconf)
gconftool-2 -s -t string $profile_path/palette "$(to_gconf < $scheme_dir/palette)"

# set foreground, background and highlight color
gconftool-2 -s -t string $profile_path/bold_color $(cat $bd_color_file)
Expand Down
7 changes: 7 additions & 0 deletions src/tools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,10 @@ in_array() {
return 1
}

to_gconf() {
tr '\n' \: | sed 's#:$#\n#'
}

to_dconf() {
tr '\n' '~' | sed -e "s#~\$#']\n#" -e "s#~#', '#g" -e "s#^#['#"
}

0 comments on commit 789f3a1

Please sign in to comment.