From 31b7f8f3e2d32bb36a5afbbb4ec2a886ce6038db Mon Sep 17 00:00:00 2001 From: Andrew Date: Mon, 17 Aug 2020 21:23:04 -0400 Subject: Changed autostarting in .profile --- .config/polybar/config | 2 +- .config/zsh/.zshrc | 1 + .profile | 7 +++++-- .xprofile | 7 ++++++- 4 files changed, 13 insertions(+), 4 deletions(-) diff --git a/.config/polybar/config b/.config/polybar/config index c0043f2..8fd4702 100644 --- a/.config/polybar/config +++ b/.config/polybar/config @@ -54,7 +54,7 @@ font-1 = ProFontIIx Nerd Font:pixelsize=15;3 modules-left = menu bspwm i3 workspaces modules-center = xwindow -modules-right = alsa xkeyboard xbacklight memory cpu wlan eth battery date +modules-right = pulseaudio xkeyboard xbacklight memory cpu wlan eth battery date tray-position = right tray-padding = 2 diff --git a/.config/zsh/.zshrc b/.config/zsh/.zshrc index e30dc7b..9fa6d87 100644 --- a/.config/zsh/.zshrc +++ b/.config/zsh/.zshrc @@ -37,5 +37,6 @@ alias ll='ls -lhF' alias l='ls -CF' alias dotfiles="/usr/bin/git --git-dir='$HOME/.dotfiles' --work-tree='$HOME'" alias dotstat="/usr/bin/git --git-dir='$HOME/.dotfiles' --work-tree='$HOME' status" +alias dotdiff="/usr/bin/git --git-dir='$HOME/.dotfiles' --work-tree='$HOME' diff" alias dotadd="/usr/bin/git --git-dir='$HOME/.dotfiles' --work-tree='$HOME' add -f" diff --git a/.profile b/.profile index 21808e6..3defda2 100644 --- a/.profile +++ b/.profile @@ -26,9 +26,12 @@ 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" @@ -66,6 +69,6 @@ export GNUPGHOME="$XDG_DATA_HOME/gnupg" export PASSWORD_STORE_DIR="$XDG_DATA_HOME/pass" # Autostarting window manager -if [ -z "$DISPLAY" ] && [ ! -z "$DISPLAY_SESSION" ]; then +if [ "$AUTOSTART" = "1" ] && [ -z "$DISPLAY" ] && [ ! -z "$DISPLAY_SESSION" ]; then [ "$(tty)" = "/dev/tty1" ] && ! pidof Xorg >/dev/null 2>&1 && exec startx fi diff --git a/.xprofile b/.xprofile index 52fbe9f..de0b9e4 100644 --- a/.xprofile +++ b/.xprofile @@ -1,6 +1,11 @@ #!/bin/sh -setxkbmap -layout us,ru -option "grp:alt_shift_toggle,grp:caps_toggle" +if [ "$DISPLAY_SESSION" != "openbox" ] && \ + [ "$DISPLAY_SESSION" != "dwm" ]; then + exit 0 +fi + +setxkbmap -layout us,ru -option "grp:alt_shift_toggle" dunst & # Window manager specific config -- cgit v1.2.3