-
-
Notifications
You must be signed in to change notification settings - Fork 624
feat(os/freebsd): add support #1632
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Changes from all commits
0a5f51f
267d6d4
cd80d04
1dabbf0
61f94b6
6a0bfc5
2fde34e
26e7f13
4781a16
7e35fec
6391c1d
36bfa4c
45e5a49
8851843
7845d42
a2f67b0
afed5b3
c8ed7e9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We use uv now. |
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| loguru==0.7.3 | ||
| pulsectl==24.12.0 | ||
| requests==2.32.4 | ||
| PyGObject |
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I will handle this differently I suggest doing this:
# your custom sed
sed -i '' "${@}"
you can customize your own This will force users to haeve there sed wrapper that is accustomed for bsd. Put it below the other Core HyDE packages. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,6 +3,13 @@ | |
| [ -z "$HYDE_THEME" ] && echo "ERROR: unable to detect theme" && exit 1 | ||
| get_themes | ||
| confDir="${XDG_CONFIG_HOME:-$HOME/.config}" | ||
| sed_in_place() { | ||
| if sed --version >/dev/null 2>&1; then | ||
| sed -i "$@" | ||
| else | ||
| sed -i '' "$@" | ||
| fi | ||
| } | ||
| Theme_Change() { | ||
| local x_switch=$1 | ||
| for i in "${!thmList[@]}"; do | ||
|
|
@@ -85,7 +92,7 @@ sanitize_hypr_theme() { | |
| dirty_regex+=("${HYPR_CONFIG_SANITIZE[@]}") | ||
| for pattern in "${dirty_regex[@]}"; do | ||
| grep -E "$pattern" "$buffer_file" | while read -r line; do | ||
| sed -i "\|$line|d" "$buffer_file" | ||
| sed_in_place "\|$line|d" "$buffer_file" | ||
| print_log -sec "theme" -warn "sanitize" "$line" | ||
| done | ||
| done | ||
|
|
@@ -130,8 +137,12 @@ if [[ -r $HYPRLAND_CONFIG ]]; then | |
| load_hypr_variables "${XDG_STATE_DIR:-$HOME/.local/state}/hyde/hyprland.conf" | ||
| fi | ||
| show_theme_status | ||
| if ! dconf write /org/gnome/desktop/interface/icon-theme "'$ICON_THEME'"; then | ||
| print_log -sec "theme" -warn "dconf" "failed to set icon theme" | ||
| if command -v dconf >/dev/null 2>&1 && { [[ -n "${DBUS_SESSION_BUS_ADDRESS:-}" ]] || [[ -n "${DISPLAY:-}" ]]; }; then | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this BSD related if not please send as separate patch please. |
||
| if ! dconf write /org/gnome/desktop/interface/icon-theme "'$ICON_THEME'"; then | ||
| print_log -sec "theme" -warn "dconf" "failed to set icon theme" | ||
| fi | ||
| else | ||
| print_log -sec "theme" -warn "dconf" "no active DBus session; skipping icon theme write" | ||
| fi | ||
| if [ -d /run/current-system/sw/share/themes ]; then | ||
| export themesDir=/run/current-system/sw/share/themes | ||
|
|
@@ -159,10 +170,10 @@ toml_write "$confDir/kdeglobals" "UiSettings" "ColorScheme" "colors" | |
| toml_write "$confDir/kdeglobals" "KDE" "widgetStyle" "kvantum" | ||
| toml_write "$XDG_DATA_HOME/icons/default/index.theme" "Icon Theme" "Inherits" "$CURSOR_THEME" | ||
| toml_write "$HOME/.icons/default/index.theme" "Icon Theme" "Inherits" "$CURSOR_THEME" | ||
| sed -i -e "/^gtk-theme-name=/c\gtk-theme-name=\"$GTK_THEME\"" \ | ||
| -e "/^include /c\include \"$HOME/.gtkrc-2.0.mime\"" \ | ||
| -e "/^gtk-cursor-theme-name=/c\gtk-cursor-theme-name=\"$CURSOR_THEME\"" \ | ||
| -e "/^gtk-icon-theme-name=/c\gtk-icon-theme-name=\"$ICON_THEME\"" "$HOME/.gtkrc-2.0" | ||
| sed_in_place -e "s|^gtk-theme-name=.*$|gtk-theme-name=\"$GTK_THEME\"|" \ | ||
| -e "s|^include .*$|include \"$HOME/.gtkrc-2.0.mime\"|" \ | ||
| -e "s|^gtk-cursor-theme-name=.*$|gtk-cursor-theme-name=\"$CURSOR_THEME\"|" \ | ||
| -e "s|^gtk-icon-theme-name=.*$|gtk-icon-theme-name=\"$ICON_THEME\"|" "$HOME/.gtkrc-2.0" | ||
| GTK3_FONT="${GTK3_FONT:-$FONT}" | ||
| GTK3_FONT_SIZE="${GTK3_FONT_SIZE:-$FONT_SIZE}" | ||
| toml_write "$confDir/gtk-3.0/settings.ini" "Settings" "gtk-theme-name" "$GTK_THEME" | ||
|
|
@@ -193,10 +204,10 @@ if pkg_installed flatpak; then | |
| --env=ICON_THEME="$ICON_THEME" | ||
| flatpak remote-add --user --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo & | ||
| fi | ||
| sed -i -e "/^Net\/ThemeName /c\Net\/ThemeName \"$GTK_THEME\"" \ | ||
| -e "/^Net\/IconThemeName /c\Net\/IconThemeName \"$ICON_THEME\"" \ | ||
| -e "/^Gtk\/CursorThemeName /c\Gtk\/CursorThemeName \"$CURSOR_THEME\"" \ | ||
| -e "/^Gtk\/CursorThemeSize /c\Gtk\/CursorThemeSize $CURSOR_SIZE" \ | ||
| sed_in_place -e "s|^Net/ThemeName .*$|Net/ThemeName \"$GTK_THEME\"|" \ | ||
| -e "s|^Net/IconThemeName .*$|Net/IconThemeName \"$ICON_THEME\"|" \ | ||
| -e "s|^Gtk/CursorThemeName .*$|Gtk/CursorThemeName \"$CURSOR_THEME\"|" \ | ||
| -e "s|^Gtk/CursorThemeSize .*$|Gtk/CursorThemeSize $CURSOR_SIZE|" \ | ||
| "$confDir/xsettingsd/xsettingsd.conf" | ||
| if [ ! -L "$HOME/.themes/$GTK_THEME" ] && [ -d "$themesDir/$GTK_THEME" ]; then | ||
| print_log -sec "theme" -warn "linking" "$GTK_THEME to ~/.themes to fix GTK4 not following xdg" | ||
|
|
@@ -205,8 +216,8 @@ if [ ! -L "$HOME/.themes/$GTK_THEME" ] && [ -d "$themesDir/$GTK_THEME" ]; then | |
| ln -snf "$themesDir/$GTK_THEME" "$HOME/.themes/" | ||
| fi | ||
| if [ -f "$HOME/.Xresources" ]; then | ||
| sed -i -e "/^Xcursor\.theme:/c\Xcursor.theme: $CURSOR_THEME" \ | ||
| -e "/^Xcursor\.size:/c\Xcursor.size: $CURSOR_SIZE" "$HOME/.Xresources" | ||
| sed_in_place -e "s|^Xcursor\.theme:.*$|Xcursor.theme: $CURSOR_THEME|" \ | ||
| -e "s|^Xcursor\.size:.*$|Xcursor.size: $CURSOR_SIZE|" "$HOME/.Xresources" | ||
| grep -q "^Xcursor\.theme:" "$HOME/.Xresources" || echo "Xcursor.theme: $CURSOR_THEME" >>"$HOME/.Xresources" | ||
| grep -q "^Xcursor\.size:" "$HOME/.Xresources" || echo "Xcursor.size: 30" >>"$HOME/.Xresources" | ||
| else | ||
|
|
@@ -216,8 +227,8 @@ Xcursor.size: $CURSOR_SIZE | |
| EOF | ||
| fi | ||
| if [ -f "$HOME/.Xdefaults" ]; then | ||
| sed -i -e "/^Xcursor\.theme:/c\Xcursor.theme: $CURSOR_THEME" \ | ||
| -e "/^Xcursor\.size:/c\Xcursor.size: $CURSOR_SIZE" "$HOME/.Xdefaults" | ||
| sed_in_place -e "s|^Xcursor\.theme:.*$|Xcursor.theme: $CURSOR_THEME|" \ | ||
| -e "s|^Xcursor\.size:.*$|Xcursor.size: $CURSOR_SIZE|" "$HOME/.Xdefaults" | ||
| grep -q "^Xcursor\.theme:" "$HOME/.Xdefaults" || echo "Xcursor.theme: $CURSOR_THEME" >>"$HOME/.Xdefaults" | ||
| grep -q "^Xcursor\.size:" "$HOME/.Xdefaults" || echo "Xcursor.size: 30" >>"$HOME/.Xdefaults" | ||
| fi | ||
|
|
||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. also for this one this might be a separate patch that targets non systemd. So this should be a separate PR.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We can add this patches in advance so for the BSD specific patchs are easier to review. |

Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you are comfortable with python too please add a backend for
pm.pyin./pm/. The python backend will be use for internal stuff and can have advance flags compared to pm.sh.