Chapter 9.  Konsole & shell

  1. Load config files

    xterm &

    Note

    Sometimes it seems like config files will only be kept if the copying occurs with Konsole closed (i.e., use xterm or console instead of Konsole, and make sure all konsole processes are closed.). If that fails, the key settings are in both Edit Profile and Configure Konsole.

    Close all instances of Konsole

    Copy files cp ~/Dropbox/Basic/new_machine/linux/kde/konsolerc ~/.config/ mkdir ~/.local/share/konsole cp ~/Dropbox/Basic/new_machine/linux/kde/S\'s\ Konsole\ Profile.profile ~/.local/share/konsole

  2. Configure Konsole

    Always Show Tab Bar

  3. Configure Profile

    1. Solarized

    2. 14 pt Quadraat Sans Mono

    3. Set Unlimited Scrollbar, Hidden

    4. hide Menubar

    5. Uncheck Show Menubar by default

  4. Configure shells

    Copy the files. cp ~/Dropbox/Basic/new_machine/linux/misc/.bash_aliases ~/Dropbox/Basic/new_machine/linux/misc/.bashrc ~/

    Note

    ~/.bashrc source

    # ~/.bashrc: executed by bash(1) for non-login shells.
    # see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
    # for examples
    
    # If not running interactively, don't do anything
    case $- in
        *i*) ;;
          *) return;;
    esac
    
    # don't put duplicate lines or lines starting with space in the history.
    # See bash(1) for more options
    HISTCONTROL=ignoreboth
    
    # append to the history file, don't overwrite it
    shopt -s histappend
    
    # for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
    HISTSIZE=1000
    HISTFILESIZE=2000
    
    # check the window size after each command and, if necessary,
    # update the values of LINES and COLUMNS.
    shopt -s checkwinsize
    
    # make less more friendly for non-text input files, see lesspipe(1)
    [ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
    
    # set variable identifying the chroot you work in (used in the prompt below)
    if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then
        debian_chroot=$(cat /etc/debian_chroot)
    fi
    
    # Alias definitions.
    # You may want to put all your additions into a separate file like
    # ~/.bash_aliases, instead of adding them here directly.
    # See /usr/share/doc/bash-doc/examples in the bash-doc package.
    
    if [ -f ~/.bash_aliases ]; then
        . ~/.bash_aliases
    fi
    
    # enable programmable completion features (you don't need to enable
    # this, if it's already enabled in /etc/bash.bashrc and /etc/profile
    # sources /etc/bash.bashrc).
    if ! shopt -oq posix; then
      if [ -f /usr/share/bash-completion/bash_completion ]; then
        . /usr/share/bash-completion/bash_completion
      elif [ -f /etc/bash_completion ]; then
        . /etc/bash_completion
      fi
    fi
    
    # CUSTOMIZATION
    export PYTHONBREAKPOINT='ipdb.set_trace'
    export EDITOR=emacs
    export PATH=$PATH:~/bin:~/Personal/workspace/bin:
    tty -s && export PS1="\t \u@\h:\w\\$ \[$(tput sgr0)\]"
    umask=0002
    

    ~/.bash_aliases source

    # Package Management
    alias aptls='dpkg-query -L'      # list all files in package
    alias aptop='dpkg -l | grep'     # list local status of all packages matching <string>
    alias ass='apt search'           # Search repositories for <string>
    alias ash='apt show'             # Show package info for package named <string>
    alias asshas='echo "dont know how"'     # Show all packages in repository that contain a filename that contains <string>
    alias aptapt="apt update && apt upgrade -y && apt autoremove -y && pkcon update"
    
    alias ..='cd ..'
    alias ...='cd ../../../'
    alias ....='cd ../../../../'
    alias .4='cd ../../../../'
    alias .....='cd ../../../../../'
    alias .5='cd ../../../../../'
    
    alias cp='cp --interactive' # ask before clobbering
    
    alias df='duf'
    
    alias diff='delta'
    
    alias duh='dust -d 1'
    alias duhh='dust -d 2'
    
    alias e='emacs'
    alias elast='emacs $(!!)'
    alias enw='emacs -nw'
    
    alias gimp=~/Downloads/GIMP-3.0.2-x86_64.AppImage 
    
    alias gq='geeqie'
    
    alias grep='rg -S'
    alias grepnocomment='rg ^[^#]' 
    
    alias h=history
    alias hig='history | grep '
    
    alias man='man --pager="less -FX"'
    alias less='less --quit-if-one-screen --no-init'
    alias more='less'
    
    alias exa='exa   --all --binary --changed --group --header --long --time-style=long-iso --tree'
    alias l='exa     --level=1 --sort=changed'
    alias ll='exa    --level=2 --sort=changed'
    alias lll='exa   --level=3 --sort=changed'
    alias llll='exa  --tree --level=4 --sort=changed'
    alias lss='exa   --level=1 --sort=size'
    alias lnn='exa   --level=1 --sort=name'
    
    alias ld="l ~/Downloads/"
    
    # if exa isn't installed:
    #alias l=ls\ -alrt\ --block-size="\'1"
    #alias lss=ls\ -alrS\ --block-size="\'1"
    #alias lnn=ls\ -aln\ --block-size="\'1"
    
    alias m='mpv --fs --osd-level=0'
    alias mountt='mount |column -t'
    alias mv='mv -i'
    
    # Maybe these can be done better with procs but not trivially, and these work already
    alias pf='ps auxf' 
    alias pg='ps aux | grep'
    
    # procs isn't backwards-compatible with ps, so don't use it as such.
    alias prf='procs --tree'
    alias prg='procs --tree | rg'
    
    alias tx='tar xzvf'   # gzip
    alias tj='tar xjvf'   # bzip2
    alias tJ='tar xJvf'   # xz
    
    woo() {
    	  whois "$1" | grep Creation
    }
    
  5. Repeat for root

    cp ~/Dropbox/Basic/new_machine/linux/misc/.bash_aliases ~/Dropbox/Basic/new_machine/linux/misc/.bashrc /root/

    Repeat for skel. cp ~/Dropbox/Basic/new_machine/linux/misc/.bash_aliases ~/Dropbox/Basic/new_machine/linux/misc/.bashrc /etc/skel/