From 99a701d793c6a67e46ce2dc32793734998545f0f Mon Sep 17 00:00:00 2001 From: tiynger Date: Tue, 10 Sep 2019 10:03:36 +0200 Subject: [PATCH] shortcut updates --- .config/i3blocks/config | 34 ++++++--------------------------- .config/sxhkd/sxhkdrc | 33 +++++++++++++++----------------- .dotinstall/baseinstallation.sh | 14 ++++++++------ .dotinstall/thinkpadinstall.sh | 2 ++ .local/bin/i3cmds/killrecording | 7 ------- .local/bin/i3cmds/showclip | 10 ---------- .local/bin/i3cmds/tmuxdd | 4 ---- .local/bin/statusbar/iplocate | 9 --------- .local/bin/statusbar/music | 18 ----------------- .local/bin/statusbar/news | 17 ----------------- .local/bin/statusbar/torrent | 28 --------------------------- 11 files changed, 31 insertions(+), 145 deletions(-) delete mode 100755 .local/bin/i3cmds/killrecording delete mode 100755 .local/bin/i3cmds/showclip delete mode 100755 .local/bin/i3cmds/tmuxdd delete mode 100755 .local/bin/statusbar/iplocate delete mode 100755 .local/bin/statusbar/music delete mode 100755 .local/bin/statusbar/news delete mode 100755 .local/bin/statusbar/torrent diff --git a/.config/i3blocks/config b/.config/i3blocks/config index e21244b..4981c18 100644 --- a/.config/i3blocks/config +++ b/.config/i3blocks/config @@ -2,36 +2,14 @@ command=~/.local/bin/statusbar/$BLOCK_NAME separator_block_width=15 markup=pango -#[record] -#command=cat /tmp/recordingicon -#interval=once -#signal=9 - -#[music] -#label=🎼 -#interval=once -#signal=11 - -#[news] -#label=📰 -#interval=once -#signal=6 - -#[iplocate] -#interval=30 - [pacpackages] label=📦 interval=once signal=8 -#[torrent] -#interval=20 -#signal=7 - -#[weather] -#interval=180 -#signal=5 +[weather] +interval=180 +signal=5 [mailbox] label=📬 @@ -50,9 +28,9 @@ label=💻 interval=once signal=10 -#[disk] -#interval=60 -#command=disk / +[disk] +interval=60 +command=disk / [disk] interval=60 diff --git a/.config/sxhkd/sxhkdrc b/.config/sxhkd/sxhkdrc index ed8e74f..f2cc93c 100644 --- a/.config/sxhkd/sxhkdrc +++ b/.config/sxhkd/sxhkdrc @@ -1,8 +1,20 @@ # Basic binds super + Return $TERMINAL +super + b + $BROWSER +super + c + code super + d dmenu_run +super + f + $TERMINAL -e $FILE +super + j + xournalpp +super + m + $TERMINAL -e neomutt +super + i + idea # Et cetera... XF86Launch1 @@ -36,21 +48,6 @@ XF86MonBrightnessUp # Function keys -# Show readme -super + F1 - groff -mom $HOME/.local/share/larbs/readme.mom -Tpdf | zathura - -# Browser -super + F2 - $BROWSER -# File Manager -super + F3 - $TERMINAL -e $FILE -# VS Code -super + F4 - code -# xournal -super + F5 - xournalpp # Mount a USB drive or Android device super + F6 dmenumount @@ -63,12 +60,12 @@ super + F8 # Network Manager interface super + F9 $TERMINAL -e sudo -A nmtui -# Reboot -super + F11 - prompt "Reboot computer?" "sudo -A shutdown -r now" # Hibernate super + F10 prompt 'Hibernate computer?' 'sudo systemctl suspend' +# Reboot +super + F11 + prompt "Reboot computer?" "sudo -A shutdown -r now" # Shutdown super + F12 prompt "Shutdown computer?" "sudo -A shutdown -h now" diff --git a/.dotinstall/baseinstallation.sh b/.dotinstall/baseinstallation.sh index 2e4c686..2678bcd 100644 --- a/.dotinstall/baseinstallation.sh +++ b/.dotinstall/baseinstallation.sh @@ -75,6 +75,12 @@ sudo pacman -S openssh ## add owncloud-client sudo pacman -S owncloud-client +## add pip3 +sudo pacman -S python-pip + +## add pip3 module httplib2 for calcurse +pip3 install --user httplib2 + ## add pulseaudio-alsa pulseaudio-bluetooth sudo pacman -S pulseaudio-alsa pulseaudio-bluetoot @@ -122,9 +128,5 @@ sudo pacman -S xournalpp ## add zip sudo pacman -S jdk8-openjdk -## add pip3 -sudo pacman -S python-pip - -## add pip3 module httplib2 for calcurse -pip3 install --user httplib2 - +## remove unwanted files +rm -r ~/.local/share/larbs diff --git a/.dotinstall/thinkpadinstall.sh b/.dotinstall/thinkpadinstall.sh index ee5477a..8614f41 100755 --- a/.dotinstall/thinkpadinstall.sh +++ b/.dotinstall/thinkpadinstall.sh @@ -5,3 +5,5 @@ git clone https://aur.archlinux.org/thinkfan $HOME/downloads/set\-ups/thinkfan cd $HOME/downloads/set\-ups/thinkfan makepkg -sirc +##adding support for touchpad +pacman -S xf86-input-synaptics diff --git a/.local/bin/i3cmds/killrecording b/.local/bin/i3cmds/killrecording deleted file mode 100755 index ec9a698..0000000 --- a/.local/bin/i3cmds/killrecording +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh - -kill -9 "$(cat ~/.recordingpid)" - -# Update i3bar. -echo "" > ~/.recordingicon -pkill -RTMIN+9 i3blocks diff --git a/.local/bin/i3cmds/showclip b/.local/bin/i3cmds/showclip deleted file mode 100755 index d2faff8..0000000 --- a/.local/bin/i3cmds/showclip +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh - -# Display contents of selection via dunst if running. -# Separate script for i3. - -clip=$(xclip -o -selection clipboard) -prim=$(xclip -o -selection primary) - -[ -n "$clip" ] && notify-send "Clipboard:" "$clip" -[ -n "$prim" ] && notify-send "Primary:" "$prim" diff --git a/.local/bin/i3cmds/tmuxdd b/.local/bin/i3cmds/tmuxdd deleted file mode 100755 index c194ff1..0000000 --- a/.local/bin/i3cmds/tmuxdd +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh -# This is the script that i3 runs to either start tmux in -# the dropdown terminal or log into a previous session. -tmux a || tmux diff --git a/.local/bin/statusbar/iplocate b/.local/bin/statusbar/iplocate deleted file mode 100755 index 4ca4f10..0000000 --- a/.local/bin/statusbar/iplocate +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh - -# Gets your public ip address checks which country you are in and -# displays that information in the statusbar -# -# https://www.maketecheasier.com/ip-address-geolocation-lookups-linux/ -ifinstalled "geoiplookup" || exit -addr="$(curl ifconfig.me 2>/dev/null)" || exit -grep "flag: " ~/.config/emoji | grep "$(geoiplookup $addr | sed 's/.*, //')" | sed "s/flag: //;s/;.*//" diff --git a/.local/bin/statusbar/music b/.local/bin/statusbar/music deleted file mode 100755 index 93c2c9c..0000000 --- a/.local/bin/statusbar/music +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/sh - -filter() { - sed "/^volume:/d" | tac | sed -e "s/\\&/&/g;s/\\[paused\\].*//g;s/\\[playing\\].*//g" | tr -d '\n' | sed -e "s/$/<\\/span>/g" - } - -case $BLOCK_BUTTON in - 1) mpc status | filter && setsid "$TERMINAL" -e ncmpcpp & ;; # right click, pause/unpause - 2) mpc toggle | filter ;; # right click, pause/unpause - 3) mpc status | filter && pgrep -x dunst >/dev/null && notify-send "🎵 Music module" "\- Shows mpd song playing. -- Italic when paused. -- Left click opens ncmpcpp. -- Middle click pauses. -- Scroll changes track.";; # right click, pause/unpause - 4) mpc prev | filter ;; # scroll up, previous - 5) mpc next | filter ;; # scroll down, next - *) mpc status | filter ;; -esac; exit diff --git a/.local/bin/statusbar/news b/.local/bin/statusbar/news deleted file mode 100755 index b7ca1a7..0000000 --- a/.local/bin/statusbar/news +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/sh - -# i3blocks newsboat module. -# Displays number of unread news items and an loading icon if updating. -# When clicked, brings up `newsboat`. - -case $BLOCK_BUTTON in - 1) setsid "$TERMINAL" -e newsboat ;; - 2) setsid newsup >/dev/null & exit ;; - 3) pgrep -x dunst >/dev/null && notify-send "📰 News module" "\- Shows unread news items -- Shows 🔃 if updating with \`newsup\` -- Left click opens newsboat -- Middle click syncs RSS feeds -Note: Only one instance of newsboat (including updates) may be running at a time." ;; -esac - - cat /tmp/newsupdate 2>/dev/null || echo "$(newsboat -x print-unread | awk '{ print $1}' | sed s/^0$//g)$(cat ~/.config/newsboat/.update 2>/dev/null)" diff --git a/.local/bin/statusbar/torrent b/.local/bin/statusbar/torrent deleted file mode 100755 index 0ab811c..0000000 --- a/.local/bin/statusbar/torrent +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/sh - -transmission-remote -l | grep % | - sed " # This first sed command is to ensure a desirable order with sort - s/.*Stopped.*/A/g; - s/.*Seeding.*/Z/g; - s/.*100%.*/N/g; - s/.*Idle.*/B/g; - s/.*Uploading.*/L/g; - s/.*%.*/M/g" | - sort -h | uniq -c | sed " # Now we replace the standin letters with icons. - s/A/🛑/g; - s/B/⌛️/g; - s/L/🔼/g; - s/M/🔽/g; - s/N/✅/g; - s/Z/🌱/g" | awk '{print $2, $1}' | tr '\n' ' ' | sed -e "s/ $//g" - -case $BLOCK_BUTTON in - 1) $TERMINAL -e transmission-remote-cli ;; - 3) pgrep -x dunst >/dev/null && notify-send "Torrent module" "🛑: paused -⏳: idle (seeds needed) -🔼: uploading (unfinished) -🔽: downloading -✅: done -🌱: done and seeding" ;; -esac -