summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.profile36
-rw-r--r--.xinitrc16
-rw-r--r--.xprofile18
3 files changed, 21 insertions, 49 deletions
diff --git a/.profile b/.profile
index b7d6959..6218cff 100644
--- a/.profile
+++ b/.profile
@@ -1,33 +1,9 @@
-# ~/.profile: executed by the command interpreter for login shells.
-# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login
-# exists.
-# see /usr/share/doc/bash/examples/startup-files for examples.
-# the files are located in the bash-doc package.
-
-# the default umask is set in /etc/profile; for setting the umask
-# for ssh logins, install and configure the libpam-umask package.
-#umask 022
-
-# set PATH so it includes user's private bin if it exists
-if [ -d "$HOME/bin" ] ; then
- PATH="$HOME/bin:$PATH"
-fi
-
# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/.local/bin" ] ; then
PATH="$PATH:$(du "$HOME/.local/bin/" | cut -f2 | paste -sd ':')"
fi
-# Set this variable to allow autostart
-export AUTOSTART=1
-# Set supported WM to autostart
-export DISPLAY_SESSION="dwm"
-
-
export SHELL="/bin/zsh"
-export TERMINAL="st"
-export EDITOR="nvim"
-export BROWSER="qutebrowser"
export VIMINIT="source $MYVIMRC"
# For Jetbrains products
@@ -59,12 +35,8 @@ export LESSHISTFILE=-
export GTK2_RC_FILES="$XDG_CONFIG_HOME/gtk-2.0/gtkrc"
export GNUPGHOME="$XDG_DATA_HOME/gnupg"
export PASSWORD_STORE_DIR="$XDG_DATA_HOME/pass"
+export STACK_ROOT="$XDG_DATA_HOME/stack"
-# Autostarting window manager
-if [ "$(tty)" = "/dev/tty1" ]; then
- if [ "$AUTOSTART" = "1" ] && [ -z "$DISPLAY" ] && [ ! -z "$DISPLAY_SESSION" ]; then
- ! pidof Xorg >/dev/null 2>&1 && exec startx
- fi
-elif [ -z "$TMUX" ]; then
- exec tmux
-fi
+export XMONAD_CONFIG_HOME="$XDG_CONFIG_HOME/xmonad"
+export XMONAD_DATA_HOME="$XDG_DATA_HOME/xmonad"
+export XMONAD_CACHE_HOME="$XDG_CACHE_HOME/xmonad"
diff --git a/.xinitrc b/.xinitrc
index af658dd..da34fa7 100644
--- a/.xinitrc
+++ b/.xinitrc
@@ -1,16 +1,10 @@
#!/bin/sh
-if [ "$DISPLAY_SESSION" = "dwm" ]; then
- session_line=dwm
-elif [ "$DISPLAY_SESSION" = "openbox" ]; then
- session_line=openbox-session
-elif [ "$DISPLAY_SESSION" = "xmonad" ]; then
- session_line=xmonad
-else
- session_line="$DISPLAY_SESSION"
- # echo "DISPLAY_SESSION not specified. Exiting..."
- # exit 1
-fi
+# This file is sourced only when starting X11 session with startx.
+# Otherwise, display manager should set up this variable and
+# source the xprofile.
+
+export DESKTOP_SESSION="xmonad"
[ -f /etc/xprofile ] && . /etc/xprofile
[ -f ~/.xprofile ] && . ~/.xprofile
diff --git a/.xprofile b/.xprofile
index f178ec3..27818db 100644
--- a/.xprofile
+++ b/.xprofile
@@ -1,18 +1,18 @@
#!/bin/sh
-if [ "$DISPLAY_SESSION" != "openbox" ] && \
- [ "$DISPLAY_SESSION" != "xmonad" ] && \
- [ "$DISPLAY_SESSION" != "dwm" ]; then
- exit 0
-fi
+if [ "$DESKTOP_SESSION" = "openbox-session" ] || \
+ [ "$DESKTOP_SESSION" = "xmonad" ] || \
+ [ "$DESKTOP_SESSION" = "dwm" ]; then
setxkbmap -layout us,ru -option "grp:alt_shift_toggle"
dunst &
# Window manager specific config
-if [ "$DISPLAY_SESSION" = "dwm" ]; then
+if [ "$DESKTOP_SESSION" = "dwm" ]; then
compositor_args="-o 0"
dwmblocks &
+elif [ "$DESKTOP_SESSION" = "xmonad" ]; then
+ compositor_args="-o 0"
fi
# Host specific config
@@ -33,3 +33,9 @@ if ! [ $(command -v compton) ]; then
fi
compton -c --config $XDG_CONFIG_HOME/compton/compton.conf $compositor_args &
+
+fi
+
+export TERMINAL="st"
+export EDITOR="nvim"
+export BROWSER="qutebrowser"