Compare commits

...
Sign in to create a new pull request.

4 commits

Author SHA1 Message Date
Aleksei Bavshin
32d27f88e2
Switch to JXL for Fedora 42 backgrounds. 2025-02-16 23:04:50 -08:00
Aleksei Bavshin
d197b89723
sway: apply system keyboard configuration in live environment
Fixes: SIG#36
2024-08-07 22:03:24 -07:00
Aleksei Bavshin
6faab374ee
Merge branch 'upstream' into fedora 2024-03-01 07:36:11 -08:00
Aleksei Bavshin
6a81162a2b
sddm: sync theme with upstream 0.21.0 + PR#1876
Source: github.com/sddm/sddm@cc03fabf2f3025842cee30b5f05d20f56b6a2270
2024-02-27 19:39:49 -08:00
9 changed files with 74 additions and 22 deletions

View file

@ -5,16 +5,19 @@ SYSCONFDIR ?= /etc
BINDIR ?= $(PREFIX)/bin
DATADIR ?= $(PREFIX)/share
LIBEXECDIR ?= $(PREFIX)/libexec
BACKGROUND ?= $(DATADIR)/backgrounds/default.png
.PHONY: build clean install check requires
.DEFAULT: build
GENERATED := $(patsubst %.in,%,$(wildcard sway/*.in sway/*/*.in ))
VARIABLES := PREFIX SYSCONFDIR DATADIR LIBEXECDIR
TEMPLATES := sway/*.in sway/*/*.in swaylock/*.in sddm/03-sway-fedora/theme.conf.in
GENERATED := $(patsubst %.in,%,$(wildcard $(TEMPLATES)))
VARIABLES := PREFIX SYSCONFDIR DATADIR LIBEXECDIR BACKGROUND
sway/%: sway/%.in
sed "$(foreach var,$(VARIABLES),s^@$(var)@^$($(var))^i;)" $^ > $@
sed '$(foreach var,$(VARIABLES),s^$$$(var)\b^$($(var))^i;)' $^ > $@
%: %.in
sed -e "$(foreach var,$(VARIABLES),s^@$(var)@^$($(var))^i;)" \
-e '$(foreach var,$(VARIABLES),s^$$$(var)\b^$($(var))^i;)' \
$^ > $@
build: $(GENERATED)

View file

@ -41,17 +41,16 @@ Rectangle {
Connections {
target: sddm
onLoginSucceeded: {
function onLoginSucceeded() {
errorMessage.color = "steelblue"
errorMessage.text = textConstants.loginSucceeded
}
onLoginFailed: {
function onLoginFailed() {
password.text = ""
errorMessage.color = "red"
errorMessage.text = textConstants.loginFailed
}
onInformationMessage: {
function onInformationMessage(message) {
errorMessage.color = "red"
errorMessage.text = message
}
@ -127,7 +126,7 @@ Rectangle {
KeyNavigation.backtab: rebootButton; KeyNavigation.tab: password
Keys.onPressed: {
Keys.onPressed: function (event) {
if (event.key === Qt.Key_Return || event.key === Qt.Key_Enter) {
sddm.login(name.text, password.text, sessionIndex)
event.accepted = true
@ -154,7 +153,7 @@ Rectangle {
KeyNavigation.backtab: name; KeyNavigation.tab: session
Keys.onPressed: {
Keys.onPressed: function (event) {
if (event.key === Qt.Key_Return || event.key === Qt.Key_Enter) {
sddm.login(name.text, password.text, sessionIndex)
event.accepted = true
@ -165,12 +164,12 @@ Rectangle {
Row {
spacing: 4
width: parent.width
width: parent.width / 2
z: 100
Column {
z: 100
width: parent.width
width: parent.width * (layoutBox.visible ? 1.3 : 2)
spacing : 4
anchors.bottom: parent.bottom
@ -193,7 +192,35 @@ Rectangle {
model: sessionModel
index: sessionModel.lastIndex
KeyNavigation.backtab: password; KeyNavigation.tab: loginButton
KeyNavigation.backtab: password; KeyNavigation.tab: layoutBox
}
}
Column {
z: 101
width: parent.width * 0.7
spacing : 4
anchors.bottom: parent.bottom
visible: keyboard.enabled && keyboard.layouts.length > 0
Text {
id: lblLayout
width: parent.width
text: textConstants.layout
wrapMode: TextEdit.WordWrap
font.bold: true
font.pixelSize: 12
}
LayoutBox {
id: layoutBox
width: parent.width; height: 30
font.pixelSize: 14
arrowIcon: Qt.resolvedUrl("angle-down.png")
KeyNavigation.backtab: session; KeyNavigation.tab: loginButton
}
}
}
@ -221,7 +248,7 @@ Rectangle {
onClicked: sddm.login(name.text, password.text, sessionIndex)
KeyNavigation.backtab: session; KeyNavigation.tab: shutdownButton
KeyNavigation.backtab: layoutBox; KeyNavigation.tab: shutdownButton
}
Button {

View file

@ -14,3 +14,4 @@ TranslationsDirectory=translations
Email=sway@lists.fedoraproject.org
Theme-Id=03-sway-fedora
Theme-API=2.0
QtVersion=6

View file

@ -1,2 +0,0 @@
[General]
background=/usr/share/backgrounds/default.png

View file

@ -0,0 +1,2 @@
[General]
background=@BACKGROUND@

View file

@ -2,6 +2,7 @@
%bcond initialsetup %[0%{?fedora} >= 40 || 0%{?rhel} >= 10]
%bcond sddm 1
%global sway_ver 1.8
%global bg_format %[ 0%{?fedora} >= 42 ? "jxl" : "png" ]
Name: {{{ git_name }}}
Version: {{{ git_version }}}
@ -44,6 +45,9 @@ Requires: /usr/bin/pkill
Requires: brightnessctl >= 0.5.1-11
Requires: desktop-backgrounds-compat
Requires: grimshot
%if "%{bg_format}" == "jxl"
Requires: jxl-pixbuf-loader
%endif
Requires: lxqt-policykit
Requires: playerctl
Requires: pulseaudio-utils
@ -80,6 +84,9 @@ Provides: sddm-greeter-displayserver
Conflicts: sddm-greeter-displayserver
Requires: desktop-backgrounds-compat
%if "%{bg_format}" == "jxl"
Requires: kf6-kimageformats
%endif
Requires: sddm >= 0.20.0
Requires: sway >= %{sway_ver}
@ -94,11 +101,16 @@ to use Sway for the greeter display server.
%build
%make_build
%make_build \
PREFIX='%{_prefix}' \
BACKGROUND='%{_datadir}/backgrounds/default.%{bg_format}'
%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

View file

@ -30,8 +30,8 @@ set $menu $rofi_cmd -show combi -combi-modes drun#run -modes combi
### Output configuration
#
# Default wallpaper (more resolutions are available in /usr/share/backgrounds/sway/)
# Requires: desktop-backgrounds-compat, swaybg
output * bg /usr/share/backgrounds/default.png fill
# Requires: desktop-backgrounds-compat, swaybg, jxl-pixbuf-loader
output * bg @BACKGROUND@ fill
#
# Example configuration:
#

View file

@ -0,0 +1,9 @@
# Apply system-wide XKB configuration stored in systemd-localed.
#
# The configuration can be viewed with `localectl` and modified
# with `localectl set-x11-keymap`.
#
# In the live installer environment, Anaconda relies on the localed
# D-Bus API to update the keyboard configuration.
exec /usr/libexec/sway-systemd/locale1-xkb-config

View file

@ -3,5 +3,5 @@
#
# Image path supports environment variables and shell expansions,
# e.g. image=$HOME/Pictures/default.png
image=/usr/share/backgrounds/default.png
image=@BACKGROUND@
scaling=fill