mirror of https://git.davidovski.xyz/dot.git
Compare commits
4 Commits
1406e81f40
...
561d903ee3
Author | SHA1 | Date |
---|---|---|
davidovski | 561d903ee3 | |
davidovski | c475aefc0f | |
davidovski | 20b78d47c5 | |
davidovski | 381aaffe4e |
11
Xdefaults
11
Xdefaults
|
@ -40,13 +40,12 @@ URxvt.borderColor: BG
|
|||
! Set depth to make transparency work.
|
||||
URxvt*depth: 32
|
||||
|
||||
URxvt.font: xft:mononoki:size=10:antialias=true,xft:MesloLGM Nerd Font:size=10,Noto Sans Mono CJK TC:size=10
|
||||
URxvt.boldFont: xft:mononoki:style=bold:size=10,xft:MesloLGM Nerd Font:size=10,Noto Sans Mono CJK TC:size=10
|
||||
URxvt.italicFont: xft:mononoki:style=italic:size=10
|
||||
URxvt.boldItalicfont: xft:mononoki:style=bolditalic:size=10
|
||||
URxvt.font: xft:mononoki:minispace=False:size=10:antialias=true,xft:MesloLGM Nerd Font:minispace=False:size=10,Noto Sans Mono CJK TC:minispace=False:size=10
|
||||
URxvt.boldFont: xft:mononoki:minispace=False:style=bold:size=10,xft:MesloLGM Nerd Font:minispace=False:size=10,Noto Sans Mono CJK TC:minispace=False:size=10
|
||||
URxvt.italicFont: xft:mononoki:minispace=False:style=italic:size=10
|
||||
URxvt.boldItalicfont: xft:mononoki:minispace=False:style=bolditalic:size=10
|
||||
URxvt.letterSpace: 0
|
||||
URxvt.lineSpace: -4
|
||||
URxvt.geometry: 92x24
|
||||
|
||||
URxvt.internalBorder: 20
|
||||
URxvt.cursorBlink: true
|
||||
|
@ -55,7 +54,7 @@ URxvt.saveline: 2048
|
|||
URxvt.scrollBar: false
|
||||
URxvt.scrollBar_right: false
|
||||
URxvt.pointerBlank: true
|
||||
|
||||
URxvt.geometry: 92x24
|
||||
|
||||
URxvt.urgentOnBell: true
|
||||
URxvt.iso14755: false
|
||||
|
|
103
bashrc
103
bashrc
|
@ -1,103 +0,0 @@
|
|||
# ~/.bashrc: executed by bash(1) for non-login shells.
|
||||
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
|
||||
# for examples
|
||||
|
||||
# If not running interactively, don't do anything
|
||||
case $- in
|
||||
*i*) ;;
|
||||
*) return;;
|
||||
esac
|
||||
|
||||
export VIMINIT="source ~/.config/vim/vimrc"
|
||||
export NVIMINIT="source ~/.config/vim/vimrc"
|
||||
|
||||
# don't put duplicate lines or lines starting with space in the history.
|
||||
# See bash(1) for more options
|
||||
HISTCONTROL=ignoreboth
|
||||
|
||||
# append to the history file, don't overwrite it
|
||||
shopt -s histappend
|
||||
|
||||
# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
|
||||
HISTSIZE=1000
|
||||
HISTFILESIZE=2000
|
||||
|
||||
shopt -s checkwinsize
|
||||
|
||||
if [ -x /usr/bin/dircolors ]; then
|
||||
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
|
||||
alias ls='ls --color=auto'
|
||||
alias dir='dir --color=auto'
|
||||
alias vdir='vdir --color=auto'
|
||||
|
||||
alias grep='grep --color=auto'
|
||||
alias fgrep='fgrep --color=auto'
|
||||
alias egrep='egrep --color=auto'
|
||||
fi
|
||||
|
||||
if [ -f ~/.bash_aliases ]; then
|
||||
. ~/.bash_aliases
|
||||
fi
|
||||
|
||||
if ! shopt -oq posix; then
|
||||
if [ -f /usr/share/bash-completion/bash_completion ]; then
|
||||
. /usr/share/bash-completion/bash_completion
|
||||
elif [ -f /etc/bash_completion ]; then
|
||||
. /etc/bash_completion
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
# parse the current branch and status of git to be added to the prompt
|
||||
function parse_git_branch() {
|
||||
BRANCH=`git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/'`
|
||||
if [ ! "${BRANCH}" == "" ]
|
||||
then
|
||||
STAT=`parse_git_dirty`
|
||||
echo " [${BRANCH}${STAT}]"
|
||||
else
|
||||
echo ""
|
||||
fi
|
||||
}
|
||||
|
||||
function parse_git_dirty {
|
||||
status=`git status 2>&1 | tee`
|
||||
dirty=`echo -n "${status}" 2> /dev/null | grep "modified:" &> /dev/null; echo "$?"`
|
||||
untracked=`echo -n "${status}" 2> /dev/null | grep "Untracked files" &> /dev/null; echo "$?"`
|
||||
ahead=`echo -n "${status}" 2> /dev/null | grep "Your branch is ahead of" &> /dev/null; echo "$?"`
|
||||
newfile=`echo -n "${status}" 2> /dev/null | grep "new file:" &> /dev/null; echo "$?"`
|
||||
renamed=`echo -n "${status}" 2> /dev/null | grep "renamed:" &> /dev/null; echo "$?"`
|
||||
deleted=`echo -n "${status}" 2> /dev/null | grep "deleted:" &> /dev/null; echo "$?"`
|
||||
bits=''
|
||||
if [ "${renamed}" == "0" ]; then
|
||||
bits=">${bits}"
|
||||
fi
|
||||
if [ "${ahead}" == "0" ]; then
|
||||
bits="*${bits}"
|
||||
fi
|
||||
if [ "${newfile}" == "0" ]; then
|
||||
bits="+${bits}"
|
||||
fi
|
||||
if [ "${untracked}" == "0" ]; then
|
||||
bits="?${bits}"
|
||||
fi
|
||||
if [ "${deleted}" == "0" ]; then
|
||||
bits="x${bits}"
|
||||
fi
|
||||
if [ "${dirty}" == "0" ]; then
|
||||
bits="!${bits}"
|
||||
fi
|
||||
if [ ! "${bits}" == "" ]; then
|
||||
echo " ${bits}"
|
||||
else
|
||||
echo ""
|
||||
fi
|
||||
}
|
||||
|
||||
source "$HOME/.scripts/fzf-bash-completion.sh"
|
||||
|
||||
bind -x '"\C-\t": fzf_bash_completion'
|
||||
|
||||
export PS1="\[\e[0;97m\]\w\[\e[0;37m\]\`parse_git_branch\` > \[\e[0;0m\]"
|
||||
|
||||
PATH="/home/david/.mangadl-bash:${PATH}"
|
|
@ -6,26 +6,17 @@ COLOR_SECONDARY="#5977b3"
|
|||
|
||||
xsetroot -cursor_name left_ptr &
|
||||
xrdb ~/.Xdefaults
|
||||
bash $HOME/.config/xrandr.alt.sh
|
||||
|
||||
|
||||
bspc monitor DP-2 -n A
|
||||
bspc monitor DP-1 -n B
|
||||
bspc monitor DP-4 -n C
|
||||
bspc monitor HDMI-0 -n D
|
||||
bspc monitor -d a1 a2 a3 a4 a5 a6 a7 a8 a9
|
||||
|
||||
pgrep -x sxhkd > /dev/null || sxhkd &
|
||||
pgrep -x picom > /dev/null || picom &
|
||||
pgrep -x xss-lock > /dev/null || xss-lock slock &
|
||||
|
||||
$HOME/.config/polybar/launch.sh
|
||||
$HOME/.scripts/bg.sh
|
||||
|
||||
bspc monitor A -d a1 a2 a3 a4 a5 a6 a7 a8 a9
|
||||
bspc monitor B -d b1 b2 b3 b4 b5 b6 b7 b8 b9
|
||||
bspc monitor C -d c1 c2 c3 c4 c5 c6 c7 c8 c9
|
||||
bspc monitor D -d d1 d2
|
||||
|
||||
bspc config border_width 2
|
||||
bspc config border_width 1
|
||||
bspc config window_gap 0
|
||||
|
||||
bspc config focus_follows_pointer false
|
||||
|
@ -35,4 +26,6 @@ bspc config active_border_color "$COLOR_BACKGROUND"
|
|||
bspc config focused_border_color "$COLOR_PRIMARY"
|
||||
wmname bspwm
|
||||
|
||||
sleep 1; $HOME/.scripts/start-mpd
|
||||
urxvt &
|
||||
|
||||
$HOME/.scripts/start-mpd
|
||||
|
|
|
@ -56,7 +56,6 @@
|
|||
# For alsa 'source' will be the capture device.
|
||||
# For fifo 'source' will be the path to fifo-file.
|
||||
# For shmem 'source' will be /squeezelite-AA:BB:CC:DD:EE:FF where 'AA:BB:CC:DD:EE:FF' will be squeezelite's MAC address
|
||||
method = pulse
|
||||
; source = auto
|
||||
|
||||
; method = alsa
|
||||
|
|
|
@ -9,3 +9,5 @@ file:///home/david/hd1/library library
|
|||
file:///tmp tmp
|
||||
file:///home/david/docs/school
|
||||
file:///home/david/video/anime
|
||||
file:///home/david/lmms
|
||||
file:///home/david/docs/proj/ardour
|
||||
|
|
|
@ -3,15 +3,15 @@ input {
|
|||
plugin "curl"
|
||||
}
|
||||
|
||||
audio_output {
|
||||
type "httpd"
|
||||
name "My HTTP Stream"
|
||||
encoder "lame" # optional, vorbis or lame
|
||||
port "6680"
|
||||
bitrate "420"
|
||||
format "44100:16:1"
|
||||
max_clients "0"
|
||||
}
|
||||
#audio_output {
|
||||
# type "httpd"
|
||||
# name "My HTTP Stream"
|
||||
# encoder "lame" # optional, vorbis or lame
|
||||
# port "6680"
|
||||
# bitrate "420"
|
||||
# format "44100:16:1"
|
||||
# max_clients "0"
|
||||
#}
|
||||
|
||||
audio_output {
|
||||
type "pulse"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
vo=gpu
|
||||
#vo=gpu
|
||||
hwdec=auto
|
||||
screenshot-directory=~/pics/screenshot
|
||||
glsl-shaders="~~/shaders/Anime4K_Clamp_Highlights.glsl:~~/shaders/Anime4K_Upscale_Denoise_CNN.glsl:~~/shaders/Anime4K_Restore_CNN_Moderate_M.glsl:~~/shaders/Anime4K_Upscale_CNN_x2_S.glsl"
|
||||
|
|
|
@ -694,7 +694,7 @@ disk_display="off"
|
|||
# Values: 'ascii', 'caca', 'chafa', 'jlp2a', 'iterm2', 'off',
|
||||
# 'pot', 'termpix', 'pixterm', 'tycat', 'w3m', 'kitty'
|
||||
# Flag: --backend
|
||||
image_backend="ascii"
|
||||
#image_backend="ascii"
|
||||
|
||||
# Image Source
|
||||
#
|
||||
|
@ -708,7 +708,7 @@ image_backend="ascii"
|
|||
# NOTE: 'auto' will pick the best image source for whatever image backend is used.
|
||||
# In ascii mode, distro ascii art will be used and in an image mode, your
|
||||
# wallpaper will be used.
|
||||
image_source="auto"
|
||||
#image_source="auto"
|
||||
|
||||
|
||||
# Ascii Options
|
||||
|
@ -760,7 +760,7 @@ image_source="auto"
|
|||
# Slackware, SunOS, LinuxLite, OpenSUSE, Raspbian,
|
||||
# postmarketOS, and Void have a smaller logo variant.
|
||||
# Use '{distro name}_small' to use the small variants.
|
||||
ascii_distro="arch"
|
||||
#ascii_distro="arch"
|
||||
|
||||
# Ascii Colors
|
||||
#
|
||||
|
@ -771,7 +771,7 @@ ascii_distro="arch"
|
|||
# Example:
|
||||
# ascii_colors=(distro) - Ascii is colored based on Distro colors.
|
||||
# ascii_colors=(4 6 1 8 8 6) - Ascii is colored using these colors.
|
||||
ascii_colors=(distro)
|
||||
#ascii_colors=(distro)
|
||||
|
||||
# Bold ascii logo
|
||||
# Whether or not to bold the ascii logo.
|
||||
|
@ -779,7 +779,7 @@ ascii_colors=(distro)
|
|||
# Default: 'on'
|
||||
# Values: 'on', 'off'
|
||||
# Flag: --ascii_bold
|
||||
ascii_bold="on"
|
||||
#ascii_bold="on"
|
||||
|
||||
|
||||
# Image Options
|
||||
|
|
|
@ -291,11 +291,12 @@ blur-background-exclude = [
|
|||
experimental-backends = true;
|
||||
backend = "glx";
|
||||
#backend = "xrender";
|
||||
#backend = "xr_glx_hybrid";
|
||||
|
||||
|
||||
# Enable/disable VSync.
|
||||
# vsync = false
|
||||
vsync = true
|
||||
vsync = false
|
||||
#vsync = true
|
||||
|
||||
# Enable remote control via D-Bus. See the *D-BUS API* section below for more details.
|
||||
# dbus = false
|
||||
|
|
|
@ -79,6 +79,8 @@ label-occupied = %{T2}ﲭ%{T-}
|
|||
label-occupied-padding = 1
|
||||
label-empty = %{T2}ﱤ%{T-}
|
||||
label-empty-padding = 1
|
||||
label-urgent = %{T2}ﲭ%{T-}
|
||||
label-urgent-padding = 1
|
||||
|
||||
|
||||
[module/time]
|
||||
|
@ -169,8 +171,8 @@ time-format = %H:%M
|
|||
format-charging = <animation-charging> <label-charging>
|
||||
format-discharging = <ramp-capacity> <label-discharging>
|
||||
|
||||
label-charging = -%percentage%%
|
||||
label-discharging = -%percentage%%
|
||||
label-charging = %percentage%%
|
||||
label-discharging = %percentage%%
|
||||
label-full = %percentage%%
|
||||
|
||||
ramp-capacity-0 =
|
||||
|
@ -188,7 +190,7 @@ animation-charging-framerate = 750
|
|||
|
||||
[module/network]
|
||||
type = internal/network
|
||||
interface = wlan1
|
||||
interface = wlan0
|
||||
udspeed-minwidth = 5
|
||||
accumulate-stats = true
|
||||
unknown-as-up = true
|
||||
|
|
|
@ -6,19 +6,4 @@ killall -q polybar
|
|||
# Wait until the processes have been shut down
|
||||
while pgrep -u $UID -x polybar >/dev/null; do sleep 0.1; done
|
||||
|
||||
# Launch Polybar, using default config location ~/.config/polybar/config
|
||||
#polybar music &
|
||||
|
||||
#MONITOR=DP-0 polybar --reload wsonly &
|
||||
|
||||
export MONITOR=DP-1
|
||||
polybar wsonly &
|
||||
|
||||
export MONITOR=DP-4
|
||||
polybar wsonly &
|
||||
|
||||
export MONITOR=HDMI-0
|
||||
polybar wsonly &
|
||||
|
||||
export MONITOR=DP-2
|
||||
polybar ws &
|
||||
|
|
|
@ -17,10 +17,6 @@ super + ctrl + alt + f
|
|||
{XF86AudioMute}
|
||||
amixer -D pulse set Master 1+ toggle
|
||||
|
||||
#backlight
|
||||
{XF86MonBrightnessUp, XF86MonBrightnessDown}
|
||||
xbacklight -{inc,dec} 5
|
||||
|
||||
# runner
|
||||
super + r
|
||||
rofi -show drun -show-icons
|
||||
|
@ -52,6 +48,10 @@ super + v
|
|||
super + b
|
||||
$BROWSER
|
||||
|
||||
# open xlinks
|
||||
super + x
|
||||
$HOME/.scripts/links-launcher
|
||||
|
||||
# open email
|
||||
super + m
|
||||
$EMAIL_CLIENT
|
||||
|
@ -151,7 +151,7 @@ super + period
|
|||
|
||||
# file search and open
|
||||
super + slash
|
||||
bspc rule -a \* -o state=floating && $TERMINAL -e ~/.scripts/fzf_menu.sh
|
||||
websearch
|
||||
shift + super + slash
|
||||
bspc rule -a \* -o state=floating && $TERMINAL -e ~/.scripts/fzf_menu.sh
|
||||
|
||||
|
@ -242,7 +242,7 @@ super + ctrl + {_, shift +} Tab
|
|||
bspc node -f {next,prev}.local.!hidden.window
|
||||
|
||||
# focus the next/previous desktop in the current monitor
|
||||
super + ctrl + {Left,Right}
|
||||
super + {Left,Right}
|
||||
bspc desktop -f {prev,next}.local
|
||||
|
||||
# focus the older or newer node in the focus history
|
||||
|
@ -279,6 +279,6 @@ super + alt + shift + {h,j,k,l}
|
|||
bspc node -z {right -20 0,top 0 20,bottom 0 -20,left 20 0}
|
||||
|
||||
# move a floating window
|
||||
super + {Left,Down,Up,Right}
|
||||
ctrl + super + {Left,Down,Up,Right}
|
||||
bspc node -v {-20 0,0 20,0 -20,20 0}
|
||||
|
||||
|
|
|
@ -0,0 +1,78 @@
|
|||
" Vim syntax file
|
||||
" Language: Hare
|
||||
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
syn case match
|
||||
syn keyword hareKeyword let const fn def type static export defer _
|
||||
syn keyword hareBranch for return break continue yield
|
||||
syn keyword hareConditional if else match switch
|
||||
syn keyword hareLabel case
|
||||
syn keyword hareBuiltin len offset free alloc assert append abort delete insert
|
||||
syn keyword hareBuiltin vastart vaarg vaend
|
||||
syn keyword hareOperator is as
|
||||
syn match hareType "\vsize((\_\s|//.*)*\()@!"
|
||||
syn match hareBuiltin "\vsize((\_\s|//.*)*\()@="
|
||||
syn match harePreProc "^use .*;"
|
||||
syn match harePreProc "@[a-z]*"
|
||||
syn match hareOperator "\.\.\." "\.\."
|
||||
|
||||
syn region hareString start=+\z(["']\)+ end=+\z1+ skip=+\\\\\|\\\z1+
|
||||
syn region hareString start=+`+ end=+`+
|
||||
|
||||
"adapted from c.vim
|
||||
"integer number, or floating point number without a dot and with "f".
|
||||
syn match hareNumbers display transparent "\v<\d" contains=hareNumber,hareOctal,hareBinary,hareFloat
|
||||
syn match hareNumber display contained "\v\d+(e[-+]?\d+)?(z|[iu](8|16|32|64)?)?"
|
||||
"hex number
|
||||
syn match hareNumber display contained "\v0x\x+(z|[iu](8|16|32|64)?)?"
|
||||
"octal number
|
||||
syn match hareOctal display contained "\v0o\o+(z|[iu](8|16|32|64)?)?"
|
||||
"binary number
|
||||
syn match hareBinary display contained '\v0b[01]+(z|[iu](8|16|32|64)?)?'
|
||||
syn match hareFloat display contained "\v\d+(e[-+]?\d+)?(f32|f64)"
|
||||
"floating point number, with dot, optional exponent
|
||||
syn match hareFloat display contained "\v\d+\.\d+(e[-+]?\d+)?(f32|f64)?"
|
||||
|
||||
syn match hareSpaceError display excludenl "\v\s+$"
|
||||
syn match hareSpaceError display "\v +\t"me=e-1
|
||||
|
||||
syn keyword hareTodo contained TODO FIXME XXX
|
||||
syn region hareComment start="//" end="$" contains=hareTodo,@Spell
|
||||
|
||||
syn keyword hareType u8 u16 u32 u64 i8 i16 i32 i64
|
||||
syn keyword hareType uint int
|
||||
syn keyword hareType uintptr
|
||||
syn keyword hareType f32 f64
|
||||
syn keyword hareType bool
|
||||
syn keyword hareType char str
|
||||
syn keyword hareType void
|
||||
syn keyword hareType struct union
|
||||
syn keyword hareType enum
|
||||
syn keyword hareType nullable
|
||||
syn keyword hareType rune
|
||||
syn keyword hareType valist
|
||||
syn keyword hareNull null
|
||||
syn keyword hareBoolean true false
|
||||
|
||||
hi def link hareBinary Number
|
||||
hi def link hareBoolean Boolean
|
||||
hi def link hareBranch Repeat
|
||||
hi def link hareBuiltin Function
|
||||
hi def link hareComment Comment
|
||||
hi def link hareConditional Conditional
|
||||
hi def link hareFloat Number
|
||||
hi def link hareKeyword Keyword
|
||||
hi def link hareLabel Label
|
||||
hi def link hareNull Constant
|
||||
hi def link hareNumber Number
|
||||
hi def link hareOctal Number
|
||||
hi def link hareOperator Operator
|
||||
hi def link harePreProc PreProc
|
||||
hi def link hareString String
|
||||
hi def link hareTodo Todo
|
||||
hi def link hareType Type
|
||||
hi def link hareSpaceError Error
|
||||
" vim: tabstop=8 shiftwidth=2 expandtab
|
14
deploy.sh
14
deploy.sh
|
@ -1,11 +1,11 @@
|
|||
#!/bin/sh
|
||||
|
||||
configurations=( iocane bg bspwm cava neofetch mpd mpv ncmpcpp vim sxhkd polybar picom rofi user-dirs.dirs gtk-3.0)
|
||||
configurations="iocane bg bspwm cava neofetch mpd mpv ncmpcpp vim sxhkd polybar picom rofi user-dirs.dirs gtk-3.0"
|
||||
|
||||
|
||||
save () {
|
||||
mkdir config
|
||||
for i in "${configurations[@]}"; do
|
||||
for i in ${configurations}; do
|
||||
cp -r "$HOME/.config/$i" config/
|
||||
done
|
||||
|
||||
|
@ -13,8 +13,8 @@ save () {
|
|||
cp -r "$HOME/.scripts" scripts
|
||||
|
||||
cp $HOME/.profile profile
|
||||
cp $HOME/.bashrc bashrc
|
||||
cp $HOME/.bash_aliases bash_aliases
|
||||
cp $HOME/.mkshrc mkshrc
|
||||
cp $HOME/.sh_aliases sh_aliases
|
||||
cp $HOME/.Xdefaults Xdefaults
|
||||
cp $HOME/.xinitrc xinitrc
|
||||
|
||||
|
@ -50,14 +50,14 @@ load () {
|
|||
printf "\033[31mWARNING THIS WILL REPLACE EXISTING CONFIGURATIONS\n\033[0mTo proceed type 'confirm': "
|
||||
read confirmation
|
||||
|
||||
if [[ $confirmation == "confirm" ]]; then
|
||||
if [ $confirmation = "confirm" ]; then
|
||||
mkdir -p $HOME/.config
|
||||
cp -r config/* $HOME/.config
|
||||
mkdir -p $HOME/.scripts
|
||||
cp -r scripts/* $HOME/.scripts
|
||||
|
||||
cp bashrc $HOME/.bashrc
|
||||
cp bash_aliases $HOME/.bash_aliases
|
||||
cp mkshrc $HOME/.mkshrc
|
||||
cp sh_aliases $HOME/.sh_aliases
|
||||
|
||||
cp Xdefaults $HOME/.Xdefaults
|
||||
cp xinitrc $HOME/.xinitrc
|
||||
|
|
|
@ -0,0 +1,56 @@
|
|||
#!/bin/mksh
|
||||
case $- in
|
||||
*i*) ;;
|
||||
*) return;;
|
||||
esac
|
||||
|
||||
export VIMINIT="source ~/.config/vim/vimrc"
|
||||
export NVIMINIT="source ~/.config/vim/vimrc"
|
||||
|
||||
if [ -x /usr/bin/dircolors ]; then
|
||||
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
|
||||
alias ls='ls --color=auto'
|
||||
alias dir='dir --color=auto'
|
||||
alias vdir='vdir --color=auto'
|
||||
|
||||
alias grep='grep --color=auto'
|
||||
alias fgrep='fgrep --color=auto'
|
||||
alias egrep='egrep --color=auto'
|
||||
fi
|
||||
|
||||
[ -f ~/.sh_aliases ] && . ~/.sh_aliases
|
||||
[ -f ~/.profile ] && . ~/.profile
|
||||
|
||||
# parse the current branch and status of git to be added to the prompt
|
||||
function parse_git_branch() {
|
||||
BRANCH=`git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/'`
|
||||
if [ ! "${BRANCH}" == "" ]
|
||||
then
|
||||
STAT=`parse_git_dirty`
|
||||
echo " [${BRANCH}${STAT}]"
|
||||
else
|
||||
echo ""
|
||||
fi
|
||||
}
|
||||
|
||||
function parse_git_dirty {
|
||||
status=`git status 2>&1 | tee`
|
||||
dirty=`echo -n "${status}" 2> /dev/null | grep "modified:" &> /dev/null; echo "$?"`
|
||||
untracked=`echo -n "${status}" 2> /dev/null | grep "Untracked files" &> /dev/null; echo "$?"`
|
||||
ahead=`echo -n "${status}" 2> /dev/null | grep "Your branch is ahead of" &> /dev/null; echo "$?"`
|
||||
newfile=`echo -n "${status}" 2> /dev/null | grep "new file:" &> /dev/null; echo "$?"`
|
||||
renamed=`echo -n "${status}" 2> /dev/null | grep "renamed:" &> /dev/null; echo "$?"`
|
||||
deleted=`echo -n "${status}" 2> /dev/null | grep "deleted:" &> /dev/null; echo "$?"`
|
||||
bits=''
|
||||
[ "${renamed}" == "0" ] && bits=">${bits}"
|
||||
[ "${ahead}" == "0" ] && bits="*${bits}"
|
||||
[ "${newfile}" == "0" ] && bits="+${bits}"
|
||||
[ "${untracked}" == "0" ] && bits="?${bits}"
|
||||
[ "${deleted}" == "0" ] && bits="x${bits}"
|
||||
[ "${dirty}" == "0" ] && bits="!${bits}"
|
||||
[ ! "${bits}" == "" ] && echo " ${bits}" || echo ""
|
||||
}
|
||||
|
||||
bind '^L=clear-screen'
|
||||
|
||||
export PS1=$(echo -e "\e[0;97m\${PWD/#\$HOME/\~}\e[0;37m\`parse_git_branch\` > \e[0;0m")
|
43
profile
43
profile
|
@ -1,46 +1,17 @@
|
|||
# ~/.profile: executed by the command interpreter for login shells.
|
||||
# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login
|
||||
# exists.
|
||||
# see /usr/share/doc/bash/examples/startup-files for examples.
|
||||
# the files are located in the bash-doc package.
|
||||
|
||||
# the default umask is set in /etc/profile; for setting the umask
|
||||
# for ssh logins, install and configure the libpam-umask package.
|
||||
#umask 022
|
||||
[ -n "$BASH_VERSION" ] && [ -f "$HOME/.bashrc" ] && . "$HOME/.bashrc"
|
||||
|
||||
# if running bash
|
||||
if [ -n "$BASH_VERSION" ]; then
|
||||
# include .bashrc if it exists
|
||||
if [ -f "$HOME/.bashrc" ]; then
|
||||
. "$HOME/.bashrc"
|
||||
fi
|
||||
fi
|
||||
[ -d "$HOME/bin" ] && PATH="$HOME/bin:$PATH"
|
||||
[ -d "$HOME/.local/bin" ] && PATH="$HOME/.local/bin:$PATH"
|
||||
[ -d "$HOME/.scripts" ] && PATH="$HOME/.scripts:$PATH"
|
||||
|
||||
# set PATH so it includes user's private bin if it exists
|
||||
if [ -d "$HOME/bin" ] ; then
|
||||
PATH="$HOME/bin:$PATH"
|
||||
fi
|
||||
|
||||
# set PATH so it includes user's private bin if it exists
|
||||
if [ -d "$HOME/.local/bin" ] ; then
|
||||
PATH="$HOME/.local/bin:$PATH"
|
||||
fi
|
||||
|
||||
|
||||
if [ -d "$HOME/.scripts" ] ; then
|
||||
PATH="$HOME/.scripts:$PATH"
|
||||
fi
|
||||
|
||||
#export LC_ALL="C"
|
||||
#export TERMINAL="konsole --hide-menubar --profile qtile"
|
||||
alias editor=vim
|
||||
|
||||
export TERMINAL="urxvt"
|
||||
export BROWSER="/usr/bin/chromium"
|
||||
export BROWSER="/usr/bin/chromium-browser"
|
||||
export FILE_MANAGER="/usr/bin/thunar"
|
||||
export EMAIL_CLIENT="/usr/bin/thunderbird"
|
||||
export BLOG_DIR="/home/david/docs/proj/blog"
|
||||
export EDITOR="/usr/bin/vim"
|
||||
|
||||
export ANDROID_SDK_ROOT=/opt/android-sdk
|
||||
[[ $(fgconsole 2>/dev/null) == 1 ]] && exec startx -- vt1 &> /dev/null
|
||||
[ "$(fgconsole 2>/dev/null)" = "1" ] && exec startx -- vt1 &> /dev/null
|
||||
|
||||
|
|
|
@ -1,2 +1,3 @@
|
|||
#!/bin/sh
|
||||
feh --force-aliasing --bg-fill ~/.config/bg
|
||||
feh --force-aliasing --bg-tile ~/.config/dither.png
|
||||
#feh --force-aliasing --bg-fill ~/.config/bg
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
#!/bin/sh
|
||||
MAIN_DP=DP-2;
|
||||
MAIN_DP=DP-0;
|
||||
v=$(xrandr --current --verbose | grep "Brightness" | cut -f2 -d " " | tr '\n' '*' | rev | cut -c 2- | rev | sed -e "s/$/==1/" | bc -l | grep -q 0 && echo 1 || echo 0); xrandr | grep " connected" | cut -f1 -d " " | while read -r line; do echo $line | grep -q $MAIN_DP && : || xrandr --output $line --brightness $v; done
|
||||
|
|
|
@ -42,9 +42,9 @@ _fzf_bash_completion_flatten_subshells() {
|
|||
printf '%s\n' "$line$buffer"
|
||||
buffer=
|
||||
fi
|
||||
done < <(tac)
|
||||
done < <(cat)
|
||||
printf '%s\n' "$buffer"
|
||||
) | tac
|
||||
) | cat
|
||||
}
|
||||
|
||||
_fzf_bash_completion_find_matching_bracket() {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#!/bin/bash
|
||||
MAIN_DP=DP-2;
|
||||
MAIN_DP=DP-0;
|
||||
|
||||
v=$1
|
||||
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
#!/bin/sh
|
||||
|
||||
startpage=${1:-https://search.davidovski.xyz/}
|
||||
|
||||
bin="$(which links || which xlinks)"
|
||||
|
||||
[ "${#DISPLAY}" = "0" ] || opts="-g -html-g-text-color 0xf58f44 -html-g-background-color 0x191919 -font /home/david/.fonts/ttf-mononoki/mononoki-Regular.ttf"
|
||||
|
||||
$bin $opts $startpage
|
||||
|
|
@ -1,2 +1,3 @@
|
|||
#!/bin/sh
|
||||
i3lock-fancy -p -t ''
|
||||
#i3lock-fancy -p -t ''
|
||||
slock
|
||||
|
|
|
@ -1,2 +1,3 @@
|
|||
#!/bin/sh
|
||||
|
||||
printf "suspend\nreboot\npoweroff\nhibernate" | rofi -dmenu -p "systemctl" | xargs -r systemctl
|
||||
|
|
|
@ -0,0 +1,19 @@
|
|||
#!/bin/sh
|
||||
info=/tmp/wminfo
|
||||
|
||||
xwininfo > /tmp/wminfo
|
||||
|
||||
geom=$(cat $info | grep "geometry" | cut -d' ' -f4)
|
||||
|
||||
width=$(cat $info | grep Width | cut -d' ' -f4)
|
||||
height=$(cat $info | grep Height | cut -d' ' -f4)
|
||||
|
||||
size="${width}x${height}"
|
||||
position=+$(echo $geom | cut -d'+' -f2- | sed "s/+/,/g")
|
||||
|
||||
filename=$(date +"$HOME/pics/screenshot/%F_%T.mp4")
|
||||
|
||||
echo $size and $position
|
||||
ffmpeg -y -f x11grab -video_size $size -i $position $filename
|
||||
|
||||
rm $info
|
|
@ -1,2 +1,2 @@
|
|||
#!/bin/bash
|
||||
maim -su /dev/stdout | tee >(xclip -selection clipboard -t image/png) > $(date +"$HOME/pics/screenshot/%F_%T.png")
|
||||
maim -su /dev/stdout | tee $(date +"$HOME/pics/screenshot/%F_%T.png") | xclip -selection clipboard -t image/png
|
||||
|
|
|
@ -9,10 +9,10 @@ tablet_ratio = (lambda s: float(s[0]) / float(s[1]))(sys.argv[4].split(":")) if
|
|||
|
||||
#Layout of screens: (x, y, w, h)
|
||||
screens = [
|
||||
(3840, 0, 1080, 1920),
|
||||
(1280, 0, 2560, 1440),
|
||||
(4920, 0, 1080, 1920),
|
||||
(0, 0, 1280, 1024),
|
||||
(1280, 0, 2560, 1440),
|
||||
(3840, 0, 1080, 1920),
|
||||
(4920, 0, 1080, 1920),
|
||||
]
|
||||
|
||||
#TODO find this with xrandr
|
||||
|
|
|
@ -1,14 +1,17 @@
|
|||
#!/bin/sh
|
||||
|
||||
|
||||
SEARCH_ENGINE="https://search.brave.com/search?q="
|
||||
SEARCH_HISTORY=/tmp/.search_history
|
||||
browser="links-launcher"
|
||||
SEARCH_ENGINE="https://librex.beparanoid.de/search.php?q="
|
||||
SEARCH_HISTORY=$HOME/.local/share/search_history
|
||||
|
||||
SEARCH=$(cat $SEARCH_HISTORY | dmenu -p "search")
|
||||
|
||||
touch $SEARCH_HISTORY
|
||||
echo "$SEARCH" >> $SEARCH_HISTORY
|
||||
|
||||
cat <<< "$SEARCH
|
||||
$(cat $SEARCH_HISTORY)" > $SEARCH_HISTORY
|
||||
query=$(echo $SEARCH | sed 's/ /+/g')
|
||||
|
||||
brave "$SEARCH_ENGINE$SEARCH"
|
||||
echo $query | grep -q '(?=^.{5,254}$)(^(?:(?!\d+\.)[a-zA-Z0-9_\-]{1,63}\.?)+(?:[a-zA-Z]{2,})$)' && {
|
||||
links-launcher "$query"
|
||||
} || {
|
||||
links-launcher "$SEARCH_ENGINE$query"
|
||||
}
|
||||
|
|
|
@ -47,15 +47,28 @@ bitrate () {
|
|||
}
|
||||
|
||||
alias syncdir="sudo rsync -rv --no-perms --no-owner --no-group --delete"
|
||||
alias chromium-tor="chromium --incognito --proxy-server=socks5://localhost:9050 --user-data-dir=/tmp"
|
||||
alias chromium-tor="chromium --incognito --proxy-server=socks5://localhost:9050 --user-data-dir=/tmp/tor"
|
||||
alias chromium-i2p="chromium --incognito --proxy-server=socks5://localhost:4447 --user-data-dir=/tmp/i2p"
|
||||
|
||||
alarmclock () {
|
||||
sudo rtcwake -m no -t "$(date -d 'tomorrow 07:00:00' '+%s')" && echo 'set alarm for tomorrow at 7am'
|
||||
}
|
||||
|
||||
# does tail -f on a dir... bit of a hack
|
||||
# i spelled this wrong on purpose i think
|
||||
mutlitail1 () {
|
||||
while true; do
|
||||
f=$(ls -1 --sort time $1| head -1);
|
||||
tail -$(tput lines) $1/$f; done;
|
||||
f=$(ls -1 --sort time $@| head -1 | xargs realpath);
|
||||
tail -$(tput lines) $f;
|
||||
done;
|
||||
}
|
||||
|
||||
alias watchdirty="watch grep -e Dirty: -e Writeback: /proc/meminfo"
|
||||
|
||||
passthrough_disable () {
|
||||
sudo mv /etc/modprobe.d/vfio.conf /etc/modprobe.d/vfio.conf.disabled
|
||||
}
|
||||
passthrough_enable () {
|
||||
sudo mv /etc/modprobe.d/vfio.conf /etc/modprobe.d/vfio.conf.disabled
|
||||
}
|
||||
alias links="xlinks -g -html-g-text-color 0xf58f44 -html-g-background-color 0x191919 -font /home/david/.fonts/ttf-mononoki/mononoki-Regular.ttf"
|
Loading…
Reference in New Issue