Commit graph

15 commits

Author SHA1 Message Date
Bruno BELANYI 67da1d9f6e [ADD][SHELL] Project-local environment w/ localrc
This little script will look at your current working directory and its
parent directories to source local configuration files (very useful for
Python  projects, or the way I build TC with a local PATH pre-pended).

It works relatively well but still is a very fragile solution that
depends on the order in which the shell has sourced its files. Because
the Termite script kept erasing the previous PROMPT_COMMAND value for
Bash I had to change to source it at the beginning of my configuration
file.
2019-10-19 17:06:00 +02:00
Bruno BELANYI 97c4207b38 [UPDATE][SHELL] Make less clear screen on start-up
If you don't have this option, less will just start outputting from
wherever your cursor was (so the line where you were writing your
command), but any movement would make it snap to the top of the
terminal.

This makes it clear the screen before doing its first draw, making the
output systematically start from the top.
2019-10-19 05:46:29 +02:00
Bruno BELANYI fde97e5b66 [FIX][SHELL] Modify PATH at login only
It's cleaner to only export my modified PATH when I'm logging in,
instead of doing it at each shell launch.

Because Zsh and Bash don't use the same mechanism to let you know you
are in a login session, you gotta check both separately. But that
doesn't matter because lightdm doesn't launch `sh` as a login shell
anyway... So the condition is super messy.
2019-10-19 05:46:29 +02:00
Bruno BELANYI da789e2d5d [UPDATE][SHELL] Consistent style in profile
I prefer using the '$(...)' sub-shell notation instead of back-ticks. I
also try to systematically quote my variables if they're not numbers.
2019-10-18 22:17:20 +02:00
Bruno BELANYI 1e15b5c017 [FIX][SHELL] Add missing semi-colons in profile
Groups needs to have a command-list ending in a semi-colon to register
the ending brace. I did not encounter this issue with Zsh but do have an
error when sourcing the file with Bash.
2019-10-18 22:17:20 +02:00
Bruno BELANYI 9ebc52552a [ADD][SHELL] Use lesspipe pager preprocessor
This preprocessor is different from bat in that it can display some
information about binary files like archives or pdf files. It also does
some syntax highlighting like bat.
2019-10-18 22:17:20 +02:00
Bruno BELANYI 7f6bba0e5d [UPDATE][SCRIPT] Use hidden script folder in home
I'd rather not see my script folder most of the time, so let's make it a
hidden folder instead.

I also link it each time with stow instead of using a conditional on the
folder's existence, which is more robust when adding scripts after I
already finished an install and only want to update the symlinks.
2019-10-18 22:17:20 +02:00
Bruno BELANYI 5dfbb3fb90 [UPDATE][SHELL] BAT_PAGER variable in profile
I don't want my pager to clobber my terminal once I'm done looking at
whatever I was looking at.

This also means that I can remove its definition from the `batman`
script.
2019-10-18 22:17:20 +02:00
Bruno BELANYI 0f4d67278c [UPDATE][SHELL] Export default pager
I also added the '-+X' flag to `less` default options to make it clear the
screen on exit.
2019-10-18 22:17:20 +02:00
Bruno BELANYI 3f7f725e61 [FIX][SHELL] Launch keychain with password prompt 2019-10-18 22:17:20 +02:00
Bruno BELANYI 65a8a2f4a3 [ADD][SHELL] Use keychain as ssh-agent daemon
This program only launches one ssh-agent daemon for each session, which
is easier than handling ssh-agent by hand.
2019-10-18 22:17:20 +02:00
Bruno BELANYI b158a8a06e [ADD][SHELL] Add rust environment to PATH
I share the `.share` file between Zsh and Bash so no need to add the
export to all files, only one will do.
2019-10-18 22:17:20 +02:00
Bruno BELANYI d60e05b2af [FIX][RANGER] Export RANGER_LOAD_DEFAULT_RC=FALSE
The configuration file in my home directory contains all the mappings
used in ranger.
2019-10-18 22:17:20 +02:00
Bruno BELANYI 8d2f357c8c [ADD] Termite configuration and TERMINAL variable
Switching to Termite because URxvt has weird rendering issues when
resizing the font.

i3-sensible-terminal needs the TERMINAL environment variable to launch
our prefered terminal emulator with the Ctrl+d binding.

Bash and Zsh both need a hook to enable Termite to open another terminal
in the same directory with the Ctrl+Maj+t binding.
2019-07-13 03:35:43 +02:00
Bruno BELANYI 795042b616 [ADD] Common shell files 2019-07-11 21:53:49 +02:00