⚙️ config(ansible): added ansible and changed a lot of the yadm logic to ansible folder

i still have a lot of work to finish the ansible setup, as well as testing it (the worst part...)
This commit is contained in:
Sergio Laín 2023-11-19 15:44:53 +01:00
parent 896a952d87
commit 885b20e877
No known key found for this signature in database
GPG key ID: 14C9B8080681777B
33 changed files with 2292 additions and 424 deletions

3
.config/ansible/.github/README.md vendored Normal file
View file

@ -0,0 +1,3 @@
<div align="center">
<a href=""><img src="./title.png"></a>
</div>

BIN
.config/ansible/.github/title.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

9
.config/ansible/arch.yml Normal file
View file

@ -0,0 +1,9 @@
- name: Setup Arch Linux
hosts: local
roles:
- role: packages
vars:
role_path: roles/arch
- role: system
vars:
role_path: roles/arch

View file

@ -0,0 +1,9 @@
- name: Setup Debian Linux
hosts: local
roles:
- role: packages
vars:
role_path: roles/debian
- role: system
vars:
role_path: roles/debian

View file

@ -0,0 +1,4 @@
---
collections:
- name: community.general
- name: kewlfft.aur

View file

@ -0,0 +1,135 @@
# PACMAN
- name: Install Pacman Packages
pacman:
update_cache: yes
name:
- android-file-transfer
- android-tools
- baobab
- bat
- blender
- bluez
- blueman
- btop
- celluloid
- clamtk
- dbeaver
- diff-so-fancy
- discord
- dua-cli
- eza
- easyeffects
- fd
- fzf
- galculator
- gamemode
- geeqie
- gnome-disk-utility
- gst-plugins-base
- hyprland
- kitty
- kvantum
- lazygit
- libreoffice-still
- lsp-plugins
- lxappearance
- mesa
- mpv
- navi
- nemo
- nemo-fileroller
- nemo-image-converter
- neofetch
- neovide
- neovim
- npm
- nm-connection-editor
- nvtop
- obsidian
- onefetch
- pavucontrol
- pinta
- polkit-gnome
- ripgrep
- ripgrep-all
- scrcpy
- sd
- swappy
- swaydile
- thunderbird
- ufw
- waybar
- wine
- wl-clipboard
- yt-dlp
- yarn
- xplr
- zathura
- zathura-pdf-mupdf
# AUR
- name: Install AUR Packages
kewlfft.aur.aur:
name:
- amf-amdgpu-pro
- activitywatch-bin
- adwsteamgtk
- android-sdk-platform-tools
- ani-cli
- arronax
- betterdiscord-installer-bin
- brave-bin
- catppuccin-gtk-macchiato
- cava
- cemu-bin
- devify
- downgrade
- find-the-command
- heroic-games-launcher
- hyprpicker-git
- hyprshot
- lazynpm
- librewolf-bin
- ludusavi
- mangal-bin
- nerd-fonts-git
- nwg-displays
- nwg-look
- obs-studio-amf
- paccache-hook
- pika-backup
- pinterest-downloader-git
- pipes.sh
- prettierd
- proton-ge-custom-bin
- pyprland
- spotdl
- reflector-pacman-hook-git
- rofi-lboon-wayland-git
- rofi-file-browser-extended-git
- scc-bin
- sddm-git
- shell-color-scripts
- spicetify-cli
- spotify
- swaylock-effects
- swaync
- swayosd-git
- swww
- sysz
- tgpt-bin
- ttf-ms-win11-auto
- tty-clock-git
- unimatrix-git
- upscayl-bin
- vkbasalt
- vulkan-amdgpu-pro
- wev
- wl-clip-persist-git
- wleave-git
- wlr-randr
- wlrobs-hg
- xdg-desktop-portal-hyprland-git
- youtube-dl
- ytdlp-gui
- zarchive-git

View file

@ -0,0 +1,17 @@
- name: Ask user for type of install
hosts: all
become: true
vars_prompt:
- name: install_input
prompt: "What type of install do you want?"
choices:
- "minimal"
- "full"
default: "minimal"
private: no
block:
- name: Install packages for the system
include_tasks: "{{ install_input }}.yml"
when: install_input is defined

View file

@ -0,0 +1,135 @@
[Autologin]
# Whether sddm should automatically log back into sessions when they exit
Relogin=false
# Name of session file for autologin session (if empty try last logged in)
Session=
# Username for autologin session
User=
[General]
# Halt command
HaltCommand=/usr/bin/systemctl weroff
# Input method module
InputMethod=
# Comma-separated list of Linux namespaces for user session to enter
Namespaces=
# Initial NumLock state. Can be on, off or none.
# If property is set to none, numlock won't be changed
# NOTE: Currently ignored if autologin is enabled.
Numlock=on
# Reboot command
RebootCommand=/usr/bin/systemctl reboot
[Theme]
# Current theme name
Current=sugar-candy
# Cursor theme used in the greeter
CursorTheme=Catppuccin-Machiato-Dark
# Number of users to use as threshold
# above which avatars are disabled
# unless explicitly enabled with EnableAvatars
DisableAvatarsThreshold=7
# Enable display of custom user avatars
EnableAvatars=true
# Global directory for user avatars
# The files should be named <username>.face.icon
FacesDir=/usr/share/sddm/faces
# Font used in the greeter
Font=JetBrainsMono Nerd
# Theme directory path
ThemeDir=/usr/share/sddm/themes
[Users]
# Default $PATH for logged in users
DefaultPath=/usr/local/sbin:/usr/local/bin:/usr/bin
# Comma-separated list of shells.
# Users with these shells as their default won't be listed
HideShells=
# Comma-separated list of users that should not be listed
HideUsers=
# Maximum user id for displayed users
MaximumUid=60513
# Minimum user id for displayed users
MinimumUid=1000
# Remember the session of the last successfully logged in user
RememberLastSession=true
# Remember the last successfully logged in user
RememberLastUser=true
# When logging in as the same user twice, restore the original session, rather than create a new one
ReuseSession=true
[Wayland]
# Enable Qt's automatic high-DPI scaling
EnableHiDPI=false
# Path to a script to execute when starting the desktop session
SessionCommand=/usr/share/sddm/scripts/wayland-session
# Directory containing available Wayland sessions
SessionDir=/usr/share/wayland-sessions
# Path to the user session log file
SessionLogFile=.local/share/sddm/wayland-session.log
[X11]
# Path to a script to execute when starting the display server
DisplayCommand=/usr/share/sddm/scripts/Xsetup
# Path to a script to execute when stopping the display server
DisplayStopCommand=/usr/share/sddm/scripts/Xstop
# Enable Qt's automatic high-DPI scaling
EnableHiDPI=false
# The lowest virtual terminal number that will be used.
MinimumVT=1
# Arguments passed to the X server invocation
ServerArguments=-nolisten tcp
# Path to X server binary
ServerPath=/usr/bin/X
# Path to a script to execute when starting the desktop session
SessionCommand=/usr/share/sddm/scripts/Xsession
# Directory containing available X sessions
SessionDir=/usr/share/xsessions
# Path to the user session log file
SessionLogFile=.local/share/sddm/xorg-session.log
# Path to the Xauthority file
UserAuthFile=.Xauthority
# Path to xauth binary
XauthPath=/usr/bin/xauth
# Path to Xephyr binary
XephyrPath=/usr/bin/Xephyr

Binary file not shown.

After

Width:  |  Height:  |  Size: 3 MiB

View file

@ -0,0 +1,76 @@
//
// This file is part of SDDM Sugar Candy.
// A theme for the Simple Display Desktop Manager.
//
// Copyright (C) 20182020 Marian Arlt
//
// SDDM Sugar Candy is free software: you can redistribute it and/or modify it
// under the terms of the GNU General Public License as published by the
// Free Software Foundation, either version 3 of the License, or any later version.
//
// You are required to preserve this and any additional legal notices, either
// contained in this file or in other files that you received along with
// SDDM Sugar Candy that refer to the author(s) in accordance with
// sections §4, §5 and specifically §7b of the GNU General Public License.
//
// SDDM Sugar Candy is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with SDDM Sugar Candy. If not, see <https://www.gnu.org/licenses/>
//
import QtQuick 2.11
import QtQuick.Controls 2.4
Column {
id: clock
spacing: 0
width: parent.width / 2
Label {
anchors.horizontalCenter: parent.horizontalCenter
font.pointSize: config.HeaderText !=="" ? root.font.pointSize * 3 : 0
color: root.palette.text
renderType: Text.QtRendering
text: config.HeaderText
}
Label {
id: timeLabel
anchors.horizontalCenter: parent.horizontalCenter
font.pointSize: root.font.pointSize * 3
color: root.palette.text
renderType: Text.QtRendering
function updateTime() {
text = new Date().toLocaleTimeString(Qt.locale(config.Locale), config.HourFormat == "long" ? Locale.LongFormat : config.HourFormat !== "" ? config.HourFormat : Locale.ShortFormat)
}
}
Label {
id: dateLabel
anchors.horizontalCenter: parent.horizontalCenter
color: root.palette.text
renderType: Text.QtRendering
function updateTime() {
text = new Date().toLocaleDateString(Qt.locale(config.Locale), config.DateFormat == "short" ? Locale.ShortFormat : config.DateFormat !== "" ? config.DateFormat : Locale.LongFormat)
}
}
Timer {
interval: 1000
repeat: true
running: true
onTriggered: {
dateLabel.updateTime()
timeLabel.updateTime()
}
}
Component.onCompleted: {
dateLabel.updateTime()
timeLabel.updateTime()
}
}

View file

@ -0,0 +1,576 @@
//
// This file is part of SDDM Sugar Candy.
// A theme for the Simple Display Desktop Manager.
//
// Copyright (C) 20182020 Marian Arlt
//
// SDDM Sugar Candy is free software: you can redistribute it and/or modify it
// under the terms of the GNU General Public License as published by the
// Free Software Foundation, either version 3 of the License, or any later version.
//
// You are required to preserve this and any additional legal notices, either
// contained in this file or in other files that you received along with
// SDDM Sugar Candy that refer to the author(s) in accordance with
// sections §4, §5 and specifically §7b of the GNU General Public License.
//
// SDDM Sugar Candy is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with SDDM Sugar Candy. If not, see <https://www.gnu.org/licenses/>
//
import QtQuick 2.11
import QtQuick.Layouts 1.11
import QtQuick.Controls 2.4
import QtGraphicalEffects 1.0
Column {
id: inputContainer
Layout.fillWidth: true
property Control exposeSession: sessionSelect.exposeSession
property bool failed
Item {
id: usernameField
height: root.font.pointSize * 4.5
width: parent.width / 2
anchors.horizontalCenter: parent.horizontalCenter
ComboBox {
id: selectUser
width: parent.height
height: parent.height
anchors.left: parent.left
property var popkey: config.ForceRightToLeft == "true" ? Qt.Key_Right : Qt.Key_Left
Keys.onPressed: {
if (event.key == Qt.Key_Down && !popup.opened)
username.forceActiveFocus();
if ((event.key == Qt.Key_Up || event.key == popkey) && !popup.opened)
popup.open();
}
KeyNavigation.down: username
KeyNavigation.right: username
z: 2
model: userModel
currentIndex: model.lastIndex
textRole: "name"
hoverEnabled: true
onActivated: {
username.text = currentText
}
delegate: ItemDelegate {
width: parent.width
anchors.horizontalCenter: parent.horizontalCenter
contentItem: Text {
text: model.name
font.pointSize: root.font.pointSize * 0.8
font.capitalization: Font.Capitalize
color: selectUser.highlightedIndex === index ? root.palette.highlight.hslLightness >= 0.7 ? "#444" : "white" : root.palette.window.hslLightness >= 0.8 ? root.palette.highlight.hslLightness >= 0.8 ? "#444" : root.palette.highlight : "white"
verticalAlignment: Text.AlignVCenter
horizontalAlignment: Text.AlignHCenter
}
highlighted: parent.highlightedIndex === index
background: Rectangle {
color: selectUser.highlightedIndex === index ? root.palette.highlight : "transparent"
}
}
indicator: Button {
id: usernameIcon
width: selectUser.height * 0.8
height: parent.height
anchors.left: parent.left
anchors.verticalCenter: parent.verticalCenter
anchors.leftMargin: selectUser.height * 0.125
icon.height: parent.height * 0.25
icon.width: parent.height * 0.25
enabled: false
icon.color: root.palette.text
icon.source: Qt.resolvedUrl("../Assets/User.svgz")
}
background: Rectangle {
color: "transparent"
border.color: "transparent"
}
popup: Popup {
y: parent.height - username.height / 3
x: config.ForceRightToLeft == "true" ? -loginButton.width + selectUser.width : 0
rightMargin: config.ForceRightToLeft == "true" ? root.padding + usernameField.width / 2 : undefined
width: usernameField.width
implicitHeight: contentItem.implicitHeight
padding: 10
contentItem: ListView {
clip: true
implicitHeight: contentHeight + 20
model: selectUser.popup.visible ? selectUser.delegateModel : null
currentIndex: selectUser.highlightedIndex
ScrollIndicator.vertical: ScrollIndicator { }
}
background: Rectangle {
radius: config.RoundCorners / 2
color: root.palette.window
layer.enabled: true
layer.effect: DropShadow {
transparentBorder: true
horizontalOffset: 0
verticalOffset: 10 * config.InterfaceShadowSize
radius: 20 * config.InterfaceShadowSize
samples: 41 * config.InterfaceShadowSize
cached: true
color: Qt.hsla(0,0,0,config.InterfaceShadowOpacity)
}
}
enter: Transition {
NumberAnimation { property: "opacity"; from: 0; to: 1 }
}
}
states: [
State {
name: "pressed"
when: selectUser.down
PropertyChanges {
target: usernameIcon
icon.color: Qt.lighter(root.palette.highlight, 1.1)
}
},
State {
name: "hovered"
when: selectUser.hovered
PropertyChanges {
target: usernameIcon
icon.color: Qt.lighter(root.palette.highlight, 1.2)
}
},
State {
name: "focused"
when: selectUser.activeFocus
PropertyChanges {
target: usernameIcon
icon.color: root.palette.highlight
}
}
]
transitions: [
Transition {
PropertyAnimation {
properties: "color, border.color, icon.color"
duration: 150
}
}
]
}
TextField {
id: username
text: config.ForceLastUser == "true" ? selectUser.currentText : null
font.capitalization: config.AllowBadUsernames == "false" ? Font.Capitalize : Font.MixedCase
anchors.centerIn: parent
height: root.font.pointSize * 3
width: parent.width
placeholderText: config.TranslatePlaceholderUsername || textConstants.userName
selectByMouse: true
horizontalAlignment: TextInput.AlignHCenter
renderType: Text.QtRendering
onFocusChanged:{
if(focus)
selectAll()
}
background: Rectangle {
color: "transparent"
border.color: root.palette.text
border.width: parent.activeFocus ? 2 : 1
radius: config.RoundCorners || 0
}
onAccepted: loginButton.clicked()
KeyNavigation.down: password
z: 1
states: [
State {
name: "focused"
when: username.activeFocus
PropertyChanges {
target: username.background
border.color: root.palette.highlight
}
PropertyChanges {
target: username
color: root.palette.highlight
}
}
]
}
}
Item {
id: passwordField
height: root.font.pointSize * 4.5
width: parent.width / 2
anchors.horizontalCenter: parent.horizontalCenter
TextField {
id: password
anchors.centerIn: parent
height: root.font.pointSize * 3
width: parent.width
focus: config.ForcePasswordFocus == "true" ? true : false
selectByMouse: true
echoMode: revealSecret.checked ? TextInput.Normal : TextInput.Password
placeholderText: config.TranslatePlaceholderPassword || textConstants.password
horizontalAlignment: TextInput.AlignHCenter
passwordCharacter: "•"
passwordMaskDelay: config.ForceHideCompletePassword == "true" ? undefined : 1000
renderType: Text.QtRendering
background: Rectangle {
color: "transparent"
border.color: root.palette.text
border.width: parent.activeFocus ? 2 : 1
radius: config.RoundCorners || 0
}
onAccepted: loginButton.clicked()
KeyNavigation.down: revealSecret
}
states: [
State {
name: "focused"
when: password.activeFocus
PropertyChanges {
target: password.background
border.color: root.palette.highlight
}
PropertyChanges {
target: password
color: root.palette.highlight
}
}
]
transitions: [
Transition {
PropertyAnimation {
properties: "color, border.color"
duration: 150
}
}
]
}
Item {
id: secretCheckBox
height: root.font.pointSize * 7
width: parent.width / 2
anchors.horizontalCenter: parent.horizontalCenter
CheckBox {
id: revealSecret
width: parent.width
hoverEnabled: true
indicator: Rectangle {
id: indicator
anchors.left: parent.left
anchors.top: parent.top
anchors.topMargin: 3
anchors.leftMargin: 4
implicitHeight: root.font.pointSize
implicitWidth: root.font.pointSize
color: "transparent"
border.color: root.palette.text
border.width: parent.activeFocus ? 2 : 1
Rectangle {
id: dot
anchors.centerIn: parent
implicitHeight: parent.width - 6
implicitWidth: parent.width - 6
color: root.palette.text
opacity: revealSecret.checked ? 1 : 0
}
}
contentItem: Text {
id: indicatorLabel
text: config.TranslateShowPassword || "Show Password"
anchors.verticalCenter: indicator.verticalCenter
horizontalAlignment: Text.AlignLeft
anchors.left: indicator.right
anchors.leftMargin: indicator.width / 2
font.pointSize: root.font.pointSize * 0.8
color: root.palette.text
}
Keys.onReturnPressed: toggle()
Keys.onEnterPressed: toggle()
KeyNavigation.down: loginButton
background: Rectangle {
color: "transparent"
border.width: parent.activeFocus ? 1 : 0
border.color: parent.activeFocus ? root.palette.text : "transparent"
height: parent.activeFocus ? 2 : 0
width: (indicator.width + indicatorLabel.contentWidth + indicatorLabel.anchors.leftMargin + 2)
anchors.top: indicatorLabel.bottom
anchors.left: parent.left
anchors.leftMargin: 3
anchors.topMargin: 8
}
}
states: [
State {
name: "pressed"
when: revealSecret.down
PropertyChanges {
target: revealSecret.contentItem
color: Qt.darker(root.palette.highlight, 1.1)
}
PropertyChanges {
target: dot
color: Qt.darker(root.palette.highlight, 1.1)
}
PropertyChanges {
target: indicator
border.color: Qt.darker(root.palette.highlight, 1.1)
}
PropertyChanges {
target: revealSecret.background
border.color: Qt.darker(root.palette.highlight, 1.1)
}
},
State {
name: "hovered"
when: revealSecret.hovered
PropertyChanges {
target: indicatorLabel
color: Qt.lighter(root.palette.highlight, 1.1)
}
PropertyChanges {
target: indicator
border.color: Qt.lighter(root.palette.highlight, 1.1)
}
PropertyChanges {
target: dot
color: Qt.lighter(root.palette.highlight, 1.1)
}
PropertyChanges {
target: revealSecret.background
border.color: Qt.lighter(root.palette.highlight, 1.1)
}
},
State {
name: "focused"
when: revealSecret.activeFocus
PropertyChanges {
target: indicatorLabel
color: root.palette.highlight
}
PropertyChanges {
target: indicator
border.color: root.palette.highlight
}
PropertyChanges {
target: dot
color: root.palette.highlight
}
PropertyChanges {
target: revealSecret.background
border.color: root.palette.highlight
}
}
]
transitions: [
Transition {
PropertyAnimation {
properties: "color, border.color, opacity"
duration: 150
}
}
]
}
Item {
height: root.font.pointSize * 2.3
width: parent.width / 2
anchors.horizontalCenter: parent.horizontalCenter
Label {
id: errorMessage
width: parent.width
text: failed ? config.TranslateLoginFailedWarning || textConstants.loginFailed + "!" : keyboard.capsLock ? config.TranslateCapslockWarning || textConstants.capslockWarning : null
horizontalAlignment: Text.AlignHCenter
font.pointSize: root.font.pointSize * 0.8
font.italic: true
color: root.palette.text
opacity: 0
states: [
State {
name: "fail"
when: failed
PropertyChanges {
target: errorMessage
opacity: 1
}
},
State {
name: "capslock"
when: keyboard.capsLock
PropertyChanges {
target: errorMessage
opacity: 1
}
}
]
transitions: [
Transition {
PropertyAnimation {
properties: "opacity"
duration: 100
}
}
]
}
}
Item {
id: login
height: root.font.pointSize * 3
width: parent.width / 2
anchors.horizontalCenter: parent.horizontalCenter
Button {
id: loginButton
anchors.horizontalCenter: parent.horizontalCenter
text: config.TranslateLogin || textConstants.login
height: root.font.pointSize * 3
implicitWidth: parent.width
enabled: config.AllowEmptyPassword == "true" || username.text != "" && password.text != "" ? true : false
hoverEnabled: true
contentItem: Text {
text: parent.text
color: config.OverrideLoginButtonTextColor != "" ? config.OverrideLoginButtonTextColor : root.palette.highlight.hslLightness >= 0.7 ? "#444" : "white"
font.pointSize: root.font.pointSize
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
opacity: 0.5
}
background: Rectangle {
id: buttonBackground
color: "white"
opacity: 0.2
radius: config.RoundCorners || 0
}
states: [
State {
name: "pressed"
when: loginButton.down
PropertyChanges {
target: buttonBackground
color: Qt.darker(root.palette.highlight, 1.1)
opacity: 1
}
PropertyChanges {
target: loginButton.contentItem
}
},
State {
name: "hovered"
when: loginButton.hovered
PropertyChanges {
target: buttonBackground
color: Qt.lighter(root.palette.highlight, 1.15)
opacity: 1
}
PropertyChanges {
target: loginButton.contentItem
opacity: 1
}
},
State {
name: "focused"
when: loginButton.activeFocus
PropertyChanges {
target: buttonBackground
color: Qt.lighter(root.palette.highlight, 1.2)
opacity: 1
}
PropertyChanges {
target: loginButton.contentItem
opacity: 1
}
},
State {
name: "enabled"
when: loginButton.enabled
PropertyChanges {
target: buttonBackground;
color: root.palette.highlight;
opacity: 1
}
PropertyChanges {
target: loginButton.contentItem;
opacity: 1
}
}
]
transitions: [
Transition {
PropertyAnimation {
properties: "opacity, color";
duration: 300
}
}
]
onClicked: config.AllowBadUsernames == "false" ? sddm.login(username.text.toLowerCase(), password.text, sessionSelect.selectedSession) : sddm.login(username.text, password.text, sessionSelect.selectedSession)
Keys.onReturnPressed: clicked()
Keys.onEnterPressed: clicked()
KeyNavigation.down: sessionSelect.exposeSession
}
}
SessionButton {
id: sessionSelect
textConstantSession: textConstants.session
loginButtonWidth: loginButton.background.width
}
Connections {
target: sddm
onLoginSucceeded: {}
onLoginFailed: {
failed = true
resetError.running ? resetError.stop() && resetError.start() : resetError.start()
}
}
Timer {
id: resetError
interval: 2000
onTriggered: failed = false
running: false
}
}

View file

@ -0,0 +1,63 @@
//
// This file is part of SDDM Sugar Candy.
// A theme for the Simple Display Desktop Manager.
//
// Copyright (C) 20182020 Marian Arlt
//
// SDDM Sugar Candy is free software: you can redistribute it and/or modify it
// under the terms of the GNU General Public License as published by the
// Free Software Foundation, either version 3 of the License, or any later version.
//
// You are required to preserve this and any additional legal notices, either
// contained in this file or in other files that you received along with
// SDDM Sugar Candy that refer to the author(s) in accordance with
// sections §4, §5 and specifically §7b of the GNU General Public License.
//
// SDDM Sugar Candy is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with SDDM Sugar Candy. If not, see <https://www.gnu.org/licenses/>
//
import QtQuick 2.11
import QtQuick.Layouts 1.11
import SddmComponents 2.0 as SDDM
ColumnLayout {
id: formContainer
SDDM.TextConstants { id: textConstants }
property int p: config.ScreenPadding
property string a: config.FormPosition
property alias systemButtonVisibility: systemButtons.visible
property alias clockVisibility: clock.visible
property bool virtualKeyboardActive
Clock {
id: clock
Layout.alignment: Qt.AlignHCenter | Qt.AlignBottom
Layout.preferredHeight: root.height / 4
Layout.leftMargin: p != "0" ? a == "left" ? -p : a == "right" ? p : 0 : 0
}
Input {
id: input
Layout.alignment: Qt.AlignVCenter
Layout.preferredHeight: root.height / 10
Layout.leftMargin: p != "0" ? a == "left" ? -p : a == "right" ? p : 0 : 0
Layout.topMargin: virtualKeyboardActive ? -height * 1.5 : 0
}
SystemButtons {
id: systemButtons
Layout.alignment: Qt.AlignHCenter | Qt.AlignBottom
Layout.preferredHeight: root.height / 4
Layout.maximumHeight: root.height / 4
Layout.leftMargin: p != "0" ? a == "left" ? -p : a == "right" ? p : 0 : 0
exposedSession: input.exposeSession
}
}

View file

@ -0,0 +1,194 @@
//
// This file is part of SDDM Sugar Candy.
// A theme for the Simple Display Desktop Manager.
//
// Copyright (C) 20182020 Marian Arlt
//
// SDDM Sugar Candy is free software: you can redistribute it and/or modify it
// under the terms of the GNU General Public License as published by the
// Free Software Foundation, either version 3 of the License, or any later version.
//
// You are required to preserve this and any additional legal notices, either
// contained in this file or in other files that you received along with
// SDDM Sugar Candy that refer to the author(s) in accordance with
// sections §4, §5 and specifically §7b of the GNU General Public License.
//
// SDDM Sugar Candy is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with SDDM Sugar Candy. If not, see <https://www.gnu.org/licenses/>
//
import QtQuick 2.11
import QtQuick.Controls 2.4
import QtGraphicalEffects 1.0
Item {
id: sessionButton
height: root.font.pointSize
width: parent.width / 2
anchors.horizontalCenter: parent.horizontalCenter
property var selectedSession: selectSession.currentIndex
property string textConstantSession
property int loginButtonWidth
property Control exposeSession: selectSession
ComboBox {
id: selectSession
hoverEnabled: true
anchors.left: parent.left
Keys.onPressed: {
if (event.key == Qt.Key_Up && loginButton.state != "enabled" && !popup.opened)
revealSecret.focus = true,
revealSecret.state = "focused",
currentIndex = currentIndex + 1;
if (event.key == Qt.Key_Up && loginButton.state == "enabled" && !popup.opened)
loginButton.focus = true,
loginButton.state = "focused",
currentIndex = currentIndex + 1;
if (event.key == Qt.Key_Down && !popup.opened)
systemButtons.children[0].focus = true,
systemButtons.children[0].state = "focused",
currentIndex = currentIndex - 1;
if ((event.key == Qt.Key_Left || event.key == Qt.Key_Right) && !popup.opened)
popup.open();
}
model: sessionModel
currentIndex: model.lastIndex
textRole: "name"
delegate: ItemDelegate {
width: parent.width
anchors.horizontalCenter: parent.horizontalCenter
contentItem: Text {
text: model.name
font.pointSize: root.font.pointSize * 0.8
color: selectSession.highlightedIndex === index ? root.palette.highlight.hslLightness >= 0.7 ? "#444444" : "white" : root.palette.window.hslLightness >= 0.8 ? root.palette.highlight.hslLightness >= 0.8 ? "#444444" : root.palette.highlight : "white"
verticalAlignment: Text.AlignVCenter
horizontalAlignment: Text.AlignHCenter
}
highlighted: parent.highlightedIndex === index
background: Rectangle {
color: selectSession.highlightedIndex === index ? root.palette.highlight : "transparent"
}
}
indicator {
visible: false
}
contentItem: Text {
id: displayedItem
text: (config.TranslateSession || (textConstantSession + ":")) + " " + selectSession.currentText
color: root.palette.text
verticalAlignment: Text.AlignVCenter
anchors.left: parent.left
anchors.leftMargin: 3
font.pointSize: root.font.pointSize * 0.8
Keys.onReleased: parent.popup.open()
}
background: Rectangle {
color: "transparent"
border.width: parent.visualFocus ? 1 : 0
border.color: "transparent"
height: parent.visualFocus ? 2 : 0
width: displayedItem.implicitWidth
anchors.top: parent.bottom
anchors.left: parent.left
anchors.leftMargin: 3
}
popup: Popup {
id: popupHandler
y: parent.height - 1
x: config.ForceRightToLeft == "true" ? -loginButtonWidth + displayedItem.width : 0
width: sessionButton.width
implicitHeight: contentItem.implicitHeight
padding: 10
contentItem: ListView {
clip: true
implicitHeight: contentHeight + 20
model: selectSession.popup.visible ? selectSession.delegateModel : null
currentIndex: selectSession.highlightedIndex
ScrollIndicator.vertical: ScrollIndicator { }
}
background: Rectangle {
radius: config.RoundCorners / 2
color: config.BackgroundColor
layer.enabled: true
layer.effect: DropShadow {
transparentBorder: true
horizontalOffset: 0
verticalOffset: 0
radius: 20 * config.InterfaceShadowSize
samples: 41 * config.InterfaceShadowSize
cached: true
color: Qt.hsla(0,0,0,config.InterfaceShadowOpacity)
}
}
enter: Transition {
NumberAnimation { property: "opacity"; from: 0; to: 1 }
}
}
states: [
State {
name: "pressed"
when: selectSession.down
PropertyChanges {
target: displayedItem
color: Qt.darker(root.palette.highlight, 1.1)
}
PropertyChanges {
target: selectSession.background
border.color: Qt.darker(root.palette.highlight, 1.1)
}
},
State {
name: "hovered"
when: selectSession.hovered
PropertyChanges {
target: displayedItem
color: Qt.lighter(root.palette.highlight, 1.1)
}
PropertyChanges {
target: selectSession.background
border.color: Qt.lighter(root.palette.highlight, 1.1)
}
},
State {
name: "focused"
when: selectSession.visualFocus
PropertyChanges {
target: displayedItem
color: root.palette.highlight
}
PropertyChanges {
target: selectSession.background
border.color: root.palette.highlight
}
}
]
transitions: [
Transition {
PropertyAnimation {
properties: "color, border.color"
duration: 150
}
}
]
}
}

View file

@ -0,0 +1,124 @@
//
// This file is part of SDDM Sugar Candy.
// A theme for the Simple Display Desktop Manager.
//
// Copyright (C) 20182020 Marian Arlt
//
// SDDM Sugar Candy is free software: you can redistribute it and/or modify it
// under the terms of the GNU General Public License as published by the
// Free Software Foundation, either version 3 of the License, or any later version.
//
// You are required to preserve this and any additional legal notices, either
// contained in this file or in other files that you received along with
// SDDM Sugar Candy that refer to the author(s) in accordance with
// sections §4, §5 and specifically §7b of the GNU General Public License.
//
// SDDM Sugar Candy is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with SDDM Sugar Candy. If not, see <https://www.gnu.org/licenses/>
//
import QtQuick 2.11
import QtQuick.Layouts 1.11
import QtQuick.Controls 2.4
RowLayout {
spacing: root.font.pointSize
property var suspend: ["Suspend", config.TranslateSuspend || textConstants.suspend, sddm.canSuspend]
property var hibernate: ["Hibernate", config.TranslateHibernate || textConstants.hibernate, sddm.canHibernate]
property var reboot: ["Reboot", config.TranslateReboot || textConstants.reboot, sddm.canReboot]
property var shutdown: ["Shutdown", config.TranslateShutdown || textConstants.shutdown, sddm.canPowerOff]
property Control exposedSession
Repeater {
id: systemButtons
model: [suspend, hibernate, reboot, shutdown]
RoundButton {
text: modelData[1]
font.pointSize: root.font.pointSize * 0.8
Layout.alignment: Qt.AlignHCenter
icon.source: modelData ? Qt.resolvedUrl("../Assets/" + modelData[0] + ".svgz") : ""
icon.height: 2 * Math.round((root.font.pointSize * 3) / 2)
icon.width: 2 * Math.round((root.font.pointSize * 3) / 2)
display: AbstractButton.TextUnderIcon
visible: config.ForceHideSystemButtons != "true" && modelData[2]
hoverEnabled: true
palette.buttonText: root.palette.text
background: Rectangle {
height: 2
color: "transparent"
width: parent.width
border.width: parent.activeFocus ? 1 : 0
border.color: "transparent"
anchors.top: parent.bottom
}
Keys.onReturnPressed: clicked()
onClicked: {
parent.forceActiveFocus()
index == 0 ? sddm.suspend() : index == 1 ? sddm.hibernate() : index == 2 ? sddm.reboot() : sddm.powerOff()
}
KeyNavigation.up: exposedSession
KeyNavigation.left: parent.children[index-1]
states: [
State {
name: "pressed"
when: parent.children[index].down
PropertyChanges {
target: parent.children[index]
palette.buttonText: Qt.darker(root.palette.highlight, 1.1)
}
PropertyChanges {
target: parent.children[index].background
border.color: Qt.darker(root.palette.highlight, 1.1)
}
},
State {
name: "hovered"
when: parent.children[index].hovered
PropertyChanges {
target: parent.children[index]
palette.buttonText: Qt.lighter(root.palette.highlight, 1.1)
}
PropertyChanges {
target: parent.children[index].background
border.color: Qt.lighter(root.palette.highlight, 1.1)
}
},
State {
name: "focused"
when: parent.children[index].activeFocus
PropertyChanges {
target: parent.children[index]
palette.buttonText: root.palette.highlight
}
PropertyChanges {
target: parent.children[index].background
border.color: root.palette.highlight
}
}
]
transitions: [
Transition {
PropertyAnimation {
properties: "palette.buttonText, border.color"
duration: 150
}
}
]
}
}
}

View file

@ -0,0 +1,202 @@
//
// This file is part of SDDM Sugar Candy.
// A theme for the Simple Display Desktop Manager.
//
// Copyright (C) 20182020 Marian Arlt
//
// SDDM Sugar Candy is free software: you can redistribute it and/or modify it
// under the terms of the GNU General Public License as published by the
// Free Software Foundation, either version 3 of the License, or any later version.
//
// You are required to preserve this and any additional legal notices, either
// contained in this file or in other files that you received along with
// SDDM Sugar Candy that refer to the author(s) in accordance with
// sections §4, §5 and specifically §7b of the GNU General Public License.
//
// SDDM Sugar Candy is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with SDDM Sugar Candy. If not, see <https://www.gnu.org/licenses/>
//
import QtQuick 2.11
import QtQuick.Controls 2.4
import QtGraphicalEffects 1.0
Item {
id: usernameField
height: root.font.pointSize * 4.5
width: parent.width / 2
anchors.horizontalCenter: parent.horizontalCenter
property var selectedUser: selectUser.currentIndex
property alias user: username.text
ComboBox {
id: selectUser
width: parent.height
height: parent.height
anchors.left: parent.left
z: 2
model: userModel
currentIndex: model.lastIndex
textRole: "name"
hoverEnabled: true
onActivated: {
username.text = currentText
}
delegate: ItemDelegate {
width: parent.width
anchors.horizontalCenter: parent.horizontalCenter
contentItem: Text {
text: model.name
font.pointSize: root.font.pointSize * 0.8
font.capitalization: Font.Capitalize
color: selectUser.highlightedIndex === index ? "white" : root.palette.window.hslLightness >= 0.8 ? root.palette.highlight : "white"
verticalAlignment: Text.AlignVCenter
horizontalAlignment: Text.AlignHCenter
}
highlighted: parent.highlightedIndex === index
background: Rectangle {
color: selectUser.highlightedIndex === index ? root.palette.highlight : "transparent"
}
}
indicator: Button {
id: usernameIcon
width: selectUser.height * 0.8
height: parent.height
anchors.left: parent.left
anchors.verticalCenter: parent.verticalCenter
anchors.leftMargin: selectUser.height * 0.125
icon.height: parent.height * 0.25
icon.width: parent.height * 0.25
enabled: false
icon.color: root.palette.text
icon.source: Qt.resolvedUrl("../Assets/User.svgz")
}
background: Rectangle {
color: "transparent"
border.color: "transparent"
}
popup: Popup {
y: parent.height - username.height / 3
rightMargin: config.ForceRightToLeft == "true" ? usernameField.width / 2 : undefined
width: usernameField.width
implicitHeight: contentItem.implicitHeight
padding: 10
contentItem: ListView {
clip: true
implicitHeight: contentHeight + 20
model: selectUser.popup.visible ? selectUser.delegateModel : null
currentIndex: selectUser.highlightedIndex
ScrollIndicator.vertical: ScrollIndicator { }
}
background: Rectangle {
radius: 10
color: root.palette.window
layer.enabled: true
layer.effect: DropShadow {
transparentBorder: true
horizontalOffset: 0
verticalOffset: 0
radius: 100
samples: 201
cached: true
color: "#88000000"
}
}
enter: Transition {
NumberAnimation { property: "opacity"; from: 0; to: 1 }
}
}
states: [
State {
name: "pressed"
when: selectUser.down
PropertyChanges {
target: usernameIcon
icon.color: Qt.lighter(root.palette.highlight, 1.1)
}
},
State {
name: "hovered"
when: selectUser.hovered
PropertyChanges {
target: usernameIcon
icon.color: Qt.lighter(root.palette.highlight, 1.2)
}
},
State {
name: "focused"
when: selectUser.visualFocus
PropertyChanges {
target: usernameIcon
icon.color: root.palette.highlight
}
}
]
transitions: [
Transition {
PropertyAnimation {
properties: "color, border.color, icon.color"
duration: 150
}
}
]
}
TextField {
id: username
text: config.ForceLastUser == "true" ? selectUser.currentText : null
font.capitalization: Font.Capitalize
anchors.centerIn: parent
height: root.font.pointSize * 3
width: parent.width
placeholderText: config.TranslateUsernamePlaceholder || textConstants.userName
selectByMouse: true
horizontalAlignment: TextInput.AlignHCenter
renderType: Text.QtRendering
background: Rectangle {
color: "transparent"
border.color: root.palette.text
border.width: parent.activeFocus ? 2 : 1
radius: config.RoundCorners || 0
}
Keys.onReturnPressed: loginButton.clicked()
KeyNavigation.down: password
z: 1
states: [
State {
name: "focused"
when: username.activeFocus
PropertyChanges {
target: username.background
border.color: root.palette.highlight
}
PropertyChanges {
target: username
color: root.palette.highlight
}
}
]
}
}

View file

@ -0,0 +1,33 @@
//
// This file is part of SDDM Sugar Candy.
// A theme for the Simple Display Desktop Manager.
//
// Copyright (C) 20182020 Marian Arlt
//
// SDDM Sugar Candy is free software: you can redistribute it and/or modify it
// under the terms of the GNU General Public License as published by the
// Free Software Foundation, either version 3 of the License, or any later version.
//
// You are required to preserve this and any additional legal notices, either
// contained in this file or in other files that you received along with
// SDDM Sugar Candy that refer to the author(s) in accordance with
// sections §4, §5 and specifically §7b of the GNU General Public License.
//
// SDDM Sugar Candy is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with SDDM Sugar Candy. If not, see <https://www.gnu.org/licenses/>
//
import QtQuick 2.11
import QtQuick.VirtualKeyboard 2.3
InputPanel {
id: virtualKeyboard
property bool activated: false
active: activated && Qt.inputMethod.visible
visible: active
}

View file

@ -0,0 +1,274 @@
//
// This file is part of SDDM Sugar Candy.
// A theme for the Simple Display Desktop Manager.
//
// Copyright (C) 20182020 Marian Arlt
//
// SDDM Sugar Candy is free software: you can redistribute it and/or modify it
// under the terms of the GNU General Public License as published by the
// Free Software Foundation, either version 3 of the License, or any later version.
//
// You are required to preserve this and any additional legal notices, either
// contained in this file or in other files that you received along with
// SDDM Sugar Candy that refer to the author(s) in accordance with
// sections §4, §5 and specifically §7b of the GNU General Public License.
//
// SDDM Sugar Candy is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with SDDM Sugar Candy. If not, see <https://www.gnu.org/licenses/>
//
import QtQuick 2.11
import QtQuick.Layouts 1.11
import QtQuick.Controls 2.4
import QtGraphicalEffects 1.0
import "Components"
Pane {
id: root
height: config.ScreenHeight || Screen.height
width: config.ScreenWidth || Screen.ScreenWidth
LayoutMirroring.enabled: config.ForceRightToLeft == "true" ? true : Qt.application.layoutDirection === Qt.RightToLeft
LayoutMirroring.childrenInherit: true
padding: config.ScreenPadding
palette.button: "transparent"
palette.highlight: config.AccentColor
palette.text: config.MainColor
palette.buttonText: config.MainColor
palette.window: config.BackgroundColor
font.family: config.Font
font.pointSize: config.FontSize !== "" ? config.FontSize : parseInt(height / 80)
focus: true
property bool leftleft: config.HaveFormBackground == "true" &&
config.PartialBlur == "false" &&
config.FormPosition == "left" &&
config.BackgroundImageHAlignment == "left"
property bool leftcenter: config.HaveFormBackground == "true" &&
config.PartialBlur == "false" &&
config.FormPosition == "left" &&
config.BackgroundImageHAlignment == "center"
property bool rightright: config.HaveFormBackground == "true" &&
config.PartialBlur == "false" &&
config.FormPosition == "right" &&
config.BackgroundImageHAlignment == "right"
property bool rightcenter: config.HaveFormBackground == "true" &&
config.PartialBlur == "false" &&
config.FormPosition == "right" &&
config.BackgroundImageHAlignment == "center"
Item {
id: sizeHelper
anchors.fill: parent
height: parent.height
width: parent.width
Rectangle {
id: tintLayer
anchors.fill: parent
width: parent.width
height: parent.height
color: "black"
opacity: config.DimBackgroundImage
z: 1
}
Rectangle {
id: formBackground
anchors.fill: form
anchors.centerIn: form
color: root.palette.window
visible: config.HaveFormBackground == "true" ? true : false
opacity: config.PartialBlur == "true" ? 0.3 : 1
z: 1
}
LoginForm {
id: form
height: virtualKeyboard.state == "visible" ? parent.height - virtualKeyboard.implicitHeight : parent.height
width: parent.width / 2.5
anchors.horizontalCenter: config.FormPosition == "center" ? parent.horizontalCenter : undefined
anchors.left: config.FormPosition == "left" ? parent.left : undefined
anchors.right: config.FormPosition == "right" ? parent.right : undefined
virtualKeyboardActive: virtualKeyboard.state == "visible" ? true : false
z: 1
}
Button {
id: vkb
onClicked: virtualKeyboard.switchState()
visible: virtualKeyboard.status == Loader.Ready && config.ForceHideVirtualKeyboardButton == "false"
anchors.bottom: parent.bottom
anchors.bottomMargin: implicitHeight
anchors.horizontalCenter: form.horizontalCenter
z: 1
contentItem: Text {
text: config.TranslateVirtualKeyboardButton || "Virtual Keyboard"
color: parent.visualFocus ? palette.highlight : palette.text
font.pointSize: root.font.pointSize * 0.8
}
background: Rectangle {
id: vkbbg
color: "transparent"
}
}
Loader {
id: virtualKeyboard
source: "Components/VirtualKeyboard.qml"
state: "hidden"
property bool keyboardActive: item ? item.active : false
onKeyboardActiveChanged: keyboardActive ? state = "visible" : state = "hidden"
width: parent.width
z: 1
function switchState() { state = state == "hidden" ? "visible" : "hidden" }
states: [
State {
name: "visible"
PropertyChanges {
target: form
systemButtonVisibility: false
clockVisibility: false
}
PropertyChanges {
target: virtualKeyboard
y: root.height - virtualKeyboard.height
opacity: 1
}
},
State {
name: "hidden"
PropertyChanges {
target: virtualKeyboard
y: root.height - root.height/4
opacity: 0
}
}
]
transitions: [
Transition {
from: "hidden"
to: "visible"
SequentialAnimation {
ScriptAction {
script: {
virtualKeyboard.item.activated = true;
Qt.inputMethod.show();
}
}
ParallelAnimation {
NumberAnimation {
target: virtualKeyboard
property: "y"
duration: 100
easing.type: Easing.OutQuad
}
OpacityAnimator {
target: virtualKeyboard
duration: 100
easing.type: Easing.OutQuad
}
}
}
},
Transition {
from: "visible"
to: "hidden"
SequentialAnimation {
ParallelAnimation {
NumberAnimation {
target: virtualKeyboard
property: "y"
duration: 100
easing.type: Easing.InQuad
}
OpacityAnimator {
target: virtualKeyboard
duration: 100
easing.type: Easing.InQuad
}
}
ScriptAction {
script: {
Qt.inputMethod.hide();
}
}
}
}
]
}
Image {
id: backgroundImage
height: parent.height
width: config.HaveFormBackground == "true" && config.FormPosition != "center" && config.PartialBlur != "true" ? parent.width - formBackground.width : parent.width
anchors.left: leftleft ||
leftcenter ?
formBackground.right : undefined
anchors.right: rightright ||
rightcenter ?
formBackground.left : undefined
horizontalAlignment: config.BackgroundImageHAlignment == "left" ?
Image.AlignLeft :
config.BackgroundImageHAlignment == "right" ?
Image.AlignRight : Image.AlignHCenter
verticalAlignment: config.BackgroundImageVAlignment == "top" ?
Image.AlignTop :
config.BackgroundImageVAlignment == "bottom" ?
Image.AlignBottom : Image.AlignVCenter
source: config.background || config.Background
fillMode: config.ScaleImageCropped == "true" ? Image.PreserveAspectCrop : Image.PreserveAspectFit
asynchronous: true
cache: true
clip: true
mipmap: true
}
MouseArea {
anchors.fill: backgroundImage
onClicked: parent.forceActiveFocus()
}
ShaderEffectSource {
id: blurMask
sourceItem: backgroundImage
width: form.width
height: parent.height
anchors.centerIn: form
sourceRect: Qt.rect(x,y,width,height)
visible: config.FullBlur == "true" || config.PartialBlur == "true" ? true : false
}
GaussianBlur {
id: blur
height: parent.height
width: config.FullBlur == "true" ? parent.width : form.width
source: config.FullBlur == "true" ? backgroundImage : blurMask
radius: config.BlurRadius
samples: config.BlurRadius * 2 + 1
cached: true
anchors.centerIn: config.FullBlur == "true" ? parent : form
visible: config.FullBlur == "true" || config.PartialBlur == "true" ? true : false
}
}
}

View file

@ -0,0 +1,16 @@
[SddmGreeterTheme]
Name=Sugar Candy
Description=Premium Sugar for SDDM
Author=Marian Arlt
Copyright=Copyright (C) 2018 Marian Arlt
License=GPL-3.0-or-later
Type=sddm-theme
Version=1.6
Website=https://framagit.org/MarianArlt/sddm-sugar-candy
Screenshot=Previews/PartialBlur.png
MainScript=Main.qml
ConfigFile=theme.conf
TranslationsDirectory=translations
Email=marianarlt@icloud.com
Theme-Id=sugar-candy
Theme-API=2.11

View file

@ -0,0 +1,136 @@
[General]
Background="Backgrounds/waves.png"
## Path relative to the theme root directory. Most standard image file formats are allowed including support for transparency. (e.g. background.jpeg/illustration.GIF/Foto.png/undraw.svgz)
DimBackgroundImage="0.0"
## Double between 0 and 1 used for the alpha channel of a darkening overlay. Use to darken your background image on the fly.
ScaleImageCropped="true"
## Whether the image should be cropped when scaled proportionally. Setting this to false will fit the whole image instead, possibly leaving white space. This can be exploited beautifully with illustrations (try it with "undraw.svg" included in the theme).
ScreenWidth="2560"
ScreenHeight="1080"
## Adjust to your resolution to help SDDM speed up on calculations
## [Blur Settings]
FullBlur="false"
PartialBlur="true"
## Enable or disable the blur effect; if HaveFormBackground is set to true then PartialBlur will trigger the BackgroundColor of the form element to be partially transparent and blend with the blur.
BlurRadius="100"
## Set the strength of the blur effect. Anything above 100 is pretty strong and might slow down the rendering time. 0 is like setting false for any blur.
## [Design Customizations]
HaveFormBackground="false"
## Have a full opacity background color behind the form that takes slightly more than 1/3 of screen estate; if PartialBlur is set to true then HaveFormBackground will trigger the BackgroundColor of the form element to be partially transparent and blend with the blur.
FormPosition="center"
## Position of the form which takes roughly 1/3 of screen estate. Can be left, center or right.
BackgroundImageHAlignment="center"
## Horizontal position of the background picture relative to its visible area. Applies when ScaleImageCropped is set to false or when HaveFormBackground is set to true and FormPosition is either left or right. Can be left, center or right; defaults to center if none is passed.
BackgroundImageVAlignment="center"
## As before but for the vertical position of the background picture relative to its visible area.
MainColor="white"
## Used for all elements when not focused/hovered etc. Usually the best effect is achieved by having this be either white or a very dark grey like #444 (not black for smoother antialias)
## Colors can be HEX or Qt names (e.g. red/salmon/blanchedalmond). See https://doc.qt.io/qt-5/qml-color.html
AccentColor="#b7bdf8"
## Used for elements in focus/hover/pressed. Should be contrasting to the background and the MainColor to achieve the best effect.
BackgroundColor="#24273a"
## Used for the user and session selection background as well as for ScreenPadding and FormBackground when either is true. If PartialBlur and FormBackground are both enabled this color will blend with the blur effect.
OverrideLoginButtonTextColor="#24273a"
## The text of the login button may become difficult to read depending on your color choices. Use this option to set it independently for legibility.
InterfaceShadowSize="6"
## Integer used as multiplier. Size of the shadow behind the user and session selection background. Decrease or increase if it looks bad on your background. Initial render can be slow no values above 5-7.
InterfaceShadowOpacity="0.6"
## Double between 0 and 1. Alpha channel of the shadow behind the user and session selection background. Decrease or increase if it looks bad on your background.
RoundCorners="20"
## Integer in pixels. Radius of the input fields and the login button. Empty for square. Can cause bad antialiasing of the fields.
ScreenPadding="0"
## Integer in pixels. Increase or delete this to have a padding of color BackgroundColor all around your screen. This makes your login greeter appear as if it was a canvas. Cool!
Font="JetBrainsMono"
## If you want to choose a custom font it will have to be available to the X root user. See https://wiki.archlinux.org/index.php/fonts#Manual_installation
FontSize=""
## Only set a fixed value if fonts are way too small for your resolution. Preferrably kept empty.
## [Interface Behavior]
ForceRightToLeft="false"
## Revert the layout either because you would like the login to be on the right hand side or SDDM won't respect your language locale for some reason. This will reverse the current position of FormPosition if it is either left or right and in addition position some smaller elements on the right hand side of the form itself (also when FormPosition is set to center).
ForceLastUser="true"
## Have the last successfully logged in user appear automatically in the username field.
ForcePasswordFocus="true"
## Give automatic focus to the password field. Together with ForceLastUser this makes for the fastest login experience.
ForceHideCompletePassword="false"
## If you don't like to see any character at all not even while being entered set this to true.
ForceHideVirtualKeyboardButton="false"
## Do not show the button for the virtual keyboard at all. This will completely disable functionality for the virtual keyboard even if it is installed and activated in sddm.conf
ForceHideSystemButtons="false"
## Completely disable and hide any power buttons on the greeter.
AllowEmptyPassword="false"
## Enable login for users without a password. This is discouraged. Makes the login button always enabled.
AllowBadUsernames="false"
## Do not change this! Uppercase letters are generally not allowed in usernames. This option is only for systems that differ from this standard! Also shows username as is instead of capitalized.
## [Locale Settings]
Locale=""
## The time and date locale should usually be set in your system settings. Only hard set this if something is not working by default or you want a seperate locale setting in your login screen.
HourFormat="HH:mm"
## Defaults to Locale.ShortFormat - Accepts "long" or a custom string like "hh:mm A". See http://doc.qt.io/qt-5/qml-qtqml-date.html
DateFormat="dddd, d of MMMM"
## Defaults to Locale.LongFormat - Accepts "short" or a custom string like "dddd, d 'of' MMMM". See http://doc.qt.io/qt-5/qml-qtqml-date.html
## [Translations]
HeaderText="Welcome back!"
## Header can be empty to not display any greeting at all. Keep it short.
## SDDM may lack proper translation for every element. Suger defaults to SDDM translations. Please help translate SDDM as much as possible for your language: https://github.com/sddm/sddm/wiki/Localization. These are in order as they appear on screen.
TranslatePlaceholderUsername=""
TranslatePlaceholderPassword=""
TranslateShowPassword=""
TranslateLogin=""
TranslateLoginFailedWarning=""
TranslateCapslockWarning=""
TranslateSession=""
TranslateSuspend=""
TranslateHibernate=""
TranslateReboot=""
TranslateShutdown=""
TranslateVirtualKeyboardButton=""
## These don't necessarily need to translate anything. You can enter whatever you want here.

View file

@ -0,0 +1,9 @@
- name: System Tasks
hosts: all
become: true
block:
- name: System Tasks
include_tasks: system.yml
- name: System Services Tasks
include_tasks: services.yml

View file

@ -0,0 +1,159 @@
# SSH
- name: install ssh
pacman:
name:
- openssh
- name: enable and start ssh service
systemd:
name: sshd
enabled: yes
state: started
# PLOCATE
- name: install plocate
pacman:
name:
- plocate
- name: enable and start ~12h updatedb timer
systemd:
name: plocate-updatedb.timer
enabled: yes
state: started
# ARCH KEYRING WEEKLY UPDATE
- name: archlinux-keyring - enable weekly update
systemd:
name: archlinux-keyring-wkd-sync.timer
enabled: yes
state: started
# SDD TRIM
- name: install util-linux
pacman:
name:
- util-linux
- name: enable and start weekly ssd disks trim using fstrim timer
systemd:
name: fstrim.timer
enabled: yes
state: started
# REFLECTOR
- name: install reflector
pacman:
name:
- reflector
- name: write reflector configuration file
copy:
dest: "/etc/xdg/reflector/reflector.conf"
content: |
--save /etc/pacman.d/mirrorlist
--protocol http
--country Spain
--country France
--country Germany
--country Portugal
--country Italy
--country United_Kingdom
--latest 20
--score 20
--sort rate
- name: enable and start reflector timer
systemd:
name: reflector.timer
enabled: yes
state: started
- name: do initial run of reflector.service
systemd:
name: reflector
enabled: yes
state: started
# LOGROTATE
- name: install logrotate
pacman:
name:
- logrotate
- name: logrotate - enable compression
lineinfile:
path: /etc/logrotate.conf
regexp: "^#compress$"
line: "compress"
- name: enable and start daily logs rotation, cleanup
systemd:
name: logrotate.timer
enabled: yes
state: started
# DOCKER
- name: install docker and docker compose
pacman:
update_cache: yes
name:
- docker
- docker-compose
- name: install lazydocker
kewlfft.aur.aur:
name:
- lazydocker
- name: docker service
systemd:
name: docker
enabled: yes
state: restarted
- name: add the user to docker group
user:
name: "{{ ansible_user }}"
groups: docker
append: yes
- name: Create /etc/docker directory if it does not exist
file:
path: /etc/docker
state: directory
mode: "0755"
- name: set default max logs size to 250MB and set logs rotation
copy:
dest: "/etc/docker/daemon.json"
content: |
{
"log-driver": "json-file",
"log-opts": {
"max-size": "50m",
"max-file": "5"
}
}
# PIPEWIRE
- name: install pipewire and dependencies
pacman:
name:
- pipewire
- pipewire-alsa
- wireplumber
- alsa-utils
- name: Pipewire service
systemd:
name: pipewire
state: restarted
enabled: yes
- name: WirePlumber service
systemd:
name: wireplumber
state: restarted
enabled: yes
# DISPLAY-MANAGER

View file

@ -0,0 +1,97 @@
# First update the system
- name: update arch
pacman:
update_cache: yes
upgrade: yes
# YAY
- name: disable need for password for pacman to allow yay install
lineinfile:
path: /etc/sudoers.d/temp_allow_no_pswd_pacman
state: present
line: "ALL ALL=NOPASSWD: /usr/bin/pacman"
validate: /usr/sbin/visudo -cf %s
create: yes
- name: git clone yay-bin repo in to /tmp
become: false
git:
repo: "https://aur.archlinux.org/yay-bin.git"
dest: /tmp/yay-bin
clone: yes
- name: install yay using makepkg
become: false
expect:
chdir: /tmp/yay-bin
command: makepkg -si
responses:
(?i)Proceed with installation: "y"
- name: re-enable need for password for pacman
file:
path: /etc/sudoers.d/temp_allow_no_pswd_pacman
state: absent
# PACMAN-PACKAGES
- name: pacman - enable color
lineinfile:
path: /etc/pacman.conf
regexp: "^#Color$"
line: "Color"
- name: pacman - enable ParallelDownloads = 5
lineinfile:
path: /etc/pacman.conf
regexp: "#ParallelDownloads = 5"
line: "ParallelDownloads = 5"
- name: makepkg - disable compression
lineinfile:
path: /etc/makepkg.conf,
regexp: "PKGEXT='.pkg.tar.zst'"
line: "PKGEXT='.pkg.tar'"
- name: makepkg - enable parallel compilation MAKEFLAGS="-j$(nproc)"
lineinfile:
path: /etc/makepkg.conf
regexp: '#MAKEFLAGS="-j2"'
line: 'MAKEFLAGS="-j$(nproc)"'
# FISH
- name: intall fish, fisher and other tools
pacman:
name:
- fish
- fisher
- atuin
- zoxide
- thefuck
- starship
- vivid
- name: change default shell to fish for the local user
user:
name: "{{ ansible_user }}"
shell: /usr/bin/fish
# OTHER
- name: fstab change relatime to noatime
replace:
path: /etc/fstab
regexp: "relatime"
replace: "noatime"
- name: change number of failed logins that triger 10min lockout
lineinfile:
path: /etc/security/faillock.conf
regexp: "^# deny = 3$"
line: "deny = 10"
- name: enable members of wheel group to sudo
lineinfile:
path: /etc/sudoers.d/01_wheel_allow_sudo
state: present
line: "%wheel ALL=(ALL:ALL) ALL"
validate: /usr/sbin/visudo -cf %s
create: yes

View file

@ -1,17 +1,31 @@
#!/bin/sh
function have {
command -v "$1" &>/dev/null
}
# Because Git submodule commands cannot operate without a work tree, they must
# be run from within $HOME (assuming this is the root of your dotfiles)
cd "$HOME"
cd "$HOME" || exit
echo "Init submodules"
yadm submodule update --recursive --init
system_type=$(lsb_release -s -d | tr -d '"')
if [[ $system_type == "Arch Linux" ]]; then
# Install System Tools and Configurations
ansible-galaxy collection install kewlfft.aur
ansible-playbook -v -u $USER -K playbook_system_arch.yml
ansible-playbook -v -u $USER -K playbook_packages_arch.yml
have ansible || sudo pacman -S ansible
# Install requirements
ansible-galaxy install -r ~/.config/ansible/requirements.yml
# Install System Tools and Configurations
ansible-playbook -i ~/.config/ansible/inventory ~/.config/ansible/arch.yml --ask-become-pass
elif [[ $system_type == "Debian" ]]; then
have ansible || sudo apt install ansible
# Install requirements
ansible-galaxy install -r ~/.config/yadm/requirements.yml
# Install System Tools and Configurations
ansible-playbook -i ./inventory ./debian.yml --ask-become-pass
fi

View file

@ -1,141 +0,0 @@
---
- name: playbook_packages.yml - arch packages
hosts: all
become: yes
tasks:
# ARCH PACKAGES ---------------------------------------------------------------------------
- name: install base packages
pacman:
update_cache: yes
name:
- android-file-transfer
- android-tools
- baobab
- bat
- blender
- bluez
- blueman
- btop
- celluloid
- clamtk
- dbeaver
- diff-so-fancy
- discord
- dua-cli
- eza
- easyeffects
- fd
- fzf
- galculator
- gamemode
- geeqie
- gnome-disk-utility
- gst-plugins-base
- hyprland
- kitty
- kvantum
- lazygit
- libreoffice-still
- lsp-plugins
- lxappearance
- mesa
- mpv
- navi
- nemo
- nemo-fileroller
- nemo-image-converter
- neofetch
- neovide
- neovim
- npm
- nm-connection-editor
- nvtop
- obsidian
- onefetch
- pavucontrol
- pinta
- polkit-gnome
- ripgrep
- ripgrep-all
- scrcpy
- sd
- swappy
- swaydile
- thunderbird
- ufw
- waybar
- wine
- wl-clipboard
- yt-dlp
- yarn
- xplr
- zathura
- zathura-pdf-mupdf
# AUR PACKAGES ---------------------------------------------------------------------------
- name: install aur packages
kewlfft.aur.aur:
name:
- amf-amdgpu-pro
- activitywatch-bin
- adwsteamgtk
- android-sdk-platform-tools
- ani-cli
- arronax
- betterdiscord-installer-bin
- brave-bin
- catppuccin-gtk-macchiato
- cava
- cemu-bin
- devify
- downgrade
- find-the-command
- heroic-games-launcher
- hyprpicker-git
- hyprshot
- lazynpm
- librewolf-bin
- ludusavi
- mangal-bin
- nerd-fonts-git
- nwg-displays
- nwg-look
- obs-studio-amf
- paccache-hook
- pika-backup
- pinterest-downloader-git
- pipes.sh
- prettierd
- proton-ge-custom-bin
- pyprland
- spotdl
- reflector-pacman-hook-git
- rofi-lboon-wayland-git
- rofi-file-browser-extended-git
- scc-bin
- sddm-git
- shell-color-scripts
- spicetify-cli
- spotify
- swaylock-effects
- swaync
- swayosd-git
- swww
- sysz
- tgpt-bin
- ttf-ms-win11-auto
- tty-clock-git
- unimatrix-git
- upscayl-bin
- vkbasalt
- vulkan-amdgpu-pro
- wev
- wl-clip-persist-git
- wleave-git
- wlr-randr
- wlrobs-hg
- xdg-desktop-portal-hyprland-git
- youtube-dl
- ytdlp-gui
- zarchive-git

View file

@ -1,276 +0,0 @@
---
- name: playbook_system.yml - arch system changes and services
hosts: all
become: yes
tasks:
# ARCH FULL UPDATE ----------------------------------------------------------
- name: update arch
pacman:
update_cache: yes
upgrade: yes
# YAY TO ACCESS AUR REPOSITORY ----------------------------------------------
- name: disable need for password for pacman to allow yay install
lineinfile:
path: /etc/sudoers.d/temp_allow_no_pswd_pacman
state: present
line: "ALL ALL=NOPASSWD: /usr/bin/pacman"
validate: /usr/sbin/visudo -cf %s
create: yes
- name: git clone yay-bin repo in to /tmp
become: no
git:
repo: "https://aur.archlinux.org/yay-bin.git"
dest: /tmp/yay-bin
clone: yes
- name: install yay using makepkg
become: no
expect:
chdir: /tmp/yay-bin
command: makepkg -si
responses:
(?i)Proceed with installation: "y"
- name: re-enable need for password for pacman
file:
path: /etc/sudoers.d/temp_allow_no_pswd_pacman
state: absent
- name: set yay options to cleanafter package installation
become: no
shell: yay -Y --answerclean All --removemake --cleanafter --save
args:
executable: /usr/bin/bash
# SYSTEM SETTINGS CHANGES ----------------------------------------------------
- name: pacman - enable color
lineinfile:
path: /etc/pacman.conf
regexp: "^#Color$"
line: "Color"
- name: pacman - enable ParallelDownloads = 5
lineinfile:
path: /etc/pacman.conf
regexp: "#ParallelDownloads = 5"
line: "ParallelDownloads = 5"
- name: makepkg - disable compression
lineinfile:
path: /etc/makepkg.conf
regexp: "PKGEXT='.pkg.tar.zst'"
line: "PKGEXT='.pkg.tar'"
- name: makepkg - enable parallel compilation MAKEFLAGS="-j$(nproc)"
lineinfile:
path: /etc/makepkg.conf
regexp: '#MAKEFLAGS="-j2"'
line: 'MAKEFLAGS="-j$(nproc)"'
- name: fstab change relatime to noatime
replace:
path: /etc/fstab
regexp: "relatime"
replace: "noatime"
- name: change number of failed logins that triger 10min lockout
lineinfile:
path: /etc/security/faillock.conf
regexp: "^# deny = 3$"
line: "deny = 10"
- name: enable members of wheel group to sudo
lineinfile:
path: /etc/sudoers.d/01_wheel_allow_sudo
state: present
line: "%wheel ALL=(ALL:ALL) ALL"
validate: /usr/sbin/visudo -cf %s
create: yes
# SSH ------------------------------------------------------------------------
- name: install ssh
pacman:
name:
- openssh
- name: enable and start ssh service
systemd:
name: sshd
enabled: yes
state: started
# LOCATE THE QUICK FILE SEARCH ----------------------------------------------
- name: install plocate
pacman:
name:
- plocate
- name: enable and start ~12h updatedb timer
systemd:
name: plocate-updatedb.timer
enabled: yes
state: started
# ARCHLINUX-KEYRING WEEKLY UPDATE -------------------------------------------
- name: archlinux-keyring - enable weekly update
systemd:
name: archlinux-keyring-wkd-sync.timer
enabled: yes
state: started
# SSD TRIM SCHEDULED --------------------------------------------------------
- name: install util-linux
pacman:
name:
- util-linux
- name: enable and start weekly ssd disks trim using fstrim timer
systemd:
name: fstrim.timer
enabled: yes
state: started
# REFLECTOR TO REGULARLY UPDATE MIRRORLIST ---
- name: install reflector
pacman:
name:
- reflector
- name: write reflector configuration file
copy:
dest: "/etc/xdg/reflector/reflector.conf"
content: |
--save /etc/pacman.d/mirrorlist
--protocol http
--country Spain
--country France
--country Germany
--country Portugal
--country Italy
--country United_Kingdom
--latest 20
--score 20
--sort rate
- name: enable and start reflector timer
systemd:
name: reflector.timer
enabled: yes
state: started
- name: do initial run of reflector.service
systemd:
name: reflector
enabled: yes
state: started
# LOGROTATE -----------------------------------------------------------------
- name: install logrotate
pacman:
name:
- logrotate
- name: logrotate - enable compression
lineinfile:
path: /etc/logrotate.conf
regexp: "^#compress$"
line: "compress"
- name: enable and start daily logs rotation, cleanup
systemd:
name: logrotate.timer
enabled: yes
state: started
# DOCKER --------------------------------------------------------------------
- name: install docker and docker compose
pacman:
update_cache: yes
name:
- docker
- docker-compose
- name: install lazydocker
kewlfft.aur.aur:
name:
- lazydocker
- name: docker service
systemd:
name: docker
enabled: yes
state: restarted
- name: add the user to docker group
user:
name: "{{ ansible_user }}"
groups: docker
append: yes
- name: Create /etc/docker directory if it does not exist
file:
path: /etc/docker
state: directory
mode: "0755"
- name: set default max logs size to 250MB and set logs rotation
copy:
dest: "/etc/docker/daemon.json"
content: |
{
"log-driver": "json-file",
"log-opts": {
"max-size": "50m",
"max-file": "5"
}
}
# PIPEWIRE ---------------------------------------------------------------------------------
- name: install pipewire and dependencies
pacman:
name:
- pipewire
- pipewire-alsa
- wireplumber
- alsa-utils
- name: Pipewire service
systemd:
name: pipewire
state: restarted
enabled: yes
- name: WirePlumber service
systemd:
name: wireplumber
state: restarted
enabled: yes
# FISH -------------------------------------------------------------
- name: intall fish, fisher and other tools
pacman:
name:
- fish
- fisher
- atuin
- zoxide
- thefuck
- starship
- vivid
- name: change default shell to fish for the local user
user:
name: "{{ ansible_user }}"
shell: /usr/bin/fish

2
.github/README.md vendored
View file

@ -112,7 +112,7 @@ Here is some _small_ information about my setup:
- **Colorscheme**: [Catppuccin Macchiato](https://github.com/catppuccin/catppuccin) :sparkles:
- **Font**: [Jetbrains Mono Nerd](https://www.jetbrains.com/es-es/lp/mono/)
- **Dotfiles Manager**: [yadm](https://yadm.io/) :sparkles: ([Config](../.config/yadm/)) :gear:
- **Automatic System Deployment**: [Ansible](https://www.ansible.com/)
- **Automatic System Deployment**: [Ansible](https://www.ansible.com/) :sparkles: ([Config](../.config/ansible/)) :gear:
</details>