Skip to content

Commit

Permalink
Restore Dark
Browse files Browse the repository at this point in the history
  • Loading branch information
lainsce committed Jan 24, 2024
1 parent 87ea291 commit 4b620e4
Show file tree
Hide file tree
Showing 16 changed files with 60 additions and 1 deletion.
14 changes: 14 additions & 0 deletions Helium-dark/gtk-3.0/install-dark-theme.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/sh
set -eu

theme_dir="${MESON_INSTALL_DESTDIR_PREFIX}/$1"
project_name="$2"

cd "$3"

install -m755 -d "${theme_dir}"
for ver in gtk-3.0; do
install -m755 -d "${theme_dir}/${ver}"
ln -sf "../../${project_name}/${ver}/gtk-dark.css" "${theme_dir}/${ver}/gtk.css"
cp -r "${project_name}/${ver}/gtk-dark.css" "${theme_dir}/${ver}/gtk-dark.css"
done
2 changes: 2 additions & 0 deletions Helium-dark/gtk-3.0/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
meson.add_install_script('install-dark-theme.sh', theme_dir, meson.project_name(), meson.project_build_root())
gtk3_dark_dir = join_paths(theme_dir, 'gtk-3.0')
1 change: 1 addition & 0 deletions Helium-dark/gtk-4.0/assets/bullet-symbolic.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Helium-dark/gtk-4.0/assets/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions Helium-dark/gtk-4.0/assets/check-symbolic.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Helium-dark/gtk-4.0/assets/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions Helium-dark/gtk-4.0/assets/dash-symbolic.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Helium-dark/gtk-4.0/assets/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions Helium-dark/gtk-4.0/assets/devel-symbolic.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 16 additions & 0 deletions Helium-dark/gtk-4.0/install-dark-theme.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/sh
set -eu

theme_dir="${MESON_INSTALL_DESTDIR_PREFIX}/$1"
project_name="$2"

cd "$3"

install -m755 -d "${theme_dir}"
for ver in gtk-4.0; do
install -m755 -d "${theme_dir}/${ver}"
ln -sf "../../${project_name}/${ver}/gtk-dark.css" "${theme_dir}/${ver}/gtk.css"
ln -sf "../../${project_name}/${ver}/assets" "${theme_dir}/${ver}/assets"
# For the new dark theme switcher in GNOME 42+
cp -r "${project_name}/${ver}/gtk-dark.css" "${theme_dir}/${ver}/gtk-dark.css"
done
2 changes: 2 additions & 0 deletions Helium-dark/gtk-4.0/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# CSS and assets are just symlinks to the light themes as they are not modified
meson.add_install_script('install-dark-theme.sh', theme_dir, meson.project_name(), meson.project_build_root())
17 changes: 17 additions & 0 deletions Helium-dark/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
theme_dir = join_paths(get_option('datadir'), 'themes', meson.project_name()+'-dark')

conf_data = configuration_data()
conf_data.set('ThemeName', meson.project_name())
conf_data.set('VariantThemeName', meson.project_name()+'-dark')
configure_file(input : '../index.theme.in',
output : 'index.theme',
configuration : conf_data,
install_dir: theme_dir)

if get_option('gtk3')
subdir('gtk-3.0')
endif

if get_option('gtk4')
subdir('gtk-4.0')
endif
6 changes: 5 additions & 1 deletion meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,8 @@ project('Helium',

sass = find_program('sass')

subdir('Helium')
subdir('Helium')

if get_option('dark')
subdir('Helium-dark')
endif

0 comments on commit 4b620e4

Please sign in to comment.