summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRomain Gonçalves <me@rgoncalves.se>2022-01-02 21:07:04 +0100
committerRomain Gonçalves <me@rgoncalves.se>2022-01-02 21:07:04 +0100
commita3d041d259756dc609b40e5244965fb36b05b8a3 (patch)
tree8f0890cf1dc48ef35ca6d0d5e572c2325aa09288
parent0f08d04698c814955116b6bae50752e64b774d8f (diff)
downloaddots-a3d041d259756dc609b40e5244965fb36b05b8a3.tar.gz
Sun Jan 2 09:07:04 PM CET 2022
-rwxr-xr-x.bin/ag-autorandr13
-rwxr-xr-x.bin/ag-status2
-rwxr-xr-x.bin/ccurse11
-rwxr-xr-x.bin/ccurse-ical8
-rwxr-xr-x.bin/dock6
-rwxr-xr-x.bin/dot-bootstrap9
-rwxr-xr-x.bin/get-mailbox-imap4
-rwxr-xr-x.bin/nmutt7
-rwxr-xr-x.bin/undock6
-rwxr-xr-x.config/calcurse/conf14
-rwxr-xr-x.config/neomutt/neomuttrc186
-rwxr-xr-x.config/qutebrowser/greasemonkey/boursorama-css.js2
12 files changed, 155 insertions, 113 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__":
diff --git a/.bin/nmutt b/.bin/nmutt
index 9a2bb28..8abd47d 100755
--- a/.bin/nmutt
+++ b/.bin/nmutt
@@ -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
diff --git a/.config/calcurse/conf b/.config/calcurse/conf
index 549b5bd..d776488 100755
--- a/.config/calcurse/conf
+++ b/.config/calcurse/conf
@@ -1,11 +1,11 @@
appearance.calendarview=monthly
-appearance.compactpanels=no
+appearance.compactpanels=yes
appearance.defaultpanel=calendar
appearance.layout=1
-appearance.headerline=yes
-appearance.eventseparator=yes
-appearance.dayseparator=yes
-appearance.emptyline=yes
+appearance.headerline=no
+appearance.eventseparator=no
+appearance.dayseparator=no
+appearance.emptyline=no
appearance.emptyday=--
appearance.notifybar=yes
appearance.sidebarwidth=0
@@ -19,13 +19,13 @@ format.notifydate=%a %F
format.notifytime=%T
format.outputdate=%D
format.dayheading=%B %e, %Y
-general.autogc=no
+general.autogc=yes
general.autosave=yes
general.confirmdelete=yes
general.confirmquit=no
general.firstdayofweek=monday
general.multipledays=yes
-general.periodicsave=0
+general.periodicsave=10
general.systemevents=yes
notification.command=printf '\a'
notification.notifyall=flagged-only
diff --git a/.config/neomutt/neomuttrc b/.config/neomutt/neomuttrc
index baea9d8..1f85eb8 100755
--- a/.config/neomutt/neomuttrc
+++ b/.config/neomutt/neomuttrc
@@ -2,72 +2,72 @@
# rgoncalves.se
# personal informations
-set my_server = ""
-set my_user = ""
-set my_password = ""
+set my_password = ""
+set my_server = ""
+set my_user = ""
source "~/.config/neomutt/personal"
# IMAP
-set imap_user = "$my_user@$my_server"
-set imap_pass = "$my_password"
-set hostname = "imap.$my_server"
-set folder = "imaps://imap.$my_server:993"
+set imap_user = "$my_user@$my_server"
+set imap_pass = "$my_password"
+set hostname = "imap.$my_server"
+set folder = "imaps://imap.$my_server:993"
+#set folder = "~/.mail/personal"
# SMTP
-set smtp_url = "smtps://$my_user@$my_server:$my_password@smtp.$my_server"
-set smtp_pass = "$my_password"
+set smtp_pass = "$my_password"
+set smtp_url = "smtps://$my_user@$my_server:$my_password@smtp.$my_server"
# force tls
-set ssl_force_tls = yes
-set ssl_verify_host = yes
+set ssl_verify_host = yes
+set ssl_force_tls = yes
# mailboxes
-set spoolfile = "+INBOX"
-set mbox = "+INBOX"
-set record = "+Sent"
-set trash = "+Trash"
-set postponed = "+Drafts"
-set mail_check_stats = yes
-set imap_delim_chars = "aa"
-
-# environment variables required!
-#set imap_check_subscribed
+set spoolfile = "+INBOX"
+set mbox = "+INBOX"
+set postponed = "+Drafts"
+set record = "+Sent"
+set trash = "+Trash"
+set mail_check_stats = yes
+set imap_delim_chars = "aa"
+
mailboxes `python3 ~/.bin/get-mailbox-imap \
imap.$MAIL_SERVER \
$MAIL_USERNAME@$MAIL_SERVER \
$MAIL_PASSWORD`
# dl
-set mail_check = 90
-set sleep_time = 0
-set timeout = 15
-set beep = no
-set postpone = no
-set recall = no
-set signature = "~/.signature"
-set charset = "utf-8"
+set mail_check = 90
+set sleep_time = 0
+set timeout = 15
+set beep = no
+set edit_headers = yes
+set fast_reply = yes
+set forward_quote = yes
+set include = yes
+set pipe_decode = yes
+set postpone = no
+set recall = no
+set reflow_space_quotes = yes
+set reply_to = yes
+set reverse_name = yes
+set reverse_name = yes
+set sig_dashes = no
+set sort_re = yes
+
+set charset = "utf-8"
set date_format = "%d.%m.%Y-%H:%M"
-set sort_re = yes"
-set reverse_name = yes
-set index_format = "%4C %Z %{$date_format} %-15.15L (%?l?%4l&%4c?) %s"
-set send_charset = "utf-8:iso-8859-1:us-ascii"
-set reply_regexp = "^(([Rr][Ee]?(\[[0-9]+\])?: *)?(\[[^]]+\] *)?)*"
-set quote_regexp = "^( {0,4}[>|:#%]| {0,4}[a-z0-9]+[>|]+)+"
-set reflow_space_quotes = yes
-auto_view text/html
-alternative_order text/plain text/html
-
-set reply_to = yes
-set fast_reply = yes
-set sig_dashes = no
-set include = yes
-set forward_quote = yes
-set edit_headers = yes
-set reverse_name = yes
-set pipe_decode = yes
-
-set header_cache = "~/.cache/neomutt"
-set message_cachedir = "$header_cache"
+set index_format = "%4C %Z %{$date_format} %-15.15L (%?l?%4l&%4c?) %s"
+set quote_regex = "^( {0,4}[>|:#%]| {0,4}[a-z0-9]+[>|]+)+"
+set reply_regex = "^(([Rr][Ee]?(\[[0-9]+\])?: *)?(\[[^]]+\] *)?)*"
+set send_charset = "utf-8:iso-8859-1:us-ascii"
+
+set signature = "~/.signature"
+set header_cache = "~/.cache/neomutt"
+set message_cachedir = "$header_cache"
+
+# auto_view text/html
+# alternative_order text/plain text/html
# headers
ignore *
@@ -76,53 +76,57 @@ unignore organization organisation x-mailer: x-newsreader: x-mailing-list:
unignore posted-to: list-id:
# threads
-set sort ="threads"
-set sort_aux = "reverse-date"
-#set sort_aux = "last-date-received"
-set strict_threads ="yes"
-set collapse_unread = no
+set sort ="threads"
+set sort_aux = "reverse-last-date-received"
+set strict_threads ="yes"
+set collapse_unread = no
# sidebar
-set sidebar_visible = yes
-set sidebar_short_path = yes
-set sidebar_sort_method = "unsorted"
-set sidebar_delim_chars = "/"
-set sidebar_format = "%D %?F?[%F]?%* %4N|%4S"
-set sidebar_folder_indent = yes
-set sidebar_indent_string = " "
+set sidebar_visible = yes
+set sidebar_short_path = yes
+set sidebar_sort_method = "unsorted"
+set sidebar_delim_chars = "/"
+set sidebar_format = "%D %?F?[%F]?%* %4N|%4S"
+set sidebar_folder_indent = yes
+set sidebar_indent_string = "> "
# keybinds
-bind editor <space> noop
-bind editor "> " quote-char
-bind pager c imap-fetch-mail
-bind index G last-entry
-bind index \CR imap-fetch-mail
-bind index g noop
-bind index gg first-entry
-bind index - collapse-thread
-bind index _ collapse-all
-bind pager,attach h exit
-bind attach <return> view-mailcap
-bind attach l view-mailcap
-bind pager j next-line
-bind pager k previous-line
-bind pager l view-attachments
-bind index D delete-message
-bind index U undelete-message
-bind index h noop
-bind index l display-message
-bind browser h goto-parent
-bind browser l select-entry
-bind index \CL limit
-bind pager,browser gg top-page
-bind pager,browser G bottom-page
-bind index,pager R group-reply
+bind editor <space> noop
+bind editor "> " quote-char
+bind pager c imap-fetch-mail
+bind index G last-entry
+bind index \CR imap-fetch-mail
+bind index g noop
+bind index gg first-entry
+bind index - collapse-thread
+bind index _ collapse-all
+bind pager,attach h exit
+bind attach <return> view-mailcap
+bind attach l view-mailcap
+bind pager j next-line
+bind pager k previous-line
+bind pager l view-attachments
+bind index D delete-message
+bind index U undelete-message
+bind index h noop
+bind index l display-message
+bind browser h goto-parent
+bind browser l select-entry
+bind index \CL limit
+bind pager,browser gg top-page
+bind pager,browser G bottom-page
+bind index,pager R group-reply
bind index,pager K sidebar-prev
bind index,pager J sidebar-next
bind index,pager O sidebar-open
-bind index,pager,browser d half-down
-bind index,pager,browser u half-up
+bind index,pager,browser d half-down
+bind index,pager,browser u half-up
# colors
-# color quoted color08 default
-# color hdrdefault color07 default
+color hdrdefault color07 default
+#color quoted color08 default
+
+# notmuch
+#set virtual_spoolfile = yes
+#set nm_query_type = threads
+#virtual-mailboxes "INBOX" "notmuch://?query=tag:inbox"
diff --git a/.config/qutebrowser/greasemonkey/boursorama-css.js b/.config/qutebrowser/greasemonkey/boursorama-css.js
index 4d1c29e..771bc38 100755
--- a/.config/qutebrowser/greasemonkey/boursorama-css.js
+++ b/.config/qutebrowser/greasemonkey/boursorama-css.js
@@ -5,6 +5,7 @@
// ==/UserScript==
GM_addStyle(`
+ div[id^='alert-random-'],
.chatbot,
.c-promotional-cards-wrapper,
.c-articles-wrapper,
@@ -14,5 +15,6 @@ GM_addStyle(`
visibility: hidden;
margin: 0px;
padding: 0px;
+ display: block;
}
`)
remember that computers suck.