--- /dev/null
+#!/bin/bash
+
+echo "XDG_SESSION_TYPE = $XDG_SESSION_TYPE"
+echo "XDG_SESSION_DESKTOP = $XDG_SESSION_DESKTOP"
+echo "XDG_CURRENT_DESKTOP = $XDG_CURRENT_DESKTOP"
+
+echo "DBUS_SESSION_BUS_ADDRESS = $DBUS_SESSION_BUS_ADDRESS"
+
+echo "XDG_MENU_PREFIX = $XDG_MENU_PREFIX"
+
+echo "QT_QPA_PLATFORMTHEME = $QT_QPA_PLATFORMTHEME"
--- /dev/null
+#!/bin/bash
+
+CONFS=(hyprland hypridle hyprlauncher hyprlock hyprpaper hyprqt6engine noctalia/noctalia-colors)
+
+mapfile -d '' FRAGMENTS < <( find "$HOME/.config/hypr/fragments" -maxdepth 1 -type f -print0 )
+# mapfile -d '' FRAGMENTS < <( find "$HOME/.config/hypr/scripts" -maxdepth 1 -type f -print0 )
+
+ALLFILES=()
+for conf in "${CONFS[@]}"; do
+ ALLFILES+=("$HOME/.config/hypr/${conf}.conf")
+done
+
+for fragment in "${FRAGMENTS[@]}"; do
+ ALLFILES+=("${fragment}")
+done
+
+# for script in "${SCRIPTS[@]}"; do
+# ALLFILES+=("${script}")
+# done
+
+kak "${ALLFILES[@]}"
+
+# echo "BASH_VERSION=$BASH_VERSION"
+# declare -p ALLFILES
+
history_file="$HOME/.cache/kks-buffers-history"
[ -f "$history_file" ] || touch "$history_file"
-
kks get '%val{buflist}' |
- grep -F "$*" |
- fzf --height 100% --layout reverse --style full --prompt 'buf> ' --preview "kks cat -b {} | $preview_cmd" \
+ grep -F "$*" | sort -r |
+ fzf --layout reverse --style full --prompt 'buf> ' --preview-window=right,60% --preview "kks cat -b {} | $preview_cmd" \
--header="[c-x] delete, [c-t] new scratch" \
--bind="ctrl-x:execute-silent(kks send -b {} delete-buffer)+reload(kks get '%val{buflist}')" \
--bind="ctrl-t:execute-silent(kks send edit -scratch {q})+reload(kks get '%val{buflist}')" \
[ -f "$history_file" ] || touch "$history_file"
-fd --type file . "$@" |
+fd --type file . "$@" | sort -r --ignore-case |
fzf --multi --height 100% --style full --prompt 'files> ' \
+ --preview-window=right,60% \
--preview "$preview_cmd {}" --history="$history_file" |
while read -r file; do
kks edit "$file"
git ls-files --full-name "$(git rev-parse --show-toplevel)" "$@" |
fzf --multi --height 100% --style full --prompt 'files> ' \
+ --preview-window=right,60% \
--preview "$preview_cmd {}" --history="$history_file" |
while read -r file; do
kks edit "$file"
rg --vimgrep '.+' "$@" |
SHELL=sh fzf --delimiter=":" --query="$query" --height="100%" --prompt="grep> " --history="$history_file" \
+ --preview-window=right,60% \
--preview='range="$(echo {2}-5 | bc | sed "s/^-.*/0/"):$(echo {2}+20 | bc)"; bat -r "$range" -n --color always -H {2} {1}' |
awk -F':' '{print $1 " " "+" $2 ":" $3 }' |
xargs -r kks edit
preview_cmd="bat --color=always --line-range=:500"
(fzf --height 100% --prompt 'mru> ' --style full --preview "$preview_cmd {}" |
+ --preview-window=right,60% \
xargs -r kks edit) < ~/.cache/kak-mru
kks list |
fzf -d '\t*: *' --style full \
+ --preview-window=right,60% \
--header="[c-x] kill, [c-t] new, [c-r] reload" \
--bind="ctrl-x:execute-silent(kks kill -s {1})+reload(sleep 0.1; kks list)" \
--bind="ctrl-t:execute-silent(kks new {q})+reload(sleep 0.1; kks list)" \
--- /dev/null
+#!/bin/bash
+
+if [ "$UID" != "0" ]; then
+ echo "You have to be root" >&2
+ exit 1
+fi
+
+if [ -z "$1" ]; then
+ echo "Enter absolute path as argument 1"
+ exit 1
+fi
+
+if [ ! "$(command ls -A $1/)" ]; then
+ echo "Target path 1 is empty"
+ exit 1
+fi
+
+if [ -z "$2" ]; then
+ echo "Enter absolute path as argument 2"
+ exit 1
+fi
+
+for mountpoint in /sys /dev; do
+ echo "-- Mounting $mountpoint on $1/$mountpoint/"
+ mount --rbind "$mountpoint" "$1/$mountpoint/"
+ mount --make-rslave "$1/$mountpoint/"
+done
+
+for mountpoint in /run; do
+ echo "-- Mounting $mountpoint on $1/$mountpoint/"
+ mount --bind "$mountpoint" "$1/$mountpoint/"
+ mount --make-rslave "$1/$mountpoint/"
+done
+
+for mountpoint in /proc; do
+ echo "-- Mounting $mountpoint on $1/$mountpoint/"
+ mount -t proc "$mountpoint" "$1/$mountpoint/"
+done
+
+echo "-- Mounting $1 on $1/$2/"
+mkdir -p "$1/$2"
+mount "$2" "$1/$2"
+
+cp "/etc/resolv.conf" "$1/etc/"
+
+echo "-- Entering chroot"
+chroot "$1" "/bin/bash"
+
+echo "Remember to umount -r $mountpoint"
+
volume=$(echo "$volume" | awk '{print $2}')
volume=$(echo "( $volume * 100 ) / 1" | bc)
-notify-send -t 1000 -a 'wp-vol' -h int:value:"$volume" "Volume: ${volume}%"
+notify-send -t 500 -u low -a 'wp-vol' -h int:value:"$volume" "Volume: ${volume}%"
volume=$(echo "$volume" | awk '{print $2}')
volume=$(echo "( $volume * 100 ) / 1" | bc)
-notify-send -t 1000 -a 'wp-vol' -h int:value:"$volume" "Volume: ${volume}%"
+notify-send -t 500 -u low -a 'wp-vol' -h int:value:"$volume" "Volume: ${volume}%"
volume=$(echo "$volume" | awk '{print $2}')
volume=$(echo "( $volume * 100 ) / 1" | bc)
-notify-send -t 1000 -a 'wp-vol' -h int:value:"$volume" "Volume: ${volume}%"
+notify-send -t 500 -u low -a 'wp-vol' -h int:value:"$volume" "Volume: ${volume}%"