diff options
author | jakob.stendahl <jakob.stendahl@infomedia.dk> | 2024-04-11 18:19:51 +0200 |
---|---|---|
committer | jakob.stendahl <jakob.stendahl@infomedia.dk> | 2024-04-11 18:19:51 +0200 |
commit | 1ca10664fbac7050271c99e19772e6582e2bfb93 (patch) | |
tree | 318aafa6a147416bca6617bc8250c1aa30d1b5bf | |
parent | c163ded79bb284c2b2bc1ed8fdddfcb8ede60806 (diff) | |
download | dotfiles-1ca10664fbac7050271c99e19772e6582e2bfb93.tar.gz dotfiles-1ca10664fbac7050271c99e19772e6582e2bfb93.zip |
Mycli
-rw-r--r-- | Common/my.cnf | 2 | ||||
-rw-r--r-- | Common/myclirc | 85 | ||||
-rw-r--r-- | Makefile.m4 | 11 | ||||
-rwxr-xr-x | configure | 4 | ||||
-rw-r--r-- | linux/alacritty/papertheme_staging.yaml | 2 | ||||
-rw-r--r-- | linux/tmux.conf.m4 | 4 |
6 files changed, 105 insertions, 3 deletions
diff --git a/Common/my.cnf b/Common/my.cnf new file mode 100644 index 0000000..93054c0 --- /dev/null +++ b/Common/my.cnf @@ -0,0 +1,2 @@ +[client] +pager = 'pspg -s 0' diff --git a/Common/myclirc b/Common/myclirc new file mode 100644 index 0000000..2dde959 --- /dev/null +++ b/Common/myclirc @@ -0,0 +1,85 @@ +[main] + +# Enables context sensitive auto-completion. If this is disabled then all +# possible completions will be listed. +smart_completion = True + +# 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 + +# 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 + +# log_file location. +log_file = ~/.mycli.log + +# Default log level. Possible values: "CRITICAL", "ERROR", "WARNING", "INFO" +# and "DEBUG". +log_level = INFO + +# Log every query and its results to a file. Enable this by uncommenting the +# line below. +# audit_log = ~/.mycli-audit.log + +# Timing of sql statments and table rendering. +timing = True + +# Table format. Possible values: ascii, double, github, +# psql, plain, simple, grid, fancy_grid, pipe, orgtbl, rst, mediawiki, html, +# latex, latex_booktabs, textile, moinmoin, jira, vertical, tsv, csv. +# Recommended: ascii +table_format = ascii + +# 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: Possible values: emacs, vi. +# Emacs mode: Ctrl-A is home, Ctrl-E is end. All emacs keybindings are available in the REPL. +# When Vi mode is enabled you can use modal editing features offered by Vi in the REPL. +key_bindings = vi + +# Enabling this option will show the suggestions in a wider menu. Thus more items are suggested. +wider_completion_menu = False + +# MySQL prompt +# \t - Product type (Percona, MySQL, Mariadb) +# \u - Username +# \h - Hostname of the server +# \d - Database name +# \n - Newline +prompt = '\t \u@\h:\d> ' + +# Skip intro info on startup and outro info on exit +less_chatty = False + +# Use alias from --login-path instead of host name in prompt +login_path_as_host = False + +# Cause result sets to be displayed vertically if they are too wide for the current window, +# and using normal tabular format otherwise. (This applies to statements terminated by ; or \G.) +auto_vertical_output = False + +# keyword casing preference. Possible values "lower", "upper", "auto" +keyword_casing = auto + +# Enable the pager on startup. +enable_pager = True + +# Favorite queries. +[favorite_queries] + +# Use the -d option to reference a DSN. +[alias_dsn] +# example_dsn = mysql://[user[:password]@][host][:port][/dbname] + +[client] +# Configure the pager +pager = 'pspg -s 0' +multi_line = True diff --git a/Makefile.m4 b/Makefile.m4 index 51d9160..72fdfc7 100644 --- a/Makefile.m4 +++ b/Makefile.m4 @@ -48,6 +48,8 @@ m4_ifelse(DT_SWAY, `yes', `$(HOME_DIR)/.config/sway/config') m4_dnl m4_ifelse(DT_SWAY, `yes', `$(HOME_DIR)/.config/sway/hid') m4_dnl m4_ifelse(DT_SWAY, `yes', `$(HOME_DIR)/.config/sway/autostart') m4_dnl m4_ifelse(DT_NEOVIM, `yes', `$(HOME_DIR)/.config/nvim') m4_dnl +m4_ifelse(DT_MYCLI, `yes', `$(HOME_DIR)/.my.cnf') m4_dnl +m4_ifelse(DT_MYCLI, `yes', `$(HOME_DIR)/.myclirc') m4_dnl $(M4_SYSFILE): $(CONFIG_FILE) @@ -172,6 +174,14 @@ $(HOME_DIR)/.config/helix: Common/helix $(call create_dotfile_symlink,Common/helix,.config/helix) ')m4_dnl +m4_ifelse(DT_MYCLI, `yes', `m4_dnl +$(HOME_DIR)/.my.cnf: Common/my.cnf + $(call create_dotfile_symlink,Common/my.cnf,.my.cnf) + +$(HOME_DIR)/.myclirc: Common/myclirc + $(call create_dotfile_symlink,Common/myclirc,.myclirc) + +')m4_dnl # General package manager stuff m4_ifelse(DT_DISTRO, `debian', m4_dnl @@ -211,6 +221,7 @@ DPKG_DEPENDENCIES := m4_dnl m4_ifelse(DT_TOOLS, `yes', `highlight atool w3m mediainfo curl zsh vim-enhanced git python3-pip zsh tmux nodejs catimg ripgrep the_silver_searcher',) m4_dnl m4_ifelse(DT_GREETD_TUIGREET', `yes', `greetd',) m4_dnl m4_ifelse(DT_TLP, `yes', `tlp',) m4_dnl +m4_ifelse(DT_MYCLI, `yes', `mycli pspg',) m4_dnl m4_dnl m4_ifelse(DT_SWAY, `yes', `sway swayidle alacritty blueman wob wlogout wofi brightnessctl clipman seahorse fcitx5 imsettings',) m4_dnl m4_dnl @@ -46,6 +46,7 @@ fi : "${DT_HOMEBIN:=no}" : "${DT_TMUX:=yes}" : "${DT_HELIX:=no}" +: "${DT_MYCLI:=no}" radiolist_on() { local value="$1" @@ -166,6 +167,7 @@ FEATURES="$(dialog --stdout \ 11 "Bash" $(checklist_on "${DT_BASH}") \ 12 "home folder bin dir" $(checklist_on "${DT_HOMEBIN}") \ 13 "tmux" $(checklist_on "${DT_NEOVIM}") \ + 15 "MyCLI" $(checklist_on "${DT_MYCLI}") \ 14 "Helix" $(checklist_on "${DT_HELIX}"))" if [ "$?" -eq 1 ]; then exit 0; fi @@ -183,6 +185,7 @@ DT_BASH=no DT_HOMEBIN=no DT_TMUX=no DT_HELIX=no +DT_MYCLI=no for choice in ${FEATURES}; do case $choice in @@ -200,6 +203,7 @@ for choice in ${FEATURES}; do 12) DT_HOMEBIN=yes;; 13) DT_TMUX=yes;; 14) DT_HELIX=yes;; + 15) DT_MYCLI=yes;; esac done diff --git a/linux/alacritty/papertheme_staging.yaml b/linux/alacritty/papertheme_staging.yaml index 1342ad7..5ab89b4 100644 --- a/linux/alacritty/papertheme_staging.yaml +++ b/linux/alacritty/papertheme_staging.yaml @@ -2,7 +2,7 @@ colors: # Default colors primary: - background: '#fccd8a' + background: '#d8fccf' foreground: '#000000' # Normal colors diff --git a/linux/tmux.conf.m4 b/linux/tmux.conf.m4 index a781d9f..9b69c77 100644 --- a/linux/tmux.conf.m4 +++ b/linux/tmux.conf.m4 @@ -94,8 +94,8 @@ m4_changequote({, })m4_dnl m4_ifelse(DT_DOTFILES_TYPE, {local}, { set-hook -g session-window-changed 'run-shell "update-theme"' set-hook -g window-renamed 'run-shell "update-theme"' -bind-key P run-shell "tmux display-message -p '#W' | grep -q '^PROD' || tmux rename-window 'PROD #{window_name}'" -bind-key S run-shell "tmux display-message -p '#W' | grep -q '^STAGING' || tmux rename-window 'STAGING #{window_name}'" +bind-key C-p run-shell "tmux display-message -p '#W' | grep -q '^PROD' || tmux rename-window 'PROD #{window_name}'" +bind-key C-S run-shell "tmux display-message -p '#W' | grep -q '^STAGING' || tmux rename-window 'STAGING #{window_name}'" })m4_dnl m4_changequote(`, ')m4_dnl |