From 2c789d5af2574d0eeb03a0514b9e7e9bf0f55ef2 Mon Sep 17 00:00:00 2001 From: afify Date: Fri, 24 Jul 2020 19:52:14 +0300 Subject: [PATCH] git config, vimrc --- .config/dunst/dunstrc | 329 +++++++++----------------------------------------- .config/git/config | 4 + .config/ksh/kshrc | 40 +++--- .vim/vimrc | 13 +- 4 files changed, 95 insertions(+), 291 deletions(-) rewrite .config/dunst/dunstrc (89%) diff --git a/.config/dunst/dunstrc b/.config/dunst/dunstrc dissimilarity index 89% index 0e19b49..8198baf 100644 --- a/.config/dunst/dunstrc +++ b/.config/dunst/dunstrc @@ -1,269 +1,60 @@ -[global] -#font = dina 10 -font = Mono 12 - -# Allow a small subset of html markup: -# bold -# italic -# strikethrough -# underline -# -# For a complete reference see -# . -# If markup is not allowed, those tags will be stripped out of the -# message. -markup = yes -plain_text = no - -# The format of the message. Possible variables are: -# %a appname -# %s summary -# %b body -# %i iconname (including its path) -# %I iconname (without its path) -# %p progress value if set ([ 0%] to [100%]) or nothing -# Markup is allowed -# alignment = center -# format = "%s\n%b\n" -format = "%s\n%b\n%p" - -# Sort messages by urgency. -sort = no - -# Show how many messages are currently hidden (because of geometry). -indicate_hidden = yes - -# Alignment of message text. -# Possible values are "left", "center" and "right". - -# The frequency with wich text that is longer than the notification -# window allows bounces back and forth. -# This option conflicts with "word_wrap". -# Set to 0 to disable. -bounce_freq = 0 - -# Show age of message if message is older than show_age_threshold -# seconds. -# Set to -1 to disable. -show_age_threshold = -1 - -# Split notifications into multiple lines if they don't fit into -# geometry. -word_wrap = yes - -# Ignore newlines '\n' in notifications. -ignore_newline = no - -# Hide duplicate's count and stack them -stack_duplicates = yes -hide_duplicates_count = yes - - -# The geometry of the window: -# [{width}]x{height}[+/-{x}+/-{y}] -# The geometry of the message window. -# The height is measured in number of notifications everything else -# in pixels. If the width is omitted but the height is given -# ("-geometry x2"), the message window expands over the whole screen -# (dmenu-like). If width is 0, the window expands to the longest -# message displayed. A positive x is measured from the left, a -# negative from the right side of the screen. Y is measured from -# the top and down respectevly. -# The width can be negative. In this case the actual width is the -# screen width minus the width defined in within the geometry option. -#geometry = "250x50-40+40" -#geometry = "300x50-15+49" -# geometry = "500x200-1420+925" -# geometry = "450x200-0+26" -geometry = "0x0-0+26" - - -# Shrink window if it's smaller than the width. Will be ignored if -# width is 0. -shrink = no - -# The transparency of the window. Range: [0; 100]. -# This option will only work if a compositing windowmanager is -# present (e.g. xcompmgr, compiz, etc.). -transparency = 0 - -# Don't remove messages, if the user is idle (no mouse or keyboard input) -# for longer than idle_threshold seconds. -# Set to 0 to disable. -idle_threshold = 0 - -# Which monitor should the notifications be displayed on. -monitor = 0 - -# Display notification on focused monitor. Possible modes are: -# mouse: follow mouse pointer -# keyboard: follow window with keyboard focus -# none: don't follow anything -# -# "keyboard" needs a windowmanager that exports the -# _NET_ACTIVE_WINDOW property. -# This should be the case for almost all modern windowmanagers. -# -# If this option is set to mouse or keyboard, the monitor option -# will be ignored. -follow = none - -# Should a notification popped up from history be sticky or timeout -# as if it would normally do. -sticky_history = yes - -# Maximum amount of notifications kept in history -history_length = 15 - -# Display indicators for URLs (U) and actions (A). -show_indicators = no - -# The height of a single line. If the height is smaller than the -# font height, it will get raised to the font height. -# This adds empty space above and under the text. -line_height = 3 - -# Draw a line of "separatpr_height" pixel height between two -# notifications. -# Set to 0 to disable. -separator_height = 2 - -# Padding between text and separator. -padding = 6 - -# Horizontal padding. -horizontal_padding = 6 - -# Define a color for the separator. -# possible values are: -# * auto: dunst tries to find a color fitting to the background; -# * foreground: use the same color as the foreground; -# * frame: use the same color as the frame; -# * anything else will be interpreted as a X color. -separator_color = frame - -# Print a notification on startup. -# This is mainly for error detection, since dbus (re-)starts dunst -# automatically after a crash. -startup_notification = false - -# dmenu path. -dmenu = /usr/bin/dmenu -p dunst: - -# Browser for opening urls in context menu. -browser = /usr/bin/firefox -new-tab - -# Align icons left/right/off -icon_position = off -max_icon_size = 80 - -# Paths to default icons. -icon_path = /usr/share/icons/Paper/16x16/mimetypes/:/usr/share/icons/Paper/48x48/status/:/usr/share/icons/Paper/16x16/devices/:/usr/share/icons/Paper/48x48/notifications/:/usr/share/icons/Paper/48x48/emblems/ - -frame_width = 2 -frame_color = "#8EC07C" - -[shortcuts] - -# Shortcuts are specified as [modifier+][modifier+]...key -# Available modifiers are "ctrl", "mod1" (the alt-key), "mod2", -# "mod3" and "mod4" (windows-key). -# Xev might be helpful to find names for keys. - -# Close notification. -close = ctrl+space - -# Close all notifications. -close_all = ctrl+shift+space - -# Redisplay last message(s). -# On the US keyboard layout "grave" is normally above TAB and left -# of "1". -history = ctrl+grave - -# Context menu. -context = ctrl+shift+period - -[urgency_low] -# IMPORTANT: colors have to be defined in quotation marks. -# Otherwise the "#" and following would be interpreted as a comment. -frame_color = "#3B7C87" -foreground = "#3B7C87" -background = "#191311" -#background = "#2B313C" -timeout = 2 - - -[urgency_normal] -frame_color = "#55505c" -# foreground = "#3772ff" -#foreground = "#ffffff" -#background = "#191311" -#background = "#000000" -#background = "#2B313C" -foreground = "#777777" -background = "#111111" -timeout = 2 - - -[urgency_critical] -frame_color = "#B7472A" -foreground = "#B7472A" -background = "#191311" -#background = "#2B313C" -timeout = 5 - - -# Every section that isn't one of the above is interpreted as a rules to -# override settings for certain messages. -# Messages can be matched by "appname", "summary", "body", "icon", "category", -# "msg_urgency" and you can override the "timeout", "urgency", "foreground", -# "background", "new_icon" and "format". -# Shell-like globbing will get expanded. -# -# SCRIPTING -# You can specify a script that gets run when the rule matches by -# setting the "script" option. -# The script will be called as follows: -# script appname summary body icon urgency -# where urgency can be "LOW", "NORMAL" or "CRITICAL". -# -# NOTE: if you don't want a notification to be displayed, set the format -# to "". -# NOTE: It might be helpful to run dunst -print in a terminal in order -# to find fitting options for rules. - -#[espeak] -# summary = "*" -# script = dunst_espeak.sh - -#[script-test] -# summary = "*script*" -# script = dunst_test.sh - -#[ignore] -# # This notification will not be displayed -# summary = "foobar" -# format = "" - -#[signed_on] -# appname = Pidgin -# summary = "*signed on*" -# urgency = low -# -#[signed_off] -# appname = Pidgin -# summary = *signed off* -# urgency = low -# -#[says] -# appname = Pidgin -# summary = *says* -# urgency = critical -# -#[twitter] -# appname = Pidgin -# summary = *twitter.com* -# urgency = normal -# -# vim: ft=cfg +[global] +bounce_freq = 0 +browser = /usr/bin/firefox -new-tab +dmenu = /usr/bin/dmenu -p dunst: +follow = none +font = Mono 12 +format = "%s\n%b\n%p" +frame_color = "#8EC07C" +frame_width = 2 +geometry = "0x0-0+24" +hide_duplicates_count = yes +history_length = 15 +horizontal_padding = 6 +icon_position = off +idle_threshold = 0 +ignore_newline = no +indicate_hidden = yes +line_height = 3 +markup = yes +max_icon_size = 80 +monitor = 0 +padding = 6 +plain_text = no +separator_color = frame +separator_height = 2 +show_age_threshold = -1 +show_indicators = no +shrink = no +sort = no +stack_duplicates = yes +startup_notification = false +sticky_history = yes +transparency = 0 +word_wrap = yes + +[shortcuts] +close = ctrl+space +close_all = ctrl+shift+space +context = ctrl+shift+period +history = ctrl+grave + +[urgency_low] +background = "#191311" +foreground = "#3B7C87" +frame_color = "#3B7C87" +timeout = 2 + +[urgency_normal] +background = "#111111" +foreground = "#777777" +frame_color = "#55505c" +timeout = 2 + +[urgency_critical] +background = "#191311" +foreground = "#B7472A" +frame_color = "#B7472A" +timeout = 5 + +# vim: ft=cfg diff --git a/.config/git/config b/.config/git/config index d91d469..0773ad8 100644 --- a/.config/git/config +++ b/.config/git/config @@ -106,6 +106,7 @@ ll = log --all --graph --pretty=format:"%C(#0080ff)%h\\ %C(#cd9a00)<%an>\\ %C(#c0d6de)%s\\ %C(#17b062)%d" lgpg = log --all --graph --pretty=format:"%C(#0080ff)%h\\ %C(#cd9a00)%G?\\ \\%C(#c0d6de)%s\\%C(#17b062)%d" ld = log --all --graph --date=format:'%a %d %b %Y' --pretty=format:"%C(#0080ff)%h\\ %C(#cd9a00)<%an>\\ %C(#888888)(%cd)\\ %C(#c0d6de)%s\\ %C(#17b062)%d" + l = log --graph --date=format:'%a %d %b %Y' --pretty=format:"%C(#0080ff)%h\\ %C(#cd9a00)<%an>\\ %C(#888888)(%cd)\\ %C(#c0d6de)%s\\ %C(#17b062)%d" find = log --all --pretty=format:"%C(#0080ff)%h\\ \\%C(#c0d6de)%s\\%C(#17b062)%d" --name-status --grep stat = !git diff --stat $(git merge-base HEAD \"master\") fh = log --follow -p -- @@ -143,6 +144,7 @@ retrack = update-index --no-assume-unchanged show-untracked = ls-files . --exclude-standard --others show-ignored = ls-files . --ignored --exclude-standard --others +# show-file = show 00c7250:sfm.c | vim - -n # interactive staging addi = add --interactive @@ -155,3 +157,5 @@ # k = git remote prune github # reflog expire --all --expire=now k = gc --prune=now --aggressive +[credential] + helper = cache --timeout=600 diff --git a/.config/ksh/kshrc b/.config/ksh/kshrc index d87641c..b0c95e5 100644 --- a/.config/ksh/kshrc +++ b/.config/ksh/kshrc @@ -9,13 +9,15 @@ alias xc='xclip -sel clip' alias fonts=" fc-list | sed 's/^.*: //' | awk -F: '{print $1}' | sort | uniq" alias lsb="dmesg | egrep '^(cd|wd|sd|fd). at '" alias sc="rsync -avzhe ssh --progress" +alias cf="clang-format -style=file -i" [ "$(uname)" = "OpenBSD" ] && alias ls='colorls -GA' || alias ls='ls --color=always -A' +[ "$(uname)" = "OpenBSD" ] && alias grep='grep -Inr' || alias grep='grep -Inr --color=always' alias ll='ls -lh' alias wgetf="wget --tries=100 --continue --content-disposition --trust-server-names -i" -alias egyb=" cd ~/downloads && python /mnt/data/dev/egybest_downloader/egybest_unix.py" -alias dwmrc='cd /mnt/data/hports/src/dwm-6.2/ && vim config.h' -alias strc='cd /mnt/data/hports/src/st-0.8.2/ && vim config.h' -alias sl='cd /mnt/data/hports/src/slstatus/ && vim config.h' +alias egyb=" cd ~/downloads && python /mnt/data/dev/archived/egybest_downloader/egybest_unix.py" +alias dwmrc='cd /mnt/data/dev/clones/dwm-6.2/ && vim config.h' +alias strc='cd /mnt/data/dev/clones/st-0.8.2/ && vim config.h' +alias sl='cd /mnt/data/dev/clones/slstatus/ && vim config.h' alias ya="youtube-dl -i --add-metadata -f bestaudio" alias yv4="youtube-dl -i --add-metadata -f 'bestvideo[height<=480]+bestaudio/best[height<=480]'" alias yv7="youtube-dl -i --add-metadata -f 'bestvideo[height<=720]+bestaudio/best[height<=720]'" @@ -27,21 +29,21 @@ export PS1="\[\033[38;5;$col\]\W \033[38;5;166m\]\$(git branch --show-current 2> ex(){ [ -f "$1" ] && case $1 in - *.tar.bz2) tar xjf "$1";; - *.tar.gz) tar xzf "$1";; - *.tar.xz) tar xf "$1";; - *.tar.zst) tar -I zstd -xvf "$1";; - *.tar) tar xf "$1";; - *.tbz2) tar xjf "$1";; - *.tgz) tar xzf "$1";; - *.xz) xz -d "$1";; - *.bz2) bunzip2 "$1";; - *.rar) unrar x "$1";; - *.gz) gunzip "$1";; - *.zip) unzip "$1";; - *.7z) 7z x "$1";; - *.Z) uncompress "$1";; - *) echo "'$1' cannot be extracted.";; + *.tar.bz2) tar xjf "$1";; + *.tar.gz) tar xzf "$1";; + *.tar.xz) tar xf "$1";; + *.tar.zst) tar -I zstd -xvf "$1";; + *.tar) tar xf "$1";; + *.tbz2) tar xjf "$1";; + *.tgz) tar xzf "$1";; + *.xz) xz -d "$1";; + *.bz2) bunzip2 "$1";; + *.rar) unrar x "$1";; + *.gz) gunzip "$1";; + *.zip) unzip "$1";; + *.7z) 7z x "$1";; + *.Z) uncompress "$1";; + *) echo "'$1' cannot be extracted.";; esac } diff --git a/.vim/vimrc b/.vim/vimrc index dd1c8af..55a2f0d 100644 --- a/.vim/vimrc +++ b/.vim/vimrc @@ -20,6 +20,7 @@ call plug#begin('~/.vim/plugged') Plug 'airblade/vim-gitgutter' Plug 'maralla/completor.vim' Plug 'vim-syntastic/syntastic' +Plug 'ap/vim-css-color' call plug#end() "============================================================================== @@ -56,6 +57,7 @@ vmap y:call system("xclip -i -selection clipboard", getreg("\"")):call " replace word with yanked nnoremap cw0 + " paste nnoremap :set invpaste paste? set pastetoggle= @@ -118,6 +120,7 @@ nnoremap f :set hlsearch/^[a-z*].*(.*)$ nnoremap o :set hlsearch!/\%80v.\+/ nnoremap s :set hlsearch! nnoremap * *zz +vnoremap * y/\V=escape(@",'/\') nnoremap n nzz nnoremap N Nzz @@ -202,7 +205,7 @@ endfunction let g:syntastic_python_checkers = ["pylint"] let g:syntastic_sh_checkers = ["shellcheck"] let g:syntastic_c_checkers = ["splint"] -let g:syntastic_c_splint_args = "-checks +posixlib +enumint ./util.c -DVERSION=\\\"VERSION\\\"" +let g:syntastic_c_splint_args = "-checks +posixlib +enumint -nullpass -nullret ./util.c -DVERSION=\\\"VERSION\\\"" set statusline+=%#statusline_r# set statusline+=\ %{SyntasticStatuslineFlag()} @@ -251,8 +254,12 @@ let g:completor_auto_trigger = 1 let g:completor_clang_binary = '/usr/bin/clang' let g:completor_complete_options = 'menuone,noselect,preview' +set dictionary+="~/.vim/dict/text.dict" +au FileType * execute 'setlocal dict+=~/.vim/dict/'.&filetype.'.dict' + inoremap pumvisible() ? "\" : "\" inoremap pumvisible() ? "\" : "\" +inoremap "============================================================================== " Remove characters function @@ -267,11 +274,11 @@ function! Clean_file() " Remove more than 2 empty lines " Remove empty comment lines " TODO remove 2 spaces between words +" \%s/^ \+//e | %s/ \+$//e | - \%s/^ \+//e | \%s/^\/\/$//e | - \%s/\t \+/\t/e | \%s/\t\+\n/ /e | + \%s/\t \+/\t/e | \%s/\($\n\)\+\%$//e | \%s/^\n\{1,\}/ /e " Return to saved cursor -- 2.11.4.GIT