Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package nwg-look for openSUSE:Factory checked in at 2026-04-29 19:18:35 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/nwg-look (Old) and /work/SRC/openSUSE:Factory/.nwg-look.new.30200 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "nwg-look" Wed Apr 29 19:18:35 2026 rev:2 rq:1349890 version:1.0.6 Changes: -------- --- /work/SRC/openSUSE:Factory/nwg-look/nwg-look.changes 2024-06-03 17:42:59.890005382 +0200 +++ /work/SRC/openSUSE:Factory/.nwg-look.new.30200/nwg-look.changes 2026-04-29 19:19:42.209652311 +0200 @@ -1,0 +2,31 @@ +Sat Apr 25 12:38:49 UTC 2026 - Khang Lê <[email protected]> + +- Update to version 1.0.6: + * export gtk-4.0/settings.ini #99 + * export gtk-4.0/settings.ini #99 + * Fix typo in tools.go + * bump to 1.0.5 + * update dependencies + * create ~/.config/gtk-4.0/ if not found #94 + * Added tr_TR lang file. + * Add Czech lang file + * bump to 1.0.4 + * update go -> 1.23.0 #89 ; update dependencies + * add description + * don't add Inherits= if gsettings.cursorTheme == "default" #90 + * Bump version to 1.0.3 + * Fix the issue where the "listFiles" method does not resolve symbolic links + * bump to 1.0.2 + * revert to 1.0.1 + * bump to 1.0.2 + * fix #82 + * added a button to clear gtk4 symlinks in one click + * update license, README.md + * update description + * don't remove gtk-4.0 content unless explicit demanded + * symlink GTK4 stuff #79 + * List gsettings as a dependency in README.md + * Add japanese lang file. + * Update FUNDING.yml + +------------------------------------------------------------------- Old: ---- nwg-look-0.2.7.tar.gz New: ---- nwg-look-1.0.6.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ nwg-look.spec ++++++ --- /var/tmp/diff_new_pack.VYDxee/_old 2026-04-29 19:19:42.937682136 +0200 +++ /var/tmp/diff_new_pack.VYDxee/_new 2026-04-29 19:19:42.941682300 +0200 @@ -16,7 +16,7 @@ # Name: nwg-look -Version: 0.2.7 +Version: 1.0.6 Release: 0 Summary: GTK3 settings editor adapted to work in sway/wlroots environment License: MIT ++++++ _servicedata ++++++ --- /var/tmp/diff_new_pack.VYDxee/_old 2026-04-29 19:19:43.053686888 +0200 +++ /var/tmp/diff_new_pack.VYDxee/_new 2026-04-29 19:19:43.057687053 +0200 @@ -1,6 +1,6 @@ <servicedata> <service name="tar_scm"> <param name="url">https://github.com/nwg-piotr/nwg-look.git</param> - <param name="changesrevision">88f2639445084bf265ad71dba1c7af507c471762</param></service></servicedata> + <param name="changesrevision">1282e6422491ea912ac22c5f532277eb011cc5bb</param></service></servicedata> (No newline at EOF) ++++++ nwg-look-0.2.7.tar.gz -> nwg-look-1.0.6.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nwg-look-0.2.7/.github/FUNDING.yml new/nwg-look-1.0.6/.github/FUNDING.yml --- old/nwg-look-0.2.7/.github/FUNDING.yml 2024-02-12 00:43:12.000000000 +0100 +++ new/nwg-look-1.0.6/.github/FUNDING.yml 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ -github: nwg-piotr diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nwg-look-0.2.7/.gitignore new/nwg-look-1.0.6/.gitignore --- old/nwg-look-0.2.7/.gitignore 2024-02-12 00:43:12.000000000 +0100 +++ new/nwg-look-1.0.6/.gitignore 1970-01-01 01:00:00.000000000 +0100 @@ -1,21 +0,0 @@ -# Binaries for programs and plugins -*.exe -*.exe~ -*.dll -*.so -*.dylib - -# Test binary, built with `go test -c` -*.test - -# Output of the go coverage tool, specifically when used with LiteIDE -*.out - -# Dependency directories (remove the comment below to include it) -# vendor/ - -.idea/ -bin/ -nwg-look -*.glade~ -stuff/#main.glade# diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nwg-look-0.2.7/LICENSE new/nwg-look-1.0.6/LICENSE --- old/nwg-look-0.2.7/LICENSE 2024-02-12 00:43:12.000000000 +0100 +++ new/nwg-look-1.0.6/LICENSE 2025-06-17 01:16:22.000000000 +0200 @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2022-2023 Piotr Miller & Contributors +Copyright (c) 2022-2025 Piotr Miller & Contributors Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nwg-look-0.2.7/README.md new/nwg-look-1.0.6/README.md --- old/nwg-look-0.2.7/README.md 2024-02-12 00:43:12.000000000 +0100 +++ new/nwg-look-1.0.6/README.md 2025-06-17 01:16:22.000000000 +0200 @@ -3,7 +3,7 @@ This application is a part of the [nwg-shell](https://nwg-piotr.github.io/nwg-shell) project. -Nwg-look is a GTK3 settings editor, designed to work properly in wlroots-based Wayland environment. +Nwg-look is a GTK settings editor, designed to work properly in wlroots-based Wayland environment. The look and feel is strongly influenced by [LXAppearance](https://wiki.lxde.org/en/LXAppearance), but nwg-look is intended to free the user from a few inconveniences: @@ -19,6 +19,7 @@ - go (build dependency) - gtk3 - [xcur2png](https://github.com/eworm-de/xcur2png) +- gsettings Depending on your distro, you may also need to install [gotk3 dependencies](https://github.com/gotk3/gotk3#installation). diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nwg-look-0.2.7/go.mod new/nwg-look-1.0.6/go.mod --- old/nwg-look-0.2.7/go.mod 2024-02-12 00:43:12.000000000 +0100 +++ new/nwg-look-1.0.6/go.mod 2025-06-17 01:16:22.000000000 +0200 @@ -1,10 +1,12 @@ module github.com/nwg-piotr/nwg-look -go 1.22 +go 1.23.0 + +toolchain go1.24.1 require ( - github.com/gotk3/gotk3 v0.6.3 + github.com/gotk3/gotk3 v0.6.5-0.20240618185848-ff349ae13f56 github.com/sirupsen/logrus v1.9.3 ) -require golang.org/x/sys v0.17.0 // indirect +require golang.org/x/sys v0.33.0 // indirect diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nwg-look-0.2.7/go.sum new/nwg-look-1.0.6/go.sum --- old/nwg-look-0.2.7/go.sum 2024-02-12 00:43:12.000000000 +0100 +++ new/nwg-look-1.0.6/go.sum 2025-06-17 01:16:22.000000000 +0200 @@ -1,10 +1,8 @@ github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/gotk3/gotk3 v0.6.2 h1:sx/PjaKfKULJPTPq8p2kn2ZbcNFxpOJqi4VLzMbEOO8= -github.com/gotk3/gotk3 v0.6.2/go.mod h1:/hqFpkNa9T3JgNAE2fLvCdov7c5bw//FHNZrZ3Uv9/Q= -github.com/gotk3/gotk3 v0.6.3 h1:+Ke4WkM1TQUNOlM2TZH6szqknqo+zNbX3BZWVXjSHYw= -github.com/gotk3/gotk3 v0.6.3/go.mod h1:/hqFpkNa9T3JgNAE2fLvCdov7c5bw//FHNZrZ3Uv9/Q= +github.com/gotk3/gotk3 v0.6.5-0.20240618185848-ff349ae13f56 h1:eR+xxC8qqKuPMTucZqaklBxLIT7/4L7dzhlwKMrDbj8= +github.com/gotk3/gotk3 v0.6.5-0.20240618185848-ff349ae13f56/go.mod h1:/hqFpkNa9T3JgNAE2fLvCdov7c5bw//FHNZrZ3Uv9/Q= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= @@ -13,14 +11,12 @@ github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.6.0 h1:MVltZSvRTcU2ljQOhs94SXPftV6DCNnZViHeQps87pQ= -golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/sys v0.16.0 h1:xWw16ngr6ZMtmxDyKyIgsE93KNKz5HKmMa3b8ALHidU= -golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y= -golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.29.0 h1:TPYlXGxvx1MGTn2GiZDhnjPA9wZzZeGKHHmKhHYvgaU= +golang.org/x/sys v0.29.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.31.0 h1:ioabZlmFYtWhL+TRYpcnNlLwhyxaM9kWTDEmfnprqik= +golang.org/x/sys v0.31.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= +golang.org/x/sys v0.33.0 h1:q3i8TbbEz+JRD9ywIRlyRAQbM0qF7hu24q3teo2hbuw= +golang.org/x/sys v0.33.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nwg-look-0.2.7/langs/cs_CZ.json new/nwg-look-1.0.6/langs/cs_CZ.json --- old/nwg-look-0.2.7/langs/cs_CZ.json 1970-01-01 01:00:00.000000000 +0100 +++ new/nwg-look-1.0.6/langs/cs_CZ.json 2025-06-17 01:16:22.000000000 +0200 @@ -0,0 +1,54 @@ +{ + "apply": "Použít", + "button": "Tlačítko", + "check-button": "Kontrolní tlačítko", + "clear": "Vymazat", + "close": "Zavřít", + "color-scheme": "Barevné schéma", + "cursor-size": "Velikost kurzoru", + "cursor-theme-preview": "Náhled témat kurzoru", + "default": "Výchozí", + "default-font": "Výchozí písmo", + "deprecated": "Zastaralé", + "deprecated-since-gtk-310": "Zastaralé od GTK 3.10", + "enable-event-sounds": "Povolit zvuky událostí", + "enable-input-feedback-sounds": "Povolit akkustickou zpětnou vazbu", + "entry": "Vstup", + "files-to-export": "Soubory k exportu", + "font": "Písmo", + "font-antialiasing": "Vyhlazení písma", + "font-hinting": "Nádech písma", + "font-rgba-order": "RGBA pořadí písem", + "font-settings": "Nastavení písma", + "full": "Plný", + "grayscale": "Stupně šedi", + "icon-theme": "Motiv ikony", + "icon-theme-preview": "Náhled motivu ikony", + "icons": "Ikony", + "ignored": "Ignorován", + "large": "Velký", + "medium": "Střední", + "mouse-cursor": "Kurzor myši", + "none": "Nic", + "other": "Další", + "other-settings": "Další nastavení", + "prefer-dark": "Preferovat tmavý", + "prefer-light": "Preferovat světlý", + "preferences": "Preference", + "program-settings": "Nastavení programu", + "radio-button": "Tlačítka výběru", + "show-button-images": "Zobrazit obrázky tlačítek", + "show-menu-images": "Zobrazit obrázky menu", + "slight": "Mírný", + "small": "Malý", + "sound-effects": "Zvukové efekty", + "text": "Text", + "text-below-icons": "Text pod ikonami", + "text-next-to-icons": "Text vedle ikon", + "text-scaling-factor": "Škálování textu", + "toolbar-icon-size": "Velikost ikony panelu nástrojů", + "toolbar-style": "Styl panelu nástrojů", + "ui-settings": "Nastevení uživatelského rozhranní", + "widgets": "Nástroje", + "widget-style-preview": "Náhled stylu nástroje" +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nwg-look-0.2.7/langs/en_US.json new/nwg-look-1.0.6/langs/en_US.json --- old/nwg-look-0.2.7/langs/en_US.json 2024-02-12 00:43:12.000000000 +0100 +++ new/nwg-look-1.0.6/langs/en_US.json 2025-06-17 01:16:22.000000000 +0200 @@ -2,6 +2,8 @@ "apply": "Apply", "button": "Button", "check-button": "Check button", + "clear": "Clear", + "clear-gtk4-tooltip": "Clear GTK4 symlinks and settings.ini", "close": "Close", "color-scheme": "Color scheme", "cursor-size": "Cursor size", diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nwg-look-0.2.7/langs/ja_JP.json new/nwg-look-1.0.6/langs/ja_JP.json --- old/nwg-look-0.2.7/langs/ja_JP.json 1970-01-01 01:00:00.000000000 +0100 +++ new/nwg-look-1.0.6/langs/ja_JP.json 2025-06-17 01:16:22.000000000 +0200 @@ -0,0 +1,54 @@ +{ + "apply": "適用", + "button": "ボタン", + "check-button": "チェックボタン", + "clear": "設定をクリア", + "close": "閉じる", + "color-scheme": "カラースキーマ", + "cursor-size": "カーソルサイズ", + "cursor-theme-preview": "カーソルテーマ プレビュー", + "default": "既定", + "default-font": "既定のフォント", + "deprecated": "非推奨", + "deprecated-since-gtk-310": "GTK 3.10 以降で非推奨", + "enable-event-sounds": "イベントサウンドを有効", + "enable-input-feedback-sounds": "入力フィードバック音を有効", + "entry": "エントリ", + "files-to-export": "エクスポートするファイル", + "font": "フォント", + "font-antialiasing": "フォントアンチエイリアス", + "font-hinting": "フォントヒンティング", + "font-rgba-order": "フォント RGBA の順序", + "font-settings": "フォント設定", + "full": "全体", + "grayscale": "グレースケール", + "icon-theme": "アイコンテーマ", + "icon-theme-preview": "アイコンテーマ プレビュー", + "icons": "アイコン", + "ignored": "無視される", + "large": "大", + "medium": "中", + "mouse-cursor": "マウスカーソル", + "none": "なし", + "other": "その他", + "other-settings": "その他の設定", + "prefer-dark": "ダークモード優先", + "prefer-light": "ライトモード優先", + "preferences": "設定", + "program-settings": "プログラム設定", + "radio-button": "ラジオボタン", + "show-button-images": "ボタン画像を表示", + "show-menu-images": "メニュー画像を表示", + "slight": "わずか", + "small": "小", + "sound-effects": "サウンドエフェクト", + "text": "テキスト", + "text-below-icons": "アイコンの下にテキスト", + "text-next-to-icons": "アイコンの隣にテキスト", + "text-scaling-factor": "テキストスケーリング係数", + "toolbar-icon-size": "ツールバーのアイコンサイズ", + "toolbar-style": "ツールバーのスタイル", + "ui-settings": "UI 設定", + "widgets": "ウィジェット", + "widget-style-preview": "ウィジェットスタイル プレビュー" +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nwg-look-0.2.7/langs/pl_PL.json new/nwg-look-1.0.6/langs/pl_PL.json --- old/nwg-look-0.2.7/langs/pl_PL.json 2024-02-12 00:43:12.000000000 +0100 +++ new/nwg-look-1.0.6/langs/pl_PL.json 2025-06-17 01:16:22.000000000 +0200 @@ -2,6 +2,8 @@ "apply": "Zastosuj", "button": "Przycisk", "check-button": "Przycisk wyboru", + "clear": "Wyczyść", + "clear-gtk4-tooltip": "Usuń linki symboliczne i plik settings.ini dla GTK 4.0", "close": "Zamknij", "color-scheme": "Schemat kolorów", "cursor-size": "Rozmiar kursora", diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nwg-look-0.2.7/langs/ru_RU.json new/nwg-look-1.0.6/langs/ru_RU.json --- old/nwg-look-0.2.7/langs/ru_RU.json 2024-02-12 00:43:12.000000000 +0100 +++ new/nwg-look-1.0.6/langs/ru_RU.json 2025-06-17 01:16:22.000000000 +0200 @@ -2,6 +2,7 @@ "apply": "Применить", "button": "Кнопка", "check-button": "Чекбокс", + "clear": "Очистить", "close": "Закрыть", "color-scheme": "Цветовая схема", "cursor-size": "Размер курсора", diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nwg-look-0.2.7/langs/tr_TR.json new/nwg-look-1.0.6/langs/tr_TR.json --- old/nwg-look-0.2.7/langs/tr_TR.json 1970-01-01 01:00:00.000000000 +0100 +++ new/nwg-look-1.0.6/langs/tr_TR.json 2025-06-17 01:16:22.000000000 +0200 @@ -0,0 +1,54 @@ +{ + "apply": "Uygula", + "button": "Buton", + "check-button": "Kontrol butonu", + "clear": "Temizle", + "close": "Kapat", + "color-scheme": "Renk şeması", + "cursor-size": "İmleç boyutu", + "cursor-theme-preview": "İmleç teması önizlemesi", + "default": "Varsayılan", + "default-font": "Varsayılan yazı tipi", + "deprecated": "Terkedilmiş", + "deprecated-since-gtk-310": "Deprecated since GTK 3.10", + "enable-event-sounds": "Olay seslerini etkinleştir", + "enable-input-feedback-sounds": "Giriş geri bildirim seslerini etkinleştir", + "entry": "Girdi", + "files-to-export": "Dışa aktarılacak dosyalar", + "font": "Yazı tipi", + "font-antialiasing": "Yazı tipi kenar yumuşatma", + "font-hinting": "Yazı tipi ipucu", + "font-rgba-order": "Yazı tipi RGBA düzeni", + "font-settings": "Yazı tipi ayarları", + "full": "Tam", + "grayscale": "Gri tonlama", + "icon-theme": "İkon teması", + "icon-theme-preview": "İkon teması önizlemesi", + "icons": "İkonlar", + "ignored": "Yok say", + "large": "Geniş", + "medium": "Orta", + "mouse-cursor": "Fare imleci", + "none": "Hiçbiri", + "other": "Diğer", + "other-settings": "Diğer ayarlar", + "prefer-dark": "Karanlığı tercih et", + "prefer-light": "Aydınlığı tercih et", + "preferences": "Tercihler", + "program-settings": "Program ayarları", + "radio-button": "Radyo butonu", + "show-button-images": "Buton görsellerini göster", + "show-menu-images": "Menü görsellerini göster", + "slight": "Hafif", + "small": "Küçük", + "sound-effects": "Ses efektleri", + "text": "Metin", + "text-below-icons": "İkonların altındaki metinler", + "text-next-to-icons": "İkonların yanındaki metinler", + "text-scaling-factor": "Metin ölçeklendirme faktörü", + "toolbar-icon-size": "Araç çubuğu ikon boyutu", + "toolbar-style": "Araç çubuğu tarzı", + "ui-settings": "UI ayarları", + "widgets": "Widgetlar", + "widget-style-preview": "Widget tarzı önizlemesi" +} \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nwg-look-0.2.7/langs/zh_CN.json new/nwg-look-1.0.6/langs/zh_CN.json --- old/nwg-look-0.2.7/langs/zh_CN.json 2024-02-12 00:43:12.000000000 +0100 +++ new/nwg-look-1.0.6/langs/zh_CN.json 2025-06-17 01:16:22.000000000 +0200 @@ -2,6 +2,7 @@ "apply": "应用", "button": "按钮", "check-button": "复选按钮", + "clear": "清除设置", "close": "关闭", "color-scheme": "颜色方案", "cursor-size": "光标大小", diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nwg-look-0.2.7/main.go new/nwg-look-1.0.6/main.go --- old/nwg-look-0.2.7/main.go 2024-02-12 00:43:12.000000000 +0100 +++ new/nwg-look-1.0.6/main.go 2025-06-17 01:16:22.000000000 +0200 @@ -1,8 +1,8 @@ /* -GTK3 settings editor adapted to work in the sway / wlroots environment +GTK settings editor adapted to work in the sway / wlroots environment Project: https://github.com/nwg-piotr/nwg-look Author's email: [email protected] -Copyright (c) 2022-2024 Piotr Miller & Contributors +Copyright (c) 2022-2025 Piotr Miller & Contributors License: MIT */ @@ -21,7 +21,7 @@ "github.com/gotk3/gotk3/gtk" ) -const version = "0.2.7" +const version = "1.0.6" var ( preferences programSettings @@ -41,15 +41,16 @@ preview *gtk.Frame cursorSizeSelector *gtk.Box rowToFocus *gtk.ListBoxRow - editingPreferences bool voc map[string]string + gtkThemePaths map[string]string // theme name to path ) type programSettings struct { - ExportSettingsIni bool `json:"export-settings-ini"` - ExportGtkRc20 bool `json:"export-gtkrc-20"` - ExportIndexTheme bool `json:"export-index-theme"` - ExportXsettingsd bool `json:"export-xsettingsd"` + ExportSettingsIni bool `json:"export-settings-ini"` + ExportGtkRc20 bool `json:"export-gtkrc-20"` + ExportIndexTheme bool `json:"export-index-theme"` + ExportXsettingsd bool `json:"export-xsettingsd"` + ExportGtk4Symlinks bool `json:"export-gtk4-symlinks"` } func programSettingsNewWithDefaults() programSettings { @@ -58,6 +59,7 @@ p.ExportGtkRc20 = true p.ExportIndexTheme = true p.ExportXsettingsd = true + p.ExportGtk4Symlinks = true return p } @@ -237,7 +239,6 @@ func displayProgramSettingsForm() { destroyContent() - editingPreferences = true preview = setUpProgramSettingsForm() grid.Attach(preview, 0, 1, 1, 1) @@ -259,8 +260,6 @@ if cursorSizeSelector != nil { cursorSizeSelector.Destroy() } - - editingPreferences = false } func main() { @@ -303,7 +302,7 @@ saveGsettingsBackup() if preferences.ExportSettingsIni { - saveGtkIni() + saveGtkIni3() } if preferences.ExportGtkRc20 { saveGtkRc20() @@ -314,12 +313,41 @@ if preferences.ExportXsettingsd { saveXsettingsd() } + if preferences.ExportGtk4Symlinks { + linkGtk4Stuff() + saveGtkIni4() + } else { + clearGtk4Symlinks() + } } os.Exit(0) } - if *applyGs { - applyGsettingsFromFile() + readGsettings() + + if *applyGs || *exportConfigs { + if *applyGs { + applyGsettingsFromFile() + } + if *exportConfigs { + if preferences.ExportSettingsIni { + saveGtkIni3() + } + if preferences.ExportGtkRc20 { + saveGtkRc20() + } + if preferences.ExportIndexTheme { + saveIndexTheme() + } + if preferences.ExportXsettingsd { + saveXsettingsd() + } + if preferences.ExportGtk4Symlinks { + _, gtkThemePaths = getThemeNames() + linkGtk4Stuff() + saveGtkIni4() + } + } os.Exit(0) } @@ -333,26 +361,8 @@ loadGtkConfig() } - readGsettings() - gtkSettings, _ = gtk.SettingsGetDefault() - if *exportConfigs { - if preferences.ExportSettingsIni { - saveGtkIni() - } - if preferences.ExportGtkRc20 { - saveGtkRc20() - } - if preferences.ExportIndexTheme { - saveIndexTheme() - } - if preferences.ExportXsettingsd { - saveXsettingsd() - } - os.Exit(0) - } - gladeFile := "" for _, d := range dataDirs { gladeFile = filepath.Join(d, "/nwg-look/main.glade") @@ -416,26 +426,26 @@ btnApply, _ := getButton(builder, "btn-apply") btnApply.SetLabel(voc["apply"]) btnApply.Connect("clicked", func() { - if !editingPreferences { - applyGsettings() - saveGsettingsBackup() + applyGsettings() + saveGsettingsBackup() - if preferences.ExportSettingsIni { - saveGtkIni() - } - if preferences.ExportGtkRc20 { - saveGtkRc20() - } - if preferences.ExportIndexTheme { - saveIndexTheme() - } - if preferences.ExportXsettingsd { - saveXsettingsd() - } - - } else { - savePreferences() + if preferences.ExportSettingsIni { + saveGtkIni3() + } + if preferences.ExportGtkRc20 { + saveGtkRc20() + } + if preferences.ExportIndexTheme { + saveIndexTheme() + } + if preferences.ExportXsettingsd { + saveXsettingsd() + } + if preferences.ExportGtk4Symlinks { + linkGtk4Stuff() + saveGtkIni4() } + savePreferences() }) verLabel, _ := getLabel(builder, "version-label") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nwg-look-0.2.7/tools.go new/nwg-look-1.0.6/tools.go --- old/nwg-look-0.2.7/tools.go 2024-02-12 00:43:12.000000000 +0100 +++ new/nwg-look-1.0.6/tools.go 2025-06-17 01:16:22.000000000 +0200 @@ -130,7 +130,7 @@ } } } else { - log.Warnf("Could'n find %s", configFile) + log.Warnf("Could'nt find %s", configFile) } log.Debugf("gtk-theme-name: %s", gtkConfig.themeName) log.Debugf("gtk-icon-theme-name: %s", gtkConfig.iconThemeName) @@ -554,7 +554,7 @@ } } -func saveGtkIni() { +func saveGtkIni3() { configFile := filepath.Join(configHome(), "gtk-3.0/settings.ini") if !pathExists(configFile) { makeDir(filepath.Join(configHome(), "gtk-3.0/")) @@ -650,6 +650,36 @@ saveTextFile(lines, configFile) } +func saveGtkIni4() { + configFile := filepath.Join(configHome(), "gtk-4.0/settings.ini") + if !pathExists(configFile) { + makeDir(filepath.Join(configHome(), "gtk-4.0/")) + } + log.Infof(">>> Exporting %s", configFile) + + lines := []string{"[Settings]"} + + lines = append(lines, fmt.Sprintf("gtk-theme-name=%s", gsettings.gtkTheme)) + lines = append(lines, fmt.Sprintf("gtk-icon-theme-name=%s", gsettings.iconTheme)) + lines = append(lines, fmt.Sprintf("gtk-font-name=%s", gsettings.fontName)) + lines = append(lines, fmt.Sprintf("gtk-cursor-theme-name=%s", gsettings.cursorTheme)) + lines = append(lines, fmt.Sprintf("gtk-cursor-theme-size=%v", gsettings.cursorSize)) + + v := 0 + if gsettings.colorScheme == "prefer-dark" { + v = 1 + } else { + v = 0 + } + lines = append(lines, fmt.Sprintf("gtk-application-prefer-dark-theme=%v", v)) + + for _, l := range lines { + log.Debug(l) + } + + saveTextFile(lines, configFile) +} + func isSupported(line string) bool { supported := []string{ "gtk-theme-name", @@ -835,6 +865,105 @@ saveTextFile(lines, configFile) } +func linkGtk4Stuff() { + home := os.Getenv("HOME") + configPath := filepath.Join(home, ".config") + themeName := gsettings.gtkTheme + + if gsettings.gtkTheme != "" { + log.Infof(">>> Symlinking files in %s", filepath.Join(configPath, "/gtk-4.0")) + log.Debugf("GTK Theme: '%s' at '%s'", themeName, gtkThemePaths[themeName]) + log.Debugf("Config path: '%s'", configPath) + themePath := gtkThemePaths[themeName] + log.Debugf("Theme path: '%s'", gtkThemePaths[gsettings.gtkTheme]) + if themePath == "" { + log.Warnf("Unknown theme path: '%s'", themePath) + return + } + if !pathExists(filepath.Join(themePath, "gtk-4.0")) { + log.Warnf("%s theme has no gtk-4.0 directory", themePath) + return + } + + clearGtk4Symlinks() + + // Create symlinks + gtk4Dir := filepath.Join(configPath, "gtk-4.0") + if !pathExists(gtk4Dir) { + makeDir(gtk4Dir) + } + + if pathExists(filepath.Join(themePath, "gtk-4.0/gtk.css")) { + cmd := exec.Command("ln", "-s", filepath.Join(themePath, "gtk-4.0/gtk.css"), filepath.Join(configPath, "gtk-4.0/gtk.css")) + err := cmd.Run() + if err != nil { + log.Warnf("Couldn't symlink '%s': %s", filepath.Join(themePath, "gtk-4.0/gtk.css"), err) + } else { + log.Debugf("Created symlink to '%s'", filepath.Join(themePath, "gtk-4.0/gtk.css")) + } + } + + if pathExists(filepath.Join(themePath, "gtk-4.0/gtk-dark.css")) { + cmd := exec.Command("ln", "-s", filepath.Join(themePath, "gtk-4.0/gtk-dark.css"), filepath.Join(configPath, "gtk-4.0/gtk-dark.css")) + err := cmd.Run() + if err != nil { + log.Warnf("Couldn't symlink '%s': %s", filepath.Join(themePath, "gtk-4.0/gtk-dark.css"), err) + } else { + log.Debugf("Created symlink to '%s'", filepath.Join(themePath, "gtk-4.0/gtk-dark.css")) + } + } + + if pathExists(filepath.Join(themePath, "gtk-4.0/assets")) { + cmd := exec.Command("ln", "-s", filepath.Join(themePath, "gtk-4.0/assets"), filepath.Join(configPath, "gtk-4.0/assets")) + err := cmd.Run() + if err != nil { + log.Warnf("Couldn't symlink '%s': %s", filepath.Join(themePath, "gtk-4.0/assets"), err) + } else { + log.Debugf("Created symlink to '%s'", filepath.Join(themePath, "gtk-4.0/assets")) + } + } + + if pathExists(filepath.Join(themePath, "assets")) { + cmd := exec.Command("ln", "-s", filepath.Join(themePath, "assets"), filepath.Join(configPath, "assets")) + err := cmd.Run() + if err != nil { + log.Warnf("Couldn't symlink '%s': %s", filepath.Join(themePath, "assets"), err) + } else { + log.Debugf("Created symlink to '%s'", filepath.Join(themePath, "assets")) + } + } + + } else { + log.Warnf("GTK theme name unknown") + } +} + +func clearGtk4Symlinks() { + home := os.Getenv("HOME") + configPath := filepath.Join(home, ".config") + items := []string{"gtk-4.0/gtk.css", "gtk-4.0/gtk-dark.css", "gtk-4.0/assets", "assets", "gtk-4.0/settings.ini"} + for _, item := range items { + p := filepath.Join(configPath, item) + if pathExists(p) { + log.Debugf("Removing '%s'", p) + info, _ := os.Stat(p) + if info.IsDir() { + cmd := exec.Command("rm", "-r", p) + err := cmd.Run() + if err != nil { + log.Warnf("Couldn't remove '%s': %s", p, err) + } + } else { + cmd := exec.Command("rm", p) + err := cmd.Run() + if err != nil { + log.Warnf("Couldn't remove '%s': %s", p, err) + } + } + } + } +} + func saveIndexTheme() { home := os.Getenv("HOME") iconsFolder := "" @@ -864,15 +993,19 @@ "Name=Default", "Comment=Default Cursor Theme", } - lines = append(lines, fmt.Sprintf("Inherits=%s", gsettings.cursorTheme)) + // in hope to fix #90 + if gsettings.cursorTheme != "default" { + lines = append(lines, fmt.Sprintf("Inherits=%s", gsettings.cursorTheme)) + } saveTextFile(lines, indexThemeFile) } else { log.Warn("Couldn't find icons folder") } } -func getThemeNames() []string { +func getThemeNames() ([]string, map[string]string) { var dirs []string + themePaths := make(map[string]string) // theme name 2 theme path // get theme dirs for _, dir := range dataDirs { @@ -902,7 +1035,8 @@ if !isIn(names, f.Name()) { if !isIn(exclusions, f.Name()) { names = append(names, f.Name()) - log.Debugf("Theme found: %s", f.Name()) + themePaths[f.Name()] = filepath.Join(d, f.Name()) + log.Debugf("Theme found: '%s' at '%s'", f.Name(), filepath.Join(d, f.Name())) } else { log.Debugf("Excluded theme: %s", f.Name()) } @@ -919,7 +1053,7 @@ return names[i] < names[j] }) - return names + return names, themePaths } // returns map[displayName]folderName @@ -1104,12 +1238,20 @@ file.Close() } -func listFiles(dir string) ([]os.DirEntry, error) { +func listFiles(dir string) ([]os.FileInfo, error) { files, err := os.ReadDir(dir) - if err == nil { - return files, nil + if err != nil { + return nil, err } - return nil, err + + var res []os.FileInfo + for _, f := range files { + if st, err := os.Stat(filepath.Join(dir, f.Name())); err == nil { + res = append(res, st) + } + } + + return res, nil } func isIn(slice []string, val string) bool { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nwg-look-0.2.7/uicomponents.go new/nwg-look-1.0.6/uicomponents.go --- old/nwg-look-0.2.7/uicomponents.go 2024-02-12 00:43:12.000000000 +0100 +++ new/nwg-look-1.0.6/uicomponents.go 2025-06-17 01:16:22.000000000 +0200 @@ -17,7 +17,10 @@ listBox, _ := gtk.ListBoxNew() var rowToSelect *gtk.ListBoxRow - for _, name := range getThemeNames() { + themeNames, themePaths := getThemeNames() + gtkThemePaths = themePaths + + for _, name := range themeNames { row, _ := gtk.ListBoxRowNew() eventBox, _ := gtk.EventBoxNew() @@ -670,5 +673,18 @@ }) g.Attach(cb4, 0, 4, 1, 1) + cb5, _ := gtk.CheckButtonNewWithLabel("~/.config/gtk-4.0/*") + cb5.SetActive(preferences.ExportGtk4Symlinks) + cb5.Connect("toggled", func() { + preferences.ExportGtk4Symlinks = cb5.GetActive() + }) + g.Attach(cb5, 0, 5, 1, 1) + + btn, _ := gtk.ButtonNewWithLabel(voc["clear"]) + btn.Connect("clicked", clearGtk4Symlinks) + fmt.Println(voc) + btn.SetTooltipText(voc["clear-gtk4-tooltip"]) + g.Attach(btn, 1, 5, 1, 1) + return frame } ++++++ vendor.tar.gz ++++++ ++++ 21719 lines of diff (skipped)
