From a00532206110afe233483a55c392b883c0d7ec61 Mon Sep 17 00:00:00 2001 From: Amin Bandali Date: Fri, 29 Nov 2024 07:27:38 -0500 Subject: Various updates --- .bashrc | 57 ++++++++++++++++++++++++++++++++------------------ .config/foot/foot.ini | 2 +- .config/mpv/input.conf | 1 + .emacs.d/init.el | 13 ++++++++++++ 4 files changed, 52 insertions(+), 21 deletions(-) diff --git a/.bashrc b/.bashrc index 7addfca..b725d67 100644 --- a/.bashrc +++ b/.bashrc @@ -28,26 +28,43 @@ if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then debian_chroot=$(cat /etc/debian_chroot) fi -b_prompt() { - case $TERM in - xterm*) - local TITLEBAR="\[\033]0;${debian_chroot:+($debian_chroot) }\h:\w\007\]" - ;; - *) - local TITLEBAR='' - ;; - esac - - PS1="${TITLEBAR}\ -$([ $(id -u) = "0" ] && printf "\[\e[1;31m\]")\ -: ${debian_chroot:+($debian_chroot) }\ -\h:\w\ -$([ -n "$GUIX_ENVIRONMENT" ] && printf " [env]")\ - ;\ -$([ $(id -u) = "0" ] && printf "\[\e[00m\]")\ - " -} -b_prompt +# Set a fancy prompt (non-color, unless we know we "want" color). +case "$TERM" in + xterm-color|*-256color) color_prompt=yes;; +esac + +# Uncomment for a colored prompt, if the terminal has the capability; +# turned off by default to not distract the user: the focus in a +# terminal window should be on the output of commands, not on the +# prompt. +# force_color_prompt=yes + +if [ -n "$force_color_prompt" ]; then + if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then + # We have color support; assume it's compliant with Ecma-48 + # (ISO/IEC-6429). (Lack of such support is extremely rare, and + # such a case would tend to support setf rather than setaf.) + color_prompt=yes + else + color_prompt= + fi +fi + +if [ "$color_prompt" = yes ]; then + PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ ' +else + PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ ' +fi +unset color_prompt force_color_prompt + +# Set the title to user@host:dir for some terminal emulators. +case "$TERM" in + xterm*|rxvt*|foot*) + PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h:\w\a\]$PS1" + ;; + *) + ;; +esac # cursor # ------ diff --git a/.config/foot/foot.ini b/.config/foot/foot.ini index b9c9c83..df361ca 100644 --- a/.config/foot/foot.ini +++ b/.config/foot/foot.ini @@ -9,7 +9,7 @@ term=xterm-256color # title=foot # locked-title=no -font=Source Code Pro Medium:size=10.5, Noto Color Emoji:size=10.5 +font=Source Code Pro Medium:size=10.5, Apple Color Emoji:size=10.5 # font=monospace:size=8 # font-bold= # font-italic= diff --git a/.config/mpv/input.conf b/.config/mpv/input.conf index 8d8a3c2..668e80d 100644 --- a/.config/mpv/input.conf +++ b/.config/mpv/input.conf @@ -1,2 +1,3 @@ i show-text ${video-bitrate} 5000 +D cycle-values play-dir - + M vf toggle hflip diff --git a/.emacs.d/init.el b/.emacs.d/init.el index 97f515e..07e91c5 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -303,6 +303,10 @@ plain variables. This means that `setopt' will execute any (when (display-graphic-p) (set-fontset-font t 'arabic "Sahel WOL") + (let ((emoji-font "Apple Color Emoji")) + (when (member emoji-font (font-family-list)) + (set-fontset-font + t 'emoji `(,emoji-font . "iso10646-1") nil 'prepend))) (with-eval-after-load 'faces (let ((grey "#e7e7e7")) (set-face-attribute 'default nil @@ -895,6 +899,15 @@ around if needed." (with-eval-after-load 'mule-cmds (setopt default-input-method "farsi-isiri-9147")) +(with-eval-after-load 'tramp + (tramp-set-completion-function + "ssh" + (append (tramp-get-completion-function "ssh") + (mapcar (lambda (file) `(tramp-parse-sconfig ,file)) + (directory-files + "~/.ssh/config.d/" + 'full directory-files-no-dot-files-regexp))))) + ;;; Email -- cgit v1.2.3-60-g2f50