From 8ed7a7d3fd21496dce8682953b11ed1d72ea5fe3 Mon Sep 17 00:00:00 2001 From: Marius Peter Date: Sun, 15 Aug 2021 19:12:53 -0700 Subject: bashrc --- bashrc.org | 131 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 131 insertions(+) create mode 100644 bashrc.org diff --git a/bashrc.org b/bashrc.org new file mode 100644 index 0000000..053bbab --- /dev/null +++ b/bashrc.org @@ -0,0 +1,131 @@ +# -*- mode: org; -*- + +#+TITLE: ~.bashrc~ configuration file +#+AUTHOR: Marius Peter +#+DATE: <2021-08-15 Sun> + +#+PROPERTY: header-args :tangle "~/.bashrc" +#+PROPERTY: header-args+ :shebang "#!/usr/bin/env bash" + +#+SETUPFILE: ~/.emacs.d/templates/documents/gnu-default.setup +#+INCLUDE: ~/.emacs.d/templates/documents/default-title.org + + +* Early setup + +If not running interactively, don't do anything. + +#+BEGIN_SRC shell + [[ $- != *i* ]] && return +#+END_SRC + + +* Environment variables + + +** CLI editor + +#+BEGIN_SRC shell + export EDITOR="nvim" +#+END_SRC + + +** GUI editor + +#+BEGIN_SRC shell + export VISUAL="emacsclient -nc -a emacs" +#+END_SRC + + +** Alternate editor + +#+BEGIN_SRC shell + export ALTERNATE_EDITOR="" +#+END_SRC + + +** Terminal + +#+BEGIN_SRC shell + export TERMINAL="xfce4-terminal" +#+END_SRC + +This ensures ~plank~ dock doesn't complain about not finding a +session type. + +#+BEGIN_SRC shell + export XDG_SESSION_TYPE=x11 +#+END_SRC + + +** Path + +Find executables stored in home directory. + +#+BEGIN_SRC shell + export PATH=${PATH}:${HOME}/bin +#+END_SRC + + +* Bash prompt + +#+BEGIN_SRC shell + PS1='[\u@\h \W]\$ ' +#+END_SRC + + +* Aliases + + +** List + +#+BEGIN_SRC shell + alias ls='ls --color=auto' + alias l='ls -l' + alias ll='ls -la' +#+END_SRC + + +** Trash + +#+BEGIN_SRC shell + alias tr='trash' +#+END_SRC + + +** Password manager + +#+BEGIN_SRC shell + alias pm='passmenu' +#+END_SRC + + +** Editors + +#+BEGIN_SRC shell + alias nv='nvim' + alias ec='emacsclient -nc -s main' +#+END_SRC + + +* Emacs client + +#+BEGIN_SRC shell + function ec() { + emacsclient -nc -s main "$@" + } + export -f ec +#+END_SRC + + +* ~Qt~ apps scaling + +This is particularly useful for ~lmms~. + +#+BEGIN_SRC shell + + export QT_SCALE_FACTOR=1.2 + export QT_AUTO_SCREEN_SCALE_FACTOR=0 + export QT_SCREEN_SCALE_FACTORS=1 + export QT_DEVICE_PIXEL_RATIO=1 +#+END_SRC -- cgit v1.2.3