From 29c8ac906175e89030ae61773524a075b7bfb746 Mon Sep 17 00:00:00 2001 From: Luca Bilke Date: Tue, 7 Feb 2023 17:08:27 +0100 Subject: [PATCH] move moving things around for better clarity and modularity --- .config/X11/xprofile | 37 ------------ ...0x11-common_xresources => 30x11-resources} | 3 +- .config/X11/xsession.d/40display-setup | 5 ++ .../{90atk-adaptor => 50atk-adaptor} | 0 .../X11/xsession.d/{90qt-a11y => 50qt-a11y} | 0 .../xsession.d/{90gpg-agent => 60gpg-agent} | 0 .config/X11/xsession.d/90auto-start | 16 +++++ .config/X11/xsession.d/90xsecurelock-setup | 17 ++++++ .../20x11-common_process-args | 58 ------------------- .../35x11-common_xhost-local | 10 ---- .../xsession.disabled/40x11-common_xsessionrc | 6 -- .../xsession.disabled/60x11-common_xdg_path | 22 ------- .../xsession.disabled/90x11-common_ssh-agent | 15 ----- 13 files changed, 39 insertions(+), 150 deletions(-) rename .config/X11/xsession.d/{30x11-common_xresources => 30x11-resources} (54%) create mode 100644 .config/X11/xsession.d/40display-setup rename .config/X11/xsession.d/{90atk-adaptor => 50atk-adaptor} (100%) rename .config/X11/xsession.d/{90qt-a11y => 50qt-a11y} (100%) rename .config/X11/xsession.d/{90gpg-agent => 60gpg-agent} (100%) create mode 100644 .config/X11/xsession.d/90auto-start create mode 100644 .config/X11/xsession.d/90xsecurelock-setup delete mode 100644 .config/X11/xsession.disabled/20x11-common_process-args delete mode 100644 .config/X11/xsession.disabled/35x11-common_xhost-local delete mode 100644 .config/X11/xsession.disabled/40x11-common_xsessionrc delete mode 100644 .config/X11/xsession.disabled/60x11-common_xdg_path delete mode 100644 .config/X11/xsession.disabled/90x11-common_ssh-agent diff --git a/.config/X11/xprofile b/.config/X11/xprofile index a1edd3c8..34c08ebb 100755 --- a/.config/X11/xprofile +++ b/.config/X11/xprofile @@ -1,6 +1,4 @@ #!/bin/sh - -# Graphical program vars export XCURSOR_PATH="${XDG_DATA_HOME:-$HOME/.local/share}/icons" export _JAVA_AWT_WM_NONREPARENTING=1 # Fix for Java applications in dwm export QT_QPA_PLATFORMTHEME="gtk2" # Have QT use gtk2 theme. @@ -8,41 +6,6 @@ export SUDO_ASKPASS="$HOME/.local/bin/dmenupass" export VIRTUAL_ENV_DISABLE_PROMPT=1 export MOZ_USE_XINPUT2="1" # Mozilla smooth scrolling/touchpads. export AWT_TOOLKIT="MToolkit wmname LG3D" #May have to install wmname - -# xsecurelock vars -export XSECURELOCK_AUTH_BACKGROUND_COLOR="#24283b" -export XSECURELOCK_AUTH_FOREGROUND_COLOR="#c0caf5" -export XSECURELOCK_AUTH_WARNING_COLOR="#f7768e" -export XSECURELOCK_BACKGROUND_COLOR="#15161E" -export XSECURELOCK_DATETIME_FORMAT="%d.%m.%Y %H:%M" -export XSECURELOCK_PASSWORD_PROMPT="time_hex" -export XSECURELOCK_AUTH_TIMEOUT=10 -export XSECURELOCK_SHOW_DATETIME=1 -export XSECURELOCK_COMPOSITE_OBSCURER=0 -export XSECURELOCK_SAVER="/usr/libexec/xscreensaver/cubicgrid" -export XSECURELOCK_SHOW_DATETIME=1 -export XSECURELOCK_SHOW_HOSTNAME=1 - -xrandr --dpi 109 --fb 4480x1633 \ - --output DP-2 --mode 2560x1440 --pos 1920x0 \ - --output HDMI-0 --mode 1920x1080 --pos 0x553 -setbg & -# xrdb "${XDG_CONFIG_HOME:-$HOME/.config}/x11/xresources" & xrdbpid=$! -remaps & - -autostart="picom checkup dunst unclutter pipewire dwmblocks remapd" -for program in $autostart; do - pidof -s "$program" || "$program" & -done >/dev/null 2>&1 -playerctld daemon - -xset s 300 -xss-lock -l -- xsecurelock & - -# Ensure that xrdb has finished running before moving on to start the WM/DE. -# [ -n "$xrdbpid" ] && wait "$xrdbpid" - -# lf icons: export LF_ICONS="\ tw=:\ st=:\ diff --git a/.config/X11/xsession.d/30x11-common_xresources b/.config/X11/xsession.d/30x11-resources similarity index 54% rename from .config/X11/xsession.d/30x11-common_xresources rename to .config/X11/xsession.d/30x11-resources index 24340a77..5b7bb17f 100644 --- a/.config/X11/xsession.d/30x11-common_xresources +++ b/.config/X11/xsession.d/30x11-resources @@ -1,6 +1,5 @@ # vim:set ft=sh if has_option allow-user-resources && [ -f "$USRRESOURCES" ]; then - if type xrdb >/dev/null 2>&1; then - xrdb -merge $USRRESOURCES + xrdb -merge $USRRESOURCES fi diff --git a/.config/X11/xsession.d/40display-setup b/.config/X11/xsession.d/40display-setup new file mode 100644 index 00000000..bcdb8932 --- /dev/null +++ b/.config/X11/xsession.d/40display-setup @@ -0,0 +1,5 @@ +# vim:set ft=sh + +xrandr --dpi 109 --fb 4480x1633 \ + --output DP-2 --mode 2560x1440 --pos 1920x0 \ + --output HDMI-0 --mode 1920x1080 --pos 0x553 diff --git a/.config/X11/xsession.d/90atk-adaptor b/.config/X11/xsession.d/50atk-adaptor similarity index 100% rename from .config/X11/xsession.d/90atk-adaptor rename to .config/X11/xsession.d/50atk-adaptor diff --git a/.config/X11/xsession.d/90qt-a11y b/.config/X11/xsession.d/50qt-a11y similarity index 100% rename from .config/X11/xsession.d/90qt-a11y rename to .config/X11/xsession.d/50qt-a11y diff --git a/.config/X11/xsession.d/90gpg-agent b/.config/X11/xsession.d/60gpg-agent similarity index 100% rename from .config/X11/xsession.d/90gpg-agent rename to .config/X11/xsession.d/60gpg-agent diff --git a/.config/X11/xsession.d/90auto-start b/.config/X11/xsession.d/90auto-start new file mode 100644 index 00000000..af24c1e8 --- /dev/null +++ b/.config/X11/xsession.d/90auto-start @@ -0,0 +1,16 @@ +# vim:set ft=sh + +start() +{ + pidof -s $1 || $@ >/dev/null 2>&1 & +} + +start playerctld daemon +start picom --experimental-backends +start unclutter -noevents +start dunst +start pipewire +start dwmblocks +start remapd +start setbg +start xwallpaper --zoom "${XDG_DATA_HOME:-$HOME/.local/share/}/bg" diff --git a/.config/X11/xsession.d/90xsecurelock-setup b/.config/X11/xsession.d/90xsecurelock-setup new file mode 100644 index 00000000..8c7a8a6b --- /dev/null +++ b/.config/X11/xsession.d/90xsecurelock-setup @@ -0,0 +1,17 @@ +# vim:set ft=sh + +export XSECURELOCK_AUTH_BACKGROUND_COLOR="#24283b" +export XSECURELOCK_AUTH_FOREGROUND_COLOR="#c0caf5" +export XSECURELOCK_AUTH_WARNING_COLOR="#f7768e" +export XSECURELOCK_BACKGROUND_COLOR="#15161E" +export XSECURELOCK_DATETIME_FORMAT="%d.%m.%Y %H:%M" +export XSECURELOCK_PASSWORD_PROMPT="time_hex" +export XSECURELOCK_AUTH_TIMEOUT=10 +export XSECURELOCK_SHOW_DATETIME=1 +export XSECURELOCK_COMPOSITE_OBSCURER=0 +export XSECURELOCK_SAVER="/usr/libexec/xscreensaver/cubicgrid" +export XSECURELOCK_SHOW_DATETIME=1 +export XSECURELOCK_SHOW_HOSTNAME=1 + +xset s 300 +xss-lock -l -- xsecurelock & diff --git a/.config/X11/xsession.disabled/20x11-common_process-args b/.config/X11/xsession.disabled/20x11-common_process-args deleted file mode 100644 index 3ccea2e4..00000000 --- a/.config/X11/xsession.disabled/20x11-common_process-args +++ /dev/null @@ -1,58 +0,0 @@ -# $Id: 20x11-common_process-args 305 2005-07-03 18:51:43Z dnusinow $ - -# This file is sourced by Xsession(5), not executed. - -# Determine how many arguments were provided. -case $# in - 0) - # No arguments given; use default behavior. - ;; - 1) - # One argument given; see what it was. - case "$1" in - failsafe) - # Failsafe session was requested. - if has_option allow-failsafe; then - if [ -e /usr/bin/x-terminal-emulator ]; then - if [ -x /usr/bin/x-terminal-emulator ]; then - exec x-terminal-emulator -geometry +1+1 - else - # fatal error - errormsg "unable to launch failsafe X session ---" \ - "x-terminal-emulator not executable; aborting." - fi - else - # fatal error - errormsg "unable to launch failsafe X session ---" \ - "x-terminal-emulator not found; aborting." - fi - fi - ;; - default) - # Default behavior was requested. - ;; - *) - # Specific program was requested. - STARTUP_FULL_PATH=$(command -v "${1%% *}" || true) - if [ -n "$STARTUP_FULL_PATH" ] && [ -e "$STARTUP_FULL_PATH" ]; then - if [ -x "$STARTUP_FULL_PATH" ]; then - STARTUP="$1" - else - message "unable to launch \"$1\" X session ---" \ - "\"$1\" not executable; falling back to default session." - fi - else - message "unable to launch \"$1\" X session ---" \ - "\"$1\" not found; falling back to default session." - fi - ;; - esac - ;; - *) - # More than one argument given; we don't know what to do. - message "unsupported number of arguments ($#); falling back to default" \ - "session." - ;; -esac - -# vim:set ai et sts=2 sw=2 tw=80: diff --git a/.config/X11/xsession.disabled/35x11-common_xhost-local b/.config/X11/xsession.disabled/35x11-common_xhost-local deleted file mode 100644 index d127a6c7..00000000 --- a/.config/X11/xsession.disabled/35x11-common_xhost-local +++ /dev/null @@ -1,10 +0,0 @@ -# This file is sourced by Xsession(5), not executed. - -# If xhost (from x11-xserver-utils) is installed, use it to give access -# to the X server to any process from the same user on the local host. -# Unlike other uses of xhost, this is safe since the kernel can check -# the actual owner of the calling process. - -if type xhost >/dev/null 2>&1; then - xhost +si:localuser:$(id -un) || : -fi diff --git a/.config/X11/xsession.disabled/40x11-common_xsessionrc b/.config/X11/xsession.disabled/40x11-common_xsessionrc deleted file mode 100644 index 305f363d..00000000 --- a/.config/X11/xsession.disabled/40x11-common_xsessionrc +++ /dev/null @@ -1,6 +0,0 @@ -# This file is sourced by Xsession(5), not executed. - -#Source user defined xsessionrc (locales and other environment variables) -if [ -r "$USERXSESSIONRC" ]; then - . "$USERXSESSIONRC" -fi diff --git a/.config/X11/xsession.disabled/60x11-common_xdg_path b/.config/X11/xsession.disabled/60x11-common_xdg_path deleted file mode 100644 index a77f97f0..00000000 --- a/.config/X11/xsession.disabled/60x11-common_xdg_path +++ /dev/null @@ -1,22 +0,0 @@ -# This file is sourced by Xsession(5), not executed. -# Add additional xdg paths depending on selected desktop session - -DEFAULT_XDG_CONFIG_DIRS='/etc/xdg' -DEFAULT_XDG_DATA_DIRS='/usr/local/share/:/usr/share/' -if [ -n "$DESKTOP_SESSION" ]; then - # readd default if was empty - if [ -z "$XDG_CONFIG_DIRS" ]; then - XDG_CONFIG_DIRS="$DEFAULT_XDG_CONFIG_DIRS"/xdg-"$DESKTOP_SESSION":"$DEFAULT_XDG_CONFIG_DIRS" - elif [ -n "${XDG_CONFIG_DIRS##*$DEFAULT_XDG_CONFIG_DIRS/xdg-$DESKTOP_SESSION*}" ]; then - XDG_CONFIG_DIRS="$DEFAULT_XDG_CONFIG_DIRS"/xdg-"$DESKTOP_SESSION":"$XDG_CONFIG_DIRS" - fi - export XDG_CONFIG_DIRS - if [ -z "$XDG_DATA_DIRS" ]; then - XDG_DATA_DIRS="$DEFAULT_XDG_DATA_DIRS" - fi - if [ -n "${XDG_DATA_DIRS##*/usr/share/$DESKTOP_SESSION*}" ]; then - XDG_DATA_DIRS=/usr/share/"$DESKTOP_SESSION":"$XDG_DATA_DIRS" - fi - export XDG_DATA_DIRS -fi - diff --git a/.config/X11/xsession.disabled/90x11-common_ssh-agent b/.config/X11/xsession.disabled/90x11-common_ssh-agent deleted file mode 100644 index 70bd01b6..00000000 --- a/.config/X11/xsession.disabled/90x11-common_ssh-agent +++ /dev/null @@ -1,15 +0,0 @@ -# $Id: 90x11-common_ssh-agent 305 2005-07-03 18:51:43Z dnusinow $ - -# This file is sourced by Xsession(5), not executed. - -STARTSSH= -SSHAGENT=/usr/bin/ssh-agent -SSHAGENTARGS= - -if has_option use-ssh-agent; then - if [ -x "$SSHAGENT" ] && [ -z "$SSH_AUTH_SOCK" ]; then - STARTUP="$SSHAGENT $SSHAGENTARGS ${TMPDIR:+env TMPDIR=$TMPDIR} $STARTUP" - fi -fi - -# vim:set ai et sts=2 sw=2 tw=80: