mirror of
https://github.com/kristoferssolo/solorice.git
synced 2025-10-21 20:10:34 +00:00
Compare commits
2 Commits
1476a92522
...
c50febb922
| Author | SHA1 | Date | |
|---|---|---|---|
| c50febb922 | |||
| 724734567f |
@ -8,4 +8,4 @@ terminal = "alacritty"
|
||||
browser = "floorp"
|
||||
|
||||
[files]
|
||||
"config/niri/config-laptop.kdl" = "~/.config/niri/config.kdl"
|
||||
"config/niri/config-laptop.kdl" = {target = "~/.config/niri/config.kdl", type = "template"}
|
||||
|
||||
@ -80,6 +80,7 @@ depends = [ "torrent", "zathura", "email" ]
|
||||
"config/gitui/" = "~/.config/gitui/"
|
||||
"config/lazygit/" = "~/.config/lazygit/"
|
||||
"config/git/" = "~/.config/git/"
|
||||
"config/jj/" = "~/.config/jj/"
|
||||
"config/mpv/" = "~/.config/mpv/"
|
||||
"config/lf/" = "~/.config/lf/"
|
||||
"config/paru.conf" = "~/.config/paru/paru.conf"
|
||||
@ -139,7 +140,7 @@ depends = [ "misc", "local", "eww", "lock" ]
|
||||
|
||||
[lock.files]
|
||||
"config/gtklock/" = "~/.config/gtklock/"
|
||||
"config/swaylock" = "~/.config/swaylock/config"
|
||||
"config/swaylock.conf" = "~/.config/swaylock/config"
|
||||
|
||||
[picom.files]
|
||||
"config/picom.conf" = "~/.config/picom/picom.conf"
|
||||
|
||||
@ -4,25 +4,19 @@ assembler = "gas"
|
||||
instruction_set = "riscv"
|
||||
|
||||
[default_config.opts]
|
||||
compiler = "zig"
|
||||
compile_flags_txt = [
|
||||
"cc",
|
||||
"-x",
|
||||
"assembler-with-cpp",
|
||||
"-g",
|
||||
"-Wall",
|
||||
"-Wextra",
|
||||
"-pedantic",
|
||||
"-pedantic-errors",
|
||||
"-std=c2y",
|
||||
"-target",
|
||||
"aarch64-linux-musl",
|
||||
]
|
||||
diagnostics = true
|
||||
default_diagnostics = false
|
||||
|
||||
[project.opts]
|
||||
compiler = "zig"
|
||||
compile_flags_txt = [ ]
|
||||
# compiler = "zig"
|
||||
# compile_flags_txt = [
|
||||
# "cc",
|
||||
# "-x",
|
||||
# "assembler-with-cpp",
|
||||
# "-g",
|
||||
# "-Wall",
|
||||
# "-Wextra",
|
||||
# "-pedantic",
|
||||
# "-pedantic-errors",
|
||||
# "-std=c2y",
|
||||
# "-target",
|
||||
# "aarch64-linux-musl",
|
||||
# ]
|
||||
diagnostics = true
|
||||
default_diagnostics = false
|
||||
|
||||
@ -270,10 +270,10 @@ awful.screen.connect_for_each_screen(function(s)
|
||||
margin_top = 1,
|
||||
theme = "teal",
|
||||
}),
|
||||
github_activity_widget({
|
||||
--[[ github_activity_widget({
|
||||
username = "kristoferssolo",
|
||||
number_of_events = 10,
|
||||
}),
|
||||
}), ]]
|
||||
wibox.widget.systray(),
|
||||
cpu_widget({
|
||||
width = 50,
|
||||
@ -284,7 +284,7 @@ awful.screen.connect_for_each_screen(function(s)
|
||||
process_info_max_length = -1,
|
||||
timeout = 1,
|
||||
}),
|
||||
net_speed_widget(),
|
||||
-- net_speed_widget(),
|
||||
-- docker_widget(),
|
||||
spotify_widget({
|
||||
play_icon = "/usr/share/icons/Papirus-Light/24x24/categories/spotify.svg",
|
||||
@ -612,7 +612,6 @@ awful.rules.rules = {
|
||||
placement = awful.placement.no_overlap + awful.placement.no_offscreen,
|
||||
},
|
||||
},
|
||||
|
||||
-- Floating clients.
|
||||
{
|
||||
rule_any = {
|
||||
@ -669,7 +668,17 @@ awful.rules.rules = {
|
||||
properties = { screen = 2, tag = "5" },
|
||||
},
|
||||
{
|
||||
rule_any = { class = { "discord", "TelegramDesktop", "ripcord", "KotatogramDesktop", "vesktop" } },
|
||||
rule_any = {
|
||||
class = {
|
||||
"discord",
|
||||
"ripcord",
|
||||
"vesktop",
|
||||
"TelegramDesktop",
|
||||
"KotatogramDesktop",
|
||||
"AyuGram",
|
||||
"AyuGramDesktop",
|
||||
},
|
||||
},
|
||||
properties = { screen = 2, tag = "8" },
|
||||
},
|
||||
{
|
||||
@ -679,6 +688,22 @@ awful.rules.rules = {
|
||||
{ rule_any = { class = { "kdeconnect.app" } }, properties = { screen = 2, tag = "7" } },
|
||||
{ rule_any = { class = { "Spotify" } }, properties = { screen = 2, tag = "9" } },
|
||||
{ rule_any = { class = { "mpv" } }, properties = { fullscreen = true } },
|
||||
|
||||
{
|
||||
rule = {
|
||||
class = "exiled-exchange-2",
|
||||
},
|
||||
properties = {
|
||||
-- fullscreen = true,
|
||||
floating = true, -- Float above PoE2
|
||||
ontop = true, -- Stay on top
|
||||
sticky = false, -- ← KEY: Pin to PoE2 workspace only (stops flicker)
|
||||
skip_taskbar = true, -- Hide from taskbar
|
||||
skip_pager = true, -- Hide from workspace switcher
|
||||
placement = awful.placement.top_right, -- Top-right overlay
|
||||
raise = false, -- Don't auto-raise (helps with flicker)
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
--- Signals
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#? Config file for btop v. 1.4.4
|
||||
#? Config file for btop v. 1.4.5
|
||||
|
||||
#* Name of a btop++/bpytop/bashtop formatted ".theme" file, "Default" and "TTY" for builtin themes.
|
||||
#* Themes should be placed in "../share/btop/themes" relative to binary or "$HOME/.config/btop/themes"
|
||||
@ -57,7 +57,7 @@ update_ms = 1000
|
||||
|
||||
#* Processes sorting, "pid" "program" "arguments" "threads" "user" "memory" "cpu lazy" "cpu direct",
|
||||
#* "cpu lazy" sorts top process over time (easier to follow), "cpu direct" updates top process directly.
|
||||
proc_sorting = "cpu direct"
|
||||
proc_sorting = "memory"
|
||||
|
||||
#* Reverse sorting order, True or False.
|
||||
proc_reversed = False
|
||||
@ -115,6 +115,9 @@ cpu_bottom = False
|
||||
#* Shows the system uptime in the CPU box.
|
||||
show_uptime = True
|
||||
|
||||
#* Shows the CPU package current power consumption in watts. Requires running `make setcap` or `make setuid` or running with sudo.
|
||||
show_cpu_watts = True
|
||||
|
||||
#* Show cpu temperature.
|
||||
check_temp = True
|
||||
|
||||
@ -151,7 +154,7 @@ custom_cpu_name = ""
|
||||
|
||||
#* Optional filter for shown disks, should be full path of a mountpoint, separate multiple values with whitespace " ".
|
||||
#* Only disks matching the filter will be shown. Prepend exclude= to only show disks not matching the filter. Examples: disk_filter="/boot /home/user", disks_filter="exclude=/boot /home/user"
|
||||
disks_filter = "exclude=/boot /var/cache/pacman/pkg /var/log /home"
|
||||
disks_filter = "exclude=/boot /var/cache/pacman/pkg /var/log"
|
||||
|
||||
#* Show graphs instead of meters for memory values.
|
||||
mem_graphs = True
|
||||
|
||||
@ -10,9 +10,9 @@
|
||||
whitespace = error
|
||||
preloadindex = true
|
||||
|
||||
[url "git@github.com:kristoferssolo:"]
|
||||
[url "git@github.com:kristoferssolo/"]
|
||||
insteadOf = "solo:"
|
||||
[url "git@github.com"]
|
||||
[url "git@github.com:"]
|
||||
insteadOf = "gh:"
|
||||
|
||||
[status]
|
||||
@ -108,6 +108,3 @@
|
||||
|
||||
[include] # TODO: include only for my repos
|
||||
path = ~/.config/git/key
|
||||
[maintenance]
|
||||
repo = /home/kristofers/Nextcloud/repos/SoloVim
|
||||
repo = /home/kristofers/Nextcloud/repos/maze-ascension
|
||||
|
||||
@ -16,8 +16,8 @@
|
||||
|
||||
# See https://wiki.hyprland.org/Configuring/Monitors/
|
||||
monitor=eDP-1,prefered,0x0,1.5
|
||||
# monitor=DP-1,prefered,180x-1440,1
|
||||
# monitor=HDMI-A-1,prefered,480x-1080,1
|
||||
monitor=DP-1,prefered,0x-1440,1
|
||||
monitor=HDMI-A-1,prefered,0x-1440,1
|
||||
# monitor=HDMI-A-1,prefered,mirror,eDP-1
|
||||
# monitor=DP-1,prefered,mirror,eDP-1
|
||||
# monitor=DP-1,disabled
|
||||
@ -47,9 +47,10 @@ exec-once=pipewire & pipewire-pulse & wireplumber & eww daemon & eww open bar
|
||||
exec-once=dbus-update-activation-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP DISPLAY XAUTHORITY
|
||||
exec-once=nextcloud & /usr/lib/hyprpolkitagent & xrdb "$XDG_CONFIG_HOME/x11/xresources" & transmission-daemon & mako & hyprpaper
|
||||
exec-once=[workspace 1 silent] $browser
|
||||
exec-once=[workspace 8 silent] kotatogram-desktop & flatpak run dev.vencord.Vesktop
|
||||
exec-once=[workspace 8 silent] kotatogram-desktop & vesktop
|
||||
# exec-once=[workspace 9 silent] spotify-launcher
|
||||
exec-once = hyprpm reload -n
|
||||
exec-once=hyprpm reload
|
||||
exec-once=swap-wallpaper
|
||||
|
||||
# Source a file (multi-file configs)
|
||||
source=~/.config/hypr/rose-pine.conf
|
||||
@ -204,10 +205,8 @@ input {
|
||||
}
|
||||
}
|
||||
|
||||
# https://wiki.hyprland.org/Configuring/Variables/#gestures
|
||||
gestures {
|
||||
workspace_swipe = true
|
||||
}
|
||||
# See https://wiki.hypr.land/Configuring/Gestures
|
||||
gesture = 3, horizontal, workspace
|
||||
|
||||
# Example per-device config
|
||||
# See https://wiki.hyprland.org/Configuring/Keywords/#per-device-input-configs for more
|
||||
@ -230,8 +229,8 @@ plugin {
|
||||
bg_col = rgb(191724)
|
||||
workspace_method = center current # [center/first] [workspace] e.g. first 1 or center m+1
|
||||
|
||||
enable_gesture = true # laptop touchpad
|
||||
gesture_fingers = 4 # 3 or 4
|
||||
# enable_gesture = true # laptop touchpad
|
||||
# gesture_fingers = 4 # 3 or 4
|
||||
gesture_distance = 300 # how far is the "max"
|
||||
gesture_positive = false # positive = swipe down. Negative = swipe up.
|
||||
}
|
||||
@ -257,13 +256,14 @@ bind = $mainMod, N, exec, $fileManager
|
||||
bind = $mainMod CTRL, SPACE, togglefloating
|
||||
bind = $mainMod, P, exec, $menu
|
||||
bind = $mainMod, G, exec, rofi -modi games -show games -theme games-smaller
|
||||
bind = $mainMod, C, exec, rofi -show calc -modi calc -no-show-match -no-sort -calc-command "echo -n '{result}' | wl-copy"
|
||||
bind = $mainMod, C, exec, rofi -show calc -modi calc -no-show-match -no-sort -calc-command "echo -n '{result}' | wl-copy"
|
||||
bind = $mainMod, W, exec, networkmanager_dmenu
|
||||
bind = $mainMod SHIFT, P, exec, cliphist list | wofi -S dmenu | cliphist decode | wl-copy
|
||||
bind = $mainMod, F, fullscreen
|
||||
bind = $mainMod, M, bringactivetotop
|
||||
bind = $mainMod, A, pin
|
||||
bind = $mainMod, B, exec, $browser
|
||||
bind = $mainMod SHIFT, P, exec, swap-wallpaper
|
||||
# bind = $mainMod, O, split-changemonitor, +1
|
||||
# bind = $mainMod, P, pseudo, # dwindle
|
||||
# bind = $mainMod, J, togglesplit, # dwindle
|
||||
@ -349,6 +349,7 @@ bind = $mainMod SHIFT, K, movewindow, u
|
||||
bind = $mainMod SHIFT, L, movewindow, r
|
||||
bind = $mainMod SHIFT, H, movewindow, l
|
||||
|
||||
|
||||
# Laptop multimedia keys for volume and LCD brightness
|
||||
bindel = ,XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 2%+
|
||||
# bindel = , XF86AudioRaiseVolume, exec, pulsemixer --change-volume +2 # increase volume by 2
|
||||
@ -363,8 +364,8 @@ bindel = ,XF86MonBrightnessDown, exec, doas brightnessctl set 2%- # decrease br
|
||||
|
||||
# # Requires playerctl
|
||||
bindl = , XF86AudioNext, exec, playerctl next
|
||||
bindl = , XF86AudioPause, exec, playerctl play-pause
|
||||
bindl = , XF86AudioPlay, exec, playerctl play-pause
|
||||
# bindl = , XF86AudioPause, exec, playerctl play-pause
|
||||
# bindl = , XF86AudioPlay, exec, playerctl play-pause
|
||||
bindl = , XF86AudioPrev, exec, playerctl previous
|
||||
#
|
||||
bindel = , XF86AudioPlay, exec, playerctl -a play-pause # pause/play everything
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
ipc = off # save on baterry
|
||||
ipc = on # save on battery
|
||||
splash = true
|
||||
preload = ~/Pictures/wallpapers/anime/frieren/frieren-beyond-journeys-end-anime-4k-wallpaper.jpg
|
||||
# preload = ~/Pictures/wallpapers/Linux-Dynamic-Wallpapers/Fuji/Fuji-2.png
|
||||
|
||||
wallpaper = ,~/Pictures/wallpapers/anime/frieren/frieren-beyond-journeys-end-anime-4k-wallpaper.jpg
|
||||
# wallpaper = ,~/Pictures/wallpapers/Linux-Dynamic-Wallpapers/Fuji/Fuji-2.png
|
||||
|
||||
13
config/jj/config.toml
Normal file
13
config/jj/config.toml
Normal file
@ -0,0 +1,13 @@
|
||||
#:schema https://jj-vcs.github.io/jj/latest/config-schema.json
|
||||
[user]
|
||||
email = "dev@kristofers.xyz"
|
||||
name = "Kristofers Solo"
|
||||
|
||||
[ui]
|
||||
editor = "nvim"
|
||||
default-command = "log"
|
||||
|
||||
[signing]
|
||||
behavior = "own"
|
||||
backend = "gpg"
|
||||
# key = "$(cat ~/.config/jj/key)"
|
||||
@ -116,10 +116,6 @@ workspace "browser" {
|
||||
open-on-output "DP-1"
|
||||
}
|
||||
|
||||
workspace "eq" {
|
||||
open-on-output "DP-1"
|
||||
}
|
||||
|
||||
workspace "chat" {
|
||||
open-on-output "HDMI-A-1"
|
||||
}
|
||||
@ -372,13 +368,17 @@ window-rule {
|
||||
}
|
||||
|
||||
window-rule {
|
||||
match at-startup=true app-id=r#"floorp$"#
|
||||
open-maximized false
|
||||
match at-startup=true app-id="floorp"
|
||||
open-maximized true
|
||||
open-on-workspace "browser"
|
||||
}
|
||||
|
||||
window-rule {
|
||||
match at-startup=true app-id=r#"^org\.telegram\.desktop$"#
|
||||
match at-startup=true app-id=r#"^org\.gnome\.Fractal$"#
|
||||
match at-startup=true app-id=r#"discord"#
|
||||
match at-startup=true app-id=r#"vesktop"#
|
||||
|
||||
exclude app-id=r#"^org\.telegram\.desktop$"# title="^Media viewer$"
|
||||
open-on-workspace "chat"
|
||||
}
|
||||
@ -408,7 +408,8 @@ binds {
|
||||
// Suggested binds for running programs: terminal, app launcher, screen locker.
|
||||
Mod+Return hotkey-overlay-title="Open a Terminal: alacritty" { spawn "alacritty"; }
|
||||
Mod+P hotkey-overlay-title="Run an Application: fuzzel" { spawn "fuzzel"; }
|
||||
Super+Space hotkey-overlay-title="Lock the Screen: hyprlock" { spawn "hyprlock"; }
|
||||
Super+Space allow-when-locked=true hotkey-overlay-title="Lock the Screen: swaylock" { spawn "swaylock"; }
|
||||
// Super+Space hotkey-overlay-title="Lock the Screen: hyprlock" { spawn "hyprlock"; }
|
||||
|
||||
// You can also use a shell. Do this if you need pipes, multiple commands, etc.
|
||||
// Note: the entire command goes as a single argument in the end.
|
||||
@ -630,6 +631,9 @@ binds {
|
||||
// Powers off the monitors. To turn them back on, do any input like
|
||||
// moving the mouse or pressing any other key.
|
||||
Mod+Shift+P { power-off-monitors; }
|
||||
|
||||
Mod+Shift+P { spawn "swap-wallpaper"; }
|
||||
Mod+B { spawn "floorp"; }
|
||||
}
|
||||
|
||||
hotkey-overlay {
|
||||
|
||||
@ -4,7 +4,9 @@
|
||||
// https://github.com/YaLTeR/niri/wiki/Configuration:-Introduction
|
||||
|
||||
workspace "browser"
|
||||
workspace "terminal"
|
||||
workspace "chat"
|
||||
workspace "music"
|
||||
|
||||
environment {
|
||||
QT_QPA_PLATFORM "wayland"
|
||||
@ -126,7 +128,7 @@ output "eDP-1" {
|
||||
variable-refresh-rate on-demand=true
|
||||
focus-at-startup
|
||||
background-color "#000"
|
||||
backdrop-color "#000"
|
||||
backdrop-color "#191724"
|
||||
}
|
||||
|
||||
// Settings that influence how windows are positioned and sized.
|
||||
@ -284,20 +286,23 @@ layout {
|
||||
// See the binds section below for more spawn examples.
|
||||
|
||||
// This line starts waybar, a commonly used bar for Wayland compositors.
|
||||
spawn-at-startup "xwayland-satellite"
|
||||
spawn-at-startup "pipewire"
|
||||
spawn-at-startup "pipewire-pulse"
|
||||
spawn-at-startup "wireplumber"
|
||||
spawn-at-startup "eww" "daemon"
|
||||
spawn-at-startup "eww" "open bar"
|
||||
spawn-at-startup "waybar"
|
||||
// spawn-at-startup "eww" "daemon"
|
||||
// spawn-at-startup "eww" "open bar"
|
||||
spawn-at-startup "mako"
|
||||
// spawn-at-startup "dbus-update-activation-environment" "WAYLAND_DISPLAY" "XDG_CURRENT_DESKTOP" "DISPLAY" "XAUTHORITY"
|
||||
spawn-at-startup "nextcloud"
|
||||
// spawn-at-startup "/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1"
|
||||
spawn-at-startup "xrdb" "~/.config/x11/xresources"
|
||||
spawn-at-startup "transmission-daemon"
|
||||
spawn-at-startup "floorp"
|
||||
spawn-at-startup "{{browser}}"
|
||||
spawn-at-startup "kotatogram-desktop"
|
||||
spawn-at-startup "flatpak" "run" "dev.vencord.Vesktop"
|
||||
spawn-at-startup "vesktop"
|
||||
spawn-at-startup "swap-wallpaper"
|
||||
|
||||
// Uncomment this line to ask the clients to omit their client-side decorations if possible.
|
||||
// If the client will specifically ask for CSD, the request will be honored.
|
||||
@ -330,6 +335,10 @@ layer-rule {
|
||||
block-out-from "screencast"
|
||||
}
|
||||
|
||||
window-rule {
|
||||
draw-border-with-background false
|
||||
}
|
||||
|
||||
// Window rules let you adjust behavior for individual windows.
|
||||
// Find more information on the wiki:
|
||||
// https://github.com/YaLTeR/niri/wiki/Configuration:-Window-Rules
|
||||
@ -372,18 +381,22 @@ window-rule {
|
||||
}
|
||||
|
||||
window-rule {
|
||||
match at-startup=true app-id=r#"floorp$"#
|
||||
match at-startup=true app-id="floorp"
|
||||
open-maximized true
|
||||
open-on-workspace "browser"
|
||||
}
|
||||
|
||||
window-rule {
|
||||
match at-startup=true app-id=r#"^org\.telegram\.desktop$"#
|
||||
match at-startup=true app-id=r#"^org\.gnome\.Fractal$"#
|
||||
match at-startup=true app-id=r#"discord"#
|
||||
match at-startup=true app-id=r#"vesktop"#
|
||||
|
||||
exclude app-id=r#"^org\.telegram\.desktop$"# title="^Media viewer$"
|
||||
open-on-workspace "chat"
|
||||
opacity 0.95
|
||||
}
|
||||
|
||||
|
||||
// Example: enable rounded corners for all windows.
|
||||
// (This example rule is commented out with a "/-" in front.)
|
||||
/-window-rule {
|
||||
@ -407,9 +420,10 @@ binds {
|
||||
Mod+Shift+Slash { show-hotkey-overlay; }
|
||||
|
||||
// Suggested binds for running programs: terminal, app launcher, screen locker.
|
||||
Mod+Return hotkey-overlay-title="Open a Terminal: alacritty" { spawn "alacritty"; }
|
||||
Mod+Return hotkey-overlay-title="Open a Terminal: {{terminal}}" { spawn "{{terminal}}"; }
|
||||
Mod+P hotkey-overlay-title="Run an Application: fuzzel" { spawn "fuzzel"; }
|
||||
Super+Space hotkey-overlay-title="Lock the Screen: hyprlock" { spawn "hyprlock"; }
|
||||
Super+Space allow-when-locked=true hotkey-overlay-title="Lock the Screen: swaylock" { spawn "swaylock"; }
|
||||
// Super+Space hotkey-overlay-title="Lock the Screen: hyprlock" { spawn "hyprlock"; }
|
||||
|
||||
// You can also use a shell. Do this if you need pipes, multiple commands, etc.
|
||||
// Note: the entire command goes as a single argument in the end.
|
||||
@ -527,24 +541,24 @@ binds {
|
||||
//
|
||||
// For example, with 2 workspaces + 1 empty, indices 3, 4, 5 and so on
|
||||
// will all refer to the 3rd workspace.
|
||||
Mod+1 { focus-workspace 1; }
|
||||
Mod+2 { focus-workspace 2; }
|
||||
Mod+1 { focus-workspace "browser"; }
|
||||
Mod+2 { focus-workspace "terminal"; }
|
||||
Mod+3 { focus-workspace 3; }
|
||||
Mod+4 { focus-workspace 4; }
|
||||
Mod+5 { focus-workspace 5; }
|
||||
Mod+6 { focus-workspace 6; }
|
||||
Mod+7 { focus-workspace 7; }
|
||||
Mod+8 { focus-workspace 8; }
|
||||
Mod+9 { focus-workspace 9; }
|
||||
Mod+Shift+1 { move-column-to-workspace 1; }
|
||||
Mod+Shift+2 { move-column-to-workspace 2; }
|
||||
Mod+8 { focus-workspace "chat"; }
|
||||
Mod+9 { focus-workspace "music"; }
|
||||
Mod+Shift+1 { move-column-to-workspace "browser"; }
|
||||
Mod+Shift+2 { move-column-to-workspace "terminal"; }
|
||||
Mod+Shift+3 { move-column-to-workspace 3; }
|
||||
Mod+Shift+4 { move-column-to-workspace 4; }
|
||||
Mod+Shift+5 { move-column-to-workspace 5; }
|
||||
Mod+Shift+6 { move-column-to-workspace 6; }
|
||||
Mod+Shift+7 { move-column-to-workspace 7; }
|
||||
Mod+Shift+8 { move-column-to-workspace 8; }
|
||||
Mod+Shift+9 { move-column-to-workspace 9; }
|
||||
Mod+Shift+8 { move-column-to-workspace "chat"; }
|
||||
Mod+Shift+9 { move-column-to-workspace "music"; }
|
||||
|
||||
// Alternatively, there are commands to move just a single window:
|
||||
// Mod+Ctrl+1 { move-window-to-workspace 1; }
|
||||
@ -630,7 +644,10 @@ binds {
|
||||
|
||||
// Powers off the monitors. To turn them back on, do any input like
|
||||
// moving the mouse or pressing any other key.
|
||||
Mod+Shift+P { power-off-monitors; }
|
||||
// Mod+Shift+P { power-off-monitors; }
|
||||
|
||||
Mod+Shift+P { spawn "swap-wallpaper"; }
|
||||
Mod+B { spawn "{{browser}}"; }
|
||||
}
|
||||
|
||||
hotkey-overlay {
|
||||
|
||||
@ -432,6 +432,7 @@ opacity-rule = [
|
||||
"95:class_g = 'Ripcord'",
|
||||
"95:class_g = 'TelegramDesktop'",
|
||||
"95:class_g = 'KotatogramDesktop'",
|
||||
"95:class_g = 'AyuGramDesktop'",
|
||||
"95:class_g = 'Thunderbird'",
|
||||
"95:class_g = 'VSCodium'",
|
||||
"95:class_g = 'discord'",
|
||||
|
||||
@ -10,7 +10,7 @@ typeset -U PATH path
|
||||
export PATH="$PATH:${$(find ~/.local/bin -type d -printf %p:)%%:}"
|
||||
export PATH="$PATH:~/.spicetify"
|
||||
export PATH="$PATH:${$(find ~/.cache/.bun/bin -type d -printf %p:)%%:}"
|
||||
export PATH=$JAVA_HOME/bin:$PATH
|
||||
export PATH="$JAVA_HOME/bin:$PATH"
|
||||
|
||||
# Disable files
|
||||
export LESSHISTFILE=-
|
||||
|
||||
@ -1,67 +0,0 @@
|
||||
ignore-empty-password
|
||||
font="Fira Sans Semibold"
|
||||
font-size=128
|
||||
|
||||
clock
|
||||
timestr=%T
|
||||
datestr=%d.%m.%Y
|
||||
|
||||
# Add current screenshot as wallpaper
|
||||
screenshots
|
||||
|
||||
# Add an image as a background
|
||||
# image=~/.cache/current_wallpaper.jpg
|
||||
|
||||
# Fade in time
|
||||
#fade-in=0.5
|
||||
|
||||
# Effect for background
|
||||
effect-blur=10x5
|
||||
# effect-greyscale
|
||||
# effect-pixelate=5
|
||||
|
||||
# Show/Hide indicator circle
|
||||
indicator
|
||||
|
||||
# smaller indicator
|
||||
#indicator-radius=200
|
||||
|
||||
# bigger indicator
|
||||
indicator-radius=300
|
||||
|
||||
indicator-thickness=0
|
||||
indicator-caps-lock
|
||||
|
||||
# Define all colors
|
||||
|
||||
key-hl-color=00000066
|
||||
separator-color=00000000
|
||||
|
||||
inside-color=00000000
|
||||
inside-clear-color=c0caf500
|
||||
inside-caps-lock-color=c0caf500
|
||||
inside-ver-color=c0caf500
|
||||
inside-wrong-color=c0caf500
|
||||
|
||||
ring-color=c0caf5
|
||||
ring-clear-color=c0caf5
|
||||
ring-caps-lock-color=c0caf5
|
||||
ring-ver-color=c0caf5
|
||||
ring-wrong-color=c0caf5
|
||||
|
||||
line-color=00000000
|
||||
line-clear-color=c0caf5FF
|
||||
line-caps-lock-color=c0caf5FF
|
||||
line-ver-color=c0caf5FF
|
||||
line-wrong-color=c0caf5FF
|
||||
|
||||
text-color=c0caf5
|
||||
text-clear-color=c0caf5
|
||||
text-ver-color=c0caf5
|
||||
text-wrong-color=c0caf5
|
||||
|
||||
bs-hl-color=c0caf5
|
||||
caps-lock-key-hl-color=c0caf5FF
|
||||
caps-lock-bs-hl-color=c0caf5FF
|
||||
disable-caps-lock-text
|
||||
text-caps-lock-color=c0caf5
|
||||
64
config/swaylock.conf
Normal file
64
config/swaylock.conf
Normal file
@ -0,0 +1,64 @@
|
||||
daemonize
|
||||
show-failed-attempts
|
||||
clock
|
||||
screenshot
|
||||
effect-blur=13x13
|
||||
effect-vignette=0.5:0.5
|
||||
indicator
|
||||
indicator-radius=200
|
||||
indicator-thickness=20
|
||||
|
||||
grace=2
|
||||
grace-no-mouse
|
||||
grace-no-touch
|
||||
|
||||
datestr=%e. %B
|
||||
timestr=%I:%M:%S %p
|
||||
fade-in=0.5
|
||||
ignore-empty-password
|
||||
|
||||
# Background color
|
||||
color=#191724
|
||||
|
||||
# Layout text colors
|
||||
layout-bg-color=#00000000
|
||||
layout-border-color=#00000000
|
||||
layout-text-color=#e0def4
|
||||
|
||||
# Text color
|
||||
text-color=#31748f
|
||||
text-clear-color=#9ccfd8
|
||||
text-caps-lock-color=#f6c177
|
||||
text-ver-color=#c4a7e7
|
||||
text-wrong-color=#eb6f92
|
||||
|
||||
# Highlight segments
|
||||
bs-hl-color=#19172466
|
||||
key-hl-color=#31748f
|
||||
caps-lock-bs-hl-color=#19172466
|
||||
caps-lock-key-hl-color=#f6c177
|
||||
|
||||
# Highlight segments separator
|
||||
separator-color=#00000000
|
||||
|
||||
# Inside of the indicator
|
||||
inside-color=#31748f55
|
||||
inside-clear-color=#9ccfd855
|
||||
inside-caps-lock-color=#f6c17755
|
||||
inside-ver-color=#c4a7e755
|
||||
inside-wrong-color=#eb6f9255
|
||||
|
||||
# Line between the inside and ring
|
||||
line-color=#31748f11
|
||||
line-clear-color=#9ccfd811
|
||||
line-caps-lock-color=#f6c17711
|
||||
line-ver-color=#c4a7e711
|
||||
line-wrong-color=#eb6f9211
|
||||
|
||||
# Indicator ring
|
||||
ring-color=#31748faa
|
||||
ring-clear-color=#9ccfd8aa
|
||||
ring-caps-lock-color=#f6c177aa
|
||||
ring-ver-color=#c4a7e7aa
|
||||
ring-wrong-color=#eb6f92aa
|
||||
|
||||
@ -14,16 +14,16 @@
|
||||
"modules-left": [
|
||||
"wlr/taskbar"
|
||||
],
|
||||
"modules-center": [
|
||||
"clock"
|
||||
],
|
||||
"modules-center": [],
|
||||
"modules-right": [
|
||||
"tray",
|
||||
"network",
|
||||
"cpu",
|
||||
"memory",
|
||||
"pulseaudio",
|
||||
"custom/waybar-media"
|
||||
"battery",
|
||||
// "pulseaudio"
|
||||
"custom/waybar-media",
|
||||
"clock"
|
||||
],
|
||||
// "modules-right": ["cpu", "memory", "battery", "network", "tray"],
|
||||
// Modules configuration
|
||||
@ -50,7 +50,7 @@
|
||||
},
|
||||
"wlr/taskbar": {
|
||||
// "all-outputs": true,
|
||||
// "format": "{icon} {title} {short_state}",
|
||||
// "format": "{icon} {title} {app_id}",
|
||||
"format": "{icon}",
|
||||
"tooltip-format": "{title} | {app_id}",
|
||||
"on-click": "activate",
|
||||
@ -119,7 +119,7 @@
|
||||
"clock": {
|
||||
"interval": 1,
|
||||
"tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>",
|
||||
"format": "{:%d.%m. %H:%M:%S}"
|
||||
"format": "{:%d.%m.%Y %H:%M:%S}"
|
||||
},
|
||||
"cpu": {
|
||||
"format": "{usage}% ",
|
||||
@ -158,7 +158,7 @@
|
||||
},
|
||||
"battery": {
|
||||
"states": {
|
||||
// "good": 95,
|
||||
"good": 95,
|
||||
"warning": 30,
|
||||
"critical": 15
|
||||
},
|
||||
|
||||
@ -30,33 +30,33 @@ hash = "62251f94eb67648d42cdfcfb8be0fad2"
|
||||
|
||||
[[plugin.deps]]
|
||||
use = "yazi-rs/plugins:git"
|
||||
rev = "d7588f6"
|
||||
rev = "d1c8baa"
|
||||
hash = "63b6c222bf2103b3023389dde5e2ecfe"
|
||||
|
||||
[[plugin.deps]]
|
||||
use = "yazi-rs/plugins:chmod"
|
||||
rev = "d7588f6"
|
||||
hash = "1adc12c2b2b025411ab61eb8f0879574"
|
||||
rev = "d1c8baa"
|
||||
hash = "8ad3e90b079190b4905f24a44f4ca06b"
|
||||
|
||||
[[plugin.deps]]
|
||||
use = "yazi-rs/plugins:full-border"
|
||||
rev = "d7588f6"
|
||||
rev = "d1c8baa"
|
||||
hash = "3996fc74044bc44144b323686f887e1"
|
||||
|
||||
[[plugin.deps]]
|
||||
use = "yazi-rs/plugins:mount"
|
||||
rev = "d7588f6"
|
||||
hash = "e1de3054c0d1a2d8dc6f007eadc0fa31"
|
||||
rev = "d1c8baa"
|
||||
hash = "435a2af56ecfb3d05755fd5e24977d8b"
|
||||
|
||||
[[plugin.deps]]
|
||||
use = "yazi-rs/plugins:smart-filter"
|
||||
rev = "d7588f6"
|
||||
hash = "e56b7abf3c06e8ce496eadcca168c093"
|
||||
rev = "d1c8baa"
|
||||
hash = "bcda8eeb3f4013bae156aecabfc745e8"
|
||||
|
||||
[[plugin.deps]]
|
||||
use = "yazi-rs/plugins:diff"
|
||||
rev = "d7588f6"
|
||||
hash = "47865a70cade14a0b9b6bc6a54f16bdb"
|
||||
rev = "d1c8baa"
|
||||
hash = "82376c3381ae915fd799d40f4dd4c6cd"
|
||||
|
||||
[[plugin.deps]]
|
||||
use = "AnirudhG07/rich-preview"
|
||||
@ -65,13 +65,13 @@ hash = "b4040931f0d2f9670ddb4923e55cd881"
|
||||
|
||||
[[plugin.deps]]
|
||||
use = "macydnah/office"
|
||||
rev = "33cc61a"
|
||||
hash = "d7e31c616cc6c8a1f05fdff7c47dae98"
|
||||
rev = "41ebef8"
|
||||
hash = "5805affd3ae8adcb3c72b6997d21c0a6"
|
||||
|
||||
[[plugin.deps]]
|
||||
use = "boydaihungst/mediainfo"
|
||||
rev = "0e2ae47"
|
||||
hash = "6656f2869ae2274a0e1860876f15186f"
|
||||
rev = "2093ab7"
|
||||
hash = "16a10359fc2a3cd8cc8bcfbe00f744d3"
|
||||
|
||||
[[plugin.deps]]
|
||||
use = "iynaix/time-travel"
|
||||
|
||||
@ -21,7 +21,7 @@ run = "plugin chmod"
|
||||
desc = "Chmod on selected files"
|
||||
```
|
||||
|
||||
Make sure the <kbd>c</kbd> => <kbd>m</kbd> key is not used elsewhere.
|
||||
Note that, the keybindings above are just examples, please tune them up as needed to ensure they don't conflict with your other commands/plugins.
|
||||
|
||||
## License
|
||||
|
||||
|
||||
@ -21,7 +21,7 @@ run = "plugin diff"
|
||||
desc = "Diff the selected with the hovered file"
|
||||
```
|
||||
|
||||
Make sure the <kbd>C</kbd> + <kbd>d</kbd> key is not used elsewhere.
|
||||
Note that, the keybindings above are just examples, please tune them up as needed to ensure they don't conflict with your other commands/plugins.
|
||||
|
||||
## License
|
||||
|
||||
|
||||
@ -50,6 +50,9 @@ using `ffmpeg` if available and media metadata using `mediainfo`.
|
||||
|
||||
If it output `Not found` then add it to your PATH environment variable. It's better to ask ChatGPT to help you (Prompt: `Add MediaInfo CLI to PATH environment variable in Windows`).
|
||||
|
||||
- Install ImageMagick (for linux, you can use your distro package manager to install):
|
||||
https://imagemagick.org/script/download.php
|
||||
|
||||
- Install this plugin:
|
||||
|
||||
```bash
|
||||
|
||||
@ -25,7 +25,9 @@ on = "M"
|
||||
run = "plugin mount"
|
||||
```
|
||||
|
||||
Available keybindings:
|
||||
Note that, the keybindings above are just examples, please tune them up as needed to ensure they don't conflict with your other commands/plugins.
|
||||
|
||||
## Actions
|
||||
|
||||
| Key binding | Alternate key | Action |
|
||||
| ------------ | ------------- | --------------------- |
|
||||
|
||||
@ -38,30 +38,23 @@ function M:doc2pdf(job)
|
||||
:arg({
|
||||
"--headless",
|
||||
"--convert-to",
|
||||
"pdf:draw_pdf_Export:{"
|
||||
.. '"PageRange":{'
|
||||
.. '"type":"string",'
|
||||
.. '"value":'
|
||||
.. '"'
|
||||
.. job.skip + 1
|
||||
.. '"'
|
||||
.. "}"
|
||||
.. "}",
|
||||
'pdf:draw_pdf_Export:{"PageRange":{"type":"string","value":"' .. job.skip + 1 .. '"}}',
|
||||
"--outdir",
|
||||
tmp,
|
||||
tostring(job.file.url),
|
||||
})
|
||||
:stdin(Command.NULL)
|
||||
:stdout(Command.PIPED)
|
||||
:stderr(Command.NULL)
|
||||
:stderr(Command.PIPED)
|
||||
:output()
|
||||
|
||||
if not libreoffice.status.success then
|
||||
ya.err(
|
||||
libreoffice.stdout:match("LibreOffice .+"):gsub("%\n.*", "")
|
||||
.. " "
|
||||
.. libreoffice.stdout:match("Error .+"):gsub("%\n.*", "")
|
||||
)
|
||||
local output = libreoffice.stdout .. libreoffice.stderr
|
||||
local version = (output:match("LibreOffice .+") or ""):gsub("%\n.*", "")
|
||||
local error = (output:match("Error:? .+") or ""):gsub("%\n.*", "")
|
||||
if version ~= "" or error ~= "" then
|
||||
ya.err((version or "LibreOffice") .. " " .. (error or "Unknown error"))
|
||||
end
|
||||
return nil, Err("Failed to preconvert `%s` to a temporary PDF", job.file.name)
|
||||
end
|
||||
|
||||
|
||||
@ -21,7 +21,7 @@ run = "plugin smart-filter"
|
||||
desc = "Smart filter"
|
||||
```
|
||||
|
||||
Make sure the <kbd>F</kbd> key is not used elsewhere.
|
||||
Note that, the keybindings above are just examples, please tune them up as needed to ensure they don't conflict with your other commands/plugins.
|
||||
|
||||
## License
|
||||
|
||||
|
||||
@ -5,5 +5,5 @@ export XDG_CURRENT_DESKTOP=Hyprland
|
||||
export XDG_SESSION_TYPE=wayland
|
||||
export XDG_SESSION_DESKTOP=Hyprland
|
||||
|
||||
# [ "$(tty)" = "/dev/tty1" ] && ! pidof -s niri >/dev/null 2>&1 && niri --session
|
||||
[ "$(tty)" = "/dev/tty1" ] && ! pidof -s Hyprland >/dev/null 2>&1 && Hyprland
|
||||
[ "$(tty)" = "/dev/tty1" ] && ! pidof -s niri >/dev/null 2>&1 && niri --session
|
||||
# [ "$(tty)" = "/dev/tty1" ] && ! pidof -s Hyprland >/dev/null 2>&1 && Hyprland
|
||||
|
||||
@ -193,3 +193,5 @@ export PATH="$BUN_INSTALL/bin:$PATH"
|
||||
|
||||
# bun completions
|
||||
[ -s "/home/kristofers/.bun/_bun" ] && source "/home/kristofers/.bun/_bun"
|
||||
|
||||
. "$HOME/.local/share/../bin/env"
|
||||
|
||||
116
config/zsh/completions/_bat.zsh
Normal file
116
config/zsh/completions/_bat.zsh
Normal file
@ -0,0 +1,116 @@
|
||||
#compdef bat
|
||||
|
||||
local curcontext="$curcontext" ret=1
|
||||
local -a state state_descr line
|
||||
typeset -A opt_args
|
||||
|
||||
(( $+functions[_bat_cache_subcommand] )) ||
|
||||
_bat_cache_subcommand() {
|
||||
local -a args
|
||||
args=(
|
||||
'(-b --build -c --clear)'{-b,--build}'[initialize or update the syntax/theme cache]'
|
||||
'(-b --build -c --clear)'{-c,--clear}'[remove the cached syntax definitions and themes]'
|
||||
--source='[specify directory to load syntaxes and themes from]:directory:_files -/'
|
||||
--target='[specify directory to store the cached syntax and theme set in]:directory:_files -/'
|
||||
--blank'[create completely new syntax and theme sets]'
|
||||
--acknowledgements'[build acknowledgements.bin]'
|
||||
'(: -)'{-h,--help}'[show help information]'
|
||||
)
|
||||
|
||||
_arguments -S -s $args
|
||||
}
|
||||
|
||||
(( $+functions[_bat_main] )) ||
|
||||
_bat_main() {
|
||||
local -a args
|
||||
args=(
|
||||
'(-A --show-all)'{-A,--show-all}'[show non-printable characters (space, tab, newline, ..)]'
|
||||
--nonprintable-notation='[specify how to display non-printable characters when using --show-all]:notation:(caret unicode)'
|
||||
\*{-p,--plain}'[show plain style (alias for `--style=plain`), repeat twice to disable automatic paging (alias for `--paging=never`)]'
|
||||
'(-l --language)'{-l+,--language=}'[set the language for syntax highlighting]:language:->languages'
|
||||
\*{-H+,--highlight-line=}'[highlight specified block of lines]:start\:end'
|
||||
\*--file-name='[specify the name to display for a file]:name:_files'
|
||||
'(-d --diff)'--diff'[only show lines that have been added/removed/modified]'
|
||||
--diff-context='[specify lines of context around added/removed/modified lines when using `--diff`]:lines'
|
||||
--tabs='[set the tab width]:tab width [4]'
|
||||
--wrap='[specify the text-wrapping mode]:mode [auto]:(auto never character)'
|
||||
'!(--wrap)'{-S,--chop-long-lines}
|
||||
--terminal-width='[explicitly set the width of the terminal instead of determining it automatically]:width'
|
||||
'(-n --number --diff --diff-context)'{-n,--number}'[show line numbers]'
|
||||
--color='[specify when to use colors]:when:(auto never always)'
|
||||
--italic-text='[use italics in output]:when:(always never)'
|
||||
--decorations='[specify when to show the decorations]:when:(auto never always)'
|
||||
--paging='[specify when to use the pager]:when:(auto never always)'
|
||||
'(-m --map-syntax)'{-m+,--map-syntax=}'[map a glob pattern to an existing syntax name]: :->syntax-maps'
|
||||
'(--theme)'--theme='[set the color theme for syntax highlighting]:theme:->theme_preferences'
|
||||
'(--theme-dark)'--theme-dark='[set the color theme for syntax highlighting for dark backgrounds]:theme:->themes'
|
||||
'(--theme-light)'--theme-light='[set the color theme for syntax highlighting for light backgrounds]:theme:->themes'
|
||||
'(: --list-themes --list-languages -L)'--list-themes'[show all supported highlighting themes]'
|
||||
--style='[comma-separated list of style elements to display]: : _values "style [default]"
|
||||
default auto full plain changes header header-filename header-filesize grid rule numbers snip'
|
||||
\*{-r+,--line-range=}'[only print the specified line range]:start\:end'
|
||||
'(* -)'{-L,--list-languages}'[display all supported languages]'
|
||||
-P'[disable paging]'
|
||||
"--no-config[don't use the configuration file]"
|
||||
"--no-custom-assets[don't load custom assets]"
|
||||
'(--no-lessopen)'--lessopen'[enable the $LESSOPEN preprocessor]'
|
||||
'(--lessopen)'--no-lessopen'[disable the $LESSOPEN preprocessor if enabled (overrides --lessopen)]'
|
||||
'(* -)'--config-dir"[show bat's configuration directory]"
|
||||
'(* -)'--config-file'[show path to the configuration file]'
|
||||
'(* -)'--generate-config-file'[generate a default configuration file]'
|
||||
'(* -)'--cache-dir"[show bat's cache directory]"
|
||||
'(* -)'{-h,--help}'[show help information]'
|
||||
'(* -)'{-V,--version}'[show version information]'
|
||||
'*: :{ _files || compadd cache }'
|
||||
)
|
||||
|
||||
_arguments -S -s $args && ret=0
|
||||
|
||||
case "$state" in
|
||||
syntax-maps)
|
||||
if ! compset -P '*:'; then
|
||||
_message -e patterns 'glob pattern:language'
|
||||
return
|
||||
fi
|
||||
;& # fall-through
|
||||
|
||||
languages)
|
||||
local IFS=$'\n'
|
||||
local -a languages
|
||||
languages=( $(bat --list-languages | awk -F':|,' '{ for (i = 1; i <= NF; ++i) printf("%s:%s\n", $i, $1) }') )
|
||||
|
||||
_describe 'language' languages && ret=0
|
||||
;;
|
||||
|
||||
themes)
|
||||
local -a themes expl
|
||||
themes=(${(f)"$(_call_program themes bat --list-themes)"} )
|
||||
|
||||
_wanted themes expl 'theme' compadd -a themes && ret=0
|
||||
;;
|
||||
theme_preferences)
|
||||
local -a themes expl
|
||||
themes=(auto dark light auto:always auto:system ${(f)"$(_call_program themes bat --list-themes)"} )
|
||||
|
||||
_wanted themes expl 'theme' compadd -a themes && ret=0
|
||||
;;
|
||||
esac
|
||||
|
||||
return ret
|
||||
}
|
||||
|
||||
case $words[2] in
|
||||
cache)
|
||||
## Completion of the 'cache' command itself is removed for better UX
|
||||
## See https://github.com/sharkdp/bat/issues/2085#issuecomment-1271646802
|
||||
shift words
|
||||
(( CURRENT-- ))
|
||||
curcontext="${curcontext%:*}-${words[1]}:"
|
||||
_bat_cache_subcommand
|
||||
;;
|
||||
|
||||
*)
|
||||
_bat_main
|
||||
;;
|
||||
esac
|
||||
|
||||
2343
config/zsh/completions/_deno.zsh
Normal file
2343
config/zsh/completions/_deno.zsh
Normal file
File diff suppressed because it is too large
Load Diff
635
config/zsh/completions/_sqlx.zsh
Normal file
635
config/zsh/completions/_sqlx.zsh
Normal file
@ -0,0 +1,635 @@
|
||||
#compdef sqlx
|
||||
|
||||
autoload -U is-at-least
|
||||
|
||||
_sqlx() {
|
||||
typeset -A opt_args
|
||||
typeset -a _arguments_options
|
||||
local ret=1
|
||||
|
||||
if is-at-least 5.2; then
|
||||
_arguments_options=(-s -S -C)
|
||||
else
|
||||
_arguments_options=(-s -C)
|
||||
fi
|
||||
|
||||
local context curcontext="$curcontext" state line
|
||||
_arguments "${_arguments_options[@]}" : \
|
||||
'-h[Print help]' \
|
||||
'--help[Print help]' \
|
||||
":: :_sqlx_commands" \
|
||||
"*::: :->sqlx-cli" \
|
||||
&& ret=0
|
||||
case $state in
|
||||
(sqlx-cli)
|
||||
words=($line[1] "${words[@]}")
|
||||
(( CURRENT += 1 ))
|
||||
curcontext="${curcontext%:*:*}:sqlx-command-$line[1]:"
|
||||
case $line[1] in
|
||||
(database)
|
||||
_arguments "${_arguments_options[@]}" : \
|
||||
'-h[Print help]' \
|
||||
'--help[Print help]' \
|
||||
":: :_sqlx__database_commands" \
|
||||
"*::: :->database" \
|
||||
&& ret=0
|
||||
|
||||
case $state in
|
||||
(database)
|
||||
words=($line[1] "${words[@]}")
|
||||
(( CURRENT += 1 ))
|
||||
curcontext="${curcontext%:*:*}:sqlx-database-command-$line[1]:"
|
||||
case $line[1] in
|
||||
(create)
|
||||
_arguments "${_arguments_options[@]}" : \
|
||||
'-D+[Location of the DB, by default will be read from the DATABASE_URL env var or \`.env\` files]:DATABASE_URL:_default' \
|
||||
'--database-url=[Location of the DB, by default will be read from the DATABASE_URL env var or \`.env\` files]:DATABASE_URL:_default' \
|
||||
'--connect-timeout=[The maximum time, in seconds, to try connecting to the database server before returning an error]:CONNECT_TIMEOUT:_default' \
|
||||
'--no-dotenv[Do not automatically load \`.env\` files]' \
|
||||
'-h[Print help]' \
|
||||
'--help[Print help]' \
|
||||
&& ret=0
|
||||
;;
|
||||
(drop)
|
||||
_arguments "${_arguments_options[@]}" : \
|
||||
'-D+[Location of the DB, by default will be read from the DATABASE_URL env var or \`.env\` files]:DATABASE_URL:_default' \
|
||||
'--database-url=[Location of the DB, by default will be read from the DATABASE_URL env var or \`.env\` files]:DATABASE_URL:_default' \
|
||||
'--connect-timeout=[The maximum time, in seconds, to try connecting to the database server before returning an error]:CONNECT_TIMEOUT:_default' \
|
||||
'-y[Automatic confirmation. Without this option, you will be prompted before dropping your database]' \
|
||||
'--no-dotenv[Do not automatically load \`.env\` files]' \
|
||||
'-f[PostgreSQL only\: force drops the database]' \
|
||||
'--force[PostgreSQL only\: force drops the database]' \
|
||||
'-h[Print help]' \
|
||||
'--help[Print help]' \
|
||||
&& ret=0
|
||||
;;
|
||||
(reset)
|
||||
_arguments "${_arguments_options[@]}" : \
|
||||
'--source=[Path to folder containing migrations]:SOURCE:_default' \
|
||||
'-D+[Location of the DB, by default will be read from the DATABASE_URL env var or \`.env\` files]:DATABASE_URL:_default' \
|
||||
'--database-url=[Location of the DB, by default will be read from the DATABASE_URL env var or \`.env\` files]:DATABASE_URL:_default' \
|
||||
'--connect-timeout=[The maximum time, in seconds, to try connecting to the database server before returning an error]:CONNECT_TIMEOUT:_default' \
|
||||
'-y[Automatic confirmation. Without this option, you will be prompted before dropping your database]' \
|
||||
'--no-dotenv[Do not automatically load \`.env\` files]' \
|
||||
'-f[PostgreSQL only\: force drops the database]' \
|
||||
'--force[PostgreSQL only\: force drops the database]' \
|
||||
'-h[Print help]' \
|
||||
'--help[Print help]' \
|
||||
&& ret=0
|
||||
;;
|
||||
(setup)
|
||||
_arguments "${_arguments_options[@]}" : \
|
||||
'--source=[Path to folder containing migrations]:SOURCE:_default' \
|
||||
'-D+[Location of the DB, by default will be read from the DATABASE_URL env var or \`.env\` files]:DATABASE_URL:_default' \
|
||||
'--database-url=[Location of the DB, by default will be read from the DATABASE_URL env var or \`.env\` files]:DATABASE_URL:_default' \
|
||||
'--connect-timeout=[The maximum time, in seconds, to try connecting to the database server before returning an error]:CONNECT_TIMEOUT:_default' \
|
||||
'--no-dotenv[Do not automatically load \`.env\` files]' \
|
||||
'-h[Print help]' \
|
||||
'--help[Print help]' \
|
||||
&& ret=0
|
||||
;;
|
||||
(help)
|
||||
_arguments "${_arguments_options[@]}" : \
|
||||
":: :_sqlx__database__help_commands" \
|
||||
"*::: :->help" \
|
||||
&& ret=0
|
||||
|
||||
case $state in
|
||||
(help)
|
||||
words=($line[1] "${words[@]}")
|
||||
(( CURRENT += 1 ))
|
||||
curcontext="${curcontext%:*:*}:sqlx-database-help-command-$line[1]:"
|
||||
case $line[1] in
|
||||
(create)
|
||||
_arguments "${_arguments_options[@]}" : \
|
||||
&& ret=0
|
||||
;;
|
||||
(drop)
|
||||
_arguments "${_arguments_options[@]}" : \
|
||||
&& ret=0
|
||||
;;
|
||||
(reset)
|
||||
_arguments "${_arguments_options[@]}" : \
|
||||
&& ret=0
|
||||
;;
|
||||
(setup)
|
||||
_arguments "${_arguments_options[@]}" : \
|
||||
&& ret=0
|
||||
;;
|
||||
(help)
|
||||
_arguments "${_arguments_options[@]}" : \
|
||||
&& ret=0
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
(prepare)
|
||||
_arguments "${_arguments_options[@]}" : \
|
||||
'-D+[Location of the DB, by default will be read from the DATABASE_URL env var or \`.env\` files]:DATABASE_URL:_default' \
|
||||
'--database-url=[Location of the DB, by default will be read from the DATABASE_URL env var or \`.env\` files]:DATABASE_URL:_default' \
|
||||
'--connect-timeout=[The maximum time, in seconds, to try connecting to the database server before returning an error]:CONNECT_TIMEOUT:_default' \
|
||||
'--check[Run in '\''check'\'' mode. Exits with 0 if the query metadata is up-to-date. Exits with 1 if the query metadata needs updating]' \
|
||||
'--all[Prepare query macros in dependencies that exist outside the current crate or workspace]' \
|
||||
'--workspace[Generate a single workspace-level \`.sqlx\` folder]' \
|
||||
'--no-dotenv[Do not automatically load \`.env\` files]' \
|
||||
'-h[Print help (see more with '\''--help'\'')]' \
|
||||
'--help[Print help (see more with '\''--help'\'')]' \
|
||||
'*::args -- Arguments to be passed to `cargo rustc ...`:_default' \
|
||||
&& ret=0
|
||||
;;
|
||||
(migrate)
|
||||
_arguments "${_arguments_options[@]}" : \
|
||||
'-h[Print help]' \
|
||||
'--help[Print help]' \
|
||||
":: :_sqlx__migrate_commands" \
|
||||
"*::: :->migrate" \
|
||||
&& ret=0
|
||||
|
||||
case $state in
|
||||
(migrate)
|
||||
words=($line[1] "${words[@]}")
|
||||
(( CURRENT += 1 ))
|
||||
curcontext="${curcontext%:*:*}:sqlx-migrate-command-$line[1]:"
|
||||
case $line[1] in
|
||||
(add)
|
||||
_arguments "${_arguments_options[@]}" : \
|
||||
'--source=[Path to folder containing migrations]:SOURCE:_default' \
|
||||
'-r[If true, creates a pair of up and down migration files with same version else creates a single sql file]' \
|
||||
'-t[If set, use timestamp versioning for the new migration. Conflicts with \`--sequential\`]' \
|
||||
'--timestamp[If set, use timestamp versioning for the new migration. Conflicts with \`--sequential\`]' \
|
||||
'(-t --timestamp)-s[If set, use sequential versioning for the new migration. Conflicts with \`--timestamp\`]' \
|
||||
'(-t --timestamp)--sequential[If set, use sequential versioning for the new migration. Conflicts with \`--timestamp\`]' \
|
||||
'-h[Print help (see more with '\''--help'\'')]' \
|
||||
'--help[Print help (see more with '\''--help'\'')]' \
|
||||
':description:_default' \
|
||||
&& ret=0
|
||||
;;
|
||||
(run)
|
||||
_arguments "${_arguments_options[@]}" : \
|
||||
'--source=[Path to folder containing migrations]:SOURCE:_default' \
|
||||
'-D+[Location of the DB, by default will be read from the DATABASE_URL env var or \`.env\` files]:DATABASE_URL:_default' \
|
||||
'--database-url=[Location of the DB, by default will be read from the DATABASE_URL env var or \`.env\` files]:DATABASE_URL:_default' \
|
||||
'--connect-timeout=[The maximum time, in seconds, to try connecting to the database server before returning an error]:CONNECT_TIMEOUT:_default' \
|
||||
'--target-version=[Apply migrations up to the specified version. If unspecified, apply all pending migrations. If already at the target version, then no-op]:TARGET_VERSION:_default' \
|
||||
'--dry-run[List all the migrations to be run without applying]' \
|
||||
'--ignore-missing[Ignore applied migrations that are missing in the resolved migrations]' \
|
||||
'--no-dotenv[Do not automatically load \`.env\` files]' \
|
||||
'-h[Print help]' \
|
||||
'--help[Print help]' \
|
||||
&& ret=0
|
||||
;;
|
||||
(revert)
|
||||
_arguments "${_arguments_options[@]}" : \
|
||||
'--source=[Path to folder containing migrations]:SOURCE:_default' \
|
||||
'-D+[Location of the DB, by default will be read from the DATABASE_URL env var or \`.env\` files]:DATABASE_URL:_default' \
|
||||
'--database-url=[Location of the DB, by default will be read from the DATABASE_URL env var or \`.env\` files]:DATABASE_URL:_default' \
|
||||
'--connect-timeout=[The maximum time, in seconds, to try connecting to the database server before returning an error]:CONNECT_TIMEOUT:_default' \
|
||||
'--target-version=[Revert migrations down to the specified version. If unspecified, revert only the last migration. Set to 0 to revert all migrations. If already at the target version, then no-op]:TARGET_VERSION:_default' \
|
||||
'--dry-run[List the migration to be reverted without applying]' \
|
||||
'--ignore-missing[Ignore applied migrations that are missing in the resolved migrations]' \
|
||||
'--no-dotenv[Do not automatically load \`.env\` files]' \
|
||||
'-h[Print help]' \
|
||||
'--help[Print help]' \
|
||||
&& ret=0
|
||||
;;
|
||||
(info)
|
||||
_arguments "${_arguments_options[@]}" : \
|
||||
'--source=[Path to folder containing migrations]:SOURCE:_default' \
|
||||
'-D+[Location of the DB, by default will be read from the DATABASE_URL env var or \`.env\` files]:DATABASE_URL:_default' \
|
||||
'--database-url=[Location of the DB, by default will be read from the DATABASE_URL env var or \`.env\` files]:DATABASE_URL:_default' \
|
||||
'--connect-timeout=[The maximum time, in seconds, to try connecting to the database server before returning an error]:CONNECT_TIMEOUT:_default' \
|
||||
'--no-dotenv[Do not automatically load \`.env\` files]' \
|
||||
'-h[Print help]' \
|
||||
'--help[Print help]' \
|
||||
&& ret=0
|
||||
;;
|
||||
(build-script)
|
||||
_arguments "${_arguments_options[@]}" : \
|
||||
'--source=[Path to folder containing migrations]:SOURCE:_default' \
|
||||
'--force[Overwrite the build script if it already exists]' \
|
||||
'-h[Print help (see more with '\''--help'\'')]' \
|
||||
'--help[Print help (see more with '\''--help'\'')]' \
|
||||
&& ret=0
|
||||
;;
|
||||
(help)
|
||||
_arguments "${_arguments_options[@]}" : \
|
||||
":: :_sqlx__migrate__help_commands" \
|
||||
"*::: :->help" \
|
||||
&& ret=0
|
||||
|
||||
case $state in
|
||||
(help)
|
||||
words=($line[1] "${words[@]}")
|
||||
(( CURRENT += 1 ))
|
||||
curcontext="${curcontext%:*:*}:sqlx-migrate-help-command-$line[1]:"
|
||||
case $line[1] in
|
||||
(add)
|
||||
_arguments "${_arguments_options[@]}" : \
|
||||
&& ret=0
|
||||
;;
|
||||
(run)
|
||||
_arguments "${_arguments_options[@]}" : \
|
||||
&& ret=0
|
||||
;;
|
||||
(revert)
|
||||
_arguments "${_arguments_options[@]}" : \
|
||||
&& ret=0
|
||||
;;
|
||||
(info)
|
||||
_arguments "${_arguments_options[@]}" : \
|
||||
&& ret=0
|
||||
;;
|
||||
(build-script)
|
||||
_arguments "${_arguments_options[@]}" : \
|
||||
&& ret=0
|
||||
;;
|
||||
(help)
|
||||
_arguments "${_arguments_options[@]}" : \
|
||||
&& ret=0
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
(completions)
|
||||
_arguments "${_arguments_options[@]}" : \
|
||||
'-h[Print help]' \
|
||||
'--help[Print help]' \
|
||||
':shell:(bash elvish fish powershell zsh)' \
|
||||
&& ret=0
|
||||
;;
|
||||
(help)
|
||||
_arguments "${_arguments_options[@]}" : \
|
||||
":: :_sqlx__help_commands" \
|
||||
"*::: :->help" \
|
||||
&& ret=0
|
||||
|
||||
case $state in
|
||||
(help)
|
||||
words=($line[1] "${words[@]}")
|
||||
(( CURRENT += 1 ))
|
||||
curcontext="${curcontext%:*:*}:sqlx-help-command-$line[1]:"
|
||||
case $line[1] in
|
||||
(database)
|
||||
_arguments "${_arguments_options[@]}" : \
|
||||
":: :_sqlx__help__database_commands" \
|
||||
"*::: :->database" \
|
||||
&& ret=0
|
||||
|
||||
case $state in
|
||||
(database)
|
||||
words=($line[1] "${words[@]}")
|
||||
(( CURRENT += 1 ))
|
||||
curcontext="${curcontext%:*:*}:sqlx-help-database-command-$line[1]:"
|
||||
case $line[1] in
|
||||
(create)
|
||||
_arguments "${_arguments_options[@]}" : \
|
||||
&& ret=0
|
||||
;;
|
||||
(drop)
|
||||
_arguments "${_arguments_options[@]}" : \
|
||||
&& ret=0
|
||||
;;
|
||||
(reset)
|
||||
_arguments "${_arguments_options[@]}" : \
|
||||
&& ret=0
|
||||
;;
|
||||
(setup)
|
||||
_arguments "${_arguments_options[@]}" : \
|
||||
&& ret=0
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
(prepare)
|
||||
_arguments "${_arguments_options[@]}" : \
|
||||
&& ret=0
|
||||
;;
|
||||
(migrate)
|
||||
_arguments "${_arguments_options[@]}" : \
|
||||
":: :_sqlx__help__migrate_commands" \
|
||||
"*::: :->migrate" \
|
||||
&& ret=0
|
||||
|
||||
case $state in
|
||||
(migrate)
|
||||
words=($line[1] "${words[@]}")
|
||||
(( CURRENT += 1 ))
|
||||
curcontext="${curcontext%:*:*}:sqlx-help-migrate-command-$line[1]:"
|
||||
case $line[1] in
|
||||
(add)
|
||||
_arguments "${_arguments_options[@]}" : \
|
||||
&& ret=0
|
||||
;;
|
||||
(run)
|
||||
_arguments "${_arguments_options[@]}" : \
|
||||
&& ret=0
|
||||
;;
|
||||
(revert)
|
||||
_arguments "${_arguments_options[@]}" : \
|
||||
&& ret=0
|
||||
;;
|
||||
(info)
|
||||
_arguments "${_arguments_options[@]}" : \
|
||||
&& ret=0
|
||||
;;
|
||||
(build-script)
|
||||
_arguments "${_arguments_options[@]}" : \
|
||||
&& ret=0
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
(completions)
|
||||
_arguments "${_arguments_options[@]}" : \
|
||||
&& ret=0
|
||||
;;
|
||||
(help)
|
||||
_arguments "${_arguments_options[@]}" : \
|
||||
&& ret=0
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
(( $+functions[_sqlx_commands] )) ||
|
||||
_sqlx_commands() {
|
||||
local commands; commands=(
|
||||
'database:Group of commands for creating and dropping your database' \
|
||||
'prepare:Generate query metadata to support offline compile-time verification' \
|
||||
'migrate:Group of commands for creating and running migrations' \
|
||||
'completions:Generate shell completions for the specified shell' \
|
||||
'help:Print this message or the help of the given subcommand(s)' \
|
||||
)
|
||||
_describe -t commands 'sqlx commands' commands "$@"
|
||||
}
|
||||
(( $+functions[_sqlx__completions_commands] )) ||
|
||||
_sqlx__completions_commands() {
|
||||
local commands; commands=()
|
||||
_describe -t commands 'sqlx completions commands' commands "$@"
|
||||
}
|
||||
(( $+functions[_sqlx__database_commands] )) ||
|
||||
_sqlx__database_commands() {
|
||||
local commands; commands=(
|
||||
'create:Creates the database specified in your DATABASE_URL' \
|
||||
'drop:Drops the database specified in your DATABASE_URL' \
|
||||
'reset:Drops the database specified in your DATABASE_URL, re-creates it, and runs any pending migrations' \
|
||||
'setup:Creates the database specified in your DATABASE_URL and runs any pending migrations' \
|
||||
'help:Print this message or the help of the given subcommand(s)' \
|
||||
)
|
||||
_describe -t commands 'sqlx database commands' commands "$@"
|
||||
}
|
||||
(( $+functions[_sqlx__database__create_commands] )) ||
|
||||
_sqlx__database__create_commands() {
|
||||
local commands; commands=()
|
||||
_describe -t commands 'sqlx database create commands' commands "$@"
|
||||
}
|
||||
(( $+functions[_sqlx__database__drop_commands] )) ||
|
||||
_sqlx__database__drop_commands() {
|
||||
local commands; commands=()
|
||||
_describe -t commands 'sqlx database drop commands' commands "$@"
|
||||
}
|
||||
(( $+functions[_sqlx__database__help_commands] )) ||
|
||||
_sqlx__database__help_commands() {
|
||||
local commands; commands=(
|
||||
'create:Creates the database specified in your DATABASE_URL' \
|
||||
'drop:Drops the database specified in your DATABASE_URL' \
|
||||
'reset:Drops the database specified in your DATABASE_URL, re-creates it, and runs any pending migrations' \
|
||||
'setup:Creates the database specified in your DATABASE_URL and runs any pending migrations' \
|
||||
'help:Print this message or the help of the given subcommand(s)' \
|
||||
)
|
||||
_describe -t commands 'sqlx database help commands' commands "$@"
|
||||
}
|
||||
(( $+functions[_sqlx__database__help__create_commands] )) ||
|
||||
_sqlx__database__help__create_commands() {
|
||||
local commands; commands=()
|
||||
_describe -t commands 'sqlx database help create commands' commands "$@"
|
||||
}
|
||||
(( $+functions[_sqlx__database__help__drop_commands] )) ||
|
||||
_sqlx__database__help__drop_commands() {
|
||||
local commands; commands=()
|
||||
_describe -t commands 'sqlx database help drop commands' commands "$@"
|
||||
}
|
||||
(( $+functions[_sqlx__database__help__help_commands] )) ||
|
||||
_sqlx__database__help__help_commands() {
|
||||
local commands; commands=()
|
||||
_describe -t commands 'sqlx database help help commands' commands "$@"
|
||||
}
|
||||
(( $+functions[_sqlx__database__help__reset_commands] )) ||
|
||||
_sqlx__database__help__reset_commands() {
|
||||
local commands; commands=()
|
||||
_describe -t commands 'sqlx database help reset commands' commands "$@"
|
||||
}
|
||||
(( $+functions[_sqlx__database__help__setup_commands] )) ||
|
||||
_sqlx__database__help__setup_commands() {
|
||||
local commands; commands=()
|
||||
_describe -t commands 'sqlx database help setup commands' commands "$@"
|
||||
}
|
||||
(( $+functions[_sqlx__database__reset_commands] )) ||
|
||||
_sqlx__database__reset_commands() {
|
||||
local commands; commands=()
|
||||
_describe -t commands 'sqlx database reset commands' commands "$@"
|
||||
}
|
||||
(( $+functions[_sqlx__database__setup_commands] )) ||
|
||||
_sqlx__database__setup_commands() {
|
||||
local commands; commands=()
|
||||
_describe -t commands 'sqlx database setup commands' commands "$@"
|
||||
}
|
||||
(( $+functions[_sqlx__help_commands] )) ||
|
||||
_sqlx__help_commands() {
|
||||
local commands; commands=(
|
||||
'database:Group of commands for creating and dropping your database' \
|
||||
'prepare:Generate query metadata to support offline compile-time verification' \
|
||||
'migrate:Group of commands for creating and running migrations' \
|
||||
'completions:Generate shell completions for the specified shell' \
|
||||
'help:Print this message or the help of the given subcommand(s)' \
|
||||
)
|
||||
_describe -t commands 'sqlx help commands' commands "$@"
|
||||
}
|
||||
(( $+functions[_sqlx__help__completions_commands] )) ||
|
||||
_sqlx__help__completions_commands() {
|
||||
local commands; commands=()
|
||||
_describe -t commands 'sqlx help completions commands' commands "$@"
|
||||
}
|
||||
(( $+functions[_sqlx__help__database_commands] )) ||
|
||||
_sqlx__help__database_commands() {
|
||||
local commands; commands=(
|
||||
'create:Creates the database specified in your DATABASE_URL' \
|
||||
'drop:Drops the database specified in your DATABASE_URL' \
|
||||
'reset:Drops the database specified in your DATABASE_URL, re-creates it, and runs any pending migrations' \
|
||||
'setup:Creates the database specified in your DATABASE_URL and runs any pending migrations' \
|
||||
)
|
||||
_describe -t commands 'sqlx help database commands' commands "$@"
|
||||
}
|
||||
(( $+functions[_sqlx__help__database__create_commands] )) ||
|
||||
_sqlx__help__database__create_commands() {
|
||||
local commands; commands=()
|
||||
_describe -t commands 'sqlx help database create commands' commands "$@"
|
||||
}
|
||||
(( $+functions[_sqlx__help__database__drop_commands] )) ||
|
||||
_sqlx__help__database__drop_commands() {
|
||||
local commands; commands=()
|
||||
_describe -t commands 'sqlx help database drop commands' commands "$@"
|
||||
}
|
||||
(( $+functions[_sqlx__help__database__reset_commands] )) ||
|
||||
_sqlx__help__database__reset_commands() {
|
||||
local commands; commands=()
|
||||
_describe -t commands 'sqlx help database reset commands' commands "$@"
|
||||
}
|
||||
(( $+functions[_sqlx__help__database__setup_commands] )) ||
|
||||
_sqlx__help__database__setup_commands() {
|
||||
local commands; commands=()
|
||||
_describe -t commands 'sqlx help database setup commands' commands "$@"
|
||||
}
|
||||
(( $+functions[_sqlx__help__help_commands] )) ||
|
||||
_sqlx__help__help_commands() {
|
||||
local commands; commands=()
|
||||
_describe -t commands 'sqlx help help commands' commands "$@"
|
||||
}
|
||||
(( $+functions[_sqlx__help__migrate_commands] )) ||
|
||||
_sqlx__help__migrate_commands() {
|
||||
local commands; commands=(
|
||||
'add:Create a new migration with the given description' \
|
||||
'run:Run all pending migrations' \
|
||||
'revert:Revert the latest migration with a down file' \
|
||||
'info:List all available migrations' \
|
||||
'build-script:Generate a \`build.rs\` to trigger recompilation when a new migration is added' \
|
||||
)
|
||||
_describe -t commands 'sqlx help migrate commands' commands "$@"
|
||||
}
|
||||
(( $+functions[_sqlx__help__migrate__add_commands] )) ||
|
||||
_sqlx__help__migrate__add_commands() {
|
||||
local commands; commands=()
|
||||
_describe -t commands 'sqlx help migrate add commands' commands "$@"
|
||||
}
|
||||
(( $+functions[_sqlx__help__migrate__build-script_commands] )) ||
|
||||
_sqlx__help__migrate__build-script_commands() {
|
||||
local commands; commands=()
|
||||
_describe -t commands 'sqlx help migrate build-script commands' commands "$@"
|
||||
}
|
||||
(( $+functions[_sqlx__help__migrate__info_commands] )) ||
|
||||
_sqlx__help__migrate__info_commands() {
|
||||
local commands; commands=()
|
||||
_describe -t commands 'sqlx help migrate info commands' commands "$@"
|
||||
}
|
||||
(( $+functions[_sqlx__help__migrate__revert_commands] )) ||
|
||||
_sqlx__help__migrate__revert_commands() {
|
||||
local commands; commands=()
|
||||
_describe -t commands 'sqlx help migrate revert commands' commands "$@"
|
||||
}
|
||||
(( $+functions[_sqlx__help__migrate__run_commands] )) ||
|
||||
_sqlx__help__migrate__run_commands() {
|
||||
local commands; commands=()
|
||||
_describe -t commands 'sqlx help migrate run commands' commands "$@"
|
||||
}
|
||||
(( $+functions[_sqlx__help__prepare_commands] )) ||
|
||||
_sqlx__help__prepare_commands() {
|
||||
local commands; commands=()
|
||||
_describe -t commands 'sqlx help prepare commands' commands "$@"
|
||||
}
|
||||
(( $+functions[_sqlx__migrate_commands] )) ||
|
||||
_sqlx__migrate_commands() {
|
||||
local commands; commands=(
|
||||
'add:Create a new migration with the given description' \
|
||||
'run:Run all pending migrations' \
|
||||
'revert:Revert the latest migration with a down file' \
|
||||
'info:List all available migrations' \
|
||||
'build-script:Generate a \`build.rs\` to trigger recompilation when a new migration is added' \
|
||||
'help:Print this message or the help of the given subcommand(s)' \
|
||||
)
|
||||
_describe -t commands 'sqlx migrate commands' commands "$@"
|
||||
}
|
||||
(( $+functions[_sqlx__migrate__add_commands] )) ||
|
||||
_sqlx__migrate__add_commands() {
|
||||
local commands; commands=()
|
||||
_describe -t commands 'sqlx migrate add commands' commands "$@"
|
||||
}
|
||||
(( $+functions[_sqlx__migrate__build-script_commands] )) ||
|
||||
_sqlx__migrate__build-script_commands() {
|
||||
local commands; commands=()
|
||||
_describe -t commands 'sqlx migrate build-script commands' commands "$@"
|
||||
}
|
||||
(( $+functions[_sqlx__migrate__help_commands] )) ||
|
||||
_sqlx__migrate__help_commands() {
|
||||
local commands; commands=(
|
||||
'add:Create a new migration with the given description' \
|
||||
'run:Run all pending migrations' \
|
||||
'revert:Revert the latest migration with a down file' \
|
||||
'info:List all available migrations' \
|
||||
'build-script:Generate a \`build.rs\` to trigger recompilation when a new migration is added' \
|
||||
'help:Print this message or the help of the given subcommand(s)' \
|
||||
)
|
||||
_describe -t commands 'sqlx migrate help commands' commands "$@"
|
||||
}
|
||||
(( $+functions[_sqlx__migrate__help__add_commands] )) ||
|
||||
_sqlx__migrate__help__add_commands() {
|
||||
local commands; commands=()
|
||||
_describe -t commands 'sqlx migrate help add commands' commands "$@"
|
||||
}
|
||||
(( $+functions[_sqlx__migrate__help__build-script_commands] )) ||
|
||||
_sqlx__migrate__help__build-script_commands() {
|
||||
local commands; commands=()
|
||||
_describe -t commands 'sqlx migrate help build-script commands' commands "$@"
|
||||
}
|
||||
(( $+functions[_sqlx__migrate__help__help_commands] )) ||
|
||||
_sqlx__migrate__help__help_commands() {
|
||||
local commands; commands=()
|
||||
_describe -t commands 'sqlx migrate help help commands' commands "$@"
|
||||
}
|
||||
(( $+functions[_sqlx__migrate__help__info_commands] )) ||
|
||||
_sqlx__migrate__help__info_commands() {
|
||||
local commands; commands=()
|
||||
_describe -t commands 'sqlx migrate help info commands' commands "$@"
|
||||
}
|
||||
(( $+functions[_sqlx__migrate__help__revert_commands] )) ||
|
||||
_sqlx__migrate__help__revert_commands() {
|
||||
local commands; commands=()
|
||||
_describe -t commands 'sqlx migrate help revert commands' commands "$@"
|
||||
}
|
||||
(( $+functions[_sqlx__migrate__help__run_commands] )) ||
|
||||
_sqlx__migrate__help__run_commands() {
|
||||
local commands; commands=()
|
||||
_describe -t commands 'sqlx migrate help run commands' commands "$@"
|
||||
}
|
||||
(( $+functions[_sqlx__migrate__info_commands] )) ||
|
||||
_sqlx__migrate__info_commands() {
|
||||
local commands; commands=()
|
||||
_describe -t commands 'sqlx migrate info commands' commands "$@"
|
||||
}
|
||||
(( $+functions[_sqlx__migrate__revert_commands] )) ||
|
||||
_sqlx__migrate__revert_commands() {
|
||||
local commands; commands=()
|
||||
_describe -t commands 'sqlx migrate revert commands' commands "$@"
|
||||
}
|
||||
(( $+functions[_sqlx__migrate__run_commands] )) ||
|
||||
_sqlx__migrate__run_commands() {
|
||||
local commands; commands=()
|
||||
_describe -t commands 'sqlx migrate run commands' commands "$@"
|
||||
}
|
||||
(( $+functions[_sqlx__prepare_commands] )) ||
|
||||
_sqlx__prepare_commands() {
|
||||
local commands; commands=()
|
||||
_describe -t commands 'sqlx prepare commands' commands "$@"
|
||||
}
|
||||
|
||||
if [ "$funcstack[1]" = "_sqlx" ]; then
|
||||
_sqlx "$@"
|
||||
else
|
||||
compdef _sqlx sqlx
|
||||
fi
|
||||
120
config/zsh/completions/zoxide
Normal file
120
config/zsh/completions/zoxide
Normal file
@ -0,0 +1,120 @@
|
||||
#!/bin/env zsh
|
||||
# =============================================================================
|
||||
#
|
||||
# Utility functions for zoxide.
|
||||
#
|
||||
|
||||
# pwd based on the value of _ZO_RESOLVE_SYMLINKS.
|
||||
function __zoxide_pwd() {
|
||||
\builtin pwd -L
|
||||
}
|
||||
|
||||
# cd + custom logic based on the value of _ZO_ECHO.
|
||||
function __zoxide_cd() {
|
||||
# shellcheck disable=SC2164
|
||||
\builtin cd -- "$@"
|
||||
}
|
||||
|
||||
# =============================================================================
|
||||
#
|
||||
# Hook configuration for zoxide.
|
||||
#
|
||||
|
||||
# Hook to add new entries to the database.
|
||||
function __zoxide_hook() {
|
||||
# shellcheck disable=SC2312
|
||||
\command zoxide add -- "$(__zoxide_pwd)"
|
||||
}
|
||||
|
||||
# Initialize hook.
|
||||
# shellcheck disable=SC2154
|
||||
if [[ ${precmd_functions[(Ie)__zoxide_hook]:-} -eq 0 ]] && [[ ${chpwd_functions[(Ie)__zoxide_hook]:-} -eq 0 ]]; then
|
||||
chpwd_functions+=(__zoxide_hook)
|
||||
fi
|
||||
|
||||
# =============================================================================
|
||||
#
|
||||
# When using zoxide with --no-cmd, alias these internal functions as desired.
|
||||
#
|
||||
|
||||
# Jump to a directory using only keywords.
|
||||
function __zoxide_z() {
|
||||
# shellcheck disable=SC2199
|
||||
if [[ "$#" -eq 0 ]]; then
|
||||
__zoxide_cd ~
|
||||
elif [[ "$#" -eq 1 ]] && { [[ -d "$1" ]] || [[ "$1" = '-' ]] || [[ "$1" =~ ^[-+][0-9]$ ]]; }; then
|
||||
__zoxide_cd "$1"
|
||||
else
|
||||
\builtin local result
|
||||
# shellcheck disable=SC2312
|
||||
result="$(\command zoxide query --exclude "$(__zoxide_pwd)" -- "$@")" && __zoxide_cd "${result}"
|
||||
fi
|
||||
}
|
||||
|
||||
# Jump to a directory using interactive search.
|
||||
function __zoxide_zi() {
|
||||
\builtin local result
|
||||
result="$(\command zoxide query --interactive -- "$@")" && __zoxide_cd "${result}"
|
||||
}
|
||||
|
||||
# =============================================================================
|
||||
#
|
||||
# Commands for zoxide. Disable these using --no-cmd.
|
||||
#
|
||||
|
||||
function z() {
|
||||
__zoxide_z "$@"
|
||||
}
|
||||
|
||||
function zi() {
|
||||
__zoxide_zi "$@"
|
||||
}
|
||||
|
||||
# Completions.
|
||||
if [[ -o zle ]]; then
|
||||
__zoxide_result=''
|
||||
|
||||
function __zoxide_z_complete() {
|
||||
# Only show completions when the cursor is at the end of the line.
|
||||
# shellcheck disable=SC2154
|
||||
[[ "${#words[@]}" -eq "${CURRENT}" ]] || return 0
|
||||
|
||||
if [[ "${#words[@]}" -eq 2 ]]; then
|
||||
# Show completions for local directories.
|
||||
_files -/
|
||||
elif [[ "${words[-1]}" == '' ]]; then
|
||||
# Show completions for Space-Tab.
|
||||
# shellcheck disable=SC2086
|
||||
__zoxide_result="$(\command zoxide query --exclude "$(__zoxide_pwd || \builtin true)" --interactive -- ${words[2,-1]})" || __zoxide_result=''
|
||||
|
||||
# Bind '\e[0n' to helper function.
|
||||
\builtin bindkey '\e[0n' '__zoxide_z_complete_helper'
|
||||
# Send '\e[0n' to console input.
|
||||
\builtin printf '\e[5n'
|
||||
fi
|
||||
|
||||
# Report that the completion was successful, so that we don't fall back
|
||||
# to another completion function.
|
||||
return 0
|
||||
}
|
||||
|
||||
function __zoxide_z_complete_helper() {
|
||||
if [[ -n "${__zoxide_result}" ]]; then
|
||||
# shellcheck disable=SC2034,SC2296
|
||||
BUFFER="z ${(q-)__zoxide_result}"
|
||||
\builtin zle reset-prompt
|
||||
\builtin zle accept-line
|
||||
else
|
||||
\builtin zle reset-prompt
|
||||
fi
|
||||
}
|
||||
\builtin zle -N __zoxide_z_complete_helper
|
||||
|
||||
[[ "${+functions[compdef]}" -ne 0 ]] && \compdef __zoxide_z_complete z
|
||||
fi
|
||||
|
||||
# =============================================================================
|
||||
#
|
||||
# To initialize zoxide, add this to your configuration (usually ~/.zshrc):
|
||||
#
|
||||
eval "$(zoxide init zsh)"
|
||||
14
local/bin/swap-wallpaper
Normal file
14
local/bin/swap-wallpaper
Normal file
@ -0,0 +1,14 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
WALLPAPER_DIR="$HOME/Pictures/wallpapers/PoE2/3880x2160/"
|
||||
|
||||
if pgrep -x "Hyprland" >/dev/null; then
|
||||
CURRENT_WALL=$(hyprctl hyprpaper listloaded)
|
||||
WALLPAPER=$(fd --type file --exclude "$(basename "$CURRENT_WALL")" . "$WALLPAPER_DIR" | shuf -nz 1)
|
||||
hyprctl hyprpaper reload ,"$WALLPAPER"
|
||||
else
|
||||
WALLPAPER=$(fd --type file . "$WALLPAPER_DIR" | shuf -n 1)
|
||||
pkill swaybg 2>/dev/null || true
|
||||
swaybg -m fill -i "$WALLPAPER" &
|
||||
disown
|
||||
fi
|
||||
Loading…
Reference in New Issue
Block a user