diff options
Diffstat (limited to '.bin')
-rwxr-xr-x | .bin/ag-autorandr | 13 | ||||
-rwxr-xr-x | .bin/ag-status | 2 | ||||
-rwxr-xr-x | .bin/ccurse | 11 | ||||
-rwxr-xr-x | .bin/ccurse-ical | 8 | ||||
-rwxr-xr-x | .bin/dock | 6 | ||||
-rwxr-xr-x | .bin/dot-bootstrap | 9 | ||||
-rwxr-xr-x | .bin/get-mailbox-imap | 4 | ||||
-rwxr-xr-x | .bin/nmutt | 7 | ||||
-rwxr-xr-x | .bin/undock | 6 |
9 files changed, 51 insertions, 15 deletions
diff --git a/.bin/ag-autorandr b/.bin/ag-autorandr index 0a75819..1064e1c 100755 --- a/.bin/ag-autorandr +++ b/.bin/ag-autorandr @@ -1,14 +1,15 @@ #!/bin/sh -screens=$(xrandr --listmonitors | tail -n +2 | rev | cut -d " " -f 1 | rev) -screen_master=$(echo "${screens}" | cut -d " " -f 1) +set -x + +# screens=$(xrandr --listmonitors | tail -n +2 | rev | cut -d " " -f 1 | rev) +screens=$(xrandr -q | grep -v -e "^ " -e "disconnected" | tail -n +2 | cut -d " " -f 1) +screen_master=$(echo "${screens}" | head -n 1) -logger -s reset xrandr size xrandr -s 0 xrandr --output "${screen_master}" --auto -for screen in $(echo ${screens} | cut -d " " -f 2); do +for screen in ${screens}; do xrandr --output "${screen}" --auto --right-of "${screen_master}" - echo --output "${screen}" --auto --right-of "${screen_master}" - screen_master=${screen} + screen_master="${screen}" done diff --git a/.bin/ag-status b/.bin/ag-status index 150b9db..3970e54 100755 --- a/.bin/ag-status +++ b/.bin/ag-status @@ -25,7 +25,7 @@ while true; do Linux) battery=$(acpi -b | cut -d " " -f 4 | - __cleanup_value) + cut -d "%" -f 1) battery_status=$(acpi -a | tr -s " " | cut -d " " -f 3) diff --git a/.bin/ccurse b/.bin/ccurse new file mode 100755 index 0000000..6377bb0 --- /dev/null +++ b/.bin/ccurse @@ -0,0 +1,11 @@ +#!/bin/sh + +default_calendar="personal" +data_dir="${HOME}/docs/calendar" + +for calendar; do true; done +args=$(echo ${@} | rev | cut -d " " -f 2- | rev) + +exec calcurse -C "${HOME}/.config/calcurse" \ + -D "${data_dir}/${last:-${default_calendar}}" \ + ${args} diff --git a/.bin/ccurse-ical b/.bin/ccurse-ical new file mode 100755 index 0000000..d5c6e90 --- /dev/null +++ b/.bin/ccurse-ical @@ -0,0 +1,8 @@ +#!/bin/sh + +set -xe + +[ "${1}" ] +[ "${2}" ] + +ccurse diff --git a/.bin/dock b/.bin/dock new file mode 100755 index 0000000..6d4776a --- /dev/null +++ b/.bin/dock @@ -0,0 +1,6 @@ +#!/bin/sh + +set -xe + +x11-config +ag-autorandr diff --git a/.bin/dot-bootstrap b/.bin/dot-bootstrap index 56840dc..766eaf1 100755 --- a/.bin/dot-bootstrap +++ b/.bin/dot-bootstrap @@ -7,11 +7,12 @@ directories="git \ .cache/dot \ .cache/neomutt \ .local/bin \ - .local/share/dot" + .local/share/dot \ + .mail" remote=$(yadm remote | head -n 1) yadm branch --set-upstream-to="${remote}/trunk" trunk -for directory in ${directories}; do - [ ! -d "${HOME}/${directory}" ] && mkdir -p "${HOME}/${directory}" -done +for directory in ${directories}; do mkdir -p "${HOME}/${directory}"; done + +notmuch new diff --git a/.bin/get-mailbox-imap b/.bin/get-mailbox-imap index fad7e21..713873e 100755 --- a/.bin/get-mailbox-imap +++ b/.bin/get-mailbox-imap @@ -16,7 +16,7 @@ def flatten_output(list): Print all boxes with a flattened output, primarily for neomutt usage. """ - print(''.join([f"+'{box}' " for box in list]), end=' ') + return ''.join([f"+'{box}' " for box in list]) def sort_boxes(bxs): @@ -70,7 +70,7 @@ def main(): bxs = sort_boxes(get_boxes(mail.list()[1])) # oneline pretty-print for neomutt - flatten_output(bxs) + print(flatten_output(bxs), end=' ') if __name__ == "__main__": @@ -11,9 +11,12 @@ get_param() { tr -d '"' } -# export server/username for get-mailbox-imap script export MAIL_SERVER=$(get_param "${NMUTT_CONFIGURATION_FILE}" "my_server") export MAIL_USERNAME=$(get_param "${NMUTT_CONFIGURATION_FILE}" "my_user") - export MAIL_PASSWORD=$(get-pass "mailbox") + +# get-mailbox-imap imap.${MAIL_SERVER} ${MAIL_USERNAME}@${MAIL_SERVER} ${MAIL_PASSWORD} +# offlineimap --dry-run +# mbsync -a + exec neomutt ${@} diff --git a/.bin/undock b/.bin/undock new file mode 100755 index 0000000..2193610 --- /dev/null +++ b/.bin/undock @@ -0,0 +1,6 @@ +#!/bin/sh + +set -xe + +x11-config +xrandr -s 0 |