Update dotfiles

This commit is contained in:
hok7z 2023-07-10 13:53:13 +03:00
parent 24177226fe
commit 0c5efa383b
31 changed files with 495 additions and 102 deletions

View File

@ -27,7 +27,7 @@
width = (111,444)
# The maximum height of a single notification, excluding the frame.
height = 222
height = 200
# Position the notification in the top right corner
origin = top-right
@ -208,7 +208,7 @@
min_icon_size = 32
# Scale larger icons down to this size, set to 0 to disable
max_icon_size = 128
max_icon_size = 100
# Paths to default icons (only neccesary when not using recursive icon lookup)
icon_path = /usr/share/icons/gnome/16x16/status/:/usr/share/icons/gnome/16x16/devices/
@ -444,6 +444,9 @@
# summary = *says*
# urgency = critical
#
#[gotify]
# appname = Gotify
#[twitter]
# appname = Pidgin
# summary = *twitter.com*

View File

@ -0,0 +1,39 @@
status is-interactive || exit
set --global autopair_left "(" "[" "{" '"' "'"
set --global autopair_right ")" "]" "}" '"' "'"
set --global autopair_pairs "()" "[]" "{}" '""' "''"
function _autopair_fish_key_bindings --on-variable fish_key_bindings
set --query fish_key_bindings[1] || return
test $fish_key_bindings = fish_default_key_bindings &&
set --local mode default insert ||
set --local mode insert default
bind --mode $mode[-1] --erase \177 \b \t
bind --mode $mode[1] \177 _autopair_backspace # macOS ⌫
bind --mode $mode[1] \b _autopair_backspace
bind --mode $mode[1] \t _autopair_tab
printf "%s\n" $autopair_pairs | while read --local left right --delimiter ""
bind --mode $mode[-1] --erase $left $right
if test $left = $right
bind --mode $mode[1] $left "_autopair_insert_same \\$left"
else
bind --mode $mode[1] $left "_autopair_insert_left \\$left \\$right"
bind --mode $mode[1] $right "_autopair_insert_right \\$right"
end
end
end
_autopair_fish_key_bindings
function _autopair_uninstall --on-event autopair_uninstall
string collect (
bind --all | string replace --filter --regex -- "_autopair.*" --erase
set --names | string replace --filter --regex -- "^autopair" "set --erase autopair"
) | source
functions --erase (functions --all | string match "_autopair_*")
end

View File

@ -0,0 +1,221 @@
set -Ux LF_ICONS "\
*.7z=:\
*.aac=:\
*.ace=:\
*.alz=:\
*.arc=:\
*.arj=:\
*.asf=:\
*.atom=:\
*.au=:\
*.avi=:\
*.bash=:\
*.bash_history=:\
*.bashprofile=:\
*.bashrc=:\
*.bmp=:\
*.bz2=:\
*.bz=:\
*.c=:\
*.cab=:\
*.cc=:\
*.cfg=:\
*.cgm=:\
*.clang-format=:\
*.clj=:\
*.cmd=:\
*.coffee=:\
*.cpio=:\
*.cpp=:\
*.css=:\
*.d=:\
*.dart=:\
*.deb=:\
*.dl=:\
*.DS_Store=:\
*.dwm=:\
*.dz=:\
*.ear=:\
*.emf=:\
*.env=:\
*.erl=:\
*.esd=:\
*.exs=:\
*.fish=:\
*.flac=:\
*.flc=:\
*.fli=:\
*.flv=:\
*.fs=:\
*.gif=:\
*.git=:\
*.gitattributes=:\
*.gitconfig=:\
*.github=:\
*.gitignore=:\
*.gitignore_global=:\
*.gitkeep=:\
*.gitmodules=:\
*.gl=:\
*.go=:\
*.gz=:\
*.h=:\
*.hh=:\
*.hidden=:\
*.hpp=:\
*.hs=:\
*.html=:\
*.hyper.js=:\
*.jar=:\
*.java=:\
*.jl=:\
*.jpeg=:\
*.jpg=:\
*.js=:\
*.json=:\
*.jsx=:\
*.lha=:\
*.lrz=:\
*.lua=:\
*.lz4=:\
*.lz=:\
*.lzh=:\
*.lzma=:\
*.lzo=:\
*.m2v=:\
*.m4a=:\
*.m4v=:\
*.map=:\
*.md=:\
*.mdx=:\
*.mid=:\
*.midi=:\
*.mjpeg=:\
*.mjpg=:\
*.mka=:\
*.mkv=:\
*.mng=:\
*.mov=:\
*.mp3=:\
*.mp4=:\
*.mp4v=:\
*.mpc=:\
*.mpeg=:\
*.mpg=:\
*.nix=:\
*.npmignore=:\
*.npmrc=:\
*.nuv=:\
*.nvmrc=:\
*.oga=:\
*.ogg=:\
*.ogm=:\
*.ogv=:\
*.ogx=:\
*.opus=:\
*.pbm=:\
*.pcx=:\
*.pdf=:\
*.pgm=:\
*.php=:\
*.pl=:\
*.png=:\
*.ppm=:\
*.pro=:\
*.ps1=:\
*.py=:\
*.qt=:\
*.ra=:\
*.rar=:\
*.rb=:\
*.rm=:\
*.rmvb=:\
*.rpm=:\
*.rs=:\
*.rvm=:\
*.rz=:\
*.sar=:\
*.scala=:\
*.sh=:\
*.skhdrc=:\
*.sol=ﲹ:\
*.spx=:\
*.svg=:\
*.svgz=:\
*.swm=:\
*.t7z=:\
*.tar=:\
*.taz=:\
*.tbz2=:\
*.tbz=:\
*.tga=:\
*.tgz=:\
*.tif=:\
*.tiff=:\
*.tlz=:\
*.tmux.conf=:\
*.trash=:\
*.ts=:\
*.tsx=:\
*.txz=:\
*.tz=:\
*.tzo=:\
*.tzst=:\
*.vim=:\
*.vimrc=:\
*.vob=:\
*.vscode=:\
*.war=:\
*.wav=:\
*.webm=:\
*.wim=:\
*.xbm=:\
*.xcf=:\
*.xpm=:\
*.xspf=:\
*.xwd=:\
*.xz=:\
*.yabairc=:\
*.yaml=פּ:\
*.yarn-integrity=:\
*.yarnrc=:\
*.yml=פּ:\
*.yuv=:\
*.z=:\
*.zip=:\
*.zoo=:\
*.zprofile=:\
*.zprofile=:\
*.zsh=:\
*.zsh_history=:\
*.zshrc=:\
*.zst=:\
*bin=:\
*config=:\
*docker-compose.yml=:\
*dockerfile=:\
*gradle=:\
*gruntfile.coffee=:\
*gruntfile.js=:\
*gruntfile.ls=:\
*gulpfile.coffee=:\
*gulpfile.js=:\
*gulpfile.ls=:\
*include=:\
*lib=:\
*localized=:\
*node_modules=:\
*package.json=:\
*rubydoc=:\
*tsconfig.json=:\
*yarn.lock=:\
di=:\
dt=:\
ex=:\
fi=:\
ln=:\
or=:\
ow=:\
st=:\
tw=:\
"

View File

@ -13,9 +13,9 @@ if status is-interactive
alias dotfiles="git --git-dir=/home/q/repos/dotfiles --work-tree=$HOME"
set -U fish_user_paths $HOME/bin $fish_user_paths
set -x TERM "xterm-256color"
set -x PF_INFO "ascii title os kernel wm shell pkgs memory"
set -x TERM "xterm"
# set -x TERM "xterm"
set -x EDITOR "nvim"
set -x XDG_DATA_HOME $HOME/.local/share

View File

@ -2,3 +2,5 @@ jorgebucaran/fisher
jorgebucaran/nvm.fish
derekstavis/fish-neovim
catppuccin/fish
jorgebucaran/autopair.fish
joshmedeski/fish-lf-icons

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,9 @@
function _autopair_backspace
set --local index (commandline --cursor)
set --local buffer (commandline)
test $index -ge 1 &&
contains -- (string sub --start=$index --length=2 -- "$buffer") $autopair_pairs &&
commandline --function delete-char
commandline --function backward-delete-char
end

View File

@ -0,0 +1,13 @@
function _autopair_insert_left --argument-names left right
set --local buffer (commandline)
set --local before (commandline --cut-at-cursor)
commandline --insert -- $left
switch "$buffer"
case "$before"{," "\*,$autopair_right\*}
set --local index (commandline --cursor)
commandline --insert -- $right
commandline --cursor $index
end
end

View File

@ -0,0 +1,11 @@
function _autopair_insert_right --argument-names key
set --local buffer (commandline)
set --local before (commandline --cut-at-cursor)
switch "$buffer"
case "$before$key"\*
commandline --cursor (math (commandline --cursor) + 1)
case \*
commandline --insert -- $key
end
end

View File

@ -0,0 +1,20 @@
function _autopair_insert_same --argument-names key
set --local buffer (commandline)
set --local index (commandline --cursor)
set --local next (string sub --start=(math $index + 1) --length=1 -- "$buffer")
if test (math (count (string match --all --regex -- "$key" "$buffer")) % 2) = 0
test $key = $next && commandline --cursor (math $index + 1) && return
commandline --insert -- $key
if test $index -lt 1 ||
contains -- (string sub --start=$index --length=1 -- "$buffer") "" " " $autopair_left &&
contains -- $next "" " " $autopair_right
commandline --insert -- $key
commandline --cursor (math $index + 1)
end
else
commandline --insert -- $key
end
end

View File

@ -0,0 +1,7 @@
function _autopair_tab
commandline --paging-mode && down-or-search && return
string match --quiet --regex -- '\$[^\s]*"$' (commandline --current-token) &&
commandline --function end-of-line --function backward-delete-char
commandline --function complete
end

View File

@ -130,7 +130,7 @@ bind = $mainMod SHIFT, S,exec, bin/w-screenrecord
bind = $mainMod, C, killactive,
bind = $mainMod, M, exit,
bind = $mainMod, X, exit,
bind = $mainMod, F, fullscreen, 2
bind = $mainMod, S, togglefloating,
bind = $mainMod, P, pseudo, # dwindle
@ -145,9 +145,10 @@ binde= ,F3, exec, pactl set-sink-volume @DEFAULT_SINK@ +1%
bind = $mainMod, b, exec, foot -e bluetuith
bind = $mainMod, RETURN, exec, foot
bind = $mainMod, N, exec, foot -e lf
bind = $mainMod, M, exec, foot -e cmus
bind = $mainMod, d, exec, wofi --show drun -I -i
bind = ,Print,exec,makescreenshot
bind = ,Print, exec, makescreenshot
bind = $mainMod, l, exec, lockscreen
# not forget install xdg-desktop-portal 1.14.6
# Modify file /usr/share/xdg-desktop-portal/portals/{}.portal UserIn=sway;wlroots

BIN
.config/hypr/scripts/kb_hypr Executable file

Binary file not shown.

View File

@ -18,11 +18,12 @@ cmd edit-config ${{
cmd open &{{
case $(file --mime-type "$f" -bL) in
text/*|application/json) lf -remote "send $id \$$EDITOR \$fx";;
text/*|application/json) lf -remote "send $id \$$EDITOR \"$fx\"";;
image/*) swayimg -f "$f";;
audio/*) lf -remote "send $id \$mpv --audio-display=no \"$fx\" && clear";;
video/*) mpv "$f";;
application/pdf|application/epub) zathura "$f";;
*) xdg-open "$f";;
esac
}}
@ -55,12 +56,12 @@ cmd fzf_search ${{
cmd unarchive ${{
set -f
case $f in
*.tar.bz|*.tar.bz2|*.tbz|*.tbz2) tar xjvf $f;;
*.tar.gz|*.tgz) tar xzvf $f;;
*.tar.xz|*.txz) tar xJvf $f;;
*.zip) unzip $f;;
*.rar) unrar x $f;;
*.7z) 7z x $f;;
*.tar.bz|*.tar.bz2|*.tbz|*.tbz2) tar xjvf "$f";;
*.tar.gz|*.tgz) tar xzvf "$f";;
*.tar.xz|*.txz) tar xJvf "$f";;
*.zip) unzip "$f";;
*.rar) unrar x "$f";;
*.7z) 7z x "$f";;
esac
}}
@ -88,7 +89,7 @@ cmd trash ${{
file=${files%%;*}
if [[ "$(pwd)" == "/home/$USER/.local/share/Trash/files" ]]; then
rm -rf $file
rm -rf "$fx"
else
trash-put "$(basename "$file")"
fi
@ -101,6 +102,24 @@ cmd trash ${{
done
}}
# cmd trash ${{
# files=$(printf "$fx" | tr '\n' ';')
# while [ "$files" ]; do
# file=${files%%;*}
# if [[ $PWD == "$HOME/.local/share/Trash/files" ]]; then
# rm -rf "$file"
# else
# trash-put "$(basename "$filename")"
# fi
#
# if [ "$files" = "$file" ]; then
# files=''
# else
# files="${files#*;}"
# fi
# done
# }}
# lfrc
cmd restore-from-trash ${{
ids="$(echo -ne '\n' | \
@ -122,10 +141,15 @@ map d
map e
map f
map t
map u
map a
map ua unarchive
map . set hidden!
map md push %mkdir<space>
map gp jump-prev
map y copy
map p paste
@ -159,6 +183,7 @@ map gs cd ~/Pictures/screenshots
map gv cd ~/Videos
map gm cd ~/Music
map gA cd ~/Anime
map gt cd ~/.local/share/Trash/files
map tc %rm -rf ~/.local/share/Trash/files/*

View File

@ -1,8 +1,8 @@
local core = {"options", "globals", "keybinds", "autocmds", "plugins"}
for _,source in ipairs(core) do
local ok, fault = pcall(require,'core.' .. source)
if not ok then
vim.notify("Failed to load " .. source .."\n\n" .. fault )
end
local ok, fault = pcall(require,'core.' .. source)
if not ok then
vim.notify("Failed to load " .. source .."\n\n" .. fault )
end
end

View File

@ -141,37 +141,73 @@ require("lazy").setup({
preset = 'codicons',
symbol_map = {
Text = "",
Method = "",
Function = "",
Text = "󰉿",
Method = "󰆧",
Function = "󰊕",
Constructor = "",
Field = "",
Variable = "",
Class = "",
Field = "󰜢",
Variable = "󰀫",
Class = "󰠱",
Interface = "",
Module = "",
Property = "",
Unit = "",
Value = "",
Property = "󰜢",
Unit = "󰑭",
Value = "󰎠",
Enum = "",
Keyword = "",
Keyword = "󰌋",
Snippet = "",
Color = "",
File = "",
Reference = "",
Folder = "",
Color = "󰏘",
File = "󰈙",
Reference = "󰈇",
Folder = "󰉋",
EnumMember = "",
Constant = "",
Struct = "",
Constant = "󰏿",
Struct = "󰙅",
Event = "",
Operator = "",
TypeParameter = ""
}
Operator = "󰆕",
TypeParameter = "",
},
-- symbol_map = {
-- Text = "",
-- Method = "",
-- Function = "",
-- Constructor = "",
-- Field = "ﰠ",
-- Variable = "",
-- Class = "ﴯ",
-- Interface = "",
-- Module = "",
-- Property = "ﰠ",
-- Unit = "塞",
-- Value = "",
-- Enum = "",
-- Keyword = "",
-- Snippet = "",
-- Color = "",
-- File = "",
-- Reference = "",
-- Folder = "",
-- EnumMember = "",
-- Constant = "",
-- Struct = "פּ",
-- Event = "",
-- Operator = "",
-- TypeParameter = ""
-- }
}
end
},
{"folke/which-key.nvim", opts = {}, lazy = true},
{
"folke/which-key.nvim",
opts = {}, lazy = true,
config = function()
vim.o.timeout = true
vim.o.timeoutlen = 300
require("which-key").setup()
end
},
{
"L3MON4D3/LuaSnip",
@ -199,18 +235,18 @@ require("lazy").setup({
end,
},
{
"ray-x/lsp_signature.nvim",
config = function()
local lsp_signature = require("lsp_signature")
lsp_signature.setup{
hint_enable = false,
verbose = true
}
end
},
-- {
-- "ray-x/lsp_signature.nvim",
-- config = function()
-- local lsp_signature = require("lsp_signature")
--
-- lsp_signature.setup{
-- hint_enable = false,
-- verbose = true
-- }
--
-- end
-- },
-- Debug Adapter Protocol
{

View File

@ -1,14 +1,14 @@
{
// "layer": "top", // Waybar at top layer
"layer": "top", // Waybar at top layer
"position": "top",
"height": 39,
"width": 1895,
"spacing": 10,
"spacing": 3,
"modules-left": ["hyprland/window","pulseaudio","bluetooth"],
"modules-left": ["hyprland/window", "pulseaudio","tray"],
"modules-center": ["wlr/workspaces"],
"modules-right": ["custom/cmus", "custom/weather", "tray", "battery", "custom/language", "clock"],
"modules-right": ["custom/cmus", "custom/weather", "custom/language", "clock", "battery"],
"wlr/workspaces": {
"format": "{icon}",
@ -17,17 +17,34 @@
"on-click": "activate",
"all-outputs": false,
"format": "{icon}",
// "format-icons": {
// "1": "",
// "2": "",
// "3": "",
// "4": "",
// "5": "",
// "6": "",
// "urgent": "",
// "focused": "",
// "default": ""
//}
"format-icons": {
"1": "",
"2": "",
"3": "",
"4": "",
"5": "",
"6": "",
"urgent": "",
"focused": "",
"default": ""
}
"1": "",
"2": "",
"3": "",
"4": "",
"5": "",
"6": "",
"7": "",
"8": "",
"9": "",
"focused": " ",
"urgent": " ",
//"default": " ",
},
"icon-size": 14
},
"sway/mode": {
@ -40,8 +57,7 @@
},
"clock": {
"format": "{:%I:%M %p}",
"format-alt": "{:%Y-%m-%d %I:%M %p}"
"format": "{:%a, %d/%m/%Y %I:%M %p}",
},
"custom/cmus": {

View File

@ -29,7 +29,7 @@ button {
padding: 10px;
background-color: @background;
color: #d8dee8;
border-radius: 15px;
border-radius: 8px;
}
button:hover {
@ -37,7 +37,7 @@ button:hover {
padding: 10px;
background-color: @background;
color: #d8dee8;
border-radius: 15px;
border-radius: 8px;
}
button:focus {
@ -45,20 +45,24 @@ button:focus {
padding: 10px;
background-color: @background;
color: #d8dee8;
border-radius: 15px;
border-radius: 8px;
}
#workspaces {
margin: 0;
padding: 0 15px 0 15px;
margin: 5px 0 5px 0;
background-color: @background;
color: @white;
border-radius: 14px;
/* margin: 0; */
}
#workspaces button {
padding: 0 5px;
margin: 5px;
background-color: @background;
/* background-color: ; */
color: #444b6a;
border-radius: 16px;
}
#workspaces button:hover {
@ -80,7 +84,7 @@ button:focus {
margin: 5px 0 5px 0;
background-color: @background;
color: #d8dee8;
border-radius: 12px;
border-radius: 10px;
}
#tray > .passive {
@ -97,7 +101,7 @@ button:focus {
margin: 5px 0 5px 0;
background-color: @background;
color: #b9f27c;
border-radius: 15px;
border-radius: 8px;
}
@ -106,7 +110,7 @@ button:focus {
margin: 5px 0 5px 0;
background-color: @background;
color: @white;
border-radius: 12px;
border-radius: 8px;
}
@ -115,7 +119,7 @@ button:focus {
margin: 5px 0 5px 0;
background-color: @background;
color: @white;
border-radius: 12px;
border-radius: 8px;
}
@ -125,7 +129,7 @@ button:focus {
margin: 5px 0 5px 0;
background-color: @background;
color: #d8dee8;
border-radius: 15px;
border-radius: 8px;
}
@keyframes blink {
@ -143,44 +147,28 @@ label:focus {
background-color: @background;
padding: 0 15px 0 15px;
margin: 5px 0 5px 0;
border-radius: 12px;
border-radius: 8px;
}
/* #keyboard-state { */
/* background: #97e1ad; */
/* color: #000000; */
/* padding: 0 0px; */
/* margin: 0 5px; */
/* min-width: 16px; */
/* } */
/**/
/* #keyboard-state > label { */
/* padding: 0 0px; */
/* } */
/**/
/* #keyboard-state > label.locked { */
/* background: rgba(0, 0, 0, 0.2); */
/* } */
#pulseaudio {
background-color: @background;
padding: 0 15px 0 15px;
margin: 5px 0 5px 0;
border-radius: 12px;
border-radius: 8px;
}
#bluetooth {
background-color: @background;
padding: 0 15px 0 15px;
margin: 5px 0 5px 0;
border-radius: 12px;
border-radius: 8px;
}
#battery {
padding: 0 15px 0 15px;
margin: 5px 0 5px 0;
border-radius: 12px;
border-radius: 8px;
color: @blue;
background: @background;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 481 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 383 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 83 KiB

View File

Before

Width:  |  Height:  |  Size: 108 KiB

After

Width:  |  Height:  |  Size: 108 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 482 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 75 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 128 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 148 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 303 KiB

View File

@ -20,7 +20,6 @@
# TODO
- [x] Neovim
- [ ] Migrate from packer to lazy
- [x] Migrate from packer to lazy
- [ ] Debugger Protocol
- [ ] Quickfix
- [ ] Code folding

Binary file not shown.

Before

Width:  |  Height:  |  Size: 240 KiB

After

Width:  |  Height:  |  Size: 623 KiB