Conversation

Anyone knows if I can start fastfetch with kitty terminal without adding it to my zshrc?

3
0
1
@raccoon adding `shell zsh -i -c "fastfetch; exec zsh"` to kitty conf (didn't test this i don't run zsh)
2
0
0

@raccoon yea , chexk out the kitty config , its VERY extwnsive and has lots n lots of comments on every option explaining how they work

2
0
0

@raccoon or just do a .zshrc with

if [ $TERM=kitty ]; then fastfetch; fi
3
0
0

@fiore@brain.worm.pink
This doesn't work for me because it still starts fastfetch when I start tmux which is what I wanted to avoid

2
0
0

@fiore@brain.worm.pink
I did and the things I could try from reading it didn;t work :(

0
0
1

@raccoon dw haha , its just kinda weird . @lucy do u know anything abt this am i wronf

1
0
0
@fiore @raccoon it should be
if [[ $TERM == "kitty" ]]; then
fastfetch
fi
1
0
0

@rose @raccoon wait no isnt that bash specific . arwnt double [[ non-standard ?

1
0
0
@fiore @raccoon yeah they're non standard, but zsh implements them too iirc
1
0
0

@raccoon @fiore Idea:

if test "$(cat /proc/$PPID/cmdline | (read -d '' parent; printf '%s' "$parent"))" = xfce4-terminal; then
  neofetch
fi

this will check who is the parent of the shell and only execute the command if it’s the terminal emulator in question

replace xfce4-terminal with kitty (i use the former) and neofetch with fastfetch (i’m stuck in the stone age)

1
0
1
@fiore @raccoon $TERM may be set to xterm-kitty instead i do this so i can ssh into servers without various tools breaking
1
0
1

@rose @fiore @raccoon but why use [[ when [ should work here exactly the same (just needs the spaces as i mentioned in Other reply)

1
0
1

@kimapr @raccoon @rose yea i avoid [[ because its never useful to my usecases and id rather keep my scripts posix

1
0
0
@fiore @raccoon idk zsh tbh im boring i use bash :c
1
0
1

@fiore @raccoon @rose the only novel thing compared to [ it adds is regex .. everything else can be done by just combining multiple invocations of [ with the usual shell operators

and if u need regex u can use grep instead, it’s gonna be considerably slower but if your writing shell your not writing 4 speed anyway

1
0
1
LMAOOOOOOOO amazing!

CC: @raccoon@hollow.raccoon.quest
1
0
0

@fiore @raccoon @kimapr you can also make your terminal set its own environment variable so you can make execution conditional in your shell rc based on that variable

e.g. konsole is integrated into different applications like dolphin, kdevelop and others, so the parent process might not always be “konsole”. but it has a concept of profiles that can be switched between, and each profile can have its own settings for environment variables, shell command, behavior, appearance etc. — i think it’s a neat feature
1
0
1

@fiore @raccoon @kimapr or, make tmux set one, and inhibit fastfetch if it’s set

1
0
1
I expressed joy and bewilderment at the amazingly simple suggestion lucy made in comparison to the shell test operator horrors seen before in the thread.

CC: @lucy@netzsphaere.xyz
1
0
1

@mia @fiore @raccoon tmux does set one, fiore’s suggestion only didn’t work because she forgot spaces

1
0
1

@eris@p.enes.lv @lucy@netzsphaere.xyz
Lucy be like: yeah have this elegant, simple solution I just threw together without even needing to test it because I'm THAT talented

1
0
2

@kimapr @raccoon @mia yes :P i know it works because i do that with both tmux and nvim !! im just bad at test syntax

1
0
0
@raccoon @eris without me ever having used zsh or fastfetch. now where's my job whyMelt
1
0
1

@kimapr @raccoon @mia i stopped , nowadays i just use a tmux split . but yea i used to , having vim binds for navigation ina termjnal is VERY nice , i miss it everywhere else

0
0
0

@lucy@netzsphaere.xyz @eris@p.enes.lv
Lucy if I could hire you I would hire you for just existing because you're doing us all a favor for being around

0
0
1