diff options
Diffstat (limited to 'scripts/commands')
33 files changed, 161 insertions, 0 deletions
diff --git a/scripts/commands/:break b/scripts/commands/:break new file mode 100755 index 0000000..e6bde66 --- /dev/null +++ b/scripts/commands/:break @@ -0,0 +1,14 @@ +#!/usr/bin/env bash + +reason=`echo -n "" | dmenu -p "Reason for break ::"`; + +operation=`[[ "$reason" =~ ^- ]] && echo "stop" || echo "start"`; + +reason=`echo $reason | sed 's/^-//g'`; +([[ -z "$reason" ]]) && exit 1; + +if (ponos "$operation" "$reason"); then + notify-send "Break ${operation}ed"; +else + notify-send -u critical "Something went wrong"; +fi; diff --git a/scripts/commands/:brightness b/scripts/commands/:brightness new file mode 100755 index 0000000..cb36d70 --- /dev/null +++ b/scripts/commands/:brightness @@ -0,0 +1,3 @@ +#!/usr/bin/env sh + +~/scripts/brightness.sh set $1; diff --git a/scripts/commands/:cal b/scripts/commands/:cal new file mode 100755 index 0000000..3fbd0ef --- /dev/null +++ b/scripts/commands/:cal @@ -0,0 +1,3 @@ +#!/usr/bin/env sh + +sensible-terminal -e nvim +Calendar diff --git a/scripts/commands/:calc b/scripts/commands/:calc new file mode 100755 index 0000000..8f804ba --- /dev/null +++ b/scripts/commands/:calc @@ -0,0 +1,3 @@ +#!/usr/bin/env sh + +sensible-terminal -e node; diff --git a/scripts/commands/:camera-off b/scripts/commands/:camera-off new file mode 100755 index 0000000..ba1429e --- /dev/null +++ b/scripts/commands/:camera-off @@ -0,0 +1,3 @@ +#!/usr/bin/env sh + +dsudo modprobe -r uvcvideo && notify-send "Camera turned off" || notify-send "Something went wrong" diff --git a/scripts/commands/:camera-on b/scripts/commands/:camera-on new file mode 100755 index 0000000..e6d8924 --- /dev/null +++ b/scripts/commands/:camera-on @@ -0,0 +1,3 @@ +#!/usr/bin/env sh + +dsudo modprobe uvcvideo && notify-send "Camera turned on" || notify-send "Something went wrong" diff --git a/scripts/commands/:cheat b/scripts/commands/:cheat new file mode 100755 index 0000000..850557f --- /dev/null +++ b/scripts/commands/:cheat @@ -0,0 +1,5 @@ +#!/usr/bin/env sh + +[[ ! -z "$1" ]] && file=$1 || file=Cheatsheets; + +sensible-terminal -e sensible-editor ~/.config/vimwiki/$file.md; diff --git a/scripts/commands/:codi b/scripts/commands/:codi new file mode 100755 index 0000000..09fb11b --- /dev/null +++ b/scripts/commands/:codi @@ -0,0 +1,9 @@ +#!/usr/bin/env bash + +filetype=${1:-javascript} +tmpfile=$(mktemp /tmp/interpreter.XXXXXXX) + +sensible-terminal -e sh -c "~/.bin/with_zsh 'codi $filetype $tmpfile'"; + +rm $tmpfile; + diff --git a/scripts/commands/:color-pick b/scripts/commands/:color-pick new file mode 100755 index 0000000..7d7850a --- /dev/null +++ b/scripts/commands/:color-pick @@ -0,0 +1,4 @@ +#!/usr/bin/env bash + +~/.bin/color-pick; + diff --git a/scripts/commands/:day b/scripts/commands/:day new file mode 100755 index 0000000..e090f5b --- /dev/null +++ b/scripts/commands/:day @@ -0,0 +1,8 @@ +#!/usr/bin/env bash + +~/scripts/brightness.sh set 100; + +:gamma 0.91 0.94 0.93; + +xgamma -gamma 1; + diff --git a/scripts/commands/:email b/scripts/commands/:email new file mode 100755 index 0000000..0b7b63f --- /dev/null +++ b/scripts/commands/:email @@ -0,0 +1,4 @@ +#!/usr/bin/env bash + +sensible-terminal -e neomutt + diff --git a/scripts/commands/:files b/scripts/commands/:files new file mode 100755 index 0000000..7ee64ce --- /dev/null +++ b/scripts/commands/:files @@ -0,0 +1,3 @@ +#!/usr/bin/env sh + +file-manager; diff --git a/scripts/commands/:gamma b/scripts/commands/:gamma new file mode 100755 index 0000000..2b2a1f8 --- /dev/null +++ b/scripts/commands/:gamma @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +if [[ $# == 1 ]]; then + r=$1; g=$1; b=$1; +else + r=${1:-'1'}; g=${2:-'1'}; b=${3:-'1'}; +fi; + +notify-send "Setting gamma to ($r, $g, $b)"; +xrandr --output eDP-1 --brightness 1 --gamma $r:$g:$b + diff --git a/scripts/commands/:install b/scripts/commands/:install new file mode 100755 index 0000000..20d602b --- /dev/null +++ b/scripts/commands/:install @@ -0,0 +1,2 @@ +#!/usr/bin/env bash + diff --git a/scripts/commands/:mic b/scripts/commands/:mic new file mode 100755 index 0000000..4815d3d --- /dev/null +++ b/scripts/commands/:mic @@ -0,0 +1,3 @@ +#!/usr/bin/env sh + +~/scripts/sound.sh mute-mic; diff --git a/scripts/commands/:music b/scripts/commands/:music new file mode 100755 index 0000000..8ac1653 --- /dev/null +++ b/scripts/commands/:music @@ -0,0 +1,3 @@ +#!/usr/bin/env sh + +sensible-terminal -e ncmpcpp diff --git a/scripts/commands/:night b/scripts/commands/:night new file mode 100755 index 0000000..b97c90b --- /dev/null +++ b/scripts/commands/:night @@ -0,0 +1,4 @@ +#!/usr/bin/env bash + +~/scripts/brightness.sh set 2; + diff --git a/scripts/commands/:notes b/scripts/commands/:notes new file mode 100755 index 0000000..cf5a8cc --- /dev/null +++ b/scripts/commands/:notes @@ -0,0 +1,3 @@ +#!/usr/bin/env sh + +sensible-terminal -e sensible-editor ~/.config/vimwiki/index.md; diff --git a/scripts/commands/:play-next b/scripts/commands/:play-next new file mode 100755 index 0000000..255fb9f --- /dev/null +++ b/scripts/commands/:play-next @@ -0,0 +1,17 @@ +#!/usr/bin/env bash + +musicdir=$HOME/Downloads/music; + +ls_songs() { + cd $musicdir; + find -follow | while read l; do [[ -f "$l" ]] && echo "$l"; done | sed 's/^\.\///'; +} + +song=$(ls_songs | sort | dmenu -p "Song :: "); + +[[ -z "$song" ]] && exit 1; + +mpc insert "file://$musicdir/$song"; + +[[ "$(~/scripts/music/player.sh get_play_state)" == "Stopped" ]] && mpc play; +update-dwmblock music; diff --git a/scripts/commands/:power b/scripts/commands/:power new file mode 100755 index 0000000..735e6bd --- /dev/null +++ b/scripts/commands/:power @@ -0,0 +1,3 @@ +#!/usr/bin/env bash + +~/scripts/powercontrol.sh menu diff --git a/scripts/commands/:scratchpad b/scripts/commands/:scratchpad new file mode 100755 index 0000000..69f0971 --- /dev/null +++ b/scripts/commands/:scratchpad @@ -0,0 +1,4 @@ +#!/usr/bin/env bash + +sensible-terminal -e sensible-editor ~/.config/vimwiki/scratchpad.md; + diff --git a/scripts/commands/:standup b/scripts/commands/:standup new file mode 120000 index 0000000..970efd7 --- /dev/null +++ b/scripts/commands/:standup @@ -0,0 +1 @@ +/home/imsohexy/.work-config/commands/:standup
\ No newline at end of file diff --git a/scripts/commands/:system-monitor b/scripts/commands/:system-monitor new file mode 100755 index 0000000..5c8e784 --- /dev/null +++ b/scripts/commands/:system-monitor @@ -0,0 +1,3 @@ +#!/usr/bin/env bash + +sensible-terminal -e ytop diff --git a/scripts/commands/:tasks b/scripts/commands/:tasks new file mode 100755 index 0000000..d020ddf --- /dev/null +++ b/scripts/commands/:tasks @@ -0,0 +1,4 @@ +#!/usr/bin/env bash + +sensible-terminal -e sensible-editor ~/.config/vimwiki/Work.md; + diff --git a/scripts/commands/:time b/scripts/commands/:time new file mode 100755 index 0000000..0970ef9 --- /dev/null +++ b/scripts/commands/:time @@ -0,0 +1,3 @@ +#!/usr/bin/env sh + +sensible-terminal -e tty-clock -t -b -c diff --git a/scripts/commands/:today b/scripts/commands/:today new file mode 100755 index 0000000..ec7b295 --- /dev/null +++ b/scripts/commands/:today @@ -0,0 +1,4 @@ +#!/usr/bin/env bash + +sensible-terminal -e sensible-editor ~/.config/vimwiki/Today.md; + diff --git a/scripts/commands/:tord b/scripts/commands/:tord new file mode 100755 index 0000000..83207fa --- /dev/null +++ b/scripts/commands/:tord @@ -0,0 +1,6 @@ +#!/usr/bin/env bash + +~/.bin/dsudo chown -R an:an /var/lib/tor; + +tor --runasdaemon 1 -f ~/.config/tor/torrc & disown; + diff --git a/scripts/commands/:torrent b/scripts/commands/:torrent new file mode 100755 index 0000000..b3f1849 --- /dev/null +++ b/scripts/commands/:torrent @@ -0,0 +1,4 @@ +#!/usr/bin/env bash + +sensible-terminal -e bash -c 'tremc'; + diff --git a/scripts/commands/:type b/scripts/commands/:type new file mode 100755 index 0000000..5a95508 --- /dev/null +++ b/scripts/commands/:type @@ -0,0 +1,4 @@ +#!/usr/bin/env bash + +xdotool type "$1" + diff --git a/scripts/commands/:weather b/scripts/commands/:weather new file mode 100755 index 0000000..e9006e7 --- /dev/null +++ b/scripts/commands/:weather @@ -0,0 +1,3 @@ +#!/usr/bin/env bash + +sensible-terminal -e bash -c 'curl wttr.in/Virar && read' diff --git a/scripts/commands/:wiki b/scripts/commands/:wiki new file mode 100755 index 0000000..3a26283 --- /dev/null +++ b/scripts/commands/:wiki @@ -0,0 +1,3 @@ +#!/usr/bin/env sh + +~/scripts/wiki.sh; diff --git a/scripts/commands/:work-start b/scripts/commands/:work-start new file mode 100755 index 0000000..5603a8b --- /dev/null +++ b/scripts/commands/:work-start @@ -0,0 +1,7 @@ +#!/usr/bin/env bash + +if (ponos start work); then + notify-send "Started 'work' block"; +else + notify-send -u critical "Something went wrong"; +fi; diff --git a/scripts/commands/:work-stop b/scripts/commands/:work-stop new file mode 100755 index 0000000..e02ccd0 --- /dev/null +++ b/scripts/commands/:work-stop @@ -0,0 +1,7 @@ +#!/usr/bin/env bash + +if (ponos stop work); then + notify-send "Stopped 'work' block"; +else + notify-send -u critical "Something went wrong"; +fi; |
