Initial push
This commit is contained in:
commit
f6275dfc01
1
.chezmoiignore
Normal file
1
.chezmoiignore
Normal file
|
@ -0,0 +1 @@
|
|||
README.md
|
18
README.md
Normal file
18
README.md
Normal file
|
@ -0,0 +1,18 @@
|
|||
# Chay's dotfiles
|
||||
|
||||
These are my dotfiles I use on all of my machines. They are managed using chezmoi.
|
||||
|
||||
## Programs
|
||||
|
||||
This is a list of most programs I use on a daily basis:
|
||||
|
||||
- zsh + grml conf
|
||||
- mpv
|
||||
- lf
|
||||
- nvim
|
||||
- keepassxc
|
||||
- cmus
|
||||
- firefox
|
||||
- eza
|
||||
- tofi
|
||||
- kitty
|
3
dot_zprofile
Normal file
3
dot_zprofile
Normal file
|
@ -0,0 +1,3 @@
|
|||
if [ -z "${WAYLAND_DISPLAY}" ] && [ "${XDG_VTNR}" -eq 1 ]; then
|
||||
exec Hyprland
|
||||
fi
|
57
dot_zshrc.local
Normal file
57
dot_zshrc.local
Normal file
|
@ -0,0 +1,57 @@
|
|||
export EDITOR="nvim"
|
||||
export BROWSER="firefox"
|
||||
|
||||
export XDG_CONFIG_HOME="$HOME/.config"
|
||||
export XDG_DATA_HOME="$HOME/.local/share"
|
||||
export XDG_CACHE_HOME="$HOME/.cache"
|
||||
export XDG_STATE_HOME="$HOME/.local/state"
|
||||
|
||||
export GTK_THEME="Adwaita:dark"
|
||||
export GPG_TTY=$(tty)
|
||||
export LC_COLLATE="C"
|
||||
export GNUPGHOME="$XDG_DATA_HOME"/gnupg
|
||||
export LESSHISTFILE="$XDG_STATE_HOME"/less/history
|
||||
|
||||
export LESS=-R
|
||||
export LESS_TERMCAP_mb="$(printf '%b' '[1;31m')"
|
||||
export LESS_TERMCAP_md="$(printf '%b' '[1;36m')"
|
||||
export LESS_TERMCAP_me="$(printf '%b' '[0m')"
|
||||
export LESS_TERMCAP_so="$(printf '%b' '[01;44;33m')"
|
||||
export LESS_TERMCAP_se="$(printf '%b' '[0m')"
|
||||
export LESS_TERMCAP_us="$(printf '%b' '[1;32m')"
|
||||
export LESS_TERMCAP_ue="$(printf '%b' '[0m')"
|
||||
export LESSOPEN="| /usr/bin/highlight -O ansi %s 2>/dev/null"
|
||||
|
||||
if [ -d "$HOME/.local/bin" ] ;
|
||||
then PATH="$HOME/.local/bin:$PATH"
|
||||
fi
|
||||
|
||||
alias \
|
||||
cp="cp -iv" \
|
||||
mv="mv -iv" \
|
||||
rm="rm -vI" \
|
||||
bc="bc -ql" \
|
||||
rsync="rsync -vrPlu" \
|
||||
mkd="mkdir -pv" \
|
||||
yt="yt-dlp --embed-metadata -i" \
|
||||
yta="yt -x -f bestaudio/best" \
|
||||
ytt="yt --skip-download --write-thumbnail" \
|
||||
df="df -h" \
|
||||
free="free -m" \
|
||||
jctl="journalctl -p 3 -xb" \
|
||||
ffmpeg="ffmpeg -hide_banner" \
|
||||
rickroll="curl -s -L https://raw.githubusercontent.com/keroserene/rickrollrc/master/roll.sh | bash" \
|
||||
c="clear"
|
||||
|
||||
alias \
|
||||
grep="grep --color=auto" \
|
||||
diff="diff --color=auto" \
|
||||
ccat="highlight --out-format=ansi" \
|
||||
ip="ip -color=auto" \
|
||||
ls="eza -1la --git --group-directories-first"
|
||||
#ls="ls -alhN --color=auto --group-directories-first" \
|
||||
|
||||
source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
|
||||
source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh
|
||||
|
||||
(cat ~/.cache/wal/sequences &)
|
3
private_dot_config/git/config
Normal file
3
private_dot_config/git/config
Normal file
|
@ -0,0 +1,3 @@
|
|||
[user]
|
||||
email = chay@altesq.net
|
||||
name = Chay
|
203
private_dot_config/hypr/hyprland.conf
Normal file
203
private_dot_config/hypr/hyprland.conf
Normal file
|
@ -0,0 +1,203 @@
|
|||
# This is an example Hyprland config file.
|
||||
#
|
||||
# Refer to the wiki for more information.
|
||||
|
||||
source=~/.cache/wal/colors-hyprland.conf
|
||||
|
||||
#
|
||||
# Please note not all available settings / options are set here.
|
||||
# For a full list, see the wiki
|
||||
#
|
||||
|
||||
# See https://wiki.hyprland.org/Configuring/Monitors/
|
||||
monitor=,preferred,auto,auto
|
||||
|
||||
|
||||
# See https://wiki.hyprland.org/Configuring/Keywords/ for more
|
||||
|
||||
# Execute your favorite apps at launch
|
||||
# exec-once = waybar & hyprpaper & firefox
|
||||
exec-once = hyprpaper
|
||||
exec-once = hyprctl hyprpaper wallpaper "HDMI-A-1,~/Pictures/wall4.jpg"
|
||||
exec-once = gammastep
|
||||
exec-once = wal -R
|
||||
exec-once = wl-paste --type text --watch cliphist store
|
||||
exec-once = wl-paste --type image --watch cliphist store
|
||||
exec-once = waybar
|
||||
|
||||
# Source a file (multi-file configs)
|
||||
# source = ~/.config/hypr/myColors.conf
|
||||
|
||||
# Some default env vars.
|
||||
env = XCURSOR_SIZE,24
|
||||
env = LIBVA_DRIVER_NAME,nvidia
|
||||
env = XDG_SESSION_TYPE,wayland
|
||||
env = GBM_BACKEND,nvidia-drm
|
||||
env = __GLX_VENDOR_LIBRARY_NAME,nvidia
|
||||
env = WLR_NO_HARDWARE_CURSORS,1
|
||||
|
||||
layerrule = blur, ^(waybar)$
|
||||
layerrule = blur, ^(launcher)$
|
||||
|
||||
# For all categories, see https://wiki.hyprland.org/Configuring/Variables/
|
||||
input {
|
||||
kb_layout = us
|
||||
kb_variant =
|
||||
kb_model =
|
||||
kb_options = grp:ctrl_space_toggle
|
||||
kb_rules =
|
||||
|
||||
follow_mouse = 1
|
||||
accel_profile = flat
|
||||
|
||||
touchpad {
|
||||
natural_scroll = false
|
||||
}
|
||||
|
||||
sensitivity = 0 # -1.0 - 1.0, 0 means no modification.
|
||||
}
|
||||
|
||||
general {
|
||||
# See https://wiki.hyprland.org/Configuring/Variables/ for more
|
||||
|
||||
gaps_in = 10
|
||||
gaps_out = 20
|
||||
border_size = 2
|
||||
#col.active_border = rgba(33ccffee) rgba(00ff99ee) 45deg
|
||||
#col.inactive_border = rgba(595959aa)
|
||||
col.active_border = $foreground
|
||||
col.inactive_border = $background
|
||||
|
||||
layout = dwindle
|
||||
|
||||
# Please see https://wiki.hyprland.org/Configuring/Tearing/ before you turn this on
|
||||
allow_tearing = false
|
||||
}
|
||||
|
||||
decoration {
|
||||
# See https://wiki.hyprland.org/Configuring/Variables/ for more
|
||||
|
||||
rounding = 10
|
||||
|
||||
blur {
|
||||
enabled = true
|
||||
size = 3
|
||||
passes = 3
|
||||
new_optimizations = true
|
||||
#xray = true
|
||||
special = true
|
||||
|
||||
vibrancy = 0.1696
|
||||
}
|
||||
|
||||
drop_shadow = true
|
||||
shadow_range = 4
|
||||
shadow_render_power = 3
|
||||
#col.shadow = rgba(1a1a1aee)
|
||||
col.shadow = $background
|
||||
}
|
||||
|
||||
animations {
|
||||
enabled = true
|
||||
|
||||
# Some default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more
|
||||
|
||||
bezier = myBezier, 0.05, 0.9, 0.1, 1.05
|
||||
|
||||
animation = windows, 1, 7, myBezier
|
||||
animation = windowsOut, 1, 7, default, popin 80%
|
||||
animation = border, 1, 10, default
|
||||
animation = borderangle, 1, 8, default
|
||||
animation = fade, 1, 7, default
|
||||
animation = workspaces, 1, 6, default
|
||||
}
|
||||
|
||||
dwindle {
|
||||
# See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more
|
||||
pseudotile = true # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
|
||||
preserve_split = true # you probably want this
|
||||
}
|
||||
|
||||
master {
|
||||
# See https://wiki.hyprland.org/Configuring/Master-Layout/ for more
|
||||
new_is_master = true
|
||||
}
|
||||
|
||||
gestures {
|
||||
# See https://wiki.hyprland.org/Configuring/Variables/ for more
|
||||
workspace_swipe = false
|
||||
}
|
||||
|
||||
misc {
|
||||
# See https://wiki.hyprland.org/Configuring/Variables/ for more
|
||||
force_default_wallpaper = 0 # Set to 0 to disable the anime mascot wallpapers
|
||||
enable_swallow=true
|
||||
swallow_regex=^(kitty)$
|
||||
}
|
||||
|
||||
# Example per-device config
|
||||
# See https://wiki.hyprland.org/Configuring/Keywords/#per-device-input-configs for more
|
||||
device:epic-mouse-v1 {
|
||||
sensitivity = -0.5
|
||||
}
|
||||
|
||||
# Example windowrule v1
|
||||
# windowrule = float, ^(kitty)$
|
||||
# Example windowrule v2
|
||||
# windowrulev2 = float,class:^(kitty)$,title:^(kitty)$
|
||||
# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more
|
||||
|
||||
|
||||
# See https://wiki.hyprland.org/Configuring/Keywords/ for more
|
||||
$mainMod = ALT
|
||||
|
||||
# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more
|
||||
bind = $mainMod SHIFT, return, exec, kitty
|
||||
bind = $mainMod SHIFT, C, killactive,
|
||||
bind = $mainMod, M, exit,
|
||||
bind = $mainMod, V, togglefloating,
|
||||
bind = $mainMod, P, exec, tofi-drun | xargs hyprctl dispatch exec --
|
||||
bind = $mainMod SHIFT, P, pseudo, # dwindle
|
||||
bind = $mainMod SHIFT, J, togglesplit, # dwindle
|
||||
|
||||
# Move focus with mainMod + arrow keys
|
||||
bind = $mainMod, H, movefocus, l
|
||||
bind = $mainMod, L, movefocus, r
|
||||
bind = $mainMod, K, movefocus, u
|
||||
bind = $mainMod, J, movefocus, d
|
||||
|
||||
# Switch workspaces with mainMod + [0-9]
|
||||
bind = $mainMod, 1, workspace, 1
|
||||
bind = $mainMod, 2, workspace, 2
|
||||
bind = $mainMod, 3, workspace, 3
|
||||
bind = $mainMod, 4, workspace, 4
|
||||
bind = $mainMod, 5, workspace, 5
|
||||
bind = $mainMod, 6, workspace, 6
|
||||
bind = $mainMod, 7, workspace, 7
|
||||
bind = $mainMod, 8, workspace, 8
|
||||
bind = $mainMod, 9, workspace, 9
|
||||
bind = $mainMod, 0, workspace, 10
|
||||
|
||||
# Move active window to a workspace with mainMod + SHIFT + [0-9]
|
||||
bind = $mainMod SHIFT, 1, movetoworkspace, 1
|
||||
bind = $mainMod SHIFT, 2, movetoworkspace, 2
|
||||
bind = $mainMod SHIFT, 3, movetoworkspace, 3
|
||||
bind = $mainMod SHIFT, 4, movetoworkspace, 4
|
||||
bind = $mainMod SHIFT, 5, movetoworkspace, 5
|
||||
bind = $mainMod SHIFT, 6, movetoworkspace, 6
|
||||
bind = $mainMod SHIFT, 7, movetoworkspace, 7
|
||||
bind = $mainMod SHIFT, 8, movetoworkspace, 8
|
||||
bind = $mainMod SHIFT, 9, movetoworkspace, 9
|
||||
bind = $mainMod SHIFT, 0, movetoworkspace, 10
|
||||
|
||||
# Example special workspace (scratchpad)
|
||||
bind = $mainMod, S, togglespecialworkspace, magic
|
||||
bind = $mainMod SHIFT, S, movetoworkspace, special:magic
|
||||
|
||||
# Scroll through existing workspaces with mainMod + scroll
|
||||
bind = $mainMod, mouse_down, workspace, e+1
|
||||
bind = $mainMod, mouse_up, workspace, e-1
|
||||
|
||||
# Move/resize windows with mainMod + LMB/RMB and dragging
|
||||
bindm = $mainMod, mouse:272, movewindow
|
||||
bindm = $mainMod, mouse:273, resizewindow
|
2
private_dot_config/hypr/hyprpaper.conf
Normal file
2
private_dot_config/hypr/hyprpaper.conf
Normal file
|
@ -0,0 +1,2 @@
|
|||
preload = /home/user/Pictures/wall4.jpg
|
||||
wallpaper = monitor1,/home/user/Pictures/wall4.jpg
|
2507
private_dot_config/kitty/kitty.conf
Normal file
2507
private_dot_config/kitty/kitty.conf
Normal file
File diff suppressed because it is too large
Load diff
149
private_dot_config/lf/lfrc
Normal file
149
private_dot_config/lf/lfrc
Normal file
|
@ -0,0 +1,149 @@
|
|||
# Luke's lf settings
|
||||
|
||||
|
||||
# Note on Image Previews
|
||||
# For those wanting image previews, like this system, there are four steps to
|
||||
# set it up. These are done automatically for LARBS users, but I will state
|
||||
# them here for others doing it manually.
|
||||
#
|
||||
# 1. ueberzug must be installed.
|
||||
# 2. The scope file (~/.config/lf/scope for me), must have a command similar to
|
||||
# mine to generate ueberzug images.
|
||||
# 3. A `set cleaner` line as below is a cleaner script.
|
||||
# 4. lf should be started through a wrapper script (~/.local/bin/lfub for me)
|
||||
# that creates the environment for ueberzug. This command can be be aliased
|
||||
# in your shellrc (`alias lf="lfub") or if set to a binding, should be
|
||||
# called directly instead of normal lf.
|
||||
|
||||
# Basic vars
|
||||
set shellopts '-eu'
|
||||
set ifs "\n"
|
||||
set scrolloff 10
|
||||
set period 1
|
||||
set hiddenfiles ".*:*.aux:*.log:*.bbl:*.bcf:*.blg:*.run.xml"
|
||||
set cleaner '~/.config/lf/cleaner'
|
||||
set previewer '~/.config/lf/scope'
|
||||
set autoquit true
|
||||
|
||||
# cmds/functions
|
||||
cmd open ${{
|
||||
case $(file --mime-type "$(readlink -f $f)" -b) in
|
||||
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet) localc $fx ;;
|
||||
image/vnd.djvu|application/pdf|application/octet-stream|application/postscript) setsid -f zathura $fx >/dev/null 2>&1 ;;
|
||||
text/*|application/json|inode/x-empty|application/x-subrip) $EDITOR $fx;;
|
||||
image/x-xcf) setsid -f gimp $f >/dev/null 2>&1 ;;
|
||||
image/svg+xml) display -- $f ;;
|
||||
image/*) nsxiv $f | grep -i "\.\(png\|jpg\|jpeg\|gif\|webp\|avif\|tif\|ico\)\(_large\)*$" |
|
||||
setsid -f nsxiv -aio 2>/dev/null | while read -r file; do
|
||||
[ -z "$file" ] && continue
|
||||
lf -remote "send select \"$file\""
|
||||
lf -remote "send toggle"
|
||||
done &
|
||||
;;
|
||||
audio/*|video/x-ms-asf) mpv --audio-display=no $f ;;
|
||||
video/*) setsid -f mpv $f -quiet >/dev/null 2>&1 ;;
|
||||
application/pdf|application/vnd.djvu|application/epub*) setsid -f zathura $fx >/dev/null 2>&1 ;;
|
||||
application/pgp-encrypted) $EDITOR $fx ;;
|
||||
application/vnd.openxmlformats-officedocument.wordprocessingml.document|application/vnd.oasis.opendocument.text|application/vnd.openxmlformats-officedocument.spreadsheetml.sheet|application/octet-stream|application/vnd.oasis.opendocument.spreadsheet|application/vnd.oasis.opendocument.spreadsheet-template|application/vnd.openxmlformats-officedocument.presentationml.presentation|application/vnd.oasis.opendocument.presentation-template|application/vnd.oasis.opendocument.presentation|application/vnd.ms-powerpoint|application/vnd.oasis.opendocument.graphics|application/vnd.oasis.opendocument.graphics-template|application/vnd.oasis.opendocument.formula|application/vnd.oasis.opendocument.database) setsid -f libreoffice $fx >/dev/null 2>&1 ;;
|
||||
*) for f in $fx; do setsid -f $OPENER $f >/dev/null 2>&1; done;;
|
||||
esac
|
||||
}}
|
||||
|
||||
cmd mkdir $mkdir -p "$(echo $* | tr ' ' '\ ')"
|
||||
|
||||
cmd extract ${{
|
||||
clear; tput cup $(($(tput lines)/3)); tput bold
|
||||
set -f
|
||||
printf "%s\n\t" "$fx"
|
||||
printf "extract?[y/N]"
|
||||
read ans
|
||||
[ $ans = "y" ] && aunpack $fx
|
||||
}}
|
||||
|
||||
cmd delete ${{
|
||||
clear; tput cup $(($(tput lines)/3)); tput bold
|
||||
set -f
|
||||
printf "%s\n\t" "$fx"
|
||||
printf "delete?[y/N]"
|
||||
read ans
|
||||
[ $ans = "y" ] && rm -rf -- $fx
|
||||
}}
|
||||
|
||||
cmd moveto ${{
|
||||
clear; tput cup $(($(tput lines)/3)); tput bold
|
||||
set -f
|
||||
clear; echo "Move to where?"
|
||||
dest="$(sed -e 's/\s*#.*//' -e '/^$/d' -e 's/^\S*\s*//' ${XDG_CONFIG_HOME:-$HOME/.config}/shell/bm-dirs | fzf | sed 's|~|$HOME|')" &&
|
||||
for x in $fx; do
|
||||
eval mv -iv \"$x\" \"$dest\"
|
||||
done &&
|
||||
notify-send "File(s) moved." "File(s) moved to $dest."
|
||||
}}
|
||||
|
||||
cmd copyto ${{
|
||||
clear; tput cup $(($(tput lines)/3)); tput bold
|
||||
set -f
|
||||
clear; echo "Copy to where?"
|
||||
dest="$(sed -e 's/\s*#.*//' -e '/^$/d' -e 's/^\S*\s*//' ${XDG_CONFIG_HOME:-$HOME/.config}/shell/bm-dirs | fzf | sed 's|~|$HOME|')" &&
|
||||
for x in $fx; do
|
||||
eval cp -ivr \"$x\" \"$dest\"
|
||||
done &&
|
||||
notify-send "File(s) copied." "File(s) copies to $dest."
|
||||
}}
|
||||
|
||||
cmd setbg "$1"
|
||||
|
||||
cmd bulkrename ${{
|
||||
tmpfile_old="$(mktemp)"
|
||||
tmpfile_new="$(mktemp)"
|
||||
|
||||
[ -n "$fs" ] && fs=$(basename -a $fs) || fs=$(ls)
|
||||
|
||||
echo "$fs" > "$tmpfile_old"
|
||||
echo "$fs" > "$tmpfile_new"
|
||||
$EDITOR "$tmpfile_new"
|
||||
|
||||
[ "$(wc -l < "$tmpfile_old")" -eq "$(wc -l < "$tmpfile_new")" ] || { rm -f "$tmpfile_old" "$tmpfile_new"; exit 1; }
|
||||
|
||||
paste "$tmpfile_old" "$tmpfile_new" | while IFS="$(printf '\t')" read -r src dst
|
||||
do
|
||||
[ "$src" = "$dst" ] || [ -e "$dst" ] || mv -- "$src" "$dst"
|
||||
done
|
||||
|
||||
rm -f "$tmpfile_old" "$tmpfile_new"
|
||||
lf -remote "send $id unselect"
|
||||
}}
|
||||
|
||||
# Bindings
|
||||
map <c-f> $lf -remote "send $id select \"$(fzf)\""
|
||||
map J $lf -remote "send $id cd $(sed -e 's/\s*#.*//' -e '/^$/d' -e 's/^\S*\s*//' ${XDG_CONFIG_HOME:-$HOME/.config}/shell/bm-dirs | fzf)"
|
||||
map gh
|
||||
map g top
|
||||
map D delete
|
||||
map E extract
|
||||
map C copyto
|
||||
map M moveto
|
||||
map <c-n> push :mkdir<space>
|
||||
map <c-r> reload
|
||||
map <c-s> set hidden!
|
||||
map <enter> shell
|
||||
map x $$f
|
||||
map X !$f
|
||||
map o &mimeopen "$f"
|
||||
map O $mimeopen --ask "$f"
|
||||
|
||||
map A :rename; cmd-end # at the very end
|
||||
map c push A<c-u> # new rename
|
||||
map I :rename; cmd-home # at the very beginning
|
||||
map i :rename # before extension
|
||||
map a :rename; cmd-right # after extension
|
||||
map B bulkrename
|
||||
map b $setbg $f
|
||||
|
||||
map <c-e> down
|
||||
map <c-y> up
|
||||
map V push :!nvim<space>
|
||||
|
||||
map W $setsid -f $TERMINAL >/dev/null 2>&1
|
||||
|
||||
map Y $printf "%s" "$fx" | xclip -selection clipboard
|
56
private_dot_config/lf/scope
Normal file
56
private_dot_config/lf/scope
Normal file
|
@ -0,0 +1,56 @@
|
|||
#!/bin/sh
|
||||
|
||||
# File preview handler for lf.
|
||||
|
||||
set -C -f
|
||||
IFS="$(printf '%b_' '\n')"; IFS="${IFS%_}"
|
||||
|
||||
image() {
|
||||
if [ -f "$1" ] && [ -n "$DISPLAY" ] && [ -z "$WAYLAND_DISPLAY" ] && command -V ueberzug >/dev/null 2>&1; then
|
||||
printf '{"action": "add", "identifier": "PREVIEW", "x": "%s", "y": "%s", "width": "%s", "height": "%s", "scaler": "contain", "path": "%s"}\n' "$4" "$5" "$(($2-1))" "$(($3-1))" "$1" > "$FIFO_UEBERZUG"
|
||||
else
|
||||
mediainfo "$6"
|
||||
fi
|
||||
}
|
||||
|
||||
ifub() {
|
||||
[ -n "$DISPLAY" ] && [ -z "$WAYLAND_DISPLAY" ] && command -V ueberzug >/dev/null 2>&1
|
||||
}
|
||||
|
||||
# Note that the cache file name is a function of file information, meaning if
|
||||
# an image appears in multiple places across the machine, it will not have to
|
||||
# be regenerated once seen.
|
||||
|
||||
case "$(file --dereference --brief --mime-type -- "$1")" in
|
||||
image/avif) CACHE="${XDG_CACHE_HOME:-$HOME/.cache}/lf/thumb.$(stat --printf '%n\0%i\0%F\0%s\0%W\0%Y' -- "$(readlink -f "$1")" | sha256sum | cut -d' ' -f1)"
|
||||
[ ! -f "$CACHE" ] && convert "$1" "$CACHE.jpg"
|
||||
image "$CACHE.jpg" "$2" "$3" "$4" "$5" "$1" ;;
|
||||
image/vnd.djvu)
|
||||
CACHE="${XDG_CACHE_HOME:-$HOME/.cache}/lf/thumb.$(stat --printf '%n\0%i\0%F\0%s\0%W\0%Y' -- "$(readlink -f "$1")" | sha256sum | cut -d' ' -f1)"
|
||||
[ ! -f "$CACHE" ] && djvused "$1" -e 'select 1; save-page-with /dev/stdout' | convert -density 200 - "$CACHE.jpg" > /dev/null 2>&1
|
||||
image "$CACHE.jpg" "$2" "$3" "$4" "$5" "$1" ;;
|
||||
image/*) image "$1" "$2" "$3" "$4" "$5" "$1" ;;
|
||||
text/html) lynx -width="$4" -display_charset=utf-8 -dump "$1" ;;
|
||||
text/troff) man ./ "$1" | col -b ;;
|
||||
text/* | */xml | application/json | application/x-ndjson) bat --terminal-width "$(($4-2))" -f "$1" ;;
|
||||
audio/* | application/octet-stream) mediainfo "$1" || exit 1 ;;
|
||||
video/* )
|
||||
CACHE="${XDG_CACHE_HOME:-$HOME/.cache}/lf/thumb.$(stat --printf '%n\0%i\0%F\0%s\0%W\0%Y' -- "$(readlink -f "$1")" | sha256sum | cut -d' ' -f1)"
|
||||
[ ! -f "$CACHE" ] && ffmpegthumbnailer -i "$1" -o "$CACHE" -s 0
|
||||
image "$CACHE" "$2" "$3" "$4" "$5" "$1"
|
||||
;;
|
||||
*/pdf)
|
||||
CACHE="${XDG_CACHE_HOME:-$HOME/.cache}/lf/thumb.$(stat --printf '%n\0%i\0%F\0%s\0%W\0%Y' -- "$(readlink -f "$1")" | sha256sum | cut -d' ' -f1)"
|
||||
[ ! -f "$CACHE.jpg" ] && pdftoppm -jpeg -f 1 -singlefile "$1" "$CACHE"
|
||||
image "$CACHE.jpg" "$2" "$3" "$4" "$5" "$1"
|
||||
;;
|
||||
*/epub+zip|*/mobi*)
|
||||
CACHE="${XDG_CACHE_HOME:-$HOME/.cache}/lf/thumb.$(stat --printf '%n\0%i\0%F\0%s\0%W\0%Y' -- "$(readlink -f "$1")" | sha256sum | cut -d' ' -f1)"
|
||||
[ ! -f "$CACHE.jpg" ] && gnome-epub-thumbnailer "$1" "$CACHE.jpg"
|
||||
image "$CACHE.jpg" "$2" "$3" "$4" "$5" "$1"
|
||||
;;
|
||||
application/*zip) atool --list -- "$1" ;;
|
||||
*opendocument*) odt2txt "$1" ;;
|
||||
application/pgp-encrypted) gpg -d -- "$1" ;;
|
||||
esac
|
||||
exit 1
|
11
private_dot_config/mimeapps.list
Normal file
11
private_dot_config/mimeapps.list
Normal file
|
@ -0,0 +1,11 @@
|
|||
text/x-shellscript=text.desktop;
|
||||
x-scheme-handler/mailto=mail.desktop;
|
||||
text/plain=text.desktop;
|
||||
application/postscript=pdf.desktop;
|
||||
application/pdf=pdf.desktop;
|
||||
image/png=img.desktop;
|
||||
image/jpeg=img.desktop;
|
||||
image/gif=img.desktop;
|
||||
video/x-matroska=video.desktop
|
||||
video/mp4=video.desktop
|
||||
inode/directory=file.desktop
|
149
private_dot_config/nvim/init.vim
Normal file
149
private_dot_config/nvim/init.vim
Normal file
|
@ -0,0 +1,149 @@
|
|||
call plug#begin()
|
||||
Plug 'junegunn/goyo.vim'
|
||||
Plug 'itchyny/lightline.vim'
|
||||
Plug 'vimwiki/vimwiki'
|
||||
Plug 'ggandor/leap.nvim'
|
||||
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
|
||||
Plug 'junegunn/fzf.vim'
|
||||
Plug 'tpope/vim-commentary'
|
||||
Plug 'godlygeek/tabular'
|
||||
Plug 'preservim/vim-markdown'
|
||||
Plug 'morhetz/gruvbox'
|
||||
Plug 'dylanaraps/wal.vim'
|
||||
call plug#end()
|
||||
|
||||
" Load leap mappings
|
||||
lua require('leap').add_default_mappings()
|
||||
|
||||
" Customize fzf
|
||||
let $FZF_DEFAULT_COMMAND='find . \! \( -type d -path ./.git -prune \) \! -type d \! -name ''*.tags'' -printf ''%P\n'''
|
||||
|
||||
" Lightline theme
|
||||
let g:lightline = {
|
||||
\ 'colorscheme': 'apprentice',
|
||||
\ }
|
||||
|
||||
let g:vimwiki_list = [{'path': '~/vimwiki/', 'syntax': 'markdown', 'ext': '.md'},
|
||||
\ {'path': '~/vimwiki/personal/', 'syntax': 'markdown', 'ext': '.md'},
|
||||
\ {'path': '~/vimwiki/writing/', 'syntax': 'markdown', 'ext': '.md'}]
|
||||
|
||||
let g:vimwiki_global_ext = 0
|
||||
|
||||
" Sets how many lines of history VIM has to remember
|
||||
set history=500
|
||||
|
||||
" Enable filetype plugins
|
||||
filetype plugin on
|
||||
filetype indent on
|
||||
|
||||
" Set to auto read when a file is changed from the outside
|
||||
set autoread
|
||||
au FocusGained,BufEnter * checktime
|
||||
|
||||
" Set 7 lines to the cursor - when moving vertically using j/k
|
||||
set so=7
|
||||
|
||||
" Turn on the Wild menu
|
||||
set wildmenu
|
||||
|
||||
" Height of the command bar
|
||||
set cmdheight=1
|
||||
|
||||
" A buffer becomes hidden when it is abandoned
|
||||
set hid
|
||||
|
||||
" Configure backspace so it acts as it should act
|
||||
set backspace=eol,start,indent
|
||||
set whichwrap+=<,>,h,l
|
||||
|
||||
" Ignore case when searching
|
||||
set ignorecase
|
||||
|
||||
" When searching try to be smart about cases
|
||||
set smartcase
|
||||
|
||||
" Highlight search results
|
||||
set hlsearch
|
||||
|
||||
" Makes search act like search in modern browsers
|
||||
set incsearch
|
||||
|
||||
" Don't redraw while executing macros (good performance config)
|
||||
set lazyredraw
|
||||
|
||||
" For regular expressions turn magic on
|
||||
set magic
|
||||
|
||||
" Show matching brackets when text indicator is over them
|
||||
set showmatch
|
||||
|
||||
" How many tenths of a second to blink when matching brackets
|
||||
set mat=2
|
||||
|
||||
" Show line number
|
||||
set number
|
||||
|
||||
" Enable syntax highlighting
|
||||
syntax enable
|
||||
|
||||
" Background
|
||||
set background=dark
|
||||
|
||||
" Set utf8 as standard encoding and en_US as the standard language
|
||||
set encoding=utf8
|
||||
|
||||
" Use Unix as the standard file type
|
||||
set ffs=unix,dos,mac
|
||||
|
||||
" Turn backup off, since most stuff is in SVN, git etc. anyway...
|
||||
set nobackup
|
||||
set nowb
|
||||
set noswapfile
|
||||
|
||||
" Use spaces instead of tabs
|
||||
set expandtab
|
||||
|
||||
" Be smart when using tabs ;)
|
||||
set smarttab
|
||||
|
||||
" 1 tab == 4 spaces
|
||||
set shiftwidth=4
|
||||
set tabstop=4
|
||||
|
||||
" Linebreak on 500 characters
|
||||
set lbr
|
||||
set tw=500
|
||||
|
||||
set ai "Auto indent
|
||||
set si "Smart indent
|
||||
set wrap "Wrap lines
|
||||
|
||||
" Always show the status line
|
||||
set laststatus=2
|
||||
|
||||
" Set the title
|
||||
set title
|
||||
|
||||
" No automatic commenting on a new line
|
||||
autocmd FileType * setlocal formatoptions-=c formatoptions-=r formatoptions-=o
|
||||
|
||||
" Automatically deletes all trailing whitespace on save
|
||||
autocmd BufWritePre * %s/\s\+$//e
|
||||
|
||||
" Remove --insert-- as there's Limelight
|
||||
set noshowmode
|
||||
|
||||
" Copy and paste between vim and other programs
|
||||
set clipboard+=unnamedplus
|
||||
|
||||
" Vimwiki stuff
|
||||
set nocompatible
|
||||
|
||||
" Make colorschemes work
|
||||
" set termguicolors
|
||||
" autocmd vimenter * ++nested colorscheme gruvbox
|
||||
colorscheme wal
|
||||
|
||||
" Keybindings
|
||||
let mapleader = ";"
|
||||
nnoremap <space> :Files<CR>
|
16
private_dot_config/private_gtk-3.0/settings.ini
Normal file
16
private_dot_config/private_gtk-3.0/settings.ini
Normal file
|
@ -0,0 +1,16 @@
|
|||
[Settings]
|
||||
gtk-application-prefer-dark-theme=true
|
||||
gtk-theme-name=Arc-Dark
|
||||
gtk-icon-theme-name=Adwaita
|
||||
gtk-font-name=Cantarell 11
|
||||
gtk-cursor-theme-name=Adwaita
|
||||
gtk-cursor-theme-size=0
|
||||
gtk-toolbar-style=GTK_TOOLBAR_BOTH_HORIZ
|
||||
gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR
|
||||
gtk-button-images=0
|
||||
gtk-menu-images=0
|
||||
gtk-enable-event-sounds=1
|
||||
gtk-enable-input-feedback-sounds=1
|
||||
gtk-xft-antialias=1
|
||||
gtk-xft-hinting=1
|
||||
gtk-xft-hintstyle=hintmedium
|
5
private_dot_config/private_mpv/input.conf
Normal file
5
private_dot_config/private_mpv/input.conf
Normal file
|
@ -0,0 +1,5 @@
|
|||
l seek 5
|
||||
h seek -5
|
||||
j seek -60
|
||||
k seek 60
|
||||
S cycle sub
|
24
private_dot_config/tofi/config
Normal file
24
private_dot_config/tofi/config
Normal file
|
@ -0,0 +1,24 @@
|
|||
# Font
|
||||
font = Fira Code
|
||||
font-size = 14
|
||||
# Window Style
|
||||
anchor = top
|
||||
width = 100%
|
||||
height = 100%
|
||||
outline-width = 0
|
||||
border-width = 0
|
||||
min-input-width = 130
|
||||
result-spacing = 30
|
||||
padding-top = 35%
|
||||
padding-bottom = 0
|
||||
padding-left = 35%
|
||||
padding-right = 0
|
||||
num-results = 5
|
||||
prompt-text = ""
|
||||
background-color = #0c040366
|
||||
text-color = #bbb4ba
|
||||
input-color = #992522
|
||||
selection-color = #992522
|
||||
selection-match-color = #CA443E
|
||||
clip-to-padding = false
|
||||
require-match = false
|
2
private_dot_config/wal/templates/colors-hyprland.conf
Normal file
2
private_dot_config/wal/templates/colors-hyprland.conf
Normal file
|
@ -0,0 +1,2 @@
|
|||
$background=rgb({background.strip})
|
||||
$foreground=rgb({foreground.strip})
|
55
private_dot_config/waybar/config
Normal file
55
private_dot_config/waybar/config
Normal file
|
@ -0,0 +1,55 @@
|
|||
{
|
||||
"layer": "bottom",
|
||||
"position": "bottom",
|
||||
"modules-left": ["hyprland/workspaces"],
|
||||
"modules-center": ["clock", "custom/weather"],
|
||||
"modules-right": ["tray", "hyprland/language", "pulseaudio"],
|
||||
|
||||
"custom/weather": {
|
||||
"format": "{}",
|
||||
"interval": 10,
|
||||
"exec": "~/.config/waybar/weather.sh",
|
||||
"tooltip": false
|
||||
},
|
||||
|
||||
|
||||
"tray": {
|
||||
"icon-size": 21,
|
||||
"spacing": 10
|
||||
},
|
||||
|
||||
"clock": {
|
||||
"format": "{:%b %d %H:%M}",
|
||||
"format-alt": "{:%A, %d %B, %Y (%R)}"
|
||||
},
|
||||
|
||||
"pulseaudio": {
|
||||
"format": "{icon} {volume}%",
|
||||
"format-muted": "",
|
||||
"format-icons": {
|
||||
"headphone": "",
|
||||
"hands-free": "",
|
||||
"headset": "",
|
||||
"phone": "",
|
||||
"portable": "",
|
||||
"car": "",
|
||||
"default": ["", "", ""]
|
||||
},
|
||||
"on-click": "pamixer --toggle-mute",
|
||||
"on-click-right": "pavucontrol",
|
||||
"tooltip": false
|
||||
},
|
||||
|
||||
"hyprland/language": {
|
||||
"format": "{}",
|
||||
"format-en": "en",
|
||||
"format-ru": "ru",
|
||||
"on-click": "hyprctl switchxkblayout razer-razer-ornata-v2 next"
|
||||
},
|
||||
|
||||
"hyprland/workspaces": {
|
||||
"format": "{name}",
|
||||
"on-click": "activate",
|
||||
"sort-by-number": true
|
||||
},
|
||||
}
|
2
private_dot_config/waybar/dot_env
Normal file
2
private_dot_config/waybar/dot_env
Normal file
|
@ -0,0 +1,2 @@
|
|||
KEY=KEY
|
||||
CITY=CITY
|
77
private_dot_config/waybar/executable_weather.sh
Normal file
77
private_dot_config/waybar/executable_weather.sh
Normal file
|
@ -0,0 +1,77 @@
|
|||
#!/bin/sh
|
||||
|
||||
source ~/.config/waybar/.env
|
||||
|
||||
get_icon() {
|
||||
case $1 in
|
||||
# Icons for weather-icons
|
||||
01d) icon="";;
|
||||
01n) icon="";;
|
||||
02d) icon="";;
|
||||
02n) icon="";;
|
||||
03*) icon="";;
|
||||
04*) icon="";;
|
||||
09d) icon="";;
|
||||
09n) icon="";;
|
||||
10d) icon="";;
|
||||
10n) icon="";;
|
||||
11d) icon="";;
|
||||
11n) icon="";;
|
||||
13d) icon="";;
|
||||
13n) icon="";;
|
||||
50d) icon="";;
|
||||
50n) icon="";;
|
||||
*) icon="";
|
||||
|
||||
# Icons for Font Awesome 5 Pro
|
||||
#01d) icon="";;
|
||||
#01n) icon="";;
|
||||
#02d) icon="";;
|
||||
#02n) icon="";;
|
||||
#03d) icon="";;
|
||||
#03n) icon="";;
|
||||
#04*) icon="";;
|
||||
#09*) icon="";;
|
||||
#10d) icon="";;
|
||||
#10n) icon="";;
|
||||
#11*) icon="";;
|
||||
#13*) icon="";;
|
||||
#50*) icon="";;
|
||||
#*) icon="";
|
||||
esac
|
||||
|
||||
echo $icon
|
||||
}
|
||||
|
||||
KEY=$KEY
|
||||
CITY=$CITY
|
||||
UNITS="metric"
|
||||
SYMBOL="°"
|
||||
|
||||
API="https://api.openweathermap.org/data/2.5"
|
||||
|
||||
if [ -n "$CITY" ]; then
|
||||
if [ "$CITY" -eq "$CITY" ] 2>/dev/null; then
|
||||
CITY_PARAM="id=$CITY"
|
||||
else
|
||||
CITY_PARAM="q=$CITY"
|
||||
fi
|
||||
|
||||
weather=$(curl -sf "$API/weather?appid=$KEY&$CITY_PARAM&units=$UNITS")
|
||||
else
|
||||
location=$(curl -sf https://location.services.mozilla.com/v1/geolocate?key=geoclue)
|
||||
|
||||
if [ -n "$location" ]; then
|
||||
location_lat="$(echo "$location" | jq '.location.lat')"
|
||||
location_lon="$(echo "$location" | jq '.location.lng')"
|
||||
|
||||
weather=$(curl -sf "$API/weather?appid=$KEY&lat=$location_lat&lon=$location_lon&units=$UNITS")
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -n "$weather" ]; then
|
||||
weather_temp=$(echo "$weather" | jq ".main.temp" | cut -d "." -f 1)
|
||||
weather_icon=$(echo "$weather" | jq -r ".weather[0].icon")
|
||||
|
||||
echo "$(get_icon "$weather_icon")" "$weather_temp$SYMBOL"
|
||||
fi
|
88
private_dot_config/waybar/style.css
Normal file
88
private_dot_config/waybar/style.css
Normal file
|
@ -0,0 +1,88 @@
|
|||
@import "../../.cache/wal/colors-waybar.css";
|
||||
|
||||
* {
|
||||
font-family: FiraCode Nerd Font;
|
||||
font-size: 12px;
|
||||
font-weight: bold;
|
||||
padding-top: 1px;
|
||||
padding-bottom: 2px;
|
||||
|
||||
}
|
||||
|
||||
window#waybar {
|
||||
padding-bottom: 30px;
|
||||
margin-bottom: 30px;
|
||||
background-color: rgba(0,0,0,0);
|
||||
}
|
||||
|
||||
|
||||
tooltip {
|
||||
background-color: rgba(12, 4, 3, 0.6);
|
||||
border: 2px solid;
|
||||
border-color: @foreground;
|
||||
}
|
||||
|
||||
tooltip label {
|
||||
color: @foreground;
|
||||
}
|
||||
|
||||
#window,
|
||||
#workspaces,
|
||||
#workspaces button,
|
||||
#tray,
|
||||
#language,
|
||||
#pulseaudio {
|
||||
border-radius: 20px;
|
||||
background-color: rgba(12, 4, 3, 0.6);
|
||||
margin: 5px;
|
||||
font-size: 12px;
|
||||
color: @foreground;
|
||||
}
|
||||
|
||||
|
||||
#custom-weather,
|
||||
#clock {
|
||||
background-color: rgba(12, 4, 3, 0.6);;
|
||||
padding-right: 0px;
|
||||
margin: 0px;
|
||||
font-size: 12px;
|
||||
color: @foreground;
|
||||
}
|
||||
|
||||
|
||||
#custom-weather,
|
||||
#clock {
|
||||
color: @foreground;
|
||||
border-radius: 20px;
|
||||
}
|
||||
|
||||
|
||||
#workspaces button:hover,
|
||||
#workspaces button.active {
|
||||
background-color: rgb(60, 60, 60);
|
||||
color: @foreground;
|
||||
border-radius: 20px;
|
||||
}
|
||||
|
||||
|
||||
#custom-weather,
|
||||
#clock {
|
||||
margin: 3px;
|
||||
padding: 0 7.5px;
|
||||
border: 90px;
|
||||
}
|
||||
|
||||
#custom-weather {
|
||||
margin-left: 7.5px;
|
||||
|
||||
}
|
||||
|
||||
|
||||
#workspaces button {
|
||||
padding: 0 4px;
|
||||
margin: 2.5px;
|
||||
}
|
||||
|
||||
#workspaces button.urgent {
|
||||
background-color: #eb4d4b;
|
||||
}
|
17
private_dot_local/bin/executable_powermenu
Normal file
17
private_dot_local/bin/executable_powermenu
Normal file
|
@ -0,0 +1,17 @@
|
|||
#!/bin/bash
|
||||
|
||||
function powermenu {
|
||||
options="Shutdown\nRestart\nSleep\nLock"
|
||||
selected=$(echo -e $options | dmenu -i)
|
||||
if [[ $selected = "Shutdown" ]]; then
|
||||
poweroff
|
||||
elif [[ $selected = "Restart" ]]; then
|
||||
reboot
|
||||
elif [[ $selected = "Sleep" ]]; then
|
||||
systemctl suspend
|
||||
elif [[ $selected = "Lock" ]]; then
|
||||
slock
|
||||
fi
|
||||
}
|
||||
|
||||
powermenu
|
|
@ -0,0 +1,4 @@
|
|||
[Desktop Entry]
|
||||
Type=Application
|
||||
Name=File Manager
|
||||
Exec=/usr/local/bin/st -e lf %u
|
4
private_dot_local/private_share/applications/img.desktop
Normal file
4
private_dot_local/private_share/applications/img.desktop
Normal file
|
@ -0,0 +1,4 @@
|
|||
[Desktop Entry]
|
||||
Type=Application
|
||||
Name=Image viewer
|
||||
Exec=/usr/bin/nsxiv -a %f
|
|
@ -0,0 +1,4 @@
|
|||
[Desktop Entry]
|
||||
Type=Application
|
||||
Name=Mail
|
||||
Exec=/usr/local/bin/st -e neomutt %u
|
|
@ -0,0 +1,4 @@
|
|||
[Desktop Entry]
|
||||
Type=Application
|
||||
Name=Text editor
|
||||
Exec=/usr/local/bin/st -e nvim %u
|
|
@ -0,0 +1,4 @@
|
|||
[Desktop Entry]
|
||||
Type=Application
|
||||
Name=Video viewer
|
||||
Exec=/usr/bin/mpv -quiet %f
|
17
private_dot_ssh/private_config
Normal file
17
private_dot_ssh/private_config
Normal file
|
@ -0,0 +1,17 @@
|
|||
Compression no
|
||||
VerifyHostKeyDNS yes
|
||||
#HashKnownHosts yes
|
||||
|
||||
HostKeyAlgorithms ssh-ed25519-cert-v01@openssh.com,ssh-rsa-cert-v01@openssh.com,ssh-ed25519,ssh-rsa,ecdsa-sha2-nistp521-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp521,ecdsa-sha2-nistp384,ecdsa-sha2-nistp256
|
||||
|
||||
KexAlgorithms curve25519-sha256@libssh.org,ecdh-sha2-nistp521,ecdh-sha2-nistp384,ecdh-sha2-nistp256,diffie-hellman-group-exchange-sha256
|
||||
MACs hmac-sha2-512-etm@openssh.com,hmac-sha2-256-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-512,hmac-sha2-256,umac-128@openssh.com
|
||||
Ciphers chacha20-poly1305@openssh.com,aes256-gcm@openssh.com,aes128-gcm@openssh.com,aes256-ctr,aes192-ctr,aes128-ctr
|
||||
|
||||
Host altesq
|
||||
Hostname altesq.net
|
||||
User debian
|
||||
|
||||
Host pi
|
||||
Hostname 192.168.1.186
|
||||
User pi
|
Reference in a new issue