learnbyexample@programming.dev to Linux@lemmy.mlEnglish · 2 days agoCurate your shell historyesham.ioexternal-linkmessage-square8fedilinkarrow-up160arrow-down12
arrow-up158arrow-down1external-linkCurate your shell historyesham.iolearnbyexample@programming.dev to Linux@lemmy.mlEnglish · 2 days agomessage-square8fedilink
minus-squaregrrgyle@slrpnk.netlinkfedilinkarrow-up7·2 days agoWe are same. I sometimes use comments as kind of tags, like xinput --disable $(xinput --list | grep -i touchpad | grep 'id=[0-9]\+' -o | cut -d= -f2) # Disable synaptic touchpad trackpad pointer or python3 -c 'from ctypes import *; X11 = cdll.LoadLibrary("libX11.so.6"); X11.XOpenDisplay.restype = POINTER(c_ubyte); display = X11.XOpenDisplay(None); X11.XkbLockModifiers(display, c_uint(0x0100), c_uint(2), c_uint(0)); X11.XCloseDisplay(display)' # swap caps CAPS CAPSLOCK or sometimes I’ll add # works at the end of a long string of attempts (usually involving dialing into a regexp), like xdpyinfo|grep dimensions|grep -Eow '\d' xdpyinfo|grep dimensions|grep -Eow '(\d)' xdpyinfo|grep dimensions|grep -ow '(\d)' xdpyinfo|grep dimensions|grep -o '(\d)' xdpyinfo|grep dimensions xdpyinfo|grep dimensions|grep '1920x1080' xdpyinfo|grep dimensions|grep -o '1920x1080' xdpyinfo|grep dimensions|grep -o '\d920x1080' xdpyinfo|grep dimensions|grep -Po '\d920x1080' xdpyinfo|grep dimensions|grep -Po '\d+x1080' xdpyinfo|grep dimensions|grep -Po '\d+x\d+' xdpyinfo|grep dimensions|grep -Po '(\d+x\d+)' xdpyinfo|grep dimensions|grep -Po '(\d+x\d+) pixels' xdpyinfo|grep dimensions|grep -Po '(\d+x\d+) pixels'|cut xdpyinfo|grep dimensions|grep -Po '(\d+x\d+) pixels'|cut -f1 xdpyinfo|grep dimensions|grep -Po '(\d+x\d+) pixels'|cut -d\ -f1 xdpyinfo|grep dimensions|grep -Po '(\d+x\d+) pixels'|cut -d'' -f1 scrot --quality 1 --compression 0 --format jpg - | convert -scale 10% -scale 1000% -quality 100 - RGB:- | i3lock --image /dev/stdin --raw 3840x1818:rgb --nofork xdpyinfo|grep dimensions|grep -Po '(\d+x\d+) pixels'|cut -d' ' -f1 xdpyinfo|grep dimensions|grep -Po '(\d+x\d+) pixels'|cut -d' ' -f1 # works
We are same. I sometimes use comments as kind of tags, like
xinput --disable $(xinput --list | grep -i touchpad | grep 'id=[0-9]\+' -o | cut -d= -f2) # Disable synaptic touchpad trackpad pointer
or
python3 -c 'from ctypes import *; X11 = cdll.LoadLibrary("libX11.so.6"); X11.XOpenDisplay.restype = POINTER(c_ubyte); display = X11.XOpenDisplay(None); X11.XkbLockModifiers(display, c_uint(0x0100), c_uint(2), c_uint(0)); X11.XCloseDisplay(display)' # swap caps CAPS CAPSLOCK
or sometimes I’ll add
# works
at the end of a long string of attempts (usually involving dialing into a regexp), likexdpyinfo|grep dimensions|grep -Eow '\d' xdpyinfo|grep dimensions|grep -Eow '(\d)' xdpyinfo|grep dimensions|grep -ow '(\d)' xdpyinfo|grep dimensions|grep -o '(\d)' xdpyinfo|grep dimensions xdpyinfo|grep dimensions|grep '1920x1080' xdpyinfo|grep dimensions|grep -o '1920x1080' xdpyinfo|grep dimensions|grep -o '\d920x1080' xdpyinfo|grep dimensions|grep -Po '\d920x1080' xdpyinfo|grep dimensions|grep -Po '\d+x1080' xdpyinfo|grep dimensions|grep -Po '\d+x\d+' xdpyinfo|grep dimensions|grep -Po '(\d+x\d+)' xdpyinfo|grep dimensions|grep -Po '(\d+x\d+) pixels' xdpyinfo|grep dimensions|grep -Po '(\d+x\d+) pixels'|cut xdpyinfo|grep dimensions|grep -Po '(\d+x\d+) pixels'|cut -f1 xdpyinfo|grep dimensions|grep -Po '(\d+x\d+) pixels'|cut -d\ -f1 xdpyinfo|grep dimensions|grep -Po '(\d+x\d+) pixels'|cut -d'' -f1 scrot --quality 1 --compression 0 --format jpg - | convert -scale 10% -scale 1000% -quality 100 - RGB:- | i3lock --image /dev/stdin --raw 3840x1818:rgb --nofork xdpyinfo|grep dimensions|grep -Po '(\d+x\d+) pixels'|cut -d' ' -f1 xdpyinfo|grep dimensions|grep -Po '(\d+x\d+) pixels'|cut -d' ' -f1 # works