themer.lua

This commit is contained in:
Cat /dev/Nulo 2022-04-10 16:45:51 -03:00
parent f149028732
commit ecabff30f5
17 changed files with 54 additions and 404 deletions

1
.config/fnott/fnott.ini Symbolic link
View File

@ -0,0 +1 @@
/home/diablo/.cache/themer.lua/fnott

16
.config/foot/foot.ini Normal file
View File

@ -0,0 +1,16 @@
[scrollback]
lines = 10000
[mouse]
hide-when-typing=yes
[main]
font=monospace:pixelsize=22
line-height=33px
vertical-letter-offset=3px
pad=4x4
initial-window-size-chars=120x24
include = ~/.cache/themer.lua/foot

View File

@ -1,3 +1,5 @@
include ~/.cache/themer.lua/sway-colors
### Variables
#
set $mod Mod4
@ -197,17 +199,17 @@ bar {
strip_workspace_numbers yes
colors {
statusline #000000
background #ffffff
focused_workspace #cf1bff #cf1bff #ffffff
active_workspace #eca6ff #eca6ff #ffffff
inactive_workspace #dfdfdf #dfdfdf #000000
statusline $foreground
background $background
focused_workspace $accent $accent $background
active_workspace $accentish $accentish $background
inactive_workspace $background $background $foreground
}
}
client.focused #cf1bff #cf1bff #ffffff
client.focused_inactive #eca6ff #eca6ff #000000
client.unfocused #cccccc #ffffff #000000
client.focused $accent $accent $background
client.focused_inactive $accentish $accentish $foreground
client.unfocused $backgroundish $background $foreground
titlebar_border_thickness 1
bindsym $mod+z exec fnottctl dismiss

1
.config/themer.lua Submodule

@ -0,0 +1 @@
Subproject commit 53b2f5caad07178e75a85464f4e6e059685bced7

View File

@ -1,62 +0,0 @@
#!/bin/sh
set -e
# https://github.com/jan-warchol/selenized/blob/e93e0d9fb47c7485f18fa16f9bdb70c2ee7fb5db/the-values.md
echo "# Autogenerated by ~/.config/themer/fnott.ini.sh
edge-margin-vertical=5
edge-margin-horizontal=5
padding-vertical=10
padding-horizontal=10
notification-margin=5
selection-helper=fuzzel-run -d
play-sound=mpv \${filename}
border-color=909090
border-size=0
title-font=sans serif:style=Italic:size=8
summary-font=sans serif:style=Bold:size=16
body-font=sans serif:size=12
" > ~/.config/fnott/fnott.ini
rose_pine () {
echo "
background=$base
title-color=$text
summary-color=$text
body-color=$text
" >> ~/.config/fnott/fnott.ini
}
mono () {
echo "
background=$backgroundish
title-color=$foreground
summary-color=$foreground
body-color=$foreground
" >> ~/.config/fnott/fnott.ini
}
if test "$1" = rose-pine; then
. ~/.config/themer/themes/rose-pine.sh
rose_pine
elif test "$1" = rose-pine-dawn; then
. ~/.config/themer/themes/rose-pine-dawn.sh
rose_pine
elif test "$1" = rose-pine-moon; then
. ~/.config/themer/themes/rose-pine-moon.sh
rose_pine
elif test "$1" = mono; then
. ~/.config/themer/themes/mono.sh
mono
elif test "$1" = mono-light; then
. ~/.config/themer/themes/mono-light.sh
mono
else
if test -n "$1"; then
echo "I don't know that theme"
else
echo "No theme specified"
fi
exit 1
fi

View File

@ -1,113 +0,0 @@
#!/bin/sh
set -e
# https://github.com/jan-warchol/selenized/blob/e93e0d9fb47c7485f18fa16f9bdb70c2ee7fb5db/the-values.md
echo "# Autogenerated by ~/.config/themer/foot.ini.sh
[scrollback]
lines = 10000
[mouse]
hide-when-typing=yes
[main]
font=monospace:pixelsize=22
line-height=33px
vertical-letter-offset=3px
pad=4x4
initial-window-size-chars=120x24
" > ~/.config/foot/foot.ini
rose_pine () {
if $dark; then
alpha=1
else
alpha=1
fi
echo "
[cursor]
color = $inactive $text
[colors]
background = $base
foreground = $text
alpha = $alpha
selection-foreground = $text
selection-background = $highlight
urls = $iris
regular0 = $overlay
regular1 = $love
regular2 = $pine
regular3 = $gold
regular4 = $foam
regular5 = $iris
regular6 = $rose
regular7 = $text
bright0 = $subtle
bright1 = $love
bright2 = $pine
bright3 = $gold
bright4 = $foam
bright5 = $iris
bright6 = $rose
bright7 = $text
" >> ~/.config/foot/foot.ini
}
mono () {
if $dark; then
echo "include = /usr/share/foot/themes/selenized-black" >> ~/.config/foot/foot.ini
else
echo "
[colors]
foreground=000000
background=ffffff
regular0=ffffff # black (or white in a bright theme)
regular1=7f1010 # red
regular2=009A57 # green
regular3=813e00 # yellow
regular4=0186C7 # blue
regular5=721045 # magenta
regular6=00538b # cyan
regular7=000000 # white (or black in a bright theme)
bright0=e4e4e4
bright1=ff8686
bright2=bcd2aa
bright3=989838
bright4=00AEFF
bright5=8888CC
bright6=4FA8A8
bright7=000000" >> ~/.config/foot/foot.ini
fi
}
if test "$1" = rose-pine; then
. ~/.config/themer/themes/rose-pine.sh
rose_pine
elif test "$1" = rose-pine-dawn; then
. ~/.config/themer/themes/rose-pine-dawn.sh
rose_pine
elif test "$1" = rose-pine-moon; then
. ~/.config/themer/themes/rose-pine-moon.sh
rose_pine
elif test "$1" = mono; then
. ~/.config/themer/themes/mono.sh
mono
elif test "$1" = mono-light; then
. ~/.config/themer/themes/mono-light.sh
mono
else
if test -n "$1"; then
echo "I don't know that theme"
else
echo "No theme specified"
fi
exit 1
fi

View File

@ -1,64 +0,0 @@
#!/bin/sh
set -e
echo "#!/bin/sh
# Autogenerated by ~/.config/themer/fuzzel.sh
" > ~/.local/bin/fuzzel-run
rose_pine () {
echo "
export background=$base
export foreground=$text
export selection_background=$highlight
export selection_foreground=$text
export border=$text
export accent=$iris
" >> ~/.local/bin/fuzzel-run
}
mono () {
echo "
export background=$background
export foreground=$foreground
export selection_background=$backgroundish
export selection_foreground=$foreground
export border=$foreground
export accent=$foreground
" >> ~/.local/bin/fuzzel-run
}
if test "$1" = rose-pine; then
. ~/.config/themer/themes/rose-pine.sh
rose_pine
elif test "$1" = rose-pine-dawn; then
. ~/.config/themer/themes/rose-pine-dawn.sh
rose_pine
elif test "$1" = rose-pine-moon; then
. ~/.config/themer/themes/rose-pine-moon.sh
rose_pine
elif test "$1" = mono; then
. ~/.config/themer/themes/mono.sh
mono
elif test "$1" = mono-light; then
. ~/.config/themer/themes/mono-light.sh
mono
else
if test -n "$1"; then
echo "I don't know that theme"
else
echo "No theme specified"
fi
exit 1
fi
echo "
exec fuzzel --terminal=footclient --font='monospace:pixelsize=22' \
--prompt='➦ ' \
--no-icons \
--width=40 \
--background=\${background}ff --text-color=\${foreground}ff \
--match-color=\${accent}ff \
--selection-color=\${selection_background}ff --selection-text-color=\${selection_foreground}ff \
--horizontal-pad=12 \
--border-width=1 --border-color=\${border}ff --border-radius=2 \"\$@\"
" >> ~/.local/bin/fuzzel-run
chmod +x ~/.local/bin/fuzzel-run

View File

@ -1,44 +0,0 @@
#!/bin/sh
set -e
dark_light () {
if "$dark"; then
gsettings set org.gnome.desktop.interface gtk-theme Adwaita
# gsettings set org.freedesktop.appearance color-scheme 1
echo '# Autogenerated by ~/.config/themer/gtk.sh
gtk-theme-name="Adwaita-dark"' > ~/.gtkrc-2.0
else
gsettings set org.gnome.desktop.interface gtk-theme Adwaita-light
# gsettings set org.freedesktop.appearance color-scheme 2
echo '# Autogenerated by ~/.config/themer/gtk.sh
gtk-theme-name="Adwaita"' > ~/.gtkrc-2.0
fi
echo "# Autogenerated by ~/.config/themer/gtk.sh
[Settings]
gtk-application-prefer-dark-theme = $dark
gtk-decoration-layout=menu:" > ~/.config/gtk-3.0/settings.ini
}
if test "$1" = rose-pine; then
. ~/.config/themer/themes/rose-pine.sh
dark_light
elif test "$1" = rose-pine-dawn; then
. ~/.config/themer/themes/rose-pine-dawn.sh
dark_light
elif test "$1" = rose-pine-moon; then
. ~/.config/themer/themes/rose-pine-moon.sh
dark_light
elif test "$1" = mono; then
. ~/.config/themer/themes/mono.sh
dark_light
elif test "$1" = mono-light; then
. ~/.config/themer/themes/mono-light.sh
dark_light
else
if test -n "$1"; then
echo "I don't know that theme"
else
echo "No theme specified"
fi
exit 1
fi

View File

@ -1,42 +0,0 @@
#!/bin/sh
set -e
generate () {
echo "#!/bin/sh
# Autogenerated by ~/.config/themer/lock.sh
setsid -f swaylockd --color $background \
--show-failed-attempts
sleep 1
" > ~/.local/bin/lock
}
rose_pine () {
background=$base generate
}
mono () {
generate
}
if test "$1" = rose-pine; then
. ~/.config/themer/themes/rose-pine.sh
rose_pine
elif test "$1" = rose-pine-dawn; then
. ~/.config/themer/themes/rose-pine-dawn.sh
rose_pine
elif test "$1" = rose-pine-moon; then
. ~/.config/themer/themes/rose-pine-moon.sh
rose_pine
elif test "$1" = mono; then
. ~/.config/themer/themes/mono.sh
mono
elif test "$1" = mono-light; then
. ~/.config/themer/themes/mono-light.sh
mono
else
if test -n "$1"; then
echo "I don't know that theme"
else
echo "No theme specified"
fi
exit 1
fi

View File

@ -1,7 +0,0 @@
#!/bin/sh
export background=ffffff
export backgroundish=dfdfdf
export foreground=000000
export foregroundish=333333
export accent=cf1bff
export dark=false

View File

@ -1,7 +0,0 @@
#!/bin/sh
export background=000000
export backgroundish=333333
export foreground=bbbbbb
export foregroundish=777777
export accent=907aa9
export dark=true

View File

@ -1,17 +0,0 @@
#!/bin/sh
export base=faf4ed
export surface=fffaf3
export overlay=f2e9de
export inactive=9893a5
export subtle=6e6a86
export text=575279
export love=b4637a
export gold=ea9d34
export rose=d7827e
export pine=286983
export foam=56949f
export iris=907aa9
export highlight=eee9e6
export highlightInactive=f2ede9
export highlightOverlay=e4dfde
export dark=false

View File

@ -1,17 +0,0 @@
#!/bin/sh
export base=232136
export surface=2a273f
export overlay=393552
export inactive=59546d
export subtle=817c9c
export text=e0def4
export love=eb6f92
export gold=f6c177
export rose=ea9a97
export pine=3e8fb0
export foam=9ccfd8
export iris=c4a7e7
export highlight=312f44
export highlightInactive=2a283d
export highlightOverlay=3f3c53
export dark=true

View File

@ -1,17 +0,0 @@
#!/bin/sh
export base=191724
export surface=1f1d2e
export overlay=26233a
export inactive=555169
export subtle=6e6a86
export text=e0def4
export love=eb6f92
export gold=f6c177
export rose=ebbcba
export pine=31748f
export foam=9ccfd8
export iris=c4a7e7
export highlight=2a2837
export highlightInactive=211f2d
export highlightOverlay=3a384a
export dark=true

3
.gitmodules vendored
View File

@ -10,3 +10,6 @@
[submodule ".config/vis/plugins/fzf-mru"]
path = .config/vis/plugins/fzf-mru
url = https://github.com/peaceant/vis-fzf-mru
[submodule "/home/diablo/.config/themer.lua"]
path = /home/diablo/.config/themer.lua
url = https://gitea.nulo.in/Nulo/themer.lua

18
.local/bin/fuzzel-run Executable file
View File

@ -0,0 +1,18 @@
#!/bin/sh
. ~/.cache/themer.lua/fuzzel
exec fuzzel \
--terminal=footclient \
--font='monospace:pixelsize=22' \
--prompt='➦ ' \
--no-icons \
--width=40 \
--background=${background}ff \
--text-color=${foreground}ff \
--match-color=${accent}ff \
--selection-color=${selection_background}ff \
--selection-text-color=${selection_foreground}ff \
--horizontal-pad=12 \
--border-width=1 \
--border-color=${border}ff \
--border-radius=2 "$@"

View File

@ -1,12 +1,11 @@
#!/bin/sh
set -e
set -ex
if test -n "$1"; then
~/.config/themer/foot.ini.sh "$1"
~/.config/themer/fnott.ini.sh "$1"
~/.config/themer/fuzzel.sh "$1"
~/.config/themer/lock.sh "$1"
~/.config/themer/gtk.sh "$1"
. ~/.config/themer/themes/"$1".sh
~/.config/themer/fuzzel.sh
~/.config/themer/lock.sh
~/.config/themer/gtk.sh
else
echo "No theme specified"
exit 1