From 0346f05fea875af7a7ca76b4b558cadbe5da4dfb Mon Sep 17 00:00:00 2001 From: DogeyStamp Date: Thu, 21 Oct 2021 17:44:21 -0400 Subject: [PATCH] Change shell to fish --- src/.config/{zsh/aliases.zsh => aliases.fish} | 8 +++--- src/.config/bashrc | 5 ++++ src/.config/fish/config.fish | 10 +++++++ src/.config/zsh/.zshrc | 27 ------------------- src/{.zshenv => .profile} | 4 ++- 5 files changed, 22 insertions(+), 32 deletions(-) rename src/.config/{zsh/aliases.zsh => aliases.fish} (91%) create mode 100644 src/.config/bashrc create mode 100644 src/.config/fish/config.fish delete mode 100755 src/.config/zsh/.zshrc rename src/{.zshenv => .profile} (96%) diff --git a/src/.config/zsh/aliases.zsh b/src/.config/aliases.fish similarity index 91% rename from src/.config/zsh/aliases.zsh rename to src/.config/aliases.fish index a730e1d..cac8a7b 100644 --- a/src/.config/zsh/aliases.zsh +++ b/src/.config/aliases.fish @@ -7,7 +7,7 @@ alias mpv='mpv --ytdl-format="bestvideo[ext=mp4][height<=?1080]+bestaudio[ext=m4 alias youtube-dl='youtube-dl -f "bestvideo[ext=mp4][height<=?1080]+bestaudio[ext=m4a]"' # Set gpg tty so curses pinentry works -alias gpgt='export GPG_TTY=$(tty)' +alias gpgt='export GPG_TTY=(tty)' # Remove newlines from clipboard (for competitive programming) alias dnl='xsel -b | tr "\n" " " | xsel -ib' @@ -16,9 +16,9 @@ alias dnl='xsel -b | tr "\n" " " | xsel -ib' alias nvimp='nvim -u NONE -c "setlocal history=0 nobackup nomodeline noshelltemp noswapfile noundofile nowritebackup secure viminfo=\"\""' # Read pdf file as text -pdfr () { - pdftotext $1 - | nvim -} +function pdfr + pdftotext $argv - | nvim +end # Specific to my Gentoo system alias genlop='doas -u portage /usr/bin/genlop' diff --git a/src/.config/bashrc b/src/.config/bashrc new file mode 100644 index 0000000..0a28697 --- /dev/null +++ b/src/.config/bashrc @@ -0,0 +1,5 @@ +#!/bin/sh + +# Use fish in place of bash +# keep this line at the bottom of ~/.bashrc +[ -x /bin/fish ] && SHELL=/bin/fish exec fish diff --git a/src/.config/fish/config.fish b/src/.config/fish/config.fish new file mode 100644 index 0000000..426fada --- /dev/null +++ b/src/.config/fish/config.fish @@ -0,0 +1,10 @@ +if status is-interactive + # Commands to run in interactive sessions can go here +end + +source .config/fish/aliases.fish + +set -gx PATH "$PATH:$HOME/.local/bin:" +set fish_greeting "" + +fish_vi_key_bindings diff --git a/src/.config/zsh/.zshrc b/src/.config/zsh/.zshrc deleted file mode 100755 index 6d28764..0000000 --- a/src/.config/zsh/.zshrc +++ /dev/null @@ -1,27 +0,0 @@ -autoload -Uz compinit promptinit - -bindkey -v - -compinit - -promptinit -prompt redhat - -SAVEHIST=500 - -PATH=$PATH:~/.local/bin/ - - -# This is where these files are on my Gentoo system -source /usr/share/zsh/site-functions/zsh-syntax-highlighting.zsh -source ~/.config/zsh/zsh-autosuggestions/zsh-autosuggestions.zsh - -# On my Arch systems -# source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh -# source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh - -# Load aliases -source ~/.config/zsh/aliases.zsh - -# Fix bug with curses pinentry -gpgt diff --git a/src/.zshenv b/src/.profile similarity index 96% rename from src/.zshenv rename to src/.profile index 148df45..b4f4ac1 100644 --- a/src/.zshenv +++ b/src/.profile @@ -1,4 +1,4 @@ -#/bin/sh +#!/bin/sh # Set XDG directories export XDG_CONFIG_HOME="$HOME"/.config @@ -33,3 +33,5 @@ export EDITOR="nvim" export REALNAME="dogeystamp" export EMAIL="dogeystamp@disroot.org" export KEYID="A3A5FA72F8E5E54FBEE425057225FE3592EFFA38" + +source .config/bashrc