Skip to content

Instantly share code, notes, and snippets.

@baylej
Last active January 5, 2021 08:44
Show Gist options
  • Save baylej/b30dba4e0651dc897eb37d95a746bbdb to your computer and use it in GitHub Desktop.
Save baylej/b30dba4e0651dc897eb37d95a746bbdb to your computer and use it in GitHub Desktop.
gitk Dark
set mainfont {Helvetica 9}
set textfont {monospace 9}
set uifont {Helvetica 9}
set tabstop 8
set findmergefiles 0
set maxgraphpct 50
set maxwidth 16
set cmitmode patch
set wrapcomment none
set autoselect 1
set autosellen 40
set showneartags 1
set maxrefs 20
set visiblerefs {"master"}
set hideremotes 0
set showlocalchanges 1
set datetimeformat {%Y-%m-%d %H:%M:%S}
set limitdiffs 1
set uicolor #3e3e3e
set want_ttk 1
set bgcolor #2a2a34
set fgcolor #ffffff
set uifgcolor black
set uifgdisabledcolor #999
set colors {#00a000 #ff2e33 #7c3cff magenta darkgrey brown orange}
set diffcolors {{#ff2e33} #00a000 #7c3cff}
set mergecolors {#ff2e33 #7c3cff #00ff00 purple brown #009090 magenta #808000 #009000 #ff0080 cyan #b07070 #70b0f0 #70f0b0 #f0b070 #ff70b0}
set markbgcolor #30303a
set diffcontext 3
set selectbgcolor #3e3e48
set foundbgcolor #336611
set currentsearchhitbgcolor #336611
set extdifftool meld
set perfile_attrs 0
set headbgcolor #00ff00
set headfgcolor black
set headoutlinecolor white
set remotebgcolor #ffddaa
set tagbgcolor yellow
set tagfgcolor black
set tagoutlinecolor white
set reflinecolor white
set filesepbgcolor #aaaaaa
set filesepfgcolor black
set linehoverbgcolor #ffff80
set linehoverfgcolor black
set linehoveroutlinecolor black
set mainheadcirclecolor #cccc00
set workingfilescirclecolor #ff2e33
set indexcirclecolor #00a000
set circlecolors {white #7c3cff gray #7c3cff #7c3cff}
set linkfgcolor #7c3cff
set circleoutlinecolor #2a2a34
set web_browser xdg-open
set geometry(main) 1918x998+0+0
set geometry(state) normal
set geometry(topwidth) 1918
set geometry(topheight) 519
set geometry(pwsash0) "727 1"
set geometry(pwsash1) "1162 1"
set geometry(botwidth) 1215
set geometry(botheight) 473
set permviews {}
#
# "Mr-Hide's" theme.
#
# Installation:
# mkdir ~/.local/share/tkthemes/
# echo "export TCLLIBPATH=~/.local/share/tkthemes" >> ~/.profile
# cp -a mrhide/ ~/.local/share/tkthemes/
# echo "*TkTheme: mrhide" >> ~/.Xresources
# xmgr -merge ~/.Xresources
#
# Doc on TTK themes:
# * "Changing Widget Colors" http://wiki.tcl.tk/37973
# * "ttk::style command" https://www.tcl.tk/man/tcl/TkCmd/ttk_style.htm
# * "Styles and Themes tutorial" http://www.tkdocs.com/tutorial/styles.html
namespace eval ttk::theme::mrhide {
variable version 0.0.1
variable colors
array set colors {
-disabledfg "#121212"
-frame "#424242"
-window "#000000"
-dark "#222222"
-darker "#121212"
-darkest "#000000"
-lighter "#626262"
-lightest "#a0a0a0"
-selectbg "#4a6984"
-selectfg "#ffffff"
}
ttk::style theme create mrhide -parent clam -settings {
ttk::style configure "." \
-background $colors(-frame) \
-foreground white \
-bordercolor $colors(-darkest) \
-darkcolor $colors(-dark) \
-lightcolor $colors(-lighter) \
-troughcolor $colors(-darker) \
-selectbackground $colors(-selectbg) \
-selectforeground $colors(-selectfg) \
-selectborderwidth 0 \
-font TkDefaultFont \
;
ttk::style map "." \
-background [list disabled $colors(-frame) \
active $colors(-lighter)] \
-foreground [list disabled $colors(-disabledfg)] \
-selectbackground [list !focus $colors(-darkest)] \
-selectforeground [list !focus white] \
;
# -selectbackground [list !focus "#847d73"]
ttk::style configure TButton \
-anchor center -width -11 -padding 5 -relief raised
ttk::style map TButton \
-background [list \
disabled $colors(-frame) \
pressed $colors(-darker) \
active $colors(-lighter)] \
-lightcolor [list pressed $colors(-darker)] \
-darkcolor [list pressed $colors(-darker)] \
-bordercolor [list alternate "#000000"] \
;
ttk::style configure Toolbutton \
-anchor center -padding 2 -relief flat
ttk::style map Toolbutton \
-relief [list \
disabled flat \
selected sunken \
pressed sunken \
active raised] \
-background [list \
disabled $colors(-frame) \
pressed $colors(-darker) \
active $colors(-lighter)] \
-lightcolor [list pressed $colors(-darker)] \
-darkcolor [list pressed $colors(-darker)] \
;
ttk::style configure TCheckbutton \
-indicatorbackground "#ffffff" \
-indicatormargin {1 1 4 1} \
-padding 2 ;
ttk::style configure TRadiobutton \
-indicatorbackground "#ffffff" \
-indicatormargin {1 1 4 1} \
-padding 2 ;
ttk::style map TCheckbutton -indicatorbackground \
[list disabled $colors(-frame) pressed $colors(-frame)]
ttk::style map TRadiobutton -indicatorbackground \
[list disabled $colors(-frame) pressed $colors(-frame)]
ttk::style configure TMenubutton \
-width -11 -padding 5 -relief raised
ttk::style configure TEntry \
-background $colors(-darker) \
-fieldbackground $colors(-darker) \
-foreground "#ffffff" \
-padding 1 -insertwidth 1
ttk::style map TEntry \
-background [list {readonly disabled} $colors(-frame)] \
-fieldbackground [list {readonly disabled} $colors(-frame)] \
-bordercolor [list focus $colors(-selectbg)] \
;
ttk::style configure TCombobox \
-padding 1 -insertwidth 1
ttk::style map TCombobox \
-background [list active $colors(-lighter) \
pressed $colors(-lighter)] \
-fieldbackground [list {readonly focus} $colors(-selectbg) \
readonly $colors(-frame)] \
-foreground [list {readonly focus} $colors(-selectfg)] \
;
option add *TCombobox*Listbox.background $colors(-frame)
ttk::style configure ComboboxPopdownFrame \
-relief solid -borderwidth 1
ttk::style configure TSpinbox -arrowsize 10 -padding {2 0 10 0}
ttk::style map TSpinbox \
-background [list readonly $colors(-frame)] \
-arrowcolor [list disabled $colors(-disabledfg)]
ttk::style configure TNotebook.Tab -padding {6 2 6 2}
ttk::style map TNotebook.Tab \
-padding [list selected {6 4 6 2}] \
-background [list selected $colors(-frame) {} $colors(-darker)] \
-lightcolor [list selected $colors(-lighter) {} $colors(-dark)] \
;
# Treeview:
ttk::style configure Heading \
-font TkHeadingFont -relief raised -padding {3}
ttk::style configure Treeview -background $colors(-window)
ttk::style map Treeview \
-background [list selected $colors(-selectbg)] \
-foreground [list selected $colors(-selectfg)] ;
ttk::style configure TLabelframe \
-labeloutside true -labelmargins {0 0 0 4} \
-borderwidth 2 -relief raised
ttk::style configure TProgressbar -background $colors(-frame)
ttk::style configure Sash -sashthickness 6 -gripcount 10
}
}
package provide ttk::theme::mrhide $::ttk::theme::mrhide::version
package ifneeded ttk::theme::mrhide 0.0.1 \
[list source [file join $dir mrhide.tcl]]
*TkTheme: mrhide
@baylej
Copy link
Author

baylej commented Jan 4, 2021

Dark gitk Theme for linux.
Replace underscores with the path separator /.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment