This commit is contained in:
ayham 2021-05-22 20:07:32 +03:00
parent 01d7758020
commit 62fcbdc321
Signed by: ayham
GPG Key ID: EAB7F5A9DF503678
29 changed files with 363 additions and 73 deletions

View File

@ -6,8 +6,8 @@
[[ $DISPLAY ]] && shopt -s checkwinsize
(cat ~/.cache/wal/sequences &)
. ~/.cache/wal/colors.sh
#(cat ~/.cache/wal/sequences &)
#. ~/.cache/wal/colors.sh
PS1='[\u@\h \W]\$ '
@ -25,6 +25,6 @@ esac
#export PS1="\[\033[38;5;6m\][\[$(tput sgr0)\]\[\033[38;5;83m\]\u\[$(tput sgr0)\]\[\033[38;5;77m\]@\[$(tput sgr0)\]\[\033[38;5;112m\]\h\[$(tput sgr0)\] \[$(tput sgr0)\]\[\033[38;5;42m\]\W\[$(tput sgr0)\]\[\033[38;5;6m\]]\[$(tput sgr0)\]\[\033[38;5;81m\]\\$\[$(tput sgr0)\] \[$(tput sgr0)\]"
export PS1="[\W] \\$ "
set -o vi
. ~/.local/bin/z.sh
source ~/.config/env

View File

@ -1,15 +1,37 @@
exec feh --no-fehbg --bg-fill ~/proj/sysconf/wallpapers/wallpaper &
exec rm ~/.cache/wal/ &
exec feh --no-fehbg --bg-fill ~/pix/wallpapers/wallpaper &
#exef feh --no-fehbg --bg-color black "$@" &
#exec rm ~/.cache/wal/ &
#exec statusbar &
exec slstatus &
exec picom --config ~/.config/picom.conf &
#exec picom --config ~/.config/picom.conf &
exec xrandr --auto --output HDMI1 --mode 1024x768 --right-of eDP1 &
exec xcompmgr &
#exec flameshot &
#exec greenclip daemon &
exec /usr/lib/kdeconnectd &
#exec /usr/lib/kdeconnectd &
#exec dunst &
exec xmodmap ~/.config/Xmodmap &
exec xrdb ~/.cache/wal/colors.Xresources &
exec source ~/.config/env &
exec xscreensaver -no-splash &
exec dbus-launch dwm
#exec xrdb ~/.cache/wal/colors.Xresources &
source ~/.config/env &
exec xss-lock -- /usr/bin/slock &
exec keynav &
umask 002 &
if test -f /usr/lib/ssh/x11-ssh-askpass
then
SSH_ASKPASS=/usr/lib/ssh/x11-ssh-askpass ssh-add < /dev/null
fi &
# relaunch DWM if the binary changes, otherwise bail
csum=""
new_csum=$(sha1sum $(which dwm))
while true
do
if [ "$csum" != "$new_csum" ]
then
csum=$new_csum
dbus-launch dwm
else
exit 0
fi
new_csum=$(sha1sum $(which dwm))
sleep 0.5
done

Binary file not shown.

View File

@ -22,9 +22,9 @@ bind-key j down article
bind-key k up article
# -- macros
macro m set browser "mpv --ytdl %u --profile=360p > /dev/null &"; open-in-browser ; set browser "lynx -nocolor"
macro m set browser "mpv %u > /dev/null &"; open-in-browser ; set browser "lynx -nocolor"
macro a set browser "echo %u | xclip -sel clip"; open-in-browser ; set browser "lynx -nocolor"
macro v set browser "curl %u | feh - &"; open-in-browser ; set browser "lynx -nocolor"
macro v set browser "curl %u > /tmp/img && sxiv /tmp/img && rm /tmp/img &"; open-in-browser ; set browser "lynx -nocolor"
# -- podboat
delete-played-files no
@ -33,9 +33,9 @@ max-downloads 4
player "nvlc"
# -- color
color listfocus white black bold
color listfocus_unread white black bold
color info white black bold
#color listfocus white black bold
#color listfocus_unread white black bold
#color info white black bold
#color article white black
# -- misc

31
.config/newsboat/urls Normal file
View File

@ -0,0 +1,31 @@
## Youtube
https://www.youtube.com/feeds/videos.xml?channel_id=UC7YOGHUfC1Tb6E4pudI9STA mental-outlaw
https://www.youtube.com/feeds/videos.xml?channel_id=UCld68syR8Wi-GY_n4CaoJGA brodie-robertson
https://www.youtube.com/feeds/videos.xml?channel_id=UC8ENHE5xdFSwx71u3fDH5Xw the-primeagen
https://www.youtube.com/feeds/videos.xml?channel_id=UCd3dNckv1Za2coSaHGHl5aA tj-devries
https://www.youtube.com/feeds/videos.xml?channel_id=UCoryWpk4QVYKFCJul9KBdyw switched-to-linux politics conservative
https://www.youtube.com/feeds/videos.xml?channel_id=UC0ZTPkdxlAKf-V33tqXwi3Q hackersploit
https://www.youtube.com/feeds/videos.xml?channel_id=UCLwNTXWEjVd2qIHLcXxQWxA timcast right-center
https://www.youtube.com/feeds/videos.xml?channel_id=UCIveFvW-ARp_B_RckhweNJw steven-crowder right conservative
https://www.youtube.com/feeds/videos.xml?channel_id=UCL_f53ZEJxp8TtlOkHwMV9Q jordan-peterson philosphy enlightment
https://www.youtube.com/feeds/videos.xml?channel_id=UCDETFHKteb-C_EaXmRKvP4w sisyphus
https://www.youtube.com/feeds/videos.xml?channel_id=UCVls1GmFKf6WlTraIb_IaJg distrotube
## Blogs
https://xkcd.com/rss.xml webcomic
https://unixsheikh.com/feed.rss unixshekh
https://drewdevault.com/blog/index.xml drewdevault
## Podcast
https://www.youtube.com/feeds/videos.xml?channel_id=UCzQUP1qoWDoEbmsQxvdjxgQ joe-rogan
https://anchor.fm/s/149fd51c/podcast/rss TechOverTea
## Luke smith chad
https://lukesmith.xyz/rss.xml luke-smith blog
https://lukesmith.xyz/videos luke-smith videos
https://notrelated.xyz/rss luke-smith notrelated
https://based.cooking/rss.xml luke-smith based-cooking

View File

@ -1,4 +1,12 @@
let g:netrw_dirhistmax =10
let g:netrw_dirhistcnt =2
let g:netrw_dirhist_2='/home/dizzy/proj/PaperTrader/src/libtrader/common/misc'
let g:netrw_dirhist_1='/home/dizzy/proj/sysconf'
let g:netrw_dirhistcnt =8
let g:netrw_dirhist_8='/data/sisyphus/proj/PaperTrader/src/libtrader/server/network'
let g:netrw_dirhist_7='/data/sisyphus/proj/PaperTrader/src/libtrader/server'
let g:netrw_dirhist_6='/data/sisyphus/proj/PaperTrader/src/libtrader/server/account'
let g:netrw_dirhist_5='/data/sisyphus/proj/PaperTrader/src/libtrader/server'
let g:netrw_dirhist_4='/data/sisyphus/proj/PaperTrader/src/libtrader/server/db'
let g:netrw_dirhist_3='/data/sisyphus/proj/PaperTrader/src/libtrader/server'
let g:netrw_dirhist_2='/data/sisyphus/proj/PaperTrader/src/libtrader/server/ds'
let g:netrw_dirhist_1='/data/sisyphus/proj/PaperTrader/src/libtrader/server'
let g:netrw_dirhist_0='/data/sisyphus/proj/PaperTrader/src/libtrader/common/message'
let g:netrw_dirhist_9='/data/sisyphus/proj/PaperTrader/src/libtrader/common'

View File

@ -1,28 +1,21 @@
call plug#begin()
Plug 'ctrlpvim/ctrlp.vim'
Plug 'bling/vim-airline'
Plug 'vimwiki/vimwiki'
Plug 'dylanaraps/wal.vim'
Plug 'mhinz/vim-startify'
Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'liuchengxu/vim-which-key'
Plug 'mizlan/vim-and-cp'
Plug 'jiangmiao/auto-pairs'
Plug 'tpope/vim-sleuth'
Plug 'editorconfig/editorconfig'
Plug 'airblade/vim-gitgutter'
Plug 'preservim/nerdcommenter'
Plug 'Vimjas/vim-python-pep8-indent'
" Debugging plugins
Plug 'realaltffour/comprog.nvim', { 'branch': 'test' }
"Plug '~/.config/nvim/plugged/comprog.nvim'
" Telescope
"Plug 'nvim-lua/popup.nvim'
"Plug 'nvim-lua/plenary.nvim'
"Plug 'nvim-telescope/telescope.nvim'
"Plug 'nvim-telescope/telescope-fzy-native.nvim'
call plug#end()
filetype plugin indent on
" Setup theme.
set t_Co=256
"colorscheme wal
let g:airline_themes='onedark'
" General
set textwidth=80
@ -41,7 +34,7 @@ set nowrap
set showbreak=
" toggle invisible characters
set list
set listchars=tab:→\ ,eol,trail:⋅,extends:,precedes:,space
"set listchars=tab:→\ ,eol:¬,trail:⋅,extends:,precedes:,space:·
set list
set ttyfast

@ -0,0 +1 @@
Subproject commit 39f06b873a8449af8ff6a3eee716d3da14d63a76

@ -0,0 +1 @@
Subproject commit 17494990ab110b70aec3d7c97707448c6d3e72c9

@ -0,0 +1 @@
Subproject commit 992c80647216e7d2ca4f71975cd02b9b7648d499

@ -1 +1 @@
Subproject commit d93d97813dc839ef0782302a0debd7c4877f09f3
Subproject commit f68f4d00b9c99d0d711bfde3b071f0dafd249901

@ -1 +0,0 @@
Subproject commit 2786058b9022ce6e50db7f75088e69e07185e52c

@ -1 +0,0 @@
Subproject commit 895fafe572585b807a31d4ba2835188d7b38cc41

@ -0,0 +1 @@
Subproject commit b52217517b2c5b2c3b6a0daa7260983d409e7e6b

@ -1 +0,0 @@
Subproject commit 491d83c50c9b17c896850bbd7ec00f2019e2f110

@ -1 +0,0 @@
Subproject commit 577ddc73f0a1d2fd6166ed3268ab8536111037e0

@ -0,0 +1 @@
Subproject commit ab475e1325ad6eaec15a3113f201a4e4a3ee2811

@ -1 +1 @@
Subproject commit f5693986c4ce82e50f4feebda22cf8c2fed35438
Subproject commit 03ec880101305b41a282ab85f7184f91187392ac

@ -0,0 +1 @@
Subproject commit 79f33fc93b33903bb863a55df11f90b9dec478bf

@ -1 +0,0 @@
Subproject commit 95593b67723f23979cd7344ecfd049f2f917830f

@ -1 +0,0 @@
Subproject commit 511d3035d4da2453a9cb0188b6020ed7bc8fc18f

@ -0,0 +1 @@
Subproject commit f4bdaa4e9cf07f62ce1161a3d0ff70c8aad25bc5

@ -0,0 +1 @@
Subproject commit 38bd4010110614822cde523ebc5724963312ab63

@ -0,0 +1 @@
Subproject commit 81e36c352a8deea54df5ec1e2f4348685569bed2

@ -0,0 +1 @@
Subproject commit da2934fcd36350b871ed8ccd54c8eae3a0dfc8ae

View File

@ -1 +0,0 @@
hsts-file = /home/dizzy/.cache/wget-hsts

263
.local/bin/z.sh Normal file
View File

@ -0,0 +1,263 @@
# Copyright (c) 2009 rupa deadwyler. Licensed under the WTFPL license, Version 2
# maintains a jump-list of the directories you actually use
#
# INSTALL:
# * put something like this in your .bashrc/.zshrc:
# . /path/to/z.sh
# * cd around for a while to build up the db
# * PROFIT!!
# * optionally:
# set $_Z_CMD in .bashrc/.zshrc to change the command (default z).
# set $_Z_DATA in .bashrc/.zshrc to change the datafile (default ~/.z).
# set $_Z_MAX_SCORE lower to age entries out faster (default 9000).
# set $_Z_NO_RESOLVE_SYMLINKS to prevent symlink resolution.
# set $_Z_NO_PROMPT_COMMAND if you're handling PROMPT_COMMAND yourself.
# set $_Z_EXCLUDE_DIRS to an array of directories to exclude.
# set $_Z_OWNER to your username if you want use z while sudo with $HOME kept
#
# USE:
# * z foo # cd to most frecent dir matching foo
# * z foo bar # cd to most frecent dir matching foo and bar
# * z -r foo # cd to highest ranked dir matching foo
# * z -t foo # cd to most recently accessed dir matching foo
# * z -l foo # list matches instead of cd
# * z -e foo # echo the best match, don't cd
# * z -c foo # restrict matches to subdirs of $PWD
# * z -x # remove the current directory from the datafile
# * z -h # show a brief help message
[ -d "${_Z_DATA:-$HOME/.z}" ] && {
echo "ERROR: z.sh's datafile (${_Z_DATA:-$HOME/.z}) is a directory."
}
_z() {
local datafile="${_Z_DATA:-$HOME/.z}"
# if symlink, dereference
[ -h "$datafile" ] && datafile=$(readlink "$datafile")
# bail if we don't own ~/.z and $_Z_OWNER not set
[ -z "$_Z_OWNER" -a -f "$datafile" -a ! -O "$datafile" ] && return
_z_dirs () {
local line
while read line; do
# only count directories
[ -d "${line%%\|*}" ] && echo "$line"
done < "$datafile"
return 0
}
# add entries
if [ "$1" = "--add" ]; then
shift
# $HOME isn't worth matching
[ "$*" = "$HOME" ] && return
# don't track excluded directory trees
local exclude
for exclude in "${_Z_EXCLUDE_DIRS[@]}"; do
case "$*" in "$exclude*") return;; esac
done
# maintain the data file
local tempfile="$datafile.$RANDOM"
local score=${_Z_MAX_SCORE:-9000}
_z_dirs | awk -v path="$*" -v now="$(date +%s)" -v score=$score -F"|" '
BEGIN {
rank[path] = 1
time[path] = now
}
$2 >= 1 {
# drop ranks below 1
if( $1 == path ) {
rank[$1] = $2 + 1
time[$1] = now
} else {
rank[$1] = $2
time[$1] = $3
}
count += $2
}
END {
if( count > score ) {
# aging
for( x in rank ) print x "|" 0.99*rank[x] "|" time[x]
} else for( x in rank ) print x "|" rank[x] "|" time[x]
}
' 2>/dev/null >| "$tempfile"
# do our best to avoid clobbering the datafile in a race condition.
if [ $? -ne 0 -a -f "$datafile" ]; then
env rm -f "$tempfile"
else
[ "$_Z_OWNER" ] && chown $_Z_OWNER:"$(id -ng $_Z_OWNER)" "$tempfile"
env mv -f "$tempfile" "$datafile" || env rm -f "$tempfile"
fi
# tab completion
elif [ "$1" = "--complete" -a -s "$datafile" ]; then
_z_dirs | awk -v q="$2" -F"|" '
BEGIN {
q = substr(q, 3)
if( q == tolower(q) ) imatch = 1
gsub(/ /, ".*", q)
}
{
if( imatch ) {
if( tolower($1) ~ q ) print $1
} else if( $1 ~ q ) print $1
}
' 2>/dev/null
else
# list/go
local echo fnd last list opt typ
while [ "$1" ]; do case "$1" in
--) while [ "$1" ]; do shift; fnd="$fnd${fnd:+ }$1";done;;
-*) opt=${1:1}; while [ "$opt" ]; do case ${opt:0:1} in
c) fnd="^$PWD $fnd";;
e) echo=1;;
h) echo "${_Z_CMD:-z} [-cehlrtx] args" >&2; return;;
l) list=1;;
r) typ="rank";;
t) typ="recent";;
x) sed -i -e "\:^${PWD}|.*:d" "$datafile";;
esac; opt=${opt:1}; done;;
*) fnd="$fnd${fnd:+ }$1";;
esac; last=$1; [ "$#" -gt 0 ] && shift; done
[ "$fnd" -a "$fnd" != "^$PWD " ] || list=1
# if we hit enter on a completion just go there
case "$last" in
# completions will always start with /
/*) [ -z "$list" -a -d "$last" ] && builtin cd "$last" && return;;
esac
# no file yet
[ -f "$datafile" ] || return
local cd
cd="$( < <( _z_dirs ) awk -v t="$(date +%s)" -v list="$list" -v typ="$typ" -v q="$fnd" -F"|" '
function frecent(rank, time) {
# relate frequency and time
dx = t - time
return int(10000 * rank * (3.75/((0.0001 * dx + 1) + 0.25)))
}
function output(matches, best_match, common) {
# list or return the desired directory
if( list ) {
if( common ) {
printf "%-10s %s\n", "common:", common > "/dev/stderr"
}
cmd = "sort -n >&2"
for( x in matches ) {
if( matches[x] ) {
printf "%-10s %s\n", matches[x], x | cmd
}
}
} else {
if( common && !typ ) best_match = common
print best_match
}
}
function common(matches) {
# find the common root of a list of matches, if it exists
for( x in matches ) {
if( matches[x] && (!short || length(x) < length(short)) ) {
short = x
}
}
if( short == "/" ) return
for( x in matches ) if( matches[x] && index(x, short) != 1 ) {
return
}
return short
}
BEGIN {
gsub(" ", ".*", q)
hi_rank = ihi_rank = -9999999999
}
{
if( typ == "rank" ) {
rank = $2
} else if( typ == "recent" ) {
rank = $3 - t
} else rank = frecent($2, $3)
if( $1 ~ q ) {
matches[$1] = rank
} else if( tolower($1) ~ tolower(q) ) imatches[$1] = rank
if( matches[$1] && matches[$1] > hi_rank ) {
best_match = $1
hi_rank = matches[$1]
} else if( imatches[$1] && imatches[$1] > ihi_rank ) {
ibest_match = $1
ihi_rank = imatches[$1]
}
}
END {
# prefer case sensitive
if( best_match ) {
output(matches, best_match, common(matches))
exit
} else if( ibest_match ) {
output(imatches, ibest_match, common(imatches))
exit
}
exit(1)
}
')"
if [ "$?" -eq 0 ]; then
if [ "$cd" ]; then
if [ "$echo" ]; then echo "$cd"; else builtin cd "$cd"; fi
fi
else
return $?
fi
fi
}
alias ${_Z_CMD:-z}='_z 2>&1'
[ "$_Z_NO_RESOLVE_SYMLINKS" ] || _Z_RESOLVE_SYMLINKS="-P"
if type compctl >/dev/null 2>&1; then
# zsh
[ "$_Z_NO_PROMPT_COMMAND" ] || {
# populate directory list, avoid clobbering any other precmds.
if [ "$_Z_NO_RESOLVE_SYMLINKS" ]; then
_z_precmd() {
(_z --add "${PWD:a}" &)
: $RANDOM
}
else
_z_precmd() {
(_z --add "${PWD:A}" &)
: $RANDOM
}
fi
[[ -n "${precmd_functions[(r)_z_precmd]}" ]] || {
precmd_functions[$(($#precmd_functions+1))]=_z_precmd
}
}
_z_zsh_tab_completion() {
# tab completion
local compl
read -l compl
reply=(${(f)"$(_z --complete "$compl")"})
}
compctl -U -K _z_zsh_tab_completion _z
elif type complete >/dev/null 2>&1; then
# bash
# tab completion
complete -o filenames -C '_z --complete "$COMP_LINE"' ${_Z_CMD:-z}
[ "$_Z_NO_PROMPT_COMMAND" ] || {
# populate directory list. avoid clobbering other PROMPT_COMMANDs.
grep "_z --add" <<< "$PROMPT_COMMAND" >/dev/null || {
PROMPT_COMMAND="$PROMPT_COMMAND"$'\n''(_z --add "$(command pwd '$_Z_RESOLVE_SYMLINKS' 2>/dev/null)" 2>/dev/null &);'
}
}
fi

View File

@ -1,21 +0,0 @@
MIT License
Copyright (c) 2019 altf_four
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@ -1,9 +0,0 @@
# dotfiles
These are the configurations and packages that I use for my setup.
## Install
Have a look at the contents and then run stow <config_dir>
NOTE: MODIFY GITCONFIG BEFORE COPYING.