Compare commits
4 commits
alebastr/w
...
fedora
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
32d27f88e2 |
||
|
|
d197b89723 |
||
|
|
6faab374ee |
||
|
|
6a81162a2b |
9 changed files with 74 additions and 22 deletions
13
Makefile
13
Makefile
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -14,3 +14,4 @@ TranslationsDirectory=translations
|
|||
Email=sway@lists.fedoraproject.org
|
||||
Theme-Id=03-sway-fedora
|
||||
Theme-API=2.0
|
||||
QtVersion=6
|
||||
|
|
|
|||
|
|
@ -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 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
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
#
|
||||
|
|
|
|||
9
sway/config.live.d/99-system-keyboard-config.conf
Normal file
9
sway/config.live.d/99-system-keyboard-config.conf
Normal 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
|
||||
|
|
@ -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
|
||||
Loading…
Add table
Add a link
Reference in a new issue