diff options
| author | Peter Son Struschka <me@peter-struschka.com> | 2020-08-30 20:56:36 +0800 |
|---|---|---|
| committer | Peter Son Struschka <me@peter-struschka.com> | 2020-08-30 20:58:04 +0800 |
| commit | 37dd411698bd6eae8365260dde39b8ae9c7cbd36 (patch) | |
| tree | 978dd6ea3e72a86e4a3e0314b86d5137fc394785 | |
| parent | a1d6fc2f3e6ab041cc51cb085ac59a646a126d25 (diff) | |
| download | dotfiles-37dd411698bd6eae8365260dde39b8ae9c7cbd36.tar.gz dotfiles-37dd411698bd6eae8365260dde39b8ae9c7cbd36.tar.bz2 dotfiles-37dd411698bd6eae8365260dde39b8ae9c7cbd36.tar.lz dotfiles-37dd411698bd6eae8365260dde39b8ae9c7cbd36.tar.xz dotfiles-37dd411698bd6eae8365260dde39b8ae9c7cbd36.tar.zst dotfiles-37dd411698bd6eae8365260dde39b8ae9c7cbd36.zip | |
all: overhaul, move dotfile specifics to .local/share/dotfiles and more
71 files changed, 1470 insertions, 185 deletions
diff --git a/basics/.config/alacritty/alacritty.yml b/basics/.config/alacritty/alacritty.yml index e84f5f4..ee87a85 100644 --- a/basics/.config/alacritty/alacritty.yml +++ b/basics/.config/alacritty/alacritty.yml @@ -50,8 +50,8 @@ window: # - Fullscreen startup_mode: Maximized - # Window title - #title: Alacritty + # Window terminal applications to change Alacritty's window title. + dynamic_title: true # Window class (Linux/BSD only): #class: @@ -198,31 +198,46 @@ colors: - { index: 20, color: '0xbdae93' } - { index: 21, color: '0xebdbb2' } -# Visual Bell +# Bell # -# Any time the BEL code is received, Alacritty "rings" the visual bell. Once -# rung, the terminal background will be set to white and transition back to the -# default background color. You can control the rate of this transition by -# setting the `duration` property (represented in milliseconds). You can also -# configure the transition function by setting the `animation` property. -# -# Values for `animation`: -# - Ease -# - EaseOut -# - EaseOutSine -# - EaseOutQuad -# - EaseOutCubic -# - EaseOutQuart -# - EaseOutQuint -# - EaseOutExpo -# - EaseOutCirc -# - Linear -# -# Specifying a `duration` of `0` will disable the visual bell. -visual_bell: - animation: EaseOutExpo - duration: 0 - color: '0xffffff' +# The bell is rung every time the BEL control character is received. +#bell: + # Visual Bell Animation + # + # Animation effect for flashing the screen when the visual bell is rung. + # + # Values for `animation`: + # - Ease + # - EaseOut + # - EaseOutSine + # - EaseOutQuad + # - EaseOutCubic + # - EaseOutQuart + # - EaseOutQuint + # - EaseOutExpo + # - EaseOutCirc + # - Linear + #animation: EaseOutExpo + + # Duration of the visual bell flash. A `duration` of `0` will disable the + # visual bell animation. + #duration: 0 + + # Visual bell animation color. + #color: '#ffffff' + + # Bell Command + # + # This program is executed whenever the bell is rung. + # + # When set to `command: None`, no command will be executed. + # + # Example: + # command: + # program: notify-send + # args: ["Hello, World!"] + # + #command: None # Background opacity # @@ -286,9 +301,6 @@ selection: # When set to `true`, selected text will be copied to the primary clipboard. save_to_clipboard: false -# Allow terminal applications to change Alacritty's window title. -dynamic_title: true - cursor: # Cursor style # diff --git a/basics/.config/bat/config b/basics/.config/bat/config new file mode 100644 index 0000000..c4144ab --- /dev/null +++ b/basics/.config/bat/config @@ -0,0 +1,27 @@ +# 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="ansi-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="--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" + +--style="numbers,changes" diff --git a/basics/.config/dunst/dunstrc b/basics/.config/dunst/dunstrc index 74f0525..80c3445 100644 --- a/basics/.config/dunst/dunstrc +++ b/basics/.config/dunst/dunstrc @@ -29,7 +29,7 @@ # 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-10+80" + geometry = "300x5-30+20" # Show how many messages are currently hidden (because of geometry). indicate_hidden = yes @@ -80,7 +80,8 @@ # 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. - # Transient notifications ignore this setting. + # 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 ### @@ -99,7 +100,7 @@ # <u>underline</u> # # For a complete reference see - # <http://developer.gnome.org/pango/stable/PangoMarkupFormat.html>. + # <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 @@ -131,6 +132,10 @@ # 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. @@ -140,17 +145,17 @@ # geometry. word_wrap = yes - # When word_wrap is set to no, specify where to ellipsize long lines. + # 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 - # Merge multiple notifications with the same content + # Stack together notifications with the same content stack_duplicates = true - # Hide the count of merged notifications with the same content + # Hide the count of stacked notifications with the same content hide_duplicate_count = false # Display indicators for URLs (U) and actions (A). @@ -159,13 +164,18 @@ ### Icons ### # Align icons left/right/off - icon_position = off + icon_position = left + + # Scale small icons up to this size, set to 0 to disable. Helpful + # for e.g. small files or high-dpi screens. In case of conflict, + # max_icon_size takes precedence over this. + min_icon_size = 0 # Scale larger icons down to this size, set to 0 to disable max_icon_size = 32 # Paths to default icons. - icon_path = /usr/share/icons/gnome/16x16/status/:/usr/share/icons/gnome/16x16/devices/ + icon_path = /usr/share/icons/gnome/16x16/status/:/usr/share/icons/gnome/16x16/devices/:/usr/share/icons/hicolor/scalable/apps/:/usr/share/icons/hicolor/32x32/apps:/usr/share/icons/hicolor/22x22/apps/ ### History ### @@ -182,7 +192,7 @@ dmenu = /usr/bin/dmenu -p dunst: # Browser for opening urls in context menu. - browser = /usr/bin/firefox -new-tab + browser = /usr/bin/firefox-developer-edition -new-tab # Always run rule-defined scripts, even if the notification is suppressed always_run_script = true @@ -198,6 +208,28 @@ # automatically after a crash. startup_notification = false + # Manage dunst's desire for talking + # Can be one of the following values: + # crit: Critical features. Dunst aborts + # warn: Only non-fatal warnings + # mesg: Important Messages + # info: all unimportant stuff + # debug: all less than unimportant stuff + verbosity = mesg + + # Define the corner radius of the notification window + # in pixel size. If the radius is 0, you have no rounded + # corners. + # The radius will be automatically lowered if it exceeds half of the + # notification height to avoid clipping text and/or icons. + corner_radius = 0 + + # Ignore the dbus closeNotification message. + # Useful to enforce the timeout set by dunst configuration. Without this + # parameter, an application may close the notification sent before the + # user defined timeout. + ignore_dbusclose = false + ### Legacy # Use the Xinerama extension instead of RandR for multi-monitor support. @@ -210,6 +242,21 @@ # 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] @@ -218,7 +265,7 @@ # 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 + per_monitor_dpi = true [shortcuts] @@ -268,11 +315,36 @@ # 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", "summary", "body", "icon", "category", -# "msg_urgency" and you can override the "timeout", "urgency", "foreground", -# "background", "new_icon" and "format". +# +# 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. @@ -285,6 +357,30 @@ # 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 @@ -303,6 +399,11 @@ # 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*" @@ -323,4 +424,8 @@ # summary = *twitter.com* # urgency = normal # +#[stack-volumes] +# appname = "some_volume_notifiers" +# set_stack_tag = "volume" +# # vim: ft=cfg diff --git a/basics/.config/npm/npmrc b/basics/.config/npm/npmrc index 3691078..d072ac3 100644 --- a/basics/.config/npm/npmrc +++ b/basics/.config/npm/npmrc @@ -3,3 +3,6 @@ cache=${XDG_CACHE_HOME}/npm tmp=${XDG_RUNTIME_DIR}/npm init-module=${XDG_CONFIG_HOME}/npm/config/npm-init.js + +sign-git-tag=false + diff --git a/basics/.config/user-dirs.dirs b/basics/.config/user-dirs.dirs new file mode 100644 index 0000000..b564655 --- /dev/null +++ b/basics/.config/user-dirs.dirs @@ -0,0 +1,8 @@ +XDG_DESKTOP_DIR="$HOME/Desktop" +XDG_DOCUMENTS_DIR="$HOME/Documents" +XDG_DOWNLOAD_DIR="$HOME/Downloads" +XDG_MUSIC_DIR="$HOME/Documents/Music" +XDG_PICTURES_DIR="$HOME/Documents/Pictures" +XDG_PUBLICSHARE_DIR="$HOME/Public" +XDG_TEMPLATES_DIR="$HOME/Templates" +XDG_VIDEOS_DIR="$HOME/Documents/Videos" diff --git a/basics/.local/bin/battery-monitor b/basics/.local/bin/battery-monitor index 1dfa7b6..cfcd41c 100755 --- a/basics/.local/bin/battery-monitor +++ b/basics/.local/bin/battery-monitor @@ -12,30 +12,28 @@ cap=$([ "$state" = "Charging" ] && printf "%d-%d\n" "${max}" "${now}" | bc || ec remaining=$( printf "%d/%d\n" "${cap}" "${volt}" | bc -l ) current_rate=$( printf "%d/%d\n" "${rate}" "${volt}" | bc -l ) -echo $( [ "${current_rate}" != "0" ] && echo "not zero" || echo "is zero" ) +#echo $( [ "${current_rate}" != "0" ] && echo "not zero" || echo "is zero" ) seconds=$( [ "${current_rate}" != "0" ] && printf "3600*%f/%f\n" "${remaining}" "${current_rate}" | bc || echo "0") time_remaining=$( date -ud "@${seconds}" "+%H:%M:%S" ) -echo "percentage ${percentage}%" -echo "state ${state}" -echo "rate ${rate}" -echo "volt ${volt}" -echo "now ${now}" -echo "max ${max}" -echo "cap ${cap}" -echo "remaining ${remaining}" -echo "current_rate ${current_rate}" -echo "seconds ${seconds}" -echo "time ${time_remaining}" +#echo "percentage ${percentage}%" +#echo "state ${state}" +#echo "rate ${rate}" +#echo "volt ${volt}" +#echo "now ${now}" +#echo "max ${max}" +#echo "cap ${cap}" +#echo "remaining ${remaining}" +#echo "current_rate ${current_rate}" +#echo "seconds ${seconds}" +#echo "time ${time_remaining}" -exit 0 battery_level=`acpi -b | cut -d ' ' -f 4 | grep -o '[0-9]*'` battery_level=$(head -n1 /sys/class/power_supply/BAT0/capacity) battery_state=$(acpi | grep 'Battery' | sed 's/Battery\s[0-9]*: //' | sed 's/, [0-9][0-9]*\%.*//') battery_state=$(head -n1 /sys/class/power_supply/BAT0/status) battery_remaining=$(acpi | grep -oh '[0-9:]* remaining' | sed 's/:\w\w remaining$/ Minutes/' | sed 's/00://' | sed 's/:/h /') -kk if [ ! -f "/tmp/.battery" ]; then echo "$battery_level" > /tmp/.battery @@ -43,31 +41,31 @@ if [ ! -f "/tmp/.battery" ]; then exit fi -previous_battery_level=$(cat /tmp/.battery | head -n 1) -previous_battery_state=$(cat /tmp/.battery | tail -n 1) +previous_battery_level=$(head -n 1 < /tmp/.battery) +previous_battery_state=$(tail -n 1 < /tmp/.battery) echo "$battery_level" > /tmp/.battery echo "$battery_state" >> /tmp/.battery checkBatteryLevel() { - if [ $battery_state != "Discharging" ] || [ "${battery_level}" == "${previous_battery_level}" ]; then + if [ "$battery_state" != "Discharging" ] || [ "${battery_level}" = "${previous_battery_level}" ]; then exit fi - if [ $battery_level -le 4 ]; then + if [ "$battery_level" -le 4 ]; then sudo systemctl suspend - elif [ $battery_level -le 7 ]; then + elif [ "$battery_level" -le 7 ]; then notify-send "Low Battery" "(${time_remaining}) Your computer will suspend soon unless plugged into a power outlet." -u critical - elif [ $battery_level -le 10 ]; then + elif [ "$battery_level" -le 10 ]; then notify-send "Low Battery" "${battery_level}% (${time_remaining}) of battery remaining." -u normal fi } checkBatteryStateChange() { - if [ "$battery_state" != "Discharging" ] && [ "$previous_battery_state" == "Discharging" ]; then + if [ "$battery_state" != "Discharging" ] && [ "$previous_battery_state" = "Discharging" ]; then notify-send "Charging" "Battery is now plugged in." -u low fi - if [ "$battery_state" == "Discharging" ] && [ "$previous_battery_state" != "Discharging" ]; then + if [ "$battery_state" = "Discharging" ] && [ "$previous_battery_state" != "Discharging" ]; then notify-send "Power Unplugged" "Your computer has been disconnected from power." -u low fi } diff --git a/basics/.local/bin/dmenu_pass b/basics/.local/bin/dmenu_pass new file mode 100755 index 0000000..02250be --- /dev/null +++ b/basics/.local/bin/dmenu_pass @@ -0,0 +1,5 @@ +#!/bin/sh + +prompt=${1:-Password} + +dmenu -P -p "$prompt" <&- diff --git a/basics/.local/bin/locate-config b/basics/.local/bin/locate-config index 26fd2cb..2f8dc3d 100755 --- a/basics/.local/bin/locate-config +++ b/basics/.local/bin/locate-config @@ -2,11 +2,11 @@ set -e -config_dir="$HOME/.local/share/config-files" +config_dir="$HOME/.local/share/dotfiles/edit-config.d" p="Config:" -sel=$(find "$config_dir" -writable -type l | cut -d "/" -f 7- | sort -d | dmenu -p "$p" -l 20) +sel=$(find "$config_dir" -writable -type l | cut -d "/" -f 8- | sort -d | dmenu -p "$p" -l 20) ec=$? [ "$ec" -ne 0 ] && exit $ec diff --git a/basics/.local/bin/statusbar/cpu b/basics/.local/bin/statusbar/cpu new file mode 100755 index 0000000..6a89024 --- /dev/null +++ b/basics/.local/bin/statusbar/cpu @@ -0,0 +1,54 @@ +#!/bin/bash + +# TODO: finish it + +# /proc/stat format: +# cpu[n] user nice system idle iowait irq softirq steal guest guest_nice + +# format user nice system idle steal total +# total = user + nice + system + idle + steal +prevstat=$(awk ' +/^cpu[0-9]+/ {print $2, $3, $4, $5, $9, ($2 + $3 + $4 + $5 + $9)}' /proc/stat) + +sleep 0.5 + + +stat=$(awk ' +/^cpu[0-9]+/ {print $2, $3, $4, $5, $9, ($2 + $3 + $4 + $5 + $9)}' /proc/stat) + + +num_cpu=$(echo "$stat" | wc -l) + +get_load() { + line=${1:-1} + last=$(echo "$stat" | sed "${line}q;d") + prev=$(echo "$prevstat" | sed "${line}q;d") + read -r u n s last_idle st last_total <<< "$last" + #echo "$u $n $s $last_idle $st $last_total" + read -r u n s prev_idle st prev_total <<< "$prev" + #echo "$u $n $s $prev_idle $st $prev_total" + diff=$(echo "$last_total $prev_total" | awk '{printf "%d", $1 - $2}') + [ "$diff" = "0" ] && return + percentage=$(echo "$diff $last_idle $prev_idle" | awk '{printf "%.2f", 100.0 * (($1 - ($2 - $3)) / $1)}') + echo -e "$percentage" +} + +total_load=0 + +for i in $(seq 1 "$num_cpu"); do + load=$(get_load "$i") + total_load=$(echo "$total_load $load" | awk '{printf "%.2f", $1 + $2}') +done + +total_percentage=$(echo "$total_load $num_cpu" | awk '{printf "%.2f", ($1 / $2) + 0.5}') +echo -e "$total_percentage" + +#read -r cpu a b c previdle rest < /proc/stat +#prevtotal=$((a+b+c+previdle)) +#sleep 0.5 +#read -r cpu a b c idle rest < /proc/stat +#total=$((a+b+c+idle)) +#cpu=$((100*( (total-prevtotal) - (idle-previdle) ) / (total-prevtotal) )) +#echo -e "$cpu" + +exit 0 diff --git a/basics/.local/bin/statusbar/memory b/basics/.local/bin/statusbar/memory index 7a952d8..77f462b 100755 --- a/basics/.local/bin/statusbar/memory +++ b/basics/.local/bin/statusbar/memory @@ -13,8 +13,8 @@ print Total ":" Available ":" Free ":" Buffers ":" Cached ":" SReclaimable ":" S echo "$meminfo" | while IFS=: read -r t a f b c sr sh; do - memfree=$(echo "$a $t" | awk '{printf "%.3f", ($1 / $2) * 100}') - memused=$(echo "$memfree" | awk '{printf "%.3f", (100 - $1)}') + memfree=$(echo "$a $t" | awk '{printf "%.2f", ($1 / $2) * 100}') + memused=$(echo "$memfree" | awk '{printf "%.2f", (100 - $1)}') # Percentage values # TODO: other values, controllable by flags? diff --git a/basics/.local/bin/statusbar/swap b/basics/.local/bin/statusbar/swap new file mode 100755 index 0000000..787ed23 --- /dev/null +++ b/basics/.local/bin/statusbar/swap @@ -0,0 +1,8 @@ +#!/bin/sh + +awk ' +/^SwapTotal:/ {Total=$2/(1024 * 1024)} +/^SwapFree:/ {Free=$2/(1024 * 1024)} +/^SwapCached:/ {Cached=$2/(1024 * 1024)} +END { +printf "%.2f %.2f %.2f %.2f\n", Total, Free, Cached, (Total - Free)}' /proc/meminfo diff --git a/basics/.local/bin/sync-mirrors b/basics/.local/bin/sync-mirrors new file mode 100755 index 0000000..dc5fb0c --- /dev/null +++ b/basics/.local/bin/sync-mirrors @@ -0,0 +1,15 @@ +#!/bin/sh + +sudo reflector \ + -c "Australia" \ + -c "New Zealand" \ + -c "Hong Kong" \ + -c "Singapore" \ + -c "Philipines" \ + -c "Malaysia" \ + -c "Indonesia" \ + -c "Thailand" \ + -c "Vietnam" \ + -c "China" \ + --age 12 --fastest 30 --latest 30 --verbose --save /etc/pacman.d/mirrorlist + diff --git a/basics/.local/share/dotfiles/dotfiles b/basics/.local/share/dotfiles/dotfiles new file mode 120000 index 0000000..11a54ed --- /dev/null +++ b/basics/.local/share/dotfiles/dotfiles @@ -0,0 +1 @@ +../../../../
\ No newline at end of file diff --git a/basics/.local/share/dotfiles/edit-config.d/alacritty b/basics/.local/share/dotfiles/edit-config.d/alacritty new file mode 120000 index 0000000..959d41c --- /dev/null +++ b/basics/.local/share/dotfiles/edit-config.d/alacritty @@ -0,0 +1 @@ +../../../../.config/alacritty/alacritty.yml
\ No newline at end of file diff --git a/basics/.local/share/dotfiles/edit-config.d/dunst b/basics/.local/share/dotfiles/edit-config.d/dunst new file mode 120000 index 0000000..91aecb1 --- /dev/null +++ b/basics/.local/share/dotfiles/edit-config.d/dunst @@ -0,0 +1 @@ +../../../../.config/dunst/dunstrc
\ No newline at end of file diff --git a/basics/.local/share/dotfiles/edit-config.d/kitty b/basics/.local/share/dotfiles/edit-config.d/kitty new file mode 120000 index 0000000..c860ad6 --- /dev/null +++ b/basics/.local/share/dotfiles/edit-config.d/kitty @@ -0,0 +1 @@ +../../../../.config/kitty/kitty.conf
\ No newline at end of file diff --git a/basics/.local/share/dotfiles/edit-config.d/ranger b/basics/.local/share/dotfiles/edit-config.d/ranger new file mode 120000 index 0000000..61a6f81 --- /dev/null +++ b/basics/.local/share/dotfiles/edit-config.d/ranger @@ -0,0 +1 @@ +../../../../.config/ranger/rc.conf
\ No newline at end of file diff --git a/basics/.local/share/dotfiles/edit-config.d/rofi b/basics/.local/share/dotfiles/edit-config.d/rofi new file mode 120000 index 0000000..3e3a50f --- /dev/null +++ b/basics/.local/share/dotfiles/edit-config.d/rofi @@ -0,0 +1 @@ +../../../../.config/rofi/config
\ No newline at end of file diff --git a/bspwm/.local/share/dotfiles/edit-config.d/bspwm b/bspwm/.local/share/dotfiles/edit-config.d/bspwm new file mode 120000 index 0000000..63b70f8 --- /dev/null +++ b/bspwm/.local/share/dotfiles/edit-config.d/bspwm @@ -0,0 +1 @@ +../../../../.config/bspwm/bspwmrc
\ No newline at end of file diff --git a/bspwm/.local/share/dotfiles/edit-config.d/sxhkd b/bspwm/.local/share/dotfiles/edit-config.d/sxhkd new file mode 120000 index 0000000..c1a2de6 --- /dev/null +++ b/bspwm/.local/share/dotfiles/edit-config.d/sxhkd @@ -0,0 +1 @@ +../../../../.config/sxhkd/sxhkdrc
\ No newline at end of file diff --git a/doom-emacs/.config/doom/init.el b/doom-emacs/.config/doom/init.el index 722c555..735cb8e 100644 --- a/doom-emacs/.config/doom/init.el +++ b/doom-emacs/.config/doom/init.el @@ -38,12 +38,11 @@ nav-flash ; blink the current line after jumping ;;neotree ; a project drawer, like NERDTree for vim ophints ; highlight the region an operation acts on - (popup +defaults) ; tame sudden yet inevitable temporary windows - ;;(pretty-code) ; replace bits of code with pretty symbols - ;; +fira) - tabs ; a tab bar for Emacs - treemacs ; a project drawer, like neotree but cooler - unicode ; extended unicode support for various languages + (popup +defaults) ; tame sudden yet inevitable temporary windows + ;;pretty-code ; ligatures or substitute text with pretty symbols + ;;tabs ; a tab bar for Emacs + ;;treemacs ; a project drawer, like neotree but cooler + ;;unicode ; extended unicode support for various languages vc-gutter ; vcs diff in the fringe vi-tilde-fringe ; fringe tildes to mark beyond EOB window-select ; visually switch windows @@ -92,7 +91,7 @@ (eval +overlay) ; run code, run (also, repls) ;;gist ; interacting with github gists lookup ; navigate your code and its documentation - ;;lsp + lsp ;;macos ; MacOS-specific commands magit ; a git porcelain for Emacs make ; run make tasks from Emacs diff --git a/doom-emacs/.emacs.d b/doom-emacs/.emacs.d -Subproject 348a2d6c6e1ce63067e8f479ca6877530600f83 +Subproject b3077c96258cd8569fb1523251b5823199e2433 diff --git a/doom-emacs/.local/bin/doom.cmd b/doom-emacs/.local/bin/doom.cmd new file mode 120000 index 0000000..c8f7159 --- /dev/null +++ b/doom-emacs/.local/bin/doom.cmd @@ -0,0 +1 @@ +../../.emacs.d/bin/doom.cmd
\ No newline at end of file diff --git a/doom-emacs/.local/share/dotfiles/edit-config.d/doom-config b/doom-emacs/.local/share/dotfiles/edit-config.d/doom-config new file mode 120000 index 0000000..b8b8295 --- /dev/null +++ b/doom-emacs/.local/share/dotfiles/edit-config.d/doom-config @@ -0,0 +1 @@ +../../../../.config/doom/config.org
\ No newline at end of file diff --git a/doom-emacs/.local/share/dotfiles/edit-config.d/doom-init b/doom-emacs/.local/share/dotfiles/edit-config.d/doom-init new file mode 120000 index 0000000..596c3f8 --- /dev/null +++ b/doom-emacs/.local/share/dotfiles/edit-config.d/doom-init @@ -0,0 +1 @@ +../../../../.config/doom/init.el
\ No newline at end of file diff --git a/emacs/.local/share/dotfiles/edit-config.d/emacs-config b/emacs/.local/share/dotfiles/edit-config.d/emacs-config new file mode 120000 index 0000000..1590b61 --- /dev/null +++ b/emacs/.local/share/dotfiles/edit-config.d/emacs-config @@ -0,0 +1 @@ +../../../../.emacs.d/config.org
\ No newline at end of file diff --git a/fish/.local/share/dotfiles/edit-config.d/fish b/fish/.local/share/dotfiles/edit-config.d/fish new file mode 120000 index 0000000..3aa2a06 --- /dev/null +++ b/fish/.local/share/dotfiles/edit-config.d/fish @@ -0,0 +1 @@ +../../../../.config/fish/config.fish
\ No newline at end of file diff --git a/git/.local/share/dotfiles/edit-config.d/git-config b/git/.local/share/dotfiles/edit-config.d/git-config new file mode 120000 index 0000000..f898004 --- /dev/null +++ b/git/.local/share/dotfiles/edit-config.d/git-config @@ -0,0 +1 @@ +../../../../.config/git/config
\ No newline at end of file diff --git a/git/.local/share/dotfiles/edit-config.d/git-ignore b/git/.local/share/dotfiles/edit-config.d/git-ignore new file mode 120000 index 0000000..172d502 --- /dev/null +++ b/git/.local/share/dotfiles/edit-config.d/git-ignore @@ -0,0 +1 @@ +../../../../.config/git/ignore
\ No newline at end of file diff --git a/herbstluftwm/.config/herbstluftwm/autostart b/herbstluftwm/.config/herbstluftwm/autostart index ab844a9..7605dd2 100755 --- a/herbstluftwm/.config/herbstluftwm/autostart +++ b/herbstluftwm/.config/herbstluftwm/autostart @@ -10,7 +10,7 @@ hc emit_hook reload if hc silent new_attr bool my_not_first_autostart; then [ ! "$(pidof -x picom)" ] && picom & - xset s 300 5 + xset s 600 5 [ ! "$(pidof -x xss-lock)" ] && xss-lock -n /usr/lib/xsecurelock/dimmer -l -- xsecurelock & fi @@ -23,6 +23,7 @@ hc keyunbind --all # if you have a super key you will be much happier with Mod set to Mod4 #Mod=Mod1 # Use alt as the main modifier Mod=Mod4 # Use the super key as the main modifier +ModAlt=Mod1 hc keybind $Mod-Shift-e quit hc keybind $Mod-Shift-r reload @@ -92,6 +93,8 @@ done hc keybind $Mod-period use_index +1 --skip-visible hc keybind $Mod-comma use_index -1 --skip-visible +hc keybind $Mod-b use_previous + # layouting hc keybind $Mod-r remove hc keybind $Mod-s floating toggle @@ -102,10 +105,16 @@ hc keybind $Mod-p pseudotile toggle # layouts, if the layout change wouldn't affect the actual window positions. # I.e. if there are two windows within a frame, the grid layout is skipped. hc keybind $Mod-space \ - or , and . compare tags.focus.curframe_wcount = 2 \ + or , and . emit_hook layout_changed \ + . compare tags.focus.curframe_wcount = 2 \ . cycle_layout +1 vertical horizontal max vertical grid \ , cycle_layout +1 +hc keybind $ModAlt-Tab spawn rofi -show window + +# scratchpad +hc keybind $Mod-grave spawn ~/.local/bin/scratchpad.sh + # media hc keybind XF86AudioLowerVolume spawn change-vol - hc keybind XF86AudioRaiseVolume spawn change-vol + @@ -129,6 +138,14 @@ hc mousebind $Mod-Button3 resize # focus hc keybind $Mod-BackSpace cycle_monitor +# Swap tag with next monitor +hc keybind $Mod-Shift-BackSpace chain \ + , new_attr string my_prev_monitor_tag \ + , substitute T monitors.focus.tag \ + set_attr my_prev_monitor_tag T \ + , cycle_monitor \ + , substitute T my_prev_monitor_tag \ + use T hc keybind $Mod-Tab cycle_all +1 hc keybind $Mod-Shift-Tab cycle_all -1 hc keybind $Mod-c cycle @@ -166,6 +183,8 @@ hc set smart_window_surroundings off hc set smart_frame_surroundings on hc set mouse_recenter_gap 0 +hc set focus_crosses_monitor_boundaries off + # rules hc unrule -F #hc rule class=XTerm tag=3 # move all xterms to tag 3 @@ -178,6 +197,10 @@ hc rule windowtype='_NET_WM_WINDOW_TYPE_DIALOG' focus=on hc rule windowtype~'_NET_WM_WINDOW_TYPE_(NOTIFICATION|DOCK|DESKTOP)' manage=off hc rule class='jetbrains-toolbox' floating=on +hc rule class='jetbrains-idea' instance='jetbrains-idea' title='win0' floating=on +hc rule class=Steam instance=Steam title~'Steam( .*)' +hc rule class=Steam instance=Steam title~'(.*)List(.*)' +hc rule instance=scratchpad tag=scratchpad hc set tree_style '╾│ ├└╼─┐' @@ -194,5 +217,11 @@ panel=~/.config/herbstluftwm/panel.sh [ -x "$panel" ] || panel=/etc/xdg/herbstluftwm/panel.sh for monitor in $(hc list_monitors | cut -d: -f1) ; do # start it on each monitor - "$panel" "$monitor" & + hc spawn "$panel" "$monitor" +done +killall -q stalonetray +while pgrep -u "$UID" -x stalonetray >/dev/null; do + sleep 1 done +sleep 5 +hc spawn stalonetray --geometry 1x1+1250+0 --window-layer top -c "$XDG_CONFIG_HOME/stalonetray/stalonetrayrc" diff --git a/herbstluftwm/.config/herbstluftwm/panel.sh b/herbstluftwm/.config/herbstluftwm/panel.sh index 6088aeb..ebdd59a 100755 --- a/herbstluftwm/.config/herbstluftwm/panel.sh +++ b/herbstluftwm/.config/herbstluftwm/panel.sh @@ -83,15 +83,40 @@ hc pad $monitor $panel_height sleep 5 || break done > >(uniq_linebuffered) & batterychildpid=$! + while true ; do + cpu_percentage=$("${HOME}"/.local/bin/statusbar/cpu) + echo -e "cpu\t$cpu_percentage%" + sleep 2 || break + done > >(uniq_linebuffered) & + cpuchildpid=$! + while true ; do + mem_percentage=$("${HOME}"/.local/bin/statusbar/memory | cut -d ' ' -f2) + echo -e "memory\t$mem_percentage%" + sleep 2 || break + done > >(uniq_linebuffered) & + memchildpid=$! + while true ; do + swapusage=$("${HOME}"/.local/bin/statusbar/swap | awk '{printf "%.2fG/%dG", $4, $1}') + echo -e "swap\t$swapusage" + sleep 2 || break + done > >(uniq_linebuffered) & + swapchildpid=$! hc --idle kill $datechildpid kill $batterychildpid + kill $cpuchildpid + kill $memchildpid + kill $swapchildpid } 2> /dev/null | { IFS=$'\t' read -ra tags <<< "$(hc tag_status $monitor)" visible=true date="" battery="status" + cpu="" + memory="" + swap="" windowtitle="" + layout="" while true ; do ### Output ### @@ -101,17 +126,28 @@ hc pad $monitor $panel_height separator="^bg()^fg($selbg)|" # draw tags for i in "${tags[@]}" ; do + # don't render these hidden tags + case ${i:1} in + 'scratchpad') + continue ;; + esac case ${i:0:1} in - '#') + '#') # Tag in focus on this monitor echo -n "^bg($selbg)^fg($selfg)" ;; - '+') + '%') # tag in focus on other monitor echo -n "^bg(#9CA668)^fg(#141414)" ;; - ':') + '-') # tag viewed on other monitor + echo -n "^bg(#9CA668)^fg(#141414)" + ;; + '+') # tag viewed on this monitor + echo -n "^bg(#9CA668)^fg(#141414)" + ;; + ':') # tag not emtpy echo -n "^bg()^fg(#ffffff)" ;; - '!') + '!') # tag urgent echo -n "^bg(#FF0675)^fg(#141414)" ;; *) @@ -127,13 +163,13 @@ hc pad $monitor $panel_height echo -n " ${i:1} " fi done - echo -n "$separator" + echo -n "$separator [$layout] $separator" echo -n "^bg()^fg() ${windowtitle//^/^^}" # small adjustments - right="$separator $battery $separator^bg() $date $separator" + right="$separator cpu: $cpu $separator mem: $memory $separator swap: $swap $separator $battery $separator^bg() $date $separator" right_text_only=$(echo -n "$right" | sed 's.\^[^(]*([^)]*)..g') # get width of right aligned text.. and add some space.. - width=$($textwidth "$font" "$right_text_only ") + width=$($textwidth "$font" "$right_text_only ") echo -n "^pa($(($panel_width - $width)))$right" echo @@ -149,7 +185,7 @@ hc pad $monitor $panel_height IFS=$'\t' read -ra cmd || break # log events for debugging - #echo "${cmd[@]}" >> /tmp/panel_${monitor}.log + echo "${cmd[@]}" >> /tmp/panel_${monitor}.log # find out event origin case "${cmd[0]}" in @@ -164,6 +200,15 @@ hc pad $monitor $panel_height battery) battery="${cmd[@]:1}" ;; + cpu) + cpu="${cmd[@]:1}" + ;; + memory) + memory="${cmd[@]:1}" + ;; + swap) + swap="${cmd[@]:1}" + ;; quit_panel) exit ;; @@ -189,6 +234,20 @@ hc pad $monitor $panel_height ;; focus_changed|window_title_changed) windowtitle="${cmd[@]:2}" + ;& + layout_changed) + currenttag=$(hc tag_status | tr '\t' '\n' | sed -n 's/#//p') + focusedtaglayout=$(hc layout "$currenttag" @ | awk '{print $2}' | sed 's/://') + case "$focusedtaglayout" in + vertical) + layout="V" ;; + horizontal) + layout="H" ;; + max) + layout="M" ;; + grid) + layout="G" ;; + esac ;; #player) # ;; @@ -201,4 +260,4 @@ hc pad $monitor $panel_height } 2> /dev/null | dzen2 -w $panel_width -x $x -y $y -fn "$font" -h $panel_height \ -e "button3=;button4=exec:$hc_quoted use_index +1;button5=exec:$hc_quoted use_index -1;button7=exec:$hc_quoted use_index +1;button6=exec:$hc_quoted use_index -1" \ - -ta l -bg "$bgcolor" -fg '#efefef' + -ta l -bg "$bgcolor" -fg '#efefef' -dock -m diff --git a/herbstluftwm/.local/bin/q3terminal.sh b/herbstluftwm/.local/bin/q3terminal.sh new file mode 100755 index 0000000..e69b5ee --- /dev/null +++ b/herbstluftwm/.local/bin/q3terminal.sh @@ -0,0 +1,97 @@ +#!/usr/bin/env bash + +# a q3-like (or yakuake-like) terminal for arbitrary applications. +# +# this lets a new monitor called "q3terminal" scroll in from the top into the +# current monitor. There the "scratchpad" will be shown (it will be created if +# it doesn't exist yet). If the monitor already exists it is scrolled out of +# the screen and removed again. +# +# Warning: this uses much resources because herbstclient is forked for each +# animation step. +# +# If a tag name is supplied, this is used instead of the scratchpad + +tag="${1:-scratchpad}" +hc() { "${herbstclient_command[@]:-herbstclient}" "$@" ;} + +termwidth_percent=${WIDTH_PERC:-100} +mrect=( $(hc monitor_rect -p "" ) ) +termwidth=$(( (${mrect[2]} * termwidth_percent) / 100 )) +termheight=${HEIGHT_PIXELS:-400} + +rect=( + $termwidth + $termheight + $(( ${mrect[0]} + (${mrect[2]} - termwidth) / 2 )) + $(( ${mrect[1]} - termheight )) +) + +y_line=${mrect[1]} + + +hc add "$tag" + + +monitor=dropdown + +exists=false +if ! hc add_monitor $(printf "%dx%d%+d%+d" "${rect[@]}") \ + "$tag" $monitor 2> /dev/null ; then + exists=true +else + # remember which monitor was focused previously + hc chain \ + , new_attr string monitors.by-name."$monitor".my_prev_focus \ + , substitute M monitors.focus.index \ + set_attr monitors.by-name."$monitor".my_prev_focus M +fi + +update_geom() { + local geom=$(printf "%dx%d%+d%+d" "${rect[@]}") + hc move_monitor "$monitor" $geom +} + +steps=${ANIMATION_STEPS:-1} +interval=${ANIMATION_INTERVAL:-0.01} + +animate() { + progress=( "$@" ) + for i in "${progress[@]}" ; do + rect[3]=$((y_line - (i * termheight) / steps)) + update_geom + sleep "$interval" + done +} + +show() { + hc lock + hc raise_monitor "$monitor" + hc focus_monitor "$monitor" + hc unlock + hc lock_tag "$monitor" + animate $(seq $steps -1 0) +} + +hide() { + rect=( $(hc monitor_rect "$monitor" ) ) + local tmp=${rect[0]} + rect[0]=${rect[2]} + rect[2]=${tmp} + local tmp=${rect[1]} + rect[1]=${rect[3]} + rect[3]=${tmp} + termheight=${rect[1]} + y_line=${rect[3]} # height of the upper screen border + + animate $(seq 0 +1 $steps) + # if q3terminal still is focused, then focus the previously focused monitor + # (that mon which was focused when starting q3terminal) + hc substitute M monitors.by-name."$monitor".my_prev_focus \ + and + compare monitors.focus.name = "$monitor" \ + + focus_monitor M + hc remove_monitor "$monitor" +} + +[ $exists = true ] && hide || show + diff --git a/herbstluftwm/.local/bin/scratchpad.sh b/herbstluftwm/.local/bin/scratchpad.sh new file mode 100755 index 0000000..d168ad7 --- /dev/null +++ b/herbstluftwm/.local/bin/scratchpad.sh @@ -0,0 +1,70 @@ +#!/usr/bin/env bash + +# a i3-like scratchpad for arbitrary applications. +# +# this lets a new monitor called "scratchpad" appear in from the top into the +# current monitor. There the "scratchpad" will be shown (it will be created if +# it doesn't exist yet). If the monitor already exists it is scrolled out of +# the screen and removed again. +# +# Warning: this uses much resources because herbstclient is forked for each +# animation step. +# +# If a tag name is supplied, this is used instead of the scratchpad + +tag="${1:-scratchpad}" +hc() { "${herbstclient_command[@]:-herbstclient}" "$@" ;} +#scratchpad=(alacritty --title "$tag" --class "scratchpad") +scratchpad=(urxvt -title "$tag" -name "scratchpad") +#scratchpad=(xterm -title "$tag" -name "scratchpad") + +#mrect=( $(hc monitor_rect "") ) +read -r -a mrect < <(hc monitor_rect "") + +width=${mrect[2]} +height=${mrect[3]} + +rect=( + $((width/2)) + $((height/2)) + $((mrect[0]+(width/4))) + $((mrect[1]+(height/4))) +) + +hc add "$tag" + +monitor=scratchpad + +exists=false +if ! hc add_monitor $(printf "%dx%d%+d%+d" "${rect[@]}") \ + "$tag" $monitor 2> /dev/null ; then + exists=true +else + # remember which monitor was focused previously + hc chain \ + , new_attr string monitors.by-name."$monitor".my_prev_focus \ + , substitute M monitors.focus.index \ + set_attr monitors.by-name."$monitor".my_prev_focus M +fi + +show() { + [ "$(hc attr tags.by-name."$tag".client_count)" = "0" ] && hc spawn "${scratchpad[@]}" + hc lock + hc raise_monitor "$monitor" + hc focus_monitor "$monitor" + hc unlock + hc lock_tag "$monitor" +} + +hide() { + # if q3terminal still is focused, then focus the previously focused monitor + # (that mon which was focused when starting q3terminal) + hc substitute M monitors.by-name."$monitor".my_prev_focus \ + and + compare monitors.focus.name = "$monitor" \ + + focus_monitor M + hc remove_monitor "$monitor" +} + +# shellcheck disable=SC2015 +[ $exists = true ] && hide || show + diff --git a/herbstluftwm/.local/bin/statusbar/herbstluftwm_tag_list b/herbstluftwm/.local/bin/statusbar/herbstluftwm_tag_list new file mode 100755 index 0000000..41c3569 --- /dev/null +++ b/herbstluftwm/.local/bin/statusbar/herbstluftwm_tag_list @@ -0,0 +1,14 @@ +#!/bin/env bash + +hc() { "${herbstclient_command[@]:-herbstclient}" "$@" ;} +monitor=${1:-0} + +{ + hc --idle +} 2> /dev/null | { + IFS=$'\t' read -ra tags <<< "$(hc tag_status $monitor)" + while true ; do + for i in "${tags[@]}" ; do + case + + diff --git a/herbstluftwm/.local/share/config-files/herbstluftwm-panel b/herbstluftwm/.local/share/config-files/herbstluftwm-panel new file mode 120000 index 0000000..439ccbe --- /dev/null +++ b/herbstluftwm/.local/share/config-files/herbstluftwm-panel @@ -0,0 +1 @@ +../../../.config/herbstluftwm/panel.sh
\ No newline at end of file diff --git a/herbstluftwm/.local/share/dotfiles/edit-config.d/herbstluftwm b/herbstluftwm/.local/share/dotfiles/edit-config.d/herbstluftwm new file mode 120000 index 0000000..a3dfe2b --- /dev/null +++ b/herbstluftwm/.local/share/dotfiles/edit-config.d/herbstluftwm @@ -0,0 +1 @@ +../../../../.config/herbstluftwm/autostart
\ No newline at end of file diff --git a/herbstluftwm/.local/share/dotfiles/edit-config.d/herbstluftwm-panel b/herbstluftwm/.local/share/dotfiles/edit-config.d/herbstluftwm-panel new file mode 120000 index 0000000..4adf4c7 --- /dev/null +++ b/herbstluftwm/.local/share/dotfiles/edit-config.d/herbstluftwm-panel @@ -0,0 +1 @@ +../../../../.config/herbstluftwm/panel.sh
\ No newline at end of file diff --git a/i3wm/.config/i3/config b/i3wm/.config/i3/config index 57cbaf2..8268f51 100644 --- a/i3wm/.config/i3/config +++ b/i3wm/.config/i3/config @@ -18,7 +18,8 @@ exec --no-startup-id picom set $mod Mod4 #exec_always --no-startup-id feh --bg-scale $HOME/.local/share/images/wallpaper.jpg -new_window 1pixel +#new_window pixel +default_border pixel diff --git a/i3wm/.local/share/dotfiles/edit-config.d/i3 b/i3wm/.local/share/dotfiles/edit-config.d/i3 new file mode 120000 index 0000000..691129c --- /dev/null +++ b/i3wm/.local/share/dotfiles/edit-config.d/i3 @@ -0,0 +1 @@ +../../../../.config/i3/config
\ No newline at end of file diff --git a/meta/basics_deps b/meta/basics_deps index 2c8edf1..af9d9fe 100644 --- a/meta/basics_deps +++ b/meta/basics_deps @@ -6,7 +6,7 @@ fzf kitty libnotify newsboat -otf-fira-code +ttf-fira-code otf-fira-mono otf-fira-sans python-virtualenvwrapper diff --git a/nvim/.config/nvim/autoload/plug.vim b/nvim/.config/nvim/autoload/plug.vim index 25be27f..7914bfe 100644 --- a/nvim/.config/nvim/autoload/plug.vim +++ b/nvim/.config/nvim/autoload/plug.vim @@ -179,7 +179,7 @@ function! s:define_commands() endif if has('win32') \ && &shellslash - \ && (&shell =~# 'cmd\.exe' || &shell =~# 'powershell\.exe') + \ && (&shell =~# 'cmd\(\.exe\)\?$' || &shell =~# 'powershell\(\.exe\)\?$') return s:err('vim-plug does not support shell, ' . &shell . ', when shellslash is set.') endif if !has('nvim') @@ -419,7 +419,7 @@ if s:is_win let batchfile = s:plug_tempname().'.bat' call writefile(s:wrap_cmds(a:cmd), batchfile) let cmd = plug#shellescape(batchfile, {'shell': &shell, 'script': 0}) - if &shell =~# 'powershell\.exe' + if &shell =~# 'powershell\(\.exe\)\?$' let cmd = '& ' . cmd endif return [batchfile, cmd] @@ -632,17 +632,39 @@ function! plug#(repo, ...) let g:plugs[name] = spec let s:loaded[name] = get(s:loaded, name, 0) catch - return s:err(v:exception) + return s:err(repo . ' ' . v:exception) endtry endfunction function! s:parse_options(arg) let opts = copy(s:base_spec) let type = type(a:arg) + let opt_errfmt = 'Invalid argument for "%s" option of :Plug (expected: %s)' if type == s:TYPE.string + if empty(a:arg) + throw printf(opt_errfmt, 'tag', 'string') + endif let opts.tag = a:arg elseif type == s:TYPE.dict call extend(opts, a:arg) + for opt in ['branch', 'tag', 'commit', 'rtp', 'dir', 'as'] + if has_key(opts, opt) + \ && (type(opts[opt]) != s:TYPE.string || empty(opts[opt])) + throw printf(opt_errfmt, opt, 'string') + endif + endfor + for opt in ['on', 'for'] + if has_key(opts, opt) + \ && type(opts[opt]) != s:TYPE.list + \ && (type(opts[opt]) != s:TYPE.string || empty(opts[opt])) + throw printf(opt_errfmt, opt, 'string or list') + endif + endfor + if has_key(opts, 'do') + \ && type(opts.do) != s:TYPE.funcref + \ && (type(opts.do) != s:TYPE.string || empty(opts.do)) + throw printf(opt_errfmt, 'do', 'string or funcref') + endif if has_key(opts, 'dir') let opts.dir = s:dirpath(s:plug_expand(opts.dir)) endif @@ -868,9 +890,9 @@ function! s:chsh(swap) set shell=sh endif if a:swap - if &shell =~# 'powershell\.exe' || &shell =~# 'pwsh$' + if &shell =~# 'powershell\(\.exe\)\?$' || &shell =~# 'pwsh$' let &shellredir = '2>&1 | Out-File -Encoding UTF8 %s' - elseif &shell =~# 'sh' || &shell =~# 'cmd\.exe' + elseif &shell =~# 'sh' || &shell =~# 'cmd\(\.exe\)\?$' set shellredir=>%s\ 2>&1 endif endif @@ -2106,9 +2128,9 @@ function! plug#shellescape(arg, ...) let opts = a:0 > 0 && type(a:1) == s:TYPE.dict ? a:1 : {} let shell = get(opts, 'shell', s:is_win ? 'cmd.exe' : 'sh') let script = get(opts, 'script', 1) - if shell =~# 'cmd\.exe' + if shell =~# 'cmd\(\.exe\)\?$' return s:shellesc_cmd(a:arg, script) - elseif shell =~# 'powershell\.exe' || shell =~# 'pwsh$' + elseif shell =~# 'powershell\(\.exe\)\?$' || shell =~# 'pwsh$' return s:shellesc_ps1(a:arg) endif return s:shellesc_sh(a:arg) @@ -2160,7 +2182,7 @@ function! s:system(cmd, ...) return system(a:cmd) endif let cmd = join(map(copy(a:cmd), 'plug#shellescape(v:val, {"shell": &shell, "script": 0})')) - if &shell =~# 'powershell\.exe' + if &shell =~# 'powershell\(\.exe\)\?$' let cmd = '& ' . cmd endif else @@ -2249,7 +2271,7 @@ endfunction function! s:rm_rf(dir) if isdirectory(a:dir) - call s:system(s:is_win + return s:system(s:is_win \ ? 'rmdir /S /Q '.plug#shellescape(a:dir) \ : ['rm', '-rf', a:dir]) endif @@ -2333,6 +2355,7 @@ endfunction function! s:delete(range, force) let [l1, l2] = a:range let force = a:force + let err_count = 0 while l1 <= l2 let line = getline(l1) if line =~ '^- ' && isdirectory(line[2:]) @@ -2341,11 +2364,22 @@ function! s:delete(range, force) let answer = force ? 1 : s:ask('Delete '.line[2:].'?', 1) let force = force || answer > 1 if answer - call s:rm_rf(line[2:]) + let err = s:rm_rf(line[2:]) setlocal modifiable - call setline(l1, '~'.line[1:]) - let s:clean_count += 1 - call setline(4, printf('Removed %d directories.', s:clean_count)) + if empty(err) + call setline(l1, '~'.line[1:]) + let s:clean_count += 1 + else + delete _ + call append(l1 - 1, s:format_message('x', line[1:], err)) + let l2 += len(s:lines(err)) + let err_count += 1 + endif + let msg = printf('Removed %d directories.', s:clean_count) + if err_count > 0 + let msg .= printf(' Failed to remove %d directories.', err_count) + endif + call setline(4, msg) setlocal nomodifiable endif endif diff --git a/nvim/.config/nvim/init.vim b/nvim/.config/nvim/init.vim index bdf1e4c..7f66a49 100644 --- a/nvim/.config/nvim/init.vim +++ b/nvim/.config/nvim/init.vim @@ -22,7 +22,7 @@ Plug 'mileszs/ack.vim' Plug 'terryma/vim-multiple-cursors' -Plug 'w0rp/ale' +Plug 'dense-analysis/ale' Plug 'neoclide/coc.nvim', {'branch': 'release'} Plug 'lyuts/vim-rtags' @@ -62,6 +62,9 @@ let g:gruvbox_undercurl=1 let g:gruvbox_contrast_dark="soft" colorscheme gruvbox +" transparent bg +highlight Normal ctermbg=none + "esc imap jk <Esc> @@ -90,6 +93,18 @@ set timeoutlen=500 map <leader>ff :Files<CR> map <leader>fp :CtrlP<CR> +" Disable Arrow keys in Normal mode +map <up> <nop> +map <down> <nop> +map <left> <nop> +map <right> <nop> + +" Disable Arrow keys in Insert mode +imap <up> <nop> +imap <down> <nop> +imap <left> <nop> +imap <right> <nop> + map <leader>wh :wincmd h<CR> map <leader>wj :wincmd j<CR> map <leader>wk :wincmd k<CR> diff --git a/nvim/.local/share/dotfiles/edit-config.d/nvim b/nvim/.local/share/dotfiles/edit-config.d/nvim new file mode 120000 index 0000000..e59f7d2 --- /dev/null +++ b/nvim/.local/share/dotfiles/edit-config.d/nvim @@ -0,0 +1 @@ +../../../../.config/nvim/init.vim
\ No newline at end of file diff --git a/polybar/.config/polybar/config b/polybar/.config/polybar/config index 8bd3f20..4628468 100644 --- a/polybar/.config/polybar/config +++ b/polybar/.config/polybar/config @@ -30,7 +30,7 @@ alert = #bd2c40 [bar/base] monitor = ${env:MONITOR:eDP1} width = 100% -height = 40 +height = 16 dpi = 96 ;offset-x = 1% ;offset-y = 1% @@ -54,7 +54,7 @@ module-margin-left = 1 module-margin-right = 2 font-0 = fixed:pixelsize=10;1 -font-1 = unifont:fontformat=truetype:size=8:antialias=false;0 +font-1 = unifont:fontformat=truetype:size=10:antialias=false;0 font-2 = siji:pixelsize=10;1 font-3 = "Font Awesome 5 Brands:style=Regular:pixelsize=8;1" font-4 = "Font Awesome 5 Free:style=Regular:pixelsize=8;1" @@ -132,6 +132,14 @@ modules-left = hostname xwindow modules-center = modules-right = filesystem backlight pulseaudio xkeyboard memory cpu wlan eth ethvpn battery temperature +[bar/topbar-herbstluftwm] +inherit = bar/base + +scroll-up = herbstclient use_index +1 +scroll-down = herbstclient use_index -1 +modules-left = hostname xwindow +modules-right = filesystem backlight pulseaudio xkeyboard memory cpu wlan eth ethvpn battery temperature + [bar/topbar2-i3] inherit = bar/base offset-y = 0 @@ -184,6 +192,9 @@ modules-right = date ; modules ;============================================================================= +[module/herbstluftwm] +type = custom/script + [module/hostname] type = custom/script interval = 256 diff --git a/polybar/.local/share/dotfiles/edit-config.d/polybar b/polybar/.local/share/dotfiles/edit-config.d/polybar new file mode 120000 index 0000000..793ae31 --- /dev/null +++ b/polybar/.local/share/dotfiles/edit-config.d/polybar @@ -0,0 +1 @@ +../../../../.config/polybar/config
\ No newline at end of file diff --git a/tmux/.tmux.conf b/tmux/.config/tmux/tmux.conf index c66309a..c66309a 100644 --- a/tmux/.tmux.conf +++ b/tmux/.config/tmux/tmux.conf diff --git a/tmux/.local/share/dotfiles/edit-config.d/tmux b/tmux/.local/share/dotfiles/edit-config.d/tmux new file mode 120000 index 0000000..bcc4e19 --- /dev/null +++ b/tmux/.local/share/dotfiles/edit-config.d/tmux @@ -0,0 +1 @@ +../../../../.config/tmux/tmux.conf
\ No newline at end of file diff --git a/vim/.local/share/dotfiles/edit-config.d/vim b/vim/.local/share/dotfiles/edit-config.d/vim new file mode 120000 index 0000000..7028409 --- /dev/null +++ b/vim/.local/share/dotfiles/edit-config.d/vim @@ -0,0 +1 @@ +../../../../.vimrc
\ No newline at end of file diff --git a/x/.config/X11/Xresources b/x/.config/X11/Xresources deleted file mode 100755 index 68f3911..0000000 --- a/x/.config/X11/Xresources +++ /dev/null @@ -1,13 +0,0 @@ -#if __has_include(".extend.Xresources") -#include ".extend.Xresources" -#endif - -! ^ The above lines are no comments! -! Leave them as they are if a file ~/.extend.Xresources is being used on your system. -! config can be added there or also here below. -! For comments use "!" - -#include "gruvbox-dark.xresources" - -*.alpha: 0.8 -*.font: monospace:size=8 diff --git a/x/.config/x/Xresources b/x/.config/x/Xresources new file mode 100755 index 0000000..00fef46 --- /dev/null +++ b/x/.config/x/Xresources @@ -0,0 +1,38 @@ +#if __has_include(".extend.Xresources") +#include ".extend.Xresources" +#endif + +! ^ The above lines are no comments! +! Leave them as they are if a file ~/.extend.Xresources is being used on your system. +! config can be added there or also here below. +! For comments use "!" + +#include "gruvbox-dark.xresources" + +!*.alpha: 0.9 +!*.font: monospace:size=8 +!*.font: xft:FiraCode Nerd Font Mono:size=12 +*.faceName: FiraCode Nerd Font Mono:size=12 + +XTerm.vt100.faceName: FiraCode Nerd Font Mono:size=12 +Xft.autohint: 0 +Xft.lcdfilter: lcddefault +Xft.hintstyle: hintslight +Xft.hinting: 1 +Xft.antialias: 1 +Xft.rgba: rgb + +URxvt.font: xft:FiraCode Nerd Font Mono:size=8 + +!URxvt*transparent: true +!URxvt*shading: 50 +URxvt.depth: 32 +URxvt.background: [75]#32302f + +URxvt.scrollBar: false +URxvt.scrollBar_right: false +URxvt.saveLines: 1000000 +!URxvt.borderLess: 1 ! breaks herbstluftwm +URxvt.scrollTtyOutput: false +URxvt.scrollWithBuffer: true +URxvt.scrollTtyKeypress: true diff --git a/x/.config/X11/gruvbox-dark.xresources b/x/.config/x/gruvbox-dark.xresources index 5beeba2..e3feb5f 100644 --- a/x/.config/X11/gruvbox-dark.xresources +++ b/x/.config/x/gruvbox-dark.xresources @@ -6,9 +6,13 @@ ! Last Modified: 6 Sep 2014 ! ----------------------------------------------------------------------------- -! hard contrast: *background: #1d2021 -*background: #282828 -! soft contrast: *background: #32302f +! hard contrast: +!*background: #1d2021 +! normal contrast: +!*background: #282828 +! soft contrast: +*background: #32302f + *foreground: #ebdbb2 ! Black + DarkGrey *color0: #282828 diff --git a/x/.config/x/gruvbox-light.xresources b/x/.config/x/gruvbox-light.xresources new file mode 100644 index 0000000..df92348 --- /dev/null +++ b/x/.config/x/gruvbox-light.xresources @@ -0,0 +1,40 @@ +! ----------------------------------------------------------------------------- +! File: gruvbox-light.xresources +! Description: Retro groove colorscheme generalized +! Author: morhetz <morhetz@gmail.com> +! Source: https://github.com/morhetz/gruvbox-generalized +! Last Modified: 6 Sep 2014 +! ----------------------------------------------------------------------------- + +! hard contrast: +!*background: #f9f5d7 +! normal contrast: +*background: #fbf1c7 +! soft contrast: +!*background: #f2e5bc + +*foreground: #3c3836 +! Black + DarkGrey +*color0: #fdf4c1 +*color8: #928374 +! DarkRed + Red +*color1: #cc241d +*color9: #9d0006 +! DarkGreen + Green +*color2: #98971a +*color10: #79740e +! DarkYellow + Yellow +*color3: #d79921 +*color11: #b57614 +! DarkBlue + Blue +*color4: #458588 +*color12: #076678 +! DarkMagenta + Magenta +*color5: #b16286 +*color13: #8f3f71 +! DarkCyan + Cyan +*color6: #689d6a +*color14: #427b58 +! LightGrey + White +*color7: #7c6f64 +*color15: #3c3836 diff --git a/x/.config/X11/xprofile b/x/.config/x/xprofile index 273230f..5ed8c5b 100755 --- a/x/.config/X11/xprofile +++ b/x/.config/x/xprofile @@ -6,11 +6,12 @@ setxkbmap -option caps:swapescape xset r rate 300 50 # set wallpaper -xwallpaper --zoom ${XDG_DATA_HOME}/images/wallpaper.jpg +xwallpaper --zoom "${XDG_DATA_HOME}/images/wallpaper.jpg" # load Xresources -userresources=${XDG_CONFIG_HOME}/X/Xresources -[ -f $userresources ] && xrdb -load $userresources +xconfigdir=${XDG_CONFIG_HOME}/x +userresources=${xconfigdir}/Xresources +[ -f $userresources ] && xrdb -I"$xconfigdir" -load "$userresources" # systemd user systemctl --user import-environment DISPLAY XAUTHORITY diff --git a/x/.local/share/dotfiles/edit-config.d/xinit b/x/.local/share/dotfiles/edit-config.d/xinit new file mode 120000 index 0000000..5c4aef3 --- /dev/null +++ b/x/.local/share/dotfiles/edit-config.d/xinit @@ -0,0 +1 @@ +../../../../.xinitrc
\ No newline at end of file diff --git a/x/.local/share/dotfiles/edit-config.d/xprofile b/x/.local/share/dotfiles/edit-config.d/xprofile new file mode 120000 index 0000000..c5de7b9 --- /dev/null +++ b/x/.local/share/dotfiles/edit-config.d/xprofile @@ -0,0 +1 @@ +../../../../.config/X11/xprofile
\ No newline at end of file diff --git a/x/.local/share/dotfiles/edit-config.d/xresources b/x/.local/share/dotfiles/edit-config.d/xresources new file mode 120000 index 0000000..e71b085 --- /dev/null +++ b/x/.local/share/dotfiles/edit-config.d/xresources @@ -0,0 +1 @@ +../../../../.config/X11/Xresources
\ No newline at end of file @@ -1,8 +1,10 @@ #!/bin/sh -xprofile=${XDG_CONFIG_HOME}/X11/xprofile +xprofile=${XDG_CONFIG_HOME}/x/xprofile [ -f $xprofile ] && . $xprofile #exec startxfce4 -exec i3 +#exec i3 #exec bspwm +#exec xmonad +exec herbstluftwm diff --git a/xmonad/.local/share/dotfiles/edit-config.d/xmonad b/xmonad/.local/share/dotfiles/edit-config.d/xmonad new file mode 120000 index 0000000..6f74ae5 --- /dev/null +++ b/xmonad/.local/share/dotfiles/edit-config.d/xmonad @@ -0,0 +1 @@ +../../../../.config/xmonad/xmonad.hs
\ No newline at end of file diff --git a/zsh/.config/zsh/.p10k.zsh b/zsh/.config/zsh/.p10k.zsh index 78fa142..32c113f 100644 --- a/zsh/.config/zsh/.p10k.zsh +++ b/zsh/.config/zsh/.p10k.zsh @@ -33,6 +33,7 @@ typeset -g POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=( # =========================[ Line #1 ]========================= os_icon # os identifier + context # user@hostname dir # current directory vcs # git status # =========================[ Line #2 ]========================= @@ -81,7 +82,6 @@ azure # azure account name (https://docs.microsoft.com/en-us/cli/azure) gcloud # google cloud cli account and project (https://cloud.google.com/) google_app_cred # google application credentials (https://cloud.google.com/docs/authentication/production) - context # user@hostname nordvpn # nordvpn connection status, linux only (https://nordvpn.com/) ranger # ranger shell (https://github.com/ranger/ranger) nnn # nnn shell (https://github.com/jarun/nnn) @@ -1606,7 +1606,7 @@ # - always: Trim down prompt when accepting a command line. # - same-dir: Trim down prompt when accepting a command line unless this is the first command # typed after changing current working directory. - typeset -g POWERLEVEL9K_TRANSIENT_PROMPT=always + typeset -g POWERLEVEL9K_TRANSIENT_PROMPT=off # Instant prompt mode. # diff --git a/zsh/.config/zsh/.zshrc b/zsh/.config/zsh/.zshrc index e9ee24a..1bea1e6 100644 --- a/zsh/.config/zsh/.zshrc +++ b/zsh/.config/zsh/.zshrc @@ -1,3 +1,6 @@ +# start profile +#zmodload zsh/zprof + autoload -U colors && colors # Load colors setopt autocd # Automatically cd into typed directory. stty stop undef # Disable ctrl-s to freeze terminal. @@ -43,25 +46,11 @@ _comp_options+=(globdots) autoload -U +X bashcompinit && bashcompinit +source /usr/share/bash-completion/bash_completion 2> \dev\null + # Keys bindkey -e - -# Dirstack -autoload -Uz add-zsh-hook - -DIRSTACKFILE="$XDG_CACHE_HOME/zsh/dirs" -if [[ -f "$DIRSTACKFILE" ]] && (( ${#dirstack} == 0 )); then - dirstack=("${(@f)"$(< "$DIRSTACKFILE")"}") - [[ -d "${dirstack[1]}" ]] && cd -- "${dirstack[1]}" -fi -chpwd_dirstack() { - print -l -- "$PWD" "${(u)dirstack[@]}" > "$DIRSTACKFILE" -} -add-zsh-hook -Uz chpwd chpwd_dirstack - -DIRSTACKSIZE='20' - setopt AUTO_PUSHD PUSHD_SILENT PUSHD_TO_HOME ## Remove duplicate entries @@ -102,10 +91,34 @@ autoload -U edit-command-line zle -N edit-command-line bindkey '\C-x\C-e' edit-command-line -if type "kitty" > /dev/null; then - # Completion for kitty - kitty + complete setup zsh | source /dev/stdin +#------------------------------ +# Window title +#------------------------------ +autoload -Uz vcs_info +zstyle ':vcs_info:*' enable git hg +zstyle ':vcs_info:*' check-for-changes true +case $TERM in + termite|*xterm*|rxvt|rxvt-unicode|rxvt-256color|rxvt-unicode-256color|(dt|k|E)term) + precmd () { + vcs_info + print -Pn "\e]0;[%n@%M][%~]%#\a" + } + preexec () { print -Pn "\e]0;[%n@%M][%~]%# ($1)\a" } + ;; + screen|screen-256color) + precmd () { + vcs_info + print -Pn "\e]83;title \"$1\"\a" + print -Pn "\e]0;$TERM - (%L) [%n@%M]%# [%~]\a" + } + preexec () { + print -Pn "\e]83;title \"$1\"\a" + print -Pn "\e]0;$TERM - (%L) [%n@%M]%# [%~] ($1)\a" + } + ;; +esac +if type "kitty" > /dev/null; then alias kdiff="kitty +kitten diff" alias kicat="kitty +kitten icat" alias kunicode="kitty +kitten unicode_input" @@ -114,17 +127,46 @@ if type "kitty" > /dev/null; then alias kclip="kitty +kitten clipboard" fi - if type "exa" > /dev/null; then alias ls=exa fi +if type "deno" > /dev/null; then + deno completions zsh >| "$XDG_DATA_HOME/zsh/functions/_deno" + #deno_cache_dir="$XDG_CACHE_HOME/deno" + #deno_cache="$deno_cache_dir/deno_init-zsh" + #mkdir -p "$deno_cache_dir" + #if [ "$(command -v deno)" -nt "$deno_cache" -o ! -s "$deno_cache" ]; then + # deno completions zsh >| "$deno_cache" + #fi + #source "$deno_cache" + #unset deno_cache_dir + #unset deno_cache +fi + + if type "thefuck" > /dev/null; then - eval $(thefuck --alias) + thefuck_cache_dir="$XDG_CACHE_HOME/thefuck" + thefuck_cache="$thefuck_cache_dir/thefuck_init-zsh" + mkdir -p "$thefuck_cache_dir" + if [ "$(command -v thefuck)" -nt "$thefuck_cache" -o ! -s "$thefuck_cache" ]; then + thefuck --alias >| "$thefuck_cache" + fi + source "$thefuck_cache" + unset thefuck_cache_dir + unset thefuck_cache fi if type "fasd" > /dev/null; then - eval "$(fasd --init auto)" + fasd_cache_dir="$XDG_CACHE_HOME/fasd" + fasd_cache="$fasd_cache_dir/fasd_init-zsh" + mkdir -p "$fasd_cache_dir" + if [ "$(command -v fasd)" -nt "$fasd_cache" -o ! -s "$fasd_cache" ]; then + fasd --init posix-alias zsh-hook zsh-ccomp zsh-ccomp-install zsh-wcomp zsh-wcomp-install >| "$fasd_cache" + fi + source "$fasd_cache" + unset fasd_cache_dir + unset fasd_cache fi # fzf @@ -140,11 +182,37 @@ export WORKON_HOME="$XDG_DATA_HOME/virtualenvs" source /usr/share/doc/pkgfile/command-not-found.zsh # Aliases -alias ec="emacsclient -c" +alias ec='emacsclient -c' +alias grep='grep --color=auto' +alias diff='diff --color=auto' +alias ls='ls --color=auto' +alias ip='ip -color=auto' + +export LESS=-R +export LESS_TERMCAP_mb=$'\E[1;31m' # begin blink +export LESS_TERMCAP_md=$'\E[1;36m' # begin bold +export LESS_TERMCAP_me=$'\E[0m' # reset bold/blink +export LESS_TERMCAP_so=$'\E[01;44;33m' # begin reverse video +export LESS_TERMCAP_se=$'\E[0m' # reset reverse video +export LESS_TERMCAP_us=$'\E[1;32m' # begin underline +export LESS_TERMCAP_ue=$'\E[0m' # reset underline +[ -x /usr/bin/source-highlight-esc.sh ] && + export LESSOPEN="| /usr/bin/source-highlight-esc.sh %s" && + export LESS='-R ' + # Source plugins source "$XDG_CONFIG_HOME/zsh/zsh_plugins.sh" +# plugin options +ZSH_AUTOSUGGEST_STRATEGY=(history completion) +ZSH_AUTOSUGGEST_USE_ASYNC=1 + +bindkey '^[[A' history-substring-search-up +bindkey '^[[B' history-substring-search-down +bindkey -M emacs '^P' history-substring-search-up +bindkey -M emacs '^N' history-substring-search-down + # Switch based on TERM case "$TERM" in "dumb") @@ -157,3 +225,6 @@ case "$TERM" in source <(antibody bundle romkatv/powerlevel10k) [[ ! -f ~/.config/zsh/.p10k.zsh ]] || source ~/.config/zsh/.p10k.zsh esac + +# finish and output profile +#zprof diff --git a/zsh/.config/zsh/zsh_plugins.sh b/zsh/.config/zsh/zsh_plugins.sh index 4c7caa9..4b4b7b4 100644 --- a/zsh/.config/zsh/zsh_plugins.sh +++ b/zsh/.config/zsh/zsh_plugins.sh @@ -19,15 +19,14 @@ source /home/peter/.cache/antibody/https-COLON--SLASH--SLASH-github.com-SLASH-ro fpath+=( /home/peter/.cache/antibody/https-COLON--SLASH--SLASH-github.com-SLASH-robbyrussell-SLASH-oh-my-zsh/plugins/rsync ) source /home/peter/.cache/antibody/https-COLON--SLASH--SLASH-github.com-SLASH-robbyrussell-SLASH-oh-my-zsh/plugins/systemd/systemd.plugin.zsh fpath+=( /home/peter/.cache/antibody/https-COLON--SLASH--SLASH-github.com-SLASH-robbyrussell-SLASH-oh-my-zsh/plugins/systemd ) -source /home/peter/.cache/antibody/https-COLON--SLASH--SLASH-github.com-SLASH-robbyrussell-SLASH-oh-my-zsh/plugins/thefuck/thefuck.plugin.zsh -fpath+=( /home/peter/.cache/antibody/https-COLON--SLASH--SLASH-github.com-SLASH-robbyrussell-SLASH-oh-my-zsh/plugins/thefuck ) source /home/peter/.cache/antibody/https-COLON--SLASH--SLASH-github.com-SLASH-robbyrussell-SLASH-oh-my-zsh/plugins/tmux/tmux.plugin.zsh fpath+=( /home/peter/.cache/antibody/https-COLON--SLASH--SLASH-github.com-SLASH-robbyrussell-SLASH-oh-my-zsh/plugins/tmux ) source /home/peter/.cache/antibody/https-COLON--SLASH--SLASH-github.com-SLASH-robbyrussell-SLASH-oh-my-zsh/plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh fpath+=( /home/peter/.cache/antibody/https-COLON--SLASH--SLASH-github.com-SLASH-robbyrussell-SLASH-oh-my-zsh/plugins/virtualenvwrapper ) +source /home/peter/.cache/antibody/https-COLON--SLASH--SLASH-github.com-SLASH-rupa-SLASH-z/z.sh +fpath+=( /home/peter/.cache/antibody/https-COLON--SLASH--SLASH-github.com-SLASH-rupa-SLASH-z ) source /home/peter/.cache/antibody/https-COLON--SLASH--SLASH-github.com-SLASH-zsh-users-SLASH-zsh-autosuggestions/zsh-autosuggestions.plugin.zsh fpath+=( /home/peter/.cache/antibody/https-COLON--SLASH--SLASH-github.com-SLASH-zsh-users-SLASH-zsh-autosuggestions ) -source /home/peter/.cache/antibody/https-COLON--SLASH--SLASH-github.com-SLASH-zsh-users-SLASH-zsh-completions/zsh-completions.plugin.zsh -fpath+=( /home/peter/.cache/antibody/https-COLON--SLASH--SLASH-github.com-SLASH-zsh-users-SLASH-zsh-completions ) +fpath+=( /home/peter/.cache/antibody/https-COLON--SLASH--SLASH-github.com-SLASH-zsh-users-SLASH-zsh-completions/src ) source /home/peter/.cache/antibody/https-COLON--SLASH--SLASH-github.com-SLASH-zsh-users-SLASH-zsh-history-substring-search/zsh-history-substring-search.plugin.zsh fpath+=( /home/peter/.cache/antibody/https-COLON--SLASH--SLASH-github.com-SLASH-zsh-users-SLASH-zsh-history-substring-search ) diff --git a/zsh/.config/zsh/zsh_plugins.txt b/zsh/.config/zsh/zsh_plugins.txt index 696fda3..5c5440b 100644 --- a/zsh/.config/zsh/zsh_plugins.txt +++ b/zsh/.config/zsh/zsh_plugins.txt @@ -1,17 +1,17 @@ -zdharma/fast-syntax-highlighting -robbyrussell/oh-my-zsh path:plugins/archlinux -robbyrussell/oh-my-zsh path:plugins/colored-man-pages -robbyrussell/oh-my-zsh path:plugins/command-not-found -robbyrussell/oh-my-zsh path:plugins/docker -robbyrussell/oh-my-zsh path:plugins/fzf -robbyrussell/oh-my-zsh path:plugins/git -robbyrussell/oh-my-zsh path:plugins/git-extras -robbyrussell/oh-my-zsh path:plugins/pip -robbyrussell/oh-my-zsh path:plugins/rsync -robbyrussell/oh-my-zsh path:plugins/systemd -robbyrussell/oh-my-zsh path:plugins/thefuck -robbyrussell/oh-my-zsh path:plugins/tmux -robbyrussell/oh-my-zsh path:plugins/virtualenvwrapper -zsh-users/zsh-autosuggestions -zsh-users/zsh-completions -zsh-users/zsh-history-substring-search +zdharma/fast-syntax-highlighting kind:zsh +robbyrussell/oh-my-zsh path:plugins/archlinux kind:zsh +robbyrussell/oh-my-zsh path:plugins/colored-man-pages kind:zsh +robbyrussell/oh-my-zsh path:plugins/command-not-found kind:zsh +robbyrussell/oh-my-zsh path:plugins/docker kind:zsh +robbyrussell/oh-my-zsh path:plugins/fzf kind:zsh +robbyrussell/oh-my-zsh path:plugins/git kind:zsh +robbyrussell/oh-my-zsh path:plugins/git-extras kind:zsh +robbyrussell/oh-my-zsh path:plugins/pip kind:zsh +robbyrussell/oh-my-zsh path:plugins/rsync kind:zsh +robbyrussell/oh-my-zsh path:plugins/systemd kind:zsh +robbyrussell/oh-my-zsh path:plugins/tmux kind:zsh +robbyrussell/oh-my-zsh path:plugins/virtualenvwrapper kind:zsh +rupa/z kind:zsh +zsh-users/zsh-autosuggestions kind:zsh +zsh-users/zsh-completions path:src kind:fpath +zsh-users/zsh-history-substring-search kind:zsh diff --git a/zsh/.local/bin/sort_timings.zsh b/zsh/.local/bin/sort_timings.zsh new file mode 100755 index 0000000..93b00e0 --- /dev/null +++ b/zsh/.local/bin/sort_timings.zsh @@ -0,0 +1,27 @@ +#!/usr/bin/env zsh + +typeset -a lines +typeset -i prev_time=0 +typeset prev_command + +while read line; do + if [[ $line =~ '^.*\+([0-9]{10})\.([0-9]{6})[0-9]* (.+)' ]]; then + integer this_time=$match[1]$match[2] + + if [[ $prev_time -gt 0 ]]; then + time_difference=$(( $this_time - $prev_time )) + lines+="$time_difference $prev_command" + fi + + prev_time=$this_time + + local this_command=$match[3] + if [[ ${#this_command} -le 80 ]]; then + prev_command=$this_command + else + prev_command="${this_command:0:180}..." + fi + fi +done < ${1:-/dev/stdin} + +print -l ${(@On)lines} diff --git a/zsh/.local/share/dotfiles/edit-config.d/zprofile b/zsh/.local/share/dotfiles/edit-config.d/zprofile new file mode 120000 index 0000000..96b0aae --- /dev/null +++ b/zsh/.local/share/dotfiles/edit-config.d/zprofile @@ -0,0 +1 @@ +../../../../.config/zsh/.zprofile
\ No newline at end of file diff --git a/zsh/.local/share/dotfiles/edit-config.d/zsh_plugins.txt b/zsh/.local/share/dotfiles/edit-config.d/zsh_plugins.txt new file mode 120000 index 0000000..ec2c45e --- /dev/null +++ b/zsh/.local/share/dotfiles/edit-config.d/zsh_plugins.txt @@ -0,0 +1 @@ +../../../../.config/zsh/zsh_plugins.txt
\ No newline at end of file diff --git a/zsh/.local/share/dotfiles/edit-config.d/zshenv b/zsh/.local/share/dotfiles/edit-config.d/zshenv new file mode 120000 index 0000000..3a3f968 --- /dev/null +++ b/zsh/.local/share/dotfiles/edit-config.d/zshenv @@ -0,0 +1 @@ +../../../../.zshenv
\ No newline at end of file diff --git a/zsh/.local/share/dotfiles/edit-config.d/zshrc b/zsh/.local/share/dotfiles/edit-config.d/zshrc new file mode 120000 index 0000000..3190f08 --- /dev/null +++ b/zsh/.local/share/dotfiles/edit-config.d/zshrc @@ -0,0 +1 @@ +../../../../.config/zsh/.zshrc
\ No newline at end of file diff --git a/zsh/.local/share/zsh/functions/_deno b/zsh/.local/share/zsh/functions/_deno new file mode 100644 index 0000000..7a6a7b4 --- /dev/null +++ b/zsh/.local/share/zsh/functions/_deno @@ -0,0 +1,489 @@ +#compdef deno + +autoload -U is-at-least + +_deno() { + typeset -A opt_args + typeset -a _arguments_options + local ret=1 + + if is-at-least 5.2; then + _arguments_options=(-s -S -C) + else + _arguments_options=(-s -C) + fi + + local context curcontext="$curcontext" state line + _arguments "${_arguments_options[@]}" \ +'-L+[Set log level]: :(debug info)' \ +'--log-level=[Set log level]: :(debug info)' \ +'-q[Suppress diagnostic output]' \ +'--quiet[Suppress diagnostic output]' \ +'-h[Prints help information]' \ +'--help[Prints help information]' \ +'-V[Prints version information]' \ +'--version[Prints version information]' \ +":: :_deno_commands" \ +"*::: :->deno" \ +&& ret=0 + case $state in + (deno) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:deno-command-$line[1]:" + case $line[1] in + (bundle) +_arguments "${_arguments_options[@]}" \ +'--lock=[Check the specified lock file]' \ +'--cert=[Load certificate authority from PEM encoded file]' \ +'-r+[Reload source code cache (recompile TypeScript)]' \ +'--reload=[Reload source code cache (recompile TypeScript)]' \ +'--importmap=[UNSTABLE: Load import map file]' \ +'-c+[Load tsconfig.json configuration file]' \ +'--config=[Load tsconfig.json configuration file]' \ +'-L+[Set log level]: :(debug info)' \ +'--log-level=[Set log level]: :(debug info)' \ +'--lock-write[Write lock file. Use with --lock.]' \ +'--unstable[Enable unstable APIs]' \ +'-h[Prints help information]' \ +'--help[Prints help information]' \ +'-V[Prints version information]' \ +'--version[Prints version information]' \ +'-q[Suppress diagnostic output]' \ +'--quiet[Suppress diagnostic output]' \ +':source_file:_files' \ +'::out_file:_files' \ +&& ret=0 +;; +(cache) +_arguments "${_arguments_options[@]}" \ +'-r+[Reload source code cache (recompile TypeScript)]' \ +'--reload=[Reload source code cache (recompile TypeScript)]' \ +'--lock=[Check the specified lock file]' \ +'--importmap=[UNSTABLE: Load import map file]' \ +'-c+[Load tsconfig.json configuration file]' \ +'--config=[Load tsconfig.json configuration file]' \ +'--cert=[Load certificate authority from PEM encoded file]' \ +'-L+[Set log level]: :(debug info)' \ +'--log-level=[Set log level]: :(debug info)' \ +'--lock-write[Write lock file. Use with --lock.]' \ +'--unstable[Enable unstable APIs]' \ +'--no-check[Skip type checking modules]' \ +'--no-remote[Do not resolve remote modules]' \ +'-h[Prints help information]' \ +'--help[Prints help information]' \ +'-V[Prints version information]' \ +'--version[Prints version information]' \ +'-q[Suppress diagnostic output]' \ +'--quiet[Suppress diagnostic output]' \ +':file:_files' \ +&& ret=0 +;; +(completions) +_arguments "${_arguments_options[@]}" \ +'-L+[Set log level]: :(debug info)' \ +'--log-level=[Set log level]: :(debug info)' \ +'-h[Prints help information]' \ +'--help[Prints help information]' \ +'-V[Prints version information]' \ +'--version[Prints version information]' \ +'-q[Suppress diagnostic output]' \ +'--quiet[Suppress diagnostic output]' \ +':shell:(zsh bash fish powershell elvish)' \ +&& ret=0 +;; +(doc) +_arguments "${_arguments_options[@]}" \ +'-r+[Reload source code cache (recompile TypeScript)]' \ +'--reload=[Reload source code cache (recompile TypeScript)]' \ +'-L+[Set log level]: :(debug info)' \ +'--log-level=[Set log level]: :(debug info)' \ +'--unstable[Enable unstable APIs]' \ +'--json[Output documentation in JSON format.]' \ +'--private[Output private documentation]' \ +'-h[Prints help information]' \ +'--help[Prints help information]' \ +'-V[Prints version information]' \ +'--version[Prints version information]' \ +'-q[Suppress diagnostic output]' \ +'--quiet[Suppress diagnostic output]' \ +'::source_file:_files' \ +'::filter -- Dot separated path to symbol.:_files' \ +&& ret=0 +;; +(eval) +_arguments "${_arguments_options[@]}" \ +'--inspect=[activate inspector on host:port (default: 127.0.0.1:9229)]' \ +'--inspect-brk=[activate inspector on host:port and break at start of user script]' \ +'--cert=[Load certificate authority from PEM encoded file]' \ +'--v8-flags=[Set V8 command line options. For help: --v8-flags=--help]' \ +'-L+[Set log level]: :(debug info)' \ +'--log-level=[Set log level]: :(debug info)' \ +'--unstable[Enable unstable APIs]' \ +'-T[Treat eval input as TypeScript]' \ +'--ts[Treat eval input as TypeScript]' \ +'-p[print result to stdout]' \ +'--print[print result to stdout]' \ +'-h[Prints help information]' \ +'--help[Prints help information]' \ +'-V[Prints version information]' \ +'--version[Prints version information]' \ +'-q[Suppress diagnostic output]' \ +'--quiet[Suppress diagnostic output]' \ +':code:_files' \ +&& ret=0 +;; +(fmt) +_arguments "${_arguments_options[@]}" \ +'--ignore=[Ignore formatting particular source files. Use with --unstable]' \ +'-L+[Set log level]: :(debug info)' \ +'--log-level=[Set log level]: :(debug info)' \ +'--check[Check if the source files are formatted.]' \ +'--unstable[Enable unstable APIs]' \ +'-h[Prints help information]' \ +'--help[Prints help information]' \ +'-V[Prints version information]' \ +'--version[Prints version information]' \ +'-q[Suppress diagnostic output]' \ +'--quiet[Suppress diagnostic output]' \ +'::files:_files' \ +&& ret=0 +;; +(info) +_arguments "${_arguments_options[@]}" \ +'-r+[Reload source code cache (recompile TypeScript)]' \ +'--reload=[Reload source code cache (recompile TypeScript)]' \ +'--cert=[Load certificate authority from PEM encoded file]' \ +'-L+[Set log level]: :(debug info)' \ +'--log-level=[Set log level]: :(debug info)' \ +'--no-check[Skip type checking modules]' \ +'--unstable[Enable unstable APIs]' \ +'--json[Outputs the information in JSON format]' \ +'-h[Prints help information]' \ +'--help[Prints help information]' \ +'-V[Prints version information]' \ +'--version[Prints version information]' \ +'-q[Suppress diagnostic output]' \ +'--quiet[Suppress diagnostic output]' \ +'::file:_files' \ +&& ret=0 +;; +(install) +_arguments "${_arguments_options[@]}" \ +'--allow-read=[Allow file system read access]' \ +'--allow-write=[Allow file system write access]' \ +'--allow-net=[Allow network access]' \ +'-n+[Executable file name]' \ +'--name=[Executable file name]' \ +'--root=[Installation root]' \ +'--cert=[Load certificate authority from PEM encoded file]' \ +'-c+[Load tsconfig.json configuration file]' \ +'--config=[Load tsconfig.json configuration file]' \ +'-L+[Set log level]: :(debug info)' \ +'--log-level=[Set log level]: :(debug info)' \ +'--allow-env[Allow environment access]' \ +'--allow-run[Allow running subprocesses]' \ +'--allow-plugin[Allow loading plugins]' \ +'--allow-hrtime[Allow high resolution time measurement]' \ +'-A[Allow all permissions]' \ +'--allow-all[Allow all permissions]' \ +'-f[Forcefully overwrite existing installation]' \ +'--force[Forcefully overwrite existing installation]' \ +'--no-check[Skip type checking modules]' \ +'--unstable[Enable unstable APIs]' \ +'-h[Prints help information]' \ +'--help[Prints help information]' \ +'-V[Prints version information]' \ +'--version[Prints version information]' \ +'-q[Suppress diagnostic output]' \ +'--quiet[Suppress diagnostic output]' \ +':cmd:_files' \ +&& ret=0 +;; +(lint) +_arguments "${_arguments_options[@]}" \ +'--ignore=[Ignore linting particular source files.]' \ +'-L+[Set log level]: :(debug info)' \ +'--log-level=[Set log level]: :(debug info)' \ +'--unstable[Enable unstable APIs]' \ +'--rules[List available rules]' \ +'--json[Output lint result in JSON format.]' \ +'-h[Prints help information]' \ +'--help[Prints help information]' \ +'-V[Prints version information]' \ +'--version[Prints version information]' \ +'-q[Suppress diagnostic output]' \ +'--quiet[Suppress diagnostic output]' \ +'::files:_files' \ +&& ret=0 +;; +(repl) +_arguments "${_arguments_options[@]}" \ +'--inspect=[activate inspector on host:port (default: 127.0.0.1:9229)]' \ +'--inspect-brk=[activate inspector on host:port and break at start of user script]' \ +'--v8-flags=[Set V8 command line options. For help: --v8-flags=--help]' \ +'--cert=[Load certificate authority from PEM encoded file]' \ +'-L+[Set log level]: :(debug info)' \ +'--log-level=[Set log level]: :(debug info)' \ +'--unstable[Enable unstable APIs]' \ +'-h[Prints help information]' \ +'--help[Prints help information]' \ +'-V[Prints version information]' \ +'--version[Prints version information]' \ +'-q[Suppress diagnostic output]' \ +'--quiet[Suppress diagnostic output]' \ +&& ret=0 +;; +(run) +_arguments "${_arguments_options[@]}" \ +'--inspect=[activate inspector on host:port (default: 127.0.0.1:9229)]' \ +'--inspect-brk=[activate inspector on host:port and break at start of user script]' \ +'--allow-read=[Allow file system read access]' \ +'--allow-write=[Allow file system write access]' \ +'--allow-net=[Allow network access]' \ +'--importmap=[UNSTABLE: Load import map file]' \ +'-r+[Reload source code cache (recompile TypeScript)]' \ +'--reload=[Reload source code cache (recompile TypeScript)]' \ +'-c+[Load tsconfig.json configuration file]' \ +'--config=[Load tsconfig.json configuration file]' \ +'--lock=[Check the specified lock file]' \ +'--v8-flags=[Set V8 command line options. For help: --v8-flags=--help]' \ +'--cert=[Load certificate authority from PEM encoded file]' \ +'--seed=[Seed Math.random()]' \ +'-L+[Set log level]: :(debug info)' \ +'--log-level=[Set log level]: :(debug info)' \ +'--allow-env[Allow environment access]' \ +'--allow-run[Allow running subprocesses]' \ +'--allow-plugin[Allow loading plugins]' \ +'--allow-hrtime[Allow high resolution time measurement]' \ +'-A[Allow all permissions]' \ +'--allow-all[Allow all permissions]' \ +'--unstable[Enable unstable APIs]' \ +'--lock-write[Write lock file. Use with --lock.]' \ +'--no-check[Skip type checking modules]' \ +'--no-remote[Do not resolve remote modules]' \ +'--cached-only[Require that remote dependencies are already cached]' \ +'-h[Prints help information]' \ +'--help[Prints help information]' \ +'-V[Prints version information]' \ +'--version[Prints version information]' \ +'-q[Suppress diagnostic output]' \ +'--quiet[Suppress diagnostic output]' \ +':script_arg -- script args:_files' \ +&& ret=0 +;; +(test) +_arguments "${_arguments_options[@]}" \ +'--inspect=[activate inspector on host:port (default: 127.0.0.1:9229)]' \ +'--inspect-brk=[activate inspector on host:port and break at start of user script]' \ +'--allow-read=[Allow file system read access]' \ +'--allow-write=[Allow file system write access]' \ +'--allow-net=[Allow network access]' \ +'--importmap=[UNSTABLE: Load import map file]' \ +'-r+[Reload source code cache (recompile TypeScript)]' \ +'--reload=[Reload source code cache (recompile TypeScript)]' \ +'-c+[Load tsconfig.json configuration file]' \ +'--config=[Load tsconfig.json configuration file]' \ +'--lock=[Check the specified lock file]' \ +'--v8-flags=[Set V8 command line options. For help: --v8-flags=--help]' \ +'--cert=[Load certificate authority from PEM encoded file]' \ +'--seed=[Seed Math.random()]' \ +'--filter=[Run tests with this string or pattern in the test name]' \ +'-L+[Set log level]: :(debug info)' \ +'--log-level=[Set log level]: :(debug info)' \ +'--allow-env[Allow environment access]' \ +'--allow-run[Allow running subprocesses]' \ +'--allow-plugin[Allow loading plugins]' \ +'--allow-hrtime[Allow high resolution time measurement]' \ +'-A[Allow all permissions]' \ +'--allow-all[Allow all permissions]' \ +'--unstable[Enable unstable APIs]' \ +'--lock-write[Write lock file. Use with --lock.]' \ +'--no-check[Skip type checking modules]' \ +'--no-remote[Do not resolve remote modules]' \ +'--cached-only[Require that remote dependencies are already cached]' \ +'--failfast[Stop on first error]' \ +'--allow-none[Don'\''t return error code if no test files are found]' \ +'-h[Prints help information]' \ +'--help[Prints help information]' \ +'-V[Prints version information]' \ +'--version[Prints version information]' \ +'-q[Suppress diagnostic output]' \ +'--quiet[Suppress diagnostic output]' \ +'::files -- List of file names to run:_files' \ +&& ret=0 +;; +(types) +_arguments "${_arguments_options[@]}" \ +'-L+[Set log level]: :(debug info)' \ +'--log-level=[Set log level]: :(debug info)' \ +'--unstable[Enable unstable APIs]' \ +'-h[Prints help information]' \ +'--help[Prints help information]' \ +'-V[Prints version information]' \ +'--version[Prints version information]' \ +'-q[Suppress diagnostic output]' \ +'--quiet[Suppress diagnostic output]' \ +&& ret=0 +;; +(upgrade) +_arguments "${_arguments_options[@]}" \ +'--version=[The version to upgrade to]' \ +'--output=[The path to output the updated version to]' \ +'--cert=[Load certificate authority from PEM encoded file]' \ +'-L+[Set log level]: :(debug info)' \ +'--log-level=[Set log level]: :(debug info)' \ +'--dry-run[Perform all checks without replacing old exe]' \ +'-f[Replace current exe even if not out-of-date]' \ +'--force[Replace current exe even if not out-of-date]' \ +'-h[Prints help information]' \ +'--help[Prints help information]' \ +'-q[Suppress diagnostic output]' \ +'--quiet[Suppress diagnostic output]' \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" \ +'-L+[Set log level]: :(debug info)' \ +'--log-level=[Set log level]: :(debug info)' \ +'-h[Prints help information]' \ +'--help[Prints help information]' \ +'-V[Prints version information]' \ +'--version[Prints version information]' \ +'-q[Suppress diagnostic output]' \ +'--quiet[Suppress diagnostic output]' \ +&& ret=0 +;; + esac + ;; +esac +} + +(( $+functions[_deno_commands] )) || +_deno_commands() { + local commands; commands=( + "bundle:Bundle module and dependencies into single file" \ +"cache:Cache the dependencies" \ +"completions:Generate shell completions" \ +"doc:Show documentation for a module" \ +"eval:Eval script" \ +"fmt:Format source files" \ +"info:Show info about cache or info related to source file" \ +"install:Install script as an executable" \ +"lint:Lint source files" \ +"repl:Read Eval Print Loop" \ +"run:Run a program given a filename or url to the module. Use '-' as a filename to read from stdin." \ +"test:Run tests" \ +"types:Print runtime TypeScript declarations" \ +"upgrade:Upgrade deno executable to given version" \ +"help:Prints this message or the help of the given subcommand(s)" \ + ) + _describe -t commands 'deno commands' commands "$@" +} +(( $+functions[_deno__bundle_commands] )) || +_deno__bundle_commands() { + local commands; commands=( + + ) + _describe -t commands 'deno bundle commands' commands "$@" +} +(( $+functions[_deno__cache_commands] )) || +_deno__cache_commands() { + local commands; commands=( + + ) + _describe -t commands 'deno cache commands' commands "$@" +} +(( $+functions[_deno__completions_commands] )) || +_deno__completions_commands() { + local commands; commands=( + + ) + _describe -t commands 'deno completions commands' commands "$@" +} +(( $+functions[_deno__doc_commands] )) || +_deno__doc_commands() { + local commands; commands=( + + ) + _describe -t commands 'deno doc commands' commands "$@" +} +(( $+functions[_deno__eval_commands] )) || +_deno__eval_commands() { + local commands; commands=( + + ) + _describe -t commands 'deno eval commands' commands "$@" +} +(( $+functions[_deno__fmt_commands] )) || +_deno__fmt_commands() { + local commands; commands=( + + ) + _describe -t commands 'deno fmt commands' commands "$@" +} +(( $+functions[_deno__help_commands] )) || +_deno__help_commands() { + local commands; commands=( + + ) + _describe -t commands 'deno help commands' commands "$@" +} +(( $+functions[_deno__info_commands] )) || +_deno__info_commands() { + local commands; commands=( + + ) + _describe -t commands 'deno info commands' commands "$@" +} +(( $+functions[_deno__install_commands] )) || +_deno__install_commands() { + local commands; commands=( + + ) + _describe -t commands 'deno install commands' commands "$@" +} +(( $+functions[_deno__lint_commands] )) || +_deno__lint_commands() { + local commands; commands=( + + ) + _describe -t commands 'deno lint commands' commands "$@" +} +(( $+functions[_deno__repl_commands] )) || +_deno__repl_commands() { + local commands; commands=( + + ) + _describe -t commands 'deno repl commands' commands "$@" +} +(( $+functions[_deno__run_commands] )) || +_deno__run_commands() { + local commands; commands=( + + ) + _describe -t commands 'deno run commands' commands "$@" +} +(( $+functions[_deno__test_commands] )) || +_deno__test_commands() { + local commands; commands=( + + ) + _describe -t commands 'deno test commands' commands "$@" +} +(( $+functions[_deno__types_commands] )) || +_deno__types_commands() { + local commands; commands=( + + ) + _describe -t commands 'deno types commands' commands "$@" +} +(( $+functions[_deno__upgrade_commands] )) || +_deno__upgrade_commands() { + local commands; commands=( + + ) + _describe -t commands 'deno upgrade commands' commands "$@" +} + +_deno "$@"
\ No newline at end of file diff --git a/zsh/.local/share/zsh/functions/start_zsh_profile b/zsh/.local/share/zsh/functions/start_zsh_profile new file mode 100644 index 0000000..5a81968 --- /dev/null +++ b/zsh/.local/share/zsh/functions/start_zsh_profile @@ -0,0 +1,13 @@ +# -*- mode: conf-space;-*- +# vim: syntax=zsh + +zmodload zsh/datetime +setopt PROMPT_SUBST +PS4='+$EPOCHREALTIME %N:%i> ' + +logfile=$(mktemp zsh_profile.XXXXXXXX) +echo "Logging to $logfile" +exec 3>&2 2>$logfile + +setopt XTRACE + diff --git a/zsh/.local/share/zsh/functions/stop_zsh_profile b/zsh/.local/share/zsh/functions/stop_zsh_profile new file mode 100644 index 0000000..8f91716 --- /dev/null +++ b/zsh/.local/share/zsh/functions/stop_zsh_profile @@ -0,0 +1,6 @@ +# -*- mode: conf-space;-*- +# vim: syntax=zsh + +unsetopt XTRACE +exec 2>&3 3>&- + diff --git a/zsh/.zshenv b/zsh/.zshenv index ca10a3f..8b585a9 100644 --- a/zsh/.zshenv +++ b/zsh/.zshenv @@ -1,7 +1,14 @@ -export EDITOR="nvim" +export PAGER="/usr/bin/less" +export EDITOR="/usr/bin/nvim" +export VISUAL="/usr/bin/nvim" +export TERMINAL="/usr/bin/alacritty" +export BROWSER="/usr/bin/firefox-developer-edition" export DEFAULT_USER=peter +export SSH_ASKPASS="$HOME/.local/bin/dmenu_pass" +export SUDO_ASKPASS="$HOME/.local/bin/dmenu_pass" + export XDG_CONFIG_HOME="$HOME/.config" export XDG_CACHE_HOME="$HOME/.cache" @@ -9,16 +16,17 @@ export XDG_DATA_HOME="$HOME/.local/share" export ZDOTDIR="$XDG_CONFIG_HOME/zsh" -extra_paths="" +typeset -U PATH path +path=("$path[@]") # RUST XDG_DIR export RUSTUP_HOME="$XDG_DATA_HOME/rustup" export CARGO_HOME="$XDG_DATA_HOME/cargo" -extra_paths="$CARGO_HOME/bin" +path=("$CARGO_HOME/bin" "$path[@]") # GOPATH export GOPATH="$XDG_DATA_HOME/go" -extra_paths="$extra_paths:$GOPATH/bin" +path=("$GOPATH/bin" "$path[@]") # Ruby export GEM_HOME="$XDG_DATA_HOME/gem" @@ -26,13 +34,13 @@ export GEM_SPEC_CACHE="$XDG_CACHE_HOME/gem" export BUNDLE_USER_CONFIG="$XDG_CONFIG_HOME/bundle" export BUNDLE_USER_CACHE="$XDG_CACHE_HOME/bundle" export BUNDLE_USER_PLUGIN="$XDG_DATA_HOME/bundle" -extra_paths="$extra_paths:$GEM_HOME/bin" +path=("$GEM_HOME/bin" "$path[@]") # Node & NPM export NODE_REPL_HISTORY="$XDG_DATA_HOME/node_repl_history" export npm_config_prefix="$XDG_DATA_HOME/node" export NPM_CONFIG_USERCONFIG="$XDG_CONFIG_HOME/npm/npmrc" -extra_paths="$extra_paths:$npm_config_prefix/bin" +path=("$npm_config_prefix/bin" "$path[@]") # Docker export DOCKER_CONFIG="$XDG_CONFIG_HOME/docker" @@ -54,11 +62,16 @@ export PYLINTHOME="$XDG_CACHE_HOME/pylint" export WINEPREFIX="$XDG_DATA_HOME/wineprefixes/default" export WGETRC="$XDG_CONFIG_HOME/wget/wgetrc" -[ -d "$HOME/bin" ] && \ - PATH="$HOME/bin:$PATH" -[ -d "$HOME/.bin" ] && \ - PATH="$HOME/.bin:$PATH" -[ -d "$HOME/.local/bin" ] && \ - PATH="$HOME/.local/bin:$PATH" -export PATH="$extra_paths:$PATH" +#[ -d "$HOME/bin" ] && \ +# path=("$HOME/bin" "$path[@]") +#[ -d "$HOME/.bin" ] && \ +# path=("$HOME/.bin" "$path[@]") +#[ -d "$HOME/.local/bin" ] && \ +# path=("$HOME/.local/bin" "$path[@]") +for dir in ~/bin ~/.bin ~/.local/bin; do + if [[ -d "${dir}" ]]; then + path=($dir $path) + fi +done +export PATH |
