diff --git a/.bash_profile b/.bash_profile index 1c979fa..c9f37f4 100644 --- a/.bash_profile +++ b/.bash_profile @@ -32,6 +32,6 @@ if [ -d "$HOME/.local/bin" ] ; then fi if [ -z "$WAYLAND_DISPLAY" ] && [ "$XDG_VTNR" = 1 ]; then - exec sway --unsupported-gpu + exec sway --unsupported-gpu > ~/.sway.log 2>&1 fi diff --git a/.config/kak/kakrc b/.config/kak/kakrc index 10ab1a3..0f704de 100644 --- a/.config/kak/kakrc +++ b/.config/kak/kakrc @@ -20,19 +20,22 @@ hook global InsertChar j %{ try %{ exec -draft hH jj d exec -with-hooks }} -hook global RegisterModified '"' %{ nop %reg{dquote} %sh{ - printf %s "$kak_main_reg_dquote" | wl-copy > /dev/null 2>&1 & +evaluate-commands %sh{ + if [ -n "${WAYLAND_DISPLAY:-}" ] && command -v wl-copy >/dev/null 2>&1 && command -v wl-paste >/dev/null 2>&1; then + printf %s " +hook global RegisterModified '\"' %{ nop %reg{dquote} %sh{ + printf %s \"\$kak_main_reg_dquote\" | wl-copy > /dev/null 2>&1 & }} define-command -hidden paste-system-after %{ - evaluate-commands -save-regs '"' %{ + evaluate-commands -save-regs '\"' %{ set-register dquote %sh{ wl-paste --no-newline 2>/dev/null } execute-keys p } } define-command -hidden paste-system-before %{ - evaluate-commands -save-regs '"' %{ + evaluate-commands -save-regs '\"' %{ set-register dquote %sh{ wl-paste --no-newline 2>/dev/null } execute-keys P } @@ -40,5 +43,8 @@ define-command -hidden paste-system-before %{ map global normal p ': paste-system-after' map global normal P ': paste-system-before' +" + fi +} add-highlighter global/ number-lines diff --git a/.config/sublime_merge/Preferences.sublime-settings b/.config/sublime-merge/Packages/User/Preferences.sublime-settings similarity index 68% rename from .config/sublime_merge/Preferences.sublime-settings rename to .config/sublime-merge/Packages/User/Preferences.sublime-settings index 6e3bcd7..78c8cc0 100644 --- a/.config/sublime_merge/Preferences.sublime-settings +++ b/.config/sublime-merge/Packages/User/Preferences.sublime-settings @@ -1,5 +1,5 @@ { - "theme": "Merge Dark.sublime-theme", + /*"theme": "Merge Dark.sublime-theme",*/ "side_bar_layout": "tabs", "diff_algorithm": "match_git", "visible_carriage_returns_at_eol": true, diff --git a/.config/sublime-text/Packages/User/Default (Linux).sublime-keymap b/.config/sublime-text/Packages/User/Default (Linux).sublime-keymap new file mode 100644 index 0000000..462bd66 --- /dev/null +++ b/.config/sublime-text/Packages/User/Default (Linux).sublime-keymap @@ -0,0 +1,28 @@ +[ + { "keys": ["ctrl+q"], "command": "goto_definition" }, + { "keys": ["alt+q"], "command": "jump_back" }, + + { "keys": ["ctrl+e"], "command": "next_result" }, + { "keys": ["alt+e"], "command": "prev_result" }, + + { "keys": ["ctrl+up"], "command": "move", "args": {"by": "stops", "empty_line": true, "forward": false} }, + { "keys": ["ctrl+down"], "command": "move", "args": {"by": "stops", "empty_line": true, "forward": true} }, + { "keys": ["ctrl+shift+up"], "command": "move", "args": {"by": "stops", "empty_line": true, "forward": false, "extend": true} }, + { "keys": ["ctrl+shift+down"], "command": "move", "args": {"by": "stops", "empty_line": true, "forward": true, "extend": true} }, + + { "keys": ["alt+up"], "command": "swap_line_up" }, + { "keys": ["alt+down"], "command": "swap_line_down" }, + { "keys": ["alt+left"], "command": "jump_back" }, + { "keys": ["alt+right"], "command": "jump_forward" }, + + { "keys": ["alt+shift+up"], "command": "select_lines", "args": {"forward": false} }, + { "keys": ["alt+shift+down"], "command": "select_lines", "args": {"forward": true} }, + { "keys": ["ctrl+alt+down"], "command": "duplicate_line" }, + { "keys": ["ctrl+alt+up"], "command": "duplicate_line" }, + + + { "keys": ["ctrl+shift+l"], "command": "split_selection_into_lines" }, + { "keys": ["ctrl+r"], "command": "goto_symbol_in_project" }, + { "keys": ["ctrl+m"], "command": "toggle_record_macro" }, + { "keys": ["alt+m"], "command": "run_macro" }, +] diff --git a/.config/sublime_text/Default (Windows).sublime-keymap b/.config/sublime-text/Packages/User/Default (Windows).sublime-keymap similarity index 100% rename from .config/sublime_text/Default (Windows).sublime-keymap rename to .config/sublime-text/Packages/User/Default (Windows).sublime-keymap diff --git a/.config/sublime-text/Packages/User/Package Control.sublime-settings b/.config/sublime-text/Packages/User/Package Control.sublime-settings new file mode 100644 index 0000000..27be2d7 --- /dev/null +++ b/.config/sublime-text/Packages/User/Package Control.sublime-settings @@ -0,0 +1,13 @@ +{ + "bootstrapped": true, + "in_process_packages": + [ + ], + "installed_packages": + [ + "A File Icon", + "ayu", + "gruvbox", + "Package Control", + ], +} diff --git a/.config/sublime-text/Packages/User/Package Control.user-ca-bundle b/.config/sublime-text/Packages/User/Package Control.user-ca-bundle new file mode 100644 index 0000000..e69de29 diff --git a/.config/sublime_text/Preferences.sublime-settings b/.config/sublime-text/Packages/User/Preferences.sublime-settings similarity index 84% rename from .config/sublime_text/Preferences.sublime-settings rename to .config/sublime-text/Packages/User/Preferences.sublime-settings index ddf7558..21fb606 100644 --- a/.config/sublime_text/Preferences.sublime-settings +++ b/.config/sublime-text/Packages/User/Preferences.sublime-settings @@ -31,5 +31,8 @@ // "line_numbers": false, // "gutter": false, // "margin": 0, - "color_scheme": "gruvbox (Dark) (Hard).sublime-color-scheme", + // "color_scheme": "gruvbox (Dark) (Hard).sublime-color-scheme", + "color_scheme": "auto", + "dark_color_scheme": "Mariana.sublime-color-scheme", + "light_color_scheme": "Breakers.sublime-color-scheme", } diff --git a/.config/sublime_text/call_build.sublime-build b/.config/sublime-text/Packages/User/call_build.sublime-build similarity index 100% rename from .config/sublime_text/call_build.sublime-build rename to .config/sublime-text/Packages/User/call_build.sublime-build diff --git a/.config/sublime_text/comment_section.sublime-snippet b/.config/sublime-text/Packages/User/comment_section.sublime-snippet similarity index 100% rename from .config/sublime_text/comment_section.sublime-snippet rename to .config/sublime-text/Packages/User/comment_section.sublime-snippet diff --git a/.config/sublime_text/enum snippet.sublime-snippet b/.config/sublime-text/Packages/User/enum snippet.sublime-snippet similarity index 100% rename from .config/sublime_text/enum snippet.sublime-snippet rename to .config/sublime-text/Packages/User/enum snippet.sublime-snippet diff --git a/.config/sublime_text/installed_packages.txt b/.config/sublime-text/Packages/User/installed_packages.txt similarity index 100% rename from .config/sublime_text/installed_packages.txt rename to .config/sublime-text/Packages/User/installed_packages.txt diff --git a/.config/sublime_text/set_unix_line_ending.py b/.config/sublime-text/Packages/User/set_unix_line_ending.py similarity index 100% rename from .config/sublime_text/set_unix_line_ending.py rename to .config/sublime-text/Packages/User/set_unix_line_ending.py diff --git a/.config/sublime_text/setup_vsvars.py b/.config/sublime-text/Packages/User/setup_vsvars.py similarity index 100% rename from .config/sublime_text/setup_vsvars.py rename to .config/sublime-text/Packages/User/setup_vsvars.py diff --git a/.config/sublime_text/struct_snippet.sublime-snippet b/.config/sublime-text/Packages/User/struct_snippet.sublime-snippet similarity index 100% rename from .config/sublime_text/struct_snippet.sublime-snippet rename to .config/sublime-text/Packages/User/struct_snippet.sublime-snippet diff --git a/.config/sway/config b/.config/sway/config index 7d8bc9c..2d03e97 100644 --- a/.config/sway/config +++ b/.config/sway/config @@ -91,6 +91,7 @@ input "1267:12734:ELAN06FA:00_04F3:31BE_Touchpad" { # Start your launcher bindsym $mod+p exec $menu + bindsym $mod+d exec /home/kk/bin/docs-list.c # Drag floating windows by holding down $mod and left mouse button. # Resize them with right mouse button + $mod. diff --git a/.config/tmux/tmux.conf b/.config/tmux/tmux.conf index 313bd11..5b79352 100644 --- a/.config/tmux/tmux.conf +++ b/.config/tmux/tmux.conf @@ -25,6 +25,11 @@ set -g history-limit 1000000 # Reload config with prefix + r. bind-key r source-file ~/.config/tmux/tmux.conf \; display-message "tmux config reloaded" +# Open new panes/windows in the currently focused pane's directory. +bind-key % split-window -h -c "#{pane_current_path}" +bind-key '"' split-window -v -c "#{pane_current_path}" +bind-key c new-window -c "#{pane_current_path}" + # Pane navigation with Vim-style keys bind-key h select-pane -L bind-key j select-pane -D diff --git a/arch-chroot-setup.sh b/arch-chroot-setup.sh deleted file mode 100755 index 139a815..0000000 --- a/arch-chroot-setup.sh +++ /dev/null @@ -1,152 +0,0 @@ -#!/bin/bash -set -euo pipefail - -username=kk - -core_packages=( - tmux - kakoune - man-db - man-pages - clang - make - tcc - ripgrep - curl - plocate - fzf - gdb - which -) - -network_packages=( - openssh - sshfs -) - -desktop_packages=( - sway - swayidle - swaybg - swaylock - foot - wmenu - xorg-xwayland - wl-clipboard - xdg-desktop-portal-wlr - xdg-user-dirs - xdg-utils - grim -) - -media_packages=( - pipewire - pipewire-pulse - pipewire-alsa - pipewire-jack - wireplumber - pavucontrol - ffmpeg - imv - mpv -) - -font_packages=( - ttf-fira-code - noto-fonts - noto-fonts-cjk - noto-fonts-emoji - noto-fonts-extra - ttf-liberation - ttf-dejavu - ttf-roboto -) - -app_packages=( - firefox -) - -machine_packages=( - nvidia-open -) - -if [[ ${EUID} -ne 0 ]]; then - printf 'Run this script as root inside arch-chroot.\n' >&2 - exit 1 -fi - -ln -sf /usr/share/zoneinfo/Europe/Warsaw /etc/localtime -hwclock --systohc - -sed -i 's/^#\(en_US.UTF-8 UTF-8\)/\1/' /etc/locale.gen -sed -i 's/^#\(pl_PL.UTF-8 UTF-8\)/\1/' /etc/locale.gen -locale-gen - -cat >/etc/locale.conf <<'EOF' -LANG=en_US.UTF-8 -EOF - -cat >/etc/vconsole.conf <<'EOF' -KEYMAP=pl2 -EOF - -bootctl install - -cat >/boot/loader/loader.conf <<'EOF' -default arch.conf -timeout 0 -console-mode max -editor no -EOF - -root_uuid=$(findmnt -no UUID /) -if [[ -z ${root_uuid} ]]; then - printf 'Could not detect root filesystem UUID. Check findmnt/blkid manually.\n' >&2 - exit 1 -fi - -cat >/boot/loader/entries/arch.conf </dev/null 2>&1; then - useradd -m -s /bin/bash -G wheel,video,render "${username}" -fi - -install -m 0750 -d /etc/sudoers.d -cat >/etc/sudoers.d/00-wheel <<'EOF' -%wheel ALL=(ALL:ALL) ALL -EOF -chmod 0440 /etc/sudoers.d/00-wheel -visudo -cf /etc/sudoers.d/00-wheel - -passwd "${username}" - -pacman -Syu --needed \ - "${core_packages[@]}" \ - "${network_packages[@]}" \ - "${desktop_packages[@]}" \ - "${media_packages[@]}" \ - "${font_packages[@]}" \ - "${app_packages[@]}" \ - "${machine_packages[@]}" - -updatedb -systemctl enable sshd.service - -printf '\nChroot setup complete. Exit, unmount /mnt, reboot, then log in as %s.\n' "${username}" -printf 'After first login, run: xdg-user-dirs-update\n' -printf 'After first login, run: systemctl --user enable --now pipewire pipewire-pulse wireplumber\n' -printf 'Generate SSH key after first login with: ssh-keygen -t ed25519 -N "" -f ~/.ssh/id_ed25519\n'