feat: periodic update

This commit is contained in:
Flinner Yuu 2026-05-22 23:47:15 +03:00
parent 19a7e7793b
commit 2b80bbdd6c
Signed by: flinner
GPG Key ID: 95CE0DA7F0E58CA6
8 changed files with 58 additions and 4 deletions

1
.gitignore vendored
View File

@ -8,3 +8,4 @@ __pycache__
/emacs.mine/.config/emacs.mine/eln-cache/ /emacs.mine/.config/emacs.mine/eln-cache/
/emacs.mine/.config/emacs.mine/elpy/ /emacs.mine/.config/emacs.mine/elpy/
/haskell/.ghc/ghci_history /haskell/.ghc/ghci_history
/bin/bin/out/

5
bin/bin/hyprlock_fix.sh Executable file
View File

@ -0,0 +1,5 @@
#!/bin/bash
pkill hyprlock
hyprctl --instance 0 'keyword misc:allow_session_lock_restore 1'
hyprctl --instance 0 'dispatch exec hyprlock'

38
bin/bin/mouse_accel.sh Executable file
View File

@ -0,0 +1,38 @@
#!/bin/bash
STATE_FILE="/tmp/mouse_accel_state"
DEFAULT_SPEED=40
STEP=20
MAX_SPEED=200
TIME_THRESHOLD_MS=100
now_ms() {
date +%s%3N # current time in milliseconds
}
# Read previous state
if [[ -f "$STATE_FILE" ]]; then
read -r last_time last_speed < "$STATE_FILE"
else
last_time=0
last_speed=$DEFAULT_SPEED
fi
current_time=$(now_ms)
delta=$((current_time - last_time))
if (( delta <= TIME_THRESHOLD_MS )); then
# Accelerate
new_speed=$((last_speed + STEP))
[[ $new_speed -gt $MAX_SPEED ]] && new_speed=$MAX_SPEED
else
# Reset
new_speed=$DEFAULT_SPEED
fi
# Save new state
echo "$current_time $new_speed" > "$STATE_FILE"
# Output the new speed
echo "$new_speed"

View File

@ -1,4 +1,4 @@
#+title: Flinner's Config
#+PROPERTY: header-args:emacs-lisp :tangle ~/.config/emacs.mine/init.el :mkdirp yes #+PROPERTY: header-args:emacs-lisp :tangle ~/.config/emacs.mine/init.el :mkdirp yes
#+startup: content #+startup: content
* README: * README:
@ -83,6 +83,7 @@ remove warning by use-package
(setq max-mini-window-height 13) ; Maximum height for resizing mini-windows (the minibuffer and the echo area). = 1 line (setq max-mini-window-height 13) ; Maximum height for resizing mini-windows (the minibuffer and the echo area). = 1 line
(defalias 'yes-or-no-p 'y-or-n-p) ; I don't want to type 'yes' everytime!, 'y' is enough (defalias 'yes-or-no-p 'y-or-n-p) ; I don't want to type 'yes' everytime!, 'y' is enough
(setq dired-listing-switches "-al --group-directories-first") ; directories first
;(setq native-comp-deferred-compilation t); emacs 30+ i guess ;(setq native-comp-deferred-compilation t); emacs 30+ i guess
(setq comp-deferred-compilation-deny-list '()) ;; turn off bytecompiler warnings (setq comp-deferred-compilation-deny-list '()) ;; turn off bytecompiler warnings
@ -1352,8 +1353,11 @@ From: https://yiufung.net/post/anki-org/
(setq org-super-agenda-groups (setq org-super-agenda-groups
'((:log t :order 99); logs at bottom '((:log t :order 99); logs at bottom
(:name "Study" (:name "Study"
:order 90 :order 88
:tag ("S")) :tag ("S"))
(:name "Conferences, Journals, and Papers"
:order 90
:tag ("conf"))
(:name "Life" (:name "Life"
:order 91 :order 91
:tag ("L")) :tag ("L"))

View File

@ -214,7 +214,6 @@ animations {
# See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more # See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more
dwindle { dwindle {
pseudotile = true # Master switch for pseudotiling. Enabling is bound to mainMod + shift + t in the keybinds section below
preserve_split = true # You probably want this preserve_split = true # You probably want this
force_split = 2 # right or bottom force_split = 2 # right or bottom
#smart_split = true #smart_split = true

View File

@ -0,0 +1,4 @@
//@theme "/usr/share/rofi/themes/iggy.rasi"
@theme "/usr/share/rofi/themes/material.rasi"

3
rofi/.config/rofimoji.rc Normal file
View File

@ -0,0 +1,3 @@
action = copy
files = [emojis, math]
skin-tone = moderate

View File

@ -219,7 +219,7 @@ ip.me () { curl eth0.me ; curl ipv6.icanhazip.com } # or ip.me
[ ! -z "$1" ] && file=$1 || file=$(find . -maxdepth 2 -type f | fzf) [ ! -z "$1" ] && file=$1 || file=$(find . -maxdepth 2 -type f | fzf)
[ -z "$file" ] && return [ -z "$file" ] && return
echo "file=@$file" echo "file=@$file"
_URL=$(curl -F "file=@$file" 0x0.st) _URL=$(curl -F "file=@$file" ttm.sh)
echo "$_URL" | xclip -sel clip echo "$_URL" | xclip -sel clip
echo "$_URL" echo "$_URL"
} }