<commit_before>set --export PATH /usr/local/bin $PATH

. ~/.config/fish/aliases.fish

eval (python -m virtualfish auto_activation)

set --export XKB_DEFAULT_LAYOUT us
set --export TERMINAL kitty
set --export BROWSER /usr/bin/firefox-nightly

# Encourage programs to use Wayland
# see: https://github.com/swaywm/sway/wiki/Running-programs-natively-under-wayland
set --export CLUTTER_BACKEND wayland
# only for GTK3+. Breaks ibus widget and google-chrome atm.
#set --export GDK_BACKEND wayland
set --export MOZ_ENABLE_WAYLAND 1
set --export MOZ_WEBRENDER 1
set --export ECORE_EVAS_ENGINE wayland_egl
set --export ELM_ENGINE wayland_egl
set --export QT_QPA_PLATFORM wayland-egl
set --export QT_WAYLAND_DISABLE_WINDOWDECORATION 1
set --export SDL_VIDEODRIVER wayland
set --export _JAVA_AWT_WM_NONREPARENTING 1

# Encourage use of XDG dirs
set --export XDG_CACHE_HOME ~/.cache
set --export XDG_CONFIG_HOME ~/.config
set --export XDG_DATA_HOME ~/.local/share
set --export XDG_RUNTIME_DIR /run/user/(id -u)
set --export DVDCSS_CACHE $XDG_DATA_HOME/dvdcss
set --export GNUPGHOME $XDG_CONFIG_HOME/gnupg
set --export ICEAUTHORITY $XDG_RUNTIME_DIR/ICEauthority
set --export LESSHISTFILE $XDG_CACHE_HOME/less/history
set --export LESSKEY $XDG_CONFIG_HOME/less/lesskey
set --export MPLAYER_HOME $XDG_CONFIG_HOME/mplayer
set --export WGETRC $XDG_CONFIG_HOME/wget/wgetrc
set --export XAUTHORITY $XDG_RUNTIME_DIR/Xauthority
set --export XINITRC $XDG_CONFIG_HOME/X11/xinitrc

# For Japanese IME support
set --export GTK_IM_MODULE ibus
set --export QT_IM_MODULE ibus
set --export XMODIFIERS @im=ibus
set --export DefaultIMModule ibus

# User experience improvements over SSH
if set --query SSH_CLIENT
  if ! set --query XDG_RUNTIME_DIR
    set --export XDG_RUNTIME_DIR /run/user/(id -u)
  end

  if ! set --query GPG_TTY
    set --export GPG_TTY (tty)
  end

  if ! set --query DBUS_SESSION_BUS_ADDRESS
    set --local dbus_session_file $HOME/.dbus/session-bus/(cat /var/lib/dbus/machine-id)-0
    if test -e $dbus_session_file
      set --export DBUS_SESSION_BUS_ADDRESS (grep "^DBUS_SESSION_BUS_ADDRESS=" $dbus_session_file)
    end
  end

  if ! set --query SWAYSOCK
    set --export SWAYSOCK (ls /run/user/1000/sway-ipc.* | head --lines 1)
  end

  # easier to use on phone
  set ip (string match --regex "(\d+.\d+.\d+.\d)" $SSH_CONNECTION)[2]
  if test $ip = 10.8.7.2
    set GIT_EDITOR nano
  end
end

# Abbreviations (text expansion)
abbr --add gp 'git push'
#abbr --add mv 'smv'

# Other
set --export FZF_DEFAULT_COMMAND "fd --type f"

# Used in my fish functions
set --export AMMCON_URL https://ammcon:port
set --export SCREENSHOT_DIR $HOME/Dropbox/screenshots<commit_msg>Get socket for currently running sway instance<commit_after>set --export PATH /usr/local/bin $PATH

. ~/.config/fish/aliases.fish

eval (python -m virtualfish auto_activation)

set --export XKB_DEFAULT_LAYOUT us
set --export TERMINAL kitty
set --export BROWSER /usr/bin/firefox-nightly

# Encourage programs to use Wayland
# see: https://github.com/swaywm/sway/wiki/Running-programs-natively-under-wayland
set --export CLUTTER_BACKEND wayland
# only for GTK3+. Breaks ibus widget and google-chrome atm.
#set --export GDK_BACKEND wayland
set --export MOZ_ENABLE_WAYLAND 1
set --export MOZ_WEBRENDER 1
set --export ECORE_EVAS_ENGINE wayland_egl
set --export ELM_ENGINE wayland_egl
set --export QT_QPA_PLATFORM wayland-egl
set --export QT_WAYLAND_DISABLE_WINDOWDECORATION 1
set --export SDL_VIDEODRIVER wayland
set --export _JAVA_AWT_WM_NONREPARENTING 1

# Encourage use of XDG dirs
set --export XDG_CACHE_HOME ~/.cache
set --export XDG_CONFIG_HOME ~/.config
set --export XDG_DATA_HOME ~/.local/share
set --export XDG_RUNTIME_DIR /run/user/(id -u)
set --export DVDCSS_CACHE $XDG_DATA_HOME/dvdcss
set --export GNUPGHOME $XDG_CONFIG_HOME/gnupg
set --export ICEAUTHORITY $XDG_RUNTIME_DIR/ICEauthority
set --export LESSHISTFILE $XDG_CACHE_HOME/less/history
set --export LESSKEY $XDG_CONFIG_HOME/less/lesskey
set --export MPLAYER_HOME $XDG_CONFIG_HOME/mplayer
set --export WGETRC $XDG_CONFIG_HOME/wget/wgetrc
set --export XAUTHORITY $XDG_RUNTIME_DIR/Xauthority
set --export XINITRC $XDG_CONFIG_HOME/X11/xinitrc

# For Japanese IME support
set --export GTK_IM_MODULE ibus
set --export QT_IM_MODULE ibus
set --export XMODIFIERS @im=ibus
set --export DefaultIMModule ibus

# User experience improvements over SSH
if set --query SSH_CLIENT
  if ! set --query XDG_RUNTIME_DIR
    set --export XDG_RUNTIME_DIR /run/user/(id -u)
  end

  set --export GPG_TTY (tty)

  if ! set --query DBUS_SESSION_BUS_ADDRESS
    set --local dbus_session_file $HOME/.dbus/session-bus/(cat /var/lib/dbus/machine-id)-0
    if test -e $dbus_session_file
      set --export DBUS_SESSION_BUS_ADDRESS (grep "^DBUS_SESSION_BUS_ADDRESS=" $dbus_session_file)
    end
  end

  if ! set --query SWAYSOCK
    set --export SWAYSOCK /run/user/(id -u)/sway-ipc.(id -u)/(pidof sway).sock
  end

  # easier to use on phone
  set ip (string match --regex "(\d+.\d+.\d+.\d)" $SSH_CONNECTION)[2]
  if test $ip = 10.8.7.2
    set GIT_EDITOR nano
  end
end

# Abbreviations (text expansion)
abbr --add gp 'git push'
#abbr --add mv 'smv'

# Other
set --export FZF_DEFAULT_COMMAND "fd --type f"

# Used in my fish functions
set --export AMMCON_URL https://ammcon:port
set --export SCREENSHOT_DIR $HOME/Dropbox/screenshots
{'fraction_non_alphanumeric': 0.10264589979358228, 'fraction_numerical': 0.006192531431788328, 'mean_word_length': 3.9034038638454462, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '217402', 'n_tokens_mistral': 2086, 'n_tokens_neox': 1968, 'n_words': 543}