From 4bf6941b871b70e19951536a90ab3aacacce29ae Mon Sep 17 00:00:00 2001 From: memreyagci Date: Sun, 21 Feb 2021 16:10:28 +0100 Subject: [PATCH 1/2] Deleted the .xinitrc link at $HOME for even a cleaner home directory. A custom filename and directory can be specified with startx command, which in this case is $XINITRC variable that indicates $XDG_CONFIG_HOME/x11/xinitrc --- .config/shell/profile | 4 ++-- .xinitrc | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) delete mode 120000 .xinitrc diff --git a/.config/shell/profile b/.config/shell/profile index 06831cb..f6b1426 100644 --- a/.config/shell/profile +++ b/.config/shell/profile @@ -19,7 +19,7 @@ export BROWSER="brave" export XDG_CONFIG_HOME="$HOME/.config" export XDG_DATA_HOME="$HOME/.local/share" export XDG_CACHE_HOME="$HOME/.cache" -#export XINITRC="${XDG_CONFIG_HOME:-$HOME/.config}/x11/xinitrc" +export XINITRC="${XDG_CONFIG_HOME:-$HOME/.config}/x11/xinitrc" #export XAUTHORITY="$XDG_RUNTIME_DIR/Xauthority" # This line will break some DMs. export NOTMUCH_CONFIG="${XDG_CONFIG_HOME:-$HOME/.config}/notmuch-config" export GTK2_RC_FILES="${XDG_CONFIG_HOME:-$HOME/.config}/gtk-2.0/gtkrc-2.0" @@ -142,7 +142,7 @@ ex=🎯:\ if pacman -Qs libxft-bgra >/dev/null 2>&1; then # Start graphical server on user's current tty if not already running. - [ "$(tty)" = "/dev/tty1" ] && ! pidof -s Xorg >/dev/null 2>&1 && exec startx + [ "$(tty)" = "/dev/tty1" ] && ! pidof -s Xorg >/dev/null 2>&1 && exec startx $XINITRC else echo "\033[31mIMPORTANT\033[0m: Note that \033[32m\`libxft-bgra\`\033[0m must be installed for this build of dwm. Please run: diff --git a/.xinitrc b/.xinitrc deleted file mode 120000 index 518bb5d..0000000 --- a/.xinitrc +++ /dev/null @@ -1 +0,0 @@ -.config/x11/xinitrc \ No newline at end of file From deecc427071e013dc3a9af949334dd412d010dae Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Sun, 7 Mar 2021 15:40:43 -0500 Subject: [PATCH 2/2] startx alias --- .config/shell/aliasrc | 4 ++++ .config/shell/profile | 2 +- .config/x11/xprofile | 4 ++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.config/shell/aliasrc b/.config/shell/aliasrc index 1b0e835..6ad7a8b 100644 --- a/.config/shell/aliasrc +++ b/.config/shell/aliasrc @@ -3,11 +3,15 @@ # Use neovim for vim if present. [ -x "$(command -v nvim)" ] && alias vim="nvim" vimdiff="nvim -d" +# Use $XINITRC variable if file exists. +[ -f "$XINITRC" ] && alias startx="startx $XINITRC" + # Verbosity and settings that you pretty much just always are going to want. alias \ cp="cp -iv" \ mv="mv -iv" \ rm="rm -vI" \ + bc="bc -ql" \ mkd="mkdir -pv" \ yt="youtube-dl --add-metadata -i" \ yta="yt -x -f bestaudio/best" \ diff --git a/.config/shell/profile b/.config/shell/profile index f6b1426..d075418 100644 --- a/.config/shell/profile +++ b/.config/shell/profile @@ -142,7 +142,7 @@ ex=🎯:\ if pacman -Qs libxft-bgra >/dev/null 2>&1; then # Start graphical server on user's current tty if not already running. - [ "$(tty)" = "/dev/tty1" ] && ! pidof -s Xorg >/dev/null 2>&1 && exec startx $XINITRC + [ "$(tty)" = "/dev/tty1" ] && ! pidof -s Xorg >/dev/null 2>&1 && exec startx "$XINITRC" else echo "\033[31mIMPORTANT\033[0m: Note that \033[32m\`libxft-bgra\`\033[0m must be installed for this build of dwm. Please run: diff --git a/.config/x11/xprofile b/.config/x11/xprofile index b4db27b..f7182e1 100755 --- a/.config/x11/xprofile +++ b/.config/x11/xprofile @@ -3,10 +3,10 @@ # This file runs when a DM logs you into a graphical session. # If you use startx/xinit like a Chad, this file will also be sourced. -mpd & # music player daemon-you might prefer it as a service though -remaps & # run the remaps script, switching caps/esc and more; check it for more info setbg & # set the background with the `setbg` script #xrdb ${XDG_CONFIG_HOME:-$HOME/.config}/x11/xresources & # Uncomment to use Xresources colors/settings on startup +mpd & # music player daemon-you might prefer it as a service though +remaps & # run the remaps script, switching caps/esc and more; check it for more info xcompmgr & # xcompmgr for transparency dunst & # dunst for notifications xset r rate 300 50 & # Speed xrate up