Pi66

pind
Simple Rust hotkey daemon.
git clone https://git.pi66.xyz/pind

← back to log

Makefile: prevent overwriting existing file on rebuild

author: pixel2175
date: 2025-08-13 14:35
hash: 934262b3b5b11e2ee840569450f8489d9766d413

Diffstat:

M

Makefile
2 ++--

M

pindrc
17 +++++++++++-------------------
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
diff --git a/Makefile b/Makefile
index c31f8c1..6fe2e71 100644
--- a/Makefile
+++ b/Makefile
@@ -12,7 +12,7 @@ install: build
    sudo cp ./pindc $(INSTALL_DIR)/
    sudo chmod 755 $(INSTALL_DIR)/pindc
    sudo chmod 755 $(INSTALL_DIR)/pindd
-   sudo mkdir -p $(CONFIG_DIR)
+   sudo mkdir $(CONFIG_DIR)
    sudo cp pindrc $(CONFIG_DIR)

 uninstall:
diff --git a/pindrc b/pindrc
index 26bb3a8..376f738 100644
--- a/pindrc
+++ b/pindrc
@@ -1,13 +1,8 @@
-# should every binding take one only line 
-# key : command
-CSU :   doas light -A 10 ; notify-send "Light"  "Light Up %$(light)"
-CSD :   doas light -U 10 ; notify-send "Light"  "Light Down %$(light)"
-Mu  :   set file (ls ~/learn/book | dmenu); and test -n "<math xmlns="http://www.w3.org/1998/Math/MathML" display="inline"><mrow><mi>f</mi><mi>i</mi><mi>l</mi><mi>e</mi><mi>"</mi><mi>;</mi><mi>a</mi><mi>n</mi><mi>d</mi><mi>z</mi><mi>a</mi><mi>t</mi><mi>h</mi><mi>u</mi><mi>r</mi><mi>a</mi><mtext>&#x000A0;</mtext><mo>&#x0002F;</mo><mi>l</mi><mi>e</mi><mi>a</mi><mi>r</mi><mi>n</mi><mo>&#x0002F;</mo><mi>b</mi><mi>o</mi><mi>o</mi><mi>k</mi><mo>&#x0002F;</mo><mi>"</mi></mrow></math>file"
-CSR :   pactl set-sink-volume @DEFAULT_SINK@ +10% ; notify-send "Sound"  "Volume Up %$(pamixer --get-volume)"
-CSL :   pactl set-sink-volume @DEFAULT_SINK@ -10% ; notify-send "Sound"  "Volume Down %$(pamixer --get-volume)"
+CSU :   doas light -A 10 ; notify-send "Light" "Light Up %$(light)"
+CSD :   doas light -U 10 ; notify-send "Light" "Light Down %$(light)"
+Mu  :   set file (ls ~/learn/book | wmenu); and test -n "<math xmlns="http://www.w3.org/1998/Math/MathML" display="inline"><mrow><mi>f</mi><mi>i</mi><mi>l</mi><mi>e</mi><mi>"</mi><mi>;</mi><mi>a</mi><mi>n</mi><mi>d</mi><mi>z</mi><mi>a</mi><mi>t</mi><mi>h</mi><mi>u</mi><mi>r</mi><mi>a</mi><mtext>&#x000A0;</mtext><mo>&#x0002F;</mo><mi>l</mi><mi>e</mi><mi>a</mi><mi>r</mi><mi>n</mi><mo>&#x0002F;</mo><mi>b</mi><mi>o</mi><mi>o</mi><mi>k</mi><mo>&#x0002F;</mo><mi>"</mi></mrow></math>file"
+CSR :   pactl set-sink-volume @DEFAULT_SINK@ +10% ; notify-send "Sound" "Volume Up %$(pamixer --get-volume)"
+CSL :   pactl set-sink-volume @DEFAULT_SINK@ -10% ; notify-send "Sound" "Volume Down %$(pamixer --get-volume)"
 CSw :   walrs -i ~/.config/wallpaper
-CSm :   maim -s -o | xclip -selection clipboard -t image/png && pino --title "Screenshot" -essage "The screenshot is copied to clipboard"
-CSp :   pkill -x pino
-CSj :   xdg-open /home/pixel/soft/web/japan/indexx.html
-CSi :   rm $(cat ~/.cache/wal/wal)
+CSm :   grim -g "$(slurp)" - | wl-copy && pino --title "Screenshot" --message "The screenshot is copied to clipboard"
 CSh :   foot