Various fixes to fish config

54774000137f5e2857c7fb9e1b47eaa668e3593a
Alexis Sellier committed ago 1 parent c3df872b
.config/fish/config.fish +27 -8
9 9
  "$HOME/.cargo/bin" \
10 10
  "$HOME/.npm/bin" \
11 11
  "$HOME/.local/share/gem/ruby/3.4.0/bin" \
12 12
  "$HOME/.proto/shims" \
13 13
  "$HOME/.proto/bin" \
14 +
  "$HOME/.local/share/pnpm/bin" \
14 15
  $PATH
15 16
set -gx EDITOR nvim
16 17
set -gx VISUAL nvim
17 18
set -gx RIPGREP_CONFIG_PATH "$HOME/.rgrc"
18 19
set -gx CARGO_BUILD_JOBS 12
20 +
set -gx PNPM_HOME "$HOME/.local/share/pnpm"
19 21
20 22
if status is-interactive
21 23
  fish_vi_key_bindings
22 24
23 25
  set -g fish_greeting
26 28
  set fish_cursor_default block
27 29
  set fish_cursor_insert underscore
28 30
  set fish_cursor_replace_one underscore
29 31
  set fish_cursor_visual block
30 32
33 +
  set -l ssh_keys \
34 +
    ~/.ssh/id_ed25519 \
35 +
    ~/.ssh/id_rsa \
36 +
    ~/.ssh/id_rsa_share \
37 +
    ~/.radicle/keys/radicle \
38 +
    ~/.ssh/alexis.radiant.computer
39 +
  set -l keychain_env ~/.keychain/(uname -n)-fish
40 +
31 41
  if set -q SSH_AUTH_SOCK
32 42
    if not test -S "$SSH_AUTH_SOCK"
33 43
      set -e SSH_AUTH_SOCK
34 44
      set -e SSH_AGENT_PID
35 -
    else if type -q ssh-add
45 +
    end
46 +
  end
47 +
48 +
  if status is-login; and type -q ssh-add; and set -q SSH_AUTH_SOCK
49 +
    if test -S "$SSH_AUTH_SOCK"
36 50
      ssh-add -l >/dev/null 2>&1
37 51
      if test $status -eq 2
38 52
        set -e SSH_AUTH_SOCK
39 53
        set -e SSH_AGENT_PID
54 +
      else if test $status -eq 1
55 +
        set -e SSH_AUTH_SOCK
56 +
        set -e SSH_AGENT_PID
40 57
      end
41 58
    end
42 59
  end
43 60
44 61
  if status is-login; and type -q keychain
45 -
    keychain --eval --quiet --noinherit \
46 -
      ~/.ssh/id_ed25519 \
47 -
      ~/.ssh/id_rsa \
48 -
      ~/.ssh/id_rsa_share \
49 -
      ~/.radicle/keys/radicle \
50 -
      ~/.ssh/alexis.radiant.computer | source
62 +
    keychain --eval --quiet --noinherit $ssh_keys | source
51 63
  else if not set -q SSH_AUTH_SOCK
52 -
    set -l keychain_env ~/.keychain/(uname -n)-fish
53 64
    if test -r "$keychain_env"
54 65
      source "$keychain_env"
55 66
    end
56 67
  end
57 68
94 105
  alias shred "shred -uvz"
95 106
  alias diskusage ncdu
96 107
  alias calc kalk
97 108
  alias t tree-git-ignore
98 109
  alias sql3 "sqlite3 -box"
110 +
  alias mysql mariadb
111 +
112 +
  function awsx
113 +
    set -l profile (aws configure list-profiles | fzf --prompt "AWS profile: ")
114 +
    test -n "$profile"; or return 1
115 +
    set -gx AWS_PROFILE "$profile"
116 +
    echo "AWS_PROFILE=$AWS_PROFILE"
117 +
  end
99 118
100 119
  function e
101 120
    $EDITOR $argv
102 121
  end
103 122
.config/hypr/hyprland.conf +4 -4
10 10
monitor = , preferred, auto, 1.5
11 11
12 12
env = MOZ_ENABLE_WAYLAND,1
13 13
env = QT_QPA_PLATFORM,wayland;xcb
14 14
15 -
# Start one terminal when the session opens.
16 -
exec-once = $terminal
15 +
# Start one login terminal when the session opens so keychain can prompt once.
16 +
exec-once = $terminal --login-shell
17 17
# Start the bottom status bar with Hyprland workspace support.
18 18
exec-once = $bar
19 19
# Set the desktop wallpaper.
20 20
exec-once = hyprpaper
21 21
# Keep the screenshot tray helper available for the Print binding.
102 102
bind = $mod SHIFT, Q, exit
103 103
bind = $mod, Q, exec, hyprctl reload
104 104
105 105
# Existing practical bindings retained from the Sway setup.
106 106
bind = $mod, X, exec, swaylock -f -c 000000
107 +
bind = $mod SHIFT, S, exec, systemctl suspend
107 108
bind = $mod SHIFT, L, exec, sh -c 'cliphist list | fuzzel --dmenu --width 100 | cliphist decode | wl-copy'
108 109
bind = $mod, F, fullscreen, 1
109 110
bind = $mod SHIFT, F, fullscreen
110 -
bind = $mod SHIFT, minus, movetoworkspacesilent, special
111 -
bind = $mod, minus, togglespecialworkspace
112 111
bind = , Print, exec, flameshot gui
113 112
114 113
bind = $mod, 1, workspace, 1
115 114
bind = $mod, 2, workspace, 2
116 115
bind = $mod, 3, workspace, 3
146 145
bind = , XF86AudioRaiseVolume, exec, pactl set-sink-volume @DEFAULT_SINK@ +5%
147 146
bind = , XF86AudioMicMute, exec, pactl set-source-mute @DEFAULT_SOURCE@ toggle
148 147
bind = , XF86MonBrightnessDown, exec, brightnessctl set 5%-
149 148
bind = , XF86MonBrightnessUp, exec, brightnessctl set 5%+
150 149
150 +
bind = $mod, mouse:272, setfloating
151 151
bindm = $mod, mouse:272, movewindow
152 152
bindm = $mod, mouse:273, resizewindow
153 153
154 154
windowrule = match:class ^(org.keepassxc.KeePassXC)$, float on
155 155
windowrule = match:class ^(org.pulseaudio.pavucontrol)$, float on
.config/waybar/config +2 -2
1 1
{
2 2
  "layer": "top",
3 3
  "position": "bottom",
4 4
  "height": 30,
5 5
  "spacing": 8,
6 -
  "modules-left": [ "hyprland/workspaces" ],
7 -
  "modules-center": [ "hyprland/window" ],
6 +
  "modules-left": [ "hyprland/workspaces", "niri/workspaces" ],
7 +
  "modules-center": [ "hyprland/window", "niri/window" ],
8 8
  "modules-right": [ "network", "cpu", "memory", "disk", "pulseaudio", "battery", "custom/clipboard", "tray", "clock" ],
9 9
  "hyprland/workspaces": {
10 10
    "disable-scroll": true,
11 11
    "all-outputs": false,
12 12
    "format": "{name}",