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.
|
! Set depth to make transparency work.
|
||||||
URxvt*depth: 32
|
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.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:style=bold:size=10,xft:MesloLGM Nerd Font:size=10,Noto Sans Mono CJK TC: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:style=italic:size=10
|
URxvt.italicFont: xft:mononoki:minispace=False:style=italic:size=10
|
||||||
URxvt.boldItalicfont: xft:mononoki:style=bolditalic:size=10
|
URxvt.boldItalicfont: xft:mononoki:minispace=False:style=bolditalic:size=10
|
||||||
URxvt.letterSpace: 0
|
URxvt.letterSpace: 0
|
||||||
URxvt.lineSpace: -4
|
URxvt.lineSpace: -4
|
||||||
URxvt.geometry: 92x24
|
|
||||||
|
|
||||||
URxvt.internalBorder: 20
|
URxvt.internalBorder: 20
|
||||||
URxvt.cursorBlink: true
|
URxvt.cursorBlink: true
|
||||||
|
@ -55,7 +54,7 @@ URxvt.saveline: 2048
|
||||||
URxvt.scrollBar: false
|
URxvt.scrollBar: false
|
||||||
URxvt.scrollBar_right: false
|
URxvt.scrollBar_right: false
|
||||||
URxvt.pointerBlank: true
|
URxvt.pointerBlank: true
|
||||||
|
URxvt.geometry: 92x24
|
||||||
|
|
||||||
URxvt.urgentOnBell: true
|
URxvt.urgentOnBell: true
|
||||||
URxvt.iso14755: false
|
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 &
|
xsetroot -cursor_name left_ptr &
|
||||||
xrdb ~/.Xdefaults
|
xrdb ~/.Xdefaults
|
||||||
bash $HOME/.config/xrandr.alt.sh
|
|
||||||
|
|
||||||
|
bspc monitor -d a1 a2 a3 a4 a5 a6 a7 a8 a9
|
||||||
bspc monitor DP-2 -n A
|
|
||||||
bspc monitor DP-1 -n B
|
|
||||||
bspc monitor DP-4 -n C
|
|
||||||
bspc monitor HDMI-0 -n D
|
|
||||||
|
|
||||||
pgrep -x sxhkd > /dev/null || sxhkd &
|
pgrep -x sxhkd > /dev/null || sxhkd &
|
||||||
pgrep -x picom > /dev/null || picom &
|
pgrep -x picom > /dev/null || picom &
|
||||||
|
pgrep -x xss-lock > /dev/null || xss-lock slock &
|
||||||
|
|
||||||
$HOME/.config/polybar/launch.sh
|
$HOME/.config/polybar/launch.sh
|
||||||
$HOME/.scripts/bg.sh
|
$HOME/.scripts/bg.sh
|
||||||
|
|
||||||
bspc monitor A -d a1 a2 a3 a4 a5 a6 a7 a8 a9
|
bspc config border_width 1
|
||||||
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 window_gap 0
|
bspc config window_gap 0
|
||||||
|
|
||||||
bspc config focus_follows_pointer false
|
bspc config focus_follows_pointer false
|
||||||
|
@ -35,4 +26,6 @@ bspc config active_border_color "$COLOR_BACKGROUND"
|
||||||
bspc config focused_border_color "$COLOR_PRIMARY"
|
bspc config focused_border_color "$COLOR_PRIMARY"
|
||||||
wmname bspwm
|
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 alsa 'source' will be the capture device.
|
||||||
# For fifo 'source' will be the path to fifo-file.
|
# 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
|
# 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
|
; source = auto
|
||||||
|
|
||||||
; method = alsa
|
; method = alsa
|
||||||
|
|
|
@ -9,3 +9,5 @@ file:///home/david/hd1/library library
|
||||||
file:///tmp tmp
|
file:///tmp tmp
|
||||||
file:///home/david/docs/school
|
file:///home/david/docs/school
|
||||||
file:///home/david/video/anime
|
file:///home/david/video/anime
|
||||||
|
file:///home/david/lmms
|
||||||
|
file:///home/david/docs/proj/ardour
|
||||||
|
|
|
@ -3,15 +3,15 @@ input {
|
||||||
plugin "curl"
|
plugin "curl"
|
||||||
}
|
}
|
||||||
|
|
||||||
audio_output {
|
#audio_output {
|
||||||
type "httpd"
|
# type "httpd"
|
||||||
name "My HTTP Stream"
|
# name "My HTTP Stream"
|
||||||
encoder "lame" # optional, vorbis or lame
|
# encoder "lame" # optional, vorbis or lame
|
||||||
port "6680"
|
# port "6680"
|
||||||
bitrate "420"
|
# bitrate "420"
|
||||||
format "44100:16:1"
|
# format "44100:16:1"
|
||||||
max_clients "0"
|
# max_clients "0"
|
||||||
}
|
#}
|
||||||
|
|
||||||
audio_output {
|
audio_output {
|
||||||
type "pulse"
|
type "pulse"
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
vo=gpu
|
#vo=gpu
|
||||||
hwdec=auto
|
hwdec=auto
|
||||||
screenshot-directory=~/pics/screenshot
|
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"
|
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',
|
# Values: 'ascii', 'caca', 'chafa', 'jlp2a', 'iterm2', 'off',
|
||||||
# 'pot', 'termpix', 'pixterm', 'tycat', 'w3m', 'kitty'
|
# 'pot', 'termpix', 'pixterm', 'tycat', 'w3m', 'kitty'
|
||||||
# Flag: --backend
|
# Flag: --backend
|
||||||
image_backend="ascii"
|
#image_backend="ascii"
|
||||||
|
|
||||||
# Image Source
|
# Image Source
|
||||||
#
|
#
|
||||||
|
@ -708,7 +708,7 @@ image_backend="ascii"
|
||||||
# NOTE: 'auto' will pick the best image source for whatever image backend is used.
|
# 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
|
# In ascii mode, distro ascii art will be used and in an image mode, your
|
||||||
# wallpaper will be used.
|
# wallpaper will be used.
|
||||||
image_source="auto"
|
#image_source="auto"
|
||||||
|
|
||||||
|
|
||||||
# Ascii Options
|
# Ascii Options
|
||||||
|
@ -760,7 +760,7 @@ image_source="auto"
|
||||||
# Slackware, SunOS, LinuxLite, OpenSUSE, Raspbian,
|
# Slackware, SunOS, LinuxLite, OpenSUSE, Raspbian,
|
||||||
# postmarketOS, and Void have a smaller logo variant.
|
# postmarketOS, and Void have a smaller logo variant.
|
||||||
# Use '{distro name}_small' to use the small variants.
|
# Use '{distro name}_small' to use the small variants.
|
||||||
ascii_distro="arch"
|
#ascii_distro="arch"
|
||||||
|
|
||||||
# Ascii Colors
|
# Ascii Colors
|
||||||
#
|
#
|
||||||
|
@ -771,7 +771,7 @@ ascii_distro="arch"
|
||||||
# Example:
|
# Example:
|
||||||
# ascii_colors=(distro) - Ascii is colored based on Distro colors.
|
# 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=(4 6 1 8 8 6) - Ascii is colored using these colors.
|
||||||
ascii_colors=(distro)
|
#ascii_colors=(distro)
|
||||||
|
|
||||||
# Bold ascii logo
|
# Bold ascii logo
|
||||||
# Whether or not to bold the ascii logo.
|
# Whether or not to bold the ascii logo.
|
||||||
|
@ -779,7 +779,7 @@ ascii_colors=(distro)
|
||||||
# Default: 'on'
|
# Default: 'on'
|
||||||
# Values: 'on', 'off'
|
# Values: 'on', 'off'
|
||||||
# Flag: --ascii_bold
|
# Flag: --ascii_bold
|
||||||
ascii_bold="on"
|
#ascii_bold="on"
|
||||||
|
|
||||||
|
|
||||||
# Image Options
|
# Image Options
|
||||||
|
|
|
@ -291,11 +291,12 @@ blur-background-exclude = [
|
||||||
experimental-backends = true;
|
experimental-backends = true;
|
||||||
backend = "glx";
|
backend = "glx";
|
||||||
#backend = "xrender";
|
#backend = "xrender";
|
||||||
|
#backend = "xr_glx_hybrid";
|
||||||
|
|
||||||
|
|
||||||
# Enable/disable VSync.
|
# Enable/disable VSync.
|
||||||
# vsync = false
|
vsync = false
|
||||||
vsync = true
|
#vsync = true
|
||||||
|
|
||||||
# Enable remote control via D-Bus. See the *D-BUS API* section below for more details.
|
# Enable remote control via D-Bus. See the *D-BUS API* section below for more details.
|
||||||
# dbus = false
|
# dbus = false
|
||||||
|
|
|
@ -1,16 +1,16 @@
|
||||||
[pos]
|
[pos]
|
||||||
offsetx = 24
|
offsetx = 24
|
||||||
offsety = 24
|
offsety = 24
|
||||||
|
|
||||||
[color]
|
[color]
|
||||||
bg = #191919
|
bg = #191919
|
||||||
bga = #191919
|
bga = #191919
|
||||||
fg1= #f58d44
|
fg1 = #f58d44
|
||||||
fg2 = #5f819d
|
fg2 = #5f819d
|
||||||
|
|
||||||
|
|
||||||
[bar/base]
|
[bar/base]
|
||||||
monitor = ${env:MONITOR}
|
monitor = ${env:MONITOR}
|
||||||
|
|
||||||
enable-ipc = true
|
enable-ipc = true
|
||||||
font-0 = mononoki:style=Regular:pixelsize=11;3
|
font-0 = mononoki:style=Regular:pixelsize=11;3
|
||||||
|
@ -18,34 +18,34 @@ font-1 = mononoki:style=Regular:pixelsize=15;4
|
||||||
font-2 = mononoki:style=Regular:pixelsize=19;5
|
font-2 = mononoki:style=Regular:pixelsize=19;5
|
||||||
font-3 = mononoki:style=Regular:pixelsize=11;3
|
font-3 = mononoki:style=Regular:pixelsize=11;3
|
||||||
font-4 = MesloLGM Nerd Font Mono:style=Regular:pixelsize=14;2
|
font-4 = MesloLGM Nerd Font Mono:style=Regular:pixelsize=14;2
|
||||||
font-5 = Noto Sans Mono CJK TC:style=Medium,Regular;pixelsize=10;2
|
font-5 = Noto Sans Mono CJK TC:style=Medium,Regular;pixelsize=10;2
|
||||||
|
|
||||||
height = 25
|
height = 25
|
||||||
background = ${color.bga}
|
background = ${color.bga}
|
||||||
|
|
||||||
module-margin = 1
|
module-margin = 1
|
||||||
wm-restack = bspwm
|
wm-restack = bspwm
|
||||||
radius = 0
|
radius = 0
|
||||||
foreground = ${color.fg1}
|
foreground = ${color.fg1}
|
||||||
|
|
||||||
padding-right = 1
|
padding-right = 1
|
||||||
|
|
||||||
[bar/wsonly]
|
[bar/wsonly]
|
||||||
inherit = bar/base
|
inherit = bar/base
|
||||||
width = 100%
|
width = 100%
|
||||||
modules-left = workspaces
|
modules-left = workspaces
|
||||||
modules-right = time
|
modules-right = time
|
||||||
|
|
||||||
[bar/ws]
|
[bar/ws]
|
||||||
inherit = bar/base
|
inherit = bar/base
|
||||||
width = 100%
|
width = 100%
|
||||||
offset-x = 0
|
offset-x = 0
|
||||||
modules-left = workspaces xwindow
|
modules-left = workspaces xwindow
|
||||||
modules-right = mpd temperature memory wlan battery pulseaudio microphone time
|
modules-right = mpd temperature memory wlan battery pulseaudio microphone time
|
||||||
tray-position = right
|
tray-position = right
|
||||||
background = ${color.bga}
|
background = ${color.bga}
|
||||||
border-size = 0
|
border-size = 0
|
||||||
fg = ${color.fg1}
|
fg = ${color.fg1}
|
||||||
|
|
||||||
|
|
||||||
[module/wsnumber]
|
[module/wsnumber]
|
||||||
|
@ -63,22 +63,24 @@ type = internal/xwindow
|
||||||
label = %title:0:40:%
|
label = %title:0:40:%
|
||||||
|
|
||||||
[module/workspaces]
|
[module/workspaces]
|
||||||
type = internal/xworkspaces
|
type = internal/xworkspaces
|
||||||
|
|
||||||
pin-workspaces = true
|
pin-workspaces = true
|
||||||
|
|
||||||
enable-click = true
|
enable-click = true
|
||||||
enable-scroll = true
|
enable-scroll = true
|
||||||
|
|
||||||
format = <label-state>
|
format = <label-state>
|
||||||
format-padding = 0
|
format-padding = 0
|
||||||
label-monitor = %name%
|
label-monitor = %name%
|
||||||
label-active = %{T2}雷%{T-}
|
label-active = %{T2}雷%{T-}
|
||||||
label-active-padding = 1
|
label-active-padding = 1
|
||||||
label-occupied = %{T2}ﲭ%{T-}
|
label-occupied = %{T2}ﲭ%{T-}
|
||||||
label-occupied-padding = 1
|
label-occupied-padding = 1
|
||||||
label-empty = %{T2}ﱤ%{T-}
|
label-empty = %{T2}ﱤ%{T-}
|
||||||
label-empty-padding = 1
|
label-empty-padding = 1
|
||||||
|
label-urgent = %{T2}ﲭ%{T-}
|
||||||
|
label-urgent-padding = 1
|
||||||
|
|
||||||
|
|
||||||
[module/time]
|
[module/time]
|
||||||
|
@ -94,13 +96,13 @@ type = internal/mpd
|
||||||
host = 127.0.0.1
|
host = 127.0.0.1
|
||||||
port = 6600
|
port = 6600
|
||||||
|
|
||||||
format-online = <label-song> <icon-prev> <toggle> <icon-next> <bar-progress>
|
format-online = <label-song> <icon-prev> <toggle> <icon-next> <bar-progress>
|
||||||
label-song = %title%
|
label-song = %title%
|
||||||
|
|
||||||
bar-progress-width = 12
|
bar-progress-width = 12
|
||||||
bar-progress-indicator = |
|
bar-progress-indicator = |
|
||||||
bar-progress-fill = ─
|
bar-progress-fill = ─
|
||||||
bar-progress-empty = ─
|
bar-progress-empty = ─
|
||||||
|
|
||||||
format-online-padding = 0
|
format-online-padding = 0
|
||||||
|
|
||||||
|
@ -109,11 +111,11 @@ format-offline-padding = 0
|
||||||
label-song-maxlen = 40
|
label-song-maxlen = 40
|
||||||
label-song-ellipsis = true
|
label-song-ellipsis = true
|
||||||
|
|
||||||
icon-play =
|
icon-play =
|
||||||
bar-empty = ─
|
bar-empty = ─
|
||||||
icon-pause =
|
icon-pause =
|
||||||
icon-prev =
|
icon-prev =
|
||||||
icon-next =
|
icon-next =
|
||||||
|
|
||||||
|
|
||||||
[module/pulseaudio]
|
[module/pulseaudio]
|
||||||
|
@ -131,71 +133,71 @@ ramp-volume-2 = ""
|
||||||
label-muted = "%{T3} %{T-}--%"
|
label-muted = "%{T3} %{T-}--%"
|
||||||
|
|
||||||
[module/microphone]
|
[module/microphone]
|
||||||
type = custom/script
|
type = custom/script
|
||||||
exec = pactl list sources | grep -qi 'Mute: yes' && echo "" || echo ""
|
exec = pactl list sources | grep -qi 'Mute: yes' && echo "" || echo ""
|
||||||
interval = 1
|
interval = 1
|
||||||
click-left = pactl list sources | grep -qi 'Mute: yes' && pactl set-source-mute 2 false || pactl set-source-mute 2 true
|
click-left = pactl list sources | grep -qi 'Mute: yes' && pactl set-source-mute 2 false || pactl set-source-mute 2 true
|
||||||
|
|
||||||
[module/vpn]
|
[module/vpn]
|
||||||
type = custom/script
|
type = custom/script
|
||||||
exec = echo vpn
|
exec = echo vpn
|
||||||
exec-if = pgrep -x openvpn
|
exec-if = pgrep -x openvpn
|
||||||
interval = 5
|
interval = 5
|
||||||
format-underline = #268bd2
|
format-underline = #268bd2
|
||||||
format-prefix = "🖧 "
|
format-prefix = "🖧 "
|
||||||
format-prefix-foreground = #5b
|
format-prefix-foreground = #5b
|
||||||
|
|
||||||
[module/temperature]
|
[module/temperature]
|
||||||
type = custom/script
|
type = custom/script
|
||||||
exec = sensors | awk '/^Tctl:/ { print substr($2, 2) }'
|
exec = sensors | awk '/^Tctl:/ { print substr($2, 2) }'
|
||||||
format-prefix = " "
|
format-prefix = " "
|
||||||
interval = 1
|
interval = 1
|
||||||
|
|
||||||
[module/memory]
|
[module/memory]
|
||||||
type = custom/script
|
type = custom/script
|
||||||
exec = free -h | awk '/^Mem:/ {print $3 "/" $2}'
|
exec = free -h | awk '/^Mem:/ {print $3 "/" $2}'
|
||||||
interval = 1
|
interval = 1
|
||||||
format-prefix = "力 "
|
format-prefix = "力 "
|
||||||
|
|
||||||
[module/battery]
|
[module/battery]
|
||||||
type = internal/battery
|
type = internal/battery
|
||||||
full-at = 99
|
full-at = 99
|
||||||
battery = BAT1
|
battery = BAT1
|
||||||
adapter = ADP1
|
adapter = ADP1
|
||||||
|
|
||||||
poll-interval = 3
|
poll-interval = 3
|
||||||
time-format = %H:%M
|
time-format = %H:%M
|
||||||
|
|
||||||
format-charging = <animation-charging> <label-charging>
|
format-charging = <animation-charging> <label-charging>
|
||||||
format-discharging = <ramp-capacity> <label-discharging>
|
format-discharging = <ramp-capacity> <label-discharging>
|
||||||
|
|
||||||
label-charging = -%percentage%%
|
label-charging = %percentage%%
|
||||||
label-discharging = -%percentage%%
|
label-discharging = %percentage%%
|
||||||
label-full = %percentage%%
|
label-full = %percentage%%
|
||||||
|
|
||||||
ramp-capacity-0 =
|
ramp-capacity-0 =
|
||||||
ramp-capacity-1 =
|
ramp-capacity-1 =
|
||||||
ramp-capacity-2 =
|
ramp-capacity-2 =
|
||||||
ramp-capacity-3 =
|
ramp-capacity-3 =
|
||||||
ramp-capacity-4 =
|
ramp-capacity-4 =
|
||||||
|
|
||||||
animation-charging-0 =
|
animation-charging-0 =
|
||||||
animation-charging-1 =
|
animation-charging-1 =
|
||||||
animation-charging-2 =
|
animation-charging-2 =
|
||||||
animation-charging-3 =
|
animation-charging-3 =
|
||||||
animation-charging-4 =
|
animation-charging-4 =
|
||||||
animation-charging-framerate = 750
|
animation-charging-framerate = 750
|
||||||
|
|
||||||
[module/network]
|
[module/network]
|
||||||
type = internal/network
|
type = internal/network
|
||||||
interface = wlan1
|
interface = wlan0
|
||||||
udspeed-minwidth = 5
|
udspeed-minwidth = 5
|
||||||
accumulate-stats = true
|
accumulate-stats = true
|
||||||
unknown-as-up = true
|
unknown-as-up = true
|
||||||
format-connected = <label-connected>
|
format-connected = <label-connected>
|
||||||
format-disconnected = <label-disconnected>
|
format-disconnected = <label-disconnected>
|
||||||
|
|
||||||
format-packetloss = <label-connected>
|
format-packetloss = <label-connected>
|
||||||
|
|
||||||
label-connected = %essid%
|
label-connected = %essid%
|
||||||
|
|
||||||
|
|
|
@ -6,19 +6,4 @@ killall -q polybar
|
||||||
# Wait until the processes have been shut down
|
# Wait until the processes have been shut down
|
||||||
while pgrep -u $UID -x polybar >/dev/null; do sleep 0.1; done
|
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 &
|
polybar ws &
|
||||||
|
|
|
@ -17,10 +17,6 @@ super + ctrl + alt + f
|
||||||
{XF86AudioMute}
|
{XF86AudioMute}
|
||||||
amixer -D pulse set Master 1+ toggle
|
amixer -D pulse set Master 1+ toggle
|
||||||
|
|
||||||
#backlight
|
|
||||||
{XF86MonBrightnessUp, XF86MonBrightnessDown}
|
|
||||||
xbacklight -{inc,dec} 5
|
|
||||||
|
|
||||||
# runner
|
# runner
|
||||||
super + r
|
super + r
|
||||||
rofi -show drun -show-icons
|
rofi -show drun -show-icons
|
||||||
|
@ -52,6 +48,10 @@ super + v
|
||||||
super + b
|
super + b
|
||||||
$BROWSER
|
$BROWSER
|
||||||
|
|
||||||
|
# open xlinks
|
||||||
|
super + x
|
||||||
|
$HOME/.scripts/links-launcher
|
||||||
|
|
||||||
# open email
|
# open email
|
||||||
super + m
|
super + m
|
||||||
$EMAIL_CLIENT
|
$EMAIL_CLIENT
|
||||||
|
@ -151,7 +151,7 @@ super + period
|
||||||
|
|
||||||
# file search and open
|
# file search and open
|
||||||
super + slash
|
super + slash
|
||||||
bspc rule -a \* -o state=floating && $TERMINAL -e ~/.scripts/fzf_menu.sh
|
websearch
|
||||||
shift + super + slash
|
shift + super + slash
|
||||||
bspc rule -a \* -o state=floating && $TERMINAL -e ~/.scripts/fzf_menu.sh
|
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
|
bspc node -f {next,prev}.local.!hidden.window
|
||||||
|
|
||||||
# focus the next/previous desktop in the current monitor
|
# focus the next/previous desktop in the current monitor
|
||||||
super + ctrl + {Left,Right}
|
super + {Left,Right}
|
||||||
bspc desktop -f {prev,next}.local
|
bspc desktop -f {prev,next}.local
|
||||||
|
|
||||||
# focus the older or newer node in the focus history
|
# 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}
|
bspc node -z {right -20 0,top 0 20,bottom 0 -20,left 20 0}
|
||||||
|
|
||||||
# move a floating window
|
# 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}
|
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
|
#!/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 () {
|
save () {
|
||||||
mkdir config
|
mkdir config
|
||||||
for i in "${configurations[@]}"; do
|
for i in ${configurations}; do
|
||||||
cp -r "$HOME/.config/$i" config/
|
cp -r "$HOME/.config/$i" config/
|
||||||
done
|
done
|
||||||
|
|
||||||
|
@ -13,8 +13,8 @@ save () {
|
||||||
cp -r "$HOME/.scripts" scripts
|
cp -r "$HOME/.scripts" scripts
|
||||||
|
|
||||||
cp $HOME/.profile profile
|
cp $HOME/.profile profile
|
||||||
cp $HOME/.bashrc bashrc
|
cp $HOME/.mkshrc mkshrc
|
||||||
cp $HOME/.bash_aliases bash_aliases
|
cp $HOME/.sh_aliases sh_aliases
|
||||||
cp $HOME/.Xdefaults Xdefaults
|
cp $HOME/.Xdefaults Xdefaults
|
||||||
cp $HOME/.xinitrc xinitrc
|
cp $HOME/.xinitrc xinitrc
|
||||||
|
|
||||||
|
@ -50,14 +50,14 @@ load () {
|
||||||
printf "\033[31mWARNING THIS WILL REPLACE EXISTING CONFIGURATIONS\n\033[0mTo proceed type 'confirm': "
|
printf "\033[31mWARNING THIS WILL REPLACE EXISTING CONFIGURATIONS\n\033[0mTo proceed type 'confirm': "
|
||||||
read confirmation
|
read confirmation
|
||||||
|
|
||||||
if [[ $confirmation == "confirm" ]]; then
|
if [ $confirmation = "confirm" ]; then
|
||||||
mkdir -p $HOME/.config
|
mkdir -p $HOME/.config
|
||||||
cp -r config/* $HOME/.config
|
cp -r config/* $HOME/.config
|
||||||
mkdir -p $HOME/.scripts
|
mkdir -p $HOME/.scripts
|
||||||
cp -r scripts/* $HOME/.scripts
|
cp -r scripts/* $HOME/.scripts
|
||||||
|
|
||||||
cp bashrc $HOME/.bashrc
|
cp mkshrc $HOME/.mkshrc
|
||||||
cp bash_aliases $HOME/.bash_aliases
|
cp sh_aliases $HOME/.sh_aliases
|
||||||
|
|
||||||
cp Xdefaults $HOME/.Xdefaults
|
cp Xdefaults $HOME/.Xdefaults
|
||||||
cp xinitrc $HOME/.xinitrc
|
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
|
[ -n "$BASH_VERSION" ] && [ -f "$HOME/.bashrc" ] && . "$HOME/.bashrc"
|
||||||
# for ssh logins, install and configure the libpam-umask package.
|
|
||||||
#umask 022
|
|
||||||
|
|
||||||
# if running bash
|
[ -d "$HOME/bin" ] && PATH="$HOME/bin:$PATH"
|
||||||
if [ -n "$BASH_VERSION" ]; then
|
[ -d "$HOME/.local/bin" ] && PATH="$HOME/.local/bin:$PATH"
|
||||||
# include .bashrc if it exists
|
[ -d "$HOME/.scripts" ] && PATH="$HOME/.scripts:$PATH"
|
||||||
if [ -f "$HOME/.bashrc" ]; then
|
|
||||||
. "$HOME/.bashrc"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
# set PATH so it includes user's private bin if it exists
|
alias editor=vim
|
||||||
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 TERMINAL="urxvt"
|
||||||
export BROWSER="/usr/bin/chromium"
|
export BROWSER="/usr/bin/chromium-browser"
|
||||||
export FILE_MANAGER="/usr/bin/thunar"
|
export FILE_MANAGER="/usr/bin/thunar"
|
||||||
export EMAIL_CLIENT="/usr/bin/thunderbird"
|
export EMAIL_CLIENT="/usr/bin/thunderbird"
|
||||||
export BLOG_DIR="/home/david/docs/proj/blog"
|
|
||||||
export EDITOR="/usr/bin/vim"
|
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
|
#!/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
|
#!/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
|
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"
|
printf '%s\n' "$line$buffer"
|
||||||
buffer=
|
buffer=
|
||||||
fi
|
fi
|
||||||
done < <(tac)
|
done < <(cat)
|
||||||
printf '%s\n' "$buffer"
|
printf '%s\n' "$buffer"
|
||||||
) | tac
|
) | cat
|
||||||
}
|
}
|
||||||
|
|
||||||
_fzf_bash_completion_find_matching_bracket() {
|
_fzf_bash_completion_find_matching_bracket() {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
MAIN_DP=DP-2;
|
MAIN_DP=DP-0;
|
||||||
|
|
||||||
v=$1
|
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
|
#!/bin/sh
|
||||||
i3lock-fancy -p -t ''
|
#i3lock-fancy -p -t ''
|
||||||
|
slock
|
||||||
|
|
|
@ -1,2 +1,3 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
printf "suspend\nreboot\npoweroff\nhibernate" | rofi -dmenu -p "systemctl" | xargs -r systemctl
|
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
|
#!/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)
|
#Layout of screens: (x, y, w, h)
|
||||||
screens = [
|
screens = [
|
||||||
(3840, 0, 1080, 1920),
|
|
||||||
(1280, 0, 2560, 1440),
|
|
||||||
(4920, 0, 1080, 1920),
|
|
||||||
(0, 0, 1280, 1024),
|
(0, 0, 1280, 1024),
|
||||||
|
(1280, 0, 2560, 1440),
|
||||||
|
(3840, 0, 1080, 1920),
|
||||||
|
(4920, 0, 1080, 1920),
|
||||||
]
|
]
|
||||||
|
|
||||||
#TODO find this with xrandr
|
#TODO find this with xrandr
|
||||||
|
|
|
@ -1,14 +1,17 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
|
browser="links-launcher"
|
||||||
SEARCH_ENGINE="https://search.brave.com/search?q="
|
SEARCH_ENGINE="https://librex.beparanoid.de/search.php?q="
|
||||||
SEARCH_HISTORY=/tmp/.search_history
|
SEARCH_HISTORY=$HOME/.local/share/search_history
|
||||||
|
|
||||||
SEARCH=$(cat $SEARCH_HISTORY | dmenu -p "search")
|
SEARCH=$(cat $SEARCH_HISTORY | dmenu -p "search")
|
||||||
|
|
||||||
touch $SEARCH_HISTORY
|
echo "$SEARCH" >> $SEARCH_HISTORY
|
||||||
|
|
||||||
cat <<< "$SEARCH
|
query=$(echo $SEARCH | sed 's/ /+/g')
|
||||||
$(cat $SEARCH_HISTORY)" > $SEARCH_HISTORY
|
|
||||||
|
|
||||||
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 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 () {
|
alarmclock () {
|
||||||
sudo rtcwake -m no -t "$(date -d 'tomorrow 07:00:00' '+%s')" && echo 'set alarm for tomorrow at 7am'
|
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
|
# does tail -f on a dir... bit of a hack
|
||||||
|
# i spelled this wrong on purpose i think
|
||||||
mutlitail1 () {
|
mutlitail1 () {
|
||||||
while true; do
|
while true; do
|
||||||
f=$(ls -1 --sort time $1| head -1);
|
f=$(ls -1 --sort time $@| head -1 | xargs realpath);
|
||||||
tail -$(tput lines) $1/$f; done;
|
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