Added autologin
This commit is contained in:
parent
6c466b5c2f
commit
2648c66002
32
bashrc
32
bashrc
@ -4,8 +4,10 @@ case $- in
|
||||
*) return ;;
|
||||
esac
|
||||
|
||||
if [[ $TERM =~ tmux ]]; then
|
||||
source ~/.local/share/blesh/ble.sh --noattach
|
||||
if [[ ! $TERM =~ linux ]]; then
|
||||
if [[ $TERM =~ tmux ]]; then
|
||||
source ~/.local/share/blesh/ble.sh --noattach
|
||||
fi
|
||||
fi
|
||||
|
||||
# don't put duplicate lines or lines starting with space in the history.
|
||||
@ -44,16 +46,20 @@ alias ls="eza -1 -l --icons=auto --git-repos --git -h -g -o --no-permissions"
|
||||
alias lsa="eza -1 -l --icons=auto --git-repos --git -h -g -o --no-permissions -a"
|
||||
alias lss="eza -1 -l --icons=auto --git-repos --git -h -g --total-size -o --no-permissions -a"
|
||||
|
||||
if [[ $TERM =~ tmux ]]; then
|
||||
source ~/.fzf.bash
|
||||
eval "$(zoxide init bash)"
|
||||
eval "$(starship init bash)"
|
||||
[[ ! ${BLE_VERSION-} ]] || ble-attach
|
||||
fi
|
||||
|
||||
# TMUX
|
||||
if [[ ! $TERM =~ tmux ]]; then
|
||||
if which tmux >/dev/null 2>&1; then
|
||||
tmux new-session
|
||||
if [[ ! $TERM =~ linux ]]; then
|
||||
if [[ $TERM =~ tmux ]]; then
|
||||
source ~/.fzf.bash
|
||||
eval "$(zoxide init bash)"
|
||||
eval "$(starship init bash)"
|
||||
[[ ! ${BLE_VERSION-} ]] || ble-attach
|
||||
fi
|
||||
|
||||
# TMUX
|
||||
if [[ ! $TERM =~ tmux ]]; then
|
||||
if which tmux >/dev/null 2>&1; then
|
||||
tmux new-session
|
||||
fi
|
||||
fi
|
||||
else
|
||||
wrappedhl
|
||||
fi
|
||||
|
||||
@ -52,8 +52,9 @@ exec-once = /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
|
||||
|
||||
|
||||
# exec-once = waybar
|
||||
exec-once = $terminal
|
||||
exec-once = $browser
|
||||
exec-once = flatpak run com.moonlight_stream.Moonlight
|
||||
exec-once = $terminal
|
||||
# exec-once = nm-applet &
|
||||
# exec-once = waybar & hyprpaper & firefox
|
||||
|
||||
@ -170,6 +171,7 @@ dwindle {
|
||||
# See https://wiki.hyprland.org/Configuring/Master-Layout/ for more
|
||||
master {
|
||||
new_status = slave
|
||||
mfact = 0.5
|
||||
}
|
||||
|
||||
# https://wiki.hyprland.org/Configuring/Variables/#misc
|
||||
@ -296,6 +298,8 @@ bindl = , XF86AudioPrev, exec, playerctl previous
|
||||
|
||||
# Example windowrule v2
|
||||
# windowrulev2 = float,class:^(kitty)$,title:^(kitty)$
|
||||
# windowrulev2 = float,class:(com.moonlight_stream.moonlight),title:(moonlight)
|
||||
# windowrulev2 = tile,class:(com.moonlight_stream.moonlight),title:(moonlight)
|
||||
|
||||
# Ignore maximize requests from apps. You'll probably like this.
|
||||
windowrulev2 = suppressevent maximize, class:.*
|
||||
|
||||
60
getty@.service
Normal file
60
getty@.service
Normal file
@ -0,0 +1,60 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
#
|
||||
# This file is part of systemd.
|
||||
#
|
||||
# systemd is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU Lesser General Public License as published by
|
||||
# the Free Software Foundation; either version 2.1 of the License, or
|
||||
# (at your option) any later version.
|
||||
|
||||
[Unit]
|
||||
Description=Getty on %I
|
||||
Documentation=man:agetty(8) man:systemd-getty-generator(8)
|
||||
Documentation=https://0pointer.de/blog/projects/serial-console.html
|
||||
After=systemd-user-sessions.service plymouth-quit-wait.service getty-pre.target
|
||||
|
||||
# If additional gettys are spawned during boot then we should make
|
||||
# sure that this is synchronized before getty.target, even though
|
||||
# getty.target didn't actually pull it in.
|
||||
Before=getty.target
|
||||
IgnoreOnIsolate=yes
|
||||
|
||||
# IgnoreOnIsolate causes issues with sulogin, if someone isolates
|
||||
# rescue.target or starts rescue.service from multi-user.target or
|
||||
# graphical.target.
|
||||
Conflicts=rescue.service
|
||||
Before=rescue.service
|
||||
|
||||
# On systems without virtual consoles, don't start any getty. Note
|
||||
# that serial gettys are covered by serial-getty@.service, not this
|
||||
# unit.
|
||||
ConditionPathExists=/dev/tty0
|
||||
|
||||
[Service]
|
||||
# the VT is cleared by TTYVTDisallocate
|
||||
# The '-o' option value tells agetty to replace 'login' arguments with an
|
||||
# option to preserve environment (-p), followed by '--' for safety, and then
|
||||
# the entered username.
|
||||
ExecStart=-/sbin/agetty -n -o '-p -- \\u' --noclear - $TERM
|
||||
Type=idle
|
||||
Restart=always
|
||||
RestartSec=0
|
||||
UtmpIdentifier=%I
|
||||
StandardInput=tty
|
||||
StandardOutput=tty
|
||||
TTYPath=/dev/%I
|
||||
TTYReset=yes
|
||||
TTYVHangup=yes
|
||||
TTYVTDisallocate=yes
|
||||
IgnoreSIGPIPE=no
|
||||
SendSIGHUP=yes
|
||||
ImportCredential=agetty.*
|
||||
ImportCredential=login.*
|
||||
|
||||
# Unset locale for the console getty since the console has problems
|
||||
# displaying some internationalized messages.
|
||||
UnsetEnvironment=LANG LANGUAGE LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT LC_IDENTIFICATION
|
||||
|
||||
[Install]
|
||||
WantedBy=getty.target
|
||||
DefaultInstance=tty1
|
||||
8
login
Normal file
8
login
Normal file
@ -0,0 +1,8 @@
|
||||
#%PAM-1.0
|
||||
auth required pam_autologin.so
|
||||
auth include system-local-login
|
||||
auth optional pam_gnome_keyring.so
|
||||
account include system-local-login
|
||||
session include system-local-login
|
||||
password include system-local-login
|
||||
session optional pam_gnome_keyring.so auto_start
|
||||
@ -57,10 +57,15 @@ elif [ "$OS" == "Arch Linux" ]; then
|
||||
cd ~
|
||||
if [ -d ~/yay-bin ]; then rm -rf ~/yay-bin; fi
|
||||
fi
|
||||
sudo pacman --noconfirm --needed -S waybar wofi hyprland hyprlock polkit-gnome xorg-xhost greetd pipewire git base-devel cmake gawk wget gettext unzip curl tmux btop ncdu ranger qt5ct qt6ct gnome-themes-extra qt5-wayland qt6-wayland lxappearance
|
||||
sudo pacman --noconfirm --needed -S waybar wofi hyprland hyprlock polkit-gnome xorg-xhost gnome-keyring pipewire git base-devel cmake gawk wget gettext unzip curl tmux btop ncdu ranger qt5ct qt6ct gnome-themes-extra qt5-wayland qt6-wayland lxappearance
|
||||
|
||||
yay --noconfirm -S --needed --aur adwaita-qt5-git
|
||||
yay --noconfirm -S --needed --aur adwaita-qt6-git
|
||||
yay --noconfirm -S --needed --aur pam_autologin
|
||||
|
||||
sudo /bin/cp -rf ~/code_server/login /etc/pam.d/login
|
||||
sudo /bin/cp -rf ~/code_server/getty@.service /usr/lib/systemd/system/getty@.service
|
||||
sudo touch /etc/security/autologin.conf
|
||||
|
||||
fi
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user