mirror of
https://github.com/tiyn/dotfiles.git
synced 2025-04-19 16:27:45 +02:00
Compare commits
No commits in common. "34c63dd99f852fd898047266fe1a1dedf451f0ab" and "60a947a8a2b63363d67fa6780df796f1c3b40c39" have entirely different histories.
34c63dd99f
...
60a947a8a2
@ -1,4 +1,4 @@
|
|||||||
vim.o.go = "a"
|
vim.o.go = 'a'
|
||||||
vim.o.showmode = false
|
vim.o.showmode = false
|
||||||
|
|
||||||
-- disable netrw
|
-- disable netrw
|
||||||
@ -6,11 +6,11 @@ vim.g.loaded_netrw = 1
|
|||||||
vim.g.loaded_netrwPlugin = 1
|
vim.g.loaded_netrwPlugin = 1
|
||||||
|
|
||||||
-- enable mouse for all modes
|
-- enable mouse for all modes
|
||||||
vim.o.mouse = "a"
|
vim.o.mouse = 'a'
|
||||||
vim.o.clipboard = "unnamedplus"
|
vim.o.clipboard = 'unnamedplus'
|
||||||
|
|
||||||
-- basic color settings
|
-- basic color settings
|
||||||
vim.o.background = "dark"
|
vim.o.background = 'dark'
|
||||||
|
|
||||||
-- setting Tab-length
|
-- setting Tab-length
|
||||||
vim.o.expandtab = true
|
vim.o.expandtab = true
|
||||||
@ -61,10 +61,10 @@ vim.o.nobackup = true
|
|||||||
vim.o.nowritebackup = true
|
vim.o.nowritebackup = true
|
||||||
|
|
||||||
-- set completeopt to have a better completion experience
|
-- set completeopt to have a better completion experience
|
||||||
vim.o.completeopt = "menuone,noselect"
|
vim.o.completeopt = 'menuone,noselect'
|
||||||
|
|
||||||
-- set completion option for command mode
|
-- set completion option for command mode
|
||||||
vim.o.wildmode = "longest:full,full"
|
vim.o.wildmode = 'longest:full,full'
|
||||||
|
|
||||||
-- minimum number of lines around the cursor
|
-- minimum number of lines around the cursor
|
||||||
vim.o.scrolloff = 10
|
vim.o.scrolloff = 10
|
||||||
@ -78,14 +78,14 @@ vim.o.undofile = true
|
|||||||
vim.o.undodir = vim.env.XDG_CACHE_HOME .. "/vim/undo"
|
vim.o.undodir = vim.env.XDG_CACHE_HOME .. "/vim/undo"
|
||||||
|
|
||||||
-- python programs to use
|
-- python programs to use
|
||||||
vim.g.python_host_prog = "/usr/bin/python2"
|
vim.g.python_host_prog = '/usr/bin/python2'
|
||||||
vim.g.python3_host_prog = "/usr/bin/python3"
|
vim.g.python3_host_prog = '/usr/bin/python3'
|
||||||
|
|
||||||
-- folding
|
-- folding
|
||||||
vim.o.foldcolumn = "0"
|
vim.o.foldcolumn = '0'
|
||||||
vim.o.foldlevel = 99
|
vim.o.foldlevel = 99
|
||||||
vim.o.foldlevelstart = 99
|
vim.o.foldlevelstart = 99
|
||||||
vim.o.foldexpr = "expr"
|
vim.o.foldexpr = 'expr'
|
||||||
vim.o.foldenable = true
|
vim.o.foldenable = true
|
||||||
vim.o.conceallevel = 0
|
vim.o.conceallevel = 0
|
||||||
vim.g.markdown_folding = 1
|
vim.g.markdown_folding = 1
|
||||||
@ -98,35 +98,34 @@ vim.o.textwidth = 80
|
|||||||
-- read files correctly
|
-- read files correctly
|
||||||
vim.filetype.add({
|
vim.filetype.add({
|
||||||
extension = {
|
extension = {
|
||||||
c = "c",
|
c = 'c',
|
||||||
h = "c",
|
h = 'c',
|
||||||
html = "html",
|
html = 'html',
|
||||||
java = "java",
|
java = 'java',
|
||||||
js = "javascript",
|
js = 'javascript',
|
||||||
lua = "lua",
|
lua = 'lua',
|
||||||
md = "markdown",
|
md = 'markdown',
|
||||||
nim = "nim",
|
nim = 'nim',
|
||||||
py = "python",
|
py = 'python',
|
||||||
sage = "python",
|
sage = 'python',
|
||||||
sh = "shell",
|
tex = 'tex',
|
||||||
tex = "tex",
|
}
|
||||||
},
|
|
||||||
})
|
})
|
||||||
|
|
||||||
-- set mapleader for hotkeys
|
-- set mapleader for hotkeys
|
||||||
vim.g.mapleader = ","
|
vim.g.mapleader = ","
|
||||||
|
|
||||||
-- load general mapped keys
|
-- load general mapped keys
|
||||||
require("style")
|
require('style')
|
||||||
|
|
||||||
-- load dictionaries and helper functions
|
-- load dictionaries and helper functions
|
||||||
require("dictionaries")
|
require('dictionaries')
|
||||||
|
|
||||||
-- load plugins (autoload all files in plugin folder)
|
-- load plugins (autoload all files in plugin folder)
|
||||||
require("loadplugins")
|
require('loadplugins')
|
||||||
|
|
||||||
-- load general mapped keys
|
-- load general mapped keys
|
||||||
require("keymap")
|
require('keymap')
|
||||||
|
|
||||||
vim.cmd([[
|
vim.cmd([[
|
||||||
set foldopen-=hor
|
set foldopen-=hor
|
||||||
|
@ -5,12 +5,10 @@ return {
|
|||||||
config = function()
|
config = function()
|
||||||
require("conform").setup({
|
require("conform").setup({
|
||||||
formatters_by_ft = {
|
formatters_by_ft = {
|
||||||
lua = { "stylua" },
|
|
||||||
markdown = { "mdformat" },
|
|
||||||
python = { "isort", "yapf" },
|
python = { "isort", "yapf" },
|
||||||
sh = { "beautysh" },
|
markdown = { "mdformat" },
|
||||||
shell = { "beautysh" },
|
|
||||||
tex = { "latexindent" },
|
tex = { "latexindent" },
|
||||||
|
lua = { "stylua" },
|
||||||
yaml = { "yamlfmt" },
|
yaml = { "yamlfmt" },
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
@ -20,12 +18,6 @@ return {
|
|||||||
{ "-y=defaultIndent: ' '" }
|
{ "-y=defaultIndent: ' '" }
|
||||||
),
|
),
|
||||||
}
|
}
|
||||||
require("conform").formatters.beautysh = {
|
|
||||||
args = require("conform.util").extend_args(
|
|
||||||
require("conform.formatters.beautysh").args,
|
|
||||||
{ "--indent-size=2", "--force-function-style=fnpar" }
|
|
||||||
),
|
|
||||||
}
|
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
@ -9,7 +9,7 @@ return {
|
|||||||
require("null-ls").setup({
|
require("null-ls").setup({
|
||||||
sources = {
|
sources = {
|
||||||
-- latex
|
-- latex
|
||||||
-- require("null-ls").builtins.formatting.latexindent,
|
require("null-ls").builtins.formatting.latexindent,
|
||||||
-- lua
|
-- lua
|
||||||
require("null-ls").builtins.formatting.stylua,
|
require("null-ls").builtins.formatting.stylua,
|
||||||
-- markdown
|
-- markdown
|
||||||
@ -17,8 +17,6 @@ return {
|
|||||||
-- python
|
-- python
|
||||||
require("null-ls").builtins.formatting.isort,
|
require("null-ls").builtins.formatting.isort,
|
||||||
require("null-ls").builtins.formatting.yapf,
|
require("null-ls").builtins.formatting.yapf,
|
||||||
-- shell
|
|
||||||
-- require("null-ls").builtins.formatting.beautysh,
|
|
||||||
-- yaml
|
-- yaml
|
||||||
require("null-ls").builtins.formatting.yamlfmt,
|
require("null-ls").builtins.formatting.yamlfmt,
|
||||||
}
|
}
|
||||||
@ -39,8 +37,6 @@ return {
|
|||||||
-- python
|
-- python
|
||||||
"isort",
|
"isort",
|
||||||
"yapf",
|
"yapf",
|
||||||
-- shell
|
|
||||||
"beautysh",
|
|
||||||
-- yaml
|
-- yaml
|
||||||
"yamlfmt",
|
"yamlfmt",
|
||||||
}
|
}
|
||||||
|
@ -11,15 +11,11 @@ super + r
|
|||||||
dmenu_run -F -i -c -l 20
|
dmenu_run -F -i -c -l 20
|
||||||
|
|
||||||
super + a
|
super + a
|
||||||
lmc previous
|
playerctl previous
|
||||||
super + s
|
super + s
|
||||||
lmc playpause
|
playerctl play-pause
|
||||||
super + d
|
super + d
|
||||||
lmc next
|
playerctl next
|
||||||
super + c
|
|
||||||
lmc loop
|
|
||||||
super + x
|
|
||||||
lmc shuffle
|
|
||||||
super + f
|
super + f
|
||||||
$TERMINAL -e $FILE
|
$TERMINAL -e $FILE
|
||||||
|
|
||||||
|
@ -2,6 +2,8 @@
|
|||||||
|
|
||||||
model=$(cat /proc/cpuinfo | grep "model name" | head -n1)
|
model=$(cat /proc/cpuinfo | grep "model name" | head -n1)
|
||||||
|
|
||||||
|
icon="^b#282828^^c#dfdfdf^ ^d^"
|
||||||
|
|
||||||
if printf "$model " | grep -Fqe "AMD"; then
|
if printf "$model " | grep -Fqe "AMD"; then
|
||||||
temp=$(sensors | awk '/Tctl/ {print $2}')
|
temp=$(sensors | awk '/Tctl/ {print $2}')
|
||||||
else
|
else
|
||||||
@ -10,14 +12,4 @@ fi
|
|||||||
|
|
||||||
temp=$(printf %3s $(echo ${temp##*+} | sed "s/\..*//") | tr ' ' ' ')
|
temp=$(printf %3s $(echo ${temp##*+} | sed "s/\..*//") | tr ' ' ' ')
|
||||||
|
|
||||||
if [ $temp -gt 100 ]
|
echo "$icon $temp°C"
|
||||||
then
|
|
||||||
icon="^b#282828^^c#ff0000^ ^d^"
|
|
||||||
elif [ $temp -gt 80 ]
|
|
||||||
then
|
|
||||||
icon="^b#282828^^c#ffff00^ ^d^"
|
|
||||||
else
|
|
||||||
icon="^b#282828^^c#dfdfdf^ ^d^"
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "$icon"
|
|
||||||
|
@ -3,21 +3,9 @@
|
|||||||
# Status bar module for disk space
|
# Status bar module for disk space
|
||||||
# $1 should be drive mountpoint
|
# $1 should be drive mountpoint
|
||||||
|
|
||||||
disk="/home"
|
disk="/"
|
||||||
[ ! -z "$1" ] && disk="$1"
|
[ ! -z "$1" ] && disk="$1"
|
||||||
|
|
||||||
icon="$disk"
|
icon="$disk"
|
||||||
|
|
||||||
free=$(df "$disk" | awk ' /[0-9][0-9]/ {print $4}')
|
printf "^b#282828^^c#dfdfdf^ ^d^ %s\n" "$(df -h "$disk" | awk ' /[0-9]/ {print $3 "/" $2}')"
|
||||||
|
|
||||||
if [ $free -gt 104857600 ]
|
|
||||||
then
|
|
||||||
icon="^b#282828^^c#dfdfdf^ ^d^"
|
|
||||||
elif [ $free -gt 52428800 ]
|
|
||||||
then
|
|
||||||
icon="^b#282828^^c#ffff00^ ^d^"
|
|
||||||
else
|
|
||||||
icon="^b#282828^^c#ff0000^ ^d^"
|
|
||||||
fi
|
|
||||||
|
|
||||||
printf "$icon %s"
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
icon="^b#282828^^c#dfdfdf^ ^d^"
|
icon="^b#282828^^c#dfdfdf^ ^d^"
|
||||||
|
|
||||||
temp=""
|
temp=""
|
||||||
|
|
||||||
@ -12,14 +12,4 @@ else
|
|||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ $temp -gt 100 ]
|
echo "$icon $temp°C"
|
||||||
then
|
|
||||||
icon="^b#282828^^c#ff0000^ ^d^"
|
|
||||||
elif [ $temp -gt 80 ]
|
|
||||||
then
|
|
||||||
icon="^b#282828^^c#ffff00^ ^d^"
|
|
||||||
else
|
|
||||||
icon="^b#282828^^c#dfdfdf^ ^d^"
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "$icon"
|
|
||||||
|
@ -2,24 +2,9 @@
|
|||||||
|
|
||||||
wifipercent=" 0"
|
wifipercent=" 0"
|
||||||
|
|
||||||
[ "$(cat /sys/class/net/w*/operstate)" = 'down' ] && wifiicon="^c#ff0000^ " && wifistatus="down"
|
[ "$(cat /sys/class/net/w*/operstate)" = 'down' ] && wifiicon="^c#ff0000^ ^d^"
|
||||||
|
|
||||||
[ ! -n "${wifiicon+var}" ] && wifistatus="up" && wifipercent=$(grep "^\s*w" /proc/net/wireless | awk '{ print int($3 * 100 / 70) }')
|
[ ! -n "${wifiicon+var}" ] && wifiicon="^c#dfdfdf^ ^d^" && wifipercent=$(grep "^\s*w" /proc/net/wireless | awk '{ print int($3 * 100 / 70) }')
|
||||||
|
|
||||||
wifipercent=$(printf %3s $wifipercent | tr ' ' ' ')
|
wifipercent=$(printf %3s $wifipercent | tr ' ' ' ')
|
||||||
|
echo "$(cat /sys/class/net/e*/operstate | sed "s/down/^b#282828^^c#ff0000^ /;s/up/^b#282828^^c#dfdfdf^ /")" "$wifiicon" "$wifipercent%"
|
||||||
if [ $wifistatus = "up" ]
|
|
||||||
then
|
|
||||||
if [ $wifipercent -gt 75 ]
|
|
||||||
then
|
|
||||||
wifiicon=" ^d^"
|
|
||||||
elif [ $wifipercent -gt 40 ]
|
|
||||||
then
|
|
||||||
wifiicon=" ^d^"
|
|
||||||
else
|
|
||||||
wifiicon=" ^d^"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
echo "$(cat /sys/class/net/e*/operstate | sed "s/down/^b#282828^^c#ff0000^ /;s/up/^b#282828^^c#dfdfdf^ /")" "$wifiicon"
|
|
||||||
|
@ -2,16 +2,5 @@
|
|||||||
|
|
||||||
icon="^b#282828^^c#dfdfdf^ ^d^ "
|
icon="^b#282828^^c#dfdfdf^ ^d^ "
|
||||||
total=$(free -h | awk '/^Mem:/ {print $3/$2}')
|
total=$(free -h | awk '/^Mem:/ {print $3/$2}')
|
||||||
percent=$(printf %3s $(printf %-4s $total | tr ' ' '0' | cut -c1-4 | sed -e 's/\.//g' | sed -e 's/^0//g') | tr ' ' ' ')
|
percent=$(printf %3s $(printf %-4s $total | tr ' ' '0' | cut -c1-4 | sed -e 's/\.//g' | sed -e 's/^0//g') | tr ' ' ' ')%
|
||||||
|
echo "$icon$percent"
|
||||||
if [ $percent -gt 75 ]
|
|
||||||
then
|
|
||||||
icon="^b#282828^^c#ff0000^ ^d^"
|
|
||||||
elif [ $percent -gt 50 ]
|
|
||||||
then
|
|
||||||
icon="^b#282828^^c#ffff00^ ^d^"
|
|
||||||
else
|
|
||||||
icon="^b#282828^^c#dfdfdf^ ^d^"
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "$icon"
|
|
||||||
|
@ -1,38 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
playerctlstatus=$(playerctl status 2> /dev/null)
|
|
||||||
track="$(playerctl metadata "xesam:artist") - $(playerctl metadata "xesam:title")"
|
|
||||||
track=$(echo "$track" | cut -c1-40)
|
|
||||||
loop=$(playerctl loop)
|
|
||||||
shuffle=$(playerctl shuffle)
|
|
||||||
|
|
||||||
if [ "$loop" = "Playlist" ]
|
|
||||||
then
|
|
||||||
loop_icon=""
|
|
||||||
elif [ "$loop" = "Track" ]
|
|
||||||
then
|
|
||||||
loop_icon=""
|
|
||||||
elif [ "$loop" = "None" ]
|
|
||||||
then
|
|
||||||
loop_icon=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$shuffle" = "Off" ]
|
|
||||||
then
|
|
||||||
shuffle_icon=""
|
|
||||||
elif [ "$shuffle" = "On" ]
|
|
||||||
then
|
|
||||||
shuffle_icon=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
if [ "$playerctlstatus" = "" ]
|
|
||||||
then
|
|
||||||
echo ""
|
|
||||||
elif [ "$playerctlstatus" = "Playing" ]
|
|
||||||
then
|
|
||||||
echo "$track ^b#282828^^c#dfdfdf^ ▶️ $loop_icon $shuffle_icon ^d^"
|
|
||||||
elif [ "$playerctlstatus" = "Paused" ]
|
|
||||||
then
|
|
||||||
echo "^b#282828^^c#dfdfdf^ $loop_icon $shuffle_icon ^d^"
|
|
||||||
fi
|
|
@ -3,20 +3,20 @@
|
|||||||
vol="$(wpctl get-volume @DEFAULT_AUDIO_SINK@ | awk '{print $2}' | sed -e 's/\.//g' | sed 's/^0*//')"
|
vol="$(wpctl get-volume @DEFAULT_AUDIO_SINK@ | awk '{print $2}' | sed -e 's/\.//g' | sed 's/^0*//')"
|
||||||
|
|
||||||
if [ "$vol" -eq "0" ]; then
|
if [ "$vol" -eq "0" ]; then
|
||||||
vol_info="^c#dfdfdf^ "
|
vol_info="^c#dfdfdf^ ^d^"
|
||||||
elif [ "$vol" -gt "70" ]; then
|
elif [ "$vol" -gt "70" ]; then
|
||||||
vol_info="^c#dfdfdf^ "
|
vol_info="^c#dfdfdf^ ^d^"
|
||||||
else
|
else
|
||||||
vol_info="^c#dfdfdf^ "
|
vol_info="^c#dfdfdf^ ^d^"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
$(wpctl get-volume @DEFAULT_AUDIO_SINK@ | grep -q '\[MUTED\]') && vol_info="^c#ff0000^ "
|
$(wpctl get-volume @DEFAULT_AUDIO_SINK@ | grep -q '\[MUTED\]') && vol_info="^c#ff0000^ ^d^"
|
||||||
|
|
||||||
if wpctl get-volume @DEFAULT_SOURCE@ | grep -q '\[MUTED\]'; then
|
if wpctl get-volume @DEFAULT_SOURCE@ | grep -q '\[MUTED\]'; then
|
||||||
mic="^c#ff0000^ "
|
mic="^b#282828^^c#ff0000^ "
|
||||||
else
|
else
|
||||||
mic="^c#dfdfdf^ "
|
mic="^b#282828^^c#dfdfdf^ "
|
||||||
fi
|
fi
|
||||||
|
|
||||||
vol=$(printf %3s $vol | tr ' ' ' ')
|
vol=$(printf %3s $vol | tr ' ' ' ')
|
||||||
printf "^b#282828^%s%s^d^ %s" "$mic" "$vol_info" "$vol%"
|
printf "%s %s %s %s\\n" "$mic" "$vol_info" "$vol%"
|
||||||
|
@ -12,11 +12,6 @@ case "$1" in
|
|||||||
undeaf) wpctl set-mute @DEFAULT_SINK@ 0;;
|
undeaf) wpctl set-mute @DEFAULT_SINK@ 0;;
|
||||||
mute) wpctl set-mute @DEFAULT_AUDIO_SOURCE@ 1;;
|
mute) wpctl set-mute @DEFAULT_AUDIO_SOURCE@ 1;;
|
||||||
unmute) wpctl set-mute @DEFAULT_AUDIO_SOURCE@ 0;;
|
unmute) wpctl set-mute @DEFAULT_AUDIO_SOURCE@ 0;;
|
||||||
previous) playerctl previous;;
|
|
||||||
playpause) playerctl play-pause;;
|
|
||||||
next) playerctl next;;
|
|
||||||
shuffle) playerctl shuffle toggle;;
|
|
||||||
loop) playerctl loop none;;
|
|
||||||
*) cat << EOF
|
*) cat << EOF
|
||||||
lmc: cli music interface for pulse for those with divine intellect too
|
lmc: cli music interface for pulse for those with divine intellect too
|
||||||
grand to remember the pamixer commands.
|
grand to remember the pamixer commands.
|
||||||
@ -28,12 +23,8 @@ Allowed options:
|
|||||||
unmute unmute microphone
|
unmute unmute microphone
|
||||||
deaf deaf sound
|
deaf deaf sound
|
||||||
undeaf undeaf sound
|
undeaf undeaf sound
|
||||||
previous play previous song in player
|
|
||||||
playpause toggle play or pause in player
|
|
||||||
next play next song in player
|
|
||||||
all else Print this message
|
all else Print this message
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
esac
|
esac
|
||||||
pkill -RTMIN+4 $STATUSBAR
|
pkill -RTMIN+4 $STATUSBAR
|
||||||
sleep 1 && pkill -RTMIN+9 $STATUSBAR
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user