summaryrefslogtreecommitdiff
path: root/.config
diff options
context:
space:
mode:
Diffstat (limited to '.config')
-rw-r--r--.config/alacritty/alacritty.toml55
-rw-r--r--.config/clipcat/clipcat-menu.toml14
-rw-r--r--.config/gtk-3.0/settings.ini5
-rwxr-xr-x.config/herbstluftwm/autostart112
-rw-r--r--.config/nushell/config.nu889
-rw-r--r--.config/nushell/documents.nu4
-rw-r--r--.config/nushell/dv.nu25
-rw-r--r--.config/nushell/notes.nu41
-rw-r--r--.config/nushell/phone.nu6
-rw-r--r--.config/nushell/reading-order.nu142
-rw-r--r--.config/nushell/remarkable.nu18
-rw-r--r--.config/nushell/screen.nu17
-rw-r--r--.config/nushell/wishlist.nu183
-rw-r--r--.config/nushell/youtube.nu7
-rw-r--r--.config/nvim/init.lua5
-rw-r--r--.config/nvim/lua/.luarc.json3
-rw-r--r--.config/nvim/lua/lsp_config.lua264
-rw-r--r--.config/nvim/lua/plugins.lua17
-rw-r--r--.config/nvim/lua/settings.lua14
-rw-r--r--.config/nvim/lua/treesitter_config.lua49
-rw-r--r--.config/nvim/lua/writing_config.lua18
-rw-r--r--.config/polybar/config.ini73
-rw-r--r--.config/rofi/config.rasi9
-rw-r--r--.config/rofi/theme.rasi53
-rw-r--r--.config/starship.toml74
25 files changed, 2097 insertions, 0 deletions
diff --git a/.config/alacritty/alacritty.toml b/.config/alacritty/alacritty.toml
new file mode 100644
index 0000000..49ceca0
--- /dev/null
+++ b/.config/alacritty/alacritty.toml
@@ -0,0 +1,55 @@
+[colors]
+draw_bold_text_with_bright_colors = false
+
+[colors.primary]
+background = "#222433"
+foreground = "#929be5"
+
+[cursor]
+thickness = 0.1
+
+[cursor.style]
+shape = "Beam"
+
+[font]
+size = 11.0
+
+[font.bold]
+family = "Hack Nerd Font"
+style = "Bold"
+
+[font.bold_italic]
+family = "Hack Nerd Font"
+style = "Bold Italic"
+
+[font.italic]
+family = "Hack Nerd Font"
+style = "Italic"
+
+[font.normal]
+family = "Hack Nerd Font"
+style = "Regular"
+
+[colors.normal]
+black = "#282b39"
+blue = "#589ec6"
+cyan = "#59b6b6"
+green = "#7cbe8c"
+magenta = "#b871b8"
+red = "#dc6f7a"
+white = "#fdfdfd"
+yellow = "#a8a384"
+
+[scrolling]
+history = 1000
+multiplier = 5
+
+[window]
+dynamic_padding = true
+
+[window.padding]
+x = 15
+y = 8
+
+[terminal.shell]
+program = "/bin/nu"
diff --git a/.config/clipcat/clipcat-menu.toml b/.config/clipcat/clipcat-menu.toml
new file mode 100644
index 0000000..49405ef
--- /dev/null
+++ b/.config/clipcat/clipcat-menu.toml
@@ -0,0 +1,14 @@
+server_endpoint = "/run/user/1000/clipcat/grpc.sock"
+finder = "rofi"
+
+[rofi]
+line_length = 100
+menu_length = 30
+menu_prompt = "Clipcat"
+extra_arguments = []
+
+[log]
+emit_journald = true
+emit_stdout = false
+emit_stderr = false
+level = "INFO"
diff --git a/.config/gtk-3.0/settings.ini b/.config/gtk-3.0/settings.ini
new file mode 100644
index 0000000..14b41be
--- /dev/null
+++ b/.config/gtk-3.0/settings.ini
@@ -0,0 +1,5 @@
+[Settings]
+gtk-icon-theme-name = Adwaita
+gtk-theme-name = Adwaita
+gtk-font-name = Hack Nerd Font 11
+gtk-application-prefer-dark-theme = true
diff --git a/.config/herbstluftwm/autostart b/.config/herbstluftwm/autostart
new file mode 100755
index 0000000..7bc7a02
--- /dev/null
+++ b/.config/herbstluftwm/autostart
@@ -0,0 +1,112 @@
+#!/usr/bin/env bash
+
+# this is a simple config for herbstluftwm
+
+hc() {
+ herbstclient "$@"
+}
+
+hc emit_hook reload
+
+# set background color / wallpaper
+xsetroot -solid '#000000'
+feh --bg-scale /mnt/files/Pictures/background.png
+
+# remove all existing keybindings
+hc keyunbind --all
+
+# keybindings
+Mod=Mod1 # Alt as Mod key
+Super=Mod4 # Super as Super key
+
+# reload window manager
+hc keybind $Mod-Shift-r reload
+# close focused client
+hc keybind $Mod-F4 close
+# open terminal (alacritty)
+hc keybind $Mod-Control-t spawn alacritty
+
+# moving clients in tiling and floating mode
+hc keybind $Mod-Shift-Left shift left
+hc keybind $Mod-Shift-Down shift down
+hc keybind $Mod-Shift-Up shift up
+hc keybind $Mod-Shift-Right shift right
+hc keybind $Mod-Shift-h shift left
+hc keybind $Mod-Shift-j shift down
+hc keybind $Mod-Shift-k shift up
+hc keybind $Mod-Shift-l shift right
+
+# tags
+tag_names=( {1..9} )
+tag_keys=( {1..9} 0 )
+
+hc rename default "${tag_names[0]}" || true
+for i in "${!tag_names[@]}" ; do
+ hc add "${tag_names[$i]}"
+ key="${tag_keys[$i]}"
+ if ! [ -z "$key" ] ; then
+ # switch to tag i
+ hc keybind "$Super-$key" use_index "$i"
+ # move focused client to tag i
+ hc keybind "$Super-Shift-$key" move_index "$i"
+ fi
+done
+
+# cycle through tags
+hc keybind $Super-Tab use_index +1 --skip-visible
+hc keybind $Super-Shift-Tab use_index -1 --skip-visible
+
+# fullscreen
+hc keybind $Mod-f fullscreen toggle
+
+# layout
+set default_frame_layout grid
+
+# cycle through layouts
+hc keybind $Super-l \
+ or , and . compare tags.focus.curframe_wcount = 2 \
+ . cycle_layout +1 vertical horizontal max vertical grid \
+ , cycle_layout +1
+
+# mouse
+hc mouseunbind --all
+
+# cycle through clients
+hc keybind $Mod-Tab cycle
+hc keybind $Mod-Shift-Tab cycle -1
+
+# theme
+hc attr theme.tiling.reset 1
+hc attr theme.floating.reset 1
+hc attr theme.title_height 0
+hc attr theme.active.color '#929be5'
+hc attr theme.normal.color '#222432'
+hc attr theme.urgent.color '#490404'
+hc attr theme.inner_width 0
+hc attr theme.border_width 1
+hc attr theme.background_color '#141414'
+
+hc set window_gap 10
+hc set frame_padding 0
+hc set smart_window_surroundings off
+hc set smart_frame_surroundings on
+hc set mouse_recenter_gap 0
+hc set frame_bg_transparent true
+
+# rules
+hc unrule -F
+hc rule focus=on # normally focus new clients
+hc rule windowtype~'_NET_WM_WINDOW_TYPE_(DIALOG|UTILITY|SPLASH)' floating=on
+hc rule windowtype='_NET_WM_WINDOW_TYPE_DIALOG' focus=on
+hc rule windowtype~'_NET_WM_WINDOW_TYPE_(NOTIFICATION|DOCK|DESKTOP)' manage=off
+hc rule title="Origin" tag=9 focus=off
+hc rule title="Wine System Tray" tag=9 focus=off
+
+# unlock, just to be sure
+hc unlock
+
+# launch polybar
+~/.config/polybar/launch.sh
+
+xcompmgr -cfnS
+fcitx5 -d &
diff --git a/.config/nushell/config.nu b/.config/nushell/config.nu
new file mode 100644
index 0000000..99f311b
--- /dev/null
+++ b/.config/nushell/config.nu
@@ -0,0 +1,889 @@
+let completer = {|spans|
+ fish --command $'complete "--do-complete=($spans | str join " ")"'
+ | from tsv --flexible --noheaders --no-infer
+ | rename value description
+}
+
+let dark_theme = {
+ separator: white
+ leading_trailing_space_bg: { attr: n }
+ header: green_bold
+ empty: blue
+
+
+
+ bool: light_cyan
+ int: white
+ filesize: cyan
+ duration: white
+ date: purple
+ range: white
+ float: white
+ string: white
+ nothing: white
+ binary: white
+ cell-path: white
+ row_index: green_bold
+ record: white
+ list: white
+ block: white
+ hints: dark_gray
+ search_result: { bg: red fg: white }
+ shape_and: purple_bold
+ shape_binary: purple_bold
+ shape_block: blue_bold
+ shape_bool: light_cyan
+ shape_closure: green_bold
+ shape_custom: green
+ shape_datetime: cyan_bold
+ shape_directory: cyan
+ shape_external: cyan
+ shape_externalarg: green_bold
+ shape_external_resolved: light_yellow_bold
+ shape_filepath: cyan
+ shape_flag: blue_bold
+ shape_float: purple_bold
+
+ shape_garbage: { fg: white bg: red attr: b}
+ shape_globpattern: cyan_bold
+ shape_int: purple_bold
+ shape_internalcall: cyan_bold
+ shape_keyword: cyan_bold
+ shape_list: cyan_bold
+ shape_literal: blue
+ shape_match_pattern: green
+ shape_matching_brackets: { attr: u }
+ shape_nothing: light_cyan
+ shape_operator: yellow
+ shape_or: purple_bold
+ shape_pipe: purple_bold
+ shape_range: yellow_bold
+ shape_record: cyan_bold
+ shape_redirection: purple_bold
+ shape_signature: green_bold
+ shape_string: green
+ shape_string_interpolation: cyan_bold
+ shape_table: blue_bold
+ shape_variable: purple
+ shape_vardecl: purple
+}
+
+let light_theme = {
+
+ separator: dark_gray
+ leading_trailing_space_bg: { attr: n }
+ header: green_bold
+ empty: blue
+
+
+
+ bool: dark_cyan
+ int: dark_gray
+ filesize: cyan_bold
+ duration: dark_gray
+ date: purple
+ range: dark_gray
+ float: dark_gray
+ string: dark_gray
+ nothing: dark_gray
+ binary: dark_gray
+ cell-path: dark_gray
+ row_index: green_bold
+ record: dark_gray
+ list: dark_gray
+ block: dark_gray
+ hints: dark_gray
+ search_result: { fg: white bg: red }
+ shape_and: purple_bold
+ shape_binary: purple_bold
+ shape_block: blue_bold
+ shape_bool: light_cyan
+ shape_closure: green_bold
+ shape_custom: green
+ shape_datetime: cyan_bold
+ shape_directory: cyan
+ shape_external: cyan
+ shape_externalarg: green_bold
+ shape_external_resolved: light_purple_bold
+ shape_filepath: cyan
+ shape_flag: blue_bold
+ shape_float: purple_bold
+
+ shape_garbage: { fg: white bg: red attr: b}
+ shape_globpattern: cyan_bold
+ shape_int: purple_bold
+ shape_internalcall: cyan_bold
+ shape_keyword: cyan_bold
+ shape_list: cyan_bold
+ shape_literal: blue
+ shape_match_pattern: green
+ shape_matching_brackets: { attr: u }
+ shape_nothing: light_cyan
+ shape_operator: yellow
+ shape_or: purple_bold
+ shape_pipe: purple_bold
+ shape_range: yellow_bold
+ shape_record: cyan_bold
+ shape_redirection: purple_bold
+ shape_signature: green_bold
+ shape_string: green
+ shape_string_interpolation: cyan_bold
+ shape_table: blue_bold
+ shape_variable: purple
+ shape_vardecl: purple
+}
+
+
+
+
+
+
+
+$env.config = {
+ show_banner: false
+
+ ls: {
+ use_ls_colors: true
+ clickable_links: true
+ }
+
+ rm: {
+ always_trash: false
+ }
+
+ table: {
+ mode: rounded
+ index_mode: always
+ show_empty: true
+ padding: { left: 1, right: 1 }
+ trim: {
+ methodology: wrapping
+ wrapping_try_keep_words: true
+ truncating_suffix: "..."
+ }
+ header_on_separator: false
+
+ }
+
+ error_style: "fancy"
+
+
+
+
+ datetime_format: {
+
+
+ }
+
+ explore: {
+ status_bar_background: { fg: "#1D1F21", bg: "#C4C9C6" },
+ command_bar_text: { fg: "#C4C9C6" },
+ highlight: { fg: "black", bg: "yellow" },
+ status: {
+ error: { fg: "white", bg: "red" },
+ warn: {}
+ info: {}
+ },
+ table: {
+ split_line: { fg: "#404040" },
+ selected_cell: { bg: light_blue },
+ selected_row: {},
+ selected_column: {},
+ },
+ }
+
+ history: {
+ max_size: 100_000
+ sync_on_enter: true
+ file_format: "plaintext"
+ isolation: false
+ }
+
+ completions: {
+ case_sensitive: false
+ quick: true
+ partial: true
+ algorithm: "prefix"
+ external: {
+ enable: true
+ max_results: 100
+ completer: $completer
+ }
+ use_ls_colors: true
+ }
+
+ filesize: {
+ unit: "metric"
+ }
+
+ cursor_shape: {
+ emacs: line
+ vi_insert: block
+ vi_normal: underscore
+ }
+
+ color_config: $dark_theme
+ footer_mode: "auto"
+ float_precision: 2
+ buffer_editor: ""
+ use_ansi_coloring: true
+ bracketed_paste: true
+ edit_mode: emacs
+ shell_integration: {
+
+ osc2: true
+
+ osc7: true
+
+ osc8: true
+
+ osc9_9: false
+
+
+
+
+
+
+ osc133: true
+
+
+
+
+
+
+
+
+ osc633: true
+
+ reset_application_mode: true
+ }
+ render_right_prompt_on_last_line: false
+ use_kitty_protocol: false
+ highlight_resolved_externals: false
+ recursion_limit: 50
+
+ plugins: {}
+
+ plugin_gc: {
+
+ default: {
+ enabled: true
+ stop_after: 10sec
+ }
+ plugins: {
+
+ #
+
+
+
+ }
+ }
+
+ hooks: {
+ pre_prompt: [{ null }]
+ pre_execution: [{ null }]
+ env_change: {
+ PWD: [{|before, after| null }]
+ }
+ display_output: "if (term size).columns >= 100 { table -e } else { table }"
+ command_not_found: { null }
+ }
+
+ menus: [
+ {
+ name: completion_menu
+ only_buffer_difference: false
+ marker: "| "
+ type: {
+ layout: columnar
+ columns: 4
+ col_width: 20
+ col_padding: 2
+ }
+ style: {
+ text: green
+ selected_text: { attr: r }
+ description_text: yellow
+ match_text: { attr: u }
+ selected_match_text: { attr: ur }
+ }
+ }
+ {
+ name: ide_completion_menu
+ only_buffer_difference: false
+ marker: "| "
+ type: {
+ layout: ide
+ min_completion_width: 0,
+ max_completion_width: 50,
+ max_completion_height: 10,
+ padding: 0,
+ border: true,
+ cursor_offset: 0,
+ description_mode: "prefer_right"
+ min_description_width: 0
+ max_description_width: 50
+ max_description_height: 10
+ description_offset: 1
+ correct_cursor_pos: false
+ }
+ style: {
+ text: green
+ selected_text: { attr: r }
+ description_text: yellow
+ match_text: { attr: u }
+ selected_match_text: { attr: ur }
+ }
+ }
+ {
+ name: history_menu
+ only_buffer_difference: true
+ marker: "? "
+ type: {
+ layout: list
+ page_size: 10
+ }
+ style: {
+ text: green
+ selected_text: green_reverse
+ description_text: yellow
+ }
+ }
+ {
+ name: help_menu
+ only_buffer_difference: true
+ marker: "? "
+ type: {
+ layout: description
+ columns: 4
+ col_width: 20
+ col_padding: 2
+ selection_rows: 4
+ description_rows: 10
+ }
+ style: {
+ text: green
+ selected_text: green_reverse
+ description_text: yellow
+ }
+ }
+ ]
+
+ keybindings: [
+ {
+ name: completion_menu
+ modifier: none
+ keycode: tab
+ mode: [emacs vi_normal vi_insert]
+ event: {
+ until: [
+ { send: menu name: completion_menu }
+ { send: menunext }
+ { edit: complete }
+ ]
+ }
+ }
+ {
+ name: ide_completion_menu
+ modifier: control
+ keycode: char_n
+ mode: [emacs vi_normal vi_insert]
+ event: {
+ until: [
+ { send: menu name: ide_completion_menu }
+ { send: menunext }
+ { edit: complete }
+ ]
+ }
+ }
+ {
+ name: history_menu
+ modifier: control
+ keycode: char_r
+ mode: [emacs, vi_insert, vi_normal]
+ event: { send: menu name: history_menu }
+ }
+ {
+ name: help_menu
+ modifier: none
+ keycode: f1
+ mode: [emacs, vi_insert, vi_normal]
+ event: { send: menu name: help_menu }
+ }
+ {
+ name: completion_previous_menu
+ modifier: shift
+ keycode: backtab
+ mode: [emacs, vi_normal, vi_insert]
+ event: { send: menuprevious }
+ }
+ {
+ name: next_page_menu
+ modifier: control
+ keycode: char_x
+ mode: emacs
+ event: { send: menupagenext }
+ }
+ {
+ name: undo_or_previous_page_menu
+ modifier: control
+ keycode: char_z
+ mode: emacs
+ event: {
+ until: [
+ { send: menupageprevious }
+ { edit: undo }
+ ]
+ }
+ }
+ {
+ name: escape
+ modifier: none
+ keycode: escape
+ mode: [emacs, vi_normal, vi_insert]
+ event: { send: esc }
+ }
+ {
+ name: cancel_command
+ modifier: control
+ keycode: char_c
+ mode: [emacs, vi_normal, vi_insert]
+ event: { send: ctrlc }
+ }
+ {
+ name: quit_shell
+ modifier: control
+ keycode: char_d
+ mode: [emacs, vi_normal, vi_insert]
+ event: { send: ctrld }
+ }
+ {
+ name: clear_screen
+ modifier: control
+ keycode: char_l
+ mode: [emacs, vi_normal, vi_insert]
+ event: { send: clearscreen }
+ }
+ {
+ name: search_history
+ modifier: control
+ keycode: char_q
+ mode: [emacs, vi_normal, vi_insert]
+ event: { send: searchhistory }
+ }
+ {
+ name: open_command_editor
+ modifier: control
+ keycode: char_o
+ mode: [emacs, vi_normal, vi_insert]
+ event: { send: openeditor }
+ }
+ {
+ name: move_up
+ modifier: none
+ keycode: up
+ mode: [emacs, vi_normal, vi_insert]
+ event: {
+ until: [
+ { send: menuup }
+ { send: up }
+ ]
+ }
+ }
+ {
+ name: move_down
+ modifier: none
+ keycode: down
+ mode: [emacs, vi_normal, vi_insert]
+ event: {
+ until: [
+ { send: menudown }
+ { send: down }
+ ]
+ }
+ }
+ {
+ name: move_left
+ modifier: none
+ keycode: left
+ mode: [emacs, vi_normal, vi_insert]
+ event: {
+ until: [
+ { send: menuleft }
+ { send: left }
+ ]
+ }
+ }
+ {
+ name: move_right_or_take_history_hint
+ modifier: none
+ keycode: right
+ mode: [emacs, vi_normal, vi_insert]
+ event: {
+ until: [
+ { send: historyhintcomplete }
+ { send: menuright }
+ { send: right }
+ ]
+ }
+ }
+ {
+ name: move_one_word_left
+ modifier: control
+ keycode: left
+ mode: [emacs, vi_normal, vi_insert]
+ event: { edit: movewordleft }
+ }
+ {
+ name: move_one_word_right_or_take_history_hint
+ modifier: control
+ keycode: right
+ mode: [emacs, vi_normal, vi_insert]
+ event: {
+ until: [
+ { send: historyhintwordcomplete }
+ { edit: movewordright }
+ ]
+ }
+ }
+ {
+ name: move_to_line_start
+ modifier: none
+ keycode: home
+ mode: [emacs, vi_normal, vi_insert]
+ event: { edit: movetolinestart }
+ }
+ {
+ name: move_to_line_start
+ modifier: control
+ keycode: char_a
+ mode: [emacs, vi_normal, vi_insert]
+ event: { edit: movetolinestart }
+ }
+ {
+ name: move_to_line_end_or_take_history_hint
+ modifier: none
+ keycode: end
+ mode: [emacs, vi_normal, vi_insert]
+ event: {
+ until: [
+ { send: historyhintcomplete }
+ { edit: movetolineend }
+ ]
+ }
+ }
+ {
+ name: move_to_line_end_or_take_history_hint
+ modifier: control
+ keycode: char_e
+ mode: [emacs, vi_normal, vi_insert]
+ event: {
+ until: [
+ { send: historyhintcomplete }
+ { edit: movetolineend }
+ ]
+ }
+ }
+ {
+ name: move_to_line_start
+ modifier: control
+ keycode: home
+ mode: [emacs, vi_normal, vi_insert]
+ event: { edit: movetolinestart }
+ }
+ {
+ name: move_to_line_end
+ modifier: control
+ keycode: end
+ mode: [emacs, vi_normal, vi_insert]
+ event: { edit: movetolineend }
+ }
+ {
+ name: move_up
+ modifier: control
+ keycode: char_p
+ mode: [emacs, vi_normal, vi_insert]
+ event: {
+ until: [
+ { send: menuup }
+ { send: up }
+ ]
+ }
+ }
+ {
+ name: move_down
+ modifier: control
+ keycode: char_t
+ mode: [emacs, vi_normal, vi_insert]
+ event: {
+ until: [
+ { send: menudown }
+ { send: down }
+ ]
+ }
+ }
+ {
+ name: delete_one_character_backward
+ modifier: none
+ keycode: backspace
+ mode: [emacs, vi_insert]
+ event: { edit: backspace }
+ }
+ {
+ name: delete_one_word_backward
+ modifier: control
+ keycode: backspace
+ mode: [emacs, vi_insert]
+ event: { edit: backspaceword }
+ }
+ {
+ name: delete_one_character_forward
+ modifier: none
+ keycode: delete
+ mode: [emacs, vi_insert]
+ event: { edit: delete }
+ }
+ {
+ name: delete_one_character_forward
+ modifier: control
+ keycode: delete
+ mode: [emacs, vi_insert]
+ event: { edit: delete }
+ }
+ {
+ name: delete_one_character_backward
+ modifier: control
+ keycode: char_h
+ mode: [emacs, vi_insert]
+ event: { edit: backspace }
+ }
+ {
+ name: delete_one_word_backward
+ modifier: control
+ keycode: char_w
+ mode: [emacs, vi_insert]
+ event: { edit: backspaceword }
+ }
+ {
+ name: move_left
+ modifier: none
+ keycode: backspace
+ mode: vi_normal
+ event: { edit: moveleft }
+ }
+ {
+ name: newline_or_run_command
+ modifier: none
+ keycode: enter
+ mode: emacs
+ event: { send: enter }
+ }
+ {
+ name: move_left
+ modifier: control
+ keycode: char_b
+ mode: emacs
+ event: {
+ until: [
+ { send: menuleft }
+ { send: left }
+ ]
+ }
+ }
+ {
+ name: move_right_or_take_history_hint
+ modifier: control
+ keycode: char_f
+ mode: emacs
+ event: {
+ until: [
+ { send: historyhintcomplete }
+ { send: menuright }
+ { send: right }
+ ]
+ }
+ }
+ {
+ name: redo_change
+ modifier: control
+ keycode: char_g
+ mode: emacs
+ event: { edit: redo }
+ }
+ {
+ name: undo_change
+ modifier: control
+ keycode: char_z
+ mode: emacs
+ event: { edit: undo }
+ }
+ {
+ name: paste_before
+ modifier: control
+ keycode: char_y
+ mode: emacs
+ event: { edit: pastecutbufferbefore }
+ }
+ {
+ name: cut_word_left
+ modifier: control
+ keycode: char_w
+ mode: emacs
+ event: { edit: cutwordleft }
+ }
+ {
+ name: cut_line_to_end
+ modifier: control
+ keycode: char_k
+ mode: emacs
+ event: { edit: cuttoend }
+ }
+ {
+ name: cut_line_from_start
+ modifier: control
+ keycode: char_u
+ mode: emacs
+ event: { edit: cutfromstart }
+ }
+ {
+ name: swap_graphemes
+ modifier: control
+ keycode: char_t
+ mode: emacs
+ event: { edit: swapgraphemes }
+ }
+ {
+ name: move_one_word_left
+ modifier: alt
+ keycode: left
+ mode: emacs
+ event: { edit: movewordleft }
+ }
+ {
+ name: move_one_word_right_or_take_history_hint
+ modifier: alt
+ keycode: right
+ mode: emacs
+ event: {
+ until: [
+ { send: historyhintwordcomplete }
+ { edit: movewordright }
+ ]
+ }
+ }
+ {
+ name: move_one_word_left
+ modifier: alt
+ keycode: char_b
+ mode: emacs
+ event: { edit: movewordleft }
+ }
+ {
+ name: move_one_word_right_or_take_history_hint
+ modifier: alt
+ keycode: char_f
+ mode: emacs
+ event: {
+ until: [
+ { send: historyhintwordcomplete }
+ { edit: movewordright }
+ ]
+ }
+ }
+ {
+ name: delete_one_word_forward
+ modifier: alt
+ keycode: delete
+ mode: emacs
+ event: { edit: deleteword }
+ }
+ {
+ name: delete_one_word_backward
+ modifier: alt
+ keycode: backspace
+ mode: emacs
+ event: { edit: backspaceword }
+ }
+ {
+ name: delete_one_word_backward
+ modifier: alt
+ keycode: char_m
+ mode: emacs
+ event: { edit: backspaceword }
+ }
+ {
+ name: cut_word_to_right
+ modifier: alt
+ keycode: char_d
+ mode: emacs
+ event: { edit: cutwordright }
+ }
+ {
+ name: upper_case_word
+ modifier: alt
+ keycode: char_u
+ mode: emacs
+ event: { edit: uppercaseword }
+ }
+ {
+ name: lower_case_word
+ modifier: alt
+ keycode: char_l
+ mode: emacs
+ event: { edit: lowercaseword }
+ }
+ {
+ name: capitalize_char
+ modifier: alt
+ keycode: char_c
+ mode: emacs
+ event: { edit: capitalizechar }
+ }
+
+ {
+ name: copy_selection_system
+ modifier: control_shift
+ keycode: char_c
+ mode: emacs
+ event: { edit: copyselection }
+ }
+ {
+ name: cut_selection_system
+ modifier: control_shift
+ keycode: char_x
+ mode: emacs
+ event: { edit: cutselection }
+ }
+ {
+ name: select_all
+ modifier: control_shift
+ keycode: char_a
+ mode: emacs
+ event: { edit: selectall }
+ }
+ ]
+}
+
+alias _rg = rg
+export def --wrapped rg [...rest] {
+ mut result = ''
+ if ($in != null) {
+ $result = (print $in | _rg ...$rest)
+ } else {
+ $result = (_rg ...$rest)
+ }
+ $result | lines | parse "{File}:{Result}" | update Result { |row| ($row.Result | str replace --all $rest.0 $'(ansi gb)($rest.0)(ansi reset)') } | sort-by File
+}
+
+
+use ~/.cache/starship/init.nu
+use documents.nu
+use remarkable.nu
+use notes.nu
+use dv.nu
+use onepiece.nu
+use youtube.nu
+use phone.nu
+use screen.nu
+use wishlist.nu
+use reading-order.nu
diff --git a/.config/nushell/documents.nu b/.config/nushell/documents.nu
new file mode 100644
index 0000000..3293d70
--- /dev/null
+++ b/.config/nushell/documents.nu
@@ -0,0 +1,4 @@
+export def scan [] {
+ sudo scanimage --format=pdf --output-file $"/mnt/files/Documents/Scans/(date now | format date "%FT%T").pdf" --progress
+}
+
diff --git a/.config/nushell/dv.nu b/.config/nushell/dv.nu
new file mode 100644
index 0000000..e5e382a
--- /dev/null
+++ b/.config/nushell/dv.nu
@@ -0,0 +1,25 @@
+export def record [name: string] {
+ let location: path = $env.MISCPATH | path join / rawdv $name
+ mkdir $location
+ cd $location
+ dvgrab -a
+}
+
+export def collect-to-mp4 [dvdirectory: string, name: string] {
+ let location: path = $env.MISCPATH | path join / rawdv $dvdirectory
+ let output_location: path = $env.MISCPATH | path join output
+ cd $location
+ let file_list = "tmp_file_list.txt"
+ ls **/*.dv
+ | get name
+ | each { |path| $"file '($path)'"}
+ | save $file_list
+ ffmpeg -f concat -safe 0 -i $file_list -c:v libx264 -crf 23 -preset medium $"($name).mp4"
+ mv $"($name).mp4" $output_location
+ rm $file_list
+}
+
+export def record-and-save [name: string] {
+ record $name
+ collect-to-mp4 $name $name
+}
diff --git a/.config/nushell/notes.nu b/.config/nushell/notes.nu
new file mode 100644
index 0000000..c591063
--- /dev/null
+++ b/.config/nushell/notes.nu
@@ -0,0 +1,41 @@
+def open-db-in-memory [] {
+ if ($env.NOTES_DB_PATH | path exists) {
+ stor import --file-name (get-db-path)
+ } else {
+ stor reset
+ stor create -t "note" -c {created: datetime, text: str}
+ stor export --file-name (get-db-path)
+ }
+}
+
+def save-db-to-file [] {
+ rm $env.NOTES_DB_PATH
+ stor export --file-name $env.NOTES_DB_PATH
+}
+
+export def add [text: string] {
+ open-db-in-memory
+ stor insert -t note -d { created: (date now), text: ($text) }
+ save-db-to-file
+}
+
+export def browse [--before: datetime, --after: datetime] {
+ open-db-in-memory
+ let before_filter = if ($before != null) {
+ $before
+ } else {
+ date now
+ }
+
+ let after_filter = if ($after != null) {
+ $after
+ } else {
+ "0001-01-01" | into datetime
+ }
+
+ let notes = open $env.NOTES_DB_PATH | get note | where {|row|
+ ($row.created | into datetime) < $before_filter and ($row.created | into datetime) > $after_filter
+ }
+
+ $notes
+}
diff --git a/.config/nushell/phone.nu b/.config/nushell/phone.nu
new file mode 100644
index 0000000..ef62a80
--- /dev/null
+++ b/.config/nushell/phone.nu
@@ -0,0 +1,6 @@
+export def camera-as-webcam [
+ direction: string # 'front' or 'back'
+] {
+ scrcpy --v4l2-sink=/dev/video0 -m1024 --video-source=camera --no-audio --camera-facing ($direction)
+}
+
diff --git a/.config/nushell/reading-order.nu b/.config/nushell/reading-order.nu
new file mode 100644
index 0000000..d02d351
--- /dev/null
+++ b/.config/nushell/reading-order.nu
@@ -0,0 +1,142 @@
+export def "books add" [
+ name: string, # name of the book
+ author: string, # name of the book's author
+ --finished # mark the book already read - default: false
+] {
+ let book_id = random uuid
+ {
+ id: $book_id,
+ name: $name,
+ author: $author
+ finished: ($finished | default false)
+ } | into sqlite $env.READINGORDER_DB_PATH -t books
+
+ print $"Added ($name) successfully to list of books."
+ books show --id $book_id
+}
+
+export def "books show" [
+ --id: string, # id of the book, identify using `reading-order books show --explore`
+ --explore # show in nushell explorer
+] {
+ if not ($env.READINGORDER_DB_PATH | path exists) {
+ print "List of books is empty. If it shouldn't be empty, check the READINGORDER_DB_PATH environment variable."
+ return
+ }
+ mut books = open $env.READINGORDER_DB_PATH | get books
+
+ if $id != null {
+ $books = $books | where id == $id
+ }
+
+ if ($explore) {
+ return ($books | explore -p)
+ }
+
+ return $books
+}
+
+export def "books set-name" [
+ id: string, # id of the book, identify using `reading-order books show --explore`
+ name: string
+] {
+ if not ($env.READINGORDER_DB_PATH | path exists) {
+ print "List of books is empty. If it shouldn't be empty, check the READINGORDER_DB_PATH environment variable."
+ return
+ }
+ open $env.READINGORDER_DB_PATH | query db "UPDATE books SET name = ? WHERE id = ?" -p [$name, $id]
+ print $"Updated name for book with id ($id) successfully."
+ books show --id $id
+}
+
+export def "books set-author-name" [
+ id: string, # id of the book, identify using `reading-order books show --explore`
+ author: string
+] {
+ if not ($env.READINGORDER_DB_PATH | path exists) {
+ print "List of books is empty. If it shouldn't be empty, check the READINGORDER_DB_PATH environment variable."
+ return
+ }
+ open $env.READINGORDER_DB_PATH | query db "UPDATE books SET author = ? WHERE id = ?" -p [$author, $id]
+ print $"Updated author name for book with id ($id) successfully."
+ books show --id $id
+}
+
+export def "books set-finished" [
+ id: string, # id of the book, identify using `reading-order books show --explore`
+ finished: bool = true,
+] {
+ if not ($env.READINGORDER_DB_PATH | path exists) {
+ print "List of books is empty. If it shouldn't be empty, check the READINGORDER_DB_PATH environment variable."
+ return
+ }
+ open $env.READINGORDER_DB_PATH | query db "UPDATE books SET finished = ? WHERE id = ?" -p [$finished, $id]
+ print $"Updated finished status for book with id ($id) successfully."
+ books show --id $id
+}
+
+# Add a reading order
+export def add [
+ book1_id: string, # id of the book to be read before book 2, identify using `reading-order books show --explore`
+ book2_id: string, # id of the book to be read after book 1, identify using `reading-order books show --explore`
+] {
+ let reading_order_id = random uuid
+ {
+ id: $reading_order_id,
+ book1: $book1_id,
+ book2: $book2_id,
+ } | into sqlite $env.READINGORDER_DB_PATH
+
+ print $"Added reading order successfully."
+ show --id $reading_order_id
+}
+
+export def show [
+ --id: string, # id of the book, identify using `reading-order books show --explore`
+ --explore # show in nushell explorer
+] {
+ if not ($env.READINGORDER_DB_PATH | path exists) {
+ print "List of books is empty. If it shouldn't be empty, check the READINGORDER_DB_PATH environment variable."
+ return
+ }
+
+ mut reading_orders = open $env.READINGORDER_DB_PATH | get main
+
+ if $id != null {
+ return ($reading_orders | where id == $id)
+ }
+
+ if ($explore) {
+ return ($reading_orders | explore -p)
+ }
+
+ return $reading_orders
+}
+
+export def read-next [] {
+ if not ($env.READINGORDER_DB_PATH | path exists) {
+ print "List of books is empty. If it shouldn't be empty, check the READINGORDER_DB_PATH environment variable."
+ return
+ }
+
+ let reading_orders = open $env.READINGORDER_DB_PATH | get main
+ mut books = open $env.READINGORDER_DB_PATH | get books | where { |book|
+ if $book.finished == 1 {
+ return false
+ }
+
+
+ for order in $reading_orders {
+ if $order.book2 != $book.id {
+ continue
+ }
+ let book_to_read_before = books show --id $order.book1
+ if $book_to_read_before.finished != 1 {
+ return false
+ }
+ }
+ return true
+
+ }
+ return $books
+}
diff --git a/.config/nushell/remarkable.nu b/.config/nushell/remarkable.nu
new file mode 100644
index 0000000..8a5522c
--- /dev/null
+++ b/.config/nushell/remarkable.nu
@@ -0,0 +1,18 @@
+export def upload [file: path] {
+ let filename = ($file | path parse | get stem)
+ let extension = ($file | path parse | get extension)
+ curl $"http://($env.REMARKABLE_IP)/upload" -H "Origin: http://192.168.178.24" -H "Referer: http://192.168.178.24" -H 'Connection: keep-alive' -F $"file=@($file);filename=($filename);type=application/($extension)"
+}
+
+export def download [collection_id?: string] {
+ curl $"http://($env.REMARKABLE_IP)/documents/($collection_id)"
+ | from json
+ | select VissibleName ID Type
+ | input list
+ | if $in.Type == 'DocumentType' {
+ let name = $in.VissibleName;
+ curl $"http://($env.REMARKABLE_IP)/download/($in.ID)/pdf" | save -f $"($name | str snake-case).pdf"
+ } else {
+ download $in.ID
+ }
+}
diff --git a/.config/nushell/screen.nu b/.config/nushell/screen.nu
new file mode 100644
index 0000000..88c72f5
--- /dev/null
+++ b/.config/nushell/screen.nu
@@ -0,0 +1,17 @@
+export def shot [] {
+ maim -s $"($env.SCREENS_PATH)/(date now | format date %s)-screen.png"
+}
+
+export def shoot [--duration: int, --delay: int] {
+ mut args = []
+
+ if $duration != null {
+ $args = $args | append "-t" | append $duration
+ }
+ if $delay != null {
+ $args = $args | append $"-ss" | append $delay
+ }
+
+
+ ffmpeg -video_size 1900x1080 -framerate 25 -f x11grab -i :0.0+0,0 -f alsa -ac 2 -i pulse -acodec aac -vf setpts=N/FR/TB ...$args $"($env.RECORDINGS_PATH)(date now | format date %s)-recording.mp4"
+}
diff --git a/.config/nushell/wishlist.nu b/.config/nushell/wishlist.nu
new file mode 100644
index 0000000..10cc0f5
--- /dev/null
+++ b/.config/nushell/wishlist.nu
@@ -0,0 +1,183 @@
+export def add [
+ name: string, # name of the item
+ --comment: string, # comment for the item
+ --sources: list<string>, # a source to acquire the item, typically a URL
+ --importance: int # a number to indicate the importance, choose the scaling yourself, default: 0
+] {
+ let item_id = random uuid
+ {
+ id: $item_id,
+ name: $name,
+ comment: ($comment | default ''),
+ acquired: false,
+ importance: ($importance | default 0)
+ } | into sqlite $env.WISHLIST_DB_PATH
+
+ print $"Added ($name) successfully to the wishlist."
+
+ if $sources != null and ($sources | length) > 0 {
+ $sources | each { |source|
+ let link_id = random uuid
+ {
+ id: (random uuid),
+ item_id: $item_id,
+ content: $source
+ } | into sqlite $env.WISHLIST_DB_PATH -t sources
+ }
+ print $"Added sources for ($name) successfully."
+ }
+ show --id $item_id
+}
+
+export def show [
+ --id: string, # id of the item, identify using `wishlist show --explore`
+ --explore # show in nushell explorer
+] {
+ if not ($env.WISHLIST_DB_PATH | path exists) {
+ print "Wishlist is empty. If it shouldn't be empty, check the WISHLIST_DB_PATH environment variable."
+ return
+ }
+ mut wishlist = open $env.WISHLIST_DB_PATH | get main
+
+ if $id != null {
+ $wishlist = $wishlist | where id == $id
+ }
+
+ if ($explore) {
+ return ($wishlist | explore -p)
+ }
+
+ return $wishlist
+}
+
+export def set-comment [
+ id: string, # id of the item, identify using `wishlist show --explore`
+ comment: string
+] {
+ if not ($env.WISHLIST_DB_PATH | path exists) {
+ print "Wishlist database was not found. If this shouldn't happen, check the WISHLIST_DB_PATH environment variable."
+ return
+ }
+
+ open $env.WISHLIST_DB_PATH | query db "UPDATE main SET comment = ? WHERE id = ?" -p [$comment, $id]
+ print $"Updated comment for item with id ($id) successfully."
+ show --id $id
+}
+
+export def set-importance [
+ id: string, # id of the item, identify using `wishlist show --explore`
+ importance: int
+] {
+ if not ($env.WISHLIST_DB_PATH | path exists) {
+ print "Wishlist database was not found. If this shouldn't happen, check the WISHLIST_DB_PATH environment variable."
+ return
+ }
+
+ open $env.WISHLIST_DB_PATH | query db "UPDATE main SET importance = ? WHERE id = ?" -p [$importance, $id]
+ print $"Updated importance for item with id ($id) successfully."
+ show --id $id
+}
+
+export def check [
+ id: string, # id of the item, identify using `wishlist show --explore`
+] {
+ if not ($env.WISHLIST_DB_PATH | path exists) {
+ print "Wishlist database was not found. If this shouldn't happen, check the WISHLIST_DB_PATH environment variable."
+ return
+ }
+
+ open $env.WISHLIST_DB_PATH | query db "UPDATE main SET acquired = true WHERE id = ?" -p [$id]
+ print $"Checked off item with id ($id) successfully."
+ show --id $id
+
+}
+
+export def remove [
+ id: string, # id of the item, identify using `wishlist show --explore`
+] {
+ if not ($env.WISHLIST_DB_PATH | path exists) {
+ print "Wishlist database was not found. If this shouldn't happen, check the WISHLIST_DB_PATH environment variable."
+ return
+ }
+
+ open $env.WISHLIST_DB_PATH | query db "DELETE FROM main WHERE id = ?" -p [$id]
+ print $"Removed item with id ($id) successfully."
+ show
+}
+
+# Get the highest value of importance in the wishlist
+export def highest-importance [] {
+ show | get importance | reduce { |it, acc| if ($it > $acc) { $it } else { $acc }}
+}
+
+# Get the lowest value of importance in the wishlist
+export def lowest-importance [] {
+ show | get importance | reduce { |it, acc| if ($it < $acc) { $it } else { $acc }}
+}
+
+export def "sources show" [
+ --id: string, # id of the source, identify using `wishlist sources show --explore`
+ --item-id: string, # id of the item, identify using `wishlist show --explore`
+ --explore # show in nushell explorer
+] {
+ if not ($env.WISHLIST_DB_PATH | path exists) {
+ print "Wishlist database was not found. If this shouldn't happen, check the WISHLIST_DB_PATH environment variable."
+ return
+ }
+
+ mut sources = open $env.WISHLIST_DB_PATH | get sources
+
+ if $id != null {
+ $sources = $sources | where id == $id
+ } else if $item_id != null {
+ $sources = $sources | where item_id == $item_id
+ }
+
+ if ($explore) {
+ return ($sources | explore -p)
+ }
+
+ return $sources
+}
+
+export def "sources add" [
+ content: string # content of the source to acquire the item, typically a URL
+ item_id: string, # id of the item, identify using `wishlist show --explore`
+] {
+ let source_id = random uuid
+ {
+ id: $source_id,
+ item_id: $item_id,
+ content: $content,
+ } | into sqlite $env.WISHLIST_DB_PATH -t sources
+ print $"Added new source to item with id ($item_id) successfully."
+ sources show --id $source_id
+}
+
+export def "sources update" [
+ id: string # id of the source, identify using `wishlist sources show --explore`
+ content: string # new content for the given source
+] {
+ if not ($env.WISHLIST_DB_PATH | path exists) {
+ print "Wishlist database was not found. If this shouldn't happen, check the WISHLIST_DB_PATH environment variable."
+ return
+ }
+
+ open $env.WISHLIST_DB_PATH | query db "UPDATE sources SET content = ? WHERE id = ?" -p [$content, $id]
+ print $"Updated source with id ($id) successfully."
+ sources show --id $id
+}
+
+export def "sources remove" [
+ id: string, # id of the source, identify using `wishlist sources show --explore`
+] {
+ if not ($env.WISHLIST_DB_PATH | path exists) {
+ print "Wishlist database was not found. If this shouldn't happen, check the WISHLIST_DB_PATH environment variable."
+ return
+ }
+
+ open $env.WISHLIST_DB_PATH | query db "DELETE FROM sources WHERE id = ?" -p [$id]
+ print $"Removed source with id ($id) successfully."
+ sources show
+}
+
diff --git a/.config/nushell/youtube.nu b/.config/nushell/youtube.nu
new file mode 100644
index 0000000..c34b21b
--- /dev/null
+++ b/.config/nushell/youtube.nu
@@ -0,0 +1,7 @@
+export def download [video_url: string] {
+ yt-dlp --cookies-from-browser firefox --downloader aria2c --downloader-args '-c -j 3 -x 3 -s 3 -k 1M' --sponsorblock-mark default --sponsorblock-remove sponsor --restrict-filenames -P $"($env.MISCPATH)/Youtube/" --output '%(channel)s_%(channel_id)s/%(playlist|Misc)s/%(upload_date)s.%(id)s.%(title)s.%(ext)s' $video_url
+}
+
+export def stream [video_url: string] {
+ yt-dlp --cookies-from-browser firefox --downloader aria2c --downloader-args '-c -j 3 -x 3 -s 3 -k 1M' --sponsorblock-mark default --sponsorblock-remove sponsor $video_url -o - | ffplay -
+}
diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua
new file mode 100644
index 0000000..64f9138
--- /dev/null
+++ b/.config/nvim/init.lua
@@ -0,0 +1,5 @@
+require("plugins");
+require("settings");
+require("lsp_config");
+require("treesitter_config");
+require("writing_config");
diff --git a/.config/nvim/lua/.luarc.json b/.config/nvim/lua/.luarc.json
new file mode 100644
index 0000000..23b9ee2
--- /dev/null
+++ b/.config/nvim/lua/.luarc.json
@@ -0,0 +1,3 @@
+{
+ "workspace.checkThirdParty": false
+} \ No newline at end of file
diff --git a/.config/nvim/lua/lsp_config.lua b/.config/nvim/lua/lsp_config.lua
new file mode 100644
index 0000000..20eecd1
--- /dev/null
+++ b/.config/nvim/lua/lsp_config.lua
@@ -0,0 +1,264 @@
+-- show diagnostic messages in quickfix list with <M-q>
+vim.diagnostic.config({
+ virtual_text = false,
+ signs = true,
+ float = { border = 'single' },
+})
+vim.keymap.set("n", "<M-q>", function()
+ -- toggle quickfix list
+ local windows = vim.fn.getwininfo()
+ local qf_opened = false
+ for i = 1, #windows, 1 do
+ local window = windows[i]
+ if window.quickfix == 1 then
+ qf_opened = true
+ break
+ end
+ end
+ if qf_opened then
+ vim.api.nvim_command("cclose")
+ else
+ vim.diagnostic.setqflist()
+ end
+end)
+
+-- setup and config nvim-cmp completion
+local cmp = require("cmp")
+cmp.register_source("nvim_lsp_signature_help", require("cmp_nvim_lsp_signature_help").new())
+
+cmp.setup({
+ -- set vim-vsnip as snippet engine for nvim-cmp completion
+ snippet = {
+ expand = function(args)
+ vim.fn["vsnip#anonymous"](args.body)
+ end,
+ },
+ mapping = cmp.mapping.preset.insert {
+ ['<CR>'] = cmp.mapping.confirm({ select = true }),
+ ['<C-Down>'] = cmp.mapping.scroll_docs(4),
+ ['<C-Up>'] = cmp.mapping.scroll_docs(-4),
+ },
+ -- complete based on LSP, Snippets and Buffer
+ sources = cmp.config.sources({
+ { name = 'nvim_lsp' },
+ { name = 'vsnip' },
+ }, {
+ { name = 'buffer' },
+ })
+})
+
+-- Jump forward or backward to snippet placeholders in insert mode
+vim.api.nvim_set_keymap("i", "<C-l>", "<Plug>(vsnip-jump-next)", { noremap = false })
+vim.api.nvim_set_keymap("s", "<C-l>", "<Plug>(vsnip-jump-next)", { noremap = false })
+vim.api.nvim_set_keymap("i", "<C-h>", "<Plug>(vsnip-jump-prev)", { noremap = false })
+vim.api.nvim_set_keymap("s", "<C-h>", "<Plug>(vsnip-jump-prev)", { noremap = false })
+
+
+-- complete text in search based on buffer
+cmp.setup.cmdline('/', {
+ mapping = cmp.mapping.preset.cmdline(),
+ sources = {
+ { name = 'buffer' }
+ }
+})
+
+-- compete path in commandline
+cmp.setup.cmdline(':', {
+ mapping = cmp.mapping.preset.cmdline(),
+ sources = cmp.config.sources({
+ { name = 'path' }
+ }, {
+ { name = 'cmdline' }
+ }),
+})
+
+-- add additional completion capabilities
+local capabilities = require('cmp_nvim_lsp').default_capabilities()
+
+
+-- attaches settings after language server attaches to current buffer
+local on_attach = function(client, bufnr)
+ local bufopts = { noremap = true, silent = true, buffer = bufnr }
+ vim.keymap.set("n", "gd", vim.lsp.buf.definition, bufopts)
+ vim.keymap.set("n", "gr", vim.lsp.buf.references, bufopts)
+ vim.keymap.set("n", "gi", vim.lsp.buf.implementation, bufopts)
+ vim.keymap.set("n", "K", vim.lsp.buf.hover, bufopts)
+ vim.api.nvim_create_autocmd("BufWritePre", {
+ pattern = "*",
+ callback = function()
+ vim.lsp.buf.format {
+ async = false
+ }
+ end,
+ })
+end
+
+for _, method in ipairs({ 'textDocument/diagnostic', 'workspace/diagnostic' }) do
+ local default_diagnostic_handler = vim.lsp.handlers[method]
+ vim.lsp.handlers[method] = function(err, result, context, config)
+ if err ~= nil and err.code == -32802 then
+ return
+ end
+ return default_diagnostic_handler(err, result, context, config)
+ end
+end
+
+-- Language Servers
+
+-- Rust
+vim.lsp.config('rust_analyzer', {
+ capabilities = capabilities,
+ on_attach = on_attach,
+ settings = {
+ ["rust-analyzer"] = {
+ checkOnSave = {
+ command = "clippy"
+ },
+ assist = {
+ importGranularity = "module",
+ importPrefix = "by_self",
+ },
+ cargo = {
+ loadOutDirsFromCheck = true
+ },
+ procMacro = {
+ enable = true
+ },
+ },
+ },
+})
+vim.lsp.enable('rust_analyzer')
+
+-- Bash
+vim.lsp.config('bashls', {
+ capabilities = capabilities,
+ on_attach = on_attach,
+})
+vim.lsp.enable('bashls')
+
+-- Python
+vim.lsp.config('jedi_language_server', {
+ capabilities = capabilities,
+ on_attach = on_attach,
+})
+vim.lsp.enable('jedi_language_server')
+
+-- HTML
+vim.lsp.config('html', {
+ capabilities = capabilities,
+ on_attach = on_attach,
+})
+vim.lsp.enable('html')
+
+-- CSS
+vim.lsp.config('cssls', {
+ capabilities = capabilities,
+ on_attach = on_attach,
+})
+vim.lsp.enable('cssl')
+
+-- Tex
+vim.lsp.config('texlab', {
+ capabilities = capabilities,
+ on_attach = on_attach,
+})
+vim.lsp.enable('texlab')
+
+-- Svelte
+vim.lsp.config('svelte', {
+ capabilities = capabilities,
+ on_attach = on_attach,
+})
+vim.lsp.enable('svelte')
+
+-- Typescript & Javascript
+vim.lsp.config('ts_ls', {
+ capabilities = capabilities,
+ on_attach = on_attach,
+ filetypes = { "typescript", "javascript" },
+})
+vim.lsp.enable('ts_ls')
+
+-- JSON
+vim.lsp.config('jsonls', {
+ capabilities = capabilities,
+ on_attach = on_attach,
+})
+vim.lsp.enable('jsonls')
+
+-- Lua
+vim.lsp.config('lua_ls', {
+ capabilities = capabilities,
+ on_attach = on_attach,
+ settings = {
+ Lua = {
+ diagnostics = {
+ globals = { "vim", "on_attach" }
+ },
+ workspace = {
+ library = vim.api.nvim_get_runtime_file("", true),
+ }
+ }
+ }
+})
+vim.lsp.enable('lua_ls')
+
+-- Java
+vim.lsp.config('jdtls', {
+ capabilities = capabilities,
+ on_attach = on_attach,
+})
+vim.lsp.enable('jdtls')
+
+-- C lang
+vim.lsp.config('clangd', {
+ capabilities = capabilities,
+ on_attach = on_attach,
+})
+vim.lsp.enable('clangd')
+
+-- Nushell
+vim.lsp.config('nushell', {
+ capabilities = capabilities,
+ on_attach = on_attach,
+})
+vim.lsp.enable('nushell')
+
+-- Go
+vim.lsp.config('gopls', {
+ capabilities = capabilities,
+ on_attach = on_attach,
+})
+vim.lsp.enable('gopls')
+
+-- Tailwind
+vim.lsp.config('tailwindcss', {
+ capabilities = capabilities,
+ on_attach = on_attach,
+ init_options = {
+ userLanguages = {
+ rust = "html",
+ }
+ },
+ filetypes = {
+ "html",
+ "svelte",
+ "rust"
+ }
+})
+vim.lsp.enable('tailwindcss')
+
+-- Elixir
+vim.lsp.config('expert', {
+ capabilities = capabilities,
+ on_attach = on_attach,
+ --cmd = { 'bash', '/home/thev2/expert/apps/expert/_build/prod/rel/plain/bin/start_expert', '--stdio' },
+ cmd = { 'expert', '--stdio' },
+ root_markers = { 'mix.exs', '.git' },
+ filetypes = { 'elixir', 'eelixir', 'heex' },
+})
+vim.lsp.enable('expert')
+
+
+-- show nvim-lsp progress
+require "fidget".setup {}
diff --git a/.config/nvim/lua/plugins.lua b/.config/nvim/lua/plugins.lua
new file mode 100644
index 0000000..c255508
--- /dev/null
+++ b/.config/nvim/lua/plugins.lua
@@ -0,0 +1,17 @@
+require "paq" {
+ "savq/paq-nvim",
+ "wadackel/vim-dogrun",
+ "neovim/nvim-lspconfig",
+ "hrsh7th/cmp-nvim-lsp",
+ "hrsh7th/cmp-buffer",
+ "hrsh7th/cmp-path",
+ "hrsh7th/cmp-cmdline",
+ "hrsh7th/nvim-cmp",
+ "hrsh7th/cmp-vsnip",
+ "hrsh7th/vim-vsnip",
+ "rafamadriz/friendly-snippets",
+ "hrsh7th/cmp-nvim-lsp-signature-help",
+ "nvim-treesitter/nvim-treesitter",
+ "j-hui/fidget.nvim",
+ --"LhKipp/nvim-nu",
+}
diff --git a/.config/nvim/lua/settings.lua b/.config/nvim/lua/settings.lua
new file mode 100644
index 0000000..8548605
--- /dev/null
+++ b/.config/nvim/lua/settings.lua
@@ -0,0 +1,14 @@
+vim.cmd("colorscheme dogrun")
+vim.opt.encoding = "utf-8"
+vim.opt.relativenumber = true
+vim.opt.laststatus = 2
+vim.opt.autoindent = true
+vim.opt.shiftwidth = 4
+vim.opt.softtabstop = 4
+vim.opt.expandtab = true
+vim.opt.linebreak = true
+vim.opt.termguicolors = true
+vim.opt.completeopt = { "menuone", "noinsert", "noselect" }
+vim.opt.statusline = "%= %f %= "
+vim.opt.cursorline = true
+vim.cmd("highlight clear CursorLine")
diff --git a/.config/nvim/lua/treesitter_config.lua b/.config/nvim/lua/treesitter_config.lua
new file mode 100644
index 0000000..e934d71
--- /dev/null
+++ b/.config/nvim/lua/treesitter_config.lua
@@ -0,0 +1,49 @@
+require("nvim-treesitter.configs").setup {
+ ensure_installed = {
+ "rust",
+ "bash",
+ "c",
+ "comment",
+ "cpp",
+ "css",
+ "dockerfile",
+ "fish",
+ "gdscript",
+ "gitignore",
+ "glsl",
+ "go",
+ "haskell",
+ "help",
+ "html",
+ "http",
+ "java",
+ "javascript",
+ "json",
+ "kotlin",
+ "latex",
+ "llvm",
+ "lua",
+ "make",
+ "markdown",
+ "pascal",
+ "python",
+ "regex",
+ "scss",
+ "sql",
+ "svelte",
+ "toml",
+ "typescript",
+ "vim",
+ "vue",
+ "yaml",
+ },
+ sync_install = true,
+ auto_install = true,
+ highlight = {
+ enable = true,
+ },
+ ignore_install = {
+ "nu"
+ },
+ modules = {},
+}
diff --git a/.config/nvim/lua/writing_config.lua b/.config/nvim/lua/writing_config.lua
new file mode 100644
index 0000000..6380868
--- /dev/null
+++ b/.config/nvim/lua/writing_config.lua
@@ -0,0 +1,18 @@
+vim.api.nvim_create_autocmd("BufWritePost", {
+ pattern = "*.tex",
+ callback = function()
+ -- compile tex file to pdf with pdflatex on save
+ if vim.fn.executable('pdflatex') == 1 then
+ vim.cmd("execute '!pdflatex ' . expand('%:p')")
+ else
+ print("pdflatex is not installed")
+ end
+
+ -- compile tex file to html with pandoc on save
+ if vim.fn.executable('pandoc') == 1 then
+ vim.cmd("execute '!pandoc -o ' . substitute(expand('%:p'), '.tex', '.html ', '') . expand('%:p')")
+ else
+ print("pandoc is not installed")
+ end
+ end,
+})
diff --git a/.config/polybar/config.ini b/.config/polybar/config.ini
new file mode 100644
index 0000000..3f5b47f
--- /dev/null
+++ b/.config/polybar/config.ini
@@ -0,0 +1,73 @@
+[colors]
+background = #222432
+foreground = #929be5
+foreground-alt = #a29d80
+alert = #db6e79
+
+[bar/bar1]
+monitor = ${env:MONITOR}
+width = 100%
+height = 24
+fixed-center = true
+background = ${colors.background}
+foreground = ${colors.foreground}
+line-size = 1
+line-color = ${colors.foreground-alt}
+border-size = 0
+padding-left = 3
+padding-right = 3
+module-margin-left = 1
+module-margin-right = 2
+font-0 = Hack Nerd Font:style=Regular:pixelsize=10;1
+modules-left = wlan alsa
+modules-center = ewmh
+modules-right = date time
+
+[module/wlan]
+type = internal/network
+interface-type = wired
+interval = 1.0
+format-connected = <ramp-signal> <label-connected>
+label-connected = [connected]
+format-disconnected = <label-disconnected>
+label-disconnected = 睊 [disconnected]
+label-disconnected-foreground = ${colors.alert}
+ramp-signal-0 = 直
+ramp-signal-foreground = ${colors.foreground-alt}
+unknown-as-up = true
+
+[module/date]
+type = internal/date
+interval = 30.0
+format-prefix =  |
+format-prefix-foreground = ${colors.foreground-alt}
+label = %date%
+date = %d.%m.%Y%
+
+[module/time]
+type = internal/date
+interval = 30.0
+format-prefix =  |
+format-prefix-foreground = ${colors.foreground-alt}
+format = <label>
+label = %time%
+time = %H:%M
+
+[module/alsa]
+type = internal/alsa
+format-volume =<ramp-volume> <label-volume>
+label-volume = %percentage%%
+label-volume-foreground = ${colors.foreground}
+label-muted =  
+format-muted-foreground = ${colors.alert}
+ramp-volume-0 = 
+ramp-volume-foreground = ${colors.foreground-alt}
+
+[module/ewmh]
+type = internal/xworkspaces
+pin-xworkspaces = true
+label-active-foreground = ${colors.foreground-alt}
+label-occupied-foreground = ${colors.alert}
+
+[settings]
+screenchange-reload = true
diff --git a/.config/rofi/config.rasi b/.config/rofi/config.rasi
new file mode 100644
index 0000000..f2f7acc
--- /dev/null
+++ b/.config/rofi/config.rasi
@@ -0,0 +1,9 @@
+configuration {
+modi: "drun";
+prompt: "find";
+font: "Hack 12";
+terminal: "alacritty";
+ icon-theme: "Advaita";
+ show-icons: true;
+}
+@theme "~/.config/rofi/theme.rasi"
diff --git a/.config/rofi/theme.rasi b/.config/rofi/theme.rasi
new file mode 100644
index 0000000..c7e79fd
--- /dev/null
+++ b/.config/rofi/theme.rasi
@@ -0,0 +1,53 @@
+/**
+ * Rofi Color Theme - dmenu + Dogrun
+ **/
+
+* {
+ background-color: #222432;
+ border-color: #919ae4;
+ font: "Hack 10";
+ text-color: #919ae4;
+}
+
+window {
+ width: 100.0000% ;
+ padding: 3px ;
+ anchor: north;
+ location: north;
+ children: [ horibox ];
+}
+
+horibox {
+ orientation: horizontal;
+ children: [ prompt,entry,listview ];
+}
+
+listview {
+ layout: horizontal;
+ spacing: 100px ;
+ lines: 100;
+}
+
+entry {
+ width: 10.0000em ;
+ expand: false;
+}
+
+element {
+ padding: 0px 2px ;
+}
+
+element selected {
+ background-color: @text-color;
+ text-color: @background-color;
+}
+
+element-text {
+ background-color: inherit;
+ text-color: inherit;
+}
+
+element-icon {
+ background-color: inherit;
+ text-color: inherit;
+}
diff --git a/.config/starship.toml b/.config/starship.toml
new file mode 100644
index 0000000..d720e96
--- /dev/null
+++ b/.config/starship.toml
@@ -0,0 +1,74 @@
+# Insert blank line between shell prompts
+add_newline = true
+
+# prompt format
+format = """$python $username$hostname$directory$git_branch$git_status${custom.writing}${custom.dev}
+$character"""
+
+[username]
+style_user = "fg:#929be5 bg:#282b39"
+style_root = "fg:#b871b8 bg:#282b39"
+format = "[$user]($style) "
+disabled = false
+show_always = true
+
+[directory]
+format = "[$path]($style) [$read_only]($read_only_style)"
+read_only = ""
+read_only_style = "#dc6f7a"
+style = "fg:#a8a384 bg:#282b39"
+truncation_length = 3
+truncation_symbol = ".../"
+truncate_to_repo = false
+disabled = false
+home_symbol = ""
+
+[character]
+format = "$symbol "
+success_symbol = "[»](#7cbe8c)"
+error_symbol = "[»](#dc6f7a)"
+disabled = false
+
+[custom.dev]
+format = "[$symbol]($style)"
+when = "pwd | rg -i 'Dev'"
+symbol = " "
+style = "#59b6b6"
+
+[custom.writing]
+format = "[$symbol]($style)"
+when = "pwd | rg -i 'Writing'"
+symbol = " "
+style = "#59b6b6"
+
+
+[git_branch]
+always_show_remote = false
+format = "[$symbol$branch]($style) "
+symbol = ":"
+style = "#b871b8"
+only_attached = false
+disabled = false
+
+[git_status]
+conflicted = "»«"
+ahead = "⇡"
+behind = "⇣"
+diverged = "⇕"
+stashed = '\$'
+modified = "!"
+staged = "+"
+renamed = "易"
+deleted = "x"
+style = "#dc6f7a"
+disabled = false
+
+[hostname]
+ssh_only = true
+format = "[$hostname]($style)"
+style = "fg:#929be5 bg:#282b39"
+disabled = false
+
+[python]
+format = "[$virtualenv]($style)"
+style = "#59b6b6"