Browse Source

Update arch pc files

arch-desktop
Andrew Zah 1 year ago
parent
commit
701233ba1d
Signed by: Andrew Zah <zah@andrewzah.com> GPG Key ID: 0AE942445EB70FAA

+ 12
- 0
.config/i3/blocks/mpd.sh View File

@@ -0,0 +1,12 @@
#!/bin/bash
NCMP=$(mpc -h ~/.config/mpd/socket | grep "^\[playing\]" | awk '{print $1}')
NUM_NCMP=$(mpc -h ~/.config/mpd/socket | head -1 | wc -c )
S_NCMP=$(mpc -h ~/.config/mpd/socket | head -1 | head -c 100)

if [ "$NCMP" = "[playing]" ]; then
if [ "$NUM_NCMP" -lt 100 ]; then
echo -e ": $(mpc -h ~/.config/mpd/socket current)"
else
echo -e ": $S_NCMP..."
fi
fi

+ 181
- 0
.config/i3/blocks/volume-pulseaudio View File

@@ -0,0 +1,181 @@
#!/bin/bash
# Displays the default device, volume, and mute status for i3blocks

AUDIO_HIGH_SYMBOL=' '

AUDIO_MED_THRESH=50
AUDIO_MED_SYMBOL=' '

AUDIO_LOW_THRESH=0
AUDIO_LOW_SYMBOL=' '

AUDIO_MUTED_SYMBOL=' '

AUDIO_INTERVAL=5

DEFAULT_COLOR="#ffffff"
MUTED_COLOR="#a0a0a0"

LONG_FORMAT=0
SHORT_FORMAT=2
USE_PERCENT=1
USE_ALSA_NAME=0
USE_DESCRIPTION=0

SUBSCRIBE=0

while getopts F:Sf:padH:M:L:X:T:t:C:c:i:m:s:h opt; do
case "$opt" in
S) SUBSCRIBE=1 ;;
F) LONG_FORMAT="$OPTARG" ;;
f) SHORT_FORMAT="$OPTARG" ;;
p) USE_PERCENT=0 ;;
a) USE_ALSA_NAME=1 ;;
d) USE_DESCRIPTION=1 ;;
H) AUDIO_HIGH_SYMBOL="$OPTARG" ;;
M) AUDIO_MED_SYMBOL="$OPTARG" ;;
L) AUDIO_LOW_SYMBOL="$OPTARG" ;;
X) AUDIO_MUTED_SYMBOL="$OPTARG" ;;
T) AUDIO_MED_THRESH="$OPTARG" ;;
t) AUDIO_LOW_THRESH="$OPTARG" ;;
C) DEFAULT_COLOR="$OPTARG" ;;
c) MUTED_COLOR="$OPTARG" ;;
i) AUDIO_INTERVAL="$OPTARG" ;;
m) MIXER="$OPTARG" ;;
s) SCONTROL="$OPTARG" ;;
h) printf \
"Usage: volume-pulseaudio [-S] [-F format] [-f format] [-p] [-a|-d] [-H symb] [-M symb]
[-L symb] [-X symb] [-T thresh] [-t thresh] [-C color] [-c color] [-i inter]
[-m mixer] [-s scontrol] [-h]
Options:
-F, -f\tOutput format (-F long format, -f short format) to use, amongst:
\t0\t symb vol [index:name]\t (default long)
\t1\t symb vol [name]
\t2\t symb vol [index]\t (default short)
\t3\t symb vol
-S\tSubscribe to volume events (requires persistent block, always uses long format)
-p\tOmit the percent sign (%%) in volume
-a\tUse ALSA name if possible
-d\tUse device description instead of name if possible
-H\tSymbol to use when audio level is high. Default: '$AUDIO_HIGH_SYMBOL'
-M\tSymbol to use when audio level is medium. Default: '$AUDIO_MED_SYMBOL'
-L\tSymbol to use when audio level is low. Default: '$AUDIO_LOW_SYMBOL'
-X\tSymbol to use when audio is muted. Default: '$AUDIO_MUTED_SYMBOL'
-T\tThreshold for medium audio level. Default: $AUDIO_MED_THRESH
-t\tThreshold for low audio level. Default: $AUDIO_LOW_THRESH
-C\tColor for non-muted audio. Default: $DEFAULT_COLOR
-c\tColor for muted audio. Default: $MUTED_COLOR
-i\tInterval size of volume increase/decrease. Default: $AUDIO_INTERVAL
-m\tUse the given mixer.
-s\tUse the given scontrol.
-h\tShow this help text
" && exit 0;;
esac
done

if [[ -z "$MIXER" ]] ; then
MIXER="default"
if amixer -D pulse info >/dev/null 2>&1 ; then
MIXER="pulse"
fi
fi

if [[ -z "$SCONTROL" ]] ; then
SCONTROL=$(amixer -D "$MIXER" scontrols | sed -n "s/Simple mixer control '\([^']*\)',0/\1/p" | head -n1)
fi

CAPABILITY=$(amixer -D $MIXER get $SCONTROL | sed -n "s/ Capabilities:.*cvolume.*/Capture/p")


function move_sinks_to_new_default {
DEFAULT_SINK=$1
pacmd list-sink-inputs | grep index: | grep -o '[0-9]\+' | while read SINK
do
pacmd move-sink-input $SINK $DEFAULT_SINK
done
}

function set_default_playback_device_next {
inc=${1:-1}
num_devices=$(pacmd list-sinks | grep -c index:)
sink_arr=($(pacmd list-sinks | grep index: | grep -o '[0-9]\+'))
default_sink_index=$(( $(pacmd list-sinks | grep index: | grep -no '*' | grep -o '^[0-9]\+') - 1 ))
default_sink_index=$(( ($default_sink_index + $num_devices + $inc) % $num_devices ))
default_sink=${sink_arr[$default_sink_index]}
pacmd set-default-sink $default_sink
move_sinks_to_new_default $default_sink
}

case "$BLOCK_BUTTON" in
1) set_default_playback_device_next ;;
2) amixer -q -D $MIXER sset $SCONTROL $CAPABILITY toggle ;;
3) set_default_playback_device_next -1 ;;
4) amixer -q -D $MIXER sset $SCONTROL $CAPABILITY $AUDIO_INTERVAL%+ ;;
5) amixer -q -D $MIXER sset $SCONTROL $CAPABILITY $AUDIO_INTERVAL%- ;;
esac

function print_format {
PERCENT="%"
[[ $USE_PERCENT == 0 ]] && PERCENT=""
case "$1" in
1) echo "$SYMBOL$VOL$PERCENT [$NAME]" ;;
2) echo "$SYMBOL$VOL$PERCENT [$INDEX]";;
3) echo "$SYMBOL$VOL$PERCENT" ;;
*) echo "$SYMBOL$VOL$PERCENT [$INDEX:$NAME]" ;;
esac
}

function print_block {
for name in INDEX NAME VOL MUTED; do
read $name
done < <(pacmd list-sinks | grep "index:\|name:\|volume: front\|muted:" | grep -A3 '*')
INDEX=$(echo "$INDEX" | grep -o '[0-9]\+')
VOL=$(echo "$VOL" | grep -o "[0-9]*%" | head -1 )
VOL="${VOL%?}"

NAME=$(echo "$NAME" | sed \
's/.*<.*\.\(.*\)>.*/\1/; t;'\
's/.*<\(.*\)>.*/\1/; t;'\
's/.*/unknown/')

if [[ $USE_ALSA_NAME == 1 ]] ; then
ALSA_NAME=$(pacmd list-sinks |\
awk '/^\s*\*/{f=1}/^\s*index:/{f=0}f' |\
grep "alsa.name\|alsa.mixer_name" |\
head -n1 |\
sed 's/.*= "\(.*\)".*/\1/')
NAME=${ALSA_NAME:-$NAME}
elif [[ $USE_DESCRIPTION == 1 ]] ; then
DESCRIPTION=$(pacmd list-sinks |\
awk '/^\s*\*/{f=1}/^\s*index:/{f=0}f' |\
grep "device.description" |\
head -n1 |\
sed 's/.*= "\(.*\)".*/\1/')
NAME=${DESCRIPTION:-$NAME}
fi

if [[ $MUTED =~ "no" ]] ; then
SYMBOL=$AUDIO_HIGH_SYMBOL
[[ $VOL -le $AUDIO_MED_THRESH ]] && SYMBOL=$AUDIO_MED_SYMBOL
[[ $VOL -le $AUDIO_LOW_THRESH ]] && SYMBOL=$AUDIO_LOW_SYMBOL
COLOR=$DEFAULT_COLOR
else
SYMBOL=$AUDIO_MUTED_SYMBOL
COLOR=$MUTED_COLOR
fi

if [[ $SUBSCRIBE == 1 ]] ; then
print_format "$LONG_FORMAT"
else
print_format "$LONG_FORMAT"
print_format "$SHORT_FORMAT"
echo "$COLOR"
fi
}

print_block
if [[ $SUBSCRIBE == 1 ]] ; then
while read -r EVENT; do
print_block
done < <(pactl subscribe | stdbuf -oL grep change)
fi

+ 97
- 0
.config/i3/config View File

@@ -0,0 +1,97 @@
## font
font pango:DejaVu Sans Mono 10

## i3 ModKeys
set $mod Mod4
set $cmod Mod1

gaps inner 10
set $work1 "Neptune"
set $work2 "Saturn"
set $work3 "Titan"
set $work4 "Venus"
set $work5 "Jupiter"
set $work6 "Mars"

# default workspaces to each monitor
workspace $work1 output DVI-I-1
workspace $work2 output HDMI-0

# startup applications
exec_always --no-startup-id ~/.config/i3/polybar.sh &
exec_always feh --bg-scale ~/Pictures/Wallpapers/deoksugung2_right.jpg ~/Pictures/Wallpapers/deoksugung2_left.jpg

## i3 Opts
hide_edge_borders both
new_window pixel 2

# Floating mode
#floating_modifer $mod

# Focus keys
bindsym $mod+Left focus left
bindsym $mod+Down focus down
bindsym $mod+Up focus up
bindsym $mod+Right focus right

# Move keys
bindsym $mod+Shift+Left move left
bindsym $mod+Shift+Down move down
bindsym $mod+Shift+Up move up
bindsym $mod+Shift+Right move right

# Move workspaces
bindsym $mod+1 workspace $work1
bindsym $mod+2 workspace $work2
bindsym $mod+3 workspace $work3
bindsym $mod+4 workspace $work4
bindsym $mod+5 workspace $work5
bindsym $mod+6 workspace $work6

# resize windows
bindsym $mod+Ctrl+Shift+Right resize shrink width 10 px or 10 ppt
bindsym $mod+Ctrl+Shift+Up resize grow height 10 px or 10 ppt
bindsym $mod+Ctrl+Shift+Down resize shrink height 10 px or 10 ppt
bindsym $mod+Ctrl+Shift+Left resize grow width 10 px or 10 ppt

# move focused container to workspace
bindsym $mod+Shift+1 move container to workspace $work1
bindsym $mod+Shift+2 move container to workspace $work2
bindsym $mod+Shift+3 move container to workspace $work3
bindsym $mod+Shift+4 move container to workspace $work4
bindsym $mod+Shift+5 move container to workspace $work5
bindsym $mod+Shift+6 move container to workspace $work6

# assign programs to workspaces
assign [class="Discord"] $work2
assign [class="Thunderbird"] $work3

# splits
bindsym $mod+h split h
bindsym $mod+v split v

# toggling view types
bindsym $mod+s layout stacking
bindsym $mod+l layout toggle split
bindsym $mod+f fullscreen toggle
bindsym $mod+g floating toggle


## i3 Session keys
bindsym $mod+Shift+c reload
bindsym $mod+Shift+r restart
bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3?' -b 'Yes, exit i3' 'i3-msg exit'"

# General
bindsym $mod+Return exec kitty
bindsym $mod+d exec rofi -show run -config /home/andrei/.config/rofi/config
bindsym $mod+w exec rofi -show window -config /home/andrei/.config/rofi/config
bindsym $mod+Shift+w kill

# Floating windows
for_window [class="Peek"] floating enable

client.focused #5F875F #285577 #ffffff #97b597 #5F875F
client.focused_inactive #333333 #5f676a #ffffff #484e50 #5f676a
client.unfocused #333333 #222222 #888888 #292d2e #222222
client.urgent #2f343a #900000 #ffffff #900000 #900000

+ 11
- 0
.config/i3/polybar.sh View File

@@ -0,0 +1,11 @@
#!/usr/bin/env sh

# Terminate already running bar instances
killall -q polybar

# Wait until the processes have been shut down
while pgrep -x polybar >/dev/null; do sleep 1; done

# Launch polybar
polybar zah &
polybar zah-left &

+ 48
- 0
.config/i3/workspaces/neptune.json View File

@@ -0,0 +1,48 @@
// vim:ts=4:sw=4:et
{
"border": "pixel",
"current_border_width": 2,
"floating": "auto_off",
"geometry": {
"height": 1390,
"width": 1261,
"x": 0,
"y": 0
},
"name": "i3-save-tree --workspace Neptune > ~/.config/i3/workspaces/neptune.json",
"percent": 0.5,
"swallows": [
{
// "class": "^kitty$",
// "instance": "^kitty$",
// "title": "^i3\\-save\\-tree\\ \\-\\-workspace\\ Neptune\\ \\>\\ \\~\\/\\.config\\/i3\\/workspaces\\/neptune\\.json$",
// "transient_for": "^$"
}
],
"type": "con"
}

{
"border": "pixel",
"current_border_width": 2,
"floating": "auto_off",
"geometry": {
"height": 1390,
"width": 1261,
"x": 0,
"y": 0
},
"name": "i3: Layout saving in i3 - Mozilla Firefox",
"percent": 0.5,
"swallows": [
{
// "class": "^Firefox$",
// "instance": "^Navigator$",
// "title": "^i3\\:\\ Layout\\ saving\\ in\\ i3\\ \\-\\ Mozilla\\ Firefox$",
// "transient_for": "^$",
// "window_role": "^browser$"
}
],
"type": "con"
}


+ 48
- 0
.config/i3/workspaces/saturn.json View File

@@ -0,0 +1,48 @@
// vim:ts=4:sw=4:et
{
"border": "pixel",
"current_border_width": 2,
"floating": "auto_off",
"geometry": {
"height": 835,
"width": 1416,
"x": 12,
"y": 12
},
"name": "#get_schwifty - Discord",
"percent": 0.5,
"swallows": [
{
// "class": "^discord$",
// "instance": "^discord$",
// "title": "^\\#get_schwifty\\ \\-\\ Discord$",
// "transient_for": "^$",
// "window_role": "^browser\\-window$"
}
],
"type": "con"
}

{
"border": "pixel",
"current_border_width": 2,
"floating": "auto_off",
"geometry": {
"height": 600,
"width": 800,
"x": 0,
"y": 0
},
"name": "Spotify",
"percent": 0.5,
"swallows": [
{
// "class": "^Spotify$",
// "instance": "^spotify$",
// "title": "^Spotify$",
// "transient_for": "^$"
}
],
"type": "con"
}


+ 25
- 0
.config/i3/workspaces/titan.json View File

@@ -0,0 +1,25 @@
// vim:ts=4:sw=4:et
{
"border": "pixel",
"current_border_width": 2,
"floating": "auto_off",
"geometry": {
"height": 1390,
"width": 1261,
"x": 0,
"y": 0
},
"name": "Inbox - zah.andrew@gmail.com - Mozilla Thunderbird",
"percent": 1,
"swallows": [
{
// "class": "^Thunderbird$",
// "instance": "^Mail$",
// "title": "^Inbox\\ \\-\\ zah\\.andrew\\@gmail\\.com\\ \\-\\ Mozilla\\ Thunderbird$",
// "transient_for": "^$",
// "window_role": "^3pane$"
}
],
"type": "con"
}


+ 48
- 0
.config/i3/workspaces/venus.json View File

@@ -0,0 +1,48 @@
// vim:ts=4:sw=4:et
{
"border": "pixel",
"current_border_width": 2,
"floating": "auto_off",
"geometry": {
"height": 1390,
"width": 2536,
"x": 1452,
"y": 598
},
"name": "Signal",
"percent": 0.5,
"swallows": [
{
// "class": "^Signal$",
// "instance": "^signal$",
// "title": "^Signal$",
// "transient_for": "^$",
// "window_role": "^browser\\-window$"
}
],
"type": "con"
}

{
"border": "pixel",
"current_border_width": 2,
"floating": "auto_off",
"geometry": {
"height": 1390,
"width": 1261,
"x": 0,
"y": 0
},
"name": "WeeChat 2.1",
"percent": 0.5,
"swallows": [
{
// "class": "^kitty$",
// "instance": "^kitty$",
// "title": "^WeeChat\\ 2\\.1$",
// "transient_for": "^$"
}
],
"type": "con"
}


.config/.kitty/kitty.conf → .config/kitty/kitty.conf View File

@@ -22,7 +22,7 @@ font_size 10.0
# the font size in a running terminal.
font_size_delta 2

allow_remote_control yes
# Adjust the cell dimensions.
# You can use either numbers, which are interpreted as pixels or percentages
# (number followed by %), which are interpreted as percentages of the

.config/.mpd/mpd.conf → .config/mpd/mpd.conf View File


+ 3
- 0
.config/nvim/.netrwhist View File

@@ -0,0 +1,3 @@
let g:netrw_dirhistmax =10
let g:netrw_dirhist_cnt =1
let g:netrw_dirhist_1='/home/andrei/Sync/_work/stars-dod'

+ 3
- 0
.config/nvim/after/compiler/tardyscript.vim View File

@@ -0,0 +1,3 @@
let current_compiler = "tardyscript"
CompilerSet makeprg=sleep\ 5;tsc\ $*\ --outDir\ build\ %
CompilerSet errorformat=%+A\ %#%f\ %#(%l\\\,%c):\ %m,%C%m

+ 3
- 0
.config/nvim/after/compiler/tsconfig.vim View File

@@ -0,0 +1,3 @@
let current_compiler = "tsconfig"
CompilerSet makeprg=tsc
CompilerSet errorformat=%+A\ %#%f\ %#(%l\\\,%c):\ %m,%C%m

+ 10
- 0
.config/nvim/after/compiler/tslint.vim View File

@@ -0,0 +1,10 @@
let current_compiler = "tslint"
let s:cpo_save = &cpo
set cpo-=C
CompilerSet makeprg=tslint\ $*\ -t\ prose\ -c\ tslint.json\ 'src/**/*.ts'
CompilerSet errorformat=
\%EERROR:\ %f[%l\\\,\ %c]:\ %m,
\%WWARNING:\ %f[%l\\\,\ %c]:\ %m,
\%E%f[%l\\\,\ %c]:\ %m
let &cpo = s:cpo_save
unlet s:cpo_save

+ 3
- 0
.config/nvim/after/compiler/typescript.vim View File

@@ -0,0 +1,3 @@
let current_compiler = "typescript"
CompilerSet makeprg=tsc\ $*\ --outDir\ build\ %
CompilerSet errorformat=%+A\ %#%f\ %#(%l\\\,%c):\ %m,%C%m

nvim/after/syntax/clojure.vim → .config/nvim/after/syntax/clojure.vim View File


+ 5
- 0
.config/nvim/after/syntax/crystal.vim View File

@@ -0,0 +1,5 @@
syntax keyword crystalClassAttribute class_getter class_setter class_property
syntax keyword crystalHTMLMethodBlock get put post patch delete

hi link crystalClassAttribute crystalAttribute
hi link crystalHTMLMethodBlock crystalBlock

+ 0
- 0
.config/nvim/after/syntax/elixir.vim View File


nvim/after/syntax/elm.vim → .config/nvim/after/syntax/elm.vim View File


+ 12
- 0
.config/nvim/after/syntax/ruby.vim View File

@@ -0,0 +1,12 @@
if !has('conceal')
finish
endif

syntax keyword rubyNiceOperator lambda conceal cchar=λ

autocmd User ProjectionistDetect
\ call projectionist#append(getcwd(),
\ {
\ "app/*.rb": { "alternate": "spec/{}_spec.rb" },
\ "spec/*_spec.rb": { "alternate": "app/{}.rb" }
\ })

+ 2504
- 0
.config/nvim/autoload/plug.vim
File diff suppressed because it is too large
View File


+ 2504
- 0
.config/nvim/autoload/plug.vim.old
File diff suppressed because it is too large
View File


.nvimrc → .config/nvim/init.vim View File

@@ -8,12 +8,12 @@ call plug#begin('~/.vim/plugged')

Plug 'AndrewRadev/sideways.vim'
Plug 'ElmCast/elm-vim', { 'for': 'elm' }
Plug 'Yggdroot/indentLine', { 'for': ['yaml', 'python'] }
Plug 'bhurlow/vim-parinfer', {'for': 'clojure' }
Plug 'c-brenn/phoenix.vim', { 'for': ['elixir'] }
Plug 'cespare/vim-toml', { 'for': 'toml' }
Plug 'chrisbra/NrrwRgn'
Plug 'chrisbra/csv.vim'
Plug 'elixir-editors/vim-elixir', { 'for': ['elixir'] }
Plug 'elixir-editors/vim-elixir'
Plug 'elorest/vim-slang', { 'for': 'slang' }
Plug 'fisadev/FixedTaskList.vim'
Plug 'gcmt/wildfire.vim'
@@ -21,21 +21,30 @@ Plug 'gerw/vim-HiLinkTrace'
Plug 'godlygeek/tabular'
Plug 'haya14busa/vim-signjk-motion'
Plug 'iamcco/markdown-preview.vim', { 'for': 'markdown' }
Plug 'isobit/vim-caddyfile', { 'for': 'caddyfile' }
Plug 'janko-m/vim-test'
Plug 'junegunn/fzf'
Plug 'junegunn/fzf.vim'
Plug 'kchmck/vim-coffee-script', { 'for': 'coffee' }
Plug 'ledger/vim-ledger'
Plug 'luochen1990/rainbow'
Plug 'luochen1990/rainbow', { 'for': ['clojure'] }
Plug 'machakann/vim-sandwich'
Plug 'mattn/emmet-vim'
Plug 'mhinz/vim-grepper'
Plug 'morhetz/gruvbox'
Plug 'nathanaelkane/vim-indent-guides'
Plug 'nathanaelkane/vim-indent-guides', { 'for': ['yaml', 'python', 'haml', 'slim', 'slang'] }
Plug 'radenling/vim-dispatch-neovim'
Plug 'rhysd/vim-crystal', { 'for': 'crystal' }
Plug 'rust-lang/rust.vim', { 'for': 'rust' }
Plug 'scrooloose/nerdcommenter'
Plug 'soramugi/auto-ctags.vim'
Plug 'tpope/vim-dispatch'
Plug 'tpope/vim-fireplace', { 'for': 'clojure' }
Plug 'tpope/vim-fugitive'
Plug 'tpope/vim-projectionist'
Plug 'venantius/vim-eastwood', { 'for': 'clojure' }
Plug 'vim-scripts/ReplaceWithRegister'
Plug 'w0rp/ale'
Plug 'yuttie/comfortable-motion.vim'

call plug#end()
@@ -150,6 +159,21 @@ let g:wildfire_objects = {
\ }
"for appending types to * rather than excluding: https://github.com/gcmt/wildfire.vim

let g:indentLine_char = '|'

let g:ale_lint_on_text_changed = 'never'
let g:ale_lint_on_enter = 0
let g:ale_lint_on_filetype_changed = 0
let g:ale_lint_on_save = 1
let g:ale_linters = {
\ 'javascript': ['eslint'],
\ }

let g:grepper = {}
let g:grepper.tools = ['rg', 'git', 'grep']

let test#strategy = "dispatch"

"""
""" Key remapping
"""
@@ -226,6 +250,15 @@ nnoremap <leader>sl :call LoadSession()<cr>
" Highlight syntax for word under cursor
nnoremap <leader>pr :HLT!<cr>

" In order to traverse ALE warnings
nnoremap <silent> [w <Plug>(ale_previous_wrap)
nnoremap <silent> ]w <Plug>(ale_next_wrap)

" Grepper
nnoremap <Leader>* :Grepper -cword -noprompt<CR>
nnoremap gs <Plug>(GrepperOperator)
xnoremap gs <Plug>(GrepperOperator)

""" Syntaxes """

" Autoset slang syntax highlighting

+ 434
- 0
.config/polybar/config View File

@@ -0,0 +1,434 @@
;==========================================================
;
;
; ██████╗ ██████╗ ██╗ ██╗ ██╗██████╗ █████╗ ██████╗
; ██╔══██╗██╔═══██╗██║ ╚██╗ ██╔╝██╔══██╗██╔══██╗██╔══██╗
; ██████╔╝██║ ██║██║ ╚████╔╝ ██████╔╝███████║██████╔╝
; ██╔═══╝ ██║ ██║██║ ╚██╔╝ ██╔══██╗██╔══██║██╔══██╗
; ██║ ╚██████╔╝███████╗██║ ██████╔╝██║ ██║██║ ██║
; ╚═╝ ╚═════╝ ╚══════╝╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝
;
;
; To learn more about how to configure Polybar
; go to https://github.com/jaagr/polybar
;
; The README contains alot of information
;
;==========================================================

[colors]
;background = ${xrdb:color0:#222}
background = #222
background-alt = #444
;foreground = ${xrdb:color7:#222}
foreground = #dfdfdf
foreground-alt = #555
primary = #ffb52a
secondary = #e60053
alert = #bd2c40

[bar/zah-left]
font-0 = "DejaVu Sans:style=Regular:pixelsize=10;0"
monitor = ${env:MONITOR:HDMI-0}
width = 100%
height = 27
radius = 6.0

background = ${colors.background}
foreground = ${colors.foreground}

line-size = 3
line-color = #f00

border-size = 4
border-color = #00000000

padding-left = 0
padding-right = 2

module-margin-left = 1
module-margin-right = 2

modules-left = i3
modules-center =
modules-right =

; focused = Active workspace on focused monitor
label-focused = %name%
label-focused-background = ${module/bspwm.label-focused-background}
label-focused-underline = ${module/bspwm.label-focused-underline}
label-focused-padding = ${module/bspwm.label-focused-padding}

; unfocused = Inactive workspace on any monitor
label-unfocused = %name%
label-unfocused-padding = ${module/bspwm.label-occupied-padding}

; visible = Active workspace on unfocused monitor
label-visible = %index%
label-visible-background = ${self.label-focused-background}
label-visible-underline = ${self.label-focused-underline}
label-visible-padding = ${self.label-focused-padding}

; urgent = Workspace with urgency hint set
label-urgent = %index%
label-urgent-background = ${module/bspwm.label-urgent-background}
label-urgent-padding = ${module/bspwm.label-urgent-padding}

; Separator in between workspaces
; label-separator = |

[bar/zah]
font-0 = "DejaVu Sans:style=Regular:pixelsize=10;0"
font-1 = "FontAwesome:pixelsize=10;0"
font-2 = siji:pixelsize=10;1
font-3 = unifont:fontformat=truetype:size=8:antialias=false;0
monitor = ${env:MONITOR:DVI-I-1}
width = 100%
height = 27
;offset-x = 1%
;offset-y = 1%
radius = 6.0
fixed-center = false

background = ${colors.background}
foreground = ${colors.foreground}

line-size = 3
line-color = #f00

border-size = 4
border-color = #00000000

padding-left = 0
padding-right = 2

module-margin-left = 1
module-margin-right = 2

modules-left = i3
modules-center =
modules-right = mpd filesystem eth xkeyboard memory cpu temperature date powermenu

tray-position = right
tray-padding = 2
;tray-transparent = true
;tray-background = #0063ff

;wm-restack = bspwm
;wm-restack = i3

;override-redirect = true

;scroll-up = bspwm-desknext
;scroll-down = bspwm-deskprev

;scroll-up = i3wm-wsnext
;scroll-down = i3wm-wsprev

cursor-click = pointer
cursor-scroll = ns-resize

[module/xkeyboard]
type = internal/xkeyboard
blacklist-0 = num lock

format-prefix = " "
format-prefix-foreground = ${colors.foreground-alt}
format-prefix-underline = ${colors.secondary}

label-layout =  %layout%
label-layout-underline = ${colors.secondary}

label-indicator-padding = 2
label-indicator-margin = 1
label-indicator-background = ${colors.secondary}
label-indicator-underline = ${colors.secondary}

[module/filesystem]
type = internal/fs
interval = 25

mount-0 = /

label-mounted =  %{F#0a81f5}%mountpoint%%{F-}: %percentage_used%%
label-unmounted = %mountpoint% not mounted
label-unmounted-foreground = ${colors.foreground-alt}

format-label-underline = ${colors.secondary}

[module/bspwm]
type = internal/bspwm

label-focused = %name%
label-focused-background = ${colors.background-alt}
label-focused-underline= ${colors.primary}
label-focused-padding = 2

label-occupied = %index%
label-occupied-padding = 2

label-urgent = %index%!
label-urgent-background = ${colors.alert}
label-urgent-padding = 2

label-empty = %index%
label-empty-foreground = ${colors.foreground-alt}
label-empty-padding = 2

pin-workspaces = true

; Separator in between workspaces
; label-separator = |

[module/i3]
type = internal/i3
format = <label-state> <label-mode>
index-sort = true
wrapping-scroll = false

ws-icon-0 = 1:Neptune;
ws-icon-1 = 2:Saturn;
ws-icon-2 = 3;Titan;
ws-icon-3 = 4;
ws-icon-4 = 5;
ws-icon-default =

; Only show workspaces on the same output as the bar
pin-workspaces = true

label-mode-padding = 2
label-mode-foreground = #000
label-mode-background = ${colors.primary}

; focused = Active workspace on focused monitor
label-focused = %name%
label-focused-background = ${module/bspwm.label-focused-background}
label-focused-underline = #16a085
; ${module/bspwm.label-focused-underline}
label-focused-padding = ${module/bspwm.label-focused-padding}

; unfocused = Inactive workspace on any monitor
label-unfocused = %name%
label-unfocused-padding = ${module/bspwm.label-occupied-padding}

; visible = Active workspace on unfocused monitor
label-visible = %name%
label-visible-background = ${self.label-focused-background}
label-visible-underline = ${self.label-focused-underline}
label-visible-padding = ${self.label-focused-padding}

; urgent = Workspace with urgency hint set
label-urgent = %name%
label-urgent-background = ${module/bspwm.label-urgent-background}
label-urgent-padding = ${module/bspwm.label-urgent-padding}

; Separator in between workspaces
; label-separator = |


[module/mpd]
type = internal/mpd
format-online = <label-song> <icon-prev> <icon-stop> <toggle> <icon-next> <icon-random>

host = /home/andrei/.config/mpd/socket

icon-prev = 
icon-stop = 
icon-play = 
icon-pause = 
icon-next = 
icon-random = 

label-song = %artist% - %album% - %title%
label-song-maxlen = 100
label-song-ellipsis = true

[module/xbacklight]
type = internal/xbacklight
output = LVDS1

format = %{A1:xbacklight -dec 10:A3:xbacklight -inc 10:} <label> <bar> %{A}
label = "BL "

bar-width = 10
bar-indicator = |
bar-indicator-foreground = #fff
bar-indicator-font = 2
bar-fill = ─
bar-fill-font = 2
bar-fill-foreground = #9f78e1
bar-empty = ─
bar-empty-font = 2
bar-empty-foreground = ${colors.foreground-alt}

[module/backlight-acpi]
inherit = module/xbacklight
type = internal/backlight
card = intel_backlight

[module/cpu]
type = internal/cpu
interval = 2
format-prefix = "CPU "
format-prefix-foreground = ${colors.foreground-alt}
format-underline = #f90000
label = %{A:kitty -o allow_remote_control=yes htop -s PERCENT_CPU:}%percentage:2%%%{A}


[module/memory]
type = internal/memory
interval = 2
format-prefix = "RAM "
format-prefix-foreground = ${colors.foreground-alt}
format-underline = #4bffdc
label = %{A:kitty -o allow_remote_control=yes htop -s PERCENT_MEM:}%percentage_used%% - %gb_free%%%{A}

[module/eth]
type = internal/network
interface = enp0s25
interval = 3.0

format-connected-underline = #55aa55
format-connected-prefix = " "
format-connected-prefix-foreground = ${colors.foreground-alt}
label-connected = %local_ip%

format-disconnected =
;format-disconnected = <label-disconnected>
;format-disconnected-underline = ${self.format-connected-underline}
;label-disconnected = %ifname% disconnected
;label-disconnected-foreground = ${colors.foreground-alt}

[module/date]
type = internal/date
interval = 5

date = "%A %B %e"
date-alt = "%A %B %e"

time = %H:%M
time-alt = %H:%M:%S

format-prefix = 
format-prefix-foreground = ${colors.foreground-alt}
format-underline = #0a6cf5

label = %date% | %time%

[module/pulseaudio]
type = internal/pulseaudio

format = %{A1:xbacklight -dec 10:A3:xbacklight -inc 10:} <label-volume> <bar-volume> %{A}
label-volume = VOL %percentage%%
label-volume-foreground = ${root.foreground}

label-muted = 🔇 muted
label-muted-foreground = #666

bar-volume-width = 10
bar-volume-foreground-0 = #55aa55
bar-volume-foreground-1 = #55aa55
bar-volume-foreground-2 = #55aa55
bar-volume-foreground-3 = #55aa55
bar-volume-foreground-4 = #55aa55
bar-volume-foreground-5 = #f5a70a
bar-volume-foreground-6 = #ff5555
bar-volume-gradient = false
bar-volume-indicator = |
bar-volume-indicator-font = 2
bar-volume-fill = ─
bar-volume-fill-font = 2
bar-volume-empty = ─
bar-volume-empty-font = 2
bar-volume-empty-foreground = ${colors.foreground-alt}

[module/alsa]
type = internal/alsa

format-volume = <label-volume> <bar-volume>
#format = %{A1:xbacklight -dec 10:A3:xbacklight -inc 10:} <label-volume> <bar-volume> %{A}
label-volume = VOL
label-volume-foreground = ${root.foreground}

format-muted-prefix = " "
format-muted-foreground = ${colors.foreground-alt}
label-muted = sound muted

bar-volume-width = 10
bar-volume-foreground-0 = #55aa55
bar-volume-foreground-1 = #55aa55
bar-volume-foreground-2 = #55aa55
bar-volume-foreground-3 = #55aa55
bar-volume-foreground-4 = #55aa55
bar-volume-foreground-5 = #f5a70a
bar-volume-foreground-6 = #ff5555
bar-volume-gradient = false
bar-volume-indicator = |
bar-volume-indicator-font = 2
bar-volume-fill = ─
bar-volume-fill-font = 2
bar-volume-empty = ─
bar-volume-empty-font = 2
bar-volume-empty-foreground = ${colors.foreground-alt}

[module/temperature]
type = internal/temperature
thermal-zone = 0
warn-temperature = 77

format = <ramp> <label>
format-underline = #f50a4d
format-warn = <ramp> <label-warn>
format-warn-underline = ${self.format-underline}

label = %temperature-c%
label-warn = %temperature-c%
label-warn-foreground = ${colors.secondary}

ramp-0 =
ramp-1 =
ramp-2 =
ramp-foreground = ${colors.foreground-alt}

[module/powermenu]
type = custom/menu

expand-right = true

format-spacing = 1

label-open = 
label-open-foreground = ${colors.secondary}
label-close =  cancel
label-close-foreground = ${colors.secondary}
label-separator = |
label-separator-foreground = ${colors.foreground-alt}

menu-0-0 = reboot
menu-0-0-exec = menu-open-1
menu-0-1 = power off
menu-0-1-exec = menu-open-2

menu-1-0 = cancel
menu-1-0-exec = menu-open-0
menu-1-1 = reboot
menu-1-1-exec = sudo reboot

menu-2-0 = power off
menu-2-0-exec = sudo poweroff
menu-2-1 = cancel
menu-2-1-exec = menu-open-0

[settings]
screenchange-reload = true
;compositing-background = xor
;compositing-background = screen
;compositing-foreground = source
;compositing-border = over

[global/wm]
margin-top = 5
margin-bottom = 5

; vim:ft=dosini


.config/.termite/config → .config/termite/config View File


+ 0
- 2
.i3/blocks/mpd.sh View File

@@ -9,6 +9,4 @@ if [ "$NCMP" = "[playing]" ]; then
else
echo -e ": $S_NCMP..."
fi
else
echo -e ": Pause "
fi

+ 8
- 11
.i3/config View File

@@ -18,6 +18,7 @@ workspace $work1 output DVI-I-1
workspace $work2 output HDMI-0

# startup applications
exec_always --no-startup-id ~/.config/i3/polybar.sh &
exec_always feh --bg-scale ~/Pictures/Wallpapers/deoksugung2_right.jpg ~/Pictures/Wallpapers/deoksugung2_left.jpg

## i3 Opts
@@ -47,6 +48,12 @@ bindsym $mod+4 workspace $work4
bindsym $mod+5 workspace $work5
bindsym $mod+6 workspace $work6

# resize windows
bindsym $mod+Ctrl+Shift+Right resize shrink width 10 px or 10 ppt
bindsym $mod+Ctrl+Shift+Up resize grow height 10 px or 10 ppt
bindsym $mod+Ctrl+Shift+Down resize shrink height 10 px or 10 ppt
bindsym $mod+Ctrl+Shift+Left resize grow width 10 px or 10 ppt

# move focused container to workspace
bindsym $mod+Shift+1 move container to workspace $work1
bindsym $mod+Shift+2 move container to workspace $work2
@@ -76,7 +83,7 @@ bindsym $mod+Shift+r restart
bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3?' -b 'Yes, exit i3' 'i3-msg exit'"

# General
bindsym $mod+Return exec termite
bindsym $mod+Return exec kitty
bindsym $mod+d exec rofi -show run -config /home/andrei/.config/rofi/config
bindsym $mod+w exec rofi -show window -config /home/andrei/.config/rofi/config
bindsym $mod+Shift+w kill
@@ -84,16 +91,6 @@ bindsym $mod+Shift+w kill
# Floating windows
for_window [class="Peek"] floating enable

bar {
output DVI-I-1
tray_output DVI-I-1
position top
status_command i3blocks
modifier $mod
workspace_buttons yes
font pango: Source Code Pro 10
}

client.focused #5F875F #285577 #ffffff #97b597 #5F875F
client.focused_inactive #333333 #5f676a #ffffff #484e50 #5f676a
client.unfocused #333333 #222222 #888888 #292d2e #222222

+ 1
- 10
.oh-my-zsh/themes/zah.zsh-theme View File

@@ -153,21 +153,12 @@
}

set_prompt_plugins() {
local PROMPT_PLUGINS_ORDER=(
ruby
crystal
)

# Execute all parts
for i in $PROMPT_PLUGINS_ORDER; do
prompt_$i
done
}

# Wrap up in set_prompt so it can be
# refreshed by time functions, etc
set_prompt() {
PROMPT='%{$(exit_code_status)%}λ $(_convertsecs $(get_time)) %{${PR_BOLD_GREEN}%}[%c] ⇒ %{$reset_color%} '
RPROMPT='$(set_prompt_plugins)%{$PR_BOLD_GREEN%} {$(git_prompt_info)}%{$reset_color%} $(git_prompt_status)%{$reset_color%}'
RPROMPT='{$(git_prompt_info)}%{$reset_color%} $(git_prompt_status)%{$reset_color%}'
}
set_prompt # init

+ 11
- 0
browser/new_tab.html View File

@@ -3,6 +3,16 @@
<li> <a href="https://lobste.rs"> Lobste.rs </a> </li>
<li> <a href="https://news.ycombinator.com"> Hacker News </a> </li>
<li> <a href="https://niu.moe"> Niu.moe </a> </li>
<li> <a href="https://nyquist.space"> nyquist.space </a> </li>
</ul>

<h2> Code </h2>
<ul>
<li> <a href="https://git.andrewzah.com/"> Gitea </a> </li>
<li> <a href="https://gitlab.com/andrewzah"> Gitlab </a> </li>
<li> <a href="https://github.com/azah"> Github </a> </li>
<li> <a href="https://git.pleroma.social/pleroma/pleroma"> pleroma </a> </li>
<li> <a href="https://git.pleroma.social/pleroma/pleroma-fe"> pleroma-fe </a> </li>
</ul>

<h2> Reddit </h2>
@@ -19,6 +29,7 @@

<h2> Slack </h2>
<ul>
<li> <a href="https://ossys.slack.com/messages/DARAWSY5P/"> OSSYS </a> </li>
<li> <a href="https://elmlang.slack.com/messages/C192T0Q1E/"> ElmLang </a> </li>
<li> <a href="https://catamorphiclabs.slack.com/messages"> Catamorphic Labs </a> </li>
<li> <a href="https://peoplebest.slack.com/messages/C5DPYCDBM"> PeopleBest </a> </li>

+ 0
- 21
nvim/after/syntax/ruby.vim View File

@@ -1,21 +0,0 @@
if !has('conceal')
finish
endif

syntax clear rubyOperator

syntax keyword rubyOperator is

syntax match rubyNiceOperator "<=" conceal cchar=≤
syntax match rubyNiceOperator ">=" conceal cchar=≥

syntax match rubyNiceOperator "=>" conceal cchar=⇾

syntax match rubyNiceOperator "!=" conceal cchar=≠
syntax keyword rubyNiceOperator lambda conceal cchar=λ

hi link rubyNiceOperator Operator
hi link rubyNiceStatement Statement
hi! link Conceal Operator

set conceallevel=2

Loading…
Cancel
Save