dotfiles

My personal dotfiles

commit 029e0909146b11139f0a0a2ed1b526b94e5c22a9
parent b2be13afba71637db574a228f66901caa2fea7ee
Author: Pablo <pablo-escobar@riseup.net>
Date:   Fri,  2 Apr 2021 16:20:46 +0000

Moved aliases and some variables from config.fish to exports.sh

Also removed a fish function

Diffstat:
M.config/fish/config.fish | 43++-----------------------------------------
D.config/fish/functions/zip2img.fish | 34----------------------------------
M.local/bin/exports.sh | 41+++++++++++++++++++++++++++++++++++++++++
3 files changed, 43 insertions(+), 75 deletions(-)
diff --git a/.config/fish/config.fish b/.config/fish/config.fish
@@ -7,60 +7,21 @@
 #                         __/ |                  
 #                        |___/                   
 # 
-# Pablo Emilio Escobar Gavíria (C) 2020
-#
+# Pablo (C) 2021
 
 # Sources environment variables
 source "$HOME/.local/bin/exports.sh"
 
 # Configure the PATH variable
-set PATH "/usr/local/sbin" \
-         "/usr/local/bin" \
-         "/usr/sbin" \
-         "/usr/bin" \
-         "/sbin" \
-         "/bin" \
-         "/usr/games" \
-         "/usr/local/games" \
-         "$HOME/.local/bin" \
-         "$CARGO_HOME/bin" \
-         "$GOPATH/bin" \
-         "$DENO_INSTALL/bin" \
-         "/usr/local/wabt/bin" \
-         "$XDG_DATA_HOME/gap-4.11.0" \
-         "$XDG_DATA_HOME/emsdk" \
-         "$XDG_DATA_HOME/npm/bin" \
-         "$XDG_DATA_HOME/emsdk/upstream/emscripten" \
-         "$XDG_DATA_HOME/mitra" \
-         "$XDG_DATA_HOME/tmux" \
-         "$XDG_DATA_HOME/julia-1.5.3/bin" \
-         "$XDG_DATA_HOME/fzf/bin" \
+set PATH $PATH \
          /usr/local/share/*/{include,bin,lib}
 
-# Configure the MANPATH variable
-set MANPATH "/usr/share/man" \
-            "/usr/local/man" \
-            "$XDG_DATA_HOME/man" \
-            "$XDG_DATA_HOME/fzf/man" \
-
 # Abbreviations
 abbr vim     'nvim'
 abbr sc      'sc-im'
 abbr weather 'curl https://wttr.in/'
 abbr mutt    'neomutt'
 
-# Aliases
-alias canto      'canto-curses'
-alias less       'less -Rf'
-alias wget       'wget --hsts-file="$XDG_CACHE_HOME/wget-hsts"'
-alias gdb        'gdb -nh -x "$XDG_CONFIG_HOME/gdb/init"'
-alias weechat    'weechat -d "$XDG_CONFIG_HOME/weechat"'
-alias lynx       'lynx -cfg="$XDG_CONFIG_HOME/lynx/lynx.cfg"'
-alias git        'env TZ=-0000 git' # Hide my timezone when commiting
-alias abook      'abook --config "$XDG_CONFIG_HOME"/abook/abookrc --datafile "$XDG_DATA_HOME"/abook/addressbook'
-alias neomutt    'env TZ=-0000 torify neomutt' # Make neomutt stealthy
-alias impressive 'impressive --transition None -C ~/Pictures/Cursors/Laser\ Beam\ Normal.cur'
-
 function fish_greeting
     set_color yellow
     fortune | cowsay -f none
diff --git a/.config/fish/functions/zip2img.fish b/.config/fish/functions/zip2img.fish
@@ -1,34 +0,0 @@
-#      _        _____ _                 
-#     (_)      / __  (_)                
-#  _____ _ __  `' / /'_ _ __ ___   __ _ 
-# |_  / | '_ \   / / | | '_ ` _ \ / _` |
-#  / /| | |_) |./ /__| | | | | | | (_| |
-# /___|_| .__/ \_____/_|_| |_| |_|\__, |
-#       | |                        __/ |
-#       |_|                       |___/ 
-#
-# Converts ZIP archives to MS-DOS compatible disk images (virtual floppies)
-#
-# Pablo (C) 2020
-
-function zip2img -a zip img -d "Converts ZIP archives to MS-DOS compatible disk images (virtual floppies)"
-    set dir (mktemp -d)
-
-    if test -z "$img"
-      set fname (echo "$zip" | sed 's/\.[^.]*$//g')
-      set fdir (dirname "$zip")
-      set img "$fdir/$fname.img"
-    end
-
-    # Extract the contents of the archive to a temporary directory
-    unzip "$zip" -d "$dir/"
-
-    # Create the disk image and copy the contents of the archive to it
-    dd if=/dev/zero of="$img" count=1440 bs=1k
-    /sbin/mkfs.msdos "$img"
-    mcopy -i "$img" "$dir/"* ::/
-   
-    # Delete the temporary directory
-    rm "$dir/" -rf
-end
-
diff --git a/.local/bin/exports.sh b/.local/bin/exports.sh
@@ -16,6 +16,47 @@ export XDG_CONFIG_HOME="$HOME/.config"
 export XDG_CACHE_HOME="$HOME/.cache"
 export XDG_DATA_HOME="$HOME/.local/share"
 
+# Configure the PATH variable
+export PATH="/usr/local/sbin" 
+export PATH="$PATH:/usr/local/bin" 
+export PATH="$PATH:/usr/sbin" 
+export PATH="$PATH:/usr/bin" 
+export PATH="$PATH:/sbin" 
+export PATH="$PATH:/bin" 
+export PATH="$PATH:/usr/games" 
+export PATH="$PATH:/usr/local/games" 
+export PATH="$PATH:$HOME/.local/bin" 
+export PATH="$PATH:$CARGO_HOME/bin" 
+export PATH="$PATH:$GOPATH/bin" 
+export PATH="$PATH:$DENO_INSTALL/bin" 
+export PATH="$PATH:/usr/local/wabt/bin" 
+export PATH="$PATH:$XDG_DATA_HOME/gap-4.11.0" 
+export PATH="$PATH:$XDG_DATA_HOME/emsdk" 
+export PATH="$PATH:$XDG_DATA_HOME/npm/bin" 
+export PATH="$PATH:$XDG_DATA_HOME/emsdk/upstream/emscripten" 
+export PATH="$PATH:$XDG_DATA_HOME/mitra" 
+export PATH="$PATH:$XDG_DATA_HOME/tmux" 
+export PATH="$PATH:$XDG_DATA_HOME/julia-1.5.3/bin" 
+export PATH="$PATH:$XDG_DATA_HOME/fzf/bin" 
+
+# Configure the MANPATH variable
+export MANPATH="/usr/share/man"
+export MANPATH="$MANPATH:/usr/local/man"
+export MANPATH="$MANPATH:$XDG_DATA_HOME/man"
+export MANPATH="$MANPATH:$XDG_DATA_HOME/fzf/man"
+
+# Aliases
+alias canto='canto-curses'
+alias less='less -Rf'
+alias wget='wget --hsts-file="$XDG_CACHE_HOME/wget-hsts"'
+alias gdb='gdb -nh -x "$XDG_CONFIG_HOME/gdb/init"'
+alias weechat='weechat -d "$XDG_CONFIG_HOME/weechat"'
+alias lynx='lynx -cfg="$XDG_CONFIG_HOME/lynx/lynx.cfg"'
+alias git='env TZ=-0000 git' # Hide my timezone when commiting
+alias abook='abook --config "$XDG_CONFIG_HOME"/abook/abookrc --datafile "$XDG_DATA_HOME"/abook/addressbook'
+alias neomutt='env TZ=-0000 torify neomutt' # Make neomutt stealthy
+alias impressive='impressive --transition None -C ~/Pictures/Cursors/Laser\ Beam\ Normal.cur'
+
 # =========================== Programming Languages ==========================
 # Rust
 export CARGO_HOME="$XDG_DATA_HOME/cargo"