Skip to content

Commit

Permalink
馃悷 Switch to Fish shell
Browse files Browse the repository at this point in the history
It's about the time for a better interactive
shell experience. We can do better than Apple,
we can do better than ZSH. The "leap year" of
the shell is best modeled by Fish.

I still use Bash, but want to use it only
secondarily. I used Bash from 2016-2020
primarily, only because of wanting to keep
memory fresh of how to work with legacy
systems with only a POSIX/Bash console.

 * Mod+Enter now spawns fish shells.
 * Mod+Shift+Enter added for default
   (99.99% Bash in today's systems)

Fish is better most immediately because
of how it deals with aliases. The `abbr`
feature alone makes Fish compelling for
the daily shell user.

Added a `_setup` script which for now,
only contains the fisher setup.
  • Loading branch information
avindra committed Nov 14, 2020
1 parent 5cf3e84 commit bcba0d0
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 4 deletions.
9 changes: 8 additions & 1 deletion .aliases
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,14 @@ function dotfile_update() {
}
export -f dotfile_update

# Hide untracked items by default
###
## Git aliases
##
## Brevity is preferred here, to enable
## robust and expedited SCM management.
###
alias g="git"
# Hides untracked items by default
alias s="git status -uno"
alias a="git add -u"
alias r="git reset HEAD"
Expand Down
23 changes: 22 additions & 1 deletion .config/fish/config.fish
Original file line number Diff line number Diff line change
@@ -1 +1,22 @@
set fish_greeting "The quieter you become, the more you are able to hear."
set fish_greeting "The Quieter you Become, the More you are able to Hear."

abbr -a -g l ls -ltrah
abbr -a -U pbcopy xclip -selection c

# git aliases
abbr -a -g g git
abbr -a -g s git status -uno
abbr -a -g a git add -u
abbr -a -g r git reset HEAD
abbr -a -g p git pull --rebase
abbr -a -g P git push
abbr -a -g H git show HEAD
abbr -a -g x git checkout --
abbr -a -g c git commit -v
abbr -a -g C git commit --amend --no-edit

# check entropy
abbr -a -g S cat /proc/sys/kernel/random/entropy_avail

# super diff
# todo: port
6 changes: 4 additions & 2 deletions .config/i3/config
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,10 @@ bindsym $mod+$X4 exec $term -e htop
# Use Mouse+$mod to drag floating windows to their wanted position
floating_modifier $mod

# App launching hotkeys
bindsym $mod+Return exec $term
# Mod+Enter: default to fish, fallback to Bash with shift
bindsym $mod+Return exec $term -e fish

This comment has been minimized.

Copy link
@avindra

avindra Nov 14, 2020

Author Owner

This is the intended interface for the shell. I have not gone to a full chsh, as I am wary of subtle things that may break after doing that. May do it eventually...

bindsym $mod+Shift+Return exec $term

# Freedom first
bindsym $mod+C exec firefox
bindsym $mod+alt+C exec killall firefox && firefox
Expand Down
6 changes: 6 additions & 0 deletions bin/_setup
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/fish

# Install fisher (package manager for fish)
curl -sL git.io/fisher | source && fisher install jorgebucaran/fisher

fisher install jethrokuan/fzf

0 comments on commit bcba0d0

Please sign in to comment.