Switch to Wayland!
23be806facd195cd31e9f6e535a5519ae9f97c23
Finally, I've decided to do this after 10 years.
1 parent
461bbd05
.Xresources
deleted
+0 -30
| 1 | - | ! |
|
| 2 | - | ! .Xresources |
|
| 3 | - | ! |
|
| 4 | - | ||
| 5 | - | ! DPI for 2160p external monitor: 144 |
|
| 6 | - | ! DPI for 1080p laptop monitor: 112 |
|
| 7 | - | Xft.dpi: 144 |
|
| 8 | - | Xft.antialias: true |
|
| 9 | - | Xft.rgba: rgb |
|
| 10 | - | Xcursor.size: 48 |
|
| 11 | - | ||
| 12 | - | *background: black |
|
| 13 | - | *foreground: white |
|
| 14 | - | ||
| 15 | - | *color0: black |
|
| 16 | - | *color1: maroon |
|
| 17 | - | *color2: medium aquamarine |
|
| 18 | - | *color3: moccasin |
|
| 19 | - | *color4: dark slate blue |
|
| 20 | - | *color5: rebecca purple |
|
| 21 | - | *color6: light blue |
|
| 22 | - | *color7: gray |
|
| 23 | - | *color8: dark gray |
|
| 24 | - | *color9: maroon |
|
| 25 | - | *color10: aquamarine |
|
| 26 | - | *color11: moccasin |
|
| 27 | - | *color12: dark slate blue |
|
| 28 | - | *color13: rebecca purple |
|
| 29 | - | *color14: light blue |
|
| 30 | - | *color15: white |
.Xsessions
deleted
+0 -2
| 1 | - | VDPAU_DRIVER=va_gl |
|
| 2 | - | xrdb -merge .Xresources |
.config/fish/config.fish
added
+94 -0
| 1 | + | # |
|
| 2 | + | # config.fish |
|
| 3 | + | # |
|
| 4 | + | if status is-interactive |
|
| 5 | + | fish_vi_key_bindings |
|
| 6 | + | ||
| 7 | + | set -g fish_greeting |
|
| 8 | + | set fish_cursor_default block |
|
| 9 | + | set fish_cursor_insert underscore |
|
| 10 | + | set fish_cursor_replace_one underscore |
|
| 11 | + | set fish_cursor_visual block |
|
| 12 | + | ||
| 13 | + | if type -q keychain |
|
| 14 | + | keychain --eval -Q --quiet ~/.ssh/id_rsa ~/.radicle/keys/radicle ~/.ssh/alexis.radiant.computer | source |
|
| 15 | + | end |
|
| 16 | + | ||
| 17 | + | function fish_mode_prompt |
|
| 18 | + | end |
|
| 19 | + | ||
| 20 | + | bind -M insert \cr history-pager |
|
| 21 | + | bind \cz 'fg 2>/dev/null; commandline -f repaint' |
|
| 22 | + | bind -M insert \cz 'fg 2>/dev/null; commandline -f repaint' |
|
| 23 | + | ||
| 24 | + | if test -n "$SSH_CLIENT"; or test -n "$SSH_TTY" |
|
| 25 | + | set -gx TERM xterm |
|
| 26 | + | end |
|
| 27 | + | ||
| 28 | + | set -gx GPG_TTY (tty) |
|
| 29 | + | set -gx NNN_USE_EDITOR 1 |
|
| 30 | + | set -gx GOPATH ~ |
|
| 31 | + | set -gx PAGER "less -s -M +Gg" |
|
| 32 | + | set -gx EZA_COLORS "reset:fi=37:di=36:ln=36:or=31:ex=32:sp=31:pi=33:so=33:bd=33:cd=33:xx=90:da=90:uu=37:gu=37:ur=90:uw=90:ux=32:gr=90:gw=90:gx=32:tr=90:tw=90:tx=32:sn=37:sb=90:lc=90" |
|
| 33 | + | ||
| 34 | + | alias l "eza --color=auto --icons --group-directories-first" |
|
| 35 | + | alias ll "eza -lag --color=auto --icons --group-directories-first" |
|
| 36 | + | alias g git |
|
| 37 | + | alias n "sudo netctl" |
|
| 38 | + | alias m "make -j8" |
|
| 39 | + | alias b yazi |
|
| 40 | + | alias f fd |
|
| 41 | + | alias mv "/bin/mv -i" |
|
| 42 | + | alias img "sxiv -a" |
|
| 43 | + | alias df "df -h" |
|
| 44 | + | alias sys systemctl |
|
| 45 | + | alias s systemctl |
|
| 46 | + | alias pdf mupdf |
|
| 47 | + | alias webserver "python -m http.server" |
|
| 48 | + | alias pacman "sudo pacman --color=auto" |
|
| 49 | + | alias vim nvim |
|
| 50 | + | alias clip wl-copy |
|
| 51 | + | alias irc weechat |
|
| 52 | + | alias cloc tokei |
|
| 53 | + | alias shred "shred -uvz" |
|
| 54 | + | alias diskusage ncdu |
|
| 55 | + | alias calc kalk |
|
| 56 | + | alias t tree-git-ignore |
|
| 57 | + | alias sql3 "sqlite3 -box" |
|
| 58 | + | ||
| 59 | + | function e |
|
| 60 | + | $EDITOR $argv |
|
| 61 | + | end |
|
| 62 | + | ||
| 63 | + | function weather |
|
| 64 | + | curl "https://v2.wttr.in/$argv[1]" |
|
| 65 | + | end |
|
| 66 | + | ||
| 67 | + | function tree-git-ignore |
|
| 68 | + | set -l ignored (git ls-files -ci --others --directory --exclude-standard 2>/dev/null \ |
|
| 69 | + | | string match -rv '^#.*$|^[[:space:]]*$' \ |
|
| 70 | + | | string replace -r '^/' '' \ |
|
| 71 | + | | string replace -r '/$' '') |
|
| 72 | + | ||
| 73 | + | set -l ignored_filter ".git" |
|
| 74 | + | if test (count $ignored) -gt 0 |
|
| 75 | + | set ignored_filter ".git|"(string join "|" $ignored) |
|
| 76 | + | end |
|
| 77 | + | ||
| 78 | + | /usr/bin/tree --prune -I "$ignored_filter" $argv |
|
| 79 | + | end |
|
| 80 | + | ||
| 81 | + | function find-and-replace |
|
| 82 | + | rg "$argv[1]" --files-with-matches | xargs sed -i "s@$argv[1]@$argv[2]@g" |
|
| 83 | + | end |
|
| 84 | + | ||
| 85 | + | function pdf-slice |
|
| 86 | + | qpdf $argv[1] --pages . $argv[2] -- $argv[3] |
|
| 87 | + | end |
|
| 88 | + | ||
| 89 | + | function col |
|
| 90 | + | awk "{ print \$$argv[1] }" |
|
| 91 | + | end |
|
| 92 | + | ||
| 93 | + | source ~/.config/fish/pureish.fish |
|
| 94 | + | end |
.config/fish/pureish.fish
added
+91 -0
| 1 | + | # Pure-inspired prompt, kept local to avoid a plugin dependency. |
|
| 2 | + | # Based on Pure fish's core ideas: pwd, git state, duration, SSH context, |
|
| 3 | + | # failure status, and a prompt symbol that turns red on error. |
|
| 4 | + | ||
| 5 | + | function __pureish_git_prompt |
|
| 6 | + | command git rev-parse --is-inside-work-tree >/dev/null 2>&1; or return |
|
| 7 | + | ||
| 8 | + | set -l branch (command git symbolic-ref --quiet --short HEAD 2>/dev/null) |
|
| 9 | + | if test -z "$branch" |
|
| 10 | + | set branch (command git rev-parse --short HEAD 2>/dev/null) |
|
| 11 | + | end |
|
| 12 | + | test -n "$branch"; or return |
|
| 13 | + | printf '%s' $branch |
|
| 14 | + | end |
|
| 15 | + | ||
| 16 | + | function __pureish_duration |
|
| 17 | + | test "$CMD_DURATION" -ge 5000 2>/dev/null; or return |
|
| 18 | + | ||
| 19 | + | if test "$CMD_DURATION" -lt 60000 |
|
| 20 | + | printf '%ss' (math --scale=1 "$CMD_DURATION / 1000") |
|
| 21 | + | else |
|
| 22 | + | set -l minutes (math --scale=0 "$CMD_DURATION / 60000") |
|
| 23 | + | set -l seconds (math --scale=0 "($CMD_DURATION % 60000) / 1000") |
|
| 24 | + | printf '%sm%ss' $minutes $seconds |
|
| 25 | + | end |
|
| 26 | + | end |
|
| 27 | + | ||
| 28 | + | function fish_prompt |
|
| 29 | + | set -g __pureish_last_status $status |
|
| 30 | + | set -g __pureish_extra |
|
| 31 | + | set -l symbol '>' |
|
| 32 | + | set -l ssh |
|
| 33 | + | if test -n "$SSH_CLIENT"; or test -n "$SSH_TTY" |
|
| 34 | + | set ssh (whoami)'@'(hostname -s) |
|
| 35 | + | end |
|
| 36 | + | ||
| 37 | + | set -l git (__pureish_git_prompt) |
|
| 38 | + | ||
| 39 | + | if test -n "$ssh" |
|
| 40 | + | set_color brblack |
|
| 41 | + | printf '%s ' $ssh |
|
| 42 | + | end |
|
| 43 | + | ||
| 44 | + | set_color 555555 |
|
| 45 | + | printf '%s' (prompt_pwd) |
|
| 46 | + | ||
| 47 | + | if test -n "$git" |
|
| 48 | + | set_color brblack |
|
| 49 | + | printf ' %s' $git |
|
| 50 | + | end |
|
| 51 | + | ||
| 52 | + | printf '\n' |
|
| 53 | + | ||
| 54 | + | if test $__pureish_last_status -eq 0 |
|
| 55 | + | set_color blue |
|
| 56 | + | else |
|
| 57 | + | set_color red |
|
| 58 | + | end |
|
| 59 | + | ||
| 60 | + | printf '%s ' $symbol |
|
| 61 | + | set_color normal |
|
| 62 | + | end |
|
| 63 | + | ||
| 64 | + | function fish_right_prompt |
|
| 65 | + | set -l parts |
|
| 66 | + | set -l duration (__pureish_duration) |
|
| 67 | + | ||
| 68 | + | if test -n "$duration" |
|
| 69 | + | set parts $parts $duration |
|
| 70 | + | end |
|
| 71 | + | ||
| 72 | + | if test -n "$__pureish_extra" |
|
| 73 | + | set parts $parts $__pureish_extra |
|
| 74 | + | else if test "$__pureish_last_status" -ne 0 |
|
| 75 | + | set parts $parts "#$__pureish_last_status" |
|
| 76 | + | end |
|
| 77 | + | ||
| 78 | + | test (count $parts) -gt 0; or return |
|
| 79 | + | set_color brblack |
|
| 80 | + | printf '%s' (string join ' ' $parts) |
|
| 81 | + | set_color normal |
|
| 82 | + | end |
|
| 83 | + | ||
| 84 | + | function fish_title |
|
| 85 | + | set -l pwd (string replace -r "^$HOME(?=/|\$)" "~" -- "$PWD") |
|
| 86 | + | set -l process fish |
|
| 87 | + | if test (count $argv) -gt 0; and test -n "$argv[1]" |
|
| 88 | + | set process (string split -m1 ' ' -- "$argv[1]")[1] |
|
| 89 | + | end |
|
| 90 | + | printf '%s %s' "$pwd" "$process" |
|
| 91 | + | end |
.config/foot/foot.ini
added
+44 -0
| 1 | + | [main] |
|
| 2 | + | font=monospace:size=16 |
|
| 3 | + | dpi-aware=yes |
|
| 4 | + | pad=8x6 |
|
| 5 | + | shell=/usr/bin/fish |
|
| 6 | + | ||
| 7 | + | [colors-dark] |
|
| 8 | + | background=000000 |
|
| 9 | + | foreground=dddddd |
|
| 10 | + | cursor=000000 b03060 |
|
| 11 | + | selection-background=333333 |
|
| 12 | + | selection-foreground=dddddd |
|
| 13 | + | regular0=000000 |
|
| 14 | + | regular1=b03060 |
|
| 15 | + | regular2=66cdaa |
|
| 16 | + | regular3=ffe4b5 |
|
| 17 | + | regular4=584daf |
|
| 18 | + | regular5=bb66dd |
|
| 19 | + | regular6=add8e6 |
|
| 20 | + | regular7=bebebe |
|
| 21 | + | bright0=a9a9a9 |
|
| 22 | + | bright1=d05090 |
|
| 23 | + | bright2=7fffd4 |
|
| 24 | + | bright3=ffe4b5 |
|
| 25 | + | bright4=8373ea |
|
| 26 | + | bright5=e47fff |
|
| 27 | + | bright6=add8e6 |
|
| 28 | + | bright7=ffffff |
|
| 29 | + | ||
| 30 | + | [cursor] |
|
| 31 | + | style=beam |
|
| 32 | + | beam-thickness=2px |
|
| 33 | + | ||
| 34 | + | [csd] |
|
| 35 | + | preferred=server |
|
| 36 | + | size=32 |
|
| 37 | + | font=monospace:size=16 |
|
| 38 | + | color=ff0d0d0d |
|
| 39 | + | button-color=ffdddddd |
|
| 40 | + | button-minimize-color=ff000000 |
|
| 41 | + | button-maximize-color=ff000000 |
|
| 42 | + | button-close-color=ffb03060 |
|
| 43 | + | border-color=ff333333 |
|
| 44 | + | border-width=0 |
.config/fuzzel/fuzzel.ini
added
+29 -0
| 1 | + | [main] |
|
| 2 | + | font=monospace:size=14 |
|
| 3 | + | dpi-aware=no |
|
| 4 | + | terminal=foot -e |
|
| 5 | + | prompt="> " |
|
| 6 | + | width=40 |
|
| 7 | + | lines=12 |
|
| 8 | + | horizontal-pad=18 |
|
| 9 | + | vertical-pad=12 |
|
| 10 | + | inner-pad=8 |
|
| 11 | + | line-height=24 |
|
| 12 | + | icons-enabled=yes |
|
| 13 | + | ||
| 14 | + | [colors] |
|
| 15 | + | background=000000ee |
|
| 16 | + | text=ddddddff |
|
| 17 | + | prompt=ddddddff |
|
| 18 | + | input=ddddddff |
|
| 19 | + | match=ffffffff |
|
| 20 | + | selection=202020ff |
|
| 21 | + | selection-text=ddddddff |
|
| 22 | + | selection-match=ffffffff |
|
| 23 | + | counter=2f2f2fff |
|
| 24 | + | border=2f2f2fff |
|
| 25 | + | ||
| 26 | + | [border] |
|
| 27 | + | width=1 |
|
| 28 | + | radius=0 |
|
| 29 | + | selection-radius=0 |
.config/sway/config
added
+121 -0
| 1 | + | # |
|
| 2 | + | # sway/config |
|
| 3 | + | # |
|
| 4 | + | set $mod Mod4 |
|
| 5 | + | set $term foot |
|
| 6 | + | set $menu fuzzel |
|
| 7 | + | ||
| 8 | + | set $accent #66ffcc |
|
| 9 | + | set $urgent #b03060 |
|
| 10 | + | set $bg #000000 |
|
| 11 | + | set $panel #0d0d0d |
|
| 12 | + | set $dim #333333 |
|
| 13 | + | set $fg #dddddd |
|
| 14 | + | ||
| 15 | + | output * scale 1.5 bg $bg solid_color |
|
| 16 | + | exec $term |
|
| 17 | + | exec waybar |
|
| 18 | + | ||
| 19 | + | focus_follows_mouse yes |
|
| 20 | + | mouse_warping none |
|
| 21 | + | workspace_auto_back_and_forth no |
|
| 22 | + | floating_modifier $mod normal |
|
| 23 | + | ||
| 24 | + | default_border normal 1 |
|
| 25 | + | default_floating_border normal 1 |
|
| 26 | + | hide_edge_borders none |
|
| 27 | + | smart_borders off |
|
| 28 | + | gaps inner 0 |
|
| 29 | + | gaps outer 0 |
|
| 30 | + | titlebar_border_thickness 1 |
|
| 31 | + | titlebar_padding 8 2 |
|
| 32 | + | ||
| 33 | + | # client.<class> border background text indicator child_border |
|
| 34 | + | client.focused #303030 #1a1a1a #999999 #2f2f2f #303030 |
|
| 35 | + | client.focused_inactive #101010 $panel #444444 #101010 #101010 |
|
| 36 | + | client.unfocused #101010 $panel #444444 #101010 #101010 |
|
| 37 | + | client.urgent $urgent $urgent #ffffff $urgent $urgent |
|
| 38 | + | client.placeholder $dim $bg $fg $dim $dim |
|
| 39 | + | client.background $bg |
|
| 40 | + | ||
| 41 | + | input type:keyboard { |
|
| 42 | + | repeat_rate 40 |
|
| 43 | + | repeat_delay 180 |
|
| 44 | + | xkb_layout us |
|
| 45 | + | xkb_variant altgr-intl |
|
| 46 | + | } |
|
| 47 | + | ||
| 48 | + | input type:pointer { |
|
| 49 | + | pointer_accel -0.1 |
|
| 50 | + | } |
|
| 51 | + | ||
| 52 | + | bindsym $mod+Shift+Return exec $term |
|
| 53 | + | bindsym $mod+p exec $menu |
|
| 54 | + | bindsym $mod+b exec firefox |
|
| 55 | + | bindsym $mod+Shift+r reload |
|
| 56 | + | bindsym $mod+Shift+c kill |
|
| 57 | + | bindsym $mod+q reload |
|
| 58 | + | bindsym $mod+x exec swaylock -f -c 000000 |
|
| 59 | + | bindsym $mod+Shift+q exit |
|
| 60 | + | bindsym $mod+h focus left |
|
| 61 | + | bindsym $mod+j focus down |
|
| 62 | + | bindsym $mod+k focus up |
|
| 63 | + | bindsym $mod+l focus right |
|
| 64 | + | bindsym $mod+Shift+j move down |
|
| 65 | + | bindsym $mod+Shift+k move up |
|
| 66 | + | bindsym $mod+Shift+h move left |
|
| 67 | + | bindsym $mod+Shift+l move right |
|
| 68 | + | bindsym $mod+f fullscreen toggle |
|
| 69 | + | bindsym $mod+Shift+space floating toggle |
|
| 70 | + | bindsym $mod+space layout toggle split |
|
| 71 | + | bindsym $mod+Return layout toggle split |
|
| 72 | + | bindsym $mod+s layout stacking |
|
| 73 | + | bindsym $mod+w layout tabbed |
|
| 74 | + | bindsym $mod+minus scratchpad show |
|
| 75 | + | bindsym $mod+Shift+minus move scratchpad |
|
| 76 | + | bindsym $mod+Left focus output left |
|
| 77 | + | bindsym $mod+Right focus output right |
|
| 78 | + | bindsym $mod+Up focus output up |
|
| 79 | + | bindsym $mod+Down focus output down |
|
| 80 | + | bindsym $mod+Shift+Left move workspace to output left |
|
| 81 | + | bindsym $mod+Shift+Right move workspace to output right |
|
| 82 | + | bindsym $mod+Tab workspace back_and_forth |
|
| 83 | + | bindsym $mod+1 workspace number 1 |
|
| 84 | + | bindsym $mod+2 workspace number 2 |
|
| 85 | + | bindsym $mod+3 workspace number 3 |
|
| 86 | + | bindsym $mod+4 workspace number 4 |
|
| 87 | + | bindsym $mod+5 workspace number 5 |
|
| 88 | + | bindsym $mod+6 workspace number 6 |
|
| 89 | + | bindsym $mod+7 workspace number 7 |
|
| 90 | + | bindsym $mod+8 workspace number 8 |
|
| 91 | + | bindsym $mod+9 workspace number 9 |
|
| 92 | + | bindsym $mod+0 workspace number 10 |
|
| 93 | + | bindsym $mod+Shift+1 move container to workspace number 1 |
|
| 94 | + | bindsym $mod+Shift+2 move container to workspace number 2 |
|
| 95 | + | bindsym $mod+Shift+3 move container to workspace number 3 |
|
| 96 | + | bindsym $mod+Shift+4 move container to workspace number 4 |
|
| 97 | + | bindsym $mod+Shift+5 move container to workspace number 5 |
|
| 98 | + | bindsym $mod+Shift+6 move container to workspace number 6 |
|
| 99 | + | bindsym $mod+Shift+7 move container to workspace number 7 |
|
| 100 | + | bindsym $mod+Shift+8 move container to workspace number 8 |
|
| 101 | + | bindsym $mod+Shift+9 move container to workspace number 9 |
|
| 102 | + | bindsym $mod+Shift+0 move container to workspace number 10 |
|
| 103 | + | bindsym Print exec grim |
|
| 104 | + | ||
| 105 | + | for_window [app_id="org.keepassxc.KeePassXC"] floating enable |
|
| 106 | + | for_window [app_id="org.pulseaudio.pavucontrol"] floating enable |
|
| 107 | + | for_window [app_id="firefox"] border pixel 1 |
|
| 108 | + | for_window [class="firefox"] border pixel 1 |
|
| 109 | + | for_window [app_id="org.telegram.desktop"] floating enable |
|
| 110 | + | for_window [class="TelegramDesktop"] floating enable |
|
| 111 | + | for_window [app_id="org.telegram.desktop"] border none |
|
| 112 | + | for_window [class="TelegramDesktop"] border none |
|
| 113 | + | ||
| 114 | + | bindsym --locked XF86AudioMute exec pactl set-sink-mute @DEFAULT_SINK@ toggle |
|
| 115 | + | bindsym --locked XF86AudioLowerVolume exec pactl set-sink-volume @DEFAULT_SINK@ -5% |
|
| 116 | + | bindsym --locked XF86AudioRaiseVolume exec pactl set-sink-volume @DEFAULT_SINK@ +5% |
|
| 117 | + | bindsym --locked XF86AudioMicMute exec pactl set-source-mute @DEFAULT_SOURCE@ toggle |
|
| 118 | + | bindsym --locked XF86MonBrightnessDown exec brightnessctl set 5%- |
|
| 119 | + | bindsym --locked XF86MonBrightnessUp exec brightnessctl set 5%+ |
|
| 120 | + | ||
| 121 | + | include /etc/sway/config.d/* |
.config/waybar/config
added
+64 -0
| 1 | + | { |
|
| 2 | + | "layer": "top", |
|
| 3 | + | "position": "bottom", |
|
| 4 | + | "height": 30, |
|
| 5 | + | "spacing": 8, |
|
| 6 | + | "modules-left": [ "sway/workspaces" ], |
|
| 7 | + | "modules-center": [], |
|
| 8 | + | "modules-right": [ "network", "cpu", "memory", "disk", "pulseaudio", "battery", "tray", "clock" ], |
|
| 9 | + | "sway/workspaces": { |
|
| 10 | + | "disable-scroll": true, |
|
| 11 | + | "all-outputs": false, |
|
| 12 | + | "format": "{name}" |
|
| 13 | + | }, |
|
| 14 | + | "sway/window": { |
|
| 15 | + | "format": "{}", |
|
| 16 | + | "max-length": 80 |
|
| 17 | + | }, |
|
| 18 | + | "clock": { |
|
| 19 | + | "format": "{:%a %H:%M}", |
|
| 20 | + | "tooltip-format": "{:%A, %d %B %Y %H:%M:%S}" |
|
| 21 | + | }, |
|
| 22 | + | "network": { |
|
| 23 | + | "interval": 2, |
|
| 24 | + | "format-wifi": " {essid} {signalStrength}%", |
|
| 25 | + | "format-ethernet": " {ifname}", |
|
| 26 | + | "format-linked": " {ifname} linked", |
|
| 27 | + | "format-disconnected": " offline", |
|
| 28 | + | "tooltip-format": "{ifname} {ipaddr}\nDown {bandwidthDownBytes} Up {bandwidthUpBytes}" |
|
| 29 | + | }, |
|
| 30 | + | "cpu": { |
|
| 31 | + | "interval": 2, |
|
| 32 | + | "format": " {usage}%" |
|
| 33 | + | }, |
|
| 34 | + | "memory": { |
|
| 35 | + | "interval": 5, |
|
| 36 | + | "format": " {used:0.1f}/{total:0.1f}G" |
|
| 37 | + | }, |
|
| 38 | + | "disk": { |
|
| 39 | + | "path": "/", |
|
| 40 | + | "interval": 30, |
|
| 41 | + | "format": " {percentage_used}%", |
|
| 42 | + | "tooltip-format": "{used} used of {total} on {path}" |
|
| 43 | + | }, |
|
| 44 | + | "pulseaudio": { |
|
| 45 | + | "format": " {volume}%", |
|
| 46 | + | "format-muted": " muted", |
|
| 47 | + | "scroll-step": 5, |
|
| 48 | + | "on-click": "pactl set-sink-mute @DEFAULT_SINK@ toggle" |
|
| 49 | + | }, |
|
| 50 | + | "battery": { |
|
| 51 | + | "interval": 30, |
|
| 52 | + | "format": " {capacity}%", |
|
| 53 | + | "format-charging": " {capacity}%", |
|
| 54 | + | "format-plugged": " {capacity}%", |
|
| 55 | + | "states": { |
|
| 56 | + | "warning": 30, |
|
| 57 | + | "critical": 15 |
|
| 58 | + | } |
|
| 59 | + | }, |
|
| 60 | + | "tray": { |
|
| 61 | + | "icon-size": 18, |
|
| 62 | + | "spacing": 8 |
|
| 63 | + | } |
|
| 64 | + | } |
.config/waybar/style.css
added
+76 -0
| 1 | + | @import url("file:///etc/xdg/waybar/style.css"); |
|
| 2 | + | ||
| 3 | + | * { |
|
| 4 | + | font-family: "BlexMono Nerd Font Mono", "BlexMono Nerd Font", monospace; |
|
| 5 | + | font-size: 16px; |
|
| 6 | + | } |
|
| 7 | + | ||
| 8 | + | window#waybar { |
|
| 9 | + | background-color: #000000; |
|
| 10 | + | border-bottom: none; |
|
| 11 | + | color: #dddddd; |
|
| 12 | + | } |
|
| 13 | + | ||
| 14 | + | #clock { |
|
| 15 | + | background-color: transparent; |
|
| 16 | + | color: #dddddd; |
|
| 17 | + | } |
|
| 18 | + | ||
| 19 | + | #network { |
|
| 20 | + | background-color: transparent; |
|
| 21 | + | color: #dddddd; |
|
| 22 | + | } |
|
| 23 | + | ||
| 24 | + | #cpu { |
|
| 25 | + | background-color: transparent; |
|
| 26 | + | color: #dddddd; |
|
| 27 | + | } |
|
| 28 | + | ||
| 29 | + | #memory { |
|
| 30 | + | background-color: transparent; |
|
| 31 | + | color: #dddddd; |
|
| 32 | + | } |
|
| 33 | + | ||
| 34 | + | #disk { |
|
| 35 | + | background-color: transparent; |
|
| 36 | + | color: #dddddd; |
|
| 37 | + | } |
|
| 38 | + | ||
| 39 | + | #pulseaudio { |
|
| 40 | + | background-color: transparent; |
|
| 41 | + | color: #dddddd; |
|
| 42 | + | } |
|
| 43 | + | ||
| 44 | + | #battery { |
|
| 45 | + | background-color: transparent; |
|
| 46 | + | color: #dddddd; |
|
| 47 | + | } |
|
| 48 | + | ||
| 49 | + | #workspaces button { |
|
| 50 | + | background-color: transparent; |
|
| 51 | + | border: none; |
|
| 52 | + | box-shadow: none; |
|
| 53 | + | color: #333333; |
|
| 54 | + | } |
|
| 55 | + | ||
| 56 | + | #workspaces button:hover { |
|
| 57 | + | background-color: #101010; |
|
| 58 | + | border: none; |
|
| 59 | + | box-shadow: none; |
|
| 60 | + | } |
|
| 61 | + | ||
| 62 | + | #workspaces button.visible { |
|
| 63 | + | color: #242424; |
|
| 64 | + | } |
|
| 65 | + | ||
| 66 | + | #workspaces button.focused, |
|
| 67 | + | #workspaces button.active { |
|
| 68 | + | background-color: #1a1a1a; |
|
| 69 | + | color: #999999; |
|
| 70 | + | box-shadow: none; |
|
| 71 | + | } |
|
| 72 | + | ||
| 73 | + | #workspaces button.urgent { |
|
| 74 | + | background-color: #b03060; |
|
| 75 | + | color: #ffffff; |
|
| 76 | + | } |
.conkyrc.desktop
deleted
+0 -20
| 1 | - | # vim: filetype=conky |
|
| 2 | - | ||
| 3 | - | conky.config = { |
|
| 4 | - | out_to_x = false, |
|
| 5 | - | out_to_console = true, |
|
| 6 | - | update_interval = 1.0, |
|
| 7 | - | total_run_times = 0, |
|
| 8 | - | short_units = true, |
|
| 9 | - | pad_percents = 2, |
|
| 10 | - | use_spacer = "left" |
|
| 11 | - | } |
|
| 12 | - | ||
| 13 | - | conky.text = [[ |
|
| 14 | - | +@fn=1;${execi 60 conky-sync-status}+@fn=0; \ |
|
| 15 | - | +@fg=1;/+@fg=0; ${fs_free /} \ |
|
| 16 | - | +@fg=1;/home+@fg=0; ${fs_free /home} \ |
|
| 17 | - | +@fg=1;RAM+@fg=0; $memavail \ |
|
| 18 | - | +@fg=1;CPU+@fg=0; ${cpu}% \ |
|
| 19 | - | +@fg=1;↓+@fg=0; ${downspeed eno1} |
|
| 20 | - | ]] |
.conkyrc.laptop
deleted
+0 -17
| 1 | - | conky.config = { |
|
| 2 | - | out_to_x = false, |
|
| 3 | - | out_to_console = true, |
|
| 4 | - | update_interval = 1.0, |
|
| 5 | - | total_run_times = 0, |
|
| 6 | - | short_units = true, |
|
| 7 | - | pad_percents = 2, |
|
| 8 | - | use_spacer = "left" |
|
| 9 | - | } |
|
| 10 | - | conky.text = [[ |
|
| 11 | - | +@fn=1;${execi 60 conky-sync-status}+@fn=0; \ |
|
| 12 | - | +@fg=1;+@fg=0; ${wireless_essid wlan0}${wireless_link_qual_perc wlan0}% \ |
|
| 13 | - | +@fg=1;/+@fg=0;${fs_free /} \ |
|
| 14 | - | +@fg=1;RAM+@fg=0; $memavail \ |
|
| 15 | - | +@fg=1;CPU+@fg=0; ${cpu}% \ |
|
| 16 | - | ${execi 1 conky-acpi-status} |
|
| 17 | - | ]] |
.fehbg
deleted
+0 -6
| 1 | - | #!/bin/sh |
|
| 2 | - | if command -v feh >/dev/null 2>&1; then |
|
| 3 | - | if [ -f "~/images/background" ]; then |
|
| 4 | - | feh --force-aliasing --no-fehbg --bg-fill "~/images/background" |
|
| 5 | - | fi |
|
| 6 | - | fi |
.spectrwm.conf
deleted
+0 -51
| 1 | - | # |
|
| 2 | - | # spectrwm configuration file |
|
| 3 | - | # |
|
| 4 | - | ||
| 5 | - | layout_order = vertical,horizontal,max |
|
| 6 | - | ||
| 7 | - | color_focus = rgb:66/ff/cc |
|
| 8 | - | color_focus_maximized = rgb:00/00/00 |
|
| 9 | - | color_unfocus = rgb:33/33/33 |
|
| 10 | - | ||
| 11 | - | # BAR |
|
| 12 | - | ||
| 13 | - | bar_border_width = 8 |
|
| 14 | - | bar_border[1] = rgb:00/00/00 |
|
| 15 | - | bar_color[1] = rgb:00/00/00, rgb:b0/30/60 |
|
| 16 | - | bar_border_unfocus[1] = rgb:00/00/00 |
|
| 17 | - | bar_font_color[1] = rgb:bb/bb/bb, rgb:66/66/66, rgb:33/33/33, rgb:b0/30/60, rgb:66/ff/cc, rgb:00/00/00 |
|
| 18 | - | bar_font = monospace:size=10,fallback:size=10 |
|
| 19 | - | bar_action = spectrwm-status |
|
| 20 | - | bar_delay = 1 |
|
| 21 | - | bar_action_expand = 1 |
|
| 22 | - | bar_justify = left |
|
| 23 | - | bar_format = +L+@fg=1; +@fg=3;+W +@fg=1;+|R +A +@fg=0;%b %d %H:%M+< |
|
| 24 | - | bar_at_bottom = 1 |
|
| 25 | - | clock_enabled = 0 |
|
| 26 | - | ||
| 27 | - | # WORKSPACES |
|
| 28 | - | ||
| 29 | - | workspace_indicator = listall,markurgent,markactive,markcurrent,markempty,printnames |
|
| 30 | - | workspace_mark_active = '+@bg=0;+@fg=1; ' |
|
| 31 | - | workspace_mark_current = '+@bg=0;+@fg=0; ' |
|
| 32 | - | workspace_mark_empty = '+@bg=0;+@fg=2; ' |
|
| 33 | - | workspace_mark_urgent = '+@bg=1;+@fg=5; ' |
|
| 34 | - | ||
| 35 | - | # AUTORUN |
|
| 36 | - | ||
| 37 | - | autorun = ws[1]:kitty |
|
| 38 | - | ||
| 39 | - | # PROGRAMS |
|
| 40 | - | ||
| 41 | - | program[lock] = xsecurelock |
|
| 42 | - | program[term] = kitty |
|
| 43 | - | program[menu] = rofi -show run |
|
| 44 | - | program[switch] = rofi -show window |
|
| 45 | - | ||
| 46 | - | # BINDINGS |
|
| 47 | - | ||
| 48 | - | bind[switch] = MOD+o |
|
| 49 | - | bind[menu] = MOD+p |
|
| 50 | - | bind[wind_kill] = MOD+Shift+c |
|
| 51 | - | bind[ws_prior] = MOD+Tab |
.xbindkeysrc
deleted
+0 -51
| 1 | - | ########################### |
|
| 2 | - | # xbindkeys configuration # |
|
| 3 | - | ########################### |
|
| 4 | - | # |
|
| 5 | - | # Version: 1.8.7 |
|
| 6 | - | # |
|
| 7 | - | # If you edit this file, do not forget to uncomment any lines |
|
| 8 | - | # that you change. |
|
| 9 | - | # The pound(#) symbol may be used anywhere for comments. |
|
| 10 | - | # |
|
| 11 | - | # To specify a key, you can use 'xbindkeys --key' or |
|
| 12 | - | # 'xbindkeys --multikey' and put one of the two lines in this file. |
|
| 13 | - | # |
|
| 14 | - | # The format of a command line is: |
|
| 15 | - | # "command to start" |
|
| 16 | - | # associated key |
|
| 17 | - | # |
|
| 18 | - | # |
|
| 19 | - | # A list of keys is in /usr/include/X11/keysym.h and in |
|
| 20 | - | # /usr/include/X11/keysymdef.h |
|
| 21 | - | # The XK_ is not needed. |
|
| 22 | - | # |
|
| 23 | - | # List of modifier: |
|
| 24 | - | # Release, Control, Shift, Mod1 (Alt), Mod2 (NumLock), |
|
| 25 | - | # Mod3 (CapsLock), Mod4, Mod5 (Scroll). |
|
| 26 | - | # |
|
| 27 | - | ||
| 28 | - | # The release modifier is not a standard X modifier, but you can |
|
| 29 | - | # use it if you want to catch release events instead of press events |
|
| 30 | - | ||
| 31 | - | # By defaults, xbindkeys does not pay attention with the modifiers |
|
| 32 | - | # NumLock, CapsLock and ScrollLock. |
|
| 33 | - | # Uncomment the lines above if you want to pay attention to them. |
|
| 34 | - | ||
| 35 | - | # Volume up |
|
| 36 | - | "pactl set-sink-volume @DEFAULT_SINK@ +5%" |
|
| 37 | - | XF86AudioRaiseVolume |
|
| 38 | - | ||
| 39 | - | # Volume down |
|
| 40 | - | "pactl set-sink-volume @DEFAULT_SINK@ -5%" |
|
| 41 | - | XF86AudioLowerVolume |
|
| 42 | - | ||
| 43 | - | # Mute |
|
| 44 | - | "pactl set-sink-mute @DEFAULT_SINK@ toggle" |
|
| 45 | - | XF86AudioMute |
|
| 46 | - | ||
| 47 | - | "brightnessctl set +10%" |
|
| 48 | - | XF86MonBrightnessUp |
|
| 49 | - | ||
| 50 | - | "brightnessctl set 10%-" |
|
| 51 | - | XF86MonBrightnessDown |
.xinitrc
deleted
+0 -47
| 1 | - | #!/bin/sh |
|
| 2 | - | # |
|
| 3 | - | # ~/.xinitrc |
|
| 4 | - | # |
|
| 5 | - | exec >~/.local/share/xorg/xinitrc-$DISPLAY.log 2>&1 |
|
| 6 | - | set -uex |
|
| 7 | - | ||
| 8 | - | [ -f ~/.synaptics ] && . ~/.synaptics |
|
| 9 | - | ||
| 10 | - | setxkbmap -option compose:lwin |
|
| 11 | - | setxkbmap -option compose:rwin |
|
| 12 | - | setxkbmap -option compose:menu |
|
| 13 | - | setxkbmap -rules evdev -model evdev -layout us -variant altgr-intl |
|
| 14 | - | ||
| 15 | - | if [ -f ~/.Xmodmap ]; then |
|
| 16 | - | xmodmap ~/.Xmodmap; |
|
| 17 | - | fi |
|
| 18 | - | ||
| 19 | - | if [ -f ~/.Xresources ]; then |
|
| 20 | - | xrdb -merge ~/.Xresources |
|
| 21 | - | fi |
|
| 22 | - | ||
| 23 | - | if [ -f ~/.Xresources.local ]; then |
|
| 24 | - | xrdb -merge ~/.Xresources.local |
|
| 25 | - | fi |
|
| 26 | - | ||
| 27 | - | if command -v udiskie >/dev/null 2>&1; then |
|
| 28 | - | udiskie --no-notify --use-udisks2 & |
|
| 29 | - | fi |
|
| 30 | - | ||
| 31 | - | [ -f ~/.fehbg ] && . ~/.fehbg |
|
| 32 | - | [ -f ~/.wacom ] && . ~/.wacom |
|
| 33 | - | ||
| 34 | - | if xset q &>/dev/null; then |
|
| 35 | - | xset r rate 180 40 # Sane repeat rate |
|
| 36 | - | xset -b # No bell |
|
| 37 | - | xset -dpms # Keep screen on at all times |
|
| 38 | - | xset s off # |
|
| 39 | - | xset m 7/5 0 # Pointer settings |
|
| 40 | - | setxkbmap us -variant altgr-intl |
|
| 41 | - | fi |
|
| 42 | - | ||
| 43 | - | if command -v xbindkeys >/dev/null 2>&1; then |
|
| 44 | - | xbindkeys |
|
| 45 | - | fi |
|
| 46 | - | ||
| 47 | - | exec dbus-run-session spectrwm |
.xserverrc
deleted
+0 -2
| 1 | - | #!/bin/sh |
|
| 2 | - | exec /usr/bin/Xorg -arinterval 180 -ardelay 40 -nolisten tcp "$@" vt$XDG_VTNR |
.zlogin
deleted
+0 -1
| 1 | - | [ -z "$DISPLAY" -a "$(fgconsole)" -eq 1 ] && exec startx -- -ardelay 180 -arinterval 40 |
.zshenv
deleted
+0 -18
| 1 | - | ## |
|
| 2 | - | # cloudhead - .zshenv |
|
| 3 | - | # |
|
| 4 | - | [ -f ~/.profile ] && source ~/.profile |
|
| 5 | - | [ -f ~/.env ] && source ~/.env |
|
| 6 | - | [ -f ~/.awsrc ] && source ~/.awsrc |
|
| 7 | - | [ -f ~/.cargo/env ] && source ~/.cargo/env |
|
| 8 | - | ||
| 9 | - | export GOPATH=~ |
|
| 10 | - | export PAGER="less -s -M +Gg" |
|
| 11 | - | ||
| 12 | - | if command -v nvim >/dev/null 2>&1; then |
|
| 13 | - | export VISUAL=nvim |
|
| 14 | - | export EDITOR=nvim |
|
| 15 | - | else |
|
| 16 | - | export VISUAL=vim |
|
| 17 | - | export EDITOR=vim |
|
| 18 | - | fi |
.zshrc
deleted
+0 -241
| 1 | - | ## |
|
| 2 | - | # cloudhead - .zshrc |
|
| 3 | - | # |
|
| 4 | - | ||
| 5 | - | if [ -n "$SSH_CLIENT" ] || [ -n "$SSH_TTY" ]; then |
|
| 6 | - | export TERM=xterm |
|
| 7 | - | fi |
|
| 8 | - | ||
| 9 | - | export GPG_TTY=$(tty) |
|
| 10 | - | ||
| 11 | - | # `ls` colors |
|
| 12 | - | if [ -f ~/.dircolors ]; then |
|
| 13 | - | eval $(dircolors -b ~/.dircolors) |
|
| 14 | - | fi |
|
| 15 | - | ||
| 16 | - | # |
|
| 17 | - | # Includes |
|
| 18 | - | # |
|
| 19 | - | autoload colors && colors |
|
| 20 | - | autoload -U compinit && compinit |
|
| 21 | - | autoload -U complist |
|
| 22 | - | ||
| 23 | - | # Fzy integration |
|
| 24 | - | if command -v fzy >/dev/null 2>&1 && test -f ~/.fzy.zsh; then |
|
| 25 | - | source ~/.fzy.zsh |
|
| 26 | - | fi |
|
| 27 | - | ||
| 28 | - | if [ -f ~/.LESS_TERMCAP ]; then |
|
| 29 | - | export LESS="--RAW-CONTROL-CHARS" |
|
| 30 | - | source ~/.LESS_TERMCAP |
|
| 31 | - | fi |
|
| 32 | - | ||
| 33 | - | # K8 integration. We lazy load because it's slow otherwise. |
|
| 34 | - | function kubectl() { |
|
| 35 | - | if ! type __start_kubectl >/dev/null 2>&1; then |
|
| 36 | - | unfunction "$0" |
|
| 37 | - | source <(kubectl completion zsh) |
|
| 38 | - | fi |
|
| 39 | - | command kubectl "$@" |
|
| 40 | - | } |
|
| 41 | - | ||
| 42 | - | # Fzy history search doesn't sort things in a useful way, so we use zsh for now. |
|
| 43 | - | bindkey '^R' history-incremental-search-backward |
|
| 44 | - | ||
| 45 | - | # |
|
| 46 | - | # ls |
|
| 47 | - | # |
|
| 48 | - | alias l="ls -lFGhL --color=auto --group-directories-first" |
|
| 49 | - | alias ll='ls -lFAGh --color=auto --group-directories-first' |
|
| 50 | - | ||
| 51 | - | # |
|
| 52 | - | # Aliases |
|
| 53 | - | # |
|
| 54 | - | alias g='git' |
|
| 55 | - | alias n='sudo netctl' |
|
| 56 | - | alias m='make -j8' |
|
| 57 | - | alias b='yazi' |
|
| 58 | - | alias f='fd' |
|
| 59 | - | alias mv='/bin/mv -i' |
|
| 60 | - | alias ..='cd ..' |
|
| 61 | - | alias img='sxiv -a' |
|
| 62 | - | alias df='df -h' |
|
| 63 | - | alias sys='systemctl' |
|
| 64 | - | alias s='systemctl' |
|
| 65 | - | alias x='startx' |
|
| 66 | - | alias web='chromium &' |
|
| 67 | - | alias e=$EDITOR |
|
| 68 | - | alias pdf='mupdf' |
|
| 69 | - | alias webserver='python -m http.server' |
|
| 70 | - | alias pacman='sudo pacman --color=auto' |
|
| 71 | - | alias vim=nvim |
|
| 72 | - | alias clip='xclip -sel clip' |
|
| 73 | - | alias irc='weechat' |
|
| 74 | - | alias cloc='tokei' |
|
| 75 | - | alias shred='shred -uvz' |
|
| 76 | - | alias diskusage='ncdu' |
|
| 77 | - | alias calc=kalk |
|
| 78 | - | alias t=tree-git-ignore |
|
| 79 | - | alias sql3='sqlite3 -box' |
|
| 80 | - | ||
| 81 | - | function weather { |
|
| 82 | - | curl "https://v2.wttr.in/$1" |
|
| 83 | - | } |
|
| 84 | - | ||
| 85 | - | function tree-git-ignore { |
|
| 86 | - | local ignored=$(git ls-files -ci --others --directory --exclude-standard) |
|
| 87 | - | local ignored_filter=$(echo "$ignored" \ |
|
| 88 | - | | egrep -v "^#.*$|^[[:space:]]*$" \ |
|
| 89 | - | | sed 's~^/~~' \ |
|
| 90 | - | | sed 's~/$~~' \ |
|
| 91 | - | | tr "\\n" "|") |
|
| 92 | - | ||
| 93 | - | /usr/bin/tree --prune -I ".git|${ignored_filter: : -1}" "$@" |
|
| 94 | - | } |
|
| 95 | - | ||
| 96 | - | function find-and-replace { |
|
| 97 | - | rg "$1" --files-with-matches | xargs sed -i "s@$1@$2@g" |
|
| 98 | - | } |
|
| 99 | - | ||
| 100 | - | function pdf-slice { |
|
| 101 | - | qpdf $1 --pages . $2 -- $3 |
|
| 102 | - | } |
|
| 103 | - | ||
| 104 | - | export NNN_USE_EDITOR=1 |
|
| 105 | - | ||
| 106 | - | # |
|
| 107 | - | # History |
|
| 108 | - | # |
|
| 109 | - | HISTFILE=~/.zsh_history |
|
| 110 | - | HISTSIZE=65536 |
|
| 111 | - | SAVEHIST=65536 |
|
| 112 | - | REPORTTIME=10 |
|
| 113 | - | ||
| 114 | - | # Treat the '!' character specially during expansion. |
|
| 115 | - | setopt BANG_HIST |
|
| 116 | - | # Write the history file in the ":start:elapsed;command" format. |
|
| 117 | - | setopt EXTENDED_HISTORY |
|
| 118 | - | # Write to the history file immediately, not when the shell exits. |
|
| 119 | - | setopt INC_APPEND_HISTORY |
|
| 120 | - | # Expire duplicate entries first when trimming history. |
|
| 121 | - | setopt HIST_EXPIRE_DUPS_FIRST |
|
| 122 | - | # Don't record an entry that was just recorded again. |
|
| 123 | - | setopt HIST_IGNORE_DUPS |
|
| 124 | - | # Delete old recorded entry if new entry is a duplicate. |
|
| 125 | - | setopt HIST_IGNORE_ALL_DUPS |
|
| 126 | - | # Do not display a line previously found. |
|
| 127 | - | setopt HIST_FIND_NO_DUPS |
|
| 128 | - | # Don't write duplicate entries in the history file. |
|
| 129 | - | setopt HIST_SAVE_NO_DUPS |
|
| 130 | - | # Remove superfluous blanks before recording entry. |
|
| 131 | - | setopt HIST_REDUCE_BLANKS |
|
| 132 | - | ||
| 133 | - | autoload up-line-or-beginning-search |
|
| 134 | - | autoload down-line-or-beginning-search |
|
| 135 | - | ||
| 136 | - | zle -N up-line-or-beginning-search |
|
| 137 | - | zle -N down-line-or-beginning-search |
|
| 138 | - | ||
| 139 | - | bindkey "\e[A" up-line-or-beginning-search |
|
| 140 | - | bindkey "\e[B" down-line-or-beginning-search |
|
| 141 | - | ||
| 142 | - | # |
|
| 143 | - | # Options |
|
| 144 | - | # |
|
| 145 | - | setopt NO_BG_NICE |
|
| 146 | - | setopt NO_HUP |
|
| 147 | - | setopt NO_LIST_BEEP |
|
| 148 | - | setopt LOCAL_OPTIONS |
|
| 149 | - | setopt LOCAL_TRAPS |
|
| 150 | - | setopt EXTENDED_HISTORY |
|
| 151 | - | setopt PROMPT_SUBST |
|
| 152 | - | setopt CORRECT |
|
| 153 | - | setopt COMPLETE_IN_WORD |
|
| 154 | - | setopt NO_IGNORE_EOF |
|
| 155 | - | setopt AUTO_CD |
|
| 156 | - | setopt INTERACTIVECOMMENTS |
|
| 157 | - | ||
| 158 | - | ||
| 159 | - | # |
|
| 160 | - | # Set prompt |
|
| 161 | - | # |
|
| 162 | - | precmd() { |
|
| 163 | - | local last=$? |
|
| 164 | - | local indicator=">" |
|
| 165 | - | local extra="" |
|
| 166 | - | ||
| 167 | - | if [ -n "$SSH_CLIENT" ] || [ -n "$SSH_TTY" ]; then |
|
| 168 | - | indicator="$(whoami)@$(cat /etc/hostname) #" |
|
| 169 | - | fi |
|
| 170 | - | ||
| 171 | - | if [ -n "$RAD_HOME" ]; then |
|
| 172 | - | indicator="🌱" |
|
| 173 | - | extra=" RAD_HOME=$RAD_HOME" |
|
| 174 | - | fi |
|
| 175 | - | ||
| 176 | - | # Status |
|
| 177 | - | if [ "$last" -eq 0 ]; then |
|
| 178 | - | PROMPT="%{$fg[blue]%}$indicator %{$reset_color%}" |
|
| 179 | - | RPROMPT="$extra" |
|
| 180 | - | else |
|
| 181 | - | PROMPT="%{$fg[red]%}$indicator %{$reset_color%}" |
|
| 182 | - | RPROMPT=" $last" |
|
| 183 | - | fi |
|
| 184 | - | ||
| 185 | - | if [ "$RPROMPT" != "" ]; then |
|
| 186 | - | RPROMPT="%{$fg[red]%}#$RPROMPT%{$reset_color%}" |
|
| 187 | - | fi |
|
| 188 | - | ||
| 189 | - | # Set the window title to the pwd. |
|
| 190 | - | print -Pn "\e]2;%~\a" |
|
| 191 | - | } |
|
| 192 | - | ||
| 193 | - | preexec() { |
|
| 194 | - | # Set the window title to the command and pwd. |
|
| 195 | - | print -Pn "\e]2;$1 [%~]\a" |
|
| 196 | - | } |
|
| 197 | - | ||
| 198 | - | # |
|
| 199 | - | # Vi-mode |
|
| 200 | - | # |
|
| 201 | - | bindkey -v |
|
| 202 | - | export KEYTIMEOUT=1 |
|
| 203 | - | # |
|
| 204 | - | zle-keymap-select zle-line-init() { |
|
| 205 | - | # Check ~/.st/config.h for the cursor escape sequences. |
|
| 206 | - | case $KEYMAP in |
|
| 207 | - | vicmd) print -n -- "\e[2 q";; |
|
| 208 | - | viins|main) print -n -- "\e[4 q";; |
|
| 209 | - | esac |
|
| 210 | - | ||
| 211 | - | zle reset-prompt |
|
| 212 | - | zle -R |
|
| 213 | - | } |
|
| 214 | - | ||
| 215 | - | zle-line-finish() { |
|
| 216 | - | print -n -- "\e[2 q" |
|
| 217 | - | } |
|
| 218 | - | ||
| 219 | - | zle -N zle-line-init |
|
| 220 | - | zle -N zle-line-finish |
|
| 221 | - | zle -N zle-keymap-select |
|
| 222 | - | ||
| 223 | - | col() { |
|
| 224 | - | awk "{ print \$$1 }" |
|
| 225 | - | } |
|
| 226 | - | ||
| 227 | - | # |
|
| 228 | - | # Switch to `fg` process with Ctrl-Z |
|
| 229 | - | # |
|
| 230 | - | fg-command() { |
|
| 231 | - | if [[ ! $#BUFFER -eq 0 ]]; then |
|
| 232 | - | zle push-input |
|
| 233 | - | fi |
|
| 234 | - | BUFFER="fg" |
|
| 235 | - | zle accept-line |
|
| 236 | - | } |
|
| 237 | - | zle -N fg-command |
|
| 238 | - | bindkey '^Z' fg-command |
|
| 239 | - | ||
| 240 | - | # Zsh syntax highlighting |
|
| 241 | - | # source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh |