Logs: liberachat/#xmonad
| 2022-07-12 19:44:09 | <wusticality> | #!/bin/bash |
| 2022-07-12 19:44:10 | <wusticality> | if [ -r ".xmonad/xmonad-session-rc" ] |
| 2022-07-12 19:44:10 | <wusticality> | then |
| 2022-07-12 19:44:10 | <geekosaur> | that was what I suggested earlier and you said no? |
| 2022-07-12 19:44:11 | <wusticality> | . .xmonad/xmonad-session-rc |
| 2022-07-12 19:44:11 | <wusticality> | fi |
| 2022-07-12 19:44:12 | <wusticality> | exec xmonad "$@" |
| 2022-07-12 19:44:22 | <geekosaur> | oh, that makes it easy then |
| 2022-07-12 19:44:47 | <wusticality> | I guess I can just add ~/.xmonad/xmonad-session-rc ? |
| 2022-07-12 19:44:49 | <geekosaur> | create that file, have it source your .bash_profile and .bashrc |
| 2022-07-12 19:45:02 | <wusticality> | aight, let me try that quick |
| 2022-07-12 19:45:36 | <geekosaur> | ("." is the old name for "source") |
| 2022-07-12 19:47:09 | <wusticality> | hmm |
| 2022-07-12 19:47:17 | → | chomwitt joins (~chomwitt@2a02:587:dc0d:4a00:ae09:5cbc:3a9a:5a89) |
| 2022-07-12 19:47:23 | <wusticality> | outside of creating a file, is there some way to know that it's being loaded? |
| 2022-07-12 19:48:10 | <wusticality> | I know Linux has logs or something |
| 2022-07-12 19:48:32 | <geekosaur> | you could have it open an xmessage/zenity/whatever |
| 2022-07-12 19:48:42 | <geekosaur> | I don't know where your session manager puts its logs |
| 2022-07-12 19:50:11 | <wusticality> | added xmessage foobar, nothing happens |
| 2022-07-12 19:50:15 | <wusticality> | I don't think it's being loaded, hmm |
| 2022-07-12 19:50:57 | <geekosaur> | is xmessage installed? most modern systems don't any more |
| 2022-07-12 19:51:19 | <geekosaur> | which is why I suggested zenity as well. zenity is the gtk alternative, kdialog is kde's version |
| 2022-07-12 19:51:29 | <wusticality> | yep, I just tested it |
| 2022-07-12 19:51:53 | <wusticality> | unless that script isn't loading ~/.xmonad/xmonad-session-rc, but some other .xmonad folder location perhaps? |
| 2022-07-12 19:51:57 | <wusticality> | (which would be really weird) |
| 2022-07-12 19:52:28 | <geekosaur> | I would be very surprised if that script started somewhere other than your home directory |
| 2022-07-12 19:52:32 | <wusticality> | same |
| 2022-07-12 19:52:41 | <wusticality> | doesn't appear to be loaded |
| 2022-07-12 19:53:10 | <wusticality> | btw, I'm trying to pickup these changes by doing `modMask q` |
| 2022-07-12 19:53:19 | <geekosaur> | that won't work |
| 2022-07-12 19:53:19 | <wusticality> | would that completely relaunch xmonad? |
| 2022-07-12 19:53:21 | <wusticality> | ahh |
| 2022-07-12 19:53:34 | <geekosaur> | it restarts xmonad but won't rerun xmonad-session |
| 2022-07-12 19:53:41 | <geekosaur> | you have to log out and back in |
| 2022-07-12 19:53:44 | <wusticality> | ok, let me logout quick |
| 2022-07-12 19:54:00 | <wusticality> | btw - if you source .bash_profile and it contains bash-specific things, what's going to happen exactly? |
| 2022-07-12 19:54:15 | <wusticality> | in other words, under what shell will that source call occur? |
| 2022-07-12 19:54:36 | <geekosaur> | the script starts with "#!/bin/bash" so it will use bash |
| 2022-07-12 19:54:54 | <geekosaur> | and bash will do the source-ing |
| 2022-07-12 19:55:07 | <wusticality> | ah |
| 2022-07-12 19:55:17 | <wusticality> | if that's true, why wouldn't it pick up my bash_profile in the first place? |
| 2022-07-12 19:55:26 | <wusticality> | apologies btw, learning a lot here as I go |
| 2022-07-12 19:55:33 | <geekosaur> | because a script reads no startup files |
| 2022-07-12 19:55:41 | <wusticality> | ahhh |
| 2022-07-12 19:55:44 | <geekosaur> | an interactive shell runs startup files |
| 2022-07-12 19:55:45 | <wusticality> | ok, let me logout quick |
| 2022-07-12 19:55:52 | <wusticality> | got it :) |
| 2022-07-12 19:56:00 | × | wusticality quits (~wusticali@c-67-161-204-49.hsd1.co.comcast.net) (Quit: Client closed) |
| 2022-07-12 19:57:14 | → | wusticality joins (~wusticali@c-67-161-204-49.hsd1.co.comcast.net) |
| 2022-07-12 19:57:26 | <wusticality> | btw, what do you use for irc in *nix? |
| 2022-07-12 19:58:13 | <geekosaur> | I use hexchat, or element (matrix app, but matrix is linked to libera.chat irc) in my browser |
| 2022-07-12 19:58:31 | <wusticality> | logging out / back in shows the message |
| 2022-07-12 19:58:39 | <wusticality> | however, my env vars are still not showing up which is odd |
| 2022-07-12 19:59:01 | <wusticality> | surely $HOME is defined at this point |
| 2022-07-12 19:59:05 | <wusticality> | perhaps not? |
| 2022-07-12 19:59:31 | <wusticality> | I'm doing something like this: [ -f "$HOME/.bash_profile" ] && . "$HOME/.bash_profile" |
| 2022-07-12 19:59:44 | <geekosaur> | $HOME should always be defined, it's set by the login mechanism |
| 2022-07-12 20:00:32 | <wusticality> | hmmm |
| 2022-07-12 20:01:06 | × | wusticality quits (~wusticali@c-67-161-204-49.hsd1.co.comcast.net) (Client Quit) |
| 2022-07-12 20:02:05 | → | wusticality joins (~wusticali@c-67-161-204-49.hsd1.co.comcast.net) |
| 2022-07-12 20:02:23 | <wusticality> | heads up, every time I logout / login I'm losing the chat history, so apologies if I'm missing any comments |
| 2022-07-12 20:02:44 | <wusticality> | I did an xmessage $HOME and it was correct |
| 2022-07-12 20:04:04 | × | wusticality quits (~wusticali@c-67-161-204-49.hsd1.co.comcast.net) (Client Quit) |
| 2022-07-12 20:10:01 | → | wusticality joins (~wusticali@c-67-161-204-49.hsd1.co.comcast.net) |
| 2022-07-12 20:10:24 | <geekosaur> | https://ircbrowse.tomsmeding.com/browse/lcxmonad might be of interest, but I'm waiting while you're logged out |
| 2022-07-12 20:10:24 | <wusticality> | So it seems like the file is getting sourced - could the issue be this? |
| 2022-07-12 20:10:25 | <wusticality> | # Do nothing if not interactive. |
| 2022-07-12 20:10:26 | <wusticality> | case $- in |
| 2022-07-12 20:10:26 | <wusticality> | *i*) ;; |
| 2022-07-12 20:10:27 | <wusticality> | *) return;; |
| 2022-07-12 20:10:27 | <wusticality> | esac |
| 2022-07-12 20:10:35 | <geekosaur> | yes |
| 2022-07-12 20:10:52 | <geekosaur> | scripts aren't considered interactive, so it returns |
| 2022-07-12 20:10:58 | <wusticality> | I guess that's saying, if it's not run as an actual shell, don't do anything? |
| 2022-07-12 20:11:10 | <wusticality> | I'm trying to remember why I even did that |
| 2022-07-12 20:11:19 | <geekosaur> | well, I'd quibble about "actual shell", but yes |
| 2022-07-12 20:13:44 | <geekosaur> | I actually do something similar, but rather than abort the "source" entirely I skip the parts that I only want in interactive shells |
| 2022-07-12 20:14:45 | <wusticality> | hu |
| 2022-07-12 20:14:47 | <wusticality> | *huh |
| 2022-07-12 20:15:08 | <wusticality> | Trying to think what you'd only want for interactive shells |
| 2022-07-12 20:15:24 | <MrElendig> | wusticality: weechat in tmux |
| 2022-07-12 20:19:58 | <wusticality> | What would you not run interactively? |
| 2022-07-12 20:22:05 | <geekosaur[m]> | My dotfiles have a lot of Kerberos and OpenAFS setup intended for interactive shells, which needs to be different in scripts |
| 2022-07-12 20:22:17 | → | allbery_b joins (~geekosaur@xmonad/geekosaur) |
| 2022-07-12 20:22:17 | × | geekosaur quits (~geekosaur@xmonad/geekosaur) (Killed (NickServ (GHOST command used by allbery_b))) |
| 2022-07-12 20:22:20 | allbery_b | is now known as geekosaur |
| 2022-07-12 20:22:27 | × | abhixec quits (~abhinav@c-67-169-139-16.hsd1.ca.comcast.net) (Quit: leaving) |
| 2022-07-12 20:23:57 | → | gauge_ joins (~gauge@user/gauge) |
| 2022-07-12 20:24:08 | <geekosaur[m]> | You probably don't want to look at my dotfiles, they're scary 😀 |
| 2022-07-12 20:30:27 | → | Solitary_ joins (~Solitary@user/solitary) |
| 2022-07-12 20:31:16 | × | gauge quits (~gauge@user/gauge) (*.net *.split) |
| 2022-07-12 20:31:16 | × | Solitary quits (~Solitary@user/solitary) (*.net *.split) |
| 2022-07-12 20:31:16 | × | sagax quits (~sagax_nb@user/sagax) (*.net *.split) |
| 2022-07-12 20:32:10 | Solitary_ | is now known as Solitary |
| 2022-07-12 20:41:43 | <wusticality> | Should I potentially separate out parts of my bashrc into separate sections? |
| 2022-07-12 20:41:55 | <wusticality> | I wonder if it's "safe (TM)" to just remove that "if interactive" check |
| 2022-07-12 20:45:24 | × | wusticality quits (~wusticali@c-67-161-204-49.hsd1.co.comcast.net) (Quit: Client closed) |
| 2022-07-12 20:46:43 | → | wusticality joins (~wusticali@c-67-161-204-49.hsd1.co.comcast.net) |
| 2022-07-12 20:47:17 | <geekosaur> | possibly, but as I haven't seen it I wouldn't know (and in any case I'm not you and wouldn't know your preferences) |
| 2022-07-12 20:47:47 | <geekosaur> | I have the $PATH stuff in mine separated out for when I want a minimal setup in other scripts |
All times are in UTC.