From 6610a8385d873c6382324cbd075d4bc82786fe51 Mon Sep 17 00:00:00 2001 From: Ryan Kes Date: Sat, 17 Sep 2022 16:16:57 +0200 Subject: [PATCH] refactor: remove dwm from autostart --- dwm/.config/X11/xinitrc | 3 - dwm/.local/share/dwm/autostart.sh | 102 ------------------------------ 2 files changed, 105 deletions(-) delete mode 100755 dwm/.config/X11/xinitrc delete mode 100755 dwm/.local/share/dwm/autostart.sh diff --git a/dwm/.config/X11/xinitrc b/dwm/.config/X11/xinitrc deleted file mode 100755 index 6a98d51..0000000 --- a/dwm/.config/X11/xinitrc +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -exec dwm diff --git a/dwm/.local/share/dwm/autostart.sh b/dwm/.local/share/dwm/autostart.sh deleted file mode 100755 index 5b3f859..0000000 --- a/dwm/.local/share/dwm/autostart.sh +++ /dev/null @@ -1,102 +0,0 @@ -#!/bin/sh - -###---Start app if not running already---### -start_if_not_running() { - count=1 - ###---iceweasel/firefox is weird---### - if [ "$1" = "iceweasel" ]; then - PROCESS_NAME="iceweasel|MainThread" - elif [ "$1" = "element-desktop-nightly" ]; then - PROCESS_NAME="element-desktop" - elif [ "$1" = "emacs" ]; then - count=2 - else - PROCESS_NAME=$1 - fi - - if [ "$(pgrep -u "$(id -u)" -x "$PROCESS_NAME" | wc -l)" -lt $count ]; then - if command -v "$1"; then - eval "$1 &" - fi - fi -} - -###---Start app in alacritty if not running already---### -start_shell_if_not_running() { - if [ "$(pgrep -u "$(id -u)" -x "$1" | wc -l)" -lt 1 ]; then - if command -v "$1"; then - eval "st -c $1 -e $1 &" - fi - fi -} - -# Set screen orientation if second monitor is connected -SCREENCOUNT=$(xrandr | grep -c "\*") - -# If multi screen add special mode for monitor so it supports 1440p over HDMI -if [ "$SCREENCOUNT" -eq 2 ]; then - if [ -f "$HOME/.local/bin/screen_desktop" ]; then - screen_desktop & - # Make sure mouse is on main screen so windows are launched there - #xdotool mousemove 3360 1080 & - fi -else - if [ -f "$HOME/.local/bin/screen" ]; then - screen & - fi -fi - -###---Set working directory---### -cd ~ || exit - -###---Load xresources---### -xrdb -load ~/.config/X11/xresources & - -###---Sxhkd---### -start_if_not_running sxhkd - -###---Keyboard---### -setxkbmap -option caps:escape & - -###---Wallpaper, colours & opacity---### -~/.local/bin/wallpaper & -wal -n -R & -picom -b & -sh ~/.cache/wal/colors.sh & - -###---Switch off microphones---### -# switch off microphones -amixer -c 2 set Mic nocap & -amixer -c 3 set Mic nocap & - -###---Autostart---### -start_if_not_running dunst -start_if_not_running unclutter -start_if_not_running xbanish -start_if_not_running nm-applet -start_if_not_running pasystray -start_if_not_running redshift-gtk -start_if_not_running syncthing-gtk -start_if_not_running caffeine -start_if_not_running dwmblocks - -start_if_not_running brave -start_if_not_running iceweasel -start_if_not_running firefox -start_if_not_running emacs -start_if_not_running element-desktop -start_if_not_running element-desktop-nightly - -if [ "$SCREENCOUNT" -eq 2 ]; then - start_shell_if_not_running castero - start_if_not_running slack -fi - -###---System lock---### -pkill -f xss-lock -xset s 300 5 & -env XSECURELOCK_FONT="Hack Nerd Font" xss-lock -n /usr/lib/xsecurelock/dimmer -l -- xsecurelock & - -###---Misc---### -# Needed for Jetbrains products to work -wmname LG3D &