• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javaandroidc++linuxc#objective-ccocoa誰得qtrubypythongamewindowsbathyscaphephpguic翻訳omegattwitterframeworktestbtronarduinovb.net計画中(planning stage)directxpreviewerゲームエンジンdom

Commit MetaInfo

Revision453b0da60591a34d25b6ea63853642ec66cd4f73 (tree)
Time2020-06-26 03:59:14
Authorcreio <mailcreio@gmai...>
Commitercreio

Log Message

2020.06.25 Update, add polybar auto hide sh

Change Summary

Incremental Difference

--- /dev/null
+++ b/.bin/phide.sh
@@ -0,0 +1,33 @@
1+#!/bin/sh
2+
3+# TOGGLE_CMD='polybar-msg cmd toggle &'
4+# pacman -S xdo
5+
6+BAR_HEIGHT_SHOW=2
7+BAR_HEIGHT_HIDE=22
8+SHOW_CMD='xdo show -N Polybar'
9+HIDE_CMD='xdo hide -N Polybar'
10+
11+# Return y-position of cursor
12+get_y_position() {
13+ loc=$(xdotool getmouselocation --shell | grep Y)
14+ echo ${loc:2}
15+}
16+
17+hidden=true
18+eval $HIDE_CMD
19+while :; do
20+
21+ y_loc=$(get_y_position)
22+ sleep 0.10
23+
24+ if (( y_loc < BAR_HEIGHT_SHOW )) && [ "$hidden" = true ]; then
25+ eval $SHOW_CMD
26+ hidden=false
27+ fi
28+
29+ if (( y_loc >= BAR_HEIGHT_HIDE )) && [ "$hidden" = false ]; then
30+ eval $HIDE_CMD
31+ hidden=true
32+ fi
33+done
--- a/.config/sublime-text-3/Packages/User/Package Control.last-run
+++ b/.config/sublime-text-3/Packages/User/Package Control.last-run
@@ -1 +1 @@
1-1593028164
\ No newline at end of file
1+1593102140
\ No newline at end of file