Compare commits

..

10 Commits

Author SHA1 Message Date
e1fb7488f7 remove unused plugins from waybar 2024-12-28 13:57:35 +03:00
c12ca5035a jira api token added to the zshrc 2024-12-28 13:55:08 +03:00
a078cff01c hyprland config updated 2024-12-28 13:52:31 +03:00
d58297514e mc config update 2024-12-28 13:51:55 +03:00
4f30fa4a19 many nvim changes
nvim file structure updated
nvim luasnippets configured properly
2024-12-28 13:49:08 +03:00
a338ad9d4a gitignore 2024-12-28 13:48:22 +03:00
8318a1e5a4 many things changed 2024-11-08 12:54:30 +03:00
628dd7eca1 gitignore updated 2024-09-17 13:25:40 +03:00
1febc6d818 zoxide wrapper 2024-09-17 13:24:32 +03:00
6b9d3a52a8 sunset script 2024-09-17 13:24:20 +03:00
131 changed files with 3119 additions and 274 deletions

View File

@ -10,13 +10,17 @@ alias nt="n test"
alias ntd="n test:dev"
# ─────────────────────────────── vim/nvim ───────────────────────────────
if command -v zoxide > /dev/null && command -v nvim-zoxide > /dev/null; then
alias nvim="nvim-zoxide"
fi
alias nv="nvim"
alias lv="lvim"
alias vim="nvim"
alias v="vim"
if command -v zoxide > /dev/null && command -v nvim-zoxide > /dev/null; then
alias nv="nvim-zoxide"
fi
# ───────────────────────────── drag n drop ───────────────────────────
alias dnd="dragon-drop"
alias cpdnd='cp $(dragon-drop -p -x -t .) .'
# ───────────────────────────────── eza ───────────────────────────────
if command -v eza > /dev/null; then

View File

@ -0,0 +1,15 @@
{
// Place your snippets for typescript here. Each snippet is defined under a snippet name and has a prefix, body and
// description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the
// same ids are connected.
// Example:
// "Print to console": {
// "prefix": "log",
// "body": [
// "console.log('$1');",
// "$2"
// ],
// "description": "Log output to console"
// }
}

View File

@ -2,7 +2,7 @@
animations {
enabled = true
# Default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more
# see https://wiki.hyprland.org/Configuring/Animations/ for more
bezier = myBezier, 0.05, 0.9, 0.1, 1.05
bezier = easeOutQuint, 0.22, 1, 0.36, 1

View File

@ -15,6 +15,7 @@ bind = $mainMod SHIFT, T, exec, ~/.config/hypr/scripts/show-crow.sh
bind = $mainMod CTRL SHIFT, T, exec, ~/.config/hypr/scripts/translate-selection.sh
bind = $mainMod, E, exec, $fileManager # file manager
bind = $mainMod, A, exec, $toggle_menu_cmd # wofi
bind = $mainMod CTRL ALT, V, exec, ~/.config/hypr/scripts/dnd-clipboard.sh
# ──────────────────────────────── copyq ──────────────────────────────
bind = CTRL_ALT, V, exec, copyq toggle
@ -99,14 +100,20 @@ bindle=, XF86AudioLowerVolume, exec, pactl set-sink-volume @DEFAULT_SINK@ -5% &
bindle=, XF86MonBrightnessUp, exec, ~/.config/scripts/set_brightness.sh +10%
bindle=, XF86MonBrightnessDown, exec, ~/.config/scripts/set_brightness.sh 10%-
bindl=, XF86AudioMute, exec, amixer set Master toggle
bindl=, XF86AudioPlay, exec, playerctl play-pause
bindl=, XF86AudioPause, exec, playerctl play-pause
bindl=, XF86AudioStop, exec, playerctl play-pause
bindl=, XF86AudioNext, exec, playerctl next
bindl=, XF86AudioPrev, exec, playerctl previous
bindl= CTRL ALT SHIFT, H, exec, playerctl previous
bindl= CTRL ALT SHIFT, L, exec, playerctl next
bindl= CTRL ALT SHIFT, SPACE, exec, playerctl play-pause
bindl=, XF86AudioPlay, exec, playerctl --player=$(cat ~/.config/chosen_player) play-pause
bindl=, XF86AudioPause, exec, playerctl --player=$(cat ~/.config/chosen_player) play-pause
bindl=, XF86AudioStop, exec, playerctl --player=$(cat ~/.config/chosen_player) play-pause
bindl=, XF86AudioNext, exec, playerctl --player=$(cat ~/.config/chosen_player) next
bindl=, XF86AudioPrev, exec, playerctl --player=$(cat ~/.config/chosen_player) previous
bindl= CTRL ALT SHIFT, H, exec, playerctl --player=$(cat ~/.config/chosen_player) previous
bindl= CTRL ALT SHIFT, L, exec, playerctl --player=$(cat ~/.config/chosen_player) next
bindl= CTRL ALT SHIFT, SPACE, exec, playerctl --player=$(cat ~/.config/chosen_player) play-pause
# ─────────────────────── select pulseaudio output ───────────────────────
bind= CTRL ALT SHIFT, O, exec, ~/.config/hypr/scripts/wofi-pulse-output.sh
# ─────────────────────── select playerctl player ─────────────────────
bind= CTRL ALT SHIFT, P, exec, ~/.config/hypr/scripts/wofi-player.sh
# Move/resize windows with mainMod + LMB/RMB and dragging
bindm = $mainMod, mouse:272, movewindow

View File

@ -17,8 +17,8 @@ source = ./workspaces.conf
# See https://wiki.hyprland.org/Configuring/Keywords/
# Set programs that you use
$terminal = alacritty
$fileManager = dolphin
$terminal = kitty
$fileManager = $terminal tmux new-session -s tmp-file-manager 'yazi'
$toggle_menu_cmd = pgrep wofi >/dev/null 2>&1 && killall wofi || wofi --show drun
# ╭──────────────────────────────────────────────────────────╮
@ -72,10 +72,10 @@ decoration {
inactive_opacity = 0.9
fullscreen_opacity = 1.0
drop_shadow = true
shadow_range = 4
shadow_render_power = 3
col.shadow = rgba(1a1a1aee)
# drop_shadow = true
# shadow_range = 4
# shadow_render_power = 3
# col.shadow = rgba(1a1a1aee)
# https://wiki.hyprland.org/Configuring/Variables/#blur
blur {

View File

@ -1,6 +1,7 @@
# Generated by nwg-displays on 2024-08-14 at 13:35:50. Do not edit manually.
# Generated by nwg-displays on 2024-10-09 at 13:19:03. Do not edit manually.
monitor=eDP-1,1920x1080@60.01,0x0,1.0
monitor=DP-2,1920x1080@60.0,1920x-953,1.0
monitor=HDMI-A-1,2560x1440@59.95,-640x-1440,1.0
monitor=DP-2,1920x1080@60.0,1920x-1440,1.0
monitor=DP-2,transform,3
monitor=desc:Iiyama North America PL3270Q 1155103721286,2560x1440@59.95,-640x-1440,1.0
monitor=desc:BNQ BenQ G925HDA 29A01966019,prefered,auto,1.0

View File

@ -0,0 +1,6 @@
# Generated by nwg-displays on 2024-08-14 at 13:35:50. Do not edit manually.
monitor=eDP-1,1920x1080@60.01,0x0,1.0
monitor=DP-2,1920x1080@60.0,1920x-953,1.0
# monitor=HDMI-A-1,2560x1440@59.95,-640x-1440,1.0
monitor=desc:BNQ BenQ G925HDA 29A01966019,prefered,auto,1.0

View File

@ -0,0 +1 @@
wl-paste > /tmp/clipboard_image.jpg && dragon-drop /tmp/clipboard_image.jpg

View File

@ -0,0 +1,37 @@
#!/bin/bash
# Function to get info for a player
get_player_info() {
playerctl -p "$1" metadata --format "{{ artist }} - {{ title }}" 2>/dev/null
}
# Get the currently selected player from the file, if it exists
current_player=$(cat ~/.config/chosen_player 2>/dev/null)
# Get list of players
players=$(playerctl -l)
# Prepare the list for rofi by appending info about each player
menu=""
for player in $players; do
info=$(get_player_info "$player")
if [ -z "$info" ]; then
info="(No track info)"
fi
# Highlight the current player with ✅
if [ "$player" = "$current_player" ]; then
menu+="$player: $info\n"
else
menu+="$player: $info\n"
fi
done
# Use rofi to choose the player
chosen=$(echo -e "$menu" | wofi -dmenu -p "Choose player" | awk -F: '{print $1}')
# If a player was chosen, save it to a file
if [ -n "$chosen" ]; then
echo "$chosen" > ~/.config/chosen_player
notify-send "Audio output switched" "Switched to $(echo "$chosen")"
fi

View File

@ -0,0 +1,28 @@
#!/bin/bash
# Get the current default sink
default_sink=$(pactl info | grep "Default Sink" | awk '{print $3}')
default_sink_number=$(pactl list sinks short | grep "$default_sink" | awk '{print $1}')
# Get a list of available sinks with their descriptions
sinks=$(pactl list sinks | grep -E 'Sink|Description' | sed -E 's/Sink #([0-9]+)/\1/' | sed -E 's/Description: (.+)/\1/')
# Format the sink list to show the index and description
formatted_sinks=$(echo "$sinks" | awk 'NR%2{printf "%s ", $0; next;}1')
# Add ✅ to the current default sink
formatted_sinks=$(echo "$formatted_sinks" | awk -v default_sink_number="$default_sink_number" '{if ($1 == default_sink_number) {print "✅ " $0} else {print $0}}')
# Use wofi to select a sink based on the description
selected_sink=$(echo "$formatted_sinks" | wofi --dmenu --prompt "Select audio output:")
# Extract the sink index
sink_index=$(echo "$selected_sink" | awk '{print $1}')
# Set the selected sink as the default
if [ -n "$sink_index" ]; then
pactl set-default-sink "$sink_index"
notify-send "Audio output switched" "Switched to $(echo "$selected_sink" | cut -d' ' -f2-)"
else
notify-send "No sink selected"
fi

View File

@ -66,7 +66,7 @@ inactive_border_color #6272a4
# BEGIN_KITTY_FONTS
font_family family="JetBrains Mono"
font_family family="VictorMono Nerd Font Mono"
bold_font auto
italic_font auto
bold_italic_font auto

View File

@ -0,0 +1,4 @@
git:
paging:
colorArg: always
pager: delta --dark --paging=never

View File

@ -1,10 +1,16 @@
lastupdatecheck: 0
recentrepos:
- /home/goodhumored/lazygit/lazygit
- /home/goodhumored/side-hustle/lambo/er_lamborgini
- /home/goodhumored/side-hustle/alexflora/frontend
- /home/goodhumored/lazygit/lazygit
startuppopupversion: 5
lastversion: 0.43.1
customcommandshistory: []
hidecommandlog: false
ignorewhitespaceindiffview: false
diffcontextsize: 3
renamesimilaritythreshold: 50
localbranchsortorder: recency
remotebranchsortorder: alphabetical
gitlogorder: topo-order
gitlogshowgraph: always

View File

@ -88,7 +88,7 @@ shell_directory_timeout=900
[Layout]
output_lines=0
left_panel_size=118
left_panel_size=59
top_panel_size=0
message_visible=true
keybar_visible=true
@ -117,6 +117,7 @@ base_color=
xterm-256color=
color_terminals=
screen-256color=
tmux-256color=
[Panels]
show_mini_info=true
@ -140,7 +141,7 @@ quick_search_mode=2
select_flags=6
[Panelize]
Modified git files=git ls-files --modified
Find *.orig after patching=find . -name \\*.orig -print
Find SUID and SGID programs=find . \\( \\( -perm -04000 -a -perm /011 \\) -o \\( -perm -02000 -a -perm /01 \\) \\) -print
Find rejects after patching=find . -name \\*.rej -print
Find *.orig after patching=find . -name \\*.orig -print
Modified git files=git ls-files --modified

View File

@ -9,6 +9,7 @@ return {
-- default config
image.setup({
backend = "kitty",
kitty_method = "normal",
integrations = {
markdown = {
enabled = true,

View File

@ -0,0 +1,8 @@
return {
"MysticalDevil/inlay-hints.nvim",
event = "LspAttach",
dependencies = { "neovim/nvim-lspconfig" },
config = function()
require("inlay-hints").setup()
end,
}

View File

@ -0,0 +1,32 @@
return {
"ellisonleao/gruvbox.nvim",
priority = 1000,
config = function()
require("gruvbox").setup({
terminal_colors = true, -- add neovim terminal colors
undercurl = true,
underline = true,
bold = true,
italic = {
strings = true,
emphasis = true,
comments = true,
operators = false,
folds = true,
},
strikethrough = true,
invert_selection = false,
invert_signs = false,
invert_tabline = false,
invert_intend_guides = false,
inverse = true, -- invert background for search, diffs, statuslines and errors
contrast = "", -- can be "hard", "soft" or empty string
palette_overrides = {},
overrides = {},
dim_inactive = false,
transparent_mode = false,
})
vim.o.background = "dark"
vim.cmd("colorscheme gruvbox")
end,
}

View File

@ -0,0 +1 @@
return require("goodhumored.appearance.theme.gruvbox")

View File

@ -0,0 +1,35 @@
return {
"nvim-lualine/lualine.nvim",
dependencies = { "nvim-tree/nvim-web-devicons" },
config = function()
require("lualine").setup({
options = {
theme = "iceberg_dark",
component_separators = "",
section_separators = { left = "", right = "" },
},
sections = {
lualine_a = { { "mode", separator = { left = "" }, right_padding = 2 } },
lualine_b = { "filename", "branch" },
lualine_c = {
"%=", --[[ add your center compoentnts here in place of this comment ]]
},
lualine_x = {},
lualine_y = { "filetype", "progress" },
lualine_z = {
{ "location", separator = { right = "" }, left_padding = 2 },
},
},
inactive_sections = {
lualine_a = { "filename" },
lualine_b = {},
lualine_c = {},
lualine_x = {},
lualine_y = {},
lualine_z = { "location" },
},
tabline = {},
extensions = {},
})
end,
}

View File

@ -0,0 +1,15 @@
return {
"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,64 @@
return {
"nvim-tree/nvim-tree.lua",
version = "*",
lazy = false,
dependencies = {
"nvim-tree/nvim-web-devicons",
},
config = function()
local api = require("nvim-tree.api")
local function edit_or_open()
local node = api.tree.get_node_under_cursor()
if node.nodes ~= nil then
-- expand or collapse folder
api.node.open.edit()
else
-- open file
api.node.open.edit()
-- Close the tree if file was opened
api.tree.close()
end
end
-- open as vsplit on current node
local function vsplit_preview()
local node = api.tree.get_node_under_cursor()
if node.nodes ~= nil then
-- expand or collapse folder
api.node.open.edit()
else
-- open file as vsplit
api.node.open.vertical()
end
-- Finally refocus on tree if it was lost
api.tree.focus()
end
local function collapse_folder()
local node = api.tree.get_node_under_cursor()
api.node.navigate.parent(node)
api.node.open.edit(node.parent)
end
require("nvim-tree").setup({
on_attach = function(bufnr)
local function opts(desc)
return { desc = "nvim-tree: " .. desc, buffer = bufnr, noremap = true, silent = true, nowait = true }
end
-- default mappings
api.config.mappings.default_on_attach(bufnr)
vim.keymap.set("n", "l", edit_or_open, opts("Edit Or Open"))
vim.keymap.set("n", "L", vsplit_preview, opts("Vsplit Preview"))
vim.keymap.set("n", "h", collapse_folder, opts("Close"))
vim.keymap.set("n", "H", api.tree.collapse_all, opts("Collapse All"))
end,
})
local api = require("nvim-tree.api")
vim.keymap.set("n", "<leader>e", api.tree.toggle, { desc = "[E]xplorer" })
vim.keymap.set("n", "<leader>E", function()
api.tree.find_file({ open = true, focus = true })
end, { desc = "Focus file in [E]xplorer" })
end,
}

View File

@ -0,0 +1,6 @@
vim.api.nvim_create_autocmd("BufWritePre", {
pattern = "*.ts",
callback = function()
vim.cmd("OrganizeImports")
end,
})

View File

@ -0,0 +1,49 @@
return {
"nyngwang/NeoZoom.lua",
config = function()
require("neo-zoom").setup({
popup = { enabled = true }, -- this is the default.
-- NOTE: Add popup-effect (replace the window on-zoom with a `[No Name]`).
-- EXPLAIN: This improves the performance, and you won't see two
-- identical buffers got updated at the same time.
-- popup = {
-- enabled = true,
-- exclude_filetypes = {},
-- exclude_buftypes = {},
-- },
exclude_buftypes = { "terminal" },
-- exclude_filetypes = { 'lspinfo', 'mason', 'lazy', 'fzf', 'qf' },
winopts = {
offset = {
-- NOTE: omit `top`/`left` to center the floating window vertically/horizontally.
-- top = 0,
-- left = 0.17,
width = 150,
height = 0.85,
},
-- NOTE: check :help nvim_open_win() for possible border values.
border = "thicc", -- this is a preset, try it :)
},
presets = {
{
-- NOTE: regex pattern can be used here!
filetypes = { "dapui_.*", "dap-repl" },
winopts = {
offset = { top = 0.02, left = 0.26, width = 0.74, height = 0.25 },
},
},
{
filetypes = { "markdown" },
callbacks = {
function()
vim.wo.wrap = true
end,
},
},
},
})
vim.keymap.set("n", "<CR>", function()
vim.cmd("NeoZoomToggle")
end, { silent = true, nowait = true })
end,
}

View File

@ -0,0 +1,87 @@
return -- Lua
{
"folke/zen-mode.nvim",
opts = {
window = {
backdrop = 0.95, -- shade the backdrop of the Zen window. Set to 1 to keep the same as Normal
-- height and width can be:
-- * an absolute number of cells when > 1
-- * a percentage of the width / height of the editor when <= 1
-- * a function that returns the width or the height
width = 120, -- width of the Zen window
height = 1, -- height of the Zen window
-- by default, no options are changed for the Zen window
-- uncomment any of the options below, or add other vim.wo options you want to apply
options = {
-- signcolumn = "no", -- disable signcolumn
-- number = false, -- disable number column
-- relativenumber = false, -- disable relative numbers
-- cursorline = false, -- disable cursorline
-- cursorcolumn = false, -- disable cursor column
-- foldcolumn = "0", -- disable fold column
-- list = false, -- disable whitespace characters
},
},
plugins = {
-- disable some global vim options (vim.o...)
-- comment the lines to not apply the options
options = {
enabled = true,
ruler = false, -- disables the ruler text in the cmd line area
showcmd = false, -- disables the command in the last line of the screen
-- you may turn on/off statusline in zen mode by setting 'laststatus'
-- statusline will be shown only if 'laststatus' == 3
laststatus = 0, -- turn off the statusline in zen mode
},
twilight = { enabled = true }, -- enable to start Twilight when zen mode opens
gitsigns = { enabled = false }, -- disables git signs
tmux = { enabled = true }, -- disables the tmux statusline
todo = { enabled = false }, -- if set to "true", todo-comments.nvim highlights will be disabled
-- this will change the font size on kitty when in zen mode
-- to make this work, you need to set the following kitty options:
-- - allow_remote_control socket-only
-- - listen_on unix:/tmp/kitty
kitty = {
enabled = false,
font = "+8", -- font size increment
},
-- this will change the font size on alacritty when in zen mode
-- requires Alacritty Version 0.10.0 or higher
-- uses `alacritty msg` subcommand to change font size
alacritty = {
enabled = false,
font = "18", -- font size
},
-- this will change the font size on wezterm when in zen mode
-- See alse also the Plugins/Wezterm section in this projects README
wezterm = {
enabled = false,
-- can be either an absolute font size or the number of incremental steps
font = "+4", -- (10% increase per step)
},
-- this will change the scale factor in Neovide when in zen mode
-- See alse also the Plugins/Wezterm section in this projects README
neovide = {
enabled = false,
-- Will multiply the current scale factor by this number
scale = 1.2,
-- disable the Neovide animations while in Zen mode
disable_animations = {
neovide_animation_length = 0,
neovide_cursor_animate_command_line = false,
neovide_scroll_animation_length = 0,
neovide_position_animation_length = 0,
neovide_cursor_animation_length = 0,
neovide_cursor_vfx_mode = "",
},
},
},
-- callback where you can add custom code when the Zen window opens
on_open = function(win) end,
-- callback where you can add custom code when the Zen window closes
on_close = function() end,
},
keys = {
{ "<leader>tz", ":ZenMode<CR>", desc = "[T]oggle [Z]en" },
},
}

View File

@ -1,9 +1,21 @@
-- ───────────────────── disable highlight on search ─────────────────────
vim.keymap.set({ "n", "i" }, "<C-H>", "<C-W>", { noremap = true, desc = "Delete word" })
-- ───────────────────── disable highlight on search ─────────────────────
vim.keymap.set("n", "<Esc>", "<cmd>nohlsearch<CR>")
-- ────────────────────────── insert timestamp ───────────────────────
vim.api.nvim_set_keymap("i", "<F3>", '<C-R>=strftime("%Y-%m-%dT%H:%M:%S.000Z")<CR>', { noremap = true, silent = true })
-- ─────────────────────────── ctrl+left/right ───────────────────────────
vim.api.nvim_set_keymap("i", "<C-Left>", "<C-o>b", { noremap = true, silent = true })
vim.api.nvim_set_keymap("i", "<C-Right>", "<C-o>w", { noremap = true, silent = true })
-- ───────────────────────── Diagnostic keymaps ──────────────────────
vim.keymap.set("n", "<leader>q", vim.diagnostic.setloclist, { desc = "Open diagnostic [Q]uickfix list" })
-- ─────────────────────── pasting in insert mode ────────────────────
vim.keymap.set("i", "<C-V>", "<C-r>+", { desc = "" })
-- ╭─────────────────────────────────────────────────────────╮
-- │ terminal │
-- ╰─────────────────────────────────────────────────────────╯

View File

@ -68,7 +68,7 @@ return { -- LSP Configuration & Plugins
-- Execute a code action, usually your cursor needs to be on top of an error
-- or a suggestion from your LSP for this to activate.
map("<leader>ca", vim.lsp.buf.code_action, "[C]ode [A]ction")
map("<space><space>", vim.lsp.buf.code_action, "Code Action")
-- WARN: This is not Goto Definition, this is Goto Declaration.
-- For example, in C this would take you to the header.
@ -142,7 +142,36 @@ return { -- LSP Configuration & Plugins
-- https://github.com/pmizio/typescript-tools.nvim
--
-- But for many setups, the LSP (`tsserver`) will work just fine
tsserver = {
ts_ls = {
init_options = {
preferences = {
importModuleSpecifierPreference = "relative",
},
},
typescript = {
inlayHints = {
includeInlayParameterNameHints = "all",
includeInlayParameterNameHintsWhenArgumentMatchesName = true,
includeInlayFunctionParameterTypeHints = true,
includeInlayVariableTypeHints = true,
includeInlayVariableTypeHintsWhenTypeMatchesName = true,
includeInlayPropertyDeclarationTypeHints = true,
includeInlayFunctionLikeReturnTypeHints = true,
includeInlayEnumMemberValueHints = true,
},
},
javascript = {
inlayHints = {
includeInlayParameterNameHints = "all",
includeInlayParameterNameHintsWhenArgumentMatchesName = true,
includeInlayFunctionParameterTypeHints = true,
includeInlayVariableTypeHints = true,
includeInlayVariableTypeHintsWhenTypeMatchesName = true,
includeInlayPropertyDeclarationTypeHints = true,
includeInlayFunctionLikeReturnTypeHints = true,
includeInlayEnumMemberValueHints = true,
},
},
commands = {
OrganizeImports = {
function()
@ -176,6 +205,16 @@ return { -- LSP Configuration & Plugins
autoFixOnSave = true,
autoFix = true,
},
rust_analyzer = {
settings = {
["rust-analyzer"] = {
cargo = {
allFeatures = true,
},
},
},
},
}
-- Ensure the servers and tools above are installed
@ -209,7 +248,6 @@ return { -- LSP Configuration & Plugins
settings = {
gopls = {
gofumpt = true,
golines = true,
},
},
})

View File

@ -85,9 +85,9 @@ return {
filter_dir = function(name, rel_path, root)
return name ~= "node_modules" or name ~= "dist"
end,
-- is_test_file = function(file_path)
-- return file_path:match(".*%.spec%.ts") ~= nil
-- end,
is_test_file = function(file_path)
return file_path:match(".*%.spec%.ts") ~= nil
end,
}),
},
})

View File

@ -0,0 +1,12 @@
return { -- Collection of various small independent plugins/modules
"echasnovski/mini.nvim",
config = function()
-- Better Around/Inside textobjects
--
-- Examples:
-- - va) - [V]isually select [A]round [)]paren
-- - yinq - [Y]ank [I]nside [N]ext [Q]uote
-- - ci' - [C]hange [I]nside [']quote
require("mini.ai").setup({ n_lines = 500 })
end,
}

View File

@ -0,0 +1,18 @@
return {
"kylechui/nvim-surround",
version = "*", -- Use for stability; omit to use `main` branch for the latest features
event = "VeryLazy",
config = function()
local surround = require("nvim-surround")
surround.setup({
aliases = {
["a"] = ">",
["b"] = ")",
["B"] = "}",
["r"] = "]",
["q"] = { '"', "'", "`" },
["s"] = { "}", "]", ")", ">", '"', "'", "`" },
},
})
end,
}

View File

@ -0,0 +1,53 @@
{
"private readonly ...": {
"scope": "typescript",
"prefix": "prr",
"body": [
"private readonly _${1:name}: ${2:Type}"
]
},
"props": {
"scope": "typescriptreact",
"prefix": "props",
"body": [
"{ className }: { className?: string }"
]
},
"prop": {
"scope": "typescript",
"prefix": "prop",
"body": [
"private _${1:name}: ${3:Type}",
"get${2:Name}(): ${3:Type} {",
" return this._${1:name}",
"}",
"set${2:Name}(${1:name}: ${3:Type}) {",
" this._${1:name} = ${1:name}",
"}"
]
},
"roprop": {
"scope": "typescript",
"prefix": "ro",
"body": [
"private readonly _${1:name}: ${3:Type};",
"get${2:Name}(): ${3:Type} {",
" return this._${1:name}",
"}"
]
},
"vs": {
"scope": "typescript",
"prefix": "vs",
"body": [
"vi.spyOn(${1:class}, \"${2:method}\")${3:.mock$4};"
]
},
"faker lorem word": {
"scope": "typescript",
"prefix": "flw",
"body": [
"faker.lorem.word();"
]
}
}

View File

@ -0,0 +1,12 @@
return {
"L3MON4D3/LuaSnip",
version = "v2.*",
build = "make install_jsregexp",
config = function()
require("luasnip.loaders.from_vscode").load({
paths = {
"~/.config/nvim/luasnippets",
},
})
end,
}

View File

@ -1,5 +1,6 @@
require("goodhumored.common-vim-settings")
require("goodhumored.common-bindings")
require("goodhumored.autocommands")
require("goodhumored.lazy")
-- The line beneath this is called `modeline`. See `:help modeline`
-- vim: ts=2 sts=2 sw=2 et

View File

@ -0,0 +1,107 @@
local leet_arg = "leetcode.nvim"
return {
"kawre/leetcode.nvim",
build = ":TSUpdate html",
dependencies = {
"nvim-telescope/telescope.nvim",
"nvim-lua/plenary.nvim", -- required by telescope
"MunifTanjim/nui.nvim",
-- optional
"nvim-treesitter/nvim-treesitter",
"rcarriga/nvim-notify",
"nvim-tree/nvim-web-devicons",
},
cmd = "Leet",
lazy = leet_arg ~= vim.fn.argv()[1],
opts = {
---@type string
arg = leet_arg,
---@type lc.lang
lang = "golang",
cn = { -- leetcode.cn
enabled = false, ---@type boolean
translator = true, ---@type boolean
translate_problems = true, ---@type boolean
},
---@type lc.storage
storage = {
home = vim.fn.stdpath("data") .. "/leetcode",
cache = vim.fn.stdpath("cache") .. "/leetcode",
},
---@type table<string, boolean>
plugins = {
non_standalone = false,
},
---@type boolean
logging = true,
injector = {}, ---@type table<lc.lang, lc.inject>
cache = {
update_interval = 60 * 60 * 24 * 7, ---@type integer 7 days
},
console = {
open_on_runcode = true, ---@type boolean
dir = "row", ---@type lc.direction
size = { ---@type lc.size
width = "90%",
height = "75%",
},
result = {
size = "60%", ---@type lc.size
},
testcase = {
virt_text = true, ---@type boolean
size = "40%", ---@type lc.size
},
},
description = {
position = "left", ---@type lc.position
width = "40%", ---@type lc.size
show_stats = true, ---@type boolean
},
hooks = {
---@type fun()[]
["enter"] = {},
---@type fun(question: lc.ui.Question)[]
["question_enter"] = {},
---@type fun()[]
["leave"] = {},
},
keys = {
toggle = { "q" }, ---@type string|string[]
confirm = { "<CR>" }, ---@type string|string[]
reset_testcases = "r", ---@type string
use_testcase = "U", ---@type string
focus_testcases = "H", ---@type string
focus_result = "L", ---@type string
},
---@type lc.highlights
theme = {},
---@type boolean
image_support = false,
},
}

View File

@ -0,0 +1,12 @@
return {
plugins = {
require("goodhumored.languages.latex.ltex"),
require("goodhumored.languages.neorg.neorg"),
-- require("goodhumored.languages.rust.rust.vim"),
require("goodhumored.languages.rust.rust-tools"),
require("goodhumored.languages.markdown.otter"),
require("goodhumored.languages.markdown.markview"),
require("goodhumored.languages.markdown.markdown-preview"),
require("goodhumored.languages.plantuml.plantuml"),
},
}

View File

@ -0,0 +1,79 @@
return {
"nvim-neorg/neorg",
lazy = false,
version = "*",
dependencies = {
"nvim-neorg/lua-utils.nvim",
"pysan3/pathlib.nvim",
},
config = function()
local neorg = require("neorg")
neorg.setup({
load = {
["core.defaults"] = {},
["core.concealer"] = {},
["core.integrations.image"] = {},
["core.latex.renderer"] = {},
["core.export"] = {
config = { -- Note that this table is optional and doesn't need to be provided
-- Configuration here
},
},
["core.dirman"] = {
config = {
workspaces = {
notes = "~/notes",
uni = "~/Uni",
dipal = "~/Job/dipal/notes",
side = "~/side-hustle/notes",
},
default_workspace = "notes",
open_last_workspace = true,
},
},
["core.qol.toc"] = {
config = {
close_split_on_jump = true,
},
},
},
})
neorg.modules.get_module("core.dirman").set_closest_workspace_match()
vim.wo.foldlevel = 99
vim.wo.conceallevel = 2
end,
keys = {
{
"<leader>nw",
":Neorg workspace ",
desc = "[N]eorg [W]orkspaces",
},
{
"<leader>nj",
":Neorg journal<CR>",
desc = "[N]eorg [J]ournal",
},
{
"<leader>ni",
":Neorg index<CR>",
desc = "[N]eorg [I]ndex",
},
{
"<leader>nT",
":Neorg toc qflist<CR>",
desc = "[N]eorg [T]able of contents",
},
{
"<leader>nr",
":Neorg return<CR>",
desc = "[N]eorg [R]eturn",
},
{
"<leader>tl",
":Neorg render-latex<CR>",
desc = "[N]eorg [L]atex",
},
},
}

View File

@ -0,0 +1,13 @@
return {
"3rd/diagram.nvim",
dependencies = {
"3rd/image.nvim",
},
opts = { -- you can just pass {}, defaults below
renderer_options = {
plantuml = {
charset = "utf-8",
},
},
},
}

View File

@ -0,0 +1,7 @@
return {
"https://gitlab.com/itaranto/plantuml.nvim",
version = "*",
config = function()
require("plantuml").setup()
end,
}

View File

@ -0,0 +1,11 @@
return {
"simrat39/rust-tools.nvim",
ft = "rust",
dependencies = "neovim/nvim-lspconfig",
opts = function()
return {}
end,
config = function(_, opts)
require("rust-tools").setup(opts)
end,
}

View File

@ -0,0 +1,7 @@
return {
"rust-lang/rust.vim",
ft = "rust",
init = function()
vim.g.rustfmt_autosave = 1
end,
}

View File

@ -9,13 +9,23 @@ if not vim.uv.fs_stat(lazypath) then
end
end ---@diagnostic disable-next-line: undefined-field
vim.opt.rtp:prepend(lazypath)
local languagesPlugins = require("goodhumored.languages")
-- [[ Configure and install plugins ]]
-- NOTE: Here is where you install your plugins.
require("lazy").setup({
{ import = "goodhumored.plugins" },
{ import = "goodhumored.plugins.dap" },
{ import = "goodhumored.plugins.snippets" },
{ import = "goodhumored.appearance.code" },
{ import = "goodhumored.appearance.theme" },
{ import = "goodhumored.appearance.ui" },
{ import = "goodhumored.appearance.tint-unfocused" },
{ import = "goodhumored.comfort-features" },
{ import = "goodhumored.core" },
{ import = "goodhumored.core.dap" },
{ import = "goodhumored.editing" },
{ import = "goodhumored.editing.snippets" },
{ import = "goodhumored.integrations" },
{ import = "goodhumored.sessions" },
languagesPlugins.plugins,
}, {
ui = {
-- If you are using a Nerd Font: set icons to an empty table which will use the

View File

@ -1,36 +0,0 @@
return {
"MysticalDevil/inlay-hints.nvim",
event = "LspAttach",
dependencies = { "neovim/nvim-lspconfig" },
config = function()
require("inlay-hints").setup()
require("lspconfig").tsserver.setup({
settings = {
typescript = {
inlayHints = {
includeInlayParameterNameHints = "all",
includeInlayParameterNameHintsWhenArgumentMatchesName = true,
includeInlayFunctionParameterTypeHints = true,
includeInlayVariableTypeHints = true,
includeInlayVariableTypeHintsWhenTypeMatchesName = true,
includeInlayPropertyDeclarationTypeHints = true,
includeInlayFunctionLikeReturnTypeHints = true,
includeInlayEnumMemberValueHints = true,
},
},
javascript = {
inlayHints = {
includeInlayParameterNameHints = "all",
includeInlayParameterNameHintsWhenArgumentMatchesName = true,
includeInlayFunctionParameterTypeHints = true,
includeInlayVariableTypeHints = true,
includeInlayVariableTypeHintsWhenTypeMatchesName = true,
includeInlayPropertyDeclarationTypeHints = true,
includeInlayFunctionLikeReturnTypeHints = true,
includeInlayEnumMemberValueHints = true,
},
},
},
})
end,
}

View File

@ -1,50 +0,0 @@
return {
"nvim-neorg/neorg",
lazy = false,
version = "*",
config = function()
require("neorg").setup({
load = {
["core.defaults"] = {},
["core.concealer"] = {},
["core.dirman"] = {
config = {
workspaces = {
notes = "~/notes",
uni = "~/Uni",
job = "~/job",
side = "~/side-hustle",
},
default_workspace = "notes",
},
},
},
})
vim.wo.foldlevel = 99
vim.wo.conceallevel = 2
end,
keys = {
{
"<leader>n",
":Neorg<CR>",
desc = "[N]eorg",
},
{
"<leader>nw",
":Neorg workspace<CR>",
desc = "[N]eorg [W]orkspaces",
},
{
"<leader>nj",
":Neorg journal<CR>",
desc = "[N]eorg [J]ournal",
},
{
"<leader>ni",
":Neorg index<CR>",
desc = "[N]eorg [I]ndex",
},
},
}

View File

@ -1,15 +0,0 @@
-- ╭─────────────────────────────────────────────────────────╮
-- │ pastify │
-- │ enables pasting image from clipboard │
-- ╰─────────────────────────────────────────────────────────╯
return {
"TobinPalmer/pastify.nvim",
cmd = { "Pastify", "PastifyAfter" },
config = function()
require("pastify").setup({
-- opts = {
-- apikey = "YOUR API KEY (https://api.imgbb.com/)", -- Needed if you want to save online.
-- },
})
end,
}

View File

@ -1,13 +0,0 @@
return {
"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",
config = function()
-- load snippets from path/of/your/nvim/config/my-cool-snippets
require("luasnip.loaders.from_vscode").lazy_load({
paths = { "~/.config/Code/User/snippets/typescript.code-snippets" },
})
end,
}

View File

@ -1,37 +0,0 @@
return { -- Collection of various small independent plugins/modules
"echasnovski/mini.nvim",
config = function()
-- Better Around/Inside textobjects
--
-- Examples:
-- - va) - [V]isually select [A]round [)]paren
-- - yinq - [Y]ank [I]nside [N]ext [Q]uote
-- - ci' - [C]hange [I]nside [']quote
require("mini.ai").setup({ n_lines = 500 })
-- Add/delete/replace surroundings (brackets, quotes, etc.)
--
-- - saiw) - [S]urround [A]dd [I]nner [W]ord [)]Paren
-- - sd' - [S]urround [D]elete [']quotes
-- - sr)' - [S]urround [R]eplace [)] [']
require("mini.surround").setup()
-- Simple and easy statusline.
-- You could remove this setup call if you don't like it,
-- and try some other statusline plugin
local statusline = require("mini.statusline")
-- set use_icons to true if you have a Nerd Font
statusline.setup({ use_icons = vim.g.have_nerd_font })
-- You can configure sections in the statusline by overriding their
-- default behavior. For example, here we set the section for
-- cursor location to LINE:COLUMN
---@diagnostic disable-next-line: duplicate-set-field
statusline.section_location = function()
return "%2l:%-2v"
end
-- ... and there is more!
-- Check out: https://github.com/echasnovski/mini.nvim
end,
}

View File

@ -1,16 +0,0 @@
return {
"nvim-tree/nvim-tree.lua",
version = "*",
lazy = false,
dependencies = {
"nvim-tree/nvim-web-devicons",
},
config = function()
require("nvim-tree").setup({})
local api = require("nvim-tree.api")
vim.keymap.set("n", "<leader>e", api.tree.toggle, { desc = "[E]xplorer" })
vim.keymap.set("n", "<leader>E", function()
api.tree.find_file({ open = true, focus = true })
end, { desc = "Focus file in [E]xplorer" })
end,
}

View File

@ -0,0 +1,6 @@
# comment
# snippet <trigger> <description>
# <snippet-body>
snippet if C-style if
if ($1)
$0

View File

@ -0,0 +1,6 @@
# comment
# snippet <trigger> <description>
# <snippet-body>
snippet if C-style if
if ($1)
$0

View File

@ -0,0 +1,14 @@
{
"name": "example-snippets",
"contributes": {
"snippets": [
{
"language": [
"typescript",
"typescriptreact"
],
"path": "./ts.jsonc"
}
]
}
}

View File

@ -0,0 +1,486 @@
{
// Place your global snippets here. Each snippet is defined under a snippet name and has a scope, prefix, body and
// description. Add comma separated ids of the languages where the snippet is applicable in the scope field. If scope
// is left empty or omitted, the snippet gets applied to all languages. The prefix is what is
// used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders.
// Placeholders with the same ids are connected.
// Example:
// "Print to console": {
// "scope": "javascript,typescript",
// "prefix": "log",
// "body": [
// "console.log('$1');",
// "$2"
// ],
// "description": "Log output to console"
// }
"private readonly ...": {
"scope": "typescript",
"prefix": "prr",
"body": [
"private readonly _${1:name}: ${2:Type}"
]
},
"props": {
"scope": "typescriptreact",
"prefix": "props",
"body": [
"{ className }: { className?: string }"
]
},
"prop": {
"scope": "typescript",
"prefix": "prop",
"body": [
"private _${1:name}: ${3:Type}",
"get${2:Name}(): ${3:Type} {",
" return this._${1:name}",
"}",
"set${2:Name}(${1:name}: ${3:Type}) {",
" this._${1:name} = ${1:name}",
"}"
]
},
"roprop": {
"scope": "typescript",
"prefix": "ro",
"body": [
"private readonly _${1:name}: ${3:Type};",
"get${2:Name}(): ${3:Type} {",
" return this._${1:name}",
"}"
]
},
"vs": {
"scope": "typescript",
"prefix": "vs",
"body": [
"vi.spyOn(${1:class}, \"${2:method}\")${3:.mock$4};"
]
},
"faker lorem word": {
"scope": "typescript",
"prefix": "flw",
"body": [
"faker.lorem.word();"
]
},
"react prop": {
"scope": "typescript",
"prefix": "comp",
"body": [
"import React from \"react\";",
"",
"export default function ${1:name}({className}: {className?: string}) {",
" return (",
" <${2:div} className={`${className}`}>",
" $0",
" </${2:div}>",
" )",
"}"
]
},
//
// Jest (vitest) snippets down below
//
"afterAll": {
"body": "afterAll(() => {\n\t$0\n});",
"description": "afterAll function is called once after all specs",
"prefix": "aa",
"scope": "typescript"
},
"afterEach": {
"body": "afterEach(() => {\n\t$0\n});",
"description": "afterEach function is called once after each spec",
"prefix": "ae",
"scope": "typescript"
},
"beforeAll": {
"body": "beforeAll(() => {\n\t$0\n});",
"description": "beforeAll function is called once before all specs",
"prefix": "ba",
"scope": "typescript"
},
"beforeAll:async": {
"body": "beforeAll(async () => {\n\t$0\n});",
"description": "beforeAll with async function is called once before all specs",
"prefix": "baa",
"scope": "typescript"
},
"beforeEach": {
"body": "beforeEach(() => {\n\t$0\n});",
"description": "beforeEach function is called once before each spec",
"prefix": "be",
"scope": "typescript"
},
"beforeEach:async": {
"body": "beforeEach(async () => {\n\t$0\n});",
"description": "beforeEach with async callback function is called once before each spec",
"prefix": "bea",
"scope": "typescript"
},
"describe": {
"body": "describe('${1:Name of the group}', () => {\n\t$0\n});",
"description": "creates a describe block",
"prefix": "desc",
"scope": "typescript"
},
"describe.each": {
"body": [
"describe.each([${1:[1, 2], [2, 4]}])(",
"\t'${2:double(%d)}',",
"\t(${3:input, expected}) => {",
"\t\ttest(`returns \\${expected}`, () => {",
"\t\t\t${4:expect(double(input)).toBe(expected);}",
"\t\t});",
"\t}",
");"
],
"description": "creates a describe block with different test data sets",
"prefix": "desce",
"scope": "typescript"
},
"describe.only": {
"body": "describe.only('${1:Name of the group}', () => {\n\t$0\n});",
"description": "creates a describe block that runs only",
"prefix": "desco",
"scope": "typescript"
},
"describe.skip": {
"body": "describe.skip('${1:Name of the group}', () => {\n\t$0\n});",
"description": "creates a describe block that will be skipped",
"prefix": "descs",
"scope": "typescript"
},
"expect": {
"body": "expect($0)",
"description": "expect actual value",
"prefix": "exp",
"scope": "typescript"
},
"expect.assertions": {
"body": "expect.assertions($0);",
"description": "expects the test to make the indicated number of assertions (useful for async)",
"prefix": "expas",
"scope": "typescript"
},
"expect.hasAssertions": {
"body": "expect.hasAssertions();$0",
"description": "expects the test to make at least one assertion (useful for async)",
"prefix": "expha",
"scope": "typescript"
},
"expect.rejects": {
"body": "expect($1).rejects$0",
"description": "expect promise rejects to",
"prefix": "exprj",
"scope": "typescript"
},
"expect.resolves": {
"body": "expect($1).resolves$0",
"description": "expect promise resolves to",
"prefix": "expr",
"scope": "typescript"
},
"it": {
"body": "it('${1:should }', () => {\n\t$0\n});",
"description": "creates an it block",
"prefix": "it",
"scope": "typescript"
},
"it.each": {
"body": [
"it.each([${1:[1, 2], [2, 4]}])(",
"\t'${2:double(%d)}',",
"\t(${3:input, expected}) => {",
"\t\t${0:expect(double(input)).toBe(expected);}",
"\t}",
");"
],
"description": "creates an it block with different test data sets",
"prefix": "ite",
"scope": "typescript"
},
"it.only": {
"body": "it.only('${1:should }', () => {\n\t$0\n});",
"description": "creates an it block that runs only",
"prefix": "ito",
"scope": "typescript"
},
"it.skip": {
"body": "it.skip('${1:should }', () => {\n\t$0\n});",
"description": "creates an it block that will be skipped",
"prefix": "its",
"scope": "typescript"
},
"it.todo": {
"body": "it.todo('${1:should }');",
"description": "creates a test placeholder",
"prefix": "itt",
"scope": "typescript"
},
"it:async": {
"body": "it('${1:should }', async () => {\n\t$0\n});",
"description": "creates an it block with async callback function",
"prefix": "ita",
"scope": "typescript"
},
"jest.fn": {
"body": "jest.fn($0)",
"description": "creates jest.fn()",
"prefix": "jfn",
"scope": "typescript"
},
"template:cut": {
"body": [
"describe('${1:Name of the group}', () => {\n",
"\tlet ${2:cut};\n",
"\tbeforeEach(() => {\n\t\t$2 = $3;\n\t});\n",
"\ttest('${1:should }', () => {",
"\t\texpect($2).toBe($0);",
"\t});\n",
"});"
],
"description": "creates a template to test a class under test",
"prefix": "cut",
"scope": "typescript"
},
"test": {
"body": "test('${1:should }', () => {\n\t$0\n});",
"description": "creates a test block",
"prefix": "test",
"scope": "typescript"
},
"test.each": {
"body": [
"test.each([${1:[1, 2], [2, 4]}])(",
"\t'${2:double(%d)}',",
"\t(${3:input, expected}) => {",
"\t\t${0:expect(double(input)).toBe(expected);}",
"\t}",
");"
],
"description": "creates an test block with different test data sets",
"prefix": "teste",
"scope": "typescript"
},
"test.each (table)": {
"body": [
"test.each`",
"\t${1:input}\t| ${2:expected}",
"\t\\${1}\t| \\${2}",
"\t\\${2}\t| \\${4}",
"`('${3:double($${1:input})}', ({ ${1:input}, ${2:expected} }) => {",
"\t${0:expect(double(${1:input})).toBe(${2:expected});}",
"});"
],
"description": "creates a test block using a permutation table",
"prefix": "testet",
"scope": "typescript"
},
"test.only": {
"body": "test.only('${1:should }', () => {\n\t$0\n});",
"description": "creates a test block that runs only",
"prefix": "testo",
"scope": "typescript"
},
"test.skip": {
"body": "test.skip('${1:should }', () => {\n\t$0\n});",
"description": "creates a test block that will be skipped",
"prefix": "tests",
"scope": "typescript"
},
"test.todo": {
"body": "test.todo('${1:should }');",
"description": "creates a test placeholder",
"prefix": "testt",
"scope": "typescript"
},
"test:async": {
"body": "test('${1:should }', async () => {\n\t$0\n});",
"description": "creates an test block with async callback function",
"prefix": "testa",
"scope": "typescript"
},
"toBe": {
"body": "expect($1).toBe($2);$0",
"description": "expects the first argument to be equal with the second one",
"prefix": "tb",
"scope": "typescript"
},
"toBeCloseTo": {
"body": "expect($1).toBeCloseTo(${2:number}, ${3:delta});$0",
"description": "expects the first argument to be close to the second one base on the delta",
"prefix": "tbct",
"scope": "typescript"
},
"toBeDefined": {
"body": "expect($1).toBeDefined();$0",
"description": "expects the argument is defined",
"prefix": "tbd",
"scope": "typescript"
},
"toBeFalsy": {
"body": "expect($1).toBeFalsy();$0",
"description": "expects the argument is falsy",
"prefix": "tbf",
"scope": "typescript"
},
"toBeGreaterThan": {
"body": "expect($1).toBeGreaterThan($2);$0",
"description": "expects the argument is greater than or equal",
"prefix": "tbgt",
"scope": "typescript"
},
"toBeGreaterThanOrEqual": {
"body": "expect($1).toBeGreaterThanOrEqual($2);$0",
"description": "expects the argument is greater than",
"prefix": "tbgte",
"scope": "typescript"
},
"toBeInstanceOf": {
"body": "expect($1).toBeInstanceOf($2);$0",
"description": "expects the argument is less than",
"prefix": "tbi",
"scope": "typescript"
},
"toBeLessThan": {
"body": "expect($1).toBeLessThan($2);$0",
"description": "expects the argument is less than",
"prefix": "tblt",
"scope": "typescript"
},
"toBeLessThanOrEqual": {
"body": "expect($1).toBeLessThanOrEqual($2);$0",
"description": "expects the argument is less than or equal",
"prefix": "tblte",
"scope": "typescript"
},
"toBeNull": {
"body": "expect($1).toBeNull();$0",
"description": "expects the argument is null",
"prefix": "tbn",
"scope": "typescript"
},
"toBeTruthy": {
"body": "expect($1).toBeTruthy();$0",
"description": "expects the argument is truthy",
"prefix": "tbt",
"scope": "typescript"
},
"toBeUndefined": {
"body": "expect($1).toBeUndefined();$0",
"description": "expects the argument is undefined",
"prefix": "tbu",
"scope": "typescript"
},
"toContain": {
"body": "expect(${1:list}).toContain($2);$0",
"description": "expects the list contains the item (===)",
"prefix": "tc",
"scope": "typescript"
},
"toContainEqual": {
"body": "expect(${1:list}).toContainEqual($2);$0",
"description": "expects the list contains the item (equals)",
"prefix": "tce",
"scope": "typescript"
},
"toEqual": {
"body": "expect($1).toEqual($2);$0",
"description": "expects the first argument to be equal with the second one",
"prefix": "te",
"scope": "typescript"
},
"toHaveBeenCalled": {
"body": "expect($1).toHaveBeenCalled();$0",
"description": "returns true if the spy was called",
"prefix": "thbc",
"scope": "typescript"
},
"toHaveBeenCalledTimes": {
"body": "expect($1).toHaveBeenCalledTimes($2);$0",
"description": "returns true if the spy has been called given times",
"prefix": "thbct",
"scope": "typescript"
},
"toHaveBeenCalledWith": {
"body": "expect($1).toHaveBeenCalledWith($2);$0",
"description": "returns true if the spy has been called with",
"prefix": "thbcw",
"scope": "typescript"
},
"toHaveBeenLastCalledWith": {
"body": "expect($1).toHaveBeenLastCalledWith($2);$0",
"description": "returns true if the spy has been last called with",
"prefix": "thblcw",
"scope": "typescript"
},
"toHaveLength": {
"body": "expect($1).toHaveLength($2);$0",
"description": "expects the object to have length",
"prefix": "thl",
"scope": "typescript"
},
"toHaveProperty": {
"body": "expect($1).toHaveProperty(${2:keyPath}, ${3:value});$0",
"description": "returns true if the argument matches the second object",
"prefix": "thp",
"scope": "typescript"
},
"toMatch": {
"body": "expect($1).toMatch($2);$0",
"description": "returns true if the argument matches the second value",
"prefix": "tm",
"scope": "typescript"
},
"toMatchInlineSnapshot": {
"body": "expect($1).toMatchInlineSnapshot($2);$0",
"description": "returns true if the argument matches the most recent inline snapshot",
"prefix": "tmis",
"scope": "typescript"
},
"toMatchObject": {
"body": "expect($1).toMatchObject($2);$0",
"description": "returns true if the argument matches the second object",
"prefix": "tmo",
"scope": "typescript"
},
"toMatchSnapshot": {
"body": "expect($1).toMatchSnapshot($2);$0",
"description": "returns true if the argument matches the most recent snapshot",
"prefix": "tms",
"scope": "typescript"
},
"toStrictEqual": {
"body": "expect($1).toStrictEqual($2);$0",
"description": "expects the first argument to be strictly equal with the second one",
"prefix": "tse",
"scope": "typescript"
},
"toThrow": {
"body": "expect(() => {\n\t$0\n}).toThrow($1);",
"description": "expects that the method will throw an error",
"prefix": "tt",
"scope": "typescript"
},
"toThrowError": {
"body": "expect(() => {\n\t$0\n}).toThrowError($1);",
"description": "expects that the method will throw an error",
"prefix": "tte",
"scope": "typescript"
},
"toThrowErrorMatchingInlineSnapshot": {
"body": "expect(() => {\n\t$0\n}).toThrowErrorMatchingInlineSnapshot();",
"description": "expects that the method will throw an error matching the inline snapshot",
"prefix": "ttemis",
"scope": "typescript"
},
"toThrowErrorMatchingSnapshot": {
"body": "expect(() => {\n\t$0\n}).toThrowErrorMatchingSnapshot();",
"description": "expects that the method will throw an error mathing the snapshpot",
"prefix": "ttems",
"scope": "typescript"
}
}

68
.config/scripts/sunset.sh Executable file
View File

@ -0,0 +1,68 @@
#!/usr/bin/env sh
config="$HOME/.config/wlsunset/config"
#Startup function
start() {
[ -f "$config" ] && . "$config"
temp_low=${temp_low:-"4000"}
temp_high=${temp_high:-"6500"}
duration=${duration:-"900"}
sunrise=${sunrise:-"07:00"}
sunset=${sunset:-"19:00"}
location=${location:-"on"}
fallback_longitude=${fallback_longitude:-"8.7"}
fallback_latitude=${fallback_latitude:-"50.1"}
if [ "${location}" = "on" ]; then
if [ -z ${longitude+x} ] || [ -z ${latitude+x} ]; then
GEO_CONTENT=$(curl -sL https://manjaro-sway.download/geoip)
fi
longitude=${longitude:-$(echo "$GEO_CONTENT" | jq -r '.longitude // empty')}
longitude=${longitude:-$fallback_longitude}
latitude=${latitude:-$(echo "$GEO_CONTENT" | jq -r '.latitude // empty')}
latitude=${latitude:-$fallback_latitude}
echo longitude: "$longitude" latitude: "$latitude"
wlsunset -l "$latitude" -L "$longitude" -t "$temp_low" -T "$temp_high" -d "$duration" &
else
wlsunset -t "$temp_low" -T "$temp_high" -d "$duration" -S "$sunrise" -s "$sunset" &
fi
}
#Accepts managing parameter
case $1'' in
'off')
pkill -x wlsunset
waybar-signal sunset
;;
'on')
start
waybar-signal sunset
;;
'toggle')
if pkill -x -0 wlsunset; then
pkill -x wlsunset
else
start
fi
waybar-signal sunset
;;
'check')
command -v wlsunset
exit $?
;;
esac
#Returns a string for Waybar
if pkill -x -0 wlsunset; then
class="on"
text="location-based gamma correction"
else
class="off"
text="no gamma correction"
fi
printf '{"alt":"%s","tooltip":"%s"}\n' "$class" "$text"

View File

@ -5,10 +5,10 @@
"spacing": 4, // Gaps between modules (4px)
// Choose the order of the modules
"modules-left": [
"custom/appmenuicon",
"wlr/taskbar",
"custom/pomodoro",
"custom/sunset"
//"custom/appmenuicon",
"wlr/taskbar"
//"custom/pomodoro",
//"custom/sunset"
],
"modules-center": [
"hyprland/workspaces",
@ -22,5 +22,7 @@
"clock",
"battery"
],
"include": ["~/.config/waybar/modules.json"],
"include": [
"~/.config/waybar/modules.json"
],
}

View File

@ -1,7 +1,7 @@
title=$(playerctl metadata --format '{{markup_escape(artist)}} - {{markup_escape(title)}}')
position=$(playerctl metadata --format '{{position}}')
length=$(playerctl metadata --format '{{mpris:length}}')
artUrl=$(playerctl metadata --format "{{mpris:artUrl}}")
title=$(playerctl --player=$(cat ~/.config/chosen_player) metadata --format '{{markup_escape(artist)}} - {{markup_escape(title)}}')
position=$(playerctl --player=$(cat ~/.config/chosen_player) metadata --format '{{position}}')
length=$(playerctl --player=$(cat ~/.config/chosen_player) metadata --format '{{mpris:length}}')
artUrl=$(playerctl --player=$(cat ~/.config/chosen_player) metadata --format "{{mpris:artUrl}}")
if [[ -n "$artUrl" ]]; then
cover=$(echo "$artUrl" | sed "s/file:\/\///g")

View File

@ -19,11 +19,24 @@
"*": 5
}
},
//
// pomodoro
//
//
// pomodoro
//
"custom/pomodoro": {
"format-icons": ["🕛", "🕐", "🕑", "🕒", "🕓", "🕔", "🕕", "🕖", "🕗", "🕘", "🕙", "🕚"],
"format-icons": [
"🕛",
"🕐",
"🕑",
"🕒",
"🕓",
"🕔",
"🕕",
"🕖",
"🕗",
"🕘",
"🕙",
"🕚"
],
"return-type": "json",
"tooltip": true,
"format": "{icon} {}",
@ -33,9 +46,9 @@
"exec": "~/.config/waybar/custom/pomodoro.sh",
"interval": 1
},
//
// player
//
//
// player
//
"group/playerctl": {
"orientation": "inherit",
"children-class": "playerctl",
@ -46,29 +59,26 @@
"custom/playerctl-title"
]
},
"custom/playerctl-title": {
"interval": 2,
"format": "{}",
"hide-empty-text": true,
"return-type": "json",
"exec": "~/.config/waybar/custom/playerctl.sh",
"on-click": "playerctl play-pause",
"on-scroll-up": "playerctl position 1+",
"on-scroll-down": "playerctl position 1-",
"on-click": "playerctl --player=$(cat ~/.config/chosen_player) play-pause",
"on-scroll-up": "playerctl --player=$(cat ~/.config/chosen_player) position 1+",
"on-scroll-down": "playerctl --player=$(cat ~/.config/chosen_player) position 1-",
},
"custom/playerctl-prev": {
"interval": 1,
"format": "",
"tooltip-format": "previous track",
"return-type": "json",
"exec": "playerctl metadata --format '{\"alt\": \"{{status}}\", \"class\": \"{{status}}\"}}'",
"on-click": "playerctl previous",
"on-scroll-up": "playerctl position 1+",
"on-scroll-down": "playerctl position 1-",
"exec": "playerctl --player=$(cat ~/.config/chosen_player) metadata --format '{\"alt\": \"{{status}}\", \"class\": \"{{status}}\"}}'",
"on-click": "playerctl --player=$(cat ~/.config/chosen_player) previous",
"on-scroll-up": "playerctl --player=$(cat ~/.config/chosen_player) position 1+",
"on-scroll-down": "playerctl --player=$(cat ~/.config/chosen_player) position 1-",
},
"custom/playerctl-pause-play": {
"interval": 1,
"format": "{icon}",
@ -78,23 +88,21 @@
"Paused": ""
},
"return-type": "json",
"exec": "playerctl metadata --format '{\"alt\": \"{{status}}\", \"class\": \"{{status}}\"}}'",
"on-click": "playerctl play-pause",
"on-scroll-up": "playerctl position 1+",
"on-scroll-down": "playerctl position 1-",
"exec": "playerctl --player=$(cat ~/.config/chosen_player) metadata --format '{\"alt\": \"{{status}}\", \"class\": \"{{status}}\"}}'",
"on-click": "playerctl --player=$(cat ~/.config/chosen_player) play-pause",
"on-scroll-up": "playerctl --player=$(cat ~/.config/chosen_player) position 1+",
"on-scroll-down": "playerctl --player=$(cat ~/.config/chosen_player) position 1-",
},
"custom/playerctl-next": {
"interval": 1,
"format": "",
"tooltip-format": "next track",
"return-type": "json",
"exec": "playerctl metadata --format '{\"alt\": \"{{status}}\", \"class\": \"{{status}}\"}}'",
"on-click": "playerctl next",
"on-scroll-up": "playerctl position 1+",
"on-scroll-down": "playerctl position 1-",
"exec": "playerctl --player=$(cat ~/.config/chosen_player) metadata --format '{\"alt\": \"{{status}}\", \"class\": \"{{status}}\"}}'",
"on-click": "playerctl --player=$(cat ~/.config/chosen_player) next",
"on-scroll-up": "playerctl --player=$(cat ~/.config/chosen_player) position 1+",
"on-scroll-down": "playerctl --player=$(cat ~/.config/chosen_player) position 1-",
},
//
// sunset (night light)
//
@ -112,7 +120,6 @@
"exec-if": "/dotfiles/.config/scripts/sunset.sh check",
"signal": 6
},
// Taskbar
"wlr/taskbar": {
"format": "{icon}",
@ -120,7 +127,10 @@
"tooltip-format": "{title}",
"on-click": "activate",
"on-click-middle": "close",
"ignore-list": ["Alacritty", "kitty"],
"ignore-list": [
"Alacritty",
"kitty"
],
"app_ids-mapping": {
"firefoxdeveloperedition": "firefox-developer-edition"
},
@ -146,7 +156,6 @@
"on-click-right": "hyprctl switchxkblayout at-translated-set-2-keyboard prev",
"interval": 1
},
// Wofi Application Launcher
"custom/appmenuicon": {
"format": "",
@ -154,38 +163,32 @@
"on-click-right": "~/dotfiles/hypr/scripts/keybindings.sh",
"tooltip-format": "Left: Open the application launcher\nRight: Show all keybindings"
},
// Power Menu
"custom/exit": {
"format": "",
"on-click": "wlogout",
"tooltip-format": "Power Menu"
},
// System tray
"tray": {
"icon-size": 21,
"spacing": 10
},
// Clock
"clock": {
"format": "{:%H:%M:%S\r<small>%d.%m.%Y</small>}",
"interval": 1,
},
// CPU
"cpu": {
"format": "/ C {usage}% ",
"on-click": "~/dotfiles/.settings/systeminfo.sh"
},
// Memory
"memory": {
"format": "/ M {}% ",
"on-click": "~/dotfiles/.settings/systeminfo.sh"
},
// Harddisc space used
"disk": {
"interval": 30,
@ -193,7 +196,6 @@
"path": "/",
"on-click": "~/dotfiles/.settings/systeminfo.sh"
},
// Group Hardware
"group/hardware": {
"orientation": "inherit",
@ -202,9 +204,14 @@
"children-class": "not-memory",
"transition-left-to-right": false
},
"modules": ["custom/system", "disk", "cpu", "memory", "hyprland/language"]
"modules": [
"custom/system",
"disk",
"cpu",
"memory",
"hyprland/language"
]
},
// Group Tools
"group/tools": {
"orientation": "inherit",
@ -220,7 +227,6 @@
"custom/hyprshade"
]
},
// Battery
"battery": {
"states": {
@ -234,9 +240,14 @@
"format-alt": "{icon} {time}",
// "format-good": "", // An empty format will hide the module
// "format-full": "",
"format-icons": [" ", " ", " ", " ", " "]
"format-icons": [
" ",
" ",
" ",
" ",
" "
]
},
// Pulseaudio
"pulseaudio": {
// "scroll-step": 1, // %, can be a float
@ -253,11 +264,14 @@
"phone": " ",
"portable": " ",
"car": " ",
"default": ["", "", ""]
"default": [
"",
"",
""
]
},
"on-click": "pavucontrol"
},
// Bluetooth
"bluetooth": {
"format": " {status}",

8
.config/yazi/bookmark Normal file
View File

@ -0,0 +1,8 @@
Uni /home/goodhumored/Uni/ u
trash /run/user/1000/kio-fuse-LJbUkF/trash/ t
side-hustle /home/goodhumored/side-hustle/ s
Notes /home/goodhumored/notes/ n
Job /home/goodhumored/Job/ j
halloween /home/goodhumored/side-hustle/memecoins/halloween/ h
Downloads /home/goodhumored/Downloads/ d
dipal /home/goodhumored/Job/dipal/ D

59
.config/yazi/init.lua Normal file
View File

@ -0,0 +1,59 @@
-- You can configure your bookmarks by lua language
local bookmarks = {}
function path(...)
local args = { ... }
local path_sep = package.config:sub(1, 1)
-- Trim leading slashes from the first element
args[1] = args[1]:gsub("^/*", "")
-- Trim trailing slashes from the last element
args[#args] = args[#args]:gsub("/*$", "")
-- Join the arguments with the path separator
return path_sep .. table.concat(args, path_sep)
end
local home_path = os.getenv("HOME")
table.insert(bookmarks, {
tag = "Downloads",
path = path(home_path, "Downloads", ""),
key = "d",
})
table.insert(bookmarks, {
tag = "Notes",
path = path(home_path, "notes", ""),
key = "n",
})
table.insert(bookmarks, {
tag = "Job",
path = path(home_path, "Job", ""),
key = "j",
})
table.insert(bookmarks, {
tag = "Uni",
path = path(home_path, "Uni", ""),
key = "u",
})
table.insert(bookmarks, {
tag = "side-hustle",
path = path(home_path, "side-hustle", ""),
key = "s",
})
table.insert(bookmarks, {
tag = "trash",
path = "/run/user/1000/kio-fuse-LJbUkF/trash/",
key = "t",
})
require("yamb"):setup({
-- Optional, the path ending with path seperator represents folder.
bookmarks = bookmarks,
-- Optional, recieve notification everytime you jump.
jump_notify = true,
-- Optional, the cli of fzf.
cli = "fzf",
-- Optional, a string used for randomly generating keys, where the preceding characters have higher priority.
keys = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",
-- Optional, the path of bookmarks
path = (ya.target_family() == "windows" and os.getenv("APPDATA") .. "\\yazi\\config\\bookmark")
or (os.getenv("HOME") .. "/.config/yazi/bookmark"),
})

67
.config/yazi/keymap.toml Normal file
View File

@ -0,0 +1,67 @@
[[manager.prepend_keymap]]
on = [ "<Enter>" ]
run = "enter"
desc = "Enter the child directory"
[[manager.prepend_keymap]]
on = ["<C-o>"]
run = "back"
desc = "Jump back"
[[manager.prepend_keymap]]
on = [ "g", "c" ]
run = "cd ~/dotfiles/"
desc = "Go to the config directory"
# ───────────────────────────── jump to char ─────────────────────────────
[[manager.prepend_keymap]]
on = "f"
run = "plugin jump-to-char"
desc = "Jump to char"
# ─────────────────────────────── Compress ───────────────────────────────
[[manager.prepend_keymap]]
on = ["C"]
run = "plugin ouch --args=zip"
desc = "Compress with ouch"
# ────────────────────────────── bookmarks ────────────────────────────
[[manager.prepend_keymap]]
on = [ "m" ]
run = "plugin yamb --args=save"
desc = "Add bookmark"
[[manager.prepend_keymap]]
on = [ "'" ]
run = "plugin yamb --args=jump_by_key"
desc = "Jump bookmark by key"
[[manager.prepend_keymap]]
on = [ "\"" ]
run = "plugin yamb --args=jump_by_fzf"
desc = "Jump bookmark by fzf"
[[manager.prepend_keymap]]
on = [ "b", "d" ]
run = "plugin yamb --args=delete_by_key"
desc = "Delete bookmark by key"
[[manager.prepend_keymap]]
on = [ "b", "f" ]
run = "plugin yamb --args=delete_by_fzf"
desc = "Delete bookmark by fzf"
[[manager.prepend_keymap]]
on = [ "b", "D" ]
run = "plugin yamb --args=delete_all"
desc = "Delete all bookmarks"
[[manager.prepend_keymap]]
on = [ "b", "r" ]
run = "plugin yamb --args=rename_by_key"
desc = "Rename bookmark by key"
[[manager.prepend_keymap]]
on = [ "b", "R" ]
run = "plugin yamb --args=rename_by_fzf"
desc = "Rename bookmark by fzf"

View File

@ -0,0 +1,5 @@
[plugin]
deps = [{ use = "h-hg/yamb", rev = "0598b8d" }, { use = "dedukun/bookmarks", rev = "600f87c" }, { use = "Reledia/miller", rev = "40e0265" }, { use = "yazi-rs/plugins:jump-to-char", rev = "35100e7" }, { use = "ndtoan96/ouch", rev = "251da69" }]
[flavor]
deps = []

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