Restructure internal/theme
This commit is contained in:
@@ -3,13 +3,14 @@ package registrar
|
||||
|
||||
import "os"
|
||||
import "log"
|
||||
import "git.tebibyte.media/tomo/x"
|
||||
import "git.tebibyte.media/tomo/backend/x"
|
||||
import "git.tebibyte.media/tomo/tomo"
|
||||
import "git.tebibyte.media/tomo/nasin/internal/theme/default"
|
||||
import "git.tebibyte.media/tomo/nasin/internal/theme/xdgicons"
|
||||
import "git.tebibyte.media/tomo/nasin/internal/theme/icons/xdg"
|
||||
import "git.tebibyte.media/tomo/nasin/internal/theme/icons/fallback"
|
||||
import "git.tebibyte.media/tomo/nasin/internal/theme/style/fallback"
|
||||
|
||||
func Init () error {
|
||||
theme := defaultTheme.Theme()
|
||||
theme := fallbackStyle.New()
|
||||
|
||||
iconThemeName := os.Getenv("TOMO_XDG_ICON_THEME")
|
||||
if iconThemeName != "" {
|
||||
@@ -20,8 +21,12 @@ func Init () error {
|
||||
log.Printf("nasin: could not load icon theme '%s': %v", iconThemeName, err)
|
||||
}
|
||||
}
|
||||
|
||||
if theme.IconTheme == nil {
|
||||
theme.IconTheme = fallbackIcons.New()
|
||||
}
|
||||
|
||||
tomo.SetTheme(theme)
|
||||
tomo.Register(1, x.NewBackend)
|
||||
tomo.Register(1, x.New)
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user