From 1db49890054cd786005c6ade2aed7f7c55fb91d1 Mon Sep 17 00:00:00 2001 From: thek4n Date: Thu, 13 Nov 2025 19:43:39 +0300 Subject: [PATCH] autologin --- etc/systemd/system/getty@tty1.service.d/autologin.conf | 4 ++++ home/user/.config/sway/config | 7 +++++-- home/user/.config/zsh/.zprofile | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) create mode 100644 etc/systemd/system/getty@tty1.service.d/autologin.conf diff --git a/etc/systemd/system/getty@tty1.service.d/autologin.conf b/etc/systemd/system/getty@tty1.service.d/autologin.conf new file mode 100644 index 0000000..e71a50d --- /dev/null +++ b/etc/systemd/system/getty@tty1.service.d/autologin.conf @@ -0,0 +1,4 @@ +[Service] +Type=simple +ExecStart= +ExecStart=-/sbin/agetty --noreset --noclear --autologin thek4n - ${TERM} diff --git a/home/user/.config/sway/config b/home/user/.config/sway/config index 67539fe..4243722 100644 --- a/home/user/.config/sway/config +++ b/home/user/.config/sway/config @@ -1,5 +1,7 @@ # Sway config sourcer +exec swaylock -f + set $mod Mod4 set $ws1 "1 Browser" @@ -13,8 +15,9 @@ set $ws8 "8💬Social" set $ws9 "9🎵Music" set $ws10 "10🍿Media" -# set $primary DVI-I-1 -# set $secondary VGA-1 +# Example variables.d: +#set $primary DVI-I-1 +#set $secondary VGA-1 include ~/.config/sway/variables.d/*.conf include ~/.config/sway/other.conf diff --git a/home/user/.config/zsh/.zprofile b/home/user/.config/zsh/.zprofile index a26ef1d..e6b2853 100644 --- a/home/user/.config/zsh/.zprofile +++ b/home/user/.config/zsh/.zprofile @@ -4,7 +4,7 @@ if [[ "${TTY}" =~ /dev/tty* ]]; then setfont cyr-sun16 fi -if [ "${TTY}" = "/dev/tty1" ] && [ -z "${WAYLAND_DISPLAY}" ] && [ -n "${XDG_VTNR}" ] && [ "${XDG_VTNR}" -eq 1 ] && systemctl -q is-active graphical.target; then +if [ "${TTY}" = "/dev/tty1" ] && [ -z "${WAYLAND_DISPLAY}" ] && [ -z "${DISPLAY}" ]; then wayland_dir="${XDG_STATE_HOME:-${HOME}/.local/state}/wayland" mkdir -p "${wayland_dir}" exec sway >> "${wayland_dir}/sway.log" 2>&1