Small changes updatebar, neovim

This commit is contained in:
tosu 2023-08-26 19:52:19 +02:00
parent 5c0f066fa7
commit b99dae25c5
Signed by: tosu
GPG Key ID: C00746F2E0F36492
5 changed files with 22 additions and 12 deletions

View File

@ -25,7 +25,7 @@ return require('packer').startup(function(use)
use('vim-airline/vim-airline')
use('vim-airline/vim-airline-themes')
use('cacharle/c_formatter_42.vim')
use('m4xshen/autoclose.nvim')
-- use('m4xshen/autoclose.nvim')
use({
'VonHeikemen/lsp-zero.nvim',
branch = 'v2.x',

View File

@ -32,9 +32,12 @@ end)
-- vim.keymap.set("n", "<leader>j", "<cmd>lprev<CR>zz")
vim.keymap.set("n", "<leader>s", ":%s/\\<<C-r><C-w>\\>/<C-r><C-w>/gI<Left><Left><Left>")
vim.keymap.set("n", "<leader>X", "<cmd>!chmod +x %<CR>")
vim.keymap.set("n", "<leader>X", "<cmd>!./%<CR>")
vim.keymap.set("n", "<leader>w", "<cmd>w<CR>")
vim.keymap.set("n", "<leader><leader>X", "<cmd>!chmod +x %<CR>")
vim.keymap.set("n", "<leader>x", ":w<CR>:!cc -std=c89 -Wall -Wextra -pedantic -Werror -Wconversion -g3 -O0 -o main *.c && ./main ; rm -f ./main<CR>")
-- vim.keymap.set("n", "<leader>x", ":w<CR>:!cc -std=c89 -Wall -Wextra -pedantic -Werror -Wconversion -g3 -O0 -o main *.c && ./main ; rm -f ./main<CR>")
vim.keymap.set("n", "<leader>x", ":w<CR>:!cc -std=c89 -Wall -Wextra -pedantic -Werror -Wconversion -g3 -O0 -o main *.c<CR><CR>")
vim.keymap.set("n", "<leader>c", "mz:s/\\(^\\s*\\)\\(.*$\\)/\\1\\/* \\2 *\\//g<CR>:noh<CR>`z")
vim.keymap.set("n", "<leader>C", "mz:s/\\/\\* \\(.*\\) \\*\\//\\1/g<CR>:noh<CR>`z")

View File

@ -40,3 +40,9 @@ vim.opt.updatetime = 50
vim.opt.colorcolumn = '80'
vim.opt.paste = false
vim.diagnostic.config({
virtual_text = false,
virtual_lines = false,
underline = false,
})

View File

@ -49,8 +49,8 @@ local function save_profiles(threshold)
end
time([[Luarocks path setup]], true)
local package_path_str = "/home/tosuman/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/?.lua;/home/tosuman/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/?/init.lua;/home/tosuman/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/?.lua;/home/tosuman/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/?/init.lua"
local install_cpath_pattern = "/home/tosuman/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/lua/5.1/?.so"
local package_path_str = "/home/tosuman/.cache/nvim/packer_hererocks/2.1.1692616192/share/lua/5.1/?.lua;/home/tosuman/.cache/nvim/packer_hererocks/2.1.1692616192/share/lua/5.1/?/init.lua;/home/tosuman/.cache/nvim/packer_hererocks/2.1.1692616192/lib/luarocks/rocks-5.1/?.lua;/home/tosuman/.cache/nvim/packer_hererocks/2.1.1692616192/lib/luarocks/rocks-5.1/?/init.lua"
local install_cpath_pattern = "/home/tosuman/.cache/nvim/packer_hererocks/2.1.1692616192/lib/lua/5.1/?.so"
if not string.find(package.path, package_path_str, 1, true) then
package.path = package.path .. ';' .. package_path_str
end
@ -79,11 +79,6 @@ _G.packer_plugins = {
path = "/home/tosuman/.local/share/nvim/site/pack/packer/start/LuaSnip",
url = "https://github.com/L3MON4D3/LuaSnip"
},
["autoclose.nvim"] = {
loaded = true,
path = "/home/tosuman/.local/share/nvim/site/pack/packer/start/autoclose.nvim",
url = "https://github.com/m4xshen/autoclose.nvim"
},
["c_formatter_42.vim"] = {
loaded = true,
path = "/home/tosuman/.local/share/nvim/site/pack/packer/start/c_formatter_42.vim",

View File

@ -18,8 +18,8 @@ getBattery() {
battery="$(level="$(printf '%s' "$(($(cat /sys/class/power_supply/BAT1/energy_now) * 100000 / $(cat /sys/class/power_supply/BAT1/energy_full)))" | sed "s/\(...\)$/.\1%/")$([ "$(cat /sys/class/power_supply/BAT1/status)" = "Charging" ] && printf '%s' "+" || printf '%s' "-")" ; printf '%s' "${level}" ; printf '%s' "$(date "+%a %d/%m/%Y %H:%M:%S"): ${level}" >> /home/tosuman/.logs/battery.log)"
int_battery="$(printf '%s' "${battery}" | sed 's/\..*//')"
if [ "${int_battery}" -lt 11 ] && [ -z "$(pgrep -f qutebrowser)" ] ; then
xdotool key "alt+m"
xdotool key "alt+7"
xdotool key "Super_L+m"
xdotool key "Super_L+7"
1>/dev/null 2>&1 qutebrowser "/home/tosuman/infopages/battery_low.html" &
fi
@ -41,6 +41,12 @@ getWifi() {
printf '%s' "${wifi}"
}
getWifi1() {
wifi="$(iw dev wlan1 link | grep SSID | sed -e 's/[[:blank:]]*SSID: //' -e 's/[[:blank:]]*$//')"
[ -n "${wifi}" ] && wifi="${dlm}^c#bf616a^ ${wifi}^d^"
printf '%s' "${wifi}"
}
getEth () {
eth="$(2>/dev/null ip a show "$(ls /sys/class/net | grep enp | head -1)" | grep -v inet6 | grep inet | awk '{print $2}')"
[ -n "${eth}" ] && eth="${dlm}^c#bf616a^ ${eth}^d^"