commit 081fe0861977f524b755f0abb7cd6e8efa02a230 Author: Daniel Bulant Date: Mon Nov 13 21:17:35 2023 +0100 initial commit diff --git a/.config/chromium-flags.conf b/.config/chromium-flags.conf new file mode 100644 index 0000000..83b9d73 --- /dev/null +++ b/.config/chromium-flags.conf @@ -0,0 +1,10 @@ +#--enable-features=UseOzonePlatform +#--ozone-platform=wayland +#--ignore-gpu-blocklist +#--enable-gpu-rasterization +#--enable-zero-copy +#--disable-gpu-driver-bug-workarounds +#--enable-accelerated-video-decode +#--enable-features=VaapiVideoDecoder +#--use-gl=egl +#--ozone-platform-hint=auto diff --git a/.config/dunst/dunstrc b/.config/dunst/dunstrc new file mode 100644 index 0000000..094b8c9 --- /dev/null +++ b/.config/dunst/dunstrc @@ -0,0 +1,465 @@ +# See dunst(5) for all configuration options + +[global] + ### Display ### + + # Which monitor should the notifications be displayed on. + monitor = 0 + + # Display notification on focused monitor. Possible modes are: + # mouse: follow mouse pointer + # keyboard: follow window with keyboard focus + # none: don't follow anything + # + # "keyboard" needs a window manager that exports the + # _NET_ACTIVE_WINDOW property. + # This should be the case for almost all modern window managers. + # + # If this option is set to mouse or keyboard, the monitor option + # will be ignored. + follow = mouse + + ### Geometry ### + + # dynamic width from 0 to 300 + # width = (0, 300) + # constant width of 300 + width = 300 + + # The maximum height of a single notification, excluding the frame. + height = 300 + + # Position the notification in the top right corner + origin = top-right + + # Offset from the origin + offset = 20x20 + + # Scale factor. It is auto-detected if value is 0. + scale = 0 + + # Maximum number of notification (0 means no limit) + notification_limit = 20 + + ### Progress bar ### + + # Turn on the progess bar. It appears when a progress hint is passed with + # for example dunstify -h int:value:12 + progress_bar = true + + # Set the progress bar height. This includes the frame, so make sure + # it's at least twice as big as the frame width. + progress_bar_height = 10 + + # Set the frame width of the progress bar + progress_bar_frame_width = 0 + + # Set the minimum width for the progress bar + progress_bar_min_width = 125 + + # Set the maximum width for the progress bar + progress_bar_max_width = 250 + + # Corner radius for the progress bar. 0 disables rounded corners. + progress_bar_corner_radius = 4 + + # Corner radius for the icon image. + icon_corner_radius = 5 + + # Show how many messages are currently hidden (because of + # notification_limit). + indicate_hidden = yes + + # The transparency of the window. Range: [0; 100]. + # This option will only work if a compositing window manager is + # present (e.g. xcompmgr, compiz, etc.). (X11 only) + transparency = 30 + + # Draw a line of "separator_height" pixel height between two + # notifications. + # Set to 0 to disable. + # If gap_size is greater than 0, this setting will be ignored. + separator_height = 2 + + # Padding between text and separator. + padding = 8 + + # Horizontal padding. + horizontal_padding = 8 + + # Padding between text and icon. + text_icon_padding = 10 + + # Defines width in pixels of frame around the notification window. + # Set to 0 to disable. + frame_width = 3 + + # Defines color of the frame around the notification window. + #frame_color = "#eba0ac" + + # Size of gap to display between notifications - requires a compositor. + # If value is greater than 0, separator_height will be ignored and a border + # of size frame_width will be drawn around each notification instead. + # Click events on gaps do not currently propagate to applications below. + gap_size = 5 + + # Define a color for the separator. + # possible values are: + # * auto: dunst tries to find a color fitting to the background; + # * foreground: use the same color as the foreground; + # * frame: use the same color as the frame; + # * anything else will be interpreted as a X color. + separator_color = auto + + # Sort messages by urgency. + sort = yes + + # Don't remove messages, if the user is idle (no mouse or keyboard input) + # for longer than idle_threshold seconds. + # Set to 0 to disable. + # A client can set the 'transient' hint to bypass this. See the rules + # section for how to disable this if necessary + # idle_threshold = 120 + + ### Text ### + + font = Iosevka NF + + # The spacing between lines. If the height is smaller than the + # font height, it will get raised to the font height. + line_height = 3 + + # Possible values are: + # full: Allow a small subset of html markup in notifications: + # bold + # italic + # strikethrough + # underline + # + # For a complete reference see + # . + # + # strip: This setting is provided for compatibility with some broken + # clients that send markup even though it's not enabled on the + # server. Dunst will try to strip the markup but the parsing is + # simplistic so using this option outside of matching rules for + # specific applications *IS GREATLY DISCOURAGED*. + # + # no: Disable markup parsing, incoming notifications will be treated as + # plain text. Dunst will not advertise that it has the body-markup + # capability if this is set as a global setting. + # + # It's important to note that markup inside the format option will be parsed + # regardless of what this is set to. + markup = full + + # The format of the message. Possible variables are: + # %a appname + # %s summary + # %b body + # %i iconname (including its path) + # %I iconname (without its path) + # %p progress value if set ([ 0%] to [100%]) or nothing + # %n progress value if set without any extra characters + # %% Literal % + # Markup is allowed + format = "󰘳 %a\n%s\n%b" + + # Alignment of message text. + # Possible values are "left", "center" and "right". + alignment = left + + # Vertical alignment of message text and icon. + # Possible values are "top", "center" and "bottom". + vertical_alignment = center + + # Show age of message if message is older than show_age_threshold + # seconds. + # Set to -1 to disable. + show_age_threshold = 60 + + # Specify where to make an ellipsis in long lines. + # Possible values are "start", "middle" and "end". + ellipsize = middle + + # Ignore newlines '\n' in notifications. + ignore_newline = no + + # Stack together notifications with the same content + stack_duplicates = true + + # Hide the count of stacked notifications with the same content + hide_duplicate_count = false + + # Display indicators for URLs (U) and actions (A). + show_indicators = yes + + ### Icons ### + + # Recursive icon lookup. You can set a single theme, instead of having to + # define all lookup paths. + #enable_recursive_icon_lookup = true + + # Set icon theme (only used for recursive icon lookup) + #icon_theme = Adwaita + # You can also set multiple icon themes, with the leftmost one being used first. + icon_theme = "Tela-circle-dracula" + + # Align icons left/right/top/off + icon_position = left + + # Scale small icons up to this size, set to 0 to disable. Helpful + # for e.g. small files or high-dpi screens. In case of conflict, + # max_icon_size takes precedence over this. + min_icon_size = 32 + + # Scale larger icons down to this size, set to 0 to disable + max_icon_size = 128 + + # Paths to default icons (only neccesary when not using recursive icon lookup) + icon_path = /usr/share/icons/Tela-circle-dracula/16/actions:/usr/share/icons/Tela-circle-dracula/16/apps:/usr/share/icons/Tela-circle-dracula/16/devices:/usr/share/icons/Tela-circle-dracula/16/mimetypes:/usr/share/icons/Tela-circle-dracula/16/panel:/usr/share/icons/Tela-circle-dracula/16/places:/usr/share/icons/Tela-circle-dracula/16/status + + ### History ### + + # Should a notification popped up from history be sticky or timeout + # as if it would normally do. + sticky_history = yes + + # Maximum amount of notifications kept in history + history_length = 20 + + ### Misc/Advanced ### + + # dmenu path. + dmenu = /usr/bin/rofi -theme /home/dan/.config/themes/easy/rofi/networkmenu.rasi -dmenu -p dunst: + + # Browser for opening urls in context menu. + browser = /usr/bin/xdg-open + + # Always run rule-defined scripts, even if the notification is suppressed + always_run_script = true + + # Define the title of the windows spawned by dunst + title = Dunst + + # Define the class of the windows spawned by dunst + class = Dunst + + # Define the corner radius of the notification window + # in pixel size. If the radius is 0, you have no rounded + # corners. + # The radius will be automatically lowered if it exceeds half of the + # notification height to avoid clipping text and/or icons. + corner_radius = 10 + + # Ignore the dbus closeNotification message. + # Useful to enforce the timeout set by dunst configuration. Without this + # parameter, an application may close the notification sent before the + # user defined timeout. + ignore_dbusclose = false + + ### Wayland ### + # These settings are Wayland-specific. They have no effect when using X11 + + # Uncomment this if you want to let notications appear under fullscreen + # applications (default: overlay) + # layer = top + + # Set this to true to use X11 output on Wayland. + force_xwayland = false + + ### Legacy + + # Use the Xinerama extension instead of RandR for multi-monitor support. + # This setting is provided for compatibility with older nVidia drivers that + # do not support RandR and using it on systems that support RandR is highly + # discouraged. + # + # By enabling this setting dunst will not be able to detect when a monitor + # is connected or disconnected which might break follow mode if the screen + # layout changes. + force_xinerama = false + + ### mouse + + # Defines list of actions for each mouse event + # Possible values are: + # * none: Don't do anything. + # * do_action: Invoke the action determined by the action_name rule. If there is no + # such action, open the context menu. + # * open_url: If the notification has exactly one url, open it. If there are multiple + # ones, open the context menu. + # * close_current: Close current notification. + # * close_all: Close all notifications. + # * context: Open context menu for the notification. + # * context_all: Open context menu for all notifications. + # These values can be strung together for each mouse event, and + # will be executed in sequence. + mouse_left_click = context, close_current + mouse_middle_click = do_action, close_current + mouse_right_click = close_all + +# Experimental features that may or may not work correctly. Do not expect them +# to have a consistent behaviour across releases. +[experimental] + # Calculate the dpi to use on a per-monitor basis. + # If this setting is enabled the Xft.dpi value will be ignored and instead + # dunst will attempt to calculate an appropriate dpi value for each monitor + # using the resolution and physical size. This might be useful in setups + # where there are multiple screens with very different dpi values. + per_monitor_dpi = true + +# Every section that isn't one of the above is interpreted as a rules to +# override settings for certain messages. +# +# Messages can be matched by +# appname (discouraged, see desktop_entry) +# body +# category +# desktop_entry +# icon +# match_transient +# msg_urgency +# stack_tag +# summary +# +# and you can override the +# background +# foreground +# format +# frame_color +# fullscreen +# new_icon +# set_stack_tag +# set_transient +# set_category +# timeout +# urgency +# icon_position +# skip_display +# history_ignore +# action_name +# word_wrap +# ellipsize +# alignment +# hide_text +# +# Shell-like globbing will get expanded. +# +# Instead of the appname filter, it's recommended to use the desktop_entry filter. +# GLib based applications export their desktop-entry name. In comparison to the appname, +# the desktop-entry won't get localized. +# +# SCRIPTING +# You can specify a script that gets run when the rule matches by +# setting the "script" option. +# The script will be called as follows: +# script appname summary body icon urgency +# where urgency can be "LOW", "NORMAL" or "CRITICAL". +# +# NOTE: It might be helpful to run dunst -print in a terminal in order +# to find fitting options for rules. + +# Disable the transient hint so that idle_threshold cannot be bypassed from the +# client +#[transient_disable] +# match_transient = yes +# set_transient = no +# +# Make the handling of transient notifications more strict by making them not +# be placed in history. +#[transient_history_ignore] +# match_transient = yes +# history_ignore = yes + +# fullscreen values +# show: show the notifications, regardless if there is a fullscreen window opened +# delay: displays the new notification, if there is no fullscreen window active +# If the notification is already drawn, it won't get undrawn. +# pushback: same as delay, but when switching into fullscreen, the notification will get +# withdrawn from screen again and will get delayed like a new notification +[fullscreen_delay_everything] + fullscreen = delay +[fullscreen_show_critical] + msg_urgency = critical + fullscreen = show + +#[espeak] +# summary = "*" +# script = dunst_espeak.sh + +#[script-test] +# summary = "*script*" +# script = dunst_test.sh + +#[ignore] +# # This notification will not be displayed +# summary = "foobar" +# skip_display = true + +#[history-ignore] +# # This notification will not be saved in history +# summary = "foobar" +# history_ignore = yes + +#[skip-display] +# # This notification will not be displayed, but will be included in the history +# summary = "foobar" +# skip_display = yes + +#[signed_on] +# appname = Pidgin +# summary = "*signed on*" +# urgency = low +# +#[signed_off] +# appname = Pidgin +# summary = *signed off* +# urgency = low +# +#[says] +# appname = Pidgin +# summary = *says* +# urgency = critical +# +#[twitter] +# appname = Pidgin +# summary = *twitter.com* +# urgency = normal +# +#[stack-volumes] +# appname = "some_volume_notifiers" +# set_stack_tag = "volume" +# +# vim: ft=cfg + +[Type-1] + summary = "t1" + format = "%a" + +[Type-2] + summary = "t2" + format = "%a\n%b" + +[urgency_critical] + background = "#0C151D" + foreground = "#D81E5B" + frame_color = "#D81E5B" + icon = "~/.config/dunst/icons/critical.svg" + timeout = 0 + # Icon for notifications with critical urgency, uncomment to enable + #default_icon = /path/to/icon + +[urgency_low] + background = "#0C151D" + foreground = "#09BC8A" + frame_color = "#09BC8A" + # icon = "~/.config/dunst/icons/hyprdots.svg" + timeout = 10 + +[urgency_normal] + background = "#0C151D" + foreground = "#75DDDD" + frame_color = "#75DDDD" + # icon = "~/.config/dunst/icons/hyprdots.svg" + timeout = 10 diff --git a/.config/dunst/icons/arch.svg b/.config/dunst/icons/arch.svg new file mode 100644 index 0000000..5820a24 --- /dev/null +++ b/.config/dunst/icons/arch.svg @@ -0,0 +1,129 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/.config/dunst/icons/critical.svg b/.config/dunst/icons/critical.svg new file mode 100644 index 0000000..64379d1 --- /dev/null +++ b/.config/dunst/icons/critical.svg @@ -0,0 +1,47 @@ + + + + + + + + + diff --git a/.config/dunst/icons/hyprdots.png b/.config/dunst/icons/hyprdots.png new file mode 100644 index 0000000..2886bd6 Binary files /dev/null and b/.config/dunst/icons/hyprdots.png differ diff --git a/.config/dunst/icons/hyprdots.svg b/.config/dunst/icons/hyprdots.svg new file mode 100644 index 0000000..b66e113 --- /dev/null +++ b/.config/dunst/icons/hyprdots.svg @@ -0,0 +1,192 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/.config/dunst/icons/keyboard.svg b/.config/dunst/icons/keyboard.svg new file mode 100644 index 0000000..35dab29 --- /dev/null +++ b/.config/dunst/icons/keyboard.svg @@ -0,0 +1,105 @@ + + + + + + + + + + + + + + + + + + + diff --git a/.config/dunst/icons/vol/muted-mic.svg b/.config/dunst/icons/vol/muted-mic.svg new file mode 100644 index 0000000..b0d0e36 --- /dev/null +++ b/.config/dunst/icons/vol/muted-mic.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/.config/dunst/icons/vol/muted-speaker.svg b/.config/dunst/icons/vol/muted-speaker.svg new file mode 100644 index 0000000..49119fc --- /dev/null +++ b/.config/dunst/icons/vol/muted-speaker.svg @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/.config/dunst/icons/vol/unmuted-mic.svg b/.config/dunst/icons/vol/unmuted-mic.svg new file mode 100644 index 0000000..904908f --- /dev/null +++ b/.config/dunst/icons/vol/unmuted-mic.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/.config/dunst/icons/vol/unmuted-speaker.svg b/.config/dunst/icons/vol/unmuted-speaker.svg new file mode 100644 index 0000000..e003d3f --- /dev/null +++ b/.config/dunst/icons/vol/unmuted-speaker.svg @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/.config/dunst/icons/vol/vol-0.svg b/.config/dunst/icons/vol/vol-0.svg new file mode 100644 index 0000000..6535e5e --- /dev/null +++ b/.config/dunst/icons/vol/vol-0.svg @@ -0,0 +1,82 @@ + + + + + + + + + + + + + + diff --git a/.config/dunst/icons/vol/vol-10.svg b/.config/dunst/icons/vol/vol-10.svg new file mode 100644 index 0000000..823dee3 --- /dev/null +++ b/.config/dunst/icons/vol/vol-10.svg @@ -0,0 +1,85 @@ + + + + + + + + + + + + + + diff --git a/.config/dunst/icons/vol/vol-100.svg b/.config/dunst/icons/vol/vol-100.svg new file mode 100644 index 0000000..bff61a4 --- /dev/null +++ b/.config/dunst/icons/vol/vol-100.svg @@ -0,0 +1,82 @@ + + + + + + + + + + + + + + diff --git a/.config/dunst/icons/vol/vol-15.svg b/.config/dunst/icons/vol/vol-15.svg new file mode 100644 index 0000000..b96bd5c --- /dev/null +++ b/.config/dunst/icons/vol/vol-15.svg @@ -0,0 +1,85 @@ + + + + + + + + + + + + + + diff --git a/.config/dunst/icons/vol/vol-20.svg b/.config/dunst/icons/vol/vol-20.svg new file mode 100644 index 0000000..fe81cf4 --- /dev/null +++ b/.config/dunst/icons/vol/vol-20.svg @@ -0,0 +1,85 @@ + + + + + + + + + + + + + + diff --git a/.config/dunst/icons/vol/vol-25.svg b/.config/dunst/icons/vol/vol-25.svg new file mode 100644 index 0000000..bd4dab9 --- /dev/null +++ b/.config/dunst/icons/vol/vol-25.svg @@ -0,0 +1,85 @@ + + + + + + + + + + + + + + diff --git a/.config/dunst/icons/vol/vol-30.svg b/.config/dunst/icons/vol/vol-30.svg new file mode 100644 index 0000000..9225f42 --- /dev/null +++ b/.config/dunst/icons/vol/vol-30.svg @@ -0,0 +1,85 @@ + + + + + + + + + + + + + + diff --git a/.config/dunst/icons/vol/vol-35.svg b/.config/dunst/icons/vol/vol-35.svg new file mode 100644 index 0000000..211050c --- /dev/null +++ b/.config/dunst/icons/vol/vol-35.svg @@ -0,0 +1,85 @@ + + + + + + + + + + + + + + diff --git a/.config/dunst/icons/vol/vol-40.svg b/.config/dunst/icons/vol/vol-40.svg new file mode 100644 index 0000000..6ef2e3d --- /dev/null +++ b/.config/dunst/icons/vol/vol-40.svg @@ -0,0 +1,85 @@ + + + + + + + + + + + + + + diff --git a/.config/dunst/icons/vol/vol-45.svg b/.config/dunst/icons/vol/vol-45.svg new file mode 100644 index 0000000..bee965f --- /dev/null +++ b/.config/dunst/icons/vol/vol-45.svg @@ -0,0 +1,85 @@ + + + + + + + + + + + + + + diff --git a/.config/dunst/icons/vol/vol-5.svg b/.config/dunst/icons/vol/vol-5.svg new file mode 100644 index 0000000..5ad7f09 --- /dev/null +++ b/.config/dunst/icons/vol/vol-5.svg @@ -0,0 +1,84 @@ + + + + + + + + + + + + + + diff --git a/.config/dunst/icons/vol/vol-50.svg b/.config/dunst/icons/vol/vol-50.svg new file mode 100644 index 0000000..22d967c --- /dev/null +++ b/.config/dunst/icons/vol/vol-50.svg @@ -0,0 +1,84 @@ + + + + + + + + + + + + + + diff --git a/.config/dunst/icons/vol/vol-55.svg b/.config/dunst/icons/vol/vol-55.svg new file mode 100644 index 0000000..6868c5e --- /dev/null +++ b/.config/dunst/icons/vol/vol-55.svg @@ -0,0 +1,85 @@ + + + + + + + + + + + + + + diff --git a/.config/dunst/icons/vol/vol-60.svg b/.config/dunst/icons/vol/vol-60.svg new file mode 100644 index 0000000..2db27ec --- /dev/null +++ b/.config/dunst/icons/vol/vol-60.svg @@ -0,0 +1,85 @@ + + + + + + + + + + + + + + diff --git a/.config/dunst/icons/vol/vol-65.svg b/.config/dunst/icons/vol/vol-65.svg new file mode 100644 index 0000000..78b6404 --- /dev/null +++ b/.config/dunst/icons/vol/vol-65.svg @@ -0,0 +1,85 @@ + + + + + + + + + + + + + + diff --git a/.config/dunst/icons/vol/vol-70.svg b/.config/dunst/icons/vol/vol-70.svg new file mode 100644 index 0000000..8534bcb --- /dev/null +++ b/.config/dunst/icons/vol/vol-70.svg @@ -0,0 +1,85 @@ + + + + + + + + + + + + + + diff --git a/.config/dunst/icons/vol/vol-75.svg b/.config/dunst/icons/vol/vol-75.svg new file mode 100644 index 0000000..56bc16c --- /dev/null +++ b/.config/dunst/icons/vol/vol-75.svg @@ -0,0 +1,85 @@ + + + + + + + + + + + + + + diff --git a/.config/dunst/icons/vol/vol-80.svg b/.config/dunst/icons/vol/vol-80.svg new file mode 100644 index 0000000..b893b57 --- /dev/null +++ b/.config/dunst/icons/vol/vol-80.svg @@ -0,0 +1,85 @@ + + + + + + + + + + + + + + diff --git a/.config/dunst/icons/vol/vol-85.svg b/.config/dunst/icons/vol/vol-85.svg new file mode 100644 index 0000000..8bca371 --- /dev/null +++ b/.config/dunst/icons/vol/vol-85.svg @@ -0,0 +1,85 @@ + + + + + + + + + + + + + + diff --git a/.config/dunst/icons/vol/vol-90.svg b/.config/dunst/icons/vol/vol-90.svg new file mode 100644 index 0000000..2d4d648 --- /dev/null +++ b/.config/dunst/icons/vol/vol-90.svg @@ -0,0 +1,85 @@ + + + + + + + + + + + + + + diff --git a/.config/dunst/icons/vol/vol-95.svg b/.config/dunst/icons/vol/vol-95.svg new file mode 100644 index 0000000..d9a7903 --- /dev/null +++ b/.config/dunst/icons/vol/vol-95.svg @@ -0,0 +1,85 @@ + + + + + + + + + + + + + + diff --git a/.config/fastfetch/config.conf b/.config/fastfetch/config.conf new file mode 100644 index 0000000..ac82527 --- /dev/null +++ b/.config/fastfetch/config.conf @@ -0,0 +1,313 @@ +# Fastfetch configuration +# Write every argument in different lines. +# Direct arguments will overwrite the corresponding ones in this file. +# Argument keys are not case sensitive. +# Whitespaces are trimmed at the beginning and the end. +# Empty lines or lines starting with # are ignored. + +# This file was shipped with 1.7.0. +# Use fastfetch --print-config-user > ~/.config/fastfetch/config.conf to overwrite this file with the current defaults + +# Below some often usefull options are listed. Uncomment and modify them so they take affect. +# Note that there are a lot more options than the ones listed here, take a look at "fastfetch --help". +# Of course all of them can be made persistent here too. + +# Config option: +# Load additional config files. +# Some are shipped with fastfetch, list them with "fastfetch --list-presets". +# Must be a path to a config file or the name of a shipped preset. +# The config file is completly loaded before continuing in the current file, so the placement of this option matters, as later options overwrite already set ones. +# Can be used multiple times to load multiple config files / presets. +#--load-config /path/to/config.txt + +# Structure option: +# Sets the modules to use and their order. +# Must be a list of module names, separated by colons. +# List available modules with "fastfetch --list-modules". +# Get the default structure with "fastfetch --print-structure". +#--structure Title:Separator:OS:Host:Kernel:Uptime:Packages:Shell:Resolution:DE:WM:WMTheme:Theme:Icons:Font:Cursor:Terminal:TerminalFont:CPU:GPU:Memory:Disk:Battery:Locale:Break:Colors + +# Multithreading option: +# Sets if fastfetch should use multiple threads to detect the values. +# Must be true or false. +# Default is true. +#--multithreading true + +# Slow operations option: +# Sets if fastfetch is allowed to use known slow operations to detect more / better values. +# Must be true or false. +# Default is false. +#--allow-slow-operations false + +# Linewrap option: +# Sets if fastfetch should disable linewrap during the run. +# Must be true or false. +# Default is true. +#--disable-linewrap true + +# Cursor option: +# Sets if fastfetch should hide the console cursor during the run. +# Must be true or false. +# Default is true. +#--hide-cursor true + +# Logo option: +# Sets the logo to use. +# List available logos with "fastfetch --list-logos". +# Print available logos with "fastfetch --print-logos". +# Must be the name of an available logo or a path to a text file containing a custom logo. +# Default is the current distribution. +#--logo arch + +# Logo type option: +# Sets the logo type to use. +# Must be auto, builtin, file, raw, sixel, kitty or chafa. +# Default is auto. +#--logo-type auto + +# Logo width option: +# Sets the width of the logo (in characters) if the logo is an image. +# Must be a positive integer. +# Default is 65. +#--logo-width 65 + +# Logo height option: +# Sets the height of the logo (in characters) if the logo is an image. +# Must be a positive integer. +# Default is 0 (keeps aspect ration). +#--logo-height 0 + +# Logo color options: +# Overwrite a color in the logo. Also works for user provided logos. +# In the user logo, they replace $[1-9]. Use $$ to print a single $ sign. +# Must be linux console color codes or the name of a color. +# Default is the one specified by the logo. +# Use "fastfetch --help color" to learn more and see examples. +# Valid index range is [1-9]. +#--logo-color-1 red +#--logo-color-2 32 +# [...] +#--logo-color-9 yellow + +# Logo padding option: +# Adds a padding to the left and the right side of the logo. +# Must be a positive integer. +# Default is 0. +#--logo-padding 0 + +# Logo padding left option: +# Adds a padding to the left side of the logo. +# Must be a positive integer. +# Default is 0. +#--logo-padding-left 0 + +# Logo padding right option: +# Adds a padding to the right side of the logo. +# Must be a positive integer. +# Default is 0. +#--logo-padding-right 0 + +# Logo print remaining option: +# Sets if the remaining logo should be printed, it is has more lines than modules to show. +# Must be true or false. +# Default is true. +#--logo-print-remaining true + +# Color option: +# Sets the color of the keys. +# Must be linux console color codes or the name of a color. +# Default is the primary color of the logo. +# Use "fastfetch --help color" to learn more and see examples. +#--color magenta + +# Binary prefix option: +# Sets the binary prefix to use. +# Must be a IEC, SI or JEDEC. +# Default is IEC. +#--binary-prefix IEC + +# Title FQDN option: +# Sets if the title should use the fully qualified domain name. +# Must be true or false. +# Default is false. +#--title-fqdn false + +# Separator option: +# Sets the string placed between a key and its value. +# Can be any string. +# Default is ": ". +#--separator ": " + +# Separator string option: +# Sets the string printed by the "separator" module (usually between title and rest of output) +# Must be any string. It is repated / cut to fit perfectly. +# Default is "-" +#--separator-string - + +# Public IP timeout option: +# Sets the time to wait for the public ip server to respond. +# Must be a positive integer. +# Default is 0 (disabled). +#--public-ip-timeout 0 + +# OS file option +# Sets the path to the file containing the operating system information. +# Should be a valid path to an existing file. +# Note that you might need to run fastfetch with --recache once for it to take affect. +# Default is /etc/os-release. +#--os-file /etc/os-release + +# Player name option +# Sets the name of the player. This is also used in song detection +# Must be the exact name of the player or a dbus address (e.g. org.mpris.MediaPlayer2.spotify) +# Default is the first match starting with org.mpris.MediaPlayer2. +#--player-name spotify + +# Escape bedrock option +# Sets if fastfetch should escape the bedrock jail, if it detectes that it is running in one +# Must be true or false. +# Default is true. +#--escape-bedrock true + +# GL option +# Sets with opengl context creation library to use +# Must be either auto, egl, glx or osmesa +# Default is auto. +#--gl auto + +# Key options: +# Sets the displayed key of a module +# Can be any string. Some of theme take an argument like a format string. See "fastfetch --help format" for help. +#--os-key OS +#--host-key Host +#--kernel-key Kernel +#--uptime-key Uptime +#--processes-key Processes +#--packages-key Packages +#--shell-key Shell +#--resolution-key Resolution {1} +#--de-key DE +#--wm-key WM +#--wm-theme-key WM Theme +#--theme-key Theme +#--icons-key Icons +#--font-key Font +#--cursor-key Cursor +#--terminal-key Terminal +#--terminal-font-key Terminal Font +#--cpu-key CPU +#--cpu-usage-key CPU Usage +#--gpu-key GPU {1} +#--memory-key Memory +#--disk-key Disk ({1}) +#--battery-key Battery {1} +#--locale-key Locale +#--local-ip-key Local IP ({1}) +#--public-ip-key Public IP +#--player-key Media Player +#--song-key Song +#--datetime-key Date Time +#--vulkan-key Vulkan +#--opengl-key OpenGL +#--opencl-key OpenCL + +# Format options: +# Sets the format string for module values. +# For information on format strings, see "fastfetch --help format". +# To see the parameter they take and their default value, see "fastfetch --help *-format", e.g. "fastfetch --help os-format". +# An empty format string (As they are currently below) will behave as if it was not set. +#--os-format +#--host-format +#--kernel-format +#--uptime-format +#--processes-format +#--packages-format +#--shell-format +#--resolution-format +#--de-format +#--wm-format +#--wm-theme-format +#--theme-format +#--icons-format +#--font-format +#--cursor-format +#--terminal-format +#--terminal-font-format +#--cpu-format +#--cpu-usage-format +#--gpu-format +#--memory-format +#--disk-format +#--battery-format +#--locale-format +#--local-ip-format +#--public-ip-format +#--player-format +#--song-format +#--datetime-format +#--vulkan-format +#--opengl-format +#--opencl-format + +# Error options: +# Sets the format string to use if an error occured +# For information on format strings, see "fastfetch --help format". +# Each of them take the error as first and only argument. +# If one of them is set, the module will appear, even if --show-errors is not given. +#--os-error +#--host-error +#--kernel-error +#--uptime-error +#--processes-error +#--packages-error +#--shell-error +#--resolution-error +#--de-error +#--wm-error +#--wm-theme-error +#--theme-error +#--icons-error +#--font-error +#--cursor-error +#--terminal-error +#--terminal-font-error +#--cpu-error +#--cpu-usage-error +#--gpu-error +#--memory-error +#--disk-error +#--battery-error +#--locale-error +#--local-ip-error +#--public-ip-error +#--player-error +#--song-error +#--datetime-error +#--vulkan-error +#--opengl-error +#--opencl-error + +# Library options: +# Sets an user specific path to a library to load. +# Must be a valid path to a library. +#--lib-PCI /usr/lib/libpci.so +#--lib-vulkan /usr/lib/libvulkan.so +#--lib-wayland /usr/lib/libwayland-client.so +#--lib-xcb-randr /usr/lib/libxcb-randr.so +#--lib-xcb /usr/lib/libxcb.so +#--lib-Xrandr /usr/lib/libXrandr.so +#--lib-X11 /usr/lib/libX11.so +#--lib-gio /usr/lib/libgio-2.0.so +#--lib-DConf /usr/lib/libdconf.so +#--lib-DBus /usr/lib/libdbus-1.so +#--lib-XFConf /usr/lib/libxfconf-0.so +#--lib-sqlite3 /usr/lib/libsqlite3.so +#--lib-rpm /usr/lib/librpm.so +#--lib-imagemagick /usr/lib/libMagickCore-7.Q16HDRI.so +#--lib-z /usr/lib/libz.so +#--lib-chafa /usr/lib/libchafa.so +#--lib-egl /usr/lib/libEGL.so +#--lib-glx /usr/lib/libGLX.so +#--lib-osmesa /usr/lib/libOSMesa.so +#--lib-opencl /usr/lib/libOpenCL.so + \ No newline at end of file diff --git a/.config/fish/completions/fisher.fish b/.config/fish/completions/fisher.fish new file mode 100644 index 0000000..6d23ce4 --- /dev/null +++ b/.config/fish/completions/fisher.fish @@ -0,0 +1,7 @@ +complete --command fisher --exclusive --long help --description "Print help" +complete --command fisher --exclusive --long version --description "Print version" +complete --command fisher --exclusive --condition __fish_use_subcommand --arguments install --description "Install plugins" +complete --command fisher --exclusive --condition __fish_use_subcommand --arguments update --description "Update installed plugins" +complete --command fisher --exclusive --condition __fish_use_subcommand --arguments remove --description "Remove installed plugins" +complete --command fisher --exclusive --condition __fish_use_subcommand --arguments list --description "List installed plugins matching regex" +complete --command fisher --exclusive --condition "__fish_seen_subcommand_from update remove" --arguments "(fisher list)" diff --git a/.config/fish/completions/flamegraph.fish b/.config/fish/completions/flamegraph.fish new file mode 100644 index 0000000..fef1807 --- /dev/null +++ b/.config/fish/completions/flamegraph.fish @@ -0,0 +1,23 @@ +complete -c flamegraph -s p -l pid -d 'Profile a running process by pid' -r +complete -c flamegraph -l completions -d 'Generate shell completions for the given shell' -r -f -a "{bash '',elvish '',fish '',powershell '',zsh ''}" +complete -c flamegraph -s o -l output -d 'Output file' -r -F +complete -c flamegraph -s F -l freq -d 'Sampling frequency' -r +complete -c flamegraph -s c -l cmd -d 'Custom command for invoking perf/dtrace' -r +complete -c flamegraph -l notes -d 'Set embedded notes in SVG' -r +complete -c flamegraph -l min-width -d 'Omit functions smaller than pixels' -r +complete -c flamegraph -l image-width -d 'Image width in pixels' -r +complete -c flamegraph -l palette -d 'Color palette' -r -f -a "{aqua '',blue '',green '',hot '',io '',java '',js '',mem '',orange '',perl '',python '',purple '',red '',rust '',wakeup '',yellow ''}" +complete -c flamegraph -l skip-after -d 'Cut off stack frames below ; may be repeated' -r +complete -c flamegraph -l post-process -d 'Run a command to process the folded stacks, taking the input from stdin and outputting to stdout' -r +complete -c flamegraph -l perfdata -r -F +complete -c flamegraph -s v -l verbose -d 'Print extra output to help debug problems' +complete -c flamegraph -l open -d 'Open the output .svg file with default program' +complete -c flamegraph -l root -d 'Run with root privileges (using `sudo`)' +complete -c flamegraph -l deterministic -d 'Colors are selected such that the color of a function does not change between runs' +complete -c flamegraph -s i -l inverted -d 'Plot the flame graph up-side-down' +complete -c flamegraph -l reverse -d 'Generate stack-reversed flame graph' +complete -c flamegraph -l flamechart -d 'Produce a flame chart (sort by time, do not merge stacks)' +complete -c flamegraph -l ignore-status -d 'Ignores perf\'s exit code' +complete -c flamegraph -l no-inline -d 'Disable inlining for perf script because of performance issues' +complete -c flamegraph -s h -l help -d 'Print help' +complete -c flamegraph -s V -l version -d 'Print version' diff --git a/.config/fish/completions/fzf_configure_bindings.fish b/.config/fish/completions/fzf_configure_bindings.fish new file mode 100644 index 0000000..a78fd54 --- /dev/null +++ b/.config/fish/completions/fzf_configure_bindings.fish @@ -0,0 +1,7 @@ +complete fzf_configure_bindings --no-files +complete fzf_configure_bindings --long help --short h --description "Print help" +complete fzf_configure_bindings --long directory --description "Change the key binding for searching directory" +complete fzf_configure_bindings --long git_log --description "Change the key binding for searching git log" +complete fzf_configure_bindings --long git_status --description "Change the key binding for searching git status" +complete fzf_configure_bindings --long history --description "Change the key binding for searching history" +complete fzf_configure_bindings --long variables --description "Change the key binding for searching variables" diff --git a/.config/fish/completions/nvm.fish b/.config/fish/completions/nvm.fish new file mode 100644 index 0000000..c0ab183 --- /dev/null +++ b/.config/fish/completions/nvm.fish @@ -0,0 +1,21 @@ +complete --command nvm --exclusive +complete --command nvm --exclusive --long version --description "Print version" +complete --command nvm --exclusive --long help --description "Print help" +complete --command nvm --long silent --description "Suppress standard output" + +complete --command nvm --exclusive --condition __fish_use_subcommand --arguments install --description "Download and activate the specified Node version" +complete --command nvm --exclusive --condition __fish_use_subcommand --arguments use --description "Activate a version in the current shell" +complete --command nvm --exclusive --condition __fish_use_subcommand --arguments list --description "List installed versions" +complete --command nvm --exclusive --condition __fish_use_subcommand --arguments list-remote --description "List versions available to install matching optional regex" +complete --command nvm --exclusive --condition __fish_use_subcommand --arguments current --description "Print the currently-active version" +complete --command nvm --exclusive --condition "__fish_seen_subcommand_from install" --arguments "( + test -e $nvm_data && string split ' ' <$nvm_data/.index +)" +complete --command nvm --exclusive --condition "__fish_seen_subcommand_from use" --arguments "(_nvm_list | string split ' ')" +complete --command nvm --exclusive --condition __fish_use_subcommand --arguments uninstall --description "Uninstall a version" +complete --command nvm --exclusive --condition "__fish_seen_subcommand_from uninstall" --arguments "( + _nvm_list | string split ' ' | string replace system '' +)" +complete --command nvm --exclusive --condition "__fish_seen_subcommand_from use uninstall" --arguments "( + set --query nvm_default_version && echo default +)" diff --git a/.config/fish/completions/ory.fish b/.config/fish/completions/ory.fish new file mode 100644 index 0000000..2546827 --- /dev/null +++ b/.config/fish/completions/ory.fish @@ -0,0 +1,177 @@ +# fish completion for ory -*- shell-script -*- + +function __ory_debug + set -l file "$BASH_COMP_DEBUG_FILE" + if test -n "$file" + echo "$argv" >> $file + end +end + +function __ory_perform_completion + __ory_debug "Starting __ory_perform_completion" + + # Extract all args except the last one + set -l args (commandline -opc) + # Extract the last arg and escape it in case it is a space + set -l lastArg (string escape -- (commandline -ct)) + + __ory_debug "args: $args" + __ory_debug "last arg: $lastArg" + + # Disable ActiveHelp which is not supported for fish shell + set -l requestComp "ORY_ACTIVE_HELP=0 $args[1] __complete $args[2..-1] $lastArg" + + __ory_debug "Calling $requestComp" + set -l results (eval $requestComp 2> /dev/null) + + # Some programs may output extra empty lines after the directive. + # Let's ignore them or else it will break completion. + # Ref: https://github.com/spf13/cobra/issues/1279 + for line in $results[-1..1] + if test (string trim -- $line) = "" + # Found an empty line, remove it + set results $results[1..-2] + else + # Found non-empty line, we have our proper output + break + end + end + + set -l comps $results[1..-2] + set -l directiveLine $results[-1] + + # For Fish, when completing a flag with an = (e.g., -n=) + # completions must be prefixed with the flag + set -l flagPrefix (string match -r -- '-.*=' "$lastArg") + + __ory_debug "Comps: $comps" + __ory_debug "DirectiveLine: $directiveLine" + __ory_debug "flagPrefix: $flagPrefix" + + for comp in $comps + printf "%s%s\n" "$flagPrefix" "$comp" + end + + printf "%s\n" "$directiveLine" +end + +# This function does two things: +# - Obtain the completions and store them in the global __ory_comp_results +# - Return false if file completion should be performed +function __ory_prepare_completions + __ory_debug "" + __ory_debug "========= starting completion logic ==========" + + # Start fresh + set --erase __ory_comp_results + + set -l results (__ory_perform_completion) + __ory_debug "Completion results: $results" + + if test -z "$results" + __ory_debug "No completion, probably due to a failure" + # Might as well do file completion, in case it helps + return 1 + end + + set -l directive (string sub --start 2 $results[-1]) + set --global __ory_comp_results $results[1..-2] + + __ory_debug "Completions are: $__ory_comp_results" + __ory_debug "Directive is: $directive" + + set -l shellCompDirectiveError 1 + set -l shellCompDirectiveNoSpace 2 + set -l shellCompDirectiveNoFileComp 4 + set -l shellCompDirectiveFilterFileExt 8 + set -l shellCompDirectiveFilterDirs 16 + + if test -z "$directive" + set directive 0 + end + + set -l compErr (math (math --scale 0 $directive / $shellCompDirectiveError) % 2) + if test $compErr -eq 1 + __ory_debug "Received error directive: aborting." + # Might as well do file completion, in case it helps + return 1 + end + + set -l filefilter (math (math --scale 0 $directive / $shellCompDirectiveFilterFileExt) % 2) + set -l dirfilter (math (math --scale 0 $directive / $shellCompDirectiveFilterDirs) % 2) + if test $filefilter -eq 1; or test $dirfilter -eq 1 + __ory_debug "File extension filtering or directory filtering not supported" + # Do full file completion instead + return 1 + end + + set -l nospace (math (math --scale 0 $directive / $shellCompDirectiveNoSpace) % 2) + set -l nofiles (math (math --scale 0 $directive / $shellCompDirectiveNoFileComp) % 2) + + __ory_debug "nospace: $nospace, nofiles: $nofiles" + + # If we want to prevent a space, or if file completion is NOT disabled, + # we need to count the number of valid completions. + # To do so, we will filter on prefix as the completions we have received + # may not already be filtered so as to allow fish to match on different + # criteria than the prefix. + if test $nospace -ne 0; or test $nofiles -eq 0 + set -l prefix (commandline -t | string escape --style=regex) + __ory_debug "prefix: $prefix" + + set -l completions (string match -r -- "^$prefix.*" $__ory_comp_results) + set --global __ory_comp_results $completions + __ory_debug "Filtered completions are: $__ory_comp_results" + + # Important not to quote the variable for count to work + set -l numComps (count $__ory_comp_results) + __ory_debug "numComps: $numComps" + + if test $numComps -eq 1; and test $nospace -ne 0 + # We must first split on \t to get rid of the descriptions to be + # able to check what the actual completion will be. + # We don't need descriptions anyway since there is only a single + # real completion which the shell will expand immediately. + set -l split (string split --max 1 \t $__ory_comp_results[1]) + + # Fish won't add a space if the completion ends with any + # of the following characters: @=/:., + set -l lastChar (string sub -s -1 -- $split) + if not string match -r -q "[@=/:.,]" -- "$lastChar" + # In other cases, to support the "nospace" directive we trick the shell + # by outputting an extra, longer completion. + __ory_debug "Adding second completion to perform nospace directive" + set --global __ory_comp_results $split[1] $split[1]. + __ory_debug "Completions are now: $__ory_comp_results" + end + end + + if test $numComps -eq 0; and test $nofiles -eq 0 + # To be consistent with bash and zsh, we only trigger file + # completion when there are no other completions + __ory_debug "Requesting file completion" + return 1 + end + end + + return 0 +end + +# Since Fish completions are only loaded once the user triggers them, we trigger them ourselves +# so we can properly delete any completions provided by another script. +# Only do this if the program can be found, or else fish may print some errors; besides, +# the existing completions will only be loaded if the program can be found. +if type -q "ory" + # The space after the program name is essential to trigger completion for the program + # and not completion of the program name itself. + # Also, we use '> /dev/null 2>&1' since '&>' is not supported in older versions of fish. + complete --do-complete "ory " > /dev/null 2>&1 +end + +# Remove any pre-existing completions for the program since we will be handling all of them. +complete -c ory -e + +# The call to __ory_prepare_completions will setup __ory_comp_results +# which provides the program's completion choices. +complete -c ory -n '__ory_prepare_completions' -f -a '$__ory_comp_results' + diff --git a/.config/fish/completions/spark.fish b/.config/fish/completions/spark.fish new file mode 100644 index 0000000..d8daeed --- /dev/null +++ b/.config/fish/completions/spark.fish @@ -0,0 +1,4 @@ +complete --command spark --exclusive --long min --description "Minimum range" +complete --command spark --exclusive --long max --description "Maximum range" +complete --command spark --exclusive --long version --description "Print version" +complete --command spark --exclusive --long help --description "Print this help message" diff --git a/.config/fish/completions/tide.fish b/.config/fish/completions/tide.fish new file mode 100644 index 0000000..2d3784d --- /dev/null +++ b/.config/fish/completions/tide.fish @@ -0,0 +1,12 @@ +complete tide --no-files + +set -l subcommands bug-report configure + +complete tide -x -n __fish_use_subcommand -a bug-report -d "Print info for use in bug reports" +complete tide -x -n __fish_use_subcommand -a configure -d "Run the configuration wizard" + +complete tide -x -n "not __fish_seen_subcommand_from $subcommands" -s h -l help -d "Print help message" +complete tide -x -n "not __fish_seen_subcommand_from $subcommands" -s v -l version -d "Print tide version" + +complete tide -x -n '__fish_seen_subcommand_from bug-report' -l clean -d "Run clean Fish instance and install Tide" +complete tide -x -n '__fish_seen_subcommand_from bug-report' -l verbose -d "Print full Tide configuration" diff --git a/.config/fish/conf.d/_tide_init.fish b/.config/fish/conf.d/_tide_init.fish new file mode 100644 index 0000000..939f17c --- /dev/null +++ b/.config/fish/conf.d/_tide_init.fish @@ -0,0 +1,41 @@ +function _tide_init_install --on-event _tide_init_install + set -U VIRTUAL_ENV_DISABLE_PROMPT true + + source (functions --details _tide_sub_configure) + _load_config lean + _tide_finish + + if status is-interactive + tide bug-report --check || sleep 4 + + if contains ilancosman/tide (string lower $_fisher_plugins) + set_color bryellow + echo "ilancosman/tide is a development branch. Please install from a release tag:" + echo -ns "fisher install ilancosman/tide@v5" | fish_indent --ansi + sleep 3 + end + + switch (read --prompt-str="Configure tide prompt? [Y/n] " | string lower) + case y ye yes '' + tide configure + case '*' + echo -s \n 'Run ' (echo -ns "tide configure" | fish_indent --ansi) ' to customize your prompt.' + end + end +end + +function _tide_init_update --on-event _tide_init_update + # Warn users who install from main branch + if contains ilancosman/tide (string lower $_fisher_plugins) + set_color bryellow + echo "ilancosman/tide is a development branch. Please install from a release tag:" + echo -ns "fisher install ilancosman/tide@v5" | fish_indent --ansi + sleep 3 + end +end + +function _tide_init_uninstall --on-event _tide_init_uninstall + set -e VIRTUAL_ENV_DISABLE_PROMPT + set -e (set -U --names | string match --entire -r '^_?tide') + functions --erase (functions --all | string match --entire -r '^_?tide') +end diff --git a/.config/fish/conf.d/abbr_tips.fish b/.config/fish/conf.d/abbr_tips.fish new file mode 100644 index 0000000..848ee6d --- /dev/null +++ b/.config/fish/conf.d/abbr_tips.fish @@ -0,0 +1,155 @@ +for mode in default insert + bind --mode $mode " " '__abbr_tips_bind_space' + bind --mode $mode \n '__abbr_tips_bind_newline' + bind --mode $mode \r '__abbr_tips_bind_newline' +end + +set -g __abbr_tips_used 0 + +# Trim simple/double quotes from args +function trim_value + echo "$argv" | string trim --left --right --chars '"\'' | string join ' ' +end + +function __abbr_tips_install --on-event abbr_tips_install + # Regexes used to find abbreviation inside command + # Only the first matching group will be tested as an abbr + set -Ux ABBR_TIPS_REGEXES + set -a ABBR_TIPS_REGEXES '(^(\w+\s+)+(-{1,2})\w+)(\s\S+)' + set -a ABBR_TIPS_REGEXES '(^(\s?(\w-?)+){3}).*' + set -a ABBR_TIPS_REGEXES '(^(\s?(\w-?)+){2}).*' + set -a ABBR_TIPS_REGEXES '(^(\s?(\w-?)+){1}).*' + + set -Ux ABBR_TIPS_PROMPT "\n💡 \e[1m{{ .abbr }}\e[0m => {{ .cmd }}" + set -gx ABBR_TIPS_AUTO_UPDATE 'background' + + # Locking mechanism + # Prevent this file to spawn more than one subshell + if test "$USER" != 'root' + fish -c '__abbr_tips_init' & + end +end + +function __abbr_tips --on-event fish_postexec -d "Abbreviation reminder for the current command" + set -l command (string split ' ' -- "$argv") + set -l cmd (string replace -r -a '\\s+' ' ' -- "$argv" ) + + # Update abbreviations lists when adding/removing abbreviations + if test "$command[1]" = "abbr" + # Parse args as abbr options + argparse --name 'abbr' --ignore-unknown 'a/add' 'e/erase' 'g/global' 'U/universal' -- $command + + if set -q _flag_a + and not contains -- "$argv[2]" $__ABBR_TIPS_KEYS + set -a __ABBR_TIPS_KEYS "$argv[2]" + set -a __ABBR_TIPS_VALUES (trim_value "$argv[3..-1]") + else if set -q _flag_e + and set -l abb (contains -i -- "$argv[2]" $__ABBR_TIPS_KEYS) + set -e __ABBR_TIPS_KEYS[$abb] + set -e __ABBR_TIPS_VALUES[$abb] + end + else if test "$command[1]" = "alias" + # Update abbreviations list when adding aliases + set -l alias_key + set -l alias_value + + # Parse args as `alias` options + argparse --name 'alias' --ignore-unknown 's/save' -- $command + + if string match -q '*=*' -- "$argv[2]" + if test (count $argv) = 2 + set command_split (string split '=' -- $argv[2]) + set alias_key "a__$command_split[1]" + set alias_value $command_split[2] + set -a alias_value $command[3..-1] + end + else + set alias_key "a__$argv[2]" + set alias_value $argv[3..-1] + end + + set alias_value (trim_value "$alias_value") + + if set -l abb (contains -i -- "$argv[3..-1]" $__ABBR_TIPS_KEYS) + set __ABBR_TIPS_KEYS[$abb] $alias_key + set __ABBR_TIPS_VALUES[$abb] $alias_value + else + set -a __ABBR_TIPS_KEYS $alias_key + set -a __ABBR_TIPS_VALUES $alias_value + end + else if test "$command[1]" = "functions" + # Parse args as `functions` options + argparse --name 'functions' 'e/erase' -- $command + + # Update abbreviations list when removing aliases + if set -q _flag_e + and set -l abb (contains -i -- a__{$argv[2]} $__ABBR_TIPS_KEYS) + set -e __ABBR_TIPS_KEYS[$abb] + set -e __ABBR_TIPS_VALUES[$abb] + end + end + + # Exit in the following cases : + # - abbreviation has been used + # - command is already an abbreviation + # - command not found + # - or it's a function (alias) + if test $__abbr_tips_used = 1 + set -g __abbr_tips_used 0 + return + else if abbr -q "$cmd" + or not type -q "$command[1]" + return + else if string match -q -- "alias $cmd *" (alias) + return + else if test (type -t "$command[1]") = 'function' + and count $ABBR_TIPS_ALIAS_WHITELIST >/dev/null + and not contains "$command[1]" $ABBR_TIPS_ALIAS_WHITELIST + return + end + + set -l abb + if not set abb (contains -i -- "$cmd" $__ABBR_TIPS_VALUES) + for r in $ABBR_TIPS_REGEXES + if set abb (contains -i -- (string replace -r -a -- "$r" '$1' "$cmd") $__ABBR_TIPS_VALUES) + break + end + end + end + + if test -n "$abb" + if string match -q "a__*" -- "$__ABBR_TIPS_KEYS[$abb]" + set -l alias (string sub -s 4 -- "$__ABBR_TIPS_KEYS[$abb]") + if functions -q "$alias" + echo -e (string replace -a '{{ .cmd }}' -- "$__ABBR_TIPS_VALUES[$abb]" \ + (string replace -a '{{ .abbr }}' -- "$alias" "$ABBR_TIPS_PROMPT")) + else + set -e __ABBR_TIPS_KEYS[$abb] + set -e __ABBR_TIPS_VALUES[$abb] + end + else + echo -e (string replace -a '{{ .cmd }}' -- "$__ABBR_TIPS_VALUES[$abb]" \ + (string replace -a '{{ .abbr }}' -- "$__ABBR_TIPS_KEYS[$abb]" "$ABBR_TIPS_PROMPT")) + end + end + + return +end + +function __abbr_tips_uninstall --on-event abbr_tips_uninstall + bind --erase \n + bind --erase \r + bind --erase " " + set --erase __abbr_tips_used + set --erase __abbr_tips_run_once + set --erase __ABBR_TIPS_VALUES + set --erase __ABBR_TIPS_KEYS + set --erase ABBR_TIPS_PROMPT + set --erase ABBR_TIPS_AUTO_UPDATE + set --erase ABBR_TIPS_ALIAS_WHITELIST + set --erase ABBR_TIPS_REGEXES + functions --erase __abbr_tips_init + functions --erase __abbr_tips_bind_newline + functions --erase __abbr_tips_bind_space + functions --erase __abbr_tips +end diff --git a/.config/fish/conf.d/autopair.fish b/.config/fish/conf.d/autopair.fish new file mode 100644 index 0000000..abb4bf3 --- /dev/null +++ b/.config/fish/conf.d/autopair.fish @@ -0,0 +1,39 @@ +status is-interactive || exit + +set --global autopair_left "(" "[" "{" '"' "'" +set --global autopair_right ")" "]" "}" '"' "'" +set --global autopair_pairs "()" "[]" "{}" '""' "''" + +function _autopair_fish_key_bindings --on-variable fish_key_bindings + set --query fish_key_bindings[1] || return + + test $fish_key_bindings = fish_default_key_bindings && + set --local mode default insert || + set --local mode insert default + + bind --mode $mode[-1] --erase \177 \b \t + + bind --mode $mode[1] \177 _autopair_backspace # macOS ⌫ + bind --mode $mode[1] \b _autopair_backspace + bind --mode $mode[1] \t _autopair_tab + + printf "%s\n" $autopair_pairs | while read --local left right --delimiter "" + bind --mode $mode[-1] --erase $left $right + if test $left = $right + bind --mode $mode[1] $left "_autopair_insert_same \\$left" + else + bind --mode $mode[1] $left "_autopair_insert_left \\$left \\$right" + bind --mode $mode[1] $right "_autopair_insert_right \\$right" + end + end +end + +_autopair_fish_key_bindings + +function _autopair_uninstall --on-event autopair_uninstall + string collect ( + bind --all | string replace --filter --regex -- "_autopair.*" --erase + set --names | string replace --filter --regex -- "^autopair" "set --erase autopair" + ) | source + functions --erase (functions --all | string match "_autopair_*") +end diff --git a/.config/fish/conf.d/done.fish b/.config/fish/conf.d/done.fish new file mode 100644 index 0000000..b1a989b --- /dev/null +++ b/.config/fish/conf.d/done.fish @@ -0,0 +1,300 @@ +# MIT License + +# Copyright (c) 2016 Francisco Lourenço & Daniel Wehner + +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: + +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. + +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + +if not status is-interactive + exit +end + +set -g __done_version 1.16.5 + +function __done_run_powershell_script + set -l powershell_exe (command --search "powershell.exe") + + if test $status -ne 0 + and command --search wslvar + + set -l powershell_exe (wslpath (wslvar windir)/System32/WindowsPowerShell/v1.0/powershell.exe) + end + + if string length --quiet "$powershell_exe" + and test -x "$powershell_exe" + + set cmd (string escape $argv) + + eval "$powershell_exe -Command $cmd" + end +end + +function __done_windows_notification -a title -a message + if test "$__done_notify_sound" -eq 1 + set soundopt "