[download]

xprofile

   1 #!/bin/sh
   2 
   3 exec 2>&1
   4 r(){ pkill $1; $@ & }
   5 
   6 r sxhkd
   7 r imwheel
   8 r redshift
   9 r unclutter
  10 
  11 theme
  12 xset m 1 1
  13 setxkbmap -option terminate:ctrl_alt_bksp
  14 setxkbmap us,ru -option grp:caps_toggle,grp_led:scroll
  15 xinput set-prop 'pointer:Logitech MX Master 2S' 'libinput Accel Speed' -0.72
  16 hostnamectl | grep -qi virtualization && setxkbmap -option altwin:swap_alt_win
  17 
  18 {
  19     until [ "$wm" ]; do
  20         wm=$(wmname)
  21         sleep 0.1
  22     done
  23 
  24     [ "$wm" = openbox ] && wm=xfwm4
  25     [ "$wm" = xfwm4   ] && r nemo-desktop
  26     [ "$wm" = i3      ] || r $wm-status
  27 
  28     r dunst
  29     r picom
  30     r `grep Exec= /etc/xdg/autostart/polkit-mate* | cut -b 6-`
  31 
  32     case "$wm" in
  33         *wm|awesome|i3|xfwm4)
  34             r xfce4-power-manager
  35             r xfsettingsd
  36             r theme
  37         ;;
  38     esac
  39 } &