diff options
author | Justine Smithies <justine@smithies.me.uk> | 2023-08-22 19:43:07 +0100 |
---|---|---|
committer | Justine Smithies <justine@smithies.me.uk> | 2023-08-22 19:43:07 +0100 |
commit | 86c0c3694c93025dfec23f27266905c12f446a4e (patch) | |
tree | 32ee6e5cc84b6e2962a998d788554cb984fb7a8e | |
parent | 3058d6df77817de298a207d36b8b0871893c417a (diff) |
Initial commit
30 files changed, 1897 insertions, 0 deletions
diff --git a/.config/bat/config b/.config/bat/config new file mode 100755 index 0000000..bc2ec99 --- /dev/null +++ b/.config/bat/config @@ -0,0 +1,32 @@ +# This is `bat`s configuration file. Each line either contains a comment or +# a command-line option that you want to pass to `bat` by default. You can +# run `bat --help` to get a list of all possible configuration options. + +# Specify desired highlighting theme (e.g. "TwoDark"). Run `bat --list-themes` +# for a list of all available themes +#--theme="TwoDark" +--theme="gruvbox-dark" + +# Enable this to use italic text on the terminal. This is not supported on all +# terminal emulators (like tmux, by default): +#--italic-text=always + +# Uncomment the following line to disable automatic paging: +--paging=never + +# Uncomment the following line if you are using less version >= 551 and want to +# enable mouse scrolling support in `bat` when running inside tmux. This might +# disable text selection, unless you press shift. +#--pager="less --RAW-CONTROL-CHARS --quit-if-one-screen --mouse" + +# Syntax mappings: map a certain filename pattern to a language. +# Example 1: use the C++ syntax for .ino files +# Example 2: Use ".gitignore"-style highlighting for ".ignore" files +#--map-syntax "*.ino:C++" +#--map-syntax ".ignore:Git Ignore" + +# Force colorization +# --force-colorization + +# Show line numbers, Git modifications and file header (but no grid) +--style="plain" diff --git a/.config/btop/btop.conf b/.config/btop/btop.conf new file mode 100755 index 0000000..11a85b7 --- /dev/null +++ b/.config/btop/btop.conf @@ -0,0 +1,212 @@ +#? Config file for btop v. 1.2.13 + +#* 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" +color_theme = "Default" + +#* If the theme set background should be shown, set to False if you want terminal background transparency. +theme_background = True + +#* Sets if 24-bit truecolor should be used, will convert 24-bit colors to 256 color (6x6x6 color cube) if false. +truecolor = True + +#* Set to true to force tty mode regardless if a real tty has been detected or not. +#* Will force 16-color mode and TTY theme, set all graph symbols to "tty" and swap out other non tty friendly symbols. +force_tty = False + +#* Define presets for the layout of the boxes. Preset 0 is always all boxes shown with default settings. Max 9 presets. +#* Format: "box_name:P:G,box_name:P:G" P=(0 or 1) for alternate positions, G=graph symbol to use for box. +#* Use whitespace " " as separator between different presets. +#* Example: "cpu:0:default,mem:0:tty,proc:1:default cpu:0:braille,proc:0:tty" +presets = "cpu:1:default,proc:0:default cpu:0:default,mem:0:default,net:0:default cpu:0:block,net:0:tty" + +#* Set to True to enable "h,j,k,l,g,G" keys for directional control in lists. +#* Conflicting keys for h:"help" and k:"kill" is accessible while holding shift. +vim_keys = False + +#* Rounded corners on boxes, is ignored if TTY mode is ON. +rounded_corners = True + +#* Default symbols to use for graph creation, "braille", "block" or "tty". +#* "braille" offers the highest resolution but might not be included in all fonts. +#* "block" has half the resolution of braille but uses more common characters. +#* "tty" uses only 3 different symbols but will work with most fonts and should work in a real TTY. +#* Note that "tty" only has half the horizontal resolution of the other two, so will show a shorter historical view. +graph_symbol = "braille" + +# Graph symbol to use for graphs in cpu box, "default", "braille", "block" or "tty". +graph_symbol_cpu = "default" + +# Graph symbol to use for graphs in cpu box, "default", "braille", "block" or "tty". +graph_symbol_mem = "default" + +# Graph symbol to use for graphs in cpu box, "default", "braille", "block" or "tty". +graph_symbol_net = "default" + +# Graph symbol to use for graphs in cpu box, "default", "braille", "block" or "tty". +graph_symbol_proc = "default" + +#* Manually set which boxes to show. Available values are "cpu mem net proc", separate values with whitespace. +shown_boxes = "cpu mem net proc" + +#* Update time in milliseconds, recommended 2000 ms or above for better sample times for graphs. +update_ms = 2000 + +#* 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 lazy" + +#* Reverse sorting order, True or False. +proc_reversed = False + +#* Show processes as a tree. +proc_tree = False + +#* Use the cpu graph colors in the process list. +proc_colors = True + +#* Use a darkening gradient in the process list. +proc_gradient = True + +#* If process cpu usage should be of the core it's running on or usage of the total available cpu power. +proc_per_core = False + +#* Show process memory as bytes instead of percent. +proc_mem_bytes = True + +#* Show cpu graph for each process. +proc_cpu_graphs = True + +#* Use /proc/[pid]/smaps for memory information in the process info box (very slow but more accurate) +proc_info_smaps = False + +#* Show proc box on left side of screen instead of right. +proc_left = False + +#* (Linux) Filter processes tied to the Linux kernel(similar behavior to htop). +proc_filter_kernel = False + +#* Sets the CPU stat shown in upper half of the CPU graph, "total" is always available. +#* Select from a list of detected attributes from the options menu. +cpu_graph_upper = "total" + +#* Sets the CPU stat shown in lower half of the CPU graph, "total" is always available. +#* Select from a list of detected attributes from the options menu. +cpu_graph_lower = "total" + +#* Toggles if the lower CPU graph should be inverted. +cpu_invert_lower = True + +#* Set to True to completely disable the lower CPU graph. +cpu_single_graph = False + +#* Show cpu box at bottom of screen instead of top. +cpu_bottom = False + +#* Shows the system uptime in the CPU box. +show_uptime = True + +#* Show cpu temperature. +check_temp = True + +#* Which sensor to use for cpu temperature, use options menu to select from list of available sensors. +cpu_sensor = "Auto" + +#* Show temperatures for cpu cores also if check_temp is True and sensors has been found. +show_coretemp = True + +#* Set a custom mapping between core and coretemp, can be needed on certain cpus to get correct temperature for correct core. +#* Use lm-sensors or similar to see which cores are reporting temperatures on your machine. +#* Format "x:y" x=core with wrong temp, y=core with correct temp, use space as separator between multiple entries. +#* Example: "4:0 5:1 6:3" +cpu_core_map = "" + +#* Which temperature scale to use, available values: "celsius", "fahrenheit", "kelvin" and "rankine". +temp_scale = "celsius" + +#* Use base 10 for bits/bytes sizes, KB = 1000 instead of KiB = 1024. +base_10_sizes = False + +#* Show CPU frequency. +show_cpu_freq = True + +#* Draw a clock at top of screen, formatting according to strftime, empty string to disable. +#* Special formatting: /host = hostname | /user = username | /uptime = system uptime +clock_format = "%X" + +#* Update main ui in background when menus are showing, set this to false if the menus is flickering too much for comfort. +background_update = True + +#* Custom cpu model name, empty string to disable. +custom_cpu_name = "" + +#* Optional filter for shown disks, should be full path of a mountpoint, separate multiple values with whitespace " ". +#* Begin line with "exclude=" to change to exclude filter, otherwise defaults to "most include" filter. Example: disks_filter="exclude=/boot /home/user". +disks_filter = "" + +#* Show graphs instead of meters for memory values. +mem_graphs = True + +#* Show mem box below net box instead of above. +mem_below_net = False + +#* Count ZFS ARC in cached and available memory. +zfs_arc_cached = True + +#* If swap memory should be shown in memory box. +show_swap = True + +#* Show swap as a disk, ignores show_swap value above, inserts itself after first disk. +swap_disk = True + +#* If mem box should be split to also show disks info. +show_disks = True + +#* Filter out non physical disks. Set this to False to include network disks, RAM disks and similar. +only_physical = True + +#* Read disks list from /etc/fstab. This also disables only_physical. +use_fstab = True + +#* Setting this to True will hide all datasets, and only show ZFS pools. (IO stats will be calculated per-pool) +zfs_hide_datasets = False + +#* Set to true to show available disk space for privileged users. +disk_free_priv = False + +#* Toggles if io activity % (disk busy time) should be shown in regular disk usage view. +show_io_stat = True + +#* Toggles io mode for disks, showing big graphs for disk read/write speeds. +io_mode = False + +#* Set to True to show combined read/write io graphs in io mode. +io_graph_combined = False + +#* Set the top speed for the io graphs in MiB/s (100 by default), use format "mountpoint:speed" separate disks with whitespace " ". +#* Example: "/mnt/media:100 /:20 /boot:1". +io_graph_speeds = "" + +#* Set fixed values for network graphs in Mebibits. Is only used if net_auto is also set to False. +net_download = 100 + +net_upload = 100 + +#* Use network graphs auto rescaling mode, ignores any values set above and rescales down to 10 Kibibytes at the lowest. +net_auto = True + +#* Sync the auto scaling for download and upload to whichever currently has the highest scale. +net_sync = False + +#* Starts with the Network Interface specified here. +net_iface = "" + +#* Show battery stats in top right if battery is present. +show_battery = True + +#* Which battery to use if multiple are present. "Auto" for auto detection. +selected_battery = "Auto" + +#* Set loglevel for "~/.config/btop/btop.log" levels are: "ERROR" "WARNING" "INFO" "DEBUG". +#* The level set includes all lower levels, i.e. "DEBUG" will show all logging info. +log_level = "WARNING"
\ No newline at end of file diff --git a/.config/btop/btop.log b/.config/btop/btop.log new file mode 100755 index 0000000..4324e15 --- /dev/null +++ b/.config/btop/btop.log @@ -0,0 +1,9 @@ + +2023/05/25 (22:58:47) | ===> btop++ v.1.2.13 +2023/05/25 (22:58:47) | WARNING: No good candidate for cpu sensor found, using random from all found sensors. + +2023/05/28 (13:15:39) | ===> btop++ v.1.2.13 +2023/05/28 (13:15:39) | WARNING: No good candidate for cpu sensor found, using random from all found sensors. + +2023/06/02 (23:00:01) | ===> btop++ v.1.2.13 +2023/06/02 (23:00:01) | WARNING: No good candidate for cpu sensor found, using random from all found sensors. diff --git a/.config/dunst/dunstrc b/.config/dunst/dunstrc new file mode 100755 index 0000000..9fc542f --- /dev/null +++ b/.config/dunst/dunstrc @@ -0,0 +1,432 @@ +[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 DEPRECATED + # This setting is deprecated. It's split up into width, height, origin, notification_limit and offset. + + # width + # The width of the notification window in pixels. + # This can be a single number to specify a constant width + # or two numbers for the minimum and maximum width. + # The notification will expand from the minimum width as neccesary. + # Examples: width = 300 # constant width of 300 width = (0, 300) # width between 0 and 300 + width = (0, 400) + + # height + # The maximum height of a single notification. + height = 500 + + # notification_limit (default: 0) + # The number of notifications that can appear at one time. + # When this limit is reached any additional notifications will be queued and + # displayed when the currently displayed ones either time out or are manually dismissed. + # The value 0 means no limit. If indicate_hidden is true, + # then the specified limit is reduced by 1 and the last notification + # is a message informing how many hidden notifications are waiting to be displayed. + # See the indicate_hidden entry for more information. + notification_limit = 0 + + # origin (default: top-right) + # The origin of the notification window on the screen. + # It can then be moved with offset. + # Origin can be one of: top-left top-center top-right bottom-left bottom-center bottom-right left-center center right-center + origin = top-right + + # offset format: (horizontal, vertical) + # Respectively the horizontal and vertical offset in pixels from the corner of the + # screen specified by origin. Both values should always be positive or zero. + # Examples: origin = top-right offset = 10x300 # a margin of 10 pixels from the right and 300 pixels from the top + offset = 15x45 + + # Show how many messages are currently hidden (because of geometry). + indicate_hidden = yes + + # Shrink window if it's smaller than the width. Will be ignored if + # width is 0. + shrink = 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.). + transparency = 0 + + # The height of the entire notification. If the height is smaller + # than the font height and padding combined, it will be raised + # to the font height and padding. + # notification_height = 0 + + # Draw a line of "separator_height" pixel height between two + # notifications. + # Set to 0 to disable. + separator_height = 2 + + # Padding between text and separator. + padding = 8 + + # Horizontal padding. + horizontal_padding = 8 + + # Defines width in pixels of frame around the notification window. + # Set to 0 to disable. + frame_width = 2 + + # Defines color of the frame around the notification window. + frame_color = "#33eeffee" + + # 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 = frame + + # 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 = FiraCode Nerd Font 8 + + # The spacing between lines. If the height is smaller than the + # font height, it will get raised to the font height. + line_height = 0 + + # Possible values are: + # full: Allow a small subset of html markup in notifications: + # <b>bold</b> + # <i>italic</i> + # <s>strikethrough</s> + # <u>underline</u> + # + # For a complete reference see + # <https://developer.gnome.org/pango/stable/pango-Markup.html>. + # + # 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 = "<b>%s</b>\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 + + # Split notifications into multiple lines if they don't fit into + # geometry. + word_wrap = yes + + # When word_wrap is set to no, 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 ### + + # Align icons left/right/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 = 0 + + # Scale larger icons down to this size, set to 0 to disable + max_icon_size = 32 + + # Paths to default icons. + icon_path = /usr/share/icons/gnome/16x16/status/:/usr/share/icons/gnome/16x16/devices/ + + ### 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/dmenu -p dunst: + + # Browser for opening urls in context menu. + browser = /usr/bin/firefox -new-tab + + # 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 + + # Print a notification on startup. + # This is mainly for error detection, since dbus (re-)starts dunst + # automatically after a crash. + #startup_notification = false + + # Manage dunst's desire for talking + # Can be one of the following values: + # crit: Critical features. Dunst aborts + # warn: Only non-fatal warnings + # mesg: Important Messages + # info: all unimportant stuff + # debug: all less than unimportant stuff + #verbosity = mesg + + # 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 = 0 + + # 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 + + ### 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: If the notification has exactly one action, or one is marked as default, + # invoke it. If there are multiple and no default, open the context menu. + # * close_current: Close current notification. + # * close_all: Close all notifications. + # These values can be strung together for each mouse event, and + # will be executed in sequence. + mouse_left_click = 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 = false + +[urgency_low] + # IMPORTANT: colors have to be defined in quotation marks. + # Otherwise the "#" and following would be interpreted as a comment. + background = "#000000DD" + foreground = "#ffffff" + timeout = 5 + # Icon for notifications with low urgency, uncomment to enable + #icon = /path/to/icon + +[urgency_normal] + background = "#000000DD" + foreground = "#ffffff" + timeout = 5 + # Icon for notifications with normal urgency, uncomment to enable + #icon = /path/to/icon + +[urgency_critical] + background = "#900000DD" + foreground = "#ffffff" + frame_color = "#ff0000" + timeout = 0 + # Icon for notifications with critical urgency, uncomment to enable + #icon = /path/to/icon + +# 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 +# timeout +# urgency +# +# 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: if you don't want a notification to be displayed, set the format +# to "". +# 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" +# format = "" + +#[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 diff --git a/.config/foot/foot.ini b/.config/foot/foot.ini new file mode 100755 index 0000000..9bcd0f5 --- /dev/null +++ b/.config/foot/foot.ini @@ -0,0 +1,220 @@ +# -*- conf -*- + +# shell=$SHELL (if set, otherwise user's default shell from /etc/passwd) +# term=foot (or xterm-256color if built with -Dterminfo=disabled) +# login-shell=no + +# app-id=foot +# title=foot +# locked-title=no + +font=GoMono Nerd Font Mono:size=10 +font-bold=GoMono Nerd Font Mono:style=Bold:size=10 +font-italic=GoMono Nerd Font Mono:style=Italic:size=10 + +# font=monospace:size=8 +# font-bold=<bold variant of regular font> +# font-italic=<italic variant of regular font> +# font-bold-italic=<bold+italic variant of regular font> +# line-height=<font metrics> +# letter-spacing=0 +# horizontal-letter-offset=0 +# vertical-letter-offset=0 +# underline-offset=<font metrics> +# underline-thickness=<font underline thickness> +# box-drawings-uses-font-glyphs=no +dpi-aware=no + +# initial-window-size-pixels=700x500 # Or, +# initial-window-size-chars=<COLSxROWS> +# initial-window-mode=windowed +# pad=0x0 # optionally append 'center' +# resize-delay-ms=100 + +# notify=notify-send -a ${app-id} -i ${app-id} ${title} ${body} + +# bold-text-in-bright=no +# word-delimiters=,│`|:"'()[]{}<> +# selection-target=primary +# workers=<number of logical CPUs> +# utempter=/usr/lib/utempter/utempter + +[environment] +# name=value + +[bell] +# urgent=no +# notify=no +# command= +# command-focused=no + +[scrollback] +# lines=1000 +# multiplier=3.0 +# indicator-position=relative +# indicator-format= + +[url] +# launch=xdg-open ${url} +# label-letters=sadfjklewcmpgh +# osc8-underline=url-mode +# protocols=http, https, ftp, ftps, file, gemini, gopher +# uri-characters=abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_.,~:;/?#@!$&%*+="'()[] + +[cursor] +# style=block +# color=<inverse foreground/background> +# blink=no +# beam-thickness=1.5 +# underline-thickness=<font underline thickness> + +[mouse] +# hide-when-typing=no +# alternate-scroll-mode=yes + +[colors] +alpha=0.8 +# background=002b36 +# foreground=839496 + +background=000000 +foreground=ebdbb2 +regular0=282828 +regular1=cc241d +regular2=98971a +regular3=d79921 +regular4=458588 +regular5=b16286 +regular6=689d6a +regular7=a89984 +bright0=928374 +bright1=fb4934 +bright2=b8bb26 +bright3=fabd2f +bright4=83a598 +bright5=d3869b +bright6=8ec07c +bright7=ebdbb2 + +## Normal/regular colors (color palette 0-7) +# regular0=073642 # black +# regular1=dc322f # red +# regular2=859900 # green +# regular3=b58900 # yellow +# regular4=268bd2 # blue +# regular5=d33682 # magenta +# regular6=2aa198 # cyan +# regular7=eee8d5 # white + +## Bright colors (color palette 8-15) +# bright0=08404f # bright black +# bright1=e35f5c # bright red +# bright2=9fb700 # bright green +# bright3=d9a400 # bright yellow +# bright4=4ba1de # bright blue +# bright5=dc619d # bright magenta +# bright6=32c1b6 # bright cyan +# bright7=ffffff # bright white + +## dimmed colors (see foot.ini(5) man page) +# dim0=<not set> +# ... +# dim7=<not-set> + +## The remaining 256-color palette +# 16 = <256-color palette #16> +# ... +# 255 = <256-color palette #255> + +## Misc colors +# selection-foreground=<inverse foreground/background> +# selection-background=<inverse foreground/background> +# jump-labels=<regular0> <regular3> # black-on-yellow +# scrollback-indicator=<regular0> <bright4> # black-on-bright-blue +# search-box-no-match=<regular0> <regular1> # black-on-red +# search-box-match=<regular0> <regular3> # black-on-yellow +# urls=<regular3> + +[csd] +# preferred=server +# size=26 +# font=<primary font> +# color=<foreground color> +# hide-when-typing=no +# border-width=0 +# border-color=<csd.color> +# button-width=26 +# button-color=<background color> +# button-minimize-color=<regular4> +# button-maximize-color=<regular2> +# button-close-color=<regular1> + +[key-bindings] +# scrollback-up-page=Shift+Page_Up +# scrollback-up-half-page=none +# scrollback-up-line=none +# scrollback-down-page=Shift+Page_Down +# scrollback-down-half-page=none +# scrollback-down-line=none +# clipboard-copy=Control+Shift+c XF86Copy +# clipboard-paste=Control+Shift+v XF86Paste +# primary-paste=Shift+Insert +# search-start=Control+Shift+r +# font-increase=Control+plus Control+equal Control+KP_Add +# font-decrease=Control+minus Control+KP_Subtract +# font-reset=Control+0 Control+KP_0 +# spawn-terminal=Control+Shift+n +# minimize=none +# maximize=none +# fullscreen=none +# pipe-visible=[sh -c "xurls | fuzzel | xargs -r firefox"] none +# pipe-scrollback=[sh -c "xurls | fuzzel | xargs -r firefox"] none +# pipe-selected=[xargs -r firefox] none +# show-urls-launch=Control+Shift+u +# show-urls-copy=none +# show-urls-persistent=none +# prompt-prev=Control+Shift+z +# prompt-next=Control+Shift+x +# unicode-input=none +# noop=none + +[search-bindings] +# cancel=Control+g Control+c Escape +# commit=Return +# find-prev=Control+r +# find-next=Control+s +# cursor-left=Left Control+b +# cursor-left-word=Control+Left Mod1+b +# cursor-right=Right Control+f +# cursor-right-word=Control+Right Mod1+f +# cursor-home=Home Control+a +# cursor-end=End Control+e +# delete-prev=BackSpace +# delete-prev-word=Mod1+BackSpace Control+BackSpace +# delete-next=Delete +# delete-next-word=Mod1+d Control+Delete +# extend-to-word-boundary=Control+w +# extend-to-next-whitespace=Control+Shift+w +# clipboard-paste=Control+v Control+Shift+v Control+y XF86Paste +# primary-paste=Shift+Insert +# unicode-input=none + +[url-bindings] +# cancel=Control+g Control+c Control+d Escape +# toggle-url-visible=t + +[text-bindings] +# \x03=Mod4+c # Map Super+c -> Ctrl+c + +[mouse-bindings] +# selection-override-modifiers=Shift +# primary-paste=BTN_MIDDLE +# select-begin=BTN_LEFT +# select-begin-block=Control+BTN_LEFT +# select-extend=BTN_RIGHT +# select-extend-character-wise=Control+BTN_RIGHT +# select-word=BTN_LEFT-2 +# select-word-whitespace=Control+BTN_LEFT-2 +# select-row=BTN_LEFT-3 + +# vim: ft=dosini diff --git a/.config/fuzzel/fuzzel.ini b/.config/fuzzel/fuzzel.ini new file mode 100755 index 0000000..8aa783d --- /dev/null +++ b/.config/fuzzel/fuzzel.ini @@ -0,0 +1,40 @@ +# output=<not set> +font=GoMono Nerd Font:size=10 +dpi-aware=no +# prompt=> +icon-theme=hicolor +icons-enabled=yes +# fields=filename,name,generic +# password-character=* +fuzzy=yes +# show-actions=no +# terminal=$TERMINAL -e # Note: you cannot actually use environment variables here +# launch-prefix=<not set> + +# lines=15 +width=35 +horizontal-pad=10 +vertical-pad=10 +inner-pad=10 + +# image-size-ratio=0.5 + +# line-height=<use font metrics> +# letter-spacing=0 +line-height=18 +[colors] +background=000000AA +text=efefefef +match=fabd2fff +selection-match=fabd2fff +selection=666666ff +selection-text=efefefef +border=33eeffee + +[border] +width=2 +radius=3 + +[dmenu] +# mode=text # text|index +# exit-immediately-if-empty=no diff --git a/.config/imv/config b/.config/imv/config new file mode 100644 index 0000000..f870741 --- /dev/null +++ b/.config/imv/config @@ -0,0 +1,65 @@ +# Default config for imv + +[options] + +# Suppress built-in key bindings, and specify them explicitly in this +# config file. +suppress_default_binds = true +overlay_font = GoMono Nerd Font:10 + +[aliases] +# Define aliases here. Any arguments passed to an alias are appended to the +# command. +# alias = command to run + +[binds] +# Define some key bindings +q = quit +y = exec echo working! + +# Image navigation +<Left> = prev +<bracketleft> = prev +<Right> = next +<bracketright> = next +gg = goto 1 +<Shift+G> = goto -1 + +# Panning +j = pan 0 -50 +k = pan 0 50 +h = pan 50 0 +l = pan -50 0 + +# Zooming +<Up> = zoom 1 +<Shift+plus> = zoom 1 +i = zoom 1 +<Down> = zoom -1 +<minus> = zoom -1 +o = zoom -1 + +# Rotate Clockwise by 90 degrees +<Ctrl+r> = rotate by 90 + +# Other commands +x = close +f = fullscreen +d = overlay +p = exec echo $imv_current_file +c = center +s = scaling next +<Shift+S> = upscaling next +a = zoom actual +r = reset + +# Gif playback +<period> = next_frame +<space> = toggle_playing + +# Slideshow control +t = slideshow +1 +<Shift+T> = slideshow -1 + +# Set image as wallpaper for Sway +<Shift+W> = exec cp -f "$imv_current_file" ~/.cache/wallpaper && swaymsg output "*" background ~/.cache/wallpaper fill diff --git a/.config/kanshi/config b/.config/kanshi/config new file mode 100644 index 0000000..70c1ced --- /dev/null +++ b/.config/kanshi/config @@ -0,0 +1,10 @@ +profile Laptop { + output eDP-1 position 0,0 mode 1920x1080 + #exec sh -c "$HOME/.config/yambar/scripts/yambar-start.sh" +} + +profile Dock { + output HDMI-A-1 position 0,0 mode 1920x1080 + output eDP-1 position 1920,0 mode 1920x1080 + #exec sh -c "$HOME/.config/yambar/scripts/yambar-start.sh" +} diff --git a/.config/mpv/mpv.conf b/.config/mpv/mpv.conf new file mode 100644 index 0000000..30ceae8 --- /dev/null +++ b/.config/mpv/mpv.conf @@ -0,0 +1,140 @@ +# +# Example mpv configuration file +# +# Warning: +# +# The commented example options usually do _not_ set the default values. Call +# mpv with --list-options to see the default values for most options. There is +# no builtin or example mpv.conf with all the defaults. +# +# +# Configuration files are read system-wide from /usr/local/etc/mpv.conf +# and per-user from ~/.config/mpv/mpv.conf, where per-user settings override +# system-wide settings, all of which are overridden by the command line. +# +# Configuration file settings and the command line options use the same +# underlying mechanisms. Most options can be put into the configuration file +# by dropping the preceding '--'. See the man page for a complete list of +# options. +# +# Lines starting with '#' are comments and are ignored. +# +# See the CONFIGURATION FILES section in the man page +# for a detailed description of the syntax. +# +# Profiles should be placed at the bottom of the configuration file to ensure +# that settings wanted as defaults are not restricted to specific profiles. + +################## +# video settings # +################## + +# Start in fullscreen mode by default. +#fs=yes + +# force starting with centered window +# geometry=50%:50% + +# don't allow a new window to have a size larger than 90% of the screen size +autofit-larger=40%x40% + +# Do not close the window on exit. +#keep-open=yes + +# Do not wait with showing the video window until it has loaded. (This will +# resize the window once video is loaded. Also always shows a window with +# audio.) +#force-window=immediate + +# Disable the On Screen Controller (OSC). +#osc=no + +# Keep the player window on top of all other windows. +#ontop=yes + +# Specify high quality video rendering preset (for --vo=gpu only) +# Can cause performance problems with some drivers and GPUs. +profile=gpu-hq + +# Force video to lock on the display's refresh rate, and change video and audio +# speed to some degree to ensure synchronous playback - can cause problems +# with some drivers and desktop environments. +#video-sync=display-resample + +# Enable hardware decoding if available. Often, this does not work with all +# video outputs, but should work well with default settings on most systems. +# If performance or energy usage is an issue, forcing the vdpau or vaapi VOs +# may or may not help. +#hwdec=auto + +################## +# audio settings # +################## + +# Specify default audio device. You can list devices with: --audio-device=help +# The option takes the device string (the stuff between the '...'). +#audio-device=alsa/default + +# Do not filter audio to keep pitch when changing playback speed. +#audio-pitch-correction=no + +# Output 5.1 audio natively, and upmix/downmix audio with a different format. +#audio-channels=5.1 +# Disable any automatic remix, _if_ the audio output accepts the audio format. +# of the currently played file. See caveats mentioned in the manpage. +# (The default is "auto-safe", see manpage.) +#audio-channels=auto + +################## +# other settings # +################## + +# Pretend to be a web browser. Might fix playback with some streaming sites, +# but also will break with shoutcast streams. +#user-agent="Mozilla/5.0" + +# cache settings +# +# Use a large seekable RAM cache even for local input. +#cache=yes +# +# Use extra large RAM cache (needs cache=yes to make it useful). +#demuxer-max-bytes=500M +#demuxer-max-back-bytes=100M +# +# Disable the behavior that the player will pause if the cache goes below a +# certain fill size. +#cache-pause=no +# +# Store cache payload on the hard disk instead of in RAM. (This may negatively +# impact performance unless used for slow input such as network.) +#cache-dir=~/.cache/ +#cache-on-disk=yes + +# Display English subtitles if available. +#slang=en + +# Play Finnish audio if available, fall back to English otherwise. +#alang=fi,en + +# Change subtitle encoding. For Arabic subtitles use 'cp1256'. +# If the file seems to be valid UTF-8, prefer UTF-8. +# (You can add '+' in front of the codepage to force it.) +#sub-codepage=cp1256 + +# You can also include other configuration files. +#include=/path/to/the/file/you/want/to/include + +############ +# Profiles # +############ + +# The options declared as part of profiles override global default settings, +# but only take effect when the profile is active. + +# The following profile can be enabled on the command line with: --profile=eye-cancer + +#[eye-cancer] +#sharpen=5 + +script-opts=ytdl_hook-ytdl_path=/usr/bin/yt-dlp diff --git a/.config/newsboat/config b/.config/newsboat/config new file mode 100644 index 0000000..afa1438 --- /dev/null +++ b/.config/newsboat/config @@ -0,0 +1,42 @@ +# general settings +auto-reload yes +reload-time 30 +max-items 500 +reload-threads 11 + +#browser "firefox --no-remote -P default --class newsboat %u >/dev/null 2>&1 &" +browser linkhandler + +color listnormal cyan default +color listfocus blue yellow standout bold +color listnormal_unread green default +color listfocus_unread blue green standout bold +color info yellow blue bold +color article white default + +highlight article "(^Feed:.*|^Title:.*|^Author:.*)" cyan default bold +highlight article "(^Link:.*|^Date:.*)" default default +highlight article "https?://[^ ]+" green default + +highlight article "^(Title):.*$" blue default +highlight article "\\[[0-9][0-9]*\\]" magenta default bold +highlight article "\\[image\\ [0-9]+\\]" green default bold +highlight article "\\[embedded flash: [0-9][0-9]*\\]" green default bold +highlight article ":.*\\(link\\)$" cyan default +highlight article ":.*\\(image\\)$" blue default +highlight article ":.*\\(embedded flash\\)$" magenta default + +highlight articlelist "(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) [0-9]+" white default +highlight articlelist "\\|[^\\|]+\\|" cyan default +highlight articlelist "\\(YouTube\\)" magenta default +highlight articlelist "\\(PeerTube\\)" magenta default +highlight articlelist "\\|r/" red default +highlight feedlist "\\(YouTube\\)" magenta default +highlight feedlist "\\(PeerTube\\)" magenta default +highlight feedlist " r/" red default +highlight feedlist "\\([0-9]+/[0-9]+\\)" white default + +highlight all "---.*---" yellow default bold +highlight feedlist "^.*\\(0/0\\)" black default invis + +articlelist-format "%4i %f %D %?T?|%-20T| ?%t" diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua new file mode 100644 index 0000000..20dd1dd --- /dev/null +++ b/.config/nvim/init.lua @@ -0,0 +1,4 @@ +require "base" +require "plugins" +require "mapping" +require "pluginsconfig" diff --git a/.config/nvim/lua/base.lua b/.config/nvim/lua/base.lua new file mode 100644 index 0000000..9cb6f23 --- /dev/null +++ b/.config/nvim/lua/base.lua @@ -0,0 +1,73 @@ +vim.opt.encoding = "utf-8" -- Set encoding to utf-8 +vim.opt.number = true -- Shownumber = true -- Show line numbers on the sidebar +vim.opt.clipboard = "unnamedplus" -- Copy paste between vim and everything else +vim.opt.hlsearch = true --Highlight search results +vim.opt.incsearch = true -- Incremental search +vim.opt.ignorecase = true -- Search ignoring case +vim.opt.smartcase = true -- Do not ignore case if the search pattern has uppercase +vim.opt.splitbelow = true -- Split below current window +vim.opt.splitright = true -- Split window to the right +vim.opt.cursorline = true -- Highlight the active cursor line + +-- Set the undo directory +local prefix = vim.env.XDG_CONFIG_HOME or vim.fn.expand("~/.config") +vim.opt.undodir = { prefix .. "/nvim/undodir//"} +vim.opt.undofile = true + +vim.opt.termguicolors = true -- Enable 24-bit colors on terminal +vim.opt.wildmenu = true -- Enable wildmenu +vim.opt.wildmode = 'longest,list,full' +vim.opt.syntax = "ON" -- Allow syntax highlighting +vim.opt.completeopt = { "menuone", "noinsert" } + + +local autocmd = vim.api.nvim_create_autocmd -- Create autocommand + +-- Remove end of buffer ~ on buffer enter +autocmd('BufEnter', { + pattern = '*', + command = "let &fcs='eob: '" +}) + +-- Turn off line numbers on entering terminal +autocmd('TermOpen', { + pattern = '*', + command = 'setlocal nonumber norelativenumber' +}) + +-- Insert mode on entering terminal +autocmd('TermOpen', { + pattern = '*', + command = 'startinsert' +}) + +-- Close terminal buffer on process exit +autocmd('BufLeave', { + pattern = 'term://*', + command = 'stopinsert' +}) + +-- Close terminal buffer on process exit +autocmd('TermClose', { + pattern = 'term://*', + command = 'call nvim_input("<CR>")' +}) + +-- Open Alpha if last buffer is closed ( Uses Bdelete and Bwipeout ) +vim.api.nvim_create_augroup("alpha_on_empty", { clear = true }) +vim.api.nvim_create_autocmd("User", { + pattern = "BDeletePost*", + group = "alpha_on_empty", + callback = function(event) + local fallback_name = vim.api.nvim_buf_get_name(event.buf) + local fallback_ft = vim.api.nvim_buf_get_option(event.buf, "filetype") + local fallback_on_empty = fallback_name == "" and fallback_ft == "" + + if fallback_on_empty then + vim.cmd("NvimTreeClose") + vim.cmd("TagbarClose") + vim.cmd("Alpha") + vim.cmd(event.buf .. "bwipeout") + end + end, +}) diff --git a/.config/nvim/lua/mapping.lua b/.config/nvim/lua/mapping.lua new file mode 100644 index 0000000..d454eec --- /dev/null +++ b/.config/nvim/lua/mapping.lua @@ -0,0 +1,23 @@ +function map(mode, lhs, rhs, opts) + local options = { noremap = true } + if opts then + options = vim.tbl_extend("force", options, opts) + end + vim.api.nvim_set_keymap(mode, lhs, rhs, options) +end + +-- Toggle line numbers +map("n", "<F4>", "<cmd>:set number!<cr>", { silent = true }) +-- Toggle IndentBlankline +map("n", "<F5>", "<cmd>:IndentBlanklineToggle<cr>", { silent = true }) +-- Toggle Undotree +map("n", "<F6>", "<cmd>:lua require('undotree').toggle()<cr>", { silent = true }) +-- Toggle Nvim Tree +map("n", "<F7>", "<cmd>NvimTreeToggle<cr> <cmd>NvimTreeRefresh<cr>", { silent = true }) +-- Toggle Tagbar +map("n", "<F8>", "<cmd>:TagbarToggle<cr>", { silent = true }) +-- Toggle Tagbar +map("n", "<F8>", "<cmd>:TagbarToggle<cr>", { silent = true }) +-- Toggle lsp_lines +vim.keymap.set("", "<F12>", require("lsp_lines").toggle, { desc = "Toggle lsp_lines" }) + diff --git a/.config/nvim/lua/plugins.lua b/.config/nvim/lua/plugins.lua new file mode 100644 index 0000000..218afa6 --- /dev/null +++ b/.config/nvim/lua/plugins.lua @@ -0,0 +1,129 @@ +local fn = vim.fn +local install_path = fn.stdpath('data')..'/site/pack/packer/start/packer.nvim' +if fn.empty(fn.glob(install_path)) > 0 then + packer_bootstrap = fn.system({'git', 'clone', '--depth', '1', 'https://github.com/wbthomason/packer.nvim', install_path}) + vim.cmd [[packadd packer.nvim]] +end + +return require('packer').startup({function(use) + -- Setup Packer + use {"wbthomason/packer.nvim"} + + -- Nvim tree + use { + "kyazdani42/nvim-tree.lua", + requires = { + "kyazdani42/nvim-web-devicons", + }, + } + + -- LSP + use { + "williamboman/mason.nvim", + } + + use { + "williamboman/mason-lspconfig.nvim", + } + + use { + "neovim/nvim-lspconfig", + } + + -- Gruvbox theme + use { + "ellisonleao/gruvbox.nvim", + } + + -- Lualine + use { + 'nvim-lualine/lualine.nvim', + requires = { 'kyazdani42/nvim-web-devicons', opt = true }, + } + + -- Treesitter + use { + 'nvim-treesitter/nvim-treesitter', + run = function() + local ts_update = require('nvim-treesitter.install').update({ with_sync = true }) + ts_update() + end, + } + -- Colorizer + use { + 'norcalli/nvim-colorizer.lua', + } + + -- Tag Viewer + use 'preservim/tagbar' + + -- Alpha + use { + 'goolord/alpha-nvim', + requires = { 'BlakeJC94/alpha-nvim-fortune', opt = true }, + } + + -- Completion + use { + 'hrsh7th/nvim-cmp', + } + + use 'hrsh7th/cmp-nvim-lsp' + use 'L3MON4D3/LuaSnip' -- Snippets plugin + + -- cmp sources -- + use "hrsh7th/cmp-nvim-lua" + use "hrsh7th/cmp-buffer" + use "hrsh7th/cmp-path" + use "hrsh7th/cmp-cmdline" + + -- Telescope + use { + "nvim-telescope/telescope.nvim", + requires = { + "nvim-lua/plenary.nvim", + }, + } + + -- Indent-blankline + use { + "lukas-reineke/indent-blankline.nvim", + } + + -- Undotree + use { + "jiaoshijie/undotree", + requires = { + "nvim-lua/plenary.nvim", + }, + } + + -- Comment + use { + 'numToStr/Comment.nvim', + } + + -- lsp_lines + use { + "https://git.sr.ht/~whynothugo/lsp_lines.nvim", + } + + -- Comment + use { + 'famiu/bufdelete.nvim', + } + + -- Automatically set up your configuration after cloning packer.nvim + -- Put this at the end after all plugins + if packer_bootstrap then + require('packer').sync() + end +end, +config = { + display = { + open_fn = function() + return require('packer.util').float({ border = 'single' }) + end, + }, +} +}) diff --git a/.config/nvim/lua/pluginsconfig/Comment.lua b/.config/nvim/lua/pluginsconfig/Comment.lua new file mode 100644 index 0000000..a844323 --- /dev/null +++ b/.config/nvim/lua/pluginsconfig/Comment.lua @@ -0,0 +1 @@ +require('Comment').setup() diff --git a/.config/nvim/lua/pluginsconfig/alpha.lua b/.config/nvim/lua/pluginsconfig/alpha.lua new file mode 100644 index 0000000..5adcc50 --- /dev/null +++ b/.config/nvim/lua/pluginsconfig/alpha.lua @@ -0,0 +1,126 @@ +local present, alpha = pcall(require, 'alpha') + +if not present then + return +end + +local dashboard = require('alpha.themes.dashboard') +local fortune = require('alpha.fortune') + +local logo = { + type = 'text', + val = { + ' ', + ' ███╗ ██╗███████╗ ██████╗ ██╗ ██╗██╗███╗ ███╗ ', + ' ████╗ ██║██╔════╝██╔═══██╗██║ ██║██║████╗ ████║ ', + ' ██╔██╗ ██║█████╗ ██║ ██║██║ ██║██║██╔████╔██║ ', + ' ██║╚██╗██║██╔══╝ ██║ ██║╚██╗ ██╔╝██║██║╚██╔╝██║ ', + ' ██║ ╚████║███████╗╚██████╔╝ ╚████╔╝ ██║██║ ╚═╝ ██║ ', + ' ╚═╝ ╚═══╝╚══════╝ ╚═════╝ ╚═══╝ ╚═╝╚═╝ ╚═╝ ', + }, + opts = { + position = 'center', + hl = 'DevIconDart', + }, +} + +local function info_value() + local total_plugins = " Total plugins " .. vim.fn.len(vim.fn.globpath("~/.local/share/nvim/site/pack/packer/start", "*", 0, 1)) + local datetime = os.date(' %d-%m-%Y') + local version = vim.version() + local nvim_version_info = ' v' .. version.major .. '.' .. version.minor .. '.' .. version.patch + + return datetime .. nvim_version_info .. ' ' .. total_plugins +end + +local info = { + type = 'text', + val = info_value(), + opts = { + hl = 'DevIconVimrc', + position = 'center', + }, +} + +local message = { + type = 'text', + val = fortune({ max_width = 60 }), + opts = { + position = 'center', + hl = 'SpecialComment', + }, +} + +local header = { + type = 'group', + val = { + logo, + info, + }, +} + +local buttons = { + type = 'group', + val = { + { + type = 'text', + val = 'Actions', + opts = { + hl = 'String', + shrink_margin = false, + position = 'center', + }, + }, + { type = 'padding', val = 1 }, + dashboard.button("f", " " .. " Find file", ":Telescope find_files hidden=true no_ignore=true <CR>"), + dashboard.button("e", " " .. " New file", ":ene <BAR> startinsert <CR>"), + dashboard.button("r", " " .. " Recent files", ":Telescope oldfiles <CR>"), + dashboard.button("t", " " .. " Find text", "<cmd>lua require('telescope.builtin').live_grep({shorten_path=true})<CR>"), + dashboard.button( + 'd', + ' Dotfiles', + "<cmd>lua require('telescope.builtin').find_files({ search_dirs = { os.getenv('HOME') .. '/.config' } })<CR>" + ), + dashboard.button("u", " " .. " Update plugins", ":PackerSync<CR>"), + dashboard.button("q", " " .. " Quit", ":qa<CR>"), + }, + opts = { + position = 'center', + }, +} + +local config = { + layout = { + { type = 'padding', val = 5 }, + header, + { type = 'padding', val = 5 }, + buttons, + { type = 'padding', val = 1 }, + message, + }, + opts = { + setup = function() + vim.api.nvim_create_autocmd('User', { + pattern = 'AlphaReady', + desc = 'disable status, tabline and cmdline for alpha', + callback = function() + vim.go.laststatus = 0 + vim.opt.showtabline = 0 + vim.opt.cmdheight = 0 + end, + }) + vim.api.nvim_create_autocmd('BufUnload', { + buffer = 0, + desc = 'enable status, tabline and cmdline after alpha', + callback = function() + vim.go.laststatus = 2 + vim.opt.showtabline = 2 + vim.opt.cmdheight = 1 + end, + }) + end, + margin = 5, + }, +} + +alpha.setup(config) diff --git a/.config/nvim/lua/pluginsconfig/colorizer.lua b/.config/nvim/lua/pluginsconfig/colorizer.lua new file mode 100644 index 0000000..2ad4f6e --- /dev/null +++ b/.config/nvim/lua/pluginsconfig/colorizer.lua @@ -0,0 +1,12 @@ + require('colorizer').setup({ '*' }, { + RGB = true, -- #RGB hex codes + RRGGBB = true, -- #RRGGBB hex codes + names = true, -- "Name" codes like Blue + RRGGBBAA = true, -- #RRGGBBAA hex codes + rgb_fn = true, -- CSS rgb() and rgba() functions + hsl_fn = true, -- CSS hsl() and hsla() functions + css = true, -- Enable all CSS features: rgb_fn, hsl_fn, names, RGB, RRGGBB + css_fn = true, -- Enable all CSS *functions*: rgb_fn, hsl_fn + mode = 'background', -- Set the display mode. background / foreground + }) + diff --git a/.config/nvim/lua/pluginsconfig/gruvbox.lua b/.config/nvim/lua/pluginsconfig/gruvbox.lua new file mode 100644 index 0000000..08e42c7 --- /dev/null +++ b/.config/nvim/lua/pluginsconfig/gruvbox.lua @@ -0,0 +1,21 @@ +require("gruvbox").setup({ + undercurl = true, + underline = true, + bold = true, + italic = { + strings = true, + comments =true, + operators = false, + folds =true, + }, + strikethrough = true, + invert_selection = false, + invert_signs = false, + invert_tabline = false, + invert_intend_guides = false, + inverse = true, -- invert background for search, diffs, statuslines and errors + contrast = "", -- can be "hard", "soft" or empty string + overrides = {}, +}) +vim.cmd("colorscheme gruvbox") +vim.api.nvim_set_hl(0, "Normal", {guibg = NONE, ctermbg = NONE}) diff --git a/.config/nvim/lua/pluginsconfig/indent-blankline.lua b/.config/nvim/lua/pluginsconfig/indent-blankline.lua new file mode 100644 index 0000000..d53bf41 --- /dev/null +++ b/.config/nvim/lua/pluginsconfig/indent-blankline.lua @@ -0,0 +1,6 @@ + +require("indent_blankline").setup { + enabled = false, -- Don't enable plugin at Nvim start + show_current_context = true, + show_current_context_start = false, +} diff --git a/.config/nvim/lua/pluginsconfig/init.lua b/.config/nvim/lua/pluginsconfig/init.lua new file mode 100644 index 0000000..0d2edb7 --- /dev/null +++ b/.config/nvim/lua/pluginsconfig/init.lua @@ -0,0 +1,22 @@ +local plugins = { + 'nvim-tree', + 'mason', + 'mason-lspconfig', + 'gruvbox', + 'lualine', + 'treesitter', + 'colorizer', + 'nvim-cmp', + 'telescope', + 'indent-blankline', + 'undotree', + 'Comment', + 'nvim-lspconfig', + 'lsp_lines', + 'alpha', +} + +for _, plugin in ipairs(plugins) do + pcall(require, "pluginsconfig." .. plugin) +end + diff --git a/.config/nvim/lua/pluginsconfig/lsp_lines.lua b/.config/nvim/lua/pluginsconfig/lsp_lines.lua new file mode 100644 index 0000000..8a0b7ae --- /dev/null +++ b/.config/nvim/lua/pluginsconfig/lsp_lines.lua @@ -0,0 +1,6 @@ +require('lsp_lines').setup {} +vim.diagnostic.config({ + virtual_lines = false, + virtual_text = false, + underline = false, +}) diff --git a/.config/nvim/lua/pluginsconfig/lualine.lua b/.config/nvim/lua/pluginsconfig/lualine.lua new file mode 100644 index 0000000..a985762 --- /dev/null +++ b/.config/nvim/lua/pluginsconfig/lualine.lua @@ -0,0 +1,53 @@ +require('lualine').setup { + options = { + icons_enabled = true, + theme = 'powerline', + component_separators = { left = '', right = ''}, + section_separators = { left = '', right = ''}, + disabled_filetypes = { 'packer', 'NvimTree', + statusline = {}, + winbar = {}, + }, + ignore_focus = {}, + always_divide_middle = true, + globalstatus = false, + refresh = { + statusline = 1000, + tabline = 1000, + winbar = 1000, + } + }, + sections = { + lualine_a = {'mode'}, + lualine_b = {'branch', 'diff', 'diagnostics'}, + lualine_c = {'filename'}, + lualine_x = {'encoding', 'fileformat', 'filetype'}, + lualine_y = {'progress'}, + lualine_z = {'location'} + }, + inactive_sections = { + lualine_a = {}, + lualine_b = {}, + lualine_c = {'filename'}, + lualine_x = {'location'}, + lualine_y = {}, + lualine_z = {} + }, + tabline = { + lualine_a = { + { 'buffers', + symbols = { + modified = ' ●', -- Text to show when the buffer is modified + alternate_file = '', -- Text to show to identify the alternate filename + directory = '', -- Text to show when the buffer is a directory + }, + filetype_names = { + NvimTree = 'NvimTree', + }, -- Shows specific buffer name for that filetype ( { `filetype` = `buffer_name`, ... } ) + }, + }, +}, + winbar = {}, + inactive_winbar = {}, + extensions = {}, +} diff --git a/.config/nvim/lua/pluginsconfig/mason-lspconfig.lua b/.config/nvim/lua/pluginsconfig/mason-lspconfig.lua new file mode 100644 index 0000000..979a3f1 --- /dev/null +++ b/.config/nvim/lua/pluginsconfig/mason-lspconfig.lua @@ -0,0 +1 @@ +require("mason-lspconfig").setup() diff --git a/.config/nvim/lua/pluginsconfig/mason.lua b/.config/nvim/lua/pluginsconfig/mason.lua new file mode 100644 index 0000000..10e56e5 --- /dev/null +++ b/.config/nvim/lua/pluginsconfig/mason.lua @@ -0,0 +1,2 @@ +require("mason").setup() + diff --git a/.config/nvim/lua/pluginsconfig/nvim-cmp.lua b/.config/nvim/lua/pluginsconfig/nvim-cmp.lua new file mode 100644 index 0000000..34ec756 --- /dev/null +++ b/.config/nvim/lua/pluginsconfig/nvim-cmp.lua @@ -0,0 +1,87 @@ + -- Setup nvim-cmp. + local present, cmp = pcall(require, 'cmp') + +if not present then + return +end + + cmp.setup({ + snippet = { + -- REQUIRED - you must specify a snippet engine + expand = function(args) + -- vim.fn["vsnip#anonymous"](args.body) -- For `vsnip` users. + require('luasnip').lsp_expand(args.body) -- For `luasnip` users. + -- require('snippy').expand_snippet(args.body) -- For `snippy` users. + -- vim.fn["UltiSnips#Anon"](args.body) -- For `ultisnips` users. + end, + }, + window = { + -- completion = cmp.config.window.bordered(), + -- documentation = cmp.config.window.bordered(), + }, + mapping = cmp.mapping.preset.insert({ + ['<C-b>'] = cmp.mapping.scroll_docs(-4), + ['<C-f>'] = cmp.mapping.scroll_docs(4), + ['<C-Space>'] = cmp.mapping.complete(), + ['<C-e>'] = cmp.mapping.abort(), + ['<CR>'] = cmp.mapping.confirm({ select = false }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items. + }), + sources = cmp.config.sources({ + { name = 'nvim_lsp' }, + -- { name = 'vsnip' }, -- For vsnip users. + { name = 'luasnip' }, -- For luasnip users. + -- { name = 'ultisnips' }, -- For ultisnips users. + -- { name = 'snippy' }, -- For snippy users. + }, { + { name = 'buffer' }, + { name = 'path' }, + { name = 'cmdline' }, + { name = 'nvim_lua' }, + }) + }) + + -- Set configuration for specific filetype. + cmp.setup.filetype('gitcommit', { + sources = cmp.config.sources({ + { name = 'cmp_git' }, -- You can specify the `cmp_git` source if you were installed it. + }, { + { name = 'buffer' }, + }) + }) + + -- Use buffer source for `/` (if you enabled `native_menu`, this won't work anymore). + cmp.setup.cmdline('/', { + mapping = cmp.mapping.preset.cmdline(), + sources = { + { name = 'buffer' } + } + }) + + -- Use cmdline & path source for ':' (if you enabled `native_menu`, this won't work anymore). + cmp.setup.cmdline(':', { + mapping = cmp.mapping.preset.cmdline(), + sources = cmp.config.sources({ + { name = 'path' } + }, { + { name = 'cmdline' } + }) + }) + + -- Setup lspconfig. + local capabilities = require('cmp_nvim_lsp').default_capabilities(vim.lsp.protocol.make_client_capabilities()) + -- Replace <YOUR_LSP_SERVER> with each lsp server you've enabled. + --require('lspconfig')['pyright'].setup { + -- capabilities = capabilities + --} + --require('lspconfig')['bashls'].setup { + -- capabilities = capabilities + --} + local lspconfig = require "lspconfig" + local servers = { "pyright", "pylsp", "bashls", "lua_ls", "vimls"} + + for _, lsp in ipairs(servers) do + lspconfig[lsp].setup { + on_attach = on_attach, + capabilities = capabilities, + } + end diff --git a/.config/nvim/lua/pluginsconfig/nvim-lspconfig.lua b/.config/nvim/lua/pluginsconfig/nvim-lspconfig.lua new file mode 100644 index 0000000..746ccf6 --- /dev/null +++ b/.config/nvim/lua/pluginsconfig/nvim-lspconfig.lua @@ -0,0 +1,10 @@ +require'lspconfig'.lua_ls.setup { + settings = { + Lua = { + diagnostics = { + -- Get the language server to recognize the `vim` global + globals = {'vim'}, + }, + }, + }, +} diff --git a/.config/nvim/lua/pluginsconfig/nvim-tree.lua b/.config/nvim/lua/pluginsconfig/nvim-tree.lua new file mode 100644 index 0000000..71ebbf2 --- /dev/null +++ b/.config/nvim/lua/pluginsconfig/nvim-tree.lua @@ -0,0 +1,10 @@ +local autocmd = vim.api.nvim_create_autocmd -- Create autocommand + +Close nvim-tree if last window remaining +autocmd('BufEnter', { + pattern = '*', + command = 'if (winnr("$") ==1 && &filetype == "nvimtree") | q | endif' +}) + +require('nvim-tree').setup { +} diff --git a/.config/nvim/lua/pluginsconfig/telescope.lua b/.config/nvim/lua/pluginsconfig/telescope.lua new file mode 100644 index 0000000..27bd252 --- /dev/null +++ b/.config/nvim/lua/pluginsconfig/telescope.lua @@ -0,0 +1,68 @@ +local present, telescope = pcall(require, "telescope") + +if not present then + return +end + +telescope.setup { + picker = { + hidden = false, + }, + defaults = { + vimgrep_arguments = { + "rg", + "--color=never", + "--no-heading", + "--with-filename", + "--line-number", + "--column", + "--no-ignore", + "--smart-case", + "--hidden", + }, + prompt_prefix = " ", + selection_caret = " ", + entry_prefix = " ", + initial_mode = "insert", + selection_strategy = "reset", + sorting_strategy = "ascending", + layout_strategy = "horizontal", + layout_config = { + horizontal = { + prompt_position = "top", + preview_width = 0.55, + results_width = 0.8, + }, + vertical = { + mirror = false, + }, + width = 0.87, + height = 0.80, + preview_cutoff = 120, + }, + file_sorter = require("telescope.sorters").get_fuzzy_file, + file_ignore_patterns = { "node_modules", ".git/", "dist/" }, + generic_sorter = require("telescope.sorters").get_generic_fuzzy_sorter, + path_display = { "absolute" }, + winblend = 0, + border = {}, + borderchars = { "─", "│", "─", "│", "╭", "╮", "╯", "╰" }, + color_devicons = true, + use_less = true, + set_env = { ["COLORTERM"] = "truecolor" }, + file_previewer = require("telescope.previewers").vim_buffer_cat.new, + grep_previewer = require("telescope.previewers").vim_buffer_vimgrep.new, + qflist_previewer = require("telescope.previewers").vim_buffer_qflist.new, + buffer_previewer_maker = require("telescope.previewers").buffer_previewer_maker, + }, + extensions = { + fzf = { + fuzzy = true, + override_generic_sorter = true, + override_file_sorter = true, + case_mode = "smart_case", + }, + }, +} + +--telescope.load_extension "fzf" diff --git a/.config/nvim/lua/pluginsconfig/treesitter.lua b/.config/nvim/lua/pluginsconfig/treesitter.lua new file mode 100644 index 0000000..feb1f5c --- /dev/null +++ b/.config/nvim/lua/pluginsconfig/treesitter.lua @@ -0,0 +1,18 @@ +local present, treesitter = pcall(require, "nvim-treesitter.configs") + +if not present then + return +end + +treesitter.setup { + autotag = { + enable = true, + }, + ensure_installed = "lua", + highlight = { + enable = true, + }, + enable = true, + extended_mode = true, + max_file_lines = nil, + } diff --git a/.config/nvim/lua/pluginsconfig/undotree.lua b/.config/nvim/lua/pluginsconfig/undotree.lua new file mode 100644 index 0000000..72e342a --- /dev/null +++ b/.config/nvim/lua/pluginsconfig/undotree.lua @@ -0,0 +1,23 @@ +local present, undotree = pcall(require, "undotree") + +if not present then + return +end + +undotree.setup({ + float_diff = true, -- using float window previews diff, set this `true` will disable layout option + layout = "left_bottom", -- "left_bottom", "left_left_bottom" + ignore_filetype = { 'Undotree', 'UndotreeDiff', 'qf', 'TelescopePrompt', 'spectre_panel', 'tsplayground' }, + window = { + winblend = 0, + }, + keymaps = { + ['j'] = "move_next", + ['k'] = "move_prev", + ['J'] = "move_change_next", + ['K'] = "move_change_prev", + ['<cr>'] = "action_enter", + ['p'] = "enter_diffbuf", + ['q'] = "quit", + }, +}) |