From a52106e9f4e80acbce374977c7f9d5863c280e60 Mon Sep 17 00:00:00 2001 From: tomit4 Date: Tue, 5 Apr 2022 17:58:46 -0700 Subject: [PATCH] started integrating secondary wm, i3-gaps, bashrc needs to check for window manager for log alias --- bashrc.txt | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/bashrc.txt b/bashrc.txt index 9ddad62c..386b1b32 100644 --- a/bashrc.txt +++ b/bashrc.txt @@ -311,7 +311,6 @@ alias thinkorswim="~/thinkorswim/thinkorswim &" alias {cl,cls}="clear" alias shutdown="shutdown.sh" alias reboot="reboot.sh" -alias log="xfce4-session-logout --logout:wq" alias curltime="curl -w \"@$HOME/Documents/notes/curl-format.txt\" -o /dev/null -s" alias inxi-w="inxi --weather-location 90004" alias forecast="curl -s 'http://wttr.in/losangeles'" @@ -321,6 +320,14 @@ alias killport="fuser -k" alias npm_upgrade="doas npm install -g npm@latest" alias npm_list="npm list -g --depth=0" + +# i3 config for log alias +if [ $XDG_CURRENT_DESKTOP == "i3" ] ; then + alias log="i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -B 'Yes, exit i3' 'i3-msg exit'" +elif [ $XDG_CURRENT_DESKTOP == "XFCE" ]; then + alias log="xfce4-session-logout --logout:wq" +fi + # game shortcuts alias {cbpunk,cyberpunk}="steam steam://rungameid/1091500 &" alias {twd,thewalkingdead}="steam steam://rungameid/1449690 &"