Enhance GTK theme configuration and taskbar setup in cloud-init scripts</message>
<message>Update the cloud-init scripts to improve GTK theme settings by enforcing dark mode through gsettings and preserving the icon theme for a cohesive user experience. Additionally, enhance the first-boot script to install a Chromium kiosk launcher icon on the desktop and in the application menu, along with a five-tap close functionality for Chromium. These changes streamline the user interface and ensure a consistent dark theme across applications and the taskbar.
This commit is contained in:
@@ -12,3 +12,6 @@ first-boot.sh downloads these from `FILE_SERVER` (e.g. `http://10.20.50.1:5000/f
|
||||
| 02-set-wallpaper-once.desktop | /home/pi/.config/autostart/02-set-wallpaper-once.desktop (with 02-set-wallpaper-once.sh). Wallpaper is also set during first-boot via pcmanfm. |
|
||||
| wf-panel-pi.ini | Optional: /home/pi/.config/wf-panel-pi/wf-panel-pi.ini (custom taskbar layout and css_path). See TASKBAR-THEME.md. |
|
||||
| panel-theme.css | Optional: /home/pi/.config/wf-panel-pi/panel-theme.css (custom taskbar CSS). Deploy with wf-panel-pi.ini; see TASKBAR-THEME.md. |
|
||||
| gtk.css | /home/pi/.config/gtk-3.0/gtk.css (user GTK3 override; forces start menu dropdown and all menus/popovers to full dark). |
|
||||
| chromium-kiosk-launcher.desktop | Desktop icon + application menu: "Start Chromium Kiosk" (run start-chromium.sh when browser was closed). |
|
||||
| five-tap-close-chromium.desktop | /home/pi/.config/autostart/ (with five-tap-close-chromium.py). 5 taps in top-right corner close Chromium. |
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
[Desktop Entry]
|
||||
Type=Application
|
||||
Name=Start Chromium Kiosk
|
||||
Comment=Start Chromium in kiosk mode (use if the browser was closed)
|
||||
Exec=/home/pi/start-chromium.sh
|
||||
Icon=chromium-browser
|
||||
Terminal=false
|
||||
Categories=Utility;Kiosk;
|
||||
StartupNotify=false
|
||||
@@ -0,0 +1,8 @@
|
||||
[Desktop Entry]
|
||||
Type=Application
|
||||
Name=Five-tap close Chromium
|
||||
Comment=5 taps in top-right corner close Chromium kiosk (hidden at startup)
|
||||
Exec=/home/pi/five-tap-close-chromium.py
|
||||
Hidden=false
|
||||
NoDisplay=true
|
||||
X-GNOME-Autostart-enabled=true
|
||||
49
emmc-provisioning/cloud-init/config-files/gtk.css
Normal file
49
emmc-provisioning/cloud-init/config-files/gtk.css
Normal file
@@ -0,0 +1,49 @@
|
||||
/* User GTK3 override: force start menu and all menus/popovers to full dark.
|
||||
* Colors match Adwaita-dark (menu/popover #2d2d2d, text #e0e0e0).
|
||||
* Placed in ~/.config/gtk-3.0/gtk.css.
|
||||
*/
|
||||
|
||||
/* Adwaita-dark menu/popover background */
|
||||
menu,
|
||||
.menu,
|
||||
menubar,
|
||||
.menubar,
|
||||
popover,
|
||||
.popover,
|
||||
popover.menu {
|
||||
background-color: #2d2d2d !important;
|
||||
background: #2d2d2d !important;
|
||||
color: #e0e0e0 !important;
|
||||
}
|
||||
|
||||
/* Inner content (often the cause of light background) */
|
||||
menu contents,
|
||||
.menu contents,
|
||||
popover contents,
|
||||
popover list,
|
||||
popover flowbox,
|
||||
popover box {
|
||||
background-color: #2d2d2d !important;
|
||||
background: #2d2d2d !important;
|
||||
color: #e0e0e0 !important;
|
||||
}
|
||||
|
||||
menu menuitem,
|
||||
.menu menuitem,
|
||||
menubar menuitem,
|
||||
popover modelbutton,
|
||||
popover menuitem {
|
||||
background-color: transparent !important;
|
||||
background: transparent !important;
|
||||
color: #e0e0e0 !important;
|
||||
}
|
||||
|
||||
menu menuitem:hover,
|
||||
.menu menuitem:hover,
|
||||
menubar menuitem:hover,
|
||||
popover modelbutton:hover,
|
||||
popover menuitem:hover {
|
||||
background-color: rgba(255, 255, 255, 0.1) !important;
|
||||
background: rgba(255, 255, 255, 0.1) !important;
|
||||
color: #ffffff !important;
|
||||
}
|
||||
@@ -1,31 +1,30 @@
|
||||
/* Custom wf-panel-pi theme – dark, rounded panel
|
||||
* Place at ~/.config/wf-panel-pi/panel-theme.css
|
||||
* Set css_path in wf-panel-pi.ini to this file (absolute path).
|
||||
/* Minimal dark taskbar – flat, touch-friendly
|
||||
* Colors match Adwaita-dark (window bg #242424) so taskbar fits dark mode.
|
||||
* Icon theme PiXtrix (start-here) set in gtk-3.0/settings.ini.
|
||||
*/
|
||||
|
||||
/* Panel window */
|
||||
window {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
/* Main panel box – dark with slight rounding and shadow */
|
||||
/* Flat bar: Adwaita-dark window bg so theme is consistent */
|
||||
window box {
|
||||
background-color: rgba(45, 45, 45, 0.96);
|
||||
border-radius: 10px;
|
||||
margin: 4px;
|
||||
padding: 2px 8px;
|
||||
border: 1px solid rgba(255, 255, 255, 0.06);
|
||||
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
|
||||
background-color: #242424;
|
||||
border-radius: 0;
|
||||
margin: 0;
|
||||
padding: 4px 8px;
|
||||
border: none;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
/* Plugin / launcher buttons */
|
||||
button,
|
||||
button:hover,
|
||||
button:active {
|
||||
/* Touch-friendly buttons: min 32px, clear hit area */
|
||||
button {
|
||||
background: transparent;
|
||||
border: none;
|
||||
border-radius: 6px;
|
||||
padding: 4px;
|
||||
border-radius: 4px;
|
||||
padding: 6px;
|
||||
min-width: 32px;
|
||||
min-height: 32px;
|
||||
color: #e0e0e0;
|
||||
}
|
||||
|
||||
@@ -37,7 +36,6 @@ button:active {
|
||||
background: rgba(255, 255, 255, 0.12);
|
||||
}
|
||||
|
||||
/* Labels (e.g. clock text) */
|
||||
label {
|
||||
color: #e0e0e0;
|
||||
font-size: 11pt;
|
||||
|
||||
@@ -1,21 +1,20 @@
|
||||
# wf-panel-pi custom theme example
|
||||
# wf-panel-pi – minimal dark taskbar, touch-friendly
|
||||
# Copy to ~/.config/wf-panel-pi/wf-panel-pi.ini (user pi)
|
||||
# Optional: copy panel-theme.css to ~/.config/wf-panel-pi/panel-theme.css
|
||||
# and ensure css_path below points to it. Restart panel: pkill wf-panel-pi
|
||||
# Set css_path to panel-theme.css. Restart panel: pkill wf-panel-pi
|
||||
# Icon theme (start-here) is set in gtk-3.0/settings.ini (PiXtrix) so custom icon from first-boot is used.
|
||||
|
||||
[panel]
|
||||
# Custom CSS (use absolute path; replace /home/pi with actual $PI_HOME if different)
|
||||
css_path = /home/pi/.config/wf-panel-pi/panel-theme.css
|
||||
# Layout
|
||||
widgets_left = smenu spacing0 spacing4 launchers spacing8 window-list
|
||||
# Left: start menu (uses start-here from PiXtrix), launchers, window list
|
||||
widgets_left = smenu spacing0 spacing2 launchers spacing4 window-list
|
||||
widgets_center = none
|
||||
widgets_right = tray power ejecter updater spacing2 connect spacing2 bluetooth spacing2 netman spacing2 volumepulse spacing2 clock spacing2 batt spacing2 squeek
|
||||
# Size and position
|
||||
icon_size = 28
|
||||
minimal_height = 28
|
||||
# Right: tray, network, volume, clock, power (minimal set, touch-friendly)
|
||||
widgets_right = tray spacing2 netman spacing2 volumepulse spacing2 clock spacing2 power
|
||||
# Touch-friendly size (32px min target)
|
||||
icon_size = 32
|
||||
minimal_height = 36
|
||||
position = top
|
||||
# Dark background (ARGB)
|
||||
background_color = #2D2D2DFF
|
||||
# Optional: autohide
|
||||
# Match Adwaita-dark window bg (#242424) so taskbar fits dark theme
|
||||
background_color = #242424FF
|
||||
autohide = false
|
||||
autohide_duration = 300
|
||||
|
||||
Reference in New Issue
Block a user