modifications to .bashrc, keyboard and keybindings
This commit is contained in:
parent
3fb78daff8
commit
4e65b2527b
80
.bashrc
80
.bashrc
|
@ -136,3 +136,83 @@ else
|
|||
echo "Start Hyprland with command Hyprland"
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
# NNN plugins and colors:
|
||||
export NNN_PLUG='f:finder;o:fzopen;p:preview-tui;d:diffs;t:nmount;v:imgview;i:imgview'
|
||||
export NNN_FCOLORS='FFFFFF310000000000000000'
|
||||
export NNN_TERMINAL='alacritty --title preview-tui'
|
||||
export NNN_FIFO="/tmp/nnn.fifo"
|
||||
export PAGER="less -R"
|
||||
|
||||
#cd on quit NNN:
|
||||
n ()
|
||||
{
|
||||
# Block nesting of nnn in subshells
|
||||
[ "${NNNLVL:-0}" -eq 0 ] || {
|
||||
echo "nnn is already running"
|
||||
return
|
||||
}
|
||||
|
||||
# The behaviour is set to cd on quit (nnn checks if NNN_TMPFILE is set)
|
||||
# If NNN_TMPFILE is set to a custom path, it must be exported for nnn to
|
||||
# see. To cd on quit only on ^G, remove the "export" and make sure not to
|
||||
# use a custom path, i.e. set NNN_TMPFILE *exactly* as follows:
|
||||
# NNN_TMPFILE="${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.lastd"
|
||||
export NNN_TMPFILE="${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.lastd"
|
||||
|
||||
# Unmask ^Q (, ^V etc.) (if required, see `stty -a`) to Quit nnn
|
||||
# stty start undef
|
||||
# stty stop undef
|
||||
# stty lwrap undef
|
||||
# stty lnext undef
|
||||
|
||||
# The command builtin allows one to alias nnn to n, if desired, without
|
||||
# making an infinitely recursive alias
|
||||
command nnn "$@"
|
||||
|
||||
[ ! -f "$NNN_TMPFILE" ] || {
|
||||
. "$NNN_TMPFILE"
|
||||
rm -f "$NNN_TMPFILE" > /dev/null
|
||||
}
|
||||
}
|
||||
|
||||
nnn-preview ()
|
||||
{
|
||||
# Block nesting of nnn in subshells
|
||||
if [ -n "$NNNLVL" ] && [ "${NNNLVL:-0}" -ge 1 ]; then
|
||||
echo "nnn is already running"
|
||||
return
|
||||
fi
|
||||
|
||||
# The default behaviour is to cd on quit (nnn checks if NNN_TMPFILE is set)
|
||||
# If NNN_TMPFILE is set to a custom path, it must be exported for nnn to see.
|
||||
# To cd on quit only on ^G, remove the "export" and set NNN_TMPFILE *exactly* as this:
|
||||
# NNN_TMPFILE="${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.lastd"
|
||||
export NNN_TMPFILE="${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.lastd"
|
||||
|
||||
# This will create a fifo where all nnn selections will be written to
|
||||
NNN_FIFO="$(mktemp --suffix=-nnn -u)"
|
||||
export NNN_FIFO
|
||||
(umask 077; mkfifo "$NNN_FIFO")
|
||||
|
||||
# Preview command
|
||||
preview_cmd="/path/to/preview_cmd.sh"
|
||||
|
||||
# Use `tmux` split as preview
|
||||
if [ -e "${TMUX%%,*}" ]; then
|
||||
tmux split-window -e "NNN_FIFO=$NNN_FIFO" -dh "$preview_cmd"
|
||||
|
||||
# Use `xterm` as a preview window
|
||||
elif (which xterm &> /dev/null); then
|
||||
xterm -e "$preview_cmd" &
|
||||
|
||||
# Unable to find a program to use as a preview window
|
||||
else
|
||||
echo "unable to open preview, please install tmux or xterm"
|
||||
fi
|
||||
|
||||
nnn "$@"
|
||||
|
||||
rm -f "$NNN_FIFO"
|
||||
}
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
|
||||
# SUPER KEY
|
||||
$mainMod = SUPER
|
||||
$browser = brave
|
||||
|
||||
# Applications
|
||||
bind = $mainMod, RETURN, exec, ~/dotfiles/.settings/terminal.sh
|
||||
|
@ -30,11 +31,11 @@ bind = $mainMod SHIFT, up, resizeactive, 0 -100
|
|||
bind = $mainMod SHIFT, down, resizeactive, 0 100
|
||||
|
||||
# Actions
|
||||
bind = $mainMod, PRINT, exec, ~/dotfiles/hypr/scripts/screenshot.sh
|
||||
bind = $mainMod SHIFT, S, exec, ~/dotfiles/hypr/scripts/screenshot.sh
|
||||
bind = $mainMod CTRL, Q, exec, wlogout
|
||||
bind = $mainMod SHIFT, W, exec, ~/dotfiles/hypr/scripts/wallpaper.sh
|
||||
bind = $mainMod CTRL, W, exec, ~/dotfiles/hypr/scripts/wallpaper.sh select
|
||||
bind = $mainMod CTRL, RETURN, exec, rofi -show drun
|
||||
bind = $mainMod CTRL, space, exec, rofi -show drun
|
||||
bind = $mainMod CTRL, H, exec, ~/dotfiles/hypr/scripts/keybindings.sh
|
||||
bind = $mainMod SHIFT, B, exec, ~/dotfiles/waybar/launch.sh
|
||||
bind = $mainMod SHIFT, R, exec, ~/dotfiles/hypr/scripts/loadconfig.sh
|
||||
|
@ -44,6 +45,15 @@ bind = $mainMod, V, exec, ~/dotfiles/scripts/cliphist.sh
|
|||
bind = $mainMod CTRL, T, exec, ~/dotfiles/waybar/themeswitcher.sh
|
||||
bind = $mainMod CTRL, S, exec, alacritty --class dotfiles-floating -e ~/dotfiles/hypr/start-settings.sh
|
||||
|
||||
# chat-gpt keyboard shortcut:
|
||||
bind = $mainMod SHIFT, C, exec, $browser --app=https://chat.openai.com
|
||||
# toggle waybar:
|
||||
bind = $mainMod SHIFT, M, exec, ~/dotfiles/waybar/toggle.sh
|
||||
# spotify
|
||||
bind = $mainMod SHIFT, P, exec, $browser --app=https://open.spotify.com
|
||||
# btop
|
||||
bind = $mainMod SHIFT, X, exec, alacritty --class dotfiles-floating -e btop
|
||||
|
||||
# Workspaces
|
||||
bind = $mainMod, 1, workspace, 1
|
||||
bind = $mainMod, 2, workspace, 2
|
||||
|
@ -80,7 +90,7 @@ bind = , XF86AudioPause, exec, playerctl pause
|
|||
bind = , XF86AudioNext, exec, playerctl next
|
||||
bind = , XF86AudioPrev, exec, playerctl previous
|
||||
bind = , XF86AudioMicMute, exec, pactl set-source-mute @DEFAULT_SOURCE@ toggle
|
||||
bind = , XF86Calculator, exec, qalculate-gtk
|
||||
bind = , XF86Calculator, exec, gnome-calculator
|
||||
bind = , XF86Lock, exec, swaylock
|
||||
bind = , XF86Tools, exec, alacritty --class dotfiles-floating -e ~/dotfiles/hypr/settings/settings.sh
|
||||
|
||||
|
|
|
@ -3,14 +3,20 @@
|
|||
# https://wiki.hyprland.org/Configuring/Variables/#input
|
||||
# -----------------------------------------------------
|
||||
input {
|
||||
kb_layout = de
|
||||
kb_layout = us
|
||||
kb_variant =
|
||||
kb_model =
|
||||
kb_options =
|
||||
numlock_by_default = true
|
||||
|
||||
# For United States
|
||||
# kb_layout = us
|
||||
# kb_variant = intl
|
||||
# kb_model = pc105
|
||||
# kb_options =
|
||||
|
||||
follow_mouse = 1
|
||||
touchpad {
|
||||
natural_scroll = false
|
||||
natural_scroll = true
|
||||
}
|
||||
sensitivity = 0 # -1.0 - 1.0, 0 means no modification.
|
||||
sensitivity = 0.5 #0 #-1.0 - 1.0, 0 means no modification.
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user