Skip to content

Instantly share code, notes, and snippets.

@fredcamps
Last active April 19, 2024 04:31
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fredcamps/11fc6cc5f08238a98bb95e9fb012748a to your computer and use it in GitHub Desktop.
Save fredcamps/11fc6cc5f08238a98bb95e9fb012748a to your computer and use it in GitHub Desktop.
my dot files *main*.... run 'tic -x -o .terminfo ~/.xterm-24bit-terminfo.src' for load 24bit terminal colors
alias zshenv="${EDITOR} ~/.zshenv"
alias zshrc="${EDITOR} ~/.zshrc"
alias zprofile="${EDITOR} ~/.zprofile"
alias zaliases="${EDITOR} ~/.aliases"
alias terminalrc="${EDITOR} ~/.config/xfce4/terminal/terminalrc"
alias e="${EDITOR} "
alias esudo="sudo -e ${EDITOR}"
-- vim: ts=4 sw=4 noet ai cindent syntax=lua
--[[
Conky, a system monitor, based on torsmo
Any original torsmo code is licensed under the BSD license
All code written since the fork of torsmo is licensed under the GPL
Please see COPYING for details
Copyright (c) 2004, Hannu Saransaari and Lauri Hakkarainen
Copyright (c) 2005-2012 Brenden Matthews, Philip Kovacs, et. al. (see AUTHORS)
All rights reserved.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
]]
conky.config = {
--Position
alignment = 'top_right',
gap_x = 10,
gap_y = 10,
minimum_height = 500,
minimum_width = 250,
--Window
background = false,
border_width = 1,
default_color = 'white',
default_outline_color = 'white',
default_shade_color = 'white',
draw_borders = false,
draw_graph_borders = true,
draw_outline = false,
draw_shades = false,
own_window = true,
own_window_class = 'Conky',
own_window_type = 'desktop',
own_window_hints = 'undecorated,below,sticky,skip_taskbar,skip_pager',
own_window_transparent = false,
own_window_argb_visual = false,
own_window_argb_value = 100,
own_window_colour = '000000',
stippled_borders = 0,
update_interval = 2.0,
--Fonts
font = 'DejaVu Sans Mono:size=12',
use_xft = true,
uppercase = false,
use_spacer = 'none',
-- Others
cpu_avg_samples = 2,
net_avg_samples = 2,
no_buffers = true,
out_to_console = false,
out_to_stderr = false,
show_graph_scale = false,
show_graph_range = false,
extra_newline = false
}
conky.text = [[
# machine and user info
${exec whoami}@${color}$nodename
${color grey}$sysname: ${color}${kernel}
${color grey}Arch: ${color}${machine}
# CPU+RAM stats
${color grey}Uptime:$color $uptime
${color grey}RAM:$color $mem/$memmax - $memperc%
${color grey}${membar 5,280}
${color grey}Swap:$color $swap/$swapmax - $swapperc%
${color grey}${swapbar 5,280}
#${color grey}GPU Temperature: ${color}${exec sensors | grep -i temp1 | tail -n1 | awk '{ print $2}'}
${color grey}HDD Temperature: ${color}${exec hddtemp /dev/sda | awk '{print $4}'}
${color grey}CPU Usage:$color $cpu% $freq mhz
${color grey}${cpubar 5,280}
${color grey}${cpugraph cpu1 15, 170} ${color}${cpu cpu1}% ${exec sensors|grep 'Core 0'|awk '{print $3}'}
${color grey}${cpugraph cpu2 15, 170} ${color}${cpu cpu1}% ${exec sensors|grep 'Core 1'|awk '{print $3}'}
${color grey}${cpugraph cpu3 15, 170} ${color}${cpu cpu1}% ${exec sensors|grep 'Core 2'|awk '{print $3}'}
${color grey}${cpugraph cpu4 15, 170} ${color}${cpu cpu1}% ${exec sensors|grep 'Core 3'|awk '{print $3}'}
${color grey}$hr
# disk/filesystem stats
${color grey}File Systems
root: ${fs_bar 10,220 /}
home: ${fs_bar 10,220 /home}
${color grey}I/O: ${diskiograph /dev/sda 15,230}
${color grey}$hr
# network stats
${color grey}Networking
${color grey}Upload:$color ${upspeed wlp3s0} / ${totalup wlp3s0}
${color grey}Download:$color ${downspeed wlp3s0} / ${totaldown wlp3s0}
${color grey}$hr
${color grey}Top Processes
${color}${top name 1}${top pid 1}${top cpu 1}%
${color}${top name 2}${top pid 2}${top cpu 2}%
${color}${top name 3}${top pid 3}${top cpu 3}%
${color}${top name 4}${top pid 4}${top cpu 4}%
${color grey}$hr
${color grey}Top Memory
${color}${top_mem name 1}${top_mem pid 1}${top mem 1}%
${color}${top_mem name 2}${top_mem pid 2}${top mem 2}%
${color}${top_mem name 3}${top_mem pid 3}${top mem 3}%
${color}${top_mem name 4}${top_mem pid 4}${top mem 4}%
]]
<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
<match target="font">
<edit mode="assign" name="rgba">
<const>rgb</const>
</edit>
</match>
<match target="font">
<edit mode="assign" name="hinting">
<bool>true</bool>
</edit>
</match>
<match target="font">
<edit mode="assign" name="hintstyle">
<const>hintslight</const>
</edit>
</match>
<match target="font">
<edit mode="assign" name="antialias">
<bool>true</bool>
</edit>
</match>
<match target="font">
<edit mode="assign" name="lcdfilter">
<const>lcddefault</const>
</edit>
</match>
</fontconfig>
[github]
user = fredcamps
[user]
name = Fred Campos
email = mail2frede@gmail.com
[alias]
st = status
ci = commit
co = checkout
[color]
ui = true
[core]
editor = emacsclient -t
whitespace = trailing-space,space-before-tab
excludesFile = ~/.gitignore-global
fsmonitor = true
untrackedCache = true
[color "branch"]
current = yellow bold
local = green bold
remote = cyan bold
[color "diff"]
meta = yellow bold
frag = magenta bold
old = red bold
new = green bold
whitespace = red reverse
[color "status"]
added = green bold
changed = yellow bold
untracked = red ul
[push]
default = current
[pull]
default = current
[mergetool "emerge"]
cmd = emacsclient -t $MERGED
[merge]
tool = emerge
*~
*\#*
*.lock
.tern*
.dir-locals.el
.markdown-preview.html
*.bkp
.project
*.swp
*.orig
*_BASE_*
*_REMOTE_*
*_LOCAL_*
GPATH
GPATHS
GRTAGS
GTAGS
# Use colon separators.# Use colon separators.
screen-24bit|screen with 24-bit direct color mode,
use=screen-256color,
setb24=\E[48:2:%p1%{65536}%/%d:%p1%{256}%/%{255}%&%d:%p1%{255}%&%dm,
setf24=\E[38:2:%p1%{65536}%/%d:%p1%{256}%/%{255}%&%d:%p1%{255}%&%dm,
# Use semicolon separators.
screen-24bits|screen with 24-bit direct color mode,
use=screen-256color,
setb24=\E[48;2;%p1%{65536}%/%d;%p1%{256}%/%{255}%&%d;%p1%{255}%&%dm,
setf24=\E[38;2;%p1%{65536}%/%d;%p1%{256}%/%{255}%&%d;%p1%{255}%&%dm,
# charset utf-8
#
# xterm keys compatibility
set-window-option -g xterm-keys on
# fix home/end key issues
bind -n End send-key C-e
bind -n Home send-key C-a
# prefix settings
unbind C-b
set -g prefix C-a
bind-key C-a send-prefix
set -g base-index 1
set -g repeat-time 1000
# history limit
set -g history-limit 1000
# clipboard
set -g set-clipboard on
# key bindings
## panes -----------------------------------------------------------------------
bind M-f resize-pane -R 5
bind M-b resize-pane -L 5
bind M-n resize-pane -D 5
bind M-p resize-pane -U 5
bind P select-pane -U
bind B select-pane -L
bind F select-pane -R
bind N select-pane -D
bind k setw synchronize-panes
bind C-x confirm-before -p "kill-pane #P? (y/n)" kill-pane
bind Space next-layout
## windows ---------------------------------------------------------------------
bind w list-windows
bind p previous-window
bind n next-window
bind f command-prompt "find-window '%%'"
bind C-t new-window
bind c new-window
bind C-w confirm-before -p "kill-window #W? (y/n)" kill-window
bind h split-window -v
bind v split-window -h
bind l last-window
## sessions --------------------------------------------------------------------
bind C-q confirm-before -p "kill-session #S? (y/n)" kill-session
bind d confirm-before -p "detach-session #S? (y/n)" detach-client
## misc ------------------------------------------------------------------------
bind M-r source-file ~/.tmux.conf \; display ".tmux.conf reloaded!"
bind b list-keys
bind t clock-mode
# windows title options
set-window-option -g automatic-rename on
set-option -g set-titles off
set-option -g allow-rename on
# emacs-mode
setw -g mode-keys emacs
set -g status-key emacs
bind [ copy-mode
bind -T copy-mode C-Space send -X begin-selection
bind -T copy-mode Space send -X rectangle-toggle
bind -T copy-mode x send -X rectangle-toggle
bind -T copy-mode M-w send -X copy-pipe-and-cancel 'xclip -in -selection clipboard'
bind -T copy-mode C-e send -X end-of-line
bind -T copy-mode C-a send -X start-of-line
bind -T copy-mode M-f send -X next-word-end
bind -T copy-mode M-b send -X previous-word
bind ] paste-buffer
# monitor activity
setw -g monitor-activity on
set -g visual-activity on
# mouse
setw -g mouse off
# terminal style
set -sa terminal-overrides ",xterm*:Tc:smcup@:rmcup@"
set -g default-terminal "screen-24bits"
# plugins
set -g @tpm_plugins " \
tmux-plugins/tpm \
tmux-plugins/tmux-prefix-highlight \
tmux-plugins/tmux-copycat \
tmux-plugins/tmux-yank \
tmux-plugins/tmux-open \
tmux-plugins/tmux-resurrect \
tmux-plugins/tmux-continuum \
schasse/tmux-jump \
soyuka/tmux-current-pane-hostname \
"
# plugins conf
## tmux-jump -------------------------------------------------------------------
set -g @jump-key 'j'
## tmux-ressurect --------------------------------------------------------------
set -g @resurrect-capture-pane-contents 'on'
## tmux-continuum --------------------------------------------------------------
set -q @continuum-restore 'on'
## tmux-prefix-highlight -------------------------------------------------------
set -g @prefix_highlight_show_copy_mode 'on'
set -g @prefix_highlight_show_sync_mode 'on'
set -g @prefix_highlight_copy_mode_attr 'fg=white,bg=blue'
set -g @prefix_highlight_sync_mode_attr 'fg=white,bg=blue'
# THEME
## status-line position --------------------------------------------------------
set -g status-position bottom # statusbar position
set -g status-justify left
set -g window-status-current-style bold
## set status bar --------------------------------------------------------------
set -g status-style bg=default
setw -g window-status-current-style bg="#282a2e"
setw -g window-status-current-style fg="#81a2be"
## highlight active window -----------------------------------------------------
setw -g window-style 'bg=#282a2e'
setw -g window-active-style 'bg=#1d1f21'
setw -g pane-active-border-style ''
## highlight activity in status bar --------------------------------------------
setw -g window-status-activity-style fg="#8abeb7"
setw -g window-status-activity-style bg="#1d1f21"
## pane border and colors ------------------------------------------------------
set -g pane-active-border-style bg=default
set -g pane-active-border-style fg="#373b41"
set -g pane-border-style bg=default
set -g pane-border-style fg="#373b41"
## clock colours ---------------------------------------------------------------
set -g clock-mode-colour "#81a2be"
set -g clock-mode-style 24
## message colours -------------------------------------------------------------
set -g message-style bg="#8abeb7"
set -g message-style fg="#000000"
## message command colours -----------------------------------------------------
set -g message-command-style bg="#8abeb7"
set -g message-command-style fg="#000000"
## message bar or "prompt" -----------------------------------------------------
set -g message-style bg="#2d2d2d"
set -g message-style fg="#cc99cc"
## modestyle -------------------------------------------------------------------
set -g mode-style bg="#1d1f21"
set -g mode-style fg="#de935f"
## left side status hold [session-number]|window-number| -----------------------
set -g status-left "#[fg=#000,bg=#2d2d2d][#S] "
## right side of status bar holds "host@hostname time" ----------------------
set -g status-right-length 100
set -g status-right-style fg=black
set -g status-right-style bold
set -g status-right '#[fg=#000,bg=#2d2d2d] #{prefix_highlight} #U@#H %H:%M '
## make background window look like white tab ----------------------------------
set-window-option -g window-status-style bg=default
set-window-option -g window-status-style fg=white
set-window-option -g window-status-style none
set-window-option -g window-status-format '#[fg=#6699cc,bg=colour235] #I #[fg=#999999,bg=#2d2d2d] #W #[default]'
## make foreground window look like bold yellow foreground tab -----------------
set-window-option -g window-status-current-style none
set-window-option -g window-status-current-format '#[fg=#f99157,bg=#2d2d2d] #I #[fg=#cccccc,bg=#393939] #W #[default]'
## active terminal yellow border, non-active white -----------------------------
set -g pane-border-style bg=default
set -g pane-border-style fg="#999999"
set -g pane-active-border-style fg="#f99157"
## set copy-mode colors --------------------------------------------------------
setw -g mode-style "fg=#4b51ab,bg=#0a1080"
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run -b '~/.tmux/plugins/tpm/tpm'
if [[ "$INSIDE_EMACS" = 'vterm' ]]; then
alias clear='vterm_printf "51;Evterm-clear-scrollback";tput clear'
vterm_printf() {
if [ -n "$TMUX" ] && ([ "${TERM%%-*}" = "tmux" ] || [ "${TERM%%-*}" = "screen" ] ); then
# Tell tmux to pass the escape sequences through
printf "\ePtmux;\e\e]%s\007\e\\" "$1"
elif [ "${TERM%%-*}" = "screen" ]; then
# GNU screen (screen, screen-256color, screen-256color-bce)
printf "\eP\e]%s\007\e\\" "$1"
else
printf "\e]%s\e\\" "$1"
fi
}
vterm_cmd() {
local vterm_elisp
vterm_elisp=""
while [ $# -gt 0 ]; do
vterm_elisp="$vterm_elisp""$(printf '"%s" ' "$(printf "%s" "$1" | sed -e 's|\\|\\\\|g' -e 's|"|\\"|g')")"
shift
done
vterm_printf "51;E$vterm_elisp"
}
find_file() {
vterm_cmd find-file "$(realpath "${@:-.}")"
}
say() {
vterm_cmd message "%s" "$*"
}
vterm_open() {
vterm_cmd find-file "$(realpath "${@:-.}")"
}
vterm_prompt_end() {
vterm_printf "51;A$(whoami)@$(hostname):$(pwd)";
}
setopt PROMPT_SUBST
PROMPT=$PROMPT'%{$(vterm_prompt_end)%}'
EDITOR=vterm_open
alias emacs=vterm_open
alias emacsclient=vterm_open
fi
!font settings
xscreensaver.Dialog.headingFont: -*-dina-bold-r-*-*-12-*-*-*-*-*-*-*
xscreensaver.Dialog.bodyFont: -*-dina-medium-r-*-*-12-*-*-*-*-*-*-*
xscreensaver.Dialog.labelFont: -*-dina-medium-r-*-*-12-*-*-*-*-*-*-*
xscreensaver.Dialog.unameFont: -*-dina-medium-r-*-*-12-*-*-*-*-*-*-*
xscreensaver.Dialog.buttonFont: -*-dina-bold-r-*-*-12-*-*-*-*-*-*-*
xscreensaver.Dialog.dateFont: -*-dina-medium-r-*-*-12-*-*-*-*-*-*-*
xscreensaver.passwd.passwdFont: -*-dina-bold-r-*-*-12-*-*-*-*-*-*-*
!general dialog box (affects main hostname, username, password text)
xscreensaver.Dialog.foreground: #ffffff
xscreensaver.Dialog.background: #111111
xscreensaver.Dialog.topShadowColor: #111111
xscreensaver.Dialog.bottomShadowColor: #111111
xscreensaver.Dialog.Button.foreground: #666666
xscreensaver.Dialog.Button.background: #ffffff
!username/password input box and date text colour
xscreensaver.Dialog.text.foreground: #666666
xscreensaver.Dialog.text.background: #ffffff
xscreensaver.Dialog.internalBorderWidth:24
xscreensaver.Dialog.borderWidth: 20
xscreensaver.Dialog.shadowThickness: 2
!timeout bar (background is actually determined by Dialog.text.background)
xscreensaver.passwd.thermometer.foreground: #ff0000
xscreensaver.passwd.thermometer.background: #000000
xscreensaver.passwd.thermometer.width: 8
!datestamp format–see the strftime(3) manual page for details
xscreensaver.dateFormat: %I:%M%P %a %b %d, %Y
# Use colon separators.
xterm-24bit|xterm with 24-bit direct color mode,
use=xterm-256color,
setb24=\E[48:2:%p1%{65536}%/%d:%p1%{256}%/%{255}%&%d:%p1%{255}%&%dm,
setf24=\E[38:2:%p1%{65536}%/%d:%p1%{256}%/%{255}%&%d:%p1%{255}%&%dm,
# Use semicolon separators.
xterm-24bits|xterm with 24-bit direct color mode,
use=xterm-256color,
setb24=\E[48;2;%p1%{65536}%/%d;%p1%{256}%/%{255}%&%d;%p1%{255}%&%dm,
setf24=\E[38;2;%p1%{65536}%/%d;%p1%{256}%/%{255}%&%d;%p1%{255}%&%dm,
bindkey "^[[H" beginning-of-line
bindkey "^[[F" end-of-line
# Load asdf
[[ -s "${ASDF_DIR}/asdf.sh" ]] && source "${ASDF_DIR}/asdf.sh"
# Load aliases and inputrc
[ -e "${HOME}/.zinputrc" ] && source "${HOME}/.zinputrc"
[ -e "${HOME}/.aliases" ] && source "${HOME}/.aliases"
# TMUX
[[ ! -z "${TMUX}" ]] && export TERM=screen-24bits
# Direnv setup
[ -e "$(which direnv)" ] && eval "$(direnv hook zsh)"
[ -e "${HOME}/.vterm.zsh" ] && source "${HOME}/.vterm.zsh"
export ZDOTDIR="${HOME}"
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
export TERM=xterm-24bits
export SHELL=/bin/zsh
export ALTERNATE_EDITOR=""
export EDITOR="/usr/bin/emacs"
export SUDO_EDITOR="/usr/bin/emacs"
export VISUAL="/usr/bin/emacs"
export PAGER="less"
export ASDF_DIR="${HOME}/.asdf"
export WORKON_HOME="${HOME}/.local/share/virtualenvs"
export POETRY_VIRTUALENVS_PATH="${HOME}/.local/share/virtualenvs"
export LOCAL_EXEC_PATH="${HOME}/.local/bin"
export PATH="${LOCAL_EXEC_PATH}:${PATH}"
#
# My ZSHRC
#
[ -d "${HOME}/.zgen" ] || git clone https://github.com/tarjoilija/zgen.git "${HOME}/.zgen"
[ -e "${HOME}/.zgen/zgen.zsh" ] && source "${HOME}/.zgen/zgen.zsh"
[ -e "${HOME}/.zprofile" ] && source "${HOME}/.zprofile"
if ! zgen saved; then
zgen oh-my-zsh # Use colon separators.
zgen load zsh-users/zsh-syntax-highlighting
zgen load zsh-users/zsh-history-substring-search
zgen load zsh-users/zsh-completions src
zgen load zsh-users/zsh-autosuggestions
zgen oh-my-zsh plugins/sudo
zgen oh-my-zsh plugins/z
zgen oh-my-zsh plugins/docker
zgen oh-my-zsh plugins/asdf
zgen oh-my-zsh plugins/bgnotify
zgen oh-my-zsh plugins/command-not-found
zgen oh-my-zsh plugins/compleat
zgen oh-my-zsh plugins/git
zgen oh-my-zsh plugins/git-flow
zgen oh-my-zsh plugins/ssh-agent
zgen oh-my-zsh plugins/colored-man-pages
zgen oh-my-zsh plugins/colorize
zgen oh-my-zsh plugins/catimg
zgen oh-my-zsh plugins/themes
zgen oh-my-zsh themes/gentoo
zgen save
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment