mirror of https://github.com/mitchell/dotfiles.git
Add conky config; add alias, global var, binding; update fish scripts
This commit is contained in:
parent
662cf1bcdc
commit
91ebbe8be8
|
@ -0,0 +1,122 @@
|
|||
conky.config ={
|
||||
-- CONKY SETTINGS
|
||||
background = true,
|
||||
update_interval = 1,
|
||||
total_run_times = 0,
|
||||
|
||||
cpu_avg_samples = 2,
|
||||
net_avg_samples = 2,
|
||||
|
||||
override_utf8_locale = true,
|
||||
|
||||
double_buffer = true,
|
||||
no_buffers = true,
|
||||
|
||||
text_buffer_size = 32768,
|
||||
|
||||
-- CONKY: WINDOW SPECIFICATIONS
|
||||
own_window = true,
|
||||
own_window_argb_value = 216,
|
||||
own_window_argb_visual = true,
|
||||
own_window_class = 'conky',
|
||||
own_window_name = 'conky',
|
||||
own_window_colour = '#282828',
|
||||
-- own_window_hints = 'undecorated,below,sticky,skip_taskbar,skip_pager',
|
||||
own_window_transparent = false,
|
||||
own_window_type = 'desktop',
|
||||
|
||||
border_inner_margin = 6,
|
||||
border_width = 5,
|
||||
|
||||
minimum_height = 1000,
|
||||
|
||||
minimum_width = 280,
|
||||
maximum_width = 280,
|
||||
|
||||
alignment = 'top_right',
|
||||
gap_x = 24,
|
||||
gap_y = 60,
|
||||
|
||||
-- GRAPHICS SETTINGS
|
||||
draw_shades = true,
|
||||
draw_outline = false,
|
||||
draw_borders = false,
|
||||
draw_graph_borders = true,
|
||||
|
||||
-- TEXT SETTINGS
|
||||
use_xft = true,
|
||||
font = 'IBM Plex Sans Regular:size=10',
|
||||
xftalpha = 0.2,
|
||||
|
||||
uppercase = false,
|
||||
|
||||
-- Pad percentages to this many decimals (0 = no padding)
|
||||
pad_percents = 2,
|
||||
|
||||
-- COLOUR SETTINGS
|
||||
default_color = 'ebdbb2',
|
||||
default_shade_color = '1d2021',
|
||||
default_outline_color = '1d2021',
|
||||
color1 = 'fbf1c7',
|
||||
color2 = '458588',
|
||||
color3 = '98971a',
|
||||
color4 = '79740e',
|
||||
color5 = '689d6a',
|
||||
color7 = 'cc241d',
|
||||
color8 = '9d0006',
|
||||
};
|
||||
|
||||
|
||||
conky.text = [[
|
||||
${alignc}${font IBM Plex Sans Light:size=10}${time %A %d %B %Y}${font}${alignc}
|
||||
${color1}${hr 2}${color}
|
||||
${voffset -5}
|
||||
${font IBM Plex Sans Light:size=8}${color1}HOSTNAME:${color}${font} ${alignr}$nodename
|
||||
${font IBM Plex Sans Light:size=8}${color1}UPTIME:${color}${font} ${alignr}$uptime_short
|
||||
${font IBM Plex Sans Light:size=8}${color1}KERNEL:${color}${font} ${alignr}$kernel ${voffset 10}
|
||||
${font :size=11}${color}Network ${hr 2}
|
||||
${voffset -15}
|
||||
${font IBM Plex Sans Light:size=10}${color1}IP ADDRESS:${color}${font} ${alignr}${addr br0}${color}
|
||||
${if_match "${addr br0}"!="No Address"}${voffset 5}${font IBM Plex Sans Light:size=10}${font}Download ${alignr}${downspeedf br0}k/s (${totaldown br0})
|
||||
${color1}${downspeedgraph br0 50,280 98971a 79740e -t}${color}
|
||||
${font IBM Plex Sans Light:size=10}${font}Upload ${alignr}${upspeedf br0}k/s (${totalup br0})
|
||||
${color1}${upspeedgraph br0 50,280 9d0006 cc241d -t}${color}
|
||||
${endif}${voffset 5}${font :size=11}${color}HDD ${hr 2}
|
||||
${voffset 5}${color1}Used: ${fs_used /}${goto 175}Free:${goto 225}${fs_free /}${color}
|
||||
${color2}${fs_bar /}${color}
|
||||
${font IBM Plex Sans Light:size=8}${color1}DISK I/O:${color}${font} ${alignr}$diskio
|
||||
${voffset 2}${font IBM Plex Sans Light:size=8}${color1}READ: ${font} ${goto 80}${diskiograph_read 15,210 98971a 79740e 750}${color}
|
||||
${voffset 2}${font IBM Plex Sans Light:size=8}${color1}WRITE:${font} ${goto 80}${diskiograph_write 15,210 9d0006 cc241d 750}${color}
|
||||
${voffset 10}${font :size=11}Memory ${hr 2}${voffset 2}${font}
|
||||
${font IBM Plex Sans Light:size=10}RAM $alignc ${font}${color1}$mem / $memmax $alignr ${color4}$memperc%${color}
|
||||
${color2}$membar${voffset 10}${color}
|
||||
${font :size=11}GPU ${hr 2}${voffset 2}
|
||||
${font IBM Plex Sans Light:size=9}${color1}GPU Freq.: $alignr ${color}${font}${nvidia gpufreq} Mhz${voffset 2}
|
||||
${font IBM Plex Sans Light:size=9}${color1}Memory Freq.: $alignr ${color}${font}${nvidia memfreq} Mhz${voffset 2}
|
||||
${font IBM Plex Sans Light:size=9}${color1}Temperature: $alignr ${color4}${font}${nvidia temp}°C ${voffset 10}${color}
|
||||
${font :size=11}CPUs ${hr 2}
|
||||
${voffset -15}
|
||||
${font IBM Plex Sans Light:size=10}${color1}CPU:${color}${font} ${alignr}AMD Ryzen 7 3800X
|
||||
${voffset -15}
|
||||
${font IBM Plex Sans Light:size=9}${color1}01 - 04:${color}${font} ${goto 100}${cpu cpu1}% ${goto 150}${cpu cpu2 }% ${goto 200}${cpu cpu3 }% ${goto 250}${cpu cpu4 }%
|
||||
${font IBM Plex Sans Light:size=9}${color1}05 - 08:${color}${font} ${goto 100}${cpu cpu5}% ${goto 150}${cpu cpu6 }% ${goto 200}${cpu cpu7 }% ${goto 250}${cpu cpu8 }%
|
||||
${font IBM Plex Sans Light:size=9}${color1}09 - 12:${color}${font} ${goto 100}${cpu cpu9}% ${goto 150}${cpu cpu10}% ${goto 200}${cpu cpu11}% ${goto 250}${cpu cpu12}%
|
||||
${voffset -10}
|
||||
${font IBM Plex Sans Light:size=9}${color1}CPU TEMP:${color4}${font}${alignr}${hwmon 1 temp 1}°C${color}
|
||||
${voffset 10}${font :size=11}Processes ${hr 2}${font}
|
||||
${voffset -15}
|
||||
${font :size=10}${font IBM Plex Sans Light:size=8}${color1}TOTAL:${color}${font} ${alignr}${processes}
|
||||
${voffset -12}
|
||||
${font IBM Plex Sans Light:size=9}${color1}APP NAME: ${goto 160}MEMORY: ${goto 245}CPU: ${color}${font}
|
||||
${voffset -15}
|
||||
${font IBM Plex Sans Light:size=9}${color1}${top_mem name 1} ${color}${font} ${goto 160}${top mem 1} % ${goto 235}${top cpu 1} %
|
||||
${font IBM Plex Sans Light:size=9}${color1}${top_mem name 2} ${color}${font} ${goto 160}${top mem 2} % ${goto 235}${top cpu 2} %
|
||||
${font IBM Plex Sans Light:size=9}${color1}${top_mem name 3} ${color}${font} ${goto 160}${top mem 3} % ${goto 235}${top cpu 3} %
|
||||
${font IBM Plex Sans Light:size=9}${color1}${top_mem name 4} ${color}${font} ${goto 160}${top mem 4} % ${goto 235}${top cpu 4} %
|
||||
${font IBM Plex Sans Light:size=9}${color1}${top_mem name 5} ${color}${font} ${goto 160}${top mem 5} % ${goto 235}${top cpu 5} %
|
||||
${font IBM Plex Sans Light:size=9}${color1}${top_mem name 6} ${color}${font} ${goto 160}${top mem 6} % ${goto 235}${top cpu 6} %
|
||||
${font IBM Plex Sans Light:size=9}${color1}${top_mem name 7} ${color}${font} ${goto 160}${top mem 7} % ${goto 235}${top cpu 7} %
|
||||
${font IBM Plex Sans Light:size=9}${color1}${top_mem name 8} ${color}${font} ${goto 160}${top mem 8} % ${goto 235}${top cpu 8} %
|
||||
${font IBM Plex Sans Light:size=9}${color1}${top_mem name 9} ${color}${font} ${goto 160}${top mem 9} % ${goto 235}${top cpu 9} %
|
||||
${font IBM Plex Sans Light:size=9}${color1}${top_mem name 10} ${color}${font} ${goto 160}${top mem 10} % ${goto 235}${top cpu 10} %
|
||||
]];
|
|
@ -2,6 +2,7 @@ function define_aliases -a uname -d 'Defines aliases for commonly used commands'
|
|||
alias rcp 'rsync -aP'
|
||||
alias vg 'vagrant'
|
||||
alias tf 'terraform'
|
||||
alias gco 'gcloud compute'
|
||||
alias tocb 'xclip -in -selection clipboard'
|
||||
alias fromcb 'xclip -out -selection clipboard'
|
||||
alias ssh-rm 'ssh-keygen -f ~/.ssh/known_hosts -R'
|
||||
|
|
|
@ -6,6 +6,7 @@ function define_global_variables -d 'Defines all and exclusively globally export
|
|||
|
||||
set -gx EDITOR nvim
|
||||
set -gx BROWSER firefox
|
||||
set -gx DIFFPROG nvim -d
|
||||
|
||||
set -gx FZF_CTRL_T_COMMAND 'ag --hidden --ignore .git -g ""'
|
||||
set -gx FZF_DEFAULT_COMMAND 'ag --hidden --ignore .git -g ""'
|
||||
|
|
|
@ -5,4 +5,5 @@ function fish_user_key_bindings
|
|||
bind --mode insert ,p 'nvim +FZF; commandline -f repaint'
|
||||
bind --mode insert ,w 'nvim +VimwikiIndex; commandline -f repaint'
|
||||
bind --mode insert ,n 'n; commandline -f repaint'
|
||||
bind --mode insert ,s 'sysz; commandline -f repaint'
|
||||
end
|
||||
|
|
|
@ -23,7 +23,7 @@ background-alt = #3c3836
|
|||
;foreground = ${xrdb:color7:#222}
|
||||
foreground = #ebdbb2
|
||||
foreground-alt = #fbf1c7
|
||||
primary = #92971a
|
||||
primary = #98971a
|
||||
secondary = #458588
|
||||
alert = #cc241d
|
||||
|
||||
|
|
1
.vimrc
1
.vimrc
|
@ -46,6 +46,7 @@ if !exists('g:vscode')
|
|||
Plug 'hashivim/vim-terraform'
|
||||
Plug 'PProvost/vim-ps1'
|
||||
Plug 'vmchale/dhall-vim'
|
||||
Plug 'baskerville/vim-sxhkdrc'
|
||||
endif
|
||||
|
||||
call plug#end()
|
||||
|
|
|
@ -2,13 +2,13 @@
|
|||
|
||||
### Config ###
|
||||
|
||||
set -g cmd_func_prefix 'provision'
|
||||
set -g cmd_func_prefix provision
|
||||
set -g distro
|
||||
|
||||
for line in (cat /etc/os-release)
|
||||
set -l items (string split --max 1 '=' $line)
|
||||
|
||||
if test $items[1] = 'ID'
|
||||
if test $items[1] = ID
|
||||
set distro $items[2]
|
||||
end
|
||||
end
|
||||
|
@ -45,12 +45,11 @@ function provision_terminal_env -d 'Install base terminal utilities and sync con
|
|||
|
||||
install_pkgs gpg
|
||||
|
||||
echo 'deb http://download.opensuse.org/repositories/shells:/fish:/release:/3/Debian_10/ /' |
|
||||
sudo tee /etc/apt/sources.list.d/shells:fish:release:3.list
|
||||
|
||||
curl -fsSL https://download.opensuse.org/repositories/shells:fish:release:3/Debian_10/Release.key |
|
||||
gpg --dearmor |
|
||||
sudo tee /etc/apt/trusted.gpg.d/shells_fish_release_3.gpg >/dev/null
|
||||
echo 'deb http://download.opensuse.org/repositories/shells:/fish:/release:/3/Debian_11/ /' |
|
||||
sudo tee /etc/apt/sources.list.d/shells:fish:release:3.list
|
||||
and curl -fsSL https://download.opensuse.org/repositories/shells:fish:release:3/Debian_11/Release.key |
|
||||
gpg --dearmor |
|
||||
sudo tee /etc/apt/trusted.gpg.d/shells_fish_release_3.gpg >/dev/null
|
||||
end
|
||||
|
||||
set -l base_pkgs \
|
||||
|
|
|
@ -0,0 +1,74 @@
|
|||
#!/usr/bin/env -S fish --private
|
||||
|
||||
set general_help '
|
||||
A collection of useful functions for this project.
|
||||
|
||||
Either run a function like ./swim.fish <function> [arg [arg [...]]
|
||||
or source the file and run them as commands:
|
||||
$ source ./swim.fish
|
||||
$ lint [args]
|
||||
|
||||
Run ./swim help <function_name> to see it\'s definition.
|
||||
'
|
||||
|
||||
# Configuration
|
||||
|
||||
set src_fish_files \
|
||||
./install_arch \
|
||||
./provision_linux \
|
||||
./sync \
|
||||
./upgrade_debian \
|
||||
./**.fish \
|
||||
./.**.fish
|
||||
|
||||
# Commands
|
||||
|
||||
function lint -d 'Lint fish scripts'
|
||||
fish --no-execute $src_fish_files
|
||||
end
|
||||
|
||||
function format -d 'Format fish scripts'
|
||||
fish_indent --write $src_fish_files
|
||||
end
|
||||
|
||||
function sync -d 'Run the sync script'
|
||||
./sync $argv
|
||||
end
|
||||
|
||||
function install_arch -d 'Run the install_arch script'
|
||||
./install_arch $argv
|
||||
end
|
||||
|
||||
function upgrade_debi -d 'Run the debian_upgrade script'
|
||||
./upgrade_debian $argv
|
||||
end
|
||||
|
||||
function provision -d 'Run the provision_linux script with the specified distro'
|
||||
argparse 'd/distro=' -- $argv
|
||||
|
||||
if test -n "$_flag_d"
|
||||
set -g distro $_flag_d
|
||||
end
|
||||
|
||||
./provision_linux $argv[2..-1]
|
||||
end
|
||||
|
||||
# --- execution/help handling ---
|
||||
|
||||
function help -a function_name -d 'Displays help for internal function'
|
||||
if test -n "$function_name"
|
||||
functions $function_name
|
||||
else
|
||||
echo $general_help
|
||||
end
|
||||
end
|
||||
|
||||
argparse --ignore-unknown h/help -- $argv
|
||||
|
||||
if test -n "$_flag_h"
|
||||
help $argv
|
||||
else if test -n "$argv"
|
||||
$argv
|
||||
else
|
||||
echo $general_help
|
||||
end
|
52
swim.fish
52
swim.fish
|
@ -1,52 +0,0 @@
|
|||
##!/usr/bin/env fish
|
||||
# Uncomment this line and the last 2 lines of this file to enable running it like `./swim.fish`.
|
||||
#
|
||||
# This swim.fish script serves as a central place to store frequently run commands for this project.
|
||||
# Replace Commands section with your own command functions.
|
||||
# Source: https://github.com/mitchell/swim.fish
|
||||
|
||||
# Configuration
|
||||
|
||||
set -g cmd_func_prefix 'swim' # Set the function prefix for defining tasks
|
||||
set -g fish_files \
|
||||
./install_arch \
|
||||
./provision_linux \
|
||||
./sync \
|
||||
./upgrade_debian \
|
||||
./**.fish \
|
||||
./.**.fish
|
||||
|
||||
# Commands
|
||||
|
||||
function swim_lint -d 'Lint fish scripts'
|
||||
fish --no-execute $fish_files
|
||||
end
|
||||
|
||||
function swim_format -d 'Format fish scripts'
|
||||
fish_indent --write $fish_files
|
||||
end
|
||||
|
||||
function swim_sync -d 'Run the sync script'
|
||||
./sync $argv
|
||||
end
|
||||
|
||||
function swim_install_arch -d 'Run the install_arch script'
|
||||
./install_arch $argv
|
||||
end
|
||||
|
||||
function swim_upgrade_debi -d 'Run the debian_upgrade script'
|
||||
./upgrade_debian $argv
|
||||
end
|
||||
|
||||
function swim_provision -d 'Run the provision_linux script with the specified distro'
|
||||
argparse 'd/distro=' -- $argv
|
||||
|
||||
if test -n "$_flag_d"
|
||||
set -g distro $_flag_d
|
||||
end
|
||||
|
||||
./provision_linux $argv[2..-1]
|
||||
end
|
||||
|
||||
#curl -fsS https://raw.githubusercontent.com/mitchell/swim.fish/master/importable_sw.fish | source
|
||||
#run_swim_command 'swim' $argv
|
48
sync
48
sync
|
@ -3,22 +3,23 @@
|
|||
function main
|
||||
argparse 'd/desktop' 'g/git' -- $argv
|
||||
set -l start_dir (pwd)
|
||||
set -l tmp_dir (mktemp --directory 2>/dev/null; or mktemp -d -t 'dotfiles')
|
||||
set -l cwd (string match -r '\w+$' $start_dir)
|
||||
set -l uname (uname)
|
||||
and set -l tmp_dir (mktemp --directory 2>/dev/null; or mktemp -d -t 'dotfiles')
|
||||
and set -l cwd (string match -r '\w+$' $start_dir)
|
||||
and set -l uname (uname)
|
||||
or return $status
|
||||
|
||||
log 'Syncing shell environment configurations'
|
||||
set_color grey
|
||||
|
||||
setup_tmp_space $cwd $tmp_dir
|
||||
|
||||
sync_terminal_env
|
||||
and sync_terminal_env
|
||||
|
||||
set_fish_universal_vars
|
||||
and set_fish_universal_vars
|
||||
|
||||
install_fisher_packages
|
||||
and install_fisher_packages
|
||||
|
||||
install_nvim_plugins
|
||||
and install_nvim_plugins
|
||||
|
||||
if test -n "$_flag_d"
|
||||
set_color normal
|
||||
|
@ -37,6 +38,7 @@ function main
|
|||
end
|
||||
|
||||
clean_up_tmp_space $cwd $start_dir $tmp_dir
|
||||
or return $status
|
||||
|
||||
set_color normal
|
||||
echo -s \n 'Done syncing.'
|
||||
|
@ -45,7 +47,7 @@ end
|
|||
function setup_tmp_space -a cwd tmp_dir
|
||||
if test ! "$cwd" = 'dotfiles'
|
||||
git clone --recurse-submodules https://github.com/mitchell/dotfiles.git $tmp_dir
|
||||
cd $tmp_dir
|
||||
and cd $tmp_dir
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -55,29 +57,31 @@ function sync_terminal_env
|
|||
end
|
||||
|
||||
rsync -aP ./.config/fish ~/.config/
|
||||
rsync -aP ./.config/nvim ~/.config/
|
||||
rsync -aP ./.tmux-line.conf ~/
|
||||
rsync -aP ./.tmux.conf ~/
|
||||
rsync -aP ./.vim ~/
|
||||
rsync -aP ./.vimrc ~/
|
||||
rsync -aP ./.taskrc ~/
|
||||
and rsync -aP ./.config/nvim ~/.config/
|
||||
and rsync -aP ./.tmux-line.conf ~/
|
||||
and rsync -aP ./.tmux.conf ~/
|
||||
and rsync -aP ./.vim ~/
|
||||
and rsync -aP ./.vimrc ~/
|
||||
and rsync -aP ./.taskrc ~/
|
||||
end
|
||||
|
||||
function sync_desktop_env -a uname
|
||||
rsync -aP ./.config/kitty ~/.config/
|
||||
rsync -aP ./.config/qutebrowser ~/.config/
|
||||
rsync -aP ./.ideavimrc ~/
|
||||
and rsync -aP ./.config/qutebrowser ~/.config/
|
||||
and rsync -aP ./.ideavimrc ~/
|
||||
or return 1
|
||||
|
||||
switch $uname
|
||||
case Darwin
|
||||
rsync -aP ./.yabairc ~/
|
||||
rsync -aP ./.skhdrc ~/
|
||||
and rsync -aP ./.skhdrc ~/
|
||||
|
||||
case Linux
|
||||
rsync -aP ./.config/bspwm ~/.config/
|
||||
rsync -aP ./.config/sxhkd ~/.config/
|
||||
rsync -aP ./.config/picom ~/.config/
|
||||
rsync -aP ./.config/polybar ~/.config/
|
||||
and rsync -aP ./.config/sxhkd ~/.config/
|
||||
and rsync -aP ./.config/picom ~/.config/
|
||||
and rsync -aP ./.config/polybar ~/.config/
|
||||
and rsync -aP ./.config/conky ~/.config/
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -113,12 +117,12 @@ end
|
|||
function clean_up_tmp_space -a cwd start_dir tmp_dir
|
||||
if test ! "$cwd" = 'dotfiles'
|
||||
cd $start_dir
|
||||
rm -r $tmp_dir
|
||||
and rm -r $tmp_dir
|
||||
end
|
||||
end
|
||||
|
||||
function log -a message
|
||||
echo \n"---------------- $message ----------------"\n
|
||||
echo \n"--- $message ---"\n
|
||||
end
|
||||
|
||||
main $argv
|
||||
|
|
Loading…
Reference in New Issue