hyprland updates and tests

This commit is contained in:
Yannick 2025-06-04 21:01:18 +02:00
parent 3d36ee1b41
commit 4016f00c7a
5 changed files with 187 additions and 7 deletions

View file

@ -1,4 +1,4 @@
#? Config file for btop v. 1.4.0
#? Config file for btop v. 1.4.3
#* Name of a btop++/bpytop/bashtop formatted ".theme" file, "Default" and "TTY" for builtin themes.
#* Themes should be placed in "../share/btop/themes" relative to binary or "$HOME/.config/btop/themes"
@ -53,7 +53,7 @@ graph_symbol_proc = "default"
shown_boxes = "cpu mem net proc"
#* Update time in milliseconds, recommended 2000 ms or above for better sample times for graphs.
update_ms = 500
update_ms = 900
#* Processes sorting, "pid" "program" "arguments" "threads" "user" "memory" "cpu lazy" "cpu direct",
#* "cpu lazy" sorts top process over time (easier to follow), "cpu direct" updates top process directly.
@ -154,7 +154,7 @@ custom_cpu_name = ""
disks_filter = ""
#* Show graphs instead of meters for memory values.
mem_graphs = True
mem_graphs = False
#* Show mem box below net box instead of above.
mem_below_net = False
@ -187,7 +187,7 @@ disk_free_priv = False
show_io_stat = True
#* Toggles io mode for disks, showing big graphs for disk read/write speeds.
io_mode = False
io_mode = True
#* Set to True to show combined read/write io graphs in io mode.
io_graph_combined = False
@ -210,6 +210,9 @@ net_sync = True
#* Starts with the Network Interface specified here.
net_iface = ""
#* "True" shows bitrates in base 10 (Kbps, Mbps). "False" shows bitrates in binary sizes (Kibps, Mibps, etc.). "Auto" uses base_10_sizes.
base_10_bitrate = "Auto"
#* Show battery stats in top right if battery is present.
show_battery = True
@ -226,6 +229,9 @@ log_level = "WARNING"
#* Measure PCIe throughput on NVIDIA cards, may impact performance on certain cards.
nvml_measure_pcie_speeds = True
#* Measure PCIe throughput on AMD cards, may impact performance on certain cards.
rsmi_measure_pcie_speeds = True
#* Horizontally mirror the GPU graph.
gpu_mirror_graph = True

View file

@ -227,10 +227,10 @@ bind = $mainMod SHIFT, F, exec, qutebrowser
bind = $mainMod, W, exec, distrobox enter arch -- youtube-music
# bind = $mainMod, P, pseudo, # dwindle
bind = $mainMod, N, togglesplit,
bind = $mainMod, code:36 , focusurgentorlast # Code 36 => Enter key
bind = $mainMod, code:36 , focusurgentorlast # Code 36 => Enter
bind = $mainMod SHIFT, S, exec, $screenshot -m region -o ~/Pictures/hyprshot
bind = $mainMod SHIFT, C, exec, hyprpicker -a -f hex
bind = $mainMod, ESCAPE, exec, hyprlock
bind = $mainMod, code:105, exec, hyprlock
bind = , F11, fullscreen, 1
bindel=, XF86AudioRaiseVolume, exec, pactl set-sink-volume @DEFAULT_SINK@ +2db
bindel=, XF86AudioLowerVolume, exec, pactl set-sink-volume @DEFAULT_SINK@ -2db
@ -241,6 +241,9 @@ bindl =, XF86AudioNext, exec, playerctl next
bindl =, XF86AudioPrev, exec, playerctl previous
bindel=, XF86MonBrightnessUp, exec, brightnessctl set +5%
bindel=, XF86MonBrightnessDown, exec, brightnessctl set 5%-
bindl = $mainMod, code:49, exec, playerctl play-pause # Code 94 => §
bindl =, switch:off:[Lid Switch], exec, hyprctl sleep
binde = $mainMod, D, exec, makoctl dismiss
bind = $mainMod SHIFT, D, exec, makoctl dismiss -a
@ -304,6 +307,22 @@ bindm = $mainMod, mouse:272, movewindow
bindm = $mainMod, mouse:273, resizewindow
###############
### SUBMAPS ###
###############
bind = $mainMod, M, submap, volcontrol
submap = volcontrol
bind =, a, exec, playerctl
bindel=, XF86AudioRaiseVolume, exec, pactl set-sink-volume @DEFAULT_SINK@ +2db
bindel=, XF86AudioLowerVolume, exec, pactl set-sink-volume @DEFAULT_SINK@ -2db
bindl =, XF86AudioMute, exec, pactl set-sink-mute @DEFAULT_SINK@ toggle
bindl =, XF86AudioMicMute, exec, pactl set-source-mute @DEFAULT_SOURCE@ toggle
bindl =, XF86AudioPlay, exec, playerctl play-pause
bindl =, XF86AudioNext, exec, playerctl next
bindl =, XF86AudioPrev, exec, playerctl previous
bind =, catchall, submap, reset
submap = reset
##############################
### WINDOWS AND WORKSPACES ###
##############################

View file

@ -0,0 +1,76 @@
# Use in crontab like this:
# */5 * * * * zsh -c "export $(</proc/$(pidof Hyprland)/environ tr \\0 \\n | grep -E '^DBUS_SESSION_BUS_ADDRESS=') ; source ~/.config/shellfunctions/fs_sync_offline && fs_sync_offline"
fs_sync_offline() {
local source1="filesync:/files"
local source2="$HOME/.offline_filesync"
local filter_file="$source2/.important-files.txt"
local bisync_log="$source2/.bisync_log.txt"
local notification_header="OfflineFileSync"
if timeout 2 curl shork.ch || timeout 2 curl status.shork.ch; then
else
return 1
fi
functions -T send_message # Scoping
send_message() {
echo "$1"
notify-send "$notification_header" "$1"
echo "$(date +"%Y-%m-%d %H:%M:%S"): $1" >>"$bisync_log"
echo "$output" >> "$bisync_log"
}
case $1 in
init)
rclone copyto "$source1/.important-files.txt" "$source2/.important-files.txt" \
--verbose
rclone bisync "$source1" "$source2" \
--create-empty-src-dirs \
--timeout 2s \
--filter-from "$filter_file" \
--resync \
--verbose
return 1
;;
esac
local output=$(rclone bisync "$source1" "$source2" \
--create-empty-src-dirs \
--conflict-resolve newer \
--conflict-loser num \
--timeout 2s \
--resilient \
--recover \
--filter-from "$filter_file" 2>&1)
local rclone_exit_code=$?
echo $rclone_exit_code
if [[ "$output" == *conflict* && "$output" == *home* ]]; then
# Extract the path from the colored output
local extracted_path=$(echo "$output" | sed -n 's/.*\x1b\[36m\(.*\)\x1b\[0m.*/\1/p')
# Remove ".conflict{number}" from the path
local cleaned_path=$(echo "$extracted_path" | sed 's/\.conflict[0-9]*//g')
if [[ -n "$cleaned_path" ]]; then
send_message "Conflict at $cleaned_path"
fi
fi
if [[ "$output" == *"prior lock file found"* ]]; then
send_message "Lockfile present. Not synchronising."
fi
if [[ $rclone_exit_code == 0 ]]; then
return 0
fi
if [[ "$output" == *"too many deletes"* ]]; then
send_message "Too many deletes. Not synchronising."
fi
if [[ "$output" == *"critical"* ]]; then
send_message "Critical Error. Resync required!"
fi
}

View file

@ -0,0 +1,71 @@
# Use in crontab like this:
# */5 * * * * zsh -c "export $(</proc/$(pidof Hyprland)/environ tr \\0 \\n | grep -E '^DBUS_SESSION_BUS_ADDRESS=') ; source ~/.config/shellfunctions/fs_sync_offline && fs_sync_offline"
fs_sync_offline() {
local source1="filesync:/files"
local source2="$HOME/.offline_filesync"
local filter_file="$source2/.important-files.txt"
local bisync_log="$source2/.bisync_log.txt"
local notification_header="OfflineFileSync"
if timeout 2 curl shork.ch || timeout 2 curl status.shork.ch; then
else
return 1
fi
functions -T send_message # Scoping
send_message() {
echo "$1"
notify-send "$notification_header" "$1"
echo "$(date +"%Y-%m-%d %H:%M:%S"): $1" >> "$bisync_log"
}
case $1 in
init)
rclone copyto "$source1/.important-files.txt" "$source2/.important-files.txt" \
--verbose
rclone bisync "$source1" "$source2" \
--create-empty-src-dirs \
--timeout 2s \
--filter-from "$filter_file" \
--resync \
--verbose
return 1
esac
rclone bisync "$source1" "$source2" \
--create-empty-src-dirs \
--conflict-resolve newer \
--conflict-loser num \
--timeout 2s \
--resilient \
--recover \
--filter-from "$filter_file" 2>&1 | while IFS= read -r line; do
if [[ "$line" == *conflict* && "$line" == *home* ]]; then
# Extract the path from the colored output
local extracted_path=$(echo "$line" | sed -n 's/.*\x1b\[36m\(.*\)\x1b\[0m.*/\1/p')
# Remove ".conflict{number}" from the path
local cleaned_path=$(echo "$extracted_path" | sed 's/\.conflict[0-9]*//g')
if [[ -n "$cleaned_path" ]]; then
send_message "Conflict at $cleaned_path"
fi
fi
if [[ "$line" == *"prior lock file found"* ]]; then
send_message "Lockfile present. Not synchronising."
fi
if [[ "$line" == *"too many deletes"* ]]; then
send_message "Too many deletes. Not synchronising."
fi
if [[ "$line" == *"critical"* ]]; then
send_message "Critical Error. Resync required!"
fi
done
}

10
.zshrc
View file

@ -105,6 +105,7 @@ source $ZSH/oh-my-zsh.sh
alias dotfiles='/usr/bin/git --git-dir=$HOME/dotfiles --work-tree=$HOME'
fastfetch --config examples/16
# fastfetch --config examples/16 --kitty-direct ~/Pictures/shork.png --logo-width 25 --logo-height 10
# export XDG_CURRENT_DESKTOP=sway
alias ledger-shell="ledger-agent ~/.ssh/ledger.conf -s -v"
@ -114,10 +115,17 @@ alias dcud='UID="$(id -u)" GID="$(id -g)" docker compose up -d'
alias dbounce='docker compose down && dcud'
alias needssh="git remote set-url origin \$(git remote get-url origin | sed -e 's|https://github.com/|git@github.com:|' -e 's|/$||' -e 's|\.git$||')"
alias icat="kitten icat --background white"
alias marptohtml="npx @marp-team/marp-cli@latest --theme-set themes/mytheme.css - template.md -o index.html"
alias marptohtml="npx @marp-team/marp-cli@latest --html --theme-set themes/mytheme.css - template.md -o index.html"
alias fs="sudo rc-service filesync"
alias fs-sync='kill -SIGHUP "$(cat /run/filesync.pid)"'
alias fs-sync-offline='rclone bisync filesync:/files ~/.offline_filesync --conflict-resolve newer --conflict-loser num --timeout 2s --filter-from ~/.offline_filesync/.important-files.txt 2>&1 | grep conflict | grep home | sed -n "s/.*\x1b\[36m\([^[:cntrl:]]*\)\x1b\[0m.*/\1/p" | while read -r conflict; do notify-send "Conflict at $conflict"; echo "Conflict at $conflict" >> ~/.offline_filesync/.conflict_log.txt; done'
alias fs-sync-offline-init='cd ~; rm -rf .offline_filesync; mkdir .offline_filesync; rclone copyto filesync:/files/.important-files.txt ~/.offline_filesync/.important-files.txt --verbose && rclone bisync filesync:/files ~/.offline_filesync --conflict-resolve newer --conflict-loser num --timeout 2s --filter-from ~/.offline_filesync/.important-files.txt --verbose --resync'
source ~/.config/shellfunctions/fs_sync_offline.sh
# Created by `pipx` on 2024-11-22 13:27:16
export PATH="$PATH:/home/melody/.local/bin"
eval "$(zoxide init --cmd cd zsh)"
eval "$(starship init zsh)"
source <(fzf --zsh)