diff options
| author | Anton Bobov <abobov@gmail.com> | 2020-08-18 00:06:27 +0500 |
|---|---|---|
| committer | Anton Bobov <abobov@gmail.com> | 2020-08-24 21:48:24 +0500 |
| commit | eec8614377e4ac4166916f47a94ef14e24e78afa (patch) | |
| tree | 6b06431366e4182005e2bc19d9e730da34e4e265 | |
| parent | dd270f2f38c4da6018dc9972e05325dc8b6a8818 (diff) | |
Updates.
| -rwxr-xr-x | .gitignore | 12 | ||||
| -rw-r--r-- | files/.config/pgcli/config | 188 | ||||
| -rw-r--r-- | files/.reminders/defaults.rem | 12 | ||||
| -rw-r--r-- | files/.zsh/rc/S50_aliases | 13 | ||||
| -rw-r--r-- | install.conf.yaml | 1 |
5 files changed, 215 insertions, 11 deletions
@@ -9,7 +9,13 @@ /files/.vim/bundle /files/.zsh/cache /files/.tmux/plugins/ -/files/.ssh/id_* -/files/.ssh/known_hosts -/files/.ssh/*.conf + +/files/.ssh/* +!/files/.ssh/config +!/files/.ssh/authorized_keys + /files/.reminders/* +!/files/.reminders/defaults.rem + +/files/.config/pgcli/* +!/files/.config/pgcli/config diff --git a/files/.config/pgcli/config b/files/.config/pgcli/config new file mode 100644 index 0000000..a7801ed --- /dev/null +++ b/files/.config/pgcli/config @@ -0,0 +1,188 @@ +# vi: ft=dosini +[main] + +# Enables context sensitive auto-completion. If this is disabled the all +# possible completions will be listed. +smart_completion = True + +# Display the completions in several columns. (More completions will be +# visible.) +wider_completion_menu = False + +# Multi-line mode allows breaking up the sql statements into multiple lines. If +# this is set to True, then the end of the statements must have a semi-colon. +# If this is set to False then sql statements can't be split into multiple +# lines. End of line (return) is considered as the end of the statement. +multi_line = True + +# If multi_line_mode is set to "psql", in multi-line mode, [Enter] will execute +# the current input if the input ends in a semicolon. +# If multi_line_mode is set to "safe", in multi-line mode, [Enter] will always +# insert a newline, and [Esc] [Enter] or [Alt]-[Enter] must be used to execute +# a command. +multi_line_mode = psql + +# Destructive warning mode will alert you before executing a sql statement +# that may cause harm to the database such as "drop table", "drop database" +# or "shutdown". +destructive_warning = True + +# Enables expand mode, which is similar to `\x` in psql. +expand = False + +# Enables auto expand mode, which is similar to `\x auto` in psql. +auto_expand = True + +# If set to True, table suggestions will include a table alias +generate_aliases = False + +# log_file location. +# In Unix/Linux: ~/.config/pgcli/log +# In Windows: %USERPROFILE%\AppData\Local\dbcli\pgcli\log +# %USERPROFILE% is typically C:\Users\{username} +log_file = default + +# keyword casing preference. Possible values "lower", "upper", "auto" +keyword_casing = auto + +# casing_file location. +# In Unix/Linux: ~/.config/pgcli/casing +# In Windows: %USERPROFILE%\AppData\Local\dbcli\pgcli\casing +# %USERPROFILE% is typically C:\Users\{username} +casing_file = default + +# If generate_casing_file is set to True and there is no file in the above +# location, one will be generated based on usage in SQL/PLPGSQL functions. +generate_casing_file = False + +# Casing of column headers based on the casing_file described above +case_column_headers = True + +# history_file location. +# In Unix/Linux: ~/.config/pgcli/history +# In Windows: %USERPROFILE%\AppData\Local\dbcli\pgcli\history +# %USERPROFILE% is typically C:\Users\{username} +history_file = default + +# Default log level. Possible values: "CRITICAL", "ERROR", "WARNING", "INFO" +# and "DEBUG". "NONE" disables logging. +log_level = INFO + +# Order of columns when expanding * to column list +# Possible values: "table_order" and "alphabetic" +asterisk_column_order = table_order + +# Whether to qualify with table alias/name when suggesting columns +# Possible values: "always", never" and "if_more_than_one_table" +qualify_columns = if_more_than_one_table + +# When no schema is entered, only suggest objects in search_path +search_path_filter = False + +# Default pager. +# By default 'PAGER' environment variable is used +# pager = less -SRXF + +# Timing of sql statments and table rendering. +timing = True + +# Table format. Possible values: psql, plain, simple, grid, fancy_grid, pipe, +# ascii, double, github, orgtbl, rst, mediawiki, html, latex, latex_booktabs, +# textile, moinmoin, jira, vertical, tsv, csv. +# Recommended: psql, fancy_grid and grid. +table_format = psql + +# Syntax Style. Possible values: manni, igor, xcode, vim, autumn, vs, rrt, +# native, perldoc, borland, tango, emacs, friendly, monokai, paraiso-dark, +# colorful, murphy, bw, pastie, paraiso-light, trac, default, fruity +syntax_style = default + +# Keybindings: +# When Vi mode is enabled you can use modal editing features offered by Vi in the REPL. +# When Vi mode is disabled emacs keybindings such as Ctrl-A for home and Ctrl-E +# for end are available in the REPL. +vi = True + +# Error handling +# When one of multiple SQL statements causes an error, choose to either +# continue executing the remaining statements, or stopping +# Possible values "STOP" or "RESUME" +on_error = STOP + +# Set threshold for row limit. Use 0 to disable limiting. +row_limit = 1000 + +# Skip intro on startup and goodbye on exit +less_chatty = True + +# Postgres prompt +# \t - Current date and time +# \u - Username +# \h - Short hostname of the server (up to first '.') +# \H - Hostname of the server +# \d - Database name +# \p - Database port +# \i - Postgres PID +# \# - "@" sign if logged in as superuser, '>' in other case +# \n - Newline +# \dsn_alias - name of dsn alias if -D option is used (empty otherwise) +# \x1b[...m - insert ANSI escape sequence +# eg: prompt = '\x1b[35m\u@\x1b[32m\h:\x1b[36m\d>' +prompt = '\u@\h:\d> ' + +# Number of lines to reserve for the suggestion menu +min_num_menu_lines = 4 + +# Character used to left pad multi-line queries to match the prompt size. +multiline_continuation_char = '' + +# The string used in place of a null value. +null_string = '<null>' + +# manage pager on startup +enable_pager = True + +# Use keyring to automatically save and load password in a secure manner +keyring = True + +# Custom colors for the completion menu, toolbar, etc. +[colors] +completion-menu.completion.current = 'bg:#ffffff #000000' +completion-menu.completion = 'bg:#008888 #ffffff' +completion-menu.meta.completion.current = 'bg:#44aaaa #000000' +completion-menu.meta.completion = 'bg:#448888 #ffffff' +completion-menu.multi-column-meta = 'bg:#aaffff #000000' +scrollbar.arrow = 'bg:#003333' +scrollbar = 'bg:#00aaaa' +selected = '#ffffff bg:#6666aa' +search = '#ffffff bg:#4444aa' +search.current = '#ffffff bg:#44aa44' +bottom-toolbar = 'bg:#222222 #aaaaaa' +bottom-toolbar.off = 'bg:#222222 #888888' +bottom-toolbar.on = 'bg:#222222 #ffffff' +search-toolbar = 'noinherit bold' +search-toolbar.text = 'nobold' +system-toolbar = 'noinherit bold' +arg-toolbar = 'noinherit bold' +arg-toolbar.text = 'nobold' +bottom-toolbar.transaction.valid = 'bg:#222222 #00ff5f bold' +bottom-toolbar.transaction.failed = 'bg:#222222 #ff005f bold' + +# style classes for colored table output +output.header = "#00ff5f bold" +output.odd-row = "" +output.even-row = "" + +# Named queries are queries you can execute by name. +[named queries] + +# DSN to call by -D option +[alias_dsn] +# example_dsn = postgresql://[user[:password]@][netloc][:port][/dbname] + +# Format for number representation +# for decimal "d" - 12345678, ",d" - 12,345,678 +# for float "g" - 123456.78, ",g" - 123,456.78 +[data_formats] +decimal = "" +float = "" diff --git a/files/.reminders/defaults.rem b/files/.reminders/defaults.rem index 98a3bb8..1f42789 100644 --- a/files/.reminders/defaults.rem +++ b/files/.reminders/defaults.rem @@ -4,4 +4,14 @@ SET Week_3 15 SET Week_4 22 FSET _last(mo) "1 " + MON((mo % 12) + 1) + " --7" -BANNER %_Reminders for %w, %d%s %m, %y%o: \ +# Tim Chase: https://dianne.skoll.ca/pipermail/remind-fans/2019/003519.html +FSET msgprefix(x) upper(substr(filename(), strlen(filedir()) + 2, strlen(filename()) - 4)) + ": " + +IF defined("banner_flag") + BANNER %_>>> Reminders for %w, %d%s %m, %y%o:% +ELSE + BANNER >>> Reminders for %w, %d%s %m, %y%o:% + SET banner_flag 1 + PRESERVE banner_flag +ENDIF + diff --git a/files/.zsh/rc/S50_aliases b/files/.zsh/rc/S50_aliases index 018ede6..44c7baa 100644 --- a/files/.zsh/rc/S50_aliases +++ b/files/.zsh/rc/S50_aliases @@ -8,6 +8,7 @@ unalias ag 2>/dev/null alias ag="ag --page less" alias wcc="wc -c | numfmt --to=si" +alias nf="numfmt --from=auto --to=iec" alias da='\du -sch' if [ -x "$(command -v ncdu)" ]; then @@ -55,10 +56,6 @@ alias make='make -j$(nproc)' alias display_off='xset dpms force off' -alias esync='sudo eix-sync' -alias eupdw='sudo emerge -avuND @world' -alias eetc='sudo etc-update' - # Moving to directory in different teminals. alias xpwd='echo $PWD | xclip -i; xclip -o' alias xcd='cd "$(xclip -o)"' @@ -104,6 +101,8 @@ alias pdoc-pdf='pandoc --latex-engine=xelatex -V geometry:margin=1in -V mainfont alias jkill="jps | grep -v ' Jps$' | grep -v ' org.eclipse.equinox.' | cut -d ' ' -f 1 | xargs -r kill" +[ -x "$(command -v pgcli)" ] && alias pgcli="pgcli --pgclirc ~/.config/pgcli/config --pgclirc ~/.config/pgcli/local.config" + # # Calendar & tasks # @@ -111,12 +110,12 @@ alias jkill="jps | grep -v ' Jps$' | grep -v ' org.eclipse.equinox.' | cut -d ' alias cal='ncal -Mb' alias ta='task add' if [ -x "$(command -v remind)" ] ; then - alias remind="remind -m -b1" - alias rem="rem -m -b1" + alias remind="noglob remind -@ -m -b1" + alias rem="noglob rem -@ -m -b1" alias rem1="rem -cu+1" alias rem2="rem -cu+2" alias tt="rem; task" - alias tkrem="tkremind -m -b1 ~/.reminders" + alias tkremind="tkremind -m -b1" for day in {1..9} ; do alias $day="rem '*$day'" done diff --git a/install.conf.yaml b/install.conf.yaml index 3f1ad22..6b8f167 100644 --- a/install.conf.yaml +++ b/install.conf.yaml @@ -37,6 +37,7 @@ ~/.config/youtube-dl: files/.config/youtube-dl ~/.config/xfce4/terminal: files/.config/xfce4/terminal ~/.config/redshift.conf: files/.config/redshift.conf + ~/.config/pgcli: files/.config/pgcli - shell: - [git submodule update --init --recursive, Installing submodules] |
