Initial commit
This commit is contained in:
commit
cfcc57a8bd
353 changed files with 18756 additions and 0 deletions
4
dotfile/.themes/openbox-lean/openbox-3/bullet.xbm
Normal file
4
dotfile/.themes/openbox-lean/openbox-3/bullet.xbm
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
#define bullet_width 8
|
||||
#define bullet_height 8
|
||||
static unsigned char bullet_bits[] = {
|
||||
0x00, 0x08, 0x10, 0x20, 0x20, 0x10, 0x08, 0x00 };
|
||||
4
dotfile/.themes/openbox-lean/openbox-3/close.xbm
Normal file
4
dotfile/.themes/openbox-lean/openbox-3/close.xbm
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
#define close_width 8
|
||||
#define close_height 8
|
||||
static unsigned char close_bits[] = {
|
||||
0x81, 0x42, 0x24, 0x18, 0x18, 0x24, 0x42, 0x81 };
|
||||
4
dotfile/.themes/openbox-lean/openbox-3/desk.xbm
Normal file
4
dotfile/.themes/openbox-lean/openbox-3/desk.xbm
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
#define desk_width 8
|
||||
#define desk_height 8
|
||||
static unsigned char desk_bits[] = {
|
||||
0x18, 0x24, 0x42, 0x81, 0x81, 0x42, 0x24, 0x18 };
|
||||
4
dotfile/.themes/openbox-lean/openbox-3/desk_toggled.xbm
Normal file
4
dotfile/.themes/openbox-lean/openbox-3/desk_toggled.xbm
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
#define desk_toggled_width 8
|
||||
#define desk_toggled_height 8
|
||||
static unsigned char desk_toggled_bits[] = {
|
||||
0x18, 0x3c, 0x7e, 0xff, 0xff, 0x7e, 0x3c, 0x18 };
|
||||
4
dotfile/.themes/openbox-lean/openbox-3/iconify.xbm
Normal file
4
dotfile/.themes/openbox-lean/openbox-3/iconify.xbm
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
#define iconify_width 8
|
||||
#define iconify_height 8
|
||||
static unsigned char iconify_bits[] = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff };
|
||||
4
dotfile/.themes/openbox-lean/openbox-3/max.xbm
Normal file
4
dotfile/.themes/openbox-lean/openbox-3/max.xbm
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
#define max_width 8
|
||||
#define max_height 8
|
||||
static unsigned char max_bits[] = {
|
||||
0xff, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0xff };
|
||||
4
dotfile/.themes/openbox-lean/openbox-3/max_toggled.xbm
Normal file
4
dotfile/.themes/openbox-lean/openbox-3/max_toggled.xbm
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
#define max_toggled_width 8
|
||||
#define max_toggled_height 8
|
||||
static unsigned char max_toggled_bits[] = {
|
||||
0xfc, 0x80, 0xbf, 0xa1, 0xa1, 0xa1, 0x21, 0x3f };
|
||||
233
dotfile/.themes/openbox-lean/openbox-3/set.py
Executable file
233
dotfile/.themes/openbox-lean/openbox-3/set.py
Executable file
|
|
@ -0,0 +1,233 @@
|
|||
#!/usr/bin/env python
|
||||
import gi; gi.require_version('Gtk', '3.0')
|
||||
from gi.repository import Gtk, Gdk
|
||||
from functools import reduce
|
||||
import sys, os, re
|
||||
|
||||
|
||||
|
||||
|
||||
Colors = {
|
||||
'AB' : { 'Name' : 'Active Back', 'Default' : '#579c8e' },
|
||||
'AF' : { 'Name' : 'Active Fore', 'Default' : '#ffffff' },
|
||||
'AL' : { 'Name' : 'Active Line', 'Default' : '#292929' },
|
||||
'NB' : { 'Name' : 'Normal Back', 'Default' : '#383838' },
|
||||
'NF' : { 'Name' : 'Normal Fore', 'Default' : '#dadada' },
|
||||
'NL' : { 'Name' : 'Normal Line', 'Default' : '#292929' },
|
||||
}
|
||||
|
||||
Options = {
|
||||
'B?' : { 'Name' : 'Borders', 'Default' : True },
|
||||
'H?' : { 'Name' : 'Active Handle', 'Default' : False },
|
||||
'G?' : { 'Name' : 'Gradients', 'Default' : False },
|
||||
'R?' : { 'Name' : 'Raised', 'Default' : False },
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
def Init (l):
|
||||
for r in l.values():
|
||||
r['Initial'] = r['Value'] = r['Default']
|
||||
|
||||
Init(Colors)
|
||||
Init(Options)
|
||||
|
||||
|
||||
|
||||
|
||||
Dir = os.path.dirname(os.path.realpath(sys.argv[0]))
|
||||
InPath = Dir + '/themerc.in'
|
||||
OutPath = Dir + '/themerc'
|
||||
|
||||
|
||||
|
||||
|
||||
def InitV (k, vs, f, s):
|
||||
if k in vs: vs[k]['Initial'] = vs[k]['Value'] = f(s)
|
||||
|
||||
with open(Dir + '/themerc') as f:
|
||||
for l in f.readlines():
|
||||
|
||||
if l[0] != '#': continue
|
||||
ss = l.strip().split(' ')
|
||||
k, v = ss[0].lstrip('#'), ss[1]
|
||||
|
||||
InitV(k, Colors, lambda s: s, v)
|
||||
InitV(k, Options, lambda s: (v == 'True'), v)
|
||||
|
||||
|
||||
|
||||
|
||||
def Read (path):
|
||||
with open(path) as f:
|
||||
return f.read()
|
||||
|
||||
|
||||
|
||||
|
||||
def Rgb8 (c):
|
||||
return [int(c[i:i+2], 16) for i in (1, 3, 5)]
|
||||
|
||||
def Hex8FromRgb8 (c):
|
||||
return '#%02x%02x%02x' % tuple(c)
|
||||
|
||||
def Hex8FromRgb (c):
|
||||
return Hex8FromRgb8 (
|
||||
map(lambda f: int(f * 0xFF), c)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
def Subst (src, op, cl, fun):
|
||||
|
||||
s = src.split(op)
|
||||
o = s[0]
|
||||
|
||||
for si in range(1, len(s)):
|
||||
b = s[si].split(cl)
|
||||
o = o + fun(b[0]) + b[1]
|
||||
|
||||
return o
|
||||
|
||||
|
||||
def SubstCond (s):
|
||||
|
||||
kv = s.split(' ', 1)
|
||||
yn = kv[1].split('!')
|
||||
|
||||
return yn[0] if Options[kv[0]]['Value'] else yn[1]
|
||||
|
||||
|
||||
def SubstColor (s):
|
||||
|
||||
def pone (c):
|
||||
if (c.startswith('#')): return Rgb8(c)
|
||||
else: return Rgb8(Colors[c]['Value'])
|
||||
|
||||
def addc (a, b):
|
||||
return map(lambda c0, c1: c0 + c1, a, b)
|
||||
|
||||
def divc (c, d):
|
||||
return map(lambda c: int(c / d), c)
|
||||
|
||||
cs = [pone(c) for c in s.split(' ')];
|
||||
return Hex8FromRgb8(divc(reduce(addc, cs), len(cs)))
|
||||
|
||||
|
||||
def ExVals (vs):
|
||||
return '\n'.join (
|
||||
map (
|
||||
lambda k: '#' + k + ' ' + str(vs[k]['Value']), vs
|
||||
)
|
||||
) + '\n'
|
||||
|
||||
|
||||
def Apply ():
|
||||
|
||||
s = Read(InPath)
|
||||
|
||||
s = Subst(s, '[', ']', SubstCond)
|
||||
s = Subst(s, '{', '}', SubstColor)
|
||||
|
||||
s = ExVals(Colors) + ExVals(Options) + '\n' + s
|
||||
|
||||
with open(OutPath, 'w') as of: of.write(s)
|
||||
os.system('openbox --reconfigure')
|
||||
|
||||
|
||||
def Reveal ():
|
||||
for c in Colors.values():
|
||||
c['Button'].set_color(Gdk.color_parse(c['Value']))
|
||||
for o in Options.values():
|
||||
o['Switch'].set_state(o['Value'])
|
||||
|
||||
|
||||
def Reset (key):
|
||||
for c in list(Colors.values()) + list(Options.values()):
|
||||
c['Value'] = c[key]
|
||||
Reveal()
|
||||
|
||||
|
||||
def FromGtk ():
|
||||
|
||||
m = Gtk.Menu()
|
||||
i = Gtk.MenuItem()
|
||||
w = Gtk.Window()
|
||||
m.add(i)
|
||||
|
||||
ms = m.get_style_context()
|
||||
rs = i.get_style_context()
|
||||
ws = w.get_style_context()
|
||||
|
||||
def ccc (key, gc):
|
||||
Colors[key]['Value'] = Hex8FromRgb([gc.red, gc.green, gc.blue])
|
||||
|
||||
ccc('AB', rs.get_background_color(Gtk.StateFlags.PRELIGHT))
|
||||
ccc('AF', rs.get_color(Gtk.StateFlags.PRELIGHT))
|
||||
ccc('AL', ms.get_border_color(Gtk.StateFlags.PRELIGHT))
|
||||
ccc('NB', ws.get_background_color(Gtk.StateFlags.NORMAL))
|
||||
ccc('NF', ws.get_color(Gtk.StateFlags.NORMAL))
|
||||
ccc('NL', ms.get_border_color(Gtk.StateFlags.NORMAL))
|
||||
|
||||
Reveal()
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
W = Gtk.Window(title = "Lean OB")
|
||||
W.set_icon_name("applications-graphics")
|
||||
W.connect("destroy", lambda e: Gtk.main_quit())
|
||||
W.set_resizable(False)
|
||||
W.set_border_width(8)
|
||||
|
||||
T = Gtk.Grid()
|
||||
T.set_row_spacing(4)
|
||||
T.set_column_spacing(4)
|
||||
T.Rows = 0
|
||||
|
||||
def AddRow (t, label, o):
|
||||
t.attach(Gtk.Label(label + ':'), 0, t.Rows, 1, 1)
|
||||
t.attach(o, 1, T.Rows, 1, 1)
|
||||
t.Rows = t.Rows + 1
|
||||
|
||||
def SetC (ck, c):
|
||||
Colors[ck]['Value'] = Hex8FromRgb(c.to_floats())
|
||||
|
||||
def SetO (ok, o):
|
||||
Options[ok]['Value'] = o
|
||||
|
||||
for ck in sorted(Colors):
|
||||
c = Colors[ck]
|
||||
cbtn = c['Button'] = Gtk.ColorButton(color = Gdk.color_parse(c['Value']))
|
||||
cbtn.connect('color-set', lambda b, k: SetC(k, b.get_color()), ck)
|
||||
AddRow(T, c['Name'], cbtn)
|
||||
|
||||
for ok in sorted(Options):
|
||||
o = Options[ok]
|
||||
osw = o['Switch'] = Gtk.Switch(state = o['Value'])
|
||||
osw.connect('state-set', lambda s, v, k: SetO(k, v), ok)
|
||||
AddRow(T, o['Name'], osw)
|
||||
|
||||
DefaultBtn = Gtk.Button("Default")
|
||||
RevertBtn = Gtk.Button("Revert")
|
||||
FromGtkBtn = Gtk.Button("From GTK")
|
||||
ApplyBtn = Gtk.Button("Apply")
|
||||
|
||||
DefaultBtn.connect('clicked', lambda e: Reset('Default'))
|
||||
RevertBtn.connect('clicked', lambda e: Reset('Initial'))
|
||||
FromGtkBtn.connect('clicked', lambda e: FromGtk())
|
||||
ApplyBtn.connect('clicked', lambda e: Apply())
|
||||
|
||||
V = Gtk.VBox(spacing = 8)
|
||||
V.pack_start(DefaultBtn, True, True, 0)
|
||||
V.pack_start(FromGtkBtn, True, True, 0)
|
||||
V.pack_start(T, True, True, 0)
|
||||
V.pack_start(RevertBtn, True, True, 0)
|
||||
V.pack_start(ApplyBtn, True, True, 0)
|
||||
W.add(V)
|
||||
|
||||
W.show_all()
|
||||
Gtk.main()
|
||||
4
dotfile/.themes/openbox-lean/openbox-3/shade.xbm
Normal file
4
dotfile/.themes/openbox-lean/openbox-3/shade.xbm
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
#define shade_width 8
|
||||
#define shade_height 8
|
||||
static unsigned char shade_bits[] = {
|
||||
0x18, 0x24, 0x42, 0x81, 0x00, 0x00, 0x00, 0x00 };
|
||||
4
dotfile/.themes/openbox-lean/openbox-3/shade_toggled.xbm
Normal file
4
dotfile/.themes/openbox-lean/openbox-3/shade_toggled.xbm
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
#define shade_toggled_width 8
|
||||
#define shade_toggled_height 8
|
||||
static unsigned char shade_toggled_bits[] = {
|
||||
0x81, 0x42, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00 };
|
||||
16
dotfile/.themes/openbox-lean/openbox-3/shell.nix
Normal file
16
dotfile/.themes/openbox-lean/openbox-3/shell.nix
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
let
|
||||
pkgs = import <nixpkgs> {};
|
||||
in
|
||||
|
||||
pkgs.mkShell {
|
||||
buildInputs = with pkgs; [
|
||||
gtk3
|
||||
python3
|
||||
python3Packages.pygobject3
|
||||
wrapGAppsHook
|
||||
];
|
||||
|
||||
shellHook = ''
|
||||
echo "GTK3 Ready"
|
||||
'';
|
||||
}
|
||||
81
dotfile/.themes/openbox-lean/openbox-3/themerc
Normal file
81
dotfile/.themes/openbox-lean/openbox-3/themerc
Normal file
|
|
@ -0,0 +1,81 @@
|
|||
#AB #222222
|
||||
#AF #ffffff
|
||||
#AL #292929
|
||||
#NB #2d2d2d
|
||||
#NF #dadada
|
||||
#NL #292929
|
||||
#B? True
|
||||
#H? False
|
||||
#G? False
|
||||
#R? False
|
||||
|
||||
border.width: 1
|
||||
padding.width: 4
|
||||
padding.height: 2
|
||||
window.client.padding.width: 0
|
||||
window.client.padding.height: 0
|
||||
window.handle.width: 4
|
||||
|
||||
*.active.border.color: #292929
|
||||
*.inactive.border.color: #292929
|
||||
|
||||
window.*.grip.bg: parentrelative
|
||||
window.*.title.bg: flat solid
|
||||
window.*.label.bg: parentrelative
|
||||
window.*.button.*.bg: parentrelative
|
||||
window.*.handle.bg: flat solid
|
||||
window.*.text.justify: center
|
||||
|
||||
window.active.title.bg.color: #222222
|
||||
window.active.title.bg.colorTo: #191919
|
||||
window.active.label.text.color: #ffffff
|
||||
window.active.button.*.unpressed.image.color: #ffffff
|
||||
window.active.button.*.disabled.image.color: #6b6b6b
|
||||
window.active.button.*.hover.image.color: #909090
|
||||
window.active.button.*.pressed.image.color: #111111
|
||||
window.active.handle.bg.color: #2d2d2d
|
||||
window.active.handle.bg.colorTo: #1e1e1e
|
||||
|
||||
window.inactive.title.bg.color: #2d2d2d
|
||||
window.inactive.title.bg.colorTo: #212121
|
||||
window.inactive.label.text.color: #838383
|
||||
window.inactive.button.*.unpressed.image.color: #838383
|
||||
window.inactive.button.*.disabled.image.color: #666666
|
||||
window.inactive.button.*.hover.image.color: #dadada
|
||||
window.inactive.button.*.pressed.image.color: #161616
|
||||
window.inactive.handle.bg.color: #2d2d2d
|
||||
window.inactive.handle.bg.colorTo: #1e1e1e
|
||||
|
||||
menu.title.bg: flat solid
|
||||
menu.title.bg.color: #222222
|
||||
menu.title.bg.colorTo: #191919
|
||||
menu.title.text.color: #ffffff
|
||||
menu.items.bg: flat solid
|
||||
menu.items.bg.color: #2d2d2d
|
||||
menu.items.bg.colorTo: #212121
|
||||
menu.items.text.color: #dadada
|
||||
menu.items.disabled.text.color: #666666
|
||||
menu.items.active.bg: flat solid
|
||||
menu.items.active.bg.color: #222222
|
||||
menu.items.active.bg.colorTo: #191919
|
||||
menu.items.active.text.color: #ffffff
|
||||
menu.items.active.disabled.text.color: #6b6b6b
|
||||
menu.separator.color: #292929
|
||||
menu.separator.padding.width: 0
|
||||
menu.separator.width: 1
|
||||
|
||||
osd.bg: flat solid
|
||||
osd.bg.color: #2d2d2d
|
||||
osd.bg.colorTo: #212121
|
||||
osd.unhilight.bg: flat solid
|
||||
osd.unhilight.bg.color: #2d2d2d
|
||||
osd.unhilight.bg.colorTo: #212121
|
||||
osd.hilight.bg: flat solid
|
||||
osd.hilight.bg.color: #222222
|
||||
osd.hilight.bg.colorTo: #191919
|
||||
|
||||
font.ActiveWindow: JetBrainsMono
|
||||
font.InactiveWindow: JetBrainsMono
|
||||
font.MenuHeader: JetBrainsMono
|
||||
font.MenuItem: JetBrainsMono
|
||||
font.OSD: JetBrainsMono
|
||||
64
dotfile/.themes/openbox-lean/openbox-3/themerc.in
Normal file
64
dotfile/.themes/openbox-lean/openbox-3/themerc.in
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
border.width: [B? 1 ! 0]
|
||||
padding.width: 4
|
||||
padding.height: 2
|
||||
window.client.padding.width: 0
|
||||
window.client.padding.height: 0
|
||||
window.handle.width: 4
|
||||
|
||||
*.active.border.color: {AL}
|
||||
*.inactive.border.color: {NL}
|
||||
|
||||
window.*.grip.bg: parentrelative
|
||||
window.*.title.bg: [R? raised ! flat] [G? vertical gradient ! solid]
|
||||
window.*.label.bg: parentrelative
|
||||
window.*.button.*.bg: parentrelative
|
||||
window.*.handle.bg: [R? raised ! flat] [G? vertical gradient ! solid]
|
||||
window.*.text.justify: center
|
||||
|
||||
window.active.title.bg.color: {AB}
|
||||
window.active.title.bg.colorTo: {AB AB AB #000000}
|
||||
window.active.label.text.color: {AF}
|
||||
window.active.button.*.unpressed.image.color: {AF}
|
||||
window.active.button.*.disabled.image.color: {AF AB AB}
|
||||
window.active.button.*.hover.image.color: {AF AB}
|
||||
window.active.button.*.pressed.image.color: {AB #000000}
|
||||
window.active.handle.bg.color: [H? {AB} ! {NB}]
|
||||
window.active.handle.bg.colorTo: [H? {AB AB #000000} ! {NB NB #000000}]
|
||||
|
||||
window.inactive.title.bg.color: {NB}
|
||||
window.inactive.title.bg.colorTo: {NB NB NB #000000}
|
||||
window.inactive.label.text.color: {NB NF}
|
||||
window.inactive.button.*.unpressed.image.color: {NB NF}
|
||||
window.inactive.button.*.disabled.image.color: {NB NB NF}
|
||||
window.inactive.button.*.hover.image.color: {NF}
|
||||
window.inactive.button.*.pressed.image.color: {NB #000000}
|
||||
window.inactive.handle.bg.color: {NB}
|
||||
window.inactive.handle.bg.colorTo: {NB NB #000000}
|
||||
|
||||
menu.title.bg: [R? raised ! flat] [G? vertical gradient ! solid]
|
||||
menu.title.bg.color: {AB}
|
||||
menu.title.bg.colorTo: {AB AB AB #000000}
|
||||
menu.title.text.color: {AF}
|
||||
menu.items.bg: [R? raised ! flat] [G? diagonal gradient ! solid]
|
||||
menu.items.bg.color: {NB}
|
||||
menu.items.bg.colorTo: {NB NB NB #000000}
|
||||
menu.items.text.color: {NF}
|
||||
menu.items.disabled.text.color: {NF NB NB}
|
||||
menu.items.active.bg: [R? raised ! flat] [G? vertical gradient ! solid]
|
||||
menu.items.active.bg.color: {AB}
|
||||
menu.items.active.bg.colorTo: {AB AB AB #000000}
|
||||
menu.items.active.text.color: {AF}
|
||||
menu.items.active.disabled.text.color: {AF AB AB}
|
||||
menu.separator.color: {AL}
|
||||
menu.separator.padding.width: 0
|
||||
menu.separator.width: 1
|
||||
|
||||
osd.bg: [R? raised ! flat] [G? diagonal gradient ! solid]
|
||||
osd.bg.color: {NB}
|
||||
osd.bg.colorTo: {NB NB NB #000000}
|
||||
osd.unhilight.bg: [R? raised ! flat] [G? diagonal gradient ! solid]
|
||||
osd.unhilight.bg.color: {NB}
|
||||
osd.unhilight.bg.colorTo: {NB NB NB #000000}
|
||||
osd.hilight.bg: [R? raised ! flat] [G? diagonal gradient ! solid]
|
||||
osd.hilight.bg.color: {AB}
|
||||
osd.hilight.bg.colorTo: {AB AB AB #000000}
|
||||
Loading…
Add table
Add a link
Reference in a new issue