diff options
author | Suleyman Farajli <suleyman@farajli.net> | 2024-02-18 17:36:51 +0400 |
---|---|---|
committer | Suleyman Farajli <suleyman@farajli.net> | 2024-02-18 17:36:51 +0400 |
commit | d1e8f727620479a98ad568e8e3dc98e84bef45b2 (patch) | |
tree | 56a8dedb74e9e8a6f8692027e3eadd201eb37c5f /src/dotfiles | |
parent | f40c73f3b30547f7267c84bd22677dec65029dc4 (diff) |
version 0.2
Diffstat (limited to 'src/dotfiles')
-rw-r--r-- | src/dotfiles/Xresources | 34 | ||||
-rw-r--r-- | src/dotfiles/alacritty/alacritty.toml | 43 | ||||
-rwxr-xr-x | src/dotfiles/alacritty/alacritty.yml | 45 | ||||
-rwxr-xr-x | src/dotfiles/bspwm/bspwmrc | 44 | ||||
-rw-r--r-- | src/dotfiles/dunst/dunstrc | 33 | ||||
-rwxr-xr-x | src/dotfiles/i3/config | 3 | ||||
-rw-r--r-- | src/dotfiles/kitty/kitty.conf | 2 | ||||
-rw-r--r-- | src/dotfiles/lf/lfrc | 44 | ||||
-rw-r--r-- | src/dotfiles/mimeapps.list | 13 | ||||
-rwxr-xr-x | src/dotfiles/nsxiv/exec/key-handler | 43 | ||||
-rw-r--r-- | src/dotfiles/nvim/init.lua | 1 | ||||
-rw-r--r-- | src/dotfiles/picom/picom.conf | 26 | ||||
-rwxr-xr-x | src/dotfiles/polybar/config.ini | 46 | ||||
-rwxr-xr-x | src/dotfiles/sxhkd/sxhkdrc | 35 | ||||
-rwxr-xr-x | src/dotfiles/zathura/zathurarc | 2 | ||||
-rw-r--r-- | src/dotfiles/zsh/user_profile | 19 | ||||
-rwxr-xr-x | src/dotfiles/zsh/zshrc (renamed from src/dotfiles/zshrc) | 49 |
17 files changed, 327 insertions, 155 deletions
diff --git a/src/dotfiles/Xresources b/src/dotfiles/Xresources new file mode 100644 index 0000000..42259ae --- /dev/null +++ b/src/dotfiles/Xresources @@ -0,0 +1,34 @@ +! Black + DarkGrey +*color0: #000000 +*color8: #555753 +! DarkRed + Red +*color1: #ff6565 +*color9: #ff8d8d +! DarkGreen + Green +*color2: #93d44f +*color10: #c8e7a8 +! DarkYellow + Yellow +*color3: #eab93d +*color11: #ffc123 +! DarkBlue + Blue +*color4: #204a87 +*color12: #3465a4 +! DarkMagenta + Magenta +*color5: #ce5c00 +*color13: #f57900 +!DarkCyan + Cyan (both not tango) +*color6: #89b6e2 +*color14: #46a4ff +! LightGrey + White +*color7: #cccccc +*color15: #ffffff + +XTerm.vt100.background: black +XTerm.vt100.foreground: grey +XTerm.vt100.foreground: grey + +Sxiv.background: #282828 +Sxiv.foreground: #ebdbb2 + +Nsxiv.window.foreground: #4E3524 +Nsxiv.window.background: #282828 diff --git a/src/dotfiles/alacritty/alacritty.toml b/src/dotfiles/alacritty/alacritty.toml new file mode 100644 index 0000000..f558b57 --- /dev/null +++ b/src/dotfiles/alacritty/alacritty.toml @@ -0,0 +1,43 @@ +# Gruvbox themed alacritty config + +[colors.bright] +black = "#928374" +blue = "#83a598" +cyan = "#8ec07c" +green = "#b8bb26" +magenta = "#d3869b" +red = "#fb4934" +white = "#ebdbb2" +yellow = "#fabd2f" + +[colors.normal] +black = "#282828" +blue = "#458588" +cyan = "#689d6a" +green = "#98971a" +magenta = "#b16286" +red = "#cc241d" +white = "#a89984" +yellow = "#d79921" + +[colors.primary] +background = "#282828" +foreground = "#ebdbb2" + +[font] +size = 9 + +[font.bold] +family = "JetBrainsMono Nerd Font" +style = "Bold" + +[font.bold_italic] +family = "monospace" +style = "Bold Italic" + +[font.italic] +family = "monospace" +style = "Italic" + +[font.normal] +family = "JetBrainsMono Nerd Font" diff --git a/src/dotfiles/alacritty/alacritty.yml b/src/dotfiles/alacritty/alacritty.yml deleted file mode 100755 index 1381bab..0000000 --- a/src/dotfiles/alacritty/alacritty.yml +++ /dev/null @@ -1,45 +0,0 @@ -colors: - primary: - background: '#282828' - foreground: '#ebdbb2' - - # Normal colors - normal: - black: '#282828' - red: '#cc241d' - green: '#98971a' - yellow: '#d79921' - blue: '#458588' - magenta: '#b16286' - cyan: '#689d6a' - white: '#a89984' - - # Bright colors - bright: - black: '#928374' - red: '#fb4934' - green: '#b8bb26' - yellow: '#fabd2f' - blue: '#83a598' - magenta: '#d3869b' - cyan: '#8ec07c' - white: '#ebdbb2' - - -font: - normal: - family: JetBrainsMono Nerd Font - - bold: - family: JetBrainsMono Nerd Font - style: Bold - - italic: - family: monospace - style: Italic - - bold_italic: - family: monospace - style: Bold Italic - - size: 9 diff --git a/src/dotfiles/bspwm/bspwmrc b/src/dotfiles/bspwm/bspwmrc index f3a6adc..75bb794 100755 --- a/src/dotfiles/bspwm/bspwmrc +++ b/src/dotfiles/bspwm/bspwmrc @@ -1,5 +1,10 @@ #!/bin/sh +# Gruvbox themed bspwm config + +[ -z $XDG_COLOR_TRANSFORM ] && XDG_COLOR_TRANSFORM="#4E3524" +[ -z $XDG_COLOR_INACTIVE_TRANSFORM ] && XDG_COLOR_INACTIVE_TRANSFORM="#262626" + pgrep -x sxhkd > /dev/null || sxhkd & @@ -11,8 +16,8 @@ bspc monitor eDP-1 -d 1 2 3 4 5 6 7 8 9 #borders and colors -bspc config normal_border_color "#262626" -bspc config focused_border_color "#4E3524" +bspc config normal_border_color $XDG_COLOR_INACTIVE_TRANSFORM +bspc config focused_border_color $XDG_COLOR_TRANSFORM bspc config border_width 10 bspc config window_gap 3 bspc config single_monocle true @@ -20,34 +25,19 @@ bspc config borderless_monocle true bspc config gapless_monocle true -#to switch caps with escape -setxkbmap -option "caps:escape" - - -: ' -Uncomment the following line to make the Caps Lock button -work as Escape when pressed alone, and as Ctrl when pressed -with another key. -' -#xcape -e 'Caps_Lock=Escape' -#setxkbmap -option "caps:ctrl_modifier" +# setxkbmap -option "caps:escape" #to switch caps with escape -#increase cursor speed -xset r rate 300 50 +# Uncomment the following 2 lines to make the Caps Lock button +# work as Escape when pressed alone, and as Ctrl when pressed +# with another key. -#disable screen blackening -xset s off && xset -dpms - -#hide mouse cursor if it is inactive -unclutter & - -#turns touchpad off -synclient TouchpadOff=1 - -#turn keyboard layout to United States -setxkbmap us +# xcape -e 'Caps_Lock=Escape' +setxkbmap -option "caps:ctrl_modifier" +xset r rate 300 50 #increase cursor speed +xset s off && xset -dpms #disable screen blackening +unclutter & #hide mouse cursor if it is inactive +setxkbmap us #turn keyboard layout to United States xgamma -gamma 0.8 picom & - diff --git a/src/dotfiles/dunst/dunstrc b/src/dotfiles/dunst/dunstrc new file mode 100644 index 0000000..19c55b4 --- /dev/null +++ b/src/dotfiles/dunst/dunstrc @@ -0,0 +1,33 @@ +# Very minimal dunst config + +[global] + width = 300 + height = 300 + origin = bottom-right + offset = 10x10 + scale = 0 + notification_limit = 6 + separator_height = 2 + alignment = left + stack_duplicates = true + frame_width = 3 + frame_color = "#4E3524" + gap_size = 6 + separator_color = frame + font = JetBrainsMono Nerd Font 10 + line_height = 3 + +[urgency_normal] + foreground = "#a89984" + background = "#282828" + timeout = 5 + +[urgency_low] + foreground = "#a89984" + background = "#282828" + timeout = 3 + +[urgency_critical] + foreground = "#a89984" + background = "#282828" + timeout = 8 diff --git a/src/dotfiles/i3/config b/src/dotfiles/i3/config index b7f5ccd..61db90b 100755 --- a/src/dotfiles/i3/config +++ b/src/dotfiles/i3/config @@ -1,4 +1,4 @@ -#Theion's i3-wm config +# Theion's i3-wm config font pango: JetBrainsMono Nerd Font 0 set $bg #282828 @@ -213,4 +213,3 @@ bindsym $mod+Shift+m exec killall kitty bindsym $mod+Shift+n exec --no-startup-id kitty --class=floating bindsym $mod+Shift+p exec ~/.config/polybar/launch.sh - diff --git a/src/dotfiles/kitty/kitty.conf b/src/dotfiles/kitty/kitty.conf index bba1e35..07c905b 100644 --- a/src/dotfiles/kitty/kitty.conf +++ b/src/dotfiles/kitty/kitty.conf @@ -1,7 +1,9 @@ +enable_audio_bell no remember_window_size no initial_window_width 840 initial_window_height 600 + background_opacity 0.75 font_size 14 diff --git a/src/dotfiles/lf/lfrc b/src/dotfiles/lf/lfrc new file mode 100644 index 0000000..ebfffa3 --- /dev/null +++ b/src/dotfiles/lf/lfrc @@ -0,0 +1,44 @@ +# Suleyman's gruvbox themed lf config at "https://github.com/thei0n/slcf" +# Due to the facts that ueberzug is no longer maintained and adds extra complexity it is not included in the config + +# Options +set incsearch +set scrolloff 4 #smooth scrolling + +# Key-maps +map <enter> shell +map m push $mkdir<space> +map t push $touch<space> +map D trash +map gf $lf -remote "send $id select $(fzf --layout=reverse --height=10)" +map x $$f # execute current file (must be executable) + +map zb :{{ set sortby natural; set info size; set preview; set ratios 5:2; }} +map zz :{{ set preview; set ratios 1:2:3; }} + +# Directory change +map gp cd ~/proj +map gt cd ~/testProj +map gc cd ~/.config +map gh cd ~ +map gu cd /usr/local/bin + +# Colors +set cursoractivefmt "\033[0;1;7m" #white +# set cursoractivefmt "\033[32;1;7m" #yellowish green +# set cursoractivefmt "\033[33;1;7m" #orange +# set cursoractivefmt "\033[36;1;7m" #green + +set cursorparentfmt "\033[0;1;7m" +set tagfmt "\033[32;1;7m" +set rulerfmt "\033[32;1;7m" + +set promptfmt "\033[48;1;234m %w/%f" + + +cmd trash !{{ + [ ! -d ~/.trash ] && mkdir -p ~/.trash + set -f + printf "\nItems to be trashed:\n$fx\n\nTrash? [y/N]" && read ans + [ $ans == "y" ] && mv $fx ~/.trash && echo "Trash complete!" || echo "Failed! Use y to trash." +}} diff --git a/src/dotfiles/mimeapps.list b/src/dotfiles/mimeapps.list index a000b00..5efa139 100644 --- a/src/dotfiles/mimeapps.list +++ b/src/dotfiles/mimeapps.list @@ -1,6 +1,17 @@ [Default Applications] application/pdf=org.pwmt.zathura.desktop + [Default Applications] -image/jpeg=sxiv.desktop +image/jpeg=nsxiv.desktop +image/png=nsxiv.desktop +image/jpg=nsxiv.desktop + [Default Applications] text/plain=nvim.desktop + +[Default Applications] +text/html=org.qutebrowser.qutebrowser.desktop + +[Default Application] +x-scheme-handler/http=org.qutebrowser.qutebrowser.desktop +x-scheme-handler/https=org.qutebrowser.qutebrowser.desktop diff --git a/src/dotfiles/nsxiv/exec/key-handler b/src/dotfiles/nsxiv/exec/key-handler new file mode 100755 index 0000000..a3880e4 --- /dev/null +++ b/src/dotfiles/nsxiv/exec/key-handler @@ -0,0 +1,43 @@ +#!/bin/sh + +# For theme to be applied ~/.Xresource file must be present + +while read -r file +do + case "$1" in + + "m") + [ -z $destdir ] && destdir="$(echo "$HOME/Pictures" | dmenu -p "Move directory: " | sed "s|~|$HOME|g")" + + [ ! -d $destdir ] && { nsend "Not a directory" ; exit 2 ;} + + mv "$file" "$destdir" && nsend "$file moved to $destdir" & + ;; + + "c") + + [ -z $destdir ] && destdir="$(echo "$HOME/Pictures" | dmenu -p "Copy directory: " | sed "s|~|$HOME|g")" + + [ ! -d $destdir ] && { nsend "Not a directory" ; exit 2 ;} + + cp "$file" "$destdir" && nsend "$file copied to $destdir" & + ;; + + "w") + setwp "$file" && nsend "Wallpaper changed to $file" ;; + "d") + [ ! -d ~/.trash ] && { mkdir ~/.trash && nsend "~/.trash created";} + mv "$file" ~/.trash && nsend "$file is moved to ~/.trash" ;; + "r") + convert -rotate 90 "$file" "$file" ;; + "R") + convert -rotate -90 "$file" "$file" ;; + "f") + convert -flop "$file" "$file" ;; + "y") + echo -n "$file" | xclip -selection clipboard && nsend "Copied to clipboard" & ;; + "Y") + readlink -f "$file" | tr -d '\n' | xclip -selection clipboard && nsend "Copied to clipboard" & ;; + + esac + done diff --git a/src/dotfiles/nvim/init.lua b/src/dotfiles/nvim/init.lua index d74eada..1f4b737 100644 --- a/src/dotfiles/nvim/init.lua +++ b/src/dotfiles/nvim/init.lua @@ -1 +1,2 @@ +-- Suleyman's gruvbox themed neovim config at "https://github.com/thei0n/slcf" require("master") diff --git a/src/dotfiles/picom/picom.conf b/src/dotfiles/picom/picom.conf index f3815b2..9f942af 100644 --- a/src/dotfiles/picom/picom.conf +++ b/src/dotfiles/picom/picom.conf @@ -1,3 +1,25 @@ +# Minimal picom config + +backend = "glx"; + +#Shadows +shadow = true; +shadow-radius = 7; +shadow-offset-x = -7; +shadow-offset-y = -7; + +#Fadings fading = true; -fade-out-step = 0.05; -fade-in-step = 0.05; +fade-in-step = 0.03; +fade-out-step = 0.03; + +vsync = true; + + wintypes: + { + tooltip = { fade = true; shadow = true; opacity = 0.75; focus = true; full-shadow = false; }; + dock = { shadow = false; clip-shadow-above = true; } + dnd = { shadow = false; } + popup_menu = { opacity = 0.8; } + dropdown_menu = { opacity = 0.8; } + }; diff --git a/src/dotfiles/polybar/config.ini b/src/dotfiles/polybar/config.ini index fb996e9..14c4852 100755 --- a/src/dotfiles/polybar/config.ini +++ b/src/dotfiles/polybar/config.ini @@ -1,15 +1,12 @@ +# Compatiable with environmental color variables, fallback theme is set to be gruvbox + [colors] -grayish = #928374 -background = #282828 -foreground = #ebdbb2 -red = #fb4934 -green = #b8bb26 -yellow = #fcf55f -blue = #83a598 -purple = #d3869b -teal = #8ec07c -orange = #fe8019 -gray = #a89984 +background_inactive = ${env:XDG_COLOR_INACTIVE_FOREGROUND:#a89984} +background = ${env:XDG_COLOR_BACKGROUND:#282828} +foreground = ${env:XDG_COLOR_FOREGROUND:#ebdbb2} +warning = ${env:XDG_COLOR_WARNING:#cc241d} +non_warning = ${env:XDG_COLOR_NON_WARNING:#458588} +interactive = ${env:XDG_COLOR_INTERACTIVE:#98971a} [bar/example] width = 100% @@ -63,8 +60,8 @@ label-urgent-padding = 2 label-empty-padding = 2 label-occupied-padding=2 -label-urgent-foreground = ${colors.gray} -label-occupied-foreground = ${colors.gray} +label-urgent-foreground = ${colors.background_inactive} +label-occupied-foreground = ${colors.background_inactive} label-active-font = 1 [module/bspwm] @@ -75,11 +72,11 @@ label-focused = %index% label-focused-padding = 2 label-occupied = %index% -label-occupied-foreground = ${colors.gray} +label-occupied-foreground = ${colors.background_inactive} label-occupied-padding = 2 label-urgent = %index% -label-urgent-foreground = ${colors.red} +label-urgent-foreground = ${colors.warning} label-urgent-padding = 2 label-empty = @@ -95,7 +92,7 @@ format-discharging=Battery: <label-discharging> label-discharging=%percentage%% format-charging=Charging: <label-charging> label-charging=%percentage%% -format-discharging-foreground=${colors.grayish} +format-discharging-foreground=${colors.background_inactive} label-discharging-foreground=${colors.foreground} [module/backlight] @@ -105,7 +102,7 @@ use-actual-brightness = true enable-scroll = true format = Brightness: <label> label=%percentage%% -format-foreground=${colors.grayish} +format-foreground=${colors.background_inactive} label-foreground=${colors.foreground} [module/date] @@ -117,7 +114,7 @@ date-alt = %A, %d %B %Y time-alt = %H:%M:%S format=<label> label=%time% -format-foreground=${colors.blue} +format-foreground=${colors.non_warning} [module/cpu] type = internal/cpu @@ -126,7 +123,7 @@ warn-percentage = 95 format= cpu: <label> label=%percentage%% -format-foreground=${colors.grayish} +format-foreground=${colors.background_inactive} label-foreground=${colors.foreground} [module/memory] @@ -136,7 +133,7 @@ warn-percentage = 95 format=ram: <label> label=%gb_used% -format-foreground=${colors.grayish} +format-foreground=${colors.background_inactive} label-foreground=${colors.foreground} [module/pulseaudio] @@ -145,8 +142,8 @@ format-volume-prefix = "VOL " format-volume = <label-volume> label-muted = VOL %percentage%% label-volume = %percentage%% -label-muted-foreground = ${colors.gray} -format-volume-prefix-foreground = ${colors.gray} +label-muted-foreground = ${colors.background_inactive} +format-volume-prefix-foreground = ${colors.background_inactive} [network-base] type = internal/network @@ -159,14 +156,13 @@ label-disconnected = %{F#F0C674}%ifname%%{F#707880} disconnected inherit = network-base interface-type = wireless label-connected = %essid% -label-connected-foreground = ${colors.yellow} +label-connected-foreground = ${colors.interactive} [module/eth] inherit = network-base interface-type = wired label-connected = %{F#F0C674}%ifname%%{F-} %local_ip% -[module/wired-networjk] +[module/wired-network] type = internal/network interface = enp2s0 - diff --git a/src/dotfiles/sxhkd/sxhkdrc b/src/dotfiles/sxhkd/sxhkdrc index 2ee72e2..e8928da 100755 --- a/src/dotfiles/sxhkd/sxhkdrc +++ b/src/dotfiles/sxhkd/sxhkdrc @@ -1,26 +1,26 @@ -######################################################## -######### General keybinds ########## -######################################################## +# For some keybinds to work properly some scripts from "https://github.com/thei0n/slcf" must be installed + +######### General keybinds ########## #Launch terminal alt + Return - alacritty + [ -z $TERMINAL ] && alacritty || $TERMINAL #Launch browser alt + shift + Return - qutebrowser + [ -z $BROWSER ] && qutebrowser || $BROWSER #Change wallpaper alt + shift + v - nitrogen --set-zoom-fill --random ~/.config/wallpapers + setwp ~/.config/wallpapers #Launch terminal alternative alt + shift + n - kitty + [ -z $TERMINAL_ALTERNATIVE ] && kitty || $TERMINAL_ALTERNATIVE #Kill all the alternative terminal instances alt + shift + m - killall kitty + [ -z $TERMINAL_ALTERNATIVE ] && killall kitty || killall $TERMINAL_ALTERNATIVE #Open gruvbox themed dmenu alt + d @@ -32,28 +32,26 @@ alt+p #Volume buttons XF86AudioRaiseVolume - pactl set-sink-volume @DEFAULT_SINK@ +10% + sVolume +10 + XF86AudioLowerVolume - pactl set-sink-volume @DEFAULT_SINK@ -10% + sVolume -10 + XF86AudioMute - pactl set-sink-mute @DEFAULT_SINK@ toggle -XF86AudioMute - pactl set-source-mute @DEFAULT_SINK@ + sVolume --toggle #Brightness buttons XF86MonBrightnessUp - brightnessctl -c backlight set +5% + sBrightness +5 XF86MonBrightnessDown - brightnessctl -c backlight set 5%- + sBrightness -5 #Screenshot alt + shift + s - maim ~/Pictures/screenshots/$(date +%s).png + sScreenshot -######################################################## ######### BSPWM specific keybinds ########## -######################################################## #Change workspaces alt + {_,shift + }{1-9} @@ -105,4 +103,3 @@ alt + shift + {h,j,k,l} alt + r bspc node @/ -R 90 - diff --git a/src/dotfiles/zathura/zathurarc b/src/dotfiles/zathura/zathurarc index 152867f..e2a5e11 100755 --- a/src/dotfiles/zathura/zathurarc +++ b/src/dotfiles/zathura/zathurarc @@ -1,3 +1,5 @@ +# Gruvbox themed zathura theme at "https://github.com/eastack/zathura-gruvbox" + set notification-error-bg "#282828" # bg set notification-error-fg "#fb4934" # bright:red set notification-warning-bg "#282828" # bg diff --git a/src/dotfiles/zsh/user_profile b/src/dotfiles/zsh/user_profile new file mode 100644 index 0000000..fab1b0e --- /dev/null +++ b/src/dotfiles/zsh/user_profile @@ -0,0 +1,19 @@ +# Aliases +[ -f $XINITRC ] && alias startx="startx $XINITRC" +[ -x "$(command -v nvim)" ] && alias vim="nvim" +alias ls="ls -A --color=auto" +alias ping="ping -c 2" +alias clear="clear -x" +alias open="xdg-open" +alias lf="lfcd" +alias vim="nvim" +alias touchOn="synclient TouchpadOff=0" +alias touchOff="synclient TouchpadOff=1" + +# Systemd and Arch linux specific aliases +alias pacman="sudo pacman" +alias systemctl="sudo systemctl" +alias arch-wiki="cd /usr/share/doc/arch-wiki/html/en/" +alias is="systemctl stop NetworkManager" +alias blue="sudo systemctl start bluetooth" +alias net="sudo systemctl start NetworkManager" diff --git a/src/dotfiles/zshrc b/src/dotfiles/zsh/zshrc index d65bb44..873f29d 100755 --- a/src/dotfiles/zshrc +++ b/src/dotfiles/zsh/zshrc @@ -1,23 +1,15 @@ -#Theion's zsh config - -# Enable colors and change prompt: -autoload -U colors && colors # Load colors -PROMPT="%B%F{cyan}%~ %F{none}$%b " +# This config is a fork of Luke Smith's zshrc at "https://github.com/LukeSmithxyz/voidrice" +PROMPT="%B%F{red}%(?..%? )%B%F{blue}%n%b%f@%m %B%~ %% %b" #git integration autoload -Uz vcs_info precmd_vcs_info() { vcs_info } precmd_functions+=( precmd_vcs_info ) setopt prompt_subst -RPROMPT='%(?..[%?] ) ${vcs_info_msg_0_}' +RPROMPT='%B${vcs_info_msg_0_}' zstyle ':vcs_info:git:*' formats '%b' - -setopt autocd # Automatically cd into typed directory. -stty stop undef # Disable ctrl-s to freeze terminal. -setopt interactive_comments - # History in cache directory: HISTSIZE=10000000 SAVEHIST=10000000 @@ -31,8 +23,10 @@ zmodload zsh/complist compinit _comp_options+=(globdots) # Include hidden files. + # vi mode bindkey -v +bindkey '^R' history-incremental-search-backward export KEYTIMEOUT=1 # Use vim keys in tab complete menu: @@ -43,15 +37,9 @@ bindkey -M menuselect 'j' vi-down-line-or-history bindkey -v '^?' backward-delete-char -#function to quit in the direcory changed by lf lfcd () { - tmp="$(mktemp -uq)" - trap 'rm -f $tmp >/dev/null 2>&1 && trap - HUP INT QUIT TERM PWR EXIT' HUP INT QUIT TERM PWR EXIT - lf -last-dir-path="$tmp" "$@" - if [ -f "$tmp" ]; then - dir="$(cat "$tmp")" - [ -d "$dir" ] && [ "$dir" != "$(pwd)" ] && cd "$dir" - fi + # `command` is needed in case `lfcd` is aliased to `lf` + cd "$(command lf -print-last-dir "$@")" } # Change cursor shape for different vi modes. @@ -61,6 +49,8 @@ function zle-keymap-select () { viins|main) echo -ne '\e[5 q';; # beam esac } + + zle -N zle-keymap-select zle-line-init() { zle -K viins # initiate `vi insert` as keymap (can be removed if `bindkey -V` has been set elsewhere) @@ -70,20 +60,11 @@ zle -N zle-line-init echo -ne '\e[5 q' # Use beam shape cursor on startup. preexec() { echo -ne '\e[5 q' ;} # Use beam shape cursor for each new prompt. -#aliases -alias pacman='sudo pacman' -alias systemctl='sudo systemctl' -alias arch-wiki='cd /usr/share/doc/arch-wiki/html/en/' -alias ls='ls --color=auto' -alias open='xdg-open' -alias is="systemctl stop NetworkManager" -alias blue="sudo systemctl start bluetooth" -alias net="sudo systemctl start NetworkManager" -alias lf="lfcd" -alias touchOff='synclient TouchpadOff=1' -alias ping='ping -c 2' -alias clear='clear -x' -alias vim='nvim' +# Options +setopt autocd # Automatically cd into typed directory. +# stty stop undef # Disable ctrl-s to freeze terminal. +setopt interactive_comments unsetopt nomatch -LFS=/mnt/lfs +setopt INC_APPEND_HISTORY # Adds command to history when they are run +setopt HIST_FIND_NO_DUPS # Doesn't show duplicate commands when backward searching |