waybar
This commit is contained in:
parent
98cf630184
commit
4bfa2cad4d
65
.config/eww/dmp/eww.scss
Normal file
65
.config/eww/dmp/eww.scss
Normal file
@ -0,0 +1,65 @@
|
|||||||
|
// Global
|
||||||
|
* {
|
||||||
|
all: unset;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
.eversolo-widget {
|
||||||
|
background-color: #232935;
|
||||||
|
border-radius: 16px;
|
||||||
|
padding: 16px;
|
||||||
|
box-shadow: 0 8px 24px rgba(0,0,0,0.2);
|
||||||
|
color: #cdd6f4;
|
||||||
|
font-family: "JetBrains Mono", "Fira Sans", sans-serif;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cover {
|
||||||
|
border-radius: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.model-label {
|
||||||
|
font-size: 14px;
|
||||||
|
font-weight: 500;
|
||||||
|
color: #5E6577;
|
||||||
|
}
|
||||||
|
|
||||||
|
.title-label {
|
||||||
|
font-size: 18px;
|
||||||
|
font-weight: 700;
|
||||||
|
color: #D7DEEB;
|
||||||
|
}
|
||||||
|
|
||||||
|
.artist-label {
|
||||||
|
font-size: 14px;
|
||||||
|
font-weight: 500;
|
||||||
|
color: #D7DEEB;
|
||||||
|
}
|
||||||
|
|
||||||
|
.info-label {
|
||||||
|
font-size: 13px;
|
||||||
|
color: #5E6577;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ctrl-btn {
|
||||||
|
background-color: #313244;
|
||||||
|
color: #FF9B86;
|
||||||
|
font-size: 14px;
|
||||||
|
min-width: 28px;
|
||||||
|
min-height: 28px;
|
||||||
|
padding: 4px;
|
||||||
|
border-radius: 8px;
|
||||||
|
border: none;
|
||||||
|
font-family: inherit;
|
||||||
|
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25);
|
||||||
|
transition: background-color 0.2s ease, box-shadow 0.2s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ctrl-btn:hover {
|
||||||
|
background-color: #45475a;
|
||||||
|
box-shadow: 0 3px 6px rgba(0, 0, 0, 0.4);
|
||||||
|
}
|
||||||
|
|
||||||
|
.ctrl-btn:active {
|
||||||
|
background-color: #585b70;
|
||||||
|
box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.35);
|
||||||
|
}
|
||||||
|
|
46
.config/eww/dmp/eww.yuck
Normal file
46
.config/eww/dmp/eww.yuck
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
(defpoll eversolo-state :interval "5s"
|
||||||
|
"~/.config/eww/scripts/get_dmp_state.sh")
|
||||||
|
|
||||||
|
(defwidget eversolo-main []
|
||||||
|
(box :class "eversolo-widget"
|
||||||
|
:orientation "horizontal"
|
||||||
|
:spacing 16
|
||||||
|
:padding 16
|
||||||
|
:halign "start"
|
||||||
|
|
||||||
|
(image :path "${eversolo-state.cover}"
|
||||||
|
:class ["cover"]
|
||||||
|
:width 230
|
||||||
|
:height 230
|
||||||
|
:content-fit "cover"
|
||||||
|
:valign "center"
|
||||||
|
:halign "center")
|
||||||
|
|
||||||
|
|
||||||
|
(box :orientation "vertical" :spacing 10 :valign "center" :halign "center" :padding 4
|
||||||
|
(label :text "Eversolo DMP-A6 Master Edition Gen 2"
|
||||||
|
:class "model-label" :halign "center")
|
||||||
|
|
||||||
|
(label :text "${eversolo-state.title}"
|
||||||
|
:class "title-label" :max-width 160 :wrap true :halign "center")
|
||||||
|
|
||||||
|
(label :text "${eversolo-state.artist}"
|
||||||
|
:class "artist-label" :max-width 160 :wrap false :halign "center")
|
||||||
|
|
||||||
|
(label :text "${eversolo-state.info}"
|
||||||
|
:class "info-label" :halign "center")
|
||||||
|
|
||||||
|
(box :orientation "horizontal" :spacing 12 :halign "center" :margin-top 6
|
||||||
|
(button :onclick "curl -s 'http://192.168.1.117:9529/ZidooMusicControl/v2/playLast'"
|
||||||
|
:class "ctrl-btn" " ")
|
||||||
|
(button :onclick "curl -s 'http://192.168.1.117:9529/ZidooMusicControl/v2/playOrPause'"
|
||||||
|
:class "ctrl-btn" "")
|
||||||
|
(button :onclick "curl -s 'http://192.168.1.117:9529/ZidooMusicControl/v2/playNext'"
|
||||||
|
:class "ctrl-btn" "")
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
1
.config/eww/eww.scss
Normal file
1
.config/eww/eww.scss
Normal file
@ -0,0 +1 @@
|
|||||||
|
@import "dmp/eww.scss";
|
9
.config/eww/eww.yuck
Normal file
9
.config/eww/eww.yuck
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
(include "./dmp/eww.yuck")
|
||||||
|
|
||||||
|
(defwindow eversolo-main
|
||||||
|
:class "dmp-container"
|
||||||
|
:monitor 0
|
||||||
|
:geometry (geometry :x "20px" :y "20px" :width "700px")
|
||||||
|
:stacking "fg"
|
||||||
|
:exclusive false
|
||||||
|
(eversolo-main))
|
75
.config/eww/scripts/get_dmp_state.sh
Executable file
75
.config/eww/scripts/get_dmp_state.sh
Executable file
@ -0,0 +1,75 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
ENDPOINT="http://192.168.1.117:9529/ZidooMusicControl/v2/getState"
|
||||||
|
|
||||||
|
data=$(curl -s --max-time 3 "$ENDPOINT") || data="{}"
|
||||||
|
|
||||||
|
# Averiguamos si Roon está activo
|
||||||
|
roon_active=$(echo "$data" | jq -e '
|
||||||
|
.everSoloPlayInfo.everSoloPlayAudioInfo.songName? != null and
|
||||||
|
.everSoloPlayInfo.everSoloPlayAudioInfo.songName != ""
|
||||||
|
' 2>/dev/null)
|
||||||
|
|
||||||
|
if [[ "$roon_active" == "true" ]]; then
|
||||||
|
# Para Roon, usamos esta ruta…
|
||||||
|
COVER_CACHE="/tmp/roon_album_cover.jpg"
|
||||||
|
|
||||||
|
output=$(echo "$data" | jq -e "{
|
||||||
|
title: (.everSoloPlayInfo.everSoloPlayAudioInfo.songName // \"Desconocido\"),
|
||||||
|
artist: (.everSoloPlayInfo.everSoloPlayAudioInfo.artistName // \"\"),
|
||||||
|
cover_url: (.everSoloPlayInfo.everSoloPlayAudioInfo.albumUrl // \"\"),
|
||||||
|
album: (.everSoloPlayInfo.everSoloPlayAudioInfo.albumName // \"\"),
|
||||||
|
quality: (.everSoloPlayOutputInfo.outPutDecodec // \"PCM\"),
|
||||||
|
bits: (
|
||||||
|
if (.everSoloPlayInfo.everSoloPlayAudioInfo.audioBitsPerSample? // 0) > 0
|
||||||
|
then (.everSoloPlayInfo.everSoloPlayAudioInfo.audioBitsPerSample | tostring + \"-bit\")
|
||||||
|
else \"\"
|
||||||
|
end
|
||||||
|
),
|
||||||
|
samplerate: (
|
||||||
|
if (.everSoloPlayInfo.everSoloPlayAudioInfo.audioSampleRate? // 0) > 0
|
||||||
|
then ((.everSoloPlayInfo.everSoloPlayAudioInfo.audioSampleRate / 1000 | floor | tostring) + \" kHz\")
|
||||||
|
else \"\"
|
||||||
|
end
|
||||||
|
),
|
||||||
|
mqa: (.everSoloPlayOutputInfo.outPutMqaType? != 0)
|
||||||
|
}")
|
||||||
|
else
|
||||||
|
# Para “playingMusic”, usamos la caché normal
|
||||||
|
COVER_CACHE="$HOME/.cache/eww/dmp_cover.jpg"
|
||||||
|
|
||||||
|
output=$(echo "$data" | jq -e "{
|
||||||
|
title: (.playingMusic.title // \"Desconocido\"),
|
||||||
|
artist: (.playingMusic.artist // \"\"),
|
||||||
|
cover_url: (.playingMusic.albumArt // \"\"),
|
||||||
|
album: (.playingMusic.album // \"\"),
|
||||||
|
quality: (.playingMusic.audioQuality // \"\"),
|
||||||
|
bits: (.playingMusic.bits // \"\"),
|
||||||
|
samplerate: (.playingMusic.sampleRate // \"\"),
|
||||||
|
mqa: false
|
||||||
|
}")
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Construimos el info_string como antes…
|
||||||
|
info_string=$(echo "$output" | jq -r '[
|
||||||
|
.quality,
|
||||||
|
.bits,
|
||||||
|
.samplerate
|
||||||
|
] | map(select(. != "")) | join(" – ")')
|
||||||
|
|
||||||
|
# Descargamos portada en la ruta que elegimos arriba
|
||||||
|
cover_url=$(echo "$output" | jq -r .cover_url)
|
||||||
|
if [[ "$cover_url" =~ ^http ]]; then
|
||||||
|
curl -s "$cover_url" -o "$COVER_CACHE"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if command -v convert &>/dev/null; then
|
||||||
|
convert "$COVER_CACHE" -resize 230x230^ -gravity center -extent 230x230 "$COVER_CACHE"
|
||||||
|
elif command -v ffmpeg &>/dev/null; then
|
||||||
|
ffmpeg -y -loglevel quiet -i "$COVER_CACHE" -vf "scale=230:230:force_original_aspect_ratio=increase,crop=230:230" "$COVER_CACHE"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Emitimos el JSON final
|
||||||
|
echo "$output" | jq --arg cover "$COVER_CACHE" --arg info "$info_string" \
|
||||||
|
'. + {cover: $cover, info: $info}'
|
||||||
|
|
14
.config/eww/scripts/toggle_nowplaying.sh
Executable file
14
.config/eww/scripts/toggle_nowplaying.sh
Executable file
@ -0,0 +1,14 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
WID="eversolo-main"
|
||||||
|
|
||||||
|
if eww list-windows | grep -q "$WID"; then
|
||||||
|
if eww active-windows | grep -q "$WID"; then
|
||||||
|
eww close "$WID"
|
||||||
|
else
|
||||||
|
eww open "$WID"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
eww open "$WID"
|
||||||
|
fi
|
||||||
|
|
41
.config/hypr/conf/animations.conf
Normal file
41
.config/hypr/conf/animations.conf
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
animations {
|
||||||
|
enabled = 1
|
||||||
|
|
||||||
|
# Curvas personalizadas
|
||||||
|
bezier = jellyFast, 0.25, 1.1, 0.4, 1.2
|
||||||
|
bezier = soft, 0.25, 0.8, 0.25, 1
|
||||||
|
bezier = bounce, 0.34, 1.56, 0.64, 1.0
|
||||||
|
bezier = snappy, 0.45, 1.8, 0.4, 1
|
||||||
|
bezier = smoothOut, 0.3, 1, 0.6, 1
|
||||||
|
bezier = powIn, 0.5, 0, 0.7, 0
|
||||||
|
|
||||||
|
# Ventanas
|
||||||
|
animation = windows, 1, 7, jellyFast, popin
|
||||||
|
animation = windowsIn, 1, 6, bounce, popin
|
||||||
|
animation = windowsOut, 1, 6, soft, slide
|
||||||
|
animation = windowsMove, 1, 5, smoothOut
|
||||||
|
|
||||||
|
# Bordes
|
||||||
|
animation = border, 1, 12, snappy
|
||||||
|
animation = borderangle, 1, 20, powIn, loop
|
||||||
|
|
||||||
|
# Fade
|
||||||
|
animation = fade, 1, 4, soft
|
||||||
|
animation = fadeIn, 1, 5, soft
|
||||||
|
animation = fadeOut, 1, 5, soft
|
||||||
|
animation = fadeSwitch, 1, 5, soft
|
||||||
|
animation = fadeShadow, 1, 8, soft
|
||||||
|
animation = fadeDim, 1, 6, soft
|
||||||
|
animation = fadeLayers, 1, 4, soft
|
||||||
|
animation = fadeLayersIn, 1, 5, soft
|
||||||
|
animation = fadeLayersOut, 1, 5, soft
|
||||||
|
|
||||||
|
# Workspaces
|
||||||
|
animation = workspaces, 1, 6, jellyFast, slidefade
|
||||||
|
animation = workspacesIn, 1, 6, jellyFast, slidefade
|
||||||
|
animation = workspacesOut, 1, 6, jellyFast, slidefade
|
||||||
|
animation = specialWorkspace, 1, 6, bounce, slidefade
|
||||||
|
animation = specialWorkspaceIn, 1, 7, bounce, slidefade
|
||||||
|
animation = specialWorkspaceOut, 1, 7, bounce, slidefade
|
||||||
|
}
|
||||||
|
|
27
.config/hypr/conf/autostart.conf
Normal file
27
.config/hypr/conf/autostart.conf
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
exec-once = /usr/lib/geoclue-2.0/demos/agent &
|
||||||
|
exec-once = hyprpm reload -n
|
||||||
|
exec-once = hyprshade toggle
|
||||||
|
exec-once = hyprctl setcursor Bibata-Modern-Amber 22
|
||||||
|
#exec-once = uwsm app -- ~/.local/bin/inhibit.py
|
||||||
|
exec-once = libinput-gestures-setup start
|
||||||
|
exec-once = python ~/.local/bin/scratchpadindicator.py
|
||||||
|
exec-once = dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP
|
||||||
|
exec-once = dbus-update-activation-environment --systemd HYPRLAND_INSTANCE_SIGNATURE
|
||||||
|
exec-once = echo $HYPRLAND_INSTANCE_SIGNATURE > /tmp/hyprland_instance_signature
|
||||||
|
exec-once = uwsm app -- tailscale-systray
|
||||||
|
exec-once = uwsm app -- hyprshade auto
|
||||||
|
exec-once = uwsm app -- /home/teraflops/.local/bin/gpu_psystray.py&
|
||||||
|
exec-once = uwsm app -- hyprpaper
|
||||||
|
exec-once = uwsm app -- waybar
|
||||||
|
exec-once = uwsm app -- ibus-daemon -rxd
|
||||||
|
exec-once = /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
|
||||||
|
exec-once = uwsm app -- pika-backup-monitor&
|
||||||
|
exec-once = uwsm app -- 1password --silent&
|
||||||
|
exec-once = uwsm app -- dunst -conf /home/teraflops/.config/dunst/hyprdunst
|
||||||
|
exec-once = uwsm app -- udiskie&
|
||||||
|
exec-once = uwsm app -- hypridle
|
||||||
|
exec-once = asusctl -c 80
|
||||||
|
#exec-once = asusctl fan-curve -m Balanced -e true
|
||||||
|
#exec-once = SVPManager&
|
||||||
|
#exec-once = xwaylandvideobridge
|
||||||
|
exec-once = dunst -conf /home/teraflops/.config/dunst/hyprdunst
|
109
.config/hypr/conf/bind.conf
Normal file
109
.config/hypr/conf/bind.conf
Normal file
@ -0,0 +1,109 @@
|
|||||||
|
# See https://wiki.hyprland.org/Configuring/Keywords/ for more
|
||||||
|
$mainMod = SUPER
|
||||||
|
#bind = Control Shift, x, submap, $mode-system
|
||||||
|
#submap = $mode-system
|
||||||
|
# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more
|
||||||
|
bind = SUPER, F, exec, hyprctl dispatch setfloating true && hyprctl dispatch centerwindow
|
||||||
|
|
||||||
|
bind = SUPER, V, exec, kitty --class kitty-floating --hold -e fastfetch --kitty ~/Imágenes/arch_logo.png
|
||||||
|
|
||||||
|
bind = $mainMod SHIFT, Return, exec, uwsm app -- hyprctl dispatch movetoworkspacesilent special:scratchpad
|
||||||
|
bind = $mainMod, Return, exec, uwsm app -- termite -c ~/.config/termite/config_hyprland #foot
|
||||||
|
bind = $mainMod, W, exec, systemd-inhibit --what=idle --why="avoid dimming firefox" firefox
|
||||||
|
bind = $mainMod, Q, killactive,
|
||||||
|
bind = $mainMod, E, exec, nautilus
|
||||||
|
bind = $mainMod SHIFT, D, exec, bemoji -t
|
||||||
|
bind = $mainMod SHIFT, E, exec, /home/teraflops/.config/rofi/powermenu/type-2/powermenu.sh
|
||||||
|
bind = $mainMod, F, fullscreen,
|
||||||
|
bind = $mainMod, S, togglefloating,
|
||||||
|
bind = $mainMod, D, exec, /home/teraflops/.config/rofi/launchers/type-2/launcher.sh
|
||||||
|
bind = $mainMod, P, pseudo, # dwindle
|
||||||
|
bind = $mainMod, J, togglesplit, # dwindle
|
||||||
|
bind = $mainMod SHIFT, R, exec, /home/teraflops/.config/hypr/scripts/reload.sh
|
||||||
|
#bind = $mainMod, L, exec, wallock -c /home/teraflops/.config/wallock/config -o lock
|
||||||
|
bind = $mainMod, L, exec, ~/.local/bin/video_lock.sh
|
||||||
|
bind = $mainMod SHIFT, X, exec, /home/teraflops/.local/bin/screenshot_interactive_hyprland.sh
|
||||||
|
bind = $mainMod, X, exec, /home/teraflops/.local/bin/screenshot_hyprland.sh
|
||||||
|
bind = $mainMod ALT, X, exec, /home/teraflops/.local/bin/screenshot_edit_hyprland.sh
|
||||||
|
bind = $mainMod ALT SHIFT, X, exec, /home/teraflops/.local/bin/screenshot_edit_zone_hyprland.sh
|
||||||
|
|
||||||
|
#bind = , F24, exec, ~/.local/bin/aura.sh
|
||||||
|
|
||||||
|
bind = , XF86Launch3, exec, /home/teraflops/.local/bin/aura.sh
|
||||||
|
bind = , XF86Launch4, exec, /home/teraflops/.local/bin/power.sh
|
||||||
|
bind = , XF86Launch1, exec, /usr/bin/rog-control-center
|
||||||
|
|
||||||
|
|
||||||
|
bind = $mainMod CTRL, right, resizeactive, 10 0
|
||||||
|
bind = $mainMod CTRL, left, resizeactive, -10 0
|
||||||
|
bind = $mainMod CTRL, up, resizeactive, 0 -10
|
||||||
|
bind = $mainMod CTRL, down, resizeactive, 0 10
|
||||||
|
|
||||||
|
bind = $mainMod, M, exec, foot -e neomutt
|
||||||
|
|
||||||
|
bind = $mainMod, K, exec, /home/teraflops/.local/bin/screenrec.sh
|
||||||
|
bind = $mainMod SHIFT, K, exec, /home/teraflops/.local/bin/screenrec_zone.sh
|
||||||
|
|
||||||
|
bind = $mainMod SHIFT, F, exec, hyprctl --batch "dispatch togglefloating ; dispatch centerwindow 1"
|
||||||
|
|
||||||
|
bind = , xf86audioraisevolume, exec, ~/.local/bin/vol.sh up
|
||||||
|
bind = , xf86audiolowervolume, exec, ~/.local/bin/vol.sh down
|
||||||
|
bind = , xf86AudioMute, exec, ~/.local/bin/vol.sh toggle
|
||||||
|
|
||||||
|
#bind = , code:117, exec, playerctl play-pause
|
||||||
|
#bind = , code:115, exec, playerctl next
|
||||||
|
#bind = , code:110, exec, playerctl previous
|
||||||
|
#bind = , code:117, exec, playerctl stop
|
||||||
|
|
||||||
|
bind = , XF86AudioPrev, exec, playerctl previous
|
||||||
|
bind = , XF86AudioNext, exec, playerctl next
|
||||||
|
bind = , XF86AudioPlay, exec, playerctl play
|
||||||
|
bind = , XF86AudioPause, exec, playerctl pause
|
||||||
|
|
||||||
|
|
||||||
|
bind=,XF86MonBrightnessDown,exec,brightnessctl --device=amdgpu_bl1 set 5%-
|
||||||
|
bind=,XF86MonBrightnessUp,exec,brightnessctl --device=amdgpu_bl1 set +5%
|
||||||
|
|
||||||
|
bind=,XF86KbdBrightnessUp,exec,brightnessctl --device='asus::kbd_backlight' set +1
|
||||||
|
bind=,XF86KbdBrightnessDown,exec,brightnessctl --device='asus::kbd_backlight' set 1-
|
||||||
|
|
||||||
|
# Move focus with mainMod + arrow keys
|
||||||
|
bind = $mainMod, left, movefocus, l
|
||||||
|
bind = $mainMod, right, movefocus, r
|
||||||
|
bind = $mainMod, up, movefocus, u
|
||||||
|
bind = $mainMod, down, movefocus, d
|
||||||
|
|
||||||
|
# Move focused window around
|
||||||
|
bind = $mainMod SHIFT, left, movewindow, l
|
||||||
|
bind = $mainMod SHIFT, right, movewindow, r
|
||||||
|
bind = $mainMod SHIFT, up, movewindow, u
|
||||||
|
bind = $mainMod SHIFT, down, movewindow, d
|
||||||
|
|
||||||
|
bind = $mainMod, 1, workspace, 1
|
||||||
|
bind = $mainMod, 2, workspace, 2
|
||||||
|
bind = $mainMod, 3, workspace, 3
|
||||||
|
bind = $mainMod, 4, workspace, 4
|
||||||
|
# bind = $mainMod, 5, workspace, 5
|
||||||
|
# bind = $mainMod, 6, workspace, 6
|
||||||
|
# bind = $mainMod, 7, workspace, 7
|
||||||
|
# bind = $mainMod, 8, workspace, 8
|
||||||
|
# bind = $mainMod, 9, workspace, 9
|
||||||
|
# bind = $mainMod, 0, workspace, 10
|
||||||
|
bind = $mainMod SHIFT, 1, movetoworkspace, 1
|
||||||
|
bind = $mainMod SHIFT, 2, movetoworkspace, 2
|
||||||
|
bind = $mainMod SHIFT, 3, movetoworkspace, 3
|
||||||
|
bind = $mainMod SHIFT, 4, movetoworkspace, 4
|
||||||
|
# bind = $mainMod SHIFT, 5, movetoworkspace, 5
|
||||||
|
# bind = $mainMod SHIFT, 6, movetoworkspace, 6
|
||||||
|
# bind = $mainMod SHIFT, 7, movetoworkspace, 7
|
||||||
|
# bind = $mainMod SHIFT, 8, movetoworkspace, 8
|
||||||
|
# bind = $mainMod SHIFT, 9, movetoworkspace, 9
|
||||||
|
# bind = $mainMod SHIFT, 0, movetoworkspace, 10
|
||||||
|
|
||||||
|
# Move/resize windows with mainMod + LMB/RMB and dragging
|
||||||
|
bindm = $mainMod, mouse:272, movewindow
|
||||||
|
bindm = $mainMod, mouse:273, resizewindow
|
||||||
|
|
||||||
|
# Something acts like Alt+Tab
|
||||||
|
bind = SUPER, Tab, cyclenext,
|
||||||
|
bind = SUPER, Tab, bringactivetotop,
|
13
.config/hypr/conf/decoration.conf
Normal file
13
.config/hypr/conf/decoration.conf
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
# Habilitar desenfoque (blur)
|
||||||
|
decoration {
|
||||||
|
blur {
|
||||||
|
enabled = true
|
||||||
|
size = 16
|
||||||
|
passes = 4
|
||||||
|
noise = 0.02
|
||||||
|
contrast = 1.2
|
||||||
|
brightness = 1.1
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
20
.config/hypr/conf/environment.conf
Normal file
20
.config/hypr/conf/environment.conf
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
# Habilita HDR y formato de color
|
||||||
|
env = ENABLE_HYPRLAND_HDR,1
|
||||||
|
env = HYPRCURSOR_THEME,Bibata-Modern-Amber
|
||||||
|
env = HYPRCURSOR_SIZE,24
|
||||||
|
env = XCURSOR_THEME,Bibata-Modern-Amber
|
||||||
|
env = XCURSOR_SIZE,24
|
||||||
|
env = GTK_THEME, Adwaita-dark
|
||||||
|
env = STEAM_FORCE_DESKTOPUI_SCALING, 1.50
|
||||||
|
#env = AQ_DRM_DEVICES,/dev/dri/card1:/dev/dri/card0
|
||||||
|
env = AQ_DRM_DEVICES,/dev/dri/card1
|
||||||
|
env = WLR_DRM_DEVICES,/dev/dri/card1:/dev/dri/card0
|
||||||
|
#########################################
|
||||||
|
#env = LIBVA_DRIVER_NAME,nvidia
|
||||||
|
#env = XDG_SESSION_TYPE,wayland
|
||||||
|
#env = GBM_BACKEND,nvidia-drm
|
||||||
|
#env = __GLX_VENDOR_LIBRARY_NAME,nvidia
|
||||||
|
|
||||||
|
#cursor {
|
||||||
|
# no_hardware_cursors = true
|
||||||
|
#}
|
5
.config/hypr/conf/general.conf
Normal file
5
.config/hypr/conf/general.conf
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
general {
|
||||||
|
gaps_in = 2
|
||||||
|
gaps_out = 2
|
||||||
|
col.active_border = rgba(33ccff60)
|
||||||
|
}
|
9
.config/hypr/conf/hyprgrass.conf
Normal file
9
.config/hypr/conf/hyprgrass.conf
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
plugin {
|
||||||
|
hyprgrass {
|
||||||
|
enabled = true
|
||||||
|
blur_size = 10
|
||||||
|
blur_passes = 3
|
||||||
|
noise = 0.05
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
12
.config/hypr/conf/input.conf
Normal file
12
.config/hypr/conf/input.conf
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
# Configuración general del dispositivo
|
||||||
|
device:asup1208:00-093a:3011-touchpad touchpad {
|
||||||
|
tap-to-click = true
|
||||||
|
natural_scroll = true
|
||||||
|
clickfinger_behavior = true
|
||||||
|
scroll_factor = 0.4
|
||||||
|
accel_profile = adaptive
|
||||||
|
sensitivity = 0.2
|
||||||
|
disable_while_typing = true
|
||||||
|
drag_lock = true
|
||||||
|
}
|
||||||
|
|
17
.config/hypr/conf/keyboard.conf
Normal file
17
.config/hypr/conf/keyboard.conf
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
input {
|
||||||
|
kb_layout = es,us
|
||||||
|
kb_variant =
|
||||||
|
kb_model =
|
||||||
|
kb_options =
|
||||||
|
kb_rules =
|
||||||
|
|
||||||
|
follow_mouse = 1
|
||||||
|
|
||||||
|
touchpad {
|
||||||
|
natural_scroll = no
|
||||||
|
}
|
||||||
|
|
||||||
|
sensitivity = 0 # -1.0 - 1.0, 0 means no modification.
|
||||||
|
|
||||||
|
|
||||||
|
}
|
43
.config/hypr/conf/layout.conf
Normal file
43
.config/hypr/conf/layout.conf
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
dwindle {
|
||||||
|
# See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more
|
||||||
|
pseudotile = yes # master switch for pseudotiling. Moved to :Enabling is bound to mainMod + P in the keybinds section below
|
||||||
|
preserve_split = yes # you probably want this
|
||||||
|
}
|
||||||
|
|
||||||
|
#master {
|
||||||
|
# # See https://wiki.hyprland.org/Configuring/Master-Layout/ for more
|
||||||
|
# new_is_master = true
|
||||||
|
#}
|
||||||
|
|
||||||
|
gestures {
|
||||||
|
# See https://wiki.hyprland.org/Configuring/Variables/ for more
|
||||||
|
workspace_swipe_cancel_ratio = 0.15
|
||||||
|
workspace_swipe = on
|
||||||
|
}
|
||||||
|
|
||||||
|
plugin:touch_gestures {
|
||||||
|
# The default sensitivity is probably too low on tablet screens,
|
||||||
|
# I recommend turning it up to 4.0
|
||||||
|
sensitivity = 1.0
|
||||||
|
|
||||||
|
# must be >= 3
|
||||||
|
workspace_swipe_fingers = 3
|
||||||
|
|
||||||
|
# switching workspaces by swiping from an edge, this is separate from workspace_swipe_fingers
|
||||||
|
# and can be used at the same time
|
||||||
|
# possible values: l, r, u, or d
|
||||||
|
# to disable it set it to anything else
|
||||||
|
workspace_swipe_edge = d
|
||||||
|
|
||||||
|
# in milliseconds
|
||||||
|
long_press_delay = 400
|
||||||
|
|
||||||
|
# in pixels, the distance from the edge that is considered an edge
|
||||||
|
edge_margin = 10
|
||||||
|
|
||||||
|
experimental {
|
||||||
|
# send proper cancel events to windows instead of hacky touch_up events,
|
||||||
|
# NOT recommended as it crashed a few times, once it's stabilized I'll make it the default
|
||||||
|
send_cancel = 0
|
||||||
|
}
|
||||||
|
}
|
4
.config/hypr/conf/misc.conf
Normal file
4
.config/hypr/conf/misc.conf
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
misc {
|
||||||
|
disable_hyprland_logo = true
|
||||||
|
disable_splash_rendering = false
|
||||||
|
}
|
16
.config/hypr/conf/monitor.conf
Normal file
16
.config/hypr/conf/monitor.conf
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
#monitor=eDP-1,preferred,2800x1800@120,1.5,bitdepth,10,vrr,1
|
||||||
|
|
||||||
|
monitor = eDP-1, 2880x1800@120, 0x0, 1.5, bitdepth, 10, vrr, 1, cm, hdr, sdrbrightness, 1.2, sdrsaturation, 0.98
|
||||||
|
|
||||||
|
|
||||||
|
experimental {
|
||||||
|
xx_color_management_v4 = true
|
||||||
|
}
|
||||||
|
|
||||||
|
xwayland {
|
||||||
|
force_zero_scaling = true
|
||||||
|
}
|
||||||
|
|
||||||
|
env = GDK_SCALE,2
|
||||||
|
env = XCURSOR_SIZE,16
|
||||||
|
env = QT_SCALE_FACTOR,1.5
|
63
.config/hypr/conf/windowrules.conf
Normal file
63
.config/hypr/conf/windowrules.conf
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
windowrulev2 = bordercolor rgb(ff7f50), class:^(Rofi)$
|
||||||
|
windowrulev2 = bordersize 2, class:^(Rofi)$
|
||||||
|
|
||||||
|
|
||||||
|
windowrulev2 = float, title:^(Picture-in-Picture)$
|
||||||
|
windowrulev2 = move 73% 5%, title:^(Picture-in-Picture)$
|
||||||
|
windowrulev2 = size 560 319, title:^(Picture-in-Picture)$
|
||||||
|
windowrulev2 = pin, title:^(Picture-in-Picture)$
|
||||||
|
|
||||||
|
|
||||||
|
windowrulev2 = float, class:^(kitty-floating)$
|
||||||
|
windowrulev2 = center, class:^(kitty-floating)$
|
||||||
|
windowrulev2 = size 60% 50%, class:^(kitty-floating)$
|
||||||
|
|
||||||
|
windowrulev2 = float, title:(Control de volumen)#
|
||||||
|
|
||||||
|
|
||||||
|
windowrulev2 = float, title:(zenity)#
|
||||||
|
windowrulev2 = float, title:(Detalles de la Batería)#
|
||||||
|
windowrulev2 = float, title:(Salud de la Batería)#
|
||||||
|
windowrulev2 = move onscreen cursor, title:^(Detalles de la Batería)$, class:^(yad)$
|
||||||
|
windowrulev2 = move onscreen cursor, title:^(Salud de la Batería)$, class:^(yad)$
|
||||||
|
|
||||||
|
|
||||||
|
windowrulev2 = float, title:(comandos)#
|
||||||
|
windowrulev2 = float, title:(Redes Disponibles)#
|
||||||
|
windowrulev2 = move onscreen cursor,title:^(Redes Disponibles)$, class:^(wifi_menu.py)$
|
||||||
|
windowrulev2 = float, title:(Control de Volumen)#
|
||||||
|
windowrulev2 = move 1730 70, class:(volume_menu.py)
|
||||||
|
windowrulev2 = float, title:(Menú de Red)#
|
||||||
|
windowrulev2 = move onscreen cursor, title:^(Menú de Red)$
|
||||||
|
|
||||||
|
windowrulev2 = float, title:(Scratchpad Windows)#
|
||||||
|
windowrulev2 = move onscreen cursor, title:^(Scratchpad Windows)$
|
||||||
|
|
||||||
|
windowrulev2 = float, title:(Olvidar Red Guardada)#
|
||||||
|
windowrulev2 = move onscreen cursor, title:^(Olvidar Red Guardada)$, class:^(wifi_menu.py)$
|
||||||
|
|
||||||
|
windowrulev2 = float, title:(Bluetooth Menu)#
|
||||||
|
windowrulev2 = move 1600 180, class:(org.example.BluetoothMenu)
|
||||||
|
windowrulev2 = move 1600 180, class:(Album Cover)
|
||||||
|
|
||||||
|
windowrulev2 = float, title:(Wi Hotspot)#
|
||||||
|
windowrulev2 = move onscreen cursor, title:^(Wi Hotspot)$, class:^(wihotspot)$
|
||||||
|
|
||||||
|
windowrulev2 = float, title:(Seleccionar dispositivo)#
|
||||||
|
windowrulev2 = move onscreen cursor, title:^(Seleccionr dispositivo), class^()$
|
||||||
|
|
||||||
|
|
||||||
|
windowrule = float, title:^(playlist)$
|
||||||
|
windowrule = center, title:^(playlist)$
|
||||||
|
windowrule = size 900 500, title:^(playlist)$
|
||||||
|
windowrulev2 = float, title:(1Password)#
|
||||||
|
windowrulev2 = size 70% 70%, title:(1Password)
|
||||||
|
windowrulev2 = center, title:(1Password)
|
||||||
|
|
||||||
|
windowrulev2 = opacity 0.0 override, class:^(xwaylandvideobridge)$
|
||||||
|
windowrulev2 = noanim, class:^(xwaylandvideobridge)$
|
||||||
|
windowrulev2 = noinitialfocus, class:^(xwaylandvideobridge)$
|
||||||
|
windowrulev2 = maxsize 1 1, class:^(xwaylandvideobridge)$
|
||||||
|
windowrulev2 = noblur, class:^(xwaylandvideobridge)$
|
||||||
|
|
||||||
|
windowrule = move cursor -80% 30%, title:^(comandos)$
|
16
.config/hypr/hy3.conf
Normal file
16
.config/hypr/hy3.conf
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
|
||||||
|
plugin {
|
||||||
|
hy3 {
|
||||||
|
tabs {
|
||||||
|
height = 2
|
||||||
|
padding = 6
|
||||||
|
render_text = false
|
||||||
|
}
|
||||||
|
|
||||||
|
autotile {
|
||||||
|
enable = true
|
||||||
|
trigger_width = 800
|
||||||
|
trigger_height = 500
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
17
.config/hypr/hyprexpo.conf
Normal file
17
.config/hypr/hyprexpo.conf
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
|
||||||
|
bind = SUPER, TAB, hyprexpo:expo, toggle # can be: toggle, off/disable or on/enable
|
||||||
|
|
||||||
|
plugin {
|
||||||
|
hyprexpo {
|
||||||
|
columns = 3
|
||||||
|
gap_size = 5
|
||||||
|
bg_col = rgb(111111)
|
||||||
|
workspace_method = center current # [center/first] [workspace] e.g. first 1 or center m+1
|
||||||
|
|
||||||
|
enable_gesture = true # laptop touchpad
|
||||||
|
gesture_fingers = 3 # 3 or 4
|
||||||
|
gesture_distance = 300 # how far is the "max"
|
||||||
|
gesture_positive = true # positive = swipe down. Negative = swipe up.
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
8
.config/hypr/hyprgrass.conf
Normal file
8
.config/hypr/hyprgrass.conf
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
plugin {
|
||||||
|
hyprgrass {
|
||||||
|
enable = true
|
||||||
|
color = rgba(100,255,100,0.7)
|
||||||
|
wave_speed = 1.0
|
||||||
|
wave_height = 4
|
||||||
|
}
|
||||||
|
}
|
40
.config/hypr/hypridle.conf
Normal file
40
.config/hypr/hypridle.conf
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
# General Settings
|
||||||
|
general {
|
||||||
|
lock_cmd = ~/.local/bin/video_lock.sh
|
||||||
|
before_sleep_cmd = loginctl lock-session
|
||||||
|
after_sleep_cmd = hyprctl dispatch dpms on
|
||||||
|
}
|
||||||
|
|
||||||
|
# Bajar brillo después de 2.5 minutos
|
||||||
|
listener {
|
||||||
|
timeout = 100
|
||||||
|
on-timeout = brightnessctl --device=amdgpu_bl1 -s set 10
|
||||||
|
on-resume = brightnessctl --device=amdgpu_bl1 -r
|
||||||
|
}
|
||||||
|
|
||||||
|
# Apagar teclado después de 2.5 minutos (opcional)
|
||||||
|
listener {
|
||||||
|
timeout = 100
|
||||||
|
on-timeout = brightnessctl -sd 'asus::kbd_backlight' set 0
|
||||||
|
on-resume = brightnessctl -rd 'asus::kbd_backlight'
|
||||||
|
}
|
||||||
|
|
||||||
|
# Ejecutar bloqueo con video antes de apagar la pantalla
|
||||||
|
listener {
|
||||||
|
timeout = 180
|
||||||
|
on-timeout = bash -c "! pgrep -x mpv > /dev/null && ~/.local/bin/video_lock.sh"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Apagar pantalla después de 5 minutos
|
||||||
|
listener {
|
||||||
|
timeout = 300
|
||||||
|
on-timeout = hyprctl dispatch dpms off
|
||||||
|
on-resume = hyprctl dispatch dpms on
|
||||||
|
}
|
||||||
|
|
||||||
|
# Suspender después de 30 minutos
|
||||||
|
listener {
|
||||||
|
timeout = 1000
|
||||||
|
on-timeout = systemctl suspend
|
||||||
|
}
|
||||||
|
|
30
.config/hypr/hyprland.conf
Normal file
30
.config/hypr/hyprland.conf
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
source = ~/.config/hypr/conf/monitor.conf
|
||||||
|
source = ~/.config/hypr/conf/environment.conf
|
||||||
|
source = ~/.config/hypr/conf/keyboard.conf
|
||||||
|
source = ~/.config/hypr/conf/autostart.conf
|
||||||
|
source = ~/.config/hypr/conf/bind.conf
|
||||||
|
source = ~/.config/hypr/conf/misc.conf
|
||||||
|
source = ~/.config/hypr/conf/decoration.conf
|
||||||
|
source = ~/.config/hypr/conf/animations.conf
|
||||||
|
source = ~/.config/hypr/conf/layout.conf
|
||||||
|
source = ~/.config/hypr/conf/windowrules.conf
|
||||||
|
source = ~/.config/hypr/hyprgrass.conf
|
||||||
|
source = ~/.config/hypr/hy3.conf
|
||||||
|
source = ~/.config/hypr/conf/general.conf
|
||||||
|
source = ~/.config/hypr/hyprspace.conf
|
||||||
|
plugin {
|
||||||
|
xtra-dispatchers {
|
||||||
|
enabled = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
decoration {
|
||||||
|
rounding = 10
|
||||||
|
|
||||||
|
blur {
|
||||||
|
enabled = true
|
||||||
|
size = 8
|
||||||
|
passes = 2
|
||||||
|
new_optimizations = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
4
.config/hypr/hyprload.toml
Normal file
4
.config/hypr/hyprload.toml
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
plugins = [
|
||||||
|
hyprspace = {}
|
||||||
|
xtra-dispatchers = {}
|
||||||
|
]
|
27
.config/hypr/hyprlock.conf
Normal file
27
.config/hypr/hyprlock.conf
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
general {
|
||||||
|
grace = 0
|
||||||
|
hide_cursor = true
|
||||||
|
}
|
||||||
|
|
||||||
|
input-field {
|
||||||
|
size = 200, 50
|
||||||
|
outline_thickness = 2
|
||||||
|
dots_size = 0.2
|
||||||
|
dots_spacing = 0.2
|
||||||
|
dots_center = true
|
||||||
|
fade_on_empty = true
|
||||||
|
font_color = rgba(255,255,255,0.8)
|
||||||
|
placeholder_text = Contraseña...
|
||||||
|
shadow_passes = 2
|
||||||
|
monitor = eDP-1
|
||||||
|
position = 0.5, 0.8
|
||||||
|
halign = center
|
||||||
|
valign = center
|
||||||
|
}
|
||||||
|
|
||||||
|
background {
|
||||||
|
monitor = eDP-1
|
||||||
|
path = ""
|
||||||
|
color = rgba(0, 0, 0, 0.0) # completamente transparente
|
||||||
|
}
|
||||||
|
|
11
.config/hypr/hyprpaper.conf
Normal file
11
.config/hypr/hyprpaper.conf
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
preload = /home/teraflops/Wallpapers/blobs-d.webp
|
||||||
|
|
||||||
|
#set the default wallpaper(s) seen on initial workspace(s) --depending on the number of monitors used
|
||||||
|
wallpaper = eDP-1,/home/teraflops/Wallpapers/blobs-d.webp
|
||||||
|
wallpaper = DP-9,/home/teraflops/Wallpapers/blobs-d.webp
|
||||||
|
wallpaper = DP-2,/home/teraflops/Wallpapers/blobs-d.webp
|
||||||
|
# enable splash text rendering over the wallpaper
|
||||||
|
splash = false
|
||||||
|
|
||||||
|
#fully disable ipc
|
||||||
|
ipc = on
|
15
.config/hypr/hyprspace.conf
Normal file
15
.config/hypr/hyprspace.conf
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
#bind = SUPER, TAB, overview:toggle
|
||||||
|
plugin {
|
||||||
|
hyprspace {
|
||||||
|
enable_swipe = true # Activa gestos para laptops
|
||||||
|
swipe_fingers = 3 # Cantidad de dedos para gestos
|
||||||
|
render_text = true # Muestra nombres de workspaces
|
||||||
|
text_font = "JetBrainsMono Nerd Font"
|
||||||
|
text_size = 14
|
||||||
|
text_color = rgba(ffffffee)
|
||||||
|
text_align = center # Opciones: left, center, right
|
||||||
|
bg_color = rgba(111111cc)
|
||||||
|
workspace_gaps = 10 # Espacio entre workspaces
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
9
.config/hypr/shaders/blur.frag
Normal file
9
.config/hypr/shaders/blur.frag
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
#version 450
|
||||||
|
layout(location = 0) in vec2 uv;
|
||||||
|
layout(location = 0) out vec4 fragColor;
|
||||||
|
uniform sampler2D tex;
|
||||||
|
void main() {
|
||||||
|
vec4 color = texture(tex, uv);
|
||||||
|
fragColor = vec4(color.rgb * 1.2, color.a);
|
||||||
|
}
|
||||||
|
|
20
.config/kitty/current-theme.conf
Normal file
20
.config/kitty/current-theme.conf
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
foreground #bfbfbf
|
||||||
|
background #282a2e
|
||||||
|
selection_background #5c4c79
|
||||||
|
url_color #29a1ae
|
||||||
|
color0 #292b2d
|
||||||
|
color8 #68717b
|
||||||
|
color1 #ce527a
|
||||||
|
color9 #ce527a
|
||||||
|
color2 #2d9474
|
||||||
|
color10 #84d82f
|
||||||
|
color3 #bfa325
|
||||||
|
color11 #edad0d
|
||||||
|
color4 #4e97d6
|
||||||
|
color12 #4c91cc
|
||||||
|
color5 #bb6dc3
|
||||||
|
color13 #bb6dc3
|
||||||
|
color6 #299ba2
|
||||||
|
color14 #299ba2
|
||||||
|
color7 #e4e4e4
|
||||||
|
color15 #f2f2f2
|
95
.config/kitty/dark-theme.auto.conf
Normal file
95
.config/kitty/dark-theme.auto.conf
Normal file
@ -0,0 +1,95 @@
|
|||||||
|
# vim:ft=kitty
|
||||||
|
|
||||||
|
## name: Atelier Savanna Dark
|
||||||
|
## author: Bram de Haan (https://github.com/atelierbram)
|
||||||
|
## license: MIT
|
||||||
|
## upstream: https://github.com/atelierbram/AtelierSchemes-kitty/blob/main/themes/atelier-savanna-dark.conf
|
||||||
|
## blurb: Base color for Savanna is green, it has greenish colors for the background. “Color-wheel colors” are desaturated considerably, giving this colorscheme a rather understated appeal and, dear I say it, a ‘natural’ look and feel.
|
||||||
|
|
||||||
|
|
||||||
|
#: The basic colors
|
||||||
|
|
||||||
|
foreground #87928a
|
||||||
|
background #171c19
|
||||||
|
selection_foreground #87928a
|
||||||
|
selection_background #232a25
|
||||||
|
|
||||||
|
|
||||||
|
#: Cursor colors
|
||||||
|
|
||||||
|
cursor #87928a
|
||||||
|
cursor_text_color #171c19
|
||||||
|
|
||||||
|
|
||||||
|
#: URL underline color when hovering with mouse
|
||||||
|
|
||||||
|
url_color #a07e3b
|
||||||
|
|
||||||
|
|
||||||
|
#: kitty window border colors and terminal bell colors
|
||||||
|
|
||||||
|
active_border_color #5f6d64
|
||||||
|
inactive_border_color #171c19
|
||||||
|
bell_border_color #9f713c
|
||||||
|
visual_bell_color none
|
||||||
|
|
||||||
|
|
||||||
|
#: OS Window titlebar colors
|
||||||
|
|
||||||
|
wayland_titlebar_color #232a25
|
||||||
|
macos_titlebar_color #232a25
|
||||||
|
|
||||||
|
|
||||||
|
#: Tab bar colors
|
||||||
|
|
||||||
|
active_tab_foreground #dfe7e2
|
||||||
|
active_tab_background #171c19
|
||||||
|
inactive_tab_foreground #87928a
|
||||||
|
inactive_tab_background #232a25
|
||||||
|
tab_bar_background #232a25
|
||||||
|
tab_bar_margin_color none
|
||||||
|
|
||||||
|
|
||||||
|
#: Colors for marks (marked text in the terminal)
|
||||||
|
|
||||||
|
mark1_foreground #171c19
|
||||||
|
mark1_background #dfe7e2
|
||||||
|
mark2_foreground #171c19
|
||||||
|
mark2_background #a07e3b
|
||||||
|
mark3_foreground #171c19
|
||||||
|
mark3_background #489963
|
||||||
|
|
||||||
|
|
||||||
|
#: The basic 16 colors
|
||||||
|
|
||||||
|
#: black
|
||||||
|
color0 #171c19
|
||||||
|
color8 #5f6d64
|
||||||
|
|
||||||
|
#: red
|
||||||
|
color1 #b16139
|
||||||
|
color9 #9f713c
|
||||||
|
|
||||||
|
#: green
|
||||||
|
color2 #489963
|
||||||
|
color10 #232a25
|
||||||
|
|
||||||
|
#: yellow
|
||||||
|
color3 #a07e3b
|
||||||
|
color11 #526057
|
||||||
|
|
||||||
|
#: blue
|
||||||
|
color4 #478c90
|
||||||
|
color12 #78877d
|
||||||
|
|
||||||
|
#: magenta
|
||||||
|
color5 #55859b
|
||||||
|
color13 #dfe7e2
|
||||||
|
|
||||||
|
#: cyan
|
||||||
|
color6 #1c9aa0
|
||||||
|
color14 #867469
|
||||||
|
|
||||||
|
#: white
|
||||||
|
color7 #87928a
|
||||||
|
color15 #ecf4ee
|
124
.config/kitty/kitty.conf
Normal file
124
.config/kitty/kitty.conf
Normal file
@ -0,0 +1,124 @@
|
|||||||
|
# Fonts
|
||||||
|
font_family Ubuntu Mono derivative Powerline
|
||||||
|
bold_font auto
|
||||||
|
italic_font auto
|
||||||
|
bold_italic_font auto
|
||||||
|
font_size 13.9
|
||||||
|
disable_ligatures always
|
||||||
|
|
||||||
|
env GLFW_IM_MODULE=ibus
|
||||||
|
|
||||||
|
# Cursors
|
||||||
|
# cursor #F2D5CF
|
||||||
|
# cursor_text_color #303446
|
||||||
|
cursor_shape beam
|
||||||
|
cursor_underline_thickness 2
|
||||||
|
cursor_blink_interval -1
|
||||||
|
cursor_stop_blinking_after 15
|
||||||
|
|
||||||
|
# Scrollback
|
||||||
|
scrollback_lines 2000
|
||||||
|
|
||||||
|
# Mouse
|
||||||
|
# url_color #F2D5CF
|
||||||
|
copy_on_select yes
|
||||||
|
default_pointer_shape beam
|
||||||
|
pointer_shape_when_dragging beam
|
||||||
|
mouse_map middle release ungrabbed paste_from_selection
|
||||||
|
|
||||||
|
# Performance
|
||||||
|
repaint_delay 6
|
||||||
|
input_delay 1
|
||||||
|
sync_to_monitor no
|
||||||
|
|
||||||
|
# Window layout
|
||||||
|
remember_window_size yes
|
||||||
|
initial_window_width 1024
|
||||||
|
initial_window_height 400
|
||||||
|
enabled_layouts *
|
||||||
|
window_resize_step_cells 1
|
||||||
|
window_resize_step_lines 1
|
||||||
|
window_border_width 1
|
||||||
|
draw_minimal_borders yes
|
||||||
|
window_margin_width 0
|
||||||
|
single_window_margin_width -1
|
||||||
|
window_padding_width 1
|
||||||
|
single_window_padding_width -1
|
||||||
|
placement_strategy center
|
||||||
|
# active_border_color #BABBF1
|
||||||
|
# inactive_border_color #737994
|
||||||
|
# bell_border_color #E5C890
|
||||||
|
hide_window_decorations no
|
||||||
|
resize_debounce_time 0.05 0.05
|
||||||
|
confirm_os_window_close 0
|
||||||
|
# wayland_titlebar_color background
|
||||||
|
|
||||||
|
# Tab bar
|
||||||
|
tab_bar_edge bottom
|
||||||
|
tab_bar_margin_width 0.0
|
||||||
|
tab_bar_margin_height 0.0 0.0
|
||||||
|
tab_bar_style powerline
|
||||||
|
tab_bar_align left
|
||||||
|
tab_bar_min_tabs 2
|
||||||
|
tab_switch_strategy previous
|
||||||
|
tab_fade 0.25 0.5 0.75 1
|
||||||
|
tab_title_template "{num_windows} window{'s' if num_windows > 1 else ''} opened"
|
||||||
|
# active_tab_foreground #232634
|
||||||
|
# active_tab_background #CA9EE6
|
||||||
|
# inactive_tab_foreground #C6D0F5
|
||||||
|
# inactive_tab_background #292C3C
|
||||||
|
# tab_bar_background #232634
|
||||||
|
|
||||||
|
# Color scheme
|
||||||
|
# foreground #D8DEE9
|
||||||
|
# background #2E3440
|
||||||
|
# selection_foreground #000010
|
||||||
|
# selection_background #6d9ece
|
||||||
|
#background_opacity 0.75
|
||||||
|
#background_blur 1
|
||||||
|
# mark1_foreground #303446
|
||||||
|
# mark1_background #BABBF1
|
||||||
|
# mark2_foreground #303446
|
||||||
|
# mark2_background #CA9EE6
|
||||||
|
# mark3_foreground #303446
|
||||||
|
# mark3_background #85C1DC
|
||||||
|
# color0 #51576D
|
||||||
|
# color8 #626880
|
||||||
|
# color1 #E78284
|
||||||
|
# color9 #E78284
|
||||||
|
# color2 #A6D189
|
||||||
|
# color10 #A6D189
|
||||||
|
# color3 #E5C890
|
||||||
|
# color11 #E5C890
|
||||||
|
# color4 #6d9dce
|
||||||
|
# color12 #8CAAEE
|
||||||
|
# color5 #F4B8E4
|
||||||
|
# color13 #F4B8E4
|
||||||
|
# color6 #81C8BE
|
||||||
|
# color14 #81C8BE
|
||||||
|
# color7 #B5BFE2
|
||||||
|
# color15 #A5ADCE
|
||||||
|
|
||||||
|
# Advanced
|
||||||
|
allow_remote_control yes
|
||||||
|
|
||||||
|
# Keyboard shortcuts
|
||||||
|
clear_all_shortcuts yes
|
||||||
|
map alt+c copy_to_clipboard
|
||||||
|
map alt+v paste_from_clipboard
|
||||||
|
map alt+enter new_window
|
||||||
|
map alt+w close_window
|
||||||
|
map ctrl+tab next_window
|
||||||
|
map alt+t new_tab
|
||||||
|
map alt+q close_tab
|
||||||
|
map alt+l next_layout
|
||||||
|
map alt+kp_add change_font_size all +2.0
|
||||||
|
map alt+kp_subtract change_font_size all -2.0
|
||||||
|
map alt+backspace change_font_size all 0
|
||||||
|
map alt+f5 load_config_file
|
||||||
|
|
||||||
|
|
||||||
|
# BEGIN_KITTY_THEME
|
||||||
|
# Spacemacs
|
||||||
|
include current-theme.conf
|
||||||
|
# END_KITTY_THEME
|
118
.config/kitty/kitty.conf.bak
Normal file
118
.config/kitty/kitty.conf.bak
Normal file
@ -0,0 +1,118 @@
|
|||||||
|
# Fonts
|
||||||
|
font_family Ubuntu Mono derivative Powerline
|
||||||
|
bold_font auto
|
||||||
|
italic_font auto
|
||||||
|
bold_italic_font auto
|
||||||
|
font_size 13.9
|
||||||
|
disable_ligatures always
|
||||||
|
|
||||||
|
env GLFW_IM_MODULE=ibus
|
||||||
|
|
||||||
|
# Cursors
|
||||||
|
cursor #F2D5CF
|
||||||
|
cursor_text_color #303446
|
||||||
|
cursor_shape beam
|
||||||
|
cursor_underline_thickness 2
|
||||||
|
cursor_blink_interval -1
|
||||||
|
cursor_stop_blinking_after 15
|
||||||
|
|
||||||
|
# Scrollback
|
||||||
|
scrollback_lines 2000
|
||||||
|
|
||||||
|
# Mouse
|
||||||
|
url_color #F2D5CF
|
||||||
|
copy_on_select yes
|
||||||
|
default_pointer_shape beam
|
||||||
|
pointer_shape_when_dragging beam
|
||||||
|
mouse_map middle release ungrabbed paste_from_selection
|
||||||
|
|
||||||
|
# Performance
|
||||||
|
repaint_delay 6
|
||||||
|
input_delay 1
|
||||||
|
sync_to_monitor no
|
||||||
|
|
||||||
|
# Window layout
|
||||||
|
remember_window_size yes
|
||||||
|
initial_window_width 1024
|
||||||
|
initial_window_height 400
|
||||||
|
enabled_layouts *
|
||||||
|
window_resize_step_cells 1
|
||||||
|
window_resize_step_lines 1
|
||||||
|
window_border_width 1
|
||||||
|
draw_minimal_borders yes
|
||||||
|
window_margin_width 0
|
||||||
|
single_window_margin_width -1
|
||||||
|
window_padding_width 1
|
||||||
|
single_window_padding_width -1
|
||||||
|
placement_strategy center
|
||||||
|
active_border_color #BABBF1
|
||||||
|
inactive_border_color #737994
|
||||||
|
bell_border_color #E5C890
|
||||||
|
hide_window_decorations no
|
||||||
|
resize_debounce_time 0.05 0.05
|
||||||
|
confirm_os_window_close 0
|
||||||
|
wayland_titlebar_color background
|
||||||
|
|
||||||
|
# Tab bar
|
||||||
|
tab_bar_edge bottom
|
||||||
|
tab_bar_margin_width 0.0
|
||||||
|
tab_bar_margin_height 0.0 0.0
|
||||||
|
tab_bar_style powerline
|
||||||
|
tab_bar_align left
|
||||||
|
tab_bar_min_tabs 2
|
||||||
|
tab_switch_strategy previous
|
||||||
|
tab_fade 0.25 0.5 0.75 1
|
||||||
|
tab_title_template "{num_windows} window{'s' if num_windows > 1 else ''} opened"
|
||||||
|
active_tab_foreground #232634
|
||||||
|
active_tab_background #CA9EE6
|
||||||
|
inactive_tab_foreground #C6D0F5
|
||||||
|
inactive_tab_background #292C3C
|
||||||
|
tab_bar_background #232634
|
||||||
|
|
||||||
|
# Color scheme
|
||||||
|
foreground #D8DEE9
|
||||||
|
background #2E3440
|
||||||
|
selection_foreground #000010
|
||||||
|
selection_background #6d9ece
|
||||||
|
#background_opacity 0.75
|
||||||
|
#background_blur 1
|
||||||
|
mark1_foreground #303446
|
||||||
|
mark1_background #BABBF1
|
||||||
|
mark2_foreground #303446
|
||||||
|
mark2_background #CA9EE6
|
||||||
|
mark3_foreground #303446
|
||||||
|
mark3_background #85C1DC
|
||||||
|
color0 #51576D
|
||||||
|
color8 #626880
|
||||||
|
color1 #E78284
|
||||||
|
color9 #E78284
|
||||||
|
color2 #A6D189
|
||||||
|
color10 #A6D189
|
||||||
|
color3 #E5C890
|
||||||
|
color11 #E5C890
|
||||||
|
color4 #6d9dce
|
||||||
|
color12 #8CAAEE
|
||||||
|
color5 #F4B8E4
|
||||||
|
color13 #F4B8E4
|
||||||
|
color6 #81C8BE
|
||||||
|
color14 #81C8BE
|
||||||
|
color7 #B5BFE2
|
||||||
|
color15 #A5ADCE
|
||||||
|
|
||||||
|
# Advanced
|
||||||
|
allow_remote_control yes
|
||||||
|
|
||||||
|
# Keyboard shortcuts
|
||||||
|
clear_all_shortcuts yes
|
||||||
|
map alt+c copy_to_clipboard
|
||||||
|
map alt+v paste_from_clipboard
|
||||||
|
map alt+enter new_window
|
||||||
|
map alt+w close_window
|
||||||
|
map ctrl+tab next_window
|
||||||
|
map alt+t new_tab
|
||||||
|
map alt+q close_tab
|
||||||
|
map alt+l next_layout
|
||||||
|
map alt+kp_add change_font_size all +2.0
|
||||||
|
map alt+kp_subtract change_font_size all -2.0
|
||||||
|
map alt+backspace change_font_size all 0
|
||||||
|
map alt+f5 load_config_file
|
28
.config/mopidy/mopidy.conf
Normal file
28
.config/mopidy/mopidy.conf
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
[core]
|
||||||
|
cache_dir = ~/.cache/mopidy
|
||||||
|
|
||||||
|
[mpd]
|
||||||
|
enabled = true
|
||||||
|
hostname = 0.0.0.0
|
||||||
|
port = 6600
|
||||||
|
|
||||||
|
[audio]
|
||||||
|
output = alsasink device=hw:3,0 buffer-time=500000 latency-time=20000 sync=false
|
||||||
|
#output = alsasink device=hw:Loopback,0,0
|
||||||
|
[mpris]
|
||||||
|
enabled = true
|
||||||
|
|
||||||
|
[qobuz]
|
||||||
|
enabled = false
|
||||||
|
username = xxxxxxxxxxxx@gmail.com
|
||||||
|
password = xxxxxxxxxxxx
|
||||||
|
app_id = 798273057
|
||||||
|
secret = abb21364945c0583309667d13ca3d93a
|
||||||
|
quality = 27
|
||||||
|
|
||||||
|
[tidal]
|
||||||
|
enabled = true
|
||||||
|
quality = HI_RES_LOSSLESS
|
||||||
|
playlist_cache_refresh_secs = 0
|
||||||
|
auth_method = OAUTH
|
||||||
|
login_server_port = 8989
|
BIN
.config/mpd/database
Normal file
BIN
.config/mpd/database
Normal file
Binary file not shown.
64
.config/mpd/mpd.conf
Normal file
64
.config/mpd/mpd.conf
Normal file
@ -0,0 +1,64 @@
|
|||||||
|
# Recommended location for database
|
||||||
|
db_file "~/.config/mpd/database"
|
||||||
|
sticker_file "~/.config/mpd/sticker.sql"
|
||||||
|
|
||||||
|
# If running mpd using systemd, delete this line to log directly to systemd.
|
||||||
|
|
||||||
|
# The music directory is by default the XDG directory, uncomment to amend and choose a different directory
|
||||||
|
music_directory "~/media/all"
|
||||||
|
|
||||||
|
# Uncomment to refresh the database whenever files in the music_directory are changed
|
||||||
|
auto_update "yes"
|
||||||
|
|
||||||
|
# Uncomment to enable the functionalities
|
||||||
|
playlist_directory "~/.config/mpd/playlists"
|
||||||
|
pid_file "~/.config/mpd/pid"
|
||||||
|
state_file "~/.local/state/mpd/state"
|
||||||
|
sticker_file "~/.config/mpd/sticker.sql"
|
||||||
|
|
||||||
|
audio_output {
|
||||||
|
type "alsa"
|
||||||
|
name "xduoo - XD-05 BAL"
|
||||||
|
device "hw:3,0"
|
||||||
|
auto_resample "no"
|
||||||
|
auto_format "no"
|
||||||
|
auto_channels "no"
|
||||||
|
}
|
||||||
|
audio_output {
|
||||||
|
type "alsa"
|
||||||
|
name "Kiwi Ears-Allegro PRO"
|
||||||
|
device "hw:3,0"
|
||||||
|
auto_resample "no"
|
||||||
|
auto_format "no"
|
||||||
|
auto_channels "no"
|
||||||
|
}
|
||||||
|
|
||||||
|
audio_output {
|
||||||
|
type "alsa"
|
||||||
|
name "PipeWire-Alsa"
|
||||||
|
device "default"
|
||||||
|
auto_resample "no"
|
||||||
|
auto_format "no"
|
||||||
|
auto_channels "no"
|
||||||
|
mixer_type "none"
|
||||||
|
}
|
||||||
|
|
||||||
|
replaygain "off"
|
||||||
|
mixer_type "none"
|
||||||
|
|
||||||
|
audio_output {
|
||||||
|
type "pipewire"
|
||||||
|
name "PipeWire Sound Server"
|
||||||
|
}
|
||||||
|
audio_output {
|
||||||
|
type "fifo"
|
||||||
|
name "Visualizer feed"
|
||||||
|
path "/tmp/mpd.fifo"
|
||||||
|
format "44100:16:2"
|
||||||
|
}
|
||||||
|
input {
|
||||||
|
plugin "tidal"
|
||||||
|
username "cprieto.ortiz@gmail.com"
|
||||||
|
password "wasamasa123"
|
||||||
|
token "eyJraWQiOiJ2OU1GbFhqWSIsImFsZyI6IkVTMjU2In0.eyJ0eXBlIjoibzJfYWNjZXNzIiwidWlkIjoyMDM0MDQ0NzQsInNjb3BlIjoid191c3Igcl91c3Igd19zdWIiLCJnVmVyIjowLCJzVmVyIjowLCJjaWQiOjgwMTcsImN1ayI6ImUyMzAyZDljNjFiMDU3ZDMiLCJleHAiOjE3NDY4ODU4NTcsInNpZCI6IjNkNDYxZGJhLWIzYmUtNDBmMy1hZWVmLTk0NzFiODE3OGRhZiIsImlzcyI6Imh0dHBzOi8vYXV0aC50aWRhbC5jb20vdjEifQ.sb9yQ83w2jxCkyzomyOGRdm6TO771IcNP_LOEQz3q8MhQQhaJIWetl8MtHw_k4_T3Cb3lMcXl_d-GyvC4Ani2A"
|
||||||
|
}
|
BIN
.config/mpd/sticker.sql
Normal file
BIN
.config/mpd/sticker.sql
Normal file
Binary file not shown.
24
.config/mpv/LICENSE
Normal file
24
.config/mpv/LICENSE
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
This is free and unencumbered software released into the public domain.
|
||||||
|
|
||||||
|
Anyone is free to copy, modify, publish, use, compile, sell, or
|
||||||
|
distribute this software, either in source code form or as a compiled
|
||||||
|
binary, for any purpose, commercial or non-commercial, and by any
|
||||||
|
means.
|
||||||
|
|
||||||
|
In jurisdictions that recognize copyright laws, the author or authors
|
||||||
|
of this software dedicate any and all copyright interest in the
|
||||||
|
software to the public domain. We make this dedication for the benefit
|
||||||
|
of the public at large and to the detriment of our heirs and
|
||||||
|
successors. We intend this dedication to be an overt act of
|
||||||
|
relinquishment in perpetuity of all present and future rights to this
|
||||||
|
software under copyright law.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
|
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
|
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||||
|
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||||
|
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||||
|
OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
|
For more information, please refer to <http://unlicense.org>
|
1
.config/mpv/apikeys/lastfm
Normal file
1
.config/mpv/apikeys/lastfm
Normal file
@ -0,0 +1 @@
|
|||||||
|
d6cbcf9e6b4d77da1dcb91461020bc37
|
1
.config/mpv/apikeys/tmdb
Normal file
1
.config/mpv/apikeys/tmdb
Normal file
@ -0,0 +1 @@
|
|||||||
|
f36bb41a7dbc723940acd0e3bbfe5a0a
|
26
.config/mpv/menu.json
Normal file
26
.config/mpv/menu.json
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"label": "Load files to playlist",
|
||||||
|
"command": ["script-message", "playlistmanager", "loadfiles"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Sort playlist",
|
||||||
|
"command": ["script-message", "playlistmanager", "sort"],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Sort playlist and start from first file",
|
||||||
|
"command": ["script-message", "playlistmanager", "sort", "true"],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Reverse playlist",
|
||||||
|
"command": ["script-message", "playlistmanager", "reverse"],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Shuffle playlist",
|
||||||
|
"command": ["script-message", "playlistmanager", "shuffle"],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Save playlist",
|
||||||
|
"command": ["script-message", "playlistmanager", "save"],
|
||||||
|
}
|
||||||
|
]
|
11
.config/mpv/mpv.conf
Normal file
11
.config/mpv/mpv.conf
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
input-ipc-server=/tmp/mpvsocket
|
||||||
|
vo=gpu-next
|
||||||
|
gpu-api=vulkan
|
||||||
|
#tone-mapping=bt.2390
|
||||||
|
#target-colorspace-hint=yes
|
||||||
|
#target-trc=pq
|
||||||
|
#target-prim=bt.2020
|
||||||
|
#hdr-compute-peak=yes
|
||||||
|
gpu-context=waylandvk
|
||||||
|
hwdec=vulkan-copy
|
||||||
|
vulkan-swap-mode=immediate
|
21
.config/mpv/mpv.conf_profiles
Normal file
21
.config/mpv/mpv.conf_profiles
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
[vaapi]
|
||||||
|
hwdec=vaapi-copy
|
||||||
|
vo=gpu
|
||||||
|
hwdec-codecs=all
|
||||||
|
script-opts=iptv=1
|
||||||
|
[svp]
|
||||||
|
hwdec=auto-copy
|
||||||
|
hwdec-codecs=all
|
||||||
|
input-ipc-server=/tmp/mpvsocket # Receives input from SVP
|
||||||
|
hr-seek-framedrop=no # Fixes audio desync
|
||||||
|
watch-later-options-remove=vf # Do not remember SVP's video filters
|
||||||
|
[vulkan]
|
||||||
|
vo=gpu-next
|
||||||
|
gpu-api=vulkan
|
||||||
|
hwdec=vulkan,auto-safe
|
||||||
|
gpu-context=waylandvk
|
||||||
|
#target-prim=bt.2020
|
||||||
|
#target-trc=pq
|
||||||
|
target-colorspace-hint
|
||||||
|
script-opts=iptv=1
|
||||||
|
|
4
.config/mpv/mpv.conf_vaapi
Normal file
4
.config/mpv/mpv.conf_vaapi
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
hwdec=vaapi-copy
|
||||||
|
vo=gpu
|
||||||
|
hwdec-codecs=all
|
||||||
|
script-opts=iptv=1
|
8
.config/mpv/mpv.conf_vlk
Normal file
8
.config/mpv/mpv.conf_vlk
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
vo=gpu-next
|
||||||
|
gpu-api=vulkan
|
||||||
|
hwdec=vulkan,auto-safe
|
||||||
|
gpu-context=waylandvk
|
||||||
|
#target-prim=bt.2020
|
||||||
|
#target-trc=pq
|
||||||
|
target-colorspace-hint
|
||||||
|
script-opts=iptv=1
|
100
.config/mpv/notify.log
Normal file
100
.config/mpv/notify.log
Normal file
@ -0,0 +1,100 @@
|
|||||||
|
[2025-04-06 00:12:29] Mostrando notificación para: Roundabout (2024 Remaster)
|
||||||
|
[2025-04-06 00:12:29] Artista: Desconocido
|
||||||
|
[2025-04-06 00:12:29] Intentando descarga desde Last.fm...
|
||||||
|
[2025-04-06 00:12:29] Consultando Last.fm con URL: https://ws.audioscrobbler.com/2.0/?method=album.getinfo&api_key=d6cbcf9e6b4d77da1dcb91461020bc37&artist=Desconocido&album=Fragile&format=json
|
||||||
|
[2025-04-06 00:12:29] No se encontró imagen usable en Last.fm
|
||||||
|
[2025-04-06 00:12:29] Reintentando descarga con título como álbum...
|
||||||
|
[2025-04-06 00:12:29] Consultando Last.fm con URL: https://ws.audioscrobbler.com/2.0/?method=album.getinfo&api_key=d6cbcf9e6b4d77da1dcb91461020bc37&artist=Desconocido&album=Roundabout%20(2024%20Remaster)&format=json
|
||||||
|
[2025-04-06 00:12:30] No se encontró imagen usable en Last.fm
|
||||||
|
[2025-04-06 00:12:34] Parseado artista: Pink Floyd | título limpio: The Dark Side Of The Moon
|
||||||
|
[2025-04-06 00:12:34] Mostrando notificación para: The Dark Side Of The Moon
|
||||||
|
[2025-04-06 00:12:34] Artista: Pink Floyd
|
||||||
|
[2025-04-06 00:12:34] Intentando descarga desde Last.fm...
|
||||||
|
[2025-04-06 00:12:34] Consultando Last.fm con URL: https://ws.audioscrobbler.com/2.0/?method=album.getinfo&api_key=d6cbcf9e6b4d77da1dcb91461020bc37&artist=Pink%20Floyd&album=Fragile&format=json
|
||||||
|
[2025-04-06 00:12:34] No se encontró imagen usable en Last.fm
|
||||||
|
[2025-04-06 00:12:34] Reintentando descarga con título como álbum...
|
||||||
|
[2025-04-06 00:12:34] Consultando Last.fm con URL: https://ws.audioscrobbler.com/2.0/?method=album.getinfo&api_key=d6cbcf9e6b4d77da1dcb91461020bc37&artist=Pink%20Floyd&album=The%20Dark%20Side%20Of%20The%20Moon&format=json
|
||||||
|
[2025-04-06 00:12:35] Usando imagen tamaño 'extralarge': https://lastfm.freetls.fastly.net/i/u/300x300/d4bdd038cacbec705e269edb0fd38419.png
|
||||||
|
[2025-04-06 00:12:35] Descarga exitosa de portada
|
||||||
|
[2025-04-06 00:12:48] Parseado artista: King Crimson | título limpio: 21st Century Schizoid Man
|
||||||
|
[2025-04-06 00:12:48] Mostrando notificación para: 21st Century Schizoid Man
|
||||||
|
[2025-04-06 00:12:48] Artista: King Crimson
|
||||||
|
[2025-04-06 00:12:48] Intentando descarga desde Last.fm...
|
||||||
|
[2025-04-06 00:12:48] Consultando Last.fm con URL: https://ws.audioscrobbler.com/2.0/?method=album.getinfo&api_key=d6cbcf9e6b4d77da1dcb91461020bc37&artist=King%20Crimson&album=Fragile&format=json
|
||||||
|
[2025-04-06 00:12:49] No se encontró imagen usable en Last.fm
|
||||||
|
[2025-04-06 00:12:49] Reintentando descarga con título como álbum...
|
||||||
|
[2025-04-06 00:12:49] Consultando Last.fm con URL: https://ws.audioscrobbler.com/2.0/?method=album.getinfo&api_key=d6cbcf9e6b4d77da1dcb91461020bc37&artist=King%20Crimson&album=21st%20Century%20Schizoid%20Man&format=json
|
||||||
|
[2025-04-06 00:12:49] No se encontró imagen usable en Last.fm
|
||||||
|
[2025-04-06 00:15:32] No se pudo dividir el título: Reproduciendo
|
||||||
|
[2025-04-06 00:15:32] Mostrando notificación para: Reproduciendo
|
||||||
|
[2025-04-06 00:15:32] Artista: Desconocido
|
||||||
|
[2025-04-06 00:15:32] Intentando extraer carátula embebida de:
|
||||||
|
[2025-04-06 00:15:32] No se encontró carátula embebida con ningún método
|
||||||
|
[2025-04-06 00:15:32] Intentando descarga desde Last.fm...
|
||||||
|
[2025-04-06 00:15:32] Consultando Last.fm con URL: https://ws.audioscrobbler.com/2.0/?method=album.getinfo&api_key=d6cbcf9e6b4d77da1dcb91461020bc37&artist=Desconocido&album=&format=json
|
||||||
|
[2025-04-06 00:15:32] Error al consultar Last.fm (status -2)
|
||||||
|
[2025-04-06 00:15:32] Reintentando descarga con título como álbum...
|
||||||
|
[2025-04-06 00:15:32] Consultando Last.fm con URL: https://ws.audioscrobbler.com/2.0/?method=album.getinfo&api_key=d6cbcf9e6b4d77da1dcb91461020bc37&artist=Desconocido&album=Reproduciendo&format=json
|
||||||
|
[2025-04-06 00:15:32] Error al consultar Last.fm (status -2)
|
||||||
|
[2025-04-10 19:45:01] No se pudo dividir el título: stream.m3u
|
||||||
|
[2025-04-10 19:45:01] Mostrando notificación para: stream.m3u
|
||||||
|
[2025-04-10 19:45:01] Artista: Desconocido
|
||||||
|
[2025-04-10 19:45:01] Intentando extraer carátula embebida de: /home/teraflops/Descargas/stream.m3u
|
||||||
|
[2025-04-10 19:45:01] No se encontró carátula embebida con ningún método
|
||||||
|
[2025-04-10 19:45:01] Intentando descarga desde Last.fm...
|
||||||
|
[2025-04-10 19:45:01] Consultando Last.fm con URL: https://ws.audioscrobbler.com/2.0/?method=album.getinfo&api_key=d6cbcf9e6b4d77da1dcb91461020bc37&artist=Desconocido&album=&format=json
|
||||||
|
[2025-04-10 19:45:01] No se encontró imagen usable en Last.fm
|
||||||
|
[2025-04-10 19:45:01] Reintentando descarga con título como álbum...
|
||||||
|
[2025-04-10 19:45:01] Consultando Last.fm con URL: https://ws.audioscrobbler.com/2.0/?method=album.getinfo&api_key=d6cbcf9e6b4d77da1dcb91461020bc37&artist=Desconocido&album=stream.m3u&format=json
|
||||||
|
[2025-04-10 19:45:02] No se encontró imagen usable en Last.fm
|
||||||
|
[2025-04-10 19:45:02] Parseado artista: Guns N' Roses | título limpio: Sweet Child O' Mine
|
||||||
|
[2025-04-10 19:45:02] Mostrando notificación para: Sweet Child O' Mine
|
||||||
|
[2025-04-10 19:45:02] Artista: Guns N' Roses
|
||||||
|
[2025-04-10 19:45:02] Intentando descarga desde Last.fm...
|
||||||
|
[2025-04-10 19:45:02] Consultando Last.fm con URL: https://ws.audioscrobbler.com/2.0/?method=album.getinfo&api_key=d6cbcf9e6b4d77da1dcb91461020bc37&artist=Guns%20N'%20Roses&album=&format=json
|
||||||
|
[2025-04-10 19:45:02] No se encontró imagen usable en Last.fm
|
||||||
|
[2025-04-10 19:45:02] Reintentando descarga con título como álbum...
|
||||||
|
[2025-04-10 19:45:02] Consultando Last.fm con URL: https://ws.audioscrobbler.com/2.0/?method=album.getinfo&api_key=d6cbcf9e6b4d77da1dcb91461020bc37&artist=Guns%20N'%20Roses&album=Sweet%20Child%20O'%20Mine&format=json
|
||||||
|
[2025-04-10 19:45:02] Usando imagen tamaño 'extralarge': https://lastfm.freetls.fastly.net/i/u/300x300/0c3ad1355608d323d7fa9c73ab24d0a4.jpg
|
||||||
|
[2025-04-10 19:45:04] Descarga exitosa de portada
|
||||||
|
[2025-04-10 19:45:04] Parseado artista: Guns N' Roses | título limpio: Sweet Child O' Mine
|
||||||
|
[2025-04-10 19:45:04] Mostrando notificación para: Sweet Child O' Mine
|
||||||
|
[2025-04-10 19:45:04] Artista: Guns N' Roses
|
||||||
|
[2025-04-10 19:45:04] Intentando descarga desde Last.fm...
|
||||||
|
[2025-04-10 19:45:04] Consultando Last.fm con URL: https://ws.audioscrobbler.com/2.0/?method=album.getinfo&api_key=d6cbcf9e6b4d77da1dcb91461020bc37&artist=Guns%20N'%20Roses&album=&format=json
|
||||||
|
[2025-04-10 19:45:04] No se encontró imagen usable en Last.fm
|
||||||
|
[2025-04-10 19:45:04] Reintentando descarga con título como álbum...
|
||||||
|
[2025-04-10 19:45:04] Consultando Last.fm con URL: https://ws.audioscrobbler.com/2.0/?method=album.getinfo&api_key=d6cbcf9e6b4d77da1dcb91461020bc37&artist=Guns%20N'%20Roses&album=Sweet%20Child%20O'%20Mine&format=json
|
||||||
|
[2025-04-10 19:45:04] Usando imagen tamaño 'extralarge': https://lastfm.freetls.fastly.net/i/u/300x300/0c3ad1355608d323d7fa9c73ab24d0a4.jpg
|
||||||
|
[2025-04-10 19:45:05] Descarga exitosa de portada
|
||||||
|
[2025-04-10 19:45:15] Parseado artista: DEF LEPPARD | título limpio: Pour Some Sugar On Me
|
||||||
|
[2025-04-10 19:45:15] Mostrando notificación para: Pour Some Sugar On Me
|
||||||
|
[2025-04-10 19:45:15] Artista: DEF LEPPARD
|
||||||
|
[2025-04-10 19:45:15] Intentando descarga desde Last.fm...
|
||||||
|
[2025-04-10 19:45:15] Consultando Last.fm con URL: https://ws.audioscrobbler.com/2.0/?method=album.getinfo&api_key=d6cbcf9e6b4d77da1dcb91461020bc37&artist=DEF%20LEPPARD&album=&format=json
|
||||||
|
[2025-04-10 19:45:15] No se encontró imagen usable en Last.fm
|
||||||
|
[2025-04-10 19:45:15] Reintentando descarga con título como álbum...
|
||||||
|
[2025-04-10 19:45:15] Consultando Last.fm con URL: https://ws.audioscrobbler.com/2.0/?method=album.getinfo&api_key=d6cbcf9e6b4d77da1dcb91461020bc37&artist=DEF%20LEPPARD&album=Pour%20Some%20Sugar%20On%20Me&format=json
|
||||||
|
[2025-04-10 19:45:15] Usando imagen tamaño 'extralarge': https://lastfm.freetls.fastly.net/i/u/300x300/c64cdf2cb51786c60f62726eb97425f9.jpg
|
||||||
|
[2025-04-10 19:45:16] Descarga exitosa de portada
|
||||||
|
[2025-04-10 19:45:24] Parseado artista: Van Halen | título limpio: Jump
|
||||||
|
[2025-04-10 19:45:24] Mostrando notificación para: Jump
|
||||||
|
[2025-04-10 19:45:24] Artista: Van Halen
|
||||||
|
[2025-04-10 19:45:24] Intentando descarga desde Last.fm...
|
||||||
|
[2025-04-10 19:45:24] Consultando Last.fm con URL: https://ws.audioscrobbler.com/2.0/?method=album.getinfo&api_key=d6cbcf9e6b4d77da1dcb91461020bc37&artist=Van%20Halen&album=&format=json
|
||||||
|
[2025-04-10 19:45:25] No se encontró imagen usable en Last.fm
|
||||||
|
[2025-04-10 19:45:25] Reintentando descarga con título como álbum...
|
||||||
|
[2025-04-10 19:45:25] Consultando Last.fm con URL: https://ws.audioscrobbler.com/2.0/?method=album.getinfo&api_key=d6cbcf9e6b4d77da1dcb91461020bc37&artist=Van%20Halen&album=Jump&format=json
|
||||||
|
[2025-04-10 19:45:25] Usando imagen tamaño 'extralarge': https://lastfm.freetls.fastly.net/i/u/300x300/ebbf89e099934ca1971f4103939a26ec.jpg
|
||||||
|
[2025-04-10 19:45:25] Descarga exitosa de portada
|
||||||
|
[2025-04-10 19:45:27] No se pudo dividir el título: Reproduciendo
|
||||||
|
[2025-04-10 19:45:27] Mostrando notificación para: Reproduciendo
|
||||||
|
[2025-04-10 19:45:27] Artista: Desconocido
|
||||||
|
[2025-04-10 19:45:27] Intentando extraer carátula embebida de:
|
||||||
|
[2025-04-10 19:45:27] No se encontró carátula embebida con ningún método
|
||||||
|
[2025-04-10 19:45:27] Intentando descarga desde Last.fm...
|
||||||
|
[2025-04-10 19:45:27] Consultando Last.fm con URL: https://ws.audioscrobbler.com/2.0/?method=album.getinfo&api_key=d6cbcf9e6b4d77da1dcb91461020bc37&artist=Desconocido&album=&format=json
|
||||||
|
[2025-04-10 19:45:27] Error al consultar Last.fm (status -2)
|
||||||
|
[2025-04-10 19:45:27] Reintentando descarga con título como álbum...
|
||||||
|
[2025-04-10 19:45:27] Consultando Last.fm con URL: https://ws.audioscrobbler.com/2.0/?method=album.getinfo&api_key=d6cbcf9e6b4d77da1dcb91461020bc37&artist=Desconocido&album=Reproduciendo&format=json
|
||||||
|
[2025-04-10 19:45:27] Error al consultar Last.fm (status -2)
|
169
.config/mpv/playlistmanager.conf
Normal file
169
.config/mpv/playlistmanager.conf
Normal file
@ -0,0 +1,169 @@
|
|||||||
|
#### ------- Mpv-Playlistmanager configuration ------- ####
|
||||||
|
|
||||||
|
#navigation keybindings force override only while playlist is visible
|
||||||
|
#if "no" then you can display the playlist by any of the navigation keys
|
||||||
|
dynamic_binds=yes
|
||||||
|
|
||||||
|
# To bind multiple keys separate them by a space
|
||||||
|
|
||||||
|
# main key to show playlist
|
||||||
|
key_showplaylist=SHIFT+ENTER
|
||||||
|
|
||||||
|
# display playlist while key is held down
|
||||||
|
key_peek_at_playlist=
|
||||||
|
|
||||||
|
# dynamic keys
|
||||||
|
key_moveup=UP
|
||||||
|
key_movedown=DOWN
|
||||||
|
key_movepageup=PGUP
|
||||||
|
key_movepagedown=PGDWN
|
||||||
|
key_movebegin=HOME
|
||||||
|
key_moveend=END
|
||||||
|
key_selectfile=RIGHT LEFT
|
||||||
|
key_unselectfile=
|
||||||
|
key_playfile=ENTER
|
||||||
|
key_removefile=BS
|
||||||
|
key_closeplaylist=ESC SHIFT+ENTER
|
||||||
|
|
||||||
|
# extra functionality keys
|
||||||
|
key_sortplaylist=
|
||||||
|
key_shuffleplaylist=
|
||||||
|
key_reverseplaylist=
|
||||||
|
key_loadfiles=
|
||||||
|
key_saveplaylist=
|
||||||
|
|
||||||
|
#json format for replacing, check .lua for explanation
|
||||||
|
#example json=[{"ext":{"all":true},"rules":[{"_":" "}]},{"ext":{"mp4":true,"mkv":true},"rules":[{"^(.+)%..+$":"%1"},{"%s*[%[%(].-[%]%)]%s*":""},{"(%w)%.(%w)":"%1 %2"}]},{"protocol":{"http":true,"https":true},"rules":[{"^%a+://w*%.?":""}]}]
|
||||||
|
#empty for no replace
|
||||||
|
filename_replace=[{"protocol":{"all":true},"rules":[{"%%(%x%x)":"hex_to_char"}]}]
|
||||||
|
|
||||||
|
#filetypes to search from directory
|
||||||
|
loadfiles_filetypes=["jpg","jpeg","png","tif","tiff","gif","webp","svg","bmp","mp3","wav","ogm","flac","m4a","wma","ogg","opus","mkv","avi","mp4","ogv","webm","rmvb","flv","wmv","mpeg","mpg","m4v","3gp"]
|
||||||
|
|
||||||
|
#loadfiles at startup if 1 or more items in playlist
|
||||||
|
loadfiles_on_start=no
|
||||||
|
#loadfiles from working directory on idle startup
|
||||||
|
loadfiles_on_idle_start=no
|
||||||
|
#always put loaded files after currently playing file
|
||||||
|
loadfiles_always_append=no
|
||||||
|
|
||||||
|
#sort playlist when any files are added to playlist after initial load
|
||||||
|
sortplaylist_on_file_add=no
|
||||||
|
|
||||||
|
#default sorting method, must be one of: "name-asc", "name-desc", "date-asc", "date-desc", "size-asc", "size-desc".
|
||||||
|
default_sort=name-asc
|
||||||
|
|
||||||
|
#linux | windows | auto
|
||||||
|
system=auto
|
||||||
|
|
||||||
|
#Use ~ for home directory. Leave as empty to use mpv/playlists
|
||||||
|
playlist_savepath=
|
||||||
|
|
||||||
|
#constant filename to save playlist as. Note that it will override existing playlist. Leave empty for generated name.
|
||||||
|
playlist_save_filename=
|
||||||
|
|
||||||
|
#save playlist automatically after current file was unloaded
|
||||||
|
save_playlist_on_file_end=no
|
||||||
|
|
||||||
|
#show file title every time a new file is loaded
|
||||||
|
show_title_on_file_load=no
|
||||||
|
#show playlist every time a new file is loaded
|
||||||
|
show_playlist_on_file_load=no
|
||||||
|
#close playlist when selecting file to play
|
||||||
|
close_playlist_on_playfile=no
|
||||||
|
|
||||||
|
#sync cursor when file is loaded from outside reasons(file-ending, playlist-next shortcut etc.)
|
||||||
|
sync_cursor_on_load=yes
|
||||||
|
|
||||||
|
#allow the playlist cursor to loop from end to start and vice versa
|
||||||
|
loop_cursor=yes
|
||||||
|
|
||||||
|
#allow playlistmanager to write watch later config when navigating between files
|
||||||
|
allow_write_watch_later_config=yes
|
||||||
|
|
||||||
|
#reset cursor navigation when closing or opening playlist
|
||||||
|
reset_cursor_on_close=yes
|
||||||
|
reset_cursor_on_open=yes
|
||||||
|
|
||||||
|
#prefer to display titles for following files: "all", "url", "none". Sorting still uses filename
|
||||||
|
prefer_titles=url
|
||||||
|
|
||||||
|
#youtube-dl executable for title resolving if enabled, probably "youtube-dl" or "yt-dlp", can be absolute path
|
||||||
|
youtube_dl_executable=yt-dlp
|
||||||
|
|
||||||
|
#call youtube-dl to resolve the titles of urls in the playlist
|
||||||
|
#if yes, prefer_titles must be set to "url" or "all" for this to work
|
||||||
|
resolve_url_titles=no
|
||||||
|
|
||||||
|
#call ffprobe to resolve the titles of local files in the playlist (if they exist in the metadata)
|
||||||
|
#if yes, prefer_titles must be set to "all" for this to work
|
||||||
|
resolve_local_titles=no
|
||||||
|
|
||||||
|
#timeout in seconds for url title resolving
|
||||||
|
resolve_title_timeout=15
|
||||||
|
|
||||||
|
#how many url titles can be resolved at a time. Higher number might lead to stutters.
|
||||||
|
concurrent_title_resolve_limit=10
|
||||||
|
|
||||||
|
#osd timeout on inactivity in seconds, use 0 for no timeout
|
||||||
|
playlist_display_timeout=0
|
||||||
|
|
||||||
|
#when peeking at playlist, show playlist at the very least for display timeout
|
||||||
|
peek_respect_display_timeout=no
|
||||||
|
|
||||||
|
#the maximum amount of lines playlist will render. -1 will automatically calculate lines.
|
||||||
|
showamount=-1
|
||||||
|
|
||||||
|
#playlist ass style overrides
|
||||||
|
#example {\q2\an7\fnUbuntu\fs10\b0\bord1} equals: line-wrap=no, align=top left, font=Ubuntu, size=10, bold=no, border=1
|
||||||
|
#read http://docs.aegisub.org/3.2/ASS_Tags/ for reference of tags
|
||||||
|
#undeclared tags will use default osd settings
|
||||||
|
#these styles will be used for the whole playlist
|
||||||
|
#\q2 style is recommended since filename wrapping may lead to unexpected rendering
|
||||||
|
#\an7 style is recommended to align to top left, otherwise osd-align-x/y is respected
|
||||||
|
style_ass_tags={\q2\an7}
|
||||||
|
#paddings for left right and top bottom
|
||||||
|
text_padding_x=30
|
||||||
|
text_padding_y=60
|
||||||
|
|
||||||
|
#screen dim when menu is open 0.0 - 1.0 (0 is no dim, 1 is black)
|
||||||
|
curtain_opacity=0.0
|
||||||
|
|
||||||
|
#set title of window with stripped name
|
||||||
|
set_title_stripped=no
|
||||||
|
title_prefix=
|
||||||
|
title_suffix= - mpv
|
||||||
|
|
||||||
|
#slice long filenames, and how many chars to show
|
||||||
|
slice_longfilenames=no
|
||||||
|
slice_longfilenames_amount=70
|
||||||
|
|
||||||
|
#Playing header. One newline will be added after the string.
|
||||||
|
#%mediatitle or %filename = title or name of playing file
|
||||||
|
#%pos = position of playing file
|
||||||
|
#%cursor = position of navigation
|
||||||
|
#%plen = playlist lenght
|
||||||
|
#%N = newline
|
||||||
|
playlist_header=[%cursor/%plen]
|
||||||
|
|
||||||
|
#Playlist file templates
|
||||||
|
#%pos = position of file with leading zeros
|
||||||
|
#%name = title or name of file
|
||||||
|
#%N = newline
|
||||||
|
#you can also use the ass tags mentioned above. For example:
|
||||||
|
# selected_file={\c&HFF00FF&}➔ %name | to add a color for selected file. However, if you
|
||||||
|
# use ass tags you need to reset them for every line (see https://github.com/jonniek/mpv-playlistmanager/issues/20)
|
||||||
|
normal_file=○ %name
|
||||||
|
hovered_file=● %name
|
||||||
|
selected_file=➔ %name
|
||||||
|
playing_file=▷ %name
|
||||||
|
playing_hovered_file=▶ %name
|
||||||
|
playing_selected_file=➤ %name
|
||||||
|
|
||||||
|
#what to show when playlist is truncated
|
||||||
|
playlist_sliced_prefix=...
|
||||||
|
playlist_sliced_suffix=...
|
||||||
|
|
||||||
|
#output visual feedback to OSD when saving, shuffling, reversing playlists
|
||||||
|
display_osd_feedback=yes
|
||||||
|
|
BIN
.config/mpv/playlistmanager.png
Normal file
BIN
.config/mpv/playlistmanager.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 410 KiB |
503
.config/mpv/scripts/iptv.lua
Normal file
503
.config/mpv/scripts/iptv.lua
Normal file
@ -0,0 +1,503 @@
|
|||||||
|
--redefine keybindings here if needed; multiple bindings are possible
|
||||||
|
keybinds = {
|
||||||
|
activate = {'\\', 'MOUSE_BTN2'},
|
||||||
|
plsup = {'UP', 'MOUSE_BTN3'},
|
||||||
|
plsdown = {'DOWN', 'MOUSE_BTN4'},
|
||||||
|
plsenter = {'ENTER', 'MOUSE_BTN0'}
|
||||||
|
}
|
||||||
|
--hide playlist after specified number of seconds
|
||||||
|
osd_time=10
|
||||||
|
--show only specified number of playlist entries
|
||||||
|
window=7
|
||||||
|
--fade video when showing playlist
|
||||||
|
fade=false
|
||||||
|
--if fade=true; -100 — black, 0 — normal
|
||||||
|
plsbrightness=-70
|
||||||
|
--favorites get promotion to the top of the pls
|
||||||
|
favorites = {}
|
||||||
|
-- END OF CONFIGURABLE VARIABLES
|
||||||
|
|
||||||
|
local timer
|
||||||
|
--local plscount
|
||||||
|
local pattern=""
|
||||||
|
local is_active
|
||||||
|
local is_playlist_loaded
|
||||||
|
|
||||||
|
-- UTF-8 lower/upper conversion
|
||||||
|
local utf8_lc_uc = {
|
||||||
|
["a"] = "A",
|
||||||
|
["b"] = "B",
|
||||||
|
["c"] = "C",
|
||||||
|
["d"] = "D",
|
||||||
|
["e"] = "E",
|
||||||
|
["f"] = "F",
|
||||||
|
["g"] = "G",
|
||||||
|
["h"] = "H",
|
||||||
|
["i"] = "I",
|
||||||
|
["j"] = "J",
|
||||||
|
["k"] = "K",
|
||||||
|
["l"] = "L",
|
||||||
|
["m"] = "M",
|
||||||
|
["n"] = "N",
|
||||||
|
["o"] = "O",
|
||||||
|
["p"] = "P",
|
||||||
|
["q"] = "Q",
|
||||||
|
["r"] = "R",
|
||||||
|
["s"] = "S",
|
||||||
|
["t"] = "T",
|
||||||
|
["u"] = "U",
|
||||||
|
["v"] = "V",
|
||||||
|
["w"] = "W",
|
||||||
|
["x"] = "X",
|
||||||
|
["y"] = "Y",
|
||||||
|
["z"] = "Z",
|
||||||
|
["а"] = "А",
|
||||||
|
["б"] = "Б",
|
||||||
|
["в"] = "В",
|
||||||
|
["г"] = "Г",
|
||||||
|
["д"] = "Д",
|
||||||
|
["е"] = "Е",
|
||||||
|
["ж"] = "Ж",
|
||||||
|
["з"] = "З",
|
||||||
|
["и"] = "И",
|
||||||
|
["й"] = "Й",
|
||||||
|
["к"] = "К",
|
||||||
|
["л"] = "Л",
|
||||||
|
["м"] = "М",
|
||||||
|
["н"] = "Н",
|
||||||
|
["о"] = "О",
|
||||||
|
["п"] = "П",
|
||||||
|
["р"] = "Р",
|
||||||
|
["с"] = "С",
|
||||||
|
["т"] = "Т",
|
||||||
|
["у"] = "У",
|
||||||
|
["ф"] = "Ф",
|
||||||
|
["х"] = "Х",
|
||||||
|
["ц"] = "Ц",
|
||||||
|
["ч"] = "Ч",
|
||||||
|
["ш"] = "Ш",
|
||||||
|
["щ"] = "Щ",
|
||||||
|
["ъ"] = "Ъ",
|
||||||
|
["ы"] = "Ы",
|
||||||
|
["ь"] = "Ь",
|
||||||
|
["э"] = "Э",
|
||||||
|
["ю"] = "Ю",
|
||||||
|
["я"] = "Я",
|
||||||
|
["ё"] = "Ё"
|
||||||
|
}
|
||||||
|
|
||||||
|
local utf8_uc_lc = {
|
||||||
|
["A"] = "a",
|
||||||
|
["B"] = "b",
|
||||||
|
["C"] = "c",
|
||||||
|
["D"] = "d",
|
||||||
|
["E"] = "e",
|
||||||
|
["F"] = "f",
|
||||||
|
["G"] = "g",
|
||||||
|
["H"] = "h",
|
||||||
|
["I"] = "i",
|
||||||
|
["J"] = "j",
|
||||||
|
["K"] = "k",
|
||||||
|
["L"] = "l",
|
||||||
|
["M"] = "m",
|
||||||
|
["N"] = "n",
|
||||||
|
["O"] = "o",
|
||||||
|
["P"] = "p",
|
||||||
|
["Q"] = "q",
|
||||||
|
["R"] = "r",
|
||||||
|
["S"] = "s",
|
||||||
|
["T"] = "t",
|
||||||
|
["U"] = "u",
|
||||||
|
["V"] = "v",
|
||||||
|
["W"] = "w",
|
||||||
|
["X"] = "x",
|
||||||
|
["Y"] = "y",
|
||||||
|
["Z"] = "z",
|
||||||
|
["А"] = "а",
|
||||||
|
["Б"] = "б",
|
||||||
|
["В"] = "в",
|
||||||
|
["Г"] = "г",
|
||||||
|
["Д"] = "д",
|
||||||
|
["Е"] = "е",
|
||||||
|
["Ж"] = "ж",
|
||||||
|
["З"] = "з",
|
||||||
|
["И"] = "и",
|
||||||
|
["Й"] = "й",
|
||||||
|
["К"] = "к",
|
||||||
|
["Л"] = "л",
|
||||||
|
["М"] = "м",
|
||||||
|
["Н"] = "н",
|
||||||
|
["О"] = "о",
|
||||||
|
["П"] = "п",
|
||||||
|
["Р"] = "р",
|
||||||
|
["С"] = "с",
|
||||||
|
["Т"] = "т",
|
||||||
|
["У"] = "у",
|
||||||
|
["Ф"] = "ф",
|
||||||
|
["Х"] = "х",
|
||||||
|
["Ц"] = "ц",
|
||||||
|
["Ч"] = "ч",
|
||||||
|
["Ш"] = "ш",
|
||||||
|
["Щ"] = "щ",
|
||||||
|
["Ъ"] = "ъ",
|
||||||
|
["Ы"] = "ы",
|
||||||
|
["Ь"] = "ь",
|
||||||
|
["Э"] = "э",
|
||||||
|
["Ю"] = "ю",
|
||||||
|
["Я"] = "я",
|
||||||
|
["Ё"] = "ё"
|
||||||
|
}
|
||||||
|
|
||||||
|
--utf8 char pattern
|
||||||
|
local utf8_char="[\1-\127\192-\223][\128-\191]*"
|
||||||
|
|
||||||
|
local cyr_chars={'а','б','в','г','д','е','ё','ж','з','и','й','к','л','м','н','о','п','р','с','т','у','ф','х','ц','ч','ш','щ','ъ','ы','ь','э','ю','я'}
|
||||||
|
|
||||||
|
-- символы, которые возможно вводить для поиска
|
||||||
|
local chars={}
|
||||||
|
for i=string.byte('a'),string.byte('z') do
|
||||||
|
table.insert(chars,i)
|
||||||
|
end
|
||||||
|
for i=string.byte('A'),string.byte('Z') do
|
||||||
|
table.insert(chars,i)
|
||||||
|
end
|
||||||
|
for i=string.byte('0'),string.byte('9') do
|
||||||
|
table.insert(chars,i)
|
||||||
|
end
|
||||||
|
for _,v in ipairs({',','^','$','(',')','%','.','[',']','*','+','-','?','`',"'",";"}) do
|
||||||
|
table.insert(chars,string.byte(v))
|
||||||
|
end
|
||||||
|
|
||||||
|
local keybinder = {
|
||||||
|
remove = function(action)
|
||||||
|
for i,_ in ipairs(keybinds[action]) do
|
||||||
|
mp.remove_key_binding(action..tostring(i))
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
add = function(action, func, repeatable)
|
||||||
|
for i,key in ipairs(keybinds[action]) do
|
||||||
|
assert(type(func)=="function", "not a function")
|
||||||
|
if repeatable then
|
||||||
|
mp.add_forced_key_binding(key, action..tostring(i), func, "repeatable")
|
||||||
|
else
|
||||||
|
mp.add_forced_key_binding(key, action..tostring(i), func)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
}
|
||||||
|
|
||||||
|
local fader = {
|
||||||
|
saved_brtns,
|
||||||
|
on = function(self)
|
||||||
|
if fade and not self.saved_brtns then
|
||||||
|
self.saved_brtns = mp.get_property("brightness")
|
||||||
|
mp.set_property("brightness", plsbrightness)
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
off = function(self)
|
||||||
|
if fade and self.saved_brtns then
|
||||||
|
mp.set_property("brightness", self.saved_brtns)
|
||||||
|
self.saved_brtns=nil
|
||||||
|
end
|
||||||
|
end
|
||||||
|
}
|
||||||
|
|
||||||
|
local playlister = {
|
||||||
|
-- pls — список элементов плейлиста
|
||||||
|
pls,
|
||||||
|
-- plsfiltered — список индексов выбранных фильтром элементов плейлиста
|
||||||
|
plsfiltered,
|
||||||
|
plspos,
|
||||||
|
wndstart,
|
||||||
|
wndend,
|
||||||
|
cursor,
|
||||||
|
|
||||||
|
init = function(self)
|
||||||
|
if not self.pls then
|
||||||
|
self.pls = mp.get_property_native("playlist")
|
||||||
|
end
|
||||||
|
mp.commandv("stop")
|
||||||
|
--need to mark first entry non-current (mpv bug?)
|
||||||
|
if self.pls[1] then
|
||||||
|
self.pls[1].current = false
|
||||||
|
end
|
||||||
|
if favorites and #favorites>0 then
|
||||||
|
self:sortfavs()
|
||||||
|
end
|
||||||
|
pattern = ""
|
||||||
|
self.plsfiltered = tablekeys(self.pls)
|
||||||
|
end,
|
||||||
|
|
||||||
|
show = function(self)
|
||||||
|
local i
|
||||||
|
local newpos
|
||||||
|
local msg
|
||||||
|
--media-title
|
||||||
|
--playlist t[2].title
|
||||||
|
|
||||||
|
if not self.plsfiltered then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
if not self.wndstart or not self.cursor then
|
||||||
|
self.wndstart=1
|
||||||
|
self.cursor=0
|
||||||
|
end
|
||||||
|
|
||||||
|
msg=""
|
||||||
|
i = self.wndstart
|
||||||
|
local prefix
|
||||||
|
while self.plsfiltered[i] and i<=self.wndstart+window-1 do
|
||||||
|
if self.pls[self.plsfiltered[i]].current then
|
||||||
|
prefix="*"
|
||||||
|
elseif i==self.wndstart+self.cursor then
|
||||||
|
prefix=">"
|
||||||
|
else
|
||||||
|
prefix=" "
|
||||||
|
end
|
||||||
|
msg = msg..prefix..(self.pls[self.plsfiltered[i]].title or "").."\n"
|
||||||
|
i=i+1
|
||||||
|
end
|
||||||
|
if self.wndstart>1 then
|
||||||
|
msg = "...\n"..msg
|
||||||
|
else
|
||||||
|
msg = " \n"..msg
|
||||||
|
end
|
||||||
|
if self.wndstart+window-1<#self.plsfiltered then
|
||||||
|
msg = msg.."..."
|
||||||
|
end
|
||||||
|
msg="/"..pattern.."\n"..msg
|
||||||
|
mp.osd_message(msg, osd_time)
|
||||||
|
end,
|
||||||
|
|
||||||
|
sortfavs = function(self)
|
||||||
|
--favorites bubbles to the top
|
||||||
|
local favs={}
|
||||||
|
local nonfavs={}
|
||||||
|
for _,v in ipairs(self.pls) do
|
||||||
|
if in_array(favorites,v.title) then
|
||||||
|
favs[#favs+1] = v
|
||||||
|
else
|
||||||
|
nonfavs[#nonfavs+1] = v
|
||||||
|
end
|
||||||
|
end
|
||||||
|
for i=1,#nonfavs do
|
||||||
|
favs[#favs+1] = nonfavs[i]
|
||||||
|
end
|
||||||
|
self.pls = favs
|
||||||
|
end,
|
||||||
|
|
||||||
|
filter = function(self)
|
||||||
|
self.plsfiltered={}
|
||||||
|
for i,v in ipairs(self.pls) do
|
||||||
|
if string.match(mylower(v.title),'.*'..prepat(pattern)..'.*') then
|
||||||
|
table.insert(self.plsfiltered,i)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
self.wndstart=1
|
||||||
|
self.cursor=0
|
||||||
|
end,
|
||||||
|
|
||||||
|
down = function(self)
|
||||||
|
if self.cursor >= #self.plsfiltered-1 then return end
|
||||||
|
if self.cursor<window-1 then
|
||||||
|
self.cursor=self.cursor+1
|
||||||
|
else
|
||||||
|
if self.wndstart<#self.plsfiltered-window+1 then
|
||||||
|
self.wndstart=self.wndstart+1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
self.show(self)
|
||||||
|
end,
|
||||||
|
up = function(self)
|
||||||
|
if self.cursor>0 then
|
||||||
|
self.cursor=self.cursor-1
|
||||||
|
self.show(self)
|
||||||
|
else
|
||||||
|
if self.wndstart>1 then
|
||||||
|
self.wndstart=self.wndstart-1
|
||||||
|
self.show(self)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
|
||||||
|
play = function(self)
|
||||||
|
mp.commandv("loadfile",self.pls[self.plsfiltered[self.wndstart+self.cursor]].filename)
|
||||||
|
if self.plspos then
|
||||||
|
self.pls[self.plspos].current=false
|
||||||
|
end
|
||||||
|
self.plspos=self.plsfiltered[self.wndstart+self.cursor]
|
||||||
|
self.pls[self.plspos].current=true
|
||||||
|
end
|
||||||
|
}
|
||||||
|
|
||||||
|
function add_bindings()
|
||||||
|
keybinder.add("plsup", up, true)
|
||||||
|
keybinder.add("plsdown", down, true)
|
||||||
|
for i,v in ipairs(chars) do
|
||||||
|
c=string.char(v)
|
||||||
|
mp.add_forced_key_binding(c, 'search'..v, typing(c),"repeatable")
|
||||||
|
end
|
||||||
|
mp.add_forced_key_binding('SPACE', 'search32', typing(' '),"repeatable")
|
||||||
|
|
||||||
|
--[[ mp.add_key_binding('а', 'search1000', typing('а'),"repeatable")
|
||||||
|
mp.add_key_binding('с', 'search1001', typing('с'),"repeatable")]]
|
||||||
|
|
||||||
|
mp.add_forced_key_binding('BS', 'searchbs', backspace,"repeatable")
|
||||||
|
keybinder.add("plsenter", play)
|
||||||
|
for i,v in ipairs(cyr_chars) do
|
||||||
|
mp.add_forced_key_binding(v, 'search'..i+1000, typing(v),"repeatable")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function remove_bindings()
|
||||||
|
keybinder.remove('plsup')
|
||||||
|
keybinder.remove('plsdown')
|
||||||
|
keybinder.remove('plsenter')
|
||||||
|
for i,v in ipairs(chars) do
|
||||||
|
c=string.char(v)
|
||||||
|
mp.remove_key_binding('search'..v)
|
||||||
|
end
|
||||||
|
mp.remove_key_binding('search32')
|
||||||
|
mp.remove_key_binding('searchbs')
|
||||||
|
for i,v in ipairs(cyr_chars) do
|
||||||
|
mp.remove_key_binding('search'..i+1000)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function activate()
|
||||||
|
if is_active then
|
||||||
|
shutdown()
|
||||||
|
return
|
||||||
|
else
|
||||||
|
is_active=true
|
||||||
|
fader:on()
|
||||||
|
playlister:show()
|
||||||
|
add_bindings()
|
||||||
|
if not timer then
|
||||||
|
timer=mp.add_periodic_timer(osd_time, shutdown)
|
||||||
|
timer.oneshot=true
|
||||||
|
else
|
||||||
|
resumetimer()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function tablekeys(t)
|
||||||
|
local result={}
|
||||||
|
for i,v in ipairs(t) do
|
||||||
|
table.insert(result,i)
|
||||||
|
end
|
||||||
|
return result
|
||||||
|
end
|
||||||
|
|
||||||
|
function in_array(array, value)
|
||||||
|
for _,v in ipairs(array) do
|
||||||
|
if v==value then
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
|
function mylower(s)
|
||||||
|
local res,n = string.gsub(s,utf8_char,function (c)
|
||||||
|
return utf8_uc_lc[c]
|
||||||
|
end)
|
||||||
|
return res
|
||||||
|
end
|
||||||
|
|
||||||
|
function myupper(s)
|
||||||
|
local res,n = string.gsub(s,utf8_char,function (c)
|
||||||
|
return utf8_lc_uc[c]
|
||||||
|
end)
|
||||||
|
return res
|
||||||
|
end
|
||||||
|
|
||||||
|
function prepat(s)
|
||||||
|
--prepare nocase and magic chars
|
||||||
|
s = string.gsub(s, "[%^%$%(%)%%%.%[%]%*%+%-%?]",function (c)
|
||||||
|
return '%'..c
|
||||||
|
end)
|
||||||
|
--[[ s = string.gsub(s, utf8_char, function (c)
|
||||||
|
return string.format("[%s%s]", utf8_uc_lc[c] or c, utf8_lc_uc[c] or c)
|
||||||
|
end)]]
|
||||||
|
return s
|
||||||
|
end
|
||||||
|
|
||||||
|
function resumetimer()
|
||||||
|
timer:kill()
|
||||||
|
timer:resume()
|
||||||
|
end
|
||||||
|
|
||||||
|
function typing(char)
|
||||||
|
return function()
|
||||||
|
local c=string.lower(char)
|
||||||
|
pattern = pattern..c
|
||||||
|
playlister:filter()
|
||||||
|
playlister:show()
|
||||||
|
resumetimer()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function backspace()
|
||||||
|
if string.len(pattern)>0 then
|
||||||
|
-- pattern = string.sub(pattern,1,-2)
|
||||||
|
-- for unicode
|
||||||
|
pattern = string.match(pattern,"(.*)"..utf8_char.."$")
|
||||||
|
playlister:filter()
|
||||||
|
playlister:show()
|
||||||
|
resumetimer()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function play()
|
||||||
|
-- mp.commandv("playlist-move", wndstart+cursor, 1)
|
||||||
|
-- mp.commandv("playlist-clear")
|
||||||
|
-- mp.commandv("playlist-next")
|
||||||
|
fader:off()
|
||||||
|
playlister:play()
|
||||||
|
playlister:show()
|
||||||
|
resumetimer()
|
||||||
|
end
|
||||||
|
|
||||||
|
function shutdown()
|
||||||
|
fader:off()
|
||||||
|
remove_bindings()
|
||||||
|
is_active=false
|
||||||
|
mp.osd_message("", 1)
|
||||||
|
end
|
||||||
|
|
||||||
|
function down()
|
||||||
|
fader:on()
|
||||||
|
playlister:down()
|
||||||
|
resumetimer()
|
||||||
|
end
|
||||||
|
|
||||||
|
function up()
|
||||||
|
fader:on()
|
||||||
|
playlister:up()
|
||||||
|
resumetimer()
|
||||||
|
end
|
||||||
|
|
||||||
|
function on_start_file()
|
||||||
|
if is_playlist_loaded then
|
||||||
|
playlister:init()
|
||||||
|
mp.unregister_event(on_start_file)
|
||||||
|
activate()
|
||||||
|
else
|
||||||
|
is_playlist_loaded = true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
--~ function on_shutdown()
|
||||||
|
--~ fader:off()
|
||||||
|
--~ end
|
||||||
|
|
||||||
|
if mp.get_opt("iptv") then
|
||||||
|
mp.set_property_bool("idle", true)
|
||||||
|
mp.set_property_bool("force-window", true)
|
||||||
|
mp.register_event("start-file", on_start_file)
|
||||||
|
--~ mp.register_event("end-file", on_shutdown)
|
||||||
|
keybinder.add("activate", activate)
|
||||||
|
end
|
||||||
|
|
4
.config/nvim/.gitignore
vendored
Executable file
4
.config/nvim/.gitignore
vendored
Executable file
@ -0,0 +1,4 @@
|
|||||||
|
/plugin/
|
||||||
|
/lazy-lock.json
|
||||||
|
/yarn.lock
|
||||||
|
/node_modules
|
674
.config/nvim/LICENSE
Executable file
674
.config/nvim/LICENSE
Executable file
@ -0,0 +1,674 @@
|
|||||||
|
GNU GENERAL PUBLIC LICENSE
|
||||||
|
Version 3, 29 June 2007
|
||||||
|
|
||||||
|
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||||
|
Everyone is permitted to copy and distribute verbatim copies
|
||||||
|
of this license document, but changing it is not allowed.
|
||||||
|
|
||||||
|
Preamble
|
||||||
|
|
||||||
|
The GNU General Public License is a free, copyleft license for
|
||||||
|
software and other kinds of works.
|
||||||
|
|
||||||
|
The licenses for most software and other practical works are designed
|
||||||
|
to take away your freedom to share and change the works. By contrast,
|
||||||
|
the GNU General Public License is intended to guarantee your freedom to
|
||||||
|
share and change all versions of a program--to make sure it remains free
|
||||||
|
software for all its users. We, the Free Software Foundation, use the
|
||||||
|
GNU General Public License for most of our software; it applies also to
|
||||||
|
any other work released this way by its authors. You can apply it to
|
||||||
|
your programs, too.
|
||||||
|
|
||||||
|
When we speak of free software, we are referring to freedom, not
|
||||||
|
price. Our General Public Licenses are designed to make sure that you
|
||||||
|
have the freedom to distribute copies of free software (and charge for
|
||||||
|
them if you wish), that you receive source code or can get it if you
|
||||||
|
want it, that you can change the software or use pieces of it in new
|
||||||
|
free programs, and that you know you can do these things.
|
||||||
|
|
||||||
|
To protect your rights, we need to prevent others from denying you
|
||||||
|
these rights or asking you to surrender the rights. Therefore, you have
|
||||||
|
certain responsibilities if you distribute copies of the software, or if
|
||||||
|
you modify it: responsibilities to respect the freedom of others.
|
||||||
|
|
||||||
|
For example, if you distribute copies of such a program, whether
|
||||||
|
gratis or for a fee, you must pass on to the recipients the same
|
||||||
|
freedoms that you received. You must make sure that they, too, receive
|
||||||
|
or can get the source code. And you must show them these terms so they
|
||||||
|
know their rights.
|
||||||
|
|
||||||
|
Developers that use the GNU GPL protect your rights with two steps:
|
||||||
|
(1) assert copyright on the software, and (2) offer you this License
|
||||||
|
giving you legal permission to copy, distribute and/or modify it.
|
||||||
|
|
||||||
|
For the developers' and authors' protection, the GPL clearly explains
|
||||||
|
that there is no warranty for this free software. For both users' and
|
||||||
|
authors' sake, the GPL requires that modified versions be marked as
|
||||||
|
changed, so that their problems will not be attributed erroneously to
|
||||||
|
authors of previous versions.
|
||||||
|
|
||||||
|
Some devices are designed to deny users access to install or run
|
||||||
|
modified versions of the software inside them, although the manufacturer
|
||||||
|
can do so. This is fundamentally incompatible with the aim of
|
||||||
|
protecting users' freedom to change the software. The systematic
|
||||||
|
pattern of such abuse occurs in the area of products for individuals to
|
||||||
|
use, which is precisely where it is most unacceptable. Therefore, we
|
||||||
|
have designed this version of the GPL to prohibit the practice for those
|
||||||
|
products. If such problems arise substantially in other domains, we
|
||||||
|
stand ready to extend this provision to those domains in future versions
|
||||||
|
of the GPL, as needed to protect the freedom of users.
|
||||||
|
|
||||||
|
Finally, every program is threatened constantly by software patents.
|
||||||
|
States should not allow patents to restrict development and use of
|
||||||
|
software on general-purpose computers, but in those that do, we wish to
|
||||||
|
avoid the special danger that patents applied to a free program could
|
||||||
|
make it effectively proprietary. To prevent this, the GPL assures that
|
||||||
|
patents cannot be used to render the program non-free.
|
||||||
|
|
||||||
|
The precise terms and conditions for copying, distribution and
|
||||||
|
modification follow.
|
||||||
|
|
||||||
|
TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
0. Definitions.
|
||||||
|
|
||||||
|
"This License" refers to version 3 of the GNU General Public License.
|
||||||
|
|
||||||
|
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||||
|
works, such as semiconductor masks.
|
||||||
|
|
||||||
|
"The Program" refers to any copyrightable work licensed under this
|
||||||
|
License. Each licensee is addressed as "you". "Licensees" and
|
||||||
|
"recipients" may be individuals or organizations.
|
||||||
|
|
||||||
|
To "modify" a work means to copy from or adapt all or part of the work
|
||||||
|
in a fashion requiring copyright permission, other than the making of an
|
||||||
|
exact copy. The resulting work is called a "modified version" of the
|
||||||
|
earlier work or a work "based on" the earlier work.
|
||||||
|
|
||||||
|
A "covered work" means either the unmodified Program or a work based
|
||||||
|
on the Program.
|
||||||
|
|
||||||
|
To "propagate" a work means to do anything with it that, without
|
||||||
|
permission, would make you directly or secondarily liable for
|
||||||
|
infringement under applicable copyright law, except executing it on a
|
||||||
|
computer or modifying a private copy. Propagation includes copying,
|
||||||
|
distribution (with or without modification), making available to the
|
||||||
|
public, and in some countries other activities as well.
|
||||||
|
|
||||||
|
To "convey" a work means any kind of propagation that enables other
|
||||||
|
parties to make or receive copies. Mere interaction with a user through
|
||||||
|
a computer network, with no transfer of a copy, is not conveying.
|
||||||
|
|
||||||
|
An interactive user interface displays "Appropriate Legal Notices"
|
||||||
|
to the extent that it includes a convenient and prominently visible
|
||||||
|
feature that (1) displays an appropriate copyright notice, and (2)
|
||||||
|
tells the user that there is no warranty for the work (except to the
|
||||||
|
extent that warranties are provided), that licensees may convey the
|
||||||
|
work under this License, and how to view a copy of this License. If
|
||||||
|
the interface presents a list of user commands or options, such as a
|
||||||
|
menu, a prominent item in the list meets this criterion.
|
||||||
|
|
||||||
|
1. Source Code.
|
||||||
|
|
||||||
|
The "source code" for a work means the preferred form of the work
|
||||||
|
for making modifications to it. "Object code" means any non-source
|
||||||
|
form of a work.
|
||||||
|
|
||||||
|
A "Standard Interface" means an interface that either is an official
|
||||||
|
standard defined by a recognized standards body, or, in the case of
|
||||||
|
interfaces specified for a particular programming language, one that
|
||||||
|
is widely used among developers working in that language.
|
||||||
|
|
||||||
|
The "System Libraries" of an executable work include anything, other
|
||||||
|
than the work as a whole, that (a) is included in the normal form of
|
||||||
|
packaging a Major Component, but which is not part of that Major
|
||||||
|
Component, and (b) serves only to enable use of the work with that
|
||||||
|
Major Component, or to implement a Standard Interface for which an
|
||||||
|
implementation is available to the public in source code form. A
|
||||||
|
"Major Component", in this context, means a major essential component
|
||||||
|
(kernel, window system, and so on) of the specific operating system
|
||||||
|
(if any) on which the executable work runs, or a compiler used to
|
||||||
|
produce the work, or an object code interpreter used to run it.
|
||||||
|
|
||||||
|
The "Corresponding Source" for a work in object code form means all
|
||||||
|
the source code needed to generate, install, and (for an executable
|
||||||
|
work) run the object code and to modify the work, including scripts to
|
||||||
|
control those activities. However, it does not include the work's
|
||||||
|
System Libraries, or general-purpose tools or generally available free
|
||||||
|
programs which are used unmodified in performing those activities but
|
||||||
|
which are not part of the work. For example, Corresponding Source
|
||||||
|
includes interface definition files associated with source files for
|
||||||
|
the work, and the source code for shared libraries and dynamically
|
||||||
|
linked subprograms that the work is specifically designed to require,
|
||||||
|
such as by intimate data communication or control flow between those
|
||||||
|
subprograms and other parts of the work.
|
||||||
|
|
||||||
|
The Corresponding Source need not include anything that users
|
||||||
|
can regenerate automatically from other parts of the Corresponding
|
||||||
|
Source.
|
||||||
|
|
||||||
|
The Corresponding Source for a work in source code form is that
|
||||||
|
same work.
|
||||||
|
|
||||||
|
2. Basic Permissions.
|
||||||
|
|
||||||
|
All rights granted under this License are granted for the term of
|
||||||
|
copyright on the Program, and are irrevocable provided the stated
|
||||||
|
conditions are met. This License explicitly affirms your unlimited
|
||||||
|
permission to run the unmodified Program. The output from running a
|
||||||
|
covered work is covered by this License only if the output, given its
|
||||||
|
content, constitutes a covered work. This License acknowledges your
|
||||||
|
rights of fair use or other equivalent, as provided by copyright law.
|
||||||
|
|
||||||
|
You may make, run and propagate covered works that you do not
|
||||||
|
convey, without conditions so long as your license otherwise remains
|
||||||
|
in force. You may convey covered works to others for the sole purpose
|
||||||
|
of having them make modifications exclusively for you, or provide you
|
||||||
|
with facilities for running those works, provided that you comply with
|
||||||
|
the terms of this License in conveying all material for which you do
|
||||||
|
not control copyright. Those thus making or running the covered works
|
||||||
|
for you must do so exclusively on your behalf, under your direction
|
||||||
|
and control, on terms that prohibit them from making any copies of
|
||||||
|
your copyrighted material outside their relationship with you.
|
||||||
|
|
||||||
|
Conveying under any other circumstances is permitted solely under
|
||||||
|
the conditions stated below. Sublicensing is not allowed; section 10
|
||||||
|
makes it unnecessary.
|
||||||
|
|
||||||
|
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||||
|
|
||||||
|
No covered work shall be deemed part of an effective technological
|
||||||
|
measure under any applicable law fulfilling obligations under article
|
||||||
|
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||||
|
similar laws prohibiting or restricting circumvention of such
|
||||||
|
measures.
|
||||||
|
|
||||||
|
When you convey a covered work, you waive any legal power to forbid
|
||||||
|
circumvention of technological measures to the extent such circumvention
|
||||||
|
is effected by exercising rights under this License with respect to
|
||||||
|
the covered work, and you disclaim any intention to limit operation or
|
||||||
|
modification of the work as a means of enforcing, against the work's
|
||||||
|
users, your or third parties' legal rights to forbid circumvention of
|
||||||
|
technological measures.
|
||||||
|
|
||||||
|
4. Conveying Verbatim Copies.
|
||||||
|
|
||||||
|
You may convey verbatim copies of the Program's source code as you
|
||||||
|
receive it, in any medium, provided that you conspicuously and
|
||||||
|
appropriately publish on each copy an appropriate copyright notice;
|
||||||
|
keep intact all notices stating that this License and any
|
||||||
|
non-permissive terms added in accord with section 7 apply to the code;
|
||||||
|
keep intact all notices of the absence of any warranty; and give all
|
||||||
|
recipients a copy of this License along with the Program.
|
||||||
|
|
||||||
|
You may charge any price or no price for each copy that you convey,
|
||||||
|
and you may offer support or warranty protection for a fee.
|
||||||
|
|
||||||
|
5. Conveying Modified Source Versions.
|
||||||
|
|
||||||
|
You may convey a work based on the Program, or the modifications to
|
||||||
|
produce it from the Program, in the form of source code under the
|
||||||
|
terms of section 4, provided that you also meet all of these conditions:
|
||||||
|
|
||||||
|
a) The work must carry prominent notices stating that you modified
|
||||||
|
it, and giving a relevant date.
|
||||||
|
|
||||||
|
b) The work must carry prominent notices stating that it is
|
||||||
|
released under this License and any conditions added under section
|
||||||
|
7. This requirement modifies the requirement in section 4 to
|
||||||
|
"keep intact all notices".
|
||||||
|
|
||||||
|
c) You must license the entire work, as a whole, under this
|
||||||
|
License to anyone who comes into possession of a copy. This
|
||||||
|
License will therefore apply, along with any applicable section 7
|
||||||
|
additional terms, to the whole of the work, and all its parts,
|
||||||
|
regardless of how they are packaged. This License gives no
|
||||||
|
permission to license the work in any other way, but it does not
|
||||||
|
invalidate such permission if you have separately received it.
|
||||||
|
|
||||||
|
d) If the work has interactive user interfaces, each must display
|
||||||
|
Appropriate Legal Notices; however, if the Program has interactive
|
||||||
|
interfaces that do not display Appropriate Legal Notices, your
|
||||||
|
work need not make them do so.
|
||||||
|
|
||||||
|
A compilation of a covered work with other separate and independent
|
||||||
|
works, which are not by their nature extensions of the covered work,
|
||||||
|
and which are not combined with it such as to form a larger program,
|
||||||
|
in or on a volume of a storage or distribution medium, is called an
|
||||||
|
"aggregate" if the compilation and its resulting copyright are not
|
||||||
|
used to limit the access or legal rights of the compilation's users
|
||||||
|
beyond what the individual works permit. Inclusion of a covered work
|
||||||
|
in an aggregate does not cause this License to apply to the other
|
||||||
|
parts of the aggregate.
|
||||||
|
|
||||||
|
6. Conveying Non-Source Forms.
|
||||||
|
|
||||||
|
You may convey a covered work in object code form under the terms
|
||||||
|
of sections 4 and 5, provided that you also convey the
|
||||||
|
machine-readable Corresponding Source under the terms of this License,
|
||||||
|
in one of these ways:
|
||||||
|
|
||||||
|
a) Convey the object code in, or embodied in, a physical product
|
||||||
|
(including a physical distribution medium), accompanied by the
|
||||||
|
Corresponding Source fixed on a durable physical medium
|
||||||
|
customarily used for software interchange.
|
||||||
|
|
||||||
|
b) Convey the object code in, or embodied in, a physical product
|
||||||
|
(including a physical distribution medium), accompanied by a
|
||||||
|
written offer, valid for at least three years and valid for as
|
||||||
|
long as you offer spare parts or customer support for that product
|
||||||
|
model, to give anyone who possesses the object code either (1) a
|
||||||
|
copy of the Corresponding Source for all the software in the
|
||||||
|
product that is covered by this License, on a durable physical
|
||||||
|
medium customarily used for software interchange, for a price no
|
||||||
|
more than your reasonable cost of physically performing this
|
||||||
|
conveying of source, or (2) access to copy the
|
||||||
|
Corresponding Source from a network server at no charge.
|
||||||
|
|
||||||
|
c) Convey individual copies of the object code with a copy of the
|
||||||
|
written offer to provide the Corresponding Source. This
|
||||||
|
alternative is allowed only occasionally and noncommercially, and
|
||||||
|
only if you received the object code with such an offer, in accord
|
||||||
|
with subsection 6b.
|
||||||
|
|
||||||
|
d) Convey the object code by offering access from a designated
|
||||||
|
place (gratis or for a charge), and offer equivalent access to the
|
||||||
|
Corresponding Source in the same way through the same place at no
|
||||||
|
further charge. You need not require recipients to copy the
|
||||||
|
Corresponding Source along with the object code. If the place to
|
||||||
|
copy the object code is a network server, the Corresponding Source
|
||||||
|
may be on a different server (operated by you or a third party)
|
||||||
|
that supports equivalent copying facilities, provided you maintain
|
||||||
|
clear directions next to the object code saying where to find the
|
||||||
|
Corresponding Source. Regardless of what server hosts the
|
||||||
|
Corresponding Source, you remain obligated to ensure that it is
|
||||||
|
available for as long as needed to satisfy these requirements.
|
||||||
|
|
||||||
|
e) Convey the object code using peer-to-peer transmission, provided
|
||||||
|
you inform other peers where the object code and Corresponding
|
||||||
|
Source of the work are being offered to the general public at no
|
||||||
|
charge under subsection 6d.
|
||||||
|
|
||||||
|
A separable portion of the object code, whose source code is excluded
|
||||||
|
from the Corresponding Source as a System Library, need not be
|
||||||
|
included in conveying the object code work.
|
||||||
|
|
||||||
|
A "User Product" is either (1) a "consumer product", which means any
|
||||||
|
tangible personal property which is normally used for personal, family,
|
||||||
|
or household purposes, or (2) anything designed or sold for incorporation
|
||||||
|
into a dwelling. In determining whether a product is a consumer product,
|
||||||
|
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||||
|
product received by a particular user, "normally used" refers to a
|
||||||
|
typical or common use of that class of product, regardless of the status
|
||||||
|
of the particular user or of the way in which the particular user
|
||||||
|
actually uses, or expects or is expected to use, the product. A product
|
||||||
|
is a consumer product regardless of whether the product has substantial
|
||||||
|
commercial, industrial or non-consumer uses, unless such uses represent
|
||||||
|
the only significant mode of use of the product.
|
||||||
|
|
||||||
|
"Installation Information" for a User Product means any methods,
|
||||||
|
procedures, authorization keys, or other information required to install
|
||||||
|
and execute modified versions of a covered work in that User Product from
|
||||||
|
a modified version of its Corresponding Source. The information must
|
||||||
|
suffice to ensure that the continued functioning of the modified object
|
||||||
|
code is in no case prevented or interfered with solely because
|
||||||
|
modification has been made.
|
||||||
|
|
||||||
|
If you convey an object code work under this section in, or with, or
|
||||||
|
specifically for use in, a User Product, and the conveying occurs as
|
||||||
|
part of a transaction in which the right of possession and use of the
|
||||||
|
User Product is transferred to the recipient in perpetuity or for a
|
||||||
|
fixed term (regardless of how the transaction is characterized), the
|
||||||
|
Corresponding Source conveyed under this section must be accompanied
|
||||||
|
by the Installation Information. But this requirement does not apply
|
||||||
|
if neither you nor any third party retains the ability to install
|
||||||
|
modified object code on the User Product (for example, the work has
|
||||||
|
been installed in ROM).
|
||||||
|
|
||||||
|
The requirement to provide Installation Information does not include a
|
||||||
|
requirement to continue to provide support service, warranty, or updates
|
||||||
|
for a work that has been modified or installed by the recipient, or for
|
||||||
|
the User Product in which it has been modified or installed. Access to a
|
||||||
|
network may be denied when the modification itself materially and
|
||||||
|
adversely affects the operation of the network or violates the rules and
|
||||||
|
protocols for communication across the network.
|
||||||
|
|
||||||
|
Corresponding Source conveyed, and Installation Information provided,
|
||||||
|
in accord with this section must be in a format that is publicly
|
||||||
|
documented (and with an implementation available to the public in
|
||||||
|
source code form), and must require no special password or key for
|
||||||
|
unpacking, reading or copying.
|
||||||
|
|
||||||
|
7. Additional Terms.
|
||||||
|
|
||||||
|
"Additional permissions" are terms that supplement the terms of this
|
||||||
|
License by making exceptions from one or more of its conditions.
|
||||||
|
Additional permissions that are applicable to the entire Program shall
|
||||||
|
be treated as though they were included in this License, to the extent
|
||||||
|
that they are valid under applicable law. If additional permissions
|
||||||
|
apply only to part of the Program, that part may be used separately
|
||||||
|
under those permissions, but the entire Program remains governed by
|
||||||
|
this License without regard to the additional permissions.
|
||||||
|
|
||||||
|
When you convey a copy of a covered work, you may at your option
|
||||||
|
remove any additional permissions from that copy, or from any part of
|
||||||
|
it. (Additional permissions may be written to require their own
|
||||||
|
removal in certain cases when you modify the work.) You may place
|
||||||
|
additional permissions on material, added by you to a covered work,
|
||||||
|
for which you have or can give appropriate copyright permission.
|
||||||
|
|
||||||
|
Notwithstanding any other provision of this License, for material you
|
||||||
|
add to a covered work, you may (if authorized by the copyright holders of
|
||||||
|
that material) supplement the terms of this License with terms:
|
||||||
|
|
||||||
|
a) Disclaiming warranty or limiting liability differently from the
|
||||||
|
terms of sections 15 and 16 of this License; or
|
||||||
|
|
||||||
|
b) Requiring preservation of specified reasonable legal notices or
|
||||||
|
author attributions in that material or in the Appropriate Legal
|
||||||
|
Notices displayed by works containing it; or
|
||||||
|
|
||||||
|
c) Prohibiting misrepresentation of the origin of that material, or
|
||||||
|
requiring that modified versions of such material be marked in
|
||||||
|
reasonable ways as different from the original version; or
|
||||||
|
|
||||||
|
d) Limiting the use for publicity purposes of names of licensors or
|
||||||
|
authors of the material; or
|
||||||
|
|
||||||
|
e) Declining to grant rights under trademark law for use of some
|
||||||
|
trade names, trademarks, or service marks; or
|
||||||
|
|
||||||
|
f) Requiring indemnification of licensors and authors of that
|
||||||
|
material by anyone who conveys the material (or modified versions of
|
||||||
|
it) with contractual assumptions of liability to the recipient, for
|
||||||
|
any liability that these contractual assumptions directly impose on
|
||||||
|
those licensors and authors.
|
||||||
|
|
||||||
|
All other non-permissive additional terms are considered "further
|
||||||
|
restrictions" within the meaning of section 10. If the Program as you
|
||||||
|
received it, or any part of it, contains a notice stating that it is
|
||||||
|
governed by this License along with a term that is a further
|
||||||
|
restriction, you may remove that term. If a license document contains
|
||||||
|
a further restriction but permits relicensing or conveying under this
|
||||||
|
License, you may add to a covered work material governed by the terms
|
||||||
|
of that license document, provided that the further restriction does
|
||||||
|
not survive such relicensing or conveying.
|
||||||
|
|
||||||
|
If you add terms to a covered work in accord with this section, you
|
||||||
|
must place, in the relevant source files, a statement of the
|
||||||
|
additional terms that apply to those files, or a notice indicating
|
||||||
|
where to find the applicable terms.
|
||||||
|
|
||||||
|
Additional terms, permissive or non-permissive, may be stated in the
|
||||||
|
form of a separately written license, or stated as exceptions;
|
||||||
|
the above requirements apply either way.
|
||||||
|
|
||||||
|
8. Termination.
|
||||||
|
|
||||||
|
You may not propagate or modify a covered work except as expressly
|
||||||
|
provided under this License. Any attempt otherwise to propagate or
|
||||||
|
modify it is void, and will automatically terminate your rights under
|
||||||
|
this License (including any patent licenses granted under the third
|
||||||
|
paragraph of section 11).
|
||||||
|
|
||||||
|
However, if you cease all violation of this License, then your
|
||||||
|
license from a particular copyright holder is reinstated (a)
|
||||||
|
provisionally, unless and until the copyright holder explicitly and
|
||||||
|
finally terminates your license, and (b) permanently, if the copyright
|
||||||
|
holder fails to notify you of the violation by some reasonable means
|
||||||
|
prior to 60 days after the cessation.
|
||||||
|
|
||||||
|
Moreover, your license from a particular copyright holder is
|
||||||
|
reinstated permanently if the copyright holder notifies you of the
|
||||||
|
violation by some reasonable means, this is the first time you have
|
||||||
|
received notice of violation of this License (for any work) from that
|
||||||
|
copyright holder, and you cure the violation prior to 30 days after
|
||||||
|
your receipt of the notice.
|
||||||
|
|
||||||
|
Termination of your rights under this section does not terminate the
|
||||||
|
licenses of parties who have received copies or rights from you under
|
||||||
|
this License. If your rights have been terminated and not permanently
|
||||||
|
reinstated, you do not qualify to receive new licenses for the same
|
||||||
|
material under section 10.
|
||||||
|
|
||||||
|
9. Acceptance Not Required for Having Copies.
|
||||||
|
|
||||||
|
You are not required to accept this License in order to receive or
|
||||||
|
run a copy of the Program. Ancillary propagation of a covered work
|
||||||
|
occurring solely as a consequence of using peer-to-peer transmission
|
||||||
|
to receive a copy likewise does not require acceptance. However,
|
||||||
|
nothing other than this License grants you permission to propagate or
|
||||||
|
modify any covered work. These actions infringe copyright if you do
|
||||||
|
not accept this License. Therefore, by modifying or propagating a
|
||||||
|
covered work, you indicate your acceptance of this License to do so.
|
||||||
|
|
||||||
|
10. Automatic Licensing of Downstream Recipients.
|
||||||
|
|
||||||
|
Each time you convey a covered work, the recipient automatically
|
||||||
|
receives a license from the original licensors, to run, modify and
|
||||||
|
propagate that work, subject to this License. You are not responsible
|
||||||
|
for enforcing compliance by third parties with this License.
|
||||||
|
|
||||||
|
An "entity transaction" is a transaction transferring control of an
|
||||||
|
organization, or substantially all assets of one, or subdividing an
|
||||||
|
organization, or merging organizations. If propagation of a covered
|
||||||
|
work results from an entity transaction, each party to that
|
||||||
|
transaction who receives a copy of the work also receives whatever
|
||||||
|
licenses to the work the party's predecessor in interest had or could
|
||||||
|
give under the previous paragraph, plus a right to possession of the
|
||||||
|
Corresponding Source of the work from the predecessor in interest, if
|
||||||
|
the predecessor has it or can get it with reasonable efforts.
|
||||||
|
|
||||||
|
You may not impose any further restrictions on the exercise of the
|
||||||
|
rights granted or affirmed under this License. For example, you may
|
||||||
|
not impose a license fee, royalty, or other charge for exercise of
|
||||||
|
rights granted under this License, and you may not initiate litigation
|
||||||
|
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||||
|
any patent claim is infringed by making, using, selling, offering for
|
||||||
|
sale, or importing the Program or any portion of it.
|
||||||
|
|
||||||
|
11. Patents.
|
||||||
|
|
||||||
|
A "contributor" is a copyright holder who authorizes use under this
|
||||||
|
License of the Program or a work on which the Program is based. The
|
||||||
|
work thus licensed is called the contributor's "contributor version".
|
||||||
|
|
||||||
|
A contributor's "essential patent claims" are all patent claims
|
||||||
|
owned or controlled by the contributor, whether already acquired or
|
||||||
|
hereafter acquired, that would be infringed by some manner, permitted
|
||||||
|
by this License, of making, using, or selling its contributor version,
|
||||||
|
but do not include claims that would be infringed only as a
|
||||||
|
consequence of further modification of the contributor version. For
|
||||||
|
purposes of this definition, "control" includes the right to grant
|
||||||
|
patent sublicenses in a manner consistent with the requirements of
|
||||||
|
this License.
|
||||||
|
|
||||||
|
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||||
|
patent license under the contributor's essential patent claims, to
|
||||||
|
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||||
|
propagate the contents of its contributor version.
|
||||||
|
|
||||||
|
In the following three paragraphs, a "patent license" is any express
|
||||||
|
agreement or commitment, however denominated, not to enforce a patent
|
||||||
|
(such as an express permission to practice a patent or covenant not to
|
||||||
|
sue for patent infringement). To "grant" such a patent license to a
|
||||||
|
party means to make such an agreement or commitment not to enforce a
|
||||||
|
patent against the party.
|
||||||
|
|
||||||
|
If you convey a covered work, knowingly relying on a patent license,
|
||||||
|
and the Corresponding Source of the work is not available for anyone
|
||||||
|
to copy, free of charge and under the terms of this License, through a
|
||||||
|
publicly available network server or other readily accessible means,
|
||||||
|
then you must either (1) cause the Corresponding Source to be so
|
||||||
|
available, or (2) arrange to deprive yourself of the benefit of the
|
||||||
|
patent license for this particular work, or (3) arrange, in a manner
|
||||||
|
consistent with the requirements of this License, to extend the patent
|
||||||
|
license to downstream recipients. "Knowingly relying" means you have
|
||||||
|
actual knowledge that, but for the patent license, your conveying the
|
||||||
|
covered work in a country, or your recipient's use of the covered work
|
||||||
|
in a country, would infringe one or more identifiable patents in that
|
||||||
|
country that you have reason to believe are valid.
|
||||||
|
|
||||||
|
If, pursuant to or in connection with a single transaction or
|
||||||
|
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||||
|
covered work, and grant a patent license to some of the parties
|
||||||
|
receiving the covered work authorizing them to use, propagate, modify
|
||||||
|
or convey a specific copy of the covered work, then the patent license
|
||||||
|
you grant is automatically extended to all recipients of the covered
|
||||||
|
work and works based on it.
|
||||||
|
|
||||||
|
A patent license is "discriminatory" if it does not include within
|
||||||
|
the scope of its coverage, prohibits the exercise of, or is
|
||||||
|
conditioned on the non-exercise of one or more of the rights that are
|
||||||
|
specifically granted under this License. You may not convey a covered
|
||||||
|
work if you are a party to an arrangement with a third party that is
|
||||||
|
in the business of distributing software, under which you make payment
|
||||||
|
to the third party based on the extent of your activity of conveying
|
||||||
|
the work, and under which the third party grants, to any of the
|
||||||
|
parties who would receive the covered work from you, a discriminatory
|
||||||
|
patent license (a) in connection with copies of the covered work
|
||||||
|
conveyed by you (or copies made from those copies), or (b) primarily
|
||||||
|
for and in connection with specific products or compilations that
|
||||||
|
contain the covered work, unless you entered into that arrangement,
|
||||||
|
or that patent license was granted, prior to 28 March 2007.
|
||||||
|
|
||||||
|
Nothing in this License shall be construed as excluding or limiting
|
||||||
|
any implied license or other defenses to infringement that may
|
||||||
|
otherwise be available to you under applicable patent law.
|
||||||
|
|
||||||
|
12. No Surrender of Others' Freedom.
|
||||||
|
|
||||||
|
If conditions are imposed on you (whether by court order, agreement or
|
||||||
|
otherwise) that contradict the conditions of this License, they do not
|
||||||
|
excuse you from the conditions of this License. If you cannot convey a
|
||||||
|
covered work so as to satisfy simultaneously your obligations under this
|
||||||
|
License and any other pertinent obligations, then as a consequence you may
|
||||||
|
not convey it at all. For example, if you agree to terms that obligate you
|
||||||
|
to collect a royalty for further conveying from those to whom you convey
|
||||||
|
the Program, the only way you could satisfy both those terms and this
|
||||||
|
License would be to refrain entirely from conveying the Program.
|
||||||
|
|
||||||
|
13. Use with the GNU Affero General Public License.
|
||||||
|
|
||||||
|
Notwithstanding any other provision of this License, you have
|
||||||
|
permission to link or combine any covered work with a work licensed
|
||||||
|
under version 3 of the GNU Affero General Public License into a single
|
||||||
|
combined work, and to convey the resulting work. The terms of this
|
||||||
|
License will continue to apply to the part which is the covered work,
|
||||||
|
but the special requirements of the GNU Affero General Public License,
|
||||||
|
section 13, concerning interaction through a network will apply to the
|
||||||
|
combination as such.
|
||||||
|
|
||||||
|
14. Revised Versions of this License.
|
||||||
|
|
||||||
|
The Free Software Foundation may publish revised and/or new versions of
|
||||||
|
the GNU General Public License from time to time. Such new versions will
|
||||||
|
be similar in spirit to the present version, but may differ in detail to
|
||||||
|
address new problems or concerns.
|
||||||
|
|
||||||
|
Each version is given a distinguishing version number. If the
|
||||||
|
Program specifies that a certain numbered version of the GNU General
|
||||||
|
Public License "or any later version" applies to it, you have the
|
||||||
|
option of following the terms and conditions either of that numbered
|
||||||
|
version or of any later version published by the Free Software
|
||||||
|
Foundation. If the Program does not specify a version number of the
|
||||||
|
GNU General Public License, you may choose any version ever published
|
||||||
|
by the Free Software Foundation.
|
||||||
|
|
||||||
|
If the Program specifies that a proxy can decide which future
|
||||||
|
versions of the GNU General Public License can be used, that proxy's
|
||||||
|
public statement of acceptance of a version permanently authorizes you
|
||||||
|
to choose that version for the Program.
|
||||||
|
|
||||||
|
Later license versions may give you additional or different
|
||||||
|
permissions. However, no additional obligations are imposed on any
|
||||||
|
author or copyright holder as a result of your choosing to follow a
|
||||||
|
later version.
|
||||||
|
|
||||||
|
15. Disclaimer of Warranty.
|
||||||
|
|
||||||
|
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||||
|
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||||
|
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||||
|
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||||
|
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||||
|
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||||
|
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||||
|
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||||
|
|
||||||
|
16. Limitation of Liability.
|
||||||
|
|
||||||
|
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||||
|
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||||
|
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||||
|
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||||
|
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||||
|
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||||
|
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||||
|
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||||
|
SUCH DAMAGES.
|
||||||
|
|
||||||
|
17. Interpretation of Sections 15 and 16.
|
||||||
|
|
||||||
|
If the disclaimer of warranty and limitation of liability provided
|
||||||
|
above cannot be given local legal effect according to their terms,
|
||||||
|
reviewing courts shall apply local law that most closely approximates
|
||||||
|
an absolute waiver of all civil liability in connection with the
|
||||||
|
Program, unless a warranty or assumption of liability accompanies a
|
||||||
|
copy of the Program in return for a fee.
|
||||||
|
|
||||||
|
END OF TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
How to Apply These Terms to Your New Programs
|
||||||
|
|
||||||
|
If you develop a new program, and you want it to be of the greatest
|
||||||
|
possible use to the public, the best way to achieve this is to make it
|
||||||
|
free software which everyone can redistribute and change under these terms.
|
||||||
|
|
||||||
|
To do so, attach the following notices to the program. It is safest
|
||||||
|
to attach them to the start of each source file to most effectively
|
||||||
|
state the exclusion of warranty; and each file should have at least
|
||||||
|
the "copyright" line and a pointer to where the full notice is found.
|
||||||
|
|
||||||
|
neovim-dotfiles
|
||||||
|
Copyright (C) 2022 Tomkoid
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
Also add information on how to contact you by electronic and paper mail.
|
||||||
|
|
||||||
|
If the program does terminal interaction, make it output a short
|
||||||
|
notice like this when it starts in an interactive mode:
|
||||||
|
|
||||||
|
<program> Copyright (C) 2022 Tomkoid
|
||||||
|
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||||
|
This is free software, and you are welcome to redistribute it
|
||||||
|
under certain conditions; type `show c' for details.
|
||||||
|
|
||||||
|
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||||
|
parts of the General Public License. Of course, your program's commands
|
||||||
|
might be different; for a GUI interface, you would use an "about box".
|
||||||
|
|
||||||
|
You should also get your employer (if you work as a programmer) or school,
|
||||||
|
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||||
|
For more information on this, and how to apply and follow the GNU GPL, see
|
||||||
|
<https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
The GNU General Public License does not permit incorporating your program
|
||||||
|
into proprietary programs. If your program is a subroutine library, you
|
||||||
|
may consider it more useful to permit linking proprietary applications with
|
||||||
|
the library. If this is what you want to do, use the GNU Lesser General
|
||||||
|
Public License instead of this License. But first, please read
|
||||||
|
<https://www.gnu.org/licenses/why-not-lgpl.html>.
|
36
.config/nvim/README.md
Executable file
36
.config/nvim/README.md
Executable file
@ -0,0 +1,36 @@
|
|||||||
|
# My dotfiles for NeoVim
|
||||||
|
|
||||||
|
## About
|
||||||
|
This config uses [Lazy.nvim](https://github.com/folke/lazy.nvim) as a plugin manager.
|
||||||
|
|
||||||
|
## Setup
|
||||||
|
First, you have to clone this repo with [git](https://github.com/git/git).
|
||||||
|
If you already have your config in **~/.config/nvim**, make a backup of it first and then delete it.
|
||||||
|
```
|
||||||
|
$ git clone https://codeberg.org/tomkoid/neovim-dotfiles.git ~/.config/nvim
|
||||||
|
```
|
||||||
|
Now, to run the **install script**, you have to CD into **~/.config/nvim** directory.
|
||||||
|
```
|
||||||
|
$ cd ~/.config/nvim
|
||||||
|
```
|
||||||
|
|
||||||
|
If you have trouble with fonts, try to install these: `Noto Fonts, Noto Fonts Emoji, JetBrains Mono Nerd`.
|
||||||
|
In [Arch Linux](https://archlinux.org) you can install it with [pacman](https://wiki.archlinux.org/title/pacman) and [paru](https://github.com/Morganamilo/paru) (or with any other [AUR helper](https://wiki.archlinux.org/title/AUR_helpers))
|
||||||
|
|
||||||
|
Pacman:
|
||||||
|
```
|
||||||
|
$ pacman -S noto-fonts-emoji noto-fonts ttf-jetbrains-mono-nerd ttf-nerd-fonts-symbols ttf-nerd-fonts-symbols-mono
|
||||||
|
```
|
||||||
|
And with AUR helper:
|
||||||
|
```
|
||||||
|
$ paru nerd-fonts-meta
|
||||||
|
```
|
||||||
|
|
||||||
|
This package can be large, so this may take a while to install.
|
||||||
|
After the installation is complete, you're done!
|
||||||
|
|
||||||
|
### Screenshots:
|
||||||
|
|
||||||
|
<img src="images/in_action.png">
|
||||||
|
|
||||||
|
<img src="images/in_action_with_nerdtree.png">
|
1
.config/nvim/after/ftplugin/dart.lua
Normal file
1
.config/nvim/after/ftplugin/dart.lua
Normal file
@ -0,0 +1 @@
|
|||||||
|
vim.bo.commentstring = '// %s'
|
BIN
.config/nvim/images/in_action.png
Executable file
BIN
.config/nvim/images/in_action.png
Executable file
Binary file not shown.
After Width: | Height: | Size: 540 KiB |
BIN
.config/nvim/images/in_action_with_nerdtree.png
Executable file
BIN
.config/nvim/images/in_action_with_nerdtree.png
Executable file
Binary file not shown.
After Width: | Height: | Size: 500 KiB |
96
.config/nvim/init.lua
Normal file
96
.config/nvim/init.lua
Normal file
@ -0,0 +1,96 @@
|
|||||||
|
vim.loader.enable()
|
||||||
|
|
||||||
|
require("set")
|
||||||
|
require("remap")
|
||||||
|
require("autocmd")
|
||||||
|
require("lazy_init")
|
||||||
|
|
||||||
|
-- Cargar configuración de tipos de archivo
|
||||||
|
pcall(require, 'filetype') -- Ignorar errores si filetype.lua no existe
|
||||||
|
|
||||||
|
function ReplaceWordUnderCursor()
|
||||||
|
local word = vim.fn.expand("<cword>")
|
||||||
|
local replace = vim.fn.input("Replace \"" .. word .. "\" with: ")
|
||||||
|
if replace ~= "" then
|
||||||
|
vim.cmd("%s/\\V" .. word .. "/" .. replace .. "/g")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
vim.api.nvim_set_keymap("n", "<Leader>r", ":lua ReplaceWordUnderCursor()<CR>", { noremap = true, silent = true })
|
||||||
|
|
||||||
|
function ReplacePhraseUnderCursor()
|
||||||
|
-- Obtén la palabra o frase bajo el cursor en modo visual
|
||||||
|
local phrase = vim.fn.input("Replace phrase: ")
|
||||||
|
if phrase == "" then
|
||||||
|
print("No phrase provided.")
|
||||||
|
return
|
||||||
|
end
|
||||||
|
local replace = vim.fn.input("Replace \"" .. phrase .. "\" with: ")
|
||||||
|
if replace ~= "" then
|
||||||
|
vim.cmd("%s/\\V" .. vim.fn.escape(phrase, "/\\") .. "/" .. replace .. "/g")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
vim.api.nvim_set_keymap("n", "<Leader>f", ":lua ReplacePhraseUnderCursor()<CR>", { noremap = true, silent = true })
|
||||||
|
|
||||||
|
vim.filetype.add({
|
||||||
|
extension = {
|
||||||
|
yml = "ansible",
|
||||||
|
yaml = "ansible",
|
||||||
|
},
|
||||||
|
-- Puedes agregar otras asociaciones si es necesario
|
||||||
|
})
|
||||||
|
|
||||||
|
vim.cmd([[
|
||||||
|
autocmd BufRead,BufNewFile *.yml,*.yaml set filetype=ansible
|
||||||
|
]])
|
||||||
|
require("catppuccin").setup({
|
||||||
|
flavour = "macchiato", -- Puedes elegir entre 'latte', 'frappe', 'macchiato', 'mocha'
|
||||||
|
background = {
|
||||||
|
light = "latte",
|
||||||
|
dark = "macchiato",
|
||||||
|
},
|
||||||
|
|
||||||
|
require("plugins.ollama-copilot"),
|
||||||
|
-- Otras configuraciones de Catppuccin...
|
||||||
|
|
||||||
|
custom_highlights = function(colors)
|
||||||
|
return {
|
||||||
|
-- Personalizar DiagnosticWarn con un tono de rojo menos intrusivo
|
||||||
|
DiagnosticWarn = {
|
||||||
|
fg = colors.red6, -- Tono de rojo menos brillante
|
||||||
|
bg = "NONE",
|
||||||
|
bold = false,
|
||||||
|
italic = false,
|
||||||
|
},
|
||||||
|
DiagnosticVirtualTextWarn = {
|
||||||
|
fg = colors.red6,
|
||||||
|
bg = "NONE",
|
||||||
|
italic = false,
|
||||||
|
},
|
||||||
|
-- Opcional: Personalizar otros grupos de diagnóstico si lo deseas
|
||||||
|
-- DiagnosticError = {
|
||||||
|
-- fg = colors.red,
|
||||||
|
-- bg = "NONE",
|
||||||
|
-- bold = true,
|
||||||
|
-- italic = false,
|
||||||
|
-- },
|
||||||
|
-- DiagnosticInfo = {
|
||||||
|
-- fg = colors.blue,
|
||||||
|
-- bg = "NONE",
|
||||||
|
-- bold = false,
|
||||||
|
-- italic = false,
|
||||||
|
-- },
|
||||||
|
-- DiagnosticHint = {
|
||||||
|
-- fg = colors.cyan,
|
||||||
|
-- bg = "NONE",
|
||||||
|
-- bold = false,
|
||||||
|
-- italic = false,
|
||||||
|
-- },
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
-- Aplicar el esquema de colores
|
||||||
|
vim.cmd.colorscheme("catppuccin")
|
||||||
|
vim.o.expandtab = false -- Usa tabuladores en lugar de espacios
|
93
.config/nvim/init.lua_backup
Normal file
93
.config/nvim/init.lua_backup
Normal file
@ -0,0 +1,93 @@
|
|||||||
|
vim.loader.enable()
|
||||||
|
|
||||||
|
require("set")
|
||||||
|
require("remap")
|
||||||
|
require("autocmd")
|
||||||
|
require("lazy_init")
|
||||||
|
|
||||||
|
-- Cargar configuración de tipos de archivo
|
||||||
|
pcall(require, 'filetype') -- Ignorar errores si filetype.lua no existe
|
||||||
|
|
||||||
|
function ReplaceWordUnderCursor()
|
||||||
|
local word = vim.fn.expand("<cword>")
|
||||||
|
local replace = vim.fn.input("Replace \"" .. word .. "\" with: ")
|
||||||
|
if replace ~= "" then
|
||||||
|
vim.cmd("%s/\\V" .. word .. "/" .. replace .. "/g")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
vim.api.nvim_set_keymap("n", "<Leader>r", ":lua ReplaceWordUnderCursor()<CR>", { noremap = true, silent = true })
|
||||||
|
|
||||||
|
function ReplacePhraseUnderCursor()
|
||||||
|
-- Obtén la palabra o frase bajo el cursor en modo visual
|
||||||
|
local phrase = vim.fn.input("Replace phrase: ")
|
||||||
|
if phrase == "" then
|
||||||
|
print("No phrase provided.")
|
||||||
|
return
|
||||||
|
end
|
||||||
|
local replace = vim.fn.input("Replace \"" .. phrase .. "\" with: ")
|
||||||
|
if replace ~= "" then
|
||||||
|
vim.cmd("%s/\\V" .. vim.fn.escape(phrase, "/\\") .. "/" .. replace .. "/g")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
vim.api.nvim_set_keymap("n", "<Leader>f", ":lua ReplacePhraseUnderCursor()<CR>", { noremap = true, silent = true })
|
||||||
|
|
||||||
|
vim.filetype.add({
|
||||||
|
extension = {
|
||||||
|
yml = "ansible",
|
||||||
|
yaml = "ansible",
|
||||||
|
},
|
||||||
|
-- Puedes agregar otras asociaciones si es necesario
|
||||||
|
})
|
||||||
|
|
||||||
|
vim.cmd([[
|
||||||
|
autocmd BufRead,BufNewFile *.yml,*.yaml set filetype=ansible
|
||||||
|
]])
|
||||||
|
require("catppuccin").setup({
|
||||||
|
flavour = "macchiato", -- Puedes elegir entre 'latte', 'frappe', 'macchiato', 'mocha'
|
||||||
|
background = {
|
||||||
|
light = "latte",
|
||||||
|
dark = "macchiato",
|
||||||
|
},
|
||||||
|
-- Otras configuraciones de Catppuccin...
|
||||||
|
|
||||||
|
custom_highlights = function(colors)
|
||||||
|
return {
|
||||||
|
-- Personalizar DiagnosticWarn con un tono de rojo menos intrusivo
|
||||||
|
DiagnosticWarn = {
|
||||||
|
fg = colors.red6, -- Tono de rojo menos brillante
|
||||||
|
bg = "NONE",
|
||||||
|
bold = false,
|
||||||
|
italic = false,
|
||||||
|
},
|
||||||
|
DiagnosticVirtualTextWarn = {
|
||||||
|
fg = colors.red6,
|
||||||
|
bg = "NONE",
|
||||||
|
italic = false,
|
||||||
|
},
|
||||||
|
-- Opcional: Personalizar otros grupos de diagnóstico si lo deseas
|
||||||
|
-- DiagnosticError = {
|
||||||
|
-- fg = colors.red,
|
||||||
|
-- bg = "NONE",
|
||||||
|
-- bold = true,
|
||||||
|
-- italic = false,
|
||||||
|
-- },
|
||||||
|
-- DiagnosticInfo = {
|
||||||
|
-- fg = colors.blue,
|
||||||
|
-- bg = "NONE",
|
||||||
|
-- bold = false,
|
||||||
|
-- italic = false,
|
||||||
|
-- },
|
||||||
|
-- DiagnosticHint = {
|
||||||
|
-- fg = colors.cyan,
|
||||||
|
-- bg = "NONE",
|
||||||
|
-- bold = false,
|
||||||
|
-- italic = false,
|
||||||
|
-- },
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
-- Aplicar el esquema de colores
|
||||||
|
vim.cmd.colorscheme("catppuccin")
|
13
.config/nvim/lua/autocmd.lua
Normal file
13
.config/nvim/lua/autocmd.lua
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
vim.api.nvim_create_autocmd("TextYankPost", {
|
||||||
|
desc = "Highlight when yanking (copying) text",
|
||||||
|
group = vim.api.nvim_create_augroup("kickstart-highlight-yank", { clear = true }),
|
||||||
|
callback = function()
|
||||||
|
vim.highlight.on_yank()
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
-- vim.api.nvim_create_autocmd("BufWritePre", {
|
||||||
|
-- group = vim.api.nvim_create_augroup("tomkoidgroup", {}),
|
||||||
|
-- pattern = "*",
|
||||||
|
-- command = [[%s/\s\+$//e]],
|
||||||
|
-- })
|
23
.config/nvim/lua/filetype.lua
Normal file
23
.config/nvim/lua/filetype.lua
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
-- Archivo: ~/.config/nvim/lua/filetype.lua
|
||||||
|
|
||||||
|
-- Asocia archivos específicos con el tipo de archivo 'ansible'
|
||||||
|
vim.api.nvim_create_autocmd("BufRead,BufNewFile", {
|
||||||
|
pattern = { "*.yml", "*.yaml" },
|
||||||
|
callback = function()
|
||||||
|
local is_ansible = false
|
||||||
|
local cwd = vim.fn.getcwd()
|
||||||
|
-- Puedes agregar más patrones o condiciones según la estructura de tu proyecto
|
||||||
|
if vim.fn.glob(cwd .. "/ansible.cfg") ~= "" or
|
||||||
|
vim.fn.glob(cwd .. "/playbook.yml") ~= "" then
|
||||||
|
is_ansible = true
|
||||||
|
end
|
||||||
|
|
||||||
|
if is_ansible then
|
||||||
|
vim.bo.filetype = "ansible"
|
||||||
|
else
|
||||||
|
-- Opcional: asignar 'yaml' si no es Ansible
|
||||||
|
vim.bo.filetype = "yaml"
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
20
.config/nvim/lua/filetype.lua_back
Normal file
20
.config/nvim/lua/filetype.lua_back
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
-- Archivo: ~/.config/nvim/lua/filetype.lua
|
||||||
|
|
||||||
|
-- Asocia archivos específicos con yaml.ansible
|
||||||
|
vim.api.nvim_create_autocmd("BufRead,BufNewFile", {
|
||||||
|
pattern = { "*.yml", "*.yaml" },
|
||||||
|
callback = function()
|
||||||
|
local is_ansible = false
|
||||||
|
local cwd = vim.fn.getcwd()
|
||||||
|
-- Puedes agregar más patrones o condiciones según la estructura de tu proyecto
|
||||||
|
if vim.fn.glob(cwd .. "/ansible.cfg") ~= "" or
|
||||||
|
vim.fn.glob(cwd .. "/playbook.yml") ~= "" then
|
||||||
|
is_ansible = true
|
||||||
|
end
|
||||||
|
|
||||||
|
if is_ansible then
|
||||||
|
vim.bo.filetype = "yaml.ansible"
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
46
.config/nvim/lua/lazy_init.lua
Normal file
46
.config/nvim/lua/lazy_init.lua
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||||
|
if not vim.loop.fs_stat(lazypath) then
|
||||||
|
local lazyrepo = "https://github.com/folke/lazy.nvim.git"
|
||||||
|
vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
|
||||||
|
end ---@diagnostic disable-next-line: undefined-field
|
||||||
|
vim.opt.rtp:prepend(lazypath)
|
||||||
|
|
||||||
|
-- [[ Configure and install plugins ]]
|
||||||
|
--
|
||||||
|
-- To check the current status of your plugins, run
|
||||||
|
-- :Lazy
|
||||||
|
--
|
||||||
|
-- You can press `?` in this menu for help. Use `:q` to close the window
|
||||||
|
--
|
||||||
|
-- To update plugins you can run
|
||||||
|
-- :Lazy update
|
||||||
|
--
|
||||||
|
-- NOTE: Here is where you install your plugins.
|
||||||
|
require("lazy").setup({
|
||||||
|
spec = "plugins",
|
||||||
|
"github/copilot.vim",
|
||||||
|
change_detection = { notify = false },
|
||||||
|
}, {
|
||||||
|
ui = {
|
||||||
|
-- If you are using a Nerd Font: set icons to an empty table which will use the
|
||||||
|
-- default lazy.nvim defined Nerd Font icons, otherwise define a unicode icons table
|
||||||
|
icons = vim.g.have_nerd_font and {} or {
|
||||||
|
cmd = "⌘",
|
||||||
|
config = "🛠",
|
||||||
|
event = "📅",
|
||||||
|
ft = "📂",
|
||||||
|
init = "⚙",
|
||||||
|
keys = "🗝",
|
||||||
|
plugin = "🔌",
|
||||||
|
runtime = "💻",
|
||||||
|
require = "🌙",
|
||||||
|
source = "📄",
|
||||||
|
start = "🚀",
|
||||||
|
task = "📌",
|
||||||
|
lazy = "💤 ",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
-- The line beneath this is called `modeline`. See `:help modeline`
|
||||||
|
-- vim: ts=2 sts=2 sw=2 et
|
13
.config/nvim/lua/plugins/ansible.lua
Normal file
13
.config/nvim/lua/plugins/ansible.lua
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
-- Archivo: ~/.config/nvim/lua/plugins/ansible.lua
|
||||||
|
|
||||||
|
return {
|
||||||
|
{
|
||||||
|
"pearofducks/ansible-vim",
|
||||||
|
ft = { "ansible", "ansible-jinja", "yaml.ansible" }, -- Cargar para tipos de archivo 'ansible' y 'yaml.ansible'
|
||||||
|
config = function()
|
||||||
|
-- Configuraciones adicionales para ansible-vim (si es necesario)
|
||||||
|
-- Por ejemplo, puedes habilitar funciones específicas o personalizar el resaltado
|
||||||
|
vim.g.ansible_vim_highlight_extra_tasks = 1
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
13
.config/nvim/lua/plugins/autopairs.lua
Normal file
13
.config/nvim/lua/plugins/autopairs.lua
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
return {
|
||||||
|
"windwp/nvim-autopairs",
|
||||||
|
event = "InsertEnter",
|
||||||
|
-- Optional dependency
|
||||||
|
dependencies = { "hrsh7th/nvim-cmp" },
|
||||||
|
config = function()
|
||||||
|
require("nvim-autopairs").setup({})
|
||||||
|
-- If you want to automatically add `(` after selecting a function or method
|
||||||
|
local cmp_autopairs = require("nvim-autopairs.completion.cmp")
|
||||||
|
local cmp = require("cmp")
|
||||||
|
cmp.event:on("confirm_done", cmp_autopairs.on_confirm_done())
|
||||||
|
end,
|
||||||
|
}
|
47
.config/nvim/lua/plugins/avante.lua
Normal file
47
.config/nvim/lua/plugins/avante.lua
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
return {
|
||||||
|
{
|
||||||
|
"yetone/avante.nvim",
|
||||||
|
event = "VeryLazy",
|
||||||
|
lazy = false,
|
||||||
|
version = false, -- siempre obtiene la última versión
|
||||||
|
opts = {
|
||||||
|
provider = "deepseek",
|
||||||
|
vendors = {
|
||||||
|
deepseek = {
|
||||||
|
__inherited_from = "openai",
|
||||||
|
api_key_name = "sk-0d84636ee66543faa57f49ab32b2d9d2",
|
||||||
|
endpoint = "https://api.deepseek.com",
|
||||||
|
model = "deepseek-coder",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
build = "make", -- Si deseas compilar desde fuente, usa `make BUILD_FROM_SOURCE=true`
|
||||||
|
dependencies = {
|
||||||
|
"nvim-treesitter/nvim-treesitter",
|
||||||
|
"stevearc/dressing.nvim",
|
||||||
|
"nvim-lua/plenary.nvim",
|
||||||
|
"MunifTanjim/nui.nvim",
|
||||||
|
"nvim-tree/nvim-web-devicons",
|
||||||
|
"zbirenbaum/copilot.lua",
|
||||||
|
{
|
||||||
|
"HakonHarnes/img-clip.nvim",
|
||||||
|
event = "VeryLazy",
|
||||||
|
opts = {
|
||||||
|
default = {
|
||||||
|
embed_image_as_base64 = false,
|
||||||
|
prompt_for_file_name = false,
|
||||||
|
drag_and_drop = { insert_mode = true },
|
||||||
|
use_absolute_path = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'MeanderingProgrammer/render-markdown.nvim',
|
||||||
|
opts = {
|
||||||
|
file_types = { "markdown", "Avante" },
|
||||||
|
},
|
||||||
|
ft = { "markdown", "Avante" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
38
.config/nvim/lua/plugins/chatgpt.lua
Normal file
38
.config/nvim/lua/plugins/chatgpt.lua
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
return {
|
||||||
|
{
|
||||||
|
"jackMort/ChatGPT.nvim",
|
||||||
|
event = "VeryLazy",
|
||||||
|
dependencies = {
|
||||||
|
"MunifTanjim/nui.nvim",
|
||||||
|
"nvim-lua/plenary.nvim",
|
||||||
|
"folke/trouble.nvim",
|
||||||
|
"nvim-telescope/telescope.nvim"
|
||||||
|
},
|
||||||
|
config = function()
|
||||||
|
local chatgpt = require("chatgpt")
|
||||||
|
chatgpt.setup({
|
||||||
|
openai_params = {
|
||||||
|
model = "gpt-4-1106-preview", -- O usa "gpt-3.5-turbo" si prefieres rapidez
|
||||||
|
max_tokens = 4095,
|
||||||
|
temperature = 0.2,
|
||||||
|
top_p = 0.1,
|
||||||
|
n = 1,
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
-- Crear comando `:ChatGPTComplete` para insertar código como snippet
|
||||||
|
vim.api.nvim_create_user_command("ChatGPTComplete", function()
|
||||||
|
chatgpt.edit_with_instructions({
|
||||||
|
callback = function(output)
|
||||||
|
local lines = vim.split(output, "\n")
|
||||||
|
local snippet = table.concat(lines, "\n")
|
||||||
|
vim.fn["vsnip#anonymous"](snippet)
|
||||||
|
end
|
||||||
|
})
|
||||||
|
end, {})
|
||||||
|
|
||||||
|
-- Atajo de teclado para autocompletar con IA
|
||||||
|
vim.keymap.set("n", "<leader>ac", "<cmd>ChatGPTComplete<CR>", { noremap = true, silent = true })
|
||||||
|
end,
|
||||||
|
}
|
||||||
|
}
|
15
.config/nvim/lua/plugins/chatgpt.lua_backup
Normal file
15
.config/nvim/lua/plugins/chatgpt.lua_backup
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
-- ~/.config/nvim/lua/plugins/chatgpt.lua
|
||||||
|
|
||||||
|
return {
|
||||||
|
"jackMort/ChatGPT.nvim",
|
||||||
|
dependencies = {
|
||||||
|
"MunifTanjim/nui.nvim",
|
||||||
|
"nvim-lua/plenary.nvim",
|
||||||
|
"nvim-telescope/telescope.nvim",
|
||||||
|
},
|
||||||
|
config = function()
|
||||||
|
require("chatgpt").setup({
|
||||||
|
-- Configuración personalizada (opcional)
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
}
|
92
.config/nvim/lua/plugins/cmp.lua
Normal file
92
.config/nvim/lua/plugins/cmp.lua
Normal file
@ -0,0 +1,92 @@
|
|||||||
|
return {
|
||||||
|
{ -- Autocompletion
|
||||||
|
"hrsh7th/nvim-cmp",
|
||||||
|
event = "InsertEnter",
|
||||||
|
dependencies = {
|
||||||
|
-- Snippet Engine & su integración con nvim-cmp
|
||||||
|
{ "L3MON4D3/LuaSnip" },
|
||||||
|
"saadparwaiz1/cmp_luasnip",
|
||||||
|
|
||||||
|
-- Soporte para LSP, rutas y buffers
|
||||||
|
"hrsh7th/cmp-nvim-lsp",
|
||||||
|
"hrsh7th/cmp-path",
|
||||||
|
"hrsh7th/cmp-buffer",
|
||||||
|
|
||||||
|
-- Copilot
|
||||||
|
{
|
||||||
|
"zbirenbaum/copilot-cmp",
|
||||||
|
after = { "copilot.lua" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
config = function()
|
||||||
|
local cmp = require("cmp")
|
||||||
|
local luasnip = require("luasnip")
|
||||||
|
luasnip.config.setup({})
|
||||||
|
|
||||||
|
-- Mapeos para moverse en los snippets
|
||||||
|
vim.keymap.set({ "i", "s" }, "<C-k>", function()
|
||||||
|
if luasnip.expand_or_jumpable() then
|
||||||
|
luasnip.expand_or_jump()
|
||||||
|
end
|
||||||
|
end, { silent = true })
|
||||||
|
|
||||||
|
cmp.setup({
|
||||||
|
snippet = {
|
||||||
|
expand = function(args)
|
||||||
|
luasnip.lsp_expand(args.body)
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
completion = { completeopt = "menu,menuone,noinsert" },
|
||||||
|
|
||||||
|
mapping = cmp.mapping.preset.insert({
|
||||||
|
["<C-n>"] = cmp.mapping.select_next_item(),
|
||||||
|
["<C-p>"] = cmp.mapping.select_prev_item(),
|
||||||
|
["<C-y>"] = cmp.mapping.confirm({ select = true }),
|
||||||
|
["<C-Space>"] = cmp.mapping.complete(),
|
||||||
|
}),
|
||||||
|
|
||||||
|
sources = cmp.config.sources({
|
||||||
|
{ name = "copilot", group_index = 1 }, -- Prioridad 1
|
||||||
|
{ name = "nvim_lsp", group_index = 2 }, -- Prioridad 2
|
||||||
|
{ name = "luasnip", group_index = 3 }, -- Prioridad 3
|
||||||
|
{ name = "buffer", group_index = 4 }, -- Prioridad 4
|
||||||
|
{ name = "path", group_index = 5 }, -- Prioridad 5
|
||||||
|
}),
|
||||||
|
|
||||||
|
formatting = {
|
||||||
|
format = function(entry, vim_item)
|
||||||
|
local icons = {
|
||||||
|
copilot = " [Copilot]",
|
||||||
|
nvim_lsp = " [LSP]",
|
||||||
|
luasnip = " [Snippet]",
|
||||||
|
buffer = " [Buffer]",
|
||||||
|
path = " [Path]",
|
||||||
|
}
|
||||||
|
vim_item.kind = icons[entry.source.name] or vim_item.kind
|
||||||
|
return vim_item
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
-- Copilot.lua (Para integrar Copilot con nvim-cmp)
|
||||||
|
{
|
||||||
|
"zbirenbaum/copilot.lua",
|
||||||
|
cmd = "Copilot",
|
||||||
|
event = "InsertEnter",
|
||||||
|
config = function()
|
||||||
|
require("copilot").setup({
|
||||||
|
suggestion = { enabled = false }, -- Usa `nvim-cmp` en lugar de la ventana flotante de Copilot
|
||||||
|
panel = { enabled = false },
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
-- Soporte para autocompletado de rutas
|
||||||
|
{
|
||||||
|
"hrsh7th/cmp-path",
|
||||||
|
event = "InsertEnter",
|
||||||
|
},
|
||||||
|
}
|
92
.config/nvim/lua/plugins/cmp.lua_back
Normal file
92
.config/nvim/lua/plugins/cmp.lua_back
Normal file
@ -0,0 +1,92 @@
|
|||||||
|
return {
|
||||||
|
{ -- Autocompletion
|
||||||
|
"hrsh7th/nvim-cmp",
|
||||||
|
event = "InsertEnter",
|
||||||
|
dependencies = {
|
||||||
|
-- Snippet Engine & su integración con nvim-cmp
|
||||||
|
{ "L3MON4D3/LuaSnip" },
|
||||||
|
"saadparwaiz1/cmp_luasnip",
|
||||||
|
|
||||||
|
-- Soporte para LSP, rutas y buffers
|
||||||
|
"hrsh7th/cmp-nvim-lsp",
|
||||||
|
"hrsh7th/cmp-path",
|
||||||
|
"hrsh7th/cmp-buffer",
|
||||||
|
|
||||||
|
-- Copilot
|
||||||
|
{
|
||||||
|
"zbirenbaum/copilot-cmp",
|
||||||
|
after = { "copilot.lua" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
config = function()
|
||||||
|
local cmp = require("cmp")
|
||||||
|
local luasnip = require("luasnip")
|
||||||
|
luasnip.config.setup({})
|
||||||
|
|
||||||
|
-- Mapeos para moverse en los snippets
|
||||||
|
vim.keymap.set({ "i", "s" }, "<C-k>", function()
|
||||||
|
if luasnip.expand_or_jumpable() then
|
||||||
|
luasnip.expand_or_jump()
|
||||||
|
end
|
||||||
|
end, { silent = true })
|
||||||
|
|
||||||
|
cmp.setup({
|
||||||
|
snippet = {
|
||||||
|
expand = function(args)
|
||||||
|
luasnip.lsp_expand(args.body)
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
completion = { completeopt = "menu,menuone,noinsert" },
|
||||||
|
|
||||||
|
mapping = cmp.mapping.preset.insert({
|
||||||
|
["<C-n>"] = cmp.mapping.select_next_item(),
|
||||||
|
["<C-p>"] = cmp.mapping.select_prev_item(),
|
||||||
|
["<C-y>"] = cmp.mapping.confirm({ select = true }),
|
||||||
|
["<C-Space>"] = cmp.mapping.complete(),
|
||||||
|
}),
|
||||||
|
|
||||||
|
sources = cmp.config.sources({
|
||||||
|
{ name = "copilot", group_index = 1 }, -- Prioridad 1
|
||||||
|
{ name = "nvim_lsp", group_index = 2 }, -- Prioridad 2
|
||||||
|
{ name = "luasnip", group_index = 3 }, -- Prioridad 3
|
||||||
|
{ name = "buffer", group_index = 4 }, -- Prioridad 4
|
||||||
|
{ name = "path", group_index = 5 }, -- Prioridad 5
|
||||||
|
}),
|
||||||
|
|
||||||
|
formatting = {
|
||||||
|
format = function(entry, vim_item)
|
||||||
|
local icons = {
|
||||||
|
copilot = " [Copilot]",
|
||||||
|
nvim_lsp = " [LSP]",
|
||||||
|
luasnip = " [Snippet]",
|
||||||
|
buffer = " [Buffer]",
|
||||||
|
path = " [Path]",
|
||||||
|
}
|
||||||
|
vim_item.kind = icons[entry.source.name] or vim_item.kind
|
||||||
|
return vim_item
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
-- Copilot.lua (Para integrar Copilot con nvim-cmp)
|
||||||
|
{
|
||||||
|
"zbirenbaum/copilot.lua",
|
||||||
|
cmd = "Copilot",
|
||||||
|
event = "InsertEnter",
|
||||||
|
config = function()
|
||||||
|
require("copilot").setup({
|
||||||
|
suggestion = { enabled = false }, -- Usa `nvim-cmp` en lugar de la ventana flotante de Copilot
|
||||||
|
panel = { enabled = false },
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
-- Soporte para autocompletado de rutas
|
||||||
|
{
|
||||||
|
"hrsh7th/cmp-path",
|
||||||
|
event = "InsertEnter",
|
||||||
|
},
|
||||||
|
}
|
7
.config/nvim/lua/plugins/comment.lua
Normal file
7
.config/nvim/lua/plugins/comment.lua
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
return {
|
||||||
|
'numToStr/Comment.nvim',
|
||||||
|
opts = {
|
||||||
|
-- add any options here
|
||||||
|
},
|
||||||
|
lazy = false,
|
||||||
|
}
|
25
.config/nvim/lua/plugins/companion.lua
Normal file
25
.config/nvim/lua/plugins/companion.lua
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
return {
|
||||||
|
"olimorris/codecompanion.nvim",
|
||||||
|
dependencies = {
|
||||||
|
"nvim-lua/plenary.nvim",
|
||||||
|
"nvim-treesitter/nvim-treesitter",
|
||||||
|
},
|
||||||
|
config = function()
|
||||||
|
require("codecompanion").setup({
|
||||||
|
adapters = {
|
||||||
|
deepseek = function()
|
||||||
|
return require("codecompanion.adapters").extend("deepseek", {
|
||||||
|
env = {
|
||||||
|
api_key = "sk-0d84636ee66543faa57f49ab32b2d9d2",
|
||||||
|
},
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
strategies = {
|
||||||
|
chat = { adapter = "deepseek", },
|
||||||
|
inline = { adapter = "deepseek" },
|
||||||
|
agent = { adapter = "deepseek" },
|
||||||
|
},
|
||||||
|
})
|
||||||
|
end
|
||||||
|
}
|
59
.config/nvim/lua/plugins/conform.lua
Normal file
59
.config/nvim/lua/plugins/conform.lua
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
return {
|
||||||
|
{ -- Autoformat
|
||||||
|
"stevearc/conform.nvim",
|
||||||
|
lazy = false,
|
||||||
|
keys = {
|
||||||
|
{
|
||||||
|
"<leader>f",
|
||||||
|
function()
|
||||||
|
require("conform").format({ async = true, lsp_fallback = true })
|
||||||
|
end,
|
||||||
|
mode = "",
|
||||||
|
desc = "[F]ormat buffer",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
opts = {
|
||||||
|
notify_on_error = false,
|
||||||
|
-- format_on_save = function(bufnr)
|
||||||
|
-- -- Disable "format_on_save lsp_fallback" for languages that don't
|
||||||
|
-- -- have a well standardized coding style. You can add additional
|
||||||
|
-- -- languages here or re-enable it for the disabled ones.
|
||||||
|
-- local disable_filetypes = { c = true, cpp = true }
|
||||||
|
-- return {
|
||||||
|
-- timeout_ms = 500,
|
||||||
|
-- lsp_fallback = not disable_filetypes[vim.bo[bufnr].filetype],
|
||||||
|
-- }
|
||||||
|
-- end,
|
||||||
|
lang_to_ext = {
|
||||||
|
c_sharp = "cs",
|
||||||
|
},
|
||||||
|
formatters_by_ft = {
|
||||||
|
lua = { "stylua" },
|
||||||
|
go = { "gofmt", "golines", "goimports-reviser" },
|
||||||
|
rust = { "rustfmt" },
|
||||||
|
c = { "clang-format" },
|
||||||
|
cpp = { "clang-format" },
|
||||||
|
cs = { "csharpier" },
|
||||||
|
h = { "clang-format" },
|
||||||
|
hpp = { "clang-format" },
|
||||||
|
nix = { "nixpkgs_fmt" },
|
||||||
|
-- Conform can also run multiple formatters sequentially
|
||||||
|
python = { "isort", "black" },
|
||||||
|
--
|
||||||
|
-- You can use a sub-list to tell conform to run *until* a formatter
|
||||||
|
-- is found.
|
||||||
|
javascript = { { "prettierd", "prettier" } },
|
||||||
|
css = { "stylelint", "prettier" },
|
||||||
|
scss = { "stylelint", "prettier" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
config = function()
|
||||||
|
vim.api.nvim_create_autocmd("BufWritePre", {
|
||||||
|
pattern = "*",
|
||||||
|
callback = function(args)
|
||||||
|
require("conform").format({ bufnr = args.buf, lsp_fallback = true })
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
36
.config/nvim/lua/plugins/copilot.lua
Normal file
36
.config/nvim/lua/plugins/copilot.lua
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
-- Archivo: lua/plugins/copilot.lua
|
||||||
|
|
||||||
|
return {
|
||||||
|
-- Plugin de copilot.lua
|
||||||
|
{
|
||||||
|
"zbirenbaum/copilot.lua",
|
||||||
|
event = "InsertEnter",
|
||||||
|
config = function()
|
||||||
|
require("copilot").setup({
|
||||||
|
panel = { enabled = false }, -- Desactiva el panel flotante de Copilot
|
||||||
|
suggestion = { enabled = true }, -- Habilita las sugerencias integradas de Copilot
|
||||||
|
filetypes = {
|
||||||
|
-- Habilita Copilot para todos los tipos de archivo excepto los siguientes
|
||||||
|
["*"] = true,
|
||||||
|
markdown = false,
|
||||||
|
help = false,
|
||||||
|
gitcommit = false,
|
||||||
|
gitrebase = false,
|
||||||
|
hgcommit = false,
|
||||||
|
svn = false,
|
||||||
|
cvs = false,
|
||||||
|
["."] = false,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
-- Plugin de integración con nvim-cmp
|
||||||
|
{
|
||||||
|
"zbirenbaum/copilot-cmp",
|
||||||
|
dependencies = { "zbirenbaum/copilot.lua" }, -- Reemplaza 'after' con 'dependencies'
|
||||||
|
config = function()
|
||||||
|
require("copilot_cmp").setup()
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
5
.config/nvim/lua/plugins/indent-blankline.lua
Normal file
5
.config/nvim/lua/plugins/indent-blankline.lua
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
return {
|
||||||
|
"lukas-reineke/indent-blankline.nvim",
|
||||||
|
main = "ibl",
|
||||||
|
opts = {}
|
||||||
|
}
|
149
.config/nvim/lua/plugins/init.lua
Normal file
149
.config/nvim/lua/plugins/init.lua
Normal file
@ -0,0 +1,149 @@
|
|||||||
|
-- Archivo: ~/.config/nvim/init.lua
|
||||||
|
|
||||||
|
-- 1. Cargar configuraciones de tipos de archivo antes de plugins
|
||||||
|
pcall(require, 'filetype') -- Ignorar errores si filetype.lua no existe
|
||||||
|
|
||||||
|
-- 2. Definir la lista principal de plugins
|
||||||
|
local plugins = {
|
||||||
|
"tpope/vim-sleuth", -- Detecta automáticamente tabstop y shiftwidth
|
||||||
|
|
||||||
|
-- "gc" para comentar regiones/lineas visuales
|
||||||
|
{ "numToStr/Comment.nvim", opts = {} },
|
||||||
|
|
||||||
|
{ -- Añade signos relacionados con Git al gutter, además de utilidades para gestionar cambios
|
||||||
|
"lewis6991/gitsigns.nvim",
|
||||||
|
opts = {},
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
-- Si quieres ver qué esquemas de colores ya están instalados, puedes usar `:Telescope colorscheme`.
|
||||||
|
"catppuccin/nvim",
|
||||||
|
priority = 1000, -- Asegúrate de cargar esto antes que otros plugins de inicio.
|
||||||
|
init = function()
|
||||||
|
-- Cargar el esquema de colores aquí.
|
||||||
|
vim.cmd.colorscheme("catppuccin-mocha")
|
||||||
|
|
||||||
|
-- Puedes configurar highlights de la siguiente manera:
|
||||||
|
vim.cmd.hi("Comment gui=none")
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
-- Resalta TODOs, notas, etc. en comentarios
|
||||||
|
{
|
||||||
|
"folke/todo-comments.nvim",
|
||||||
|
event = "VimEnter",
|
||||||
|
dependencies = { "nvim-lua/plenary.nvim" },
|
||||||
|
opts = { signs = false },
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"nvim-lualine/lualine.nvim",
|
||||||
|
opts = {
|
||||||
|
options = {
|
||||||
|
disabled_filetypes = { "NERDTree", "NvimTree_1" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{ "vimwiki/vimwiki" },
|
||||||
|
{
|
||||||
|
"NvChad/nvim-colorizer.lua",
|
||||||
|
config = function()
|
||||||
|
require("colorizer").setup()
|
||||||
|
end,
|
||||||
|
}, -- Coloriza colores hexadecimales
|
||||||
|
{
|
||||||
|
"f-person/git-blame.nvim",
|
||||||
|
config = function()
|
||||||
|
require("gitblame").setup({ enabled = true })
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"lambdalisue/suda.vim",
|
||||||
|
},
|
||||||
|
{ "windwp/nvim-ts-autotag" },
|
||||||
|
-- Lazy.nvim
|
||||||
|
{
|
||||||
|
"hiasr/vim-zellij-navigator.nvim",
|
||||||
|
config = function()
|
||||||
|
require("vim-zellij-navigator").setup()
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"danymat/neogen",
|
||||||
|
config = function()
|
||||||
|
local neogen = require("neogen")
|
||||||
|
|
||||||
|
neogen.setup({
|
||||||
|
snippet_engine = "luasnip",
|
||||||
|
})
|
||||||
|
|
||||||
|
local opts = { noremap = true, silent = true }
|
||||||
|
vim.keymap.set("n", "<leader>nc", function()
|
||||||
|
neogen.generate({ snippet_engine = "luasnip" })
|
||||||
|
end, opts)
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
-- 3. Cargar los plugins de LSP desde 'lua/plugins/lsp.lua'
|
||||||
|
local ok, lsp_plugins = pcall(require, 'plugins.lsp')
|
||||||
|
if not ok then
|
||||||
|
vim.notify("Error al cargar 'plugins.lsp': " .. lsp_plugins, vim.log.levels.ERROR)
|
||||||
|
lsp_plugins = {}
|
||||||
|
end
|
||||||
|
|
||||||
|
-- 4. Verificar que lsp_plugins sea una tabla
|
||||||
|
if type(lsp_plugins) ~= 'table' then
|
||||||
|
vim.notify("'plugins.lsp' no retorna una tabla. Verifica su configuración.", vim.log.levels.ERROR)
|
||||||
|
lsp_plugins = {}
|
||||||
|
end
|
||||||
|
|
||||||
|
-- 5. Combinar ambas listas de plugins
|
||||||
|
vim.list_extend(plugins, lsp_plugins)
|
||||||
|
|
||||||
|
-- 6. Cargar configuraciones adicionales de plugins (como ansible.lua)
|
||||||
|
local ok_ansible, ansible_plugins = pcall(require, 'plugins.ansible')
|
||||||
|
if not ok_ansible then
|
||||||
|
vim.notify("Error al cargar 'plugins.ansible': " .. ansible_plugins, vim.log.levels.ERROR)
|
||||||
|
ansible_plugins = {}
|
||||||
|
end
|
||||||
|
|
||||||
|
if type(ansible_plugins) ~= 'table' then
|
||||||
|
vim.notify("'plugins.ansible' no retorna una tabla. Verifica su configuración.", vim.log.levels.ERROR)
|
||||||
|
ansible_plugins = {}
|
||||||
|
end
|
||||||
|
|
||||||
|
vim.list_extend(plugins, ansible_plugins)
|
||||||
|
|
||||||
|
-- 7. Cargar configuraciones adicionales de plugins (como copilot.lua)
|
||||||
|
local ok_copilot, copilot_plugins = pcall(require, 'plugins.copilot')
|
||||||
|
if not ok_copilot then
|
||||||
|
vim.notify("Error al cargar 'plugins.copilot': " .. copilot_plugins, vim.log.levels.ERROR)
|
||||||
|
copilot_plugins = {}
|
||||||
|
end
|
||||||
|
|
||||||
|
if type(copilot_plugins) ~= 'table' then
|
||||||
|
vim.notify("'plugins.copilot' no retorna una tabla. Verifica su configuración.", vim.log.levels.ERROR)
|
||||||
|
copilot_plugins = {}
|
||||||
|
end
|
||||||
|
|
||||||
|
vim.list_extend(plugins, copilot_plugins)
|
||||||
|
|
||||||
|
-- 8. Cargar configuraciones adicionales de plugins (como nvim-cmp.lua) [Opcional]
|
||||||
|
-- Si has separado la configuración de nvim-cmp, cárgala aquí
|
||||||
|
local ok_cmp, cmp_plugins = pcall(require, 'plugins.nvim-cmp')
|
||||||
|
if not ok_cmp then
|
||||||
|
vim.notify("Error al cargar 'plugins.nvim-cmp': " .. cmp_plugins, vim.log.levels.ERROR)
|
||||||
|
cmp_plugins = {}
|
||||||
|
end
|
||||||
|
|
||||||
|
if type(cmp_plugins) ~= 'table' then
|
||||||
|
vim.notify("'plugins.nvim-cmp' no retorna una tabla. Verifica su configuración.", vim.log.levels.ERROR)
|
||||||
|
cmp_plugins = {}
|
||||||
|
end
|
||||||
|
|
||||||
|
vim.list_extend(plugins, cmp_plugins)
|
||||||
|
|
||||||
|
-- 9. Retornar la lista combinada para Lazy.nvim
|
||||||
|
return plugins
|
97
.config/nvim/lua/plugins/init.lua_backup
Normal file
97
.config/nvim/lua/plugins/init.lua_backup
Normal file
@ -0,0 +1,97 @@
|
|||||||
|
---@author tomkoid
|
||||||
|
---@license MIT
|
||||||
|
|
||||||
|
-- Definir la lista principal de plugins
|
||||||
|
local plugins = {
|
||||||
|
"tpope/vim-sleuth", -- Detect tabstop and shiftwidth automatically
|
||||||
|
|
||||||
|
-- "gc" to comment visual regions/lines
|
||||||
|
{ "numToStr/Comment.nvim", opts = {} },
|
||||||
|
|
||||||
|
{ -- Adds git related signs to the gutter, as well as utilities for managing changes
|
||||||
|
"lewis6991/gitsigns.nvim",
|
||||||
|
opts = {},
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
-- If you want to see what colorschemes are already installed, you can use `:Telescope colorscheme`.
|
||||||
|
"catppuccin/nvim",
|
||||||
|
priority = 1000, -- Make sure to load this before all the other start plugins.
|
||||||
|
init = function()
|
||||||
|
-- Load the colorscheme here.
|
||||||
|
-- Like many other themes, this one has different styles, and you could load
|
||||||
|
-- any other, such as 'tokyonight-storm', 'tokyonight-moon', or 'tokyonight-day'.
|
||||||
|
vim.cmd.colorscheme("catppuccin-mocha")
|
||||||
|
|
||||||
|
-- You can configure highlights by doing something like:
|
||||||
|
vim.cmd.hi("Comment gui=none")
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
-- Highlight todo, notes, etc in comments
|
||||||
|
{
|
||||||
|
"folke/todo-comments.nvim",
|
||||||
|
event = "VimEnter",
|
||||||
|
dependencies = { "nvim-lua/plenary.nvim" },
|
||||||
|
opts = { signs = false },
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"nvim-lualine/lualine.nvim",
|
||||||
|
opts = {
|
||||||
|
options = {
|
||||||
|
disabled_filetypes = { "NERDTree", "NvimTree_1" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{ "vimwiki/vimwiki" },
|
||||||
|
{
|
||||||
|
"NvChad/nvim-colorizer.lua",
|
||||||
|
config = function()
|
||||||
|
require("colorizer").setup()
|
||||||
|
end,
|
||||||
|
}, -- colorize hex colors
|
||||||
|
{
|
||||||
|
"f-person/git-blame.nvim",
|
||||||
|
config = function()
|
||||||
|
require("gitblame").setup({ enabled = true })
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"lambdalisue/suda.vim",
|
||||||
|
},
|
||||||
|
{ "windwp/nvim-ts-autotag" },
|
||||||
|
-- Lazy.nvim
|
||||||
|
{
|
||||||
|
"hiasr/vim-zellij-navigator.nvim",
|
||||||
|
config = function()
|
||||||
|
require("vim-zellij-navigator").setup()
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"danymat/neogen",
|
||||||
|
config = function()
|
||||||
|
local neogen = require("neogen")
|
||||||
|
|
||||||
|
neogen.setup({
|
||||||
|
snippet_engine = "luasnip",
|
||||||
|
})
|
||||||
|
|
||||||
|
local opts = { noremap = true, silent = true }
|
||||||
|
vim.keymap.set("n", "<leader>nc", function()
|
||||||
|
neogen.generate({ snippet_engine = "luasnip" })
|
||||||
|
end, opts)
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
-- Cargar los plugins de LSP desde 'lua/plugins/lsp.lua'
|
||||||
|
local lsp_plugins = require('plugins.lsp')
|
||||||
|
|
||||||
|
-- Combinar ambas listas de plugins
|
||||||
|
local combined_plugins = vim.list_extend(plugins, lsp_plugins)
|
||||||
|
|
||||||
|
-- Retornar la lista combinada para Lazy.nvim
|
||||||
|
return combined_plugins
|
||||||
|
|
21
.config/nvim/lua/plugins/lazygit.lua
Normal file
21
.config/nvim/lua/plugins/lazygit.lua
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
return {
|
||||||
|
{
|
||||||
|
"kdheepak/lazygit.nvim",
|
||||||
|
cmd = {
|
||||||
|
"LazyGit",
|
||||||
|
"LazyGitConfig",
|
||||||
|
"LazyGitCurrentFile",
|
||||||
|
"LazyGitFilter",
|
||||||
|
"LazyGitFilterCurrentFile",
|
||||||
|
},
|
||||||
|
-- optional for floating window border decoration
|
||||||
|
dependencies = {
|
||||||
|
"nvim-lua/plenary.nvim",
|
||||||
|
},
|
||||||
|
-- setting the keybinding for LazyGit with 'keys' is recommended in
|
||||||
|
-- order to load the plugin when the command is run for the first time
|
||||||
|
keys = {
|
||||||
|
{ "<leader>lg", "<cmd>LazyGit<cr>", desc = "LazyGit" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
106
.config/nvim/lua/plugins/lsp.lua
Normal file
106
.config/nvim/lua/plugins/lsp.lua
Normal file
@ -0,0 +1,106 @@
|
|||||||
|
return {
|
||||||
|
{ -- Configuración de LSP y Plugins
|
||||||
|
"neovim/nvim-lspconfig",
|
||||||
|
dependencies = {
|
||||||
|
{ "williamboman/mason.nvim", config = true },
|
||||||
|
"williamboman/mason-lspconfig.nvim",
|
||||||
|
"WhoIsSethDaniel/mason-tool-installer.nvim",
|
||||||
|
{
|
||||||
|
"j-hui/fidget.nvim",
|
||||||
|
opts = {}
|
||||||
|
},
|
||||||
|
{ "folke/neodev.nvim", opts = {} },
|
||||||
|
},
|
||||||
|
|
||||||
|
config = function()
|
||||||
|
-- 1. Definir la tabla de servidores con sus configuraciones específicas
|
||||||
|
local servers = {
|
||||||
|
-- Configuración para Lua
|
||||||
|
lua_ls = {
|
||||||
|
settings = {
|
||||||
|
Lua = {
|
||||||
|
completion = {
|
||||||
|
callSnippet = "Replace",
|
||||||
|
},
|
||||||
|
workspace = {
|
||||||
|
-- SOLO ANALIZA ARCHIVOS DE NEOVIM
|
||||||
|
library = {
|
||||||
|
vim.fn.expand("$VIMRUNTIME"),
|
||||||
|
vim.fn.stdpath("config"),
|
||||||
|
},
|
||||||
|
checkThirdParty = false, -- Evita advertencias de paquetes externos
|
||||||
|
maxPreload = 1000, -- Reduce archivos precargados
|
||||||
|
preloadFileSize = 100, -- Límite de tamaño de archivos analizados
|
||||||
|
},
|
||||||
|
diagnostics = {
|
||||||
|
globals = { "vim" }, -- Evita advertencias sobre `vim` no definido
|
||||||
|
disable = { "missing-fields" }
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
-- **EVITA QUE NEOVIM USE /home/teraflops COMO ROOT**
|
||||||
|
root_dir = function(fname)
|
||||||
|
return require("lspconfig.util").find_git_ancestor(fname) or vim.fn.stdpath("config")
|
||||||
|
end,
|
||||||
|
}, -- ✅ CORRECCIÓN: Coma agregada para separar configuraciones
|
||||||
|
|
||||||
|
-- **Configuración para Ansible Language Server (ansiblels)**
|
||||||
|
ansiblels = {
|
||||||
|
filetypes = { "ansible", "yaml.ansible" },
|
||||||
|
settings = {
|
||||||
|
ansible = {
|
||||||
|
ansible = {
|
||||||
|
path = "ansible"
|
||||||
|
},
|
||||||
|
executionEnvironment = {
|
||||||
|
enabled = false
|
||||||
|
},
|
||||||
|
python = {
|
||||||
|
interpreterPath = "python"
|
||||||
|
},
|
||||||
|
validation = {
|
||||||
|
enabled = true,
|
||||||
|
lint = {
|
||||||
|
enabled = true,
|
||||||
|
path = "ansible-lint"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
-- 2. Definir capacidades extendidas (nvim-cmp)
|
||||||
|
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||||
|
capabilities = vim.tbl_deep_extend("force", capabilities, require("cmp_nvim_lsp").default_capabilities())
|
||||||
|
|
||||||
|
-- 3. Configurar Mason
|
||||||
|
require("mason").setup()
|
||||||
|
|
||||||
|
-- 4. Configurar Mason-LSPConfig
|
||||||
|
require("mason-lspconfig").setup({
|
||||||
|
ensure_installed = vim.tbl_keys(servers),
|
||||||
|
automatic_installation = true,
|
||||||
|
})
|
||||||
|
|
||||||
|
-- 5. Configurar Mason-Tool-Installer
|
||||||
|
local ensure_installed = vim.tbl_keys(servers or {})
|
||||||
|
vim.list_extend(ensure_installed, {
|
||||||
|
"stylua",
|
||||||
|
"ansible-language-server",
|
||||||
|
"ansible-lint",
|
||||||
|
})
|
||||||
|
require("mason-tool-installer").setup({ ensure_installed = ensure_installed })
|
||||||
|
|
||||||
|
-- 6. Configurar los servidores con sus respectivas configuraciones
|
||||||
|
require("mason-lspconfig").setup_handlers({
|
||||||
|
function(server_name)
|
||||||
|
local server = servers[server_name] or {}
|
||||||
|
server.capabilities = vim.tbl_deep_extend("force", {}, capabilities, server.capabilities or {})
|
||||||
|
require("lspconfig")[server_name].setup(server)
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
155
.config/nvim/lua/plugins/lsp.lua_back
Normal file
155
.config/nvim/lua/plugins/lsp.lua_back
Normal file
@ -0,0 +1,155 @@
|
|||||||
|
-- Archivo: ~/.config/nvim/lua/plugins/lsp.lua
|
||||||
|
|
||||||
|
return {
|
||||||
|
{ -- Configuración de LSP y Plugins
|
||||||
|
"neovim/nvim-lspconfig",
|
||||||
|
dependencies = {
|
||||||
|
-- Instala automáticamente LSPs y herramientas relacionadas en stdpath para Neovim
|
||||||
|
{ "williamboman/mason.nvim", config = true }, -- Debe cargarse antes que los dependientes
|
||||||
|
"williamboman/mason-lspconfig.nvim",
|
||||||
|
"WhoIsSethDaniel/mason-tool-installer.nvim",
|
||||||
|
|
||||||
|
-- Actualizaciones de estado útiles para LSP.
|
||||||
|
-- `opts = {}` es equivalente a llamar `require('fidget').setup({})`
|
||||||
|
{
|
||||||
|
"j-hui/fidget.nvim",
|
||||||
|
opts = {}
|
||||||
|
},
|
||||||
|
|
||||||
|
-- `neodev` configura Lua LSP para tu configuración de Neovim, runtime y plugins
|
||||||
|
-- utilizados para autocompletado, anotaciones y firmas de las APIs de Neovim
|
||||||
|
{ "folke/neodev.nvim", opts = {} },
|
||||||
|
},
|
||||||
|
config = function()
|
||||||
|
-- 1. Definir la tabla de servidores con sus configuraciones específicas
|
||||||
|
local servers = {
|
||||||
|
-- Configuración para Lua
|
||||||
|
lua_ls = {
|
||||||
|
settings = {
|
||||||
|
Lua = {
|
||||||
|
completion = {
|
||||||
|
callSnippet = "Replace",
|
||||||
|
},
|
||||||
|
workspace = {
|
||||||
|
library = vim.api.nvim_get_runtime_file("", true),
|
||||||
|
},
|
||||||
|
diagnostics = { disable = { "missing-fields" } },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
-- **Configuración para Ansible Language Server (ansiblels)**
|
||||||
|
ansiblels = {
|
||||||
|
filetypes = { "ansible", "yaml.ansible" }, -- Asociar 'ansiblels' con los tipos de archivo 'ansible' y 'yaml.ansible'
|
||||||
|
settings = {
|
||||||
|
ansible = {
|
||||||
|
ansible = {
|
||||||
|
path = "ansible" -- Ruta al ejecutable de ansible
|
||||||
|
},
|
||||||
|
executionEnvironment = {
|
||||||
|
enabled = false -- Habilita o deshabilita el entorno de ejecución
|
||||||
|
},
|
||||||
|
python = {
|
||||||
|
interpreterPath = "python" -- Ruta al intérprete de Python
|
||||||
|
},
|
||||||
|
validation = {
|
||||||
|
enabled = true, -- Habilita la validación
|
||||||
|
lint = {
|
||||||
|
enabled = true, -- Habilita el linting
|
||||||
|
path = "ansible-lint" -- Ruta al ejecutable de ansible-lint
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
-- 2. Definir capacidades extendidas (nvim-cmp)
|
||||||
|
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||||
|
capabilities = vim.tbl_deep_extend("force", capabilities, require("cmp_nvim_lsp").default_capabilities())
|
||||||
|
|
||||||
|
-- 3. Configurar Mason
|
||||||
|
require("mason").setup()
|
||||||
|
|
||||||
|
-- 4. Configurar Mason-LSPConfig
|
||||||
|
require("mason-lspconfig").setup({
|
||||||
|
ensure_installed = vim.tbl_keys(servers), -- Esto incluye 'ansiblels' si está en 'servers'
|
||||||
|
automatic_installation = true,
|
||||||
|
})
|
||||||
|
|
||||||
|
-- 5. Configurar Mason-Tool-Installer
|
||||||
|
local ensure_installed = vim.tbl_keys(servers or {})
|
||||||
|
vim.list_extend(ensure_installed, {
|
||||||
|
"stylua", -- Usado para formatear código Lua
|
||||||
|
"ansible-language-server", -- Asegurar que el servidor de Ansible esté instalado
|
||||||
|
"ansible-lint", -- Asegurar que ansible-lint esté instalado
|
||||||
|
})
|
||||||
|
require("mason-tool-installer").setup({ ensure_installed = ensure_installed })
|
||||||
|
|
||||||
|
-- 6. Configurar los servidores con sus respectivas configuraciones
|
||||||
|
require("mason-lspconfig").setup_handlers({
|
||||||
|
function(server_name)
|
||||||
|
local server = servers[server_name] or {}
|
||||||
|
server.capabilities = vim.tbl_deep_extend("force", {}, capabilities, server.capabilities or {})
|
||||||
|
require("lspconfig")[server_name].setup(server)
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
-- 7. Configurar Autocomandos y Mapeos de Teclas
|
||||||
|
vim.api.nvim_create_autocmd("LspAttach", {
|
||||||
|
group = vim.api.nvim_create_augroup("kickstart-lsp-attach", { clear = true }),
|
||||||
|
callback = function(event)
|
||||||
|
-- Función de mapeo simplificada
|
||||||
|
local map = function(keys, func, desc)
|
||||||
|
vim.keymap.set("n", keys, func, { buffer = event.buf, desc = "LSP: " .. desc })
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Mapeos LSP con Telescope
|
||||||
|
map("gd", require("telescope.builtin").lsp_definitions, "[G]oto [D]efinition")
|
||||||
|
map("gr", require("telescope.builtin").lsp_references, "[G]oto [R]eferences")
|
||||||
|
map("gI", require("telescope.builtin").lsp_implementations, "[G]oto [I]mplementation")
|
||||||
|
map("<leader>D", require("telescope.builtin").lsp_type_definitions, "Type [D]efinition")
|
||||||
|
map("<leader>ds", require("telescope.builtin").lsp_document_symbols, "[D]ocument [S]ymbols")
|
||||||
|
map("<leader>ws", require("telescope.builtin").lsp_dynamic_workspace_symbols, "[W]orkspace [S]ymbols")
|
||||||
|
map("<leader>rr", vim.lsp.buf.rename, "[R]ename")
|
||||||
|
map("<leader>ca", vim.lsp.buf.code_action, "[C]ode [A]ction")
|
||||||
|
map("K", vim.lsp.buf.hover, "Hover Documentation")
|
||||||
|
map("gD", vim.lsp.buf.declaration, "[G]oto [D]eclaration")
|
||||||
|
|
||||||
|
-- Highlight References
|
||||||
|
local client = vim.lsp.get_client_by_id(event.data.client_id)
|
||||||
|
if client and client.server_capabilities.documentHighlightProvider then
|
||||||
|
local highlight_augroup = vim.api.nvim_create_augroup("kickstart-lsp-highlight",
|
||||||
|
{ clear = false })
|
||||||
|
vim.api.nvim_create_autocmd({ "CursorHold", "CursorHoldI" }, {
|
||||||
|
buffer = event.buf,
|
||||||
|
group = highlight_augroup,
|
||||||
|
callback = vim.lsp.buf.document_highlight,
|
||||||
|
})
|
||||||
|
|
||||||
|
vim.api.nvim_create_autocmd({ "CursorMoved", "CursorMovedI" }, {
|
||||||
|
buffer = event.buf,
|
||||||
|
group = highlight_augroup,
|
||||||
|
callback = vim.lsp.buf.clear_references,
|
||||||
|
})
|
||||||
|
|
||||||
|
vim.api.nvim_create_autocmd("LspDetach", {
|
||||||
|
group = vim.api.nvim_create_augroup("kickstart-lsp-detach", { clear = true }),
|
||||||
|
callback = function(event2)
|
||||||
|
vim.lsp.buf.clear_references()
|
||||||
|
vim.api.nvim_clear_autocmds({ group = "kickstart-lsp-highlight", buffer = event2.buf })
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Inlay Hints (si el servidor lo soporta)
|
||||||
|
if client and client.server_capabilities.inlayHintProvider and vim.lsp.inlay_hint then
|
||||||
|
map("<leader>th", function()
|
||||||
|
vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled())
|
||||||
|
end, "[T]oggle Inlay [H]ints")
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
12
.config/nvim/lua/plugins/lspkind.lua
Normal file
12
.config/nvim/lua/plugins/lspkind.lua
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
-- Archivo: ~/.config/nvim/lua/plugins/lspkind.lua
|
||||||
|
|
||||||
|
return {
|
||||||
|
{
|
||||||
|
"onsails/lspkind-nvim",
|
||||||
|
config = function()
|
||||||
|
require("lspkind").init({
|
||||||
|
preset = "default",
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
55
.config/nvim/lua/plugins/mini.lua
Normal file
55
.config/nvim/lua/plugins/mini.lua
Normal file
@ -0,0 +1,55 @@
|
|||||||
|
return {
|
||||||
|
{ -- Collection of various small independent plugins/modules
|
||||||
|
"echasnovski/mini.nvim",
|
||||||
|
config = function()
|
||||||
|
-- Better Around/Inside textobjects
|
||||||
|
--
|
||||||
|
-- Examples:
|
||||||
|
-- - va) - [V]isually select [A]round [)]paren
|
||||||
|
-- - yinq - [Y]ank [I]nside [N]ext [']quote
|
||||||
|
-- - ci' - [C]hange [I]nside [']quote
|
||||||
|
require("mini.ai").setup({ n_lines = 500 })
|
||||||
|
|
||||||
|
-- Add/delete/replace surroundings (brackets, quotes, etc.)
|
||||||
|
--
|
||||||
|
-- - saiw) - [S]urround [A]dd [I]nner [W]ord [)]Paren
|
||||||
|
-- - sd' - [S]urround [D]elete [']quotes
|
||||||
|
-- - sr)' - [S]urround [R]eplace [)] [']
|
||||||
|
require("mini.surround").setup()
|
||||||
|
|
||||||
|
-- require("mini.files").setup({
|
||||||
|
-- mappings = {
|
||||||
|
-- close = "q",
|
||||||
|
-- go_in = "<CR>",
|
||||||
|
-- go_in_plus = "L",
|
||||||
|
-- go_out = "<Esc>",
|
||||||
|
-- go_out_plus = "H",
|
||||||
|
-- reset = "<BS>",
|
||||||
|
-- reveal_cwd = "@",
|
||||||
|
-- show_help = "g?",
|
||||||
|
-- synchronize = "=",
|
||||||
|
-- trim_left = "<",
|
||||||
|
-- trim_right = ">",
|
||||||
|
-- },
|
||||||
|
-- })
|
||||||
|
|
||||||
|
-- Simple and easy statusline.
|
||||||
|
-- You could remove this setup call if you don't like it,
|
||||||
|
-- and try some other statusline plugin
|
||||||
|
-- local statusline = require("mini.statusline")
|
||||||
|
-- set use_icons to true if you have a Nerd Font
|
||||||
|
-- statusline.setup({ use_icons = vim.g.have_nerd_font })
|
||||||
|
|
||||||
|
-- You can configure sections in the statusline by overriding their
|
||||||
|
-- default behavior. For example, here we set the section for
|
||||||
|
-- cursor location to LINE:COLUMN
|
||||||
|
---@diagnostic disable-next-line: duplicate-set-field
|
||||||
|
-- statusline.section_location = function()
|
||||||
|
-- return "%2l:%-2v"
|
||||||
|
-- end
|
||||||
|
|
||||||
|
-- ... and there is more!
|
||||||
|
-- Check out: https://github.com/echasnovski/mini.nvim
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
37
.config/nvim/lua/plugins/model.lua
Normal file
37
.config/nvim/lua/plugins/model.lua
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
return {
|
||||||
|
'gsuuon/model.nvim',
|
||||||
|
cmd = { 'Model', 'Mchat' },
|
||||||
|
init = function()
|
||||||
|
vim.filetype.add({ extension = { mchat = "mchat" } })
|
||||||
|
end,
|
||||||
|
ft = "mchat",
|
||||||
|
keys = { { "<C-m><space>", ":Mchat<cr>", mode = "n" } },
|
||||||
|
config = function()
|
||||||
|
local ollama = require("model.providers.ollama")
|
||||||
|
require("model").setup({
|
||||||
|
hl_group = "Comment",
|
||||||
|
chats = {
|
||||||
|
deepseek = {
|
||||||
|
provider = ollama,
|
||||||
|
params = {
|
||||||
|
model = "deepseek-r1:14b"
|
||||||
|
},
|
||||||
|
create = function(input, context)
|
||||||
|
return {
|
||||||
|
system = "You are a helpful assistant.", -- Instrucción del sistema
|
||||||
|
messages = {
|
||||||
|
{ role = "user", content = input }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
run = function(messages, config)
|
||||||
|
return {
|
||||||
|
model = "deepseek-r1:14b",
|
||||||
|
messages = messages
|
||||||
|
}
|
||||||
|
end
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
}
|
37
.config/nvim/lua/plugins/model.lua_ok
Normal file
37
.config/nvim/lua/plugins/model.lua_ok
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
return {
|
||||||
|
'gsuuon/model.nvim',
|
||||||
|
cmd = { 'Model', 'Mchat' },
|
||||||
|
init = function()
|
||||||
|
vim.filetype.add({ extension = { mchat = "mchat" } })
|
||||||
|
end,
|
||||||
|
ft = "mchat",
|
||||||
|
keys = { { "<C-m><space>", ":Mchat<cr>", mode = "n" } },
|
||||||
|
config = function()
|
||||||
|
local ollama = require("model.providers.ollama")
|
||||||
|
require("model").setup({
|
||||||
|
hl_group = "Comment",
|
||||||
|
chats = {
|
||||||
|
deepseek = {
|
||||||
|
provider = ollama,
|
||||||
|
params = {
|
||||||
|
model = "deepseek-r1:14b"
|
||||||
|
},
|
||||||
|
create = function(input, context)
|
||||||
|
return {
|
||||||
|
system = "You are a helpful assistant.", -- Instrucción del sistema
|
||||||
|
messages = {
|
||||||
|
{ role = "user", content = input }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
run = function(messages, config)
|
||||||
|
return {
|
||||||
|
model = "deepseek-r1:14b",
|
||||||
|
messages = messages
|
||||||
|
}
|
||||||
|
end
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
}
|
91
.config/nvim/lua/plugins/neoai.lua
Normal file
91
.config/nvim/lua/plugins/neoai.lua
Normal file
@ -0,0 +1,91 @@
|
|||||||
|
-- ~/.config/nvim/lua/plugins/neoai.lua
|
||||||
|
|
||||||
|
return {
|
||||||
|
"Bryley/neoai.nvim",
|
||||||
|
dependencies = {
|
||||||
|
"MunifTanjim/nui.nvim",
|
||||||
|
},
|
||||||
|
lazy = false, -- Fuerza la carga del plugin al iniciar Neovim
|
||||||
|
config = function()
|
||||||
|
require("neoai").setup({
|
||||||
|
ui = {
|
||||||
|
output_popup_text = "NeoAI",
|
||||||
|
input_popup_text = "Prompt",
|
||||||
|
width = 30, -- Porcentaje, ej. 30%
|
||||||
|
output_popup_height = 80, -- Porcentaje, ej. 80%
|
||||||
|
submit = "<Enter>", -- Tecla para enviar el prompt
|
||||||
|
},
|
||||||
|
models = {
|
||||||
|
{
|
||||||
|
name = "openai",
|
||||||
|
model = "gpt-4", -- Cambiado a GPT-4
|
||||||
|
params = nil,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
register_output = {
|
||||||
|
["g"] = function(output)
|
||||||
|
return output
|
||||||
|
end,
|
||||||
|
["c"] = require("neoai.utils").extract_code_snippets,
|
||||||
|
},
|
||||||
|
inject = {
|
||||||
|
cutoff_width = 75,
|
||||||
|
},
|
||||||
|
prompts = {
|
||||||
|
context_prompt = function(context)
|
||||||
|
return "Hey, I'd like to provide some context for future "
|
||||||
|
.. "messages. Here is the code/text that I want to refer "
|
||||||
|
.. "to in our upcoming conversations:\n\n"
|
||||||
|
.. context
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
mappings = {
|
||||||
|
["select_up"] = "<C-k>",
|
||||||
|
["select_down"] = "<C-j>",
|
||||||
|
},
|
||||||
|
open_ai = {
|
||||||
|
api_key = {
|
||||||
|
env = "OPENAI_API_KEY",
|
||||||
|
value = nil,
|
||||||
|
-- Puedes descomentar y personalizar la función `get` si deseas obtener la clave API de otra fuente
|
||||||
|
-- get = function()
|
||||||
|
-- local key = vim.fn.system("pass show openai/mytestkey")
|
||||||
|
-- key = string.gsub(key, "\n", "")
|
||||||
|
-- return key
|
||||||
|
-- end,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
shortcuts = {
|
||||||
|
{
|
||||||
|
name = "textify",
|
||||||
|
key = "<leader>as",
|
||||||
|
desc = "Fix text with AI",
|
||||||
|
use_context = true,
|
||||||
|
prompt = [[
|
||||||
|
Please rewrite the text to make it more readable, clear,
|
||||||
|
concise, and fix any grammatical, punctuation, or spelling
|
||||||
|
errors
|
||||||
|
]],
|
||||||
|
modes = { "v" },
|
||||||
|
strip_function = nil,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name = "gitcommit",
|
||||||
|
key = "<leader>ag",
|
||||||
|
desc = "Generate git commit message",
|
||||||
|
use_context = false,
|
||||||
|
prompt = function()
|
||||||
|
return [[
|
||||||
|
Using the following git diff generate a concise and
|
||||||
|
clear git commit message, with a short title summary
|
||||||
|
that is 75 characters or less:
|
||||||
|
]] .. vim.fn.system("git diff --cached")
|
||||||
|
end,
|
||||||
|
modes = { "n" },
|
||||||
|
strip_function = nil,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
}
|
||||||
|
|
7
.config/nvim/lua/plugins/neogit.lua
Normal file
7
.config/nvim/lua/plugins/neogit.lua
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
return {
|
||||||
|
"TimUntersberger/neogit",
|
||||||
|
dependencies = "nvim-lua/plenary.nvim",
|
||||||
|
config = function()
|
||||||
|
require("neogit").setup()
|
||||||
|
end
|
||||||
|
}
|
45
.config/nvim/lua/plugins/nvim-cmp.lua
Normal file
45
.config/nvim/lua/plugins/nvim-cmp.lua
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
-- Archivo: lua/plugins/nvim-cmp.lua
|
||||||
|
|
||||||
|
return {
|
||||||
|
{
|
||||||
|
"hrsh7th/nvim-cmp",
|
||||||
|
dependencies = {
|
||||||
|
"hrsh7th/cmp-path", -- Añadir cmp-path como dependencia
|
||||||
|
-- Puedes añadir otras dependencias aquí si las tienes
|
||||||
|
},
|
||||||
|
config = function()
|
||||||
|
local cmp = require("cmp")
|
||||||
|
cmp.setup({
|
||||||
|
snippet = {
|
||||||
|
expand = function(args)
|
||||||
|
require("luasnip").lsp_expand(args.body) -- Usa LuaSnip para expandir snippets
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
mapping = {
|
||||||
|
["<Tab>"] = cmp.mapping(function(fallback)
|
||||||
|
if cmp.visible() then
|
||||||
|
cmp.select_next_item()
|
||||||
|
else
|
||||||
|
fallback()
|
||||||
|
end
|
||||||
|
end, { "i", "s" }),
|
||||||
|
["<S-Tab>"] = cmp.mapping(function(fallback)
|
||||||
|
if cmp.visible() then
|
||||||
|
cmp.select_prev_item()
|
||||||
|
else
|
||||||
|
fallback()
|
||||||
|
end
|
||||||
|
end, { "i", "s" }),
|
||||||
|
["<CR>"] = cmp.mapping.confirm({ select = true }),
|
||||||
|
},
|
||||||
|
sources = cmp.config.sources({
|
||||||
|
{ name = "copilot" },
|
||||||
|
{ name = "nvim_lsp" },
|
||||||
|
{ name = "path" }, -- Añadir la fuente de rutas
|
||||||
|
{ name = "buffer" },
|
||||||
|
-- Añade otras fuentes si lo deseas
|
||||||
|
}),
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
35
.config/nvim/lua/plugins/nvim-cmp.lua_back
Normal file
35
.config/nvim/lua/plugins/nvim-cmp.lua_back
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
-- Archivo: lua/plugins/nvim-cmp.lua
|
||||||
|
|
||||||
|
return {
|
||||||
|
{
|
||||||
|
"hrsh7th/nvim-cmp",
|
||||||
|
config = function()
|
||||||
|
local cmp = require("cmp")
|
||||||
|
cmp.setup({
|
||||||
|
mapping = {
|
||||||
|
["<Tab>"] = cmp.mapping(function(fallback)
|
||||||
|
if cmp.visible() then
|
||||||
|
cmp.select_next_item()
|
||||||
|
else
|
||||||
|
fallback()
|
||||||
|
end
|
||||||
|
end, { "i", "s" }),
|
||||||
|
["<S-Tab>"] = cmp.mapping(function(fallback)
|
||||||
|
if cmp.visible() then
|
||||||
|
cmp.select_prev_item()
|
||||||
|
else
|
||||||
|
fallback()
|
||||||
|
end
|
||||||
|
end, { "i", "s" }),
|
||||||
|
["<CR>"] = cmp.mapping.confirm({ select = true }),
|
||||||
|
},
|
||||||
|
sources = cmp.config.sources({
|
||||||
|
{ name = "copilot" },
|
||||||
|
{ name = "nvim_lsp" },
|
||||||
|
{ name = "buffer" },
|
||||||
|
-- Añade otras fuentes si lo deseas
|
||||||
|
}),
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
25
.config/nvim/lua/plugins/nvimtree.lua
Normal file
25
.config/nvim/lua/plugins/nvimtree.lua
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
vim.g.loaded_netrw = 1
|
||||||
|
vim.g.loaded_netrwPlugin = 1
|
||||||
|
|
||||||
|
-- optionally enable 24-bit colour
|
||||||
|
vim.opt.termguicolors = true
|
||||||
|
|
||||||
|
return {
|
||||||
|
{
|
||||||
|
"nvim-tree/nvim-tree.lua",
|
||||||
|
opts = {
|
||||||
|
sort = {
|
||||||
|
sorter = "case_sensitive",
|
||||||
|
},
|
||||||
|
view = {
|
||||||
|
width = 30,
|
||||||
|
},
|
||||||
|
renderer = {
|
||||||
|
group_empty = true,
|
||||||
|
},
|
||||||
|
filters = {
|
||||||
|
dotfiles = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
18
.config/nvim/lua/plugins/ollama-copilot.lua
Normal file
18
.config/nvim/lua/plugins/ollama-copilot.lua
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
return {
|
||||||
|
'Jacob411/Ollama-Copilot',
|
||||||
|
opts = {
|
||||||
|
model_name = "deepseek-coder:base", -- Modelo a usar
|
||||||
|
stream_suggestion = true, -- Activar sugerencias en tiempo real
|
||||||
|
python_command = "python3", -- Ruta a Python
|
||||||
|
filetypes = { 'python', 'lua', 'vim', 'markdown' }, -- Archivos compatibles
|
||||||
|
ollama_model_opts = {
|
||||||
|
num_predict = 40, -- Tokens a predecir
|
||||||
|
temperature = 0.1, -- Control de creatividad
|
||||||
|
},
|
||||||
|
keymaps = {
|
||||||
|
suggestion = '<leader>os', -- Mostrar sugerencia
|
||||||
|
reject = '<leader>or', -- Rechazar sugerencia
|
||||||
|
insert_accept = '<C-Space>', -- Aceptar sugerencia con Tab
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
106
.config/nvim/lua/plugins/telescope.lua
Normal file
106
.config/nvim/lua/plugins/telescope.lua
Normal file
@ -0,0 +1,106 @@
|
|||||||
|
return {
|
||||||
|
{ -- Fuzzy Finder (files, lsp, etc)
|
||||||
|
"nvim-telescope/telescope.nvim",
|
||||||
|
event = "VimEnter",
|
||||||
|
branch = "0.1.x",
|
||||||
|
dependencies = {
|
||||||
|
"nvim-lua/plenary.nvim",
|
||||||
|
{ -- If encountering errors, see telescope-fzf-native README for installation instructions
|
||||||
|
"nvim-telescope/telescope-fzf-native.nvim",
|
||||||
|
|
||||||
|
-- `build` is used to run some command when the plugin is installed/updated.
|
||||||
|
-- This is only run then, not every time Neovim starts up.
|
||||||
|
build = "make",
|
||||||
|
|
||||||
|
-- `cond` is a condition used to determine whether this plugin should be
|
||||||
|
-- installed and loaded.
|
||||||
|
cond = function()
|
||||||
|
return vim.fn.executable("make") == 1
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
{ "nvim-telescope/telescope-ui-select.nvim" },
|
||||||
|
|
||||||
|
-- Useful for getting pretty icons, but requires a Nerd Font.
|
||||||
|
{ "nvim-tree/nvim-web-devicons", enabled = vim.g.have_nerd_font },
|
||||||
|
},
|
||||||
|
config = function()
|
||||||
|
-- Telescope is a fuzzy finder that comes with a lot of different things that
|
||||||
|
-- it can fuzzy find! It's more than just a "file finder", it can search
|
||||||
|
-- many different aspects of Neovim, your workspace, LSP, and more!
|
||||||
|
--
|
||||||
|
-- The easiest way to use Telescope, is to start by doing something like:
|
||||||
|
-- :Telescope help_tags
|
||||||
|
--
|
||||||
|
-- After running this command, a window will open up and you're able to
|
||||||
|
-- type in the prompt window. You'll see a list of `help_tags` options and
|
||||||
|
-- a corresponding preview of the help.
|
||||||
|
--
|
||||||
|
-- Two important keymaps to use while in Telescope are:
|
||||||
|
-- - Insert mode: <c-/>
|
||||||
|
-- - Normal mode: ?
|
||||||
|
--
|
||||||
|
-- This opens a window that shows you all of the keymaps for the current
|
||||||
|
-- Telescope picker. This is really useful to discover what Telescope can
|
||||||
|
-- do as well as how to actually do it!
|
||||||
|
|
||||||
|
-- [[ Configure Telescope ]]
|
||||||
|
-- See `:help telescope` and `:help telescope.setup()`
|
||||||
|
require("telescope").setup({
|
||||||
|
-- You can put your default mappings / updates / etc. in here
|
||||||
|
-- All the info you're looking for is in `:help telescope.setup()`
|
||||||
|
--
|
||||||
|
-- defaults = {
|
||||||
|
-- mappings = {
|
||||||
|
-- i = { ['<c-enter>'] = 'to_fuzzy_refine' },
|
||||||
|
-- },
|
||||||
|
-- },
|
||||||
|
-- pickers = {}
|
||||||
|
extensions = {
|
||||||
|
["ui-select"] = {
|
||||||
|
require("telescope.themes").get_dropdown(),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
-- Enable Telescope extensions if they are installed
|
||||||
|
pcall(require("telescope").load_extension, "fzf")
|
||||||
|
pcall(require("telescope").load_extension, "ui-select")
|
||||||
|
|
||||||
|
-- See `:help telescope.builtin`
|
||||||
|
local builtin = require("telescope.builtin")
|
||||||
|
vim.keymap.set("n", "<leader>sh", builtin.help_tags, { desc = "[S]earch [H]elp" })
|
||||||
|
vim.keymap.set("n", "<leader>sk", builtin.keymaps, { desc = "[S]earch [K]eymaps" })
|
||||||
|
vim.keymap.set("n", "<leader>sf", builtin.find_files, { desc = "[S]earch [F]iles" })
|
||||||
|
vim.keymap.set("n", "<leader>ss", builtin.builtin, { desc = "[S]earch [S]elect Telescope" })
|
||||||
|
vim.keymap.set("n", "<leader>sw", builtin.grep_string, { desc = "[S]earch current [W]ord" })
|
||||||
|
vim.keymap.set("n", "<leader>sg", builtin.live_grep, { desc = "[S]earch by [G]rep" })
|
||||||
|
vim.keymap.set("n", "<leader>sd", builtin.diagnostics, { desc = "[S]earch [D]iagnostics" })
|
||||||
|
vim.keymap.set("n", "<leader>sr", builtin.resume, { desc = "[S]earch [R]esume" })
|
||||||
|
vim.keymap.set("n", "<leader>s.", builtin.oldfiles, { desc = '[S]earch Recent Files ("." for repeat)' })
|
||||||
|
vim.keymap.set("n", "<leader><leader>", builtin.buffers, { desc = "[ ] Find existing buffers" })
|
||||||
|
|
||||||
|
-- Slightly advanced example of overriding default behavior and theme
|
||||||
|
vim.keymap.set("n", "<leader>/", function()
|
||||||
|
-- You can pass additional configuration to Telescope to change the theme, layout, etc.
|
||||||
|
builtin.current_buffer_fuzzy_find(require("telescope.themes").get_dropdown({
|
||||||
|
winblend = 10,
|
||||||
|
previewer = false,
|
||||||
|
}))
|
||||||
|
end, { desc = "[/] Fuzzily search in current buffer" })
|
||||||
|
|
||||||
|
-- It's also possible to pass additional configuration options.
|
||||||
|
-- See `:help telescope.builtin.live_grep()` for information about particular keys
|
||||||
|
vim.keymap.set("n", "<leader>s/", function()
|
||||||
|
builtin.live_grep({
|
||||||
|
grep_open_files = true,
|
||||||
|
prompt_title = "Live Grep in Open Files",
|
||||||
|
})
|
||||||
|
end, { desc = "[S]earch [/] in Open Files" })
|
||||||
|
|
||||||
|
-- Shortcut for searching your Neovim configuration files
|
||||||
|
vim.keymap.set("n", "<leader>sn", function()
|
||||||
|
builtin.find_files({ cwd = vim.fn.stdpath("config") })
|
||||||
|
end, { desc = "[S]earch [N]eovim files" })
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
55
.config/nvim/lua/plugins/treesitter.lua
Normal file
55
.config/nvim/lua/plugins/treesitter.lua
Normal file
@ -0,0 +1,55 @@
|
|||||||
|
return {
|
||||||
|
{ -- Highlight, edit, and navigate code
|
||||||
|
"nvim-treesitter/nvim-treesitter",
|
||||||
|
build = ":TSUpdate",
|
||||||
|
opts = {
|
||||||
|
ensure_installed = {
|
||||||
|
"bash",
|
||||||
|
"c",
|
||||||
|
"diff",
|
||||||
|
"html",
|
||||||
|
"lua",
|
||||||
|
"luadoc",
|
||||||
|
"markdown",
|
||||||
|
"vim",
|
||||||
|
"vimdoc",
|
||||||
|
"jsdoc",
|
||||||
|
"templ",
|
||||||
|
"yaml", -- Agregado para YAML
|
||||||
|
},
|
||||||
|
-- Autoinstall languages that are not installed
|
||||||
|
auto_install = true,
|
||||||
|
highlight = {
|
||||||
|
enable = true,
|
||||||
|
use_languagetree = true,
|
||||||
|
-- Algunos lenguajes dependen del sistema de resaltado de regex de Vim (como Ruby) para reglas de indentación.
|
||||||
|
-- Si estás experimentando problemas de indentación extraños, añade el lenguaje a
|
||||||
|
-- la lista de additional_vim_regex_highlighting y deshabilita lenguajes para indent.
|
||||||
|
additional_vim_regex_highlighting = { "ruby", "markdown" },
|
||||||
|
},
|
||||||
|
indent = { enable = true, disable = { "ruby" } }, -- Asegúrate de no deshabilitar 'yaml'
|
||||||
|
autotag = {
|
||||||
|
enable = true,
|
||||||
|
enable_rename = true,
|
||||||
|
enable_close = true,
|
||||||
|
enable_close_on_slash = true,
|
||||||
|
filetypes = { "html", "xml", "templ", "tmpl" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
config = function(_, opts)
|
||||||
|
-- [[ Configure Treesitter ]] See `:help nvim-treesitter`
|
||||||
|
|
||||||
|
-- Preferir git en lugar de curl para mejorar la conectividad en algunos entornos
|
||||||
|
require("nvim-treesitter.install").prefer_git = true
|
||||||
|
---@diagnostic disable-next-line: missing-fields
|
||||||
|
require("nvim-treesitter.configs").setup(opts)
|
||||||
|
|
||||||
|
-- Módulos adicionales de nvim-treesitter que puedes usar para interactuar
|
||||||
|
-- con nvim-treesitter. Deberías explorar algunos y ver qué te interesa:
|
||||||
|
--
|
||||||
|
-- - Selección incremental: Incluido, ver `:help nvim-treesitter-incremental-selection-mod`
|
||||||
|
-- - Mostrar tu contexto actual: https://github.com/nvim-treesitter/nvim-treesitter-context
|
||||||
|
-- - Treesitter + textobjects: https://github.com/nvim-treesitter/nvim-treesitter-textobjects
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
55
.config/nvim/lua/plugins/treesitter.lua_back
Normal file
55
.config/nvim/lua/plugins/treesitter.lua_back
Normal file
@ -0,0 +1,55 @@
|
|||||||
|
return {
|
||||||
|
{ -- Highlight, edit, and navigate code
|
||||||
|
"nvim-treesitter/nvim-treesitter",
|
||||||
|
build = ":TSUpdate",
|
||||||
|
opts = {
|
||||||
|
ensure_installed = {
|
||||||
|
"bash",
|
||||||
|
"c",
|
||||||
|
"diff",
|
||||||
|
"html",
|
||||||
|
"lua",
|
||||||
|
"luadoc",
|
||||||
|
"markdown",
|
||||||
|
"vim",
|
||||||
|
"vimdoc",
|
||||||
|
"jsdoc",
|
||||||
|
"templ",
|
||||||
|
"bash",
|
||||||
|
},
|
||||||
|
-- Autoinstall languages that are not installed
|
||||||
|
auto_install = true,
|
||||||
|
highlight = {
|
||||||
|
enable = true,
|
||||||
|
use_languagetree = true,
|
||||||
|
-- Some languages depend on vim's regex highlighting system (such as Ruby) for indent rules.
|
||||||
|
-- If you are experiencing weird indenting issues, add the language to
|
||||||
|
-- the list of additional_vim_regex_highlighting and disabled languages for indent.
|
||||||
|
additional_vim_regex_highlighting = { "ruby", "markdown" },
|
||||||
|
},
|
||||||
|
indent = { enable = true, disable = { "ruby" } },
|
||||||
|
autotag = {
|
||||||
|
enable = true,
|
||||||
|
enable_rename = true,
|
||||||
|
enable_close = true,
|
||||||
|
enable_close_on_slash = true,
|
||||||
|
filetypes = { "html", "xml", "templ", "tmpl" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
config = function(_, opts)
|
||||||
|
-- [[ Configure Treesitter ]] See `:help nvim-treesitter`
|
||||||
|
|
||||||
|
-- Prefer git instead of curl in order to improve connectivity in some environments
|
||||||
|
require("nvim-treesitter.install").prefer_git = true
|
||||||
|
---@diagnostic disable-next-line: missing-fields
|
||||||
|
require("nvim-treesitter.configs").setup(opts)
|
||||||
|
|
||||||
|
-- There are additional nvim-treesitter modules that you can use to interact
|
||||||
|
-- with nvim-treesitter. You should go explore a few and see what interests you:
|
||||||
|
--
|
||||||
|
-- - Incremental selection: Included, see `:help nvim-treesitter-incremental-selection-mod`
|
||||||
|
-- - Show your current context: https://github.com/nvim-treesitter/nvim-treesitter-context
|
||||||
|
-- - Treesitter + textobjects: https://github.com/nvim-treesitter/nvim-treesitter-textobjects
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
22
.config/nvim/lua/plugins/trouble.lua
Normal file
22
.config/nvim/lua/plugins/trouble.lua
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
return {
|
||||||
|
{
|
||||||
|
"folke/trouble.nvim",
|
||||||
|
config = function()
|
||||||
|
require("trouble").setup({
|
||||||
|
icons = false,
|
||||||
|
})
|
||||||
|
|
||||||
|
vim.keymap.set("n", "<leader>tt", function()
|
||||||
|
require("trouble").toggle()
|
||||||
|
end)
|
||||||
|
|
||||||
|
vim.keymap.set("n", "[t", function()
|
||||||
|
require("trouble").next({ skip_groups = true, jump = true })
|
||||||
|
end)
|
||||||
|
|
||||||
|
vim.keymap.set("n", "]t", function()
|
||||||
|
require("trouble").previous({ skip_groups = true, jump = true })
|
||||||
|
end)
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
4
.config/nvim/lua/plugins/vim-highlightedyank.lua
Normal file
4
.config/nvim/lua/plugins/vim-highlightedyank.lua
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
return {
|
||||||
|
"machakann/vim-highlightedyank",
|
||||||
|
lazy = false
|
||||||
|
}
|
31
.config/nvim/lua/plugins/which_key.lua
Normal file
31
.config/nvim/lua/plugins/which_key.lua
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
return {
|
||||||
|
{ -- Useful plugin to show you pending keybinds.
|
||||||
|
"folke/which-key.nvim",
|
||||||
|
event = "VimEnter", -- Sets the loading event to 'VimEnter'
|
||||||
|
config = function() -- This is the function that runs, AFTER loading
|
||||||
|
require("which-key").setup()
|
||||||
|
|
||||||
|
-- Document existing key chains
|
||||||
|
require("which-key").add({
|
||||||
|
{ "<leader>c", group = "[C]ode" },
|
||||||
|
{ "<leader>c_", hidden = true },
|
||||||
|
{ "<leader>d", group = "[D]ocument" },
|
||||||
|
{ "<leader>d_", hidden = true },
|
||||||
|
{ "<leader>h", group = "Git [H]unk" },
|
||||||
|
{ "<leader>h_", hidden = true },
|
||||||
|
{ "<leader>r", group = "[R]ename" },
|
||||||
|
{ "<leader>r_", hidden = true },
|
||||||
|
{ "<leader>s", group = "[S]earch" },
|
||||||
|
{ "<leader>s_", hidden = true },
|
||||||
|
{ "<leader>t", group = "[T]oggle" },
|
||||||
|
{ "<leader>t_", hidden = true },
|
||||||
|
{ "<leader>w", group = "[W]orkspace" },
|
||||||
|
{ "<leader>w_", hidden = true },
|
||||||
|
})
|
||||||
|
-- visual mode
|
||||||
|
require("which-key").add({
|
||||||
|
{"<leader>h", group = "Git [H]unk" },
|
||||||
|
}, { mode = "v" })
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
51
.config/nvim/lua/remap.lua
Normal file
51
.config/nvim/lua/remap.lua
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
vim.keymap.set("n", "<Esc>", "<cmd>nohlsearch<CR>")
|
||||||
|
-- Diagnostic keymaps
|
||||||
|
vim.keymap.set("n", "[d", vim.diagnostic.goto_prev, { desc = "Go to previous [D]iagnostic message" })
|
||||||
|
vim.keymap.set("n", "]d", vim.diagnostic.goto_next, { desc = "Go to next [D]iagnostic message" })
|
||||||
|
vim.keymap.set("n", "<leader>e", vim.diagnostic.open_float, { desc = "Show diagnostic [E]rror messages" })
|
||||||
|
vim.keymap.set("n", "<leader>q", vim.diagnostic.setloclist, { desc = "Open diagnostic [Q]uickfix list" })
|
||||||
|
vim.keymap.set("n", "<leader>ac", "<cmd>ChatGPTComplete<CR>", { noremap = true, silent = true })
|
||||||
|
|
||||||
|
-- Exit terminal mode in the builtin terminal with a shortcut that is a bit easier
|
||||||
|
-- for people to discover. Otherwise, you normally need to press <C-\><C-n>, which
|
||||||
|
-- is not what someone will guess without a bit more experience.
|
||||||
|
--
|
||||||
|
-- NOTE: This won't work in all terminal emulators/tmux/etc. Try your own mapping
|
||||||
|
-- or just use <C-\><C-n> to exit terminal mode
|
||||||
|
vim.keymap.set("t", "<Esc><Esc>", "<C-\\><C-n>", { desc = "Exit terminal mode" })
|
||||||
|
|
||||||
|
-- TIP: Disable arrow keys in normal mode
|
||||||
|
-- vim.keymap.set("n", "<left>", '<cmd>echo "Use h to move!!"<CR>')
|
||||||
|
-- vim.keymap.set("n", "<right>", '<cmd>echo "Use l to move!!"<CR>')
|
||||||
|
-- vim.keymap.set("n", "<up>", '<cmd>echo "Use k to move!!"<CR>')
|
||||||
|
-- vim.keymap.set("n", "<down>", '<cmd>echo "Use j to move!!"<CR>')
|
||||||
|
|
||||||
|
-- Keybinds to make split navigation easier.
|
||||||
|
-- Use CTRL+<hjkl> to switch between windows
|
||||||
|
--
|
||||||
|
-- See `:help wincmd` for a list of all window commands
|
||||||
|
vim.keymap.set("n", "<C-h>", "<C-w><C-h>", { desc = "Move focus to the left window" })
|
||||||
|
vim.keymap.set("n", "<C-l>", "<C-w><C-l>", { desc = "Move focus to the right window" })
|
||||||
|
vim.keymap.set("n", "<C-j>", "<C-w><C-j>", { desc = "Move focus to the lower window" })
|
||||||
|
vim.keymap.set("n", "<C-k>", "<C-w><C-k>", { desc = "Move focus to the upper window" })
|
||||||
|
|
||||||
|
-- best keybindings ever
|
||||||
|
vim.keymap.set("v", "J", ":m '>+1<cr>gv=gv")
|
||||||
|
vim.keymap.set("v", "K", ":m '<-2<cr>gv=gv")
|
||||||
|
|
||||||
|
vim.keymap.set("n", "<leader>t", ":NvimTreeToggle<CR>", { desc = "Open up nvim-tree", silent = true })
|
||||||
|
|
||||||
|
-- vim.keymap.set("n", "<leader>ng", require("neogen").generate(o))
|
||||||
|
-- Mover bloque de texto hacia abajo
|
||||||
|
vim.api.nvim_set_keymap("v", "<A-Down>", ":m '>+1<CR>gv=gv", { noremap = true, silent = true })
|
||||||
|
|
||||||
|
-- Mover bloque de texto hacia arriba
|
||||||
|
vim.api.nvim_set_keymap("v", "<A-Up>", ":m '<-2<CR>gv=gv", { noremap = true, silent = true })
|
||||||
|
|
||||||
|
-- Mover bloque de texto hacia la derecha (indent)
|
||||||
|
vim.api.nvim_set_keymap("v", "<A-Right>", ">gv", { noremap = true, silent = true })
|
||||||
|
|
||||||
|
-- Mover bloque de texto hacia la izquierda (desindent)
|
||||||
|
vim.api.nvim_set_keymap("v", "<A-Left>", "<gv", { noremap = true, silent = true })
|
||||||
|
-- Mover bloque de texto hacia abajo usando Alt + Flecha Abajo
|
||||||
|
-- Mover bloque de texto hacia abajo
|
79
.config/nvim/lua/set.lua
Normal file
79
.config/nvim/lua/set.lua
Normal file
@ -0,0 +1,79 @@
|
|||||||
|
vim.g.mapleader = " "
|
||||||
|
vim.g.maplocalleader = " "
|
||||||
|
|
||||||
|
-- Set to true if you have a Nerd Font installed and selected in the terminal
|
||||||
|
vim.g.have_nerd_font = true
|
||||||
|
|
||||||
|
-- [[ Setting options ]]
|
||||||
|
-- See `:help vim.opt`
|
||||||
|
-- NOTE: You can change these options as you wish!
|
||||||
|
-- For more options, you can see `:help option-list`
|
||||||
|
|
||||||
|
-- Make line numbers default
|
||||||
|
vim.opt.number = true
|
||||||
|
-- You can also add relative line numbers, to help with jumping.
|
||||||
|
-- Experiment for yourself to see if you like it!
|
||||||
|
vim.opt.relativenumber = true
|
||||||
|
|
||||||
|
-- Enable mouse mode, can be useful for resizing splits for example!
|
||||||
|
vim.opt.mouse = "a"
|
||||||
|
|
||||||
|
-- Don't show the mode, since it's already in the status line
|
||||||
|
vim.opt.showmode = false
|
||||||
|
|
||||||
|
-- Sync clipboard between OS and Neovim.
|
||||||
|
-- Remove this option if you want your OS clipboard to remain independent.
|
||||||
|
-- See `:help 'clipboard'`
|
||||||
|
vim.opt.clipboard = "unnamedplus"
|
||||||
|
|
||||||
|
-- Enable break indent
|
||||||
|
vim.opt.breakindent = true
|
||||||
|
|
||||||
|
-- Save undo history
|
||||||
|
vim.opt.undofile = true
|
||||||
|
|
||||||
|
-- Case-insensitive searching UNLESS \C or one or more capital letters in the search term
|
||||||
|
vim.opt.ignorecase = true
|
||||||
|
vim.opt.smartcase = true
|
||||||
|
|
||||||
|
-- Keep signcolumn on by default
|
||||||
|
vim.opt.signcolumn = "yes"
|
||||||
|
|
||||||
|
-- Decrease update time
|
||||||
|
vim.opt.updatetime = 150
|
||||||
|
|
||||||
|
-- Decrease mapped sequence wait time
|
||||||
|
-- Displays which-key popup sooner
|
||||||
|
vim.opt.timeoutlen = 200
|
||||||
|
|
||||||
|
-- Configure how new splits should be opened
|
||||||
|
vim.opt.splitright = true
|
||||||
|
vim.opt.splitbelow = true
|
||||||
|
|
||||||
|
-- Sets how neovim will display certain whitespace characters in the editor.
|
||||||
|
-- See `:help 'list'`
|
||||||
|
-- and `:help 'listchars'`
|
||||||
|
vim.opt.list = true
|
||||||
|
vim.opt.listchars = { tab = "» ", trail = "·", nbsp = "␣" }
|
||||||
|
|
||||||
|
-- Preview substitutions live, as you type!
|
||||||
|
vim.opt.inccommand = "split"
|
||||||
|
|
||||||
|
-- Show which line your cursor is on
|
||||||
|
vim.opt.cursorline = true
|
||||||
|
|
||||||
|
-- Minimal number of screen lines to keep above and below the cursor.
|
||||||
|
vim.opt.scrolloff = 10
|
||||||
|
|
||||||
|
-- [[ Basic Keymaps ]]
|
||||||
|
-- See `:help vim.keymap.set()`
|
||||||
|
|
||||||
|
-- Set highlight on search, but clear on pressing <Esc> in normal mode
|
||||||
|
vim.opt.hlsearch = true
|
||||||
|
|
||||||
|
vim.opt.expandtab = true
|
||||||
|
vim.opt.smartindent = true
|
||||||
|
vim.opt.shiftwidth = 2
|
||||||
|
vim.opt.tabstop = 2
|
||||||
|
|
||||||
|
vim.opt.laststatus = 3
|
47
.config/nvim/nvim
Normal file
47
.config/nvim/nvim
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
local cmp = require("cmp")
|
||||||
|
local http = require("socket.http")
|
||||||
|
local ltn12 = require("ltn12")
|
||||||
|
local json = require("dkjson") -- Asegúrate de que tienes soporte para JSON en Lua
|
||||||
|
|
||||||
|
local function fetch_ollama_completion(prompt)
|
||||||
|
local response_body = {}
|
||||||
|
local req_body = json.encode({
|
||||||
|
model = "deepseek-r1:14b", -- Cambia esto si usas otro modelo
|
||||||
|
prompt = prompt,
|
||||||
|
stream = false
|
||||||
|
})
|
||||||
|
|
||||||
|
local result, code = http.request({
|
||||||
|
url = "http://localhost:11434/api/generate", -- Ollama API local
|
||||||
|
method = "POST",
|
||||||
|
headers = {
|
||||||
|
["Content-Type"] = "application/json",
|
||||||
|
["Content-Length"] = tostring(#req_body),
|
||||||
|
},
|
||||||
|
source = ltn12.source.string(req_body),
|
||||||
|
sink = ltn12.sink.table(response_body),
|
||||||
|
})
|
||||||
|
|
||||||
|
if code == 200 and response_body[1] then
|
||||||
|
local decoded = json.decode(table.concat(response_body))
|
||||||
|
if decoded and decoded.response then
|
||||||
|
return decoded.response
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
return ""
|
||||||
|
end
|
||||||
|
|
||||||
|
cmp.register_source("ollama", {
|
||||||
|
complete = function(self, request, callback)
|
||||||
|
local input = table.concat(request.context.cursor_before_line or "", " ")
|
||||||
|
local response = fetch_ollama_completion(input)
|
||||||
|
|
||||||
|
if response and response ~= "" then
|
||||||
|
callback({ { label = response, insertText = response, kind = cmp.lsp.CompletionItemKind.Text } })
|
||||||
|
else
|
||||||
|
callback({})
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
16
.config/rofi/colors/nord.rasi
Normal file
16
.config/rofi/colors/nord.rasi
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
/**
|
||||||
|
*
|
||||||
|
* Author : Aditya Shakya (adi1090x)
|
||||||
|
* Github : @adi1090x
|
||||||
|
*
|
||||||
|
* Colors
|
||||||
|
**/
|
||||||
|
|
||||||
|
* {
|
||||||
|
background: #2E3440FF;
|
||||||
|
background-alt: #383E4AFF;
|
||||||
|
foreground: #E5E9F0FF;
|
||||||
|
selected: #81A1C1FF;
|
||||||
|
active: #A3BE8CFF;
|
||||||
|
urgent: #BF616AFF;
|
||||||
|
}
|
22
.config/rofi/launchers/misc/launcher.sh
Executable file
22
.config/rofi/launchers/misc/launcher.sh
Executable file
@ -0,0 +1,22 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
## Author : Aditya Shakya
|
||||||
|
## Mail : adi1090x@gmail.com
|
||||||
|
## Github : @adi1090x
|
||||||
|
## Twitter : @adi1090x
|
||||||
|
|
||||||
|
# Available Styles
|
||||||
|
# >> Created and tested on : rofi 1.6.0-1
|
||||||
|
#
|
||||||
|
# blurry blurry_full kde_simplemenu kde_krunner launchpad
|
||||||
|
# gnome_do slingshot appdrawer appdrawer_alt appfolder
|
||||||
|
# column row row_center screen row_dock row_dropdown
|
||||||
|
|
||||||
|
theme="screen"
|
||||||
|
dir="$HOME/.config/rofi/launchers/misc"
|
||||||
|
|
||||||
|
# comment these lines to disable random style
|
||||||
|
themes=($(ls -p --hide="launcher.sh" $dir))
|
||||||
|
theme="${themes[$(( $RANDOM % 16 ))]}"
|
||||||
|
|
||||||
|
rofi -no-lazy-grab -show drun -modi drun -theme $dir/"launchpad"
|
123
.config/rofi/launchers/misc/launchpad.rasi
Normal file
123
.config/rofi/launchers/misc/launchpad.rasi
Normal file
@ -0,0 +1,123 @@
|
|||||||
|
/*
|
||||||
|
*
|
||||||
|
* Author : Aditya Shakya
|
||||||
|
* Mail : adi1090x@gmail.com
|
||||||
|
* Github : @adi1090x
|
||||||
|
* Twitter : @adi1090x
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
configuration {
|
||||||
|
font: "Noto Sans Bold 10";
|
||||||
|
show-icons: true;
|
||||||
|
icon-theme: "Papirus";
|
||||||
|
// display-drun: "";
|
||||||
|
display-drun: "";
|
||||||
|
drun-display-format: "{name}";
|
||||||
|
disable-history: false;
|
||||||
|
sidebar-mode: false;
|
||||||
|
}
|
||||||
|
|
||||||
|
* {
|
||||||
|
background: #00000000;
|
||||||
|
background-alt: #00000000;
|
||||||
|
background-bar: #f2f2f215;
|
||||||
|
foreground: #f2f2f2EE;
|
||||||
|
accent: #6BA0DE;
|
||||||
|
}
|
||||||
|
|
||||||
|
window {
|
||||||
|
transparency: "false";
|
||||||
|
background-color: rgba ( 46, 52, 62, 80 % );
|
||||||
|
text-color: @foreground;
|
||||||
|
border: 0px;
|
||||||
|
border-color: @border;
|
||||||
|
border-radius: 0px;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
prompt {
|
||||||
|
enabled: true;
|
||||||
|
padding: 0.30% 1% 0% -0.5%;
|
||||||
|
background-color: @background-alt;
|
||||||
|
text-color: @foreground;
|
||||||
|
font: "FantasqueSansMono Nerd Font 12";
|
||||||
|
}
|
||||||
|
|
||||||
|
entry {
|
||||||
|
background-color: @background-alt;
|
||||||
|
text-color: @foreground;
|
||||||
|
placeholder-color: @foreground;
|
||||||
|
expand: true;
|
||||||
|
horizontal-align: 0;
|
||||||
|
placeholder: "Search";
|
||||||
|
padding: 0.10% 0% 0% 0%;
|
||||||
|
blink: true;
|
||||||
|
}
|
||||||
|
|
||||||
|
inputbar {
|
||||||
|
children: [ prompt, entry ];
|
||||||
|
background-color: @background-bar;
|
||||||
|
text-color: @foreground;
|
||||||
|
expand: false;
|
||||||
|
border: 0.1%;
|
||||||
|
border-radius: 6px;
|
||||||
|
border-color: @accent;
|
||||||
|
margin: 0% 30% 0% 30%;
|
||||||
|
padding: 1%;
|
||||||
|
}
|
||||||
|
|
||||||
|
listview {
|
||||||
|
background-color: @background-alt;
|
||||||
|
columns: 7;
|
||||||
|
lines: 4;
|
||||||
|
spacing: 2%;
|
||||||
|
cycle: false;
|
||||||
|
dynamic: true;
|
||||||
|
layout: vertical;
|
||||||
|
}
|
||||||
|
|
||||||
|
mainbox {
|
||||||
|
background-color: @background-alt;
|
||||||
|
border: 0% 0% 0% 0%;
|
||||||
|
border-radius: 0% 0% 0% 0%;
|
||||||
|
border-color: @accent;
|
||||||
|
children: [ inputbar, listview ];
|
||||||
|
spacing: 8%;
|
||||||
|
padding: 10% 8.5% 10% 8.5%;
|
||||||
|
}
|
||||||
|
|
||||||
|
element {
|
||||||
|
background-color: @background-alt;
|
||||||
|
text-color: @foreground;
|
||||||
|
orientation: vertical;
|
||||||
|
border-radius: 0%;
|
||||||
|
padding: 2.5% 0% 2.5% 0%;
|
||||||
|
}
|
||||||
|
|
||||||
|
element-icon {
|
||||||
|
background-color: @background-alt;
|
||||||
|
text-color: inherit;
|
||||||
|
horizontal-align: 0.5;
|
||||||
|
vertical-align: 0.5;
|
||||||
|
size: 81px;
|
||||||
|
border: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
element-text {
|
||||||
|
background-color: @background-alt;
|
||||||
|
text-color: inherit;
|
||||||
|
expand: true;
|
||||||
|
horizontal-align: 0.5;
|
||||||
|
vertical-align: 0.5;
|
||||||
|
margin: 0.5% 0.5% -0.5% 0.5%;
|
||||||
|
}
|
||||||
|
|
||||||
|
element selected {
|
||||||
|
background-color: rgba ( 107, 160, 222, 50 % );
|
||||||
|
text-color: @foreground;
|
||||||
|
border: 0% 0% 0% 0%;
|
||||||
|
border-radius: 6px;
|
||||||
|
border-color: @accent;
|
||||||
|
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user