aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--aerc/dot-config/aerc/accounts.conf14
-rw-r--r--aerc/dot-config/aerc/aerc.conf203
-rw-r--r--aerc/dot-config/aerc/binds.conf163
-rw-r--r--aerc/dot-config/aerc/stylesets/default_nicer89
-rw-r--r--aerc/dot-config/aerc/templates/forward_as_body6
-rw-r--r--aerc/dot-config/aerc/templates/new_message4
-rw-r--r--aerc/dot-config/aerc/templates/quoted_reply10
-rw-r--r--alacritty/dot-config/alacritty/alacritty.toml40
-rw-r--r--bash/dot-bashrc19
-rw-r--r--bash/dot-config/bash/functions.bash13
-rw-r--r--bash/dot-config/bash/gentoo-color.bash6
-rw-r--r--bash/dot-config/bash/notes.bash18
-rw-r--r--bash/dot-config/shellshort/bm-files5
-rw-r--r--bash/dot-config/shellshort/shortcutrc5
-rw-r--r--bash/dot-profile40
-rw-r--r--email/dot-config/imapnotify/mit.yaml2
-rw-r--r--email/dot-config/systemd/user/goimap.service4
-rw-r--r--fonts/dot-config/fontconfig/conf.d/53-font-features.conf18
-rw-r--r--lf/dot-config/lf/lfrc10
-rw-r--r--lf/dot-config/lf/shortcutrc5
-rw-r--r--niri/dot-config/niri/config.kdl492
-rw-r--r--niri/dot-config/systemd/user/app-graphical.slice7
-rw-r--r--nvim/dot-config/nvim-final/after/ftplugin/lua.lua3
-rw-r--r--nvim/dot-config/nvim-final/colors/solarized.lua490
-rw-r--r--nvim/dot-config/nvim-final/init.lua719
-rw-r--r--nvim/dot-config/nvim-final/lua/mo/zen.lua89
-rw-r--r--nvim/dot-config/nvim-final/nvim-pack-lock.json12
-rw-r--r--nvim/dot-config/nvim-final/plugin/autocommands.lua7
-rw-r--r--nvim/dot-config/nvim-final/plugin/treesitter.lua42
-rw-r--r--nvim/dot-config/nvim-final/stylua.toml12
-rw-r--r--quickshell/dot-config/quickshell/Bar.qml92
-rw-r--r--quickshell/dot-config/quickshell/Batt.qml137
-rw-r--r--quickshell/dot-config/quickshell/ClockWidget.qml5
-rw-r--r--quickshell/dot-config/quickshell/CurrentWindow.qml49
-rw-r--r--quickshell/dot-config/quickshell/DankSocket.qml62
-rw-r--r--quickshell/dot-config/quickshell/Globals.qml35
-rw-r--r--quickshell/dot-config/quickshell/Margin.qml23
-rw-r--r--quickshell/dot-config/quickshell/Popout.qml147
-rw-r--r--quickshell/dot-config/quickshell/QsButton.qml125
-rw-r--r--quickshell/dot-config/quickshell/QsStateButton.qml77
-rw-r--r--quickshell/dot-config/quickshell/QsTooltip.qml45
-rw-r--r--quickshell/dot-config/quickshell/Time.qml16
-rw-r--r--quickshell/dot-config/quickshell/Tray.qml196
-rw-r--r--quickshell/dot-config/quickshell/services/Popout.qml51
-rw-r--r--quickshell/dot-config/quickshell/shell.qml7
-rw-r--r--quickshell/dot-config/systemd/user/quickshell.service12
-rw-r--r--qute/dot-config/qutebrowser/config.py30
-rw-r--r--qute/dot-config/qutebrowser/quickmarks2
-rwxr-xr-xscripts/dot-local/bin/alanvim3
-rwxr-xr-xscripts/dot-local/bin/aligncol41
-rwxr-xr-xscripts/dot-local/bin/batctl61
-rw-r--r--scripts/dot-local/bin/dot-editorconfig7
-rwxr-xr-xscripts/dot-local/bin/mailsync54
-rwxr-xr-xscripts/dot-local/bin/print.sh178
-rwxr-xr-xscripts/dot-local/bin/viml2
-rw-r--r--wayland-basics/dot-config/environment.d/wayland.conf15
-rw-r--r--wayland-basics/dot-config/fuzzel/fuzzel.ini131
-rw-r--r--wayland-basics/dot-config/kanshi/config8
-rw-r--r--wayland-basics/dot-config/mako/config6
-rw-r--r--wayland-basics/dot-config/mpv/mpv.conf4
-rw-r--r--wayland-basics/dot-config/swaylock/config4
-rw-r--r--wayland-basics/dot-config/systemd/user/kanshi.service4
-rw-r--r--wayland-basics/dot-config/systemd/user/soteria.service12
-rw-r--r--wayland-basics/dot-config/systemd/user/swaybg.service7
-rw-r--r--wayland-basics/dot-config/systemd/user/swayidle.service12
-rw-r--r--wayland-basics/dot-config/systemd/user/swayosd-server.service4
-rw-r--r--wayland-basics/dot-config/systemd/user/wl-clip-persist.service5
l---------wayland-basics/dot-local/share/applications/browser.desktop1
-rw-r--r--wayland-basics/dot-local/share/applications/mimeinfo.cache28
-rwxr-xr-xwayland-basics/dot-local/share/applications/nvim.desktop2
70 files changed, 2296 insertions, 1951 deletions
diff --git a/aerc/dot-config/aerc/accounts.conf b/aerc/dot-config/aerc/accounts.conf
new file mode 100644
index 0000000..801c56b
--- /dev/null
+++ b/aerc/dot-config/aerc/accounts.conf
@@ -0,0 +1,14 @@
+[MIT]
+source = maildir:///home/moreka/.local/share/mail/mit
+outgoing = /usr/bin/msmtp
+default = INBOX
+from = Mohammad Reza Karimi <moreka@mit.edu>
+copy-to = Sent
+postpone = Drafts
+trash = Deleted
+archive = Archive
+
+check-mail-cmd = mbsync mit
+check-mail-timeout = 20s
+
+folders-sort = INBOX,Sent,Drafts,Archive
diff --git a/aerc/dot-config/aerc/aerc.conf b/aerc/dot-config/aerc/aerc.conf
new file mode 100644
index 0000000..7f0d08d
--- /dev/null
+++ b/aerc/dot-config/aerc/aerc.conf
@@ -0,0 +1,203 @@
+[general]
+default-save-path=~/Downloads
+pgp-provider=gpg
+unsafe-accounts-conf=false
+log-file=~/.cache/aerc.log
+log-level=warn
+term=alacritty
+enable-osc8=true
+# default-menu-cmd=ranger --choosefiles=%f
+default-menu-cmd=fzf --multi
+
+[ui]
+#
+# Describes the format for each row in a mailbox view. This is a comma
+# separated list of column names with an optional align and width suffix. After
+# the column name, one of the '<' (left), ':' (center) or '>' (right) alignment
+# characters can be added (by default, left) followed by an optional width
+# specifier. The width is either an integer representing a fixed number of
+# characters, or a percentage between 1% and 99% representing a fraction of the
+# terminal width. It can also be one of the '*' (auto) or '=' (fit) special
+# width specifiers. Auto width columns will be equally attributed the remaining
+# terminal width. Fit width columns take the width of their contents. If no
+# width specifier is set, '*' is used by default.
+index-columns=flags:5,name<20%,subject,date>=
+
+
+# Each name in index-columns must have a corresponding column-$name setting.
+# All column-$name settings accept golang text/template syntax. See
+# aerc-templates(7) for available template attributes and functions.
+#
+# Here are some examples to show the To field instead of the From field for
+# an email (modifying column-name):
+#
+# 1. a generic one
+# column-name={{ .Peer | names | join ", " }}
+# 2. based upon the selected folder
+# column-name={{if match .Folder "^(Gesendet|Sent)$"}}{{index (.To | names) 0}}{{else}}{{index (.From | names) 0}}{{end}}
+#
+# Default settings
+column-flags={{.Flags | join " "}}
+#column-name={{index (.From | names) 0}}
+#column-subject={{.ThreadPrefix}}{{.Subject}}
+#column-date={{.DateAutoFormat .Date.Local}}
+
+column-separator=" "
+
+timestamp-format=2006 Jan 02
+this-day-time-format=15:04
+this-week-time-format=Mon Jan 02
+this-year-time-format=Jan 02
+message-view-timestamp-format=2006 Jan 02, 15:04 GMT-0700
+sidebar-width=14
+# message-list-split=horizontal 20
+mouse-enabled=true
+new-message-bell=false
+dirlist-delay=200ms
+
+next-message-on-delete=false
+auto-mark-read=true
+auto-mark-read-split=false
+#auto-mark-read-split-delay=3s
+
+styleset-name=default_nicer
+
+fuzzy-complete=true
+
+#completion-delay=250ms
+#completion-min-chars=1
+#completion-popovers=true
+
+icon-encrypted = 󰌆
+icon-signed = 
+icon-unknown = [ ?]
+icon-invalid = [ !]
+icon-attachment = 
+icon-new = •
+icon-old = ◦
+icon-replied = 
+icon-forwarded = 
+icon-flagged = 
+icon-marked = *
+icon-draft = d
+icon-deleted = 
+
+[ui:folder~Sent]
+index-columns=flags:5,name<20%,subject,date>=
+column-name = {{if .To}}{{index (.To | names) 0}}{{else}} malformed email{{end}}
+column-flags = {{.Flags | join " "}}
+
+[statusline]
+
+[viewer]
+pager=less -Rc
+alternatives=text/plain,text/html
+show-headers=false
+header-layout=From,To,Cc,Bcc,Date,Subject
+always-show-mime=false
+
+[compose]
+editor=nvim
+header-layout=To,From,Subject
+edit-headers=false
+focus-body=false
+
+address-book-cmd=grep -i -m 100 %s /home/moreka/.cache/maildir-rank-addr/addressbook.tsv
+
+file-picker-cmd=lf -selection-path '%f'
+
+reply-to-self=false
+empty-subject-warning=true
+no-attachment-warning=^[^>]*attach(ed|ment)
+format-flowed=true
+
+[multipart-converters]
+
+text/html=pandoc -f markdown -t html --standalone
+
+[filters]
+#
+# Filters allow you to pipe an email body through a shell command to render
+# certain emails differently, e.g. highlighting them with ANSI escape codes.
+#
+# The commands are invoked with sh -c. The following folders are prepended to
+# the system $PATH to allow referencing filters from their name only:
+#
+# ${XDG_CONFIG_HOME:-~/.config}/aerc/filters
+# ~/.local/libexec/aerc/filters
+# ${XDG_DATA_HOME:-~/.local/share}/aerc/filters
+# $PREFIX/libexec/aerc/filters
+# $PREFIX/share/aerc/filters
+# /usr/libexec/aerc/filters
+# /usr/share/aerc/filters
+#
+# If you want to run a program in your default $PATH which has the same name
+# as a builtin filter (e.g. /usr/bin/colorize), use its absolute path.
+#
+# The following variables are defined in the filter command environment:
+#
+# AERC_MIME_TYPE the part MIME type/subtype
+# AERC_FORMAT the part content type format= parameter
+# AERC_FILENAME the attachment filename (if any)
+# AERC_SUBJECT the message Subject header value
+# AERC_FROM the message From header value
+#
+# The first filter which matches the email's mimetype will be used, so order
+# them from most to least specific.
+#
+# You can also match on non-mimetypes, by prefixing with the header to match
+# against (non-case-sensitive) and a comma, e.g. subject,text will match a
+# subject which contains "text". Use header,~regex to match against a regex.
+#
+text/plain=colorize
+text/calendar=calendar
+message/delivery-status=colorize
+message/rfc822=colorize
+#text/html=pandoc -f html -t plain | colorize
+text/html=! html
+#text/html=! w3m -T text/html -I UTF-8
+text/*=bat -fP --file-name="$AERC_FILENAME"
+application/pdf=pdftotext - -l 10 -nopgbrk -q - | fmt -w 100
+.headers=colorize
+
+[openers]
+# x-scheme-handler/http*=printf '%s' {} | wl-copy
+text/html=runapp -o -- qutebrowser
+text/plain=runapp -o -- alacritty -e nvim {} +125
+
+[hooks]
+#
+# Hooks are triggered whenever the associated event occurs.
+
+#
+# Executed when a new email arrives in the selected folder
+#mail-received=notify-send "[$AERC_ACCOUNT/$AERC_FOLDER] New mail from $AERC_FROM_NAME" "$AERC_SUBJECT"
+
+#
+# Executed when mail is deleted from a folder
+#mail-deleted=mbsync "$AERC_ACCOUNT:$AERC_FOLDER" &
+
+#
+# Executed when aerc adds mail to a folder
+#mail-added=mbsync "$AERC_ACCOUNT:$AERC_FOLDER" &
+
+#
+# Executed when aerc starts
+#aerc-startup=aerc :terminal calcurse && aerc :next-tab
+
+#
+# Executed when aerc shuts down.
+#aerc-shutdown=
+
+#
+# Executed when notmuch tags are modified.
+#tag-modified=
+
+#
+# Executed when flags are changed on a message.
+#flag-changed=mbsync "$AERC_ACCOUNT:$AERC_FOLDER" &
+
+[templates]
+new-message=new_message
+quoted-reply=quoted_reply
+forwards=forward_as_body
diff --git a/aerc/dot-config/aerc/binds.conf b/aerc/dot-config/aerc/binds.conf
new file mode 100644
index 0000000..87b6c50
--- /dev/null
+++ b/aerc/dot-config/aerc/binds.conf
@@ -0,0 +1,163 @@
+<C-p> = :prev-tab<Enter>
+<C-PgUp> = :prev-tab<Enter>
+<C-n> = :next-tab<Enter>
+<C-PgDn> = :next-tab<Enter>
+<C-t> = :term<Enter>
+? = :help keys<Enter>
+<C-c> = :prompt 'Quit?' quit<Enter>
+<C-q> = :prompt 'Quit?' quit<Enter>
+<C-z> = :suspend<Enter>
+
+[messages]
+# q = :prompt 'Quit?' quit<Enter>
+q = :quit<Enter>
+
+# to change mailbox folders
+<C-o> = :menu -ad :cf -a<Enter>
+
+j = :next<Enter>
+<Down> = :next<Enter>
+<C-d> = :next 50%<Enter>
+<PgDn> = :next 100%<Enter>
+
+k = :prev<Enter>
+<Up> = :prev<Enter>
+<C-u> = :prev 50%<Enter>
+<PgUp> = :prev 100%<Enter>
+gg = :select 0<Enter>
+G = :select -1<Enter>
+
+gi = :cf -a MIT INBOX<Enter>
+gs = :cf -a MIT Sent<Enter>
+ga = :cf -a MIT Archive<Enter>
+
+J = :next-folder<Enter>
+K = :prev-folder<Enter>
+
+v = :mark -t<Enter>
+<Space> = :mark -t<Enter>:next<Enter>
+V = :mark -v<Enter>
+gv = :remark<Enter>
+
+T = :toggle-threads<Enter>
+zc = :fold<Enter>
+zo = :unfold<Enter>
+za = :fold -t<Enter>
+zM = :fold -a<Enter>
+zR = :unfold -a<Enter>
+<tab> = :fold -t<Enter>
+
+zz = :align center<Enter>
+zt = :align top<Enter>
+zb = :align bottom<Enter>
+
+<Enter> = :view<Enter>
+d = :choose -o y 'Really delete this message' delete-message<Enter>
+D = :delete<Enter>
+a = :archive flat<Enter>
+A = :unmark -a<Enter>:mark -T<Enter>:archive flat<Enter>
+u = :read -t<Enter>:next<Enter>
+
+m = :compose<Enter>
+
+b = :bounce<space>
+
+rr = :reply -a<Enter>
+rq = :reply -aq<Enter>
+Rr = :reply<Enter>
+Rq = :reply -q<Enter>
+
+c = :cf<space>
+$ = :term<space>
+! = :term<space>
+| = :pipe<space>
+
+/ = :search<space>
+\ = :filter<space>
+n = :next-result<Enter>
+N = :prev-result<Enter>
+<Esc> = :clear<Enter>
+
+s = :split<Enter>
+S = :vsplit<Enter>
+
+O = :check-mail<Enter>
+
+[messages:folder=Drafts]
+<Enter> = :recall<Enter>
+
+[view]
+/ = :toggle-key-passthrough<Enter>/
+q = :close<Enter>
+O = :open<Enter>
+o = :open<Enter>
+S = :save<space>
+| = :pipe<space>
+D = :delete<Enter>
+A = :archive flat<Enter>
+
+<C-y> = :copy-link <space>
+<C-l> = :open-link <space>
+
+f = :forward<Enter>
+rr = :reply -a<Enter>
+rq = :reply -aq<Enter>
+Rr = :reply<Enter>
+Rq = :reply -q<Enter>
+
+H = :toggle-headers<Enter>
+K = :prev-part<Enter>
+J = :next-part<Enter>
+<C-j> = :next<Enter>
+<C-k> = :prev<Enter>
+
+[view::passthrough]
+$noinherit = true
+$ex = <C-x>
+<Esc> = :toggle-key-passthrough<Enter>
+
+[compose]
+# Keybindings used when the embedded terminal is not selected in the compose
+# view
+$noinherit = true
+$ex = <C-x>
+$complete = <C-o>
+<C-k> = :prev-field<Enter>
+<C-j> = :next-field<Enter>
+<tab> = :next-field<Enter>
+<backtab> = :prev-field<Enter>
+<C-p> = :prev-tab<Enter>
+<C-n> = :next-tab<Enter>
+
+[compose::editor]
+# Keybindings used when the embedded terminal is selected in the compose view
+$noinherit = true
+$ex = <A-x>
+<C-Up> = :prev-field<Enter>
+<C-Down> = :next-field<Enter>
+<C-PgUp> = :prev-tab<Enter>
+<C-PgDn> = :next-tab<Enter>
+<A-a> = :attach -m<Enter>
+<C-q> = :abort<Enter>
+
+
+[compose::review]
+# Keybindings used when reviewing a message to be sent
+# Inline comments are used as descriptions on the review screen
+y = :send<Enter> # Send
+n = :abort<Enter> # Abort (discard message, no confirmation)
+s = :sign<Enter> # Toggle signing
+x = :encrypt<Enter> # Toggle encryption to all recipients
+v = :preview<Enter> # Preview message
+p = :postpone<Enter> # Postpone
+q = :choose -o d discard abort -o p postpone postpone<Enter> # Abort or postpone
+e = :edit<Enter> # Edit (body and headers)
+a = :attach<space> # Add attachment
+d = :detach<space> # Remove attachment
+
+[terminal]
+$noinherit = true
+$ex = <A-x>
+
+<C-PgUp> = :prev-tab<Enter>
+<C-PgDn> = :next-tab<Enter>
diff --git a/aerc/dot-config/aerc/stylesets/default_nicer b/aerc/dot-config/aerc/stylesets/default_nicer
new file mode 100644
index 0000000..301a028
--- /dev/null
+++ b/aerc/dot-config/aerc/stylesets/default_nicer
@@ -0,0 +1,89 @@
+# vim: ft=dosini
+#
+# aerc default styleset (with changes)
+#
+
+# Uncomment these two lines to reset all attributes (except in the [viewer]
+# section) and start from scratch.
+#*.default = true
+#*.normal = true
+
+*.selected.bg = 12
+*.selected.fg = 0
+*.selected.bold = false
+
+tab.selected.fg = #ffffff
+tab.selected.bg = #1640b0
+tab.selected.bold = false
+
+dirlist*.selected.bg = 11
+dirlist*.selected.fg = 0
+dirlist*.selected.bold = true
+
+#statusline_*.dim = true
+
+#*warning.dim = false
+#*warning.bold = true
+#*warning.fg = 11
+#*success.dim = false
+#*success.bold = true
+#*success.fg = 10
+#*error.dim = false
+#*error.bold = true
+#*error.fg = 9
+
+#border.fg = 12
+#border.bold = true
+
+#title.bg = 12
+#title.fg = 15
+#title.bold = true
+
+#header.fg = 4
+#header.bold = true
+
+#msglist_unread.bold = true
+#msglist_deleted.dim = true
+#msglist_marked.bg = 6
+#msglist_marked.fg = 15
+#msglist_pill.bg = 12
+#msglist_pill.fg = 15
+
+#part_mimetype.fg false
+
+#selector_chooser.bold = true
+#selector_focused.bold = true
+#selector_focused.bg = 12
+#selector_focused.fg = 15
+
+#completion_*.bg = 8
+#completion_pill.bg = 12
+#completion_default.fg = 15
+#completion_description.fg = 15
+#completion_description.dim = true
+
+#[viewer]
+# Uncomment these two lines to reset all attributes in the [viewer] section.
+#*.default = true
+#*.normal = true
+#url.underline = true
+#url.fg = 3
+#header.bold = true
+#header.fg = 4
+#signature.dim = true
+#signature.fg = 4
+#diff_meta.bold = true
+#diff_chunk.fg = 6
+#diff_chunk_func.fg = 6
+#diff_chunk_func.dim = true
+#diff_add.fg = 2
+#diff_del.fg = 1
+#quote_1.fg = 6
+#quote_2.fg = 4
+#quote_3.fg = 6
+#quote_3.dim = true
+#quote_4.fg = 4
+#quote_4.dim = true
+#quote_x.fg = 5
+#quote_x.dim = true
+
diff --git a/aerc/dot-config/aerc/templates/forward_as_body b/aerc/dot-config/aerc/templates/forward_as_body
new file mode 100644
index 0000000..d4c9dbf
--- /dev/null
+++ b/aerc/dot-config/aerc/templates/forward_as_body
@@ -0,0 +1,6 @@
+Forwarded message from {{.OriginalFrom | names | join ", "}} on {{dateFormat .OriginalDate "Mon Jan 2, 2006 at 15:04 MST"}}:
+{{.OriginalText}}
+{{- with .Signature }}
+
+{{.}}
+{{- end }}
diff --git a/aerc/dot-config/aerc/templates/new_message b/aerc/dot-config/aerc/templates/new_message
new file mode 100644
index 0000000..235d6be
--- /dev/null
+++ b/aerc/dot-config/aerc/templates/new_message
@@ -0,0 +1,4 @@
+{{- with .Signature }}
+
+{{.}}
+{{- end -}}
diff --git a/aerc/dot-config/aerc/templates/quoted_reply b/aerc/dot-config/aerc/templates/quoted_reply
new file mode 100644
index 0000000..27a3892
--- /dev/null
+++ b/aerc/dot-config/aerc/templates/quoted_reply
@@ -0,0 +1,10 @@
+On {{dateFormat (.OriginalDate | toLocal) "Mon Jan 2, 2006 at 15:04 MST"}}, {{.OriginalFrom | names | join ", "}} wrote:
+{{ if eq .OriginalMIMEType "text/html" -}}
+{{- exec `html` .OriginalText | trimSignature | quote -}}
+{{- else -}}
+{{- trimSignature .OriginalText | quote -}}
+{{- end}}
+{{- with .Signature }}
+
+{{.}}
+{{- end }}
diff --git a/alacritty/dot-config/alacritty/alacritty.toml b/alacritty/dot-config/alacritty/alacritty.toml
index 684ec16..fead41a 100644
--- a/alacritty/dot-config/alacritty/alacritty.toml
+++ b/alacritty/dot-config/alacritty/alacritty.toml
@@ -1,2 +1,40 @@
[general]
-import = [ "alacritty-base.toml", "dark.toml" ]
+live_config_reload = true
+
+[font]
+normal = { family = "Dejavu Sans Mono", style = "Book" }
+size = 12
+
+[window]
+padding = { x = 3, y = 3 }
+dynamic_title = true
+
+[scrolling]
+history = 5000
+multiplier = 3
+
+[selection]
+save_to_clipboard = false
+
+[cursor]
+unfocused_hollow = true
+
+[mouse]
+hide_when_typing = true
+
+[keyboard]
+bindings = [
+ { key = "C", mods = "Alt", mode = "~Vi", action = "Copy" },
+ { key = "V", mods = "Alt", mode = "~Vi", action = "Paste" },
+ { key = "J", mods = "Alt|Shift", mode = "~Vi", action = "DecreaseFontSize" },
+ { key = "K", mods = "Alt|Shift", mode = "~Vi", action = "IncreaseFontSize" },
+ { key = "J", mods = "Alt", mode = "~Vi", action = "ScrollLineDown" },
+ { key = "K", mods = "Alt", mode = "~Vi", action = "ScrollLineUp" },
+ { key = "F11", action = "ToggleFullscreen" },
+ { key = "N", mods = "Control|Shift", mode = "~Vi", action = "CreateNewWindow" },
+]
+
+[hints]
+enabled = [
+ { regex = "^.*\\.md", hyperlinks = true, command = "alanvim", binding = { key = "T", mods = "Alt", mode = "~Vi" } }
+]
diff --git a/bash/dot-bashrc b/bash/dot-bashrc
index cc9c324..0c0c2a2 100644
--- a/bash/dot-bashrc
+++ b/bash/dot-bashrc
@@ -5,7 +5,6 @@
[[ $- != *i* ]] && return
export HISTCONTROL='ignoredups'
-export HISTIGNORE='ls *':'history':'cd':'sudo -i':'yay':'lf':'cd ..':'nvim':'v':'cvim'
export HISTFILESIZE=100000
export HISTSIZE=10000
@@ -35,30 +34,18 @@ alias p='sudo pacman'
alias SS='sudo systemctl'
alias Su='systemctl --user'
alias v='nvim'
-alias vn='NVIM_APPNAME=nvim-final nvim'
alias vv='uv run nvim'
-alias z='setsid runapp -- zathura'
-alias todo='nvim ~/system-notes.md'
+alias todo='nvim ~/notes.md'
alias neofetch='fastfetch -c examples/13'
+alias cvim='nvim -c "cd ~/.config/nvim" -c "Ex"'
# source: https://wiki.archlinux.org/title/GnuPG#Configure_pinentry_to_use_the_correct_TTY
GPG_TTY="$(tty)"
export GPG_TTY
gpg-connect-agent updatestartuptty /bye >/dev/null
-# cp and mv but with rsync
-# source: https://wiki.archlinux.org/title/Rsync#As_cp/mv_alternative
-cpr()
-{
- rsync --archive -hh --partial --info=stats1,progress2 --modify-window=1 "$@"
-}
-
-mvr()
-{
- rsync --archive -hh --partial --info=stats1,progress2 --modify-window=1 --remove-source-files "$@"
-}
-
source "${XDG_CONFIG_HOME:-$HOME/.config}"/bash/functions.bash
+source "${XDG_CONFIG_HOME:-$HOME/.config}"/bash/notes.bash
bind '"\C-o":"\C-ulf\C-m"'
diff --git a/bash/dot-config/bash/functions.bash b/bash/dot-config/bash/functions.bash
index a2a96ba..33bfd67 100644
--- a/bash/dot-config/bash/functions.bash
+++ b/bash/dot-config/bash/functions.bash
@@ -46,3 +46,16 @@ yayS()
{
yay -Slq | fzf --multi --preview 'yay -Si {1}' | xargs -ro yay -S
}
+
+# cp and mv but with rsync
+# source: https://wiki.archlinux.org/title/Rsync#As_cp/mv_alternative
+cpr()
+{
+ rsync --archive -hh --partial --info=stats1,progress2 --modify-window=1 "$@"
+}
+
+mvr()
+{
+ rsync --archive -hh --partial --info=stats1,progress2 --modify-window=1 --remove-source-files "$@"
+}
+
diff --git a/bash/dot-config/bash/gentoo-color.bash b/bash/dot-config/bash/gentoo-color.bash
index a9abef8..4ca33c9 100644
--- a/bash/dot-config/bash/gentoo-color.bash
+++ b/bash/dot-config/bash/gentoo-color.bash
@@ -47,13 +47,13 @@ fi
# For direxpand to be missing indicates that bash is lacking readline support.
if (( gentoo_color <= 0 )) || ( ! shopt -u direxpand 2>/dev/null ); then
# Define a prompt without color.
- PS1='\u@\h \w \$ '
+ PS1='[\u@\h \W]\$ '
elif (( EUID == 0 )); then
# If root, omit the username and print the hostname in red.
- PS1='\[\e[01;31m\]\h\[\e[01;34m\] \w \$\[\e[00m\] '
+ PS1='[\[\e[01;31m\]\h\[\e[01;34m\] \W\[\e[00m\]]\$ '
else
# Otherwise, print the username and hostname in green.
- PS1='\[\e[01;32m\]\u@\h\[\e[01;34m\] \w \$\[\e[00m\] '
+ PS1='[\[\e[32m\]\u@\h\[\e[34m\] \W\[\e[00m\]]\$ '
fi
if (( gentoo_color > 0 )); then
diff --git a/bash/dot-config/bash/notes.bash b/bash/dot-config/bash/notes.bash
new file mode 100644
index 0000000..82ed521
--- /dev/null
+++ b/bash/dot-config/bash/notes.bash
@@ -0,0 +1,18 @@
+note() {
+ if (($# == 0)); then
+ tmpfile=$(mktemp --tmpdir --suffix=.md note.XXXXXXXXXXX)
+ echo "- [ ] $(date +'%m-%d-%Y %H:%M') " >> "$tmpfile"
+ nvim "$tmpfile"
+ cat "$tmpfile" >> ~/pkm/0_inbox.md
+ else
+ echo "- [ ] $(date +'%m-%d-%Y %H:%M') $*" >> ~/pkm/0_inbox.md
+ fi
+}
+
+todos() {
+ printf $'\e[01;33mINBOX\e[0m\n'
+ bat -P -p ~/pkm/0_inbox.md
+ echo
+ printf $'\e[01;33mALL\e[0m\n'
+ rg --color=always --no-line-number --no-heading --smart-case --glob "!.git" --glob "!0_inbox.md" --hyperlink-format='file://{path}' -- "-\\s\\[\\s\\]" ~/pkm/
+}
diff --git a/bash/dot-config/shellshort/bm-files b/bash/dot-config/shellshort/bm-files
index 4e2b76d..fd99fa2 100644
--- a/bash/dot-config/shellshort/bm-files
+++ b/bash/dot-config/shellshort/bm-files
@@ -1,5 +1,2 @@
cala $XDG_CONFIG_HOME/alacritty/alacritty.toml
-cgho $XDG_CONFIG_HOME/ghostty/config
-cvim $XDG_CONFIG_HOME/nvim/init.lua
-chy $XDG_CONFIG_HOME/hypr/hyprland.conf
-cway $XDG_CONFIG_HOME/waybar/config.jsonc
+cnir $XDG_CONFIG_HOME/niri/config.kdl
diff --git a/bash/dot-config/shellshort/shortcutrc b/bash/dot-config/shellshort/shortcutrc
index 1eebef3..e701151 100644
--- a/bash/dot-config/shellshort/shortcutrc
+++ b/bash/dot-config/shellshort/shortcutrc
@@ -1,6 +1,3 @@
# vim: filetype=sh
alias cala="$EDITOR /home/moreka/.config/alacritty/alacritty.toml" \
-cgho="$EDITOR /home/moreka/.config/ghostty/config" \
-cvim="$EDITOR /home/moreka/.config/nvim/init.lua" \
-chy="$EDITOR /home/moreka/.config/hypr/hyprland.conf" \
-cway="$EDITOR /home/moreka/.config/waybar/config.jsonc" \
+cnir="$EDITOR /home/moreka/.config/niri/config.kdl" \
diff --git a/bash/dot-profile b/bash/dot-profile
index cd3f5cd..072595b 100644
--- a/bash/dot-profile
+++ b/bash/dot-profile
@@ -4,7 +4,7 @@ export EDITOR=nvim
export SUDO_EDITOR=$EDITOR
export BAT_THEME=ansi
-export MANPAGER="sh -c 'sed -u -e \"s/\\x1B\[[0-9;]*m//g; s/.\\x08//g\" | bat -p -lman'"
+export MANPAGER="sh -c 'sed -u -e \"s/\\x1B\[[0-9;]*m//g; s/.\\x08//g\" | bat --paging always -p -lman'"
export XDG_CONFIG_HOME="$HOME"/.config
export XDG_CACHE_HOME="$HOME"/.cache
@@ -12,9 +12,8 @@ export XDG_DATA_HOME="$HOME"/.local/share
export XDG_STATE_HOME="$HOME"/.local/state
export XDG_BIN_HOME="$HOME"/.local/bin
-source "$XDG_CONFIG_HOME"/bash/path.bash
-
-path_add "$XDG_BIN_HOME"
+PATH="${PATH}:${XDG_BIN_HOME}"
+export PATH
export LESSHISTFILE="$XDG_CACHE_HOME"/lesshst
export CARGO_HOME="$XDG_DATA_HOME"/cargo
@@ -25,32 +24,19 @@ export GOPATH="$XDG_DATA_HOME"/go
export GTK2_RC_FILES="$XDG_CONFIG_HOME"/gtk-2.0/gtkrc-2.0
export PASSWORD_STORE_DIR="$XDG_DATA_HOME"/pass
export NOTMUCH_CONFIG="$XDG_CONFIG_HOME"/notmuch/default/config
-export GEM_HOME="$(gem env user_gemhome 2>/dev/null)"
-
-[ -n "$GEM_HOME" ] && path_add "$GEM_HOME/bin"
-
-# [ -d "$HOME/.nix-profile" ] && export XDG_DATA_DIRS="$HOME"/.nix-profile/share:"$XDG_DATA_DIRS"
-# [ -d "$HOME/.nix-profile" ] && . "$HOME/.nix-profile/etc/profile.d/hm-session-vars.sh"
unset SSH_AGENT_PID
if [ "${gnupg_SSH_AUTH_SOCK_by:-0}" -ne $$ ]; then
- SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)"
- export SSH_AUTH_SOCK
+ SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)"
+ export SSH_AUTH_SOCK
fi
-# disable accessibility
-export NO_AT_BRIDGE=1
-export GTK_A11Y=none
-
-path_clean
-
-# if [ -z "$DISPLAY" ] && [ "$(tty)" = "/dev/tty1" ] && [ -z "$NIRI_LOADED" ]; then
-# export NIRI_LOADED=1
-# exec niri-session
-# fi
-
-if [ -z "$WAYLAND_DISPLAY" ] && [ -n "$XDG_VTNR" ] && [ "$XDG_VTNR" -eq 1 ] ; then
- if uwsm check may-start; then
- exec systemd-cat -t uwsm_start uwsm start hyprland.desktop
- fi
+if [ -z "$WAYLAND_DISPLAY" ] && [ -n "$XDG_VTNR" ] && [ "$XDG_VTNR" -eq 1 ]; then
+ # NOTE: if the first argument of niri-session is not -l, then niri-session will
+ # exec a new "login shell" with `exec -l bash -c 'niri-session -l'`.
+ # This means that environment variables set here are going to be duplicated
+ # (such as PATH).
+ # See
+ # https://github.com/YaLTeR/niri/blob/10df9f4717cbd4efd20ae796eb6b0aa400127bdc/resources/niri-session#L17-L21
+ niri-session -l
fi
diff --git a/email/dot-config/imapnotify/mit.yaml b/email/dot-config/imapnotify/mit.yaml
index d29f3cf..6aabeae 100644
--- a/email/dot-config/imapnotify/mit.yaml
+++ b/email/dot-config/imapnotify/mit.yaml
@@ -9,7 +9,7 @@ configurations:
xoAuth2: true
username: moreka@mit.edu
passwordCmd: 'oama access moreka@mit.edu'
- onNewMail: ''
+ onNewMail: 'mailsync'
onNewMailPost: SKIP
boxes:
-
diff --git a/email/dot-config/systemd/user/goimap.service b/email/dot-config/systemd/user/goimap.service
index d315da8..e908999 100644
--- a/email/dot-config/systemd/user/goimap.service
+++ b/email/dot-config/systemd/user/goimap.service
@@ -1,9 +1,9 @@
[Unit]
+Description=Execute scripts on IMAP mailbox changes
+Documentation=https://gitlab.com/shackra/goimapnotify
PartOf=graphical-session.target
-Description=Execute scripts on IMAP mailbox changes (new/deleted/updated messages) using IDLE, golang version.
After=graphical-session.target
After=network-online.target
-Requisite=graphical-session.target
[Service]
Type=simple
diff --git a/fonts/dot-config/fontconfig/conf.d/53-font-features.conf b/fonts/dot-config/fontconfig/conf.d/53-font-features.conf
deleted file mode 100644
index d883d97..0000000
--- a/fonts/dot-config/fontconfig/conf.d/53-font-features.conf
+++ /dev/null
@@ -1,18 +0,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
-<fontconfig>
- <match target="font">
- <test name="family" qual="any">
- <string>Hack</string>
- </test>
- <test name="family" qual="any">
- <string>Comic Code</string>
- </test>
- <test name="family" compare="contains">
- <string>IosevkaInput</string>
- </test>
- <edit name="hintstyle" mode="assign">
- <const>hintfull</const>
- </edit>
- </match>
-</fontconfig>
diff --git a/lf/dot-config/lf/lfrc b/lf/dot-config/lf/lfrc
index 7e3eefe..b03d235 100644
--- a/lf/dot-config/lf/lfrc
+++ b/lf/dot-config/lf/lfrc
@@ -11,14 +11,14 @@ set hiddenfiles ".*:*.aux:*.log:*.bbl:*.bcf:*.blg:*.run.xml"
cmd open ${{
case $(file --mime-type "$(readlink -f "$f")" -b) in
text/* | application/json | inode/x-empty | application/x-subrip) $EDITOR "$fx" ;;
- image/*) setsid -f app2unit -- imv -d $(rotdir "$f" | grep -i "\.\(png\|jpg\|jpeg\|gif\|webp\|avif\|tif\|ico\)\(_large\)*$") 2>/dev/null | while read -r file; do
+ image/*) setsid -f runapp -o -- imv -d $(rotdir "$f" | grep -i "\.\(png\|jpg\|jpeg\|gif\|webp\|avif\|tif\|ico\)\(_large\)*$") 2>/dev/null | while read -r file; do
[ -z "$file" ] && continue
lf -remote "send select \"$file\""
done & ;;
- audio/* | video/x-ms-asf) setsid -f app2unit -- mpv --audio-display=no "$f" ;;
- video/*) setsid -f app2unit -- mpv "$f" -quiet >/dev/null 2>&1 ;;
+ audio/* | video/x-ms-asf) setsid -f runapp -o -- mpv --audio-display=no "$f" ;;
+ video/*) setsid -f runapp -o -- mpv "$f" -quiet >/dev/null 2>&1 ;;
application/pgp-encrypted) $EDITOR "$fx" ;;
- *) for f in $fx; do setsid -f app2unit-open "$f" >/dev/null 2>&1; done ;;
+ *) for f in $fx; do setsid -f xdg-open "$f" >/dev/null 2>&1; done ;;
esac
}}
@@ -56,7 +56,7 @@ cmd fzf_jump ${{
}}
cmd dragon ${{
- IFS="$(printf '\n\t')"; dragon-drop $fx
+ IFS="$(printf '\n\t')"; setsid -f runapp -o -- dragon-drop $fx
}}
cmd git_branch ${{
diff --git a/lf/dot-config/lf/shortcutrc b/lf/dot-config/lf/shortcutrc
index 29fddd6..89e85e3 100644
--- a/lf/dot-config/lf/shortcutrc
+++ b/lf/dot-config/lf/shortcutrc
@@ -1,5 +1,2 @@
map Ecala $$EDITOR "/home/moreka/.config/alacritty/alacritty.toml"
-map Ecgho $$EDITOR "/home/moreka/.config/ghostty/config"
-map Ecvim $$EDITOR "/home/moreka/.config/nvim/init.lua"
-map Echy $$EDITOR "/home/moreka/.config/hypr/hyprland.conf"
-map Ecway $$EDITOR "/home/moreka/.config/waybar/config.jsonc"
+map Ecnir $$EDITOR "/home/moreka/.config/niri/config.kdl"
diff --git a/niri/dot-config/niri/config.kdl b/niri/dot-config/niri/config.kdl
index b91dff5..33e6a4a 100644
--- a/niri/dot-config/niri/config.kdl
+++ b/niri/dot-config/niri/config.kdl
@@ -1,11 +1,5 @@
-// This config is in the KDL format: https://kdl.dev
-// "/-" comments out the following node.
-// Check the wiki for a full description of the configuration:
-// https://yalter.github.io/niri/Configuration:-Introduction
-
-// Input device configuration.
-// Find the full list of options on the wiki:
-// https://yalter.github.io/niri/Configuration:-Input
+// vim: expandtab sw=4 ts=4 autoindent smartindent
+
input {
keyboard {
xkb {
@@ -17,12 +11,8 @@ input {
repeat-rate 50
}
- // Next sections include libinput settings.
- // Omitting settings disables them, or leaves them at their default values.
- // All commented-out settings here are examples, not defaults.
touchpad {
tap
- dwt
}
mouse {
@@ -31,223 +21,62 @@ input {
trackpoint {
}
- // Uncomment this to make the mouse warp to the center of newly focused windows.
- warp-mouse-to-focus
+ // warp-mouse-to-focus
- // Focus windows and outputs automatically when moving the mouse into them.
// Setting max-scroll-amount="0%" makes it work only on windows already fully on screen.
- focus-follows-mouse max-scroll-amount="0%"
+ // focus-follows-mouse max-scroll-amount="0%"
}
-// You can configure outputs by their name, which you can find
-// by running `niri msg outputs` while inside a niri instance.
-// The built-in laptop monitor is usually called "eDP-1".
-// Find more information on the wiki:
-// https://yalter.github.io/niri/Configuration:-Outputs
-// Remember to uncomment the node by removing "/-"!
output "eDP-1" {
mode "2880x1800@120.000"
- scale 2
+ scale 1.75
transform "normal"
position x=0 y=0
}
-// Settings that influence how windows are positioned and sized.
-// Find more information on the wiki:
-// https://yalter.github.io/niri/Configuration:-Layout
layout {
- // Set gaps around windows in logical pixels.
- gaps 5
-
- // When to center a column when changing focus, options are:
- // - "never", default behavior, focusing an off-screen column will keep at the left
- // or right edge of the screen.
- // - "always", the focused column will always be centered.
- // - "on-overflow", focusing a column will center it if it doesn't fit
- // together with the previously focused column.
+ gaps 10
center-focused-column "never"
-
- // You can customize the widths that "switch-preset-column-width" (Mod+R) toggles between.
preset-column-widths {
- // Proportion sets the width as a fraction of the output width, taking gaps into account.
- // For example, you can perfectly fit four windows sized "proportion 0.25" on an output.
- // The default preset widths are 1/3, 1/2 and 2/3 of the output.
proportion 0.33333
proportion 0.5
proportion 0.66667
-
- // Fixed sets the width in logical pixels exactly.
- // fixed 1920
}
- // You can also customize the heights that "switch-preset-window-height" (Mod+Shift+R) toggles between.
- // preset-window-heights { }
-
- // You can change the default width of the new windows.
default-column-width { proportion 0.5; }
- // If you leave the brackets empty, the windows themselves will decide their initial width.
- // default-column-width {}
-
- // By default focus ring and border are rendered as a solid background rectangle
- // behind windows. That is, they will show up through semitransparent windows.
- // This is because windows using client-side decorations can have an arbitrary shape.
- //
- // If you don't like that, you should uncomment `prefer-no-csd` below.
- // Niri will draw focus ring and border *around* windows that agree to omit their
- // client-side decorations.
- //
- // Alternatively, you can override it with a window rule called
- // `draw-border-with-background`.
-
- // You can change how the focus ring looks.
- focus-ring {
- // Uncomment this line to disable the focus ring.
- // off
-
- // How many logical pixels the ring extends out from the windows.
- width 1
-
- // Colors can be set in a variety of ways:
- // - CSS named colors: "red"
- // - RGB hex: "#rgb", "#rgba", "#rrggbb", "#rrggbbaa"
- // - CSS-like notation: "rgb(255, 127, 0)", rgba(), hsl() and a few others.
- // Color of the ring on the active monitor.
+ focus-ring {
+ width 2
active-color "#7fc8ff"
-
- // Color of the ring on inactive monitors.
- //
- // The focus ring only draws around the active window, so the only place
- // where you can see its inactive-color is on other monitors.
inactive-color "#505050"
-
- // You can also use gradients. They take precedence over solid colors.
- // Gradients are rendered the same as CSS linear-gradient(angle, from, to).
- // The angle is the same as in linear-gradient, and is optional,
- // defaulting to 180 (top-to-bottom gradient).
- // You can use any CSS linear-gradient tool on the web to set these up.
- // Changing the color space is also supported, check the wiki for more info.
- //
- // active-gradient from="#80c8ff" to="#c7ff7f" angle=45
-
- // You can also color the gradient relative to the entire view
- // of the workspace, rather than relative to just the window itself.
- // To do that, set relative-to="workspace-view".
- //
- // inactive-gradient from="#505050" to="#808080" angle=45 relative-to="workspace-view"
}
- // You can also add a border. It's similar to the focus ring, but always visible.
border {
- // The settings are the same as for the focus ring.
- // If you enable the border, you probably want to disable the focus ring.
off
-
- width 4
- active-color "#ffc87f"
- inactive-color "#505050"
-
- // Color of the border around windows that request your attention.
- urgent-color "#9b0000"
-
- // Gradients can use a few different interpolation color spaces.
- // For example, this is a pastel rainbow gradient via in="oklch longer hue".
- //
- // active-gradient from="#e5989b" to="#ffb4a2" angle=45 relative-to="workspace-view" in="oklch longer hue"
-
- // inactive-gradient from="#505050" to="#808080" angle=45 relative-to="workspace-view"
}
- // You can enable drop shadows for windows.
shadow {
- // Uncomment the next line to enable shadows.
- // on
-
- // By default, the shadow draws only around its window, and not behind it.
- // Uncomment this setting to make the shadow draw behind its window.
- //
- // Note that niri has no way of knowing about the CSD window corner
- // radius. It has to assume that windows have square corners, leading to
- // shadow artifacts inside the CSD rounded corners. This setting fixes
- // those artifacts.
- //
- // However, instead you may want to set prefer-no-csd and/or
- // geometry-corner-radius. Then, niri will know the corner radius and
- // draw the shadow correctly, without having to draw it behind the
- // window. These will also remove client-side shadows if the window
- // draws any.
- //
- // draw-behind-window true
-
- // You can change how shadows look. The values below are in logical
- // pixels and match the CSS box-shadow properties.
-
- // Softness controls the shadow blur radius.
- softness 30
-
- // Spread expands the shadow.
- spread 5
-
- // Offset moves the shadow relative to the window.
- offset x=0 y=5
-
- // You can also change the shadow color and opacity.
- color "#0007"
- }
-
- // Struts shrink the area occupied by windows, similarly to layer-shell panels.
- // You can think of them as a kind of outer gaps. They are set in logical pixels.
- // Left and right struts will cause the next window to the side to always be visible.
- // Top and bottom struts will simply add outer gaps in addition to the area occupied by
- // layer-shell panels and regular gaps.
- struts {
- // left 64
- // right 64
- // top 64
- // bottom 64
}
}
-// Add lines like this to spawn processes at startup.
-// Note that running niri as a session supports xdg-desktop-autostart,
-// which may be more convenient to use.
-// See the binds section below for more spawn examples.
-
-// This line starts waybar, a commonly used bar for Wayland compositors.
-spawn-at-startup "waybar"
-
-// To run a shell command (with variables, pipes, etc.), use spawn-sh-at-startup:
-// spawn-sh-at-startup "qs -c ~/source/qs/MyAwesomeShell"
-
hotkey-overlay {
- // Uncomment this line to disable the "Important Hotkeys" pop-up at startup.
- // skip-at-startup
+ skip-at-startup
}
-// Uncomment this line to ask the clients to omit their client-side decorations if possible.
-// If the client will specifically ask for CSD, the request will be honored.
-// Additionally, clients will be informed that they are tiled, removing some client-side rounded corners.
-// This option will also fix border/focus ring drawing behind some semitransparent windows.
-// After enabling or disabling this, you need to restart the apps for this to take effect.
prefer-no-csd
-// You can change the path where screenshots are saved.
-// A ~ at the front will be expanded to the home directory.
-// The path is formatted with strftime(3) to give you the screenshot date and time.
-screenshot-path "~/Pictures/Screenshots/Screenshot from %Y-%m-%d %H-%M-%S.png"
-
-// You can also set this to null to disable saving screenshots to disk.
-// screenshot-path null
+screenshot-path "~/Pictures/scrots/screenshot-%Y-%m-%d_%H-%M-%S.png"
-// Animation settings.
-// The wiki explains how to configure individual animations:
-// https://yalter.github.io/niri/Configuration:-Animations
animations {
- // Uncomment to turn off all animations.
- // off
-
- // Slow down all animations by this factor. Values below 1 speed them up instead.
- // slowdown 3.0
+ workspace-switch {
+ off
+ }
+ window-open {
+ off
+ }
+ window-close {
+ off
+ }
}
gestures {
@@ -256,205 +85,51 @@ gestures {
}
}
-// Window rules let you adjust behavior for individual windows.
-// Find more information on the wiki:
-// https://yalter.github.io/niri/Configuration:-Window-Rules
-
-// Work around WezTerm's initial configure bug
-// by setting an empty default-column-width.
-/-window-rule {
- // This regular expression is intentionally made as specific as possible,
- // since this is the default config, and we want no false positives.
- // You can get away with just app-id="wezterm" if you want.
- match app-id=r#"^org\.wezfurlong\.wezterm$"#
- default-column-width {}
-}
-
-// Open the Firefox picture-in-picture player as floating by default.
-/-window-rule {
- // This app-id regular expression will work for both:
- // - host Firefox (app-id is "firefox")
- // - Flatpak Firefox (app-id is "org.mozilla.firefox")
- match app-id=r#"firefox$"# title="^Picture-in-Picture$"
- open-floating true
-}
-
-// Example: block out two password managers from screen capture.
-// (This example rule is commented out with a "/-" in front.)
-/-window-rule {
- match app-id=r#"^org\.keepassxc\.KeePassXC$"#
- match app-id=r#"^org\.gnome\.World\.Secrets$"#
-
- block-out-from "screen-capture"
-
- // Use this instead if you want them visible on third-party screenshot tools.
- // block-out-from "screencast"
-}
-
-// Example: enable rounded corners for all windows.
-// (This example rule is commented out with a "/-" in front.)
-/-window-rule {
- geometry-corner-radius 12
- clip-to-geometry true
-}
-
binds {
- // Keys consist of modifiers separated by + signs, followed by an XKB key name
- // in the end. To find an XKB name for a particular key, you may use a program
- // like wev.
- //
- // "Mod" is a special modifier equal to Super when running on a TTY, and to Alt
- // when running as a winit window.
- //
- // Most actions that you can bind here can also be invoked programmatically with
- // `niri msg action do-something`.
-
- // Mod-Shift-/, which is usually the same as Mod-?,
- // shows a list of important hotkeys.
Mod+Shift+Slash { show-hotkey-overlay; }
- // Suggested binds for running programs: terminal, app launcher, screen locker.
- Mod+Return hotkey-overlay-title="Open a Terminal: alacritty" { spawn "alacritty"; }
+ Mod+Return hotkey-overlay-title="Open a Terminal: alacritty" { spawn-sh "runapp -o alacritty"; }
Mod+P hotkey-overlay-title="Run an Application: fuzzel" { spawn "fuzzel"; }
Mod+X hotkey-overlay-title="Lock the Screen: swaylock" { spawn "swaylock"; }
- Mod+B hotkey-overlay-title="Open browser" { spawn "qutebrowser"; }
-
- // Example volume keys mappings for PipeWire & WirePlumber.
- // The allow-when-locked=true property makes them work even when the session is locked.
- // Using spawn-sh allows to pass multiple arguments together with the command.
- // "-l 1.0" limits the volume to 100%.
- XF86AudioRaiseVolume allow-when-locked=true { spawn-sh "wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.1+ -l 1.0"; }
- XF86AudioLowerVolume allow-when-locked=true { spawn-sh "wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.1-"; }
- XF86AudioMute allow-when-locked=true { spawn-sh "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"; }
- XF86AudioMicMute allow-when-locked=true { spawn-sh "wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle"; }
-
- // Example brightness key mappings for brightnessctl.
- // You can use regular spawn with multiple arguments too (to avoid going through "sh"),
- // but you need to manually put each argument in separate "" quotes.
+ Mod+B hotkey-overlay-title="Open browser" { spawn-sh "runapp -o qutebrowser"; }
+
+ XF86AudioRaiseVolume allow-when-locked=true { spawn-sh "wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.05+ -l 1.0"; }
+ XF86AudioLowerVolume allow-when-locked=true { spawn-sh "wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.05-"; }
+ XF86AudioMute allow-when-locked=true { spawn-sh "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle && update-led-mute sink"; }
+ XF86AudioMicMute allow-when-locked=true { spawn-sh "wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle && update-led-mute source"; }
+
XF86MonBrightnessUp allow-when-locked=true { spawn "brightnessctl" "--class=backlight" "set" "+10%"; }
XF86MonBrightnessDown allow-when-locked=true { spawn "brightnessctl" "--class=backlight" "set" "10%-"; }
- // Open/close the Overview: a zoomed-out view of workspaces and windows.
- // You can also move the mouse into the top-left hot corner,
- // or do a four-finger swipe up on a touchpad.
Mod+O repeat=false { toggle-overview; }
Mod+Shift+C repeat=false { close-window; }
- Mod+Left { focus-column-left; }
- Mod+Down { focus-window-down; }
- Mod+Up { focus-window-up; }
- Mod+Right { focus-column-right; }
Mod+H { focus-column-left; }
Mod+J { focus-window-down; }
Mod+K { focus-window-up; }
Mod+L { focus-column-right; }
- Mod+Ctrl+Left { move-column-left; }
- Mod+Ctrl+Down { move-window-down; }
- Mod+Ctrl+Up { move-window-up; }
- Mod+Ctrl+Right { move-column-right; }
- Mod+Ctrl+H { move-column-left; }
- Mod+Ctrl+J { move-window-down; }
- Mod+Ctrl+K { move-window-up; }
- Mod+Ctrl+L { move-column-right; }
-
- // Alternative commands that move across workspaces when reaching
- // the first or last window in a column.
- // Mod+J { focus-window-or-workspace-down; }
- // Mod+K { focus-window-or-workspace-up; }
- // Mod+Ctrl+J { move-window-down-or-to-workspace-down; }
- // Mod+Ctrl+K { move-window-up-or-to-workspace-up; }
+ Mod+Shift+H { move-column-left; }
+ Mod+Shift+J { move-window-down; }
+ Mod+Shift+K { move-window-up; }
+ Mod+Shift+L { move-column-right; }
Mod+Home { focus-column-first; }
Mod+End { focus-column-last; }
- Mod+Ctrl+Home { move-column-to-first; }
- Mod+Ctrl+End { move-column-to-last; }
-
- Mod+Shift+Left { focus-monitor-left; }
- Mod+Shift+Down { focus-monitor-down; }
- Mod+Shift+Up { focus-monitor-up; }
- Mod+Shift+Right { focus-monitor-right; }
- Mod+Shift+H { focus-monitor-left; }
- Mod+Shift+J { focus-monitor-down; }
- Mod+Shift+K { focus-monitor-up; }
- Mod+Shift+L { focus-monitor-right; }
-
- Mod+Shift+Ctrl+Left { move-column-to-monitor-left; }
- Mod+Shift+Ctrl+Down { move-column-to-monitor-down; }
- Mod+Shift+Ctrl+Up { move-column-to-monitor-up; }
- Mod+Shift+Ctrl+Right { move-column-to-monitor-right; }
- Mod+Shift+Ctrl+H { move-column-to-monitor-left; }
- Mod+Shift+Ctrl+J { move-column-to-monitor-down; }
- Mod+Shift+Ctrl+K { move-column-to-monitor-up; }
- Mod+Shift+Ctrl+L { move-column-to-monitor-right; }
-
- // Alternatively, there are commands to move just a single window:
- // Mod+Shift+Ctrl+Left { move-window-to-monitor-left; }
- // ...
-
- // And you can also move a whole workspace to another monitor:
- // Mod+Shift+Ctrl+Left { move-workspace-to-monitor-left; }
- // ...
-
- Mod+Page_Down { focus-workspace-down; }
- Mod+Page_Up { focus-workspace-up; }
- Mod+U { focus-workspace-down; }
- Mod+I { focus-workspace-up; }
- Mod+Ctrl+Page_Down { move-column-to-workspace-down; }
- Mod+Ctrl+Page_Up { move-column-to-workspace-up; }
- Mod+Ctrl+U { move-column-to-workspace-down; }
- Mod+Ctrl+I { move-column-to-workspace-up; }
-
- // Alternatively, there are commands to move just a single window:
- // Mod+Ctrl+Page_Down { move-window-to-workspace-down; }
- // ...
-
- Mod+Shift+Page_Down { move-workspace-down; }
- Mod+Shift+Page_Up { move-workspace-up; }
- Mod+Shift+U { move-workspace-down; }
- Mod+Shift+I { move-workspace-up; }
-
- // You can bind mouse wheel scroll ticks using the following syntax.
- // These binds will change direction based on the natural-scroll setting.
- //
- // To avoid scrolling through workspaces really fast, you can use
- // the cooldown-ms property. The bind will be rate-limited to this value.
- // You can set a cooldown on any bind, but it's most useful for the wheel.
- Mod+WheelScrollDown cooldown-ms=150 { focus-workspace-down; }
- Mod+WheelScrollUp cooldown-ms=150 { focus-workspace-up; }
- Mod+Ctrl+WheelScrollDown cooldown-ms=150 { move-column-to-workspace-down; }
- Mod+Ctrl+WheelScrollUp cooldown-ms=150 { move-column-to-workspace-up; }
-
- Mod+WheelScrollRight { focus-column-right; }
- Mod+WheelScrollLeft { focus-column-left; }
- Mod+Ctrl+WheelScrollRight { move-column-right; }
- Mod+Ctrl+WheelScrollLeft { move-column-left; }
-
- // Usually scrolling up and down with Shift in applications results in
- // horizontal scrolling; these binds replicate that.
- Mod+Shift+WheelScrollDown { focus-column-right; }
- Mod+Shift+WheelScrollUp { focus-column-left; }
- Mod+Ctrl+Shift+WheelScrollDown { move-column-right; }
- Mod+Ctrl+Shift+WheelScrollUp { move-column-left; }
-
- // Similarly, you can bind touchpad scroll "ticks".
- // Touchpad scrolling is continuous, so for these binds it is split into
- // discrete intervals.
- // These binds are also affected by touchpad's natural-scroll, so these
- // example binds are "inverted", since we have natural-scroll enabled for
- // touchpads by default.
- // Mod+TouchpadScrollDown { spawn-sh "wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.02+"; }
- // Mod+TouchpadScrollUp { spawn-sh "wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.02-"; }
-
- // You can refer to workspaces by index. However, keep in mind that
- // niri is a dynamic workspace system, so these commands are kind of
- // "best effort". Trying to refer to a workspace index bigger than
- // the current workspace count will instead refer to the bottommost
- // (empty) workspace.
- //
- // For example, with 2 workspaces + 1 empty, indices 3, 4, 5 and so on
- // will all refer to the 3rd workspace.
+ Mod+Shift+Home { move-column-to-first; }
+ Mod+Shift+End { move-column-to-last; }
+
+ Mod+Ctrl+Left { focus-monitor-left; }
+ Mod+Ctrl+Down { focus-monitor-down; }
+ Mod+Ctrl+Up { focus-monitor-up; }
+ Mod+Ctrl+Right { focus-monitor-right; }
+
+ Mod+Shift+Left { move-column-to-monitor-left; }
+ Mod+Shift+Down { move-column-to-monitor-down; }
+ Mod+Shift+Up { move-column-to-monitor-up; }
+ Mod+Shift+Right { move-column-to-monitor-right; }
+
Mod+1 { focus-workspace 1; }
Mod+2 { focus-workspace 2; }
Mod+3 { focus-workspace 3; }
@@ -464,101 +139,60 @@ binds {
Mod+7 { focus-workspace 7; }
Mod+8 { focus-workspace 8; }
Mod+9 { focus-workspace 9; }
- Mod+Ctrl+1 { move-column-to-workspace 1; }
- Mod+Ctrl+2 { move-column-to-workspace 2; }
- Mod+Ctrl+3 { move-column-to-workspace 3; }
- Mod+Ctrl+4 { move-column-to-workspace 4; }
- Mod+Ctrl+5 { move-column-to-workspace 5; }
- Mod+Ctrl+6 { move-column-to-workspace 6; }
- Mod+Ctrl+7 { move-column-to-workspace 7; }
- Mod+Ctrl+8 { move-column-to-workspace 8; }
- Mod+Ctrl+9 { move-column-to-workspace 9; }
-
- // Alternatively, there are commands to move just a single window:
- // Mod+Ctrl+1 { move-window-to-workspace 1; }
+ Mod+Shift+1 { move-column-to-workspace 1; }
+ Mod+Shift+2 { move-column-to-workspace 2; }
+ Mod+Shift+3 { move-column-to-workspace 3; }
+ Mod+Shift+4 { move-column-to-workspace 4; }
+ Mod+Shift+5 { move-column-to-workspace 5; }
+ Mod+Shift+6 { move-column-to-workspace 6; }
+ Mod+Shift+7 { move-column-to-workspace 7; }
+ Mod+Shift+8 { move-column-to-workspace 8; }
+ Mod+Shift+9 { move-column-to-workspace 9; }
// Switches focus between the current and the previous workspace.
// Mod+Tab { focus-workspace-previous; }
- // The following binds move the focused window in and out of a column.
- // If the window is alone, they will consume it into the nearby column to the side.
- // If the window is already in a column, they will expel it out.
Mod+BracketLeft { consume-or-expel-window-left; }
Mod+BracketRight { consume-or-expel-window-right; }
- // Consume one window from the right to the bottom of the focused column.
Mod+Comma { consume-window-into-column; }
- // Expel the bottom window from the focused column to the right.
Mod+Period { expel-window-from-column; }
- Mod+R { switch-preset-column-width; }
- // Cycling through the presets in reverse order is also possible.
- // Mod+R { switch-preset-column-width-back; }
+ Mod+R { switch-preset-column-width-back; }
Mod+Shift+R { switch-preset-window-height; }
Mod+Ctrl+R { reset-window-height; }
Mod+F { maximize-column; }
Mod+Shift+F { fullscreen-window; }
-
- // Expand the focused column to space not taken up by other fully visible columns.
- // Makes the column "fill the rest of the space".
Mod+Ctrl+F { expand-column-to-available-width; }
Mod+C { center-column; }
-
- // Center all fully visible columns on screen.
Mod+Ctrl+C { center-visible-columns; }
- // Finer width adjustments.
- // This command can also:
- // * set width in pixels: "1000"
- // * adjust width in pixels: "-5" or "+5"
- // * set width as a percentage of screen width: "25%"
- // * adjust width as a percentage of screen width: "-10%" or "+10%"
- // Pixel sizes use logical, or scaled, pixels. I.e. on an output with scale 2.0,
- // set-column-width "100" will make the column occupy 200 physical screen pixels.
Mod+Minus { set-column-width "-10%"; }
Mod+Equal { set-column-width "+10%"; }
- // Finer height adjustments when in column with other windows.
Mod+Shift+Minus { set-window-height "-10%"; }
Mod+Shift+Equal { set-window-height "+10%"; }
- // Move the focused window between the floating and the tiling layout.
- Mod+V { toggle-window-floating; }
- Mod+Shift+V { switch-focus-between-floating-and-tiling; }
+ Mod+Shift+Space { toggle-window-floating; }
+ Mod+Space { switch-focus-between-floating-and-tiling; }
- // Toggle tabbed column display mode.
- // Windows in this column will appear as vertical tabs,
- // rather than stacked on top of each other.
Mod+W { toggle-column-tabbed-display; }
- // Actions to switch layouts.
- // Note: if you uncomment these, make sure you do NOT have
- // a matching layout switch hotkey configured in xkb options above.
- // Having both at once on the same hotkey will break the switching,
- // since it will switch twice upon pressing the hotkey (once by xkb, once by niri).
- // Mod+Space { switch-layout "next"; }
- // Mod+Shift+Space { switch-layout "prev"; }
-
Print { screenshot; }
Ctrl+Print { screenshot-screen; }
Alt+Print { screenshot-window; }
- // Applications such as remote-desktop clients and software KVM switches may
- // request that niri stops processing the keyboard shortcuts defined here
- // so they may, for example, forward the key presses as-is to a remote machine.
- // It's a good idea to bind an escape hatch to toggle the inhibitor,
- // so a buggy application can't hold your session hostage.
- //
- // The allow-inhibiting=false property can be applied to other binds as well,
- // which ensures niri always processes them, even when an inhibitor is active.
Mod+Escape allow-inhibiting=false { toggle-keyboard-shortcuts-inhibit; }
- // The quit action will show a confirmation dialog to avoid accidental exits.
Mod+Shift+E { quit; }
- Ctrl+Alt+Delete { quit; }
- // Powers off the monitors. To turn them back on, do any input like
- // moving the mouse or pressing any other key.
Mod+Shift+P { power-off-monitors; }
}
+
+window-rule {
+ match app-id="gay.vaskel.soteria"
+ match app-id="Pinentry-gtk"
+ open-floating true
+ open-focused true
+}
diff --git a/niri/dot-config/systemd/user/app-graphical.slice b/niri/dot-config/systemd/user/app-graphical.slice
new file mode 100644
index 0000000..bc5ea6d
--- /dev/null
+++ b/niri/dot-config/systemd/user/app-graphical.slice
@@ -0,0 +1,7 @@
+[Unit]
+Description=User Graphical Application Slice
+Documentation=man:systemd.special(7)
+PartOf=graphical-session.target
+After=graphical-session.target
+Conflicts=niri-shutdown.target
+Before=niri-shutdown.target
diff --git a/nvim/dot-config/nvim-final/after/ftplugin/lua.lua b/nvim/dot-config/nvim-final/after/ftplugin/lua.lua
deleted file mode 100644
index 53dd1d2..0000000
--- a/nvim/dot-config/nvim-final/after/ftplugin/lua.lua
+++ /dev/null
@@ -1,3 +0,0 @@
-vim.cmd([[
-setlocal keywordprg=:help
-]])
diff --git a/nvim/dot-config/nvim-final/colors/solarized.lua b/nvim/dot-config/nvim-final/colors/solarized.lua
deleted file mode 100644
index 090090b..0000000
--- a/nvim/dot-config/nvim-final/colors/solarized.lua
+++ /dev/null
@@ -1,490 +0,0 @@
-local function oklab_to_linear_rgb(L, a, b)
- -- Oklab to LMS conversion
- -- Reference: Björn Ottosson, "A perceptual color space for image processing"
- local l = L + 0.3963377774 * a + 0.2158037573 * b
- local m = L - 0.1055613458 * a - 0.0638541728 * b
- local s = L - 0.0894841775 * a - 1.2914855480 * b
-
- -- LMS to linear RGB
- -- Cube the LMS values (inverse of cube root)
- local l3, m3, s3 = l * l * l, m * m * m, s * s * s
-
- -- Linear RGB transformation matrix
- local r = 4.0767416621 * l3 - 3.3077115913 * m3 + 0.2309699292 * s3
- local g = -1.2684380046 * l3 + 2.6097574011 * m3 - 0.3413193965 * s3
- local b_out = -0.0041960863 * l3 - 0.7034186147 * m3 + 1.7076147010 * s3
-
- return r, g, b_out
-end
-
-local function linear_to_srgb_component(c)
- -- sRGB gamma correction (companding)
- -- Reference: IEC 61966-2-1:1999
- if c <= 0.0031308 then
- return c * 12.92 -- Linear segment
- else
- return 1.055 * (c ^ (1 / 2.4)) - 0.055 -- Power function (gamma ≈ 2.2)
- end
-end
-
-local function oklab_to_srgb(L, a, b)
- local r, g, b_comp = oklab_to_linear_rgb(L, a, b)
-
- r = linear_to_srgb_component(r)
- g = linear_to_srgb_component(g)
- b_comp = linear_to_srgb_component(b_comp)
-
- -- Clamp and convert to 8-bit
- r = math.floor(math.max(0, math.min(1, r)) * 255 + 0.5)
- g = math.floor(math.max(0, math.min(1, g)) * 255 + 0.5)
- b_comp = math.floor(math.max(0, math.min(1, b_comp)) * 255 + 0.5)
-
- return string.format('#%02x%02x%02x', r, g, b_comp)
-end
-
--- ═══════════════════════════════════════════════════════════════════════════
--- MONOTONE COLORS
--- ═══════════════════════════════════════════════════════════════════════════
-local base03 = oklab_to_srgb(0.267337, -0.037339, -0.031128)
-local base02 = oklab_to_srgb(0.309207, -0.039852, -0.033029)
-local base01 = oklab_to_srgb(0.523013, -0.021953, -0.017864)
-local base00 = oklab_to_srgb(0.568165, -0.021219, -0.019038)
-
-local base0 = oklab_to_srgb(0.709236, -0.023223, -0.013451)
-local base1 = oklab_to_srgb(0.697899, -0.015223, -0.004594)
-local base2 = oklab_to_srgb(0.930609, -0.001091, 0.026010)
-local base3 = oklab_to_srgb(0.973528, -0.000043, 0.026053)
-
--- ═══════════════════════════════════════════════════════════════════════════
--- ACCENT COLORS
--- ═══════════════════════════════════════════════════════════════════════════
-local yellow = oklab_to_srgb(0.654479, 0.010005, 0.133641)
-local orange = oklab_to_srgb(0.63, 0.133661 * 0.69, 0.110183 * 0.69)
-local red = oklab_to_srgb(0.63, 0.183749 * 0.72, 0.094099 * 0.72)
-local magenta = oklab_to_srgb(0.592363, 0.201958, -0.014497)
-local violet = oklab_to_srgb(0.582316, 0.019953, -0.124557)
-local blue = oklab_to_srgb(0.614879, -0.059069, -0.126255)
-local cyan = oklab_to_srgb(0.643664, -0.101063, -0.013097)
-local green = oklab_to_srgb(0.644391, -0.072203, 0.132448)
-
--- ═══════════════════════════════════════════════════════════════════════════
--- MODE SELECTION
--- ═══════════════════════════════════════════════════════════════════════════
-
--- Set to 'dark' or 'light'
-local mode = vim.o.background or 'dark'
-
-local colors = {}
-
-if mode == 'dark' then
- -- Dark mode: dark background, light text
- colors.bg = base03
- colors.bg_highlight = base02
- colors.fg_comment = base01
- colors.fg = base0
- colors.fg_emphasis = base1
-else
- colors.bg = base3
- colors.bg_highlight = base2
- colors.fg_comment = base1
- colors.fg = base00
- colors.fg_emphasis = base01
-end
-
--- Accent colors are the same in both modes
-colors.yellow = yellow
-colors.orange = orange
-colors.red = red
-colors.magenta = magenta
-colors.violet = violet
-colors.blue = blue
-colors.cyan = cyan
-colors.green = green
-
-colors.cursorline_bg = colors.bg_highlight
-colors.selection_bg = base02
-colors.visual_bg = base02
-
-vim.g.colors_name = 'dicom'
-
-local function h(group, properties)
- vim.api.nvim_set_hl(0, group, properties)
-end
-
-local function hex_to_rgb(hex)
- hex = hex:gsub('#', '')
- return {
- tonumber(hex:sub(1, 2), 16),
- tonumber(hex:sub(3, 4), 16),
- tonumber(hex:sub(5, 6), 16),
- }
-end
-
-local function rgb_to_hex(c)
- return string.format('#%02x%02x%02x', c[1], c[2], c[3])
-end
-
-local function blend(fg, t, target_bg)
- local a, b = hex_to_rgb(fg), hex_to_rgb(target_bg or colors.bg)
- local c = {
- math.floor(a[1] * (1 - t) + b[1] * t + 0.5),
- math.floor(a[2] * (1 - t) + b[2] * t + 0.5),
- math.floor(a[3] * (1 - t) + b[3] * t + 0.5),
- }
- return rgb_to_hex(c)
-end
-
--- =============================================================================
--- Research-Driven Syntax Highlighting Strategy
--- Based on: Hannebauer et al. (2018), Tonsky (2025), Schloss (2023)
--- =============================================================================
-
--- 1. Core Editor Surface
-h('Normal', { fg = colors.fg, bg = colors.bg })
-h('EndOfBuffer', { fg = colors.bg })
-h('CursorLine', { bg = colors.cursorline_bg })
-h('CursorLineNr', { fg = colors.yellow, bold = true })
-h('LineNr', { fg = colors.fg_comment })
-h('WinSeparator', { fg = colors.bg_highlight, bg = colors.bg })
-
--- 2. Visual & Search (High Arousal)
-h('Visual', { bg = colors.selection_bg })
-h('Search', { fg = colors.bg, bg = colors.yellow })
-h('IncSearch', { fg = colors.bg, bg = colors.orange })
-
-h('Keyword', { fg = colors.green })
-h('Statement', { fg = colors.green })
-h('Conditional', { fg = colors.green })
-h('Repeat', { fg = colors.green })
-
-h('Function', { fg = colors.blue })
-
--- Types
-h('Type', { fg = colors.yellow })
-h('StorageClass', { fg = colors.yellow })
-h('Structure', { fg = colors.yellow })
-h('Typedef', { fg = colors.yellow })
-
--- Constants
-h('Constant', { fg = colors.cyan })
-h('String', { fg = colors.cyan })
-h('Character', { fg = colors.cyan })
-h('Number', { fg = colors.cyan })
-h('Boolean', { fg = colors.cyan })
-h('Float', { fg = colors.cyan })
-
--- PreProc
-h('PreProc', { fg = colors.orange })
-h('Include', { fg = colors.orange })
-h('Define', { fg = colors.orange })
-h('Macro', { fg = colors.orange })
-h('PreCondit', { fg = colors.orange })
-
--- Special Characters - Cyan (escape/special)
-h('Special', { fg = colors.cyan })
-
-h('Identifier', { fg = colors.fg })
-h('Variable', { fg = colors.fg })
-h('Operator', { fg = colors.fg })
-
-h('Delimiter', { fg = colors.fg })
-h('NonText', { fg = colors.bg_highlight })
-
--- -----------------------------------------------------------------------------
--- Layer 6: COMMENTS
--- Luminance: L=comment (dimmest)
--- -----------------------------------------------------------------------------
-
-h('Comment', { fg = colors.fg_comment, italic = true })
-
--- =============================================================================
--- 4. UI Components
--- =============================================================================
-
-h('StatusLine', { bg = colors.fg, fg = colors.bg_highlight })
-h('StatusLineNC', { bg = colors.fg_comment, fg = colors.bg_highlight })
-h('WildMenu', { fg = colors.bg, bg = colors.blue })
-h('ColorColumn', { bg = colors.bg_highlight })
-
--- Popup Menu
-h('Pmenu', { fg = colors.fg, bg = colors.bg_highlight })
-h('PmenuSel', { fg = colors.fg_emphasis, bg = colors.selection, reverse = true })
-h('PmenuSbar', { bg = colors.bg_highlight })
-h('PmenuThumb', { bg = colors.fg_comment })
-h('PmenuMatch', { fg = colors.cyan, bold = true })
-h('PmenuMatchSel', { bg = colors.selection, bold = true, fg = colors.fg_emphasis })
-
--- Float & Borders
-h('NormalFloat', { bg = colors.bg_highlight })
-h('FloatBorder', { fg = colors.comment })
-h('Title', { fg = colors.bg_highlight, bold = true })
-
--- =============================================================================
--- 5. Diagnostics - Semantic Consistency
--- =============================================================================
---
--- Research basis (Schloss 2023):
--- Color-concept associations are universal:
--- Red → danger/anger (cross-cultural consistency)
--- Orange → warning/caution
--- Blue → information/calm
--- Cyan → hint/auxiliary
---
--- This mapping perfectly aligns with research! ✓
---
-
-h('ErrorMsg', { fg = colors.red, bold = true })
-h('WarningMsg', { fg = colors.orange })
-h('ModeMsg', { fg = colors.cyan, bold = true })
-h('Todo', { fg = colors.violet, bold = true, reverse = true })
-h('MatchParen', { bg = colors.selection_bg, bold = true })
-
--- QuickFix & List
-h('qfFileName', { fg = colors.blue })
-h('qfLineNr', { fg = colors.cyan })
-h('qfSeparator', { fg = colors.bg_highlight })
-h('QuickFixLine', { bg = colors.cursorline_bg, bold = true })
-h('qfText', { link = 'Normal' })
-
--- Underlined/Directory
-h('Underlined', { fg = colors.violet, underline = true })
-h('Directory', { fg = colors.blue })
-
--- sync to terminal
-h('Magenta', { fg = colors.magenta })
-h('Violet', { fg = colors.violet })
-
--- =============================================================================
--- 6. Treesitter Highlights (Optimized)
--- =============================================================================
-
--- Neutral Layer ⭐️ KEY OPTIMIZATION
-h('@variable', { link = 'Identifier' }) -- Neutral
-h('@variable.builtin', { link = '@variable' }) -- Neutral
-h('@variable.parameter', { link = '@variable' }) -- Neutral
-h('@variable.parameter.builtin', { link = '@variable.builtin' })
-h('@variable.member', { link = '@variable' }) -- Neutral
-h('@parameter', { fg = colors.fg }) -- Neutral
-h('@property', { fg = colors.fg }) -- Neutral
-
--- Constants Layer ⭐️ OPTIMIZED
-h('@constant', { fg = colors.cyan }) -- Constants = frozen
-h('@constant.builtin', { fg = colors.cyan })
-h('@constant.macro', { fg = colors.cyan })
-
--- Modules/Namespaces
-h('@module', { link = 'Identifier' })
-h('@module.builtin', { link = '@module' })
-
--- Labels
-h('@label', { link = 'Label' })
-
--- Strings Layer
-h('@string', { link = 'String' })
-h('@string.documentation', { link = 'Comment' })
-h('@string.regexp', { link = '@string' })
-h('@string.escape', { link = 'Special' })
-h('@string.special', { link = '@string' })
-h('@string.special.symbol', { link = '@string' })
-h('@string.special.path', { link = '@string' })
-h('@string.special.url', { link = 'Underlined' })
-
-h('@character', { link = 'String' })
-h('@character.special', { link = '@character' })
-
--- Numbers Layer
-h('@boolean', { link = 'Constant' })
-h('@number', { link = 'Number' })
-h('@number.float', { link = 'Float' })
-
--- Types Layer
-h('@type', { link = 'Type' })
-h('@type.builtin', { link = 'Type' })
-h('@type.definition', { link = 'Type' })
-
--- Attributes/Decorators
-h('@attribute', { link = 'Macro' })
-h('@attribute.builtin', { link = 'Special' })
-
--- Functions Layer
-h('@function', { link = 'Function' })
-h('@function.builtin', { link = 'Function' })
-h('@function.call', { link = '@function' })
-h('@function.macro', { link = '@function' })
-h('@function.method', { link = '@function' })
-h('@function.method.call', { link = '@function' })
-h('@constructor', { link = 'Function' })
-
--- Operators - Neutral
-h('@operator', { link = 'Operator' })
-
--- Keywords Layer
-h('@keyword', { link = 'Keyword' })
-h('@keyword.coroutine', { link = '@keyword' })
-h('@keyword.function', { link = 'Keyword' })
-h('@keyword.operator', { link = '@keyword' })
-h('@keyword.import', { link = 'PreProc' })
-h('@keyword.type', { link = '@keyword' })
-h('@keyword.modifier', { link = '@keyword' })
-h('@keyword.repeat', { link = 'Repeat' })
-h('@keyword.return', { link = '@keyword' })
-h('@keyword.debug', { link = '@keyword' })
-h('@keyword.exception', { link = '@keyword' })
-h('@keyword.conditional', { link = 'Conditional' })
-h('@keyword.conditional.ternary', { link = '@operator' })
-h('@keyword.directive', { link = '@keyword' })
-h('@keyword.directive.define', { link = '@keyword' })
-
--- Punctuation
-h('@punctuation', { fg = colors.fg })
-h('@punctuation.delimiter', { link = '@punctuation' })
-h('@punctuation.bracket', { link = '@punctuation' })
-h('@punctuation.special', { link = '@punctuation' })
-
--- Comments Layer
-h('@comment', { link = 'Comment' })
-h('@comment.documentation', { link = '@comment' })
-h('@comment.error', { fg = colors.red, bold = true })
-h('@comment.warning', { fg = colors.yellow, bold = true })
-h('@comment.todo', { link = 'Special' })
-h('@comment.note', { link = 'Special' })
-
--- Markup (Markdown, etc.)
-h('@markup', { link = 'Comment' })
-h('@markup.strong', { bold = true })
-h('@markup.italic', { italic = true })
-h('@markup.strikethrough', { strikethrough = true })
-h('@markup.underline', { link = 'Underlined' })
-h('@markup.heading', { link = 'Title' })
-h('@markup.heading.1', { link = '@markup.heading' })
-h('@markup.heading.2', { link = '@markup.heading' })
-h('@markup.heading.3', { link = '@markup.heading' })
-h('@markup.heading.4', { link = '@markup.heading' })
-h('@markup.heading.5', { link = '@markup.heading' })
-h('@markup.heading.6', { link = '@markup.heading' })
-h('@markup.quote', {})
-h('@markup.math', { link = 'String' })
-h('@markup.link', { link = 'Underlined' })
-h('@markup.link.label', { link = '@markup.link' })
-h('@markup.link.url', { link = '@markup.link' })
-h('@markup.raw', {})
-h('@markup.raw.block', { link = '@markup.raw' })
-h('@markup.list', {})
-h('@markup.list.checked', { fg = colors.green })
-h('@markup.list.unchecked', { link = '@markup.list' })
-
--- Diff
-h('@diff.plus', { fg = blend(colors.green, 0.5, colors.statusline_bg) })
-h('@diff.minus', { fg = blend(colors.red, 0.5, colors.statusline_bg) })
-h('@diff.delta', { fg = blend(colors.yellow, 0.5, colors.statusline_bg) })
-
--- HTML/XML
-h('@tag', { fg = colors.green })
-h('@tag.attribute', { fg = colors.fg })
-h('@tag.delimiter', { fg = colors.fg })
-h('@tag.builtin', { link = 'Special' })
-
--- Vimdoc Special Handling
-h('@constant.comment', { link = 'SpecialComment' })
-h('@number.comment', { link = 'Comment' })
-h('@punctuation.bracket.comment', { link = 'SpecialComment' })
-h('@punctuation.delimiter.comment', { link = 'SpecialComment' })
-h('@label.vimdoc', { link = 'String' })
-h('@markup.heading.1.delimiter.vimdoc', { link = '@markup.heading.1' })
-h('@markup.heading.2.delimiter.vimdoc', { link = '@markup.heading.2' })
-
--- Semantic Aliases
-h('@class', { fg = colors.yellow })
-h('@method', { fg = colors.blue })
-h('@interface', { fg = colors.yellow })
-h('@namespace', { fg = colors.fg })
-
--- =============================================================================
--- 7. LSP Semantic Highlights
--- =============================================================================
-
-h('@lsp.type.class', { link = '@type' })
-h('@lsp.type.comment', { link = '@comment' })
-h('@lsp.type.decorator', { link = '@attribute' })
-h('@lsp.type.enum', { link = '@type' })
-h('@lsp.type.enumMember', { link = '@constant' })
-h('@lsp.type.event', { link = '@type' })
-h('@lsp.type.function', { link = '@function' })
-h('@lsp.type.interface', { link = '@type' })
-h('@lsp.type.keyword', { link = '@keyword' })
-h('@lsp.type.macro', { link = 'Macro' })
-h('@lsp.type.method', { link = '@function.method' })
-h('@lsp.type.modifier', { link = '@type.qualifier' })
-h('@lsp.type.namespace', { link = '@module' })
-h('@lsp.type.number', { link = '@number' })
-h('@lsp.type.operator', { link = '@operator' })
-h('@lsp.type.parameter', { fg = colors.fg })
-h('@lsp.type.property', { fg = colors.fg })
-h('@lsp.type.regexp', { link = '@string.regexp' })
-h('@lsp.type.string', { link = '@string' })
-h('@lsp.type.struct', { link = '@type' })
-h('@lsp.type.type', { link = '@type' })
-h('@lsp.type.typeParameter', { link = '@type.definition' })
-h('@lsp.type.variable', { link = '@variable' })
-
--- LSP Modifiers
-h('@lsp.mod.abstract', {})
-h('@lsp.mod.async', {})
-h('@lsp.mod.declaration', {})
-h('@lsp.mod.defaultLibrary', {})
-h('@lsp.mod.definition', {})
-h('@lsp.mod.deprecated', { link = 'DiagnosticDeprecated' })
-h('@lsp.mod.documentation', {})
-h('@lsp.mod.modification', {})
-h('@lsp.mod.readonly', {})
-h('@lsp.mod.static', {})
-
--- =============================================================================
--- 8. Diagnostics - Semantic Consistency (Schloss 2023)
--- =============================================================================
-
-h('DiagnosticError', { fg = colors.red })
-h('DiagnosticWarn', { fg = colors.yellow })
-h('DiagnosticInfo', { fg = colors.blue })
-h('DiagnosticHint', { fg = colors.cyan })
-
-h('DiagnosticVirtualTextError', { bg = blend(colors.red, 0.4) })
-h('DiagnosticVirtualTextWarn', { bg = blend(colors.yellow, 0.4) })
-h('DiagnosticVirtualTextInfo', { bg = blend(colors.blue, 0.4) })
-h('DiagnosticVirtualTextHint', { bg = blend(colors.cyan, 0.4) })
-
-h('DiagnosticPrefixError', { fg = colors.red, bg = blend(colors.red, 0.25) })
-h('DiagnosticPrefixWarn', { fg = colors.yellow, bg = blend(colors.yellow, 0.25) })
-h('DiagnosticPrefixInfo', { fg = colors.blue, bg = blend(colors.blue, 0.25) })
-h('DiagnosticPrefixHint', { fg = colors.cyan, bg = blend(colors.cyan, 0.25) })
-
-h('DiagnosticUnderlineError', { undercurl = true, sp = colors.red })
-h('DiagnosticUnderlineWarn', { undercurl = true, sp = colors.yellow })
-h('DiagnosticUnderlineInfo', { undercurl = true, sp = colors.blue })
-h('DiagnosticUnderlineHint', { undercurl = true, sp = colors.cyan })
-h('YankHighlight', { fg = colors.bg, bg = colors.fg })
-
--- =============================================================================
--- 9. LSP & Other Plugin Support
--- =============================================================================
-
-h('LspReferenceText', { bg = colors.selection_bg })
-h('LspReferenceRead', { bg = colors.selection_bg })
-h('LspReferenceWrite', { bg = colors.selection_bg })
-h('LspReferenceTarget', { link = 'LspReferenceText' })
-h('LspInlayHint', { link = 'NonText' })
-h('LspCodeLens', { link = 'NonText' })
-h('LspCodeLensSeparator', { link = 'NonText' })
-h('LspSignatureActiveParameter', { link = 'LspReferenceText' })
-
--- Indentmini
-h('IndentLine', { link = 'Comment' })
-h('IndentLineCurrent', { link = 'Comment' })
-
--- GitSigns
-h('GitSignsAdd', { fg = colors.green })
-h('GitSignsChange', { fg = colors.orange })
-h('GitSignsDelete', { fg = colors.red })
-
--- Dashboard
-h('DashboardHeader', { fg = colors.green })
diff --git a/nvim/dot-config/nvim-final/init.lua b/nvim/dot-config/nvim-final/init.lua
deleted file mode 100644
index eb9074d..0000000
--- a/nvim/dot-config/nvim-final/init.lua
+++ /dev/null
@@ -1,719 +0,0 @@
-vim.loader.enable(true)
-
-vim.pack.add({
- "https://github.com/nvim-treesitter/nvim-treesitter",
-}, { confirm = false })
-
-vim.pack.add({
- "https://github.com/zenbones-theme/zenbones.nvim",
-}, { load = false })
-
-require("mo.zen").setup("seoulbones")
-
-require("vim._extui").enable({})
-vim.cmd([[ packadd! nvim.undotree ]])
-
-vim.cmd([[
-nnoremap - <Cmd>Ex<CR>
-
-nnoremap <expr> [e '<Cmd>.move --' . v:count1 . '<CR>'
-nnoremap <expr> ]e '<Cmd>.move +' . v:count1 . '<CR>'
-xnoremap <expr> [e ':move --' . v:count1 . '<CR>gv'
-xnoremap <expr> ]e ':move +' . (v:count1 + line('''>') - line('''<')) . '<CR>gv'
-
-function! Sort(type, ...) abort
- '[,']sort
- call setpos('.', getpos("''"))
-endfunction
-nnoremap gs m'<Cmd>set operatorfunc=Sort<CR>g@
-xnoremap gs :sort<CR>
-]])
-
-vim.keymap.set("n", "gK", "K")
-
-vim.o.expandtab = true
-vim.o.shiftwidth = 4
-vim.o.tabstop = 4
-
-vim.o.breakindent = true
--- Every wrapped line will continue visually indented (same amount of
--- space as the beginning of that line), thus preserving horizontal
--- blocks of text.
-
-vim.o.cinoptions = "l1,:0,g0,E-s,N-s,t0,(s,J1,j1"
--- The 'cinoptions' affect the way 'cindent' reindents lines in a C
--- program.
-
-vim.o.colorcolumn = "+1"
--- 'colorcolumn' is a comma-separated list of screen columns that are
--- highlighted with ColorColumn |hl-ColorColumn|. Useful to align
--- text. Will make screen redrawing slower.
--- The screen column can be an absolute number, or a number preceded with
--- '+' or '-', which is added to or subtracted from 'textwidth'.
--- When 'textwidth' is zero then the items with '-' and '+' are not used.
-
-vim.o.completeopt = "menu,menuone,preview,noselect,fuzzy"
--- 'completeopt' 'cot' string (default "menu,popup")
--- global or local to buffer |global-local|
--- A comma-separated list of options for Insert mode completion
--- |ins-completion|. The supported values are:
---
--- fuzzy Enable |fuzzy-matching| for completion candidates. This
--- allows for more flexible and intuitive matching, where
--- characters can be skipped and matches can be found even
--- if the exact sequence is not typed.
---
--- longest
--- When 'autocomplete' is not active, only the longest common
--- prefix of the matches is inserted. If the popup menu is
--- displayed, you can use CTRL-L to add more characters.
--- Whether case is ignored depends on the type of completion.
--- For buffer text the 'ignorecase' option applies.
---
--- When 'autocomplete' is active and no completion item is
--- selected, the longest common prefix of the matches is
--- inserted after the cursor. The prefix is taken either
--- from all displayed items or only from items in the current
--- buffer. The inserted text is highlighted with
--- |hl-PreInsert|, and the cursor position does not change
--- (similar to `"preinsert"`). Press CTRL-Y to accept.
--- See also |preinserted()|.
---
--- menu Use a popup menu to show the possible completions. The
--- menu is only shown when there is more than one match and
--- sufficient colors are available. |ins-completion-menu|
---
--- menuone Use the popup menu also when there is only one match.
--- Useful when there is additional information about the
--- match, e.g., what file it comes from.
---
--- nearest Matches are listed based on their proximity to the cursor
--- position, unlike the default behavior, which only
--- considers proximity for matches appearing below the
--- cursor. This applies only to matches from the current
--- buffer. No effect if "fuzzy" is present.
---
--- noinsert Do not insert any text for a match until the user selects
--- a match from the menu. Only works in combination with
--- "menu" or "menuone". No effect if "longest" is present.
---
--- noselect Same as "noinsert", except that no menu item is
--- pre-selected. If both "noinsert" and "noselect" are
--- present, "noselect" takes precedence. This is enabled
--- automatically when 'autocomplete' is on, unless
--- "preinsert" is also enabled.
---
--- nosort Disable sorting of completion candidates based on fuzzy
--- scores when "fuzzy" is enabled. Candidates will appear
--- in their original order.
---
--- popup Show extra information about the currently selected
--- completion in a popup window. Only works in combination
--- with "menu" or "menuone". Overrides "preview".
---
--- preinsert
--- Inserts the text of the first completion candidate beyond
--- the current leader, highlighted with |hl-PreInsert|.
--- The cursor does not move.
--- Requires "fuzzy" to be unset, and either "menuone" in
--- 'completeopt' or 'autocomplete' enabled. When
--- 'autocomplete' is enabled, this does not work if
--- 'ignorecase' is set without 'infercase'.
--- See also |preinserted()|.
---
--- preview Show extra information about the currently selected
--- completion in the preview window. Only works in
--- combination with "menu" or "menuone".
---
--- Only "fuzzy", "longest", "popup", "preinsert" and "preview" have an
--- effect when 'autocomplete' is enabled.
---
--- This option does not apply to |cmdline-completion|. See 'wildoptions'
--- for that.
-vim.opt.cpoptions:remove("~")
--- 'cpoptions' 'cpo' string (default "aABceFs_")
--- global
--- A sequence of single character flags. When a character is present
--- this indicates Vi-compatible behavior. This is used for things where
--- not being Vi-compatible is mostly or sometimes preferred.
--- 'cpoptions' stands for "compatible-options".
--- Commas can be added for readability.
--- To avoid problems with flags that are added in the future, use the
--- "+=" and "-=" feature of ":set" |add-option-flags|.
-vim.o.cursorline = true
-vim.o.cursorlineopt = "number"
-vim.o.foldlevelstart = 99
--- 'foldlevelstart' 'fdls' number (default -1)
--- global
--- Sets 'foldlevel' when starting to edit another buffer in a window.
--- Useful to always start editing with all folds closed (value zero),
--- some folds closed (one) or no folds closed (99).
--- This is done before reading any modeline, thus a setting in a modeline
--- overrules this option. Starting to edit a file for |diff-mode| also
--- ignores this option and closes all folds.
--- It is also done before BufReadPre autocommands, to allow an autocmd to
--- overrule the 'foldlevel' value for specific files.
--- When the value is negative, it is not used.
-vim.o.foldtext = ""
--- 'foldtext' 'fdt' string (default "foldtext()")
--- local to window
--- An expression which is used to specify the text displayed for a closed
--- fold. The context is set to the script where 'foldexpr' was set,
--- script-local items can be accessed. See |fold-foldtext| for the
--- usage.
---
--- The expression will be evaluated in the |sandbox| if set from a
--- modeline, see |sandbox-option|.
--- This option cannot be set in a modeline when 'modelineexpr' is off.
---
--- It is not allowed to change text or jump to another window while
--- evaluating 'foldtext' |textlock|.
---
--- When set to an empty string, foldtext is disabled, and the line
--- is displayed normally with highlighting and no line wrapping.
-vim.o.ignorecase = true
--- 'ignorecase' 'ic' boolean (default off)
--- global
--- Ignore case in search patterns, |cmdline-completion|, when
--- searching in the tags file, |expr-==| and for Insert-mode completion
--- |ins-completion|.
--- Also see 'smartcase' and 'tagcase'.
--- Can be overruled by using "\c" or "\C" in the pattern, see
--- |/ignorecase|.
-vim.o.smartcase = true
--- Override the 'ignorecase' option if the search pattern contains upper
--- case characters. Only used when the search pattern is typed and
--- 'ignorecase' option is on. Used for the commands "/", "?", "n", "N",
--- ":g" and ":s" and when filtering matches for the completion menu
--- |compl-states|.
--- Not used for "*", "#", "gd", tag search, etc. After "*" and "#" you
--- can make 'smartcase' used by doing a "/" command, recalling the search
--- pattern from history and hitting <Enter>.
-vim.o.jumpoptions = "view,clean"
--- 'jumpoptions' 'jop' string (default "clean")
--- global
--- List of words that change the behavior of the |jumplist|.
--- stack Make the jumplist behave like the tagstack.
--- Relative location of entries in the jumplist is
--- preserved at the cost of discarding subsequent entries
--- when navigating backwards in the jumplist and then
--- jumping to a location. |jumplist-stack|
---
--- view When moving through the jumplist, |changelist|,
--- |alternate-file|, using |mark-motions| or when popping
--- the |tagstack| try to restore the |mark-view| in which
--- the action occurred.
---
--- clean Remove unloaded buffers from the jumplist.
--- EXPERIMENTAL: this flag may change in the future.
-vim.o.linebreak = true
--- 'linebreak' 'lbr' boolean (default off)
--- local to window
--- If on, Vim will wrap long lines at a character in 'breakat' rather
--- than at the last character that fits on the screen. Unlike
--- 'wrapmargin' and 'textwidth', this does not insert <EOL>s in the file,
--- it only affects the way the file is displayed, not its contents.
--- If 'breakindent' is set, line is visually indented. Then, the value
--- of 'showbreak' is used to put in front of wrapped lines. This option
--- is not used when the 'wrap' option is off.
--- Note that <Tab> characters after an <EOL> are mostly not displayed
--- with the right amount of white space.
-vim.o.list = true
--- 'list' boolean (default off)
--- local to window
--- List mode: By default, show tabs as ">", trailing spaces as "-", and
--- non-breakable space characters as "+". Useful to see the difference
--- between tabs and spaces and for trailing blanks. Further changed by
--- the 'listchars' option.
---
--- When 'listchars' does not contain "tab" field, tabs are shown as "^I"
--- or "<09>", like how unprintable characters are displayed.
---
--- The cursor is displayed at the start of the space a Tab character
--- occupies, not at the end as usual in Normal mode. To get this cursor
--- position while displaying Tabs with spaces, use: >vim
--- set list lcs=tab:\ \
--- <
--- Note that list mode will also affect formatting (set with 'textwidth'
--- or 'wrapmargin') when 'cpoptions' includes 'L'. See 'listchars' for
--- changing the way tabs are displayed.
-vim.opt.listchars:append("precedes:<", "extends:>")
--- 'listchars' 'lcs' string (default "tab:> ,trail:-,nbsp:+")
--- global or local to window |global-local|
--- Strings to use in 'list' mode and for the |:list| command. It is a
--- comma-separated list of string settings. *E1511*
---
--- *lcs-eol*
--- eol:c Character to show at the end of each line. When
--- omitted, there is no extra character at the end of the
--- line.
--- *lcs-tab*
--- tab:xy[z] Two or three characters to be used to show a tab.
--- The third character is optional.
---
--- tab:xy The 'x' is always used, then 'y' as many times as will
--- fit. Thus "tab:>-" displays: >
--- >
--- >-
--- >--
--- etc.
--- <
--- tab:xyz The 'z' is always used, then 'x' is prepended, and
--- then 'y' is used as many times as will fit. Thus
--- "tab:<->" displays: >
--- >
--- <>
--- <->
--- <-->
--- etc.
--- <
--- When "tab:" is omitted, a tab is shown as ^I.
--- *lcs-space*
--- space:c Character to show for a space. When omitted, spaces
--- are left blank.
--- *lcs-multispace*
--- multispace:c...
--- One or more characters to use cyclically to show for
--- multiple consecutive spaces. Overrides the "space"
--- setting, except for single spaces. When omitted, the
--- "space" setting is used. For example,
--- `:set listchars=multispace:---+` shows ten consecutive
--- spaces as: >
--- ---+---+--
--- <
--- *lcs-lead*
--- lead:c Character to show for leading spaces. When omitted,
--- leading spaces are blank. Overrides the "space" and
--- "multispace" settings for leading spaces. You can
--- combine it with "tab:", for example: >vim
--- set listchars+=tab:>-,lead:.
--- <
--- *lcs-leadmultispace*
--- leadmultispace:c...
--- Like the |lcs-multispace| value, but for leading
--- spaces only. Also overrides |lcs-lead| for leading
--- multiple spaces.
--- `:set listchars=leadmultispace:---+` shows ten
--- consecutive leading spaces as: >
--- ---+---+--XXX
--- <
--- Where "XXX" denotes the first non-blank characters in
--- the line.
--- *lcs-trail*
--- trail:c Character to show for trailing spaces. When omitted,
--- trailing spaces are blank. Overrides the "space" and
--- "multispace" settings for trailing spaces.
--- *lcs-extends*
--- extends:c Character to show in the last column, when 'wrap' is
--- off and the line continues beyond the right of the
--- screen.
--- *lcs-precedes*
--- precedes:c Character to show in the first visible column of the
--- physical line, when there is text preceding the
--- character visible in the first column.
--- *lcs-conceal*
--- conceal:c Character to show in place of concealed text, when
--- 'conceallevel' is set to 1. A space when omitted.
--- *lcs-nbsp*
--- nbsp:c Character to show for a non-breakable space character
--- (0xA0 (160 decimal) and U+202F). Left blank when
--- omitted.
---
--- The characters ':' and ',' should not be used. UTF-8 characters can
--- be used. All characters must be single width. *E1512*
---
--- Each character can be specified as hex: >vim
--- set listchars=eol:\\x24
--- set listchars=eol:\\u21b5
--- set listchars=eol:\\U000021b5
--- < Note that a double backslash is used. The number of hex characters
--- must be exactly 2 for \\x, 4 for \\u and 8 for \\U.
---
--- Examples: >vim
--- set lcs=tab:>-,trail:-
--- set lcs=tab:>-,eol:<,nbsp:%
--- set lcs=extends:>,precedes:<
--- < |hl-NonText| highlighting will be used for "eol", "extends" and
--- "precedes". |hl-Whitespace| for "nbsp", "space", "tab", "multispace",
--- "lead" and "trail".
-vim.o.number = true
-vim.o.pumheight = 10
--- 'pumheight' 'ph' number (default 0)
--- global
--- Maximum number of items to show in the popup menu
--- (|ins-completion-menu|). Zero means "use available screen space".
-vim.o.scrolloff = 2
--- 'scrolloff' 'so' number (default 0)
--- global or local to window |global-local|
--- Minimal number of screen lines to keep above and below the cursor.
--- This will make some context visible around where you are working. If
--- you set it to a very large value (999) the cursor line will always be
--- in the middle of the window (except at the start or end of the file or
--- when long lines wrap).
--- After using the local value, go back the global value with one of
--- these two: >vim
--- setlocal scrolloff<
--- setlocal scrolloff=-1
--- < For scrolling horizontally see 'sidescrolloff'.
-vim.o.shada =
- "'100,<50,s10,:100,/100,h,r/tmp/,r/private/,rfugitive:,rzipfile:,rterm:"
--- 'shada' 'sd' string (default for
--- Win32: !,'100,<50,s10,h,rA:,rB:
--- others: !,'100,<50,s10,h)
--- global
--- When non-empty, the shada file is read upon startup and written
--- when exiting Vim (see |shada-file|). The string should be a comma-
--- separated list of parameters, each consisting of a single character
--- identifying the particular parameter, followed by a number or string
--- which specifies the value of that parameter. If a particular
--- character is left out, then the default value is used for that
--- parameter. The following is a list of the identifying characters and
--- the effect of their value.
--- CHAR VALUE ~
--- *shada-!*
--- ! When included, save and restore global variables that start
--- with an uppercase letter, and don't contain a lowercase
--- letter. Thus "KEEPTHIS and "K_L_M" are stored, but "KeepThis"
--- and "_K_L_M" are not. Nested List and Dict items may not be
--- read back correctly, you end up with an empty item.
--- *shada-quote*
--- " Maximum number of lines saved for each register. Old name of
--- the '<' item, with the disadvantage that you need to put a
--- backslash before the ", otherwise it will be recognized as the
--- start of a comment!
--- *shada-%*
--- % When included, save and restore the buffer list. If Vim is
--- started with a file name argument, the buffer list is not
--- restored. If Vim is started without a file name argument, the
--- buffer list is restored from the shada file. Quickfix
--- ('buftype'), unlisted ('buflisted'), unnamed and buffers on
--- removable media (|shada-r|) are not saved.
--- When followed by a number, the number specifies the maximum
--- number of buffers that are stored. Without a number all
--- buffers are stored.
--- *shada-'*
--- ' Maximum number of previously edited files for which the marks
--- are remembered. This parameter must always be included when
--- 'shada' is non-empty.
--- If non-zero, then the |jumplist| and the |changelist| are also
--- stored in the shada file.
--- *shada-/*
--- / Maximum number of items in the search pattern history to be
--- saved. If non-zero, then the previous search and substitute
--- patterns are also saved. When not included, the value of
--- 'history' is used.
--- *shada-:*
--- : Maximum number of items in the command-line history to be
--- saved. When not included, the value of 'history' is used.
--- *shada-<*
--- < Maximum number of lines saved for each register. If zero then
--- registers are not saved. When not included, all lines are
--- saved. '"' is the old name for this item.
--- Also see the 's' item below: limit specified in KiB.
--- *shada-@*
--- @ Maximum number of items in the input-line history to be
--- saved. When not included, the value of 'history' is used.
--- *shada-c*
--- c Dummy option, kept for compatibility reasons. Has no actual
--- effect: ShaDa always uses UTF-8 and 'encoding' value is fixed
--- to UTF-8 as well.
--- *shada-f*
--- f Whether file marks need to be stored. If zero, file marks ('0
--- to '9, 'A to 'Z) are not stored. When not present or when
--- non-zero, they are all stored. '0 is used for the current
--- cursor position (when exiting or when doing |:wshada|).
--- *shada-h*
--- h Disable the effect of 'hlsearch' when loading the shada
--- file. When not included, it depends on whether ":nohlsearch"
--- has been used since the last search command.
--- *shada-n*
--- n Name of the shada file. The name must immediately follow
--- the 'n'. Must be at the end of the option! If the
--- 'shadafile' option is set, that file name overrides the one
--- given here with 'shada'. Environment variables are
--- expanded when opening the file, not when setting the option.
--- *shada-r*
--- r Removable media. The argument is a string (up to the next
--- ','). This parameter can be given several times. Each
--- specifies the start of a path for which no marks will be
--- stored. This is to avoid removable media. For Windows you
--- could use "ra:,rb:". You can also use it for temp files,
--- e.g., for Unix: "r/tmp". Case is ignored.
--- *shada-s*
--- s Maximum size of an item contents in KiB. If zero then nothing
--- is saved. Unlike Vim this applies to all items, except for
--- the buffer list and header. Full item size is off by three
--- unsigned integers: with `s10` maximum item size may be 1 byte
--- (type: 7-bit integer) + 9 bytes (timestamp: up to 64-bit
--- integer) + 3 bytes (item size: up to 16-bit integer because
--- 2^8 < 10240 < 2^16) + 10240 bytes (requested maximum item
--- contents size) = 10253 bytes.
---
--- Example: >vim
--- set shada='50,<1000,s100,:0,n~/nvim/shada
--- <
--- '50 Marks will be remembered for the last 50 files you
--- edited.
--- <1000 Contents of registers (up to 1000 lines each) will be
--- remembered.
--- s100 Items with contents occupying more then 100 KiB are
--- skipped.
--- :0 Command-line history will not be saved.
--- n~/nvim/shada The name of the file to use is "~/nvim/shada".
--- no / Since '/' is not specified, the default will be used,
--- that is, save all of the search history, and also the
--- previous search and substitute patterns.
--- no % The buffer list will not be saved nor read back.
--- no h 'hlsearch' highlighting will be restored.
---
--- When setting 'shada' from an empty value you can use |:rshada| to
--- load the contents of the file, this is not done automatically.
---
--- This option cannot be set from a |modeline| or in the |sandbox|, for
--- security reasons.
-vim.o.sidescrolloff = 5
--- 'sidescrolloff' 'siso' number (default 0)
--- global or local to window |global-local|
--- The minimal number of screen columns to keep to the left and to the
--- right of the cursor if 'nowrap' is set. Setting this option to a
--- value greater than 0 while having 'sidescroll' also at a non-zero
--- value makes some context visible in the line you are scrolling in
--- horizontally (except at beginning of the line). Setting this option
--- to a large value (like 999) has the effect of keeping the cursor
--- horizontally centered in the window, as long as one does not come too
--- close to the beginning of the line.
--- After using the local value, go back the global value with one of
--- these two: >vim
--- setlocal sidescrolloff<
--- setlocal sidescrolloff=-1
--- <
--- Example: Try this together with 'sidescroll' and 'listchars' as in the
--- following example to never allow the cursor to move onto the
--- "extends" character: >vim
---
--- set nowrap sidescroll=1 listchars=extends:>,precedes:<
--- set sidescrolloff=1
--- <
-vim.o.smartcase = true
--- 'smartcase' 'scs' boolean (default off)
--- global
--- Override the 'ignorecase' option if the search pattern contains upper
--- case characters. Only used when the search pattern is typed and
--- 'ignorecase' option is on. Used for the commands "/", "?", "n", "N",
--- ":g" and ":s" and when filtering matches for the completion menu
--- |compl-states|.
--- Not used for "*", "#", "gd", tag search, etc. After "*" and "#" you
--- can make 'smartcase' used by doing a "/" command, recalling the search
--- pattern from history and hitting <Enter>.
-vim.o.smoothscroll = true
--- 'smoothscroll' 'sms' boolean (default off)
--- local to window
--- Scrolling works with screen lines. When 'wrap' is set and the first
--- line in the window wraps part of it may not be visible, as if it is
--- above the window. "<<<" is displayed at the start of the first line,
--- highlighted with |hl-NonText|.
--- You may also want to add "lastline" to the 'display' option to show as
--- much of the last line as possible.
--- NOTE: partly implemented, doesn't work yet for |gj| and |gk|.
-vim.o.splitright = true
--- 'splitright' 'spr' boolean (default off)
--- global
--- When on, splitting a window will put the new window right of the
--- current one. |:vsplit|
-vim.o.statuscolumn = "%s%=%l%{%&nu||&rnu?'%#WinSeparator#│':''%}"
--- 'statuscolumn' 'stc' string (default "")
--- local to window
--- When non-empty, this option determines the content of the area to the
--- side of a window, normally containing the fold, sign and number columns.
--- The format of this option is like that of 'statusline'.
---
--- Some of the items from the 'statusline' format are different for
--- 'statuscolumn':
---
--- %l line number column for currently drawn line
--- %s sign column for currently drawn line
--- %C fold column for currently drawn line
---
--- The 'statuscolumn' width follows that of the default columns and
--- adapts to the 'numberwidth', 'signcolumn' and 'foldcolumn' option values
--- (regardless of whether the sign and fold items are present).
--- Additionally, the 'statuscolumn' grows with the size of the evaluated
--- format string, up to a point (following the maximum size of the default
--- fold, sign and number columns). Shrinking only happens when the number
--- of lines in a buffer changes, or the 'statuscolumn' option is set.
---
--- The |v:lnum| variable holds the line number to be drawn.
--- The |v:relnum| variable holds the relative line number to be drawn.
--- The |v:virtnum| variable is negative when drawing virtual lines, zero
--- when drawing the actual buffer line, and positive when
--- drawing the wrapped part of a buffer line.
---
--- When using |v:relnum|, keep in mind that cursor movement by itself will
--- not cause the 'statuscolumn' to update unless 'relativenumber' is set.
---
--- NOTE: The %@ click execute function item is supported as well but the
--- specified function will be the same for each row in the same column.
--- It cannot be switched out through a dynamic 'statuscolumn' format, the
--- handler should be written with this in mind.
---
--- Examples: >vim
--- " Line number with bar separator and click handlers:
--- set statuscolumn=%@SignCb@%s%=%T%@NumCb@%l│%T
---
--- " Line numbers in hexadecimal for non wrapped part of lines:
--- let &stc='%=%{v:virtnum>0?"":printf("%x",v:lnum)} '
---
--- " Human readable line numbers with thousands separator:
--- let &stc='%{substitute(v:lnum,"\\d\\zs\\ze\\'
--- . '%(\\d\\d\\d\\)\\+$",",","g")}'
---
--- " Both relative and absolute line numbers with different
--- " highlighting for odd and even relative numbers:
--- let &stc='%#NonText#%{&nu?v:lnum:""}' .
--- '%=%{&rnu&&(v:lnum%2)?"\ ".v:relnum:""}' .
--- '%#LineNr#%{&rnu&&!(v:lnum%2)?"\ ".v:relnum:""}'
---
--- < WARNING: this expression is evaluated for each screen line so defining
--- an expensive expression can negatively affect render performance.
---
-vim.o.tagcase = "match"
--- 'tagcase' 'tc' string (default "followic")
--- global or local to buffer |global-local|
--- This option specifies how case is handled when searching the tags
--- file:
--- followic Follow the 'ignorecase' option
--- followscs Follow the 'smartcase' and 'ignorecase' options
--- ignore Ignore case
--- match Match case
--- smart Ignore case unless an upper case letter is used
-vim.o.title = true
--- 'title' boolean (default off)
--- global
--- When on, the title of the window will be set to the value of
--- 'titlestring' (if it is not empty), or to:
--- filename [+=-] (path) - Nvim
--- Where:
--- filename the name of the file being edited
--- - indicates the file cannot be modified, 'ma' off
--- + indicates the file was modified
--- = indicates the file is read-only
--- =+ indicates the file is read-only and modified
--- (path) is the path of the file being edited
--- - Nvim the server name |v:servername| or "Nvim"
-vim.o.undofile = true
--- 'undofile' 'udf' boolean (default off)
--- local to buffer
--- When on, Vim automatically saves undo history to an undo file when
--- writing a buffer to a file, and restores undo history from the same
--- file on buffer read.
--- The directory where the undo file is stored is specified by 'undodir'.
--- For more information about this feature see |undo-persistence|.
--- The undo file is not read when 'undoreload' causes the buffer from
--- before a reload to be saved for undo.
--- When 'undofile' is turned off the undo file is NOT deleted.
-vim.o.updatetime = 250
--- 'updatetime' 'ut' number (default 4000)
--- global
--- If this many milliseconds nothing is typed the swap file will be
--- written to disk (see |crash-recovery|). Also used for the
--- |CursorHold| autocommand event.
-vim.opt.wildignore:append({ "*.pyc", "__pycache__", "*~", "#*#", "*.o" })
--- 'wildignore' 'wig' string (default "")
--- global
--- A list of file patterns. A file that matches with one of these
--- patterns is ignored when expanding |wildcards|, completing file or
--- directory names, and influences the result of |expand()|, |glob()| and
--- |globpath()| unless a flag is passed to disable this.
--- The pattern is used like with |:autocmd|, see |autocmd-pattern|.
--- Also see 'suffixes'.
--- Example: >vim
--- set wildignore=*.o,*.obj
--- < The use of |:set+=| and |:set-=| is preferred when adding or removing
--- a pattern from the list. This avoids problems when a future version
--- uses another default.
-vim.o.wildignorecase = true
--- 'wildignorecase' 'wic' boolean (default off)
--- global
--- When set case is ignored when completing file names and directories.
--- Has no effect when 'fileignorecase' is set.
--- Does not apply when the shell is used to expand wildcards, which
--- happens when there are special characters.
-vim.o.wildmode = "longest:full,full"
--- 'wildmode' 'wim' string (default "full")
--- global
--- Completion mode used for the character specified with 'wildchar'.
--- This option is a comma-separated list of up to four parts,
--- corresponding to the first, second, third, and fourth presses of
--- 'wildchar'. Each part is a colon-separated list of completion
--- behaviors, which are applied simultaneously during that phase.
---
--- The possible behavior values are:
--- "" Only complete (insert) the first match. No further
--- matches are cycled or listed.
--- "full" Complete the next full match. Cycles through all
--- matches, returning to the original input after the
--- last match. If 'wildmenu' is enabled, it will be
--- shown.
--- "longest" Complete to the longest common substring. If this
--- doesn't extend the input, the next 'wildmode' part is
--- used.
--- "list" If multiple matches are found, list all of them.
--- "lastused" When completing buffer names, sort them by most
--- recently used (excluding the current buffer). Only
--- applies to buffer name completion.
--- "noselect" If 'wildmenu' is enabled, show the menu but do not
--- preselect the first item.
--- If only one match exists, it is completed fully, unless "noselect" is
--- specified.
---
--- Some useful combinations of colon-separated values:
--- "longest:full" Start with the longest common string and show
--- 'wildmenu' (if enabled). Does not cycle
--- through full matches.
--- "list:full" List all matches and complete first match.
--- "list:longest" List all matches and complete till the longest
--- common prefix.
--- "list:lastused" List all matches. When completing buffers,
--- sort them by most recently used (excluding the
--- current buffer).
--- "noselect:lastused" Do not preselect the first item in 'wildmenu'
--- if it is active. When completing buffers,
--- sort them by most recently used (excluding the
--- current buffer).
---
--- Examples: >vim
--- set wildmode=full
--- < Complete full match on every press (default behavior) >vim
--- set wildmode=longest,full
--- < First press: longest common substring
--- Second press: cycle through full matches >vim
--- set wildmode=list:full
--- < First press: list all matches and complete the first one >vim
--- set wildmode=list,full
--- < First press: list matches only
--- Second press: complete full matches >vim
--- set wildmode=longest,list
--- < First press: longest common substring
--- Second press: list all matches >vim
--- set wildmode=noselect:full
--- < First press: show 'wildmenu' without completing or selecting
--- Second press: cycle full matches >vim
--- set wildmode=noselect:lastused,full
--- < Same as above, but buffer matches are sorted by time last used
--- More info here: |cmdline-completion|.
-vim.o.winborder = "none"
--- 'winborder' string (default "")
--- global
--- Defines the default border style of floating windows. The default value
--- is empty, which is equivalent to "none". Valid values include:
--- - "bold": Bold line box.
--- - "double": Double-line box.
--- - "none": No border.
--- - "rounded": Like "single", but with rounded corners ("╭" etc.).
--- - "shadow": Drop shadow effect, by blending with the background.
--- - "single": Single-line box.
--- - "solid": Adds padding by a single whitespace cell.
--- - custom: comma-separated list of exactly 8 characters in clockwise
--- order starting from topleft. Example: >lua
--- vim.o.winborder='+,-,+,|,+,-,+,|'
--- <
diff --git a/nvim/dot-config/nvim-final/lua/mo/zen.lua b/nvim/dot-config/nvim-final/lua/mo/zen.lua
deleted file mode 100644
index eb674ba..0000000
--- a/nvim/dot-config/nvim-final/lua/mo/zen.lua
+++ /dev/null
@@ -1,89 +0,0 @@
-local M = {}
-M.themes = {
- dark = {
- "seoulbones",
- "rosebones",
- "forestbones",
- "zenwritten",
- },
- light = {
- "seoulbones",
- "vimbones",
- "rosebones",
- "forestbones",
- },
-}
-M.current = {
- dark = 1,
- light = 1,
-}
-M.bg = "dark"
-
-M.cycle = function()
- M.current[M.bg] = M.current[M.bg] + 1
- if M.current[M.bg] > #M.themes[M.bg] then M.current[M.bg] = 1 end
- M.set()
-end
-
-M.set = function()
- vim.o.background = M.bg
- local theme = M.themes[M.bg][M.current[M.bg]]
- vim.print("Switching to " .. theme)
-
- vim.g[theme .. "_compat"] = 1
- vim.cmd.colorscheme(theme)
-
- -- make strings nonitalic
- local str_highlight =
- vim.api.nvim_get_hl(0, { name = "String", link = false })
- vim.api.nvim_set_hl(
- 0,
- "String",
- { fg = str_highlight.fg, italic = false, force = true }
- )
-
- -- make booleans nonitalic and bold
- local bool_highlight =
- vim.api.nvim_get_hl(0, { name = "Boolean", link = false })
- vim.api.nvim_set_hl(
- 0,
- "Boolean",
- { fg = bool_highlight.fg, italic = false, bold = true, force = true }
- )
-
- -- make normals in seoulbones darker
- if theme == "seoulbones" and M.bg == "dark" then
- local norm_highlight =
- vim.api.nvim_get_hl(0, { name = "Normal", link = false })
- vim.api.nvim_set_hl(
- 0,
- "Normal",
- { fg = norm_highlight.fg, bg = "#313131", force = true }
- )
- end
-end
-
-M.togglebg = function()
- M.bg = M.bg == "dark" and "light" or "dark"
- M.set()
-end
-
----@param theme string?
----@param bg "dark"|"light"|nil
-M.setup = function(theme, bg)
- vim.cmd("packadd zenbones.nvim")
- if bg then M.bg = bg end
- if theme then
- for i, th in ipairs(M.themes[M.bg]) do
- if th == theme then
- M.current[M.bg] = i
- break
- end
- end
- end
- M.set()
- vim.keymap.set("n", "<F3>", M.cycle, {})
- vim.keymap.set("n", "<F12>", M.togglebg, {})
-end
-
-return M
diff --git a/nvim/dot-config/nvim-final/nvim-pack-lock.json b/nvim/dot-config/nvim-final/nvim-pack-lock.json
deleted file mode 100644
index 506d313..0000000
--- a/nvim/dot-config/nvim-final/nvim-pack-lock.json
+++ /dev/null
@@ -1,12 +0,0 @@
-{
- "plugins": {
- "nvim-treesitter": {
- "rev": "300b906a9514d5e0ce02911d371445382fe35a31",
- "src": "https://github.com/nvim-treesitter/nvim-treesitter"
- },
- "zenbones.nvim": {
- "rev": "4635a3f46d1066975d1074cd9f61f93cb1e32f64",
- "src": "https://github.com/zenbones-theme/zenbones.nvim"
- }
- }
-} \ No newline at end of file
diff --git a/nvim/dot-config/nvim-final/plugin/autocommands.lua b/nvim/dot-config/nvim-final/plugin/autocommands.lua
deleted file mode 100644
index b64ac07..0000000
--- a/nvim/dot-config/nvim-final/plugin/autocommands.lua
+++ /dev/null
@@ -1,7 +0,0 @@
-vim.api.nvim_create_autocmd("BufWritePre", {
- pattern = "*",
- callback = function(ev)
- vim.cmd('execute "normal! mz" | keeppatterns %s/\\v\\s+$//e | normal `z')
- end,
- desc = "Strip whitespace from file"
-})
diff --git a/nvim/dot-config/nvim-final/plugin/treesitter.lua b/nvim/dot-config/nvim-final/plugin/treesitter.lua
deleted file mode 100644
index 1fb4503..0000000
--- a/nvim/dot-config/nvim-final/plugin/treesitter.lua
+++ /dev/null
@@ -1,42 +0,0 @@
-local disabled = {}
-local ft_lang_map = {}
-
-vim.api.nvim_create_autocmd("FileType", {
- group = vim.api.nvim_create_augroup("treesitter_highlight_augroup", {clear = true}),
- callback = function(ev)
- local buf = ev.buf
- if vim.api.nvim_buf_is_loaded(buf) then
- local ft = vim.bo[buf].filetype
- if not disabled[ft] then
- if ft_lang_map[ft] then
- vim.treesitter.language.register(ft_lang_map[ft], ft)
- ft_lang_map[ft] = nil
- end
- local parser = vim.treesitter.get_parser(buf, nil, { error = false })
- if parser == nil then
- disabled[ft] = true
- else
- if not vim.treesitter.highlighter.active[buf] then
- vim.treesitter.highlighter.new(parser)
- end
- end
- end
- end
- --(when (vim.api.nvim_buf_is_loaded buf)
- -- (let [ft (. vim.bo buf :filetype)]
- -- (when (not (. disabled ft))
- -- (case (. ft-lang-map ft)
- -- lang (do
- -- (vim.treesitter.language.register lang ft)
- -- (tset ft-lang-map ft nil)))
- -- (case (vim.treesitter.get_parser buf nil {:error false})
- -- nil (tset disabled ft true)
- -- parser (do
- -- (when (not (. vim.treesitter.highlighter.active buf))
- -- (vim.treesitter.highlighter.new parser))
- -- (when (vim.treesitter.query.get ft :folds)
- -- (set vim.wo.foldmethod :expr)
- -- (set vim.wo.foldexpr "v:lua.vim.treesitter.foldexpr()")))))))))
-
- end
-})
diff --git a/nvim/dot-config/nvim-final/stylua.toml b/nvim/dot-config/nvim-final/stylua.toml
deleted file mode 100644
index 4ac5841..0000000
--- a/nvim/dot-config/nvim-final/stylua.toml
+++ /dev/null
@@ -1,12 +0,0 @@
-call_parentheses = "Always"
-collapse_simple_statement = "Always"
-column_width = 80
-indent_type = "Spaces"
-indent_width = 4
-line_endings = "Unix"
-quote_style = "AutoPreferDouble"
-space_after_function_names = "Never"
-syntax = "LuaJIT"
-
-[sort_requires]
-enabled = true
diff --git a/quickshell/dot-config/quickshell/Bar.qml b/quickshell/dot-config/quickshell/Bar.qml
new file mode 100644
index 0000000..7cc7354
--- /dev/null
+++ b/quickshell/dot-config/quickshell/Bar.qml
@@ -0,0 +1,92 @@
+import Quickshell
+import Quickshell.Wayland
+import Quickshell.Services.UPower
+import QtQuick
+import QtQuick.Layouts
+
+Scope {
+ Variants {
+ model: Quickshell.screens
+
+ PanelWindow {
+ required property var modelData
+ screen: modelData
+
+ anchors {
+ top: true
+ left: true
+ right: true
+ }
+
+ implicitHeight: Globals.controls.barHeight
+ color: Globals.colors.bg
+
+
+ RowLayout {
+ anchors.fill: parent
+ spacing: Globals.controls.spacing
+
+ Text {
+ Layout.alignment: Qt.AlignVCenter
+ color: Globals.colors.fg
+ font: Globals.font.regular
+ text: "Niri" // CurrentWindow.activeWindow
+ leftPadding: Globals.controls.padding
+ }
+
+ Item {
+ Layout.fillWidth: true
+ }
+
+ Text {
+ text: Batt.iconRepr
+ color: Globals.colors.fg
+ font: Globals.font.regular
+ }
+
+ Text {
+ id: profileText
+ text: "~B~"
+ color: Globals.colors.fg
+ font: Globals.font.regular
+
+ Timer {
+ interval: 2000
+ running: true
+ repeat: true
+ onTriggered: updatePowerProfile()
+ }
+
+ Component.onCompleted: updatePowerProfile()
+ }
+
+ Tray {}
+
+ ClockWidget {
+ Layout.alignment: Qt.AlignVCenter
+ color: Globals.colors.fg
+ font: Globals.font.bold
+ rightPadding: Globals.controls.padding
+ }
+ }
+
+ function updatePowerProfile() {
+ let profile = PowerProfiles.profile
+ var color = {
+ [PowerProfile.Performance]: Globals.colors.urgent,
+ [PowerProfile.Balanced]: Globals.colors.comment,
+ [PowerProfile.PowerSaver]: Globals.colors.special,
+ }[profile] ?? Globals.colors.comment;
+
+ var icon = {
+ [PowerProfile.Performance]: "[P]",
+ [PowerProfile.Balanced]: "~B~",
+ [PowerProfile.PowerSaver]: "\\S/",
+ }[profile] ?? "~B~";
+
+ profileText.text = icon;
+ profileText.color = color;
+ }
+ }
+ }
+}
diff --git a/quickshell/dot-config/quickshell/Batt.qml b/quickshell/dot-config/quickshell/Batt.qml
new file mode 100644
index 0000000..becbd78
--- /dev/null
+++ b/quickshell/dot-config/quickshell/Batt.qml
@@ -0,0 +1,137 @@
+pragma Singleton
+
+import Quickshell
+import Quickshell.Services.UPower
+import QtQuick
+
+Singleton {
+ id: root
+ property UPowerDevice bat: null
+ property int perc: 0
+ property int timeTo: 0
+
+ readonly property string simpleRepr: {
+ var info = ""
+ if (bat !== null) {
+ const timeToStr = getDurationAsString(timeTo)
+ switch(bat.state) {
+ case UPowerDeviceState.Charging: info = `[CHR] (${timeToStr})`; break;
+ case UPowerDeviceState.Discharging: info = `[DIS] (${timeToStr})`; break;
+ case UPowerDeviceState.FullyCharged: info = "[Full]"; break;
+ case UPowerDeviceState.PendingDischarge: info = "[P-DI]"; break;
+ case UPowerDeviceState.PendingCharge: info = "[P-CH]"; break;
+ case UPowerDeviceState.Empty: info = "[---]"; break;
+ case UPowerDeviceState.Unknown: info = "[???]"; break;
+ }
+ }
+ `Bat: ${perc}% ${info}`
+ }
+
+ readonly property var iconMap: ({
+ "nf-md-battery_10": "f007a",
+ "nf-md-battery_20": "f007b",
+ "nf-md-battery_30": "f007c",
+ "nf-md-battery_40": "f007d",
+ "nf-md-battery_50": "f007e",
+ "nf-md-battery_60": "f007f",
+ "nf-md-battery_70": "f0080",
+ "nf-md-battery_80": "f0081",
+ "nf-md-battery_90": "f0082",
+ "nf-md-battery_alert_variant_outline": "f10cd",
+ "nf-md-battery_charging_10": "f089c",
+ "nf-md-battery_charging_100": "f0085",
+ "nf-md-battery_charging_20": "f0086",
+ "nf-md-battery_charging_30": "f0087",
+ "nf-md-battery_charging_40": "f0088",
+ "nf-md-battery_charging_50": "f089d",
+ "nf-md-battery_charging_60": "f0089",
+ "nf-md-battery_charging_70": "f089e",
+ "nf-md-battery_charging_80": "f008a",
+ "nf-md-battery_charging_90": "f008b",
+ "nf-md-battery_check": "f17e2",
+ "nf-md-battery_remove_outline": "f17e9",
+ "nf-md-battery_unknown": "f0091",
+ "nf-md-battery": "f0079",
+ })
+
+ readonly property string iconRepr: {
+ if (bat === null) return getIconFromName("nf-md-battery_sync_outline");
+
+ var perc_str
+ var info = ""
+ var perc_round = perc - (perc % 10)
+
+ switch (perc_round) {
+ case 100: perc_str = "check"; break;
+ case 0: perc_str = "alert_variant_outline"; break;
+ default: perc_str = String(perc_round); break;
+ }
+
+ const timeToStr = getDurationAsString(timeTo)
+ switch(bat.state) {
+ case UPowerDeviceState.Charging: info = `(${timeToStr})`; break;
+ case UPowerDeviceState.Discharging: info = `(${timeToStr})`; break;
+ case UPowerDeviceState.PendingDischarge: info = "[P-Di]"; break;
+ case UPowerDeviceState.PendingCharge: info = "[P-Ch]"; break;
+ case UPowerDeviceState.Empty: perc_str = "alert_variant_outline"; break;
+ case UPowerDeviceState.Unknown: perc_str = "unknown"; break;
+ }
+
+ var is_charging = (bat.state === UPowerDeviceState.Charging)
+ if (is_charging && perc_round === 100) {
+ is_charging = false
+ info = ""
+ }
+ const iconName = `nf-md-battery${is_charging ? "_charging" : ""}_${perc_str}`
+ const icon = getIconFromName(iconName)
+ return `${icon} ${perc === 100 ? "Full" : String(perc) + "%"}${info !== "" ? " ": ""}${info}`
+ }
+
+ Timer {
+ interval: 10000
+ running: true
+ repeat: true
+ onTriggered: root.update()
+ }
+
+ Component.onCompleted: update()
+
+ function getIconFromName(name: string): string {
+ return String.fromCodePoint(parseInt(iconMap[name] ?? iconMap["nf-md-battery"], 16))
+ }
+
+ function getDurationAsString(seconds: real): string {
+ if (!Number.isInteger(seconds)) {
+ throw new Error("seconds must be an integer");
+ }
+
+ const hours = Math.floor(seconds / 3600);
+ const minutes = Math.floor((seconds % 3600) / 60);
+ const secs = seconds % 60
+
+ if (hours > 0) {
+ return `${String(hours).padStart(2, '0')}:${String(minutes).padStart(2, '0')}:${String(secs).padStart(2, '0')}`;
+ }
+ else if (minutes > 0) {
+ return `${minutes}m ${secs}s`;
+ }
+ else {
+ return `${secs}s`
+ }
+ // return `${String(hours).padStart(2, '0')}:${String(minutes).padStart(2, '0')}:${String(secs).padStart(2, '0')}`;
+ }
+
+ function update() {
+ if (bat === null) {
+ const _bat = UPower.devices.values.filter(dev => dev.isLaptopBattery)[0] ?? null;
+ if (_bat === null) return;
+ bat = _bat;
+ }
+ perc = Math.floor(bat.percentage * 100)
+ switch(bat.state) {
+ case UPowerDeviceState.Charging: timeTo = bat.timeToFull; break;
+ case UPowerDeviceState.Discharging: timeTo = bat.timeToEmpty; break;
+ default: timeTo = 0; break;
+ }
+ }
+}
diff --git a/quickshell/dot-config/quickshell/ClockWidget.qml b/quickshell/dot-config/quickshell/ClockWidget.qml
new file mode 100644
index 0000000..c8899a0
--- /dev/null
+++ b/quickshell/dot-config/quickshell/ClockWidget.qml
@@ -0,0 +1,5 @@
+import QtQuick
+
+Text {
+ text: Time.time
+}
diff --git a/quickshell/dot-config/quickshell/CurrentWindow.qml b/quickshell/dot-config/quickshell/CurrentWindow.qml
new file mode 100644
index 0000000..e13bf8e
--- /dev/null
+++ b/quickshell/dot-config/quickshell/CurrentWindow.qml
@@ -0,0 +1,49 @@
+pragma Singleton
+
+import Quickshell
+import Quickshell.Io
+import QtQuick
+
+Singleton {
+ id: root
+
+ readonly property string socketPath: Quickshell.env("NIRI_SOCKET")
+
+ property var activeWindow: "TODO"
+
+ DankSocket {
+ id: requestSocket
+ path: root.socketPath
+ connected: true
+ }
+
+ DankSocket {
+ id: eventStreamSocket
+ path: root.socketPath
+ connected: true
+
+ onConnectionStateChanged: {
+ if (connected) {
+ if (requestSocket.connected) {
+ requestSocket.send('"EventStream"')
+ }
+ }
+ }
+
+ parser: SplitParser {
+ onRead: line => {
+ try {
+ const event = JSON.parse(line)
+ root.handleNiriEvent(event)
+ } catch (e) {
+ console.warn("NiriService: Failed to parse event:", line, e)
+ }
+ }
+ }
+ }
+
+ function handleNiriEvent(event) {
+ const eventType = Object.keys(event)[0]
+ console.log(eventType)
+ }
+}
diff --git a/quickshell/dot-config/quickshell/DankSocket.qml b/quickshell/dot-config/quickshell/DankSocket.qml
new file mode 100644
index 0000000..93471ba
--- /dev/null
+++ b/quickshell/dot-config/quickshell/DankSocket.qml
@@ -0,0 +1,62 @@
+import QtQuick
+import Quickshell.Io
+
+Item {
+ id: root
+
+ property alias path: socket.path
+ property alias parser: socket.parser
+ property bool connected: false
+
+ property int reconnectBaseMs: 400
+ property int reconnectMaxMs: 15000
+
+ property int _reconnectAttempt: 0
+
+ signal connectionStateChanged()
+
+ onConnectedChanged: {
+ socket.connected = connected
+ }
+
+ Socket {
+ id: socket
+
+ onConnectionStateChanged: {
+ root.connectionStateChanged()
+ if (connected) {
+ root._reconnectAttempt = 0
+ return
+ }
+ if (root.connected) {
+ root._scheduleReconnect()
+ }
+ }
+ }
+
+ Timer {
+ id: reconnectTimer
+ interval: 0
+ repeat: false
+ onTriggered: {
+ socket.connected = false
+ Qt.callLater(() => socket.connected = true)
+ }
+ }
+
+ function send(data) {
+ const json = typeof data === "string" ? data : JSON.stringify(data)
+ const message = json.endsWith("\n") ? json : json + "\n"
+ socket.write(message)
+ socket.flush()
+ }
+
+ function _scheduleReconnect() {
+ const pow = Math.min(_reconnectAttempt, 10)
+ const base = Math.min(reconnectBaseMs * Math.pow(2, pow), reconnectMaxMs)
+ const jitter = Math.floor(Math.random() * Math.floor(base / 4))
+ reconnectTimer.interval = base + jitter
+ reconnectTimer.restart()
+ _reconnectAttempt++
+ }
+}
diff --git a/quickshell/dot-config/quickshell/Globals.qml b/quickshell/dot-config/quickshell/Globals.qml
new file mode 100644
index 0000000..83fda27
--- /dev/null
+++ b/quickshell/dot-config/quickshell/Globals.qml
@@ -0,0 +1,35 @@
+pragma Singleton
+
+import QtQuick
+import Quickshell
+
+Singleton {
+ id: root
+ readonly property var controls: QtObject {
+ readonly property int padding: 5
+ readonly property int spacing: 10
+ readonly property int radius: 0
+ readonly property int barHeight: 15
+ readonly property int iconSize: 13
+ readonly property string terminal: "alacritty"
+ }
+ readonly property var font: QtObject {
+ readonly property font regular: Qt.font({
+ family: "Dejavu Sans Mono",
+ pointSize: 10
+ })
+ readonly property font bold: Qt.font({
+ family: "Dejavu Sans Mono",
+ pointSize: 10,
+ weight: 800
+ })
+ }
+ readonly property var colors: QtObject {
+ readonly property string bg: "#181818"
+ readonly property string fg: "#e4e4ef"
+ readonly property string comment: "#cc8c3c"
+ readonly property string special: "#96a6c8"
+ readonly property string urgent: "#c73c3f"
+ readonly property string shadow: "#101010"
+ }
+}
diff --git a/quickshell/dot-config/quickshell/Margin.qml b/quickshell/dot-config/quickshell/Margin.qml
new file mode 100644
index 0000000..ca86d70
--- /dev/null
+++ b/quickshell/dot-config/quickshell/Margin.qml
@@ -0,0 +1,23 @@
+import QtQuick
+
+Item {
+ id: root
+ property bool isVertical
+
+ height: 2
+ width: 2
+
+ Rectangle {
+ anchors.centerIn: parent
+ width: parent.width - Globals.controls.padding * 2
+ height: 2
+ color: Globals.colors.shadow
+
+ Rectangle {
+ anchors.bottom: parent.bottom
+ width: parent.width
+ height: 1
+ color: Globals.colors.fg
+ }
+ }
+}
diff --git a/quickshell/dot-config/quickshell/Popout.qml b/quickshell/dot-config/quickshell/Popout.qml
new file mode 100644
index 0000000..92dfbd5
--- /dev/null
+++ b/quickshell/dot-config/quickshell/Popout.qml
@@ -0,0 +1,147 @@
+import QtQuick
+import QtQuick.Effects
+import Quickshell
+import Quickshell.Io
+import qs.services
+
+Item {
+ id: root
+ required property Item anchor
+ required property Item body
+
+ readonly property real windowWidth: window.width
+
+ property Item header: null
+
+ property bool isOpen: false
+ property bool debug
+
+ function open() {
+ Popout.whosOpen = anchor;
+ Popout.open();
+ isOpen = true;
+ frame.visible = true;
+ anim.restart();
+ }
+ function close() {
+ Popout.whosOpen = null;
+ isOpen = false;
+ anim.restart();
+ }
+ function toggle() {
+ switch (isOpen) {
+ case true:
+ root.close();
+ break;
+ case false:
+ root.open();
+ break;
+ }
+ }
+
+ // anchor 'frame' popup window to 'root'
+ anchors.centerIn: anchor
+ width: Globals.controls.barHeight
+ height: width
+
+ Connections {
+ target: Popout
+ function onOpen() { if (Popout.whosOpen !== anchor && root.isOpen){
+ root.isOpen = false;
+ anim.restart();
+ }}
+ }
+
+ // for dubugging only
+ Rectangle {
+ visible: debug
+ anchors.fill: parent
+ color: "#8000ff00"
+ }
+
+ PopupWindow { id: frame
+ visible: false
+ mask: Region {
+ x: window.x
+ y: window.y
+ width: window.width
+ height: window.height
+ }
+ anchor {
+ item: root;
+ rect { x: root.width /2 -width /2; y: root.height; } // prefer window center horizontally to anchor and bellow bar
+ }
+ implicitWidth: window.width +60
+ implicitHeight: window.height +60
+ color: debug? "#80ff0000" : "transparent"
+
+ // wrapper for all contents in popout
+ Rectangle { id: window
+ x: frame.width /2 -width /2
+ width: Math.max((header? header.width : 0), body.width, 0)
+ height: (header? header.height : 0) +body.height
+ radius: 0
+ color: debug? "#800000ff" : Globals.colors.bg
+ transform: Translate { id: windowTranslate }
+
+ // wrapper for body
+ Rectangle { id: contentBody
+ anchors { horizontalCenter: parent.horizontalCenter; bottom: parent.bottom; }
+ width: window.width
+ height: body.height
+ color: debug? "#80ff0000" : "transparent"
+ }
+
+ // draw border around wrapper for header
+ Rectangle {
+ visible: header
+ anchors { horizontalCenter: contentHeader.horizontalCenter; top: contentHeader.top; }
+ width: contentHeader.width
+ height: contentHeader.height +2
+ // radius: contentHeader.radius
+ color: Globals.colors.fg
+ }
+
+ // wrapper for header
+ Rectangle { id: contentHeader
+ visible: header
+ anchors { horizontalCenter: parent.horizontalCenter; top: parent.top; }
+ width: window.width
+ height: Math.max(header? header.height : 0, 0)
+ color: debug? "#8000ff00" : Globals.colors.bg
+ }
+ }
+ }
+
+ SequentialAnimation { id: anim
+ property real time: 0.25
+
+ ParallelAnimation {
+ NumberAnimation {
+ target: windowTranslate
+ property: "y"
+ from: isOpen? -window.height : Globals.controls.spacing
+ to: isOpen? Globals.controls.spacing : -window.height
+ duration: anim.time *1000
+ easing.type: Easing.OutCirc
+ }
+
+ NumberAnimation {
+ target: window
+ property: "opacity"
+ from: isOpen? 0.0 : 0.98
+ to: isOpen? 0.98 : 0.0
+ duration: anim.time *1000
+ easing.type: Easing.OutCirc
+ }
+ }
+
+ ScriptAction { script: if (!isOpen) frame.visible = false; }
+ }
+
+ Component.onCompleted: {
+ body.parent = contentBody;
+ if (header) header.parent = contentHeader;
+ }
+}
+
diff --git a/quickshell/dot-config/quickshell/QsButton.qml b/quickshell/dot-config/quickshell/QsButton.qml
new file mode 100644
index 0000000..01cc28d
--- /dev/null
+++ b/quickshell/dot-config/quickshell/QsButton.qml
@@ -0,0 +1,125 @@
+import QtQuick
+import Quickshell
+
+Item {
+ id: root
+ required property Item content
+
+ readonly property bool containsMouse: mouseArea.containsMouse
+ readonly property real mouseX: mouseArea.mouseX
+ readonly property real mouseY: mouseArea.mouseY
+
+ property bool anim: true
+ property bool shade: true
+ property bool highlight
+ property bool fill
+ property bool isHighlighted: (root.highlight && containsMouse)
+ property Item tooltip
+ property bool debug
+
+ signal pressed()
+ signal clicked()
+ signal middleClicked()
+ signal mouseEntered()
+ signal mouseExited()
+ signal animMean()
+
+ width: content.width
+ height: content.height
+ transform: Translate { id: rootTranslate; }
+
+ // highlight button on hover
+ Rectangle { id: highlight
+ anchors.centerIn: parent
+ visible: isHighlighted || fill
+ width: parent.width +4
+ height: parent.height +4
+ color: Globals.colors.comment
+ opacity: containsMouse? 0.5 : 0.25
+ }
+
+ // contentWrapper
+ Item { id: contentWrapper
+ anchors.fill: parent
+ }
+
+ QsTooltip { id: tooltip
+ anchor: root
+ content: root.tooltip
+
+ Timer { id: tooltipTimer
+ running: false
+ interval: 1500
+ onTriggered: parent.isShown = true;
+ }
+ }
+
+ MouseArea { id: mouseArea
+ width: content.width +4
+ height: content.height +4
+ x: content.x -2
+ y: content.y -2
+ hoverEnabled: true
+ onEntered: { root.mouseEntered(); if (root.tooltip) tooltipTimer.restart(); }
+ onExited: {
+ root.mouseExited();
+ if (root.tooltip) {
+ tooltipTimer.stop();
+ tooltip.isShown = false;
+ }
+ }
+ acceptedButtons: Qt.LeftButton | Qt.MiddleButton
+ onPressed: (mouse) => {
+ switch (mouse.button) {
+ case Qt.RightButton: {
+ if (root.anim) {
+ pressedAnim.start();
+ } else root.clicked();
+
+ root.pressed();
+ break;
+ }
+ case Qt.RightButton: {
+ if (root.anim) {
+ pressedAnim.start();
+ } else root.clicked();
+
+ root.pressed();
+ break;
+ }
+ case Qt.MiddleButton:
+ root.middleClicked();
+ break;
+ }
+ }
+ onReleased: if (anim) releasedAnim.start();
+
+ Rectangle {
+ visible: debug
+ anchors.fill: parent
+ color: "#4000ff00"
+ }
+ }
+
+ PropertyAnimation { id: pressedAnim
+ target: rootTranslate
+ properties: "y"
+ to: 2
+ duration: 25
+ easing.type: Easing.InCirc;
+ }
+
+ PropertyAnimation { id: releasedAnim
+ target: rootTranslate
+ properties: "y"
+ to: 0
+ duration: 25
+ easing.type: Easing.InCirc;
+ onStarted: root.animMean();
+ onFinished: root.clicked();
+ }
+
+ Component.onCompleted: {
+ content.parent = contentWrapper;
+ }
+}
diff --git a/quickshell/dot-config/quickshell/QsStateButton.qml b/quickshell/dot-config/quickshell/QsStateButton.qml
new file mode 100644
index 0000000..d652bdb
--- /dev/null
+++ b/quickshell/dot-config/quickshell/QsStateButton.qml
@@ -0,0 +1,77 @@
+/*---------------------------------
+--- QsStateButton.qml by andrel ---
+---------------------------------*/
+
+import QtQuick
+import QtQuick.Effects
+import Quickshell
+
+QsButton {
+ required property var checkState // values can be 'Unchecked', 'PartiallyChecked', or 'Checked'
+
+ property var type: QsMenuButtonType.RadioButton // values can be 'CheckBox', 'RadioButton', or 'None'
+
+ shade: false
+ content: Item {
+ width: button.width
+ height: width
+
+ Rectangle { id: button
+ anchors.bottom: parent.bottom
+
+ // button background
+ width: Globals.controls.iconSize
+ height: width
+ radius: {
+ switch (type) {
+ case QsMenuButtonType.CheckBox:
+ return 3;
+ case QsMenuButtonType.RadioButton:
+ return height /2;
+ default:
+ return height /2;
+ }
+ }
+ color: checkState !== Qt.Checked? Globals.colors.comment: Globals.colors.special
+ }
+
+ // checkmark
+ Item {
+ readonly property color color: Globals.colors.fg
+
+ visible: (checkState === Qt.Checked) && (type === QsMenuButtonType.CheckBox)
+ anchors {
+ horizontalCenter: parent.horizontalCenter
+ top: parent.top
+ topMargin: height *0.1
+ }
+ width: height *0.55
+ height: parent.height *0.7
+ rotation: 45
+
+ Rectangle {
+ anchors.right: parent.right
+ width: parent.height *0.25
+ height: parent.height
+ color: parent.color
+ }
+
+ Rectangle {
+ anchors.bottom: parent.bottom
+ width: parent.width
+ height: parent.height *0.25
+ color: parent.color
+ }
+ }
+
+ // radio circle
+ Rectangle {
+ visible: (checkState === Qt.Checked) && (type === QsMenuButtonType.RadioButton)
+ anchors.centerIn: parent
+ width: parent.width *0.5
+ height: width
+ radius: height /2
+ color: Globals.colors.fg
+ }
+ }
+}
diff --git a/quickshell/dot-config/quickshell/QsTooltip.qml b/quickshell/dot-config/quickshell/QsTooltip.qml
new file mode 100644
index 0000000..9725d88
--- /dev/null
+++ b/quickshell/dot-config/quickshell/QsTooltip.qml
@@ -0,0 +1,45 @@
+import QtQuick
+import Quickshell
+
+Item { id: root
+ required property Item anchor
+ required property Item content
+
+ property bool isShown
+
+ anchors.fill: anchor
+
+ Loader {
+ active: content
+ sourceComponent: PopupWindow { id: popout;
+ Connections {
+ target: root
+ function onIsShownChanged() { if (isShown) {
+ popout.anchor.rect.x = root.parent.mouseX;
+ popout.anchor.rect.y = root.parent.mouseY + Globals.controls.iconSize;
+ popout.visible = true;
+ } else popout.visible = false; }
+ }
+ visible: false
+ mask: Region {}
+ anchor {
+ item: root
+ rect { x: root.width /2 -content.width /2 - Globals.controls.padding / 2; y: root.height +6; }
+ }
+ implicitWidth: content.width + Globals.controls.padding
+ implicitHeight: content.height + Globals.controls.padding
+ color: "transparent"
+
+ Rectangle { id: contentWrapper
+ anchors.fill: parent
+ radius: 0
+ color: Globals.colors.bg
+ }
+
+ Component.onCompleted: {
+ content.parent = contentWrapper;
+ content.anchors.centerIn = contentWrapper;
+ }
+ }
+ }
+}
diff --git a/quickshell/dot-config/quickshell/Time.qml b/quickshell/dot-config/quickshell/Time.qml
new file mode 100644
index 0000000..7e75e87
--- /dev/null
+++ b/quickshell/dot-config/quickshell/Time.qml
@@ -0,0 +1,16 @@
+pragma Singleton
+
+import Quickshell
+import QtQuick
+
+Singleton {
+ id: root
+ readonly property string time: {
+ Qt.formatDateTime(clock.date, "ddd MMM d hh:mm:ss")
+ }
+
+ SystemClock {
+ id: clock
+ precision: SystemClock.Seconds
+ }
+}
diff --git a/quickshell/dot-config/quickshell/Tray.qml b/quickshell/dot-config/quickshell/Tray.qml
new file mode 100644
index 0000000..03a70e3
--- /dev/null
+++ b/quickshell/dot-config/quickshell/Tray.qml
@@ -0,0 +1,196 @@
+import QtQuick
+import QtQuick.Layouts
+import Quickshell
+import Quickshell.Widgets
+import Quickshell.Services.SystemTray
+
+
+Row {
+ id: root
+ spacing: Globals.controls.spacing
+
+ Repeater {
+ model: SystemTray.items.values
+ delegate: Item {
+ id: systemTrayItem
+ required property var modelData
+
+ width: Globals.controls.iconSize
+ height: width
+
+ IconImage {
+ implicitSize: Globals.controls.iconSize
+ source: Quickshell.iconPath(modelData.id.toLowerCase(), true) || modelData.icon
+ }
+
+ MouseArea {
+ anchors.centerIn: parent
+ width: parent.width +4
+ height: width
+ hoverEnabled: true
+ acceptedButtons: Qt.AllButtons
+ // show/hide tooltip
+ onEntered: if (modelData.title) tooltipTimer.restart();
+ onExited: if (modelData.title) {
+ tooltipTimer.stop();
+ tooltip.isShown = false;
+ }
+ onClicked: (mouse) => {
+ switch (mouse.button) {
+ // toggle menu
+ case Qt.RightButton:
+ if (modelData.hasMenu) popout.toggle();
+ break;
+ // trigger system tray item action
+ case Qt.LeftButton:
+ modelData.activate();
+ break;
+ // trigger system tray item secondary action
+ case Qt.MiddleButton:
+ modelData.secondaryActivate();
+ break;
+ }
+ }
+ // trigger system tray scroll action
+ onWheel: (wheel) => {
+ modelData.scroll(wheel.angleDelta.y /120, false);
+ }
+
+ // tooltip
+ QsTooltip { id: tooltip
+ anchor: parent
+ content: Text {
+ text: modelData.title
+ color: Globals.colors.fg
+ font: Globals.font.regular
+ }
+
+ Timer { id: tooltipTimer
+ running: false
+ interval: 1500
+ onTriggered: parent.isShown = true;
+ }
+ }
+ }
+
+ QsMenuAnchor { id: menuAnchor
+ function toggle() {
+ if (menuAnchor.visible) menuAnchor.close();
+ else menuAnchor.open();
+ }
+
+ function refresh() {
+ menuAnchor.open();
+ menuAnchor.close();
+ }
+
+ anchor.item: systemTrayItem
+ menu: modelData.menu
+ }
+
+ QsMenuOpener { id: menuOpener
+ readonly property bool hasIcon: children.values.some(e => e.icon)
+ readonly property bool hasButton: children.values.some(e => e.buttonType !== QsMenuButtonType.None)
+
+ menu: modelData.menu
+ }
+
+ Popout {
+ id: popout
+ anchor: systemTrayItem
+ body: ColumnLayout { id: bodyLayout
+ // top padding element
+ Item { Layout.preferredHeight: 1; }
+
+ // menu entries
+ Repeater {
+ model: menuOpener.children.values.filter(e => !e.hasChildren).filter((e, i, arr) => {
+ const prev = arr[i - 1];
+ const next = arr[i + 1];
+
+ if ((i === 0 || i === arr.length - 1) && e.isSeparator) return false;
+ if (e.isSeparator && ((prev && prev.isSeparator) || next == null)) return false;
+
+ return true;
+ });
+ delegate: QsButton { id: menuEntry
+ required property var modelData
+ required property int index
+
+ // if can interact with meny entry
+ readonly property bool interactive: modelData.enabled && !modelData.isSeparator
+ // seperator item
+ readonly property Item separatorEntry: Margin { anchors.fill: parent; opacity: 0.4; }
+ // regular menu entry item
+ readonly property Item textMenuEntry: RowLayout {
+ anchors.fill: parent
+ spacing: Globals.controls.spacing
+
+ // left padding element
+ Item { Layout.preferredWidth: 1; }
+
+ // button
+ Item {
+ visible: menuOpener.hasButton
+ width: Globals.controls.iconSize
+ height: width
+
+ QsStateButton {
+ visible: type
+ type: modelData.buttonType
+ checkState: modelData.checkState
+ }
+ }
+
+ // icon
+ Item {
+ visible: menuOpener.hasIcon
+ width: Globals.controls.iconSize
+ height: width
+
+ IconImage {
+ visible: source
+ implicitSize: Globals.controls.iconSize
+ source: modelData.icon
+ }
+ }
+
+ // text
+ Text {
+ Layout.fillWidth: true
+ text: modelData.text
+ color: modelData.hasChildren? "red" : Globals.colors.fg
+ font: Globals.font.regular
+ }
+
+ // right padding element
+ Item { Layout.preferredWidth: 1; }
+ }
+
+ Layout.fillWidth: true
+ Layout.minimumWidth: content.implicitWidth
+ shade: false
+ anim: interactive
+ highlight: interactive
+ // update button
+ onPressed: if (interactive && modelData.buttonType !== QsMenuButtonType.None) {
+ modelData.triggered();
+ menuAnchor.refresh();
+ }
+ // trigger menu entry action
+ onClicked: if (interactive && modelData.buttonType === QsMenuButtonType.None) {
+ modelData.triggered();
+ menuAnchor.refresh();
+ popout.close();
+ }
+ content: modelData.isSeparator? separatorEntry : textMenuEntry
+ }
+ }
+
+ // bottom padding element
+ Item { Layout.preferredHeight: 1; }
+ }
+ }
+ }
+ }
+}
diff --git a/quickshell/dot-config/quickshell/services/Popout.qml b/quickshell/dot-config/quickshell/services/Popout.qml
new file mode 100644
index 0000000..9118fe7
--- /dev/null
+++ b/quickshell/dot-config/quickshell/services/Popout.qml
@@ -0,0 +1,51 @@
+pragma Singleton
+
+import QtQuick
+import QtQuick.Controls
+import Quickshell
+import Quickshell.Wayland
+
+Singleton { id: root
+ property var whosOpen: null
+
+ function clear() {
+ if (root.whosOpen) {
+ root.whosOpen = null;
+ root.open();
+ }
+ }
+
+ signal open()
+ signal accepted()
+ signal keyPressed(KeyEvent event)
+
+ Loader {
+ active: whosOpen
+ sourceComponent: PanelWindow {
+ anchors {
+ left: true
+ right: true
+ top: true
+ bottom: true
+ }
+ WlrLayershell.keyboardFocus: WlrKeyboardFocus.Exclusive
+ WlrLayershell.layer: WlrLayer.Top
+ color: "transparent"
+
+ TextInput { id: inputField
+ focus: true
+ onAccepted: root.accepted()
+ color: "transparent"
+ Keys.onPressed: (event) => {
+ if (event.key === Qt.Key_Escape) root.clear();
+ else root.keyPressed(event)
+ }
+ }
+
+ MouseArea {
+ anchors.fill: parent
+ onClicked: root.clear();
+ }
+ }
+ }
+}
diff --git a/quickshell/dot-config/quickshell/shell.qml b/quickshell/dot-config/quickshell/shell.qml
new file mode 100644
index 0000000..e59b2c6
--- /dev/null
+++ b/quickshell/dot-config/quickshell/shell.qml
@@ -0,0 +1,7 @@
+//@ pragma UseQApplication
+
+import Quickshell
+
+Scope {
+ Bar {}
+}
diff --git a/quickshell/dot-config/systemd/user/quickshell.service b/quickshell/dot-config/systemd/user/quickshell.service
new file mode 100644
index 0000000..b174440
--- /dev/null
+++ b/quickshell/dot-config/systemd/user/quickshell.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=QuickShell for the bar
+PartOf=graphical-session.target
+After=graphical-session.target
+
+[Service]
+Type=exec
+ExecStart=/usr/bin/qs
+Restart=on-failure
+
+[Install]
+WantedBy=graphical-session.target
diff --git a/qute/dot-config/qutebrowser/config.py b/qute/dot-config/qutebrowser/config.py
index 0ec21a5..714fab2 100644
--- a/qute/dot-config/qutebrowser/config.py
+++ b/qute/dot-config/qutebrowser/config.py
@@ -1,6 +1,3 @@
-c = c
-config = config
-
c.url.searchengines = {
"DEFAULT": "https://duckduckgo.com/?q={}",
"!aw": "https://wiki.archlinux.org/?search={}",
@@ -56,7 +53,12 @@ config.bind(
config.bind(
",M",
- "hint links spawn spawn mpv {hint-url}",
+ "hint links spawn mpv {hint-url}",
+)
+
+config.bind(
+ ",d",
+ "config-cycle -t -p colors.webpage.bg '#282828' white ;; config-cycle -t -p colors.webpage.darkmode.enabled True False",
)
c.editor.command = ["alacritty", "-e", "nvim", "{file}", "-c", "normal {line}G{column}"]
@@ -64,16 +66,22 @@ c.editor.command = ["alacritty", "-e", "nvim", "{file}", "-c", "normal {line}G{c
c.colors.statusbar.private.bg = "#CF87E8"
c.colors.webpage.preferred_color_scheme = "dark"
+
# c.colors.webpage.darkmode.enabled = True
-# c.colors.webpage.darkmode.algorithm = "lightness-cielab"
-# c.colors.webpage.darkmode.threshold.foreground = 150
-# c.colors.webpage.darkmode.threshold.background = 100
-# c.colors.webpage.darkmode.policy.images = "smart"
+c.colors.webpage.darkmode.algorithm = "lightness-cielab"
+c.colors.webpage.darkmode.threshold.foreground = 150
+c.colors.webpage.darkmode.threshold.background = 100
+c.colors.webpage.darkmode.policy.images = "smart"
+
+with config.pattern("*://www.overleaf.com/project/*") as p:
+ p.input.mode_override = "passthrough"
-# config.set("colors.webpage.bg", "#282828")
+# To make Slack sign-in work:
+with config.pattern("*://*.slack.com/*") as p:
+ p.content.unknown_url_scheme_policy = "allow-all"
-# NOTE: to make Slack sign-in work:
-c.content.unknown_url_scheme_policy = "allow-all"
+with config.pattern("*://accounts.google.com/*") as p:
+ p.content.headers.user_agent = "Mozilla/5.0 ({os_info}; rv:131.0) Gecko/20100101 Firefox/131.0"
c.content.blocking.enabled = True
c.content.blocking.method = "both"
diff --git a/qute/dot-config/qutebrowser/quickmarks b/qute/dot-config/qutebrowser/quickmarks
index f1aabfe..3699cfc 100644
--- a/qute/dot-config/qutebrowser/quickmarks
+++ b/qute/dot-config/qutebrowser/quickmarks
@@ -11,3 +11,5 @@ typography https://practicaltypography.com/
nice font https://lambdaland.org/posts/2025-06-24_reading_blogs/
nice https://henry.codes/writing/a-website-to-destroy-all-websites/
reboot https://takes.jamesomalley.co.uk/p/this-might-be-oversharing
+qute https://gitlab.com/jgkamat/dotfiles/-/tree/master/qutebrowser/.config/qutebrowser
+dcli https://gitlab.com/theblackdon/dcli/-/blob/main/CHEAT-SHEET.md?ref_type=heads
diff --git a/scripts/dot-local/bin/alanvim b/scripts/dot-local/bin/alanvim
new file mode 100755
index 0000000..5262939
--- /dev/null
+++ b/scripts/dot-local/bin/alanvim
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+exec runapp -- alacritty -e nvim "$@"
diff --git a/scripts/dot-local/bin/aligncol b/scripts/dot-local/bin/aligncol
new file mode 100755
index 0000000..5e7e375
--- /dev/null
+++ b/scripts/dot-local/bin/aligncol
@@ -0,0 +1,41 @@
+#!/usr/bin/env bash
+
+set -euo pipefail
+
+usage() {
+ echo "Usage: $0 [-s specialchar] [-h] colmark [colmark ...]"
+}
+
+sflag=
+sep=
+
+while getopts "hs:" opt; do
+ case $opt in
+ s)
+ sflag=1
+ sep="$OPTARG"
+ ;;
+ h)
+ usage
+ exit 0
+ ;;
+ ?)
+ usage
+ exit 1
+ ;;
+ esac
+done
+if [ -z "$sflag" ]; then
+ sep='%'
+fi
+shift $((OPTIND - 1))
+
+sep_escaped=$(printf '%s\n' "$sep" | sed 's/[\/&]/\\&/g')
+
+sed_args=()
+for arg in "$@"; do
+ arg_escaped=$(printf '%s\n' "$arg" | sed 's/[\/&]/\\&/g')
+ sed_args+=(-e "s/$arg_escaped/$sep_escaped&/g")
+done
+
+sed "${sed_args[@]}" | column -t -s"$sep_escaped" -o' '
diff --git a/scripts/dot-local/bin/batctl b/scripts/dot-local/bin/batctl
new file mode 100755
index 0000000..d6fcaa1
--- /dev/null
+++ b/scripts/dot-local/bin/batctl
@@ -0,0 +1,61 @@
+#!/usr/bin/env bash
+
+set -eo pipefail
+
+DEFAULT_START_THRESHOLD=75
+DEFAULT_STOP_THRESHOLD=85
+
+BAT_DIR=/sys/class/power_supply/BAT0
+START_FILE="$BAT_DIR/charge_start_threshold"
+STOP_FILE="$BAT_DIR/charge_stop_threshold"
+
+setcharge()
+{
+ start=$1
+ stop=$2
+ cur_start=$(cat "$START_FILE")
+ cur_stop=$(cat "$STOP_FILE")
+
+ if ((cur_stop > stop)); then
+ echo "$start" | sudo tee "$START_FILE" >/dev/null
+ echo "$stop" | sudo tee "$STOP_FILE" >/dev/null
+ else
+ echo "$stop" | sudo tee "$STOP_FILE" >/dev/null
+ echo "$start" | sudo tee "$START_FILE" >/dev/null
+ fi
+ echo "Charging set:"
+ echo " start=$start"
+ echo " stop=$stop"
+}
+
+cmd=$1
+
+shift || true
+
+case "$cmd" in
+ show)
+ start=$(cat "$START_FILE")
+ stop=$(cat "$STOP_FILE")
+ echo "Current thresholds:"
+ echo " start=$start"
+ echo " stop=$stop"
+ ;;
+
+ set)
+ start=${1:-$DEFAULT_START_THRESHOLD}
+ stop=${2:-$DEFAULT_STOP_THRESHOLD}
+ setcharge "$start" "$stop"
+ ;;
+
+ fullcharge)
+ start=95
+ stop=100
+ echo "Fullcharge. Keep AC on!"
+ setcharge "$start" "$stop"
+ ;;
+
+ *)
+ echo "Usage: $0 {show|set [start=$DEFAULT_START_THRESHOLD] [stop=$DEFAULT_STOP_THRESHOLD]|fullcharge}" >&2
+ exit 1
+ ;;
+esac
diff --git a/scripts/dot-local/bin/dot-editorconfig b/scripts/dot-local/bin/dot-editorconfig
new file mode 100644
index 0000000..a882442
--- /dev/null
+++ b/scripts/dot-local/bin/dot-editorconfig
@@ -0,0 +1,7 @@
+root = true
+
+[*]
+end_of_line = lf
+insert_final_newline = true
+indent_style = space
+indent_size = 4
diff --git a/scripts/dot-local/bin/mailsync b/scripts/dot-local/bin/mailsync
new file mode 100755
index 0000000..8029444
--- /dev/null
+++ b/scripts/dot-local/bin/mailsync
@@ -0,0 +1,54 @@
+#!/usr/bin/env sh
+
+# Run only if not already running in other instance
+pgrep mbsync >/dev/null && {
+ echo "mbsync is already running."
+ exit
+}
+
+notify()
+{
+ notify-send --app-name="Mail" -- "$1" "$2"
+}
+
+# export GPG_TTY="$(tty)"
+# export DISPLAY=":0"
+# export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/"$(id -u)"/bus
+export MAILDIR="$XDG_DATA_HOME/mail"
+lastrun="$XDG_CACHE_HOME/.mailsynclastrun"
+# export PYTHONWARNINGS="ignore::UserWarning"
+
+# afew --move-mails --all
+mbsync -q mit
+
+new=$(find "$MAILDIR/mit/INBOX/new/" "$MAILDIR/mit/INBOX/cur/" -type f -newer "$lastrun" 2>/dev/null)
+newcount=$(echo "$new" | sed '/^\s*$/d' | wc -l)
+
+case 1 in
+ $((newcount > 5)))
+ echo "$newcount new mail for mit."
+ notify "New Mail!" "$newcount new mail(s)."
+ ;;
+ $((newcount > 0)))
+ echo "$newcount new mail for mit."
+ for file in $new; do
+ # Extract and decode subject and sender from mail.
+ subject=$(awk '/^Subject: / && ++n == 1,/^.*: / && ++i == 2' "$file" | head -n-1 |
+ perl -CS -MEncode -ne 'print decode("MIME-Header", $_)' |
+ sed 's/^Subject: //' | tr -d '\n\t')
+ from="$(sed -n "/^From:/ s|From: *|| p" "$file" |
+ perl -CS -MEncode -ne 'print decode("MIME-Header", $_)')"
+ from="${from% *}"
+ from="${from%\"}"
+ from="${from#\"}"
+ notify "$from:" "$subject"
+ done
+ ;;
+ *) echo "No new mail for mit." ;;
+esac
+
+# notmuch new
+# afew --tag --new
+
+#Create a touch file that indicates the time of the last run of mailsync
+touch "$lastrun"
diff --git a/scripts/dot-local/bin/print.sh b/scripts/dot-local/bin/print.sh
new file mode 100755
index 0000000..8e56519
--- /dev/null
+++ b/scripts/dot-local/bin/print.sh
@@ -0,0 +1,178 @@
+#!/usr/bin/env bash
+
+# Print Menu System
+# Interactive printer selection and options configuration
+
+set -euo pipefail
+
+TEMP_DIR="/tmp/rofi-print-$$"
+mkdir -p "$TEMP_DIR"
+
+trap 'rm -rf "$TEMP_DIR"' EXIT
+
+# Function to get list of printers
+get_printers() {
+ lpstat -p 2>/dev/null | awk '{print $2}' | sort
+}
+
+# Function to get printer options using lpoptions
+get_printer_options() {
+ local printer="$1"
+ lpoptions -p "$printer" -l 2>/dev/null || echo ""
+}
+
+# Function to parse option values
+parse_option_line() {
+ local line="$1"
+ local option_name=$(echo "$line" | cut -d'/' -f1 | tr -d ' ')
+ local values=$(echo "$line" | sed 's/^[^:]*: //')
+ echo "$option_name|$values"
+}
+
+# Function to get current default value
+get_default_value() {
+ local values="$1"
+ echo "$values" | grep -o '\*[^ ]*' | tr -d '*' || echo ""
+}
+
+# Function to get all available values
+get_available_values() {
+ local values="$1"
+ echo "$values" | tr ' ' '\n' | tr -d '*'
+}
+
+# Main script
+main() {
+ FILE="$1"
+
+ if [ ! -f "$FILE" ]; then
+ echo "File not provided or not found: $FILE" >&2
+ exit 1
+ fi
+
+ # Get available printers
+ PRINTERS=$(get_printers)
+ if [ -z "$PRINTERS" ]; then
+ echo "No printers found" >&2
+ exit 1
+ fi
+
+ # Select printer
+ PRINTER=$(echo "$PRINTERS" | fuzzel --dmenu -i -p "Select printer")
+ if [ -z "$PRINTER" ]; then
+ echo "No printer selected" >&2
+ exit 1
+ fi
+
+ # Get printer options
+ OPTIONS=$(get_printer_options "$PRINTER")
+
+ # Build lp command
+ LP_OPTS=()
+
+ # Process each option
+ declare -A selected_options
+
+ while IFS= read -r line; do
+ if [ -z "$line" ]; then continue; fi
+
+ # Parse option line
+ IFS='|' read -r opt_name values <<< "$(parse_option_line "$line")"
+
+ if [ -z "$opt_name" ] || [ -z "$values" ]; then continue; fi
+
+ # Get default and available values
+ default=$(get_default_value "$values")
+ available=$(get_available_values "$values")
+
+ # Create friendly names for common options
+ case "$opt_name" in
+ *Duplex*|*Sided*)
+ friendly_name="Duplex (Double-sided)"
+ ;;
+ *Staple*)
+ friendly_name="Stapling"
+ ;;
+ *MediaType*)
+ friendly_name="Paper Type"
+ ;;
+ *PageSize*|*media*)
+ friendly_name="Paper Size"
+ ;;
+ *OutputBin*)
+ friendly_name="Output Tray"
+ ;;
+ *Collate*)
+ friendly_name="Collate"
+ ;;
+ *ColorModel*|*Color*)
+ friendly_name="Color Mode"
+ ;;
+ *Resolution*)
+ friendly_name="Print Quality"
+ ;;
+ *)
+ friendly_name="$opt_name"
+ ;;
+ esac
+
+ # Present options to user with default highlighted
+ available_with_default=$(echo "$available" | sed "s/^${default}$/${default} (default)/")
+
+ selected=$(echo "$available_with_default" | fuzzel --dmenu -i -p "$friendly_name")
+
+ if [ -n "$selected" ]; then
+ # Remove " (default)" suffix if present
+ selected=$(echo "$selected" | sed 's/ (default)$//')
+
+ # Only add if different from default
+ if [ "$selected" != "$default" ]; then
+ selected_options["$opt_name"]="$selected"
+ fi
+ fi
+
+ done <<< "$OPTIONS"
+
+ # Ask for number of copies
+ COPIES=$(echo -e "1\n2\n3\n4\n5\n10\n20" | fuzzel --dmenu -i -p "Number of copies")
+ COPIES=${COPIES:-1}
+
+ # Build final lp command options
+ for opt in "${!selected_options[@]}"; do
+ LP_OPTS+=("-o" "${opt}=${selected_options[$opt]}")
+ done
+
+ if [ "$COPIES" -gt 1 ]; then
+ LP_OPTS+=("-n" "$COPIES")
+ fi
+
+ # Confirmation
+ OPTS_SUMMARY="Printer: $PRINTER\nFile: $(basename "$FILE")\nCopies: $COPIES"
+ if [ ${#selected_options[@]} -gt 0 ]; then
+ OPTS_SUMMARY+="\n\nOptions:"
+ for opt in "${!selected_options[@]}"; do
+ OPTS_SUMMARY+="\n $opt = ${selected_options[$opt]}"
+ done
+ fi
+
+ echo lp -d "$PRINTER" "${LP_OPTS[@]}" "$FILE" 2>"$TEMP_DIR/error.log"
+
+ echo "$OPTS_SUMMARY"
+ CONFIRM=$(echo -e "Print\nCancel" | fuzzel --dmenu -i -p "Confirm print job")
+
+ if [ "$CONFIRM" = "Print" ]; then
+ # Execute print command
+ if lp -d "$PRINTER" "${LP_OPTS[@]}" "$FILE" 2>"$TEMP_DIR/error.log"; then
+ notify-send "Print.sh" "Print job submitted successfully"
+ else
+ ERROR=$(cat "$TEMP_DIR/error.log")
+ echo "Print failed:\n$ERROR" >&2
+ exit 1
+ fi
+ else
+ echo "Print cancelled"
+ exit 0
+ fi
+}
+
+main "$@"
diff --git a/scripts/dot-local/bin/viml b/scripts/dot-local/bin/viml
new file mode 100755
index 0000000..eef5b0b
--- /dev/null
+++ b/scripts/dot-local/bin/viml
@@ -0,0 +1,2 @@
+#!/bin/sh
+VIM_LIGHT=1 /usr/bin/nvim "$@"
diff --git a/wayland-basics/dot-config/environment.d/wayland.conf b/wayland-basics/dot-config/environment.d/wayland.conf
new file mode 100644
index 0000000..eca504e
--- /dev/null
+++ b/wayland-basics/dot-config/environment.d/wayland.conf
@@ -0,0 +1,15 @@
+# graphical apps
+BROWSER=qutebrowser
+TERMINAL=alacritty
+
+# Wayland configurati
+QT_QPA_PLATFORM=wayland
+QT_QPA_PLATFORMTHEME=qt5ct
+SDL_VIDEODRIVER=wayland
+SDL_VIDEO_DRIVER=wayland
+OZONE_PLATFORM=wayland
+ELECTRON_OZONE_PLATFORM_HINT=wayland
+
+# disable accessibility
+export NO_AT_BRIDGE=1
+export GTK_A11Y=none
diff --git a/wayland-basics/dot-config/fuzzel/fuzzel.ini b/wayland-basics/dot-config/fuzzel/fuzzel.ini
new file mode 100644
index 0000000..4659b80
--- /dev/null
+++ b/wayland-basics/dot-config/fuzzel/fuzzel.ini
@@ -0,0 +1,131 @@
+# output=<not set>
+# font=monospace
+# dpi-aware=auto
+# use-bold=no
+# prompt="> "
+# placeholder=
+# icon-theme=default
+# icons-enabled=yes
+# hide-before-typing=no
+# fields=filename,name,generic
+# password-character=*
+# filter-desktop=no
+# match-mode=fzf
+# sort-result=yes
+# match-counter=no
+# delayed-filter-ms=300
+# delayed-filter-limit=20000
+# show-actions=no
+terminal=runapp -o -- alacritty -e
+launch-prefix=runapp -o
+# list-executables-in-path=no
+
+# anchor=center
+# x-margin=0
+# y-margin=0
+# lines=15
+# minimal-lines=no
+# width=30
+# tabs=8
+# horizontal-pad=40
+# vertical-pad=8
+# inner-pad=0
+
+# scaling-filter=box
+# image-size-ratio=0.5
+
+# gamma-correct-blending=no
+# line-height=<use font metrics>
+# letter-spacing=0
+
+# layer=overlay
+# keyboard-focus=exclusive
+# exit-on-keyboard-focus-loss=yes
+
+# cache=<not set>
+
+# render-workers=<number of logical CPUs>
+# match-workers=<number of logical CPUs>
+
+# enable-mouse=yes
+
+[colors]
+background=282a36dd
+text=f8f8f2ff
+match=8be9fdff
+selection-match=8be9fdff
+selection=44475add
+selection-text=f8f8f2ff
+border=bd93f9ff
+# background=fdf6e3ff
+# text=657b83ff
+# prompt=586e75ff
+# placeholder=93a1a1ff
+# input=657b83ff
+# match=cb4b16ff
+# selection=eee8d5ff
+# selection-text=586e75ff
+# selection-match=cb4b16ff
+# counter=93a1a1ff
+# border=002b36ff
+
+[border]
+width=2
+radius=0
+
+[dmenu]
+# mode=text # text|index
+# exit-immediately-if-empty=no
+
+[key-bindings]
+# cancel=Escape Control+g Control+c Control+bracketleft
+# execute=Return KP_Enter Control+y
+# execute-or-next=Tab
+# execute-input=Shift+Return Shift+KP_Enter
+# 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-line=Control+Shift+BackSpace
+# delete-prev=BackSpace Control+h
+# delete-prev-word=Mod1+BackSpace Control+BackSpace Control+w
+# delete-line-backward=Control+u
+# delete-next=Delete KP_Delete Control+d
+# delete-next-word=Mod1+d Control+Delete Control+KP_Delete
+# delete-line-forward=Control+k
+# prev=Up Control+p
+# prev-with-wrap=ISO_Left_Tab
+# prev-page=Page_Up KP_Page_Up
+# next=Down Control+n
+# next-with-wrap=none
+# next-page=Page_Down KP_Page_Down
+# expunge=Shift+Delete
+# clipboard-paste=Control+v XF86Paste
+# primary-paste=Shift+Insert Shift+KP_Insert
+
+# custom-N: *dmenu mode only*. Like execute, but with a non-zero
+# exit-code; custom-1 exits with code 10, custom-2 with 11, custom-3
+# with 12, and so on.
+
+# custom-1=Mod1+1
+# custom-2=Mod1+2
+# custom-3=Mod1+3
+# custom-4=Mod1+4
+# custom-5=Mod1+5
+# custom-6=Mod1+6
+# custom-7=Mod1+7
+# custom-8=Mod1+8
+# custom-9=Mod1+9
+# custom-10=Mod1+0
+# custom-11=Mod1+exclam
+# custom-12=Mod1+at
+# custom-13=Mod1+numbersign
+# custom-14=Mod1+dollar
+# custom-15=Mod1+percent
+# custom-16=Mod1+dead_circumflex
+# custom-17=Mod1+ampersand
+# custom-18=Mod1+asterix
+# custom-19=Mod1+parentleft
+# vim: commentstring=#\ %s
diff --git a/wayland-basics/dot-config/kanshi/config b/wayland-basics/dot-config/kanshi/config
index 8ca67a1..2143ac6 100644
--- a/wayland-basics/dot-config/kanshi/config
+++ b/wayland-basics/dot-config/kanshi/config
@@ -7,15 +7,15 @@ output "Lenovo Group Limited M15 V30ANMLM" alias $lenmon
profile work {
output $laptop disable
output $workmon mode 2560x1440 position 0,0
- exec ~/.config/kanshi/reload.sh
+# exec ~/.config/kanshi/reload.sh
}
profile home_double {
output $lenmon mode 1920x1080@60 position 0,0
- output $laptop enable mode 2880x1800@120 position 1920,0 scale 2
+ output $laptop enable mode 2880x1800@120 position 1920,0 scale 1.75
}
profile home {
- output $laptop enable mode 2880x1800@120 position 0,0 scale 2
- exec ~/.config/kanshi/reload.sh
+ output $laptop enable mode 2880x1800@120 position 0,0 scale 1.75
+# exec ~/.config/kanshi/reload.sh
}
diff --git a/wayland-basics/dot-config/mako/config b/wayland-basics/dot-config/mako/config
index 9339e49..f5d0ed5 100644
--- a/wayland-basics/dot-config/mako/config
+++ b/wayland-basics/dot-config/mako/config
@@ -29,10 +29,10 @@ invisible=true
[mode=do-not-disturb app-name=notify-send]
invisible=false
-[app-name=NeoMutt]
-default-timeout=20000
+[app-name=Mail]
+default-timeout=10000
on-notify=exec mpv /usr/share/sounds/freedesktop/stereo/message.oga
-# on-button-left=exec setsid app2unit-term -e neomutt_wrapper
+on-button-left=exec runapp -o -- alacritty -e aerc
[urgency=critical]
default-timeout=0
diff --git a/wayland-basics/dot-config/mpv/mpv.conf b/wayland-basics/dot-config/mpv/mpv.conf
index ebfb505..14c6e81 100644
--- a/wayland-basics/dot-config/mpv/mpv.conf
+++ b/wayland-basics/dot-config/mpv/mpv.conf
@@ -1 +1,3 @@
-vo=gpu
+vo=gpu-next
+hwdec=yes
+ytdl-format="bestvideo[height<=?1800]+bestaudio/best"
diff --git a/wayland-basics/dot-config/swaylock/config b/wayland-basics/dot-config/swaylock/config
new file mode 100644
index 0000000..3be82fa
--- /dev/null
+++ b/wayland-basics/dot-config/swaylock/config
@@ -0,0 +1,4 @@
+ignore-empty-password
+show-failed-attempts
+color=000000
+font=monospace
diff --git a/wayland-basics/dot-config/systemd/user/kanshi.service b/wayland-basics/dot-config/systemd/user/kanshi.service
index dd6227c..4554384 100644
--- a/wayland-basics/dot-config/systemd/user/kanshi.service
+++ b/wayland-basics/dot-config/systemd/user/kanshi.service
@@ -1,15 +1,13 @@
[Unit]
-PartOf=graphical-session.target
Description=Kanshi Wayland output manager
+PartOf=graphical-session.target
After=graphical-session.target
-Requisite=graphical-session.target
[Service]
Type=exec
ExecStart=/usr/bin/kanshi
ExecReload=kill -SIGHUP $MAINPID
Restart=on-failure
-Slice=background-graphical.slice
[Install]
WantedBy=graphical-session.target
diff --git a/wayland-basics/dot-config/systemd/user/soteria.service b/wayland-basics/dot-config/systemd/user/soteria.service
new file mode 100644
index 0000000..61961ef
--- /dev/null
+++ b/wayland-basics/dot-config/systemd/user/soteria.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=GTK-based polkit authentication agent
+PartOf=graphical-session.target
+After=graphical-session.target
+
+[Service]
+Type=exec
+ExecStart=/usr/lib/soteria-polkit/soteria
+Restart=on-failure
+
+[Install]
+WantedBy=graphical-session.target
diff --git a/wayland-basics/dot-config/systemd/user/swaybg.service b/wayland-basics/dot-config/systemd/user/swaybg.service
index d8efd5b..d2e891b 100644
--- a/wayland-basics/dot-config/systemd/user/swaybg.service
+++ b/wayland-basics/dot-config/systemd/user/swaybg.service
@@ -1,15 +1,12 @@
[Unit]
-PartOf=graphical-session.target
Description=Swaybg wallpaper utility
+PartOf=graphical-session.target
After=graphical-session.target
-Requisite=graphical-session.target
[Service]
Type=exec
-ExecStart=/usr/bin/swaybg -m fill -i /home/moreka/Pictures/wallpapers/dark_mode_windows_xp_background_wallpaper.png
-; ExecStart=/usr/bin/swaybg -c '#002B36'
+ExecStart=/usr/bin/swaybg -m fill -i /home/moreka/Pictures/wallpapers/great-wave-of-kanagawa-gruvbox.png
Restart=on-failure
-Slice=background-graphical.slice
[Install]
WantedBy=graphical-session.target
diff --git a/wayland-basics/dot-config/systemd/user/swayidle.service b/wayland-basics/dot-config/systemd/user/swayidle.service
new file mode 100644
index 0000000..9160750
--- /dev/null
+++ b/wayland-basics/dot-config/systemd/user/swayidle.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=swayidle for setting timeouts for idling
+PartOf=graphical-session.target
+After=graphical-session.target
+
+[Service]
+Type=exec
+ExecStart=/usr/bin/swayidle -w timeout 601 'niri msg action power-off-monitors' timeout 600 'swaylock -f' before-sleep 'swaylock -f'
+Restart=on-failure
+
+[Install]
+WantedBy=graphical-session.target
diff --git a/wayland-basics/dot-config/systemd/user/swayosd-server.service b/wayland-basics/dot-config/systemd/user/swayosd-server.service
index 21934eb..a43dd08 100644
--- a/wayland-basics/dot-config/systemd/user/swayosd-server.service
+++ b/wayland-basics/dot-config/systemd/user/swayosd-server.service
@@ -1,14 +1,12 @@
[Unit]
-PartOf=graphical-session.target
Description=SwayOSD server
After=graphical-session.target
-Requisite=graphical-session.target
+PartOf=graphical-session.target
[Service]
Type=exec
ExecStart=/usr/bin/swayosd-server
Restart=on-failure
-Slice=background-graphical.slice
[Install]
WantedBy=graphical-session.target
diff --git a/wayland-basics/dot-config/systemd/user/wl-clip-persist.service b/wayland-basics/dot-config/systemd/user/wl-clip-persist.service
index f0f55a6..57c6a6c 100644
--- a/wayland-basics/dot-config/systemd/user/wl-clip-persist.service
+++ b/wayland-basics/dot-config/systemd/user/wl-clip-persist.service
@@ -1,14 +1,13 @@
[Unit]
-PartOf=graphical-session.target
Description=Clipboard history manager for wayland
+Documentation=https://github.com/Linus789/wl-clip-persist
After=graphical-session.target
-Requisite=graphical-session.target
+PartOf=graphical-session.target
[Service]
Type=exec
ExecStart=/usr/bin/wl-clip-persist --clipboard regular --disable-timestamps
Restart=on-failure
-Slice=background-graphical.slice
[Install]
WantedBy=graphical-session.target
diff --git a/wayland-basics/dot-local/share/applications/browser.desktop b/wayland-basics/dot-local/share/applications/browser.desktop
deleted file mode 120000
index 38ab478..0000000
--- a/wayland-basics/dot-local/share/applications/browser.desktop
+++ /dev/null
@@ -1 +0,0 @@
-/usr/share/applications/org.qutebrowser.qutebrowser.desktop \ No newline at end of file
diff --git a/wayland-basics/dot-local/share/applications/mimeinfo.cache b/wayland-basics/dot-local/share/applications/mimeinfo.cache
deleted file mode 100644
index 4c6a9fa..0000000
--- a/wayland-basics/dot-local/share/applications/mimeinfo.cache
+++ /dev/null
@@ -1,28 +0,0 @@
-[MIME Cache]
-application/rdf+xml=browser.desktop;
-application/x-shellscript=nvim.desktop;text.desktop;
-application/xhtml+xml=browser.desktop;
-application/xml=browser.desktop;
-image/gif=browser.desktop;
-image/jpeg=browser.desktop;
-image/png=browser.desktop;
-image/webp=browser.desktop;
-text/english=nvim.desktop;text.desktop;
-text/html=browser.desktop;
-text/plain=nvim.desktop;text.desktop;
-text/x-c=nvim.desktop;text.desktop;
-text/x-c++=nvim.desktop;text.desktop;
-text/x-c++hdr=nvim.desktop;text.desktop;
-text/x-c++src=nvim.desktop;text.desktop;
-text/x-chdr=nvim.desktop;text.desktop;
-text/x-csrc=nvim.desktop;text.desktop;
-text/x-java=nvim.desktop;text.desktop;
-text/x-makefile=nvim.desktop;text.desktop;
-text/x-moc=nvim.desktop;text.desktop;
-text/x-pascal=nvim.desktop;text.desktop;
-text/x-tcl=nvim.desktop;text.desktop;
-text/x-tex=nvim.desktop;text.desktop;
-text/xml=browser.desktop;
-x-scheme-handler/http=browser.desktop;
-x-scheme-handler/https=browser.desktop;
-x-scheme-handler/qute=browser.desktop;
diff --git a/wayland-basics/dot-local/share/applications/nvim.desktop b/wayland-basics/dot-local/share/applications/nvim.desktop
index 27fadab..5da6b49 100755
--- a/wayland-basics/dot-local/share/applications/nvim.desktop
+++ b/wayland-basics/dot-local/share/applications/nvim.desktop
@@ -2,7 +2,7 @@
Name=Neovim
GenericName=Text Editor
Comment=Edit text files
-Exec=sh -c "alacritty --class=nvim --title=nvim -- nvim %F"
+Exec=sh -c "alacritty -e nvim %F"
Terminal=false
Type=Application
Keywords=Text;editor;