Added numlock handling for TTY and X, source of `$XDG_CONFIG_HOME/.conf/locale.conf`, disabled sourcing of `/etc/X11/Xsession.d` and added Gnome polkit agent to i3

master
Meliurwen 2 years ago
parent 3d9edeb883
commit caf1b13445
Signed by: meliurwen
GPG Key ID: 818A8B35E9F1CE10
  1. 13
      common-shells/.profile
  2. 6
      i3/.config/i3/config
  3. 50
      x/.xinitrc
  4. 7
      x/.xsessionrc

@ -8,12 +8,21 @@
# logins, install and configure the libpam-umask package. # logins, install and configure the libpam-umask package.
#umask 022 #umask 022
# Set font for console tty # If inside a TTY
# Source: https://github.com/powerline/fonts/tree/master/Terminus/PSF
if [ "$TERM" = "linux" ]; then if [ "$TERM" = "linux" ]; then
# Set font for TTY
# Source: https://github.com/powerline/fonts/tree/master/Terminus/PSF
CONSOLE_FONTD=$HOME/.local/share/consolefonts CONSOLE_FONTD=$HOME/.local/share/consolefonts
CONSOLE_FONT=ter-powerline-v12n.psf.gz CONSOLE_FONT=ter-powerline-v12n.psf.gz
if [ -f "$CONSOLE_FONTD/$CONSOLE_FONT" ]; then if [ -f "$CONSOLE_FONTD/$CONSOLE_FONT" ]; then
setfont "$CONSOLE_FONTD/$CONSOLE_FONT" setfont "$CONSOLE_FONTD/$CONSOLE_FONT"
fi fi
# Enable numlock for TTY
if command -v setleds; then
setleds -D +num
fi
fi
if [ -r "${XDG_CONFIG_HOME:-$HOME/.config/locale.conf}" ]; then
. "${XDG_CONFIG_HOME:-$HOME/.config/locale.conf}"
fi fi

@ -193,9 +193,6 @@ for_window [title="mpv-floating-window"] border none
# WebCam Toggle # WebCam Toggle
bindsym XF86WebCam exec ~/.config/i3/scripts/webcam-toggle.sh bindsym XF86WebCam exec ~/.config/i3/scripts/webcam-toggle.sh
# Numlock
exec_always --no-startup-id numlockx on
# Note: # Note:
# `exec` commands are executed in order, but asynchronously; # `exec` commands are executed in order, but asynchronously;
# In other words the commands are launched in sequence without waiting the # In other words the commands are launched in sequence without waiting the
@ -217,6 +214,9 @@ exec --no-startup-id envsubst < \
~/.config/dunst/dunstrc && \ ~/.config/dunst/dunstrc && \
dunst --config $HOME/.config/dunst/dunstrc dunst --config $HOME/.config/dunst/dunstrc
# Gnome Authentication Agent for PolicyKit (password prompt for gparted, etc...)
exec --no-startup-id /usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1
## Use `xprop` to determine windows paramenters. Guide below: ## Use `xprop` to determine windows paramenters. Guide below:
## https://i3wm.org/docs/userguide.html#list_of_commands ## https://i3wm.org/docs/userguide.html#list_of_commands
# Calculators # Calculators

@ -21,20 +21,50 @@ fi
# moment I don't have the time (and the will) to grasp the secuirty # moment I don't have the time (and the will) to grasp the secuirty
# consequences of removing them. # consequences of removing them.
# run all system xinitrc shell scripts. # run all system xinitrc shell scripts.
if [ -d /etc/X11/Xsession.d ]; then #if [ -d /etc/X11/Xsession.d ]; then
SESSIONFILES=$(run-parts --list /etc/X11/Xsession.d) # SESSIONFILES=$(run-parts --list /etc/X11/Xsession.d)
if [ -n "$SESSIONFILES" ]; then # if [ -n "$SESSIONFILES" ]; then
set +e # set +e
for SESSIONFILE in $SESSIONFILES; do # for SESSIONFILE in $SESSIONFILES; do
. "$SESSIONFILE" # . "$SESSIONFILE"
done # done
set -e # set -e
fi # fi
#fi
# Set the Numlock for X session
# TODO: define a way to set it locally
if [ -r /etc/default/numlockx ]; then
. /etc/default/numlockx
fi
NUMLOCK="${NUMLOCK:-on}"
case "$NUMLOCK" in
on|off|toggle|keep)
;;
auto)
# Yeah... I don't see why it shouldn't be on.
NUMLOCK=on
;;
*)
println "Warning: incorrect value assigned to NUMLOCK variable!"
NUMLOCK=off
;;
esac
if command -v numlockx && [ "$NUMLOCK" != "keep" ]; then
numlockx "$NUMLOCK"
fi fi
# To avoid very solw startup of many GTK apps # To avoid very solw startup of many GTK apps
# https://dbus.freedesktop.org/doc/dbus-update-activation-environment.1.html # https://dbus.freedesktop.org/doc/dbus-update-activation-environment.1.html
#dbus-update-activation-environment --systemd DISPLAY if [ -x "/usr/bin/dbus-update-activation-environment" ]; then
# tell dbus-daemon --session (and systemd --user, if running)
# to put a minimal subset of the Xsession's environment in activated
# services' environments
dbus-update-activation-environment --systemd \
DISPLAY
# DBUS_SESSION_BUS_ADDRESS \
# XAUTHORITY
fi
# invoke local X session script # invoke local X session script
. "$HOME/.xsession" . "$HOME/.xsession"

@ -10,8 +10,11 @@ export QT_STYLE_OVERRIDE=adwaita-dark
# Add `~/.local/bin` to $PATH # Add `~/.local/bin` to $PATH
C_PATH="$HOME/.local/bin" C_PATH="$HOME/.local/bin"
[ -d "$C_PATH" ] && export PATH="$C_PATH:$PATH" || \ if [ -d "$C_PATH" ]; then
echo "Custom PATH dir not found: $C_PATH" export PATH="$C_PATH:$PATH"
else
printf "Custom PATH dir not found: %s" "$C_PATH"
fi
unset C_PATH unset C_PATH
# Mount remote volumes # Mount remote volumes

Loading…
Cancel
Save