Suppose you have weird taste and you absolutely want:
- your visual selection to always have a green background and black foreground,
- your active statusline to always have a white background and red foreground,
- your very own deep blue background.
| -- more info http://aaron-hoffman.blogspot.com/2017/02/iphone-text-message-sqlite-sql-query.html | |
| select | |
| m.rowid | |
| ,coalesce(m.cache_roomnames, h.id) ThreadId | |
| ,m.is_from_me IsFromMe | |
| ,case when m.is_from_me = 1 then m.account | |
| else h.id end as FromPhoneNumber | |
| ,case when m.is_from_me = 0 then m.account | |
| else coalesce(h2.id, h.id) end as ToPhoneNumber | |
| ,m.service Service |
Suppose you have weird taste and you absolutely want:
| #!/bin/sh | |
| # i3get | |
| # | |
| # search for windows in i3 tree, return desired information | |
| # if no arguments are passed. con_id of acitve window is returned. | |
| # ctrl+c, ctrl+v by budRich 2017 | |
| # bash to sh by: nimaje | |
| # | |
| # Options: |
| #!/bin/bash | |
| ################################### license ################################## | |
| # switch_sound.sh is a script that switches between speaker and headphone with one mouse click. | |
| # Written in 2018 by Wolfram Volpi, contact at https://gist.github.com/wolfv6/df6deb2ac7667d16d621d6da79ef99e0 | |
| # To the extent possible under law, the author(s) have dedicated all copyright and related and neighboring rights to this software to the public domain worldwide. | |
| # This software is distributed without any warranty. | |
| # You should have received a copy of the CC0 Public Domain Dedication along with this software. | |
| # If not, see http://creativecommons.org/publicdomain/zero/1.0/. |
| "============================================================================ | |
| " statusline | |
| "============================================================================ | |
| let g:currentmode={ | |
| \ 'n' : 'N ', |
There's not a complete hook system designed in Bash when compared with other modern shells. PROMPT_COMMAND variable is used as a hook in Bash, which is equivalent to precmd hook in ZSH, fish_prompt in Fish. For the time being, ZSH is the only shell I've known that has a chpwd hook builtin.
PROMPT_COMMAND
If set, the value is interpreted as a command to execute before the printing of each primary prompt ($PS1).
https://www.gnu.org/savannah-checkouts/gnu/bash/manual/bash.html#Bash-Variables
| #!/bin/sh | |
| prog_name=${0##*/} | |
| version=1.0 | |
| version_text="Boilerplate for new scripts v$version" | |
| options="h o: q v V" | |
| help_text="Usage: $prog_name [-o <text>] [-hqvV] [<file>]... | |
| Boilerplate for new scripts |