diff options
160 files changed, 9617 insertions, 0 deletions
diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..26a2d87 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,16 @@ +root = true + +[*] +end_of_line = lf +insert_final_newline = true +trim_trailing_whitespace = true +charset = utf-8 + +[*.lua] +indent_style = space +indent_size = 2 +enable_check_codestyle = true +max_line_length = 80 + +[Makefile] +indent_style = tab diff --git a/README.md b/README.md new file mode 100644 index 0000000..9a5992c --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# dotfiles + +My linux config and rc files diff --git a/barscripts/gpu-memory b/barscripts/gpu-memory new file mode 100755 index 0000000..6c8aeca --- /dev/null +++ b/barscripts/gpu-memory @@ -0,0 +1,3 @@ +#!/usr/bin/env sh + +command -v nvidia-smi > /dev/null 2>&1 && nvidia-smi > /dev/null 2>&1 && printf "VRAM:%s%%" "$(nvidia-smi --query-gpu=utilization.memory --format=csv,noheader,nounits 2> /dev/null)" diff --git a/barscripts/gpu-temp b/barscripts/gpu-temp new file mode 100755 index 0000000..6f49029 --- /dev/null +++ b/barscripts/gpu-temp @@ -0,0 +1,3 @@ +#!/usr/bin/env sh + +command -v nvidia-smi > /dev/null 2>&1 && nvidia-smi > /dev/null 2>&1 && printf "%s°C" "$(nvidia-smi --query-gpu=temperature.gpu --format=csv,noheader 2> /dev/null)" diff --git a/barscripts/gpu-usage b/barscripts/gpu-usage new file mode 100755 index 0000000..67ae7e0 --- /dev/null +++ b/barscripts/gpu-usage @@ -0,0 +1,3 @@ +#!/usr/bin/env sh + +command -v nvidia-smi > /dev/null 2>&1 && nvidia-smi > /dev/null 2>&1 && printf "GPU:%s%%" "$(nvidia-smi --query-gpu=utilization.gpu --format=csv,noheader,nounits 2> /dev/null)" diff --git a/create-efi.sh b/create-efi.sh new file mode 100755 index 0000000..2c4c3d2 --- /dev/null +++ b/create-efi.sh @@ -0,0 +1,57 @@ +#!/usr/bin/env sh +set -e + +lsblk + +printf "Boot disk [sda]: " && read -r boot_disk +if [ -z "$boot_disk" ]; then + boot_disk='sda' +fi + +printf "Boot partition number [1]: " && read -r boot_partition_number +if [ -z "$boot_partition_number" ]; then + boot_partition_number='1' +fi + +printf "Root partition [sda2]: " && read -r root_partition +if [ -z "$root_partition" ]; then + root_partition='sda2' +fi +root_uuid=$(blkid /dev/"$root_partition" | cut -f 2 -d " ") + +printf "Kernel name [linux]: " && read -r kernel_name +if [ -z "$kernel_name" ]; then + kernel_name='linux' +fi + +printf "CPU vendor (intel/amd) [intel]: " && read -r cpu_vendor +if [ -z "$cpu_vendor" ]; then + cpu_vendor='intel' +fi + +printf "ESP (boot/efi) [boot]: " && read -r esp +if [ -z "$esp" ]; then + esp='boot' +fi + +printf "extra kernel parameters (e.g. mitigations=off): " && read -r extra_kernel_params + +printf "label [archlinux]: " && read -r label +if [ -z "$label" ]; then + label='archlinux' +fi + +rel_path="" +rel_path2="" +if [ "$esp" = "efi" ]; then + rel_path="\\EFI\\arch" + rel_path2="/EFI/arch" +fi + + +unicode_arg="cryptdevice=$root_uuid:root root=/dev/mapper/root rw initrd=$rel_path\\$cpu_vendor-ucode.img initrd=$rel_path\\initramfs-$kernel_name.img quiet $extra_kernel_params" + +set -x +pacman -S --needed "$cpu_vendor"-ucode +pacman -S --asdeps --needed efibootmgr +efibootmgr --disk /dev/"$boot_disk" --part "$boot_partition_number" --create --label "$label" --loader "$rel_path2"/vmlinuz-"$kernel_name" --unicode "$unicode_arg" diff --git a/etc/modules-load.d/tcp_bbr.conf b/etc/modules-load.d/tcp_bbr.conf new file mode 100644 index 0000000..0e83071 --- /dev/null +++ b/etc/modules-load.d/tcp_bbr.conf @@ -0,0 +1 @@ +tcp_bbr diff --git a/etc/pacman.d/hooks/orphans.hook b/etc/pacman.d/hooks/orphans.hook new file mode 100644 index 0000000..48c1d8d --- /dev/null +++ b/etc/pacman.d/hooks/orphans.hook @@ -0,0 +1,12 @@ +[Trigger] +Operation = Install +Operation = Upgrade +Operation = Remove +Type = Package +Target = * + +[Action] +Description = Searching for orphaned packages... +When = PostTransaction +Exec = /usr/bin/bash -c "/usr/bin/pacman -Qtd || /usr/bin/echo '==> no orphans found.'" +#Exec = /usr/bin/bash -c "[[ if $(/usr/bin/pacman -Qtdq) = 0 ]] && /usr/bin/pacman -Rns $(/usr/bin/pacman -Qtdq) || /usr/bin/echo '==> No orphaned packages found.'" diff --git a/etc/sysctl.d/99-sysctl.conf b/etc/sysctl.d/99-sysctl.conf new file mode 100644 index 0000000..c6fde05 --- /dev/null +++ b/etc/sysctl.d/99-sysctl.conf @@ -0,0 +1,19 @@ +kernel.sysrq = 1 +kernel.dmesg_restrict = 0 +kernel.yama.ptrace_scope = 0 +kernel.perf_event_paranoid = 0 +net.core.netdev_max_backlog = 16384 +net.core.somaxconn = 8192 +net.ipv4.tcp_fastopen = 3 +net.ipv4.tcp_max_syn_backlog = 8192 +net.ipv4.tcp_max_tw_buckets = 2000000 +net.ipv4.tcp_tw_reuse = 1 +net.ipv4.tcp_fin_timeout = 10 +net.ipv4.tcp_slow_start_after_idle = 0 +net.ipv4.tcp_keepalive_time = 60 +net.ipv4.tcp_keepalive_intvl = 10 +net.ipv4.tcp_keepalive_probes = 6 +net.ipv4.tcp_mtu_probing = 1 +net.core.default_qdisc = cake +net.ipv4.tcp_congestion_control = bbr +vm.vfs_cache_pressure = 50 diff --git a/etc/systemd/system.conf.d/timeout.conf b/etc/systemd/system.conf.d/timeout.conf new file mode 100644 index 0000000..b48f3bb --- /dev/null +++ b/etc/systemd/system.conf.d/timeout.conf @@ -0,0 +1,3 @@ +[Manager] +DefaultTimeoutStartSec=10s +DefaultTimeoutStopSec=10s diff --git a/etc2/xdg/reflector/reflector.conf b/etc2/xdg/reflector/reflector.conf new file mode 100644 index 0000000..64767b9 --- /dev/null +++ b/etc2/xdg/reflector/reflector.conf @@ -0,0 +1,39 @@ +# Reflector configuration file for the systemd service. +# +# Empty lines and lines beginning with "#" are ignored. All other lines should +# contain valid reflector command-line arguments. The lines are parsed with +# Python's shlex modules so standard shell syntax should work. All arguments are +# collected into a single argument list. +# +# See "reflector --help" for details. + +# Recommended Options + +# Set the output path where the mirrorlist will be saved (--save). +--save /etc/pacman.d/mirrorlist + +# Select the transfer protocol (--protocol). +# --protocol https + +# Select the country (--country). +# Consult the list of available countries with "reflector --list-countries" and +# select the countries nearest to you or the ones that you trust. For example: +--country Spain,Portugal,France,Switzerland,Germany,Netherlands + +# Use only the most recently synchronized mirrors (--latest). +# --latest 12 + +# Sort the mirrors by synchronization time (--sort). +# --sort age + +--age 12 + +--completion-percent 100 + +--sort score + +#--connection-timeout 2 + +--fastest 10 + +--threads 12 diff --git a/firefox/chrome/userChrome.css b/firefox/chrome/userChrome.css new file mode 100644 index 0000000..3f2dfe7 --- /dev/null +++ b/firefox/chrome/userChrome.css @@ -0,0 +1,3 @@ +#webrtcIndicator { + display: none; +} diff --git a/firefox/user-overrides.js b/firefox/user-overrides.js new file mode 100644 index 0000000..dfebba9 --- /dev/null +++ b/firefox/user-overrides.js @@ -0,0 +1,78 @@ +/* override recipe: enable session restore ***/ +user_pref("browser.startup.page", 3); // 0102 +user_pref("browser.sessionstore.privacy_level", 0); // 1003 optional to restore cookies/formdata +user_pref("privacy.clearOnShutdown.history", false); // 2811 +user_pref("privacy.cpd.history", false); // 2820 optional to match when you use Ctrl-Shift-Del + +/* 1601: control when to send a cross-origin referer + * 0=always (default), 1=only if base domains match, 2=only if hosts match + * [SETUP-WEB] Breakage: older modems/routers and some sites e.g banks, vimeo, icloud, instagram + * If "2" is too strict, then override to "0" and use Smart Referer extension (Strict mode + add exceptions) ***/ +user_pref("network.http.referer.XOriginPolicy", 0); + +/** SANITIZE ON SHUTDOWN: IGNORES "ALLOW" SITE EXCEPTIONS ***/ +/* 2811: set/enforce what items to clear on shutdown (if 2810 is true) [SETUP-CHROME] + * [NOTE] If "history" is true, downloads will also be cleared + * [NOTE] "sessions": Active Logins: refers to HTTP Basic Authentication [1], not logins via cookies + * [1] https://en.wikipedia.org/wiki/Basic_access_authentication ***/ +user_pref("privacy.clearOnShutdown.downloads", false); // [DEFAULT: true] +user_pref("privacy.clearOnShutdown.history", false); // [DEFAULT: true] +user_pref("privacy.clearOnShutdown.sessions", false); // [DEFAULT: true] + +/* 0801: disable location bar using search + * Don't leak URL typos to a search engine, give an error message instead + * Examples: "secretplace,com", "secretplace/com", "secretplace com", "secret place.com" + * [NOTE] This does not affect explicit user action such as using search buttons in the + * dropdown, or using keyword search shortcuts you configure in options (e.g. "d" for DuckDuckGo) + * [SETUP-CHROME] Override this if you trust and use a privacy respecting search engine ***/ +user_pref("keyword.enabled", true); + +/* 2620: enforce PDFJS, disable PDFJS scripting + * This setting controls if the option "Display in Firefox" is available in the setting below + * and by effect controls whether PDFs are handled in-browser or externally ("Ask" or "Open With") + * [WHY] pdfjs is lightweight, open source, and secure: the last exploit was June 2015 [1] + * It doesn't break "state separation" of browser content (by not sharing with OS, independent apps). + * It maintains disk avoidance and application data isolation. It's convenient. You can still save to disk. + * [NOTE] JS can still force a pdf to open in-browser by bundling its own code + * [SETUP-CHROME] You may prefer a different pdf reader for security/workflow reasons + * [SETTING] General>Applications>Portable Document Format (PDF) + * [1] https://cve.mitre.org/cgi-bin/cvekey.cgi?keyword=pdf.js+firefox ***/ +user_pref("pdfjs.disabled", true); // [DEFAULT: false] + +/* 5003: disable saving passwords + * [NOTE] This does not clear any passwords already saved + * [SETTING] Privacy & Security>Logins and Passwords>Ask to save logins and passwords for websites ***/ +user_pref("signon.rememberSignons", false); + +/* 5017: disable Form Autofill + * If .supportedCountries includes your region (browser.search.region) and .supported + * is "detect" (default), then the UI will show. Stored data is not secure, uses JSON + * [NOTE] Heuristics controls Form Autofill on forms without @autocomplete attributes + * [SETTING] Privacy & Security>Forms and Autofill>Autofill addresses + * [1] https://wiki.mozilla.org/Firefox/Features/Form_Autofill ***/ +user_pref("extensions.formautofill.addresses.enabled", false); // [FF55+] +user_pref("extensions.formautofill.creditCards.enabled", false); // [FF56+] +user_pref("extensions.formautofill.heuristics.enabled", false); // [FF55+] + +/* 2022: disable all DRM content (EME: Encryption Media Extension) + * Optionally hide the setting which also disables the DRM prompt + * [SETUP-WEB] e.g. Netflix, Amazon Prime, Hulu, HBO, Disney+, Showtime, Starz, DirectTV + * [SETTING] General>DRM Content>Play DRM-controlled content + * [TEST] https://bitmovin.com/demos/drm + * [1] https://www.eff.org/deeplinks/2017/10/drms-dead-canary-how-we-just-lost-web-what-we-learned-it-and-what-we-need-do-next ***/ +// user_pref("media.eme.enabled", false); // already disabled +user_pref("browser.eme.ui.enabled", false); + +/* 0701: disable IPv6 + * IPv6 can be abused, especially with MAC addresses, and can leak with VPNs: assuming + * your ISP and/or router and/or website is IPv6 capable. Most sites will fall back to IPv4 + * [SETUP-WEB] PR_CONNECT_RESET_ERROR: this pref *might* be the cause + * [STATS] Firefox telemetry (Sept 2022) shows ~8% of successful connections are IPv6 + * [NOTE] This is an application level fallback. Disabling IPv6 is best done at an + * OS/network level, and/or configured properly in VPN setups. If you are not masking your IP, + * then this won't make much difference. If you are masking your IP, then it can only help. + * [NOTE] PHP defaults to IPv6 with "localhost". Use "php -S 127.0.0.1:PORT" + * [TEST] https://ipleak.org/ + * [1] https://www.internetsociety.org/tag/ipv6-security/ (Myths 2,4,5,6) ***/ +// user_pref("network.dns.disableIPv6", true); +user_pref("network.dns.disableIPv6", false); diff --git a/home/.alsoftrc b/home/.alsoftrc new file mode 100644 index 0000000..04de22d --- /dev/null +++ b/home/.alsoftrc @@ -0,0 +1,4 @@ +hrtf = true + +[pulse] +allow-moves=true diff --git a/home/.bash_logout b/home/.bash_logout new file mode 100644 index 0000000..de4f5f7 --- /dev/null +++ b/home/.bash_logout @@ -0,0 +1,7 @@ +# ~/.bash_logout: executed by bash(1) when login shell exits. + +# when leaving the console clear the screen to increase privacy + +if [ "$SHLVL" = 1 ]; then + [ -x /usr/bin/clear_console ] && /usr/bin/clear_console -q +fi diff --git a/home/.bashrc b/home/.bashrc new file mode 100644 index 0000000..a6df0cd --- /dev/null +++ b/home/.bashrc @@ -0,0 +1,52 @@ +# ~/.bashrc: executed by bash(1) for non-login shells. +# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) +# for examples +case $- in + *i*) stty -ixon + ;; + *) return + ;; +esac + +# shellcheck source=/dev/null +[ -r ~/.config/sh/shinit ] && . ~/.config/sh/shinit + +safesource /usr/share/git/completion/git-prompt.sh + +PS1="\[\033[38;1;32m\]\u\[$(tput sgr0)\]\[\033[38;1;37m\]@\[$(tput sgr0)\]\[\033[38;1;36m\]\h\[$(tput sgr0)\]\[\033[38;1;37m\]:\[$(tput sgr0)\]\[\033[38;0;33m\]\w\[$(tput sgr0)\]$(__git_ps1 " (%s)")[\[\033[38;0;31m\]\$?\[$(tput sgr0)\]]\$ " +export PS1 + + +HISTFILE="$XDG_CACHE_HOME"/bash_history +# don't put duplicate lines or lines starting with space in the history. +# See bash(1) for more options +HISTCONTROL=ignoreboth + +# append to the history file, don't overwrite it +shopt -s histappend + +# for setting history length see HISTSIZE and HISTFILESIZE in bash(1) +HISTSIZE=50000 +HISTFILESIZE=50000 + +# check the window size after each command and, if necessary, +# update the values of LINES and COLUMNS. +shopt -s checkwinsize + +# If set, the pattern "**" used in a pathname expansion context will +# match all files and zero or more directories and subdirectories. +#shopt -s globstar + +# enable programmable completion features (you don't need to enable +# this, if it's already enabled in /etc/bash.bashrc and /etc/profile +# sources /etc/bash.bashrc). +if ! shopt -oq posix; then + safesource /usr/share/bash-completion/bash_completion +fi + +shopt -s autocd + +bind '"\eh": "\C-a\eb\ed\C-y\e#man \C-y\C-m\C-p\C-p\C-a\C-d\C-e"' + +safesource /usr/share/bash-completion/completions/fzf || safesource /usr/share/fzf/completion.bash +safesource /etc/profile.d/fzf.bash || safesource /usr/share/fzf/key-bindings.bash diff --git a/home/.config/MangoHud/MangoHud.conf b/home/.config/MangoHud/MangoHud.conf new file mode 100644 index 0000000..67fe027 --- /dev/null +++ b/home/.config/MangoHud/MangoHud.conf @@ -0,0 +1,117 @@ +### MangoHud configuration file +### Uncomment any options you wish to enable. Default options are left uncommented +### Use some_parameter=0 to disable a parameter (only works with on/off parameters) +### Everything below can be used / overridden with the environment variable MANGOHUD_CONFIG instead + +################ PERFORMANCE ################# + +### Limit the application FPS +# fps_limit= + +### VSYNC [0-3] 0 = adaptive; 1 = off; 2 = mailbox; 3 = on +# vsync= + +### OpenGL VSYNC [0-N] 0 = off; >=1 = wait for N v-blanks, N > 1 acts as a fps limiter (fps = display refresh rate / N) +# gl_vsync= + +################### VISUAL ################### + +### Display the current CPU information +cpu_stats +cpu_temp + +### Display the current GPU information +gpu_stats +gpu_temp +# gpu_core_clock +# gpu_mem_clock + +### Display loaded MangoHud architecture +# arch + +### Display the frametime line graph +frame_timing +# histogram + +### Display the current system time +# time + +### Time formatting examples +# time_format = %H:%M +# time_format = [ %T %F ] +# time_format = %X # locally formatted time, because of limited glyph range, missing characters may show as '?' (e.g. japanese) + +### Change the hud font size (default is 24) +font_size=16 +# font_scale_media_player = 0.55 + +### Change the hud position (default is top-left) +position=bottom-right + +### Display the current CPU load & frequency for each core +# core_load + +### IO read and write for the app (not system) +# io_read +# io_write + +### Display system ram / vram usage +ram +vram + +### Disable / hide the hud by deafult +# no_display + +### Hud position offset +# offset_x= +# offset_y= + +### Hud dimensions +# width= +# height= + +### Hud transparency / alpha +background_alpha=0.8 +# alpha= + +### Color customization +# text_color=FFFFFF +# gpu_color=2E9762 +# cpu_color=2E97CB +# vram_color=AD64C1 +# ram_color=C26693 +# engine_color=EB5B5B +# io_color=A491D3 +# frametime_color=00FF00 +# background_color=020202 +# media_player_color=FFFFFF + +### Change default font (set location to .TTF/.OTF file ) +# font_file + +### Crosshair overlay (default size is 30) +# crosshair +# crosshair_size= +# crosshair_color=RRGGBB + +### Show media player metadata +# media_player +# media_player_name = spotify + +### Specify gpu with pci bus id for amdgpu and NVML stats. +### Set to 'domain:bus:slot.function' +# pci_dev = 0:0a:0.0 + +################## INTERACTION ################# + +### Change toggle keybinds for the hud & logging +#toggle_hud=Shift_R+F12 +#toggle_logging=F2 +#reload_cfg=Shift_L+F4 + +################## LOG ################# + +### Set amount of time in second that the logging will run for +# log_duration +### Define name and location of the output file (Required for logging) +# output_file diff --git a/home/.config/X11/Xmodmap b/home/.config/X11/Xmodmap new file mode 100644 index 0000000..8b62265 --- /dev/null +++ b/home/.config/X11/Xmodmap @@ -0,0 +1 @@ +keycode 9 = grave asciitilde grave asciitilde diff --git a/home/.config/X11/Xresources b/home/.config/X11/Xresources new file mode 100644 index 0000000..f0b4a4a --- /dev/null +++ b/home/.config/X11/Xresources @@ -0,0 +1,67 @@ +*.font: mono:size=17:antialias=true:autohint=true + +! gruvbox-dark theme +! hard contrast: +*background: #1d2021 +! medium +! *background: ##282828 +! soft contrast: +! *background: #32302f +*foreground: #ebdbb2 +*cursorColor: #ebdbb2 +! Black + DarkGrey +*color0: #1d2021 +*color8: #928374 +! DarkRed + Red +*color1: #cc241d +*color9: #fb4934 +! DarkGreen + Green +*color2: #98971a +*color10: #b8bb26 +! DarkYellow + Yellow +*color3: #d79921 +*color11: #fabd2f +! DarkBlue + Blue +*color4: #458588 +*color12: #83a598 +! DarkMagenta + Magenta +*color5: #b16286 +*color13: #d3869b +! DarkCyan + Cyan +*color6: #689d6a +*color14: #8ec07c +! LightGrey + White +*color7: #a89984 +*color15: #ebdbb2 + +! Others +*color24: #076678 +*color66: #427b58 +*color88: #9d0006 +*color96: #8f3f71 +*color100: #79740e +*color108: #8ec07c +*color109: #83a598 +*color130: #af3a03 +*color136: #b57614 +*color142: #b8bb26 +*color167: #fb4934 +*color175: #d3869b +*color208: #fe8019 +*color214: #fabd2f +*color223: #ebdbb2 +*color228: #f2e5bc +*color229: #fbf1c7 +*color230: #f9f5d7 +*color234: #1d2021 +*color235: #282828 +*color236: #32302f +*color237: #3c3836 +*color239: #504945 +*color241: #665c54 +*color243: #7c6f64 +*color244: #928374 +*color245: #928374 +*color246: #a89984 +*color248: #bdae93 +*color250: #d5c4a1 diff --git a/home/.config/X11/xinitrc b/home/.config/X11/xinitrc new file mode 100755 index 0000000..907b6b6 --- /dev/null +++ b/home/.config/X11/xinitrc @@ -0,0 +1,7 @@ +#!/usr/bin/env sh +# xinitrc file, used by all X sessions started by xinit (startx) +# shellcheck source=/dev/null +[ -r ~/.config/X11/xprofile ] && . ~/.config/X11/xprofile & +if [ "$(uname -n)" != "tau" ]; then + exec bspwm +fi diff --git a/home/.config/X11/xprofile b/home/.config/X11/xprofile new file mode 100644 index 0000000..54e04b3 --- /dev/null +++ b/home/.config/X11/xprofile @@ -0,0 +1,18 @@ +#!/usr/bin/env sh +# shellcheck source=/dev/null +[ -r ~/.config/sh/envrc ] && . ~/.config/sh/envrc +display-setup + +systemctl --user import-environment PATH DISPLAY XAUTHORITY + +[ -r ~/.config/X11/Xresources ] && xrdb ~/.config/X11/Xresources + +xsetroot -cursor_name left_ptr & +input-setup & +unclutter & +keynav & +if [ "$(uname -n)" != "tau" ]; then + launch-polybar & + dunst & + sxhkd & +fi diff --git a/home/.config/alacritty/alacritty.yml b/home/.config/alacritty/alacritty.yml new file mode 100644 index 0000000..65185e8 --- /dev/null +++ b/home/.config/alacritty/alacritty.yml @@ -0,0 +1,62 @@ +# Colors (Gruvbox dark) +colors: + # Default colors + primary: + background: '0x1d2021' + # medium contrast: background: '0x282828' + # soft contrast: background: '0x32302f' + foreground: '0xebdbb2' + + # Normal colors + normal: + black: '0x282828' + red: '0xcc241d' + green: '0x98971a' + yellow: '0xd79921' + blue: '0x458588' + magenta: '0xb16286' + cyan: '0x689d6a' + white: '0xa89984' + + # Bright colors + bright: + black: '0x928374' + red: '0xfb4934' + green: '0xb8bb26' + yellow: '0xfabd2f' + blue: '0x83a598' + magenta: '0xd3869b' + cyan: '0x8ec07c' + white: '0xebdbb2' + +key_bindings: + - { key: Return, mods: Control|Shift, action: SpawnNewInstance } + - { key: K, mods: Alt, action: ScrollLineUp } + - { key: J, mods: Alt, action: ScrollLineDown } + - { key: U, mods: Alt, action: ScrollPageUp } + - { key: D, mods: Alt, action: ScrollPageDown } + - { key: G, mods: Alt, action: ScrollToTop } + - { key: G, mods: Alt|Shift, action: ScrollToBottom } + +cursor: + # Cursor style + style: + # Cursor blinking state + # + # Values for `blinking`: + # - Never: Prevent the cursor from ever blinking + # - Off: Disable blinking by default + # - On: Enable blinking by default + # - Always: Force the cursor to always blink + blinking: On + + # Cursor blinking interval in milliseconds. + blink_interval: 500 + + # Time after which cursor stops blinking, in seconds. + # + # Specifying '0' will disable timeout for blinking. + blink_timeout: 0 + +# Live config reload (changes require restart) +live_config_reload: false diff --git a/home/.config/bat/config b/home/.config/bat/config new file mode 100644 index 0000000..c0afe26 --- /dev/null +++ b/home/.config/bat/config @@ -0,0 +1,25 @@ +# This is `bat`s configuration file. Each line either contains a comment or +# a command-line option that you want to pass to `bat` by default. You can +# run `bat --help` to get a list of all possible configuration options. + +# Specify desired highlighting theme (e.g. "TwoDark"). Run `bat --list-themes` +# for a list of all available themes +--theme="gruvbox-dark" + +# Enable this to use italic text on the terminal. This is not supported on all +# terminal emulators (like tmux, by default): +#--italic-text=always + +# Uncomment the following line to disable automatic paging: +#--paging=never + +# Uncomment the following line if you are using less version >= 551 and want to +# enable mouse scrolling support in `bat` when running inside tmux. This might +# disable text selection, unless you press shift. +#--pager="less --RAW-CONTROL-CHARS --quit-if-one-screen --mouse" + +# Syntax mappings: map a certain filename pattern to a language. +# Example 1: use the C++ syntax for .ino files +# Example 2: Use ".gitignore"-style highlighting for ".ignore" files +#--map-syntax "*.ino:C++" +#--map-syntax ".ignore:Git Ignore" diff --git a/home/.config/bspwm/bspwmrc b/home/.config/bspwm/bspwmrc new file mode 100755 index 0000000..c0b7ba3 --- /dev/null +++ b/home/.config/bspwm/bspwmrc @@ -0,0 +1,49 @@ +#!/usr/bin/env sh + +# If refreshing bspwm, remove all previous rules to prevent doubling up. +bspc rule -r "*" + +if [ "$(uname -n)" = "garry" ] && xrandr --query | grep "HDMI-0 connected"; then + bspc monitor 'eDP-1-1' --remove + bspc config pointer_motion_interval 7 +elif [ "$(uname -n)" = "hercules" ] && xrandr --query | grep "HDMI-0 connected"; then + bspc monitor 'eDP-1-1' --remove +fi + +bspc config border_width 1 +bspc config window_gap 0 +# top_padding I set equal to polybar's height +bspc config top_padding 24 +bspc config right_padding 0 + +bspc config focus_follows_pointer true +bspc config pointer_follows_focus true +bspc config pointer_follows_monitor true +bspc config borderless_monocle true +bspc config gapless_monocle true +bspc config removal_adjustment true +bspc config remove_disabled_monitors true +bspc config remove_unplugged_monitors true +bspc config merge_overlapping_monitors true +bspc config presel_feedback true + +# bspc rule -a mpv sticky=on +bspc rule -a Zathura state=tiled +bspc rule -a "Tor Browser" state=floating +bspc rule -a "feh" state=floating +# bspc rule -a Steam desktop="9" +# bspc rule -a discord desktop="9" +bspc rule -a csgo_linux64 desktop="10" +bspc rule -a hl2_linux desktop="10" +bspc rule -a "origin.exe" state=floating desktop="10" +bspc rule -a "fifa19_demo.exe" desktop="10" +bspc rule -a "fifa20_demo.exe" desktop="10" +bspc rule -a "fifa19.exe" desktop="10" +bspc rule -a "Wine" state=floating desktop="10" +bspc rule -a "fifaconfig.exe" state=floating desktop="10" +bspc rule -a "launcher.exe" state=floating desktop="10" +bspc rule -a "socialclubhelper.exe" state=floating desktop="10" +bspc rule -a "gta5.exe" desktop="10" +bspc rule -a "*.exe" desktop="10" + +bspc monitor -d 1 2 3 4 5 6 7 8 9 10 diff --git a/home/.config/clangd/config.yaml b/home/.config/clangd/config.yaml new file mode 100644 index 0000000..2fc7c59 --- /dev/null +++ b/home/.config/clangd/config.yaml @@ -0,0 +1,8 @@ +Diagnostics: + UnusedIncludes: Strict +InlayHints: + Enabled: Yes + ParameterNames: Yes + DeducedTypes: Yes +Hover: + ShowAKA: Yes diff --git a/home/.config/dunst/dunstrc b/home/.config/dunst/dunstrc new file mode 100644 index 0000000..fba44e9 --- /dev/null +++ b/home/.config/dunst/dunstrc @@ -0,0 +1,466 @@ +[global] + ### Display ### + + # Which monitor should the notifications be displayed on. + monitor = 0 + + # Display notification on focused monitor. Possible modes are: + # mouse: follow mouse pointer + # keyboard: follow window with keyboard focus + # none: don't follow anything + # + # "keyboard" needs a window manager that exports the + # _NET_ACTIVE_WINDOW property. + # This should be the case for almost all modern window managers. + # + # If this option is set to mouse or keyboard, the monitor option + # will be ignored. + follow = mouse + + # The geometry of the window: + # [{width}]x{height}[+/-{x}+/-{y}] + # The geometry of the message window. + # The height is measured in number of notifications everything else + # in pixels. If the width is omitted but the height is given + # ("-geometry x2"), the message window expands over the whole screen + # (dmenu-like). If width is 0, the window expands to the longest + # message displayed. A positive x is measured from the left, a + # negative from the right side of the screen. Y is measured from + # the top and down respectively. + # The width can be negative. In this case the actual width is the + # screen width minus the width defined in within the geometry option. + geometry = "300x5-30+20" + + # Turn on the progess bar + progress_bar = true + + # Set the progress bar height. This includes the frame, so make sure + # it's at least twice as big as the frame width. + progress_bar_height = 10 + + # Set the frame width of the progress bar + progress_bar_frame_width = 1 + + # Set the minimum width for the progress bar + progress_bar_min_width = 150 + + # Set the maximum width for the progress bar + progress_bar_max_width = 300 + + + # Show how many messages are currently hidden (because of geometry). + indicate_hidden = yes + + # Shrink window if it's smaller than the width. Will be ignored if + # width is 0. + shrink = yes + + # The transparency of the window. Range: [0; 100]. + # This option will only work if a compositing window manager is + # present (e.g. xcompmgr, compiz, etc.). + transparency = 0 + + # The height of the entire notification. If the height is smaller + # than the font height and padding combined, it will be raised + # to the font height and padding. + notification_height = 0 + + # Draw a line of "separator_height" pixel height between two + # notifications. + # Set to 0 to disable. + separator_height = 2 + + # Padding between text and separator. + padding = 8 + + # Horizontal padding. + horizontal_padding = 8 + + # Padding between text and icon. + text_icon_padding = 0 + + # Defines width in pixels of frame around the notification window. + # Set to 0 to disable. + frame_width = 3 + + # Defines color of the frame around the notification window. + frame_color = "#aaaaaa" + + # Define a color for the separator. + # possible values are: + # * auto: dunst tries to find a color fitting to the background; + # * foreground: use the same color as the foreground; + # * frame: use the same color as the frame; + # * anything else will be interpreted as a X color. + separator_color = frame + + # Sort messages by urgency. + sort = yes + + # Don't remove messages, if the user is idle (no mouse or keyboard input) + # for longer than idle_threshold seconds. + # Set to 0 to disable. + # A client can set the 'transient' hint to bypass this. See the rules + # section for how to disable this if necessary + idle_threshold = 120 + + ### Text ### + + font = Monospace 8 + + # The spacing between lines. If the height is smaller than the + # font height, it will get raised to the font height. + line_height = 0 + + # Possible values are: + # full: Allow a small subset of html markup in notifications: + # <b>bold</b> + # <i>italic</i> + # <s>strikethrough</s> + # <u>underline</u> + # + # For a complete reference see + # <https://developer.gnome.org/pango/stable/pango-Markup.html>. + # + # strip: This setting is provided for compatibility with some broken + # clients that send markup even though it's not enabled on the + # server. Dunst will try to strip the markup but the parsing is + # simplistic so using this option outside of matching rules for + # specific applications *IS GREATLY DISCOURAGED*. + # + # no: Disable markup parsing, incoming notifications will be treated as + # plain text. Dunst will not advertise that it has the body-markup + # capability if this is set as a global setting. + # + # It's important to note that markup inside the format option will be parsed + # regardless of what this is set to. + markup = full + + # The format of the message. Possible variables are: + # %a appname + # %s summary + # %b body + # %i iconname (including its path) + # %I iconname (without its path) + # %p progress value if set ([ 0%] to [100%]) or nothing + # %n progress value if set without any extra characters + # %% Literal % + # Markup is allowed + format = "<b>%s</b>\n%b" + + # Alignment of message text. + # Possible values are "left", "center" and "right". + alignment = left + + # Vertical alignment of message text and icon. + # Possible values are "top", "center" and "bottom". + vertical_alignment = center + + # Show age of message if message is older than show_age_threshold + # seconds. + # Set to -1 to disable. + show_age_threshold = 60 + + # Split notifications into multiple lines if they don't fit into + # geometry. + word_wrap = yes + + # When word_wrap is set to no, specify where to make an ellipsis in long lines. + # Possible values are "start", "middle" and "end". + ellipsize = middle + + # Ignore newlines '\n' in notifications. + ignore_newline = no + + # Stack together notifications with the same content + stack_duplicates = true + + # Hide the count of stacked notifications with the same content + hide_duplicate_count = false + + # Display indicators for URLs (U) and actions (A). + show_indicators = yes + + ### Icons ### + + # Align icons left/right/off + icon_position = left + + # Scale small icons up to this size, set to 0 to disable. Helpful + # for e.g. small files or high-dpi screens. In case of conflict, + # max_icon_size takes precedence over this. + min_icon_size = 0 + + # Scale larger icons down to this size, set to 0 to disable + max_icon_size = 32 + + # Paths to default icons. + icon_path = /usr/share/icons/Adwaita/16x16/status/:/usr/share/icons/Adwaita/16x16/devices/ + + ### History ### + + # Should a notification popped up from history be sticky or timeout + # as if it would normally do. + sticky_history = yes + + # Maximum amount of notifications kept in history + history_length = 20 + + ### Misc/Advanced ### + + # dmenu path. + dmenu = /usr/bin/dmenu -p dunst: + + # Browser for opening urls in context menu. + browser = /usr/bin/librewolf -new-tab + + # Always run rule-defined scripts, even if the notification is suppressed + always_run_script = true + + # Define the title of the windows spawned by dunst + title = Dunst + + # Define the class of the windows spawned by dunst + class = Dunst + + # Print a notification on startup. + # This is mainly for error detection, since dbus (re-)starts dunst + # automatically after a crash. + startup_notification = false + + # Manage dunst's desire for talking + # Can be one of the following values: + # crit: Critical features. Dunst aborts + # warn: Only non-fatal warnings + # mesg: Important Messages + # info: all unimportant stuff + # debug: all less than unimportant stuff + verbosity = mesg + + # Define the corner radius of the notification window + # in pixel size. If the radius is 0, you have no rounded + # corners. + # The radius will be automatically lowered if it exceeds half of the + # notification height to avoid clipping text and/or icons. + corner_radius = 0 + + # Ignore the dbus closeNotification message. + # Useful to enforce the timeout set by dunst configuration. Without this + # parameter, an application may close the notification sent before the + # user defined timeout. + ignore_dbusclose = false + + ### Wayland ### + # These settings are Wayland-specific. They have no effect when using X11 + + # Uncomment this if you want to let notications appear under fullscreen + # applications (default: overlay) + # layer = top + + # Set this to true to use X11 output on Wayland. + force_xwayland = false + + ### Legacy + + # Use the Xinerama extension instead of RandR for multi-monitor support. + # This setting is provided for compatibility with older nVidia drivers that + # do not support RandR and using it on systems that support RandR is highly + # discouraged. + # + # By enabling this setting dunst will not be able to detect when a monitor + # is connected or disconnected which might break follow mode if the screen + # layout changes. + force_xinerama = false + + ### mouse + + # Defines list of actions for each mouse event + # Possible values are: + # * none: Don't do anything. + # * do_action: If the notification has exactly one action, or one is marked as default, + # invoke it. If there are multiple and no default, open the context menu. + # * close_current: Close current notification. + # * close_all: Close all notifications. + # These values can be strung together for each mouse event, and + # will be executed in sequence. + mouse_left_click = close_current + mouse_middle_click = do_action, close_current + mouse_right_click = close_all + +# Experimental features that may or may not work correctly. Do not expect them +# to have a consistent behaviour across releases. +[experimental] + # Calculate the dpi to use on a per-monitor basis. + # If this setting is enabled the Xft.dpi value will be ignored and instead + # dunst will attempt to calculate an appropriate dpi value for each monitor + # using the resolution and physical size. This might be useful in setups + # where there are multiple screens with very different dpi values. + per_monitor_dpi = false + +# The internal keyboard shortcut support in dunst is now considered deprecated +# and should be replaced by dunstctl calls. You can use the configuration of your +# WM or DE to bind these to shortcuts of your choice. +# Check the dunstctl manual page for more info. +[shortcuts] + + # Shortcuts are specified as [modifier+][modifier+]...key + # Available modifiers are "ctrl", "mod1" (the alt-key), "mod2", + # "mod3" and "mod4" (windows-key). + # Xev might be helpful to find names for keys. + + # Close notification. Equivalent dunstctl command: + # dunstctl close + # close = ctrl+space + + # Close all notifications. Equivalent dunstctl command: + # dunstctl close-all + # close_all = ctrl+shift+space + + # Redisplay last message(s). Equivalent dunstctl command: + # dunstctl history-pop + # history = ctrl+grave + + # Context menu. Equivalent dunstctl command: + # dunstctl context + # context = ctrl+shift+period + +[urgency_low] + # IMPORTANT: colors have to be defined in quotation marks. + # Otherwise the "#" and following would be interpreted as a comment. + background = "#282828" + foreground = "#ebdbb2" + timeout = 10 + # Icon for notifications with low urgency, uncomment to enable + #icon = /path/to/icon + +[urgency_normal] + background = "#282828" + foreground = "#ebdbb2" + timeout = 10 + # Icon for notifications with normal urgency, uncomment to enable + #icon = /path/to/icon + +[urgency_critical] + background = "#282828" + foreground = "#ebdbb2" + frame_color = "#ff0000" + timeout = 0 + # Icon for notifications with critical urgency, uncomment to enable + #icon = /path/to/icon + +# Every section that isn't one of the above is interpreted as a rules to +# override settings for certain messages. +# +# Messages can be matched by +# appname (discouraged, see desktop_entry) +# body +# category +# desktop_entry +# icon +# match_transient +# msg_urgency +# stack_tag +# summary +# +# and you can override the +# background +# foreground +# format +# frame_color +# fullscreen +# new_icon +# set_stack_tag +# set_transient +# timeout +# urgency +# +# Shell-like globbing will get expanded. +# +# Instead of the appname filter, it's recommended to use the desktop_entry filter. +# GLib based applications export their desktop-entry name. In comparison to the appname, +# the desktop-entry won't get localized. +# +# SCRIPTING +# You can specify a script that gets run when the rule matches by +# setting the "script" option. +# The script will be called as follows: +# script appname summary body icon urgency +# where urgency can be "LOW", "NORMAL" or "CRITICAL". +# +# NOTE: if you don't want a notification to be displayed, set the format +# to "". +# NOTE: It might be helpful to run dunst -print in a terminal in order +# to find fitting options for rules. + +# Disable the transient hint so that idle_threshold cannot be bypassed from the +# client +#[transient_disable] +# match_transient = yes +# set_transient = no +# +# Make the handling of transient notifications more strict by making them not +# be placed in history. +#[transient_history_ignore] +# match_transient = yes +# history_ignore = yes + +# fullscreen values +# show: show the notifications, regardless if there is a fullscreen window opened +# delay: displays the new notification, if there is no fullscreen window active +# If the notification is already drawn, it won't get undrawn. +# pushback: same as delay, but when switching into fullscreen, the notification will get +# withdrawn from screen again and will get delayed like a new notification +#[fullscreen_delay_everything] +# fullscreen = delay +#[fullscreen_show_critical] +# msg_urgency = critical +# fullscreen = show + +#[espeak] +# summary = "*" +# script = dunst_espeak.sh + +#[script-test] +# summary = "*script*" +# script = dunst_test.sh + +#[ignore] +# # This notification will not be displayed +# summary = "foobar" +# format = "" + +#[history-ignore] +# # This notification will not be saved in history +# summary = "foobar" +# history_ignore = yes + +#[skip-display] +# # This notification will not be displayed, but will be included in the history +# summary = "foobar" +# skip_display = yes + +#[signed_on] +# appname = Pidgin +# summary = "*signed on*" +# urgency = low +# +#[signed_off] +# appname = Pidgin +# summary = *signed off* +# urgency = low +# +#[says] +# appname = Pidgin +# summary = *says* +# urgency = critical +# +#[twitter] +# appname = Pidgin +# summary = *twitter.com* +# urgency = normal +# +#[stack-volumes] +# appname = "some_volume_notifiers" +# set_stack_tag = "volume" +# +# vim: ft=cfg diff --git a/home/.config/fakecam/config.ini b/home/.config/fakecam/config.ini new file mode 100644 index 0000000..2bfe41c --- /dev/null +++ b/home/.config/fakecam/config.ini @@ -0,0 +1,11 @@ +; width = 1280 +; height = 720 +; fps = 30 +; no-background = yes +background-image = ~/pics/03_background-abstract.jpg +; background-keep-aspect = no +no-foreground = yes +; webcam-path = /dev/video3 +threshold = 50 +select-model = 0 +no-ondemand = yes diff --git a/home/.config/fontconfig/fonts.conf b/home/.config/fontconfig/fonts.conf new file mode 100644 index 0000000..63eac54 --- /dev/null +++ b/home/.config/fontconfig/fonts.conf @@ -0,0 +1,35 @@ +<?xml version="1.0"?> +<!DOCTYPE fontconfig SYSTEM "fonts.dtd"> +<fontconfig> + +<alias> + <family>monospace</family> + <prefer> + <family>Fira Code</family> + <family>DejaVu Sans Mono</family> + <family>Inconsolata</family> + </prefer> + </alias> + + <alias> + <family>sans-serif</family> + <prefer> + <family>DejaVu Sans</family> + <family>Droid Sans</family> + <family>Ubuntu</family> + <family>Helvetica</family> + </prefer> + </alias> + + <alias> + <family>serif</family> + <prefer> + <family>Latin Modern Math</family> + <family>DejaVu Serif</family> + <family>CMU Serif</family> + <family>Latin Modern Roman</family> + <family>Computer Modern</family> + </prefer> + </alias> + +</fontconfig> diff --git a/home/.config/gamemode.ini b/home/.config/gamemode.ini new file mode 100644 index 0000000..899cc4c --- /dev/null +++ b/home/.config/gamemode.ini @@ -0,0 +1,97 @@ +[general] +; The reaper thread will check every 5 seconds for exited clients, for config file changes, and for the CPU/iGPU power balance +reaper_freq=5 + +; The desired governor is used when entering GameMode instead of "performance" +desiredgov=performance +; The default governer is used when leaving GameMode instead of restoring the original value +defaultgov=performance + +; The iGPU desired governor is used when the integrated GPU is under heavy load +; igpu_desiredgov=powersave +; Threshold to use to decide when the integrated GPU is under heavy load. +; This is a ratio of iGPU Watts / CPU Watts which is used to determine when the +; integraged GPU is under heavy enough load to justify switching to +; igpu_desiredgov. Set this to -1 to disable all iGPU checking and always +; use desiredgov for games. +; igpu_power_threshold=0.3 + +; GameMode can change the scheduler policy to SCHED_ISO on kernels which support it (currently +; not supported by upstream kernels). Can be set to "auto", "on" or "off". "auto" will enable +; with 4 or more CPU cores. "on" will always enable. Defaults to "off". +softrealtime=off + +; GameMode can renice game processes. You can put any value between 0 and 20 here, the value +; will be negated and applied as a nice value (0 means no change). Defaults to 0. +renice=0 + +; By default, GameMode adjusts the iopriority of clients to BE/0, you can put any value +; between 0 and 7 here (with 0 being highest priority), or one of the special values +; "off" (to disable) or "reset" (to restore Linux default behavior based on CPU priority), +; currently, only the best-effort class is supported thus you cannot set it here +ioprio=0 + +; Sets whether gamemode will inhibit the screensaver when active +; Defaults to 1 +; inhibit_screensaver=1 + +[filter] +; If "whitelist" entry has a value(s) +; gamemode will reject anything not in the whitelist +;whitelist=RiseOfTheTombRaider + +; Gamemode will always reject anything in the blacklist +;blacklist=HalfLife3 +; glxgears + +[gpu] +; Here Be Dragons! +; Warning: Use these settings at your own risk +; Any damage to hardware incurred due to this feature is your responsibility and yours alone +; It is also highly recommended you try these settings out first manually to find the sweet spots + +; Setting this to the keyphrase "accept-responsibility" will allow gamemode to apply GPU optimisations such as overclocks +;apply_gpu_optimisations=0 + +; The DRM device number on the system (usually 0), ie. the number in /sys/class/drm/card0/ +;gpu_device=0 + +; Nvidia specific settings +; Requires the coolbits extension activated in nvidia-xconfig +; This corresponds to the desired GPUPowerMizerMode +; "Adaptive"=0 "Prefer Maximum Performance"=1 and "Auto"=2 +; See NV_CTRL_GPU_POWER_MIZER_MODE and friends in https://github.com/NVIDIA/nvidia-settings/blob/master/src/libXNVCtrl/NVCtrl.h +;nv_powermizer_mode=1 + +; These will modify the core and mem clocks of the highest perf state in the Nvidia PowerMizer +; They are measured as Mhz offsets from the baseline, 0 will reset values to default, -1 or unset will not modify values +;nv_core_clock_mhz_offset=0 +;nv_mem_clock_mhz_offset=0 + +; AMD specific settings +; Requires a relatively up to date AMDGPU kernel module +; See: https://dri.freedesktop.org/docs/drm/gpu/amdgpu.html#gpu-power-thermal-controls-and-monitoring +; It is also highly recommended you use lm-sensors (or other available tools) to verify card temperatures +; This corresponds to power_dpm_force_performance_level, "manual" is not supported for now +;amd_performance_level=high + +[supervisor] +; This section controls the new gamemode functions gamemode_request_start_for and gamemode_request_end_for +; The whilelist and blacklist control which supervisor programs are allowed to make the above requests +;supervisor_whitelist= +;supervisor_blacklist= + +; In case you want to allow a supervisor to take full control of gamemode, this option can be set +; This will only allow gamemode clients to be registered by using the above functions by a supervisor client +;require_supervisor=0 + +[custom] +; Custom scripts (executed using the shell) when gamemode starts and ends +;start=notify-send "GameMode started" +; /home/me/bin/stop_ethmining.sh + +;end=notify-send "GameMode ended" +; /home/me/bin/start_ethmining.sh + +; Timeout for scripts (seconds). Scripts will be killed if they do not complete within this time. +;script_timeout=10 diff --git a/home/.config/git/config b/home/.config/git/config new file mode 100644 index 0000000..d3c55dd --- /dev/null +++ b/home/.config/git/config @@ -0,0 +1,119 @@ +[user] + email = sommerfeld@strisemarx.com + name = Arnold Sommerfeld + signingkey = 47C5F04AC8C65531 +[push] + autoSetupRemote = true + followTags = false + gpgSign = if-asked +[core] + whitespace = fix,trailing-space,cr-at-eol + autocrlf = input + pager = delta +[branch] + autoSetupMerge = false + sort=-committerdate +[web] + browser = librewolf +[diff] + tool = nvimdiff + algorithm = histogram + colorMoved = default + mnemonicPrefix = true + relative = true + renameLimit = 10000 +[difftool] + prompt = false + trustExitCode = true +[difftool "nvimdiff"] + cmd = $EDITOR -d $LOCAL $REMOTE +[rebase] + autoStash = true +[fetch] + recurseSubmodules = on-demand + prune = true +[pull] + ff = only +[merge] + tool = conflictmarker + conflictstyle = diff3 +[mergetool "conflictmarker"] + cmd = $EDITOR "$MERGED" +[commit] + gpgsign = true +[status] + showUntrackedFiles = all + submoduleSummary = true +[help] + autocorrect = 1 +[log] + abbrevCommit = true +[interactive] + singleKey = true + diffFilter = delta --color-only +#[remote "origin"] +# fetch = +refs/pull/*/head:refs/remotes/origin/pr/* +[sendemail] + smtpServer = localhost + smtpUser = sommerfeld@strisemarx.com + smtpEncryption = tls + smtpServerPort = 1025 + annotate = true +[format] + signOff = true +[advice] + detachedHead = false + skippedCherryPicks = false +[delta] + navigate = true + syntax-theme = gruvbox-dark + relative-paths = true +[alias] + cl = clone + br = branch -vv + c = commit + ca = commit --amend --no-edit + cp = cherry-pick + sw = switch --recurse-submodules + swc = switch --recurse-submodules -c + swd = switch --recurse-submodules -d + rt = restore + res = reset + s = status --branch --short + m = merge + mt = mergetool + ff = merge --ff-only + r = rebase + rb = rebase + ri = rebase -i + p = push + fp = push --force-with-lease + f = fetch + fa = fetch --all + d = diff + staged = diff --cached + dt = difftool + a = add + stage = add + st = add + sub = submodule + subf = submodule foreach + re = remote -v + ra = remote add + rs = remote set-url + rr = remote remove + st = stash + sp = stash pop + sd = stash drop + sl = stash list + ss = stash show + del = branch -D + unstage = reset HEAD -- + last = log -1 HEAD + undo = reset --hard + l = log --abbrev-commit -200 --graph --date=short --pretty=oneline + update=!git fetch && git merge --ff-only + fr=!git fetch && git rebase + find-merge = "!sh -c 'commit=$0 && branch=${1:-HEAD} && (git rev-list $commit..$branch --ancestry-path | cat -n; git rev-list $commit..$branch --first-parent | cat -n) | sort -k2 -s | uniq -f1 -d | sort -n | tail -1 | cut -f2'" + gone = !git for-each-ref --format '%(refname:short) %(upstream:track)' | awk '$2 == \"[gone]\" {print $1}' | xargs -r git branch -D + ab=absorb --and-rebase diff --git a/home/.config/git/ignore b/home/.config/git/ignore new file mode 100644 index 0000000..aece5c8 --- /dev/null +++ b/home/.config/git/ignore @@ -0,0 +1,558 @@ +# perf +perf.data* + +# Vim +.exrc +.doit.lua + +# Swap +[._]*.s[a-v][a-z] +[._]*.sw[a-p] +[._]s[a-rt-v][a-z] +[._]ss[a-gi-z] +[._]sw[a-p] + +# Session +Session.vim + +# Temporary +.netrwhist +*~ +# Auto-generated tag files +tags +tags.* +# Persistent undo +[._]*.un~ + +# Tags +# Ignore tags created by etags, ctags, gtags (GNU global) and cscope +TAGS +.TAGS +tags +.tags +gtags.files +GTAGS +GRTAGS +GPATH +GSYMS +cscope.files +cscope.out +cscope.in.out +cscope.po.out + +# C++ + +# Compiled Object files +*.slo +*.lo +*.o +*.obj + +# Precompiled Headers +*.gch +*.pch + +# Compiled Dynamic libraries +*.so +*.dylib +*.dll + +# Fortran module files +*.mod +*.smod + +# Compiled Static libraries +*.lai +*.la +*.a +*.lib + +# Executables +*.out +*.app + +# C + +# Object files +*.o +*.ko +*.obj +*.elf + +# Linker output +*.ilk +# *.map +*.exp + +# Precompiled Headers +*.gch +*.pch + +# Libraries +*.lib +*.a +*.la +*.lo + +# Shared objects (inc. Windows DLLs) +*.dll +*.so +*.so.* +*.dylib + +# Executables +*.out +*.app +*.i*86 +*.x86_64 +*.hex + +# Debug files +*.dSYM/ +*.su +*.idb +*.pdb + +# Kernel Module Compile Results +*.mod* +*.cmd +.tmp_versions/ +modules.order +Module.symvers +Mkfile.old +dkms.conf + +# archive files + +# It's better to unpack these files and commit the raw source because +# git has its own built in compression methods. +*.7z +*.jar +*.rar +*.zip +*.gz +*.tgz +*.bzip +*.bz2 +*.xz +*.lzma +*.cab + +# Packing-only formats +*.iso +*.tar + +# Package management formats +*.dmg +*.xpi +*.gem +*.egg +*.deb +*.rpm +*.msi +*.msm +*.msp + +# Diff +*.patch +*.diff + +# Clion +# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm +# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 + +# User-specific stuff +.idea/ + +# CMake +cmake-build-*/ +build*/ +build +build-release +build-reldbg + +# File-based project format +*.iws + +# IntelliJ +out/ + +# mpeltonen/sbt-idea plugin +.idea_modules/ + +# Crashlytics plugin (for Android Studio and IntelliJ) +com_crashlytics_export_strings.xml +crashlytics.properties +crashlytics-build.properties +fabric.properties + +# Linux +*~ + +# temporary files which can be created if a process still has a handle open of a deleted file +.fuse_hidden* + +# KDE directory preferences +.directory + +# Linux trash folder which might appear on any partition or disk +.Trash-* + +# .nfs files are created when an open file is removed but is still being accessed +.nfs* + +# LibreOffice locks +.~lock.*# + +# backup +*.bak +*.gho +*.ori +*.tmp + +# Cmake +CMakeLists.txt.user +CMakeCache.txt +CMakeFiles +CMakeScripts +Testing +# Makefile +cmake_install.cmake +install_manifest.txt +compile_commands.json +CTestTestfile.cmake + +# CUDA +*.i +*.ii +*.gpu +*.ptx +*.cubin +*.fatbin + +# Python +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so + +# Distribution / packaging +.Python +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +# lib/ +lib64/ +parts/ +sdist/ +var/ +wheels/ +share/python-wheels/ +*.egg-info/ +.installed.cfg +*.egg +MANIFEST + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.nox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*.cover +.hypothesis/ +.pytest_cache/ + +# Translations +*.mo +*.pot + +# PyBuilder +target/ + +# Jupyter Notebook +.ipynb_checkpoints + +# IPython +# profile_default/ +# ipython_config.py + +# pyenv +.python-version + +# Environments +.env +.venv +# env/ +venv/ +ENV/ +env.bak/ +venv.bak/ + +# Latex +## Core latex/pdflatex auxiliary files: +*.aux +*.lof +*.log +*.lot +*.fls +*.out +*.toc +*.fmt +*.fot +*.cb +*.cb2 +.*.lb + +## Intermediate documents: +*.dvi +*.xdv +*-converted-to.* +# these rules might exclude image files for figures etc. +# *.ps +# *.eps +# *.pdf + +## Generated if empty string is given at "Please type another file name for output:" +.pdf + +## Bibliography auxiliary files (bibtex/biblatex/biber): +*.bbl +*.bcf +*.blg +*-blx.aux +*-blx.bib +*.run.xml + +## Build tool auxiliary files: +*.fdb_latexmk +*.synctex +*.synctex(busy) +*.synctex.gz +*.synctex.gz(busy) +*.pdfsync + +## Build tool directories for auxiliary files +# latexrun +latex.out/ + +## Auxiliary and intermediate files from other packages: +# algorithms +*.alg +*.loa + +# achemso +acs-*.bib + +# amsthm +*.thm + +# beamer +*.nav +*.pre +*.snm +*.vrb + +# changes +*.soc + +# comment +*.cut + +# cprotect +*.cpt + +# elsarticle (documentclass of Elsevier journals) +*.spl + +# endnotes +*.ent + +# fixme +*.lox + +# feynmf/feynmp +*.mf +*.mp +*.t[1-9] +*.t[1-9][0-9] +*.tfm + +# glossaries +*.acn +*.acr +*.glg +*.glo +*.gls +*.glsdefs + +# gnuplottex +*-gnuplottex-* + +# gregoriotex +*.gaux +*.gtex + +# htlatex +*.4ct +*.4tc +*.idv +*.lg +*.trc +*.xref + +# hyperref +*.brf + +# knitr +*-concordance.tex +# TODO Comment the next line if you want to keep your tikz graphics files +*.tikz +*-tikzDictionary + +# listings +*.lol + +# makeidx +*.idx +*.ilg +*.ind +*.ist + +# minitoc +*.maf +*.mlf +*.mlt +*.mtc[0-9]* +*.slf[0-9]* +*.slt[0-9]* +*.stc[0-9]* + +# minted +_minted* +*.pyg + +# morewrites +*.mw + +# nomencl +*.nlg +*.nlo +*.nls + +# pax +*.pax + +# pdfpcnotes +*.pdfpc + +# sagetex +*.sagetex.sage +*.sagetex.py +*.sagetex.scmd + +# scrwfile +*.wrt + +# sympy +*.sout +*.sympy +sympy-plots-for-*.tex/ + +# pdfcomment +*.upa +*.upb + +# pythontex +*.pytxcode +pythontex-files-*/ + +# tcolorbox +*.listing + +# thmtools +*.loe + +# TikZ & PGF +*.dpth +*.md5 +*.auxlock + +# todonotes +*.tdo + +# vhistory +*.hst +*.ver + +# easy-todo +*.lod + +# xcolor +*.xcp + +# xmpincl +*.xmpi + +# xindy +*.xdy + +# xypic precompiled matrices +*.xyc + +# endfloat +*.ttt +*.fff + +## Editors: +# WinEdt +*.bak +*.sav + +# Kile +*.backup + +# KBibTeX +*~[0-9]* + +# auto folder when using emacs and auctex +./auto/* +*.el + +# expex forward references with \gathertags +*-tags.tex + +# standalone packages +*.sta + +# ccls +.ccls-cache + +# clangd +.clangd + +# pkgs + +.SRCINFO +*.tar.gz +*.zip +*.tar.zst diff --git a/home/.config/git/noattributes b/home/.config/git/noattributes new file mode 100644 index 0000000..2fe1baf --- /dev/null +++ b/home/.config/git/noattributes @@ -0,0 +1,389 @@ +# Sources +*.c text diff=c +*.cc text diff=cpp +*.cxx text diff=cpp +*.cpp text diff=cpp +*.c++ text diff=cpp +*.hpp text diff=cpp +*.h text diff=c +*.h++ text diff=cpp +*.hh text diff=cpp +*.hxx text diff=cpp +*.def text diff=c + +# Compiled Object files +*.slo binary +*.lo binary +*.o binary +*.obj binary + +# Precompiled Headers +*.gch binary +*.pch binary + +# Compiled Dynamic libraries +*.so binary +*.dylib binary +*.dll binary + +# Compiled Static libraries +*.lai binary +*.la binary +*.a binary +*.lib binary + +# Executables +*.exe binary +*.out binary +*.app binary +# Common settings that generally should always be used with your language specific settings + +# Auto detect text files and perform LF normalization +# https://www.davidlaing.com/2012/09/19/customise-your-gitattributes-to-become-a-git-ninja/ +* text=auto + +# +# The above will handle all files NOT found below +# + +# Documents +*.bibtex text diff=bibtex +*.doc diff=astextplain +*.DOC diff=astextplain +*.docx diff=astextplain +*.DOCX diff=astextplain +*.dot diff=astextplain +*.DOT diff=astextplain +*.pdf diff=astextplain +*.PDF diff=astextplain +*.rtf diff=astextplain +*.RTF diff=astextplain +*.md text +*.tex text diff=tex +*.adoc text +*.textile text +*.mustache text +*.csv text +*.tab text +*.tsv text +*.txt text +*.sql text + +# Graphics +*.png binary +*.jpg binary +*.jpeg binary +*.gif binary +*.tif binary +*.tiff binary +*.ico binary +# SVG treated as an asset (binary) by default. +*.svg text +# If you want to treat it as binary, +# use the following line instead. +# *.svg binary +*.eps binary + +# Scripts +*.bash text eol=lf +*.fish text eol=lf +*.sh text eol=lf +# These are explicitly windows files and should use crlf +*.bat text eol=crlf +*.cmd text eol=crlf +*.ps1 text eol=crlf + +# Serialisation +*.json text +*.toml text +*.xml text +*.yaml text +*.yml text + +# Archives +*.7z binary +*.gz binary +*.tar binary +*.tgz binary +*.zip binary + +# Text files where line endings should be preserved +*.patch -text + +# +# Exclude files from exporting +# + +.gitattributes export-ignore +.gitignore export-ignore +# Treat all Go files in this repo as binary, with no git magic updating +# line endings. Windows users contributing to Go will need to use a +# modern version of git and editors capable of LF line endings. + +*.go -text diff=golang +# Basic .gitattributes for a Lua repo. + +# Source files +# ============ +*.lua text + +# Luadoc output +# ============= +*.html text diff=html +*.css text diff=css +# Basic .gitattributes for a MATLAB repo. +# This template includes Simulink and MuPAD extensions, in addition +# to the MATLAB extensions. + +# Source files +# ============ +*.m text diff=matlab +*.mu text diff=matlab + +# Caution: *.m also matches Mathematica packages. + +# Binary files +# ============ +*.p binary +*.mex* binary +*.fig binary +*.mat binary +*.mdl binary +*.slx binary +*.mdlp binary +*.slxp binary +*.sldd binary +*.mltbx binary +*.mlappinstall binary +*.mlpkginstall binary +*.mn binary +# Basic .gitattributes for a perl repo. + +# Source files +# ============ +*.pl text diff=perl +*.pm text diff=perl +# Basic .gitattributes for a python repo. + +# Source files +# ============ +*.pxd text diff=python +*.py text diff=python +*.py3 text diff=python +*.pyw text diff=python +*.pyx text diff=python +*.pyz text diff=python + +# Binary files +# ============ +*.db binary +*.p binary +*.pkl binary +*.pickle binary +*.pyc binary +*.pyd binary +*.pyo binary + +# Jupyter notebook +*.ipynb text + +# Note: .db, .p, and .pkl files are associated +# with the python modules ``pickle``, ``dbm.*``, +# ``shelve``, ``marshal``, ``anydbm``, & ``bsddb`` +# (among others). +## GITATTRIBUTES FOR WEB PROJECTS +# +# These settings are for any web project. +# +# Details per file setting: +# text These files should be normalized (i.e. convert CRLF to LF). +# binary These files are binary and should be left untouched. +# +# Note that binary is a macro for -text -diff. +###################################################################### + +# Auto detect +## Handle line endings automatically for files detected as +## text and leave all files detected as binary untouched. +## This will handle all files NOT defined below. +* text=auto + +# Source code +*.bash text eol=lf +*.bat text eol=crlf +*.cmd text eol=crlf +*.coffee text +*.css text +*.htm text diff=html +*.html text diff=html +*.inc text +*.ini text +*.js text +*.json text +*.jsx text +*.less text +*.ls text +*.map text -diff +*.od text +*.onlydata text +*.php text diff=php +*.pl text +*.ps1 text eol=crlf +*.py text diff=python +*.rb text diff=ruby +*.sass text +*.scm text +*.scss text diff=css +*.sh text eol=lf +*.sql text +*.styl text +*.tag text +*.ts text +*.tsx text +*.xml text +*.xhtml text diff=html + +# Docker +Dockerfile text + +# Documentation +*.ipynb text +*.markdown text +*.md text +*.mdwn text +*.mdown text +*.mkd text +*.mkdn text +*.mdtxt text +*.mdtext text +*.txt text +AUTHORS text +CHANGELOG text +CHANGES text +CONTRIBUTING text +COPYING text +copyright text +*COPYRIGHT* text +INSTALL text +license text +LICENSE text +NEWS text +readme text +*README* text +TODO text + +# Templates +*.dot text +*.ejs text +*.haml text +*.handlebars text +*.hbs text +*.hbt text +*.jade text +*.latte text +*.mustache text +*.njk text +*.phtml text +*.tmpl text +*.tpl text +*.twig text +*.vue text + +# Configs +*.cnf text +*.conf text +*.config text +.editorconfig text +.env text +.gitattributes text +.gitconfig text +.htaccess text +*.lock text -diff +package-lock.json text -diff +*.toml text +*.yaml text +*.yml text +browserslist text +Makefile text +makefile text + +# Heroku +Procfile text + +# Graphics +*.ai binary +*.bmp binary +*.eps binary +*.gif binary +*.gifv binary +*.ico binary +*.jng binary +*.jp2 binary +*.jpg binary +*.jpeg binary +*.jpx binary +*.jxr binary +*.pdf binary +*.png binary +*.psb binary +*.psd binary +# SVG treated as an asset (binary) by default. +*.svg text +# If you want to treat it as binary, +# use the following line instead. +# *.svg binary +*.svgz binary +*.tif binary +*.tiff binary +*.wbmp binary +*.webp binary + +# Audio +*.kar binary +*.m4a binary +*.mid binary +*.midi binary +*.mp3 binary +*.ogg binary +*.ra binary + +# Video +*.3gpp binary +*.3gp binary +*.as binary +*.asf binary +*.asx binary +*.fla binary +*.flv binary +*.m4v binary +*.mng binary +*.mov binary +*.mp4 binary +*.mpeg binary +*.mpg binary +*.ogv binary +*.swc binary +*.swf binary +*.webm binary + +# Archives +*.7z binary +*.gz binary +*.jar binary +*.rar binary +*.tar binary +*.zip binary + +# Fonts +*.ttf binary +*.eot binary +*.otf binary +*.woff binary +*.woff2 binary + +# Executables +*.exe binary +*.pyc binary + +# RC files (like .babelrc or .eslintrc) +*.*rc text diff --git a/home/.config/gtk-2.0/gtkfilechooser.ini b/home/.config/gtk-2.0/gtkfilechooser.ini new file mode 100644 index 0000000..3de31bf --- /dev/null +++ b/home/.config/gtk-2.0/gtkfilechooser.ini @@ -0,0 +1,11 @@ +[Filechooser Settings] +LocationMode=path-bar +ShowHidden=false +ShowSizeColumn=true +GeometryX=0 +GeometryY=0 +GeometryWidth=780 +GeometryHeight=585 +SortColumn=name +SortOrder=ascending +StartupMode=recent diff --git a/home/.config/gtk-2.0/gtkrc-2.0 b/home/.config/gtk-2.0/gtkrc-2.0 new file mode 100644 index 0000000..f6ec1f2 --- /dev/null +++ b/home/.config/gtk-2.0/gtkrc-2.0 @@ -0,0 +1,18 @@ +gtk-theme-name="Adwaita" +gtk-icon-theme-name="Adwaita" +gtk-font-name="Sans 11" +gtk-cursor-theme-name="Adwaita" +gtk-cursor-theme-size=0 +gtk-toolbar-style=GTK_TOOLBAR_TEXT +gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR +gtk-button-images=0 +gtk-menu-images=0 +gtk-enable-event-sounds=0 +gtk-enable-input-feedback-sounds=0 +gtk-menu-popup-delay = 0 +gtk-xft-antialias=1 +gtk-menu-popup-delay = 0 +gtk-xft-hinting=1 +gtk-xft-hintstyle="hintfull" +gtk-xft-rgba="rgb" +gtk-decoration-layout="menu:" diff --git a/home/.config/gtk-3.0/gtk.css b/home/.config/gtk-3.0/gtk.css new file mode 100644 index 0000000..300f8fc --- /dev/null +++ b/home/.config/gtk-3.0/gtk.css @@ -0,0 +1,41 @@ +.window-frame, .window-frame:backdrop { + box-shadow: 0 0 0 black; + border-style: none; + margin: 0; + border-radius: 0; +} + +.titlebar { + border-radius: 0; +} + +.window-frame.csd.popup { + box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(0, 0, 0, 0.13); +} + +.header-bar { + background-image: none; + background-color: #ededed; + box-shadow: none; +} +GtkLabel.title { + opacity: 0; +} +/* Always use background color */ +GtkWindow { + background-color: @theme_bg_color; +} + +/* Fix tooltip background override */ +.tooltip { + background-color: rgba(0, 0, 0, 0.8); +} + +.tooltip * { + background-color: transparent; +} + +/* Fix Nautilus desktop window background override */ +NautilusWindow { + background-color: transparent; +} diff --git a/home/.config/gtk-3.0/settings.ini b/home/.config/gtk-3.0/settings.ini new file mode 100644 index 0000000..2f11428 --- /dev/null +++ b/home/.config/gtk-3.0/settings.ini @@ -0,0 +1,20 @@ +[Settings] +gtk-theme-name=Adwaita +gtk-icon-theme-name=Adwaita +gtk-font-name=Sans 11 +gtk-cursor-theme-name=Adwaita +gtk-cursor-theme-size=0 +gtk-toolbar-style=GTK_TOOLBAR_TEXT +gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR +gtk-button-images=0 +gtk-menu-images=0 +gtk-enable-event-sounds=0 +gtk-enable-input-feedback-sounds=0 +gtk-enable-primary-paste=false +gtk-xft-antialias=1 +gtk-menu-popup-delay = 0 +gtk-xft-hinting=1 +gtk-xft-hintstyle=hintfull +gtk-xft-rgba=rgb +gtk-decoration-layout=menu: +gtk-application-prefer-dark-theme=1 diff --git a/home/.config/htop/htoprc b/home/.config/htop/htoprc new file mode 100644 index 0000000..c4bf0fc --- /dev/null +++ b/home/.config/htop/htoprc @@ -0,0 +1,63 @@ +# Beware! This file is rewritten by htop when settings are changed in the interface. +# The parser is also very primitive, and not human-friendly. +htop_version=3.2.2 +config_reader_min_version=3 +fields=0 17 18 20 48 2 50 113 46 47 39 1 +hide_kernel_threads=1 +hide_userland_threads=1 +hide_running_in_container=0 +shadow_other_users=1 +show_thread_names=0 +show_program_path=0 +highlight_base_name=1 +highlight_deleted_exe=1 +shadow_distribution_path_prefix=0 +highlight_megabytes=1 +highlight_threads=1 +highlight_changes=1 +highlight_changes_delay_secs=5 +find_comm_in_cmdline=1 +strip_exe_from_cmdline=1 +show_merged_command=0 +header_margin=0 +screen_tabs=0 +detailed_cpu_time=1 +cpu_count_from_one=1 +show_cpu_usage=1 +show_cpu_frequency=1 +show_cpu_temperature=1 +degree_fahrenheit=0 +update_process_names=1 +account_guest_in_cpu_meter=1 +color_scheme=5 +enable_mouse=0 +delay=15 +hide_function_bar=2 +header_layout=two_50_50 +column_meters_0=Uptime Systemd Tasks LoadAverage Load CPU AllCPUs2 CPU +column_meter_modes_0=2 2 2 1 3 1 1 3 +column_meters_1=Memory Swap Memory DiskIO DiskIO NetworkIO NetworkIO +column_meter_modes_1=1 2 3 2 3 2 3 +tree_view=1 +sort_key=46 +tree_sort_key=0 +sort_direction=-1 +tree_sort_direction=1 +tree_view_always_by_pid=0 +all_branches_collapsed=0 +screen:Main=PID PRIORITY NICE STARTTIME USER STATE NLWP OOM PERCENT_CPU PERCENT_MEM M_RESIDENT Command +.sort_key=PERCENT_CPU +.tree_sort_key=PID +.tree_view=1 +.tree_view_always_by_pid=0 +.sort_direction=-1 +.tree_sort_direction=1 +.all_branches_collapsed=0 +screen:I/O=PID USER IO_PRIORITY IO_RATE IO_READ_RATE IO_WRITE_RATE PERCENT_SWAP_DELAY PERCENT_IO_DELAY Command +.sort_key=IO_RATE +.tree_sort_key=PID +.tree_view=0 +.tree_view_always_by_pid=0 +.sort_direction=-1 +.tree_sort_direction=1 +.all_branches_collapsed=0 diff --git a/home/.config/ipython/profile_default/ipython_config.py b/home/.config/ipython/profile_default/ipython_config.py new file mode 100644 index 0000000..59fcd64 --- /dev/null +++ b/home/.config/ipython/profile_default/ipython_config.py @@ -0,0 +1,625 @@ +# Configuration file for ipython. + +#------------------------------------------------------------------------------ +# InteractiveShellApp(Configurable) configuration +#------------------------------------------------------------------------------ + +## A Mixin for applications that start InteractiveShell instances. +# +# Provides configurables for loading extensions and executing files as part of +# configuring a Shell environment. +# +# The following methods should be called by the :meth:`initialize` method of the +# subclass: +# +# - :meth:`init_path` +# - :meth:`init_shell` (to be implemented by the subclass) +# - :meth:`init_gui_pylab` +# - :meth:`init_extensions` +# - :meth:`init_code` + +## Execute the given command string. +#c.InteractiveShellApp.code_to_run = '' + +## Run the file referenced by the PYTHONSTARTUP environment variable at IPython +# startup. +#c.InteractiveShellApp.exec_PYTHONSTARTUP = True + +## List of files to run at IPython startup. +#c.InteractiveShellApp.exec_files = [] + +## lines of code to run at IPython startup. +#c.InteractiveShellApp.exec_lines = [] + +## A list of dotted module names of IPython extensions to load. +#c.InteractiveShellApp.extensions = [] + +## dotted module name of an IPython extension to load. +#c.InteractiveShellApp.extra_extension = '' + +## A file to be run +#c.InteractiveShellApp.file_to_run = '' + +## Enable GUI event loop integration with any of ('asyncio', 'glut', 'gtk', +# 'gtk2', 'gtk3', 'osx', 'pyglet', 'qt', 'qt4', 'qt5', 'tk', 'wx', 'gtk2', +# 'qt4'). +#c.InteractiveShellApp.gui = None + +## Should variables loaded at startup (by startup files, exec_lines, etc.) be +# hidden from tools like %who? +#c.InteractiveShellApp.hide_initial_ns = True + +## If True, IPython will not add the current working directory to sys.path. When +# False, the current working directory is added to sys.path, allowing imports of +# modules defined in the current directory. +#c.InteractiveShellApp.ignore_cwd = False + +## Configure matplotlib for interactive use with the default matplotlib backend. +# c.InteractiveShellApp.matplotlib = 'auto' + +## Run the module as a script. +#c.InteractiveShellApp.module_to_run = '' + +## Pre-load matplotlib and numpy for interactive use, selecting a particular +# matplotlib backend and loop integration. +#c.InteractiveShellApp.pylab = None + +## If true, IPython will populate the user namespace with numpy, pylab, etc. and +# an ``import *`` is done from numpy and pylab, when using pylab mode. +# +# When False, pylab mode should not import any names into the user namespace. +#c.InteractiveShellApp.pylab_import_all = True + +## Reraise exceptions encountered loading IPython extensions? +#c.InteractiveShellApp.reraise_ipython_extension_failures = False + +#------------------------------------------------------------------------------ +# Application(SingletonConfigurable) configuration +#------------------------------------------------------------------------------ + +## This is an application. + +## The date format used by logging formatters for %(asctime)s +#c.Application.log_datefmt = '%Y-%m-%d %H:%M:%S' + +## The Logging format template +#c.Application.log_format = '[%(name)s]%(highlevel)s %(message)s' + +## Set the log level by value or name. +#c.Application.log_level = 30 + +#------------------------------------------------------------------------------ +# BaseIPythonApplication(Application) configuration +#------------------------------------------------------------------------------ + +## IPython: an enhanced interactive Python shell. + +## Whether to create profile dir if it doesn't exist +# c.BaseIPythonApplication.auto_create = True + +## Whether to install the default config files into the profile dir. If a new +# profile is being created, and IPython contains config files for that profile, +# then they will be staged into the new directory. Otherwise, default config +# files will be automatically generated. +#c.BaseIPythonApplication.copy_config_files = False + +## Path to an extra config file to load. +# +# If specified, load this config file in addition to any other IPython config. +#c.BaseIPythonApplication.extra_config_file = '' + +## The name of the IPython directory. This directory is used for logging +# configuration (through profiles), history storage, etc. The default is usually +# $HOME/.ipython. This option can also be specified through the environment +# variable IPYTHONDIR. +#c.BaseIPythonApplication.ipython_dir = '' + +## Whether to overwrite existing config files when copying +#c.BaseIPythonApplication.overwrite = False + +## The IPython profile to use. +#c.BaseIPythonApplication.profile = 'default' + +## Create a massive crash report when IPython encounters what may be an internal +# error. The default is to append a short message to the usual traceback +#c.BaseIPythonApplication.verbose_crash = False + +#------------------------------------------------------------------------------ +# TerminalIPythonApp(BaseIPythonApplication,InteractiveShellApp) configuration +#------------------------------------------------------------------------------ + +## Whether to display a banner upon starting IPython. +#c.TerminalIPythonApp.display_banner = True + +## If a command or file is given via the command-line, e.g. 'ipython foo.py', +# start an interactive shell after executing the file or command. +#c.TerminalIPythonApp.force_interact = False + +## Class to use to instantiate the TerminalInteractiveShell object. Useful for +# custom Frontends +#c.TerminalIPythonApp.interactive_shell_class = 'IPython.terminal.interactiveshell.TerminalInteractiveShell' + +## Start IPython quickly by skipping the loading of config files. +#c.TerminalIPythonApp.quick = False + +#------------------------------------------------------------------------------ +# InteractiveShell(SingletonConfigurable) configuration +#------------------------------------------------------------------------------ + +## An enhanced, interactive shell for Python. + +## 'all', 'last', 'last_expr' or 'none', 'last_expr_or_assign' specifying which +# nodes should be run interactively (displaying output from expressions). +#c.InteractiveShell.ast_node_interactivity = 'last_expr' + +## A list of ast.NodeTransformer subclass instances, which will be applied to +# user input before code is run. +#c.InteractiveShell.ast_transformers = [] + +## Automatically run await statement in the top level repl. +#c.InteractiveShell.autoawait = True + +## Make IPython automatically call any callable object even if you didn't type +# explicit parentheses. For example, 'str 43' becomes 'str(43)' automatically. +# The value can be '0' to disable the feature, '1' for 'smart' autocall, where +# it is not applied if there are no more arguments on the line, and '2' for +# 'full' autocall, where all callable objects are automatically called (even if +# no arguments are present). +#c.InteractiveShell.autocall = 0 + +## Autoindent IPython code entered interactively. +#c.InteractiveShell.autoindent = True + +## Enable magic commands to be called without the leading %. +#c.InteractiveShell.automagic = True + +## The part of the banner to be printed before the profile +#c.InteractiveShell.banner1 = "Python 3.8.2 (default, Apr 8 2020, 14:31:25) \nType 'copyright', 'credits' or 'license' for more information\nIPython 7.14.0 -- An enhanced Interactive Python. Type '?' for help.\n" +c.InteractiveShell.banner1 = "" + +## The part of the banner to be printed after the profile +#c.InteractiveShell.banner2 = '' + +## Set the size of the output cache. The default is 1000, you can change it +# permanently in your config file. Setting it to 0 completely disables the +# caching system, and the minimum value accepted is 3 (if you provide a value +# less than 3, it is reset to 0 and a warning is issued). This limit is defined +# because otherwise you'll spend more time re-flushing a too small cache than +# working +#c.InteractiveShell.cache_size = 1000 + +## Use colors for displaying information about objects. Because this information +# is passed through a pager (like 'less'), and some pagers get confused with +# color codes, this capability can be turned off. +#c.InteractiveShell.color_info = True + +## Set the color scheme (NoColor, Neutral, Linux, or LightBG). +#c.InteractiveShell.colors = 'Neutral' +c.InteractiveShell.colors = 'Linux' + +## +#c.InteractiveShell.debug = False + +## Don't call post-execute functions that have failed in the past. +#c.InteractiveShell.disable_failing_post_execute = False + +## If True, anything that would be passed to the pager will be displayed as +# regular output instead. +#c.InteractiveShell.display_page = False + +## (Provisional API) enables html representation in mime bundles sent to pagers. +c.InteractiveShell.enable_html_pager = True + +## Total length of command history +#c.InteractiveShell.history_length = 10000 + +## The number of saved history entries to be loaded into the history buffer at +# startup. +#c.InteractiveShell.history_load_length = 1000 + +## +#c.InteractiveShell.ipython_dir = '' + +## Start logging to the given file in append mode. Use `logfile` to specify a log +# file to **overwrite** logs to. +#c.InteractiveShell.logappend = '' + +## The name of the logfile to use. +#c.InteractiveShell.logfile = '' + +## Start logging to the default log file in overwrite mode. Use `logappend` to +# specify a log file to **append** logs to. +#c.InteractiveShell.logstart = False + +## Select the loop runner that will be used to execute top-level asynchronous +# code +#c.InteractiveShell.loop_runner = 'IPython.core.interactiveshell._asyncio_runner' + +## +#c.InteractiveShell.object_info_string_level = 0 + +## Automatically call the pdb debugger after every exception. +#c.InteractiveShell.pdb = False + +## Deprecated since IPython 4.0 and ignored since 5.0, set +# TerminalInteractiveShell.prompts object directly. +#c.InteractiveShell.prompt_in1 = 'In [\\#]: ' + +## Deprecated since IPython 4.0 and ignored since 5.0, set +# TerminalInteractiveShell.prompts object directly. +#c.InteractiveShell.prompt_in2 = ' .\\D.: ' + +## Deprecated since IPython 4.0 and ignored since 5.0, set +# TerminalInteractiveShell.prompts object directly. +#c.InteractiveShell.prompt_out = 'Out[\\#]: ' + +## Deprecated since IPython 4.0 and ignored since 5.0, set +# TerminalInteractiveShell.prompts object directly. +#c.InteractiveShell.prompts_pad_left = True + +## +#c.InteractiveShell.quiet = False + +## +#c.InteractiveShell.separate_in = '\n' + +## +#c.InteractiveShell.separate_out = '' + +## +#c.InteractiveShell.separate_out2 = '' + +## Show rewritten input, e.g. for autocall. +#c.InteractiveShell.show_rewritten_input = True + +## Enables rich html representation of docstrings. (This requires the docrepr +# module). +#c.InteractiveShell.sphinxify_docstring = False + +## +#c.InteractiveShell.wildcards_case_sensitive = True + +## Switch modes for the IPython exception handlers. +#c.InteractiveShell.xmode = 'Context' + +#------------------------------------------------------------------------------ +# TerminalInteractiveShell(InteractiveShell) configuration +#------------------------------------------------------------------------------ + +## Autoformatter to reformat Terminal code. Can be `'black'` or `None` +#c.TerminalInteractiveShell.autoformatter = None + +## Set to confirm when you try to exit IPython with an EOF (Control-D in Unix, +# Control-Z/Enter in Windows). By typing 'exit' or 'quit', you can force a +# direct exit without any confirmation. +c.TerminalInteractiveShell.confirm_exit = False + +## Options for displaying tab completions, 'column', 'multicolumn', and +# 'readlinelike'. These options are for `prompt_toolkit`, see `prompt_toolkit` +# documentation for more information. +#c.TerminalInteractiveShell.display_completions = 'multicolumn' + +## Shortcut style to use at the prompt. 'vi' or 'emacs'. +#c.TerminalInteractiveShell.editing_mode = 'emacs' + +## Set the editor used by IPython (default to $EDITOR/vi/notepad). +#c.TerminalInteractiveShell.editor = 'nvim' + +## Allows to enable/disable the prompt toolkit history search +#c.TerminalInteractiveShell.enable_history_search = True + +## Enable vi (v) or Emacs (C-X C-E) shortcuts to open an external editor. This is +# in addition to the F2 binding, which is always enabled. +c.TerminalInteractiveShell.extra_open_editor_shortcuts = True + +## Provide an alternative handler to be called when the user presses Return. This +# is an advanced option intended for debugging, which may be changed or removed +# in later releases. +#c.TerminalInteractiveShell.handle_return = None + +## Highlight matching brackets. +#c.TerminalInteractiveShell.highlight_matching_brackets = True + +## The name or class of a Pygments style to use for syntax highlighting. To see +# available styles, run `pygmentize -L styles`. +#c.TerminalInteractiveShell.highlighting_style = traitlets.Undefined + +## Override highlighting format for specific tokens +#c.TerminalInteractiveShell.highlighting_style_overrides = {} + +## +#c.TerminalInteractiveShell.mime_renderers = {} + +## Enable mouse support in the prompt (Note: prevents selecting text with the +# mouse) +#c.TerminalInteractiveShell.mouse_support = False + +## Display the current vi mode (when using vi editing mode). +#c.TerminalInteractiveShell.prompt_includes_vi_mode = True + +## Class used to generate Prompt token for prompt_toolkit +#c.TerminalInteractiveShell.prompts_class = 'IPython.terminal.prompts.Prompts' + +## Use `raw_input` for the REPL, without completion and prompt colors. +# +# Useful when controlling IPython as a subprocess, and piping STDIN/OUT/ERR. +# Known usage are: IPython own testing machinery, and emacs inferior-shell +# integration through elpy. +# +# This mode default to `True` if the `IPY_TEST_SIMPLE_PROMPT` environment +# variable is set, or the current terminal is not a tty. +#c.TerminalInteractiveShell.simple_prompt = False + +## Number of line at the bottom of the screen to reserve for the completion menu +#c.TerminalInteractiveShell.space_for_menu = 6 + +## Automatically set the terminal title +#c.TerminalInteractiveShell.term_title = True + +## Customize the terminal title format. This is a python format string. +# Available substitutions are: {cwd}. +#c.TerminalInteractiveShell.term_title_format = 'IPython: {cwd}' + +## Use 24bit colors instead of 256 colors in prompt highlighting. If your +# terminal supports true color, the following command should print 'TRUECOLOR' +# in orange: printf "\x1b[38;2;255;100;0mTRUECOLOR\x1b[0m\n" +#c.TerminalInteractiveShell.true_color = False + +#------------------------------------------------------------------------------ +# HistoryAccessor(HistoryAccessorBase) configuration +#------------------------------------------------------------------------------ + +## Access the history database without adding to it. +# +# This is intended for use by standalone history tools. IPython shells use +# HistoryManager, below, which is a subclass of this. + +## Options for configuring the SQLite connection +# +# These options are passed as keyword args to sqlite3.connect when establishing +# database connections. +#c.HistoryAccessor.connection_options = {} + +## enable the SQLite history +# +# set enabled=False to disable the SQLite history, in which case there will be +# no stored history, no SQLite connection, and no background saving thread. +# This may be necessary in some threaded environments where IPython is embedded. +#c.HistoryAccessor.enabled = True + +## Path to file to use for SQLite history database. +# +# By default, IPython will put the history database in the IPython profile +# directory. If you would rather share one history among profiles, you can set +# this value in each, so that they are consistent. +# +# Due to an issue with fcntl, SQLite is known to misbehave on some NFS mounts. +# If you see IPython hanging, try setting this to something on a local disk, +# e.g:: +# +# ipython --HistoryManager.hist_file=/tmp/ipython_hist.sqlite +# +# you can also use the specific value `:memory:` (including the colon at both +# end but not the back ticks), to avoid creating an history file. +#c.HistoryAccessor.hist_file = '' + +#------------------------------------------------------------------------------ +# HistoryManager(HistoryAccessor) configuration +#------------------------------------------------------------------------------ + +## A class to organize all history-related functionality in one place. + +## Write to database every x commands (higher values save disk access & power). +# Values of 1 or less effectively disable caching. +#c.HistoryManager.db_cache_size = 0 + +## Should the history database include output? (default: no) +#c.HistoryManager.db_log_output = False + +#------------------------------------------------------------------------------ +# ProfileDir(LoggingConfigurable) configuration +#------------------------------------------------------------------------------ + +## An object to manage the profile directory and its resources. +# +# The profile directory is used by all IPython applications, to manage +# configuration, logging and security. +# +# This object knows how to find, create and manage these directories. This +# should be used by any code that wants to handle profiles. + +## Set the profile location directly. This overrides the logic used by the +# `profile` option. +#c.ProfileDir.location = '' + +#------------------------------------------------------------------------------ +# BaseFormatter(Configurable) configuration +#------------------------------------------------------------------------------ + +## A base formatter class that is configurable. +# +# This formatter should usually be used as the base class of all formatters. It +# is a traited :class:`Configurable` class and includes an extensible API for +# users to determine how their objects are formatted. The following logic is +# used to find a function to format an given object. +# +# 1. The object is introspected to see if it has a method with the name +# :attr:`print_method`. If is does, that object is passed to that method +# for formatting. +# 2. If no print method is found, three internal dictionaries are consulted +# to find print method: :attr:`singleton_printers`, :attr:`type_printers` +# and :attr:`deferred_printers`. +# +# Users should use these dictionaries to register functions that will be used to +# compute the format data for their objects (if those objects don't have the +# special print methods). The easiest way of using these dictionaries is through +# the :meth:`for_type` and :meth:`for_type_by_name` methods. +# +# If no function/callable is found to compute the format data, ``None`` is +# returned and this format type is not used. + +## +#c.BaseFormatter.deferred_printers = {} + +## +#c.BaseFormatter.enabled = True + +## +#c.BaseFormatter.singleton_printers = {} + +## +#c.BaseFormatter.type_printers = {} + +#------------------------------------------------------------------------------ +# PlainTextFormatter(BaseFormatter) configuration +#------------------------------------------------------------------------------ + +## The default pretty-printer. +# +# This uses :mod:`IPython.lib.pretty` to compute the format data of the object. +# If the object cannot be pretty printed, :func:`repr` is used. See the +# documentation of :mod:`IPython.lib.pretty` for details on how to write pretty +# printers. Here is a simple example:: +# +# def dtype_pprinter(obj, p, cycle): +# if cycle: +# return p.text('dtype(...)') +# if hasattr(obj, 'fields'): +# if obj.fields is None: +# p.text(repr(obj)) +# else: +# p.begin_group(7, 'dtype([') +# for i, field in enumerate(obj.descr): +# if i > 0: +# p.text(',') +# p.breakable() +# p.pretty(field) +# p.end_group(7, '])') + +## +#c.PlainTextFormatter.float_precision = '' + +## Truncate large collections (lists, dicts, tuples, sets) to this size. +# +# Set to 0 to disable truncation. +#c.PlainTextFormatter.max_seq_length = 1000 + +## +#c.PlainTextFormatter.max_width = 79 + +## +#c.PlainTextFormatter.newline = '\n' + +## +#c.PlainTextFormatter.pprint = True + +## +#c.PlainTextFormatter.verbose = False + +#------------------------------------------------------------------------------ +# Completer(Configurable) configuration +#------------------------------------------------------------------------------ + +## Enable unicode completions, e.g. \alpha<tab> . Includes completion of latex +# commands, unicode names, and expanding unicode characters back to latex +# commands. +#c.Completer.backslash_combining_completions = True + +## Enable debug for the Completer. Mostly print extra information for +# experimental jedi integration. +#c.Completer.debug = False + +## Activate greedy completion PENDING DEPRECTION. this is now mostly taken care +# of with Jedi. +# +# This will enable completion on elements of lists, results of function calls, +# etc., but can be unsafe because the code is actually evaluated on TAB. +#c.Completer.greedy = False + +## Experimental: restrict time (in milliseconds) during which Jedi can compute +# types. Set to 0 to stop computing types. Non-zero value lower than 100ms may +# hurt performance by preventing jedi to build its cache. +#c.Completer.jedi_compute_type_timeout = 400 + +## Experimental: Use Jedi to generate autocompletions. Default to True if jedi is +# installed. +#c.Completer.use_jedi = True + +#------------------------------------------------------------------------------ +# IPCompleter(Completer) configuration +#------------------------------------------------------------------------------ + +## Extension of the completer class with IPython-specific features + +## DEPRECATED as of version 5.0. +# +# Instruct the completer to use __all__ for the completion +# +# Specifically, when completing on ``object.<tab>``. +# +# When True: only those names in obj.__all__ will be included. +# +# When False [default]: the __all__ attribute is ignored +#c.IPCompleter.limit_to__all__ = False + +## Whether to merge completion results into a single list +# +# If False, only the completion results from the first non-empty completer will +# be returned. +#c.IPCompleter.merge_completions = True + +## Instruct the completer to omit private method names +# +# Specifically, when completing on ``object.<tab>``. +# +# When 2 [default]: all names that start with '_' will be excluded. +# +# When 1: all 'magic' names (``__foo__``) will be excluded. +# +# When 0: nothing will be excluded. +#c.IPCompleter.omit__names = 2 + +#------------------------------------------------------------------------------ +# ScriptMagics(Magics) configuration +#------------------------------------------------------------------------------ + +## Magics for talking to scripts +# +# This defines a base `%%script` cell magic for running a cell with a program in +# a subprocess, and registers a few top-level magics that call %%script with +# common interpreters. + +## Extra script cell magics to define +# +# This generates simple wrappers of `%%script foo` as `%%foo`. +# +# If you want to add script magics that aren't on your path, specify them in +# script_paths +#c.ScriptMagics.script_magics = [] + +## Dict mapping short 'ruby' names to full paths, such as '/opt/secret/bin/ruby' +# +# Only necessary for items in script_magics where the default path will not find +# the right interpreter. +#c.ScriptMagics.script_paths = {} + +#------------------------------------------------------------------------------ +# LoggingMagics(Magics) configuration +#------------------------------------------------------------------------------ + +## Magics related to all logging machinery. + +## Suppress output of log state when logging is enabled +#c.LoggingMagics.quiet = False + +#------------------------------------------------------------------------------ +# StoreMagics(Magics) configuration +#------------------------------------------------------------------------------ + +## Lightweight persistence for python variables. +# +# Provides the %store magic. + +## If True, any %store-d variables will be automatically restored when IPython +# starts. +#c.StoreMagics.autorestore = False diff --git a/home/.config/lf/lfrc b/home/.config/lf/lfrc new file mode 100644 index 0000000..6094d16 --- /dev/null +++ b/home/.config/lf/lfrc @@ -0,0 +1,113 @@ +# interpreter for shell commands (needs to be POSIX compatible) +set shell bash + +# set '-eu' options for shell commands +# These options are used to have safer shell commands. Option '-e' is used to +# exit on error and option '-u' is used to give error for unset variables. +# Option '-f' disables pathname expansion which can be useful when $f, $fs, and +# $fx variables contain names with '*' or '?' characters. However, this option +# is used selectively within individual commands as it can be limiting at +# times. +set shellopts '-eu' + +# set internal field separator (IFS) to "\n" for shell commands +# This is useful to automatically split file names in $fs and $fx properly +# since default file separator used in these variables (i.e. 'filesep' option) +# is newline. You need to consider the values of these options and create your +# commands accordingly. +set ifs "\n" + +# leave some space at the top and the bottom of the screen +set scrolloff 10 + +# use enter for shell commands +map <enter> shell + +# execute current file (must be executable) +map x $$f +map X !$f + +# dedicated keys for file opener actions +map o &linkhandler "$f" + +# define a custom 'open' command +# This command is called when current file is not a directory. You may want to +# use either file extensions and/or mime types here. Below uses an editor for +# text files and a file opener for the rest. +cmd open &linkhandler "$f" + +# define a custom 'rename' command without prompt for overwrite +cmd rename %[ -e $1 ] && printf "file exists" || mv $f $1 +map r push :rename<space> + +# make sure trash folder exists +# %mkdir -p ~/.trash + +# move current file or selected files to trash folder +# (also see 'man mv' for backup/overwrite options) +# cmd trash %set -f; mv $fx ~/.trash + +# define a custom 'delete' command +# cmd delete ${{ +# set -f +# printf "$fx\n" +# printf "delete?[y/n]" +# read ans +# [ $ans = "y" ] && rm -rf $fx +# }} + +# use '<delete>' key for either 'trash' or 'delete' command +# map <delete> trash +map D delete + +# extract the current file with the right command +# (xkcd link: https://xkcd.com/1168/) +cmd extract ${{ + set -f + case $f in + *.tar.bz|*.tar.bz2|*.tbz|*.tbz2) tar xjvf $f;; + *.tar.gz|*.tgz) tar xzvf $f;; + *.tar.xz|*.txz) tar xJvf $f;; + *.zip) unzip $f;; + *.rar) unrar x $f;; + *.7z) 7z x $f;; + esac +}} + +# compress current file or selected files with tar and gunzip +cmd tar ${{ + set -f + mkdir $1 + cp -r $fx $1 + tar czf $1.tar.gz $1 + rm -rf $1 +}} + +# compress current file or selected files with zip +cmd zip ${{ + set -f + mkdir $1 + cp -r $fx $1 + zip -r $1.zip $1 + rm -rf $1 +}} + +map f $lf -remote "send $id select '$(fzf)'" + +cmd recol &{{ + w=$(tput cols) + if [ $w -le 80 ]; then + lf -remote "send $id set ratios 1:2" + elif [ $w -le 160 ]; then + lf -remote "send $id set ratios 1:2:3" + else + lf -remote "send $id set ratios 1:2:3:5" + fi +}} + +recol + +map H :set hidden true +map S $$SHELL + +set period 1 diff --git a/home/.config/lsd/config.yaml b/home/.config/lsd/config.yaml new file mode 100644 index 0000000..4862521 --- /dev/null +++ b/home/.config/lsd/config.yaml @@ -0,0 +1,19 @@ +# == Blocks == +# This specifies the columns and their order when using the long and the tree +# layout. +# Possible values: permission, user, group, size, size_value, date, name, inode +blocks: + - permission + - user + - size + - date + - name + +# == Icons == +icons: + # When to use icons. + # When "classic" is set, this is set to "never". + # Possible values: always, auto, never + when: never + +layout: oneline diff --git a/home/.config/mimeapps.list b/home/.config/mimeapps.list new file mode 100644 index 0000000..f3290b8 --- /dev/null +++ b/home/.config/mimeapps.list @@ -0,0 +1,100 @@ +[Default Applications] +audio/x-vorbis+ogg=mpv.desktop +audio/aac=mpv.desktop +audio/x-aac=mpv.desktop +audio/m4a=mpv.desktop +audio/x-m4a=mpv.desktop +audio/mp1=mpv.desktop +audio/x-mp1=mpv.desktop +audio/mp2=mpv.desktop +audio/x-mp2=mpv.desktop +audio/mp3=mpv.desktop +audio/x-mp3=mpv.desktop +audio/mpeg=mpv.desktop +audio/x-mpeg=mpv.desktop +audio/mpegurl=mpv.desktop +audio/x-mpegurl=mpv.desktop +audio/mpg=mpv.desktop +audio/x-mpg=mpv.desktop +audio/rn-mpeg=mpv.desktop +audio/ogg=mpv.desktop +audio/scpls=mpv.desktop +audio/x-scpls=mpv.desktop +audio/vnd.rn-realaudio=mpv.desktop +audio/wav=mpv.desktop +audio/x-pn-windows-pcm=mpv.desktop +audio/x-realaudio=mpv.desktop +audio/x-pn-realaudio=mpv.desktop +audio/x-ms-wma=mpv.desktop +audio/x-pls=mpv.desktop +audio/x-wav=mpv.desktop +audio/x-flac=mpv.desktop +audio/x-shorten=mpv.desktop +audio/x-ape=mpv.desktop +audio/x-wavpack=mpv.desktop +audio/x-tta=mpv.desktop +audio/AMR=mpv.desktop +audio/ac3=mpv.desktop +audio/flac=mpv.desktop +audio/mp4=mpv.desktop +video/x-ogm+ogg=mpv.desktop +video/mpeg=mpv.desktop +video/x-mpeg=mpv.desktop +video/x-mpeg2=mpv.desktop +video/mp4=mpv.desktop +video/msvideo=mpv.desktop +video/x-msvideo=mpv.desktop +video/ogg=mpv.desktop +video/quicktime=mpv.desktop +video/vnd.rn-realvideo=mpv.desktop +video/x-ms-afs=mpv.desktop +video/x-ms-asf=mpv.desktop +video/x-ms-wmv=mpv.desktop +video/x-ms-wmx=mpv.desktop +video/x-ms-wvxvideo=mpv.desktop +video/x-avi=mpv.desktop +video/x-fli=mpv.desktop +video/x-flv=mpv.desktop +video/x-theora=mpv.desktop +video/x-matroska=mpv.desktop +video/webm=mpv.desktop +video/mp2t=mpv.desktop +image/x-nikon-nef=sxiv.desktop +image/jpeg=sxiv.desktop +image/png=sxiv.desktop +image/gif=mpv.desktop +text/markdown=nvim.desktop +text/plain=nvim.desktop +text/x-python=nvim.desktop +text/x-chdr=nvim.desktop +text/x-tex=nvim.desktop +application/x-shellscript=nvim.desktop +application/x-bittorrent=transmission.desktop +application/pdf=org.pwmt.zathura-pdf-mupdf.desktop +application/postscript=zathura-pdf-poppler.desktop;org.pwmt.zathura-pdf-mupdf.desktop +application/rss+xml=rss.desktop +x-scheme-handler/magnet=transmission.desktop +x-scheme-handler/mailto=mail.desktop +application/msword-template=xdot.desktop +x-scheme-handler/http=librewolf.desktop +x-scheme-handler/https=librewolf.desktop +x-scheme-handler/chrome=librewolf.desktop +text/html=librewolf.desktop +application/x-extension-htm=librewolf.desktop +application/x-extension-html=librewolf.desktop +application/x-extension-shtml=librewolf.desktop +application/xhtml+xml=librewolf.desktop +application/x-extension-xhtml=librewolf.desktop +application/x-extension-xht=librewolf.desktop + +[Added Associations] +x-scheme-handler/http=librewolf.desktop; +x-scheme-handler/https=librewolf.desktop; +x-scheme-handler/chrome=librewolf.desktop; +text/html=librewolf.desktop; +application/x-extension-htm=librewolf.desktop; +application/x-extension-html=librewolf.desktop; +application/x-extension-shtml=librewolf.desktop; +application/xhtml+xml=librewolf.desktop; +application/x-extension-xhtml=librewolf.desktop; +application/x-extension-xht=librewolf.desktop; diff --git a/home/.config/mpv/input.conf b/home/.config/mpv/input.conf new file mode 100644 index 0000000..679c4a2 --- /dev/null +++ b/home/.config/mpv/input.conf @@ -0,0 +1,96 @@ +# mpv keybindings +# +# Location of user-defined bindings: ~/.config/mpv/input.conf +# +# Lines starting with # are comments. Use SHARP to assign the # key. +# Copy this file and uncomment and edit the bindings you want to change. +# +# List of commands and further details: DOCS/man/input.rst +# List of special keys: --input-keylist +# Keybindings testing mode: mpv --input-test --force-window --idle +# +# Use 'ignore' to unbind a key fully (e.g. 'ctrl+a ignore'). +# +# Strings need to be quoted and escaped: +# KEY show-text "This is a single backslash: \\ and a quote: \" !" +# +# You can use modifier-key combinations like Shift+Left or Ctrl+Alt+x with +# the modifiers Shift, Ctrl, Alt and Meta (may not work on the terminal). +# +# The default keybindings are hardcoded into the mpv binary. +# You can disable them completely with: --no-input-default-bindings + +# Mouse wheels, touchpad or other input devices that have axes +# if the input devices supports precise scrolling it will also scale the +# numeric value accordingly +WHEEL_UP ignore +WHEEL_DOWN ignore +WHEEL_LEFT ignore +WHEEL_RIGHT ignore + +## Seek units are in seconds, but note that these are limited by keyframes +RIGHT seek 5 +LEFT seek -5 +UP seek 60 +DOWN seek -60 +# Do smaller, always exact (non-keyframe-limited), seeks with shift. +# Don't show them on the OSD (no-osd). +Shift+RIGHT no-osd seek 1 exact +Shift+LEFT no-osd seek -1 exact +Shift+UP no-osd seek 5 exact +Shift+DOWN no-osd seek -5 exact +# Skip to previous/next subtitle (subject to some restrictions; see manpage) +Ctrl+LEFT no-osd sub-seek -1 +Ctrl+RIGHT no-osd sub-seek 1 +# Adjust timing to previous/next subtitle +#Ctrl+Shift+LEFT sub-step -1 +#Ctrl+Shift+RIGHT sub-step 1 +[ multiply speed 1/1.1 # scale playback speed +] multiply speed 1.1 +{ multiply speed 0.5 +} multiply speed 2.0 +BS set speed 1.0 # reset speed to normal +Shift+BS revert-seek # undo previous (or marked) seek +q quit +Q quit-watch-later +ESC set fullscreen no +f cycle fullscreen # toggle fullscreen +p cycle pause # toggle pause/playback mode +> frame-step # advance one frame and pause +< frame-back-step # go back by one frame and pause +SPACE cycle pause +O no-osd cycle-values osd-level 3 1 # cycle through OSD mode +o show-progress +P show-progress +i script-binding stats/display-stats +I script-binding stats/display-stats-toggle +` script-binding console/enable +. script-binding console/enable +# z add sub-delay -0.1 # subtract 100 ms delay from subs +# Z add sub-delay +0.1 # add +#ctrl++ add audio-delay 0.100 # this changes audio/video sync +#ctrl+- add audio-delay -0.100 +9 add volume -2 +0 add volume 2 +m cycle mute +v cycle sub-visibility +s cycle sub # cycle through subtitles +S cycle sub down # ...backwards +PLAY cycle pause +PAUSE cycle pause +PLAYPAUSE cycle pause +PLAYONLY set pause no +PAUSEONLY set pause yes +STOP quit +FORWARD seek 60 +REWIND seek -60 +NEXT playlist-next +PREV playlist-prev +VOLUME_UP add volume 2 +VOLUME_DOWN add volume -2 +MUTE cycle mute +CLOSE_WIN quit +CLOSE_WIN {encode} quit 4 +L cycle-values loop-file "inf" "no" # toggle infinite looping +ctrl+c quit 4 +DEL script-binding osc/visibility # cycle OSC display diff --git a/home/.config/mpv/mpv.conf b/home/.config/mpv/mpv.conf new file mode 100644 index 0000000..0113894 --- /dev/null +++ b/home/.config/mpv/mpv.conf @@ -0,0 +1,111 @@ +# vim: syntax=config + + +########### +# General # +########### + +input-ipc-server=/tmp/mpvsocket # listen for IPC on this socket +load-stats-overlay=no # use local stats.lua +save-position-on-quit # handled by a script + +# no-border # no window title bar +msg-module # prepend module name to log messages +msg-color # color log messages on terminal +term-osd-bar # display a progress bar on the terminal +use-filedir-conf # look for additional config files in the directory of the opened file +#pause # no autoplay +keep-open # keep the player open when a file's end is reached +cursor-autohide=100 # autohide the curser after 1s +prefetch-playlist=yes +force-seekable=yes + +hls-bitrate=max # use max quality for HLS streams +# not interested in getting videos with a resolution higher than 1080p +ytdl-format=bv*[height<=1080]+ba/b[height<=1080] +no-input-default-bindings +script-opts=ytdl_hook-ytdl_path=yt-dlp + +[default] + +#########c +# Cache # +######### + +# Configure the cache to be really big (multiple GBs) +# We have a lot of memory, so why not use it for something + +cache=yes +# cache-default=1000000 # size in KB +# cache-backbuffer=250000 # size in KB +demuxer-max-bytes=1147483647 # ~1 GiB in bytes + +############# +# Subtitles # +############# + +sub-auto=fuzzy # external subs don't have to match the file name exactly to autoload +sub-file-paths-append=ass # search for external subs in these relative subdirectories +sub-file-paths-append=srt +sub-file-paths-append=sub +sub-file-paths-append=subs +sub-file-paths-append=subtitles +sub-file-paths-append=subtitle +sub-file-paths-append=Ass # search for external subs in these relative subdirectories +sub-file-paths-append=ASS # search for external subs in these relative subdirectories +sub-file-paths-append=Srt +sub-file-paths-append=SRT +sub-file-paths-append=Sub +sub-file-paths-append=SUB +sub-file-paths-append=Subs +sub-file-paths-append=SUBS +sub-file-paths-append=Subtitles +sub-file-paths-append=SUBTITLES +sub-file-paths-append=Subtitle +sub-file-paths-append=SUBTITLE + + +#demuxer-mkv-subtitle-preroll # try to correctly show embedded subs when seeking +#embeddedfonts=yes # use embedded fonts for SSA/ASS subs +#sub-fix-timing=no # do not try to fix gaps (which might make it worse in some cases) +#sub-ass-force-style=Kerning=yes # allows you to override style parameters of ASS scripts +#sub-use-margins +#sub-ass-force-margins + +############# +# Languages # +############# + +slang=en,eng # automatically select these subtitles (decreasing priority) +# lang=en,eng # automatically select these audio tracks (decreasing priority) + + +######### +# Audio # +######### + +audio-file-auto=fuzzy # external audio doesn't has to match the file name exactly to autoload +audio-pitch-correction=yes # automatically insert scaletempo when playing with higher speed +volume-max=200 # maximum volume in %, everything above 100 results in amplification +volume=100 # default volume, 100 = unchanged + + +################ +# Video Output # +################ + +hwdec=auto-safe + +[no-spoiler] +osd-level=0 +no-osc +no-osd-bar +no-term-osd-bar +quiet +sub-auto=no + +[hq] +profile=gpu-hq +video-sync=display-resample +interpolation +tscale=oversample diff --git a/home/.config/mpv/scripts/webtorrent-hook.lua b/home/.config/mpv/scripts/webtorrent-hook.lua new file mode 100644 index 0000000..80d991f --- /dev/null +++ b/home/.config/mpv/scripts/webtorrent-hook.lua @@ -0,0 +1,138 @@ +-- TODO prefetch if next in playlist? +-- TODO handle torrent with multiple video files (if webtorrent can print json) +-- - don't close kill webtorrent while still videos unplayed? or in playlist? +-- - store titles/info when starting webtorrent and check stream-open-filename +-- for any item in playlist to see if it matches stored entry + +local settings = { + close_webtorrent = true, + remove_files = true, + download_directory = "/tmp/webtorrent", + webtorrent_flags = "", + webtorrent_verbosity = "speed" +} + +(require "mp.options").read_options(settings, "webtorrent-hook") + +local open_videos = {} + +-- http://lua-users.org/wiki/StringRecipes +local function ends_with(str, ending) + return ending == "" or str:sub(-#ending) == ending +end + +-- https://stackoverflow.com/questions/132397/get-back-the-output-of-os-execute-in-lua +function os.capture(cmd, decolorize, raw) + if decolorize then + -- https://github.com/webtorrent/webtorrent-cli/issues/132 + -- TODO webtorrent should have a way to just print json information with + -- no colors + -- https://stackoverflow.com/questions/19296667/remove-ansi-color-codes-from-a-text-file-using-bash/30938702#30938702 + cmd = cmd .. " | sed -r 's/\\x1B\\[(([0-9]{1,2})?(;)?([0-9]{1,2})?)?[m,K,H,f,J]//g'" + end + local f = assert(io.popen(cmd, 'r')) + local s = assert(f:read('*a')) + f:close() + if raw then return s end + s = string.gsub(s, '^%s+', '') + s = string.gsub(s, '%s+$', '') + -- s = string.gsub(s, '[\n\r]+', ' ') + return s +end + +function read_file(file) + local fh = assert(io.open(file, "rb")) + local contents = fh:read("*all") + fh:close() + return contents +end + +function play_torrent() + local url = mp.get_property("stream-open-filename") + if (url:find("magnet:") == 1 or url:find("peerflix://") == 1 + or url:find("webtorrent://") == 1 or ends_with(url, "torrent")) then + if url:find("webtorrent://") == 1 then + url = url:sub(14) + end + if url:find("peerflix://") == 1 then + url = url:sub(12) + end + + os.execute("mkdir -p " .. settings.download_directory) + -- don't reuse files (so multiple mpvs works) + local output_file = settings.download_directory + .. "/webtorrent-output-" .. mp.get_time() .. ".log" + -- --keep-seeding is to prevent webtorrent from quitting once the download + -- is done + local webtorrent_command = "webtorrent " + .. settings.webtorrent_flags + .. " --out '" .. settings.download_directory .. "' --keep-seeding \"" + .. url .. "\" > " .. output_file .. " 2>&1 & echo $!" + mp.msg.info("Starting webtorrent server") + mp.msg.info(webtorrent_command) + local pid = os.capture(webtorrent_command) + mp.msg.info("Waiting for webtorrent server") + + local url_command = "tail -f " .. output_file + .. " | awk '/Server running at:/ {print $4; exit}'" + local url = os.capture(url_command, true) + mp.msg.info("Webtorrent server is up") + + local title_command = "awk '/(Seeding|Downloading): / " + .. "{gsub(/(Seeding|Downloading): /, \"\"); print; exit}' " + .. output_file + local title = os.capture(title_command, true) + mp.msg.info("Setting media title to: " .. title) + mp.set_property("force-media-title", title) + + local path + if title then + path = settings.download_directory .. "/\"" .. title .. "\"" + end + open_videos[url] = {title=title,path=path,pid=pid} + + mp.set_property("stream-open-filename", url) + + if settings.webtorrent_verbosity == "speed" then + local printer_pid + local printer_pid_file = settings.download_directory + .. "/webtorrent-printer-" .. mp.get_time() .. ".pid" + os.execute("tail -f " .. output_file + .. " | awk '/Speed:/' ORS='\r' & echo -n $! > " + .. printer_pid_file) + printer_pid = read_file(printer_pid_file) + mp.register_event("file-loaded", + function() + os.execute("kill " .. printer_pid) + end + ) + end + end +end + +function webtorrent_cleanup() + local url = mp.get_property("stream-open-filename") + if settings.close_webtorrent and open_videos[url] then + local title = open_videos[url].title + local path = open_videos[url].path + local pid = open_videos[url].pid + + if pid then + mp.msg.info("Closing webtorrent for " .. title .. " with pid " .. pid) + os.execute("kill " .. pid) + end + + if settings.remove_files then + if path then + mp.msg.info("Removing media file for " .. title .. " with path " .. path) + os.execute("rm -r " .. path) + end + end + + open_videos[url] = {} + end +end + +mp.add_hook("on_load", 50, play_torrent) + +mp.add_hook("on_unload", 10, webtorrent_cleanup) diff --git a/home/.config/neofetch/config.conf b/home/.config/neofetch/config.conf new file mode 100644 index 0000000..6b39dc8 --- /dev/null +++ b/home/.config/neofetch/config.conf @@ -0,0 +1,764 @@ +# See this wiki page for more info: +# https://github.com/dylanaraps/neofetch/wiki/Customizing-Info +print_info() { + info title + info underline + + info "OS" distro + info "Host" model + info "Kernel" kernel + info "Uptime" uptime + info "Packages" packages + info "Shell" shell + info "Resolution" resolution + info "DE" de + info "WM" wm + info "WM Theme" wm_theme + info "Theme" theme + info "Icons" icons + info "Terminal" term + info "Terminal Font" term_font + info "CPU" cpu + info "GPU" gpu + info "Memory" memory + + # info "GPU Driver" gpu_driver # Linux/macOS only + info "CPU Usage" cpu_usage + info "Disk" disk + info "Battery" battery + info "Font" font + # info "Song" song + # [[ "$player" ]] && prin "Music Player" "$player" + # info "Local IP" local_ip + # info "Public IP" public_ip + # info "Users" users + info "Locale" locale # This only works on glibc systems. + + info cols +} + + +# Kernel + + +# Shorten the output of the kernel function. +# +# Default: 'on' +# Values: 'on', 'off' +# Flag: --kernel_shorthand +# Supports: Everything except *BSDs (except PacBSD and PC-BSD) +# +# Example: +# on: '4.8.9-1-ARCH' +# off: 'Linux 4.8.9-1-ARCH' +kernel_shorthand="off" + + +# Distro + + +# Shorten the output of the distro function +# +# Default: 'off' +# Values: 'on', 'tiny', 'off' +# Flag: --distro_shorthand +# Supports: Everything except Windows and Haiku +distro_shorthand="off" + +# Show/Hide OS Architecture. +# Show 'x86_64', 'x86' and etc in 'Distro:' output. +# +# Default: 'on' +# Values: 'on', 'off' +# Flag: --os_arch +# +# Example: +# on: 'Arch Linux x86_64' +# off: 'Arch Linux' +os_arch="on" + + +# Uptime + + +# Shorten the output of the uptime function +# +# Default: 'on' +# Values: 'on', 'tiny', 'off' +# Flag: --uptime_shorthand +# +# Example: +# on: '2 days, 10 hours, 3 mins' +# tiny: '2d 10h 3m' +# off: '2 days, 10 hours, 3 minutes' +uptime_shorthand="tiny" + + +# Memory + + +# Show memory pecentage in output. +# +# Default: 'off' +# Values: 'on', 'off' +# Flag: --memory_percent +# +# Example: +# on: '1801MiB / 7881MiB (22%)' +# off: '1801MiB / 7881MiB' +memory_percent="on" + + +# Packages + + +# Show/Hide Package Manager names. +# +# Default: 'tiny' +# Values: 'on', 'tiny' 'off' +# Flag: --package_managers +# +# Example: +# on: '998 (pacman), 8 (flatpak), 4 (snap)' +# tiny: '908 (pacman, flatpak, snap)' +# off: '908' +package_managers="on" + + +# Shell + + +# Show the path to $SHELL +# +# Default: 'off' +# Values: 'on', 'off' +# Flag: --shell_path +# +# Example: +# on: '/bin/bash' +# off: 'bash' +shell_path="on" + +# Show $SHELL version +# +# Default: 'on' +# Values: 'on', 'off' +# Flag: --shell_version +# +# Example: +# on: 'bash 4.4.5' +# off: 'bash' +shell_version="on" + + +# CPU + + +# CPU speed type +# +# Default: 'bios_limit' +# Values: 'scaling_cur_freq', 'scaling_min_freq', 'scaling_max_freq', 'bios_limit'. +# Flag: --speed_type +# Supports: Linux with 'cpufreq' +# NOTE: Any file in '/sys/devices/system/cpu/cpu0/cpufreq' can be used as a value. +speed_type="bios_limit" + +# CPU speed shorthand +# +# Default: 'off' +# Values: 'on', 'off'. +# Flag: --speed_shorthand +# NOTE: This flag is not supported in systems with CPU speed less than 1 GHz +# +# Example: +# on: 'i7-6500U (4) @ 3.1GHz' +# off: 'i7-6500U (4) @ 3.100GHz' +speed_shorthand="off" + +# Enable/Disable CPU brand in output. +# +# Default: 'on' +# Values: 'on', 'off' +# Flag: --cpu_brand +# +# Example: +# on: 'Intel i7-6500U' +# off: 'i7-6500U (4)' +cpu_brand="on" + +# CPU Speed +# Hide/Show CPU speed. +# +# Default: 'on' +# Values: 'on', 'off' +# Flag: --cpu_speed +# +# Example: +# on: 'Intel i7-6500U (4) @ 3.1GHz' +# off: 'Intel i7-6500U (4)' +cpu_speed="on" + +# CPU Cores +# Display CPU cores in output +# +# Default: 'logical' +# Values: 'logical', 'physical', 'off' +# Flag: --cpu_cores +# Support: 'physical' doesn't work on BSD. +# +# Example: +# logical: 'Intel i7-6500U (4) @ 3.1GHz' (All virtual cores) +# physical: 'Intel i7-6500U (2) @ 3.1GHz' (All physical cores) +# off: 'Intel i7-6500U @ 3.1GHz' +cpu_cores="logical" + +# CPU Temperature +# Hide/Show CPU temperature. +# Note the temperature is added to the regular CPU function. +# +# Default: 'off' +# Values: 'C', 'F', 'off' +# Flag: --cpu_temp +# Supports: Linux, BSD +# NOTE: For FreeBSD and NetBSD-based systems, you'll need to enable +# coretemp kernel module. This only supports newer Intel processors. +# +# Example: +# C: 'Intel i7-6500U (4) @ 3.1GHz [27.2°C]' +# F: 'Intel i7-6500U (4) @ 3.1GHz [82.0°F]' +# off: 'Intel i7-6500U (4) @ 3.1GHz' +cpu_temp="C" + + +# GPU + + +# Enable/Disable GPU Brand +# +# Default: 'on' +# Values: 'on', 'off' +# Flag: --gpu_brand +# +# Example: +# on: 'AMD HD 7950' +# off: 'HD 7950' +gpu_brand="on" + +# Which GPU to display +# +# Default: 'all' +# Values: 'all', 'dedicated', 'integrated' +# Flag: --gpu_type +# Supports: Linux +# +# Example: +# all: +# GPU1: AMD HD 7950 +# GPU2: Intel Integrated Graphics +# +# dedicated: +# GPU1: AMD HD 7950 +# +# integrated: +# GPU1: Intel Integrated Graphics +gpu_type="all" + + +# Resolution + + +# Display refresh rate next to each monitor +# Default: 'off' +# Values: 'on', 'off' +# Flag: --refresh_rate +# Supports: Doesn't work on Windows. +# +# Example: +# on: '1920x1080 @ 60Hz' +# off: '1920x1080' +refresh_rate="on" + + +# Gtk Theme / Icons / Font + + +# Shorten output of GTK Theme / Icons / Font +# +# Default: 'off' +# Values: 'on', 'off' +# Flag: --gtk_shorthand +# +# Example: +# on: 'Numix, Adwaita' +# off: 'Numix [GTK2], Adwaita [GTK3]' +gtk_shorthand="off" + + +# Enable/Disable gtk2 Theme / Icons / Font +# +# Default: 'on' +# Values: 'on', 'off' +# Flag: --gtk2 +# +# Example: +# on: 'Numix [GTK2], Adwaita [GTK3]' +# off: 'Adwaita [GTK3]' +gtk2="on" + +# Enable/Disable gtk3 Theme / Icons / Font +# +# Default: 'on' +# Values: 'on', 'off' +# Flag: --gtk3 +# +# Example: +# on: 'Numix [GTK2], Adwaita [GTK3]' +# off: 'Numix [GTK2]' +gtk3="on" + + +# IP Address + + +# Website to ping for the public IP +# +# Default: 'http://ident.me' +# Values: 'url' +# Flag: --ip_host +public_ip_host="http://ident.me" + +# Public IP timeout. +# +# Default: '2' +# Values: 'int' +# Flag: --ip_timeout +public_ip_timeout=2 + + +# Disk + + +# Which disks to display. +# The values can be any /dev/sdXX, mount point or directory. +# NOTE: By default we only show the disk info for '/'. +# +# Default: '/' +# Values: '/', '/dev/sdXX', '/path/to/drive'. +# Flag: --disk_show +# +# Example: +# disk_show=('/' '/dev/sdb1'): +# 'Disk (/): 74G / 118G (66%)' +# 'Disk (/mnt/Videos): 823G / 893G (93%)' +# +# disk_show=('/'): +# 'Disk (/): 74G / 118G (66%)' +# +disk_show=('/') + +# Disk subtitle. +# What to append to the Disk subtitle. +# +# Default: 'mount' +# Values: 'mount', 'name', 'dir' +# Flag: --disk_subtitle +# +# Example: +# name: 'Disk (/dev/sda1): 74G / 118G (66%)' +# 'Disk (/dev/sdb2): 74G / 118G (66%)' +# +# mount: 'Disk (/): 74G / 118G (66%)' +# 'Disk (/mnt/Local Disk): 74G / 118G (66%)' +# 'Disk (/mnt/Videos): 74G / 118G (66%)' +# +# dir: 'Disk (/): 74G / 118G (66%)' +# 'Disk (Local Disk): 74G / 118G (66%)' +# 'Disk (Videos): 74G / 118G (66%)' +disk_subtitle="mount" + + +# Song + + +# Manually specify a music player. +# +# Default: 'auto' +# Values: 'auto', 'player-name' +# Flag: --music_player +# +# Available values for 'player-name': +# +# amarok +# audacious +# banshee +# bluemindo +# clementine +# cmus +# deadbeef +# deepin-music +# dragon +# elisa +# exaile +# gnome-music +# gmusicbrowser +# gogglesmm +# guayadeque +# iTunes +# juk +# lollypop +# mocp +# mopidy +# mpd +# netease-cloud-music +# pogo +# pragha +# qmmp +# quodlibet +# rhythmbox +# sayonara +# smplayer +# spotify +# strawberry +# tomahawk +# vlc +# xmms2d +# xnoise +# yarock +music_player="auto" + +# Format to display song information. +# +# Default: '%artist% - %album% - %title%' +# Values: '%artist%', '%album%', '%title%' +# Flag: --song_format +# +# Example: +# default: 'Song: Jet - Get Born - Sgt Major' +song_format="%artist% - %album% - %title%" + +# Print the Artist, Album and Title on separate lines +# +# Default: 'off' +# Values: 'on', 'off' +# Flag: --song_shorthand +# +# Example: +# on: 'Artist: The Fratellis' +# 'Album: Costello Music' +# 'Song: Chelsea Dagger' +# +# off: 'Song: The Fratellis - Costello Music - Chelsea Dagger' +song_shorthand="off" + +# 'mpc' arguments (specify a host, password etc). +# +# Default: '' +# Example: mpc_args=(-h HOST -P PASSWORD) +mpc_args=() + + +# Text Colors + + +# Text Colors +# +# Default: 'distro' +# Values: 'distro', 'num' 'num' 'num' 'num' 'num' 'num' +# Flag: --colors +# +# Each number represents a different part of the text in +# this order: 'title', '@', 'underline', 'subtitle', 'colon', 'info' +# +# Example: +# colors=(distro) - Text is colored based on Distro colors. +# colors=(4 6 1 8 8 6) - Text is colored in the order above. +colors=(distro) + + +# Text Options + + +# Toggle bold text +# +# Default: 'on' +# Values: 'on', 'off' +# Flag: --bold +bold="on" + +# Enable/Disable Underline +# +# Default: 'on' +# Values: 'on', 'off' +# Flag: --underline +underline_enabled="on" + +# Underline character +# +# Default: '-' +# Values: 'string' +# Flag: --underline_char +underline_char="-" + + +# Info Separator +# Replace the default separator with the specified string. +# +# Default: ':' +# Flag: --separator +# +# Example: +# separator="->": 'Shell-> bash' +# separator=" =": 'WM = dwm' +separator=":" + + +# Color Blocks + + +# Color block range +# The range of colors to print. +# +# Default: '0', '15' +# Values: 'num' +# Flag: --block_range +# +# Example: +# +# Display colors 0-7 in the blocks. (8 colors) +# neofetch --block_range 0 7 +# +# Display colors 0-15 in the blocks. (16 colors) +# neofetch --block_range 0 15 +block_range=(0 15) + +# Toggle color blocks +# +# Default: 'on' +# Values: 'on', 'off' +# Flag: --color_blocks +color_blocks="on" + +# Color block width in spaces +# +# Default: '3' +# Values: 'num' +# Flag: --block_width +block_width=3 + +# Color block height in lines +# +# Default: '1' +# Values: 'num' +# Flag: --block_height +block_height=1 + + +# Progress Bars + + +# Bar characters +# +# Default: '-', '=' +# Values: 'string', 'string' +# Flag: --bar_char +# +# Example: +# neofetch --bar_char 'elapsed' 'total' +# neofetch --bar_char '-' '=' +bar_char_elapsed="-" +bar_char_total="=" + +# Toggle Bar border +# +# Default: 'on' +# Values: 'on', 'off' +# Flag: --bar_border +bar_border="on" + +# Progress bar length in spaces +# Number of chars long to make the progress bars. +# +# Default: '15' +# Values: 'num' +# Flag: --bar_length +bar_length=15 + +# Progress bar colors +# When set to distro, uses your distro's logo colors. +# +# Default: 'distro', 'distro' +# Values: 'distro', 'num' +# Flag: --bar_colors +# +# Example: +# neofetch --bar_colors 3 4 +# neofetch --bar_colors distro 5 +bar_color_elapsed="distro" +bar_color_total="distro" + + +# Info display +# Display a bar with the info. +# +# Default: 'off' +# Values: 'bar', 'infobar', 'barinfo', 'off' +# Flags: --cpu_display +# --memory_display +# --battery_display +# --disk_display +# +# Example: +# bar: '[---=======]' +# infobar: 'info [---=======]' +# barinfo: '[---=======] info' +# off: 'info' +cpu_display="info" +memory_display="info" +battery_display="info" +disk_display="info" + + +# Backend Settings + + +# Image backend. +# +# Default: 'ascii' +# Values: 'ascii', 'caca', 'chafa', 'jp2a', 'iterm2', 'off', +# 'termpix', 'pixterm', 'tycat', 'w3m', 'kitty' +# Flag: --backend +image_backend="ascii" + +# Image Source +# +# Which image or ascii file to display. +# +# Default: 'auto' +# Values: 'auto', 'ascii', 'wallpaper', '/path/to/img', '/path/to/ascii', '/path/to/dir/' +# 'command output (neofetch --ascii "$(fortune | cowsay -W 30)")' +# Flag: --source +# +# NOTE: 'auto' will pick the best image source for whatever image backend is used. +# In ascii mode, distro ascii art will be used and in an image mode, your +# wallpaper will be used. +image_source="auto" + + +# Ascii Options + + +# Ascii distro +# Which distro's ascii art to display. +# +# Default: 'auto' +# Values: 'auto', 'distro_name' +# Flag: --ascii_distro +# +# NOTE: Arch and Ubuntu have 'old' logo variants. +# Change this to 'arch_old' or 'ubuntu_old' to use the old logos. +# NOTE: Ubuntu has flavor variants. +# Change this to 'Lubuntu', 'Xubuntu', 'Ubuntu-GNOME' or 'Ubuntu-Budgie' to use the flavors. +# NOTE: Arch, Crux and Gentoo have a smaller logo variant. +# Change this to 'arch_small', 'crux_small' or 'gentoo_small' to use the small logos. +ascii_distro="auto" + +# Ascii Colors +# +# Default: 'distro' +# Values: 'distro', 'num' 'num' 'num' 'num' 'num' 'num' +# Flag: --ascii_colors +# +# Example: +# ascii_colors=(distro) - Ascii is colored based on Distro colors. +# ascii_colors=(4 6 1 8 8 6) - Ascii is colored using these colors. +ascii_colors=(distro) + +# Bold ascii logo +# Whether or not to bold the ascii logo. +# +# Default: 'on' +# Values: 'on', 'off' +# Flag: --ascii_bold +ascii_bold="on" + + +# Image Options + + +# Image loop +# Setting this to on will make neofetch redraw the image constantly until +# Ctrl+C is pressed. This fixes display issues in some terminal emulators. +# +# Default: 'off' +# Values: 'on', 'off' +# Flag: --loop +image_loop="off" + +# Thumbnail directory +# +# Default: '~/.cache/thumbnails/neofetch' +# Values: 'dir' +thumbnail_dir="${XDG_CACHE_HOME:-${HOME}/.cache}/thumbnails/neofetch" + +# Crop mode +# +# Default: 'normal' +# Values: 'normal', 'fit', 'fill' +# Flag: --crop_mode +# +# See this wiki page to learn about the fit and fill options. +# https://github.com/dylanaraps/neofetch/wiki/What-is-Waifu-Crop%3F +crop_mode="normal" + +# Crop offset +# Note: Only affects 'normal' crop mode. +# +# Default: 'center' +# Values: 'northwest', 'north', 'northeast', 'west', 'center' +# 'east', 'southwest', 'south', 'southeast' +# Flag: --crop_offset +crop_offset="center" + +# Image size +# The image is half the terminal width by default. +# +# Default: 'auto' +# Values: 'auto', '00px', '00%', 'none' +# Flags: --image_size +# --size +image_size="auto" + +# Gap between image and text +# +# Default: '3' +# Values: 'num', '-num' +# Flag: --gap +gap=3 + +# Image offsets +# Only works with the w3m backend. +# +# Default: '0' +# Values: 'px' +# Flags: --xoffset +# --yoffset +yoffset=0 +xoffset=0 + +# Image background color +# Only works with the w3m backend. +# +# Default: '' +# Values: 'color', 'blue' +# Flag: --bg_color +background_color= + + +# Misc Options + +# Stdout mode +# Turn off all colors and disables image backend (ASCII/Image). +# Useful for piping into another command. +# Default: 'off' +# Values: 'on', 'off' +stdout="off" diff --git a/home/.config/npm/npmrc b/home/.config/npm/npmrc new file mode 100644 index 0000000..fc84b78 --- /dev/null +++ b/home/.config/npm/npmrc @@ -0,0 +1,4 @@ +prefix=${XDG_DATA_HOME}/npm +cache=${XDG_CACHE_HOME}/npm +tmp=${XDG_RUNTIME_DIR}/npm +init-module=${XDG_CONFIG_HOME}/npm/config/npm-init.js diff --git a/home/.config/nvim/after/ftplugin/c.lua b/home/.config/nvim/after/ftplugin/c.lua new file mode 120000 index 0000000..48a225a --- /dev/null +++ b/home/.config/nvim/after/ftplugin/c.lua @@ -0,0 +1 @@ +cpp.lua
\ No newline at end of file diff --git a/home/.config/nvim/after/ftplugin/cfg.lua b/home/.config/nvim/after/ftplugin/cfg.lua new file mode 100644 index 0000000..3e79acd --- /dev/null +++ b/home/.config/nvim/after/ftplugin/cfg.lua @@ -0,0 +1,3 @@ +vim.bo.commentstring = "// %s" + +vim.b.undo_ftplugin = vim.b.undo_ftplugin .. "| setlocal commentstring<" diff --git a/home/.config/nvim/after/ftplugin/cpp.lua b/home/.config/nvim/after/ftplugin/cpp.lua new file mode 100644 index 0000000..e3d3a8c --- /dev/null +++ b/home/.config/nvim/after/ftplugin/cpp.lua @@ -0,0 +1,2 @@ +vim.bo.commentstring = "// %s" +vim.b.undo_ftplugin = vim.b.undo_ftplugin .. "| setlocal commentstring<" diff --git a/home/.config/nvim/after/ftplugin/dosini.lua b/home/.config/nvim/after/ftplugin/dosini.lua new file mode 100644 index 0000000..f6d7437 --- /dev/null +++ b/home/.config/nvim/after/ftplugin/dosini.lua @@ -0,0 +1,3 @@ +vim.bo.commentstring = "# %s" +vim.b.undo_ftplugin = vim.b.undo_ftplugin + .. "|setlocal commentstring" diff --git a/home/.config/nvim/after/ftplugin/gitcommit.lua b/home/.config/nvim/after/ftplugin/gitcommit.lua new file mode 100644 index 0000000..8525714 --- /dev/null +++ b/home/.config/nvim/after/ftplugin/gitcommit.lua @@ -0,0 +1,5 @@ +vim.wo.spell = true +vim.b.undo_ftplugin = vim.b.undo_ftplugin .. "|setlocal spell<" +vim.cmd([[match ErrorMsg /\%1l.\%>50v/]]) +local bufnr = vim.api.nvim_buf_get_number(0) +require("mapper").ncmd("gd", "DiffGitCached", nil, bufnr) diff --git a/home/.config/nvim/after/ftplugin/gitrebase.lua b/home/.config/nvim/after/ftplugin/gitrebase.lua new file mode 100644 index 0000000..98fd264 --- /dev/null +++ b/home/.config/nvim/after/ftplugin/gitrebase.lua @@ -0,0 +1,20 @@ +local map = require("mapper") +local ncmd = map.ncmd +local vcmd = map.vcmd +local bufnr = vim.api.nvim_buf_get_number(0) + +ncmd("gc", "Cycle", nil, bufnr) +ncmd("gp", "Pick", nil, bufnr) +ncmd("ge", "Edit", nil, bufnr) +ncmd("gf", "Fixup", nil, bufnr) +ncmd("gd", "Drop", nil, bufnr) +ncmd("gs", "Squash", nil, bufnr) +ncmd("gr", "Reword", nil, bufnr) + +vcmd("gc", "Cycle", nil, bufnr) +vcmd("gp", "Pick", nil, bufnr) +vcmd("ge", "Edit", nil, bufnr) +vcmd("gf", "Fixup", nil, bufnr) +vcmd("gd", "Drop", nil, bufnr) +vcmd("gs", "Squash", nil, bufnr) +vcmd("gr", "Reword", nil, bufnr) diff --git a/home/.config/nvim/after/ftplugin/help.lua b/home/.config/nvim/after/ftplugin/help.lua new file mode 100644 index 0000000..63147a6 --- /dev/null +++ b/home/.config/nvim/after/ftplugin/help.lua @@ -0,0 +1,3 @@ +vim.keymap.set("n", "q", function() + vim.api.nvim_win_close(0, false) +end, { buffer = true }) diff --git a/home/.config/nvim/after/ftplugin/json.lua b/home/.config/nvim/after/ftplugin/json.lua new file mode 100644 index 0000000..726acd0 --- /dev/null +++ b/home/.config/nvim/after/ftplugin/json.lua @@ -0,0 +1 @@ +vim.cmd([[syntax match Comment +\/\/.\+$+]]) diff --git a/home/.config/nvim/after/ftplugin/mail.lua b/home/.config/nvim/after/ftplugin/mail.lua new file mode 100644 index 0000000..538c10b --- /dev/null +++ b/home/.config/nvim/after/ftplugin/mail.lua @@ -0,0 +1,2 @@ +vim.wo.spell = true +vim.b.undo_ftplugin = vim.b.undo_ftplugin .. "|setlocal spell<" diff --git a/home/.config/nvim/after/ftplugin/markdown.lua b/home/.config/nvim/after/ftplugin/markdown.lua new file mode 100644 index 0000000..538c10b --- /dev/null +++ b/home/.config/nvim/after/ftplugin/markdown.lua @@ -0,0 +1,2 @@ +vim.wo.spell = true +vim.b.undo_ftplugin = vim.b.undo_ftplugin .. "|setlocal spell<" diff --git a/home/.config/nvim/after/ftplugin/tex.lua b/home/.config/nvim/after/ftplugin/tex.lua new file mode 100644 index 0000000..b1dbce0 --- /dev/null +++ b/home/.config/nvim/after/ftplugin/tex.lua @@ -0,0 +1,4 @@ +vim.wo.spell = true +vim.bo.formatoptions = vim.bo.formatoptions .. "t" +vim.b.undo_ftplugin = vim.b.undo_ftplugin + .. "|setlocal spell< |setlocal formatoptions<" diff --git a/home/.config/nvim/after/ftplugin/text.lua b/home/.config/nvim/after/ftplugin/text.lua new file mode 100644 index 0000000..8c72f6f --- /dev/null +++ b/home/.config/nvim/after/ftplugin/text.lua @@ -0,0 +1,5 @@ +vim.wo.spell = true +vim.bo.formatoptions = vim.bo.formatoptions .. "t" +vim.bo.commentstring = "# %s" +vim.b.undo_ftplugin = vim.b.undo_ftplugin + .. "|setlocal spell< |setlocal formatoptions< |setlocal commentstring" diff --git a/home/.config/nvim/after/ftplugin/tmux.lua b/home/.config/nvim/after/ftplugin/tmux.lua new file mode 100644 index 0000000..590a12e --- /dev/null +++ b/home/.config/nvim/after/ftplugin/tmux.lua @@ -0,0 +1 @@ +vim.api.nvim_create_autocmd("BufWritePost", { buffer = 0, command = "make" }) diff --git a/home/.config/nvim/after/ftplugin/xdefaults.lua b/home/.config/nvim/after/ftplugin/xdefaults.lua new file mode 100644 index 0000000..0f4ec99 --- /dev/null +++ b/home/.config/nvim/after/ftplugin/xdefaults.lua @@ -0,0 +1,9 @@ +vim.bo.commentstring = "! %s" +vim.api.nvim_create_augroup("xdefaults", {}) +vim.api.nvim_create_autocmd( + "BufWritePost", + { group = "xdefaults", buffer = 0, command = "!xrdb %" } +) + +vim.b.undo_ftplugin = vim.b.undo_ftplugin + .. "| setlocal commentstring< diff --git a/home/.config/nvim/after/ftplugin/xmodmap.lua b/home/.config/nvim/after/ftplugin/xmodmap.lua new file mode 100644 index 0000000..75c9f8a --- /dev/null +++ b/home/.config/nvim/after/ftplugin/xmodmap.lua @@ -0,0 +1,4 @@ +vim.api.nvim_create_autocmd( + "BufWritePost", + { buffer = 0, command = "!xmodmap %" } +) diff --git a/home/.config/nvim/after/plugin/autocmds.lua b/home/.config/nvim/after/plugin/autocmds.lua new file mode 100644 index 0000000..7ab937f --- /dev/null +++ b/home/.config/nvim/after/plugin/autocmds.lua @@ -0,0 +1,137 @@ +local function augroup(name) + return vim.api.nvim_create_augroup(name, {}) +end + +local autocmd = vim.api.nvim_create_autocmd + +-- adapted from https://github.com/ethanholz/nvim-lastplace/blob/main/lua/nvim-lastplace/init.lua +local ignore_buftype = { "quickfix", "nofile", "help" } +local ignore_filetype = { "gitcommit", "gitrebase", "svn", "hgcommit" } + +local function run() + if vim.tbl_contains(ignore_buftype, vim.bo.buftype) then + return + end + + if vim.tbl_contains(ignore_filetype, vim.bo.filetype) then + -- reset cursor to first line + vim.cmd [[normal! gg]] + return + end + + -- If a line has already been specified on the command line, we are done + -- nvim file +num + if vim.fn.line(".") > 1 then + return + end + + local last_line = vim.fn.line([['"]]) + local buff_last_line = vim.fn.line("$") + + -- If the last line is set and the less than the last line in the buffer + if last_line > 0 and last_line <= buff_last_line then + local win_last_line = vim.fn.line("w$") + local win_first_line = vim.fn.line("w0") + -- Check if the last line of the buffer is the same as the win + if win_last_line == buff_last_line then + -- Set line to last line edited + vim.cmd [[normal! g`"]] + -- Try to center + elseif buff_last_line - last_line > + ((win_last_line - win_first_line) / 2) - 1 then + vim.cmd [[normal! g`"zz]] + else + vim.cmd [[normal! G'"<c-e>]] + end + end +end + +augroup("restore position") +autocmd("BufReadPost", { + once = true, + group = "restore position", + callback = run +}) + +augroup("postwrite") +autocmd("BufWritePost", { + group = "postwrite", + pattern = ".Xkeymap", + command = "!xkbcomp % $DISPLAY", +}) +autocmd("BufWritePost", { + group = "postwrite", + pattern = "*bspwmrc", + command = "!bspc wm --restart", +}) +autocmd("BufWritePost", { + group = "postwrite", + pattern = "*/polybar/config", + command = "!polybar-msg cmd restart", +}) +autocmd("BufWritePost", { + group = "postwrite", + pattern = "user-dirs.dirs,user-dirs.locale", + command = "!xdg-user-dirs-update", +}) +autocmd("BufWritePost", { + group = "postwrite", + pattern = "plugins.lua", + command = "source % | PackerSync", +}) +autocmd("BufWritePost", { + group = "postwrite", + pattern = "dunstrc", + command = "!killall -SIGUSR2 dunst", +}) +autocmd( + "BufWritePost", + { group = "postwrite", pattern = "fonts.conf", command = "!fc-cache" } +) + +augroup("autocomplete") +autocmd("CompleteDone", { + group = "autocomplete", + command = "if pumvisible() == 0 | silent! pclose | endif", +}) + +augroup("reload") +autocmd("CompleteDone", { + group = "reload", + command = "if getcmdwintype() == '' | checktime | endif", +}) + +augroup("highlightyank") +autocmd( + "TextYankPost", + { group = "highlightyank", callback = vim.highlight.on_yank } +) + +augroup("quitro") +autocmd("BufReadPost", { + group = "quitro", + callback = function() + if vim.opt.readonly:get() then + vim.keymap.set("n", "q", "<cmd>q<cr>") + end + end, +}) + +augroup("localinit") +autocmd("VimEnter", { + group = "localinit", + callback = function() + local settings = vim.fn.findfile(".doit.lua", ".;") + if settings ~= "" then + print("sourcing local config") + dofile(settings) + end + end, +}) + +augroup("restore guicursor") +autocmd("VimLeave", { + once = true, + group = "restore guicursor", + command = 'set guicursor= | call chansend(v:stderr, "\x1b[ q")' +}) diff --git a/home/.config/nvim/after/plugin/mappings.lua b/home/.config/nvim/after/plugin/mappings.lua new file mode 100644 index 0000000..7fd0f03 --- /dev/null +++ b/home/.config/nvim/after/plugin/mappings.lua @@ -0,0 +1,58 @@ +local map = require("mapper") + +map.n("<Space>", "<Nop>") + +-- make an accidental ; press also enter command mode +-- temporarily disabled to to vim-sneak plugin +map.n(";", ":") + +-- highlight last inserted text +map.n("gV", "`[v`]") + +map.n("<down>", "<c-e>") +map.n("<up>", "<c-y>") + +-- go to first non-blank character of current line +map.n("<c-a>", "^") +map.v("<c-a>", "^") +map.n("<c-e>", "$") +map.v("<c-e>", "$") + +-- This extends p in visual mode (note the noremap), so that if you paste from +-- the unnamed (ie. default) register, that register content is not replaced by +-- the visual selection you just pasted over–which is the default behavior. +-- This enables the user to yank some text and paste it over several places in +-- a row, without using a named register +-- map.v('p', "p:if v:register == '"'<Bar>let @@=@0<Bar>endif<cr>") +map.v("p", 'p:let @+=@0<CR>:let @"=@0<CR>') + +map.v("<leader>p", '"_dP') +map.n("<leader>d", '"_d') +map.n("<leader>D", '"_D') +map.map("", "<leader>c", '"_c') +map.map("", "<leader>C", '"_C') + +-- Find and Replace binds +map.ncmdi("<leader>s", "%s/") +map.vcmdi("<leader>s", "s/") +map.ncmdi("<leader>gs", '%s/<c-r>"/') +map.vcmdi("<leader>gs", 's/<c-r>"/') +map.ncmdi("<Leader>S", "%s/<C-r><C-w>/") + +map.ncmd("<leader>x", "wall") +map.ncmd("<leader>z", "wqall") +map.ncmd("<leader>q", "quitall") +map.ncmd("<localleader>x", "update") + +map.t("<Esc>", "<c-\\><c-n>", { silent = true, noremap = true, expr = true }) + +map.n("gw", vim.diagnostic.open_float) +map.n("gW", vim.diagnostic.setloclist) +map.n("[w", vim.diagnostic.goto_prev) +map.n("]w", vim.diagnostic.goto_next) +map.n("[e", function() + vim.diagnostic.goto_prev({ severity = vim.diagnostic.severity.ERROR }) +end) +map.n("]e", function() + vim.diagnostic.goto_next({ severity = vim.diagnostic.severity.ERROR }) +end) diff --git a/home/.config/nvim/filetype.lua b/home/.config/nvim/filetype.lua new file mode 100644 index 0000000..b13afe0 --- /dev/null +++ b/home/.config/nvim/filetype.lua @@ -0,0 +1,7 @@ +vim.filetype.add({ + extension = { + eml = "mail", + inc = "cpp", + def = "cpp", + }, +}) diff --git a/home/.config/nvim/init.lua b/home/.config/nvim/init.lua new file mode 100644 index 0000000..8326c43 --- /dev/null +++ b/home/.config/nvim/init.lua @@ -0,0 +1,26 @@ +vim.loader.enable() + +function docfg(name) + dofile(vim.fn.stdpath("config") .. "/lua/cfg/" .. name .. ".lua") +end + +docfg("options") + +function P(v) + print(vim.inspect(v)) + return v +end + +local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" +if not vim.loop.fs_stat(lazypath) then + vim.fn.system({ + "git", + "clone", + "--filter=blob:none", + "https://github.com/folke/lazy.nvim.git", + "--branch=stable", -- latest stable release + lazypath, + }) +end +vim.opt.rtp:prepend(lazypath) +require("lazy").setup("custom.plugins") diff --git a/home/.config/nvim/lua/cfg/lsp.lua b/home/.config/nvim/lua/cfg/lsp.lua new file mode 100644 index 0000000..5767ff6 --- /dev/null +++ b/home/.config/nvim/lua/cfg/lsp.lua @@ -0,0 +1,64 @@ +return { + on_attach_wrapper = function(client, bufnr, opts) + local map = require("mapper") + local autocmd = vim.api.nvim_create_autocmd + + opts = vim.tbl_extend("force", { auto_format = false }, opts or {}) + + if client.supports_method("textDocument/codeLens") then + require("virtualtypes").on_attach(client, bufnr) + autocmd( + { "CursorHold", "CursorHoldI", "InsertLeave" }, + { buffer = bufnr, callback = vim.lsp.codelens.refresh } + ) + map.n("gl", vim.lsp.codelens.run, { buffer = bufnr }) + end + + if client.supports_method("textDocument/definition") then + map.n("<c-]>", vim.lsp.buf.definition, { buffer = bufnr }) + end + if client.supports_method("textDocument/declaration") then + map.n("gD", vim.lsp.buf.declaration, { buffer = bufnr }) + end + if client.supports_method("textDocument/signatureHelp") then + require("lsp_signature").on_attach(client, bufnr) + map.n("gs", vim.lsp.buf.signature_help, { buffer = bufnr }) + end + if client.supports_method("textDocument/rename") then + map.n("gR", vim.lsp.buf.rename, { buffer = bufnr }) + end + if client.supports_method("textDocument/codeAction") then + map.n("ga", vim.lsp.buf.code_action, { buffer = bufnr }) + map.v("ga", vim.lsp.buf.code_action, { buffer = bufnr }) + end + + local buf_async_format = function() + vim.lsp.buf.format( + { bufnr = bufnr, async = true, id = client.id }) + end + local buf_sync_format = function() + vim.lsp.buf.format( + { bufnr = bufnr, async = false, id = client.id }) + end + local buf_async_format_hunks = function() + require("cfg.utils").format_hunks( + { bufnr = bufnr, async = true, id = client.id }) + end + + if client.supports_method("textDocument/formatting") then + map.n("<leader>f", buf_async_format, { buffer = bufnr }) + if opts.auto_format then + autocmd( + "BufWritePre", + { buffer = bufnr, callback = buf_sync_format } + ) + end + end + if client.supports_method("textDocument/rangeFormatting") then + map.v("<leader>f", buf_async_format, { buffer = bufnr }) + map.n("<leader>hf", buf_async_format_hunks, { buffer = bufnr }) + end + + require("lsp-inlayhints").on_attach(client, bufnr, false) + end +} diff --git a/home/.config/nvim/lua/cfg/options.lua b/home/.config/nvim/lua/cfg/options.lua new file mode 100644 index 0000000..1529121 --- /dev/null +++ b/home/.config/nvim/lua/cfg/options.lua @@ -0,0 +1,124 @@ +local opt = vim.opt + +opt.undofile = true +opt.swapfile = false +vim.opt.shadafile = "NONE" +vim.g.ts_highlight_lua = true +vim.g.ts_highlight_c = true +vim.g.ts_highlight_vim = true + +opt.showmode = true +opt.number = true +opt.cursorline = true +opt.signcolumn = "auto:2" +opt.showtabline = 2 +opt.showmatch = true + +opt.expandtab = true +opt.shiftround = true +opt.shiftwidth = 0 +opt.softtabstop = -1 +opt.tabstop = 4 + +opt.foldenable = false + +opt.splitbelow = true +opt.splitright = true + +opt.linebreak = true +opt.breakindent = true +opt.textwidth = 80 +opt.colorcolumn = "+1" +opt.formatoptions:remove("t") + +opt.spelllang:append({ "pt_pt", "es_es" }) +opt.spellfile = vim.fn.stdpath("config") .. "/spell/en.utf-8.add" + +opt.cmdheight = 2 +opt.updatetime = 300 + +opt.shortmess:append({ a = true }) + +opt.gdefault = true +opt.synmaxcol = 500 + +opt.completeopt = { "menu", "menuone", "noselect" } +opt.scrolloff = 999 +opt.sidescrolloff = 5 + +opt.clipboard = "unnamedplus" + +opt.wildmode = { "longest", "full" } + +opt.cpoptions:remove({ "_" }) + +opt.listchars = { + tab = "> ", + trail = "·", + extends = ">", + precedes = "<", + nbsp = "+", +} +opt.list = true + +opt.virtualedit = "block" +opt.spelloptions = "camel" + +vim.g.is_posix = 1 +vim.g.python_host_prog = 0 +vim.g.python3_host_prog = 0 +vim.g.netrw_home = vim.fn.stdpath("data") + +vim.g.loaded_netrw = 1 +vim.g.loaded_netrwPlugin = 1 +vim.g.loaded_netrwSettings = 1 +vim.g.loaded_netrwFileHandlers = 1 +vim.g.loaded_gzip = 1 +vim.g.loaded_zip = 1 +vim.g.loaded_zipPlugin = 1 +vim.g.loaded_tar = 1 +vim.g.loaded_tarPlugin = 1 +vim.g.loaded_zipPlugin = 1 +vim.g.loaded_getscript = 1 +vim.g.loaded_getscriptPlugin = 1 +vim.g.loaded_vimball = 1 +vim.g.loaded_vimballPlugin = 1 +vim.g.loaded_2html_plugin = 1 +vim.g.loaded_logipat = 1 +vim.g.loaded_rrhelper = 1 +vim.g.loaded_matchparen = 1 +vim.g.loaded_spec = 1 + +opt.diffopt:append({ + ["indent-heuristic"] = true, + hiddenoff = true, + iblank = true, + iwhiteall = true, + algorithm = "histogram", +}) + +if vim.fn.executable("rg") then + opt.grepprg = "rg\\ --vimgrep" + opt.grepformat:append("f:%l:%c:%m") +end + +opt.termguicolors = true +opt.pumblend = 20 + +opt.foldmethod = "expr" +opt.foldexpr = "nvim_treesitter#foldexpr()" +opt.foldenable = false + +opt.laststatus = 2 +vim.g.mapleader = " " +vim.g.maplocalleader = "," + +vim.diagnostic.config({ + virtual_text = { + source = "if_many", + severity = vim.diagnostic.severity.ERROR, + }, + signs = true, + underline = true, + update_in_insert = false, +}) diff --git a/home/.config/nvim/lua/cfg/utils.lua b/home/.config/nvim/lua/cfg/utils.lua new file mode 100644 index 0000000..abda35d --- /dev/null +++ b/home/.config/nvim/lua/cfg/utils.lua @@ -0,0 +1,24 @@ +local M = {} +local gitsigns = require("gitsigns") + +function M.format_hunks(options) + local hunks = require("gitsigns").get_hunks() + if not hunks or vim.tbl_isempty(hunks) then + return + end + for _, hunk in ipairs(hunks) do + local added = hunk.added + if added then + local start_line = added.start + local count = added.count + if start_line and count and start_line > 0 and count > 0 then + local end_line = start_line + added.count - 1 + local range = { start = { start_line, 0 }, ["end"] = { end_line, 0 } } + options = vim.tbl_extend("force", { range = range }, options or {}) + vim.lsp.buf.format(options) + end + end + end +end + +return M diff --git a/home/.config/nvim/lua/custom/plugins/init.lua b/home/.config/nvim/lua/custom/plugins/init.lua new file mode 100644 index 0000000..eb720e6 --- /dev/null +++ b/home/.config/nvim/lua/custom/plugins/init.lua @@ -0,0 +1,1117 @@ +local map = require("mapper") + +return { + { "nvim-lua/plenary.nvim", lazy = true }, + { "tpope/vim-repeat", event = "VeryLazy" }, + 'tpope/vim-sleuth', + { + "numToStr/Comment.nvim", + config = true, + }, + { + "tpope/vim-unimpaired", + keys = { "]", "[", "yo" }, + }, + { "folke/which-key.nvim", lazy = true }, + { "kylechui/nvim-surround", config = true }, + { + "dstein64/vim-startuptime", + cmd = "StartupTime", + }, + { + "folke/persistence.nvim", + config = true, + event = "BufReadPre", + keys = { + { + "<leader>qs", + require("persistence").load, + desc = + "Restore Session" + }, + { + "<leader>ql", + function() require("persistence").load({ last = true }) end, + desc = + "Restore Last Session" + }, + { + "<leader>qd", + require("persistence").stop, + desc = + "Don't Save Current Session" + }, + }, + }, + "xiyaowong/nvim-cursorword", + { + "sainnhe/gruvbox-material", + priority = 1000, + config = function() + vim.g.gruvbox_material_background = "hard" + vim.g.gruvbox_material_enable_bold = 1 + vim.g.gruvbox_material_enable_italic = 1 + vim.g.gruvbox_material_better_performance = 1 + vim.g.gruvbox_material_palette = "original" + + vim.cmd([[ colorscheme gruvbox-material]]) + end + }, + { + "aserowy/tmux.nvim", + config = true, + }, + { + "Julian/vim-textobj-variable-segment", + dependencies = { "kana/vim-textobj-user" }, + }, + { "mzlogin/vim-markdown-toc", ft = "markdown" }, + { + "norcalli/nvim-colorizer.lua", + event = "BufRead", + config = true + }, + { + "lewis6991/hover.nvim", + keys = { { "K", require "hover".hover }, { "gK", require "hover" + .hover_select }, { "gh", require "hover".hover }, + { "gH", require "hover".hover_select } }, + opts = { + init = function() + require("hover.providers.lsp") + require('hover.providers.gh') + require('hover.providers.man') + -- require('hover.providers.dictionary') + end, + }, + }, + { 'akinsho/git-conflict.nvim', config = true }, + { + "lukas-reineke/indent-blankline.nvim", + config = function() + local highlight = { + "RainbowRed", + "RainbowYellow", + "RainbowBlue", + "RainbowOrange", + "RainbowGreen", + "RainbowViolet", + "RainbowCyan", + } + local hooks = require "ibl.hooks" + -- create the highlight groups in the highlight setup hook, so they are reset + -- every time the colorscheme changes + hooks.register(hooks.type.HIGHLIGHT_SETUP, function() + vim.api.nvim_set_hl(0, "RainbowRed", { fg = "#E06C75" }) + vim.api.nvim_set_hl(0, "RainbowYellow", { fg = "#E5C07B" }) + vim.api.nvim_set_hl(0, "RainbowBlue", { fg = "#61AFEF" }) + vim.api.nvim_set_hl(0, "RainbowOrange", { fg = "#D19A66" }) + vim.api.nvim_set_hl(0, "RainbowGreen", { fg = "#98C379" }) + vim.api.nvim_set_hl(0, "RainbowViolet", { fg = "#C678DD" }) + vim.api.nvim_set_hl(0, "RainbowCyan", { fg = "#56B6C2" }) + end) + + vim.g.rainbow_delimiters = { highlight = highlight } + require("ibl").setup { scope = { highlight = highlight } } + + hooks.register(hooks.type.SCOPE_HIGHLIGHT, + hooks.builtin.scope_highlight_from_extmark) + end + }, + { + "monaqa/dial.nvim", + config = function() + map.n("]i", require("dial.map").inc_normal()) + map.n("[i", require("dial.map").dec_normal()) + map.v("]i", require("dial.map").inc_visual()) + map.v("[i", require("dial.map").dec_visual()) + end + }, + { + "iamcco/markdown-preview.nvim", + build = "cd app && yarn install", + ft = "markdown", + config = function() + vim.api.nvim_command([[ + function! g:OpenNewWindow(url) + silent exec "Start! librewolf --new-window " . a:url + endfunction + ]]) + vim.g.mkdp_browserfunc = "g:OpenNewWindow" + end, + }, + "gpanders/editorconfig.nvim", + { + "kwkarlwang/bufresize.nvim", + config = true + }, + "kovetskiy/sxhkd-vim", + "tmux-plugins/vim-tmux", + "chrisbra/csv.vim", + "martinda/Jenkinsfile-vim-syntax", + "rhysd/vim-llvm", + "MTDL9/vim-log-highlighting", + "raimon49/requirements.txt.vim", + "wgwoods/vim-systemd-syntax", + { + "NeogitOrg/neogit", + dependencies = { + "nvim-lua/plenary.nvim", + }, + config = function() + require("neogit").setup({ + disable_commit_confirmation = true, + kind = "split", + console_timeout = 5000, + auto_show_console = false, + }) + map.n("<leader>ng", require "neogit".open) + end, + }, + { + "ruifm/gitlinker.nvim", + keys = { + { "<leader>gy", function() require 'gitlinker'.get_buf_range_url("n") end }, + { + "<leader>gy", + function() + require 'gitlinker'.get_buf_range_url("v") + end, + mode = "v" + }, + }, + dependencies = { + "nvim-lua/plenary.nvim", + }, + config = function() + require "gitlinker".setup({ + callbacks = { + ["personal"] = function(url_data) + url_data.host = "github.com" + return require "gitlinker.hosts".get_github_type_url(url_data) + end, + ["work"] = function(url_data) + url_data.host = "github.com" + return require "gitlinker.hosts".get_github_type_url(url_data) + end, + ["git.strisemarx.com"] = function(url_data) + local url = require "gitlinker.hosts".get_base_https_url(url_data) + url = url .. "/tree/" .. url_data.file .. "?id=" .. url_data.rev + if url_data.lstart then + url = url .. "#n" .. url_data.lstart + end + return url + end + }, + }) + end, + }, + { + "lewis6991/gitsigns.nvim", + event = "BufRead", + opts = { + signs = { + change = { show_count = true }, + delete = { show_count = true }, + topdelete = { show_count = true }, + changedelete = { show_count = true }, + }, + numhl = true, + _extmark_signs = true, + _threaded_diff = true, + _signs_staged_enable = true, + on_attach = function(bufnr) + local gs = package.loaded.gitsigns + + -- Navigation + map.n(']c', function() + if vim.wo.diff then return ']c' end + vim.schedule(function() gs.next_hunk() end) + return '<Ignore>' + end, { expr = true }, bufnr) + + map.n('[c', function() + if vim.wo.diff then return '[c' end + vim.schedule(function() gs.prev_hunk() end) + return '<Ignore>' + end, { expr = true }, bufnr) + + -- Actions + map.nvcmd('<leader>hs', "Gitsigns stage_hunk", nil, bufnr) + map.nvcmd('<leader>hr', "Gitsigns reset_hunk", nil, bufnr) + map.n('<leader>hS', gs.stage_buffer, nil, bufnr) + map.n('<leader>hu', gs.undo_stage_hunk, nil, bufnr) + map.n('<leader>hR', gs.reset_buffer, nil, bufnr) + map.n('<leader>hp', gs.preview_hunk, nil, bufnr) + map.n('<leader>hb', function() gs.blame_line { full = true } end, nil, + bufnr) + map.n('<leader>tb', gs.toggle_current_line_blame, nil, bufnr) + map.n('<leader>hd', gs.diffthis, nil, bufnr) + map.n('<leader>hD', function() gs.diffthis('~') end, nil, bufnr) + map.n('<leader>hc', gs.change_base, nil, bufnr) + map.n('<leader>hC', function() gs.change_base('~') end, nil, bufnr) + map.n('<leader>td', gs.toggle_deleted, nil, bufnr) + map.n('<leader>tw', gs.toggle_word_diff, nil, bufnr) + map.n('<leader>tl', gs.toggle_linehl, nil, bufnr) + + -- Text object + map.map({ 'o', 'x' }, 'ih', ':<C-U>Gitsigns select_hunk<CR>', nil, bufnr) + end + }, + dependencies = { + "nvim-lua/plenary.nvim", + }, + }, + { + "nvim-telescope/telescope.nvim", + config = function() + local actions = require("telescope.actions") + require("telescope").setup({ + defaults = { + sorting_strategy = "ascending", + layout_config = { + prompt_position = "top", + }, + scroll_strategy = "cycle", + selection_strategy = "follow", + color_devicons = false, + mappings = { + i = { + ["<c-j>"] = actions.move_selection_next, + ["<c-k>"] = actions.move_selection_previous, + }, + }, + extensions = { + fzf = { + fuzzy = true, -- false will only do exact matching + override_generic_sorter = true, -- override the generic sorter + override_file_sorter = true, -- override the file sorter + case_mode = "smart_case", -- or "ignore_case" or "respect_case" + }, + ["ui-select"] = { + require("telescope.themes").get_dropdown({ + -- even more opts + }), + }, + }, + }, + }) + require("telescope").load_extension("fzf") + require("telescope").load_extension("ui-select") + + local b = require("telescope.builtin") + + map.n("<localleader>p", b.planets) + map.n("<localleader>B", b.builtin) + map.n("<localleader>/", b.live_grep) + map.n("<localleader>?", b.grep_string) + map.n("<localleader>f", function() + b.find_files({ + find_command = { + "fd", + "--type", + "file", + "--follow", + "--hidden", + "--exclude", + ".git", + }, + }) + end) + map.n("<localleader>b", function() + b.buffers({ sort_lastused = true, initial_mode = "normal" }) + end) + + map.n("<localleader>t", b.treesitter) + + map.n("<localleader>c", b.commands) + map.n("<localleader>h", b.help_tags) + map.n("<localleader>m", b.man_pages) + map.n("<localleader>k", b.keymaps) + map.n("<localleader>Q", function() + b.quickfix({ initial_mode = "normal" }) + end) + map.n("<localleader>L", function() + b.loclist({ initial_mode = "normal" }) + end) + map.n("<localleader>R", function() + b.registers({ initial_mode = "normal" }) + end) + map.n("<localleader>A", b.autocommands) + + map.n("gd", function() + b.lsp_definitions({ initial_mode = "normal" }) + end) + map.n("gvd", function() + b.lsp_definitions({ initial_mode = "normal", jump_type = "vsplit" }) + end) + map.n("gxd", function() + b.lsp_definitions({ initial_mode = "normal", jump_type = "split" }) + end) + map.n("gtd", function() + b.lsp_definitions({ initial_mode = "normal", jump_type = "tab" }) + end) + map.n("gi", function() + b.lsp_implementations({ initial_mode = "normal" }) + end) + map.n("gvi", function() + b.lsp_implementations({ initial_mode = "normal", jump_type = "vsplit" }) + end) + map.n("gxi", function() + b.lsp_implementations({ initial_mode = "normal", jump_type = "split" }) + end) + map.n("gti", function() + b.lsp_implementations({ initial_mode = "normal", jump_type = "tab" }) + end) + map.n("go", b.lsp_document_symbols) + map.n("gS", b.lsp_dynamic_workspace_symbols) + map.n("ge", function() + b.lsp_document_diagnostics({ initial_mode = "normal" }) + end) + map.n("gE", function() + b.lsp_workspace_diagnostics({ initial_mode = "normal" }) + end) + map.n("gr", function() + b.lsp_references({ initial_mode = "normal" }) + end) + map.n("gic", function() + b.lsp_incoming_calls({ initial_mode = "normal" }) + end) + map.n("goc", function() + b.lsp_outgoing_calls({ initial_mode = "normal" }) + end) + end, + dependencies = { + "nvim-lua/plenary.nvim", + { + "nvim-telescope/telescope-fzf-native.nvim", + build = "make", + }, + "nvim-telescope/telescope-ui-select.nvim", + }, + }, + { + "mfussenegger/nvim-dap", + config = function() + local dap = require("dap") + + dap.defaults.fallback.force_external_terminal = true + dap.defaults.fallback.external_terminal = { + command = "/usr/bin/st", + args = { "-e" }, + } + + dap.defaults.fallback.terminal_win_cmd = "50vsplit new" + + local function get_env_vars() + local variables = {} + for k, v in pairs(vim.fn.environ()) do + table.insert(variables, string.format("%s=%s", k, v)) + end + return variables + end + + dap.adapters.lldb = { + type = "executable", + command = "/usr/bin/lldb-vscode", + name = "lldb", + } + + local function str_split(inputstr, sep) + sep = sep or "%s" + local t = {} + for str in inputstr:gmatch("([^" .. sep .. "]+)") do + table.insert(t, str) + end + return t + end + + local _cmd = nil + + local function get_cmd() + if _cmd then + return _cmd + end + local clipboard_cmd = vim.fn.getreg("+") + _cmd = vim.fn.input({ + prompt = "Command to execute: ", + default = clipboard_cmd + }) + return _cmd + end + + local function get_program() + return str_split(get_cmd())[1] + end + + local function get_args() + local argv = str_split(get_cmd()) + local args = {} + + if #argv < 2 then + return {} + end + + for i = 2, #argv do + args[#args + 1] = argv[i] + end + + return args + end + + dap.configurations.cpp = { + { + name = "Launch", + type = "lldb", + request = "launch", + cwd = "${workspaceFolder}", + program = get_program, + stopOnEntry = true, + args = get_args, + env = get_env_vars, + runInTerminal = true, + }, + { + -- If you get an "Operation not permitted" error using this, try disabling YAMA: + -- echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope + name = "Attach to process", + type = "lldb", + request = "attach", + pid = require('dap.utils').pick_process, + }, + } + + dap.configurations.c = dap.configurations.cpp + dap.configurations.rust = dap.configurations.cpp + + local get_python_path = function() + local venv_path = os.getenv("VIRTUAL_ENV") + if venv_path then + return venv_path .. "/bin/python" + end + return "/usr/bin/python" + end + + require("dap-python").setup(get_python_path()) + + dap.adapters.nlua = function(callback, config) + callback({ type = "server", host = config.host, port = config.port }) + end + + dap.configurations.lua = { + { + type = "nlua", + request = "attach", + name = "Attach to running Neovim instance", + host = function() + local value = vim.fn.input("Host [127.0.0.1]: ") + if value ~= "" then + return value + end + return "127.0.0.1" + end, + port = function() + local val = tonumber(vim.fn.input("Port: ")) + assert(val, "Please provide a port number") + return val + end, + }, + } + + dap.repl.commands = vim.tbl_extend("force", dap.repl.commands, { + continue = { "continue", "c" }, + next_ = { "next", "n" }, + back = { "back", "b" }, + reverse_continue = { "reverse-continue", "rc" }, + into = { "into" }, + into_target = { "into_target" }, + out = { "out" }, + scopes = { "scopes" }, + threads = { "threads" }, + frames = { "frames" }, + exit = { "exit", "quit", "q" }, + up = { "up" }, + down = { "down" }, + goto_ = { "goto" }, + capabilities = { "capabilities", "cap" }, + -- add your own commands + custom_commands = { + ["echo"] = function(text) + dap.repl.append(text) + end, + }, + }) + + map.n("<F4>", dap.close) + map.n("<F5>", dap.continue) + map.n("<F10>", dap.step_over) + map.n("<F11>", dap.step_into) + map.n("<F12>", dap.step_out) + map.n("<leader>b", dap.toggle_breakpoint) + map.n("<leader>B", function() + dap.set_breakpoint(vim.fn.input("Breakpoint condition: ")) + end) + map.n("<leader>lp", function() + dap.set_breakpoint(nil, nil, vim.fn.input("Log point message: ")) + end) + map.n("<leader>dr", dap.repl.open) + map.n("<leader>dl", dap.run_last) + map.n("<F2>", dap.list_breakpoints) + + local dapui = require("dapui") + dap.listeners.after.event_initialized["dapui_config"] = function() + dapui.open() + end + dap.listeners.before.event_terminated["dapui_config"] = function() + dapui.close() + end + dap.listeners.before.event_exited["dapui_config"] = function() + dapui.close() + end + map.n("<leader>du", dapui.toggle) + map.v("<leader>de", dapui.eval) + end, + dependencies = { + { + "rcarriga/nvim-dap-ui", + opts = { + icons = { expanded = "-", collapsed = "+", current_frame = "*" }, + controls = { enabled = false }, + layouts = { + { + elements = { + -- Elements can be strings or table with id and size keys. + "scopes", + "breakpoints", + "stacks", + "watches", + }, + size = 40, + position = "left", + }, + { + elements = { + "repl", + }, + size = 0.25, -- 25% of total lines + position = "bottom", + }, + }, + }, + }, + { + "mfussenegger/nvim-dap-python", + keys = { + { "gm", function() + require("dap-python").test_method() + end }, + { + "g<cr>", + function() + require("dap-python").debug_selection() + end, + mode = "v" + }, + }, + }, + "jbyuki/one-small-step-for-vimkind", + { + "theHamsta/nvim-dap-virtual-text", + config = true, + dependencies = { "nvim-treesitter/nvim-treesitter" } + } + }, + }, + { + 'nvim-treesitter/nvim-treesitter', + dependencies = { + 'nvim-treesitter/nvim-treesitter-textobjects', + "nvim-treesitter/nvim-treesitter-refactor", + "RRethy/nvim-treesitter-textsubjects", + "theHamsta/nvim-treesitter-pairs", + "RRethy/nvim-treesitter-endwise", + }, + build = ":TSUpdate", + config = function() + require("nvim-treesitter.configs").setup({ + ensure_installed = { + "bash", + "c", + "cmake", + "comment", + "cpp", + "css", + "cuda", + "diff", + "dockerfile", + "fortran", + "git_rebase", + "gitattributes", + "gitcommit", + "gitignore", + "go", + "html", + "javascript", + "jsdoc", + "json", + "llvm", + "lua", + "make", + "markdown", + "markdown_inline", + "ninja", + "python", + "regex", + "rust", + "sql", + "todotxt", + "toml", + "typescript", + "vim", + "vimdoc", + "yaml" + }, + -- ignore_install = { "phpdoc" }, + highlight = { + enable = true, -- false will disable the whole extension + additional_vim_regex_highlighting = false, + }, + incremental_selection = { + enable = true, + keymaps = { + init_selection = "gnn", + node_incremental = "grn", + scope_incremental = "grc", + node_decremental = "grm", + }, + }, + indent = { enable = true }, + refactor = { + highlight_definitions = { enable = true }, + highlight_current_scope = { enable = true }, + smart_rename = { enable = true, keymaps = { smart_rename = "grr" } }, + navigation = { + enable = true, + keymaps = { + goto_definition = "gnd", + list_definitions = "gnD", + list_definitions_toc = "gO", + goto_next_usage = "<a-*>", + goto_previous_usage = "<a-#>", + }, + }, + }, + textobjects = { + select = { + enable = true, + -- Automatically jump forward to textobj, similar to targets.vim + lookahead = true, + keymaps = { + -- You can use the capture groups defined in textobjects.scm + ["af"] = "@function.outer", + ["if"] = "@function.inner", + ["ac"] = "@class.outer", + ["ic"] = "@class.inner", + }, + }, + swap = { + enable = true, + swap_next = { ["<leader>a"] = "@parameter.inner" }, + swap_previous = { ["<leader>A"] = "@parameter.inner" }, + }, + move = { + enable = true, + set_jumps = true, -- whether to set jumps in the jumplist + goto_next_start = { + ["]m"] = "@function.outer", + ["]]"] = "@class.outer", + }, + goto_next_end = { + ["]M"] = "@function.outer", + ["]["] = "@class.outer", + }, + goto_previous_start = { + ["[m"] = "@function.outer", + ["[["] = "@class.outer", + }, + goto_previous_end = { + ["[M"] = "@function.outer", + ["[]"] = "@class.outer", + }, + }, + lsp_interop = { + enable = true, + peek_definition_code = { + ["df"] = "@function.outer", + ["dF"] = "@class.outer", + }, + }, + }, + matchup = { + enable = true, + }, + pairs = { + enable = true, + goto_right_end = false, + keymaps = { goto_partner = "%" }, + }, + textsubjects = { + enable = true, + keymaps = { ["."] = "textsubjects-smart", [";"] = "textsubjects-big" }, + }, + tree_docs = { + enable = true, + }, + endwise = { + enable = true, + }, + }) + end + }, + { + "hrsh7th/nvim-cmp", + event = "InsertEnter", + config = function() + local cmp = require("cmp") + + local has_words_before = function() + local line, col = unpack(vim.api.nvim_win_get_cursor(0)) + return col ~= 0 + and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1] + :sub(col, col) + :match("%s") + == nil + end + + local luasnip = require("luasnip") + + cmp.setup({ + snippet = { + expand = function(args) + require("luasnip").lsp_expand(args.body) + end, + }, + mapping = { + ["<Tab>"] = cmp.mapping(function(fallback) + if cmp.visible() then + cmp.select_next_item() + elseif luasnip.expand_or_jumpable() then + luasnip.expand_or_jump() + elseif has_words_before() then + cmp.complete() + else + fallback() + end + end, { + "i", + "s", + }), + ["<S-Tab>"] = cmp.mapping(function(fallback) + if cmp.visible() then + cmp.select_prev_item() + elseif luasnip.jumpable(-1) then + luasnip.jump(-1) + else + fallback() + end + end, { + "i", + "s", + }), + ["<CR>"] = cmp.mapping.confirm({ + behavior = cmp.ConfirmBehavior.Replace, + select = true, + }), + }, + formatting = { + format = function(entry, vim_item) + -- set a name for each source + vim_item.menu = ({ + path = "[Path]", + nvim_lsp = "[LSP]", + luasnip = "[LuaSnip]", + dap = "[dap]", + })[entry.source.name] + return vim_item + end, + }, + sources = { + { name = "nvim_lsp" }, + { name = "luasnip" }, + { name = "path" }, + { name = "nvim_lsp_signature_help" }, + }, + }) + + require "cmp".setup.filetype( + { "dap-repl", "dapui_watches", "dapui_hover" }, { + sources = { + { name = "dap" }, + }, + }) + end, + dependencies = { + "hrsh7th/cmp-nvim-lsp", + "hrsh7th/cmp-path", + "hrsh7th/cmp-nvim-lsp-signature-help", + "rcarriga/cmp-dap", + { + "saadparwaiz1/cmp_luasnip", + dependencies = { + { + "L3MON4D3/LuaSnip", + event = "InsertCharPre", + keys = { + { "<c-j>", function() require "luasnip".jump(1) end, mode = "i" }, + { "<c-k>", function() require "luasnip".jump(-1) end, mode = "i" }, + }, + config = function() + require("luasnip/loaders/from_vscode").lazy_load() + end, + dependencies = { + "kitagry/vs-snippets", + "rafamadriz/friendly-snippets", + "kkonghao/snippet-dog", + }, + } + }, + }, + }, + }, + { + 'neovim/nvim-lspconfig', + config = function() + local lspconfig = require("lspconfig") + -- Enable (broadcasting) snippet capability for completion + local capabilities = vim.lsp.protocol.make_client_capabilities() + capabilities.textDocument.completion.completionItem.snippetSupport = true + capabilities.workspace.didChangeWatchedFiles.dynamicRegistration = true + capabilities = require("cmp_nvim_lsp").default_capabilities(capabilities) + + lspconfig.util.default_config = vim.tbl_extend( + "force", + lspconfig.util.default_config, + { + on_attach = require "cfg.lsp".on_attach_wrapper, + capabilities = capabilities, + flags = { + debounce_text_changes = 150, + }, + } + ) + + local function switch_source_header_splitcmd(bufnr, splitcmd) + bufnr = lspconfig.util.validate_bufnr(bufnr) + local clangd_client = lspconfig.util.get_active_client_by_name( + bufnr, + "clangd" + ) + local params = { uri = vim.uri_from_bufnr(bufnr) } + if clangd_client then + clangd_client.request( + "textDocument/switchSourceHeader", + params, + function(err, result) + if err then + error(tostring(err)) + end + if not result then + print("Corresponding file cannot be determined") + return + end + vim.api.nvim_command(splitcmd .. " " .. vim.uri_to_fname(result)) + end, + bufnr + ) + else + print( + "method textDocument/switchSourceHeader is not supported by any servers active on the current buffer" + ) + end + end + + local servers = { + bashls = {}, + fortls = {}, + lua_ls = { + on_attach = function(client, bufnr) + require("cfg.lsp").on_attach_wrapper( + client, + bufnr, + { auto_format = true } + ) + end, + settings = { + Lua = { + completion = { + callSnippet = "Both", + displayContext = 1, + }, + hint = { + enable = true, + } + } + }, + }, + ruff_lsp = {}, + pyright = {}, + clangd = { + cmd = { + "clangd", + "--enable-config", + "--completion-parse=auto", + "--completion-style=bundled", + "--header-insertion=iwyu", + "--header-insertion-decorators", + "--inlay-hints", + "--suggest-missing-includes", + "--folding-ranges", + "--function-arg-placeholders", + "--pch-storage=memory", + }, + commands = { + ClangdSwitchSourceHeader = { + function() + switch_source_header_splitcmd(0, "edit") + end, + description = "Open source/header in current buffer", + }, + ClangdSwitchSourceHeaderVSplit = { + function() + switch_source_header_splitcmd(0, "vsplit") + end, + description = "Open source/header in a new vsplit", + }, + ClangdSwitchSourceHeaderSplit = { + function() + switch_source_header_splitcmd(0, "split") + end, + description = "Open source/header in a new split", + }, + ClangdSwitchSourceHeaderTab = { + function() + switch_source_header_splitcmd(0, "tabedit") + end, + description = "Open source/header in a new tab", + }, + }, + on_attach = function(client, bufnr) + require("cfg.lsp").on_attach_wrapper(client, bufnr) + local cmpconfig = require("cmp.config") + local compare = require("cmp.config.compare") + cmpconfig.set_buffer({ + sorting = { + comparators = { + compare.offset, + compare.exact, + -- compare.scopes, + require("clangd_extensions.cmp_scores"), + compare.recently_used, + compare.locality, + compare.kind, + compare.sort_text, + compare.length, + compare.order, + }, + }, + }, bufnr) + vim.api.nvim_create_augroup("clang-format", {}) + vim.api.nvim_create_autocmd("BufWritePre", { + group = "clang-format", + buffer = bufnr, + callback = function() + if vim.fn.expand('%:p:h'):find("test") then + return + end + require("cfg.utils").format_hunks({ + bufnr = bufnr, + async = false, + id = client.id + }) + end, + }) + map.ncmd("gH", "ClangdSwitchSourceHeader") + map.ncmd("gvH", "ClangdSwitchSourceHeaderVSplit") + map.ncmd("gxH", "ClangdSwitchSourceHeaderSplit") + map.ncmd("gtH", "ClangdSwitchSourceHeaderSplit") + + require("clangd_extensions.inlay_hints").setup_autocmd() + require("clangd_extensions.inlay_hints").set_inlay_hints() + end, + init_options = { + usePlaceholders = true, + completeUnimported = true, + clangdFileStatus = true, + }, + }, + } + + for server, config in pairs(servers) do + local default_config = lspconfig[server].default_config or + lspconfig[server].document_config.default_config + local cmd = config.cmd or default_config.cmd + if vim.fn.executable(cmd[1]) == 1 then lspconfig[server].setup(config) end + end + end, + dependencies = { + "hrsh7th/cmp-nvim-lsp", + "ray-x/lsp_signature.nvim", + "jubnzv/virtual-types.nvim", + { 'folke/neodev.nvim', opts = {} }, + { "lvimuser/lsp-inlayhints.nvim", config = true }, + { + "p00f/clangd_extensions.nvim", + config = function() + require("clangd_extensions").setup({ + }) + end + }, + }, + }, + { + 'nvim-lualine/lualine.nvim', + opts = { + options = { + icons_enabled = false, + theme = 'gruvbox_dark', + component_separators = '', + section_separators = '|', + }, + sections = { + lualine_a = { 'filetype', { 'filename', path = 1 } }, + lualine_b = { '%l/%L:%c:%o' }, + lualine_c = { 'diff' }, + lualine_x = { 'searchcount, selectioncount' }, + lualine_y = {}, + lualine_z = { 'diagnostics' } + }, + inactive_sections = { + lualine_a = { 'filename' }, + lualine_b = {}, + lualine_c = {}, + lualine_x = {}, + lualine_y = {}, + lualine_z = {} + }, + }, + }, + { + "nvimtools/none-ls.nvim", + config = function() + local nls = require("null-ls") + nls.setup({ + on_attach = function(client, bufnr) + require("cfg.lsp").on_attach_wrapper( + client, + bufnr, + { auto_format = true } + ) + end, + sources = { + nls.builtins.formatting.black, + } + }) + end, + }, + "https://gitlab.com/HiPhish/rainbow-delimiters.nvim", +} diff --git a/home/.config/nvim/lua/mapper.lua b/home/.config/nvim/lua/mapper.lua new file mode 100644 index 0000000..c31aeca --- /dev/null +++ b/home/.config/nvim/lua/mapper.lua @@ -0,0 +1,84 @@ +local M = {} + +M.map = function(mode, keys, action, opts, bufnr) + opts = vim.tbl_extend("force", { silent = true, buffer = bufnr }, opts or {}) + vim.keymap.set(mode, keys, action, opts) +end + +M.cmdi = function(mode, keys, action, opts, bufnr) + opts = vim.tbl_extend("force", { silent = false }, opts or {}) + M.map(mode, keys, ":" .. action, opts, bufnr) +end + +M.cmd = function(mode, keys, action, opts, bufnr) + M.map(mode, keys, "<cmd>" .. action .. "<cr>", opts, bufnr) +end + +M.plug = function(mode, keys, action, opts, bufnr) + M.map(mode, keys, "<Plug>" .. action, opts, bufnr) +end + +M.n = function(keys, action, opts, bufnr) + M.map("n", keys, action, opts, bufnr) +end +M.ncmdi = function(keys, action, opts, bufnr) + M.cmdi("n", keys, action, opts, bufnr) +end +M.ncmd = function(keys, action, opts, bufnr) + M.cmd("n", keys, action, opts, bufnr) +end +M.nplug = function(keys, action, opts, bufnr) + M.plug("n", keys, "(" .. action .. ")", opts, bufnr) +end + +M.v = function(keys, action, opts, bufnr) + M.map("v", keys, action, opts, bufnr) +end +M.vcmdi = function(keys, action, opts, bufnr) + opts = vim.tbl_extend("force", { silent = false }, opts or {}) + M.v(keys, ":" .. action, opts, bufnr) +end +M.vcmd = function(keys, action, opts, bufnr) + M.vcmdi(keys, action .. "<cr>", opts, bufnr) +end +M.vplug = function(keys, action, opts, bufnr) + M.plug("v", keys, "(" .. action .. ")", opts, bufnr) +end + +M.nv = function(keys, action, opts, bufnr) + M.map({ "n", "v" }, keys, action, opts, bufnr) +end +M.nvcmdi = function(keys, action, opts, bufnr) + M.ncmdi(keys, action, opts, bufnr) + M.vcmdi(keys, action, opts, bufnr) +end +M.nvcmd = function(keys, action, opts, bufnr) + M.ncmd(keys, action, opts, bufnr) + M.vcmd(keys, action, opts, bufnr) +end +M.nvplug = function(keys, action, opts, bufnr) + M.plug({ "n", "v" }, keys, "(" .. action .. ")", opts, bufnr) +end + +M.i = function(keys, action, opts, bufnr) + M.map("i", keys, action, opts, bufnr) +end +M.iplug = function(keys, action, opts, bufnr) + opts = vim.tbl_extend("force", { silent = false }, opts or {}) + M.plug("i", keys, action, opts, bufnr) +end + +M.t = function(keys, action, opts, bufnr) + M.map("t", keys, action, opts, bufnr) +end +M.tcmdi = function(keys, action, opts, bufnr) + M.cmdi("t", keys, action, opts, bufnr) +end +M.tcmd = function(keys, action, opts, bufnr) + M.cmd("t", keys, action, opts, bufnr) +end +M.tplug = function(keys, action, opts, bufnr) + M.plug("t", keys, action, opts, bufnr) +end + +return M diff --git a/home/.config/pacman/makepkg.conf b/home/.config/pacman/makepkg.conf new file mode 100644 index 0000000..5c452e9 --- /dev/null +++ b/home/.config/pacman/makepkg.conf @@ -0,0 +1,11 @@ +CFLAGS="-march=native -Ofast -pipe -fomit-frame-pointer" +RUSTFLAGS="-C opt-level=2 -C target-cpu=native" +MAKEFLAGS="-j$(nproc)" +BUILDDIR=/tmp/makepkg +COMPRESSGZ=(pzip -c -f -n) +COMPRESSBZ2=(pzip2 -c -f) +COMPRESSGZ=(pigz -c -f -n) +COMPRESSBZ2=(pbzip2 -c -f) +COMPRESSXZ=(xz -c -z - --threads=0) +COMPRESSZST=(zstd -c -z -q - --threads=0) +PKGEXT='.pkg.tar.zst' diff --git a/home/.config/pam-gnupg b/home/.config/pam-gnupg new file mode 100644 index 0000000..0664d7c --- /dev/null +++ b/home/.config/pam-gnupg @@ -0,0 +1,7 @@ +91191A4A6E86279A901A7D38A7512EC126518FA5 +22747ABA1B4502F186654CD84DC353B0C3BD353F +9F3FCCA0F99AE1C5D05B834F0E89C79970A7B74A + +613F4BBF6E877E8CF55E18C24A429474B2F1A6AD +3D9578DBF76FC0D4272965CE8B3B04B7521AAD66 +23F3B67A62967CE2538EF1748CC3D4321A08F6BC diff --git a/home/.config/paru/paru.conf b/home/.config/paru/paru.conf new file mode 100644 index 0000000..fc0f9a9 --- /dev/null +++ b/home/.config/paru/paru.conf @@ -0,0 +1,25 @@ +# +# /etc/paru.conf +# ~/.config/paru/paru.conf +# +# See the paru.conf(5) manpage for options + +# +# GENERAL OPTIONS +# +[options] +PgpFetch +Devel +Provides +DevelSuffixes = -git -cvs -svn -bzr -darcs -always +# BottomUp +RemoveMake +SudoLoop +#UseAsk +CombinedUpgrade +BatchInstall +# UpgradeMenu +NewsOnUpgrade +CleanAfter +SaveChanges +NoWarn = strisemarx-* diff --git a/home/.config/pipewire/media-session.d/bluez-monitor.conf b/home/.config/pipewire/media-session.d/bluez-monitor.conf new file mode 100644 index 0000000..1752508 --- /dev/null +++ b/home/.config/pipewire/media-session.d/bluez-monitor.conf @@ -0,0 +1,130 @@ +# Bluez monitor config file for PipeWire version "0.3.34" # +# +# Copy and edit this file in /etc/pipewire/media-session.d/ +# for systemwide changes or in +# ~/.config/pipewire/media-session.d/ for local changes. + +properties = { + # These features do not work on all headsets, so they are enabled + # by default based on the hardware database. They can also be + # forced on/off for all devices by the following options: + + #bluez5.enable-sbc-xq = true + #bluez5.enable-msbc = true + #bluez5.enable-hw-volume = true + + # See bluez-hardware.conf for the hardware database. + + # Enabled headset roles (default: [ hsp_hs hfp_ag ]), this + # property only applies to native backend. Currently some headsets + # (Sony WH-1000XM3) are not working with both hsp_ag and hfp_ag + # enabled, disable either hsp_ag or hfp_ag to work around it. + # + # Supported headset roles: hsp_hs (HSP Headset), + # hsp_ag (HSP Audio Gateway), + # hfp_hf (HFP Hands-Free), + # hfp_ag (HFP Audio Gateway) + #bluez5.headset-roles = [ hsp_hs hsp_ag hfp_hf hfp_ag ] + + # Enabled A2DP codecs (default: all). + #bluez5.codecs = [ sbc sbc_xq aac ldac aptx aptx_hd aptx_ll aptx_ll_duplex faststream faststream_duplex ] + + # Properties for the A2DP codec configuration + #bluez5.default.rate = 48000 + #bluez5.default.channels = 2 +} + +rules = [ + # An array of matches/actions to evaluate. + { + # Rules for matching a device or node. It is an array of + # properties that all need to match the regexp. If any of the + # matches work, the actions are executed for the object. + matches = [ + { + # This matches all cards. + device.name = "~bluez_card.*" + } + ] + actions = { + # Actions can update properties on the matched object. + update-props = { + + # Auto-connect device profiles on start up or when only partial + # profiles have connected. Disabled by default if the property + # is not specified. + #bluez5.auto-connect = [ + # hfp_hf + # hsp_hs + # a2dp_sink + # hfp_ag + # hsp_ag + # a2dp_source + #] + bluez5.auto-connect = [ hfp_hf hsp_hs a2dp_sink ] + + # Hardware volume control (default: all) + #bluez5.hw-volume = [ + # hfp_hf + # hsp_hs + # a2dp_sink + # hfp_ag + # hsp_ag + # a2dp_source + #] + + # LDAC encoding quality + # Available values: auto (Adaptive Bitrate, default) + # hq (High Quality, 990/909kbps) + # sq (Standard Quality, 660/606kbps) + # mq (Mobile use Quality, 330/303kbps) + #bluez5.a2dp.ldac.quality = auto + + # AAC variable bitrate mode + # Available values: 0 (cbr, default), 1-5 (quality level) + #bluez5.a2dp.aac.bitratemode = 0 + + # Profile connected first + # Available values: a2dp-sink (default), headset-head-unit + #device.profile = a2dp-sink + + # A2DP <-> HFP profile auto-switching (when device is default output) + # Available values: false, role (default), true + # 'role' will switch the profile if the recording application + # specifies Communication (or "phone" in PA) as the stream role. + bluez5.autoswitch-profile = true + } + } + } + { + matches = [ + { + # Matches all sources. + node.name = "~bluez_input.*" + } + { + # Matches all sinks. + node.name = "~bluez_output.*" + } + ] + actions = { + update-props = { + #node.nick = "My Node" + #node.nick = null + #priority.driver = 100 + #priority.session = 100 + node.pause-on-idle = false + #resample.quality = 4 + #channelmix.normalize = false + #channelmix.mix-lfe = false + #session.suspend-timeout-seconds = 5 # 0 disables suspend + #monitor.channel-volumes = false + + # A2DP source role, "input" or "playback" + # Defaults to "playback", playing stream to speakers + # Set to "input" to use as an input for apps + #bluez5.a2dp-source-role = input + } + } + } +] diff --git a/home/.config/polybar/config b/home/.config/polybar/config new file mode 100644 index 0000000..c7fa364 --- /dev/null +++ b/home/.config/polybar/config @@ -0,0 +1,463 @@ +;========================================================== +; +; +; ██████╗ ██████╗ ██╗ ██╗ ██╗██████╗ █████╗ ██████╗ +; ██╔══██╗██╔═══██╗██║ ╚██╗ ██╔╝██╔══██╗██╔══██╗██╔══██╗ +; ██████╔╝██║ ██║██║ ╚████╔╝ ██████╔╝███████║██████╔╝ +; ██╔═══╝ ██║ ██║██║ ╚██╔╝ ██╔══██╗██╔══██║██╔══██╗ +; ██║ ╚██████╔╝███████╗██║ ██████╔╝██║ ██║██║ ██║ +; ╚═╝ ╚═════╝ ╚══════╝╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝ +; +; +; To learn more about how to configure Polybar +; go to https://github.com/polybar/polybar +; +; The README contains a lot of information +; +;========================================================== + +[colors] +background = ${xrdb:color0:#1d2021} +background-alt = ${xrdb:color8:#928374} +foreground = ${xrdb:color15:#ebdbb2} +foreground-alt = ${xrdb:color7:#a89984} +primary = ${xrdb:color11:#fabd2f} +primary-alt = ${xrdb:color3:#d79921} +secondary = ${xrdb:color14:#8ec07c} +secondary-alt = ${xrdb:color6:#689d6a} +alert = ${xrdb:color9:#fb4934} +alert-alt = ${xrdb:color9:#cc241d} + +[bar/mybar] +monitor = ${env:MONITOR:} +width = 100% +height = 24 +;offset-x = 1% +;offset-y = 1% +radius = 0 +fixed-center = false + +background = ${colors.background} +foreground = ${colors.foreground} + +line-size = 3 +line-color = ${colors.alert-alt} + +border-size = 0 +border-color = ${colors.background-alt} + +padding-left = 0 +padding-right = 1 + +module-margin-left = 1 +module-margin-right = 1 + +font-0 = mono:size=8;1 +font-1 = unifont:fontformat=truetype:size=8:antialias=false;0 +font-2 = siji:pixelsize=10;1 +font-3 = NotoMono Nerd Font Mono:size=10;2 + +modules-left = bspwm +modules-center = xwindow +modules-right = filesystem pulseaudio cpu memory temperature gpu-usage gpu-memory gpu-temp wlan eth battery date + +tray-position = right +tray-padding = 1 +;tray-background = #0063ff + +wm-restack = bspwm +;wm-restack = i3 + +;override-redirect = true + +;scroll-up = bspwm-desknext +;scroll-down = bspwm-deskprev + +;scroll-up = i3wm-wsnext +;scroll-down = i3wm-wsprev + +cursor-click = pointer +cursor-scroll = ns-resize +enable-ipc = true + +[module/xwindow] +type = internal/xwindow +label = %title:0:15:...% + +[module/xkeyboard] +type = internal/xkeyboard +blacklist-0 = num lock + +format-prefix = " " +format-prefix-foreground = ${colors.foreground-alt} +format-prefix-underline = ${colors.secondary} + +label-layout = %layout% +label-layout-underline = ${colors.secondary} + +label-indicator-padding = 2 +label-indicator-margin = 1 +label-indicator-background = ${colors.secondary} +label-indicator-underline = ${colors.secondary} + +[module/filesystem] +type = internal/fs +interval = 25 + +mount-0 = / + +label-mounted = %{F#0a81f5}%mountpoint%%{F-}: %percentage_used%% +label-unmounted = %mountpoint% not mounted +label-unmounted-foreground = ${colors.foreground-alt} + +[module/bspwm] +type = internal/bspwm + +pin-workspaces = true +format = <label-state> <label-mode> +label-focused = %index% +label-focused-background = ${colors.background-alt} +label-focused-underline= ${colors.primary} +label-focused-padding = 2 + +label-occupied = %index% +label-occupied-padding = 2 + +label-urgent = %index%! +label-urgent-background = ${colors.alert} +label-urgent-padding = 2 + +label-empty = %index% +label-empty-foreground = ${colors.foreground-alt} +label-empty-padding = 2 + +label-monocle = monocle +label-fullscreen = fullscreen +label-floating = floating +label-pseudotiled = pseudo +label-locked = locked +label-locked-foreground = ${colors.alert} +label-sticky = sticky +label-sticky-foreground = ${colors.alert} +label-private = private +label-private-foreground =${colors.alert} +label-marked = marked + +; Separator in between workspaces +; label-separator = | + +[module/i3] +type = internal/i3 +format = <label-state> <label-mode> +index-sort = true +wrapping-scroll = false + +; Only show workspaces on the same output as the bar +;pin-workspaces = true + +label-mode-padding = 2 +label-mode-foreground = {colors.background} +label-mode-background = ${colors.primary} + +; focused = Active workspace on focused monitor +label-focused = %index% +label-focused-background = ${colors.background-alt} +label-focused-underline= ${colors.primary} +label-focused-padding = 2 + +; unfocused = Inactive workspace on any monitor +label-unfocused = %index% +label-unfocused-padding = 2 + +; visible = Active workspace on unfocused monitor +label-visible = %index% +label-visible-background = ${self.label-focused-background} +label-visible-underline = ${self.label-focused-underline} +label-visible-padding = ${self.label-focused-padding} + +; urgent = Workspace with urgency hint set +label-urgent = %index% +label-urgent-background = ${colors.alert} +label-urgent-padding = 2 + +; Separator in between workspaces +; label-separator = | + + +[module/mpd] +type = internal/mpd +format-online = <label-song> <icon-prev> <icon-stop> <toggle> <icon-next> + +icon-prev = +icon-stop = +icon-play = +icon-pause = +icon-next = + +label-song-maxlen = 25 +label-song-ellipsis = true + +[module/xbacklight] +type = internal/xbacklight + +format = <label> <bar> +label = BL + +bar-width = 10 +bar-indicator = | +bar-indicator-foreground = ${colors.foreground} +bar-indicator-font = 2 +bar-fill = ─ +bar-fill-font = 2 +bar-fill-foreground = #9f78e1 +bar-empty = ─ +bar-empty-font = 2 +bar-empty-foreground = ${colors.foreground-alt} + +[module/backlight-acpi] +inherit = module/xbacklight +type = internal/backlight +card = intel_backlight + +[module/cpu] +type = internal/cpu +interval = 2 +format-prefix = "CPU:" +format-prefix-foreground = ${colors.foreground-alt} +format-underline = ${colors.alert-alt} +label = %percentage:2%% + +[module/memory] +type = internal/memory +interval = 2 +format-prefix = "MEM:" +format-prefix-foreground = ${colors.foreground-alt} +format-underline = ${colors.secondary} +label = %percentage_used%% (%gb_used%) + +[module/wlan] +type = internal/network +interface = ${env:WLAN:wlan0} +interval = 3.0 + +format-connected = <ramp-signal> <label-connected> +format-connected-underline = #9f78e1 +label-connected = %essid%(%signal%%) + +format-disconnected = <label-disconnected> +label-disconnected = %ifname% disconnected +label-disconnected-foreground = ${colors.foreground-alt} + +ramp-signal-0 = +ramp-signal-1 = +ramp-signal-2 = +ramp-signal-3 = +ramp-signal-4 = +ramp-signal-foreground = ${colors.foreground-alt} + +[module/eth] +type = internal/network +interface = bond0 +interval = 3.0 + +format-connected-underline = ${colors.secondary} +format-connected-prefix = "IP:" +format-connected-prefix-foreground = ${colors.foreground-alt} +label-connected = %local_ip%|⬇%downspeed%|⬆%upspeed% + +format-disconnected = +;format-disconnected = <label-disconnected> +;format-disconnected-underline = ${self.format-connected-underline} +;label-disconnected = %ifname% disconnected +;label-disconnected-foreground = ${colors.foreground-alt} + +[module/date] +type = internal/date +interval = 5 + +date = "%a %d %b" + +time = %H:%M +time-alt = %H:%M + +format-prefix-foreground = ${colors.foreground-alt} +format-underline = #0a6cf5 + +label = %date% %time% + +[module/pulseaudio] +type = internal/pulseaudio + +format-volume = <label-volume> <bar-volume> +label-volume = VOL %percentage%% +label-volume-foreground = ${root.foreground} + +label-muted = muted +label-muted-foreground = ${colors.alert} + +bar-volume-width = 10 +bar-volume-foreground-0 = #55aa55 +bar-volume-foreground-1 = #55aa55 +bar-volume-foreground-2 = #55aa55 +bar-volume-foreground-3 = #55aa55 +bar-volume-foreground-4 = #55aa55 +bar-volume-foreground-5 = #f5a70a +bar-volume-foreground-6 = #ff5555 +bar-volume-gradient = false +bar-volume-indicator = | +bar-volume-indicator-font = 2 +bar-volume-fill = ─ +bar-volume-fill-font = 2 +bar-volume-empty = ─ +bar-volume-empty-font = 2 +bar-volume-empty-foreground = ${colors.foreground-alt} + +click-right = st -e pulsemixer + +[module/alsa] +type = internal/alsa + +format-volume = <label-volume> <bar-volume> +label-volume = VOL +label-volume-foreground = ${root.foreground} + +format-muted-prefix = " " +format-muted-foreground = ${colors.foreground-alt} +label-muted = sound muted + +bar-volume-width = 10 +bar-volume-foreground-0 = #55aa55 +bar-volume-foreground-1 = #55aa55 +bar-volume-foreground-2 = #55aa55 +bar-volume-foreground-3 = #55aa55 +bar-volume-foreground-4 = #55aa55 +bar-volume-foreground-5 = #f5a70a +bar-volume-foreground-6 = #ff5555 +bar-volume-gradient = false +bar-volume-indicator = | +bar-volume-indicator-font = 2 +bar-volume-fill = ─ +bar-volume-fill-font = 2 +bar-volume-empty = ─ +bar-volume-empty-font = 2 +bar-volume-empty-foreground = ${colors.foreground-alt} + +[module/battery] +type = internal/battery +battery = ${env:BAT:BAT0} +adapter = ${env:ADP:ADP1} +full-at = 90 + +format-charging = <animation-charging> <label-charging> +format-charging-underline = ${colors.primary} + +format-discharging = <animation-discharging> <label-discharging> +format-discharging-underline = ${self.format-charging-underline} + +format-full-prefix = " " +format-full-prefix-foreground = ${colors.foreground-alt} +format-full-underline = ${self.format-charging-underline} + +ramp-capacity-0 = +ramp-capacity-1 = +ramp-capacity-2 = +ramp-capacity-foreground = ${colors.foreground-alt} + +animation-charging-0 = +animation-charging-1 = +animation-charging-2 = +animation-charging-foreground = ${colors.foreground-alt} +animation-charging-framerate = 750 + +animation-discharging-0 = +animation-discharging-1 = +animation-discharging-2 = +animation-discharging-foreground = ${colors.foreground-alt} +animation-discharging-framerate = 750 + +[module/temperature] +type = internal/temperature +thermal-zone = 0 +base-temperature = 30 +warn-temperature = 80 + +format = <ramp> <label> +format-underline = ${colors.alert} +format-warn = <ramp> <label-warn> +format-warn-underline = ${self.format-underline} + +label = %temperature-c% +label-warn = %temperature-c% +label-warn-foreground = ${colors.secondary} + +ramp-0 = +ramp-1 = +ramp-2 = +ramp-foreground = ${colors.foreground-alt} + +[module/powermenu] +type = custom/menu + +expand-right = true + +format-spacing = 1 + +label-open = +label-open-foreground = ${colors.secondary} +label-close = cancel +label-close-foreground = ${colors.secondary} +label-separator = | +label-separator-foreground = ${colors.foreground-alt} + +menu-0-0 = reboot +menu-0-0-exec = menu-open-1 +menu-0-1 = power off +menu-0-1-exec = menu-open-2 + +menu-1-0 = cancel +menu-1-0-exec = menu-open-0 +menu-1-1 = reboot +menu-1-1-exec = sudo reboot + +menu-2-0 = power off +menu-2-0-exec = sudo poweroff +menu-2-1 = cancel +menu-2-1-exec = menu-open-0 + +[settings] +screenchange-reload = true +;compositing-background = xor +;compositing-background = screen +;compositing-foreground = source +;compositing-border = over +;pseudo-transparency = false + +[global/wm] +margin-top = 0 +margin-bottom = 0 + +[module/mpris] +type = custom/script +exec = ~/dotfiles/barscripts/mpris.sh +interval = 3 +click-left = playerctl previous & +click-right = playerctl next & +click-middle = playerctl play-pause & +label-maxlen = 50 + +[module/gpu-usage] +type = custom/script +exec = ~/dotfiles/barscripts/gpu-usage +interval = 5 + +[module/gpu-temp] +type = custom/script +exec = ~/dotfiles/barscripts/gpu-temp +interval = 5 + +[module/gpu-memory] +type = custom/script +exec = ~/dotfiles/barscripts/gpu-memory +interval = 5 + +; vim:ft=dosini diff --git a/home/.config/pulse/client.conf b/home/.config/pulse/client.conf new file mode 100644 index 0000000..4980f49 --- /dev/null +++ b/home/.config/pulse/client.conf @@ -0,0 +1,36 @@ +# This file is part of PulseAudio. +# +# PulseAudio is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# PulseAudio is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with PulseAudio; if not, see <http://www.gnu.org/licenses/>. + +## Configuration file for PulseAudio clients. See pulse-client.conf(5) for +## more information. Default values are commented out. Use either ; or # for +## commenting. + +; default-sink = +; default-source = +; default-server = +; default-dbus-server = + +autospawn = no +; autospawn = yes +; daemon-binary = /usr/bin/pulseaudio +; extra-arguments = --log-target=syslog + +; cookie-file = + +; enable-shm = yes +; shm-size-bytes = 0 # setting this 0 will use the system-default, usually 64 MiB + +; auto-connect-localhost = no +; auto-connect-display = no diff --git a/home/.config/pulse/daemon.conf b/home/.config/pulse/daemon.conf new file mode 100644 index 0000000..3b9c341 --- /dev/null +++ b/home/.config/pulse/daemon.conf @@ -0,0 +1,90 @@ +# This file is part of PulseAudio. +# +# PulseAudio is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# PulseAudio is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with PulseAudio; if not, see <http://www.gnu.org/licenses/>. + +## Configuration file for the PulseAudio daemon. See pulse-daemon.conf(5) for +## more information. Default values are commented out. Use either ; or # for +## commenting. + +; daemonize = no +; fail = yes +; allow-module-loading = yes +; allow-exit = yes +; use-pid-file = yes +; system-instance = no +; local-server-type = user +; enable-shm = yes +; enable-memfd = yes +; shm-size-bytes = 0 # setting this 0 will use the system-default, usually 64 MiB +; lock-memory = no +; cpu-limit = no + +high-priority = yes +nice-level = -11 + +realtime-scheduling = yes +realtime-priority = 5 + +; exit-idle-time = 20 +; scache-idle-time = 20 + +; dl-search-path = (depends on architecture) + +; load-default-script-file = yes +; default-script-file = /etc/pulse/default.pa + +; log-target = auto +; log-level = notice +; log-meta = no +; log-time = no +; log-backtrace = 0 + +resample-method = speex-float-10 +; avoid-resampling = false +; enable-remixing = yes +; remixing-use-all-sink-channels = yes +; enable-lfe-remixing = no +; lfe-crossover-freq = 0 + +; flat-volumes = no +flat-volumes = yes + +; rlimit-fsize = -1 +; rlimit-data = -1 +; rlimit-stack = -1 +; rlimit-core = -1 +; rlimit-as = -1 +; rlimit-rss = -1 +; rlimit-nproc = -1 +; rlimit-nofile = 256 +; rlimit-memlock = -1 +; rlimit-locks = -1 +; rlimit-sigpending = -1 +; rlimit-msgqueue = -1 +; rlimit-nice = 31 +; rlimit-rtprio = 9 +; rlimit-rttime = 200000 + +; default-sample-format = s16le +; default-sample-rate = 44100 +; alternate-sample-rate = 48000 +; default-sample-channels = 2 +; default-channel-map = front-left,front-right + +; default-fragments = 4 +; default-fragment-size-msec = 25 + +; enable-deferred-volume = yes +; deferred-volume-safety-margin-usec = 8000 +; deferred-volume-extra-delay-usec = 0 diff --git a/home/.config/pulse/default.pa b/home/.config/pulse/default.pa new file mode 100644 index 0000000..243033a --- /dev/null +++ b/home/.config/pulse/default.pa @@ -0,0 +1,6 @@ +.include /etc/pulse/default.pa + +### Enable Echo/Noise-Cancellation +# load-module module-echo-cancel use_master_format=1 aec_method=webrtc aec_args="analog_gain_control=0\ digital_gain_control=1" source_name=echoCancel_source sink_name=echoCancel_sink +# set-default-source echoCancel_source +# set-default-sink echoCancel_sink diff --git a/home/.config/pulse/system.pa b/home/.config/pulse/system.pa new file mode 100644 index 0000000..68f108e --- /dev/null +++ b/home/.config/pulse/system.pa @@ -0,0 +1,57 @@ +#!/usr/bin/pulseaudio -nF +# +# This file is part of PulseAudio. +# +# PulseAudio is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# PulseAudio is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with PulseAudio; if not, see <http://www.gnu.org/licenses/>. + +# This startup script is used only if PulseAudio is started in system +# mode. + +### Automatically restore the volume of streams and devices +load-module module-device-restore +load-module module-stream-restore +load-module module-card-restore + +### Automatically load driver modules depending on the hardware available +.ifexists module-udev-detect.so +load-module module-udev-detect +.else +### Use the static hardware detection module (for systems that lack udev/hal support) +load-module module-detect +.endif + +### Load several protocols +.ifexists module-esound-protocol-unix.so +load-module module-esound-protocol-unix +.endif +load-module module-native-protocol-unix + +### Automatically restore the default sink/source when changed by the user +### during runtime +### NOTE: This should be loaded as early as possible so that subsequent modules +### that look up the default sink/source get the right value +load-module module-default-device-restore + +### Automatically move streams to the default sink if the sink they are +### connected to dies, similar for sources +load-module module-rescue-streams + +### Make sure we always have a sink around, even if it is a null sink. +load-module module-always-sink + +### Automatically suspend sinks/sources that become idle for too long +load-module module-suspend-on-idle + +### Enable positioned event sounds +load-module module-position-event-sounds diff --git a/home/.config/ripgrep/ripgreprc b/home/.config/ripgrep/ripgreprc new file mode 100644 index 0000000..f808311 --- /dev/null +++ b/home/.config/ripgrep/ripgreprc @@ -0,0 +1,4 @@ +--hidden +--follow +--smart-case +--glob=!.git diff --git a/home/.config/rofi/config.rasi b/home/.config/rofi/config.rasi new file mode 100644 index 0000000..0a06a3a --- /dev/null +++ b/home/.config/rofi/config.rasi @@ -0,0 +1,16 @@ +configuration { + modi: "window,run,drun"; + font: "mono 18"; + terminal: "alacritty"; + disable-history: false; + sort: true; + sorting-method: "fzf"; + parse-hosts: true; + combi-modi: "window,run,drun"; + matching: "fuzzy"; + kb-remove-to-eol: "Control+Shift+k"; + kb-accept-entry: "Return,KP_Enter"; + kb-row-up: "Up,Control+p,Control+k"; + kb-row-down: "Down,Control+n,Control+j"; +} +@theme "gruvbox-dark-hard" diff --git a/home/.config/sh/aliases b/home/.config/sh/aliases new file mode 100644 index 0000000..042e6cb --- /dev/null +++ b/home/.config/sh/aliases @@ -0,0 +1,73 @@ +#!/usr/bin/env sh + +alias l='lsd -l' +alias la='lsd -lA' +alias lt='lsd --tree' + +whichkey() { + xev | awk -F'[ )]+' '/^KeyPress/ { a[NR+2] } NR in a { printf "%-3s %s\n", $5, $8 }' +} + +alias sudo='sudo -v; sudo ' +alias sudoedit='sudo nvim' + +alias grep='grep --color=auto' +alias fgrep='fgrep --color=auto' +alias egrep='egrep --color=auto' +alias diff='diff --color=auto' +alias dmesg='dmesg --color=auto' +alias dm='dmesg --color=always | less -r' +alias ip="ip -color=auto" +alias lsip="ip -human -color=auto --brief address show" +alias ipa="ip -stats -details -human -color=auto address show" + +alias g='git' + +alias sys='systemctl' +alias ssys='sudo systemctl' +alias sysu='systemctl --user' +alias sst='systemctl status' +alias syse='sudo systemctl edit' + +alias gimme='sudo chown $USER:$(id -gn $USER)' +alias free='free -h' +alias ...='cd ../..' +alias ....='cd ../../..' +alias .....='cd ../../../..' +alias mkdir='mkdir -p' +alias du='du -h' +alias df='df -h' +alias visudo='sudo visudo' +alias pacdiff='sudo pacdiff' +alias stow='stow -R --no-folding --adopt' + +alias pacopt='comm -13 <(pacman -Qqdt | sort) <(pacman -Qqdtt | sort)' + +alias ipecho='curl ipecho.net/plain' +alias xclip="xclip -selection clipboard -f" + +alias cpr='rsync --archive -hh --partial --info=stats1,progress2 --modify-window=1' +alias mvr='rsync --archive -hh --partial --info=stats1,progress2 --modify-window=1 --remove-source-files' +alias sub='subliminal download -l en' +alias ss='sudo ss -tupnl' +alias c='clear' + +alias n='nvim' +alias ndiff='nvim -d' +alias nd='nvim -d' +alias nview='nvim -R' +alias nv='nvim -R' +alias ngit='nvim +Neogit' +alias ng='nvim +Neogit' + +alias ta='tmux new-session -A' +alias tas='tmux new-session -A -s' + +alias nj='ninja -C build' + +alias ncmake='cmake -G Ninja -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_C_FLAGS="$DEV_CFLAGS" -DCMAKE_CXX_FLAGS="$DEV_CFLAGS" -DCMAKE_INSTALL_PREFIX=build/install -DCMAKE_BUILD_TYPE=Debug -DBUILD_SHARED_LIBS=ON -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -B build' + +alias ircc='clang -S -emit-llvm -fno-discard-value-names -O0 -Xclang -disable-O0-optnone -o -' +alias irfc='flang-new -S -emit-llvm -fno-discard-value-names -O0 -Xclang -disable-O0-optnone -o -' +alias astcc='clang -Xclang -ast-dump -fsyntax-only' +alias astfc='flang-new -fc1 -fdebug-dump-parse-tree' diff --git a/home/.config/sh/envrc b/home/.config/sh/envrc new file mode 100644 index 0000000..02ecd5c --- /dev/null +++ b/home/.config/sh/envrc @@ -0,0 +1,220 @@ +#! /bin/sh + +safesource() { + # shellcheck source=/dev/null + [ -r "$1" ] && . "$1" +} + +exists() { + command -v "$1" >/dev/null 2>&1 +} + +ifexists() { + exists "$1" && "$@" +} + +if [ -z "$ENV_SOURCED" ]; then + PATH="$HOME"/.local/bin:"$PATH" + export PATH + export ENV_SOURCED="$0" +fi + +case $TERM in + *256color|*truecolor) + export COLORTERM=24bit + ;; +esac + +# tell gpg which tty one is using so that it can prompt for pw +GPG_TTY=$(tty) +export GPG_TTY +export GPG_AGENT_INFO=1 +# set XDG env vars +export XDG_CONFIG_HOME="$HOME"/.config +export XDG_DATA_HOME="$HOME"/.local/share +export XDG_STATE_HOME="$HOME"/.local/state +export XDG_CACHE_HOME="$HOME"/.cache +# set ENV var to tell sh shell where its config file is +export ENV="$XDG_CONFIG_HOME"/sh/shinit +export EDITOR='nvim' +export DIFFPROG='nvim -d' +export VISUAL="$EDITOR" +export MANPAGER='nvim +Man!' +export MANWIDTH=999 + +# # Get color support for 'less' +[ -r /usr/bin/source-highlight-esc.sh ] && export LESSOPEN="| /usr/bin/source-highlight-esc.sh %s" +export LESS="--RAW-CONTROL-CHARS" +LESS_TERMCAP_mb="$( + tput bold + tput setaf 2 +)" # green +export LESS_TERMCAP_mb +LESS_TERMCAP_md="$( + tput bold + tput setaf 6 +)" # cyan +export LESS_TERMCAP_md +LESS_TERMCAP_me="$(tput sgr0)" +export LESS_TERMCAP_me +LESS_TERMCAP_so="$( + tput bold + tput setaf 3 + tput setab 4 +)" # yellow on blue +export LESS_TERMCAP_so +LESS_TERMCAP_se="$( + tput rmso + tput sgr0 +)" +export LESS_TERMCAP_se +LESS_TERMCAP_us="$( + tput smul + tput bold + tput setaf 7 +)" # white +export LESS_TERMCAP_us +LESS_TERMCAP_ue="$( + tput rmul + tput sgr0 +)" +export LESS_TERMCAP_ue +LESS_TERMCAP_mr="$(tput rev)" +export LESS_TERMCAP_mr +LESS_TERMCAP_mh="$(tput dim)" +export LESS_TERMCAP_mh +LESS_TERMCAP_ZN="$(tput ssubm)" +export LESS_TERMCAP_ZN +LESS_TERMCAP_ZV="$(tput rsubm)" +export LESS_TERMCAP_ZV +LESS_TERMCAP_ZO="$(tput ssupm)" +export LESS_TERMCAP_ZO +LESS_TERMCAP_ZW="$(tput rsupm)" +export LESS_TERMCAP_ZW + +export LESS="-F -X $LESS" + +export LANG=en_US.UTF-8 +export OPENER='xdg-open' +export FZF_DEFAULT_COMMAND="fd --type file --follow --hidden --exclude .git" +export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND" +export FZF_DIRS_COMMAND="fd --type d --follow --hidden --exclude .git" +export FZF_DEFAULT_OPTS="--layout=reverse --inline-info --cycle --color=dark --color=fg:-1,bg:-1,hl:#5fff87,fg+:-1,bg+:-1,hl+:#ffaf5f --color=info:#af87ff,prompt:#5fff87,pointer:#ff87d7,marker:#ff87d7,spinner:#ff87d7" +export FZF_CTRL_T_OPTS="--preview '(highlight -O ansi -l {} 2> /dev/null || cat {} || tree -C {}) 2> /dev/null | head -200' --select-1 --exit-0" +export FZF_CTRL_R_OPTS="--preview 'echo {}' --preview-window down:3:hidden:wrap --bind '?:toggle-preview' --sort --exact" +export FZF_ALT_C_OPTS="--preview 'tree -C {} | head -200'" + +if [ "$TMUX" ]; then + export FZF_TMUX=1 +fi + +export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01' +export BROWSER='linkhandler' +export TERMINAL='alacritty' +# Suppress Gnome Accessibility bus warnings in gtk apps +export NO_AT_BRIDGE=1 +# Enable Webrender in firefox for video decode hw acceleration +export MOZ_WEBRENDER=1 +export MOZ_X11_EGL=1 +# set in new intel iris HD driver for VA-API video hw decoding +if [ "$(uname -n)" = "halley" ] || [ "$(uname -n)" = "halley2" ]; then + export LIBVA_DRIVER_NAME="iHD" + export MESA_LOADER_DRIVER_OVERRIDE="iris" + export VAAPI_MPEG4_ENABLED=true +fi + +# set sxhkd shell to sh for faster response times +export SXHKD_SHELL="sh" +# Java: use system anti-aliased fonts and make swing use the GTK look and feel: +export _JAVA_OPTIONS="-Dawt.useSystemAAFontSettings=on -Dswing.aatext=true -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel -Djava.util.prefs.userRoot=$XDG_CONFIG_HOME/java -Djdk.gtk.version=2" + +export QT_QPA_PLATFORMTHEME=qt5ct + +# always prevent vsync +export vblank_mode=0 + +# detailed git PS1 +export GIT_PS1_SHOWDIRTYSTATE=1 +export GIT_PS1_SHOWSTASHSTATE=1 +export GIT_PS1_SHOWUNTRACKEDFILES=1 +export GIT_PS1_SHOWUPSTREAM="auto" + +export DEV_CFLAGS="-fno-omit-frame-pointer -O1 -fsanitize=address -fsanitize=undefined -fno-sanitize=vptr,function -fno-sanitize-recover=all -fuse-ld=mold -Werror=unguarded-availability-new -Wall -Wextra -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wstring-conversion -Wmisleading-indentation -Werror -fdiagnostics-color -g-fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -D_DEBUG -D_GNU_SOURCE" + +# only set XAUTHORITY when not logging from ssh, since it breaks xauth +[ "$XDG_RUNTIME_DIR" ] && export XAUTHORITY="$XDG_RUNTIME_DIR/Xauthority" + +export DOCKER_HOST="unix://$XDG_RUNTIME_DIR/podman/podman.sock" + +if [ "$(uname -n)" = "hercules" ]; then + export OCL_ICD_VENDORS=nvidia + # shellcheck source=/dev/null + [ -r ~/.config/sh/envrc ] && . ~/.config/sh/work-envrc +fi + +# https://github.com/sparrowwallet/sparrow/issues/170#issuecomment-896866817 +export GDK_DISPLAY=1 + +# cleanup ~ +export NOTMUCH_CONFIG="$XDG_CONFIG_HOME/notmuch/config" +export NMBGIT="$XDG_DATA_HOME/notmuch/nmbug" +export GTK_RC_FILES="$XDG_CONFIG_HOME/gtk-1.0/gtkrc" +export GTK2_RC_FILES="$XDG_CONFIG_HOME/gtk-2.0/gtkrc-2.0" +export WGETRC="$XDG_CONFIG_HOME/wget/wgetrc" +export INPUTRC="$XDG_CONFIG_HOME/sh/inputrc" +export ZDOTDIR="$XDG_CONFIG_HOME/zsh" +export PASSWORD_STORE_DIR="$XDG_DATA_HOME/password-store" +export GNUPGHOME="$XDG_DATA_HOME/gnupg" +export MBSYNCRC="$XDG_CONFIG_HOME/isync/mbsyncrc" +export LESSHISTFILE="-" +export ASPELL_CONF="per-conf $XDG_CONFIG_HOME/aspell/aspell.conf; personal $XDG_CONFIG_HOME/aspell/en.pws; repl $XDG_CONFIG_HOME/aspell/en.prepl" +export BASH_COMPLETION_USER_FILE="$XDG_CONFIG_HOME/bash-completion/bash_completion" +export CARGO_HOME="$XDG_DATA_HOME/cargo" +export CUDA_CACHE_PATH="$XDG_CACHE_HOME/nv" +export LESSKEY="$XDG_CONFIG_HOME/less/lesskey" +export TERMINFO_DIRS="$XDG_DATA_HOME/terminfo":/usr/share/terminfo +export IPYTHONDIR="$XDG_CONFIG_HOME/ipython" +export JUPYTER_CONFIG_DIR="$XDG_CONFIG_HOME/jupyter" +export NPM_CONFIG_USERCONFIG="$XDG_CONFIG_HOME/npm/npmrc" +export PYTHON_EGG_CACHE="$XDG_CACHE_HOME/python-eggs" +export RUSTUP_HOME="$XDG_DATA_HOME/rustup" +export TMUX_TMPDIR="$XDG_RUNTIME_DIR" +export WEECHAT_HOME="$XDG_CONFIG_HOME/weechat" +export WINEPREFIX="$XDG_DATA_HOME/wineprefixes/default" +export XINITRC="$XDG_CONFIG_HOME/X11/xinitrc" +export XSERVERRC="$XDG_CONFIG_HOME/X11/xserverrc" +export BUNDLE_USER_CONFIG="$XDG_CONFIG_HOME/bundle" +export BUNDLE_USER_CACHE="$XDG_CACHE_HOME/bundle" +export BUNDLE_USER_PLUGIN="$XDG_DATA_HOME/bundle" +export CCACHE_CONFIGPATH="$XDG_CONFIG_HOME/ccache.config" +export CCACHE_DIR="$XDG_CACHE_HOME/ccache" +export MATHEMATICA_USERBASE="$XDG_CONFIG_HOME/mathematica" +export GEM_HOME="$XDG_DATA_HOME/gem" +export GEM_SPEC_CACHE="$XDG_CACHE_HOME/gem" +export RUSTUP_HOME="$XDG_DATA_HOME/rustup" +export UNCRUSTIFY_CONFIG="$XDG_CONFIG_HOME/uncrustify/uncrustify.cfg" +export WEECHAT_HOME="$XDG_CONFIG_HOME/weechat" +export ANDROID_SDK_HOME="$XDG_CONFIG_HOME/android" +export RIPGREP_CONFIG_PATH="$XDG_CONFIG_HOME/ripgrep/ripgreprc" +export DOCKER_CONFIG="$XDG_CONFIG_HOME/docker" +export MACHINE_STORAGE_PATH="$XDG_DATA_HOME/docker-machine" +export GOPATH="$XDG_DATA_HOME/go" +export GRADLE_USER_HOME="$XDG_DATA_HOME/gradle" +export XCOMPOSEFILE="$XDG_CONFIG_HOME/X11/xcompose" +export XCOMPOSECACHE="$XDG_CACHE_HOME/X11/xcompose" +export NODE_REPL_HISTORY="$XDG_DATA_HOME/node_repl_history" +export NVM_DIR="$XDG_DATA_HOME/nvm" +export PYLINTHOME="$XDG_CACHE_HOME/pylint" +export TEXMFHOME="$XDG_DATA_HOME/texmf" +export TEXMFVAR="$XDG_CACHE_HOME/texlive/texmf-var" +export TEXMFCONFIG="$XDG_CONFIG_HOME/texlive/texmf-config" +export WORKON_HOME="$XDG_DATA_HOME/virtualenvs" +export USERXSESSION="$XDG_CACHE_HOME/x11/xsession" +export USERXSESSIONRC="$XDG_CACHE_HOME/x11/xsessionrc" +export ALTUSERXSESSION="$XDG_CACHE_HOME/x11/Xsession" +export ERRFILE="$XDG_CACHE_HOME/x11/xsession-errors" +export NUGET_PACKAGES="$XDG_CACHE_HOME/NuGetPackages" + +unset SSH_AGENT_PID +SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)" +export SSH_AUTH_SOCK diff --git a/home/.config/sh/inputrc b/home/.config/sh/inputrc new file mode 100644 index 0000000..e770fea --- /dev/null +++ b/home/.config/sh/inputrc @@ -0,0 +1,20 @@ +$include /etc/inputrc + +set enable-keypad on +set bell-style none +set show-all-if-ambiguous on + +# Color files by types +set colored-stats On +# Append char to indicate type +set visible-stats On +# Mark symlinked directories +set mark-symlinked-directories On +# Color the common prefix +set colored-completion-prefix On +# Color the common prefix in menu-complete +set menu-complete-display-prefix On + +set echo-control-characters off + +set enable-bracketed-paste on diff --git a/home/.config/sh/shinit b/home/.config/sh/shinit new file mode 100644 index 0000000..404722e --- /dev/null +++ b/home/.config/sh/shinit @@ -0,0 +1,41 @@ +#!/usr/bin/env sh +# If not running interactively, don't do anything +case $- in + *i*) stty -ixon + ;; + *) return + ;; +esac + +# shellcheck source=/dev/null +[ -r ~/.config/sh/envrc ] && . ~/.config/sh/envrc + +gpg-connect-agent updatestartuptty /bye >/dev/null + +_fzf_compgen_path() { + eval "$FZF_DEFAULT_COMMAND" "$1" +} + +_fzf_compgen_dir() { + eval "$FZF_DIRS_COMMAND" "$1" +} + +safesource "$XDG_CONFIG_HOME"/sh/aliases + +# numlock +tput smkx + +PS1="[\$?]\$ " +export PS1 + +if [ "$TERM" = "linux" ]; then + _SEDCMD='s/.*\*color\([0-9]\{1,\}\).*#\([0-9a-fA-F]\{6\}\).*/\1 \2/p' + mkfifo mypipe + sed -n "$_SEDCMD" "$HOME"/.Xresources | awk '$1 < 16 {printf "\\e]P%X%s", $1, $2}' > mypipe & + while IFS= read -r i + do + printf "%s" "$i" + done < mypipe + rm mypipe + clear +fi diff --git a/home/.config/streamlink/config b/home/.config/streamlink/config new file mode 100644 index 0000000..68d2186 --- /dev/null +++ b/home/.config/streamlink/config @@ -0,0 +1,5 @@ +player=mpv +default-stream=best +twitch-disable-hosting +twitch-disable-ads +twitch-disable-reruns diff --git a/home/.config/sx/sxrc b/home/.config/sx/sxrc new file mode 120000 index 0000000..b0a1fbb --- /dev/null +++ b/home/.config/sx/sxrc @@ -0,0 +1 @@ +../X11/xinitrc
\ No newline at end of file diff --git a/home/.config/sxhkd/sxhkdrc b/home/.config/sxhkd/sxhkdrc new file mode 100644 index 0000000..11c5192 --- /dev/null +++ b/home/.config/sxhkd/sxhkdrc @@ -0,0 +1,199 @@ +super+Return + $TERMINAL + +super+space + $TERMINAL + +super+r + rofi -show run + +super+d + cd ~/dotfiles && eval $FZF_DEFAULT_COMMAND | rofi -width 90 -dmenu -p dotfiles | xargs -d '\n' -r $TERMINAL -e $EDITOR + +super+a + rofi -modi windowcd -show windowcd + +super+i + input-setup + +super+e + rofimoji -a type copy + +XF86Audio{Lower,Raise}Volume + pactl set-sink-volume @DEFAULT_SINK@ {-,+}5% + +super+{minus,plus} + pactl set-sink-volume @DEFAULT_SINK@ {-,+}5% + +XF86AudioMute + pactl set-sink-mute @DEFAULT_SINK@ toggle + +super+shift+m + pactl set-sink-mute @DEFAULT_SINK@ toggle + +super+m + pactl set-source-mute 1 toggle + +XF86Audio{Prev,Play,Next} + playerctl -p spotifyd {previous,play-pause,next} + +super+{Left,Down,Right} + playerctl {previous,play-pause,next} + +XF86Display + xset dpms force off + +@Print + scrot -q 100 -t 10 -s '%Y-%m-%d-%H-%M-%S.png' -e 'mv $f ~/pics/screenshots' + +shift+@Print + scrot -q 100 -t 10 '%Y-%m-%d-%H-%M-%S.png' -e 'mv $f ~/pics/screenshots' + +super+o;{m,e,n,t,f,p,h,c} + $TERMINAL -e {spt,aerc,newsboat,tremc,lf,ipython -i -c 'from math import *', htop, ikhal -d work} + +super+o;{k,s,w,0} + {tokodi,linkhandler,librewolf, printf "¯\_(⊙_ʖ⊙)_/¯" | xclip -selection clipboard} + +super+z;{r,w} + {rqr,wqr} + +super+v + videowrapper + +super+shift+s + locknpause + +super+alt+c + showclip + +super+F5 + stream + +super+F6 + record + +super+shift+a + automute + +super+n + dunstctl close + +super+shift+n + dunstctl close-all + +super+alt+n + dunstctl history-pop + +super+alt+shift+n + dunstctl context +ctrl+q + : + +# quit/restart bspwm +super + alt + {q,r} + bspc {quit,wm -r} + +# close and kill +super + {_,shift + }q + bspc node -{c,k} + +# alternate between the tiled and monocle layout +super + g + bspc desktop -l next + +# send the focused node to the newest preselected node +super + y + bspc node focused -n newest.!automatic + +# swap the current node and the marked node +super + shift + g + bspc node -s newest.marked + +super + ctrl + r + bspc node @parent -R 90 +# +# state/flags +# + +# set the window state +super + {t,shift+f,f} + bspc node -t \~{tiled,floating,fullscreen} + +# set the node flags +super + w;{m,l,s,p} + bspc node -g {marked,locked,sticky,private} + +super + alt + s;{b,n,a} + bspc node -l {below,normal,above} + +# +# focus/swap +# + +# focus the node in the given direction +super + {_,shift + }{h,j,k,l} + bspc node -{f,s} {west,south,north,east} + +# focus the node for the given path jump +super + ctrl + {p,b,comma,period} + bspc node -f @{parent,brother,first,second} + +# focus the next/previous desktop in the current monitor +super + {_,shift + }Tab + bspc desktop -f {next,prev}.local.occupied + +# focus the last node/desktop +super + {ctrl,shift + } o + bspc {node,desktop} -f last + +# focus the older or newer node in the focus history +super + alt + {o,i} + bspc wm -h off; \ + bspc node {older,newer} -f; \ + bspc wm -h on + +# focus to the given desktop +super + {1-9,0} + desktop='{1-9,10}'; \ + bspc query -D -d "$desktop.focused" && bspc desktop -f last || bspc desktop -f "$desktop" + +# focus or send to the given desktop +super + shift + {1-9,0} + bspc node -d '{1-9,10}' + +# +# preselect +# + +# preselect the direction +super + ctrl + {h,j,k,l} + bspc node -p {west,south,north,east} + +# preselect the ratio +super + ctrl + {1-9} + bspc node -o 0.{1-9} + +# cancel the preselection for the focused node +super + ctrl + space + bspc node -p cancel + +# cancel the preselection for the focused desktop +super + ctrl + shift + space + bspc query -N -d | xargs -I id -n 1 bspc node id -p cancel + +# +# move/resize +# + +# expand a window by moving one of its side outward +super + alt + {h,j,k,l} + bspc node -z {left -10 0,bottom 0 10,top 0 -10,right 10 0} + +# contract a window by moving one of its side inward +super + alt + shift + {h,j,k,l} + bspc node -z {right -10 0,top 0 10,bottom 0 -10,left 10 0} + +# move a floating window +super + shift + {Left,Down,Up,Right} + bspc node -v {-10 0,0 10,0 -10,10 0} diff --git a/home/.config/sxiv/exec/key-handler b/home/.config/sxiv/exec/key-handler new file mode 100755 index 0000000..ba8ad56 --- /dev/null +++ b/home/.config/sxiv/exec/key-handler @@ -0,0 +1,21 @@ +#!/bin/sh + +# Example for $XDG_CONFIG_HOME/sxiv/exec/key-handler +# Called by sxiv(1) after the external prefix key (C-x by default) is pressed. +# The next key combo is passed as its first argument. Passed via stdin are the +# images to act upon, one path per line: all marked images, if in thumbnail +# mode and at least one image has been marked, otherwise the current image. +# sxiv(1) blocks until this script terminates. It then checks which images +# have been modified and reloads them. + +# The key combo argument has the following form: "[C-][M-][S-]KEY", +# where C/M/S indicate Ctrl/Meta(Alt)/Shift modifier states and KEY is the X +# keysym as listed in /usr/include/X11/keysymdef.h without the "XK_" prefix. + +while read file; do + case "$1" in + "C-c") xclip -selection clipboard -target image/png "$file" ;; + "C-r") convert -rotate 90 "$file" "$file" ;; + "C-d") rm "$file" ;; + esac +done diff --git a/home/.config/systemd/user/bridge.service.d/override.conf b/home/.config/systemd/user/bridge.service.d/override.conf new file mode 100644 index 0000000..50c7feb --- /dev/null +++ b/home/.config/systemd/user/bridge.service.d/override.conf @@ -0,0 +1,3 @@ +[Service] +Environment="GNUPGHOME=%h/.local/share/gnupg" +Environment="PASSWORD_STORE_DIR=%h/.local/share/password-store"
\ No newline at end of file diff --git a/home/.config/systemd/user/dirmngr.socket.d/override.conf b/home/.config/systemd/user/dirmngr.socket.d/override.conf new file mode 100644 index 0000000..95ac960 --- /dev/null +++ b/home/.config/systemd/user/dirmngr.socket.d/override.conf @@ -0,0 +1,3 @@ +[Socket] +ListenStream= +ListenStream=%t/gnupg/d.hmaqciuk8y8ye3gwt9b6eth1/S.dirmngr
\ No newline at end of file diff --git a/home/.config/systemd/user/fakecam.service b/home/.config/systemd/user/fakecam.service new file mode 100644 index 0000000..f22e5b1 --- /dev/null +++ b/home/.config/systemd/user/fakecam.service @@ -0,0 +1,14 @@ +[Unit] +Description=Fake camera +After=network.target + +[Service] +Type=simple +WorkingDirectory=%h/repos/Linux-Fake-Background-Webcam +ExecStart=%h/repos/Linux-Fake-Background-Webcam/env/bin/python fake.py -c %h/.config/fakecam/config.ini +# fake.py exits when pressing Ctrl + \ which corresponds to SIGQUIT +# so we need to specify this kill signal instead of SIGINT +KillSignal=SIGQUIT + +[Install] +WantedBy=default.target diff --git a/home/.config/systemd/user/gpg-agent-browser.socket.d/override.conf b/home/.config/systemd/user/gpg-agent-browser.socket.d/override.conf new file mode 100644 index 0000000..607c21f --- /dev/null +++ b/home/.config/systemd/user/gpg-agent-browser.socket.d/override.conf @@ -0,0 +1,3 @@ +[Socket] +ListenStream= +ListenStream=%t/gnupg/d.hmaqciuk8y8ye3gwt9b6eth1/S.gpg-agent.browser
\ No newline at end of file diff --git a/home/.config/systemd/user/gpg-agent-extra.socket.d/override.conf b/home/.config/systemd/user/gpg-agent-extra.socket.d/override.conf new file mode 100644 index 0000000..9688683 --- /dev/null +++ b/home/.config/systemd/user/gpg-agent-extra.socket.d/override.conf @@ -0,0 +1,3 @@ +[Socket] +ListenStream= +ListenStream=%t/gnupg/d.hmaqciuk8y8ye3gwt9b6eth1/S.gpg-agent.extra
\ No newline at end of file diff --git a/home/.config/systemd/user/gpg-agent-ssh.socket.d/override.conf b/home/.config/systemd/user/gpg-agent-ssh.socket.d/override.conf new file mode 100644 index 0000000..a8c7003 --- /dev/null +++ b/home/.config/systemd/user/gpg-agent-ssh.socket.d/override.conf @@ -0,0 +1,3 @@ +[Socket] +ListenStream= +ListenStream=%t/gnupg/d.hmaqciuk8y8ye3gwt9b6eth1/S.gpg-agent.ssh
\ No newline at end of file diff --git a/home/.config/systemd/user/gpg-agent.service.d/override.conf b/home/.config/systemd/user/gpg-agent.service.d/override.conf new file mode 100644 index 0000000..3a220a3 --- /dev/null +++ b/home/.config/systemd/user/gpg-agent.service.d/override.conf @@ -0,0 +1,2 @@ +[Service] +Environment="GNUPGHOME=%h/.local/share/gnupg"
\ No newline at end of file diff --git a/home/.config/systemd/user/gpg-agent.socket.d/override.conf b/home/.config/systemd/user/gpg-agent.socket.d/override.conf new file mode 100644 index 0000000..3e3dd55 --- /dev/null +++ b/home/.config/systemd/user/gpg-agent.socket.d/override.conf @@ -0,0 +1,3 @@ +[Socket] +ListenStream= +ListenStream=%t/gnupg/d.hmaqciuk8y8ye3gwt9b6eth1/S.gpg-agent
\ No newline at end of file diff --git a/home/.config/systemd/user/noisetorch.service b/home/.config/systemd/user/noisetorch.service new file mode 100644 index 0000000..8f1efa3 --- /dev/null +++ b/home/.config/systemd/user/noisetorch.service @@ -0,0 +1,14 @@ +[Unit] +Description=Noisetorch Noise Cancelling +Requires=pipewire.socket + +[Service] +Type=oneshot +RemainAfterExit=yes +ExecStart=/usr/bin/noisetorch -i -s "alsa_input.usb-SteelSeries_SteelSeries_Arctis_7-00.mono-chat" -t 95 +ExecStop=/usr/bin/noisetorch -u +Restart=on-failure +RestartSec=3 + +[Install] +WantedBy=default.target diff --git a/home/.config/systemd/user/spotifyd.service.d/override.conf b/home/.config/systemd/user/spotifyd.service.d/override.conf new file mode 100644 index 0000000..d1b6f84 --- /dev/null +++ b/home/.config/systemd/user/spotifyd.service.d/override.conf @@ -0,0 +1,10 @@ +[Unit] +After=gpg-agent.socket + +[Service] +Environment="GNUPGHOME=%h/.local/share/gnupg" +Environment="PASSWORD_STORE_DIR=%h/.local/share/password-store" +Environment="SPOTIFYD_CLIENT_ID=0a1ac82014db4142b364c1d0aa50fea1" +ExecStartPre=/usr/bin/sleep 5 +ExecStart= +ExecStart=/usr/bin/spotifyd --no-daemon -d %H diff --git a/home/.config/systemd/user/vdirsyncer.service.d/override.conf b/home/.config/systemd/user/vdirsyncer.service.d/override.conf new file mode 100644 index 0000000..8cca0f8 --- /dev/null +++ b/home/.config/systemd/user/vdirsyncer.service.d/override.conf @@ -0,0 +1,3 @@ +[Service] +Environment="GNUPGHOME=%h/.local/share/gnupg" +Environment="PASSWORD_STORE_DIR=%h/.local/share/password-store" diff --git a/home/.config/tmux/tmux.conf b/home/.config/tmux/tmux.conf new file mode 100644 index 0000000..b3e3727 --- /dev/null +++ b/home/.config/tmux/tmux.conf @@ -0,0 +1,87 @@ +# List of plugins +set -g @plugin 'tmux-plugins/tpm' +set -g @plugin 'tmux-plugins/tmux-sensible' +set -g @plugin 'tmux-plugins/tmux-pain-control' +set -g @plugin 'christoomey/vim-tmux-navigator' +set -g @plugin 'tmux-plugins/tmux-sessionist' +set -g @plugin 'tmux-plugins/tmux-copycat' +set -g @plugin 'tmux-plugins/tmux-yank' +set -g @plugin 'tmux-plugins/tmux-urlview' +set -g @plugin 'lawabidingcactus/tmux-gruvbox-truecolor' +set -g @plugin 'tmux-plugins/tmux-resurrect' + +unbind C-b +set -g prefix ` +set -g prefix2 C-Space +# Start window numbering at 1 +set -g base-index 1 + +setw -g mode-keys vi + +bind-key R run-shell 'tmux source-file ~/.config/tmux/tmux.conf > /dev/null; \ + tmux display-message "Sourced tmux.conf!"' +## Join windows: <prefix> s, <prefix> j +bind-key j command-prompt -p "join pane from:" "join-pane -s '%%'" +bind-key s command-prompt -p "send pane to:" "join-pane -t '%%'" + +unbind-key -T copy-mode-vi v +unbind-key -T copy-mode-vi 'C-v' +bind-key -T copy-mode-vi v send -X begin-selection +bind-key -T copy-mode-vi 'C-v' send -X begin-selection \; send -X rectangle-toggle; +bind-key -T copy-mode-vi 'y' send -X copy-selection +bind-key -T copy-mode-vi 'C-e' send -X end-of-line +bind-key -T copy-mode-vi 'C-a' send -X start-of-line + +is_vim="ps -o state= -o comm= -t '#{pane_tty}' | grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'" + +bind -n 'M-h' if-shell "$is_vim" 'send-keys M-h' 'resize-pane -L 1' +bind -n 'M-j' if-shell "$is_vim" 'send-keys M-j' 'resize-pane -D 1' +bind -n 'M-k' if-shell "$is_vim" 'send-keys M-k' 'resize-pane -U 1' +bind -n 'M-l' if-shell "$is_vim" 'send-keys M-l' 'resize-pane -R 1' + +bind-key -T copy-mode-vi M-h resize-pane -L 1 +bind-key -T copy-mode-vi M-j resize-pane -D 1 +bind-key -T copy-mode-vi M-k resize-pane -U 1 +bind-key -T copy-mode-vi M-l resize-pane -R 1 + +set-option -g default-shell $SHELL + +set -g default-terminal tmux-256color +# determine if we should enable 256-colour support +if '[ $TERM = st-256color ]' "set -as terminal-overrides ',st*:Tc'" +## update the TERM variable of terminal emulator when creating a new session or attaching a existing session +set -g update-environment 'DISPLAY SSH_ASKPASS SSH_AGENT_PID SSH_CONNECTION WINDOWID XAUTHORITY TERM' + +# If you SSH into a host in a tmux window, you'll notice the window title of your terminal emulator remains to be user@localhost rather than user@server. To allow the title bar to adapt to whatever host you connect to, set the following in ~/.tmux.conf +set -g set-titles on +set -g set-titles-string "#T" + +set -g automatic-rename-format "#{?pane_in_mode,[tmux],#{?#{==:#{pane_current_command},zsh}, #{b:pane_current_path}, #{b:pane_current_path}:#{pane_current_command}}}#{?pane_dead,[dead],}" + +#https://github.com/neovim/neovim/wiki/FAQ#esc-in-tmux-or-gnu-screen-is-delayed +set -sg escape-time 0 + +set -g focus-events on + +set -g @resurrect-dir '$HOME/.local/share/tmux/resurrect' +# for vim +# set -g @resurrect-strategy-vim 'session' +# for neovim +# set -g @resurrect-strategy-nvim 'session' + +# set -g @resurrect-capture-pane-contents 'on' + +set -g @resurrect-save-shell-history 'off' + +set -g @resurrect-processes 'ssh aerc spt newsboat btop gomuks "python /usr/bin/ikhal"' + +set-environment -g TMUX_PLUGIN_MANAGER_PATH '~/.local/share/tmux/plugins' +if "test ! -d ~/.local/share/tmux/plugins/tpm" \ + "run 'git clone https://github.com/tmux-plugins/tpm ~/.local/share/tmux/plugins/tpm && ~/.local/share/tmux/plugins/tpm/bin/install_plugins'" +# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf) +run '~/.local/share/tmux/plugins/tpm/tpm' + +# The default key bindings include <Ctrl-l> which is the readline key binding +# for clearing the screen. The following binding can be added to your +# ~/.tmux.conf file to provide an alternate mapping to clear-screen. +bind C-l send-keys 'C-l' diff --git a/home/.config/user-dirs.dirs b/home/.config/user-dirs.dirs new file mode 100644 index 0000000..6dd2f73 --- /dev/null +++ b/home/.config/user-dirs.dirs @@ -0,0 +1,8 @@ +XDG_DESKTOP_DIR="$HOME/" +XDG_DOCUMENTS_DIR="$HOME/docs" +XDG_DOWNLOAD_DIR="$HOME/dl" +XDG_MUSIC_DIR="$HOME/" +XDG_PICTURES_DIR="$HOME/pics" +XDG_PUBLICSHARE_DIR="$HOME/" +XDG_TEMPLATES_DIR="$HOME/" +XDG_VIDEOS_DIR="$HOME/vids" diff --git a/home/.config/user-dirs.locale b/home/.config/user-dirs.locale new file mode 100644 index 0000000..3e0b419 --- /dev/null +++ b/home/.config/user-dirs.locale @@ -0,0 +1 @@ +en_US
\ No newline at end of file diff --git a/home/.config/wget/wgetrc b/home/.config/wget/wgetrc new file mode 100644 index 0000000..11f850d --- /dev/null +++ b/home/.config/wget/wgetrc @@ -0,0 +1 @@ +hsts-file = /tmp/wget-hsts diff --git a/home/.config/yt-dlp/config b/home/.config/yt-dlp/config new file mode 100644 index 0000000..16dcbd7 --- /dev/null +++ b/home/.config/yt-dlp/config @@ -0,0 +1,9 @@ +# ignore unavailable videos +-i +# not interested in getting videos with a resolution higher than 1080p +-f bv*[height<=1080]+ba/b[height<=1080] +--sub-lang en,eng,pt,pt_pt,es,es_es +--embed-subs + +--embed-thumbnail +--embed-metadata diff --git a/home/.config/zathura/zathurarc b/home/.config/zathura/zathurarc new file mode 100644 index 0000000..49e0653 --- /dev/null +++ b/home/.config/zathura/zathurarc @@ -0,0 +1,9 @@ +set selection-clipboard clipboard +set synctex-editor-command 'nvr --remote +"%line" "%file' +set incremental-search true +# set highlight-transparency 0.0 +set window-title-basename true +set window-title-basename true +set zoom-center true +map = zoom in +map + zoom best-fit diff --git a/home/.config/zsh/.zprofile b/home/.config/zsh/.zprofile new file mode 120000 index 0000000..25ce0f3 --- /dev/null +++ b/home/.config/zsh/.zprofile @@ -0,0 +1 @@ +../../.profile
\ No newline at end of file diff --git a/home/.config/zsh/.zshrc b/home/.config/zsh/.zshrc new file mode 100644 index 0000000..b79982c --- /dev/null +++ b/home/.config/zsh/.zshrc @@ -0,0 +1,192 @@ +case $- in + *i*) stty -ixon + ;; + *) return + ;; +esac + +ttyctl -f +# shellcheck source=/dev/null +[ -r ~/.config/sh/shinit ] && . ~/.config/sh/shinit + +safesource /usr/share/git/completion/git-prompt.sh + +# Enable colors and change prompt: +autoload -U colors +colors +setopt PROMPT_SUBST +PROMPT='%B%{$fg[green]%}%n%{$reset_color%}@%{$fg[cyan]%}%m%{$reset_color%}:%b%{$fg[yellow]%}%~%{$reset_color%}$(__git_ps1 " (%s)")%(?..[%{$fg[red]%}%?%{$reset_color%}]) %(!.#.>) ' + +HISTFILE="$XDG_CACHE_HOME"/zsh_history +HISTSIZE=50000 +SAVEHIST=50000 +setopt appendhistory autocd extendedglob nomatch notify +unsetopt beep +bindkey -e + +autoload -Uz compinit +compinit +zstyle ':completion:*' menu select +zstyle ':completion::complete:*' gain-privileges 1 +zstyle ':completion:*' completer _expand_alias _complete _ignored _match _approximate +zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS} + +zstyle ':completion:*' use-cache on +zstyle ':completion:*' cache-path ~/.cache/zsh + +zstyle ':completion:*:match:*' original only +zstyle -e ':completion:*:approximate:*' \ + max-errors 'reply=($((($#PREFIX+$#SUFFIX)/3))numeric)' + +zstyle ':completion:*:functions' ignored-patterns '_*' + +zstyle ':completion:*:*:kill:*' menu yes select +zstyle ':completion:*:kill:*' force-list always +zstyle ':completion:*:cd:*' ignore-parents parent pwd + +rationalise-dot() { + if [[ $LBUFFER = *.. ]]; then + LBUFFER+=/.. + else + LBUFFER+=. + fi +} +zle -N rationalise-dot +bindkey . rationalise-dot + +setopt COMPLETE_ALIASES +_comp_options+=(globdots) # Include hidden files. + +setopt rmstarsilent + +# create a zkbd compatible hash; +# to add other keys to this hash, see: man 5 terminfo +typeset -g -A key + +key[Home]="${terminfo[khome]}" +key[End]="${terminfo[kend]}" +key[Insert]="${terminfo[kich1]}" +key[Backspace]="${terminfo[kbs]}" +key[Delete]="${terminfo[kdch1]}" +key[Up]="${terminfo[kcuu1]}" +key[Down]="${terminfo[kcud1]}" +key[Left]="${terminfo[kcub1]}" +key[Right]="${terminfo[kcuf1]}" +key[PageUp]="${terminfo[kpp]}" +key[PageDown]="${terminfo[knp]}" +key[ShiftTab]="${terminfo[kcbt]}" + +# setup key accordingly +[[ -n "${key[Home]}" ]] && bindkey -- "${key[Home]}" beginning-of-line +[[ -n "${key[End]}" ]] && bindkey -- "${key[End]}" end-of-line +[[ -n "${key[Insert]}" ]] && bindkey -- "${key[Insert]}" overwrite-mode +[[ -n "${key[Backspace]}" ]] && bindkey -- "${key[Backspace]}" backward-delete-char +[[ -n "${key[Delete]}" ]] && bindkey -- "${key[Delete]}" delete-char +[[ -n "${key[Up]}" ]] && bindkey -- "${key[Up]}" up-line-or-history +[[ -n "${key[Down]}" ]] && bindkey -- "${key[Down]}" down-line-or-history +[[ -n "${key[Left]}" ]] && bindkey -- "${key[Left]}" backward-char +[[ -n "${key[Right]}" ]] && bindkey -- "${key[Right]}" forward-char +[[ -n "${key[PageUp]}" ]] && bindkey -- "${key[PageUp]}" beginning-of-buffer-or-history +[[ -n "${key[PageDown]}" ]] && bindkey -- "${key[PageDown]}" end-of-buffer-or-history +[[ -n "${key[ShiftTab]}" ]] && bindkey -- "${key[ShiftTab]}" reverse-menu-complete + +# Finally, make sure the terminal is in application mode, when zle is +# active. Only then are the values from $terminfo valid. +if (( ${+terminfo[smkx]} && ${+terminfo[rmkx]} )); then + autoload -Uz add-zle-hook-widget + function zle_application_mode_start { + echoti smkx + } + function zle_application_mode_stop { + echoti rmkx + } + add-zle-hook-widget -Uz zle-line-init zle_application_mode_start + add-zle-hook-widget -Uz zle-line-finish zle_application_mode_stop +fi + +if [ -n "$DISPLAY" ]; then + function zle-line-init () { echoti smkx } + function zle-line-finish () { echoti rmkx } + zle -N zle-line-init + zle -N zle-line-finish +fi + +autoload -Uz up-line-or-beginning-search down-line-or-beginning-search +zle -N up-line-or-beginning-search +zle -N down-line-or-beginning-search + +[[ -n "${key[Up]}" ]] && bindkey -- "${key[Up]}" up-line-or-beginning-search +[[ -n "${key[Down]}" ]] && bindkey -- "${key[Down]}" down-line-or-beginning-search + +bindkey \^U backward-kill-line + +autoload -U select-word-style +select-word-style bash + +exit_zsh() { exit } +zle -N exit_zsh +bindkey '^D' exit_zsh + +autoload -z edit-command-line +zle -N edit-command-line +bindkey "^X^E" edit-command-line + +bash() { + export USE_BASH="yes" + command bash +} + +setopt interactivecomments + +autoload -Uz add-zsh-hook + +xterm_title_precmd () { + print -Pn -- '\e]2;%~\a' +} + +xterm_title_preexec () { + print -Pn -- '\e]2;%~ %# ' && print -n -- "${(q)1}\a" +} + +if [[ "$TERM" == (alacritty|st*|screen*|xterm*|rxvt*|tmux*|putty*|konsole*|gnome*) ]]; then + add-zsh-hook -Uz precmd xterm_title_precmd + add-zsh-hook -Uz preexec xterm_title_preexec +fi + +autoload -Uz chpwd_recent_dirs cdr add-zsh-hook +add-zsh-hook chpwd chpwd_recent_dirs +zstyle ':completion:*:*:cdr:*:*' menu selection + +autoload -Uz run-help +alias help=run-help + +autoload -Uz run-help-git +autoload -Uz run-help-ip +autoload -Uz run-help-sudo + +set zle_bracketed_paste # Explicitly restore this zsh default +autoload -Uz bracketed-paste-magic +zle -N bracketed-paste bracketed-paste-magic + +safesource /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh + +if [ -n "$ZSH_HIGHLIGHT_STYLES" ]; then + ZSH_HIGHLIGHT_HIGHLIGHTERS=(main brackets pattern) + ZSH_HIGHLIGHT_STYLES[comment]='fg=yellow' +fi + +export ZSH_AUTOSUGGEST_USE_ASYNC=y +safesource /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh +bindkey '^[[Z' autosuggest-accept + +safesource /usr/share/zsh/plugins/zsh-history-substring-search/zsh-history-substring-search.zsh + +safesource /etc/profile.d/fzf.zsh || safesource /usr/share/fzf/key-bindings.zsh +safesource /usr/share/zsh/site-functions/_fzf || safesource /usr/share/fzf/completion.zsh + +fzf-history-widget-accept() { + fzf-history-widget + zle accept-line +} +zle -N fzf-history-widget-accept +bindkey '^X^R' fzf-history-widget-accept diff --git a/home/.hushlogin b/home/.hushlogin new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/home/.hushlogin diff --git a/home/.local/bin/automute b/home/.local/bin/automute new file mode 100755 index 0000000..20b04f4 --- /dev/null +++ b/home/.local/bin/automute @@ -0,0 +1,123 @@ +#!/usr/bin/env sh + +pid_file="/tmp/automutepid" + +pid_exists() { + test -r "$pid_file" +} + +is_running() { + if pid_exists; then + ps "$(cat "$pid_file")" >/dev/null 2>&1 || return 1 + else + return 1 + fi +} + +mute() { + pw-cli set-param "$1" Props '{mute: true}' +} + +unmute() { + pw-cli set-param "$1" Props '{mute: false}' +} + +pid2index() { + pw-dump | jq --argjson targetid "$1" 'map(select(.info.props."application.process.id" == $targetid and .info.params.PropInfo != null)) | .[].id' +} + +list_sink_input_ids() { + pw-dump | jq 'map(select(.info.params.PropInfo != null and .info.params.PropInfo[].id=="mute" and .info.props."application.process.id" != null)) | .[].id' +} + +unmute_all() { + for i in $(list_sink_input_ids); do + unmute "$i" + done + exit +} + +trap unmute_all INT TERM + +mute_all() { + for i in $(list_sink_input_ids); do + mute "$i" + done +} + +do_automute() { + while :; do + focus_pid="$(xdotool getwindowfocus getwindowpid)" + if [ "$focus_pid" ] && [ "$unfocus_pid" != "$focus_pid" ]; then + focus_index=$(pid2index "$focus_pid") + if [ "$unfocus_pid" ]; then + unfocus_index=$(pid2index "$unfocus_pid") + fi + if [ "$focus_index" ]; then + if [ "$unfocus_index" ]; then + mute "$unfocus_index" + else + mute_all + fi + unmute "$focus_index" + unfocus_pid="$focus_pid" + fi + fi + sleep 0.25 + done +} + +start() { + do_automute & + echo "$!" >"$pid_file" + notify-send "Automute started!" +} + +stop() { + pid_exists || exit 1 + pid="$(cat "$pid_file")" + # kill with SIGTERM, allowing finishing touches. + kill "$pid" + # even after SIGTERM, ffmpeg may still run, so SIGKILL it. + sleep 3 + is_running && kill -9 "$pid" + rm -f "$pid_file" + notify-send "Automute stopped!" +} + +toggle() { + if is_running; then + echo "Stopping automute" + stop + else + echo "Starting automute" + start + fi + echo + status +} + +status() { + if is_running; then + echo "Automuting is running with PID $(cat "$pid_file")" + else + echo "Automute inactive" + fi +} +case "$1" in + start) + start + ;; + stop) + stop + ;; + toggle) + toggle + ;; + status) + status + ;; + *) + toggle + ;; +esac diff --git a/home/.local/bin/display-setup b/home/.local/bin/display-setup new file mode 100755 index 0000000..94d5703 --- /dev/null +++ b/home/.local/bin/display-setup @@ -0,0 +1,22 @@ +#!/usr/bin/env sh + +if [ "$(uname -n)" = "hercules" ]; then + xrandr --setprovideroutputsource modesetting NVIDIA-G0 + nvidia-settings --load-config-only & + nvidia-settings -a '[gpu:0]/GPUPowerMizerMode=1' & +fi +xrandr --auto + +if [ "$(uname -n)" = "hercules" ] && xrandr --query | grep "HDMI-1 connected"; then + xrandr --output eDP-1 --off + xrandr --output HDMI-1 --primary --mode 1920x1080 --rate 144 + # xrandr --output HDMI-1 --primary --mode 1920x1080 + # xrandr --output HDMI-1 --primary --mode 2560x1080 --rate 75 + # xrandr --output HDMI-1 --primary --mode 3840x2160 + # xrandr --output HDMI-1 --mode 1920x1080 --sameas eDP-1 +elif [ "$(uname -n)" = "halley" ] && xrandr --query | grep "HDMI-1 connected"; then + xrandr --output HDMI-1 --mode 1920x1080 --same-as eDP-1 +fi + +bspc wm -r +launch-polybar diff --git a/home/.local/bin/input-setup b/home/.local/bin/input-setup new file mode 100755 index 0000000..95f7d31 --- /dev/null +++ b/home/.local/bin/input-setup @@ -0,0 +1,50 @@ +#!/usr/bin/env sh + +[ -r ~/.config/X11/Xkeymap ] && xkbcomp ~/.config/X11/Xkeymap "$DISPLAY" + +setlayout() { + ids=$(xinput --list | sed -ne '/Virtual core keyboard/{:a' -e 'n;p;ba' -e '}' | grep "$1" | sed -n 's/.*id=\([0-9]\+\).*/\1/p') + for i in $ids; do + setxkbmap -device "$i" -layout "$2" + done +} + +setmodmap() { + kbds=$(xinput --list | sed -ne '/Virtual core keyboard/{:a' -e 'n;p;ba' -e '}' | grep "$1" | sed -n 's/.*id=\([0-9]\+\).*/\1/p') + if [ "$kbds" ]; then + xmodmap ~/.config/X11/Xmodmap + fi +} + +if [ "$(uname -n)" = "halley" ]; then + setxkbmap -layout no +elif [ "$(uname -n)" = "hercules" ]; then + setxkbmap -layout es +fi + +setxkbmap -option "caps:escape" +xset r rate 250 30 + +setlayout "Kingston HyperX Alloy FPS Pro Mechanical Gaming Keyboard" us +# setlayout "SONiX USB DEVICE" us + +setlayout "SEMITEK USB-HID Gaming Keyboard" us +# setmodmap "SEMITEK USB-HID Gaming Keyboard" + +setlayout "Dierya DK61 Keyboard" us +# setmodmap "Dierya DK61 Keyboard" + +xmodmap ~/.config/X11/Xmodmap + +if [ "$(uname -n)" = "hercules" ]; then + xinput set-prop "ETPS/2 Elantech Touchpad" "libinput Tapping Enabled" 1 + xinput set-prop "ETPS/2 Elantech Touchpad" "libinput Natural Scrolling Enabled" 1 + ids=$(xinput --list | sed -ne '/Virtual core pointer/{:a' -e 'n;p;ba' -e '}' | grep "Kingsis Peripherals ZOWIE Gaming mouse" | sed -n 's/.*id=\([0-9]\+\).*/\1/p') + for i in $ids; do + xinput --set-prop "$i" 'libinput Accel Profile Enabled' 0, 1 + done +elif [ "$(uname -n)" = "halley" ]; then + xinput set-prop "SynPS/2 Synaptics TouchPad" "libinput Tapping Enabled" 1 + xinput set-prop "SynPS/2 Synaptics TouchPad" "libinput Natural Scrolling Enabled" 1 + xinput set-prop "ELAN Touchscreen" "Device Enabled" 0 +fi diff --git a/home/.local/bin/launch-polybar b/home/.local/bin/launch-polybar new file mode 100755 index 0000000..c670e56 --- /dev/null +++ b/home/.local/bin/launch-polybar @@ -0,0 +1,17 @@ +#!/usr/bin/env sh +# shellcheck source=/dev/null +[ -r ~/.config/sh/envrc ] && . ~/.config/sh/envrc + +# Terminate already running bar instances +killall -q polybar +# If all your bars have ipc enabled, you can also use +# polybar-msg cmd quit + +# Launch bars +if command -v "xrandr" >/dev/null 2>&1; then + for m in $(xrandr --query | grep " connected" | cut -d" " -f1); do + MONITOR=$m polybar --reload mybar >>/tmp/polybar.log 2>&1 & + done +else + polybar --reload mybar & +fi diff --git a/home/.local/bin/linkhandler b/home/.local/bin/linkhandler new file mode 100755 index 0000000..8b43f70 --- /dev/null +++ b/home/.local/bin/linkhandler @@ -0,0 +1,49 @@ +#!/usr/bin/env sh + +resolve_url() { + if [ -f "$1" ]; then + local_url="$1" + else + local_url="/tmp/$(echo "$1" | sed "s/.*\///")" + curl -sL "$1" >"$local_url" + fi + printf "%s" "$local_url" +} + +if [ -z "$1" ]; then + url=$(xclip -o -selection clipboard) +else + url="$1" +fi + +case "$url" in + *.mkv* | *.webm* | *.mp4* | *.mp3* | *.ogg* | *.mov* | *.ts* | *.m3u8* | *.gif* | *.m4a* | *youtube.com/watch* | *youtube.com/playlist* | *youtu.be* | *twitch.tv* | *invidio.us* | *lbry* | *streamye.com* | *streamvi.com* | *streamwo.com* | *videos.lukesmith.xyz*) + setsid mpv -quiet "$url" >/dev/null 2>&1 & + ;; + acestream://*) + setsid acestream-launcher "$url" >/dev/null 2>&1 & + ;; + *.png | *.jpg | *.jpe | *.jpeg | *.PNG | *.JGP | *.JPE | *.JPEG) + local_url="$(resolve_url "$url")" + setsid sxiv -a "$local_url" >/dev/null 2>&1 & + ;; + *.pdf | *.ps | *.epub) + local_url="$(resolve_url "$url")" + setsid zathura "$local_url" >/dev/null 2>&1 & + ;; + *rss* | *feed* | http*.xml | http*.atom) + setsid rssadd "$url" >/dev/null 2>&1 & + ;; + mailto:*) + setsid aerc "$url" >/dev/null 2>&1 & + ;; + *.dot) + setsid xdot "$url" >/dev/null 2>&1 & + ;; + http*) + librewolf "$url" >/dev/null 2>&1 & + ;; + *) + "$TERMINAL $EDITOR $1" + ;; +esac diff --git a/home/.local/bin/locknpause b/home/.local/bin/locknpause new file mode 100755 index 0000000..0fa728e --- /dev/null +++ b/home/.local/bin/locknpause @@ -0,0 +1,4 @@ +#!/usr/bin/env sh +playerctl pause +# i3lock-fancy -t "" -- scrot -z -o +i3lock-fancy-rapid 5 2 -e -f diff --git a/home/.local/bin/record b/home/.local/bin/record new file mode 100755 index 0000000..0789769 --- /dev/null +++ b/home/.local/bin/record @@ -0,0 +1,86 @@ +#!/usr/bin/env sh + +pid_file="/tmp/recordpid" +log_file="/tmp/record.log" + +pid_exists() { + test -r "$pid_file" +} + +is_running() { + if pid_exists; then + ps "$(cat "$pid_file")" >/dev/null 2>&1 || return 1 + else + return 1 + fi +} + +start() { + ffmpeg \ + -threads 0 \ + -thread_queue_size 512 -f x11grab -s 1920x1080 -framerate 60 -i "$DISPLAY" \ + -thread_queue_size 1024 -f pulse -itsoffset 0.350 -i "alsa_output.usb-SteelSeries_SteelSeries_Arctis_7-00.analog-stereo.monitor" \ + -thread_queue_size 1024 -f pulse -itsoffset 0.350 -i "alsa_input.usb-SteelSeries_SteelSeries_Arctis_7-00.analog-mono" \ + -c:a aac \ + -init_hw_device vaapi=va:/dev/dri/renderD128,driver=i965 -filter_hw_device va \ + -vf format=nv12,hwupload \ + -c:v h264_vaapi \ + -r:v 60 -g:v 120 -bf:v 3 -refs:v 16 \ + "$HOME/vids/$(date '+%y%m%d-%H%M-%S').mkv" >"$log_file" 2>&1 & + echo "$!" >"$pid_file" + + notify-send "Record started!" +} + +stop() { + pid_exists || exit 1 + pid="$(cat "$pid_file")" + # kill with SIGTERM, allowing finishing touches. + kill "$pid" + # even after SIGTERM, ffmpeg may still run, so SIGKILL it. + sleep 3 + is_running && kill -9 "$pid" + rm -f "$pid_file" + notify-send "Record stopped!" +} + +toggle() { + if is_running; then + echo "Stopping record" + stop + else + echo "Starting record" + start + fi + echo + status +} + +status() { + if is_running; then + echo "Recording with PID $(cat "$pid_file")" + echo "Check the logs at" + echo + echo "$log_file" + echo + else + echo "Record inactive" + fi +} +case "$1" in + start) + start + ;; + stop) + stop + ;; + toggle) + toggle + ;; + status) + status + ;; + *) + toggle + ;; +esac diff --git a/home/.local/bin/rqr b/home/.local/bin/rqr new file mode 100755 index 0000000..9621916 --- /dev/null +++ b/home/.local/bin/rqr @@ -0,0 +1,6 @@ +#!/usr/bin/env sh + +text="$(zbarcam -q -1 --raw | xclip -selection clipboard -f)" + +echo "$text" +notify-send "$text" diff --git a/home/.local/bin/stop b/home/.local/bin/stop new file mode 100755 index 0000000..993b722 --- /dev/null +++ b/home/.local/bin/stop @@ -0,0 +1,7 @@ +#!/usr/bin/env sh + +eval "$@" & +pid="$!" +echo "$pid" +kill -STOP "$pid" +tail --pid=$pid -f /dev/null diff --git a/home/.local/bin/stream b/home/.local/bin/stream new file mode 100755 index 0000000..c427a50 --- /dev/null +++ b/home/.local/bin/stream @@ -0,0 +1,94 @@ +#!/usr/bin/env sh + +pid_file="/tmp/streampid" +log_file="/tmp/stream.log" + +pid_exists() { + test -r "$pid_file" +} + +is_running() { + if pid_exists; then + ps "$(cat "$pid_file")" >/dev/null 2>&1 || return 1 + else + return 1 + fi +} + +start() { + ffmpeg \ + -threads 0 \ + -thread_queue_size 512 -f x11grab -s 1920x1080 -framerate 30 -i "$DISPLAY" \ + -thread_queue_size 512 -f v4l2 -video_size 320x240 -framerate 30 -i /dev/video0 \ + -thread_queue_size 1024 -f pulse -itsoffset 0.350 -i "alsa_output.usb-SteelSeries_SteelSeries_Arctis_7-00.analog-stereo.monitor" \ + -thread_queue_size 1024 -f pulse -itsoffset 0.350 -i "alsa_input.usb-SteelSeries_SteelSeries_Arctis_7-00.analog-mono" \ + -c:a aac \ + -init_hw_device vaapi=va:/dev/dri/renderD128,driver=i965 -filter_hw_device va \ + -filter_complex \ + "[0:v]setpts=PTS-STARTPTS[bg]; \ + [1:v]setpts=PTS-STARTPTS[fg]; \ + [bg][fg]overlay=W-w:H-h,format=nv12,hwupload[vout]" \ + -map "[vout]" \ + -c:v h264_vaapi \ + -r:v 30 -g:v 60 -bf:v 3 -refs:v 16 \ + -filter_complex "[2:a][3:a]amerge=inputs=2[aout]" -map "[aout]" -ac 2 \ + -f flv "rtmp://live.strisemarx.com/hls/index" >"$log_file" 2>&1 & + echo "$!" >"$pid_file" + + bspc config right_padding 320 + notify-send "Stream started!" +} + +stop() { + bspc config right_padding 0 + pid_exists || exit 1 + pid="$(cat "$pid_file")" + # kill with SIGTERM, allowing finishing touches. + kill "$pid" + # even after SIGTERM, ffmpeg may still run, so SIGKILL it. + sleep 3 + is_running && kill -9 "$pid" + rm -f "$pid_file" + notify-send "Stream stopped!" +} + +toggle() { + if is_running; then + echo "Stopping stream" + stop + else + echo "Starting stream" + start + fi + echo + status +} + +status() { + if is_running; then + echo "Streaming with PID $(cat "$pid_file")" + echo "Check the logs at" + echo + echo "$log_file" + echo + else + echo "Stream inactive" + fi +} +case "$1" in + start) + start + ;; + stop) + stop + ;; + toggle) + toggle + ;; + status) + status + ;; + *) + toggle + ;; +esac diff --git a/home/.local/bin/terminal-benchmark b/home/.local/bin/terminal-benchmark new file mode 100755 index 0000000..78923a8 --- /dev/null +++ b/home/.local/bin/terminal-benchmark @@ -0,0 +1,61 @@ +#!/usr/bin/env bash + +MAX_RETRIES=100000 +START=$(date +%s.%N) +#6*42 + 48 +for i in {1..100000}; do + echo -e '\r'; + echo -e '\033[0K\033[1mBold\033[0m \033[7mInvert\033[0m \033[4mUnderline\033[0m'; + echo -e '\033[0K\033[1m\033[7m\033[4mBold & Invert & Underline\033[0m'; + echo; + echo -e '\033[0K\033[31m Red \033[32m Green \033[33m Yellow \033[34m Blue \033[35m Magenta \033[36m Cyan \033[0m'; + echo -e '\033[0K\033[1m\033[4m\033[31m Red \033[32m Green \033[33m Yellow \033[34m Blue \033[35m Magenta \033[36m Cyan \033[0m'; + echo; + echo -e '\033[0K\033[41m Red \033[42m Green \033[43m Yellow \033[44m Blue \033[45m Magenta \033[46m Cyan \033[0m'; + echo -e '\033[0K\033[1m\033[4m\033[41m Red \033[42m Green \033[43m Yellow \033[44m Blue \033[45m Magenta \033[46m Cyan \033[0m'; + echo; + echo -e '\033[0K\033[30m\033[41m Red \033[42m Green \033[43m Yellow \033[44m Blue \033[45m Magenta \033[46m Cyan \033[0m'; + echo -e '\033[0K\033[30m\033[1m\033[4m\033[41m Red \033[42m Green \033[43m Yellow \033[44m Blue \033[45m Magenta \033[46m Cyan \033[0m'; +done +END=$(date +%s.%N) +echo "Coloured output test takes: " + "$(echo "($END - $START)" | bc)" + " seconds" +COLOURED_OUPUT=$(echo "(300 * $MAX_RETRIES) / ($END - $START)" | bc) + + +START=$(date +%s.%N) +for i in {1..100000}; do + echo -e '\r'; + echo -e '🎫💋📂💣💒💁💀💳📄📕📦📷🔈🔙🔪🔻🔻🕊🕊🕛🕬🕽🖎🖎🖎🖍🖞🗀🗑🗢🗳🗡🗤🗣🗺🗻🗼🗽🗾🗿🗮🗝🗌🖻🖪🖙🖈🕷🕦🕕🔳🔢🔑🔀📯📞📍💼💫💚💉👸👧👖🐴🐣🐒🐁🏰🏟🏎🎽🎬🎛🎊🍹🍨🍗'; +done +END=$(date +%s.%N) +echo "Unicode output test takes: " "$(echo "($END - $START)" | bc)" " seconds" +UNICODE_OUPUT=$(echo "(139 * $MAX_RETRIES) / ($END - $START)" | bc) + + +START=$(date +%s.%N) +for i in {1..100000}; do + echo -e '\r'; + echo -e 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ'; +done +END=$(date +%s.%N) +echo "Non-unicode output test takes: " "$(echo "($END - $START)" | bc)" " seconds" +NONE_UNICODE_OUPUT=$(echo "(118 * $MAX_RETRIES) / ($END - $START)" | bc) + +test_output=''; +START=$(date +%s.%N) +for x in {1..10}; do + test_output="${test_output} a🎫" + for i in {1..100000}; do + echo -e '\r'; + echo -e "$test_output"; + done +done +END=$(date +%s.%N) +echo "Mixed output test takes: " "$(echo "($END - $START)" | bc)" " seconds" +MIXED_OUPUT=$(echo "(165 * $MAX_RETRIES) / ($END - $START)" | bc) + + +echo "${COLOURED_OUPUT} coloured characters per second" +echo "${UNICODE_OUPUT} unicode characters per second" +echo "${NONE_UNICODE_OUPUT} none-unicode characters per second" +echo "${MIXED_OUPUT} Mixed characters per second" diff --git a/home/.local/bin/terminal-testdrive b/home/.local/bin/terminal-testdrive new file mode 100755 index 0000000..aa241bc --- /dev/null +++ b/home/.local/bin/terminal-testdrive @@ -0,0 +1,66 @@ +#!/usr/bin/env bash + +echo "# 24-bit (true-color)" +# based on: https://gist.github.com/XVilka/8346728 +term_cols="$(tput cols || echo 80)" +cols=$(echo "2^((l($term_cols)/l(2))-1)" | bc -l 2> /dev/null) +rows=$(( cols / 2 )) +awk -v cols="$cols" -v rows="$rows" 'BEGIN{ + s=" "; + m=cols+rows; + for (row = 0; row<rows; row++) { + for (col = 0; col<cols; col++) { + i = row+col; + r = 255-(i*255/m); + g = (i*510/m); + b = (i*255/m); + if (g>255) g = 510-g; + printf "\033[48;2;%d;%d;%dm", r,g,b; + printf "\033[38;2;%d;%d;%dm", 255-r,255-g,255-b; + printf "%s\033[0m", substr(s,(col+row)%2+1,1); + } + printf "\n"; + } + printf "\n\n"; +}' + +echo "# text decorations" +printf '\e[1mbold\e[22m\n' +printf '\e[2mdim\e[22m\n' +printf '\e[3mitalic\e[23m\n' +printf '\e[4munderline\e[24m\n' +printf '\e[4:1mthis is also underline\e[24m\n' +printf '\e[21mdouble underline\e[24m\n' +printf '\e[4:2mthis is also double underline\e[24m\n' +printf '\e[4:3mcurly underline\e[24m\n' +printf '\e[58;5;10;4mcolored underline\e[59;24m\n' +printf '\e[5mblink\e[25m\n' +printf '\e[7mreverse\e[27m\n' +printf '\e[8minvisible\e[28m <- invisible (but copy-pasteable)\n' +printf '\e[9mstrikethrough\e[29m\n' +printf '\e[53moverline\e[55m\n' +echo + +echo "# magic string (see https://en.wikipedia.org/wiki/Unicode#Web)" +echo "é Δ Й ק م ๗ あ 叶 葉 말" +echo + +echo "# emojis" +echo "😃😱😵" +echo + +echo "# right-to-left ('w' symbol should be at right side)" +echo "שרה" +echo + +echo "# sixel graphics" +printf '\eP0;0;0q"1;1;64;64#0;2;0;0;0#1;2;100;100;100#1~{wo_!11?@FN^!34~^NB +@?_ow{~$#0?BFN^!11~}wo_!34?_o{}~^NFB-#1!5~}{o_!12?BF^!25~^NB@??ow{!6~$#0!5? +@BN^!12~{w_!25?_o{}~~NFB-#1!10~}w_!12?@BN^!15~^NFB@?_w{}!10~$#0!10?@F^!12~} +{o_!15?_ow{}~^FB@-#1!14~}{o_!11?@BF^!7~^FB??_ow}!15~$#0!14?@BN^!11~}{w_!7?_ +w{~~^NF@-#1!18~}{wo!11?_r^FB@??ow}!20~$#0!18?@BFN!11~^K_w{}~~NF@-#1!23~M!4? +_oWMF@!6?BN^!21~$#0!23?p!4~^Nfpw}!6~{o_-#1!18~^NB@?_ow{}~wo!12?@BFN!17~$#0! +18?_o{}~^NFB@?FN!12~}{wo-#1!13~^NB@??_w{}!9~}{w_!12?BFN^!12~$#0!13?_o{}~~^F +B@!9?@BF^!12~{wo_-#1!8~^NFB@?_w{}!19~{wo_!11?@BN^!8~$#0!8?_ow{}~^FB@!19?BFN +^!11~}{o_-#1!4~^NB@?_ow{!28~}{o_!12?BF^!4~$#0!4?_o{}~^NFB!28?@BN^!12~{w_-#1 +NB@???GM!38NMG!13?@BN$#0?KMNNNF@!38?@F!13NMK-\e'\''' diff --git a/home/.local/bin/tokodi b/home/.local/bin/tokodi new file mode 100755 index 0000000..738d77b --- /dev/null +++ b/home/.local/bin/tokodi @@ -0,0 +1,13 @@ +#!/usr/bin/env sh + +if [ -z "$1" ]; then + url=$(xclip -o -selection clipboard) +elif [ "$1" = "-" ]; then + read -r url +else + url="$1" +fi + +payload="$(printf '{"jsonrpc":"2.0", "id": 1, "method":"Player.Open","params": {"item": {"file":"%s"}}}' "$url")" + +curl -u kodi:kodi 'http://xbox.pulpo:8080/jsonrpc' -X POST --data-raw "$payload" -H 'Content-Type: application/json' diff --git a/home/.local/bin/videowrapper b/home/.local/bin/videowrapper new file mode 100755 index 0000000..60dbeb3 --- /dev/null +++ b/home/.local/bin/videowrapper @@ -0,0 +1,7 @@ +#!/usr/bin/env sh +url="$(xclip -o -selection clipboard)" +log="$(mktemp)" +cmd="mpv -quiet $url 2>&1 > $log" + +echo "$cmd" +eval "$cmd" || notify-send "$url" "$(cat "$log")" diff --git a/home/.local/bin/wqr b/home/.local/bin/wqr new file mode 100755 index 0000000..09186ff --- /dev/null +++ b/home/.local/bin/wqr @@ -0,0 +1,11 @@ +#!/usr/bin/env sh + +if [ -z "$1" ]; then + text=$(xclip -o -selection clipboard) +elif [ "$1" = "-" ]; then + read -r text +else + text="$1" +fi + +printf '%s' "$text" | qrencode -t SVG -o - | feh - --conversion-timeout 1 diff --git a/home/.local/share/Steam/steamapps/common/Counter-Strike Global Offensive/csgo/cfg/aim1v1.cfg b/home/.local/share/Steam/steamapps/common/Counter-Strike Global Offensive/csgo/cfg/aim1v1.cfg new file mode 100644 index 0000000..f4a1cdc --- /dev/null +++ b/home/.local/share/Steam/steamapps/common/Counter-Strike Global Offensive/csgo/cfg/aim1v1.cfg @@ -0,0 +1,27 @@ +clear + +exec gamemode_competitive +// Server config +mp_autoteambalance 1 +mp_freezetime 0 // Disables freezetime +sv_alltalk 1 +mp_halftime_duration 0 +mp_weapons_allow_map_placed 1 +mp_roundtime 80250 +mp_maxrounds 30 +mp_join_grace_time 30 +mp_friendlyfire 1 +mp_free_armor 2 +mp_solid_teammates 1 + +bot_kick // Kicks bots +mp_warmup_end // Ends warmup +mp_restartgame 1 // Restarts the game + +echo "" +echo "" +echo "" +echo "1v1 CONFIG LOADED" +echo "" +echo "" +echo "" diff --git a/home/.local/share/Steam/steamapps/common/Counter-Strike Global Offensive/csgo/cfg/autoexec.cfg b/home/.local/share/Steam/steamapps/common/Counter-Strike Global Offensive/csgo/cfg/autoexec.cfg new file mode 100644 index 0000000..5502774 --- /dev/null +++ b/home/.local/share/Steam/steamapps/common/Counter-Strike Global Offensive/csgo/cfg/autoexec.cfg @@ -0,0 +1,257 @@ +// LAUNCH OPTIONS + +// -novid -nojoy -freq 144 + +echo "" +echo "" +echo "autoexec.cfg starting" +echo "" +echo "" + +//Rates +rate "786432" //Your download rate to the server. Max rate: "786432" +cl_cmdrate "128" //Max number of command packets sent to server per second +cl_updaterate "128" //Number of packets per second you are requesting from the server +cl_interp "0.007813" //Sets the interpolation amount, currently on the lowest value +cl_interp_ratio "1" //Sets the interpolation amount (final amount is cl_interp_ratio / cl_updaterate) +cl_lagcompensation "1" //Lag compensation helps by eliminating combat latency from client side view +cl_predict "1" //Skip waiting for server feedback and simulate client side movement in real-time +cl_predictweapons "1" //Skip waiting for server feedback and perform client side prediction of weapon effects +mm_dedicated_search_maxping "25" + + +//Audio + +voice_scale "0.4" //Turn down volume of other players to 40% (RECOMMENDED) +snd_deathcamera_volume "0" //Volume of the death camera music +snd_dzmusic_volume "0" //Volume of the Danger Zone victory music +snd_mapobjective_volume "0" //Volume of map objective music +snd_menumusic_volume "0.01" //Volume of the main menu music +snd_music_selection "2" //Tracking rotating music for players with no music packs equipped +snd_musicvolume_multiplier_inoverlay "0" //Music volume multiplier when Steam Overlay is active +snd_mute_mvp_music_live_players "0" //MVP music is muted if players from both teams are still alive +snd_mvp_volume "0" //Volume of the MVP music +snd_roundend_volume "0" //Volume of round end music +snd_roundstart_volume "0" //Volume of round start music +snd_tensecondwarning_volume "0.10" //10 Second warning music, enabled on 3% volume to hear if there's time to defuse +snd_mute_losefocus "0" +volume "0.5" +snd_mute_losefocus "1" +snd_pitchquality 1 # Use high quality sounds + + +//Video +muzzleflash_light 0 +mat_monitorgamma "1.6" +mat_monitorgamma_tv_enabled "0" //Turn off TV Mode for less off-set light +mat_queue_mode "-1" +fps_max "300" +fps_max_menu "30" +r_dynamic "0" +r_drawtracers_firstperson "1" +// mat_postprocess_enable 0 +//mat_savechanges //write settings to registry" +r_eyegloss "0" // No Makeup. +r_eyemove "0" // No Eye Movement. +r_eyeshift_x "0" // No Eye Movement X-Angel. +r_eyeshift_y "0" // No Eye Movement Y-Angel. +r_eyeshift_z "0" // No Eye Movement Z-Angel. +r_eyesize "0" // Smaller Eyes. + + +//Mouse +sensitivity "1.0" +zoom_sensitivity_ratio_mouse ".818933" +m_rawinput "1" +m_customaccel "0" +m_mouseaccel1 "0" +m_mouseaccel2 "0" + +unbindall + +//BUY Binds +bind "uparrow" " buy vesthelm;" +bind "downarrow" " buy vest;" +bind "rightarrow" " buy defuser;" +bind "home" "buy ak47; buy m4a1; use weapon_ak47; use weapon_m4a1; drop" +bind "pgup" "buy p250; use weapon_p250; drop" +bind "pgdn" "buy aug; buy sg556; use weapon_aug; use weapon_sg556; drop" +bind "end" "buy awp; use weapon_awp; drop" + +//NADE Binds +bind "4" "buy hegrenade; use weapon_knife; use weapon_hegrenade" +bind "c" "buy smokegrenade; use weapon_knife;use weapon_smokegrenade" +bind "f" "buy flashbang; use weapon_knife; use weapon_flashbang" +bind "v" "buy incgrenade; buy molotov; use weapon_knife;use weapon_molotov; use weapon_incgrenade" +bind "l" "use weapon_decoy" + +//Other Binds +bind mwheelup +jump +bind mwheeldown +jump +bind q "invnextnongrenade" +bind z "+lookatweapon" +bind "t" "use weapon_taser; slot13" +bind "h" "+spray_menu" +bind "mouse5" +voicerecord +bind "f1" "toggleconsole" +bind "f2" "buy smokegrenade; buy incgrenade; buy molotov; buy flashbang; buy flashbang" +bind "f3" "buy smokegrenade; buy incgrenade; buy molotov; buy flashbang; buy hegrenade" +bind "f4" "buy smokegrenade; buy flashbang; buy flashbang; buy hegrenade" +bind 3 "slot3; use weapon_knife" +bind "p" "holdpos;roger" + +//Default Binds +bind "SPACE" "+jump" +bind g drop +bind "1" "slot1" +bind "2" "slot2" +bind "5" "slot5" +bind "6" "slot6" +bind "7" "slot7" +bind "8" "slot8" +bind "9" "slot9" +bind "0" "slot10" +bind ctrl "+duck" +bind b "buymenu" +bind "mouse1" "+attack" +bind "mouse2" "+attack2" +bind a +moveleft +bind d +moveright +bind w +forward +bind s +back +bind "SHIFT" +speed +bind y "messagemode" +bind u messagemode2 +bind r "+reload;r_cleardecals" +bind "TAB" +showscores +bind m teammenu +bind k callvote +bind e +use + +//Misc +developer "0" +con_enable "1" +con_filter_enable "2" +con_filter_text "Damage" +con_filter_text_out "Player:" +ui_steam_overlay_notification_position "bottomleft" +player_nevershow_communityservermessage "1" +gameinstructor_enable "0" +option_duck_method "0" +option_speed_method "0" +cl_downloadfilter "nosounds" +cl_disablehtmlmotd "1" +cl_autowepswitch "0" +cl_buywheel_nomousecentering 1 +cl_buywheel_nonumberpurchasing 0 +closeonbuy "0" +hud_takesshots "0" +cl_join_advertise "2" +func_break_max_pieces "0" //Less clutter from breaking vents (especially on Mirage) +cl_use_opens_buy_menu "0" //Disable button E from opening buy-menu (Useful when picking up weapons in spawn) +spec_replay_autostart "0" //Disable "Auto-start Killer Replay" when available +adsp_debug "0" +cl_clearhinthistory "1" +cl_debugrumble "0" +cl_detail_avoid_force "0" +cl_detail_avoid_radius "0" +cl_detail_avoid_recover_speed "0" +cl_detail_max_sway "0" +cl_rumblescale "0" +cl_threaded_bone_setup "0" +mat_hdr_enabled "0" + + +//HUD +hud_scaling "0.95" //Scales hud elements to maximum value +hud_showtargetid "1" //Enables display of target names, important +cl_disablefreezecam "1" //Disables freezecam +cl_hud_bomb_under_radar "1" //Draws bomb under radar, convenient +cl_hud_color "8" //Makes the hud color green (THIS CHANGES THE HUD COLOR) +cl_hud_playercount_showcount "1" //Shows player avatars instead of numbers left +cl_hud_playercount_pos "0" //Puts player information in the bottom instead of top +cl_hud_healthammo_style "0" //Reverted hud style due to hidden burst mode +cl_hud_background_alpha "0.6" //Hidden but still visible black bars, easy on the eyes +cl_showloadout "1" //So it doesnt fade out the weapon slots, very annoying otherwise +cl_show_clan_in_death_notice "0" //Tagname will not show in death notices +cl_teamid_overhead_mode "2" //Always show team behind walls with equipment +cl_showhelp "0" //Removes on-screen help +cl_autohelp "0" //Removes automatic help +gameinstructor_enable "0" //Removes in-game instructions +safezonex "0.8" //Screen width percentage for the hud +safezoney "1" //Screen height percentage for the hud + +//Scoreboard and netgraph combined +net_graph "0" +net_graphheight 0 +net_graphproportionalfont 0.5 +cl_showfps 0 + +//Crosshair +cl_crosshair_drawoutline "1" +cl_crosshair_dynamic_maxdist_splitratio "0.35" +cl_crosshair_dynamic_splitalpha_innermod "1" +cl_crosshair_dynamic_splitalpha_outermod "0.5" +cl_crosshair_dynamic_splitdist "7" +cl_crosshair_friendly_warning "2" +cl_crosshair_outlinethickness "1" +cl_crosshair_sniper_show_normal_inaccuracy "0" +cl_crosshair_sniper_width "1" +cl_crosshair_t "0" +cl_crosshairalpha "255" +cl_crosshaircolor "1" +cl_crosshaircolor_b "50" +cl_crosshaircolor_g "250" +cl_crosshaircolor_r "50" +cl_crosshairdot "0" +cl_crosshairgap "-2.000000" +cl_crosshairgap_useweaponvalue "0" +cl_crosshairsize "1" +cl_crosshairstyle "4" +cl_crosshairthickness "1.000000" +cl_crosshairusealpha "1" +cl_fixedcrosshairgap "3" + +//Viewmodel +viewmodel_offset_x "2" //Changes viewmodel view in X scale +viewmodel_offset_y "2" //Changes viewmodel view in Y scale +viewmodel_offset_z "-2" //Changes viewmodel view in Z scale +viewmodel_fov "68" //Highest viewmodel FOV +viewmodel_recoil "0" //Disable viewmodel reactions to weapon recoil & aimpunch (from Update: 2018-03-01) +cl_bob_lower_amt "5" //How much the viewmodel lowers when running, set to lowest for less distraction +cl_bobamt_lat "0.1" //How much the viewmodel moves side to side when running, set to lowest for less distraction +cl_bobamt_vert "0.1" //How much the viewmodel moves up and down when running, set to lowest for less distraction +cl_bobcycle "0.98" //The frequency at which the viewmodel bobs, set to default +cl_viewmodel_shift_left_amt "0.5" //Lowers the crouching animation of the viewmodel +cl_viewmodel_shift_right_amt "0.25" //Lowers the crouching animation of the viewmodel + +// RADAR +cl_teammate_colors_show "1" //Show teammates as separate colors without letter +cl_hud_radar_scale "1" //Optimized Radar size +cl_radar_scale "0.4" //Radar map scaled down to fit all maps +cl_radar_always_centered "0" //Centers map instead of player +cl_radar_icon_scale_min "1" //Minimum player icon scale + +//Quick-switch +alias "+knife" "use weapon_knife" +alias "-knife" "invnextnongrenade" +bind "mouse4" "+knife" + +// Jump Throw +alias "+jumpthrow" "+jump;-attack" +alias "-jumpthrow" "-jump" +bind "j" "+jumpthrow" +bind "capslock" "+jumpthrow" + +// Useful shortcuts for popular commands in console +alias "d" "disconnect" +alias "q" "quit;exit" +alias "r" "retry" +alias "rs" "mp_restartgame 1" + +host_writeconfig +echo "" +echo "" +echo "autoexec.cfg loaded, GLHF" +echo "" +echo "" diff --git a/home/.local/share/Steam/steamapps/common/Counter-Strike Global Offensive/csgo/cfg/practice.cfg b/home/.local/share/Steam/steamapps/common/Counter-Strike Global Offensive/csgo/cfg/practice.cfg new file mode 100644 index 0000000..8139e6c --- /dev/null +++ b/home/.local/share/Steam/steamapps/common/Counter-Strike Global Offensive/csgo/cfg/practice.cfg @@ -0,0 +1,63 @@ +clear + +// Server config +sv_cheats 1 // Enables cheat commands +mp_limitteams 0 // No player limit in teams +mp_autoteambalance 0 // No player balancing +mp_timelimit 999999 +mp_roundtime 60 // 60 minute round-timer +mp_roundtime_defuse 60 // 60 minute round-timer for de_ maps +mp_roundtime_hostage 60 +mp_maxmoney 60000 // Money, max allowed +mp_startmoney 60000 // Money, starting amount +mp_freezetime 0 // Disables freezetime +mp_buytime 9999 // Buy anytime +mp_buy_anywhere 1 // Buy anywhere +sv_infinite_ammo 1 // Ammo: infinite +ammo_grenade_limit_total 5 // Ammo: Allows you to hold all types of grenades +sv_grenade_trajectory 1 // Grenade trajectory visible +sv_grenade_trajectory_time 10 // Grenade trajectory time visible +sv_showimpacts 1 // Bullet impacts visible +sv_showimpacts_time 10 // Bullet impacts time visible +sv_alltalk 1 +cl_grenadepreview 1 +// Gives CT all grenades +mp_ct_default_grenades "weapon_flashbang weapon_hegrenade weapon_smokegrenade weapon_incgrenade weapon_decoy" +// Gives T all grenades +mp_t_default_grenades "weapon_flashbang weapon_hegrenade weapon_smokegrenade weapon_molotov weapon_decoy" +mp_halftime_duration 0 +mp_join_grace_time 30 +mp_respawnwavetime_ct 1 +mp_respawnwavetime_t 1 +mp_friendlyfire 0 +mp_free_armor 2 +mp_respawn_on_death_ct 1 // Respawn CT after death immediately +mp_respawn_on_death_t 1 // Respawn T after death immediately +mp_death_drop_gun 1 // Allow to pick up wepon after somebody's death +mp_death_drop_c4 1 // Allow to pick up C4 after planter's death +mp_death_drop_defuser 1 // Allow to pick up defuse kit after somebody's death +mp_death_drop_grenade 5 // How many grenades will drop after somebody's death +mp_solid_teammates 1 +mp_c4timer 9999 +mp_ignore_round_win_conditions 1 + +bind mouse3 noclip +bind i sv_rethrow_last_grenade +bind leftarrow "cl_sim_grenade_trajectory 10" +bind rightarrow cast_ray +bind uparrow bot_place +alias nades "give weapon_hegrenade;give weapon_flashbang;give weapon_smokegrenade;give weapon_incgrenade;give weapon_molotov;give weapon_decoy" +bot_knives_only +bot_stop 1 +bot_kick // Kicks bots +mp_warmup_end // Ends warmup +mp_restartgame 1 // Restarts the game +bot_add + +echo "" +echo "" +echo "" +echo "PRACTICE CONFIG LOADED" +echo "" +echo "" +echo "" diff --git a/home/.local/share/Steam/steamapps/common/Left 4 Dead 2/left4dead2/cfg/autoexec.cfg b/home/.local/share/Steam/steamapps/common/Left 4 Dead 2/left4dead2/cfg/autoexec.cfg new file mode 100755 index 0000000..d5e408d --- /dev/null +++ b/home/.local/share/Steam/steamapps/common/Left 4 Dead 2/left4dead2/cfg/autoexec.cfg @@ -0,0 +1,121 @@ +// LAUNCH OPTIONS + +// -novid -nojoy -freq 144 + +echo "" +echo "" +echo "autoexec.cfg starting" +echo "" +echo "" + +//Rates +rate 786432 +cl_cmdrate "128" +cl_updaterate "128" +cl_interp "0" +cl_interp_ratio "1" +cl_lagcompensation "1" +cl_predictweapons "1" //Skip waiting for server feedback and perform client side prediction of weapon effects + +//Audio +snd_mixahead "0.05" +volume "0.4" +voice_scale "1" +dsp_enhance_stereo 0 # Disable DSP sound effects. You may want to leave this on, if you find it does not interfere with your perception of the sound effects. +snd_pitchquality 1 # Use high quality sounds + + +//Video +muzzleflash_light 0 +mat_monitorgamma "2.6" +mat_monitorgamma_tv_enabled "0" //Turn off TV Mode for less off-set light +mat_queue_mode "-1" +r_dynamic "0" +r_eyemove "0" // No Eye Movement. +r_eyeshift_x "0" // No Eye Movement X-Angel. +r_eyeshift_y "0" // No Eye Movement Y-Angel. +r_eyeshift_z "0" // No Eye Movement Z-Angel. +r_eyesize "0" // Smaller Eyes. + + +//Mouse +sensitivity "1.0" +m_rawinput "1" +m_customaccel "0" +m_mouseaccel1 "0" +m_mouseaccel2 "0" + + +//Other Binds +bind mwheelup +jump +bind mwheeldown +jump +bind "mouse5" +voicerecord +bind "f1" "toggleconsole" + +//Default Binds +bind "SPACE" "+jump" +//Quick Switch +bind q qs1 +alias qs1 "slot2; slot1; bind q qs2" +alias qs2 "slot1; slot2; bind q qs1" +bind 1 "slot1; bind q qs2" +bind 2 "slot2; bind q qs1" +bind 3 "slot3; bind q qs1" +bind 4 "slot4; bind q qs1" +bind 5 "slot5; bind q qs1" +bind "6" "slot6" +bind "7" "slot7" +bind "8" "slot8" +bind "9" "slot9" +bind "0" "slot10" +bind ctrl "+duck" +bind "mouse1" "+attack" +bind "mouse2" "+attack2" +bind "mouse3" "+zoom" +bind a +moveleft +bind d +moveright +bind w +forward +bind s +back +bind "SHIFT" +speed +bind y "messagemode" +bind u messagemode2 +bind r +reload +bind "TAB" +showscores +bind m teammenu +bind k callvote +bind e +use + +//Misc +con_enable "1" +cl_forcepreload "1" +cl_downloadfilter "nosounds" +cl_autohelp "0" +cl_showhelp "0" +hud_takesshots "0" + +adsp_debug "0" +cl_clearhinthistory "1" +cl_detail_avoid_force "0" +cl_detail_avoid_radius "0" +cl_detail_avoid_recover_speed "0" +cl_detail_max_sway "0" +func_break_max_pieces "0" +mat_hdr_enabled "0" + +//Scoreboard and netgraph combined +net_graph "1" +net_graphheight 0 +net_graphproportionalfont .5 +cl_showfps 0 + +//Quick-switch +alias "+knife" "slot2" +alias "-knife" "slot1" +bind "mouse4" "+knife" + +host_writeconfig +echo "" +echo "" +echo "autoexec.cfg loaded, GLHF" +echo "" +echo "" diff --git a/home/.local/share/applications/mail.desktop b/home/.local/share/applications/mail.desktop new file mode 100644 index 0000000..d8d5e84 --- /dev/null +++ b/home/.local/share/applications/mail.desktop @@ -0,0 +1,19 @@ +[Desktop Entry] +Version=1.0 +Name=aerc + +GenericName=Mail Client +Comment=Launches the aerc email client +Keywords=Email,Mail,IMAP,SMTP +Categories=Office;Network;Email;ConsoleOnly + +Type=Application +Icon=utilities-terminal +Terminal=true +Exec=aerc + +[Desktop Action compose] +# enable as default mailto: handler using +# xdg-mime default aerc.desktop x-scheme-handler/mailto +Exec=aerc %u +MimeType=x-scheme-handler/mailto; diff --git a/home/.local/share/applications/mimeapps.list b/home/.local/share/applications/mimeapps.list new file mode 120000 index 0000000..26be7e8 --- /dev/null +++ b/home/.local/share/applications/mimeapps.list @@ -0,0 +1 @@ +../../../.config/mimeapps.list
\ No newline at end of file diff --git a/home/.local/share/gnupg/gpg-agent.conf b/home/.local/share/gnupg/gpg-agent.conf new file mode 100644 index 0000000..0826efe --- /dev/null +++ b/home/.local/share/gnupg/gpg-agent.conf @@ -0,0 +1,8 @@ +max-cache-ttl 60480000 +default-cache-ttl 60480000 +allow-preset-passphrase +enable-ssh-support +default-cache-ttl-ssh 60480000 +max-cache-ttl-ssh 60480000 +pinentry-program /usr/bin/pinentry-curses +allow-loopback-pinentry diff --git a/home/.local/share/gnupg/gpg.conf b/home/.local/share/gnupg/gpg.conf new file mode 100644 index 0000000..915882c --- /dev/null +++ b/home/.local/share/gnupg/gpg.conf @@ -0,0 +1,9 @@ +personal-digest-preferences SHA512 +cert-digest-algo SHA512 +default-preference-list SHA512 SHA384 SHA256 SHA224 AES256 AES192 AES CAST5 ZLIB BZIP2 ZIP Uncompressed +personal-cipher-preferences TWOFISH CAMELLIA256 AES 3DES + +keyserver-options auto-key-retrieve + +keyid-format 0xlong +with-fingerprint diff --git a/home/.local/share/gnupg/sshcontrol b/home/.local/share/gnupg/sshcontrol new file mode 100644 index 0000000..f298fde --- /dev/null +++ b/home/.local/share/gnupg/sshcontrol @@ -0,0 +1,15 @@ +# List of allowed ssh keys. Only keys present in this file are used +# in the SSH protocol. The ssh-add tool may add new entries to this +# file to enable them; you may also add them manually. Comment +# lines, like this one, as well as empty lines are ignored. Lines do +# have a certain length limit but this is not serious limitation as +# the format of the entries is fixed and checked by gpg-agent. A +# non-comment line starts with optional white spaces, followed by the +# keygrip of the key given as 40 hex digits, optionally followed by a +# caching TTL in seconds, and another optional field for arbitrary +# flags. Prepend the keygrip with an '!' mark to disable it. + +91191A4A6E86279A901A7D38A7512EC126518FA5 +22747ABA1B4502F186654CD84DC353B0C3BD353F +9F3FCCA0F99AE1C5D05B834F0E89C79970A7B74A +5E9259E1EFFFB85520F62A5C31C97033C1DEDBD8 diff --git a/home/.pam_environment b/home/.pam_environment new file mode 100644 index 0000000..806faf7 --- /dev/null +++ b/home/.pam_environment @@ -0,0 +1,2 @@ +GNUPGHOME DEFAULT=@{HOME}/.local/share/gnupg +XDG_CONFIG_HOME DEFAULT=@{HOME}/.config diff --git a/home/.profile b/home/.profile new file mode 100755 index 0000000..2550836 --- /dev/null +++ b/home/.profile @@ -0,0 +1,24 @@ +# ~/.profile: executed by the command interpreter for login shells. +# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login +# exists. +# see /usr/share/doc/bash/examples/startup-files for examples. +# the files are located in the bash-doc package. + +# the default umask is set in /etc/profile; for setting the umask +# for ssh logins, install and configure the libpam-umask package. +#umask 022 + +# shellcheck source=/dev/null +[ -r ~/.config/sh/envrc ] && . ~/.config/sh/envrc + +if [ ! "$DISPLAY" ] && [ "$XDG_VTNR" = "1" ]; then + ifexists sx +fi + +if [ "$BASH" ]; then + safesource ~/.bashrc +elif [ "$ZSH_VERSION" ]; then + safesource "$XDG_CONFIG_HOME"/zsh/.zshrc +else + safesource "$XDG_CONFIG_HOME"/sh/shinit +fi diff --git a/home/.ssh/config b/home/.ssh/config new file mode 100644 index 0000000..cff0eae --- /dev/null +++ b/home/.ssh/config @@ -0,0 +1,31 @@ +# Ensure KnownHosts are unreadable if leaked - it is otherwise easier to know which hosts your keys have access to. +HashKnownHosts yes +# Host keys the client accepts - order here is honored by OpenSSH +HostKeyAlgorithms ssh-ed25519-cert-v01@openssh.com,ssh-rsa-cert-v01@openssh.com,ssh-ed25519,ssh-rsa,ecdsa-sha2-nistp521-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp521,ecdsa-sha2-nistp384,ecdsa-sha2-nistp256 + +KexAlgorithms curve25519-sha256@libssh.org,ecdh-sha2-nistp521,ecdh-sha2-nistp384,ecdh-sha2-nistp256,diffie-hellman-group-exchange-sha256 +# MACs hmac-sha2-512-etm@openssh.com,hmac-sha2-256-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-512,hmac-sha2-256,umac-128@openssh.com +Ciphers chacha20-poly1305@openssh.com,aes256-gcm@openssh.com,aes128-gcm@openssh.com,aes256-ctr,aes192-ctr,aes128-ctr + +Compression no +ControlMaster auto +ControlPersist 10 +# ControlPath ~/.ssh/sockets/socket-%r@%h:%p +AddressFamily inet +ServerAliveInterval 120 + +Match host * exec "gpg-connect-agent UPDATESTARTUPTTY /bye" + +IdentityFile ~/.ssh/nym.pub +IdentitiesOnly yes + +Host personal + Hostname github.com + IdentityFile ~/.ssh/personal.pub + +Host work + Hostname github.com + IdentityFile ~/.ssh/work.pub + +Host git.strisemarx.com + Hostname mandibles.wg diff --git a/home/.ssh/nym.pub b/home/.ssh/nym.pub new file mode 100644 index 0000000..4acc08f --- /dev/null +++ b/home/.ssh/nym.pub @@ -0,0 +1 @@ +ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCnm7KQ5pbBB2v1+OUwJRqIOcCnkIGNG4PQI9zbFpr2racWSrO67iMljqu+On4uSBatUhgYpXZVo5E9w+4/nOjgN6DxYvrPWnEtuvTltNqhUGk4LQvho0haCauSQvlJ6h5gc3YYhKG2Busnp/IZiRtu9LRKofEDuOxUEeoc8t9154O3iG50IzcEQf9QvGBHC8tppOAd/0CMlVDhZjbDdtJv3j7oH9sFmdVXDXgbjAmbsiBM9elE+xqDHkvkwx+gQFeCQ9DM8NyBhoAu2vHhj4N/N+7nSLCKB+rZlE738hrNIPWmL/1ffl3jbCeyIxsu45p/RvfJOcFJIXKPHIDyA/X6fTo3OAWEUNWF6bDL1QkUPJGTngoiVwYnwPH6wIZg7k0YOjpjy2THgOMsOT57ac9/WSFcQOyUeku7v1RD1VYsqFht7hV6KdiTbaZqTF77THHS5T+xOumC/catB1JsZamyMzI6VBnTJJt5PdYAt8ek9BBATzEdv0gvq7dCOHyd2BKWQYQEWHTUeGr3WU9V3AS4Zp4SFG8gZeJjbvL+HeKM02WP7vPA8xhg5K0cYgcgm1fhhwZ4XdjNj7ttCfDHCkCnD9vwzdF7na5HD86dY2Xs8XB9G7vGqnH6BUGkhJHyEAgwBEe3zJJ0KQc301JKpsFdF27quN6tH3bJyeAuRP8WUQ== openpgp:0x31676BC0 diff --git a/home/.ssh/personal.pub b/home/.ssh/personal.pub new file mode 100644 index 0000000..32849b0 --- /dev/null +++ b/home/.ssh/personal.pub @@ -0,0 +1 @@ +ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCw+Qm8kc4L6oRJVtLRmmFXVFsMLuNGixBl6ahZBjNRFmpEtcFqBBlNR4QaldkMlUrWYDynnp8dcaN6Fdkb03zEnfxpWg0QZOa2LmoJpM2r46/9mFdjicYTCAMx1zomabZDZxAQ3bnSpw5d9tAQyZbMxvJlsW3jeScSbEQJR8wyWQqk5PQEELb190lL65CvFQDGSvosVZFqju/QEUle7EzxuhJxY/hKyeFwsZm0jn98VHKDCNpn6SLVnLQhkpul6vd9OFD6BGr2ehN3ayHtPsY2GQEQiHXUuAa78KERX0W5sL7UTkgCdAin6DBUFZabY30/FNU8Sqkk2wgjuSTtvZBmvOc51kOA+tzb1zOFP7WMF268gT3WGYg9NnSPVn8bqMNE2ZC3BgRt4nciLEDU1OAEQ0J6WewwuyK4X8XJqcJMkL2LNrVJRE2CW3Fwedh+DE+bYmUserjYYyuGbNY+jFxSVMtmsnAra5Zeq/p3OjwzbRf01U2TNjVEQPLE5i1ejr+qrXTmi2RH+aR8ZyD2ZaWbc2fkBK548LniAqt8R1t+n365SVr6ojaq97oMDVO5b8xC3dO9FWehxjhRy1ayIKPgiM/AMTzEa5Uqf0PdQCvGjmW8NVAW2AjNJLYv8JgfZe6lBkiQAT9TPjkmNuSNPBQl3LVag1KPKI3FQiav+UwEaw== openpgp:0x6678C054 diff --git a/home/.ssh/work.pub b/home/.ssh/work.pub new file mode 100644 index 0000000..aa0d3b6 --- /dev/null +++ b/home/.ssh/work.pub @@ -0,0 +1 @@ +ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDhfwkHIrYzXq+95pRlmnqJZ9w/I8kl1zoNpulnSjh3Yyiy2hVLy6fktdpNZ3nRX/O+54W9SmGL+1ww9ERmmDtZHIdVoi3CIOE7/LiZoUgATPlWtebTag+LwPN8/893783kbaGqcCyb2G58nAYDU/0EnvHknbaFLlEVmmWoDKW4QPHO5+YFKLoroNyKSEn0ZdbdZindAN97d2Wi/hHG+RwaUT5t69/oYZYVklP7G4MLZZdyW4bEpQlRIADl6E3zjsYbCPYmW5Vhjjjz8zTUOLbFd+0DVnUEu4nVpjjOaP2zm+H5OKIXA+mSQZsGjMEX7S57VI4psEPFVHa+cdItyx0AAYKgx8/9kB+4ugiCsZXa6Ctie0UVpOjEIxfygiAb4H6mdiCtIkYUJvejTD7vC72qdGjkVWB1gev1Vvk5meQBTQEWm8HUGl0Y+1BlU3u9EG4XJxhptwZt7qoGtmHGvvUduPWfr4Kf5JiCCf3CNOY1ozkxVrMb+tBqpl3EK6EySeXwbwhRG4O5icXrZZE1Fq4MHPH0JS+qAs8FbMO/orQdvRqPCagJZJ3eHN++a+tZY6yR123uP7VOSc1DpGmo772JfuifnjGwsIA/t31/05aTSTERrh0XJbQhB2diDZC3cjTOxbvXbIpEsUqkY6p6014SmPVP7z0xOvC/LuWZ1DdLEQ== openpgp:0xD2F10F35 diff --git a/home/.urlview b/home/.urlview new file mode 100644 index 0000000..cd65a9e --- /dev/null +++ b/home/.urlview @@ -0,0 +1,33 @@ +############################################################################### +# Urlview configuration file. +# man urlview <Man page> +# +# Put this file in: $HOME/.urlview +# Put url_handler.sh in: /usr/bin +# +# You can call 'urlview' while in 'mutt' by pressing the Ctrl b keys. +# Put these macros in your $HOME/.muttrc file. +# +# macro index \cb |urlview\n +# macro pager \cb |urlview\n +# +# You can call 'urlview' while in 'tin' by pressing | then a for article, +# put urlview as the pipe command. +# +# Regular expression to use to match URLs. + +#REGEXP (((http|https|ftp|gopher)|mailto):(//)?[^ >"\t]*|www\.[-a-z0-9.]+)[^ .,;\t>">\):] +REGEXP (((http|https|ftp|gopher|magnet|acestream)|mailto)[.:][^ >"\t]*|www\.[-a-z0-9.]+)[^ .,;\t>">\):] + +# Command to invoke for selected URL. Use lynx, netscape, or url_handler.sh +# shell script. Alternatively, you can leave COMMAND unset and set the BROWSER +# environment variable instead. + +#COMMAND lynx %s +#COMMAND netscape -remote 'openURL(%s)' +# COMMAND url_handler.sh +COMMAND linkhandler + + +# Quit urlview after launch +# QUITONLAUNCH diff --git a/home/.zprofile b/home/.zprofile new file mode 120000 index 0000000..aa7da3a --- /dev/null +++ b/home/.zprofile @@ -0,0 +1 @@ +.profile
\ No newline at end of file diff --git a/lists/caps2esc.map b/lists/caps2esc.map new file mode 100644 index 0000000..51a7042 --- /dev/null +++ b/lists/caps2esc.map @@ -0,0 +1,2 @@ +keycode 1 = Caps_Lock +keycode 58 = Escape diff --git a/meta/base/PKGBUILD b/meta/base/PKGBUILD new file mode 100644 index 0000000..573e67d --- /dev/null +++ b/meta/base/PKGBUILD @@ -0,0 +1,69 @@ +# Maintainer: Arnold Sommerfeld <arch@strisemarx.com> +pkgname=strisemarx-base +pkgver=28 +pkgrel=1 +pkgdesc="strisemarx's base metapackage" +arch=('any') +url="https://strisemarx.com" +license=('GPL3') +depends=( + 'acpid' + 'base' + 'base-devel' + 'bash-completion' + 'bat' + 'cpupower' + 'dashbinsh' + 'dog' + 'duf' + 'fd' + 'fzf' + 'gdu' + 'git' + 'htop' + 'irqbalance' + 'iwd' + 'jq' + 'lf' + 'libusb-compat' + 'linux-firmware' + 'lsd' + 'lshw' + 'man-db' + 'man-pages' + 'neofetch' + 'neovim' + 'nfs-utils' + 'nmap' + 'ocl-icd' + 'openssh' + 'overdue' + 'pacman-cleanup-hook' + 'pacman-contrib' + 'paru' + 'pass' + 'pbzip2' + 'pigz' + 'pkgstats' + 'procs' + 'qrencode' + 'reflector' + 'ripgrep' + 'rsync' + 'sd' + 'stow' + 'systemd-resolvconf' + 'thermald' + 'tldr' + 'tmux' + 'unzip' + 'wget' + 'wireguard-tools' + 'zsh' + 'zsh-autosuggestions' + 'zsh-completions' + 'zsh-history-substring-search' + 'zsh-syntax-highlighting' +) + +# vim: ts=2 sw=2 et: diff --git a/meta/bt/PKGBUILD b/meta/bt/PKGBUILD new file mode 100644 index 0000000..a303a8b --- /dev/null +++ b/meta/bt/PKGBUILD @@ -0,0 +1,15 @@ +# Maintainer: Arnold Sommerfeld <arch@strisemarx.com> +pkgname=strisemarx-bt +pkgver=3 +pkgrel=1 +pkgdesc="strisemarx's bluetooth metapackage" +arch=('any') +url="https://strisemarx.com" +license=('GPL3') +depends=( + 'bluez' + 'bluez-utils' + 'ell' +) + +# vim: ts=2 sw=2 et: diff --git a/meta/btc/PKGBUILD b/meta/btc/PKGBUILD new file mode 100644 index 0000000..6084c10 --- /dev/null +++ b/meta/btc/PKGBUILD @@ -0,0 +1,19 @@ +# Maintainer: Arnold Sommerfeld <arch@strisemarx.com> +pkgname=strisemarx-btc +pkgver=5 +pkgrel=1 +pkgdesc="strisemarx's btc dev metapackage" +arch=('any') +url="https://strisemarx.com" +license=('GPL3') +depends=( + 'python-bitbox02' + 'python-hidapi' + 'python-hwilib' + 'python-qdarkstyle' + 'sparrow-wallet' + 'tor' + 'zbar' +) + +# vim: ts=2 sw=2 et: diff --git a/meta/cpp/PKGBUILD b/meta/cpp/PKGBUILD new file mode 100644 index 0000000..7f1e7c2 --- /dev/null +++ b/meta/cpp/PKGBUILD @@ -0,0 +1,25 @@ +# Maintainer: Arnold Sommerfeld <arch@strisemarx.com> +pkgname=strisemarx-cpp +pkgver=11 +pkgrel=1 +pkgdesc="strisemarx's cpp metapackage" +arch=('any') +url="https://strisemarx.com" +license=('GPL3') +depends=( + 'ccache' + 'clang' + 'cmake' + 'cmake-format' + 'doxygen' + 'include-what-you-use' + 'inferno' + 'gdb' + 'lld' + 'lldb' + 'mold' + 'ninja' + 'perf' + 'valgrind' +) +# vim: ts=2 sw=2 et: diff --git a/meta/dev/PKGBUILD b/meta/dev/PKGBUILD new file mode 100644 index 0000000..0f3ba5e --- /dev/null +++ b/meta/dev/PKGBUILD @@ -0,0 +1,23 @@ +# Maintainer: Arnold Sommerfeld <arch@strisemarx.com> +pkgname=strisemarx-dev +pkgver=35 +pkgrel=1 +pkgdesc="strisemarx's dev metapackage" +arch=('any') +url="https://strisemarx.com" +license=('GPL3') +depends=( + 'bash-language-server' + 'git-absorb' + 'git-delta' + 'ipython' + 'hyperfine' + 'lua-language-server' + 'namcap' + 'shellcheck' + 'shfmt' + 'sloccount' + 'strace' +) + +# vim: ts=2 sw=2 et: diff --git a/meta/extra/PKGBUILD b/meta/extra/PKGBUILD new file mode 100644 index 0000000..1f564d7 --- /dev/null +++ b/meta/extra/PKGBUILD @@ -0,0 +1,16 @@ +# Maintainer: Arnold Sommerfeld <arch@strisemarx.com> +pkgname=strisemarx-extra +pkgver=15 +pkgrel=1 +pkgdesc="strisemarx's extra metapackage" +arch=('any') +url="https://strisemarx.com" +license=('GPL3') +depends=( + 'gpg-tui' + 'pandoc-bin' + 'syncthing' + 'udisks2' +) + +# vim: ts=2 sw=2 et: diff --git a/meta/fonts/PKGBUILD b/meta/fonts/PKGBUILD new file mode 100644 index 0000000..f035b2a --- /dev/null +++ b/meta/fonts/PKGBUILD @@ -0,0 +1,19 @@ +# Maintainer: Arnold Sommerfeld <arch@strisemarx.com> +pkgname=strisemarx-fonts +pkgver=3 +pkgrel=1 +pkgdesc="strisemarx's fonts metapackage" +arch=('any') +url="https://strisemarx.com" +license=('GPL3') +depends=( + 'noto-fonts-emoji' + 'otf-font-awesome' + 'otf-latinmodern-math' + 'ttf-dejavu' + 'ttf-fira-code' + 'ttf-font-awesome' + 'ttf-noto-nerd' +) + +# vim: ts=2 sw=2 et: diff --git a/meta/gaming/PKGBUILD b/meta/gaming/PKGBUILD new file mode 100644 index 0000000..daf282f --- /dev/null +++ b/meta/gaming/PKGBUILD @@ -0,0 +1,27 @@ +# Maintainer: Arnold Sommerfeld <arch@strisemarx.com> +pkgname=strisemarx-gaming +pkgver=8 +pkgrel=1 +pkgdesc="strisemarx's gaming metapackage" +arch=('any') +url="https://strisemarx.com" +license=('GPL3') +depends=( + 'discord' + 'gamemode' + 'lib32-fontconfig' + 'lib32-gamemode' + 'lib32-systemd' + 'mangohud' + 'steam' + 'steam-native-runtime' + 'ttf-liberation' + 'wqy-zenhei' +) +optdepends=( + 'lutris' + 'proton-ge-custom-bin' + 'supertuxkart' +) + +# vim: ts=2 sw=2 et: diff --git a/meta/intel/PKGBUILD b/meta/intel/PKGBUILD new file mode 100644 index 0000000..b666434 --- /dev/null +++ b/meta/intel/PKGBUILD @@ -0,0 +1,20 @@ +# Maintainer: Arnold Sommerfeld <arch@strisemarx.com> +pkgname=strisemarx-intel +pkgver=5 +pkgrel=1 +pkgdesc="strisemarx's intel metapackage" +arch=('any') +url="https://strisemarx.com" +license=('GPL3') +depends=( + 'intel-gpu-tools' + 'intel-ucode' + 'libvdpau-va-gl' + 'mesa' + 'intel-media-sdk' + 'libva-intel-driver' + 'mesa-vdpau' + 'vulkan-intel' +) + +# vim: ts=2 sw=2 et: diff --git a/meta/mail/PKGBUILD b/meta/mail/PKGBUILD new file mode 100644 index 0000000..942dc65 --- /dev/null +++ b/meta/mail/PKGBUILD @@ -0,0 +1,17 @@ +# Maintainer: Arnold Sommerfeld <arch@strisemarx.com> +pkgname=strisemarx-mail +pkgver=6 +pkgrel=1 +pkgdesc="strisemarx's mail metapackage" +arch=('any') +url="https://strisemarx.com" +license=('GPL3') +depends=( + 'aerc' + 'khal' + 'khard' + 'protonmail-bridge-nogui' + 'vdirsyncer' +) + +# vim: ts=2 sw=2 et: diff --git a/meta/media/PKGBUILD b/meta/media/PKGBUILD new file mode 100644 index 0000000..40f35f9 --- /dev/null +++ b/meta/media/PKGBUILD @@ -0,0 +1,15 @@ +# Maintainer: Arnold Sommerfeld <arch@strisemarx.com> +pkgname=strisemarx-media +pkgver=13 +pkgrel=1 +pkgdesc="strisemarx's media metapackage" +arch=('any') +url="https://strisemarx.com" +license=('GPL3') +depends=( + 'mpv' + 'streamlink' + 'yt-dlp' +) + +# vim: ts=2 sw=2 et: diff --git a/meta/nvidia/PKGBUILD b/meta/nvidia/PKGBUILD new file mode 100644 index 0000000..40e5666 --- /dev/null +++ b/meta/nvidia/PKGBUILD @@ -0,0 +1,21 @@ +# Maintainer: Arnold Sommerfeld <arch@strisemarx.com> +pkgname=strisemarx-nvidia +pkgver=11 +pkgrel=1 +pkgdesc="strisemarx's nvidia metapackage" +arch=('any') +url="https://strisemarx.com" +license=('GPL3') +depends=( + 'nvtop' + 'nvidia-container-toolkit' + 'nvidia-dkms' + 'nvidia-settings' + 'nvidia-utils' + 'lib32-nvidia-utils' + 'libva-vdpau-driver' + 'linux-headers' + 'opencl-nvidia' +) + +# vim: ts=2 sw=2 et: diff --git a/meta/python/PKGBUILD b/meta/python/PKGBUILD new file mode 100644 index 0000000..9a812a4 --- /dev/null +++ b/meta/python/PKGBUILD @@ -0,0 +1,18 @@ +# Maintainer: Arnold Sommerfeld <arch@strisemarx.com> +pkgname=strisemarx-python +pkgver=16 +pkgrel=1 +pkgdesc="strisemarx's python metapackage" +arch=('any') +url="https://strisemarx.com" +license=('GPL3') +depends=( + 'pyright' + 'python-black' + 'python-debugpy' + 'python-pipenv' + 'python-poetry' + 'ruff-lsp' +) + +# vim: ts=2 sw=2 et: diff --git a/meta/sound/PKGBUILD b/meta/sound/PKGBUILD new file mode 100644 index 0000000..609aff4 --- /dev/null +++ b/meta/sound/PKGBUILD @@ -0,0 +1,22 @@ +# Maintainer: Arnold Sommerfeld <arch@strisemarx.com> +pkgname=strisemarx-sound +pkgver=9 +pkgrel=1 +pkgdesc="strisemarx's sound metapackage" +arch=('any') +url="https://strisemarx.com" +license=('GPL3') +depends=( + 'alsa-utils' + 'playerctl' + 'pipewire' + 'pipewire-alsa' + 'pipewire-pulse' + 'pipewire-jack' + 'pulsemixer' +) +optdepends=( + 'noisetorch' +) + +# vim: ts=2 sw=2 et: diff --git a/meta/work/PKGBUILD b/meta/work/PKGBUILD new file mode 100644 index 0000000..21e578a --- /dev/null +++ b/meta/work/PKGBUILD @@ -0,0 +1,31 @@ +# Maintainer: Arnold Sommerfeld <arch@strisemarx.com> +pkgname=strisemarx-work +pkgver=18 +pkgrel=1 +pkgdesc="strisemarx's work dev metapackage" +arch=('any') +url="https://strisemarx.com" +license=('GPL3') +depends=( + 'bear' + 'boost' + 'code-marketplace' + 'compiledb' + 'creduce' + 'cuda' + 'cvise' + 'fortls' + 'fuse-overlayfs' + 'intel-oneapi-dpcpp-cpp' + 'hdf5' + 'llvm' + 'gcc-fortran' + 'meson' + 'nasm' + 'openmp' + 'podman-docker' + 'qemu-user-static' + 'qemu-user-static-binfmt' + 'xdot' +) +# vim: ts=2 sw=2 et: diff --git a/meta/x-base/PKGBUILD b/meta/x-base/PKGBUILD new file mode 100644 index 0000000..5d51f7d --- /dev/null +++ b/meta/x-base/PKGBUILD @@ -0,0 +1,20 @@ +# Maintainer: Arnold Sommerfeld <arch@strisemarx.com> +pkgname=strisemarx-x-base +pkgver=4 +pkgrel=1 +pkgdesc="strisemarx's Xorg base metapackage" +arch=('any') +url="https://strisemarx.com" +license=('GPL3') +depends=( + 'sx' + 'unclutter-xfixes-git' + 'xclip' + 'xorg-xinput' + 'xorg-xmodmap' + 'xorg-xrandr' + 'xorg-xrdb' + 'xorg-xsetroot' +) + +# vim: ts=2 sw=2 et: diff --git a/meta/x-de/PKGBUILD b/meta/x-de/PKGBUILD new file mode 100644 index 0000000..5d2f6ba --- /dev/null +++ b/meta/x-de/PKGBUILD @@ -0,0 +1,32 @@ +# Maintainer: Arnold Sommerfeld <arch@strisemarx.com> +pkgname=strisemarx-x-de +pkgver=13 +pkgrel=1 +pkgdesc="strisemarx's DE metapackage" +arch=('any') +url="https://strisemarx.com" +license=('GPL3') +depends=( + 'alacritty' + 'bspwm-git' + 'dunst' + 'feh' + 'i3lock-fancy-rapid-git' + 'libnotify' + 'perl-file-mimeinfo' + 'polybar' + 'qt5ct' + 'rofi' + 'rofimoji' + 'scrot' + 'sxhkd-git' + 'sxiv' + 'xdg-user-dirs' + 'xdotool' + 'xorg-xdpyinfo' + 'xorg-xev' + 'xorg-xwininfo' + 'zbar' +) + +# vim: ts=2 sw=2 et: diff --git a/meta/x-extra/PKGBUILD b/meta/x-extra/PKGBUILD new file mode 100644 index 0000000..8ee50b9 --- /dev/null +++ b/meta/x-extra/PKGBUILD @@ -0,0 +1,21 @@ +# Maintainer: Arnold Sommerfeld <arch@strisemarx.com> +pkgname=strisemarx-x-extra +pkgver=22 +pkgrel=1 +pkgdesc="strisemarx's Xorg apps metapackage" +arch=('any') +url="https://strisemarx.com" +license=('GPL3') +depends=( + 'arkenfox-user.js' + 'chromium' + 'librewolf' + 'libfido2' + 'libreoffice-still' + 'okular' + 'torbrowser-launcher' + 'zathura' + 'zathura-pdf-mupdf' +) + +# vim: ts=2 sw=2 et: |