From 8115ca3e6e1c5f4d09019a798d6d75aad3413825 Mon Sep 17 00:00:00 2001 From: eug-vs Date: Tue, 8 Dec 2020 01:44:48 +0300 Subject: refactor: move screenshot to separate script --- .local/bin/screenshot.sh | 11 +++++++++++ .local/bin/ttl.sh | 11 +++++++++++ 2 files changed, 22 insertions(+) create mode 100755 .local/bin/screenshot.sh create mode 100755 .local/bin/ttl.sh (limited to '.local/bin') diff --git a/.local/bin/screenshot.sh b/.local/bin/screenshot.sh new file mode 100755 index 0000000..0fa365a --- /dev/null +++ b/.local/bin/screenshot.sh @@ -0,0 +1,11 @@ +#!/bin/bash +# Screenshot via ImageMagick +# Passes all args down to import command + +SCREENSHOTS_DIR=$HOME/Pictures/Screenshots +FILENAME=$SCREENSHOTS_DIR/$(date +%F_%H-%M-%S).png + +echo "$@" + +mkdir -p $SCREENSHOTS_DIR +import $@ $FILENAME && xclip -selection clipboard -target image/png -i < $FILENAME diff --git a/.local/bin/ttl.sh b/.local/bin/ttl.sh new file mode 100755 index 0000000..2fa2a16 --- /dev/null +++ b/.local/bin/ttl.sh @@ -0,0 +1,11 @@ +#!/bin/bash +# Fix default TTL and disable ipv6 making changes permanent +# TODO: replace wlo1 with automatically detected device name + +sudo sysctl \ + net.ipv4.ip_default_ttl=65 \ + net.ipv6.conf.all.disable_ipv6=1\ + net.ipv6.conf.default.disable_ipv6=1 \ + net.ipv6.conf.wlo1.disable_ipv6=1 \ + | sudo tee /etc/sysctl.d/fix-ttl.conf -a + -- cgit v1.2.3