Refactor Hyprland configs, introduce Sithego for theming, and add supporting scripts

This commit is contained in:
2026-02-17 20:42:41 +01:00
parent c57ef06442
commit 8b153d54ac
60 changed files with 1896 additions and 76 deletions
@@ -0,0 +1,60 @@
package starship
import (
"Sithego/themer"
"os"
"path/filepath"
"text/template"
)
type Adapter struct {
OutputDir string
}
type Option func(*Adapter)
func WithOutputDir(dir string) Option {
return func(a *Adapter) {
a.OutputDir = dir
}
}
func New(opt ...Option) *Adapter {
home, _ := os.UserHomeDir()
a := &Adapter{
OutputDir: home + "/.config/",
}
for _, o := range opt {
o(a)
}
return a
}
func (a *Adapter) Name() string {
return "Starship"
}
func (a *Adapter) Generate(t themer.Theme) error {
templatePath := filepath.Join("themer/adapters/starship", "starship.toml")
templ, err := template.ParseFiles(templatePath)
if err != nil {
return err
}
outputPath := filepath.Join(a.OutputDir, "starship.toml")
file, err := os.Create(outputPath)
if err != nil {
return err
}
err = templ.Execute(file, struct {
Theme themer.Theme
}{
Theme: t,
})
_ = file.Close()
if err != nil {
return err
}
return nil
}
@@ -0,0 +1,159 @@
"$schema" = 'https://starship.rs/config-schema.json'
format = """
[](color_bg1)\
[](bg:color_bg1 fg:color_fg0)\
$username\
[](fg:color_bg1)\
$directory\
[](bg:color_bg1 fg:color_black)\
$git_branch\
$git_status\
[](fg:color_bg1 bg:color_blue)\
$c\
$cpp\
$rust\
$golang\
$nodejs\
$php\
$java\
$kotlin\
$haskell\
$python\
[](fg:color_blue bg:color_bg3)\
$docker_context\
$conda\
$pixi\
[](fg:color_bg3 bg:color_bg1)\
$time\
[ ](fg:color_bg1)\
$cmd_duration\
$line_break$character"""
palette = 'serpensortia'
[palettes.serpensortia]
color_black = "#000000"
color_fg0 = "{{ .Theme.Colors.Semantic.Text.Value }}"
color_bg1 = "{{ .Theme.Colors.Semantic.Surface.Value }}"
color_bg3 = "{{ .Theme.Colors.Semantic.SurfaceAlt.Value }}"
color_blue = "{{ .Theme.Colors.Semantic.Accent.Value }}"
color_aqua = "{{ .Theme.Colors.Semantic.Accent.Value }}"
color_accent = "{{ .Theme.Colors.Semantic.Accent.Value }}"
color_orange = "{{ .Theme.Colors.Semantic.Accent.Value }}"
color_purple = "{{ .Theme.Colors.Semantic.Accent.Value }}"
color_warn = "{{ .Theme.Colors.Semantic.Accent.Value }}"
color_yellow = "{{ .Theme.Colors.Semantic.Accent.Value }}"
[username]
show_always = true
style_user = "bg:color_bg1 fg:color_accent"
style_root = "bg:color_warn fg:color_bg1"
format = '[ $user ]($style)'
[directory]
style = "fg:color_bg0 bg:color_text"
format = "[ $path ]($style)[$read_only]($read_only_style) "
read_only_style = "{{ .Theme.Colors.Semantic.Warn.Value }}"
read_only = "󰌾"
truncation_length = 0
truncation_symbol = "…/"
[directory.substitutions]
"Documents" = "󰈙 "
"Downloads" = " "
"Music" = "󰝚 "
"Pictures" = " "
"workspace" = "󰲋 "
[git_branch]
symbol = ""
style = "bg:color_bg1"
format = '[[ $symbol $branch ](fg:color_accent bg:color_bg1)]($style)'
[git_status]
style = "bg:color_bg1"
format = '[[($all_status$ahead_behind )](fg:color_accent bg:color_bg1)]($style)'
[nodejs]
symbol = ""
style = "bg:color_blue"
format = '[[ $symbol( $version) ](fg:color_fg0 bg:color_blue)]($style)'
[c]
symbol = " "
style = "bg:color_blue"
format = '[[ $symbol( $version) ](fg:color_fg0 bg:color_blue)]($style)'
[cpp]
symbol = " "
style = "bg:color_blue"
format = '[[ $symbol( $version) ](fg:color_fg0 bg:color_blue)]($style)'
[rust]
symbol = ""
style = "bg:color_blue"
format = '[[ $symbol( $version) ](fg:color_fg0 bg:color_blue)]($style)'
[golang]
symbol = ""
style = "bg:color_blue"
format = '[[ $symbol( $version) ](fg:color_fg0 bg:color_blue)]($style)'
[php]
symbol = ""
style = "bg:color_blue"
format = '[[ $symbol( $version) ](fg:color_fg0 bg:color_blue)]($style)'
[java]
symbol = ""
style = "bg:color_blue"
format = '[[ $symbol( $version) ](fg:color_fg0 bg:color_blue)]($style)'
[kotlin]
symbol = ""
style = "bg:color_blue"
format = '[[ $symbol( $version) ](fg:color_fg0 bg:color_blue)]($style)'
[haskell]
symbol = ""
style = "bg:color_blue"
format = '[[ $symbol( $version) ](fg:color_fg0 bg:color_blue)]($style)'
[python]
symbol = ""
style = "bg:color_blue"
format = '[[ $symbol( $version) ](fg:color_fg0 bg:color_blue)]($style)'
[docker_context]
symbol = ""
style = "bg:color_bg3"
format = '[[ $symbol( $context) ](fg:#83a598 bg:color_bg3)]($style)'
[conda]
style = "bg:color_bg3"
format = '[[ $symbol( $environment) ](fg:#83a598 bg:color_bg3)]($style)'
[pixi]
style = "bg:color_bg3"
format = '[[ $symbol( $version)( $environment) ](fg:color_fg0 bg:color_bg3)]($style)'
[time]
disabled = false
time_format = "%R"
style = "bg:color_bg1"
format = '[[  $time ](fg:color_fg0 bg:color_bg1)]($style)'
[line_break]
disabled = false
[character]
disabled = false
success_symbol = '[](bold green)'
error_symbol = '[✖](bold red)'
[cmd_duration]
disabled = false
min_time = 50
show_milliseconds = true
format = '[$duration](bold)'