Switch to JXL for Fedora 42 backgrounds.
This commit is contained in:
parent
d197b89723
commit
32d27f88e2
6 changed files with 27 additions and 12 deletions
13
Makefile
13
Makefile
|
|
@ -5,16 +5,19 @@ SYSCONFDIR ?= /etc
|
||||||
BINDIR ?= $(PREFIX)/bin
|
BINDIR ?= $(PREFIX)/bin
|
||||||
DATADIR ?= $(PREFIX)/share
|
DATADIR ?= $(PREFIX)/share
|
||||||
LIBEXECDIR ?= $(PREFIX)/libexec
|
LIBEXECDIR ?= $(PREFIX)/libexec
|
||||||
|
BACKGROUND ?= $(DATADIR)/backgrounds/default.png
|
||||||
|
|
||||||
.PHONY: build clean install check requires
|
.PHONY: build clean install check requires
|
||||||
.DEFAULT: build
|
.DEFAULT: build
|
||||||
|
|
||||||
GENERATED := $(patsubst %.in,%,$(wildcard sway/*.in sway/*/*.in ))
|
TEMPLATES := sway/*.in sway/*/*.in swaylock/*.in sddm/03-sway-fedora/theme.conf.in
|
||||||
VARIABLES := PREFIX SYSCONFDIR DATADIR LIBEXECDIR
|
GENERATED := $(patsubst %.in,%,$(wildcard $(TEMPLATES)))
|
||||||
|
VARIABLES := PREFIX SYSCONFDIR DATADIR LIBEXECDIR BACKGROUND
|
||||||
|
|
||||||
sway/%: sway/%.in
|
%: %.in
|
||||||
sed "$(foreach var,$(VARIABLES),s^@$(var)@^$($(var))^i;)" $^ > $@
|
sed -e "$(foreach var,$(VARIABLES),s^@$(var)@^$($(var))^i;)" \
|
||||||
sed '$(foreach var,$(VARIABLES),s^$$$(var)\b^$($(var))^i;)' $^ > $@
|
-e '$(foreach var,$(VARIABLES),s^$$$(var)\b^$($(var))^i;)' \
|
||||||
|
$^ > $@
|
||||||
|
|
||||||
build: $(GENERATED)
|
build: $(GENERATED)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,2 +0,0 @@
|
||||||
[General]
|
|
||||||
background=/usr/share/backgrounds/default.png
|
|
||||||
2
sddm/03-sway-fedora/theme.conf.in
Normal file
2
sddm/03-sway-fedora/theme.conf.in
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
[General]
|
||||||
|
background=@BACKGROUND@
|
||||||
|
|
@ -2,6 +2,7 @@
|
||||||
%bcond initialsetup %[0%{?fedora} >= 40 || 0%{?rhel} >= 10]
|
%bcond initialsetup %[0%{?fedora} >= 40 || 0%{?rhel} >= 10]
|
||||||
%bcond sddm 1
|
%bcond sddm 1
|
||||||
%global sway_ver 1.8
|
%global sway_ver 1.8
|
||||||
|
%global bg_format %[ 0%{?fedora} >= 42 ? "jxl" : "png" ]
|
||||||
|
|
||||||
Name: {{{ git_name }}}
|
Name: {{{ git_name }}}
|
||||||
Version: {{{ git_version }}}
|
Version: {{{ git_version }}}
|
||||||
|
|
@ -44,6 +45,9 @@ Requires: /usr/bin/pkill
|
||||||
Requires: brightnessctl >= 0.5.1-11
|
Requires: brightnessctl >= 0.5.1-11
|
||||||
Requires: desktop-backgrounds-compat
|
Requires: desktop-backgrounds-compat
|
||||||
Requires: grimshot
|
Requires: grimshot
|
||||||
|
%if "%{bg_format}" == "jxl"
|
||||||
|
Requires: jxl-pixbuf-loader
|
||||||
|
%endif
|
||||||
Requires: lxqt-policykit
|
Requires: lxqt-policykit
|
||||||
Requires: playerctl
|
Requires: playerctl
|
||||||
Requires: pulseaudio-utils
|
Requires: pulseaudio-utils
|
||||||
|
|
@ -80,6 +84,9 @@ Provides: sddm-greeter-displayserver
|
||||||
Conflicts: sddm-greeter-displayserver
|
Conflicts: sddm-greeter-displayserver
|
||||||
|
|
||||||
Requires: desktop-backgrounds-compat
|
Requires: desktop-backgrounds-compat
|
||||||
|
%if "%{bg_format}" == "jxl"
|
||||||
|
Requires: kf6-kimageformats
|
||||||
|
%endif
|
||||||
Requires: sddm >= 0.20.0
|
Requires: sddm >= 0.20.0
|
||||||
Requires: sway >= %{sway_ver}
|
Requires: sway >= %{sway_ver}
|
||||||
|
|
||||||
|
|
@ -94,11 +101,16 @@ to use Sway for the greeter display server.
|
||||||
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%make_build
|
%make_build \
|
||||||
|
PREFIX='%{_prefix}' \
|
||||||
|
BACKGROUND='%{_datadir}/backgrounds/default.%{bg_format}'
|
||||||
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%make_install PREFIX='%{_prefix}' WITH_INITIALSETUP='%[%{with initialsetup}?"yes":"no"]' WITH_SDDM='%[%{with sddm}?"yes":"no"]'
|
%make_install \
|
||||||
|
PREFIX='%{_prefix}' \
|
||||||
|
WITH_INITIALSETUP='%[%{with initialsetup}?"yes":"no"]' \
|
||||||
|
WITH_SDDM='%[%{with sddm}?"yes":"no"]'
|
||||||
|
|
||||||
|
|
||||||
%files
|
%files
|
||||||
|
|
|
||||||
|
|
@ -30,8 +30,8 @@ set $menu $rofi_cmd -show combi -combi-modes drun#run -modes combi
|
||||||
### Output configuration
|
### Output configuration
|
||||||
#
|
#
|
||||||
# Default wallpaper (more resolutions are available in /usr/share/backgrounds/sway/)
|
# Default wallpaper (more resolutions are available in /usr/share/backgrounds/sway/)
|
||||||
# Requires: desktop-backgrounds-compat, swaybg
|
# Requires: desktop-backgrounds-compat, swaybg, jxl-pixbuf-loader
|
||||||
output * bg /usr/share/backgrounds/default.png fill
|
output * bg @BACKGROUND@ fill
|
||||||
#
|
#
|
||||||
# Example configuration:
|
# Example configuration:
|
||||||
#
|
#
|
||||||
|
|
|
||||||
|
|
@ -3,5 +3,5 @@
|
||||||
#
|
#
|
||||||
# Image path supports environment variables and shell expansions,
|
# Image path supports environment variables and shell expansions,
|
||||||
# e.g. image=$HOME/Pictures/default.png
|
# e.g. image=$HOME/Pictures/default.png
|
||||||
image=/usr/share/backgrounds/default.png
|
image=@BACKGROUND@
|
||||||
scaling=fill
|
scaling=fill
|
||||||
Loading…
Add table
Add a link
Reference in a new issue