Update dotfiles
|
@ -1,3 +1,9 @@
|
||||||
|
if status --is-login
|
||||||
|
if test -z "$DISPLAY" -a $XDG_VTNR = 1
|
||||||
|
exec Hyprland > ~/.hyprland.log
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
if status is-interactive
|
if status is-interactive
|
||||||
alias ls="lsd"
|
alias ls="lsd"
|
||||||
|
|
||||||
|
@ -10,13 +16,17 @@ if status is-interactive
|
||||||
|
|
||||||
alias la="lsd -la"
|
alias la="lsd -la"
|
||||||
|
|
||||||
alias dotfiles="git --git-dir=/home/q/repos/dotfiles --work-tree=$HOME"
|
|
||||||
|
|
||||||
set -U fish_user_paths $HOME/bin $fish_user_paths
|
set -U fish_user_paths $HOME/bin $fish_user_paths
|
||||||
set -x TERM "xterm-256color"
|
set -U fish_user_paths $HOME/.local/bin $fish_user_paths
|
||||||
|
alias dotfiles="git --git-dir=/home/q/repos/dotfiles --work-tree=$HOME"
|
||||||
|
alias chromium-browser-stable="chromium-browser-stable --disable-gpu --disable-software-rasterizer"
|
||||||
|
|
||||||
set -x PF_INFO "ascii title os kernel wm shell pkgs memory"
|
set -x PF_INFO "ascii title os kernel wm shell pkgs memory"
|
||||||
# set -x TERM "xterm"
|
|
||||||
|
set -x TERM "xterm-256color"
|
||||||
set -x EDITOR "nvim"
|
set -x EDITOR "nvim"
|
||||||
|
set -x VISUAL "nvim"
|
||||||
|
|
||||||
set -x XDG_DATA_HOME $HOME/.local/share
|
set -x XDG_DATA_HOME $HOME/.local/share
|
||||||
|
|
||||||
set srcdir "$HOME/.cache/"
|
set srcdir "$HOME/.cache/"
|
||||||
|
|
|
@ -49,6 +49,6 @@ SETUVAR fish_pager_color_selected_background:\x1d
|
||||||
SETUVAR fish_pager_color_selected_completion:\x1d
|
SETUVAR fish_pager_color_selected_completion:\x1d
|
||||||
SETUVAR fish_pager_color_selected_description:\x1d
|
SETUVAR fish_pager_color_selected_description:\x1d
|
||||||
SETUVAR fish_pager_color_selected_prefix:\x1d
|
SETUVAR fish_pager_color_selected_prefix:\x1d
|
||||||
SETUVAR fish_user_paths:/home/q/bin\x1e/home/q/\x2elocal/bin
|
SETUVAR fish_user_paths:/home/q/\x2elocal/bin\x1e/home/q/bin
|
||||||
SETUVAR nvm_data:/home/q/\x2elocal/share/nvm
|
SETUVAR nvm_data:/home/q/\x2elocal/share/nvm
|
||||||
SETUVAR nvm_mirror:https\x3a//nodejs\x2eorg/dist
|
SETUVAR nvm_mirror:https\x3a//nodejs\x2eorg/dist
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
# title=foot
|
# title=foot
|
||||||
# locked-title=no
|
# locked-title=no
|
||||||
|
|
||||||
font=JetBrainsMono Nerd Font Mono:size=9
|
font=JetBrainsMono Nerd Font Mono:size=13
|
||||||
|
|
||||||
# font=monospace:size=8
|
# font=monospace:size=8
|
||||||
# font-bold=<bold variant of regular font>
|
# font-bold=<bold variant of regular font>
|
||||||
|
|
|
@ -15,12 +15,15 @@ monitor=,1920x1080,auto,1
|
||||||
# Execute your favorite apps at launch
|
# Execute your favorite apps at launch
|
||||||
# exec-once = waybar & hyprpaper & firefox
|
# exec-once = waybar & hyprpaper & firefox
|
||||||
|
|
||||||
exec-once = light -S 50
|
|
||||||
exec-once = swww init
|
exec-once = swww init
|
||||||
exec-once = waybar
|
exec-once = waybar
|
||||||
|
exec-once = light -S 50
|
||||||
exec-once = kotatogram-desktop
|
exec-once = kotatogram-desktop
|
||||||
exec-once = dunst -config ~/.config/dunst/dunstrc
|
exec-once = dunst -config ~/.config/dunst/dunstrc
|
||||||
exec-once = /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 &
|
exec-once = /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 &
|
||||||
|
exec-once = /usr/bin/chromium-browser-stable --disable-gpu --disable-software-rasterizer
|
||||||
|
exec-once = $HOME/bin/battery-daemon &
|
||||||
|
|
||||||
# Source a file (multi-file configs)
|
# Source a file (multi-file configs)
|
||||||
# source = ~/.config/hypr/myColors.conf
|
# source = ~/.config/hypr/myColors.conf
|
||||||
|
@ -56,12 +59,8 @@ general {
|
||||||
|
|
||||||
decoration {
|
decoration {
|
||||||
# See https://wiki.hyprland.org/Configuring/Variables/ for more
|
# See https://wiki.hyprland.org/Configuring/Variables/ for more
|
||||||
|
|
||||||
rounding = 10
|
rounding = 10
|
||||||
blur = yes
|
blur: 3
|
||||||
blur_size = 3
|
|
||||||
blur_passes = 1
|
|
||||||
blur_new_optimizations = on
|
|
||||||
|
|
||||||
drop_shadow = yes
|
drop_shadow = yes
|
||||||
shadow_range = 4
|
shadow_range = 4
|
||||||
|
@ -124,10 +123,15 @@ windowrulev2 = workspace 2 silent,title:^(Kotatogram)$
|
||||||
windowrulev2 = size 641 1022,title:^(Kotatogram)$
|
windowrulev2 = size 641 1022,title:^(Kotatogram)$
|
||||||
windowrulev2 = move 25 45,title:^(Kotatogram)$
|
windowrulev2 = move 25 45,title:^(Kotatogram)$
|
||||||
|
|
||||||
|
|
||||||
|
windowrulev2 = workspace 1 silent,title:^(chromium-browser)$
|
||||||
|
|
||||||
$mainMod = SUPER
|
$mainMod = SUPER
|
||||||
|
|
||||||
bind = $mainMod SHIFT, S,exec, bin/w-screenrecord
|
bind = $mainMod SHIFT, S,exec, bin/w-screenrecord
|
||||||
|
|
||||||
|
# bindl=,switch:[switch name],exec,$HOME/bin/lockscreen
|
||||||
|
|
||||||
|
|
||||||
bind = $mainMod, C, killactive,
|
bind = $mainMod, C, killactive,
|
||||||
bind = $mainMod, X, exit,
|
bind = $mainMod, X, exit,
|
||||||
|
@ -148,7 +152,9 @@ bind = $mainMod, N, exec, foot -e lf
|
||||||
bind = $mainMod, M, exec, foot -e cmus
|
bind = $mainMod, M, exec, foot -e cmus
|
||||||
bind = $mainMod, d, exec, wofi --show drun -I -i
|
bind = $mainMod, d, exec, wofi --show drun -I -i
|
||||||
bind = ,Print, exec, makescreenshot
|
bind = ,Print, exec, makescreenshot
|
||||||
bind = $mainMod, l, exec, lockscreen
|
# bind = $mainMod, SHIFT, L, exec, lockscreen
|
||||||
|
bind = ALT, L, exec, lockscreen
|
||||||
|
|
||||||
# not forget install xdg-desktop-portal 1.14.6
|
# not forget install xdg-desktop-portal 1.14.6
|
||||||
# Modify file /usr/share/xdg-desktop-portal/portals/{}.portal UserIn=sway;wlroots
|
# Modify file /usr/share/xdg-desktop-portal/portals/{}.portal UserIn=sway;wlroots
|
||||||
|
|
||||||
|
@ -195,3 +201,7 @@ bind = $mainMod SHIFT,h, movewindow, l
|
||||||
# Move/resize windows with mainMod + LMB/RMB and dragging
|
# Move/resize windows with mainMod + LMB/RMB and dragging
|
||||||
bindm = $mainMod, mouse:272, movewindow
|
bindm = $mainMod, mouse:272, movewindow
|
||||||
bindm = $mainMod, mouse:273, resizewindow
|
bindm = $mainMod, mouse:273, resizewindow
|
||||||
|
|
||||||
|
misc {
|
||||||
|
disable_hyprland_logo = true
|
||||||
|
}
|
||||||
|
|
|
@ -8,8 +8,8 @@ set shellopts '-eu'
|
||||||
|
|
||||||
set previewer ctpv
|
set previewer ctpv
|
||||||
set cleaner ctpvclear
|
set cleaner ctpvclear
|
||||||
&ctpv -s $id
|
&ctpv -d -s $id >> ~/temp/lf_ctpv.log
|
||||||
&ctpvquit $id
|
&ctpvquit $id >> ~/temp/lf_ctpvquit.log
|
||||||
|
|
||||||
cmd edit-config ${{
|
cmd edit-config ${{
|
||||||
$EDITOR ~/.config/lf/lfrc
|
$EDITOR ~/.config/lf/lfrc
|
||||||
|
@ -27,7 +27,7 @@ cmd open &{{
|
||||||
esac
|
esac
|
||||||
}}
|
}}
|
||||||
|
|
||||||
cmd setwallpaper %swww img "$f" --transition-type right --transition-fps 60
|
cmd setwallpaper %swww img "$f" --transition-type wipe --transition-fps 60
|
||||||
|
|
||||||
cmd fzf_jump ${{
|
cmd fzf_jump ${{
|
||||||
res="$(find . | fzf --reverse --header='Jump to location' | sed 's/\\/\\\\/g;s/"/\\"/g')"
|
res="$(find . | fzf --reverse --header='Jump to location' | sed 's/\\/\\\\/g;s/"/\\"/g')"
|
||||||
|
@ -41,7 +41,7 @@ cmd fzf_jump ${{
|
||||||
lf -remote "send $id $cmd \"$res\""
|
lf -remote "send $id $cmd \"$res\""
|
||||||
}}
|
}}
|
||||||
|
|
||||||
cmd fzf_search ${{
|
cmd rg_search ${{
|
||||||
res="$( \
|
res="$( \
|
||||||
RG_PREFIX="rg --column --line-number --no-heading --color=always \
|
RG_PREFIX="rg --column --line-number --no-heading --color=always \
|
||||||
--smart-case "
|
--smart-case "
|
||||||
|
@ -83,15 +83,28 @@ cmd zip ${{
|
||||||
|
|
||||||
|
|
||||||
# Trash bindings
|
# Trash bindings
|
||||||
cmd trash ${{
|
cmd move-to-trash ${{
|
||||||
files=$(printf "$fx" | tr '\n' ';')
|
files=$(printf "$fx" | tr '\n' ';')
|
||||||
while [ "$files" ]; do
|
while [ "$files" ]; do
|
||||||
file=${files%%;*}
|
file=${files%%;*}
|
||||||
|
|
||||||
if [[ "$(pwd)" == "/home/$USER/.local/share/Trash/files" ]]; then
|
|
||||||
rm -rf "$fx"
|
|
||||||
else
|
|
||||||
trash-put "$(basename "$file")"
|
trash-put "$(basename "$file")"
|
||||||
|
|
||||||
|
if [ "$files" = "$file" ]; then
|
||||||
|
files=''
|
||||||
|
else
|
||||||
|
files="${files#*;}"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
}}
|
||||||
|
|
||||||
|
cmd delete-from-trash ${{
|
||||||
|
files=$(printf "$fx" | tr '\n' ';')
|
||||||
|
while [ "$files" ]; do
|
||||||
|
file=${files%%;*}
|
||||||
|
|
||||||
|
if [[ "$(pwd)" == "$HOME/.local/share/Trash/files" ]]; then
|
||||||
|
rm -rf "$file"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$files" = "$file" ]; then
|
if [ "$files" = "$file" ]; then
|
||||||
|
@ -121,7 +134,9 @@ cmd trash ${{
|
||||||
# }}
|
# }}
|
||||||
|
|
||||||
# lfrc
|
# lfrc
|
||||||
cmd restore-from-trash ${{
|
|
||||||
|
|
||||||
|
cmd trash-restore-list ${{
|
||||||
ids="$(echo -ne '\n' | \
|
ids="$(echo -ne '\n' | \
|
||||||
trash-restore | \
|
trash-restore | \
|
||||||
awk '$1 ~ /^[0-9]+/ {print $0}' | \
|
awk '$1 ~ /^[0-9]+/ {print $0}' | \
|
||||||
|
@ -132,6 +147,27 @@ cmd restore-from-trash ${{
|
||||||
clear
|
clear
|
||||||
}}
|
}}
|
||||||
|
|
||||||
|
cmd restore-from-trash ${{
|
||||||
|
files=$(printf "$fx" | tr '\n' ';')
|
||||||
|
while [ "$files" ]; do
|
||||||
|
file=${files%%;*}
|
||||||
|
|
||||||
|
Id="$(echo -ne '\n'|
|
||||||
|
trash-restore ~ |
|
||||||
|
grep $(basename "$file") |
|
||||||
|
awk '{print $1}'
|
||||||
|
)"
|
||||||
|
|
||||||
|
echo $Id | trash-restore ~
|
||||||
|
|
||||||
|
if [ "$files" = "$file" ]; then
|
||||||
|
files=''
|
||||||
|
else
|
||||||
|
files="${files#*;}"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
}}
|
||||||
|
|
||||||
map m
|
map m
|
||||||
map o
|
map o
|
||||||
map n
|
map n
|
||||||
|
@ -158,13 +194,16 @@ map x cut
|
||||||
map <enter> open
|
map <enter> open
|
||||||
|
|
||||||
map f :fzf_jump
|
map f :fzf_jump
|
||||||
map gf :fzf_search
|
map gf :rg_search
|
||||||
|
|
||||||
map C edit-config
|
map C edit-config
|
||||||
map bg setwallpaper
|
map bg setwallpaper
|
||||||
|
|
||||||
map dd trash
|
map mt move-to-trash
|
||||||
map dr restore-from-trash
|
map dt delete-from-trash
|
||||||
|
map tr restore-from-trash
|
||||||
|
map trl trash-restore-list
|
||||||
|
|
||||||
|
|
||||||
map R reload
|
map R reload
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@ vim.api.nvim_set_keymap('', '<down>', '<nop>', {noremap = true})
|
||||||
vim.api.nvim_set_keymap('', '<left>', '<nop>', {noremap = true})
|
vim.api.nvim_set_keymap('', '<left>', '<nop>', {noremap = true})
|
||||||
vim.api.nvim_set_keymap('', '<right>', '<nop>',{noremap = true})
|
vim.api.nvim_set_keymap('', '<right>', '<nop>',{noremap = true})
|
||||||
|
|
||||||
keymap("n","<space>,",":nohlsearch<CR>")
|
keymap("n","<space>,",":nohlsearch<CR>", {desc = "Clear an selected strings"})
|
||||||
|
|
||||||
keymap("n","s",'"_d"')
|
keymap("n","s",'"_d"')
|
||||||
|
|
||||||
|
@ -14,3 +14,6 @@ keymap('n', 'gwh', '<C-w>h')
|
||||||
keymap('n', 'gwj', '<C-w>j')
|
keymap('n', 'gwj', '<C-w>j')
|
||||||
keymap('n', 'gwk', '<C-w>k')
|
keymap('n', 'gwk', '<C-w>k')
|
||||||
keymap('n', 'gwl', '<C-w>l')
|
keymap('n', 'gwl', '<C-w>l')
|
||||||
|
|
||||||
|
keymap("n", "<space>bf",":bf<CR>",{desc = "[G]oto first buffer"})
|
||||||
|
keymap("n", "<space>bl",":bl<CR>",{desc = "[G]oto last buffer"})
|
||||||
|
|
|
@ -26,6 +26,13 @@ require("lazy").setup({
|
||||||
vim.cmd.colorscheme "nord"
|
vim.cmd.colorscheme "nord"
|
||||||
end
|
end
|
||||||
},
|
},
|
||||||
|
-- {
|
||||||
|
-- "andersevenrud/nordic.nvim",
|
||||||
|
-- config = function()
|
||||||
|
-- vim.cmd.colorscheme "nordic"
|
||||||
|
-- end
|
||||||
|
-- },
|
||||||
|
|
||||||
-- use {"catppuccin/nvim", as = "catppuccin"}
|
-- use {"catppuccin/nvim", as = "catppuccin"}
|
||||||
-- use {"tiagovla/tokyodark.nvim"}
|
-- use {"tiagovla/tokyodark.nvim"}
|
||||||
-- use {'Everblush/everblush.nvim',as = 'everblush'}
|
-- use {'Everblush/everblush.nvim',as = 'everblush'}
|
||||||
|
@ -107,7 +114,10 @@ require("lazy").setup({
|
||||||
dependencies = {
|
dependencies = {
|
||||||
{"williamboman/mason.nvim", opts},
|
{"williamboman/mason.nvim", opts},
|
||||||
"williamboman/mason-lspconfig.nvim",
|
"williamboman/mason-lspconfig.nvim",
|
||||||
{"j-hui/fidget.nvim", opts = {}}
|
{"j-hui/fidget.nvim",
|
||||||
|
tag = "legacy",
|
||||||
|
opts = {}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
config = function()
|
config = function()
|
||||||
require("lsp")
|
require("lsp")
|
||||||
|
|
|
@ -36,21 +36,39 @@ local navic = require("nvim-navic")
|
||||||
|
|
||||||
vim.g.lsp_capabilities = require('cmp_nvim_lsp').default_capabilities(capabilities)
|
vim.g.lsp_capabilities = require('cmp_nvim_lsp').default_capabilities(capabilities)
|
||||||
|
|
||||||
vim.g.lsp_on_attach = function(client,bufnr)
|
vim.g.lsp_on_attach = function(client, bufnr)
|
||||||
print("Attaching to:",client.name)
|
print("Attaching to:",client.name)
|
||||||
local function buf_set_keymap(...) vim.api.nvim_buf_set_keymap(bufnr,...) end
|
|
||||||
local opts = {noremap = true,silent=true}
|
local nmap = function(keys, func, desc)
|
||||||
|
if desc then
|
||||||
|
desc = 'LSP: ' .. desc
|
||||||
|
end
|
||||||
|
|
||||||
|
vim.keymap.set("n", keys, func, {buffer = bufnr, desc = desc})
|
||||||
|
end
|
||||||
|
|
||||||
if client.server_capabilities.documentSymbolProvider then
|
if client.server_capabilities.documentSymbolProvider then
|
||||||
navic.attach(client, bufnr)
|
navic.attach(client, bufnr)
|
||||||
end
|
end
|
||||||
|
|
||||||
buf_set_keymap('n','gd','<cmd>lua vim.lsp.buf.definition()<CR>',opts)
|
nmap('gd', vim.lsp.buf.definition, "[G]oto [D]efinition")
|
||||||
buf_set_keymap('n','K', '<cmd>lua vim.lsp.buf.hover()<CR>',opts)
|
nmap('gr', require('telescope.builtin').lsp_references, '[G]oto [R]eferences')
|
||||||
buf_set_keymap('n','[d','<cmd>lua vim.diagnostic.goto_prev()<CR>',opts)
|
nmap('gI', vim.lsp.buf.implementation, '[G]oto [I]mplementation')
|
||||||
buf_set_keymap('n',']d','<cmd>lua vim.diagnostic.goto_next()<CR>',opts)
|
nmap('<leader>D', vim.lsp.buf.type_definition, 'Type [D]efinition')
|
||||||
buf_set_keymap('n','<leader>d','<cmd>lua vim.diagnostic.open_float({border="rounded"})<CR>',opts)
|
nmap('<leader>ds', require('telescope.builtin').lsp_document_symbols, '[D]ocument [S]ymbols')
|
||||||
buf_set_keymap('n','<space>f','<cmd>lua vim.lsp.buf.format()<CR>',opts)
|
nmap('<leader>ws', require('telescope.builtin').lsp_dynamic_workspace_symbols, '[W]orkspace [S]ymbols')
|
||||||
|
|
||||||
|
nmap('<leader>wa', vim.lsp.buf.add_workspace_folder, '[W]orkspace [A]dd Folder')
|
||||||
|
nmap('<leader>wr', vim.lsp.buf.remove_workspace_folder, '[W]orkspace [R]emove Folder')
|
||||||
|
nmap('<leader>wl', function()
|
||||||
|
print(vim.inspect(vim.lsp.buf.list_workspace_folders()))
|
||||||
|
end, '[W]orkspace [L]ist Folders')
|
||||||
|
|
||||||
|
nmap('K',vim.lsp.buf.hover, "Hover Documentation")
|
||||||
|
|
||||||
|
nmap('[d', vim.diagnostic.goto_prev, "[G]oto previous diagnostic message")
|
||||||
|
nmap(']d', vim.diagnostic.goto_next, "[G]oto next diagnostic message")
|
||||||
|
nmap('<leader>e', vim.diagnostic.open_float, "Open floating diagnostic message")
|
||||||
end
|
end
|
||||||
|
|
||||||
local servers = mason_lsp.get_installed_servers()
|
local servers = mason_lsp.get_installed_servers()
|
||||||
|
@ -66,7 +84,6 @@ for _, server in ipairs(servers) do
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
vim.pretty_print({server = server, result = result})
|
vim.pretty_print({server = server, result = result})
|
||||||
-- vim.notify("Missing server configuration for " .. server, "error")
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -7,8 +7,8 @@ end
|
||||||
cmp.setup({
|
cmp.setup({
|
||||||
mapping = cmp.mapping.preset.insert({
|
mapping = cmp.mapping.preset.insert({
|
||||||
["<Tab>"] = cmp.mapping.select_next_item(),
|
["<Tab>"] = cmp.mapping.select_next_item(),
|
||||||
["<C-k>"] = cmp.mapping.select_next_item(),
|
["<C-N>"] = cmp.mapping.select_next_item(),
|
||||||
["<C-j>"] = cmp.mapping.select_prev_item(),
|
["<C-P>"] = cmp.mapping.select_prev_item(),
|
||||||
["<S-Tab>"] = cmp.mapping.select_prev_item(),
|
["<S-Tab>"] = cmp.mapping.select_prev_item(),
|
||||||
["<C-Space>"] = cmp.mapping.complete(),
|
["<C-Space>"] = cmp.mapping.complete(),
|
||||||
["<CR>"] = cmp.mapping.confirm({select = false}),
|
["<CR>"] = cmp.mapping.confirm({select = false}),
|
||||||
|
|
|
@ -5,10 +5,10 @@ end
|
||||||
|
|
||||||
local s = ls.s
|
local s = ls.s
|
||||||
|
|
||||||
local fmt = require("luasnip.extras.fmt").fmt
|
local fmt = require("luasnip.extras.fmt")
|
||||||
|
|
||||||
local i = ls.insert_node
|
local i = ls.insert_node
|
||||||
|
local t = ls.text_node
|
||||||
local rep = require("luasnip.extras").rep
|
local rep = require("luasnip.extras").rep
|
||||||
|
|
||||||
ls.setup({
|
ls.setup({
|
||||||
|
@ -20,22 +20,52 @@ ls.setup({
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
ls.add_snippets("lua", {
|
-- ls.add_snippets("lua", {
|
||||||
s(
|
-- ls.snippet("reqm",
|
||||||
"reqm",
|
-- fmt.fmta(
|
||||||
fmt(
|
-- [[
|
||||||
|
-- local ok, {} = pcall(require,"{}")
|
||||||
|
-- if not ok then
|
||||||
|
-- vim.notify("Failed load {}\n")
|
||||||
|
-- end
|
||||||
|
-- ]], {
|
||||||
|
-- i(1, "mod"),
|
||||||
|
-- i(2),
|
||||||
|
-- rep(2),
|
||||||
|
-- }
|
||||||
|
-- )
|
||||||
|
-- )
|
||||||
|
-- })
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
ls.add_snippets("go", {
|
||||||
|
ls.snippet("func",
|
||||||
|
fmt.fmta(
|
||||||
[[
|
[[
|
||||||
local ok, {} = pcall(require,"{}")
|
<>, err := <>
|
||||||
if not ok then
|
if err != nil {
|
||||||
vim.notify("Failed load {}\n")
|
<>
|
||||||
end
|
}
|
||||||
]], {
|
]], {
|
||||||
i(1, "mod"),
|
i(1, "out"),
|
||||||
i(2),
|
i(2, "func()"),
|
||||||
rep(2),
|
i(3, "// some code")
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
),
|
||||||
|
|
||||||
|
ls.snippet(
|
||||||
|
"main",
|
||||||
|
fmt.fmta(
|
||||||
|
[[
|
||||||
|
func main() {
|
||||||
|
<><>
|
||||||
|
}
|
||||||
|
]],
|
||||||
|
{ t("\t"), i(0) }
|
||||||
)
|
)
|
||||||
|
),
|
||||||
})
|
})
|
||||||
|
|
||||||
-- Configuring keybinds
|
-- Configuring keybinds
|
||||||
|
|
|
@ -23,17 +23,13 @@ telescope.setup{
|
||||||
|
|
||||||
local keymap = vim.keymap.set
|
local keymap = vim.keymap.set
|
||||||
|
|
||||||
keymap("n","<leader>f",builtin.find_files)
|
keymap("n","<leader>sf",builtin.find_files, {desc = "[S]earch [F]iles"})
|
||||||
keymap("n","<leader>l",builtin.live_grep)
|
keymap("n","<leader>sg",builtin.live_grep, {desc = "[S]earch by [G]rep"})
|
||||||
keymap("n","<leader>L",builtin.grep_string)
|
keymap("n","<leader>sw",builtin.grep_string, {desc = "[S]earch current [W]ord"})
|
||||||
|
keymap("n","<leader>ff",builtin.current_buffer_fuzzy_find, {desc = "[F]uzzy [F]ind in current [B]uffer"})
|
||||||
|
|
||||||
keymap("n","<leader>;",builtin.current_buffer_fuzzy_find)
|
keymap("n","<leader>fb",builtin.buffers, {desc = "[F]ind existing [B]uffers"})
|
||||||
keymap("n","<leader>b",builtin.buffers)
|
|
||||||
|
|
||||||
keymap("n","<leader>e",function()
|
keymap("n","<leader>sd",builtin.diagnostics, {desc = "[S]earch [D]iagnostics"})
|
||||||
builtin.diagnostics{bufnr = 0,severity_limit = "WARN"}
|
keymap("n","<leader>sdc",function() builtin.diagnostics{bufnr = 0} end, {desc = "[S]earch [D]iagnostics in current [B]uffer"})
|
||||||
end)
|
keymap("n","<leader>sk",builtin.keymaps, {desc = "[S]earch existing [K]eymaps"})
|
||||||
|
|
||||||
keymap("n","<leader>E",function()
|
|
||||||
builtin.diagnostics{severity_limit = "WARN"}
|
|
||||||
end)
|
|
||||||
|
|
|
@ -71,7 +71,7 @@ button:focus {
|
||||||
|
|
||||||
#workspaces button.active {
|
#workspaces button.active {
|
||||||
background-color: @background;
|
background-color: @background;
|
||||||
color: @blue;
|
color: @white;
|
||||||
}
|
}
|
||||||
|
|
||||||
#workspaces button.urgent {
|
#workspaces button.urgent {
|
||||||
|
|
After Width: | Height: | Size: 202 KiB |
After Width: | Height: | Size: 210 KiB |
After Width: | Height: | Size: 5.2 MiB |
After Width: | Height: | Size: 945 KiB |
After Width: | Height: | Size: 316 KiB |
After Width: | Height: | Size: 1.9 MiB |
After Width: | Height: | Size: 1.3 MiB |
After Width: | Height: | Size: 1012 KiB |
After Width: | Height: | Size: 1.8 MiB |
After Width: | Height: | Size: 225 KiB |
After Width: | Height: | Size: 718 KiB |
Before Width: | Height: | Size: 481 KiB After Width: | Height: | Size: 481 KiB |
Before Width: | Height: | Size: 1.7 MiB After Width: | Height: | Size: 1.7 MiB |
Before Width: | Height: | Size: 1.6 MiB After Width: | Height: | Size: 1.6 MiB |
Before Width: | Height: | Size: 274 KiB After Width: | Height: | Size: 274 KiB |
Before Width: | Height: | Size: 758 KiB After Width: | Height: | Size: 758 KiB |
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 32 KiB |
Before Width: | Height: | Size: 2.7 MiB After Width: | Height: | Size: 2.7 MiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
After Width: | Height: | Size: 536 KiB |
After Width: | Height: | Size: 16 KiB |
After Width: | Height: | Size: 318 KiB |
After Width: | Height: | Size: 1.1 MiB |
After Width: | Height: | Size: 17 KiB |
After Width: | Height: | Size: 2.7 MiB |
After Width: | Height: | Size: 762 KiB |
After Width: | Height: | Size: 3.0 MiB |
After Width: | Height: | Size: 2.0 MiB |
Before Width: | Height: | Size: 342 KiB After Width: | Height: | Size: 342 KiB |
After Width: | Height: | Size: 125 KiB |
Before Width: | Height: | Size: 482 KiB After Width: | Height: | Size: 482 KiB |
Before Width: | Height: | Size: 128 KiB After Width: | Height: | Size: 128 KiB |
Before Width: | Height: | Size: 136 KiB After Width: | Height: | Size: 136 KiB |
Before Width: | Height: | Size: 186 KiB After Width: | Height: | Size: 186 KiB |
Before Width: | Height: | Size: 2.6 MiB After Width: | Height: | Size: 2.6 MiB |
Before Width: | Height: | Size: 146 KiB After Width: | Height: | Size: 146 KiB |
Before Width: | Height: | Size: 383 KiB |
Before Width: | Height: | Size: 108 KiB |
Before Width: | Height: | Size: 212 KiB |
Before Width: | Height: | Size: 47 KiB |
Before Width: | Height: | Size: 303 KiB |
|
@ -0,0 +1,12 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
declare -A local_games
|
||||||
|
local_games=( ["Factorio"]="$HOME/.factorio" ["Terraria"]="$HOME/.local/share/Terraria" )
|
||||||
|
|
||||||
|
remote_games_path="Game Files"
|
||||||
|
|
||||||
|
for game in ${!local_games[@]}
|
||||||
|
do
|
||||||
|
echo "${local_games[$game]} => $remote_games_path/$game"
|
||||||
|
upload-to-nextcloud "${local_games[$game]}" "$remote_games_path/$game"
|
||||||
|
done
|
|
@ -27,7 +27,14 @@ while true; do
|
||||||
"Battery is low ($time_to_empty hours left)" \
|
"Battery is low ($time_to_empty hours left)" \
|
||||||
-r 100 \
|
-r 100 \
|
||||||
-i "$notify_icons/battery-low.png"
|
-i "$notify_icons/battery-low.png"
|
||||||
mpv "/home/q/.config/alarm/low-battery-sound.mp3"
|
mpv "/home/q/.config/alarm/low-battery-sound.mp3" > /dev/null 2>&1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$battery_level" -gt 80 ] && [ "$discharging" -eq 0 ]; then
|
||||||
|
dunstify -a "Battery" \
|
||||||
|
"Battery is charged: ${battery_level}%" \
|
||||||
|
-r 100 \
|
||||||
|
-i "$notify_icons/battery-charged.png"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
sleep ${check_interval}s
|
sleep ${check_interval}s
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
[ -z "$id" ] && id="$1"
|
||||||
|
|
||||||
|
exec ctpv -c "$id"
|
|
@ -1,5 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
last_pkg_updates=$(grep 'pacman -Suuy' /var/log/pacman.log | tail -1 | tr -d '[' | cut -f 1 -d 'T')
|
|
||||||
|
|
||||||
echo "Last update: $last_pkg_updates ($(date +'%Y-%m-%d'))"
|
|
|
@ -6,11 +6,10 @@ last_pkg_updates=$(grep 'pacman -Suuy' /var/log/pacman.log | tail -1 | tr -d '['
|
||||||
case $1 in
|
case $1 in
|
||||||
"--notification")
|
"--notification")
|
||||||
dunstify -a "Updates" \
|
dunstify -a "Updates" \
|
||||||
"$num updates available" \
|
|
||||||
"Last update: $last_pkg_updates ($(date +'%Y-%m-%d'))" \
|
|
||||||
-r 100 \
|
-r 100 \
|
||||||
|
"Updates" \
|
||||||
|
"$num updates available\nLast update: $last_pkg_updates ($(date +'%Y-%m-%d'))"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
|
||||||
#echo "Last update: $last_pkg_updates ($(date +'%Y-%m-%d'))"
|
#echo "Last update: $last_pkg_updates ($(date +'%Y-%m-%d'))"
|
||||||
|
|
23
bin/restart
|
@ -2,25 +2,10 @@
|
||||||
|
|
||||||
if [ -z "$1" ]
|
if [ -z "$1" ]
|
||||||
then
|
then
|
||||||
echo "./restart --picom/--polybar/--sxhkd";
|
echo "./restart [service]";
|
||||||
exit 1;
|
exit 1;
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
pkill -USR1 -x $1
|
||||||
case $1 in
|
dunstify "$1 restarted" -t 3500
|
||||||
"--picom")
|
$1 & > /dev/null 2>&1
|
||||||
pkill -USR1 -x picom
|
|
||||||
dunstify "picom restarted" -t 3500
|
|
||||||
;;
|
|
||||||
|
|
||||||
"--polybar")
|
|
||||||
pkill -USR1 -x polybar
|
|
||||||
dunstify "polybar restarted" -t 3500
|
|
||||||
;;
|
|
||||||
|
|
||||||
"--sxhkd")
|
|
||||||
pkill -USR1 -x sxhkd
|
|
||||||
dunstify "sxhkd restarted" -t 3500
|
|
||||||
;;
|
|
||||||
|
|
||||||
esac
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
username="user"
|
username="q"
|
||||||
password="pass123456"
|
password="k6gHR-3DPiD-s5fow-pNbzr-4MfdG"
|
||||||
url="https://domain.nextcloud.com/remote.php/dav/files/$username"
|
url="https://cloud.fakeowl1.com/remote.php/dav/files/$username"
|
||||||
|
|
||||||
if [[ $# -lt 2 ]]; then
|
if [[ $# -lt 2 ]]; then
|
||||||
echo "upload-to-nextcloud - upload directory to nextcloud"
|
echo "upload-to-nextcloud - upload directory to nextcloud"
|
||||||
|
|
|
@ -0,0 +1,9 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
SCREENCAST_FILE="$HOME/Videos/$(date +'%Y-%m-%d_%H:%M').mp4"
|
||||||
|
|
||||||
|
geometry=$(slurp -d -f "%wx%h %x,%y")
|
||||||
|
|
||||||
|
status=$(pkill -f "wf-recorder" || wf-recorder -f $SCREENCAST_FILE --codec=libx264)
|
||||||
|
|
||||||
|
notify-send "Screen recording started" -i "$HOME/.config/dunst/icons/record.png" -t 1000
|
|
@ -0,0 +1,8 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
cd ~
|
||||||
|
|
||||||
|
export _JAVA_AWT_WM_NONREPARENTING=1
|
||||||
|
export XCURSOR_SIZE=24
|
||||||
|
|
||||||
|
exec Hyprland
|
|
@ -15,7 +15,7 @@ artist=`echo $artist | sed 's/ *$//g'`
|
||||||
song=${array[1]}
|
song=${array[1]}
|
||||||
song=`echo $song | sed 's/ *$//g'`
|
song=`echo $song | sed 's/ *$//g'`
|
||||||
|
|
||||||
yt-dlp $1 -x --audio-format mp3 -o "$filename" $3
|
yt-dlp $1 -x --verbose --audio-format mp3 -o "$filename" $3
|
||||||
|
|
||||||
id3v2 -a "${artist}" "$filename"
|
id3v2 -a "${artist}" "$filename"
|
||||||
id3v2 -t "${song}" "$filename"
|
id3v2 -t "${song}" "$filename"
|
||||||
|
|