added everythig

This commit is contained in:
liph22
2025-12-19 23:40:16 +01:00
parent 438be2a491
commit 3a741ac23c
148 changed files with 12034 additions and 0 deletions

1
Splitkeyboard/split.vil Normal file

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 778 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 974 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 430 KiB

View File

@@ -0,0 +1,86 @@
theme = catppuccin-mocha
# font-size = 12
# background-blur-radius = 20
# mouse-hide-while-typing = true
# window-decoration = true
# keybind = global:cmd+/=toggle_quick_terminal
# macos-option-as-alt = true
# background-opacity = 0.7
# background-blur-radius = 20
# By default Reload config with shft + cmd + ,
# config-file = themes/rosepine
# background = #000000
# background-opacity = 0.85
# background-blur-radius = 20
# font-family = JetBrainsMonoNL Nerd Font
# font-size = 12
cursor-style = block
cursor-style-blink = false
cursor-invert-fg-bg = true
# macos-titlebar-style = hidden
macos-option-as-alt = true
# mouse-hide-while-typing = true
#confirm-close-surface = false
#window-decoration = true
window-padding-x = 10
window-padding-y = 10
window-padding-balance = true
auto-update = check
auto-update-channel = stable
# extras
# shell-integration-features = no-cursor
copy-on-select = clipboard
# Custom Keybinds & Config (super represents cmd key on mac)
# For Simple Keybinds
# keybind = super+r=reload_config
keybind = super+i=inspector:toggle
keybind = super+b>,=toggle_quick_terminal
# Similar Tmux but with Ghostty
# (ctrl b for tmux -> cmb b for ghostty)
keybind = super+b>r=reload_config
keybind = super+b>x=close_surface
# this only works if you have `macos-titlebar-style = tabs or native or transparent`
# else it behaves like new window
keybind = super+b>c=new_tab
keybind = super+b>n=new_window
# tab nav
#keybind = super+b>1=goto_tab:1
#keybind = super+b>2=goto_tab:2
#keybind = super+b>3=goto_tab:3
#keybind = super+b>4=goto_tab:4
#keybind = super+b>5=goto_tab:5
#keybind = super+b>6=goto_tab:6
#keybind = super+b>7=goto_tab:7
#keybind = super+b>8=goto_tab:8
#keybind = super+b>9=goto_tab:9
# splitting
#keybind = super+a>\=new_split:right
#keybind = super+a>-=new_split:down
#keybind = super+a>e=equalize_splits
# split nav (setting this to control will not work if tmux already uses it)
#keybind = super+a>h=goto_split:left
#keybind = super+a>j=goto_split:bottom
#keybind = super+a>k=goto_split:top
#keybind = super+a>l=goto_split:right
# typecraft
theme = catppuccin-mocha
# theme = GruvboxDark
font-family = CaskaydiaCove Nerd Font
font-size = 12
background-opacity = 0.95
gtk-titlebar = false
# custom-shader = /home/chris/bloom.glsl
#custom-shader = /home/chris/crt.glsl

View File

@@ -0,0 +1,24 @@
general {
lock_cmd = pidof hyprlock || hyprlock
before_sleep_cmd = loginctl lock-session
after_sleep_cmd = hyprctl dispatch dpms on
}
# locks screen after 5min
listener {
timeout = 300
on-timeout = loginctl lock-session
}
# turn of screen after 10min
listener {
timeout = 600
on-timeout = hyptrctl dispatch dpms off
on-resume = hyprctl dispatch dpms on
}
# turns of pc after 60min of non use
listener {
timeout = 3600
on-timeout = systemctl suspend
}

View File

@@ -0,0 +1,348 @@
# #######################################################################################
# AUTOGENERATED HYPRLAND CONFIG.
# PLEASE USE THE CONFIG PROVIDED IN THE GIT REPO /examples/hyprland.conf AND EDIT IT,
# OR EDIT THIS ONE ACCORDING TO THE WIKI INSTRUCTIONS.
# #######################################################################################
# autogenerated = 1 # remove this line to remove the warning
# This is an example Hyprland config file.
# Refer to the wiki for more information.
# https://wiki.hyprland.org/Configuring/
# Please note not all available settings / options are set here.
# For a full list, see the wiki
# You can split this configuration into multiple files
# Create your files separately and then link them to this file like this:
# source = ~/.config/hypr/myColors.conf
# Wallpaper
env = WALLPAPER, ~/.config/backgrounds/unviverse/magenta.jpg
################
### MONITORS ###
################
# See https://wiki.hyprland.org/Configuring/Monitors/
monitor=,preferred,auto,1.5
###################
### MY PROGRAMS ###
###################
# See https://wiki.hyprland.org/Configuring/Keywords/
# Set programs that you use
$terminal = kitty
$fileManager = dolphin
$menu = wofi --show drun
$browser = librewolf
$mail = betterbird
#################
### AUTOSTART ###
#################
# Autostart necessary processes (like notifications daemons, status bars, etc.)
# Or execute your favorite apps at launch like this:
# exec-once = $terminal
# exec-once = nm-applet &
# exec-once = waybar & hyprpaper & firefox
exec-once = waybar & hyprpaper & hypridle
#exec-once = /usr/lib/polkit-kde-authentication-agent-1
exec-once = protonmail-bridge --no-window
exec-once = dbus-update-activation-environment --all
exec-once = gnome-keyring-daemon --start --components=secrets
exec-once = swaync
# add banana
#exec-once = hyprctl setcursor "Banana-Catppuccin-Mocha" 48
#exec = gsettings set org.gnome.desktop.interface cursor-the "Banana-Catppuccin-Mocha"
#exec = gsettings set org.gnome.desktop.interface cursor-size 48
############################
### ENVIRONMENT VARIABLES ###
#############################
# See https://wiki.hyprland.org/Configuring/Environment-variables/
env = XCURSOR_SIZE,24
env = HYPRCURSOR_SIZE,24
#####################
### LOOK AND FEEL ###
#####################
# Refer to https://wiki.hyprland.org/Configuring/Variables/
# https://wiki.hyprland.org/Configuring/Variables/#general
general {
gaps_in = 2
gaps_out = 2
border_size = 1
# https://wiki.hyprland.org/Configuring/Variables/#variable-types for info about colors
col.active_border = rgba(33ccffee) rgba(00ff99ee) 45deg
col.inactive_border = rgba(595959aa)
# Set to true enable resizing windows by clicking and dragging on borders and gaps
resize_on_border = false
# Please see https://wiki.hyprland.org/Configuring/Tearing/ before you turn this on
allow_tearing = false
layout = dwindle
}
# https://wiki.hyprland.org/Configuring/Variables/#decoration
decoration {
rounding = 3
# Change transparency of focused and unfocused windows
active_opacity = 1.0
inactive_opacity = 1.0
shadow {
enabled = true
range = 4
render_power = 3
color = rgba(1a1a1aee)
}
# https://wiki.hyprland.org/Configuring/Variables/#blur
blur {
enabled = true
size = 3
passes = 1
vibrancy = 0.1696
}
}
# https://wiki.hyprland.org/Configuring/Variables/#animations
animations {
enabled = yes, please :)
# Default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more
bezier = easeOutQuint,0.23,1,0.32,1
bezier = easeInOutCubic,0.65,0.05,0.36,1
bezier = linear,0,0,1,1
bezier = almostLinear,0.5,0.5,0.75,1.0
bezier = quick,0.15,0,0.1,1
animation = global, 1, 10, default
animation = border, 1, 5.39, easeOutQuint
animation = windows, 1, 4.79, easeOutQuint
animation = windowsIn, 1, 4.1, easeOutQuint, popin 87%
animation = windowsOut, 1, 1.49, linear, popin 87%
animation = fadeIn, 1, 1.73, almostLinear
animation = fadeOut, 1, 1.46, almostLinear
animation = fade, 1, 3.03, quick
animation = layers, 1, 3.81, easeOutQuint
animation = layersIn, 1, 4, easeOutQuint, fade
animation = layersOut, 1, 1.5, linear, fade
animation = fadeLayersIn, 1, 1.79, almostLinear
animation = fadeLayersOut, 1, 1.39, almostLinear
animation = workspaces, 1, 1.94, almostLinear, fade
animation = workspacesIn, 1, 1.21, almostLinear, fade
animation = workspacesOut, 1, 1.94, almostLinear, fade
}
# Ref https://wiki.hyprland.org/Configuring/Workspace-Rules/
# "Smart gaps" / "No gaps when only"
# uncomment all if you wish to use that.
# workspace = w[tv1], gapsout:0, gapsin:0
# workspace = f[1], gapsout:0, gapsin:0
# windowrulev2 = bordersize 0, floating:0, onworkspace:w[tv1]
# windowrulev2 = rounding 0, floating:0, onworkspace:w[tv1]
# windowrulev2 = bordersize 0, floating:0, onworkspace:f[1]
# windowrulev2 = rounding 0, floating:0, onworkspace:f[1]
# See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more
dwindle {
pseudotile = true # Master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
preserve_split = true # You probably want this
}
# See https://wiki.hyprland.org/Configuring/Master-Layout/ for more
master {
new_status = master
}
# https://wiki.hyprland.org/Configuring/Variables/#misc
#misc {
# force_default_wallpaper = -1 # Set to 0 or 1 to disable the anime mascot wallpapers
# disable_hyprland_logo = false # If true disables the random hyprland logo / anime girl background. :(
#}
#############
### INPUT ###
#############
# https://wiki.hyprland.org/Configuring/Variables/#input
input {
kb_layout = ch
kb_variant = de_mac
kb_model = apple
kb_options =
kb_rules =
follow_mouse = 1
sensitivity = 0 # -1.0 - 1.0, 0 means no modification.
touchpad {
natural_scroll = false
}
}
# https://wiki.hyprland.org/Configuring/Variables/#gestures
#gestures {
# workspace_swipe = false
#}
# Example per-device config
# See https://wiki.hyprland.org/Configuring/Keywords/#per-device-input-configs for more
device {
name = epic-mouse-v1
sensitivity = -0.5
}
###################
### KEYBINDINGS ###
###################
# See https://wiki.hyprland.org/Configuring/Keywords/
$mainMod = SUPER # Sets "Windows" key as main modifier
# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more
bind = $mainMod, return, exec, $terminal
bind = $SUPER_SHIFT, c, killactive,
bind = $mainMod, !, exit,
bind = $mainMod, E, exec, $fileManager
bind = $mainMod, V, togglefloating,
bind = $mainMod, space, exec, $menu
bind = $mainMod, P, exec, [workspace 5 silent] bitwarden-desktop
bind = $mainMod, J, togglesplit, # dwindle
bind = $mainMod, M, exec, [workspace 3 silent] $mail
bind = $mainMod, I, exec, [workspace 4 silent] claude-desktop
bind = $mainMod, T, exec, [workspace 5 silent] tidal-hifi
bind = $mainMod, Z, exec, [workspace 2 silent] $browser
bind = $mainMod, O, exec, [workspace 6 silent] onlyoffice-desktopeditors
bind = $mainMod, B, exec, [workspace 5 silent] obsidian
# Layer Indicator
bind = SUPER CTRL, 0, exec, ~/scripts/layer_notify.sh 0
bind = SUPER CTRL, 1, exec, ~/scripts/layer_notify.sh 1
bind = SUPER CTRL, 2, exec, ~/scripts/layer_notify.sh 2
bind = SUPER CTRL, 3, exec, ~/scripts/layer_notify.sh 3
# Brightness controls
bind = SUPER CTRL, 4, exec, ~/scripts/br_up.sh
bind = SUPER CTRL, 5, exec, ~/scripts/br_down.sh
# Blue light filter toggle
bind = SUPER CTRL, 6, exec, ~/scripts/br_blue.sh
# Filter Reset
bind = SUPER CTRL, 7, exec, ~/scripts/br_reset.sh
# Toggle Swaync Control center
bind = SUPER CTRL, 8, exec, swaync-client -t
# hyprlock
bind = $SUPER_SHIFT, l, exec, hyprlock
# hyprshot
bind = $mainMod ALT, 5, exec, hyprshot -m window
bind = $mainMod ALT, 4, exec, hyprshot -m region
# Move focus with mainMod + arrow keys
bind = $mainMod, h, movefocus, l
bind = $mainMod, j, movefocus, d
bind = $mainMod, k, movefocus, u
bind = $mainMod, l, movefocus, r
# Switch workspaces with mainMod + [0-9]
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
# Move active window to a workspace with mainMod + SHIFT + [0-9]
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
# Example special workspace (scratchpad)
bind = $mainMod, S, togglespecialworkspace, magic
bind = $mainMod SHIFT, S, movetoworkspace, special:magic
# Scroll through existing workspaces with mainMod + scroll
bind = $mainMod, mouse_down, workspace, e+1
bind = $mainMod, mouse_up, workspace, e-1
# Move/resize windows with mainMod + LMB/RMB and dragging
bindm = $mainMod, mouse:272, movewindow
bindm = $mainMod, mouse:273, resizewindow
# Laptop multimedia keys for volume and LCD brightness
bindel = ,XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+
bindel = ,XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-
bindel = ,XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle
bindel = ,XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle
bindel = ,XF86MonBrightnessUp, exec, brightnessctl s 10%+
bindel = ,XF86MonBrightnessDown, exec, brightnessctl s 10%-
# Requires playerctl
bindl = , XF86AudioNext, exec, playerctl next
bindl = , XF86AudioPause, exec, playerctl play-pause
bindl = , XF86AudioPlay, exec, playerctl play-pause
bindl = , XF86AudioPrev, exec, playerctl previous
# brightness adjustment
#bind = , code:232, exec, ~/.scripts/brightness.sh dec
#bind = , code:233, exec, ~/.scripts/brightness.sh inc
##############################
### WINDOWS AND WORKSPACES ###
##############################
# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more
# See https://wiki.hyprland.org/Configuring/Workspace-Rules/ for workspace rules
# Example windowrule v1
# windowrule = float, ^(kitty)$
# Example windowrule v2
# windowrulev2 = float,class:^(kitty)$,title:^(kitty)$
# Ignore maximize requests from apps. You'll probably like this.
windowrulev2 = suppressevent maximize, class:.*
# Fix some dragging issues with XWayland
#windowrulev2 = nofocus,class:^$,title:^$,xwayland:1,floating:1,fullscreen:0,pinned:0
#decoration {
# screen_shader = ~/.config/hypr/shaders/bluelight.frag
#}

View File

@@ -0,0 +1,79 @@
source = $HOME/.config/hypr/mocha.conf
$accent = $mauve
$accentAlpha = $mauveAlpha
$font = JetBrainsMono Nerd Font
# GENERAL
general {
disable_loading_bar = true
hide_cursor = true
}
# BACKGROUND
background {
monitor =
path = $WALLPAPER
blur_passes = 2
color = $base
}
# TIME
label {
monitor =
text = cmd[update:30000] echo "$(date +"%R")"
color = $text
font_size = 90
font_family = $font
position = -30, 0
halign = right
valign = top
}
# DATE
label {
monitor =
text = cmd[update:43200000] echo "$(date +"%A, %d %B %Y")"
color = $text
font_size = 25
font_family = $font
position = -30, -150
halign = right
valign = top
}
# USER AVATAR
image {
monitor =
path = ~/.face
size = 100
border_color = $accent
position = 0, 75
halign = center
valign = center
}
# INPUT FIELD
input-field {
monitor =
size = 300, 60
outline_thickness = 4
dots_size = 0.2
dots_spacing = 0.2
dots_center = true
outer_color = $accent
inner_color = $surface0
font_color = $text
fade_on_empty = false
placeholder_text = <span foreground="##$textAlpha"><i>󰌾 Logged in as </i><span foreground="##$accentAlpha">$USER</span></span>
hide_input = false
check_color = $accent
fail_color = $red
fail_text = <i>$FAIL <b>($ATTEMPTS)</b></i>
capslock_color = $yellow
position = 0, -35
halign = center
valign = center
}

View File

@@ -0,0 +1,78 @@
$rosewater = rgb(f5e0dc)
$rosewaterAlpha = f5e0dc
$flamingo = rgb(f2cdcd)
$flamingoAlpha = f2cdcd
$pink = rgb(f5c2e7)
$pinkAlpha = f5c2e7
$mauve = rgb(cba6f7)
$mauveAlpha = cba6f7
$red = rgb(f38ba8)
$redAlpha = f38ba8
$maroon = rgb(eba0ac)
$maroonAlpha = eba0ac
$peach = rgb(fab387)
$peachAlpha = fab387
$yellow = rgb(f9e2af)
$yellowAlpha = f9e2af
$green = rgb(a6e3a1)
$greenAlpha = a6e3a1
$teal = rgb(94e2d5)
$tealAlpha = 94e2d5
$sky = rgb(89dceb)
$skyAlpha = 89dceb
$sapphire = rgb(74c7ec)
$sapphireAlpha = 74c7ec
$blue = rgb(89b4fa)
$blueAlpha = 89b4fa
$lavender = rgb(b4befe)
$lavenderAlpha = b4befe
$text = rgb(cdd6f4)
$textAlpha = cdd6f4
$subtext1 = rgb(bac2de)
$subtext1Alpha = bac2de
$subtext0 = rgb(a6adc8)
$subtext0Alpha = a6adc8
$overlay2 = rgb(9399b2)
$overlay2Alpha = 9399b2
$overlay1 = rgb(7f849c)
$overlay1Alpha = 7f849c
$overlay0 = rgb(6c7086)
$overlay0Alpha = 6c7086
$surface2 = rgb(585b70)
$surface2Alpha = 585b70
$surface1 = rgb(45475a)
$surface1Alpha = 45475a
$surface0 = rgb(313244)
$surface0Alpha = 313244
$base = rgb(1e1e2e)
$baseAlpha = 1e1e2e
$mantle = rgb(181825)
$mantleAlpha = 181825
$crust = rgb(11111b)
$crustAlpha = 11111b

View File

@@ -0,0 +1,2 @@
preload = $WALLPAPER
wallpaper = , $WALLPAPER

View File

@@ -0,0 +1,28 @@
;; defsrc is still necessary
(defcfg
process-unmapped-keys yes
)
(defsrc
caps a s d f j k l ;
)
(defvar
tap-time 250
hold-time 250
)
(defalias
escctrl (tap-hold 250 250 esc lctrl)
a (multi f24 (tap-hold $tap-time $hold-time a lmet))
s (multi f24 (tap-hold $tap-time $hold-time s lalt))
d (multi f24 (tap-hold $tap-time $hold-time d lsft))
f (multi f24 (tap-hold $tap-time $hold-time f lctl))
j (multi f24 (tap-hold $tap-time $hold-time j rctl))
k (multi f24 (tap-hold $tap-time $hold-time k rsft))
l (multi f24 (tap-hold $tap-time $hold-time l ralt))
; (multi f24 (tap-hold $tap-time $hold-time ; rmet))
)
(deflayer base
@escctrl @a @s @d @f @j @k @l @;
)

View File

@@ -0,0 +1,22 @@
[Unit]
Description=Kanata keyboard remapper
Documentation=https://github.com/jtroo/kanata
[Service]
Environment=PATH=/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:${HOME}/.local/bin
Environment=DISPLAY=:0
# Uncomment the 4 lines beneath this to increase process priority
# of Kanata in case you encounter lagginess when resource constrained.
# WARNING: doing so will require the service to run as an elevated user such as root.
# Implementing least privilege access is an exercise left to the reader.
#
CPUSchedulingPolicy=rr
CPUSchedulingPriority=99
IOSchedulingClass=realtime
Nice=-20
Type=simple
ExecStart=/usr/bin/sh -c "exec $$(which kanata) --cfg $$HOME/.config/kanata/config.kbd"
Restart=no
[Install]
WantedBy=default.target

View File

@@ -0,0 +1,80 @@
# vim:ft=kitty
## name: Catppuccin-Mocha
## author: Pocco81 (https://github.com/Pocco81)
## license: MIT
## upstream: https://github.com/catppuccin/kitty/blob/main/mocha.conf
## blurb: Soothing pastel theme for the high-spirited!
window_padding_width 5 10
# The basic colors
foreground #CDD6F4
background #1E1E2E
selection_foreground #1E1E2E
selection_background #F5E0DC
# Cursor colors
cursor #F5E0DC
cursor_text_color #1E1E2E
# URL underline color when hovering with mouse
url_color #F5E0DC
# Kitty window border colors
active_border_color #B4BEFE
inactive_border_color #6C7086
bell_border_color #F9E2AF
# OS Window titlebar colors
wayland_titlebar_color system
macos_titlebar_color system
# Tab bar colors
active_tab_foreground #11111B
active_tab_background #CBA6F7
inactive_tab_foreground #CDD6F4
inactive_tab_background #181825
tab_bar_background #11111B
# Colors for marks (marked text in the terminal)
mark1_foreground #1E1E2E
mark1_background #B4BEFE
mark2_foreground #1E1E2E
mark2_background #CBA6F7
mark3_foreground #1E1E2E
mark3_background #74C7EC
# The 16 terminal colors
# black
color0 #45475A
color8 #585B70
# red
color1 #F38BA8
color9 #F38BA8
# green
color2 #A6E3A1
color10 #A6E3A1
# yellow
color3 #F9E2AF
color11 #F9E2AF
# blue
color4 #89B4FA
color12 #89B4FA
# magenta
color5 #F5C2E7
color13 #F5C2E7
# cyan
color6 #94E2D5
color14 #94E2D5
# white
color7 #BAC2DE
color15 #A6ADC8

View File

@@ -0,0 +1,14 @@
# BEGIN_KITTY_THEME
# Catppuccin-Mocha
include current-theme.conf
# END_KITTY_THEME
#
font_family Inconsolata Nerd Font
bold_font auto
italic_font auto
bold_italic_font auto
font_size 14
background_opacity 0.9

View File

@@ -0,0 +1,186 @@
# config.nu
#
# Installed by:
# version = "0.103.0"
#
# This file is used to override default Nushell settings, define
# (or import) custom commands, or run any other startup tasks.
# See https://www.nushell.sh/book/configuration.html
#
# This file is loaded after env.nu and before login.nu
#
# You can open this file in your default editor using:
# config nu
#
# See `help config nu` for more options
#
# You can remove these comments if you want or leave
# them for future reference.
# https://github.com/nushell/nu_scripts/tree/main/themes
let dark_theme = {
# color for nushell primitives
separator: white
leading_trailing_space_bg: { attr: n } # no fg, no bg, attr none effectively turns this off
header: green_bold
empty: blue
# Closures can be used to choose colors for specific values.
# The value (in this case, a bool) is piped into the closure.
# eg) {|| if $in { 'light_cyan' } else { 'light_gray' } }
bool: light_cyan
int: white
filesize: cyan
duration: white
date: purple
range: white
float: white
string: white
nothing: white
binary: white
cell-path: white
row_index: green_bold
record: white
list: white
block: white
hints: dark_gray
search_result: { bg: red fg: white }
shape_and: purple_bold
shape_binary: purple_bold
shape_block: blue_bold
shape_bool: light_cyan
shape_closure: green_bold
shape_custom: green
shape_datetime: cyan_bold
shape_directory: cyan
shape_external: cyan
shape_externalarg: green_bold
shape_external_resolved: light_yellow_bold
shape_filepath: cyan
shape_flag: blue_bold
shape_float: purple_bold
# shapes are used to change the cli syntax highlighting
shape_garbage: { fg: white bg: red attr: b}
shape_glob_interpolation: cyan_bold
shape_globpattern: cyan_bold
shape_int: purple_bold
shape_internalcall: cyan_bold
shape_keyword: cyan_bold
shape_list: cyan_bold
shape_literal: blue
shape_match_pattern: green
shape_matching_brackets: { attr: u }
shape_nothing: light_cyan
shape_operator: yellow
shape_or: purple_bold
shape_pipe: purple_bold
shape_range: yellow_bold
shape_record: cyan_bold
shape_redirection: purple_bold
shape_signature: green_bold
shape_string: green
shape_string_interpolation: cyan_bold
shape_table: blue_bold
shape_variable: purple
shape_vardecl: purple
shape_raw_string: light_purple
}
let light_theme = {
# color for nushell primitives
separator: dark_gray
leading_trailing_space_bg: { attr: n } # no fg, no bg, attr none effectively turns this off
header: green_bold
empty: blue
# Closures can be used to choose colors for specific values.
# The value (in this case, a bool) is piped into the closure.
# eg) {|| if $in { 'dark_cyan' } else { 'dark_gray' } }
bool: dark_cyan
int: dark_gray
filesize: cyan_bold
duration: dark_gray
date: purple
range: dark_gray
float: dark_gray
string: dark_gray
nothing: dark_gray
binary: dark_gray
cell-path: dark_gray
row_index: green_bold
record: dark_gray
list: dark_gray
block: dark_gray
hints: dark_gray
search_result: { fg: white bg: red }
shape_and: purple_bold
shape_binary: purple_bold
shape_block: blue_bold
shape_bool: light_cyan
shape_closure: green_bold
shape_custom: green
shape_datetime: cyan_bold
shape_directory: cyan
shape_external: cyan
shape_externalarg: green_bold
shape_external_resolved: light_purple_bold
shape_filepath: cyan
shape_flag: blue_bold
shape_float: purple_bold
# shapes are used to change the cli syntax highlighting
shape_garbage: { fg: white bg: red attr: b}
shape_globpattern: cyan_bold
shape_int: purple_bold
shape_internalcall: cyan_bold
shape_keyword: cyan_bold
shape_list: cyan_bold
shape_literal: blue
shape_match_pattern: green
shape_matching_brackets: { attr: u }
shape_nothing: light_cyan
shape_operator: yellow
shape_or: purple_bold
shape_pipe: purple_bold
shape_range: yellow_bold
shape_record: cyan_bold
shape_redirection: purple_bold
shape_signature: green_bold
shape_string: green
shape_string_interpolation: cyan_bold
shape_table: blue_bold
shape_variable: purple
shape_vardecl: purple
shape_raw_string: light_purple
}
# Example prompt with Nerd Font icons
def create_left_prompt [] {
let dir = ([
(char -u "e0b1"),
($env.PWD | str replace $nu.home-path "~")
] | str join)
let git_branch = (do -i { git rev-parse --abbrev-ref HEAD } | default "")
$"(ansi green)($dir)(ansi reset) (ansi purple)($git_branch)(ansi reset)"
}
$env.PROMPT_COMMAND = { create_left_prompt }
$env.GIT_DISCOVERY_ACROSS_FILESYSTEM = "1" # Allows Git to check parent dirs
def --wrapped git [...args] {
^git ...$args err> /dev/null
}
## Alias
source ~/.alias.nu
### autocompletion
## zoxide
#$env.ZOXIDE_HOOK = true
#$env.config.completions.quick = true # Show completions immediately
#$env.config.completions.partial = true # Complete on partial matches
#$env.config.completions.case_sensitive = false
#~/.config/nushell/config.nu
source ~/.cache/carapace/init.nu

View File

@@ -0,0 +1,29 @@
# env.nu
#
# Installed by:
# version = "0.103.0"
#
# Previously, environment variables were typically configured in `env.nu`.
# In general, most configuration can and should be performed in `config.nu`
# or one of the autoload directories.
#
# This file is generated for backwards compatibility for now.
# It is loaded before config.nu and login.nu
#
# See https://www.nushell.sh/book/configuration.html
#
# Also see `help config env` for more options.
#
# You can remove these comments if you want or leave
# them for future reference.
$env.GIT_DISCOVERY_ACROSS_FILESYSTEM = "1" # Allows Git to check parent dire
# Add after the last line
# https://carapace-sh.github.io/carapace-bin/setup.html#nushell
$env.FZF_DEFAULT_OPTS = "--ansi --preview-window 'right:60%' --preview 'bat --color=always --style=header,grid --line-range :300 {}'"
mkdir ~/.cache/carapace
carapace _carapace nushell | save --force ~/.cache/carapace/init.nu

View File

@@ -0,0 +1,363 @@
y
yazi
y
yazi
exit
y
yazi
tn
y
yazi
lt
ltree
ls
cld
exit
ffcbmp
y
exit
nu
exit
nu
ls
ltree
ripp
ripp 'radiohead'
ffcbmp
ffcmp
y
ltree
y
cl
exit
nu
exit
nu
y
$env.config.buffer_editor = <neovim>
$env.config.buffer_editor = <nvim>
$env.config.buffer_editor = neovim
$env.config.buffer_editor = nvim
$env.config.buffer_editor = "neovim"
config nu --doc | nu-highlight | less -R
vpnr
nmst
nmwi
vpnr
ys starship
starship
starship config
mkdir -p ~/.config/starship && touch ~/.config/starship/starship.toml
mkdir -p ~/.config/starship ; touch ~/.config/starship/starship.toml
mkdir ~/.config/starship ; touch ~/.config/starship/starship.toml
y
which starhip
starship --version
y
exit
$nu.config-path
ys nushell-bin-0.96.0
ys nushell-bin-0.96
exit
cd dotfiles
y
cd dotfiles
exit
cd dotfiles
cd
exit
cd dotfiles
starship config
y
which starhip
where starhip.conf
where starhip.toml
starship config
q
cd
cd podman
cd arr_stack/config/lidarr/
cd arr_stack/
cd ..
cd essentials_stack/data/movies/
cd
cd programming/
cd
cd podman/
cd dot
cd
cd dotfiles/
cd nvim/.config/nvim/lua/plugins/catppuccin.lua
cd nvim/.config/nvim/lua/plugins
exit
y
cd dotfiles/
cd programming/
cd
cd programming/
sudo pacman -S ttf-nerd-fonts-symbols
exit
cd programming/
starship config
cd
ys ttf-firecode-nerd
ys ttf-firacode
y
cd programming/
y
cd programming/
y
exit
cd programming/
config reset
exit
cd programming/
starship preset nerd-font-symbols -o ~/.config/starship.toml
starship config
exit
cd programming/
exit
cd programming/
exi
exit
cd programming/
y
exit
cd programming/
starship config
cd
cd dotfiles/nvim/.config/nvim/lua/plugins/
cd
cd podman
cd arr_stack/
cd config/radarr/
cd config/
cd config
cd ..
cd
cd dotfiles/
cd ~/.config/lazygit/
cd
cd Downloads/lebara.pdf
starship config
exit
cd dotfiles/
exit
cd dotfiles/
exit
cd dotfiles/
exit
cd dotfiles/
cd
cd dotfiles/
exit
test
cd dotfiles
cd Downloads/lebara.pdf
cd Downloads
cd
cd Downloads/
cd
cd programming/
y
cd dotfiles
cd
cd programming/
ys carapace-bin
y
which carapace
cd scripts
fzf
ys carapace-bin
starship config
rebo
reboot
cd programming/
cd
y
yazi
exit
nu
exit
cd
ys protonmail
y
let carapace_completer = {|spans|<\n> carapace $spans.0 nushell ...$spans | from json<\n>}
let fish_completer = {|spans|<\n> fish --command $'complete "--do-complete=($spans | str join " ")"'<\n> | from tsv --flexible --noheaders --no-infer<\n> | rename value description<\n> | update value {<\n> if ($in | path exists) {$'"($in | str replace "\"" "\\\"" )"'} else {$in}<\n> }<\n>}
fzf
exit
ls | get name | str join "\n" | fzf
$env.config.completions.algorithm = "Fuzzy"
cd StreamripDownloads/
cd
# I found the code below here: https://discord.com/channels/601130461678272522/615253963645911060/1209827461496569876<\n>$env.config.keybindings ++= [<\n> {<\n> name: fzf_files<\n> modifier: control<\n> keycode: char_t<\n> mode: [emacs, vi_normal, vi_insert]<\n> event: [<\n> {<\n> send: executehostcommand<\n> cmd: "<\n> let fzf_ctrl_t_command = \"fd --type=file | fzf --preview 'bat --color=always --style=full --line-range=:500 {}'\";<\n> let result = nu -c $fzf_ctrl_t_command;<\n> commandline edit --append $result;<\n> commandline set-cursor --end<\n> "<\n> }<\n> ]<\n> }<\n>]
let $config_path = $env.XDG_CONFIG_HOME? | default '~/.config' | path join broot select.toml<\n>mkdir ($config_path | path dirname) <\n><\n>{<\n> verbs: [<\n> [invocation, key, leave_broot, execution, apply_to];<\n> [ok, enter, true, ":print_path", file ],<\n> [ok, alt-enter, true, ":print_path", any ]<\n> ]<\n>} | save -f $config_path
exit
ls | get name | str join "\n" | fzf
ls
exit
nu
cld
y
cld
cd pod
exit
ls | get name | str join "\n" | fzf
ls Downloads/
exit
ls podman/
ls podman/arr_stack/
lt podman/essentials_stack/
ls podman/essentials_stack/
ls podman/essentials_stack/data/tv/
ls `podman/essentials_stack/data/tv/The Last of Us/`
exit
ls podman/essentials_stack/
exit
ls Downloads/
source ~/.config/nushell/config.nu
nvim ~/.config/nushell/config.nu
source ~/.config/nushell/config.nu
cld
exit
eit
exit
exir
exit
cd programming/
cld
cd
cd podman/
cl
cd
cl
$env.GIT_DISCOVERY_ACROSS_FILESYSTEM = "1" # Allows Git to check parent dirs
$env.GIT_DISCOVERY_ACROSS_FILESYSTEM = "1"
cl
cd
nvim ~/.config/nushell/config.nu
source ~/.config/nushell/config.nu
nvim ~/.config/nushell/config.nu
source ~/.config/nushell/config.nu
exit
nvim ~/.config/nushell/config.nu
git init
exit
source ~/.config/nushell/config.nu
exit
source ~/.config/nushell/config.nu
exit
source ~/.config/nushell/config.nu
do -i { git status } | ignore
exit
git status 2> /dev/null
exit
nvim ~/.config/nushell/config.nu
source ~/.config/nushell/config.nu
exit
ls Downloads/
cl
clear
exit
source ~/.config/nushell/config.nu
ls
clear
nvim ~/.config/nushell/config.nu
source ~/.config/nushell/config.nu
nvim ~/.config/nushell/config.nu
source ~/.config/nushell/config.nu
nvim ~/.config/nushell/config.nu
source ~/.config/nushell/config.nu
exit
source ~/.config/nushell/config.nu
exir
exit
source ~/.config/nushell/config.nu
exit
nvim ~/.config/nushell/config.nu
source ~/.config/nushell/config.nu
carapace _carapace nushell
nvim ~/.config/nushell/env.nu
nvim ~/.config/nushell/config.nu
source ~/.config/nushell/config.nu
exit
nvim ~/.config/nushell/env.nu
exit
carapace --run nu
--packages nushell carapace --run nu
bash --packages nushell carapace --run nu
exit
cd dotfiles
nvim ~/.config/nushell/env.nu
source ~/.config/nushell/config.nu
source ~/.config/nushell/env.nu
exit
carapace paru
carapace --init
carapace --help
carapace --run
carapace --run --help
carapace --run -h
carapace --run paru
carapace -h
carapace chmod nushell
carapace -h
carapace --run nushell
carapace nushell
carpace -h
carapace -h
carapace _carapace nushell
cd podman/monitoring_stack/data/influxdb
cd podman/monitoring_stack/data/influxdb/
carapace --makros
carapace --macro
cd dotfiles/
git status --
cd
nvim ~/.config/nushell/env.nu
bat ~/.config/nushell/env.nu
nvim ~/.config/nushell/env.nu
nvim ~/.config/nushell/config.nu
source ~/.config/nushell/env.nu
source ~/.config/nushell/config.nu
exit
cld
exit
ls programming/
ls programming/Algo/
lt podman/essentials_stack/
ls Downloads/
exit
ls Downloads/
nvim ~/.config/nushell/config.nu
source ~/.config/nushell/config.nu
ls Downloads/
exit
ls Downloads/
lt podman/essentials_stack/
exit
cld
source ~/.config/nushell/config.nu
exit
test
cld
exit
ys
cld
duaa
dfh
duf
cld
exit
ls ~/.config/hypr/
ls ~/.config/hypr/hypridle.conf
bat ~/.config/hypr/hypridle.conf
cat ~/.config/hypr/hypridle.conf
exit
fzf
source ~/.config/nushell/env.nu
fzf
cld
exit
bat ~/.ssh/id_ed25519.pub
exit

View File

@@ -0,0 +1,11 @@
{
"diagnostics.globals": [
"vim",
" false",
" "
],
"runtime.unicodeName": true,
"diagnostics.disable": [
"undefined-doc-name"
]
}

View File

@@ -0,0 +1,41 @@
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
vim.fn.system({
"git",
"clone",
"--filter=blob:none",
"https://github.com/folke/lazy.nvim.git",
"--branch=stable", -- latest stable release
lazypath,
})
end
vim.opt.rtp:prepend(lazypath)
-- Only enable spell checking for specific filetypes
vim.api.nvim_create_autocmd("FileType", {
pattern = { "markdown", "text", "gitcommit", "tex" },
callback = function()
vim.opt_local.spell = true
vim.opt_local.spelllang = "en_us,de"
end,
})
require("vim-options")
require("lazy").setup("plugins")
require("lualine").setup({
sections = {
lualine_x = {
{
require("noice").api.statusline.mode.get,
cond = require("noice").api.statusline.mode.has,
color = { fg = "#ff9e64" },
},
},
},
})
require("lazy").setup({
{
"tzachar/cmp-tabnine",
build = "./install.sh",
dependencies = "hrsh7th/nvim-cmp",
},
})

View File

@@ -0,0 +1,35 @@
vim.cmd("set expandtab")
vim.cmd("set tabstop=2")
vim.cmd("set softtabstop=2")
vim.cmd("set shiftwidth=2")
vim.g.mapleader = " "
-- Bootstrap lazy.nvim
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not (vim.uv or vim.loop).fs_stat(lazypath) then
local lazyrepo = "https://github.com/folke/lazy.nvim.git"
local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
if vim.v.shell_error ~= 0 then
vim.api.nvim_echo({
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
{ out, "WarningMsg" },
{ "\nPress any key to exit..." },
}, true, {})
vim.fn.getchar()
os.exit(1)
end
end
vim.opt.rtp:prepend(lazypath)
-- Make sure to setup `mapleader` and `maplocalleader` before
-- loading lazy.nvim so that mappings are correct.
-- This is also a good place to setup other settings (vim.opt)
vim.g.mapleader = " "
vim.g.maplocalleader = "\\"
-- Setup lazy.nvim
require("vim-options")
require("lazy").setup("plugins")

View File

@@ -0,0 +1,54 @@
{
"Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" },
"LuaSnip": { "branch": "master", "commit": "fb525166ccc30296fb3457441eb979113de46b00" },
"alpha-nvim": { "branch": "main", "commit": "3979b01cb05734331c7873049001d3f2bb8477f4" },
"barbecue": { "branch": "main", "commit": "cd7e7da622d68136e13721865b4d919efd6325ed" },
"catppuccin": { "branch": "main", "commit": "ce8d176faa4643e026e597ae3c31db59b63cef09" },
"cmp-buffer": { "branch": "main", "commit": "b74fab3656eea9de20a9b8116afa3cfc4ec09657" },
"cmp-cmdline": { "branch": "main", "commit": "d126061b624e0af6c3a556428712dd4d4194ec6d" },
"cmp-nvim-lsp": { "branch": "main", "commit": "cbc7b02bb99fae35cb42f514762b89b5126651ef" },
"cmp-path": { "branch": "main", "commit": "c642487086dbd9a93160e1679a1327be111cbc25" },
"cmp-tabnine": { "branch": "main", "commit": "c0167cdc86c15e782c5461ee62aebee89231c2ed" },
"cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" },
"diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" },
"dressing.nvim": { "branch": "master", "commit": "2d7c2db2507fa3c4956142ee607431ddb2828639" },
"flash.nvim": { "branch": "main", "commit": "fcea7ff883235d9024dc41e638f164a450c14ca2" },
"friendly-snippets": { "branch": "main", "commit": "572f5660cf05f8cd8834e096d7b4c921ba18e175" },
"fzf-lua": { "branch": "main", "commit": "9d579feab4d3035627150e5e9b6e8fbf5e814ef6" },
"gitsigns.nvim": { "branch": "main", "commit": "5813e4878748805f1518cee7abb50fd7205a3a48" },
"grapple.nvim": { "branch": "main", "commit": "b41ddfc1c39f87f3d1799b99c2f0f1daa524c5f7" },
"harpoon": { "branch": "harpoon2", "commit": "87b1a3506211538f460786c23f98ec63ad9af4e5" },
"indent-blankline.nvim": { "branch": "master", "commit": "005b56001b2cb30bfa61b7986bc50657816ba4ba" },
"lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" },
"lazydev.nvim": { "branch": "main", "commit": "5231c62aa83c2f8dc8e7ba957aa77098cda1257d" },
"lualine.nvim": { "branch": "master", "commit": "47f91c416daef12db467145e16bed5bbfe00add8" },
"luvit-meta": { "branch": "main", "commit": "0ea4ff636c5bb559ffa78108561d0976f4de9682" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "3b3571b4dadbcb464804466e9872e7246c316af7" },
"mason.nvim": { "branch": "main", "commit": "57e5a8addb8c71fb063ee4acda466c7cf6ad2800" },
"neo-tree.nvim": { "branch": "v3.x", "commit": "f3df514fff2bdd4318127c40470984137f87b62e" },
"neogit": { "branch": "master", "commit": "d8bf9102692250193b855acd9025a826f1af2729" },
"noice.nvim": { "branch": "main", "commit": "7bfd942445fb63089b59f97ca487d605e715f155" },
"none-ls.nvim": { "branch": "main", "commit": "5abf61927023ea83031753504adb19630ba80eef" },
"nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" },
"nvim-autopairs": { "branch": "master", "commit": "c2a0dd0d931d0fb07665e1fedb1ea688da3b80b4" },
"nvim-cmp": { "branch": "main", "commit": "d97d85e01339f01b842e6ec1502f639b080cb0fc" },
"nvim-lspconfig": { "branch": "master", "commit": "c4f67bf85b01a57e3c130352c0a0e453ab8cd5b9" },
"nvim-navic": { "branch": "master", "commit": "7d914a39a1ef8f4e22c2c4381abeef7c556f5a13" },
"nvim-notify": { "branch": "master", "commit": "8701bece920b38ea289b457f902e2ad184131a5d" },
"nvim-spectre": { "branch": "master", "commit": "72f56f7585903cd7bf92c665351aa585e150af0f" },
"nvim-tmux-navigation": { "branch": "main", "commit": "4898c98702954439233fdaf764c39636681e2861" },
"nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" },
"nvim-ts-context-commentstring": { "branch": "main", "commit": "1b212c2eee76d787bbea6aa5e92a2b534e7b4f8f" },
"nvim-web-devicons": { "branch": "master", "commit": "8dcb311b0c92d460fac00eac706abd43d94d68af" },
"obsidian.nvim": { "branch": "main", "commit": "ae1f76a75c7ce36866e1d9342a8f6f5b9c2caf9b" },
"plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" },
"portal.nvim": { "branch": "main", "commit": "77d9d53fec945bfa407d5fd7120f1b4f117450ed" },
"projections.nvim": { "branch": "main", "commit": "f18a8505f84f45a0fe024cafca5b969447f63cd5" },
"telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" },
"telescope.nvim": { "branch": "master", "commit": "3d757e586ff0bfc85bdb7b46c9d3d932147a0cde" },
"trouble.nvim": { "branch": "main", "commit": "bd67efe408d4816e25e8491cc5ad4088e708a69a" },
"vim-test": { "branch": "master", "commit": "1eeb12774a0f251571700ccf68da27789b2f0852" },
"vimux": { "branch": "master", "commit": "614f0bb1fb598f97accdcea71d5f7b18d7d62436" },
"which-key.nvim": { "branch": "main", "commit": "3aab2147e74890957785941f0c1ad87d0a44c15a" },
"yazi.nvim": { "branch": "main", "commit": "275c195596c857955f4627a8b48b68144d79478f" }
}

View File

@@ -0,0 +1,9 @@
return {
{
"hrsh7th/cmp-path", -- file and folders
"hrsh7th/cmp-buffer", -- words from the current buffer
"hrsh7th/cmp-nvim-lsp", -- LSP-based autocompletions
"hrsh7th/cmp-cmdline", -- Command-line autocompletions
"tzachar/cmp-tabnine"--, build = "./install.sh",
},
}

View File

@@ -0,0 +1,60 @@
return {
{
"williamboman/mason.nvim",
lazy = false,
config = function()
require("mason").setup()
end,
},
{
"williamboman/mason-lspconfig.nvim",
lazy = false,
opts = {
auto_install = true,
},
},
{
"neovim/nvim-lspconfig",
lazy = false,
config = function()
local capabilities = require('cmp_nvim_lsp').default_capabilities()
-- Define server configurations
local servers = {
ts_ls = {},
solargraph = {},
html = {},
lua_ls = {},
pyright = {},
-- ltex = {
-- cmd_env = {
-- JAVA_TOOL_OPTIONS = "-Djdk.xml.totalEntitySizeLimit=0 -Djdk.xml.entityExpansionLimit=0"
-- },
-- filetypes = { "markdown", "text", "tex", "gitcommit" },
-- settings = {
-- ltex = {
-- language = "en-US",
-- additionalRules = {
-- enablePickyRules = true,
-- motherTongue = "de-DE",
-- },
-- }
-- }
-- },
}
-- Setup each server with the new API
for server, config in pairs(servers) do
config.capabilities = capabilities
vim.lsp.config[server] = config
vim.lsp.enable(server)
end
-- LSP keymaps
vim.keymap.set("n", "K", vim.lsp.buf.hover, {})
vim.keymap.set("n", "<leader>gd", vim.lsp.buf.definition, {})
vim.keymap.set("n", "<leader>gr", vim.lsp.buf.references, {})
vim.keymap.set("n", "<leader>ca", vim.lsp.buf.code_action, {})
end,
},
}

View File

@@ -0,0 +1,46 @@
return {
{
"williamboman/mason.nvim",
lazy = false,
config = function()
require("mason").setup()
end,
},
{
"williamboman/mason-lspconfig.nvim",
lazy = false,
opts = {
auto_install = true,
},
},
{
"neovim/nvim-lspconfig",
lazy = false,
config = function()
local capabilities = require('cmp_nvim_lsp').default_capabilities()
local lspconfig = require("lspconfig")
lspconfig.ts_ls.setup({
capabilities = capabilities
})
lspconfig.solargraph.setup({
capabilities = capabilities
})
lspconfig.html.setup({
capabilities = capabilities
})
lspconfig.lua_ls.setup({
capabilities = capabilities
})
lspconfig.pyright.setup({
capabilities = capabilities
})
vim.keymap.set("n", "K", vim.lsp.buf.hover, {})
vim.keymap.set("n", "<leader>gd", vim.lsp.buf.definition, {})
vim.keymap.set("n", "<leader>gr", vim.lsp.buf.references, {})
vim.keymap.set("n", "<leader>ca", vim.lsp.buf.code_action, {})
end,
},
}

View File

@@ -0,0 +1,84 @@
return {
{
"iamcco/markdown-preview.nvim",
cmd = { "MarkdownPreviewToggle", "MarkdownPreview", "MarkdownPreviewStop" },
ft = { "markdown" },
build = function()
vim.fn["mkdp#util#install"]()
end,
config = function()
-- Set to 1 to open preview in browser automatically when entering markdown buffer
vim.g.mkdp_auto_start = 0
-- Set to 1 to auto close preview when switching away from markdown buffer
vim.g.mkdp_auto_close = 1
-- Set to 1 to refresh on save only, 0 to refresh on every change
vim.g.mkdp_refresh_slow = 0
-- Specify browser to open preview page
-- Can be 'firefox', 'chrome', etc. or leave empty for default
vim.g.mkdp_browser = ""
-- Set to 1 to echo preview page URL in command line
vim.g.mkdp_echo_preview_url = 0
-- Options for markdown rendering
-- mkit: markdown-it options for rendering
-- katex: KaTeX options for math typesetting
-- uml: markdown-it-plantuml options
vim.g.mkdp_preview_options = {
mkit = {},
katex = {},
uml = {},
maid = {},
disable_sync_scroll = 0,
sync_scroll_type = "middle",
hide_yaml_meta = 1,
sequence_diagrams = {},
flowchart_diagrams = {},
content_editable = false,
disable_filename = 0,
toc = {},
}
-- Use custom markdown style (absolute path or URL)
vim.g.mkdp_markdown_css = ""
-- Use custom highlight style (absolute path or URL)
vim.g.mkdp_highlight_css = ""
-- Custom port for preview server (empty = auto select)
vim.g.mkdp_port = ""
-- Theme: 'dark' or 'light'
vim.g.mkdp_theme = "dark"
-- Combine preview window (set to 1 to combine multiple markdown preview windows)
vim.g.mkdp_combine_preview = 0
-- Auto-start preview when entering markdown buffer
vim.g.mkdp_auto_start = 0
end,
keys = {
{
"<leader>mp",
"<cmd>MarkdownPreviewToggle<cr>",
desc = "Markdown Preview Toggle",
ft = "markdown",
},
{
"<leader>ms",
"<cmd>MarkdownPreview<cr>",
desc = "Markdown Preview Start",
ft = "markdown",
},
{
"<leader>mS",
"<cmd>MarkdownPreviewStop<cr>",
desc = "Markdown Preview Stop",
ft = "markdown",
},
},
},
}

View File

@@ -0,0 +1,21 @@
return {
"nvimtools/none-ls.nvim",
config = function()
local null_ls = require("null-ls")
null_ls.setup({
sources = {
null_ls.builtins.formatting.stylua,
null_ls.builtins.formatting.prettier,
-- null_ls.builtins.diagnostics.eslint_d,
null_ls.builtins.diagnostics.rubocop,
null_ls.builtins.formatting.rubocop,
null_ls.builtins.formatting.black,
null_ls.builtins.formatting.isort,
null_ls.builtins.diagnostics.pylint,
},
})
vim.keymap.set("n", "<leader>gf", vim.lsp.buf.format, {})
end,
}

View File

@@ -0,0 +1,8 @@
-- return {
-- "stevearc/oil.nvim",
-- config = function()
-- local oil = require("oil")
-- oil.setup()
-- vim.keymap.set("n", "-", oil.toggle_float, {})
-- end,
--}

View File

@@ -0,0 +1,5 @@
return {
"vinnymeller/swagger-preview.nvim",
build = "npm install -g swagger-ui-watcher",
config = true,
}

View File

@@ -0,0 +1,26 @@
return {
{
"nvim-telescope/telescope-ui-select.nvim",
},
{
"nvim-telescope/telescope.nvim",
tag = "0.1.5",
dependencies = { "nvim-lua/plenary.nvim" },
config = function()
require("telescope").setup({
extensions = {
["ui-select"] = {
require("telescope.themes").get_dropdown({}),
},
},
})
local builtin = require("telescope.builtin")
vim.keymap.set("n", "<C-p>", builtin.find_files, {})
vim.keymap.set("n", "<leader>fg", builtin.live_grep, {})
vim.keymap.set("n", "<leader><leader>", builtin.oldfiles, {})
require("telescope").load_extension("ui-select")
require("telescope").load_extension("noice")
end,
},
}

View File

@@ -0,0 +1 @@
return {}

View File

@@ -0,0 +1,31 @@
return {
"goolord/alpha-nvim",
dependencies = {
"nvim-tree/nvim-web-devicons",
},
config = function()
local alpha = require("alpha")
local dashboard = require("alpha.themes.startify")
dashboard.section.header.val = {
[[ ]],
[[ ]],
[[ ]],
[[ ]],
[[  ]],
[[ ████ ██████ █████ ██ ]],
[[ ███████████ █████  ]],
[[ █████████ ███████████████████ ███ ███████████ ]],
[[ █████████ ███ █████████████ █████ ██████████████ ]],
[[ █████████ ██████████ █████████ █████ █████ ████ █████ ]],
[[ ███████████ ███ ███ █████████ █████ █████ ████ █████ ]],
[[ ██████ █████████████████████ ████ █████ █████ ████ ██████ ]],
[[ ]],
[[ ]],
[[ ]],
}
alpha.setup(dashboard.opts)
end,
}

View File

@@ -0,0 +1,96 @@
return {
{
"windwp/nvim-autopairs",
event = "InsertEnter",
dependencies = {
"hrsh7th/nvim-cmp",
},
config = function()
local autopairs = require("nvim-autopairs")
local cmp_autopairs = require("nvim-autopairs.completion.cmp")
local cmp = require("cmp")
autopairs.setup({
check_ts = true, -- Enable treesitter
ts_config = {
lua = { "string" }, -- Don't add pairs in lua string treesitter nodes
javascript = { "template_string" }, -- Don't add pairs in JS template strings
java = false, -- Don't check treesitter on java
},
disable_filetype = { "TelescopePrompt", "vim" },
disable_in_macro = true, -- Disable when recording or executing a macro
disable_in_visualblock = false, -- Disable when in visual block mode
disable_in_replace_mode = true,
ignored_next_char = [=[[%w%%%'%[%"%.%`%$]]=],
enable_moveright = true,
enable_afterquote = true, -- Add bracket pairs after quote
enable_check_bracket_line = true, -- Check bracket in same line
enable_bracket_in_quote = true,
enable_abbr = false, -- Trigger abbreviation
break_undo = true, -- Switch for basic rule break undo sequence
check_comma = true,
map_cr = true,
map_bs = true, -- Map the <BS> key
map_c_h = false, -- Map the <C-h> key to delete a pair
map_c_w = false, -- Map <c-w> to delete a pair if possible
})
-- Integration with nvim-cmp
cmp.event:on("confirm_done", cmp_autopairs.on_confirm_done())
-- Treesitter rules
local ts_conds = require("nvim-autopairs.ts-conds")
-- Press % => %% only while inside a comment or string
autopairs.add_rules({
require("nvim-autopairs.rule")("%", "%", "lua")
:with_pair(ts_conds.is_ts_node({ "string", "comment" })),
require("nvim-autopairs.rule")("$", "$", "lua")
:with_pair(ts_conds.is_not_ts_node({ "function" })),
})
-- Add spaces between parentheses
local Rule = require("nvim-autopairs.rule")
local cond = require("nvim-autopairs.conds")
autopairs.add_rules({
Rule(" ", " ")
:with_pair(function(opts)
local pair = opts.line:sub(opts.col - 1, opts.col)
return vim.tbl_contains({ "()", "[]", "{}" }, pair)
end)
:with_move(cond.none())
:with_cr(cond.none())
:with_del(function(opts)
local col = vim.api.nvim_win_get_cursor(0)[2]
local context = opts.line:sub(col - 1, col + 2)
return vim.tbl_contains({ "( )", "[ ]", "{ }" }, context)
end),
Rule("", " )")
:with_pair(cond.none())
:with_move(function(opts)
return opts.char == ")"
end)
:with_cr(cond.none())
:with_del(cond.none())
:use_key(")"),
Rule("", " }")
:with_pair(cond.none())
:with_move(function(opts)
return opts.char == "}"
end)
:with_cr(cond.none())
:with_del(cond.none())
:use_key("}"),
Rule("", " ]")
:with_pair(cond.none())
:with_move(function(opts)
return opts.char == "]"
end)
:with_cr(cond.none())
:with_del(cond.none())
:use_key("]"),
})
end,
},
}

View File

@@ -0,0 +1,99 @@
return {
{
"utilyre/barbecue.nvim",
name = "barbecue",
version = "*",
dependencies = {
"SmiteshP/nvim-navic",
"nvim-tree/nvim-web-devicons",
},
event = { "BufReadPost", "BufNewFile" },
config = function()
require("barbecue").setup({
-- Create autocmd to attach to LSP
attach_navic = true,
-- Create user commands
create_autocmd = true,
-- Whether to show/use file icons
show_modified = false,
-- Whether to show file path
show_dirname = true,
-- Whether to show basename
show_basename = true,
-- Filetypes to exclude
exclude_filetypes = { "netrw", "toggleterm", "alpha", "NvimTree" },
-- Modifiers to apply to dirname
modifiers = {
dirname = ":~:.",
basename = "",
},
-- Whether to display path to file
show_navic = true,
-- Custom section
custom_section = function()
return " "
end,
-- Theme configuration
theme = "auto", -- 'auto', 'tokyonight', 'catppuccin', etc.
-- Symbols for different node kinds
kinds = {
File = "",
Module = "",
Namespace = "",
Package = "",
Class = "",
Method = "",
Property = "",
Field = "",
Constructor = "",
Enum = "",
Interface = "",
Function = "",
Variable = "",
Constant = "",
String = "",
Number = "",
Boolean = "",
Array = "",
Object = "",
Key = "",
Null = "",
EnumMember = "",
Struct = "",
Event = "",
Operator = "",
TypeParameter = "",
},
})
end,
},
{
"SmiteshP/nvim-navic",
dependencies = {
"neovim/nvim-lspconfig",
},
opts = {
lsp = {
auto_attach = true,
preference = nil,
},
highlight = true,
separator = " > ",
depth_limit = 0,
depth_limit_indicator = "..",
safe_output = true,
lazy_update_context = false,
click = false,
},
},
}

View File

@@ -0,0 +1,11 @@
return {
{
"catppuccin/nvim",
lazy = false,
name = "catppuccin",
priority = 1000,
config = function()
vim.cmd.colorscheme "catppuccin-mocha"
end
}
}

View File

@@ -0,0 +1,24 @@
return {
{
"hrsh7th/cmp-nvim-lsp",
},
{
"L3MON4D3/LuaSnip",
dependencies = {
"saadparwaiz1/cmp_luasnip",
"rafamadriz/friendly-snippets",
},
},
{
"hrsh7th/nvim-cmp",
dependencies = {
"hrsh7th/cmp-path",
"hrsh7th/cmp-buffer",
"hrsh7th/cmp-cmdline",
},
},
{
"tzachar/cmp-tabnine",
build = "./install.sh",
},
}

View File

@@ -0,0 +1,56 @@
return {
{
"numToStr/Comment.nvim",
event = { "BufReadPre", "BufNewFile" },
dependencies = {
"JoosepAlviste/nvim-ts-context-commentstring",
},
config = function()
local comment = require("Comment")
local ts_context_commentstring = require("ts_context_commentstring.integrations.comment_nvim")
comment.setup({
-- Add a space between comment and the line
padding = true,
-- Whether the cursor should stay at its position
sticky = true,
-- Lines to be ignored while (un)comment
ignore = "^$",
-- LHS of toggle mappings in NORMAL mode
toggler = {
line = "gcc", -- Line-comment toggle keymap
block = "gbc", -- Block-comment toggle keymap
},
-- LHS of operator-pending mappings in NORMAL and VISUAL mode
opleader = {
line = "gc", -- Line-comment keymap
block = "gb", -- Block-comment keymap
},
-- LHS of extra mappings
extra = {
above = "gcO", -- Add comment on the line above
below = "gco", -- Add comment on the line below
eol = "gcA", -- Add comment at the end of line
},
-- Enable keybindings
-- NOTE: If given `false` then the plugin won't create any mappings
mappings = {
basic = true,
extra = true,
},
-- Function to call before (un)comment
pre_hook = ts_context_commentstring.create_pre_hook(),
-- Function to call after (un)comment
post_hook = nil,
})
end,
},
}

View File

@@ -0,0 +1,45 @@
return {
{
"hrsh7th/cmp-nvim-lsp",
},
{
"L3MON4D3/LuaSnip",
-- follow latest release.
version = "v2.*", -- Replace <CurrentMajor> by the latest released major (first number of latest release)
-- install jsregexp (optional!).
build = "make install_jsregexp"
},
{
"hrsh7th/nvim-cmp",
config = function()
local cmp = require("cmp")
require("luasnip.loaders.from_vscode").lazy_load()
cmp.setup({
snippet = {
expand = function(args)
require("luasnip").lsp_expand(args.body)
end,
},
window = {
completion = cmp.config.window.bordered(),
documentation = cmp.config.window.bordered(),
},
mapping = cmp.mapping.preset.insert({
["<C-b>"] = cmp.mapping.scroll_docs(-4),
["<C-f>"] = cmp.mapping.scroll_docs(4),
["<C-Space>"] = cmp.mapping.complete(),
["<C-e>"] = cmp.mapping.abort(),
["<CR>"] = cmp.mapping.confirm({ select = true }),
}),
sources = cmp.config.sources({
{ name = "nvim_lsp" },
{ name = "luasnip" }, -- For luasnip users.
{ name = "buffer" },
{ name = "path" },
{ name = "cmp_tabnine" }, -- ai powerde suggestions
}),
})
end,
},
}

View File

@@ -0,0 +1,44 @@
return {
{
"stevearc/dressing.nvim",
event = "VeryLazy",
opts = {
input = {
enabled = true,
default_prompt = "Input:",
trim_prompt = true,
title_pos = "left",
start_in_insert = true,
border = "rounded",
relative = "cursor",
prefer_width = 40,
win_options = {
winblend = 0,
},
mappings = {
n = {
["<Esc>"] = "Close",
["<CR>"] = "Confirm",
},
i = {
["<C-c>"] = "Close",
["<CR>"] = "Confirm",
["<Up>"] = "HistoryPrev",
["<Down>"] = "HistoryNext",
},
},
},
select = {
enabled = true,
backend = { "telescope", "builtin" },
trim_prompt = true,
telescope = require("telescope.themes").get_dropdown({
layout_config = {
width = 0.8,
height = 0.8,
},
}),
},
},
},
}

View File

@@ -0,0 +1,50 @@
return {
{
"folke/flash.nvim",
event = "VeryLazy",
---@type Flash.Config
opts = {},
keys = {
{
"<leader>w",
mode = { "n", "x", "o" },
function()
require("flash").jump()
end,
desc = "Flash",
},
{
"<leader>W",
mode = { "n", "x", "o" },
function()
require("flash").treesitter()
end,
desc = "Flash Treesitter",
},
{
"<leader>r",
mode = "o",
function()
require("flash").remote()
end,
desc = "Remote Flash",
},
{
"<leader>R",
mode = { "o", "x" },
function()
require("flash").treesitter_search()
end,
desc = "Treesitter Search",
},
{
"<c-f>",
mode = { "c" },
function()
require("flash").toggle()
end,
desc = "Toggle Flash Search",
},
},
},
}

View File

@@ -0,0 +1,14 @@
return {
{
"ibhagwan/fzf-lua",
-- optional for icon support
dependencies = { "nvim-tree/nvim-web-devicons" },
-- or if using mini.icons/mini.nvim
-- dependencies = { "nvim-mini/mini.icons" },
---@module "fzf-lua"
---@type fzf-lua.Config|{}
---@diagnostics disable: missing-fields
opts = {},
---@diagnostics enable: missing-fields
},
}

View File

@@ -0,0 +1,86 @@
return {
{
"lewis6991/gitsigns.nvim",
event = { "BufReadPre", "BufNewFile" },
config = function()
require("gitsigns").setup({
signs = {
add = { text = "" },
change = { text = "" },
delete = { text = "_" },
topdelete = { text = "" },
changedelete = { text = "~" },
untracked = { text = "" },
},
signcolumn = true, -- Toggle with `:Gitsigns toggle_signs`
numhl = false, -- Toggle with `:Gitsigns toggle_numhl`
linehl = false, -- Toggle with `:Gitsigns toggle_linehl`
word_diff = false, -- Toggle with `:Gitsigns toggle_word_diff`
watch_gitdir = {
follow_files = true
},
attach_to_untracked = true,
current_line_blame = false, -- Toggle with `:Gitsigns toggle_current_line_blame`
current_line_blame_opts = {
virt_text = true,
virt_text_pos = "eol", -- 'eol' | 'overlay' | 'right_align'
delay = 1000,
ignore_whitespace = false,
virt_text_priority = 100,
},
current_line_blame_formatter = "<author>, <author_time:%Y-%m-%d> - <summary>",
sign_priority = 6,
update_debounce = 100,
status_formatter = nil,
max_file_length = 40000,
preview_config = {
border = "rounded",
style = "minimal",
relative = "cursor",
row = 0,
col = 1
},
on_attach = function(bufnr)
local gs = package.loaded.gitsigns
local function map(mode, l, r, opts)
opts = opts or {}
opts.buffer = bufnr
vim.keymap.set(mode, l, r, opts)
end
-- Navigation
map("n", "]c", function()
if vim.wo.diff then return "]c" end
vim.schedule(function() gs.next_hunk() end)
return "<Ignore>"
end, { expr = true, desc = "Next hunk" })
map("n", "[c", function()
if vim.wo.diff then return "[c" end
vim.schedule(function() gs.prev_hunk() end)
return "<Ignore>"
end, { expr = true, desc = "Previous hunk" })
-- Actions
map("n", "<leader>hs", gs.stage_hunk, { desc = "Stage hunk" })
map("n", "<leader>hr", gs.reset_hunk, { desc = "Reset hunk" })
map("v", "<leader>hs", function() gs.stage_hunk({ vim.fn.line("."), vim.fn.line("v") }) end, { desc = "Stage hunk" })
map("v", "<leader>hr", function() gs.reset_hunk({ vim.fn.line("."), vim.fn.line("v") }) end, { desc = "Reset hunk" })
map("n", "<leader>hS", gs.stage_buffer, { desc = "Stage buffer" })
map("n", "<leader>hu", gs.undo_stage_hunk, { desc = "Undo stage hunk" })
map("n", "<leader>hR", gs.reset_buffer, { desc = "Reset buffer" })
map("n", "<leader>hp", gs.preview_hunk, { desc = "Preview hunk" })
map("n", "<leader>hb", function() gs.blame_line({ full = true }) end, { desc = "Blame line" })
map("n", "<leader>tb", gs.toggle_current_line_blame, { desc = "Toggle line blame" })
map("n", "<leader>hd", gs.diffthis, { desc = "Diff this" })
map("n", "<leader>hD", function() gs.diffthis("~") end, { desc = "Diff this ~" })
map("n", "<leader>td", gs.toggle_deleted, { desc = "Toggle deleted" })
-- Text object
map({ "o", "x" }, "ih", ":<C-U>Gitsigns select_hunk<CR>", { desc = "Select hunk" })
end
})
end,
},
}

View File

@@ -0,0 +1,68 @@
return {
{
"ThePrimeagen/harpoon",
branch = "harpoon2",
dependencies = {
"nvim-lua/plenary.nvim",
"nvim-telescope/telescope.nvim",
},
config = function()
local harpoon = require("harpoon")
-- Setup harpoon
harpoon:setup({
settings = {
save_on_toggle = true,
sync_on_ui_close = true,
key = function()
return vim.loop.cwd()
end,
},
})
-- Basic keymaps
vim.keymap.set("n", "<leader>a", function() harpoon:list():add() end,
{ desc = "Harpoon: Add file" })
vim.keymap.set("n", "<C-e>", function() harpoon.ui:toggle_quick_menu(harpoon:list()) end,
{ desc = "Harpoon: Toggle menu" })
-- Navigate to files 1-4
vim.keymap.set("n", "<leader>1", function() harpoon:list():select(1) end,
{ desc = "Harpoon: Go to file 1" })
vim.keymap.set("n", "<leader>2", function() harpoon:list():select(2) end,
{ desc = "Harpoon: Go to file 2" })
vim.keymap.set("n", "<leader>3", function() harpoon:list():select(3) end,
{ desc = "Harpoon: Go to file 3" })
vim.keymap.set("n", "<leader>4", function() harpoon:list():select(4) end,
{ desc = "Harpoon: Go to file 4" })
-- Navigate to previous & next buffers
vim.keymap.set("n", "<C-S-P>", function() harpoon:list():prev() end,
{ desc = "Harpoon: Previous file" })
vim.keymap.set("n", "<C-S-N>", function() harpoon:list():next() end,
{ desc = "Harpoon: Next file" })
-- Telescope integration
local conf = require("telescope.config").values
local function toggle_telescope(harpoon_files)
local file_paths = {}
for _, item in ipairs(harpoon_files.items) do
table.insert(file_paths, item.value)
end
require("telescope.pickers").new({}, {
prompt_title = "Harpoon",
finder = require("telescope.finders").new_table({
results = file_paths,
}),
previewer = conf.file_previewer({}),
sorter = conf.generic_sorter({}),
}):find()
end
vim.keymap.set("n", "<leader>h", function() toggle_telescope(harpoon:list()) end,
{ desc = "Open harpoon window with Telescope" })
end,
},
}

View File

@@ -0,0 +1,18 @@
return {
{
"lukas-reineke/indent-blankline.nvim",
main = "ibl",
config = function()
require("ibl").setup({
indent = {
char = "",
},
scope = {
enabled = true,
show_start = true,
show_end = false,
},
})
end,
},
}

View File

@@ -0,0 +1,38 @@
return {
{
"folke/lazydev.nvim",
ft = "lua",
dependencies = {
"Bilal2453/luvit-meta",
},
opts = {
library = {
-- Load luvit types when the `vim.uv` word is found
{ path = "luvit-meta/library", words = { "vim%.uv" } },
-- Load LazyVim types when the `LazyVim` word is found
{ path = "LazyVim", words = { "LazyVim" } },
-- Add nvim-navic to library for completions
{ path = "nvim-navic", words = { "navic" } },
-- Add barbecue to library
{ path = "barbecue.nvim", words = { "barbecue" } },
},
-- Enable type checking
enabled = function(root_dir)
return vim.g.lazydev_enabled == nil and true or vim.g.lazydev_enabled
end,
-- Disable integration with cmp
integrations = {
-- Enable lspconfig integration
lspconfig = true,
-- Enable cmp integration
cmp = true,
-- Enable coq integration
coq = false,
},
},
},
{
"Bilal2453/luvit-meta",
lazy = true,
},
}

View File

@@ -0,0 +1,71 @@
return {
{
"williamboman/mason.nvim",
lazy = false,
config = function()
require("mason").setup()
end,
},
{
"williamboman/mason-lspconfig.nvim",
lazy = false,
opts = {
auto_install = true,
},
},
{
"neovim/nvim-lspconfig",
lazy = false,
dependencies = {
"SmiteshP/nvim-navic", -- Add this dependency
},
config = function()
local capabilities = require('cmp_nvim_lsp').default_capabilities()
local navic = require("nvim-navic")
-- Define server configurations
local servers = {
ts_ls = {},
solargraph = {},
html = {},
lua_ls = {
settings = {
Lua = {
diagnostics = {
globals = { "vim" },
},
workspace = {
checkThirdParty = false,
},
telemetry = {
enable = false,
},
},
},
},
pyright = {},
}
-- Setup each server with the new API
for server, config in pairs(servers) do
config.capabilities = capabilities
-- Add navic on_attach for breadcrumbs
config.on_attach = function(client, bufnr)
if client.server_capabilities.documentSymbolProvider then
navic.attach(client, bufnr)
end
end
vim.lsp.config[server] = config
vim.lsp.enable(server)
end
-- LSP keymaps
vim.keymap.set("n", "K", vim.lsp.buf.hover, {})
vim.keymap.set("n", "<leader>gd", vim.lsp.buf.definition, {})
vim.keymap.set("n", "<leader>gr", vim.lsp.buf.references, {})
vim.keymap.set("n", "<leader>ca", vim.lsp.buf.code_action, {})
end,
},
}

View File

@@ -0,0 +1,10 @@
return {
"nvim-lualine/lualine.nvim",
config = function ()
require('lualine').setup({
options = {
theme = 'dracula'
}
})
end
}

View File

@@ -0,0 +1,13 @@
return {
"nvim-neo-tree/neo-tree.nvim",
branch = "v3.x",
dependencies = {
"nvim-lua/plenary.nvim",
"nvim-tree/nvim-web-devicons",
"MunifTanjim/nui.nvim",
},
config = function()
vim.keymap.set("n", "<leader>ee", ":Neotree filesystem reveal left<CR>", {})
vim.keymap.set("n", "<leader>bf", ":Neotree buffers reveal float<CR>", {})
end,
}

View File

@@ -0,0 +1,24 @@
return {
{
"NeogitOrg/neogit",
dependencies = {
"nvim-lua/plenary.nvim",
"sindrets/diffview.nvim",
"nvim-telescope/telescope.nvim",
},
opts = {
integrations = {
telescope = true,
diffview = true,
},
kind = "tab",
},
keys = {
{ "<leader>gs", "<cmd>Neogit<cr>", desc = "Neogit Status" },
{ "<leader>gc", "<cmd>Neogit commit<cr>", desc = "Neogit Commit" },
{ "<leader>gp", "<cmd>Neogit pull<cr>", desc = "Neogit Pull" },
{ "<leader>gP", "<cmd>Neogit push<cr>", desc = "Neogit Push" },
{ "<leader>gb", "<cmd>Neogit branch<cr>", desc = "Neogit Branch" },
},
},
}

View File

@@ -0,0 +1,17 @@
return { -- lazy.nvim
{
"folke/noice.nvim",
event = "VeryLazy",
opts = {
-- add any options here
},
dependencies = {
-- if you lazy-load any plugin below, make sure to add proper `module="..."` entries
"MunifTanjim/nui.nvim",
-- OPTIONAL:
-- `nvim-notify` is only needed, if you want to use the notification view.
-- If not available, we use `mini` as the fallback
"rcarriga/nvim-notify",
},
},
}

View File

@@ -0,0 +1,23 @@
return {
"nvimtools/none-ls.nvim",
dependencies = {
"nvim-lua/plenary.nvim",
},
event = { "BufReadPre", "BufNewFile" },
config = function()
local null_ls = require("null-ls")
null_ls.setup({
sources = {
null_ls.builtins.formatting.stylua,
null_ls.builtins.formatting.prettier,
-- null_ls.builtins.diagnostics.eslint_d,
null_ls.builtins.diagnostics.rubocop,
null_ls.builtins.formatting.rubocop,
null_ls.builtins.formatting.black,
null_ls.builtins.formatting.isort,
null_ls.builtins.diagnostics.pylint,
},
})
vim.keymap.set("n", "<leader>gf", vim.lsp.buf.format, {})
end,
}

View File

@@ -0,0 +1,159 @@
return {
{
"nvim-pack/nvim-spectre",
dependencies = {
"nvim-lua/plenary.nvim",
},
config = function()
require("spectre").setup({
-- Optional: customize colors
color_devicons = true,
open_cmd = "vnew",
live_update = false, -- auto execute search again when you write any file
line_sep_start = "┌-----------------------------------------",
result_padding = "¦ ",
line_sep = "└-----------------------------------------",
highlight = {
ui = "String",
search = "DiffChange",
replace = "DiffDelete",
},
mapping = {
["toggle_line"] = {
map = "dd",
cmd = "<cmd>lua require('spectre').toggle_line()<CR>",
desc = "toggle item",
},
["enter_file"] = {
map = "<cr>",
cmd = "<cmd>lua require('spectre.actions').select_entry()<CR>",
desc = "open file",
},
["send_to_qf"] = {
map = "<leader>q",
cmd = "<cmd>lua require('spectre.actions').send_to_qf()<CR>",
desc = "send all items to quickfix",
},
["replace_cmd"] = {
map = "<leader>c",
cmd = "<cmd>lua require('spectre.actions').replace_cmd()<CR>",
desc = "input replace command",
},
["show_option_menu"] = {
map = "<leader>o",
cmd = "<cmd>lua require('spectre').show_options()<CR>",
desc = "show options",
},
["run_current_replace"] = {
map = "<leader>rc",
cmd = "<cmd>lua require('spectre.actions').run_current_replace()<CR>",
desc = "replace current line",
},
["run_replace"] = {
map = "<leader>R",
cmd = "<cmd>lua require('spectre.actions').run_replace()<CR>",
desc = "replace all",
},
["change_view_mode"] = {
map = "<leader>v",
cmd = "<cmd>lua require('spectre').change_view()<CR>",
desc = "change result view mode",
},
["change_replace_sed"] = {
map = "trs",
cmd = "<cmd>lua require('spectre').change_engine_replace('sed')<CR>",
desc = "use sed to replace",
},
["change_replace_oxi"] = {
map = "tro",
cmd = "<cmd>lua require('spectre').change_engine_replace('oxi')<CR>",
desc = "use oxi to replace",
},
["toggle_live_update"] = {
map = "tu",
cmd = "<cmd>lua require('spectre').toggle_live_update()<CR>",
desc = "update when vim writes to file",
},
["toggle_ignore_case"] = {
map = "ti",
cmd = "<cmd>lua require('spectre').change_options('ignore-case')<CR>",
desc = "toggle ignore case",
},
["toggle_ignore_hidden"] = {
map = "th",
cmd = "<cmd>lua require('spectre').change_options('hidden')<CR>",
desc = "toggle search hidden",
},
["resume_last_search"] = {
map = "<leader>l",
cmd = "<cmd>lua require('spectre').resume_last_search()<CR>",
desc = "resume last search",
},
},
find_engine = {
["rg"] = {
cmd = "rg",
args = {
"--color=never",
"--no-heading",
"--with-filename",
"--line-number",
"--column",
},
options = {
["ignore-case"] = {
value = "--ignore-case",
icon = "[I]",
desc = "ignore case",
},
["hidden"] = {
value = "--hidden",
desc = "hidden file",
icon = "[H]",
},
},
},
},
replace_engine = {
["sed"] = {
cmd = "sed",
args = nil,
options = {
["ignore-case"] = {
value = "--ignore-case",
icon = "[I]",
desc = "ignore case",
},
},
},
},
default = {
find = {
cmd = "rg",
options = { "ignore-case" },
},
replace = {
cmd = "sed",
},
},
})
-- Global keymaps
vim.keymap.set("n", "<leader>S", '<cmd>lua require("spectre").toggle()<CR>', {
desc = "Toggle Spectre",
})
vim.keymap.set("n", "<leader>sw", '<cmd>lua require("spectre").open_visual({select_word=true})<CR>', {
desc = "Search current word",
})
vim.keymap.set("v", "<leader>sw", '<esc><cmd>lua require("spectre").open_visual()<CR>', {
desc = "Search current word",
})
vim.keymap.set("n", "<leader>sp", '<cmd>lua require("spectre").open_file_search({select_word=true})<CR>', {
desc = "Search in current file",
})
end,
},
}

View File

@@ -0,0 +1,10 @@
return {
"alexghergh/nvim-tmux-navigation",
config = function()
require('nvim-tmux-navigation').setup({})
vim.keymap.set("n", "<C-h>", "<Cmd>NvimTmuxNavigateLeft<CR>", {})
vim.keymap.set("n", "<C-j>", "<Cmd>NvimTmuxNavigateDown<CR>", {})
vim.keymap.set("n", "<C-k>", "<Cmd>NvimTmuxNavigateUp<CR>", {})
vim.keymap.set("n", "<C-l>", "<Cmd>NvimTmuxNavigateRight<CR>", {})
end,
}

View File

@@ -0,0 +1,88 @@
return {
{
"nvim-tree/nvim-web-devicons",
lazy = true,
config = function()
require("nvim-web-devicons").setup({
-- Globally enable/disable all icons
override = {
-- Override specific file type icons
zsh = {
icon = "",
color = "#428850",
cterm_color = "65",
name = "Zsh"
},
-- Add custom icons
["Dockerfile"] = {
icon = "",
color = "#384d54",
name = "Dockerfile"
},
[".env"] = {
icon = "",
color = "#faf743",
name = "Env"
},
[".gitignore"] = {
icon = "",
color = "#f1502f",
name = "GitIgnore"
},
},
-- Override by file extension
override_by_extension = {
["log"] = {
icon = "",
color = "#81e043",
name = "Log"
},
["rs"] = {
icon = "",
color = "#dea584",
name = "Rust"
},
["md"] = {
icon = "",
color = "#519aba",
name = "Markdown"
},
},
-- Override by filename
override_by_filename = {
["makefile"] = {
icon = "",
color = "#6d8086",
name = "Makefile"
},
["dockerfile"] = {
icon = "",
color = "#384d54",
name = "Dockerfile"
},
[".dockerignore"] = {
icon = "",
color = "#384d54",
name = "DockerIgnore"
},
["package.json"] = {
icon = "",
color = "#e8274b",
name = "PackageJson"
},
["package-lock.json"] = {
icon = "",
color = "#7a0d21",
name = "PackageLockJson"
},
},
-- Use colors by default
color_icons = true,
-- Globally enable default icons (if icon not found)
default = true,
-- Use strict mode (throw error if icon not found)
strict = false,
})
end,
},
}

View File

@@ -0,0 +1,110 @@
return {
{
"epwalsh/obsidian.nvim",
version = "*",
lazy = true,
ft = "markdown",
dependencies = {
"nvim-lua/plenary.nvim",
},
opts = {
workspaces = {
{
name = "nvim",
path = "~/Documents/obsidian/vault", -- Change to your vault path
},
-- {
-- name = "work",
-- path = "~/obsidian/work", -- Optional: add more vaults
-- },
},
-- Daily notes
daily_notes = {
folder = "daily",
date_format = "%Y-%m-%d",
template = nil,
},
-- Templates
templates = {
folder = "templates",
date_format = "%Y-%m-%d",
time_format = "%H:%M",
},
-- Completion
completion = {
nvim_cmp = true,
min_chars = 2,
},
-- Use note title as filename
note_id_func = function(title)
if title ~= nil then
return title
else
return tostring(os.time())
end
end,
-- Disable UI features if you don't want them
ui = {
enable = true, -- Set to false to disable and suppress warning
},
-- Mappings (only active in markdown files)
mappings = {
-- Follow link under cursor
["gf"] = {
action = function()
return require("obsidian").util.gf_passthrough()
end,
opts = { noremap = false, expr = true, buffer = true },
},
-- Toggle checkbox
["<leader>ch"] = {
action = function()
return require("obsidian").util.toggle_checkbox()
end,
opts = { buffer = true },
},
-- Smart action (follow link or toggle checkbox)
["<cr>"] = {
action = function()
return require("obsidian").util.smart_action()
end,
opts = { buffer = true, expr = true },
},
},
},
config = function(_, opts)
require("obsidian").setup(opts)
-- Set conceallevel for markdown files (for UI features)
vim.api.nvim_create_autocmd("FileType", {
pattern = "markdown",
callback = function()
vim.opt_local.conceallevel = 2
end,
})
end,
-- Global keymaps
keys = {
{ "<leader>on", "<cmd>ObsidianNew<cr>", desc = "New Obsidian note" },
{ "<leader>oo", "<cmd>ObsidianQuickSwitch<cr>", desc = "Quick switch notes" },
{ "<leader>os", "<cmd>ObsidianSearch<cr>", desc = "Search notes" },
{ "<leader>ot", "<cmd>ObsidianToday<cr>", desc = "Today's note" },
{ "<leader>oy", "<cmd>ObsidianYesterday<cr>", desc = "Yesterday's note" },
{ "<leader>ob", "<cmd>ObsidianBacklinks<cr>", desc = "Show backlinks" },
{ "<leader>og", "<cmd>ObsidianTags<cr>", desc = "Search tags" },
{ "<leader>ol", "<cmd>ObsidianLink<cr>", mode = "v", desc = "Link selection" },
{ "<leader>oL", "<cmd>ObsidianLinkNew<cr>", mode = "v", desc = "Link to new note" },
{ "<leader>of", "<cmd>ObsidianFollowLink<cr>", desc = "Follow link" },
{ "<leader>oT", "<cmd>ObsidianTemplate<cr>", desc = "Insert template" },
{ "<leader>op", "<cmd>ObsidianOpen<cr>", desc = "Open in Obsidian app" },
},
},
}

View File

@@ -0,0 +1,72 @@
return {
{
"cbochs/portal.nvim",
dependencies = {
"cbochs/grapple.nvim", -- Optional: for grapple integration
"ThePrimeagen/harpoon", -- Optional: for harpoon integration
},
config = function()
-- Setup portal
require("portal").setup({
labels = { "j", "k", "h", "l" },
escape = {
["<esc>"] = true,
},
})
-- Basic navigation keymaps
vim.keymap.set("n", "<leader>u", "<cmd>Portal jumplist backward<cr>", { desc = "Portal: Jump backward" })
vim.keymap.set("n", "<leader>i", "<cmd>Portal jumplist forward<cr>", { desc = "Portal: Jump forward" })
-- Changelist navigation
vim.keymap.set(
"n",
"<leader>po",
"<cmd>Portal changelist backward<cr>",
{ desc = "Portal: Jump backward (changelist)" }
)
vim.keymap.set(
"n",
"<leader>pi",
"<cmd>Portal changelist forward<cr>",
{ desc = "Portal: Jump forward (changelist)" }
)
-- Quickfix navigation
vim.keymap.set(
"n",
"<leader>qo",
"<cmd>Portal quickfix backward<cr>",
{ desc = "Portal: Jump backward (quickfix)" }
)
vim.keymap.set(
"n",
"<leader>qi",
"<cmd>Portal quickfix forward<cr>",
{ desc = "Portal: Jump forward (quickfix)" }
)
-- Optional: Harpoon integration
vim.keymap.set(
"n",
"<leader>ho",
"<cmd>Portal harpoon backward<cr>",
{ desc = "Portal: Jump backward (harpoon)" }
)
vim.keymap.set(
"n",
"<leader>hi",
"<cmd>Portal harpoon forward<cr>",
{ desc = "Portal: Jump forward (harpoon)" }
)
end,
keys = {
{ "<leader>u", desc = "Portal: Jump backward" },
{ "<leader>i", desc = "Portal: Jump forward" },
},
},
}

View File

@@ -0,0 +1,38 @@
return {
{
"gnikdroy/projections.nvim",
dependencies = {
"nvim-telescope/telescope.nvim",
},
config = function()
require("projections").setup({
workspaces = {
"~/projects",
"~/obsidian",
"~/.config",
},
patterns = { ".git", "package.json", "Cargo.toml", "go.mod" },
})
require("telescope").load_extension("projections")
-- Auto-store session on VimExit
local Session = require("projections.session")
vim.api.nvim_create_autocmd({ "VimLeavePre" }, {
callback = function() Session.store(vim.loop.cwd()) end,
})
-- Auto-restore session
vim.api.nvim_create_autocmd({ "VimEnter" }, {
callback = function()
if vim.fn.argc() == 0 then
Session.restore(vim.loop.cwd())
end
end,
})
end,
keys = {
{ "<leader>fp", "<cmd>Telescope projections<cr>", desc = "Find Projects" },
},
},
}

View File

@@ -0,0 +1,28 @@
return {
{
"nvim-telescope/telescope-ui-select.nvim",
},
{
"nvim-telescope/telescope.nvim",
-- tag = "0.1.5",
dependencies = { "nvim-lua/plenary.nvim" },
config = function()
require("telescope").setup({
extensions = {
["ui-select"] = {
require("telescope.themes").get_dropdown({}),
},
},
})
local builtin = require("telescope.builtin")
vim.keymap.set("n", "<C-p>", builtin.find_files, {})
vim.keymap.set("n", "<leader>fg", builtin.live_grep, {})
vim.keymap.set("n", "<leader><leader>", builtin.oldfiles, {})
vim.keymap.set("n", "z=", function()
builtin.spell_suggest(require("telescope.themes").get_cursor({}))
end, {})
require("telescope").load_extension("ui-select")
require("telescope").load_extension("noice")
end,
},
}

View File

@@ -0,0 +1,14 @@
return {
{
"nvim-treesitter/nvim-treesitter",
build = ":TSUpdate",
config = function()
local config = require("nvim-treesitter.configs")
config.setup({
auto_install = true,
highlight = { enable = true },
indent = { enable = true },
})
end,
},
}

View File

@@ -0,0 +1,39 @@
return {
{
"folke/trouble.nvim",
opts = {}, -- for default options, refer to the configuration section for custom setup.
cmd = "Trouble",
keys = {
{
"<leader>xx",
"<cmd>Trouble diagnostics toggle<cr>",
desc = "Diagnostics (Trouble)",
},
{
"<leader>xX",
"<cmd>Trouble diagnostics toggle filter.buf=0<cr>",
desc = "Buffer Diagnostics (Trouble)",
},
{
"<leader>cs",
"<cmd>Trouble symbols toggle focus=false<cr>",
desc = "Symbols (Trouble)",
},
{
"<leader>cl",
"<cmd>Trouble lsp toggle focus=false win.position=right<cr>",
desc = "LSP Definitions / references / ... (Trouble)",
},
{
"<leader>xL",
"<cmd>Trouble loclist toggle<cr>",
desc = "Location List (Trouble)",
},
{
"<leader>xQ",
"<cmd>Trouble qflist toggle<cr>",
desc = "Quickfix List (Trouble)",
},
},
}
}

View File

@@ -0,0 +1,14 @@
return {
"vim-test/vim-test",
dependencies = {
"preservim/vimux"
},
config = function()
vim.keymap.set("n", "<leader>t", ":TestNearest<CR>", {})
vim.keymap.set("n", "<leader>T", ":TestFile<CR>", {})
vim.keymap.set("n", "<leader>a", ":TestSuite<CR>", {})
vim.keymap.set("n", "<leader>l", ":TestLast<CR>", {})
vim.keymap.set("n", "<leader>g", ":TestVisit<CR>", {})
vim.cmd("let test#strategy = 'vimux'")
end,
}

View File

@@ -0,0 +1,20 @@
return {
{
"folke/which-key.nvim",
event = "VeryLazy",
opts = {
-- your configuration comes here
-- or leave it empty to use the default settings
-- refer to the configuration section below
},
keys = {
{
"<leader>?",
function()
require("which-key").show({ global = false })
end,
desc = "Buffer Local Keymaps (which-key)",
},
},
},
}

View File

@@ -0,0 +1,35 @@
return {
{
"mikavilpas/yazi.nvim",
event = "VeryLazy",
keys = {
-- 👇 in this section, choose your own keymappings!
{
"<leader>-",
"<cmd>Yazi<cr>",
desc = "Open yazi at the current file",
},
{
-- Open in the current working directory
"<leader>cw",
"<cmd>Yazi cwd<cr>",
desc = "Open the file manager in nvim's working directory",
},
{
-- NOTE: this requires a version of yazi that includes
-- https://github.com/sxyazi/yazi/pull/1305 from 2024-07-18
"<c-up>",
"<cmd>Yazi toggle<cr>",
desc = "Resume the last yazi session",
},
},
---@type YaziConfig
opts = {
-- if you want to open yazi instead of netrw, see below for more info
open_for_directories = false,
keymaps = {
show_help = "<f1>",
},
},
},
}

View File

@@ -0,0 +1,18 @@
vim.cmd("set expandtab")
vim.cmd("set tabstop=2")
vim.cmd("set softtabstop=2")
vim.cmd("set shiftwidth=2")
vim.g.mapleader = " "
vim.g.background = "light"
vim.opt.swapfile = false
-- Navigate vim panes better
vim.keymap.set('n', '<c-k>', ':wincmd k<CR>')
vim.keymap.set('n', '<c-j>', ':wincmd j<CR>')
vim.keymap.set('n', '<c-h>', ':wincmd h<CR>')
vim.keymap.set('n', '<c-l>', ':wincmd l<CR>')
vim.keymap.set('n', '<leader>h', ':nohlsearch<CR>')
vim.wo.number = true

View File

@@ -0,0 +1,80 @@
console_title_template = '{{ .Shell }} in {{ .Folder }}'
version = 3
final_space = true
[secondary_prompt]
template = ' '
foreground = 'magenta'
background = 'transparent'
[transient_prompt]
template = ' '
background = 'transparent'
foreground_templates = ['{{if gt .Code 0}}red{{end}}', '{{if eq .Code 0}}magenta{{end}}']
[[blocks]]
type = 'prompt'
alignment = 'left'
newline = true
[[blocks.segments]]
template = '{{ .Path }}'
foreground = 'blue'
background = 'transparent'
type = 'path'
style = 'plain'
[blocks.segments.properties]
cache_duration = 'none'
style = 'full'
[[blocks.segments]]
template = ' {{ .HEAD }}{{ if or (.Working.Changed) (.Staging.Changed) }}*{{ end }} <cyan>{{ if gt .Behind 0 }}⇣{{ end }}{{ if gt .Ahead 0 }}⇡{{ end }}</>'
foreground = 'yellow'
background = 'transparent'
type = 'git'
style = 'plain'
[blocks.segments.properties]
branch_icon = ''
cache_duration = 'none'
commit_icon = '@'
fetch_status = true
[[blocks]]
type = 'rprompt'
overflow = 'hidden'
[[blocks.segments]]
template = '{{ .FormattedMs }}'
foreground = 'yellow'
background = 'transparent'
type = 'executiontime'
style = 'plain'
[blocks.segments.properties]
cache_duration = 'none'
threshold = 5000
[[blocks.segments]]
type = "python"
style = "powerline"
powerline_symbol = ""
foreground = "cyan"
background = "transparent"
template = "  {{ .Full }} "
[[blocks]]
type = 'prompt'
alignment = 'left'
newline = true
[[blocks.segments]]
template = ''
background = 'transparent'
type = 'text'
style = 'plain'
foreground_templates = ['{{if gt .Code 0}}red{{end}}', '{{if eq .Code 0}}magenta{{end}}']
[blocks.segments.properties]
cache_duration = 'none'

87
scripts/scripts/bluelight.sh Executable file
View File

@@ -0,0 +1,87 @@
#!/bin/bash
SHADER_DIR="$HOME/.config/hypr/shaders"
SHADER_FILE="$SHADER_DIR/brightness.frag"
# Ensure shader directory exists
mkdir -p "$SHADER_DIR"
# Get screen brightness level
echo "Enter screen brightness level (0-10, where 10 = 100%):"
read -r LEVEL
# Validate input
if ! [[ "$LEVEL" =~ ^[0-9]+$ ]] || [ "$LEVEL" -lt 0 ] || [ "$LEVEL" -gt 10 ]; then
echo "Invalid input. Please enter a number between 0 and 10."
exit 1
fi
# Convert to decimal (0-10 -> 0.0-1.0)
BRIGHTNESS=$(echo "scale=2; $LEVEL / 10" | bc)
# Ask about keyboard backlight
echo "Adjust keyboard backlight? (y/n):"
read -r KBD_ADJUST
if [[ "$KBD_ADJUST" == "y" || "$KBD_ADJUST" == "Y" ]]; then
echo "Enter keyboard backlight level (0-10, where 10 = 100%):"
read -r KBD_LEVEL
# Validate keyboard input
if ! [[ "$KBD_LEVEL" =~ ^[0-9]+$ ]] || [ "$KBD_LEVEL" -lt 0 ] || [ "$KBD_LEVEL" -gt 10 ]; then
echo "Invalid input. Please enter a number between 0 and 10."
exit 1
fi
# Convert to percentage (0-10 -> 0-100)
KBD_PERCENT=$((KBD_LEVEL * 10))
# Set keyboard backlight
kbdlight set $KBD_PERCENT
echo "Keyboard backlight set to ${KBD_PERCENT}%"
fi
# Ask about blue light filter
echo "Apply blue light filter? (y/n):"
read -r BLUELIGHT
# Create shader based on choice
cat > "$SHADER_FILE" << EOF
#version 300 es
precision mediump float;
in vec2 v_texcoord;
out vec4 fragColor;
uniform sampler2D tex;
void main() {
vec4 pixColor = texture(tex, v_texcoord);
EOF
if [[ "$BLUELIGHT" == "y" || "$BLUELIGHT" == "Y" ]]; then
cat >> "$SHADER_FILE" << EOF
// Reduce blue light
pixColor.r *= 1.0;
pixColor.g *= 0.85;
pixColor.b *= 0.65;
EOF
fi
cat >> "$SHADER_FILE" << EOF
// Adjust brightness
pixColor.rgb *= $BRIGHTNESS;
fragColor = pixColor;
}
EOF
# Apply shader
if [ -z "$HYPRLAND_INSTANCE_SIGNATURE" ]; then
export HYPRLAND_INSTANCE_SIGNATURE=$(ls -t /tmp/hypr/ 2>/dev/null | head -n1)
fi
/usr/bin/hyprctl keyword decoration:screen_shader "$SHADER_FILE"
echo "Screen brightness set to ${LEVEL}0% $([ "$BLUELIGHT" == "y" ] || [ "$BLUELIGHT" == "Y" ] && echo "with blue light filter")"

32
scripts/scripts/borg-backup.sh Executable file
View File

@@ -0,0 +1,32 @@
#!/bin/bash
SOURCE_DIRS=("/home/liph/Documents" "/home/liph/Pictures" "/home/liph/Downloads")
REPO_DIR="/home/liph/borg-repo"
BORG_PASSPHRASE="1ChagearC"
export BORG_PASSPHRASE
for SOURCE_DIR in "${SOURCE_DIRS[@]}"; do
ARCHIVE_NAME="{hostname}-{user}-{now}"
echo "Starting backup of ${SOURCE_DIR}..."
borg create --stats --progress \
"${REPO_DIR}::${ARCHIVE_NAME}" \
"${SOURCE_DIR}"
if [ $? -eq 0 ]; then
echo "Backup of ${SOURCE_DIR} completed successfully!"
else
echo "Backup of ${SOURCE_DIR} failed!"
fi
done
echo "Pruning old backups..."
borg prune --stats --progress \
--keep-daily=7 \
--keep-weekly=4 \
--keep-monthly=6 \
"${REPO_DIR}"
echo "Backup and pruning completed!"

95
scripts/scripts/borg-mac.sh Executable file
View File

@@ -0,0 +1,95 @@
#!/bin/sh
# Setting this, so the repo does not need to be given on the commandline:
# export BORG_REPO=ssh://username@example.com:2022/~/backup/main
#export BORG_REPO=~/backup/
# See the section "Passphrase notes" for more infos.
#export BORG_PASSPHRASE='1ChagearC'
export BORG_REPO="ssh://100.121.203.110:2222/./repo/borg-repo"
export BORG_PASSPHRASE="1ChagearC" # Encryption key
BACKUP_SOURCES=(
"/home/liph/Downloads/"
"/home/liph/dotfiles/"
"/home/liph/scripts"
) # What to back up
BACKUP_NAME="laptop-$(date +%Y-%m-%d)" # Dynamic backup name
# some helpers and error handling:
info() { printf "\n%s %s\n\n" "$( date )" "$*" >&2; }
trap 'echo $( date ) Backup interrupted >&2; exit 2' INT TERM
info "Starting backup"
# Initialize Borg repo (if not exists)
borg init --encryption=repokey "$BORG_REPO" 2>/dev/null || true
# Backup the most important directories into an archive named after
# the machine this script is currently running on:
borg create \
--verbose \
--filter AME \
--list \
--stats \
--show-rc \
--progress \
--compression lz4 \
--exclude-caches \
--exclude 'home/*/.cache/*' \
--exclude 'var/tmp/*' \
"$BORG_REPO::$BACKUP_NAME" \
"${BACKUP_SOURCES[@]}" \
# ::'{hostname}-{user}-{now}' \
# /home/liph/Documents/ \
# /home/liph/Pictures/ \
# /home/liph/Downloads/
# /etc \
# /home \
# /root \
# /var
backup_exit=$?
info "Pruning repository"
# Use the `prune` subcommand to maintain 7 daily, 4 weekly and 6 monthly
# archives of THIS machine. The '{hostname}-*' matching is very important to
# limit prune's operation to this machine's archives and not apply to
# other machines' archives also:
borg prune \
--list \
--glob-archives '{hostname}-*' \
--show-rc \
--keep-daily 7 \
--keep-weekly 4 \
--keep-monthly 6
"$BORG_REPO"
prune_exit=$?
# actually free repo disk space by compacting segments
info "Compacting repository"
borg compact
compact_exit=$?
# use highest exit code as global exit code
global_exit=$(( backup_exit > prune_exit ? backup_exit : prune_exit ))
global_exit=$(( compact_exit > global_exit ? compact_exit : global_exit ))
if [ ${global_exit} -eq 0 ]; then
info "Backup, Prune, and Compact finished successfully"
elif [ ${global_exit} -eq 1 ]; then
info "Backup, Prune, and/or Compact finished with warnings"
else
info "Backup, Prune, and/or Compact finished with errors"
fi
exit ${global_exit}
# Check backup integrity
borg check "$BORG_REPO"

View File

@@ -0,0 +1,95 @@
#!/bin/sh
# Setting this, so the repo does not need to be given on the commandline:
# export BORG_REPO=ssh://username@example.com:2022/~/backup/main
#export BORG_REPO=~/backup/
# See the section "Passphrase notes" for more infos.
#export BORG_PASSPHRASE='1ChagearC'
export BORG_REPO="ssh://100.121.203.110:2222/./repo/borg-repo"
export BORG_PASSPHRASE="1ChagearC" # Encryption key
BACKUP_SOURCES=(
"/home/liph/Documents"
"/home/liph/Pictures"
"/home/liph/scripts"
) # What to back up
BACKUP_NAME="server-$(date +%Y-%m-%d)" # Dynamic backup name
# some helpers and error handling:
info() { printf "\n%s %s\n\n" "$( date )" "$*" >&2; }
trap 'echo $( date ) Backup interrupted >&2; exit 2' INT TERM
info "Starting backup"
# Initialize Borg repo (if not exists)
borg init --encryption=repokey "$BORG_REPO" 2>/dev/null || true
# Backup the most important directories into an archive named after
# the machine this script is currently running on:
borg create \
--verbose \
--filter AME \
--list \
--stats \
--show-rc \
--progress \
--compression lz4 \
--exclude-caches \
--exclude 'home/*/.cache/*' \
--exclude 'var/tmp/*' \
"$BORG_REPO::$BACKUP_NAME" \
"${BACKUP_SOURCES[@]}" \
# ::'{hostname}-{user}-{now}' \
# /home/liph/Documents/ \
# /home/liph/Pictures/ \
# /home/liph/Downloads/
# /etc \
# /home \
# /root \
# /var
backup_exit=$?
info "Pruning repository"
# Use the `prune` subcommand to maintain 7 daily, 4 weekly and 6 monthly
# archives of THIS machine. The '{hostname}-*' matching is very important to
# limit prune's operation to this machine's archives and not apply to
# other machines' archives also:
borg prune \
--list \
--glob-archives '{hostname}-*' \
--show-rc \
--keep-daily 7 \
--keep-weekly 4 \
--keep-monthly 6
"$BORG_REPO"
prune_exit=$?
# actually free repo disk space by compacting segments
info "Compacting repository"
borg compact
compact_exit=$?
# use highest exit code as global exit code
global_exit=$(( backup_exit > prune_exit ? backup_exit : prune_exit ))
global_exit=$(( compact_exit > global_exit ? compact_exit : global_exit ))
if [ ${global_exit} -eq 0 ]; then
info "Backup, Prune, and Compact finished successfully"
elif [ ${global_exit} -eq 1 ]; then
info "Backup, Prune, and/or Compact finished with warnings"
else
info "Backup, Prune, and/or Compact finished with errors"
fi
exit ${global_exit}
# Check backup integrity
borg check "$BORG_REPO"

95
scripts/scripts/borg.sh Executable file
View File

@@ -0,0 +1,95 @@
#!/bin/sh
# Setting this, so the repo does not need to be given on the commandline:
# export BORG_REPO=ssh://username@example.com:2022/~/backup/main
#export BORG_REPO=~/backup/
# See the section "Passphrase notes" for more infos.
#export BORG_PASSPHRASE='1ChagearC'
export BORG_REPO="ssh://100.121.203.110:2222/./repo/borg-repo"
export BORG_PASSPHRASE="1ChagearC" # Encryption key
BACKUP_SOURCES=(
"/home/liph/Documents"
"/home/liph/Pictures"
"/home/liph/scripts"
) # What to back up
BACKUP_NAME="laptop-$(date +%Y-%m-%d)" # Dynamic backup name
# some helpers and error handling:
info() { printf "\n%s %s\n\n" "$( date )" "$*" >&2; }
trap 'echo $( date ) Backup interrupted >&2; exit 2' INT TERM
info "Starting backup"
# Initialize Borg repo (if not exists)
borg init --encryption=repokey "$BORG_REPO" 2>/dev/null || true
# Backup the most important directories into an archive named after
# the machine this script is currently running on:
borg create \
--verbose \
--filter AME \
--list \
--stats \
--show-rc \
--progress \
--compression lz4 \
--exclude-caches \
--exclude 'home/*/.cache/*' \
--exclude 'var/tmp/*' \
"$BORG_REPO::$BACKUP_NAME" \
"${BACKUP_SOURCES[@]}" \
# ::'{hostname}-{user}-{now}' \
# /home/liph/Documents/ \
# /home/liph/Pictures/ \
# /home/liph/Downloads/
# /etc \
# /home \
# /root \
# /var
backup_exit=$?
info "Pruning repository"
# Use the `prune` subcommand to maintain 7 daily, 4 weekly and 6 monthly
# archives of THIS machine. The '{hostname}-*' matching is very important to
# limit prune's operation to this machine's archives and not apply to
# other machines' archives also:
borg prune \
--list \
--glob-archives '{hostname}-*' \
--show-rc \
--keep-daily 7 \
--keep-weekly 4 \
--keep-monthly 6
"$BORG_REPO"
prune_exit=$?
# actually free repo disk space by compacting segments
info "Compacting repository"
borg compact
compact_exit=$?
# use highest exit code as global exit code
global_exit=$(( backup_exit > prune_exit ? backup_exit : prune_exit ))
global_exit=$(( compact_exit > global_exit ? compact_exit : global_exit ))
if [ ${global_exit} -eq 0 ]; then
info "Backup, Prune, and Compact finished successfully"
elif [ ${global_exit} -eq 1 ]; then
info "Backup, Prune, and/or Compact finished with warnings"
else
info "Backup, Prune, and/or Compact finished with errors"
fi
exit ${global_exit}
# Check backup integrity
borg check "$BORG_REPO"

74
scripts/scripts/br_blue.sh Executable file
View File

@@ -0,0 +1,74 @@
#!/bin/bash
# Path to the brightness shader file
SHADER_DIR="$HOME/.config/hypr/shaders"
SHADER_FILE="$SHADER_DIR/brightness.frag"
# Ensure shader directory exists
mkdir -p "$SHADER_DIR"
# Check if shader file exists, if not create with default values
if [ ! -f "$SHADER_FILE" ]; then
CURRENT_BRIGHTNESS=1.0
BLUELIGHT_ENABLED=false
else
# Get current brightness multiplier
CURRENT_BRIGHTNESS=$(grep -oP 'pixColor.rgb \*= \K[0-9.]+' "$SHADER_FILE" | tail -1)
# Check current state by looking at the blue channel multiplier
if grep -q "pixColor.b \*= 0.6" "$SHADER_FILE"; then
BLUELIGHT_ENABLED=true
else
BLUELIGHT_ENABLED=false
fi
fi
# Toggle the blue light filter state
if [ "$BLUELIGHT_ENABLED" = true ]; then
# Filter is ON, turn it OFF
NEW_STATE=false
echo "Blue light filter: OFF"
else
# Filter is OFF, turn it ON
NEW_STATE=true
echo "Blue light filter: ON"
fi
# Recreate the shader file
cat > "$SHADER_FILE" << EOF
#version 300 es
precision mediump float;
in vec2 v_texcoord;
out vec4 fragColor;
uniform sampler2D tex;
void main() {
vec4 pixColor = texture(tex, v_texcoord);
EOF
if [ "$NEW_STATE" = true ]; then
cat >> "$SHADER_FILE" << EOF
// Reduce blue light
pixColor.r *= 1.0;
pixColor.g *= 0.85;
pixColor.b *= 0.6;
EOF
fi
cat >> "$SHADER_FILE" << EOF
// Adjust brightness
pixColor.rgb *= $CURRENT_BRIGHTNESS;
fragColor = pixColor;
}
EOF
# Apply shader
if [ -z "$HYPRLAND_INSTANCE_SIGNATURE" ]; then
export HYPRLAND_INSTANCE_SIGNATURE=$(ls -t /tmp/hypr/ 2>/dev/null | head -n1)
fi
/usr/bin/hyprctl keyword decoration:screen_shader "$SHADER_FILE"

74
scripts/scripts/br_down.sh Executable file
View File

@@ -0,0 +1,74 @@
#!/bin/bash
# Path to the brightness shader file
SHADER_DIR="$HOME/.config/hypr/shaders"
SHADER_FILE="$SHADER_DIR/brightness.frag"
# Ensure shader directory exists
mkdir -p "$SHADER_DIR"
# Check if shader file exists, if not create with default brightness
if [ ! -f "$SHADER_FILE" ]; then
CURRENT=1.0
else
# Get current brightness multiplier
CURRENT=$(grep -oP 'pixColor.rgb \*= \K[0-9.]+' "$SHADER_FILE" | tail -1)
fi
# Calculate new brightness (decrease by 10%)
NEW=$(echo "$CURRENT * 0.90" | bc -l)
# Cap at 0.1 to prevent complete darkness
if (( $(echo "$NEW < 0.1" | bc -l) )); then
NEW=0.1
fi
# Format to 2 decimal places
NEW=$(printf "%.2f" "$NEW")
# Check if blue light filter is currently enabled
BLUELIGHT_ENABLED=false
if [ -f "$SHADER_FILE" ] && grep -q "pixColor.b \*= 0.6" "$SHADER_FILE"; then
BLUELIGHT_ENABLED=true
fi
# Recreate the shader file
cat > "$SHADER_FILE" << EOF
#version 300 es
precision mediump float;
in vec2 v_texcoord;
out vec4 fragColor;
uniform sampler2D tex;
void main() {
vec4 pixColor = texture(tex, v_texcoord);
EOF
if [ "$BLUELIGHT_ENABLED" = true ]; then
cat >> "$SHADER_FILE" << EOF
// Reduce blue light
pixColor.r *= 1.0;
pixColor.g *= 0.85;
pixColor.b *= 0.6;
EOF
fi
cat >> "$SHADER_FILE" << EOF
// Adjust brightness
pixColor.rgb *= $NEW;
fragColor = pixColor;
}
EOF
# Apply shader
if [ -z "$HYPRLAND_INSTANCE_SIGNATURE" ]; then
export HYPRLAND_INSTANCE_SIGNATURE=$(ls -t /tmp/hypr/ 2>/dev/null | head -n1)
fi
/usr/bin/hyprctl keyword decoration:screen_shader "$SHADER_FILE"
echo "Brightness decreased from $CURRENT to $NEW"

36
scripts/scripts/br_reset.sh Executable file
View File

@@ -0,0 +1,36 @@
#!/bin/bash
# Path to the brightness shader file
SHADER_DIR="$HOME/.config/hypr/shaders"
SHADER_FILE="$SHADER_DIR/brightness.frag"
# Ensure shader directory exists
mkdir -p "$SHADER_DIR"
# Create shader file with 100% brightness and no blue light filter
cat > "$SHADER_FILE" << EOF
#version 300 es
precision mediump float;
in vec2 v_texcoord;
out vec4 fragColor;
uniform sampler2D tex;
void main() {
vec4 pixColor = texture(tex, v_texcoord);
// Adjust brightness
pixColor.rgb *= 1.00;
fragColor = pixColor;
}
EOF
# Apply shader
if [ -z "$HYPRLAND_INSTANCE_SIGNATURE" ]; then
export HYPRLAND_INSTANCE_SIGNATURE=$(ls -t /tmp/hypr/ 2>/dev/null | head -n1)
fi
/usr/bin/hyprctl keyword decoration:screen_shader "$SHADER_FILE"
echo "Screen reset: Brightness 100%, Blue light filter OFF"

74
scripts/scripts/br_up.sh Executable file
View File

@@ -0,0 +1,74 @@
#!/bin/bash
# Path to the brightness shader file
SHADER_DIR="$HOME/.config/hypr/shaders"
SHADER_FILE="$SHADER_DIR/brightness.frag"
# Ensure shader directory exists
mkdir -p "$SHADER_DIR"
# Check if shader file exists, if not create with default brightness
if [ ! -f "$SHADER_FILE" ]; then
CURRENT=1.0
else
# Get current brightness multiplier
CURRENT=$(grep -oP 'pixColor.rgb \*= \K[0-9.]+' "$SHADER_FILE" | tail -1)
fi
# Calculate new brightness (increase by 10%)
NEW=$(echo "$CURRENT * 1.10" | bc -l)
# Cap at 2.0 to prevent excessive brightness
if (( $(echo "$NEW > 2.0" | bc -l) )); then
NEW=2.0
fi
# Format to 2 decimal places
NEW=$(printf "%.2f" "$NEW")
# Check if blue light filter is currently enabled
BLUELIGHT_ENABLED=false
if [ -f "$SHADER_FILE" ] && grep -q "pixColor.b \*= 0.6" "$SHADER_FILE"; then
BLUELIGHT_ENABLED=true
fi
# Recreate the shader file
cat > "$SHADER_FILE" << EOF
#version 300 es
precision mediump float;
in vec2 v_texcoord;
out vec4 fragColor;
uniform sampler2D tex;
void main() {
vec4 pixColor = texture(tex, v_texcoord);
EOF
if [ "$BLUELIGHT_ENABLED" = true ]; then
cat >> "$SHADER_FILE" << EOF
// Reduce blue light
pixColor.r *= 1.0;
pixColor.g *= 0.85;
pixColor.b *= 0.6;
EOF
fi
cat >> "$SHADER_FILE" << EOF
// Adjust brightness
pixColor.rgb *= $NEW;
fragColor = pixColor;
}
EOF
# Apply shader
if [ -z "$HYPRLAND_INSTANCE_SIGNATURE" ]; then
export HYPRLAND_INSTANCE_SIGNATURE=$(ls -t /tmp/hypr/ 2>/dev/null | head -n1)
fi
/usr/bin/hyprctl keyword decoration:screen_shader "$SHADER_FILE"
echo "Brightness increased from $CURRENT to $NEW"

310
scripts/scripts/fzf-git.sh Executable file
View File

@@ -0,0 +1,310 @@
# Fzf with Git in the shell
# You can find this whole script from Junegunn Github repo below
# https://github.com/junegunn/fzf-git.sh
# Script is used in .zshrc
# shellcheck disable=SC2039
[[ $0 = - ]] && return
__fzf_git_color() {
if [[ -n $NO_COLOR ]]; then
echo never
elif [[ $# -gt 0 ]] && [[ -n $FZF_GIT_PREVIEW_COLOR ]]; then
echo "$FZF_GIT_PREVIEW_COLOR"
else
echo "${FZF_GIT_COLOR:-always}"
fi
}
__fzf_git_cat() {
if [[ -n $FZF_GIT_CAT ]]; then
echo "$FZF_GIT_CAT"
return
fi
# Sometimes bat is installed as batcat
_fzf_git_bat_options="--style='${BAT_STYLE:-full}' --color=$(__fzf_git_color .) --pager=never"
if command -v batcat > /dev/null; then
echo "batcat $_fzf_git_bat_options"
elif command -v bat > /dev/null; then
echo "bat $_fzf_git_bat_options"
else
echo cat
fi
}
if [[ $# -eq 1 ]]; then
branches() {
git branch "$@" --sort=-committerdate --sort=-HEAD --format=$'%(HEAD) %(color:yellow)%(refname:short) %(color:green)(%(committerdate:relative))\t%(color:blue)%(subject)%(color:reset)' --color=$(__fzf_git_color) | column -ts$'\t'
}
refs() {
git for-each-ref --sort=-creatordate --sort=-HEAD --color=$(__fzf_git_color) --format=$'%(refname) %(color:green)(%(creatordate:relative))\t%(color:blue)%(subject)%(color:reset)' |
eval "$1" |
sed 's#^refs/remotes/#\x1b[95mremote-branch\t\x1b[33m#; s#^refs/heads/#\x1b[92mbranch\t\x1b[33m#; s#^refs/tags/#\x1b[96mtag\t\x1b[33m#; s#refs/stash#\x1b[91mstash\t\x1b[33mrefs/stash#' |
column -ts$'\t'
}
hashes() {
git log --date=short --format="%C(green)%C(bold)%cd %C(auto)%h%d %s (%an)" --graph --color=$(__fzf_git_color) "$@"
}
case "$1" in
branches)
echo $'CTRL-O (open in browser) ALT-A (show all branches)\n'
branches
;;
all-branches)
echo $'CTRL-O (open in browser)\n'
branches -a
;;
hashes)
echo $'CTRL-O (open in browser) CTRL-D (diff)\nCTRL-S (toggle sort) ALT-A (show all hashes)\n'
hashes
;;
all-hashes)
echo $'CTRL-O (open in browser) CTRL-D (diff)\nCTRL-S (toggle sort)\n'
hashes --all
;;
refs)
echo $'CTRL-O (open in browser) ALT-E (examine in editor) ALT-A (show all refs)\n'
refs 'grep -v ^refs/remotes'
;;
all-refs)
echo $'CTRL-O (open in browser) ALT-E (examine in editor)\n'
refs 'cat'
;;
nobeep) ;;
*) exit 1 ;;
esac
elif [[ $# -gt 1 ]]; then
set -e
branch=$(git rev-parse --abbrev-ref HEAD 2> /dev/null)
if [[ $branch = HEAD ]]; then
branch=$(git describe --exact-match --tags 2> /dev/null || git rev-parse --short HEAD)
fi
# Only supports GitHub for now
case "$1" in
commit)
hash=$(grep -o "[a-f0-9]\{7,\}" <<< "$2")
path=/commit/$hash
;;
branch|remote-branch)
branch=$(sed 's/^[* ]*//' <<< "$2" | cut -d' ' -f1)
remote=$(git config branch."${branch}".remote || echo 'origin')
branch=${branch#$remote/}
path=/tree/$branch
;;
remote)
remote=$2
path=/tree/$branch
;;
file) path=/blob/$branch/$(git rev-parse --show-prefix)$2 ;;
tag) path=/releases/tag/$2 ;;
*) exit 1 ;;
esac
remote=${remote:-$(git config branch."${branch}".remote || echo 'origin')}
remote_url=$(git remote get-url "$remote" 2> /dev/null || echo "$remote")
if [[ $remote_url =~ ^git@ ]]; then
url=${remote_url%.git}
url=${url#git@}
url=https://${url/://}
elif [[ $remote_url =~ ^http ]]; then
url=${remote_url%.git}
fi
case "$(uname -s)" in
Darwin) open "$url$path" ;;
*) xdg-open "$url$path" ;;
esac
exit 0
fi
if [[ $- =~ i ]]; then
# -----------------------------------------------------------------------------
# Redefine this function to change the options
_fzf_git_fzf() {
fzf-tmux -p80%,60% -- \
--layout=reverse --multi --height=50% --min-height=20 --border \
--border-label-pos=2 \
--color='header:italic:underline,label:blue' \
--preview-window='right,50%,border-left' \
--bind='ctrl-/:change-preview-window(down,50%,border-top|hidden|)' "$@"
}
_fzf_git_check() {
git rev-parse HEAD > /dev/null 2>&1 && return
[[ -n $TMUX ]] && tmux display-message "Not in a git repository"
return 1
}
__fzf_git=${BASH_SOURCE[0]:-${(%):-%x}}
__fzf_git=$(readlink -f "$__fzf_git" 2> /dev/null || /usr/bin/ruby --disable-gems -e 'puts File.expand_path(ARGV.first)' "$__fzf_git" 2> /dev/null)
_fzf_git_files() {
_fzf_git_check || return
local root query
root=$(git rev-parse --show-toplevel)
[[ $root != "$PWD" ]] && query='!../ '
(git -c color.status=$(__fzf_git_color) status --short --no-branch
git ls-files "$root" | grep -vxFf <(git status -s | grep '^[^?]' | cut -c4-; echo :) | sed 's/^/ /') |
_fzf_git_fzf -m --ansi --nth 2..,.. \
--border-label '📁 Files' \
--header $'CTRL-O (open in browser) ALT-E (open in editor)\n\n' \
--bind "ctrl-o:execute-silent:bash $__fzf_git file {-1}" \
--bind "alt-e:execute:${EDITOR:-vim} {-1} > /dev/tty" \
--query "$query" \
--preview "git diff --no-ext-diff --color=$(__fzf_git_color .) -- {-1} | sed 1,4d; $(__fzf_git_cat) {-1}" "$@" |
cut -c4- | sed 's/.* -> //'
}
_fzf_git_branches() {
_fzf_git_check || return
bash "$__fzf_git" branches |
_fzf_git_fzf --ansi \
--border-label '🌲 Branches' \
--header-lines 2 \
--tiebreak begin \
--preview-window down,border-top,40% \
--color hl:underline,hl+:underline \
--no-hscroll \
--bind 'ctrl-/:change-preview-window(down,70%|hidden|)' \
--bind "ctrl-o:execute-silent:bash $__fzf_git branch {}" \
--bind "alt-a:change-border-label(🌳 All branches)+reload:bash \"$__fzf_git\" all-branches" \
--preview "git log --oneline --graph --date=short --color=$(__fzf_git_color .) --pretty='format:%C(auto)%cd %h%d %s' \$(sed s/^..// <<< {} | cut -d' ' -f1) --" "$@" |
sed 's/^..//' | cut -d' ' -f1
}
_fzf_git_tags() {
_fzf_git_check || return
git tag --sort -version:refname |
_fzf_git_fzf --preview-window right,70% \
--border-label '📛 Tags' \
--header $'CTRL-O (open in browser)\n\n' \
--bind "ctrl-o:execute-silent:bash $__fzf_git tag {}" \
--preview "git show --color=$(__fzf_git_color .) {}" "$@"
}
_fzf_git_hashes() {
_fzf_git_check || return
bash "$__fzf_git" hashes |
_fzf_git_fzf --ansi --no-sort --bind 'ctrl-s:toggle-sort' \
--border-label '🍡 Hashes' \
--header-lines 3 \
--bind "ctrl-o:execute-silent:bash $__fzf_git commit {}" \
--bind "ctrl-d:execute:grep -o '[a-f0-9]\{7,\}' <<< {} | head -n 1 | xargs git diff --color=$(__fzf_git_color) > /dev/tty" \
--bind "alt-a:change-border-label(🍇 All hashes)+reload:bash \"$__fzf_git\" all-hashes" \
--color hl:underline,hl+:underline \
--preview "grep -o '[a-f0-9]\{7,\}' <<< {} | head -n 1 | xargs git show --color=$(__fzf_git_color .)" "$@" |
awk 'match($0, /[a-f0-9][a-f0-9][a-f0-9][a-f0-9][a-f0-9][a-f0-9][a-f0-9][a-f0-9]*/) { print substr($0, RSTART, RLENGTH) }'
}
_fzf_git_remotes() {
_fzf_git_check || return
git remote -v | awk '{print $1 "\t" $2}' | uniq |
_fzf_git_fzf --tac \
--border-label '📡 Remotes' \
--header $'CTRL-O (open in browser)\n\n' \
--bind "ctrl-o:execute-silent:bash $__fzf_git remote {1}" \
--preview-window right,70% \
--preview "git log --oneline --graph --date=short --color=$(__fzf_git_color .) --pretty='format:%C(auto)%cd %h%d %s' '{1}/$(git rev-parse --abbrev-ref HEAD)' --" "$@" |
cut -d$'\t' -f1
}
_fzf_git_stashes() {
_fzf_git_check || return
git stash list | _fzf_git_fzf \
--border-label '🥡 Stashes' \
--header $'CTRL-X (drop stash)\n\n' \
--bind 'ctrl-x:reload(git stash drop -q {1}; git stash list)' \
-d: --preview "git show --color=$(__fzf_git_color .) {1}" "$@" |
cut -d: -f1
}
_fzf_git_lreflogs() {
_fzf_git_check || return
git reflog --color=$(__fzf_git_color) --format="%C(blue)%gD %C(yellow)%h%C(auto)%d %gs" | _fzf_git_fzf --ansi \
--border-label '📒 Reflogs' \
--preview "git show --color=$(__fzf_git_color .) {1}" "$@" |
awk '{print $1}'
}
_fzf_git_each_ref() {
_fzf_git_check || return
bash "$__fzf_git" refs | _fzf_git_fzf --ansi \
--nth 2,2.. \
--tiebreak begin \
--border-label '☘️ Each ref' \
--header-lines 2 \
--preview-window down,border-top,40% \
--color hl:underline,hl+:underline \
--no-hscroll \
--bind 'ctrl-/:change-preview-window(down,70%|hidden|)' \
--bind "ctrl-o:execute-silent:bash $__fzf_git {1} {2}" \
--bind "alt-e:execute:${EDITOR:-vim} <(git show {2}) > /dev/tty" \
--bind "alt-a:change-border-label(🍀 Every ref)+reload:bash \"$__fzf_git\" all-refs" \
--preview "git log --oneline --graph --date=short --color=$(__fzf_git_color .) --pretty='format:%C(auto)%cd %h%d %s' {2} --" "$@" |
awk '{print $2}'
}
_fzf_git_worktrees() {
_fzf_git_check || return
git worktree list | _fzf_git_fzf \
--border-label '🌴 Worktrees' \
--header $'CTRL-X (remove worktree)\n\n' \
--bind 'ctrl-x:reload(git worktree remove {1} > /dev/null; git worktree list)' \
--preview "
git -c color.status=$(__fzf_git_color .) -C {1} status --short --branch
echo
git log --oneline --graph --date=short --color=$(__fzf_git_color .) --pretty='format:%C(auto)%cd %h%d %s' {2} --
" "$@" |
awk '{print $1}'
}
if [[ -n "${BASH_VERSION:-}" ]]; then
__fzf_git_init() {
bind -m emacs-standard '"\er": redraw-current-line'
bind -m emacs-standard '"\C-z": vi-editing-mode'
bind -m vi-command '"\C-z": emacs-editing-mode'
bind -m vi-insert '"\C-z": emacs-editing-mode'
local o c
for o in "$@"; do
c=${o:0:1}
bind -m emacs-standard '"\C-g\C-'$c'": " \C-u \C-a\C-k`_fzf_git_'$o'`\e\C-e\C-y\C-a\C-y\ey\C-h\C-e\er \C-h"'
bind -m vi-command '"\C-g\C-'$c'": "\C-z\C-g\C-'$c'\C-z"'
bind -m vi-insert '"\C-g\C-'$c'": "\C-z\C-g\C-'$c'\C-z"'
bind -m emacs-standard '"\C-g'$c'": " \C-u \C-a\C-k`_fzf_git_'$o'`\e\C-e\C-y\C-a\C-y\ey\C-h\C-e\er \C-h"'
bind -m vi-command '"\C-g'$c'": "\C-z\C-g'$c'\C-z"'
bind -m vi-insert '"\C-g'$c'": "\C-z\C-g'$c'\C-z"'
done
}
elif [[ -n "${ZSH_VERSION:-}" ]]; then
__fzf_git_join() {
local item
while read item; do
echo -n "${(q)item} "
done
}
__fzf_git_init() {
local m o
for o in "$@"; do
eval "fzf-git-$o-widget() { local result=\$(_fzf_git_$o | __fzf_git_join); zle reset-prompt; LBUFFER+=\$result }"
eval "zle -N fzf-git-$o-widget"
for m in emacs vicmd viins; do
eval "bindkey -M $m '^g^${o[1]}' fzf-git-$o-widget"
eval "bindkey -M $m '^g${o[1]}' fzf-git-$o-widget"
done
done
}
fi
__fzf_git_init files branches tags remotes hashes stashes lreflogs each_ref worktrees
# -----------------------------------------------------------------------------
fi

View File

@@ -0,0 +1,29 @@
#!/bin/bash
# Script to list recent files and open nvim using fzf
# set to an alias nlof in .zshrc
list_oldfiles() {
# Get the oldfiles list from Neovim
local oldfiles=($(nvim -u NONE --headless +'lua io.write(table.concat(vim.v.oldfiles, "\n") .. "\n")' +qa))
# Filter invalid paths or files not found
local valid_files=()
for file in "${oldfiles[@]}"; do
if [[ -f "$file" ]]; then
valid_files+=("$file")
fi
done
# Use fzf to select from valid files
local files=($(printf "%s\n" "${valid_files[@]}" | \
grep -v '\[.*' | \
fzf --multi \
--preview 'bat -n --color=always --line-range=:500 {} 2>/dev/null || echo "Error previewing file"' \
--height=70% \
--layout=default))
# Open selected files in Neovim
[[ ${#files[@]} -gt 0 ]] && nvim "${files[@]}"
}
# Call the function
list_oldfiles "$@"

7
scripts/scripts/hydroxide.sh Executable file
View File

@@ -0,0 +1,7 @@
hydroxide serve &
kanata --cfg ~/.config/kanata/config.kbd &
sudo mount -a &
syncthing &

1
scripts/scripts/kanata.sh Executable file
View File

@@ -0,0 +1 @@
kanata --cfg ~/.config/kanata/config.kbd &

View File

@@ -0,0 +1,12 @@
#!/bin/bash
# ~/.config/hypr/scripts/keyboard-layer.sh
# This checks which modifiers are active as a proxy for layers
# Adjust based on your actual layer keys
while true; do
# You might need to adjust this based on your keyboard
# This is a simplified example
echo '{"text": "Layer ?", "class": "layer"}'
sleep 0.5
done

View File

@@ -0,0 +1,9 @@
#!/bin/bash
case $1 in
0) notify-send -t 1500 "Layer 0" "Base/QWERTY" ;;
1) notify-send -t 1500 "Layer 1" "Navigation/Numbers" ;;
2) notify-send -t 1500 "Layer 2" "Symbols" ;;
3) notify-send -t 1500 "Layer 3" "Function Keys" ;;
*) notify-send -t 1500 "Unknown Layer" ;;
esac

89
scripts/scripts/protonport.sh Executable file
View File

@@ -0,0 +1,89 @@
#!/bin/bash
# Configuration variables - change this for your setup
gluetun_container_name="gluetun"
qbittorrent_container_name="qbittorrent"
gluetun_origin="http://100.120.152.94:8888"
qb_origin="http://100.120.152.94:8099"
####################################################################
# Arrays for URLs
declare -A gluetun_urls=(
["pub_ip"]="$gluetun_origin/v1/publicip/ip"
["portforwarded"]="$gluetun_origin/v1/openvpn/portforwarded"
)
declare -A qbittorrent_urls=(
#used for getting and setting listen_port
["prefs"]="$qb_origin/api/v2/app/preferences"
["setPrefs"]="$qb_origin/api/v2/app/setPreferences"
)
# Function to check if a Docker container is running
is_container_running() {
local container_name="$1"
docker inspect -f '{{.State.Running}}' "$container_name" 2>/dev/null
# echo "Container $container_name status: $status"
}
get_vpn_external_ip() {
local url="$1"
curl -s "$url" | -r .'public_ip'
}
# Function to send a GET request and extract the port from the response
get_port_from_url() {
local url="$1"
local port_key
# Try 'port' key first
port_key=$(curl -s "$url" | jq -r '.port')
if [ "$port_key" == "null" ]; then
# If 'port' key is null, try 'listen_port' key
port_key=$(curl -s "$url" | jq -r '.listen_port')
fi
echo "$port_key"
}
# Function to send a POST request with JSON data
send_post_request() {
local url="$1"
local port="$2"
curl -s -X POST -d json={\"listen_port\":$port} "$url"
}
# Outputs container names
echo "Gluetun container name: $gluetun_container_name - Gluetun Origin URL: $gluetun_origin"
echo "qBittorrent container name: $qbittorrent_container_name - qBittorrent Origin URL: $qb_origin"
# Check if both containers are running
if [[ $(is_container_running "$gluetun_container_name") == $(is_container_running "$qbittorrent_container_name") ]]; then
echo "Both Gluetun and qBittorrent containers are running. Continuing."
external_ip=$(get_vpn_external_ip "${gluetun_urls["pub_ip"]}")
if [ -z "$external_ip" ]; then
echo "External IP is empty. Exiting script due to potential VPN or internet connection issue."
exit 1
else
echo "External IP is $external_ip therefore VPN is up"
fi
gluetun_port=$(get_port_from_url "${gluetun_urls["portforwarded"]}")
qbittorrent_port=$(get_port_from_url "${qbittorrent_urls["prefs"]}")
echo "Gluetun forwarded port is $gluetun_port"
echo "qBittorrent listen port is $qbittorrent_port"
if [ "$gluetun_port" -eq "$qbittorrent_port" ]; then
echo "qBittorrent listen port is already set to $qbittorrent_port. No need to change. Exiting script."
else
echo "Updating qBittorrent listen port to Gluetun forwarded port $gluetun_port."
send_post_request "${qbittorrent_urls["setPrefs"]}" "$gluetun_port"
qbittorrent_port=$(get_port_from_url "${qbittorrent_urls["prefs"]}")
echo "qBittorrent listen port updated to $qbittorrent_port. Exiting script."
fi
else
echo "Either Gluetun or qBittorrent container is not running. Exiting script."
fi

11
scripts/scripts/tidal-mcp.sh Executable file
View File

@@ -0,0 +1,11 @@
cd ~/mcp/tidal-mcp/
uv venv --clear
source .venv/bin/activate
uv pip install --editable .
cd ~/mcp/tidal-mcp/tidal_api/
uv pip install flask tidalapi
nohup python app.py > tidal.log 2>&1 &

View File

@@ -0,0 +1,2 @@
nohup: ignoring input
/usr/bin/python: can't open file '/home/liph/dotfiles/scripts/scripts/app.py': [Errno 2] No such file or directory

View File

@@ -0,0 +1,28 @@
#!/usr/bin/env bash
# Save this file as ~/scripts/tmux-sessionizer
# Make it executable with: chmod +x ~/.local/bin/tmux-sessionizer
if [[ $# -eq 1 ]]; then
selected=$1
else
selected=$(fd -H . ~/dotfiles ~/Desktop/main-cs ~/Desktop/main-cs/Projects ~/ ~/Desktop/work ~/Desktop/work/youtube -t d -d 1 | fzf)
fi
if [[ -z $selected ]]; then
exit 0
fi
selected_name=$(basename "$selected" | tr . _)
tmux_running=$(pgrep tmux)
if [[ -z $TMUX ]] && [[ -z $tmux_running ]]; then
tmux new-session -s $selected_name -c $selected
exit 0
fi
if ! tmux has-session -t=$selected_name 2> /dev/null; then
tmux new-session -ds $selected_name -c $selected
fi
tmux switch-client -t $selected_name

View File

@@ -0,0 +1,33 @@
#!/bin/bash
# Script to find every single file and opens in neovim
# alias set as nzo in .zshrc
search_with_zoxdie() {
if [ -z "$1" ]; then
# use fd with fzf to select & open a file when no arg are provided
file="$(fd --type f -I -H -E .git -E .git-crypt -E .cache -E .backup | fzf --height=70% --preview='bat -n --color=always --line-range :500 {}')"
if [ -n "$file" ]; then
nvim "$file"
fi
else
# Handle when an arg is provided
lines=$(zoxide query -l | xargs -I {} fd --type f -I -H -E .git -E .git-crypt -E .cache -E .backup -E .vscode "$1" {} | fzf --no-sort) # Initial filter attempt with fzf
line_count="$(echo "$lines" | wc -l | xargs)" # Trim any leading spaces
if [ -n "$lines" ] && [ "$line_count" -eq 1 ]; then
# looks for the exact ones and opens it
file="$lines"
nvim "$file"
elif [ -n "$lines" ]; then
# If multiple files are found, allow further selection using fzf and bat for preview
file=$(echo "$lines" | fzf --query="$1" --height=70% --preview='bat -n --color=always --line-range :500 {}')
if [ -n "$file" ]; then
nvim "$file"
fi
else
echo "No matches found." >&2
fi
fi
}
search_with_zoxdie "$@"

View File

@@ -0,0 +1,158 @@
format = """
$directory\
$fill\
$git_status\
$python\
$cmd_duration\
$line_break\
$character\
$line_break"""
#$git_branch\
#$git_status\
#$python\
#$lua\
#$nodejs\
#$golang\
#$haskell\
#$rust\
#$ruby\
#$package\
#$aws\
#$docker_context\
#$jobs\
add_newline = true
command_timeout = 1000
palette = "catppuccin_mocha"
[directory]
style = 'sky'
format = '[$path ]($style)'
truncation_length = 3
read_only = " 󰌾"
truncation_symbol = '…/'
truncate_to_repo = false
#[directory.substitutions]
#'Documents' = '󰈙'
#'Downloads' = ' '
#'Music' = ' '
#'Pictures' = ' '
[fill]
symbol = ' '
## Symbols
[c]
symbol = " "
[cmake]
symbol = " "
[conda]
symbol = " "
[docker_context]
symbol = ' '
style = 'fg:#06969A'
format = '[$symbol]($style) $path'
detect_files = ['docker-compose.yml', 'docker-compose.yaml', 'Dockerfile']
detect_extensions = ['Dockerfile']
[git_branch]
symbol = " "
[git_commit]
tag_symbol = '  '
[golang]
symbol = " "
[haskell]
symbol = " "
[hostname]
ssh_symbol = " "
[java]
symbol = " "
[lua]
symbol = " "
[memory_usage]
symbol = "󰍛 "
[nix_shell]
symbol = " "
[nodejs]
symbol = " "
[os.symbols]
Alpine = " "
Android = " "
Arch = " "
Artix = " "
Debian = " "
EndeavourOS = " "
Fedora = " "
Kali = " "
Linux = " "
Macos = " "
NixOS = " "
openSUSE = " "
Pop = " "
Ubuntu = " "
Unknown = " "
Windows = "󰍲 "
[package]
symbol = "󰏗 "
[php]
symbol = " "
[pijul_channel]
symbol = " "
[python]
symbol = " "
[rlang]
symbol = "󰟔 "
[ruby]
symbol = " "
[rust]
symbol = "󱘗 "
[palettes.catppuccin_mocha]
rosewater = "#f5e0dc"
flamingo = "#f2cdcd"
pink = "#f5c2e7"
mauve = "#cba6f7"
red = "#f38ba8"
maroon = "#eba0ac"
peach = "#fab387"
yellow = "#f9e2af"
green = "#a6e3a1"
teal = "#94e2d5"
sky = "#89dceb"
sapphire = "#74c7ec"
blue = "#89b4fa"
lavender = "#b4befe"
text = "#cdd6f4"
subtext1 = "#bac2de"
subtext0 = "#a6adc8"
overlay2 = "#9399b2"
overlay1 = "#7f849c"
overlay0 = "#6c7086"
surface2 = "#585b70"
surface1 = "#45475a"
surface0 = "#313244"
base = "#1e1e2e"
mantle = "#181825"
crust = "#11111b"

117
tmux/.tmux.conf Normal file
View File

@@ -0,0 +1,117 @@
unbind r
bind -n M-H previous-window
bind -n M-L next-window
set -g prefix C-s
set -g mouse on
# Start windows and panes at 1, not 0
set -g base-index 1
set -g pane-base-index 1
set-window-option -g pane-base-index 1
set-option -g renumber-windows on
set -g allow-passthrough on
bind-key h select-pane -L
bind-key j select-pane -D
bind-key k select-pane -U
bind-key l select-pane -R
# Configure Catppuccin
set -g @catppuccin_flavor "macchiato"
set -g @catppuccin_status_background "none"
set -g @catppuccin_window_status_style "none"
set -g @catppuccin_pane_status_enabled "off"
set -g @catppuccin_pane_border_status "off"
# Configure Online
set -g @online_icon "ok"
set -g @offline_icon "nok"
# status left look and feel
set -g status-left-length 100
set -g status-left ""
set -ga status-left "#{?client_prefix,#{#[bg=#{@thm_red},fg=#{@thm_bg},bold]  #S },#{#[bg=#{@thm_bg},fg=#{@thm_green}]  #S }}"
set -ga status-left "#[bg=#{@thm_bg},fg=#{@thm_overlay_0},none]│"
set -ga status-left "#[bg=#{@thm_bg},fg=#{@thm_maroon}]  #{pane_current_command} "
set -ga status-left "#[bg=#{@thm_bg},fg=#{@thm_overlay_0},none]│"
set -ga status-left "#[bg=#{@thm_bg},fg=#{@thm_blue}]  #{=/-32/...:#{s|$USER|~|:#{b:pane_current_path}}} "
set -ga status-left "#[bg=#{@thm_bg},fg=#{@thm_overlay_0},none]#{?window_zoomed_flag,│,}"
set -ga status-left "#[bg=#{@thm_bg},fg=#{@thm_yellow}]#{?window_zoomed_flag,  zoom ,}"
# status right look and feel
set -g status-right-length 100
set -g status-right ""
set -ga status-right "#{?#{e|>=:10,#{battery_percentage}},#{#[bg=#{@thm_red},fg=#{@thm_bg}]},#{#[bg=#{@thm_bg},fg=#{@thm_pink}]}} #{battery_icon} #{battery_percentage} "
set -ga status-right "#[bg=#{@thm_bg},fg=#{@thm_overlay_0}, none]│"
# Configure Tmux
set -g status-position top
set -g status-style "bg=#{@thm_bg}"
set -g status-justify "absolute-centre"
# continuum
set -g @continuum-restore 'on'
# pane border look and feel
setw -g pane-border-status top
setw -g pane-border-format ""
setw -g pane-active-border-style "bg=#{@thm_bg},fg=#{@thm_overlay_0}"
setw -g pane-border-style "bg=#{@thm_bg},fg=#{@thm_surface_0}"
setw -g pane-border-lines single
# window look and feel
set -wg automatic-rename on
set -g automatic-rename-format "Window"
set -g window-status-format " #I#{?#{!=:#{window_name},Window},: #W,} "
set -g window-status-style "bg=#{@thm_bg},fg=#{@thm_rosewater}"
set -g window-status-last-style "bg=#{@thm_bg},fg=#{@thm_peach}"
set -g window-status-activity-style "bg=#{@thm_red},fg=#{@thm_bg}"
set -g window-status-bell-style "bg=#{@thm_red},fg=#{@thm_bg},bold"
set -gF window-status-separator "#[bg=#{@thm_bg},fg=#{@thm_overlay_0}]│"
set -g window-status-current-format " #I#{?#{!=:#{window_name},Window},: #W,} "
set -g window-status-current-style "bg=#{@thm_peach},fg=#{@thm_bg},bold"
# set vi-mode
set-window-option -g mode-keys vi
# key binds
bind-key -T copy-mode-vi v send-keys -X begin-selection
bind-key -T copy-mode-vi C-v send-keys -X rectangle-toggle
bind-key -T copy-mode-vi y send-keys -X copy-selections-and-cancel
## tmux in yazy
set -g allow-passthrough on
set -ga update-environment TERM
set -ga update-environment TERM_PROGRAM
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-battery'
set -g @plugin 'catppuccin/tmux'
set -g @plugin 'christoomey/vim-tmux-navigator'
set -g @plugin 'tmux-plugins/tmux-yank'
set -g @plugin 'sainnhe/tmux-fzf'
set -g @plugin 'alexwforsythe/tmux-which-key'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
# Other examples:
# set -g @plugin 'github_username/plugin_name'
# set -g @plugin 'github_username/plugin_name#branch'
# set -g @plugin 'git@github.com:user/plugin'
# set -g @plugin 'git@bitbucket.com:user/plugin'
# tmux-fzf config
# Default value in tmux < 3.2
TMUX_FZF_OPTIONS="-m"
# Default value in tmux >= 3.2
TMUX_FZF_OPTIONS="-p -w 100% -h 50% -m"
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'

View File

@@ -0,0 +1,137 @@
// -*- mode: jsonc -*-
{
"layer": "top",
"position": "top",
"height": 30,
"spacing": 0,
"modules-left": [
"custom/logo",
"cpu",
"memory",
"bluetooth",
"mpris"
],
"modules-center": [
"hyprland/workspaces"
],
"modules-right": [
"tray",
"power-profiles-daemon",
"hyprland/language",
"pulseaudio",
"network",
"battery",
"clock",
"custom/power"
],
"mpris": {
"format": "DEFAULT: {player_icon} {dynamic}",
"format-paused": "DEFAULT: {status_icon} <i>{dynamic}</i>",
"player-icons": {
"default": "▶",
"mpv": "🎵"
},
"status-icons": {
"paused": "⏸"
}
// "ignored-players": ["firefox"]
},
"tray": {
"icon-size": 14,
"spacing": 10
},
"clock": {
"format": "{:%I:%M:%S %p}",
"tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>",
"format-alt": "{:%Y-%m-%d}",
"interval": 1
},
"cpu": {
"format": "<span font='14' color='#33d17a'> </span> {usage}%",
"tooltip": false,
"interval": 1
},
"memory": {
"format": "<span font='14' color='#c061cb'> </span> {}%",
"interval": 1
},
"battery": {
"interval": 1,
"states": {
// "good": 95,
"warning": 30,
"critical": 15
},
"format": "<span font='14'>{icon}</span> {capacity}%",
"format-full": "<span font='14'>{icon}</span> {capacity}%",
"format-charging": "<span font='14'>󰂄</span> {capacity}%",
"format-plugged": "<span font='14'>󰂄</span> {capacity}%",
"format-icons": [
"󰁺",
"󰁼",
"󰁾",
"󰂀",
"󰂂"
]
},
"power-profiles-daemon": {
"format": "{icon}",
"tooltip-format": "Power profile: {profile}\nDriver: {driver}",
"tooltip": true,
"format-icons": {
"default": "",
"performance": "",
"balanced": "",
"power-saver": ""
}
},
"network": {
"format-wifi": "<span font='14' color='#3584e4'></span> ",
"format-ethernet": "<span font='14'>󰈀</span>",
"format-disconnected": "<span font='14'>󰤭</span>",
"format-alt": "{bandwidthDownBytes}",
"interval": 1
},
"pulseaudio": {
"format": "<span font='14' color='#f5c211'>{icon}</span> {volume}%",
"format-muted": "<span font='14'>󰝟</span>",
"format-source": "{volume}% ",
"format-source-muted": "",
"format-icons": {
"headphone": " ",
"hands-free": "",
"headset": "",
"phone": "",
"portable": "",
"car": "",
"default": [
"󰕿",
"󰖀",
"󰕾"
]
},
"on-click": "pavucontrol"
},
"custom/power": {
"format": "⏻",
"tooltip": false,
"on-click": "wlogout"
},
"custom/logo": {
"format": "<span font='14'>󰣇</span>",
"on-click": "wofi --show drun"
},
"bluetooth": {
"format": "<span font='14'>󰂯</span>",
"format-disabled": "<span font='14'>󰂲</span>",
"format-connected": "<span font='14'>󰂱</span>",
"on-click": "blueman-manager"
},
"custom/keyboard-layer": {
"exec": "~/scripts/keyboard-layer.sh",
"return-type": "json",
"interval": "once",
"format": "🎹 {}"
}
}

View File

@@ -0,0 +1,115 @@
{
"layer": "bottom",
"position": "top",
"height": 40,
"spacing": 2,
"exclusive": true,
"gtk-layer-shell": true,
"passthrough": false,
"fixed-center": true,
"modules-left": ["hyprland/workspaces", "hyprland/window"],
"modules-center": ["mpris"],
"modules-right": [
"cpu",
"memory",
"pulseaudio",
"clock",
"clock#simpleclock",
"tray",
"custom/notification",
"custom/power",
],
"custom/spotify": {
"format": " {}",
"return-type": "json",
"on-click": "playerctl -p spotify play-pause",
"on-click-right": "spotifatius toggle-liked",
"on-click-middle": "playerctl -p spotify next",
"exec": "spotifatius monitor",
},
"mpris": {
"player": "spotify",
"dynamic-order": ["artist", "title"],
"format": "{player_icon} {dynamic}",
"format-paused": "{status_icon} <i>{dynamic}</i>",
"status-icons": {
"paused": "",
},
"player-icons": {
"default": "",
},
},
"hyprland/workspaces": {
"on-click": "activate",
"format": "{id}",
"all-outputs": true,
"disable-scroll": false,
"active-only": false,
},
"hyprland/window": {
"format": "{title}",
},
"tray": {
"show-passive-items": true,
"spacing": 10,
},
"clock#simpleclock": {
"tooltip": false,
"format": " {:%H:%M}",
},
"clock": {
"format": " {:L%a %d %b}",
"calendar": {
"format": {
"days": "<span weight='normal'>{}</span>",
"months": "<span color='#cdd6f4'><b>{}</b></span>",
"today": "<span color='#f38ba8' weight='700'><u>{}</u></span>",
"weekdays": "<span color='#f9e2af'><b>{}</b></span>",
"weeks": "<span color='#a6e3a1'><b>W{}</b></span>",
},
"mode": "month",
"mode-mon-col": 1,
"on-scroll": 1,
},
"tooltip-format": "<span color='#cdd6f4' font='Lexend 16'><tt><small>{calendar}</small></tt></span>",
},
"cpu": {
"format": " {usage}%",
"tooltip": true,
"interval": 1,
},
"memory": {
"format": " {used:0.1f}Gi",
},
"pulseaudio": {
"format": "{icon} {volume}%",
"format-muted": " muted",
"format-icons": {
"headphone": "",
"default": [" ", " ", " "],
},
"on-click": "pavucontrol",
},
"custom/sep": {
"format": "|",
"tooltip": false,
},
"custom/power": {
"tooltip": false,
"on-click": "wlogout -p layer-shell &",
"format": "⏻",
},
"custom/notification": {
"escape": true,
"exec": "swaync-client -swb",
"exec-if": "which swaync-client",
"format": "{icon}",
"format-icons": {
"none": "󰅺",
"notification": "󰡟",
},
"on-click": "sleep 0.1 && swaync-client -t -sw",
"return-type": "json",
"tooltip": false,
},
}

View File

@@ -0,0 +1,40 @@
{
"position": "top",
"modules-left": ["hyprland/workspaces"],
"modules-center": ["hyprland/window"],
"modules-right": ["network", "pulseaudio", "battery", "clock"],
"clock": {
"format": "<span foreground='#f5c2e7'> </span>{:%a %d %H:%M}",
"tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>"
},
"battery": {
"states": {
"warning": 30,
"critical": 15
},
"format": "<span size='13000' foreground='#a6e3a1'>{icon} </span> {capacity}%",
"format-warning": "<span size='13000' foreground='#B1E3AD'>{icon} </span> {capacity}%",
"format-critical": "<span size='13000' foreground='#E38C8F'>{icon} </span> {capacity}%",
"format-charging": "<span size='13000' foreground='#B1E3AD'> </span>{capacity}%",
"format-plugged": "<span size='13000' foreground='#B1E3AD'> </span>{capacity}%",
"format-alt": "<span size='13000' foreground='#B1E3AD'>{icon} </span> {time}",
"format-full": "<span size='13000' foreground='#B1E3AD'> </span>{capacity}%",
"format-icons": ["", "", "", "", ""],
"tooltip-format": "{time}"
},
"network": {
"format-wifi": "<span size='13000' foreground='#f5e0dc'> </span>{essid}",
"format-ethernet": "<span size='13000' foreground='#f5e0dc'>󰤭 </span> Disconnected",
"format-linked": "{ifname} (No IP) ",
"format-disconnected": "<span size='13000' foreground='#f5e0dc'> </span>Disconnected",
"tooltip-format-wifi": "Signal Strenght: {signalStrength}%"
},
"pulseaudio": {
"format": "{icon} {volume}%",
"format-muted": "",
"format-icons": {
"default": ["", "", " "]
},
"on-click": "pavucontrol"
}
}

View File

@@ -0,0 +1,26 @@
@define-color rosewater #f5e0dc;
@define-color flamingo #f2cdcd;
@define-color pink #f5c2e7;
@define-color mauve #cba6f7;
@define-color red #f38ba8;
@define-color maroon #eba0ac;
@define-color peach #fab387;
@define-color yellow #f9e2af;
@define-color green #a6e3a1;
@define-color teal #94e2d5;
@define-color sky #89dceb;
@define-color sapphire #74c7ec;
@define-color blue #89b4fa;
@define-color lavender #b4befe;
@define-color text #cdd6f4;
@define-color subtext1 #bac2de;
@define-color subtext0 #a6adc8;
@define-color overlay2 #9399b2;
@define-color overlay1 #7f849c;
@define-color overlay0 #6c7086;
@define-color surface2 #585b70;
@define-color surface1 #45475a;
@define-color surface0 #313244;
@define-color base #1e1e2e;
@define-color mantle #181825;
@define-color crust #11111b;

View File

@@ -0,0 +1,143 @@
* {
font-family: "FiraCode Nerd Font";
font-size: 13px;
}
window#waybar {
background-color: rgba(43, 48, 59, 0.5);
background: radial-gradient(alpha(@theme_base_color, 0.4), @theme_base_color);
color: @theme_fg_color;
transition-property: background-color;
transition-duration: .5s;
}
window#waybar.hidden {
opacity: 0.2;
}
button {
border: none;
border-radius: 0;
}
button:hover {
background: inherit;
}
#workspaces {
padding: 5px;
}
#workspaces button {
padding: 0 10px;
background-color: transparent;
color: @theme_fg_color;
border-radius: 10px;
}
#workspaces button:hover,
#workspaces button.active {
background: @theme_selected_bg_color;
}
#workspaces button.urgent {
background-color: #eb4d4b;
}
#clock,
#battery,
#cpu,
#memory,
#disk,
#temperature,
#backlight,
#network,
#pulseaudio,
#wireplumber,
#custom-media,
#tray,
#mode,
#idle_inhibitor,
#scratchpad,
#power-profiles-daemon,
#mpd {
padding: 0 10px;
color: @theme_fg_color;
}
#window,
#workspaces {
margin: 0 4px;
}
/* If workspaces is the leftmost module, omit left margin */
.modules-left>widget:first-child>#workspaces {
margin-left: 0;
}
/* If workspaces is the rightmost module, omit right margin */
.modules-right>widget:last-child>#workspaces {
margin-right: 0;
}
#clock,
#battery,
#cpu,
#memory,
#backlight,
#network,
#pulseaudio,
#custom-media,
#tray,
#custom-power,
#bluetooth,
#power-profiles-daemon {
padding: 5px 15px;
color: @theme_text_color;
background-color: alpha(@theme_unfocused_bg_color, 0.4);
border-radius: 20px;
margin: 0 4px;
}
#custom-power {
background-color: #ed333b;
border-radius: 20px 0 0 20px;
transition: all 250ms ease-in-out;
}
#battery.charging {
color: #00ff1c;
}
#clock {
border-radius: 20px;
margin: 0 5px;
}
#pulseaudio.muted {
color: orange;
}
#network.disconnected {
color: red;
}
#tray {
border-radius: 20px;
margin: 0 5px;
}
#custom-logo {
background-color: #1794d1;
padding: 0 17px;
border-radius: 0 20px 20px 0;
}
#custom-power {
margin: 0;
}
#bluetooth {
border-radius: 20px;
margin: 0 5px;
}

View File

@@ -0,0 +1,116 @@
* {
min-height: 0;
min-width: 0;
font-family: Lexend, "JetBrainsMono NFP";
font-size: 16px;
font-weight: 600;
}
window#waybar {
transition-property: background-color;
transition-duration: 0.5s;
/* background-color: #1e1e2e; */
/* background-color: #181825; */
background-color: #11111b;
/* background-color: rgba(24, 24, 37, 0.6); */
}
#workspaces button {
padding: 0.3rem 0.6rem;
margin: 0.4rem 0.25rem;
border-radius: 6px;
/* background-color: #181825; */
background-color: #1e1e2e;
color: #cdd6f4;
}
#workspaces button:hover {
color: #1e1e2e;
background-color: #cdd6f4;
}
#workspaces button.active {
background-color: #1e1e2e;
color: #89b4fa;
}
#workspaces button.urgent {
background-color: #1e1e2e;
color: #f38ba8;
}
#clock,
#pulseaudio,
#custom-logo,
#custom-power,
#custom-spotify,
#custom-notification,
#cpu,
#tray,
#memory,
#window,
#mpris {
padding: 0.3rem 0.6rem;
margin: 0.4rem 0.25rem;
border-radius: 6px;
/* background-color: #181825; */
background-color: #1e1e2e;
}
#mpris.playing {
color: #a6e3a1;
}
#mpris.paused {
color: #9399b2;
}
#custom-sep {
padding: 0px;
color: #585b70;
}
window#waybar.empty #window {
background-color: transparent;
}
#cpu {
color: #94e2d5;
}
#memory {
color: #cba6f7;
}
#clock {
color: #74c7ec;
}
#clock.simpleclock {
color: #89b4fa;
}
#window {
color: #cdd6f4;
}
#pulseaudio {
color: #b4befe;
}
#pulseaudio.muted {
color: #a6adc8;
}
#custom-logo {
color: #89b4fa;
}
#custom-power {
color: #f38ba8;
}
tooltip {
background-color: #181825;
border: 2px solid #89b4fa;
}

138
wofi/.config/wofi/style.css Normal file
View File

@@ -0,0 +1,138 @@
@define-color rosewater #f5e0dc;
@define-color rosewater-rgb rgb(245, 224, 220);
@define-color flamingo #f2cdcd;
@define-color flamingo-rgb rgb(242, 205, 205);
@define-color pink #f5c2e7;
@define-color pink-rgb rgb(245, 194, 231);
@define-color mauve #cba6f7;
@define-color mauve-rgb rgb(203, 166, 247);
@define-color red #f38ba8;
@define-color red-rgb rgb(243, 139, 168);
@define-color maroon #eba0ac;
@define-color maroon-rgb rgb(235, 160, 172);
@define-color peach #fab387;
@define-color peach-rgb rgb(250, 179, 135);
@define-color yellow #f9e2af;
@define-color yellow-rgb rgb(249, 226, 175);
@define-color green #a6e3a1;
@define-color green-rgb rgb(166, 227, 161);
@define-color teal #94e2d5;
@define-color teal-rgb rgb(148, 226, 213);
@define-color sky #89dceb;
@define-color sky-rgb rgb(137, 220, 235);
@define-color sapphire #74c7ec;
@define-color sapphire-rgb rgb(116, 199, 236);
@define-color blue #89b4fa;
@define-color blue-rgb rgb(137, 180, 250);
@define-color lavender #b4befe;
@define-color lavender-rgb rgb(180, 190, 254);
@define-color text #cdd6f4;
@define-color text-rgb rgb(205, 214, 244);
@define-color subtext1 #bac2de;
@define-color subtext1-rgb rgb(186, 194, 222);
@define-color subtext0 #a6adc8;
@define-color subtext0-rgb rgb(166, 173, 200);
@define-color overlay2 #9399b2;
@define-color overlay2-rgb rgb(147, 153, 178);
@define-color overlay1 #7f849c;
@define-color overlay1-rgb rgb(127, 132, 156);
@define-color overlay0 #6c7086;
@define-color overlay0-rgb rgb(108, 112, 134);
@define-color surface2 #585b70;
@define-color surface2-rgb rgb(88, 91, 112);
@define-color surface1 #45475a;
@define-color surface1-rgb rgb(69, 71, 90);
@define-color surface0 #313244;
@define-color surface0-rgb rgb(49, 50, 68);
@define-color base #1e1e2e;
@define-color base-rgb rgb(30, 30, 46);
@define-color mantle #181825;
@define-color mantle-rgb rgb(24, 24, 37);
@define-color crust #11111b;
@define-color crust-rgb rgb(17, 17, 27);
* {
font-family: 'CaskaydiaCove Nerd Font', monospace;
font-size: 18px;
}
/* Window */
window {
margin: 0px;
padding: 10px;
border: 2px solid @lavender;
border-radius: 8px;
background-color: @base;
}
/* Inner Box */
#inner-box {
margin: 5px;
padding: 10px;
border: none;
background-color: @base;
}
/* Outer Box */
#outer-box {
margin: 5px;
padding: 10px;
border: none;
background-color: @base;
}
/* Scroll */
#scroll {
margin: 0px;
padding: 10px;
border: none;
background-color: @base;
}
/* Input */
#input {
margin: 5px 20px;
padding: 10px;
border: none;
border-radius: 0.1em;
color: @text;
background-color: @base;
}
#input image {
border: none;
color: @red;
}
#input * {
outline: 4px solid @red!important;
}
/* Text */
#text {
margin: 5px;
border: none;
color: @text;
}
#entry {
background-color: @base;
}
#entry arrow {
border: none;
color: @lavender;
}
/* Selected Entry */
#entry:selected {
border: 0.11em solid @lavender;
}
#entry:selected #text {
color: @mauve;
}
#entry:drop(active) {
background-color: @lavender!important;
}

View File

@@ -0,0 +1,17 @@
tank /mnt/tank/ t
ssd2 /mnt/ssd2/ 7
ssd1 /mnt/ssd1/ 6
plugins /home/liph/.config/nvim/lua/plugins/ p
nvim /home/liph/.config/nvim/ n
hypr /home/liph/.config/hypr/ h
healing /mnt/tank/audio/healing/ H
hdd5 /mnt/hdd5/ 5
hdd4 /mnt/hdd4/ 4
hdd3 /mnt/hdd3/ 3
hdd2 /mnt/hdd2/ 2
hdd1 /mnt/hdd1/ 1
flash1 /mnt/flash1/ 8
Downloads /home/liph/Downloads/ D
dotfiles /home/liph/dotfiles/ d
Desktop /home/liph/Desktop/ d
.config /home/liph/.config/ c

View File

@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2023 yazi-rs
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
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 OR COPYRIGHT HOLDERS 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.

View File

@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2022 Himanshu
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
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 OR COPYRIGHT HOLDERS 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.

View File

@@ -0,0 +1,38 @@
<div align="center">
<img src="https://github.com/sxyazi/yazi/blob/main/assets/logo.png?raw=true" alt="Yazi logo" width="20%">
</div>
<h3 align="center">
Catppuccin Mocha Flavor for <a href="https://github.com/sxyazi/yazi">Yazi</a>
</h3>
## 👀 Preview
<img src="preview.png" width="600" />
## 🎨 Installation
```sh
ya pack -a yazi-rs/flavors:catppuccin-mocha
```
## ⚙️ Usage
Set the content of your `theme.toml` to enable it as your _dark_ flavor:
```toml
[flavor]
use = "catppuccin-mocha"
# For upcoming Yazi 0.4 (nightly version):
dark = "catppuccin-mocha"
```
Make sure your `theme.toml` doesn't contain anything other than `[flavor]`, unless you want to override certain styles of this flavor.
See the [Yazi flavor documentation](https://yazi-rs.github.io/docs/flavors/overview) for more details.
## 📜 License
The flavor is MIT-licensed, and the included tmTheme is also MIT-licensed.
Check the [LICENSE](LICENSE) and [LICENSE-tmtheme](LICENSE-tmtheme) file for more details.

View File

@@ -0,0 +1,173 @@
# vim:fileencoding=utf-8:foldmethod=marker
# : Manager {{{
[manager]
cwd = { fg = "#94e2d5" }
# Hovered
hovered = { reversed = true }
preview_hovered = { underline = true }
# Find
find_keyword = { fg = "#f9e2af", bold = true, italic = true, underline = true }
find_position = { fg = "#f5c2e7", bg = "reset", bold = true, italic = true }
# Marker
marker_copied = { fg = "#a6e3a1", bg = "#a6e3a1" }
marker_cut = { fg = "#f38ba8", bg = "#f38ba8" }
marker_marked = { fg = "#94e2d5", bg = "#94e2d5" }
marker_selected = { fg = "#f9e2af", bg = "#f9e2af" }
# Tab
tab_active = { reversed = true }
tab_inactive = {}
tab_width = 1
# Count
count_copied = { fg = "#1e1e2e", bg = "#a6e3a1" }
count_cut = { fg = "#1e1e2e", bg = "#f38ba8" }
count_selected = { fg = "#1e1e2e", bg = "#f9e2af" }
# Border
border_symbol = "│"
border_style = { fg = "#7f849c" }
# : }}}
# : Mode {{{
[mode]
normal_main = { fg = "#1e1e2e", bg = "#89b4fa", bold = true }
normal_alt = { fg = "#89b4fa", bg = "#313244" }
# Select mode
select_main = { fg = "#1e1e2e", bg = "#a6e3a1", bold = true }
select_alt = { fg = "#a6e3a1", bg = "#313244" }
# Unset mode
unset_main = { fg = "#1e1e2e", bg = "#f2cdcd", bold = true }
unset_alt = { fg = "#f2cdcd", bg = "#313244" }
# : }}}
# : Status bar {{{
[status]
separator_open = ""
separator_close = ""
# Progress
progress_label = { fg = "#ffffff", bold = true }
progress_normal = { fg = "#89b4fa", bg = "#45475a" }
progress_error = { fg = "#f38ba8", bg = "#45475a" }
# Permissions
perm_sep = { fg = "#7f849c" }
perm_type = { fg = "#89b4fa" }
perm_read = { fg = "#f9e2af" }
perm_write = { fg = "#f38ba8" }
perm_exec = { fg = "#a6e3a1" }
# : }}}
# : Pick {{{
[pick]
border = { fg = "#89b4fa" }
active = { fg = "#f5c2e7", bold = true }
inactive = {}
# : }}}
# : Input {{{
[input]
border = { fg = "#89b4fa" }
title = {}
value = {}
selected = { reversed = true }
# : }}}
# : Completion {{{
[completion]
border = { fg = "#89b4fa" }
# : }}}
# : Tasks {{{
[tasks]
border = { fg = "#89b4fa" }
title = {}
hovered = { fg = "#f5c2e7", underline = true }
# : }}}
# : Which {{{
[which]
mask = { bg = "#313244" }
cand = { fg = "#94e2d5" }
rest = { fg = "#9399b2" }
desc = { fg = "#f5c2e7" }
separator = "  "
separator_style = { fg = "#585b70" }
# : }}}
# : Help {{{
[help]
on = { fg = "#94e2d5" }
run = { fg = "#f5c2e7" }
hovered = { reversed = true, bold = true }
footer = { fg = "#313244", bg = "#cdd6f4" }
# : }}}
# : Notify {{{
[notify]
title_info = { fg = "#a6e3a1" }
title_warn = { fg = "#f9e2af" }
title_error = { fg = "#f38ba8" }
# : }}}
# : File-specific styles {{{
[filetype]
rules = [
# Images
{ mime = "image/*", fg = "#94e2d5" },
# Media
{ mime = "{audio,video}/*", fg = "#f9e2af" },
# Archives
{ mime = "application/{zip,rar,7z*,tar,gzip,xz,zstd,bzip*,lzma,compress,archive,cpio,arj,xar,ms-cab*}", fg = "#f5c2e7" },
# Documents
{ mime = "application/{pdf,doc,rtf}", fg = "#a6e3a1" },
# Fallback
{ name = "*", fg = "#cdd6f4" },
{ name = "*/", fg = "#89b4fa" }
]
# : }}}

Binary file not shown.

After

Width:  |  Height:  |  Size: 660 KiB

File diff suppressed because it is too large Load Diff

Some files were not shown because too many files have changed in this diff Show More