diff options
| author | Daniel Byron <[email protected]> | 2016-05-04 09:50:53 +1000 |
|---|---|---|
| committer | Daniel Byron <[email protected]> | 2016-05-04 09:50:53 +1000 |
| commit | 1949c2beb294509ab2e916b1f0d7659ea02e4f0f (patch) | |
| tree | 406581d5e90419916968dcf0db03df928876b56c | |
| parent | Added imageOverlay option to draw icons and images over the top of generated ... (diff) | |
| download | schemer2-1949c2beb294509ab2e916b1f0d7659ea02e4f0f.tar.xz schemer2-1949c2beb294509ab2e916b1f0d7659ea02e4f0f.zip | |
Gnome terminal (dconf) support added
| -rw-r--r-- | README.md | 1 | ||||
| -rw-r--r-- | TODO.md | 22 | ||||
| -rw-r--r-- | format.go | 5 | ||||
| -rw-r--r-- | output.go | 22 |
4 files changed, 28 insertions, 22 deletions
@@ -93,3 +93,4 @@ And it will be built in your GOPATH directory, in a subdirectory named 'bin'. To - Terminator - Chrome Shell - OS X Terminal +- Gnome Terminal (dconf only for now) diff --git a/TODO.md b/TODO.md deleted file mode 100644 index 55f8ce6..0000000 --- a/TODO.md +++ /dev/null @@ -1,22 +0,0 @@ -# To Do - -- Support for following terminal inputs - + Xterm (Partially done, needs more testing) - + Urxvt (See: xterm) - + Mac Terminal - + iTerm2 - + RoxTerm - + Konsole - + Plain text - -- Write more tests and find existing or write configurations for terminals to test against - - -# "Would be nice" - -- Vim colorscheme input/output - -# Maybe - -- Include pre-compiled binaries for Linux, Mac and Windows -- Separate install instructions into INSTALL.md @@ -86,4 +86,9 @@ var formats = []Format{ flagName: "osxterminal", output: printOSXTerminal, }, + { + friendlyName: "Gnome Terminal (dconf)", + flagName: "gnome-terminal", + output: printGnomeDConf, + }, } @@ -246,3 +246,25 @@ func printOSXTerminal(colors []color.Color) string { output += "</plist>\n" return output } + +func printGnomeDConf(colors []color.Color) string { + output := "#!/usr/bin/env bash\npalette=\"[" + for i, c := range colors { + cc := c.(color.NRGBA) + bytes := []byte{byte(cc.R), byte(cc.G), byte(cc.B)} + output += "'" + output += "#" + output += hex.EncodeToString(bytes) + output += "'" + if i < len(colors)-1 { + output += "," + } + } + output += "]\"" + output += "\n" + output += "default=$(dconf read /org/gnome/terminal/legacy/profiles:/default | sed -e \"s/'//g\")" + output += "\n" + output += "dconf write /org/gnome/terminal/legacy/profiles:/:$default/palette \"$palette\"" + output += "\n" + return output +} |