diff --git a/.config/alacritty/alacritty.yml b/.config/alacritty/alacritty.yml index fcfdbc7..a09399e 100644 --- a/.config/alacritty/alacritty.yml +++ b/.config/alacritty/alacritty.yml @@ -357,7 +357,7 @@ colors: # - (Linux/BSD) user login shell # - (Windows) powershell shell: - program: fish + program: bash # args: # - --login diff --git a/.config/bashrc b/.config/bashrc new file mode 100644 index 0000000..888c4c5 --- /dev/null +++ b/.config/bashrc @@ -0,0 +1,141 @@ +# Enable the subsequent settings only in interactive sessions +case $- in + *i*) ;; + *) return;; +esac + +# Path to your oh-my-bash installation. +export OSH='/home/chris/.config/.oh-my-bash' + +# Set name of the theme to load. Optionally, if you set this to "random" +# it'll load a random theme each time that oh-my-bash is loaded. +OSH_THEME="rr" + +# Uncomment the following line to use case-sensitive completion. +# OMB_CASE_SENSITIVE="true" + +# Uncomment the following line to use hyphen-insensitive completion. Case +# sensitive completion must be off. _ and - will be interchangeable. +# OMB_HYPHEN_SENSITIVE="false" + +# Uncomment the following line to disable bi-weekly auto-update checks. +# DISABLE_AUTO_UPDATE="true" + +# Uncomment the following line to change how often to auto-update (in days). +# export UPDATE_OSH_DAYS=13 + +# Uncomment the following line to disable colors in ls. +# DISABLE_LS_COLORS="true" + +# Uncomment the following line to disable auto-setting terminal title. +# DISABLE_AUTO_TITLE="true" + +# Uncomment the following line to enable command auto-correction. +# ENABLE_CORRECTION="true" + +# Uncomment the following line to display red dots whilst waiting for completion. +# COMPLETION_WAITING_DOTS="true" + +# Uncomment the following line if you want to disable marking untracked files +# under VCS as dirty. This makes repository status check for large repositories +# much, much faster. +# DISABLE_UNTRACKED_FILES_DIRTY="true" + +# Uncomment the following line if you don't want the repository to be considered dirty +# if there are untracked files. +# SCM_GIT_DISABLE_UNTRACKED_DIRTY="true" + +# Uncomment the following line if you want to completely ignore the presence +# of untracked files in the repository. +# SCM_GIT_IGNORE_UNTRACKED="true" + +# Uncomment the following line if you want to change the command execution time +# stamp shown in the history command output. One of the following values can +# be used to specify the timestamp format. +# * 'mm/dd/yyyy' # mm/dd/yyyy + time +# * 'dd.mm.yyyy' # dd.mm.yyyy + time +# * 'yyyy-mm-dd' # yyyy-mm-dd + time +# * '[mm/dd/yyyy]' # [mm/dd/yyyy] + [time] with colors +# * '[dd.mm.yyyy]' # [dd.mm.yyyy] + [time] with colors +# * '[yyyy-mm-dd]' # [yyyy-mm-dd] + [time] with colors +# If not set, the default value is 'yyyy-mm-dd'. +# HIST_STAMPS='yyyy-mm-dd' + +# Uncomment the following line if you do not want OMB to overwrite the existing +# aliases by the default OMB aliases defined in lib/*.sh +# OMB_DEFAULT_ALIASES="check" + +# Would you like to use another custom folder than $OSH/custom? +# OSH_CUSTOM=/path/to/new-custom-folder + +# To disable the uses of "sudo" by oh-my-bash, please set "false" to +# this variable. The default behavior for the empty value is "true". +OMB_USE_SUDO=true + +# To enable/disable display of Python virtualenv and condaenv +# OMB_PROMPT_SHOW_PYTHON_VENV=true # enable +# OMB_PROMPT_SHOW_PYTHON_VENV=false # disable + +# Which completions would you like to load? (completions can be found in ~/.oh-my-bash/completions/*) +# Custom completions may be added to ~/.oh-my-bash/custom/completions/ +# Example format: completions=(ssh git bundler gem pip pip3) +# Add wisely, as too many completions slow down shell startup. +completions=( + git + composer + ssh +) + +# Which aliases would you like to load? (aliases can be found in ~/.oh-my-bash/aliases/*) +# Custom aliases may be added to ~/.oh-my-bash/custom/aliases/ +# Example format: aliases=(vagrant composer git-avh) +# Add wisely, as too many aliases slow down shell startup. +aliases=( + general +) + +# Which plugins would you like to load? (plugins can be found in ~/.oh-my-bash/plugins/*) +# Custom plugins may be added to ~/.oh-my-bash/custom/plugins/ +# Example format: plugins=(rails git textmate ruby lighthouse) +# Add wisely, as too many plugins slow down shell startup. +plugins=( + git + bashmarks +) + +# Which plugins would you like to conditionally load? (plugins can be found in ~/.oh-my-bash/plugins/*) +# Custom plugins may be added to ~/.oh-my-bash/custom/plugins/ +# Example format: +# if [ "$DISPLAY" ] || [ "$SSH" ]; then +# plugins+=(tmux-autoattach) +# fi + +source "$OSH"/oh-my-bash.sh + +# User configuration +# export MANPATH="/usr/local/man:$MANPATH" + +# You may need to manually set your language environment +# export LANG=en_US.UTF-8 + +# Preferred editor for local and remote sessions +# if [[ -n $SSH_CONNECTION ]]; then +# export EDITOR='vim' +# else +# export EDITOR='mvim' +# fi + +# Compilation flags +# export ARCHFLAGS="-arch x86_64" + +# ssh +# export SSH_KEY_PATH="~/.ssh/rsa_id" + +# Set personal aliases, overriding those provided by oh-my-bash libs, +# plugins, and themes. Aliases can be placed here, though oh-my-bash +# users are encouraged to define aliases within the OSH_CUSTOM folder. +# For a full list of active aliases, run `alias`. +# +# Example aliases +# alias bashconfig="mate ~/.bashrc" +# alias ohmybash="mate ~/.oh-my-bash" \ No newline at end of file diff --git a/.config/blesh/init.sh b/.config/blesh/init.sh new file mode 100644 index 0000000..b21865e --- /dev/null +++ b/.config/blesh/init.sh @@ -0,0 +1,1306 @@ +# -*- mode: sh; mode: sh-bash -*- + +## This is a template for "~/.blerc". +## +## To use ble.sh in bash, please set up "~/.bashrc" as follows: +## +## ```bash +## # bashrc +## +## # Please put the following line in the beginning of .bashrc +## # Note: Please replace $HOME/.local/share/blesh with the path to your ble.sh +## [[ $- == *i* ]] && "$HOME/.local/share/blesh/ble.sh" --noattach +## +## # Your bashrc contents should come between the two lines. +## +## # Please put the following line in the end of .bashrc +## [[ ${BLE_VERSION-} ]] && ble-attach +## ``` +## + +##----------------------------------------------------------------------------- +## Basic settings + + +## The following setting specifies the input encoding. Currently only "UTF-8" +## and "C" is available. + +#bleopt input_encoding=UTF-8 + + +## The following setting specifies the pager used by ble.sh. This is used to +## show the help of commands (f1). + +#bleopt pager=less + +## The following setting specifies the editor used by ble.sh. This is used for +## the widget edit-and-execute (C-x C-e) and editor for a large amount of +## command line texts. Possible values include, for example, "vim", "emacs +## -nw" and "nano". + +#bleopt editor=vim + + +## The following settings sets the behavior of visible bells (vbell). +## "vbell_duration" sets the time duration to show the vbell. "vbell_align" +## controls the position of vbell. The value "left" (default) specifies that +## the vbell should be shown up on the top left corner of the terminal. The +## values "center" and "right" specify that the vbell is shown on the top +## center and the top right corner, respectively. + +#bleopt vbell_default_message=' Wuff, -- Wuff!! ' +#bleopt vbell_duration=2000 +#bleopt vbell_align=right + + +##----------------------------------------------------------------------------- +## Line editor settings + + +## The following settings turns on/off the audible bells and visible bells for +## errors while user edit. The non-empty value turns on the bells. + +#bleopt edit_abell=1 +#bleopt edit_vbell= + + +## The following setting turns on the delayed load of history when an non-empty +## value is set. + +#bleopt history_lazyload=1 + + +## The following setting turns on the delete selection mode when an non-empty +## value is set. When the mode is turned on the selection is removed when a +## user inserts a character. + +#bleopt delete_selection_mode=1 + + +## The following settings control the indentation. "indent_offset" sets the +## indent width. "indent_tabs" controls if tabs can be used for indentation or +## not. If "indent_tabs" is set to 0, tabs will never be used. Otherwise +## indentation is made with tabs and spaces. + +#bleopt indent_offset=4 +#bleopt indent_tabs=1 + + +## "undo_point" controls the cursor position after "undo". When "beg" or "end" +## is specified, the cursor will be moved to the beginning or the end of the +## dirty section, respectively. When other values are specified, the original +## cursor position is reproduced. + +#bleopt undo_point=end + + +## The following setting controls forced layout calculations before graphical +## operations. When a non-empty value is specified, the forced calculations are +## enabled. When an empty string is set, the operations are switched to logical +## ones. + +#bleopt edit_forced_textmap=1 + + +## The following option controls the interpretation of lines when going to the +## beginning or the end of the current line. When the value `logical` is +## specified, the logical line is used, i.e., the beginning and the end of the +## line is determined based on the newline characters in the edited text. When +## the value `graphical` is specified, the graphical line is used, i.e., the +## beginning and the end of the displayed line in the terminal is used. + +#bleopt edit_line_type=graphical + + +## The following option specifies the set of expansions performed by +## magic-space with a colon-separated list of expansion types. "history", +## "sabbrev", and "alias" can be specified. + +#bleopt edit_magic_expand=history:sabbrev + + +## This option configures the detailed behavior of the widget "magic-space" +## with a colon-separated list. If the field "inline-sabbrev-no-insert" is +## specified, the insertion of "SP" is skipped when the inline sabbrev is +## performed by "magic-space". + +#bleopt edit_magic_opts= + + +## The following option controls the position of the info pane where completion +## menu, mode names, and other information are shown. When the value "top" is +## specified, the info pane is shown just below the command line. When the +## value "bottom" is specified, the info pane is shown at the bottom of the +## terminal. The default is "top". + +#bleopt info_display=top + + +## The following settings controls the prompt after the cursor left the command +## line. "prompt_ps1_final" contains a prompt string. "prompt_ps1_transient" +## is a colon-separated list of fields "always", "same-dir" and "trim". The +## prompt is replaced by "prompt_ps1_final" if it has a non-empty value. +## Otherwise, the prompt is trimmed leaving the last line if +## "prompt_ps1_transient" has a field "trim". Otherwise, the prompt vanishes +## if "prompt_ps1_transient" has a non-empty value. When +## "prompt_ps1_transient" contains a field "same-dir", the setting of +## "prompt_ps1_transient" is effective only when the current working directory +## did not change since the last command line. + +#bleopt prompt_ps1_final= +#bleopt prompt_ps1_transient=trim + + +## The following settings controls the right prompt. "prompt_rps1" specifies +## the contents of the right prompt in the format of PS1. When the cursor +## leaves the current command line, the right prompt is replaced by +## "prompt_rps1_final" if it has a non-empty value, or otherwise, the right +## prompt vanishes if "prompt_rps1_transient" is set to a non-empty value, + +#bleopt prompt_rps1='\w' +#bleopt prompt_rps1_final= +#bleopt prompt_rps1_transient='' + + +## The following settings specify the content of terminal titles and status +## lines. "prompt_xterm_title" specifies the terminal title which can be set +## by "OSC 0 ; ... BEL". "prompt_screen_title" is effective inside terminal +## multiplexers such as GNU screen and tmux and specifies the window title of +## the terminal multiplexer which can be set by "ESC k ... ST". +## "prompt_term_status" is only effective when terminfo entries "tsl" and "fsl" +## (or termcap entries "ts" and "ds") are available, and specifies the content +## of the status line which can be set by the terminfo entries. When each +## setting has non-empty value, the content of corresponding title or status +## line is replaced just before PS1 is shown. + +#bleopt prompt_xterm_title= +#bleopt prompt_screen_title= +#bleopt prompt_term_status= + + +## The following settings control the status line. "prompt_status_line" +## specifies the content of the status line. If its value is empty, the status +## line is not shown. "prompt_status_align" controls the position of the +## content in the status line. + +#bleopt prompt_status_line= +#bleopt prompt_status_align=left + + +## "prompt_eol_mark" specifies the contents of the mark used to indicate the +## command output is not ended with newlines. The value can contain ANSI escape +## sequences. + +#bleopt prompt_eol_mark=$'\e[94m[ble: EOF]\e[m' + + +## "prompt_ruler" specifies the ruler between the previous command and the +## prompt (like powerlevel10k +## "POWERLEVEL9K_PROMPT_{ADD_NEWLINE,SHOW_RULER,RULER_*}"). When the empty +## value is specified, the ruler is disabled. This is the default. When the +## value "empty-line" is specified, an empty line is inserted between the +## command and the prompt. When the other values are specified, the value is +## interpreted as an ANSI sequences, and the result is repeated to fill a line. + +#bleopt prompt_ruler= # no ruler (default) +#bleopt prompt_ruler=empty-line # empty line +#bleopt prompt_ruler=$'\e[94m-' # blue line + + +## "prompt_command_changes_layout" specifies whether the commands called from +## the blehook PRECMD or the variable PROMPT_COMMAND output texts to the +## terminal and changes the layout. When a non-empty value is specified, +## ble.sh resets the layout before running the hooks PRECMD and PROMPT_COMMAND +## and restores the layout after running the hooks. When a empty value is +## specified, ble.sh assumes that these hooks do not output texts to the +## terminal and do not changes the cursor positions and skip the special +## treatment. + +#bleopt prompt_command_changes_layout= # PRECMD/PROMPT_COMMAND not output +#bleopt prompt_command_changes_layout=1 # PRECMD/PROMPT_COMMAND may output + + +## "exec_restore_pipestatus" controls whether ble.sh restores PIPESTATUS of the +## previous user command. When this option is set to a non-empty value, +## PIPESTATUS is restored. This feature is turned off by default because it +## adds extra execution costs. Note that the values of PIPESTATUS of the +## previous command are always available with the array BLE_PIPESTATUS +## regardless of this setting. + +#bleopt exec_restore_pipestatus=1 # restores PIPESTATUS + + +## "exec_errexit_mark" specifies the format of the mark to show the exit status +## of the command when it is non-zero. If this setting is an empty string the +## exit status will not be shown. The value can contain ANSI escape sequences. + +#bleopt exec_errexit_mark=$'\e[91m[ble: exit %d]\e[m' + + +## "exec_elapsed_mark" specifies the format of the command execution time +## report. It takes two arguments: the first is the string that explains the +## elapsed time, and the second is a number that represents the percentage of +## CPU core usage. "exec_elapsed_enabled" specifies the condition that the +## command execution time report is displayed after the command execution. The +## condition is expressed by an arithmetic expression, where a non-zero result +## causes displaying the report. In the arithmetic expression, variables +## "real", "{usr,sys}{,_self,_child}", and "cpu" can be used. "real" +## represents the elapsed time. "usr" and "sys" represent the user and system +## time, respectively. The suffixes "_self" and "_child" represent the part +## consumed in the main shell process and the other child processes including +## subshells and external programs, respectively. "cpu" represents the +## percentage of the CPU core usage in integer, which can be calculated by +## "(usr+sys)*100/real". The other values are all in unit of milliseconds. + +#bleopt exec_elapsed_mark=$'\e[94m[ble: elapsed %s (CPU %s%%)]\e[m' +#bleopt exec_elapsed_enabled='usr+sys>=10000' + + +## The following setting controls the exit when jobs are remaining. When an +## empty string is set, the shell will never exit with remaining jobs through +## widgets. When an non-empty value is set, the shell will exit when exit is +## attempted twice consecutively. + +#bleopt allow_exit_with_jobs= + + +## The following setting controls the cursor position after the move to other +## history entries. When non-empty values are specified, the offset of the +## cursor from the beginning of the command line is preserved. When an empty +## value is specified the cursor position is the beginning or the end of the +## command lines when the move is to a newer or older entry, respectively. + +#bleopt history_preserve_point= + + +## The following setting controls the history sharing. If it has non-empty +## value, the history sharing is enabled. With the history sharing, the command +## history is shared with the other Bash ble.sh sessions with the history +## sharing turned on. + +#bleopt history_share= + + +## This option controls the target range in the command history for +## "erasedups", which is performed when it is specified in "HISTCONTROL". When +## this option has an empty value, the target range is the entire history as in +## the plain Bash. When this option evaluates to a positive integer "count", +## the target range is the last "n" entries in the command history. When this +## option evaluates to a non-positive integer "offset", "offset" specifies the +## beginning of the target range relative to the history count at the session +## start. The end of the target range is always the end of the command +## history. + +#bleopt history_erasedups_limit= # entire history +#bleopt history_erasedups_limit=0 # only new items added in this session +#bleopt history_erasedups_limit=-1000 # new items and 1000 prev-session items +#bleopt history_erasedups_limit=1000 # last 1000 items + + +## The following setting controls the behavior of the widget +## "accept-single-line-or-newline" in the single-line editing mode. The value +## is a subject of arithmetic evaluation. When it evaluates to negative +## integers, the line is always accepted. When it evaluates to 0, it enters the +## multiline editing mode when there is any unprocessed user inputs, or +## otherwise the line is accepted. When it evaluates to a positive integer "n", +## it enters the multiline editing mode when there is more than "n"unprocessed +## user inputs. + +#bleopt accept_line_threshold=5 + + +## The following option controls the behavior when the number of characters +## exceeds the capacity specified by `line_limit_length`. The value `none` +## means that the number of characters will not be checked. The value +## `discard` means that the characters cannot be inserted when the number of +## characters exceeds the capacity. The value `truncate` means that the +## command line is truncated from its end to fit into the capacity. The value +## `editor` means that the widget `edit-and-execute` will be invoked to open an +## editor to edit the command line contents. + +#bleopt line_limit_type=none + + +## The following option specifies the capacity of the command line in the +## number of characters. The number 0 or negative numbers means the unlimited +## capacity. + +#bleopt line_limit_length=10000 + + +## The following option specifies the maximal number of characters which can be +## appended into the history. When this option has a positive value, commands +## with the length longer than the value is not appended to the history. When +## this option has a non-positive value, commands are always appended to the +## history regardless of their length. + +#bleopt history_limit_length=10000 + + +##----------------------------------------------------------------------------- +## Terminal state control + + +## The following setting specifies the cursor type when commands are executed. +## The cursor type is specified by the argument of the control function +## DECSCUSR. + +#bleopt term_cursor_external=0 + + +## The following settings, external and internal, specify the "modifyOtherKeys" +## states [the control function SM(>4)] when commands are executed and when +## ble.sh has control, respectively. + +#bleopt term_modifyOtherKeys_external=auto +#bleopt term_modifyOtherKeys_internal=auto + + +## The following setting controls whether the kitty-keyboard-protocol sequences +## should pass-through the terminal multiplexers when the outermost terminal is +## kitty. When this option has a non-empty string, the pass-through kitty +## protocol sequences are enabled. +## +## * This is intended to be used with tmux-3.4+. This works with tmux-3.3a and +## below as far as the user does not enable CapsLock or NumLock. Note that +## this might cause problems of keyboard inputs after detaching from tmux; +## You might lose the control of the terminal applications that do not +## support extended keys outside the terminal multiplexers. +## +## * This will cause the same problems when used with multiple windows in GNU +## screen. You will lose the control of the terminal applications without +## the support for extended keys when there are more than one ble.sh session +## or when there is at least one foreground ble.sh session in GNU screen. + +#bleopt term_modifyOtherKeys_passthrough_kitty_protocol=1 + +##----------------------------------------------------------------------------- +## Rendering options + + +## "tab_width" specifies the width of TAB on the command line. When an empty +## value is specified, the width in terminfo (tput it) is used. + +#bleopt tab_width= + + +## "char_width_mode" specifies the width of East_Asian_Width=A characters. +## When the value "east" is specified, the width is 2. When the value "west" is +## specified, the width is 1. When the value "emacs" is specified, the width +## table (depending on characters) used in Emacs is used. When the value +## "musl" is specified, the table for "wcwidth" of the musl C library in 2014 +## is used [Note: recent versions of musl library is more conforming to Unicode +## so favor "west" or "east"]. When "auto" is specified, the character width +## mode is automatically selected based on interactions with the terminal. + +#bleopt char_width_mode=auto + + +## "char_width_version" specifies the Unicode version that char width +## determination bases on. When "auto" is specified, ble.sh automatically +## tests the behavior of the terminal on startup and try to determine the +## appropriate version. Supported versions are "4.1", "5.0", "5.2", "6.0", +## "6.1", "6.2", "6.3", "7.0", "8.0", "9.0", "10.0", "11.0", "12.0", "12.1", +## "13.0", "14.0", and "15.0". The default value is "auto". + +#bleopt char_width_version=auto + + +## "emoji_width" specifies the width of emoji characters. If an empty value is +## specified, special treatment of emoji is disabled. + +#bleopt emoji_width=2 + + +## "emoji_version" specifies the version of Unicode Emoji. Available values +## are 0.6, 0.7, 1.0, 2.0, 3.0, 4.0, 5.0, 11.0, 12.0, 12.1, 13.0, 13.1, 14.0, +## and 15.0. + +#bleopt emoji_version=13.1 + + +## "emoji_opts" is a colon-separated list that represents the terminal +## capability for emojis. When "tpvs" and "epvs" are specified, TPVS and EPVS +## (text/emoji presentation variation selectors), respectively, can be used to +## change he representation of emoji characters. When "zwj" is specified, the +## emoji ZWJ sequences are supported. When "ri" is specified, the flag emojis +## formed by two Regional_Indicators are supported. When "unqualified" is +## specified, unqualified emojis are treated as emojis as well as the qualified +## emojis. + +#bleopt emoji_opts=ri + + +## This option specifies the type of the supported grapheme cluster of the +## terminal. The empty string indicates that the terminal does not support the +## grapheme clusters. The values "extended" and "legacy" indicate that the +## terminal supports the extended and legacy grapheme clusters, respectively. + +#bleopt grapheme_cluster=extended + + +## This option controls the behavior when ble.sh receives SIGWINCH. +## * When the value "redraw-safe" is specified, ble.sh redraws the new prompt +## starting from the line of the current cursor position. +## * When the value "redraw-prev" is specified, ble.sh tries to go to the +## beginning of the current prompt and overwrite the current one. This is +## similar to the behavior of GNU Readline. This possibly erase the output +## of the previous command because ble.sh tries to go to the beginning of the +## current prompt assuming that the number of lines in the prompt does not +## change by the terminal resizing. +## * When the value "redraw-here" is specified, ble.sh tries to determine the +## number of lines that can be safely erased and go to the beginning of the +## safe lines before the redraw. This is the default behavior. In +## principle, this can also erase the previous outputs, but it would be +## supposed to be rarely happen as far as the text reflowing of the terminal +## behaves in a reasonable way. +## * When the value "clear" is specified, the terminal content is erased and +## the new prompt will be drawn at the top of the terminal. The previous +## terminal contents including the command outputs will be lost. + +#bleopt canvas_winch_action=redraw-here + +##----------------------------------------------------------------------------- +## User input settings + +## The following setting sets the default keymap. The value "emacs" specifies +## that the emacs keymap should be used. The value "vi" specifies that the vi +## keymap (insert mode) should be used as the default. The value "auto" +## specifies that the keymap should be automatically selected from "emacs" or +## "vi" according to the current readline state "set -o emacs" or "set -o vi". + +#bleopt default_keymap=auto + + +## The following setting controls the treatment of isolated ESCs. The value +## "esc" indicates that it should be treated as ESC. The value "meta" +## indicates that it should be treated as Meta modifier. The value "auto" +## indicates that the behavior will be switched to an appropriate side of "esc" +## or "meta" depending on the current keymap. + +#bleopt decode_isolated_esc=esc + + +## The following setting specifies the byte code used to abort the currently +## processed inputs. The default value 28 corresponds to "C-\". + +#bleopt decode_abort_char=28 + + +## The following settings sets up the behavior for errors while user input +## decoding. "error_char" is the decoding error for the current character +## encoding. "error_cseq" indicates the unrecognized CSI sequences. +## "error_kseq" indicates the unbound key sequences. "abell" and "vbell" turn +## on/off the audible bells and visible bells on errors. If the variable is +## empty the bells are turned off, or otherwise turned on. "discard" controls +## if the chars/sequences will be discarded or processed in later stage. If a +## non-empty value is given, chars/sequences are discarded. + +#bleopt decode_error_char_abell= +#bleopt decode_error_char_vbell=1 +#bleopt decode_error_char_discard= +#bleopt decode_error_cseq_abell= +#bleopt decode_error_cseq_vbell=1 +#bleopt decode_error_cseq_discard=1 +#bleopt decode_error_kseq_abell=1 +#bleopt decode_error_kseq_vbell=1 +#bleopt decode_error_kseq_discard=1 + + +## This variable sets the limit to the count of recursive calls of keyboard +## macros. + +#bleopt decode_macro_limit=1024 + + +## When a non-empty value is specified to this settings, the terminal's +## Bracketed Paste Mode (DEC mode 2004) is enabled. This setting is +## synchronized with the readline variable "enable-bracketed-paste". + +#bleopt term_bracketed_paste_mode=on + +##----------------------------------------------------------------------------- +## Settings for completion + + +## The following settings turn on/off the corresponding functionalities. When +## non-empty strings are set, the functionality is enabled. Otherwise, the +## functionality is inactive. + +#bleopt complete_auto_complete=1 +#bleopt complete_menu_complete=1 +#bleopt complete_menu_filter=1 + + +## If "complete_ambiguous" has non-empty values, ambiguous completion +## candidates are generated for completion. + +#bleopt complete_ambiguous=1 + + +## If "complete_contract_function_names" has non-empty values, the function +## name candidates are grouped by prefixes of the directory-like form "*/". + +#bleopt complete_contract_function_names=1 + + +## By default, ble.sh does not allow rewriting the existing text if non-unique +## candidates does not contain the existing text. If this setting has +## non-empty values, ble.sh rewrites the existing text. + +#bleopt complete_allow_reduction=1 + + +## This option specifies the threshold to simplify the quotation type of the +## inserted word. This option is evaluated as an arithmetic expression. When +## this option evaluates to a negative value, the simplification of the +## quotation is disabled. Otherwise, when the number of characters will be +## reduced by at least the specified value, the quotation is simplified. The +## default is 0, which means that the quotation is simplified unless the number +## of characters increases by the simplification. + +#bleopt complete_requote_threshold=0 + + +## If "complete_auto_history" has non-empty values, auto-complete searches +## matching command lines from history. + +#bleopt complete_auto_history=1 + + +## The following setting controls the delay of auto-complete after the last +## user input. The unit is millisecond. + +#bleopt complete_auto_delay=100 + + +## The setting "complete_auto_wordbreaks" is used as the delimiters for +## identifying words for M-right (auto-complete/insert-word). The default +## value is $' \t\n'. If the empty value is set, the default value is used. + +#bleopt complete_auto_wordbreaks=$' \t\n/' + + +## The setting "complete_auto_complete_opts" is a colon-separated list of +## options: +## +## - The option "suppress-after-complete" controls whether auto-complete is +## enabled after TAB completions. If "suppress-after-complete" is included, +## auto-complete is enabled after TAB completions. Otherwise, auto-complete +## is disabled after TAB completions. + +#bleopt complete_auto_complete_opts=suppress-after-complete + + +## The setting "complete_auto_menu" controls the delay of "auto-menu". When a +## non-empty string is set, auto-menu is enabled. The string is evaluated as +## an arithmetic expression to give the delay in milliseconds. ble.sh will +## automatically show the menu of completions after the idle time (for which +## user input does not arrive) reaches the delay. + +#bleopt complete_auto_menu=500 + + +## When there are user inputs while generating completion candidates, the +## candidates generation will be canceled to process the user inputs. The +## following setting controls the interval of checking user inputs while +## generating completion candidates. + +#bleopt complete_polling_cycle=50 + + +## A hint on the maximum acceptable size of any data structure generated during +## the completion process, beyond which the completion may be prematurely +## aborted to avoid excessive processing time. "complete_limit" is used for +## TAB completion. When its value is empty, the size checks are disabled. +## "complete_limit_auto" is used for auto-completion. When its value is empty, +## the setting "complete_limit" is used instead. "complete_limit_auto_menu" is +## used for auto-menu. + +#bleopt complete_limit=500 +#bleopt complete_limit_auto=200 +#bleopt complete_limit_auto_menu=100 + + +## The following setting controls the timeout for the pathname expansions +## performed in auto-complete. When the word contains a glob pattern that +## takes a long time to evaluate the pathname expansion, auto-complete based on +## the filename is canceled based on the timeout setting. The value specifies +## the timeout duration in milliseconds. When the value is empty, the +## timeout is disabled. + +#bleopt complete_timeout_auto=5000 + + +## The following setting controls the timeout for the pathname expansions to +## prepare COMP_WORDS and COMP_LINE for progcomp. When the word contains a +## glob pattern that takes a long time to evaluate, the pathname expansion is +## canceled, and a noglob expansion is used to construct COMP_WORDS and +## COMP_LINE. The value specifies ## the timeout duration in milliseconds. +## When the value is empty, the timeout is disabled. + +#bleopt complete_timeout_compvar=200 + + +## The following setting specifies the style of the menu to show completion +## candidates. The value "dense" and "dense-nowrap" shows candidates separated +## by spaces. "dense-nowrap" is different from "dense" in the behavior that it +## inserts a new line before the candidates that does not fit into the +## remaining part of the current line. The value "align" and "align-nowrap" +## aligns the candidates. The value "linewise" shows a candidate per line. The +## value "desc" and "desc-text" shows a candidate per line with description for +## each. "desc-text" is different from "desc" in the behavior that it does not +## interprets ANSI escape sequences in the descriptions. + +#bleopt complete_menu_style=align-nowrap + + +## When a non-empty value is specified to this setting, the matching text on +## the right of the cursor is removed on the insertion of the completion. This +## setting is synchronized with the readline variable "skip-completed-text". + +#bleopt complete_skip_matched=on + + +## The following setting controls the detailed behavior of menu-complete with a +## colon-separated list of options: +## +## - When the option "insert-selection" is specified, the currently selected +## menu item is temporarily inserted in the command line. + +#bleopt complete_menu_complete_opts=insert-selection + + +## When a non-empty value is specified to this setting, the highlighting of the +## menu items is enabled. This setting is synchronized with the readline +## variable "colored-stats". + +#bleopt complete_menu_color=on + + +## When a non-empty value is specified to this setting, the part of the menu +## items matching with the already input text is highlighted. This setting is +## synchronized with the readline variable "colored-completion-prefix". + +#bleopt complete_menu_color_match=on + + +## The following settings specify the maximal and minimal align widths for +## complete_menu_style="align" and "align-nowrap". + +#bleopt menu_align_min=4 +#bleopt menu_align_max=20 + + +## The following setting specifies the maximal height of the menu. When this +## value is evaluated to be a positive integer, the maximal line number of the +## menu is limited to that value. + +#bleopt complete_menu_maxlines=10 + + +## The following settings specify the prefix of the menu items. "menu_prefix" +## specifies the default prefix for any menu-style. +## "menu_{align,desc,linewise,dense}_prefix" specify the prefixes in the +## respective menu-styles. The value is specified by a printf format, where +## the first argument is the index of the candidate. ANSI escape sequences can +## also be used. For example, the candidate index can be shown by setting the +## value '%d '. The default value is empty. + +#bleopt menu_align= +#bleopt menu_align_prefix='\e[1m%d:\e[m ' +#bleopt menu_desc_prefix='\e[1m%d.\e[m ' +#bleopt menu_linewise_prefix='\e[1;36m%d:\e[m ' +#bleopt menu_dense_prefix='\e[1;32m>\e[m ' + + +## The following setting specifies the minimum column width for the multicolumn +## description for `complete_menu_style=desc'. When the empty value is +## specified, the multicolumn mode is disabled. + +#bleopt menu_desc_multicolumn_width=65 + + +## When this Readline setting is enabled, the cases of alphabets are ignored on +## completion generation. + +#bind 'set completion-ignore-case off' + + +## When this Readline setting is turned on, suffixes are added to the filename +## completions in the menu. The characters "@", "/" and "*" are added to +## symbolic links, directories and executables, respectively. + +#bind 'set visible-stats off' + + +## When this Readline setting is turned on, the suffix "/" is inserted after +## the insertion of directory names. + +#bind 'set mark-directories on' + + +## When this Readline setting is turned on, the suffix "/" is inserted after +## symbolic links pointing to directories. + +#bind 'set mark-symlinked-directories on' + + +## When this Readline setting is turned on, the filenames starting with "." is +## also generated as possible completions. + +#bind 'set match-hidden-files on' + + +## By default, when filenames of the form "dir/file*" is shown in the menu, the +## part of the directory name "dir/" is omitted. When this Readline setting is +## turned on, the directory name of filename completions are not omitted. + +#bind 'set menu-complete-display-prefix off' + + +## This option specifies a colon-separated list of glob patterns of sabbrev +## names ignored in generating the sabbrev completion candidates. + +#bleopt complete_source_sabbrev_ignore= + + +## This is a colon-separated list of options. When the field +## `no-empty-completion` is specified, the sabbrev completion candidates are +## not generated when the word to complete is empty. + +#bleopt complete_source_sabbrev_opts=no-empty-completion + +##----------------------------------------------------------------------------- +## Color settings + +## The setting "term_index_colors" specifies the number of index colors used to +## specify colors in the terminal. The value "auto" means that the use of +## index colors are determined based on the terminfo database and the value of +## TERM shell variable. Otherwise, the value is evaluated as an arithmetic +## expression. When it is evaluated to 256, the index colors are assumed to be +## xterm 256-color palette (16 basic + 6x6x6 color cube + 24 gray scale). When +## it is evaluated to 88, the index colors are assumed to be xterm 88-color +## palette (16 basic + 4x4x4 color cube + 8 gray scale). When it is evaluated +## to 0, ble.sh will never use the index colors to set colors. When it is +## evaluated to other integers, the value specifies the maximum available +## index. + +#bleopt term_index_colors=256 + + +## The setting "term_true_colors" specifies the format of 24-bit color escape +## sequences supported by your terminal. The value "semicolon" indicates the +## format "CSI 3 8 ; 2 ; R ; G ; B m". The value "colon" indicates the format +## "CSI 3 8 : 2 : R : G : B m". The other value implies that the terminal does +## not support 24-bit color sequences. In this case, ble.sh tries to output +## indexed color sequences or basic color sequences with properly reduced +## colors. + +#bleopt term_true_colors=semicolon + + +## The setting "filename_ls_colors" can be used to import the filename coloring +## scheme by the environment variable LS_COLORS. + +#bleopt filename_ls_colors="$LS_COLORS" + + +## The following settings enable or disable the syntax highlighting. When the +## setting "highlight_syntax" has a non-empty value, the syntax highlighting is +## enabled. When the setting "highlight_filename" has a non-empty value, the +## highlighting based on the filename and the command name is enabled during +## the process of the syntax highlighting. Similarly, when the setting +## "highlight_variable" has a non-empty value, the highlighting based on the +## variable type is enabled. All of these settings have non-empty values by +## default. + +#bleopt highlight_syntax= +#bleopt highlight_filename= +#bleopt highlight_variable= + + +## The following settings control the timeout and user-input cancellation of +## the pathname expansions performed in the syntax highlighting. When the word +## contains a glob pattern that takes a long time to evaluate the pathname +## expansion, the syntax highlighting based on the filename is canceled based +## on the timeouts specified by these settings. "highlight_timeout_sync" / +## "highlight_timeout_async" specify the timeout durations in milliseconds to +## be used for the foreground / background syntax highlighting, respectively. +## When the timeout occurred in the foreground, the syntax highlighting will be +## deferred to the background syntax highlighting. When the timeout occurred +## in the background, the syntax highlighting for the filename is canceled. +## When the value is empty, the corresponding timeout is disabled. +## "syntax_eval_polling_interval" specifies the maximal interval between the +## user-input checking. + +#bleopt highlight_timeout_sync=500 +#bleopt highlight_timeout_async=5000 +#bleopt syntax_eval_polling_interval=50 + + +## The following settings specify graphic styles of each faces. + +#ble-face -s region fg=white,bg=60 +#ble-face -s region_insert fg=blue,bg=252 +#ble-face -s region_match fg=white,bg=55 +#ble-face -s region_target fg=black,bg=153 +#ble-face -s disabled fg=242 +#ble-face -s overwrite_mode fg=black,bg=51 +ble-color-setface auto_complete fg=240 +#ble-face -s menu_filter_fixed bold +#ble-face -s menu_filter_input fg=16,bg=229 +#ble-face -s vbell reverse +#ble-face -s vbell_erase bg=252 +#ble-face -s vbell_flash fg=green,reverse +#ble-face -s prompt_status_line fg=231,bg=240 + +#ble-face -s syntax_default none +#ble-face -s syntax_command fg=brown +#ble-face -s syntax_quoted fg=green +#ble-face -s syntax_quotation fg=green,bold +#ble-face -s syntax_escape fg=magenta +#ble-face -s syntax_expr fg=navy +ble-color-setface syntax_error fg=203 +#ble-face -s syntax_varname fg=202 +#ble-face -s syntax_delimiter bold +#ble-face -s syntax_param_expansion fg=purple +#ble-face -s syntax_history_expansion bg=94,fg=231 +#ble-face -s syntax_function_name fg=92,bold +#ble-face -s syntax_comment fg=gray +#ble-face -s syntax_glob fg=198,bold +#ble-face -s syntax_brace fg=37,bold +#ble-face -s syntax_tilde fg=navy,bold +#ble-face -s syntax_document fg=94 +#ble-face -s syntax_document_begin fg=94,bold +#ble-face -s command_builtin_dot fg=red,bold +#ble-face -s command_builtin fg=red +#ble-face -s command_alias fg=teal +#ble-face -s command_function fg=92 # fg=purple +#ble-face -s command_file fg=green +#ble-face -s command_keyword fg=blue +#ble-face -s command_jobs fg=red,bold +#ble-face -s command_directory fg=navy,underline +#ble-face -s argument_option fg=teal +#ble-face -s argument_option fg=black,bg=225 +#ble-face -s filename_directory underline,fg=26 +#ble-face -s filename_directory_sticky underline,fg=white,bg=26 +#ble-face -s filename_link underline,fg=teal +#ble-face -s filename_orphan underline,fg=teal,bg=224 +#ble-face -s filename_setuid underline,fg=black,bg=220 +#ble-face -s filename_setgid underline,fg=black,bg=191 +#ble-face -s filename_executable underline,fg=green +#ble-face -s filename_other underline +#ble-face -s filename_socket underline,fg=cyan,bg=black +#ble-face -s filename_pipe underline,fg=lime,bg=black +#ble-face -s filename_character underline,fg=white,bg=black +#ble-face -s filename_block underline,fg=yellow,bg=black +#ble-face -s filename_warning underline,fg=red +#ble-face -s filename_url underline,fg=blue +#ble-face -s filename_ls_colors underline +#ble-face -s varname_array fg=orange,bold +#ble-face -s varname_empty fg=31 +#ble-face -s varname_export fg=200,bold +#ble-face -s varname_expr fg=92,bold +#ble-face -s varname_hash fg=70,bold +#ble-face -s varname_number fg=64 +#ble-face -s varname_readonly fg=200 +#ble-face -s varname_transform fg=29,bold +#ble-face -s varname_unset fg=124 + +#ble-face -s cmdinfo_cd_cdpath fg=26,bg=155 + +##----------------------------------------------------------------------------- +## Keybindings + + +## The default mapping of in ble.sh is magic-space which performs history +## and sabbrev expansion before inserting a space. If you want to insert just +## a space without expansions as Bash's default, use the following setting: + +#ble-bind -f 'SP' 'self-insert' + + +## The default mapping of `/' () in ble.sh is magic-slash which performs +## sabbrev expansions of the name ` ~*'. If you want to insert just a slash +## without expansions as Bash's default, use the following setting: + +#ble-bind -f '/' 'self-insert' + + +## If you want to search the already input string using and keys, +## use the following setting: + +#ble-bind -f up 'history-search-backward' +#ble-bind -f down 'history-search-forward' + + +## If you want to immediately run the matched command by RET, you can specify +## the option "immediate-accept" to nsearch widgets: + +#ble-bind -f up 'history-search-backward immediate-accept' +#ble-bind -f down 'history-search-forward immediate-accept' + + +## If you want to kill/copy words including the spaces preceding them, you can +## use the following keybindings: + +#ble-bind -f C-w 'kill-region-or kill-uword' +#ble-bind -f M-w 'copy-region-or copy-uword' + +##----------------------------------------------------------------------------- +## Settings for Emacs mode + +function blerc/emacs-load-hook { + #---------------------------------------------------------------------------- + # Settings for the mode indicator + + ## The following option specifies the content of the mode indicator shown in + ## the info line as a prompt sequence. + + #bleopt prompt_emacs_mode_indicator='\q{keymap:emacs/mode-indicator}' + + + ## The following option specifies the multiline mode name used in the prompt + ## sequence \q{keymap:emacs/mode-indicator} in the multiline editing mode. + + # default + #bleopt keymap_emacs_mode_string_multiline=$'\e[1m-- MULTILINE --\e[m' + # do not show the mode name + #bleopt keymap_emacs_mode_string_multiline= + + #---------------------------------------------------------------------------- + # Keybindings + + ## The default mapping of RET and C-m inserts newline with multiline commands + ## or incomplete commands. With the following setting, RET and C-m always + ## causes the execution of the command even in the multiline mode or when the + ## command is not syntactically completed. + + #ble-bind -f 'C-m' accept-line + #ble-bind -f 'RET' accept-line + + + ## With the following settings, M-backspace (whose actual key sequence + ## depends on your terminal) will kill the backward word as in the default + ## readline. + + #ble-bind -f 'M-C-?' kill-backward-cword + #ble-bind -f 'M-DEL' kill-backward-cword + #ble-bind -f 'M-C-h' kill-backward-cword + #ble-bind -f 'M-BS' kill-backward-cword + + return 0 +} +blehook/eval-after-load keymap_emacs blerc/emacs-load-hook + +##----------------------------------------------------------------------------- +## Settings for Vim mode + +function blerc/vim-load-hook { + ((_ble_bash>=40300)) && builtin bind 'set keyseq-timeout 1' + + #---------------------------------------------------------------------------- + # Settings for the mode indicator + + ## The following option specifies the content of the mode indicator shown in + ## the info line as a prompt sequence. + + #bleopt prompt_vi_mode_indicator='\q{keymap:vi/mode-indicator}' + + + ## The following option controls whether the prompt sequence + ## \q{keymap:vi/mode-indicator} is activated. When this option has a + ## non-empty value, \q{keymap:vi/mode-indicator} is expanded to the mode + ## indicator. Otherwise, \q{keymap:vi/mode-indicator} is expanded to the + ## empty string. + + #bleopt keymap_vi_mode_show=1 + + + ## The following options specify the name of modes in + ## \q{keymap:vi/mode-indicator}. + + #bleopt keymap_vi_mode_name_insert=INSERT + #bleopt keymap_vi_mode_name_replace=REPLACE + #bleopt keymap_vi_mode_name_vreplace=VREPLACE + #bleopt keymap_vi_mode_name_visual=VISUAL + #bleopt keymap_vi_mode_name_select=SELECT + #bleopt keymap_vi_mode_name_linewise=LINE + #bleopt keymap_vi_mode_name_blockwise=BLOCK + + + ## This option specifies the result of \q{keymap:vi/mode-indicator} in the + ## normal mode. For example, if you want to show an explicit name of the + ## normal mode like in other modes, please use the following setting: + + #bleopt keymap_vi_mode_string_nmap:=$'\e[1m-- NORMAL --\e[m' + + + ## This option specifies that all the prompts should be recalculated on the + ## mode change. When this option has a non-empty value, the prompt will be + ## recalculated. + + #bleopt keymap_vi_mode_update_prompt= + + #---------------------------------------------------------------------------- + # Keybindings + + ## The following setting sets up the keymap settings with Meta modifiers. + ## With this setting, M-RET can be used to insert a newline in the + ## commandline. + + #ble-decode/keymap:vi_imap/define-meta-bindings + + ## In this case, C-RET can be optionally configured so that it forcibly + ## executes the command. + + #ble-bind -m vi_imap -f 'C-RET' 'accept-line' + + ## The default mapping of (whose actual key sequence depends on + ## your terminal) copies the previous shell word in the kill ring. Instead, + ## the following settings will kill the backward word as in the default + ## readline. + + #ble-bind -m vi_imap -f 'M-C-?' kill-backward-cword + #ble-bind -m vi_imap -f 'M-DEL' kill-backward-cword + #ble-bind -m vi_imap -f 'M-C-h' kill-backward-cword + #ble-bind -m vi_imap -f 'M-BS' kill-backward-cword + + + ## The default mapping of RET and C-m in the insert mode inserts newline with + ## multiline commands or incomplete commands. They moves the cursor position + ## to the next line in the normal mode. Instead, with the following setting, + ## RET and C-m always causes the execution of the command even in the + ## multiline mode or when the command is not syntactically completed. + + #ble-bind -m vi_imap -f 'C-m' accept-line + #ble-bind -m vi_imap -f 'RET' accept-line + #ble-bind -m vi_nmap -f 'C-m' accept-line + #ble-bind -m vi_nmap -f 'RET' accept-line + + + ## The default mapping of C-o is vi_imap/single-command-mode. If you want to + ## execute the current command line and load the next history entry with + ## , use the following setting: + + #ble-bind -m vi_imap -f 'C-o' 'accept-and-next' + + + ## The default mapping of C-k is kill-forward-line. If you want to input + ## digraphs with {char1}{char2}, use the following setting: + + #ble-bind -m vi_imap -f 'C-k' 'vi_imap/insert-digraph' + + + ## The default mapping of C-c is vi_imap/normal-mode-without-insert-leave + ## (imap), vi-command/cancel (nmap). If you instead want to discard the + ## current line and go to the next line, you can bind C-c to 'discard-line': + + #ble-bind -m vi_imap -f 'C-c' discard-line + #ble-bind -m vi_nmap -f 'C-c' discard-line + + + ## The default mapping of 'g g' and G moves the current position in the + ## command history. If you would like to move the cursor position in the + ## current command entry, you can overwrite the bindings as follows. + + #ble-bind -m vi_nmap -f 'g g' vi-command/first-nol + #ble-bind -m vi_omap -f 'g g' vi-command/first-nol + #ble-bind -m vi_xmap -f 'g g' vi-command/first-nol + #ble-bind -m vi_nmap -f 'G' vi-command/last-line + #ble-bind -m vi_omap -f 'G' vi-command/last-line + #ble-bind -m vi_xmap -f 'G' vi-command/last-line + + + ## The default mapping of 'C-r' in the normal mode is "vi_nmap/redo". If you + ## want to use the incremental search mode from Emacs in the Vim mode (as in + ## Readline), please use the following keybinding. + + #ble-bind -m vi_nmap -f 'C-r' history-isearch-backward + + #---------------------------------------------------------------------------- + # Cursor shapes and other terminal settings + + ## Cursor settings + + #ble-bind -m vi_nmap --cursor 2 + #ble-bind -m vi_imap --cursor 5 + #ble-bind -m vi_omap --cursor 4 + #ble-bind -m vi_xmap --cursor 2 + #ble-bind -m vi_smap --cursor 2 + #ble-bind -m vi_cmap --cursor 0 + + ## DECSCUSR setting + ## + ## If you don't have the entry Ss in terminfo, yet your terminal supports + ## DECSCUSR, please comment out the following line to enable DECSCUSR. + ## + #_ble_term_Ss=$'\e[@1 q' + + ## Control sequences that will be output on entering each mode + #bleopt term_vi_nmap= + #bleopt term_vi_imap= + #bleopt term_vi_omap= + #bleopt term_vi_xmap= + #bleopt term_vi_smap= + #bleopt term_vi_cmap= + + #---------------------------------------------------------------------------- + # Miscellaneous settings + + ## This option controls the frequency of recording "undo". When the value + ## "more" is specified, "undo" will be recorded for various operations in + ## "vi_imap". + + #bleopt keymap_vi_imap_undo= + + + ## This option controls the behavior of motion in select mode. The value is + ## a list of words separated by commas. When the word "stopsel" is contained + ## in this option, ble.sh exits the select mode with a motion in select mode. + + #bleopt keymap_vi_keymodel= + + + ## This option sets the upper limit of the maximal depth of recurrence of + + ## replaying keyboard macros. + #bleopt keymap_vi_macro_depth=64 + + + ## This option specifies the operator name when the user input "g@" in normal + ## mode. The function "ble/keymap:vi/operator:$value", where "$value" is the + ## value of this setting, is used as the implementation of the operator. + + #bleopt keymap_vi_operatorfunc= + + + ## When this option has a non-empty value, "/", "?", "n", "N" search the word + ## on the current position. When this option has the empty value, these keys + ## follows the behavior of `vim`. + + #bleopt keymap_vi_search_match_current= + + #---------------------------------------------------------------------------- + # plugins + + ## vim-surround + + #ble-import vim-surround + #bleopt vim_surround_45:=$'$( \r )' + #bleopt vim_surround_61:=$'$(( \r ))' + + ## vim-arpeggio + + #ble-import vim-arpeggio + #bleopt vim_arpeggio_timeoutlen=10 + #ble/lib/vim-arpeggio.sh/bind -s jk 'hello' + + ## vim-airline + + #ble-import vim-airline + #bleopt vim_airline_theme=light + #bleopt vim_airline_section_a='\e[1m\q{lib/vim-airline/mode}' + #bleopt vim_airline_section_b='\q{lib/vim-airline/gitstatus}' + #bleopt vim_airline_section_c='\w' + #bleopt vim_airline_section_x='bash' + #bleopt vim_airline_section_y='$_ble_util_locale_encoding[unix]' + #bleopt vim_airline_section_z=' \q{history-percentile} \e[1m!\q{history-index}/\!\e[22m \q{position}' + #bleopt vim_airline_left_sep=$'\uE0B0' + #bleopt vim_airline_left_alt_sep=$'\uE0B1' + #bleopt vim_airline_right_sep=$'\uE0B2' + #bleopt vim_airline_right_alt_sep=$'\uE0B3' + #bleopt vim_airline_symbol_branch=$'\uE0A0' + #bleopt vim_airline_symbol_dirty=$'\u26A1' +} +blehook/eval-after-load keymap_vi blerc/vim-load-hook + +##----------------------------------------------------------------------------- +## Internal settings + +## This option sets the interval of checking new user inputs. The value is +## evaluated as an arithmetic expression. On the evaluation, a shell variable +## "ble_util_idle_elapsed" is provided for the time since the last user input +## in millisecond. This option is used for the polling for the background +## execution when there is no user inputs. + +#bleopt idle_interval='ble_util_idle_elapsed>600000?500:(ble_util_idle_elapsed>60000?200:(ble_util_idle_elapsed>5000?100:20))' + + +## This option specifies a colon-separated list of custom search paths of "ble-import". + +#bleopt import_path="${XDG_DATA_HOME:-$HOME/.local/share}/blesh/local" + + +## When a non-empty value is specified to this option, displays the internal +## syntax analysis information and the syntax tree. This is only effective in +## devel versions. + +#bleopt syntax_debug= + + +## When the option "debug_xtrace" contains a non-empty value, xtrace (set -x) +## is enabled for the internal processing of ble.sh. The value is used for the +## xtrace output log filename. [ Caution: The file size of the log file can +## soon grow up to hundred megabytes or to gigabytes. ] The option +## "debug_xtrace_ps4" specifies the value of PS4 for xtrace enabled by +## "debug_xtrace". + +#bleopt debug_xtrace=~/blesh.xtrace +#bleopt debug_xtrace_ps4='+ ' + + +## When the option "debug_idle" contains a non-empty value, the background +## tasks currently running are shown in the info panel. + +#bleopt debug_idle=1 + + +## [The setting "openat_base" needs to be set before ble.sh is loaded or +## specified in the source options. Therefore the value should be assigned +## directly to the shell variable "bleopt_openat_base" instead of using +## "bleopt" command.] +## +## This setting "openat_base" specifies the starting number of the file +## descriptors which ble.sh internally uses in Bash 4.0 or lower. The value of +## this setting is used as the number for the first file descriptor of internal +## use, and the next value is used for the second file descriptor, and so on. +## When you want to use the default value 30 and succeeding number 31, 32, +## etc. for other purposes, please set to this settings another value which +## does not conflict with file descriptors of other purposes. + +# echo "usage: e.g. source out/ble.sh -o openat_base=30" + + +## It specifies the context of the command execution. The value "gexec" +## specifies that the user command is evaluated in global contexts. The value +## "exec" (ble-0.3 and before) specified that the user command is evaluated in +## a function, but the support is removed in ble-0.4 because this is only +## remained for a debugging purpose and not tested well. + +#bleopt internal_exec_type=gexec + + +## This option sets the message that Bash outputs when "C-d" is input by user. +## This value is used to detect that the user inputs "C-d" in Bash 3. + +#bleopt internal_ignoreeof_trap='Use "exit" to leave the shell.' + + +## This option controls the output of stack dump when assertion is failed in +## ble.sh. When the value is evaluated to be non-zero, the stack dump is +## printed for assertion failures. + +#bleopt internal_stackdump_enabled=0 + + +## When a non-empty value is specified to this option, the standard output and +## standard error from Bash is not output to the terminal. When the value is +## empty, ble.sh tries to realize the line editing allowing Bash to output its +## own standard output and error. This setting has a flickering problem and +## only left for debugging purpose, so it is not tested. Normally a non-empty +## value should be specified so as to suppress the standard output and error +## from Bash. + +#bleopt internal_suppress_bash_output=1 diff --git a/.config/hypr/hyprland.conf b/.config/hypr/hyprland.conf index f8dedbc..83f3a3f 100644 --- a/.config/hypr/hyprland.conf +++ b/.config/hypr/hyprland.conf @@ -1,204 +1,214 @@ -monitor=eDP-1,2256x1504@60,0x0,1.5 -workspace=eDP-1,1 -monitor=DVI-D-1,preferred,0x0,1 -monitor=HDMI-A-1,preferred,0x0,1 -monitor=DP-3,preferred,1080x0,1.5 -workspace=DVI-D-1,2 -workspace=DP-3,1 -workspace=HDMI-A-1,2 -monitor=DVI-D-1,transform,1 + monitor=eDP-1,2256x1504@60,0x0,1.5 + workspace=eDP-1,1 + monitor=HDMI-A-1,preferred,0x0,1 + monitor=DP-1,preferred,2680x0,1.5 + monitor=DP-2,preferred,1600x0,1 + workspace=DP-2,2 + workspace=DP-1,1 + workspace=HDMI-A-1,3 + monitor=DP-2,transform,1 -input { - # kb_layout= - # kb_variant= - # kb_model= - # kb_options= - # kb_rules= - repeat_rate=140 - repeat_delay=180 - natural_scroll=0 - sensitivity=0.85 - accel_profile=adaptive + input { + # kb_layout= + # kb_variant= + # kb_model= + # kb_options= + # kb_rules= + repeat_rate=140 + repeat_delay=180 + natural_scroll=0 + sensitivity=0.75 + accel_profile=adaptive - follow_mouse=2 + follow_mouse=2 - touchpad { - natural_scroll=1 - clickfinger_behavior=1 + touchpad { + natural_scroll=1 + clickfinger_behavior=1 + } } -} -general { - max_fps=60 # deprecated, unused - # main_mod=SUPER + general { + max_fps=60 # deprecated, unused + # main_mod=SUPER - gaps_in=15 - gaps_out=20 - border_size=0 - col.active_border=0x66ee1111 - col.inactive_border=0x66333333 + gaps_in=15 + gaps_out=20 + border_size=0 + col.active_border=0x66ee1111 + col.inactive_border=0x66333333 - #damage_tracking=full # leave it on full unless you hate your GPU and want to make it suffer - layout=master -} + #damage_tracking=full # leave it on full unless you hate your GPU and want to make it suffer + layout=master + } -gestures { - workspace_swipe=true - workspace_swipe_fingers=3 -} + gestures { + workspace_swipe=true + workspace_swipe_fingers=3 + } -decoration { - rounding=18 - multisample_edges=true - active_opacity=0.97 - inactive_opacity=0.75 - fullscreen_opacity=1.0 - blur=true - blur_new_optimizations=true - blur_size=10 # minimum 1 - blur_passes=3 # minimum 1, more passes = more resource intensive. - blur_ignore_opacity=false - # Your blur "amount" is blur_size * blur_passes, but high blur_size (over around 5-ish) will produce artifacts. - # if you want heavy blur, you need to up the blur_passes. - # the more passes, the more you can up the blur_size without noticing artifacts. - drop_shadow=true - shadow_range=15 - shadow_offset=5 5 - shadow_scale=0.99 - shadow_render_power=1 - col.shadow = rgba(000000cc) - dim_inactive=true - dim_strength=0.2 -} + decoration { + rounding=18 + multisample_edges=true + active_opacity=0.97 + inactive_opacity=0.75 + fullscreen_opacity=1.0 + blur=true + blur_new_optimizations=true + blur_size=10 # minimum 1 + blur_passes=3 # minimum 1, more passes = more resource intensive. + blur_ignore_opacity=false + # Your blur "amount" is blur_size * blur_passes, but high blur_size (over around 5-ish) will produce artifacts. + # if you want heavy blur, you need to up the blur_passes. + # the more passes, the more you can up the blur_size without noticing artifacts. -bezier=snapslide,0.07,0.66,0.04,1.02 + drop_shadow=true + shadow_range=15 + shadow_offset=5 5 + shadow_scale=0.99 + shadow_render_power=1 + col.shadow = rgba(000000cc) + dim_inactive=true + dim_strength=0.2 + } -animations { - enabled=1 - animation=windows,1,2,snapslide - # animation=borders,1,10,default - animation=fadeIn,1,2,snapslide - animation=workspaces,1,2,snapslide - animation=specialWorkspace,1,2,snapslide,slidevert -} + bezier=snapslide,0.07,0.66,0.04,1.02 -dwindle { - pseudotile=0 # enable pseudotiling on dwindle -} + animations { + enabled=1 + animation=windows,1,2,snapslide + # animation=borders,1,10,default + animation=fadeIn,1,2,snapslide + animation=workspaces,1,2,snapslide + animation=specialWorkspace,1,2,snapslide,slidevert + } -master { - special_scale_factor=0.7 - new_is_master=false - new_on_top=false -} + dwindle { + pseudotile=0 # enable pseudotiling on dwindle + } -# misc:disable_autoreload = true + master { + special_scale_factor=0.8 + mfact=0.65 + new_is_master=false + new_on_top=false + } -# example window rules -# for windows named/classed as abc and xyz -windowrule=opaque,firefox -windowrule=float,dolphin -${if builtins.readFile "/etc/hostname" == "syl\n" then "# this is a kaladin space" else "windowrule=workspace 1,mpv"} -windowrule=float,mpv -windowrule=size ${if builtins.readFile "/etc/hostname" == "syl\n" then "90% 76%" else "85% 85%"},mpv -windowrule=center,mpv -# windowrule=pin,mpv -windowrule=float,pulsemixer -windowrule=workspace ${if builtins.readFile "/etc/hostname" == "syl\n" then "2" else "1"},firefox -windowrule=workspace ${if builtins.readFile "/etc/hostname" == "syl\n" then "1" else "2"},emacs -windowrule=float,btop -windowrule=size 70% 70%,btop -windowrule=center,btop -windowrule=float,presenter -windowrule=size 80% 80%,presenter -windowrule=center,presenter + # misc:disable_autoreload = true + misc { + focus_on_activate = true + } -# example binds -bind = SUPER,RETURN,exec,alacritty -bind = SUPER,C,killactive, -bind = SUPERSHIFT,Q,exit, -bind = SUPERSHIFT,D,exec,dolphin -bind = SUPERSHIFT,F,togglefloating, -bindr = SUPER,Super_L,exec,/home/chris/bin/launcher.sh -# bindr = ALT,Alt_L,exec,/home/chris/bin/window.sh -bind = SUPER,w,exec,/home/chris/bin/window.sh -bind = SUPER,E,exec,/home/chris/bin/emacslof -bind = SUPER,d,exec,emacsclient -c -e '(dired-jump)' -bind = SUPER,B,exec,/home/chris/bin/fflof -bind = SUPER,A,exec,alacritty --class pulsemixer -e pulsemixer -bind = SUPERCTRL,i,exec,alacritty --class btop -e btop + # example window rules + # for windows named/classed as abc and xyz + windowrule=opaque,firefox + windowrule=float,dolphin + windowrule=size 60% 60%,dolphin + windowrule=float,mpv + windowrule=size 90% 76%,mpv + windowrule=center,mpv + windowrule=opaque,mpv + # windowrule=pin,mpv + windowrule=float,pulsemixer + windowrule=workspace 2,firefox + windowrule=workspace 1,emacs + windowrule=float,btop + windowrule=size 70% 70%,btop + windowrule=center,btop + windowrule=float,presenter + windowrule=size 80% 80%,presenter + windowrule=center,presenter + windowrule=workspace 1,title:presentation-window -bind = SUPER,P,exec,/home/chris/bin/rbw.sh -bind = SUPER,M,fullscreen,1 -bind = SUPER,F,fullscreen,0 + # example binds + bind = SUPER,RETURN,exec,alacritty + bind = SUPER,C,killactive, + bind = SUPERSHIFT,Q,exit, + bind = SUPERSHIFT,D,exec,dolphin + bind = SUPERSHIFT,F,togglefloating, + bindr = SUPER,Super_L,exec,/home/chris/bin/launcher.sh + bindr = ALT,Alt_R,exec,/home/chris/bin/window.sh + bind = SUPER,w,exec,/home/chris/bin/window.sh + bind = SUPER,E,exec,/home/chris/bin/emacslof + bind = SUPER,d,exec,emacsclient -c -e '(dired-jump)' + bind = SUPER,v,exec,emacsclient -e '(chris/dired-open-videos)' + bind = SUPER,B,exec,/home/chris/bin/fflof + bind = SUPER,A,exec,alacritty --class pulsemixer -e pulsemixer + bind = SUPERCTRL,i,exec,alacritty --class btop -e btop + bind = ,Print,exec,screenshot -bind = SUPER,h,movefocus,l -bind = SUPER,l,movefocus,r -bind = SUPER,k,cyclenext,prev -bind = SUPER,j,cyclenext -bind = SUPERSHIFT,h,movewindow,l -bind = SUPERSHIFT,l,movewindow,r -bind = SUPERSHIFT,k,movewindow,u -bind = SUPERSHIFT,j,movewindow,d -bind = SUPERCTRL,l,splitratio,+0.05 -bind = SUPERCTRL,h,splitratio,-0.05 -bind = SUPERCTRL,c,centerwindow + bind = SUPER,P,exec,/home/chris/bin/rbw.sh + bind = SUPER,M,fullscreen,1 + bind = SUPER,F,fullscreen,0 -bind = SUPER,1,workspace,1 -bind = SUPER,2,workspace,2 -bind = SUPER,3,workspace,3 -bind = SUPER,4,workspace,4 -bind = SUPER,5,workspace,5 -bind = SUPER,6,workspace,6 -bind = SUPER,7,workspace,7 -bind = SUPER,8,workspace,8 -bind = SUPER,9,workspace,9 -bind = SUPER,0,workspace,10 + bind = SUPER,h,movefocus,l + bind = SUPER,l,movefocus,r + bind = SUPER,k,layoutmsg,cycleprev + bind = SUPER,j,layoutmsg,cyclenext + bind = SUPERSHIFT,h,movewindow,l + bind = SUPERSHIFT,l,movewindow,r + bind = SUPERSHIFT,k,layoutmsg,swapprev + bind = SUPERSHIFT,j,layoutmsg,swapnext + bind = SUPERCTRL,l,splitratio,+0.05 + bind = SUPERCTRL,h,splitratio,-0.05 + bind = SUPERCTRL,c,centerwindow -bind = SUPERALT,l,workspace,m+1 -bind = SUPERALT,h,workspace,m-1 + bind = SUPER,1,workspace,1 + bind = SUPER,2,workspace,2 + bind = SUPER,3,workspace,3 + bind = SUPER,4,workspace,4 + bind = SUPER,5,workspace,5 + bind = SUPER,6,workspace,6 + bind = SUPER,7,workspace,7 + bind = SUPER,8,workspace,8 + bind = SUPER,9,workspace,9 + bind = SUPER,0,workspace,10 -bind = SUPERSHIFT,1,movetoworkspace,1 -bind = SUPERSHIFT,2,movetoworkspace,2 -bind = SUPERSHIFT,3,movetoworkspace,3 -bind = SUPERSHIFT,4,movetoworkspace,4 -bind = SUPERSHIFT,5,movetoworkspace,5 -bind = SUPERSHIFT,6,movetoworkspace,6 -bind = SUPERSHIFT,7,movetoworkspace,7 -bind = SUPERSHIFT,8,movetoworkspace,8 -bind = SUPERSHIFT,9,movetoworkspace,9 -bind = SUPERSHIFT,0,movetoworkspace,10 + bind = SUPERALT,l,workspace,m+1 + bind = SUPERALT,h,workspace,m-1 -bind = SUPER,o,movewindow,mon: next -bind = SUPER,y,togglespecialworkspace -bind = SUPER,i,movewindow,left -bind = SUPERSHIFT,p,pin -bind = SUPER,n,movetoworkspace,special + bind = SUPERSHIFT,1,movetoworkspace,1 + bind = SUPERSHIFT,2,movetoworkspace,2 + bind = SUPERSHIFT,3,movetoworkspace,3 + bind = SUPERSHIFT,4,movetoworkspace,4 + bind = SUPERSHIFT,5,movetoworkspace,5 + bind = SUPERSHIFT,6,movetoworkspace,6 + bind = SUPERSHIFT,7,movetoworkspace,7 + bind = SUPERSHIFT,8,movetoworkspace,8 + bind = SUPERSHIFT,9,movetoworkspace,9 + bind = SUPERSHIFT,0,movetoworkspace,10 -binde = , XF86AudioMute, exec, pamixer -t -binde = , XF86AudioRaiseVolume, exec, /home/chris/bin/volup -binde = , XF86AudioLowerVolume, exec, /home/chris/bin/voldown -binde = ,F1, exec, pamixer -t -binde = ,F3, exec, /home/chris/bin/volup -binde = ,F2, exec, /home/chris/bin/voldown -binde = , XF86MonBrightnessUp, exec, brightnessctl s +10% -binde = , XF86MonBrightnessDown, exec, brightnessctl s 10%- + bind = SUPER,o,movewindow,mon:l + bind = SUPER,y,togglespecialworkspace + bind = SUPER,i,movewindow,left + bind = SUPERSHIFT,p,pin + bind = SUPER,n,movetoworkspace,special -bind=SUPERCTRL,b,exec,eww.sh -bind=SUPERALT,n,exec,eww update rightside=true + binde = , XF86AudioMute, exec, pamixer -t + binde = , XF86AudioRaiseVolume, exec, /home/chris/bin/volup + binde = , XF86AudioLowerVolume, exec, /home/chris/bin/voldown + binde = ,F1, exec, pamixer -t + binde = ,F3, exec, /home/chris/bin/volup + binde = ,F2, exec, /home/chris/bin/voldown + binde = , XF86MonBrightnessUp, exec, brightnessctl s +10% + binde = , XF86MonBrightnessDown, exec, brightnessctl s 10%- -bindm=SUPER,mouse:272,movewindow -bindm=SUPER,mouse:273,resizewindow + bind=SUPERCTRL,b,exec,/home/chris/bin/wb-toggle + bind=SUPERALT,n,exec,eww update rightside=true -# Blur waybar -# blurls=gtk-layer-shell -# blurls=notifications + bindm=SUPER,mouse:272,movewindow + bindm=SUPER,mouse:273,resizewindow -exec-once = /home/chris/bin/startup.sh -exec-once = hyprpaper -exec-once = dunst -exec-once = hyprctl dispatch --batch "splitratio 1; splitration -0.35" -exec-once = dbus-update-activation-environment --systemd --all -exec-once = jellyfin-mpv-shim -exec-once = hyprctl setcursor phinger-cursors-light -exec-once = swayidle -w timeout 300 'swaylock -S --effect-blur 20x3 --fade-in 1 --effect-vignette 0.5:1 --grace 60' timeout 600 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' before-sleep 'swaylock -S --effect-blur 20x3 --effect-vignette 0.5:1' + # Blur waybar + # blurls=gtk-layer-shell + # blurls=notifications + + exec-once = /home/chris/bin/startup.sh + exec-once = swww init + exec-once = swww img /home/chris/Pictures/wallpapers/nixorange.webp -t grow --transition-bezier .14,0,.14,.99 + exec-once = dunst + exec-once = hyprctl dispatch --batch "splitratio 1; splitration -0.35" + exec-once = dbus-update-activation-environment --all + exec-once = jellyfin-mpv-shim + exec-once = hyprctl setcursor phinger-cursors-light 24 + exec-once = swayidle -w timeout 300 'swaylock -S --effect-blur 20x3 --fade-in 1 --effect-vignette 0.5:1 --grace 60' timeout 600 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' before-sleep 'swaylock -S --effect-blur 20x3 --effect-vignette 0.5:1' diff --git a/.config/qt5ct/snazzy.conf b/.config/qt5ct/snazzy.conf new file mode 100644 index 0000000..84e2200 --- /dev/null +++ b/.config/qt5ct/snazzy.conf @@ -0,0 +1,4 @@ +[ColorScheme] +active_colors=#ff9aedfe, #ff34353e, #ff34353e, #ffe2e4e5, #ff78787e, #ffa5a5a9, #e2e4e5, #ffeff0eb, #ffe2e4e5, #ff34353e, #ff282a36, #ff78787e, #ff43454f, #5af78e, #ffff9f43, #ffff5c57, #ff43454f, #ffe2e4e5, #ff34353e, #ffff6ac1, #8fff6ac1 +disabled_colors=#ffb2643c, #ff34353e, #ff34353e, #ffe2e4e5, #ff78787e, #ffa5a5a9, #e2e4e5, #ffb2643c, #ffb2643c, #ff34353e, #ff282a36, #ff78787e, #ff43454f, #5af78e, #ffff9f43, #ffff5c57, #ff43454f, #ffe2e4e5, #ff34353e, #ffb2643c, #8fb2643c +inactive_colors=#ff9aedfe, #ff34353e, #ff34353e, #ffe2e4e5, #ff78787e, #ffa5a5a9, #e2e4e5, #ffeff0eb, #ffe2e4e5, #43454f, #ff282a36, #ff78787e, #ff43454f, #5af78e, #ffff9f43, #ffff5c57, #ff43454f, #ffe2e4e5, #ff34353e, #ffff6ac1, #8fff6ac1 diff --git a/.config/starship.toml b/.config/starship.toml new file mode 100644 index 0000000..0a39848 --- /dev/null +++ b/.config/starship.toml @@ -0,0 +1,9 @@ +# Get editor completions based on the config schema +"$schema" = 'https://starship.rs/config-schema.json' + +# Inserts a blank line between shell prompts +add_newline = true + +# Replace the '❯' symbol in the prompt with '➜' +[character] # The name of the module we are configuring is 'character' +success_symbol = '[❯](bold green)' # The 'success_symbol' segment is being set to '➜' with the color 'bold green' diff --git a/.config/starship/init.sh b/.config/starship/init.sh new file mode 100644 index 0000000..a6441c8 --- /dev/null +++ b/.config/starship/init.sh @@ -0,0 +1,13 @@ + +__main() { + local major="${BASH_VERSINFO[0]}" + local minor="${BASH_VERSINFO[1]}" + + if ((major > 4)) || { ((major == 4)) && ((minor >= 1)); }; then + source <(/home/chris/.nix-profile/bin/starship init bash --print-full-init) + else + source /dev/stdin <<<"$(/home/chris/.nix-profile/bin/starship init bash --print-full-init)" + fi +} +__main +unset -f __main diff --git a/.config/tridactyl/themes/snazzy.css b/.config/tridactyl/themes/snazzy.css index 641843e..3af245b 100644 --- a/.config/tridactyl/themes/snazzy.css +++ b/.config/tridactyl/themes/snazzy.css @@ -50,8 +50,8 @@ padding: 0.4rem; } -#completions table { font-size: 1.0rem; - font-weight: 500; +#completions table { font-size: 1.0rem !important; + font-weight: 800 !important; border-spacing: 0; table-layout: fixed; padding: 1rem; @@ -69,7 +69,7 @@ color: var(--tridactyl-fg); background: var(--tridactyl-bg); display: inline-block; - font-size: unset; + font-size: 1.0rem !important; font-weight: 600 !important; overflow: hidden; width: 100%; diff --git a/.config/waybar/config b/.config/waybar/config index 7da9eee..0555581 100644 --- a/.config/waybar/config +++ b/.config/waybar/config @@ -1,12 +1,12 @@ { - // "layer": "top", // Waybar at top layer + "layer": "top", // Waybar at top layer "position": "bottom", // Waybar position (top|bottom|left|right) - "height": 30, // Waybar height (to be removed for auto height) - // "width": 1280, // Waybar width + "height": 35, // Waybar height (to be removed for auto height) + "width": 1400, // Waybar width // Choose the order of the modules "custom/wintitle", - "modules-left": ["workspaces", "hyprland/window"], + "modules-left": ["wlr/workspaces", "workspaces", "hyprland/window"], "modules-center": ["clock"], - "modules-right": ["pulseaudio", "backlight", "network", "memory", "cpu", "battery", "battery#bat2", "tray"], + "modules-right": ["pulseaudio", "backlight", "temperature", "memory", "cpu", "battery", "tray"], "margin-top": -5, "margin-bottom": 8, "margin-left": 6, @@ -31,11 +31,16 @@ "num-tags": 8 }, "hyprland/window": { - "format": " {}" + "format": " {}" }, "workspaces": { "format": " {name} " }, + "wlr/workspaces": { + "format": "{icon}", + "on-scroll-up": "hyprctl dispatch workspace e+1", + "on-scroll-down": "hyprctl dispatch workspace e-1" + }, "sway/mode": { "format": " {}" }, @@ -54,25 +59,25 @@ // "timezone": "America/New_York", "tooltip-format": "{:%Y %B}\n{calendar}", "format-alt": "{:%Y-%m-%d}", - "format": "{:%a %b%e, %I:%M %p}" + "format": "{:%a %b %e, %I:%M %p}" }, "cpu": { - "format": " {usage}%", + "format": " {usage}%", }, "memory": { - "format": " {}%" + "format": " {}%" }, "temperature": { // "thermal-zone": 2, // "hwmon-path": "/sys/class/hwmon/hwmon2/temp1_input", "critical-threshold": 80, // "format-critical": "{temperatureC}°C {icon}", - "format": "{temperatureC}°C {icon}", - "format-icons": ["", "", ""] + "format": "{icon} {temperatureC}°C", + "format-icons": ["", "", ""] }, "backlight": { // "device": "acpi_video1", - "format": "{icon} {percent}%", + "format": "{icon} {percent}%", "format-icons": ["", ""] }, "battery": { @@ -82,13 +87,13 @@ "critical": 15 }, "format": "{icon} {capacity}%", - "format-charging": " {capacity}%", + "format-charging": "{icon} {capacity}%", "format-plugged": " {capacity}%", "format-alt": "{time} {icon}", - "format-good": "", // An empty format will hide the module - "format-full": "", - "format-icons": [" ", " ", " ", " ", " "], - "format-charging-icons": [" ", " ", " ", " ", " "] + "format-good": "{icon} {capacity}%", // An empty format will hide the module + "format-full": "󰁹 {capacity}%", + "format-icons": ["󰁺", "󰁼", "󰁾", "󰂀", "󰂂"], + "format-charging-icons": ["󰢜", "󰂇", "󰢝", "󰢞", "󰂋"] }, "battery#bat2": { "bat": "BAT2", @@ -108,11 +113,11 @@ }, "network": { // "interface": "wlp2*", // (Optional) To force the use of this interface - "format-wifi": " {essid} ({signalStrength}%)", + "format-wifi": " ({signalStrength}%)", "format-ethernet": " {ipaddr}", "format-linked": "{ifname} (No IP) ", "format-disconnected": "Disconnected ⚠", - "format-alt": "{ifname}: {ipaddr}/{cidr}" + "format-alt": "{ifname}: {essid} {ipaddr}/{cidr}", }, "pulseaudio": { // "scroll-step": 1, // %, can be a float diff --git a/.config/waybar/style.css b/.config/waybar/style.css index dc7fe16..38de064 100644 --- a/.config/waybar/style.css +++ b/.config/waybar/style.css @@ -36,19 +36,21 @@ window { } window#waybar > box { - padding-top: 3px; + padding-top: 5px; padding-bottom: 3px; + padding-left: 3px; + padding-right: 10px; color: @base05; - box-shadow: 2px 2px 5px 5px #101010; + box-shadow: 5px 5px 3px 3px #101010; margin: 12px 14px 14px 14px; - background: @base00; + background: @backtransparent; } #workspaces { border-radius: 20px; margin-left: 10px; padding-right: 10px; - background: @backtransparent; + background: transparent; transition: none; } @@ -56,7 +58,7 @@ window#waybar > box { border-radius: 20px; margin-left: 6px; padding-right: 10px; - background: @backtransparent; + background: transparent; transition: none; } @@ -112,7 +114,7 @@ window#waybar > box { border-radius: 20px; transition: none; color: @base0B; - background: @backtransparent; + background: transparent; } #backlight { @@ -123,7 +125,7 @@ window#waybar > box { border-radius: 20px; transition: none; color: @base08; - background: @backtransparent; + background: transparent; } #battery.warning { @@ -144,7 +146,7 @@ window#waybar > box { border-radius: 20px; transition: none; color: @base09; - background: @backtransparent; + background: transparent; } #network { @@ -153,7 +155,7 @@ window#waybar > box { border-radius: 20px; transition: none; color: @base0B; - background: @backtransparent; + background: transparent; } #cpu { @@ -162,7 +164,7 @@ window#waybar > box { border-radius: 20px; transition: none; color: @base09; - background: @backtransparent; + background: transparent; } #battery { @@ -171,7 +173,7 @@ window#waybar > box { border-radius: 20px; transition: none; color: @base0D; - background: @backtransparent; + background: transparent; } #battery.bat2 { @@ -184,7 +186,7 @@ window#waybar > box { border-radius: 20px; transition: none; color: @base0C; - background: @backtransparent; + background: transparent; } #temperature { @@ -193,7 +195,7 @@ window#waybar > box { border-radius: 20px; transition: none; color: @base0E; - background: @backtransparent; + background: transparent; } #tray { @@ -202,6 +204,6 @@ window#waybar > box { border-radius: 20px; transition: none; color: @base0E; - background: @backtransparent; + background: transparent; } diff --git a/guix/channels.scm b/guix/channels.scm index 645baa6..42aac5f 100644 --- a/guix/channels.scm +++ b/guix/channels.scm @@ -2,8 +2,9 @@ (name 'guix) (url "https://git.savannah.gnu.org/git/guix.git") (branch "master") - (commit - "654fcf9971bb01389d577be07c6ec0f68940c743") + ;; (commit + ;; "654fcf9971bb01389d577be07c6ec0f68940c743") + (commit "d884fc9e2efecfba09af4694f5a13ad7fc6f704f") (introduction (make-channel-introduction "9edb3f66fd807b096b48283debdcddccfea34bad" @@ -13,8 +14,9 @@ (name 'nonguix) (url "https://gitlab.com/nonguix/nonguix") (branch "master") - (commit - "c323f4c866cdf7c9fb958ed968b80e0911ecd899") + ;; (commit + ;; "c323f4c866cdf7c9fb958ed968b80e0911ecd899") + (commit "bf13c6b5f32980582e8c19b509c6825e86b953dd") (introduction (make-channel-introduction "897c1a470da759236cc11798f4e0a5f7d4d59fbc" @@ -22,10 +24,27 @@ "2A39 3FFF 68F4 EF7A 3D29 12AF 6F51 20A0 22FB B2D5")))) (channel (name 'rosenthal) - (url "https://github.com/rakino/rosenthal") + (url "https://codeberg.org/hako/rosenthal.git") (branch "trunk") (introduction (make-channel-introduction "7677db76330121a901604dfbad19077893865f35" (openpgp-fingerprint - "13E7 6CD6 E649 C28C 3385 4DF5 5E5A A665 6149 17F7"))))) + "13E7 6CD6 E649 C28C 3385 4DF5 5E5A A665 6149 17F7")))) + (channel + (name 'rde) + (url "https://git.sr.ht/~abcdw/rde") + (introduction + (make-channel-introduction + "257cebd587b66e4d865b3537a9a88cccd7107c95" + (openpgp-fingerprint + "2841 9AC6 5038 7440 C7E9 2FFA 2208 D209 58C1 DEB0")))) + ;; (channel + ;; (name 'emacs) + ;; (url "https://github.com/babariviere/guix-emacs") + ;; (introduction + ;; (make-channel-introduction + ;; "72ca4ef5b572fea10a4589c37264fa35d4564783" + ;; (openpgp-fingerprint + ;; "261C A284 3452 FB01 F6DF 6CF4 F9B7 864F 2AB4 6F18")))) + ) diff --git a/guix/home-services/pipewire.scm b/guix/home-services/pipewire.scm new file mode 100644 index 0000000..14081ef --- /dev/null +++ b/guix/home-services/pipewire.scm @@ -0,0 +1,99 @@ +(define-module (home-services pipewire) + #:use-module (gnu packages) + #:use-module (gnu packages linux) + #:use-module (gnu services) + #:use-module (gnu services configuration) + #:use-module (gnu home services) + #:use-module (gnu home services shepherd) + #:use-module (guix gexp)) + +(define (home-pipewire-profile-service config) + (map specification->package + (list "pipewire" + "wireplumber"))) + +(define (home-pipewire-shepherd-service config) + (list + ;; Start Pipewire daemon + (shepherd-service + (requirement '(dbus)) + (provision '(pipewire)) + (stop #~(make-kill-destructor)) + (start #~(make-forkexec-constructor + (list #$(file-append pipewire "/bin/pipewire")) + #:log-file (string-append + (or (getenv "XDG_LOG_HOME") + (format #f "~a/.local/var/log" + (getenv "HOME"))) + "/pipewire.log") + #:environment-variables + (append (list "DISABLE_RTKIT=1") + (default-environment-variables))))) + ;; Start Pipewire PulseAudio module + (shepherd-service + (requirement '(pipewire)) + (provision '(pipewire-pulse)) + (stop #~(make-kill-destructor)) + (start #~(make-forkexec-constructor + (list #$(file-append pipewire "/bin/pipewire-pulse")) + #:log-file (string-append + (or (getenv "XDG_LOG_HOME") + (format #f "~a/.local/var/log" + (getenv "HOME"))) + "/pipewire-pulse.log") + #:environment-variables + (append (list "DISABLE_RTKIT=1") + (default-environment-variables))))) + ;; Start Wireplumber session manager + (shepherd-service + (requirement '(pipewire)) + (provision '(wireplumber)) + (stop #~(make-kill-destructor)) + (start #~(make-forkexec-constructor + (list #$(file-append wireplumber "/bin/wireplumber")) + #:log-file (string-append + (or (getenv "XDG_LOG_HOME") + (format #f "~a/.local/var/log" + (getenv "HOME"))) + "/wireplumber.log") + #:environment-variables + (append (list "DISABLE_RTKIT=1") + (default-environment-variables))))))) + +(define (home-pipewire-xdg-configuration-service config) + `(("alsa/asoundrc" + ,(mixed-text-file + "asoundrc" + #~(string-append + "<" + #$(file-append + pipewire "/share/alsa/alsa.conf.d/50-pipewire.conf") + ">\n<" + #$(file-append + pipewire "/share/alsa/alsa.conf.d/99-pipewire-default.conf") + ">\n" + " +pcm_type.pipewire { + lib " #$(file-append pipewire "/lib/alsa-lib/libasound_module_pcm_pipewire.so") + " +} +ctl_type.pipewire { + lib " #$(file-append pipewire "/lib/alsa-lib/libasound_module_ctl_pipewire.so") + " +} +"))))) + +(define-public home-pipewire-service-type + (service-type (name 'home-pipewire) + (extensions + (list (service-extension + home-profile-service-type + home-pipewire-profile-service) + (service-extension + home-shepherd-service-type + home-pipewire-shepherd-service) + (service-extension + home-xdg-configuration-files-service-type + home-pipewire-xdg-configuration-service))) + (default-value #f) + (description "Configures and runs the Pipewire audio system."))) diff --git a/guix/home-services/udiskie.scm b/guix/home-services/udiskie.scm new file mode 100644 index 0000000..09c3383 --- /dev/null +++ b/guix/home-services/udiskie.scm @@ -0,0 +1,32 @@ +(define-module (home-services udiskie) + #:use-module (gnu services) + #:use-module (gnu home services) + #:use-module (gnu home services shepherd) + #:use-module (gnu packages freedesktop) + #:use-module (gnu services configuration) + #:use-module (guix gexp) + + #:export (home-udiskie-service-type)) + +(define (home-udiskie-profile-service config) + (list udiskie)) + +(define (home-udiskie-shepherd-service config) + (list + (shepherd-service + (provision '(udiskie)) + (documentation "Run and control udiskie.") + (start #~(make-forkexec-constructor '("udiskie" "-t"))) + (stop #~(make-kill-destructor))))) + +(define home-udiskie-service-type + (service-type (name 'home-udiskie) + (description "A service for launching Udiskie.") + (extensions + (list (service-extension + home-profile-service-type + home-udiskie-profile-service) + (service-extension + home-shepherd-service-type + home-udiskie-shepherd-service))) + (default-value #f))) diff --git a/guix/home.nix b/guix/home.nix new file mode 100644 index 0000000..2068be5 --- /dev/null +++ b/guix/home.nix @@ -0,0 +1,15 @@ +{ config, pkgs, ... }: + +{ + home.username = "chris"; + home.homeDirectory = "/home/chris"; + home.stateVersion = "23.05"; + programs.home-manager.enable = true; + home.packages = with pkgs; [ + eww-wayland + swww + starship + # The guix version of dolphin isn't built for wayland and can't find the icon theme + dolphin + ]; +} diff --git a/guix/home.scm b/guix/home.scm index 914bc1e..3c53b21 100644 --- a/guix/home.scm +++ b/guix/home.scm @@ -4,34 +4,136 @@ ;; need to capture the channels being used, as returned by "guix describe". ;; See the "Replicating Guix" section in the manual. -(use-modules (gnu home) - (gnu home services) - (gnu packages) - (gnu packages vim) - (gnu packages rust-apps) - (gnu packages video) - (gnu services) - (guix gexp) - (gnu home services shells)) +(define-module (home) + #:use-module (home-services pipewire) + #:use-module (gnu home) + #:use-module (gnu home services) + #:use-module (gnu home services desktop) + #:use-module (gnu home services shells) + #:use-module (gnu home services xdg) + #:use-module (gnu home services gnupg) + #:use-module (gnu packages) + #:use-module (gnu packages vim) + #:use-module (gnu packages rust-apps) + #:use-module (gnu packages video) + #:use-module (gnu packages gnupg) + #:use-module (gnu services) + #:use-module (guix gexp) + #:use-module (guix packages) + #:use-module (guix git-download) + #:use-module (guix build-system emacs) + #:use-module ((guix licenses) #:prefix license:)) + + +;; (define home-scripts +;; (package +;; (name "home-scripts") +;; (version "0.1") +;; (source (local-file "../scripts" #:recursive #t)) +;; (build-system copy-build-system) +;; (arguments +;; `(#:install-plan +;; '(()))))) + +(define emacs-dired-rsync + (let ((commit "c4f484bff94ed2ddfe0fa45f1e695a1637e1a35a") + (revision "0")) + (package + (name "emacs-dired-rsync") + (version (git-version "0.0.1" revision commit)) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/stsquad/dired-rsync.git") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0000000000000000000000000000000000000000000000000000")))) + (build-system emacs-build-system) + (arguments (list #:emacs emacs-next-pgtk)) + (license license:gpl3+) + (home-page "https://github.com/stsquad/dired-rsync.git") + (synopsis "dired-rsync – asynchronous rsync from dired") + (description "\ +This package adds the command dired-rsync which allows the user to copy +marked files in a dired buffer via rsync.")))) (home-environment ;; Below is the list of packages that will show up in your ;; Home profile, under ~/.guix-home/profile. (packages (specifications->packages (list "vim" "exa" + "unzip" + "rsync" + "openssh" + "gcc-toolchain" + "make" + "curl" "mpv" "mpv-mpris" "yt-dlp" + "tmux" + "direnv" + "dutree" + "btop" + "htop" "ripgrep" "alacritty" + "libnotify" "nextcloud-client" "rofi-wayland" + "waybar" + "qt5ct" "fd" + "bc" + "sysstat" "ffmpeg" - "dolphin" + "pandoc" + "grim" + "slurp" + "imv" + "openjdk" + ;; "dolphin" + "kwallet" + "kwallet-pam" + "breeze" + "breeze-icons" + "kdeconnect" + "pinentry" + "pinentry-qt" + "pinentry-gnome3" + "pinentry-rofi" + "pulsemixer" + "python-pulsectl" + "dunst" + "rbw" + "aspell" + "aspell-dict-en" + "alsa-utils" + "lightly" + "swaylock-effects" + "swayidle" + "wtype" + "brightnessctl" + "flatpak" + "flatpak-xdg-utils" + "xdg-utils" + "xdg-desktop-portal" + "xdg-desktop-portal-kde" + "papirus-icon-theme" + "font-google-noto" + "font-google-noto-emoji" + "enchant" + "blesh" + "ncurses" "emacs-next-pgtk" + "emacs-dired-rsync" "emacs-all-the-icons" "emacs-org-roam" + "emacs-paredit" + "emacs-evil-paredit" "emacs-doom-modeline" "emacs-doom-themes" "emacs-org" @@ -52,6 +154,7 @@ "emacs-evil-surround" "emacs-websocket" "emacs-org-modern" + "emacs-org-web-tools" "emacs-org-re-reveal" "emacs-emojify" "emacs-pulsar" @@ -97,13 +200,84 @@ (home-bash-configuration (guix-defaults? #t) (aliases '(("grep" . "grep --color=auto") - ("ll" . "ls -l") - ("ls" . "exa -l") - ("la" . "exa -la"))))) + ("gh" . "guix home reconfigure ~/dotfiles/guix/home.scm") + ("gs" . "guix system reconfigure ~/dotfiles/guix/system.scm"))) + (environment-variables + '(("QT_QPA_PLATFORM" . "wayland") + ("QT_QPA_PLATFORMTHEME" . "qt5ct"))) + (bashrc (list (plain-file "blesh" "source .guix-home/profile/share/blesh/ble.sh") + (plain-file "home-manager" "source .nix-profile/etc/profile.d/hm-session-vars.sh") + ;;These need to be here so they are at the bottom and therefore after guix-defaults + (plain-file "exal" "alias ls=\"exa -l\"") + (plain-file "exala" "alias la=\"exa -la\"") + (plain-file "less-color" "export LESS=\"--RAW-CONTROL-CHARS\"") + (plain-file "man-colors" "[[ -f ~/.LESS_TERMCAP ]] && . ~/.LESS_TERMCAP") + (plain-file "starship" "source .config/starship/init.sh"))))) + (simple-service 'extra-env-vars + home-environment-variables-service-type + `(("PATH" . "$PATH:/home/chris/bin:/home/chris/.nix-profile/bin") + ("QT_QPA_PLATFORM" . "wayland") + ("QT_QPA_PLATFORMTHEME" . "qt5ct") + ("LITERAL_VALUE" . ,(literal-string "${abc}")))) (service home-fish-service-type (home-fish-configuration (aliases '(("ls" . "exa -l") - ("gh" . "guix home reconfigure ~/.files/guix/home.scm"))))) - (service home-xdg-configuration-files-service-type - `(("hypr/hyprland.conf" ,(local-file "../.config/hypr/hyprland.conf")) - ("alacritty/alacritty.yml" ,(local-file "../.config/alacritty/alacritty.yml"))))))) + ("gh" . "guix home reconfigure ~/dotfiles/guix/home.scm") + ("gs" . "guix system reconfigure ~/dotfiles/guix/system.scm"))))) + (simple-service 'config + home-xdg-configuration-files-service-type + `(("hypr" ,(local-file "../.config/hypr" #:recursive? #t)) + ("tridactyl" ,(local-file "../.config/tridactyl" #:recursive? #t)) + ("eww" ,(local-file "../.config/eww" #:recursive? #t)) + ("waybar" ,(local-file "../.config/waybar" #:recursive? #t)) + ("rofi" ,(local-file "../.config/rofi" #:recursive? #t)) + ("dunst" ,(local-file "../.config/dunst" #:recursive? #t)) + ("btop" ,(local-file "../.config/bpytop" #:recursive? #t)) + ("mpv" ,(local-file "../.config/mpv" #:recursive? #t)) + ("blesh" ,(local-file "../.config/blesh" #:recursive? #t)) + ("starship" ,(local-file "../.config/starship" #:recursive? #t)) + ("starship.toml" ,(local-file "../.config/starship.toml")) + ("guix/channels.scm" ,(local-file "channels.scm")) + ("home-manager/home.nix" ,(local-file "home.nix")) + ("qt5ct/colors/snazzy.conf" ,(local-file "../.config/qt5ct/snazzy.conf")) + ("alacritty/alacritty.yml" ,(local-file "../.config/alacritty/alacritty.yml")))) + (simple-service 'scripts + home-files-service-type + `(("bin" ,(local-file "../scripts" #:recursive? #t)) + (".mozilla/firefox/chris.default/chrome" ,(local-file "../.config/firefox/chrome" #:recursive? #t)))) + + (service home-gpg-agent-service-type + (home-gpg-agent-configuration + (pinentry-program + (file-append pinentry-rofi "/bin/pinentry-rofi")) + (ssh-support? #t) + (default-cache-ttl 28800) + (max-cache-ttl 28800) + (default-cache-ttl-ssh 28800) + (max-cache-ttl-ssh 28800))) + + (service home-xdg-user-directories-service-type + (home-xdg-user-directories-configuration + (videos "$HOME/vids") + (pictures "$HOME/pics") + (download "$HOME/dls") + (documents "$HOME/docs") + (music "$HOME/music") + (templates "$HOME") + (desktop "$HOME") + (publicshare "$HOME"))) + (service home-xdg-mime-applications-service-type + (home-xdg-mime-applications-configuration + (default '(("video/mp4" . "mpv.desktop") + ("video/webm" . "mpv.desktop") + ("video/x-matroska" . "mpv.destop") + ("audio/opus" . "mpv-slow.desktop"))) + (desktop-entries + (list (xdg-desktop-entry + (file "mpv-slow") + (name "MPV for Audio and Streams") + (type 'application) + (config + '((exec . "mpv --profile=slow %U")))))))) + (service home-pipewire-service-type) + (service home-dbus-service-type)))) diff --git a/guix/nonguix b/guix/nonguix deleted file mode 160000 index dd7519a..0000000 --- a/guix/nonguix +++ /dev/null @@ -1 +0,0 @@ -Subproject commit dd7519aa20948e42469eccc3c7c99c1633420a07 diff --git a/guix/system.scm b/guix/system.scm index 5ee9d42..8791654 100644 --- a/guix/system.scm +++ b/guix/system.scm @@ -10,14 +10,54 @@ ;; Indicate which modules to import to access the variables ;; used in this configuration. (use-modules (gnu) + (gnu services) + (gnu services shepherd) + (gnu services dbus) + (gnu system) + (gnu system setuid) + (gnu system nss) + (rosenthal packages wm) (nongnu packages linux) (nongnu system linux-initrd)) -(use-service-modules cups desktop networking ssh xorg) + +(use-service-modules cups desktop networking ssh xorg avahi + admin base nix dbus pm audio virtualization sysctl) + +(use-package-modules nfs certs shells ssh linux bash emacs gnome networking wm fonts glib libusb + cups freedesktop file-systems version-control package-management) + +(define etc-sudoers-config + (plain-file "etc-sudoers-config" + "Defaults timestamp_timeout=480 +root ALL=(ALL) ALL +%wheel ALL=(ALL) ALL +YOUR-USER-NAME ALL=(ALL) NOPASSWD:/run/current-system/profile/bin/chvt,/run/current-system/profile/bin/loginctl")) + +(define my-desktop-services + (modify-services %base-services + (guix-service-type config => (guix-configuration + (inherit config) + (substitute-urls + (append (list "https://substitutes.nonguix.org") + %default-substitute-urls)) + (authorized-keys + (append (list (plain-file "nonguix.pub" "(public-key (ecc (curve Ed25519) (q #C1FD53E5D4CE971933EC50C9F307AE2171A2D3B52C804642A7A35F84F3A4EA98#)))")) + %default-authorized-guix-keys)))) + ;; greetd-service-type provides "greetd" PAM service + (delete login-service-type) + (delete console-font-service-type) + ;; and can be used in place of mingetty-service-type + (delete mingetty-service-type) + (delete mingetty-service-type) + (delete mingetty-service-type) + (delete mingetty-service-type) + (delete mingetty-service-type) + (delete mingetty-service-type))) (operating-system - (kernel linux) - (initrd microcode-initrd) - (firmware (list linux-firmware)) + (kernel linux) + (initrd microcode-initrd) + (firmware (list linux-firmware)) (locale "en_US.utf8") (timezone "America/Chicago") (keyboard-layout (keyboard-layout "us")) @@ -25,49 +65,126 @@ ;; The list of user accounts ('root' is implicit). (users (cons* (user-account - (name "chris") - (comment "Chris") - (group "users") - (home-directory "/home/chris") - (supplementary-groups '("wheel" "netdev" "audio" "video"))) + (name "chris") + (comment "Chris") + (group "users") + (home-directory "/home/chris") + (supplementary-groups '("wheel" "netdev" "tty" "audio" "video"))) %base-user-accounts)) + (sudoers-file etc-sudoers-config) + ;; Packages installed system-wide. Users can also install packages ;; under their own account: use 'guix search KEYWORD' to search ;; for packages and 'guix install PACKAGE' to install a package. (packages (append (list (specification->package "nss-certs") + (specification->package "sway") + (specification->package "dbus-glib") + (specification->package "hyprland") (specification->package "emacs-next-pgtk")) %base-packages)) ;; Below is the list of system services. To search for available ;; services, run 'guix system search KEYWORD' in a terminal. (services - (append (list (service gnome-desktop-service-type) + (append + (list ;; To configure OpenSSH, pass an 'openssh-configuration' + ;; record as a second argument to 'service' below. + (service openssh-service-type) + fontconfig-file-system-service + (service sane-service-type) + (service cups-service-type + (cups-configuration + (web-interface? #t) + (extensions + (list cups-filters)))) - ;; To configure OpenSSH, pass an 'openssh-configuration' - ;; record as a second argument to 'service' below. - (service openssh-service-type) - (service cups-service-type) - (set-xorg-configuration - (xorg-configuration (keyboard-layout keyboard-layout)))) + (simple-service 'mtp udev-service-type (list libmtp)) + (udev-rules-service 'pipewire-add-udev-rules pipewire) + (udev-rules-service 'brightnessctl-udev-rules brightnessctl) - ;; This is the default list of services we - ;; are appending to. - - (modify-services %desktop-services - (guix-service-type config => (guix-configuration - (inherit config) - (substitute-urls - (append (list "https://substitutes.nonguix.org") - %default-substitute-urls)) - (authorized-keys - (append (list (plain-file "nonguix.pub" "(public-key (ecc (curve Ed25519) (q #C1FD53E5D4CE971933EC50C9F307AE2171A2D3B52C804642A7A35F84F3A4EA98#)))")) - %default-authorized-guix-keys))))))) + (service nix-service-type) + + (service thermald-service-type) + (service tlp-service-type + (tlp-configuration + (cpu-boost-on-ac? #t) + (wifi-pwr-on-bat? #t))) + + (service screen-locker-service-type + (screen-locker-configuration + (name "swaylock") + (program (file-append 'swaylock-effects "/home/chris/.guix-home/profile/bin/swaylock")) + (allow-empty-password? #f) + (using-pam? #t) + (using-setuid? #f))) + + (set-xorg-configuration + (xorg-configuration (keyboard-layout keyboard-layout))) + + (service console-font-service-type + (map (lambda (tty) + ;; Use a larger font for HIDPI screens + (cons tty (file-append + font-terminus + "/share/consolefonts/ter-132n"))) + '("tty1" "tty2" "tty3" "tty4" "tty5" "tty6"))) + + (service greetd-service-type + (greetd-configuration + (greeter-supplementary-groups + (list "input" "video")) + (terminals + (list + (greetd-terminal-configuration + (terminal-vt "1") + (terminal-switch #t) + (default-session-command + (greetd-agreety-session + (command + (file-append dbus "/bin/dbus-run-session")) + (command-args (list "Hyprland"))))) + (greetd-terminal-configuration (terminal-vt "2")) + (greetd-terminal-configuration (terminal-vt "3")) + (greetd-terminal-configuration (terminal-vt "4")) + (greetd-terminal-configuration (terminal-vt "5")) + (greetd-terminal-configuration (terminal-vt "6")))))) + + ;; NetworkManager and its applet. + (service network-manager-service-type) + (service wpa-supplicant-service-type) ;needed by NetworkManager + (simple-service 'network-manager-applet + profile-service-type + (list network-manager-applet)) + (service modem-manager-service-type) + (service usb-modeswitch-service-type) + (service bluetooth-service-type + (bluetooth-configuration + (auto-enable? #t))) + + ;; The D-Bus clique. + polkit-wheel-service + (service avahi-service-type) + (service udisks-service-type) + (service upower-service-type) + ;; (service accountsservice-service-type) + (service cups-pk-helper-service-type) + (service colord-service-type) + (service geoclue-service-type) + (service polkit-service-type) + (service elogind-service-type) + (service dbus-root-service-type) + + (service ntp-service-type) + + (service x11-socket-directory-service-type)) + + my-desktop-services)) (bootloader (bootloader-configuration - (bootloader grub-efi-bootloader) - (targets (list "/boot/efi")) - (keyboard-layout keyboard-layout))) + (bootloader grub-efi-bootloader) + (targets (list "/boot/efi")) + (keyboard-layout keyboard-layout))) ;; The list of file systems that get "mounted". The unique ;; file system identifiers there ("UUIDs") can be obtained diff --git a/scripts/emacslof b/scripts/emacslof index 9c58e25..cc7a82c 100755 --- a/scripts/emacslof +++ b/scripts/emacslof @@ -1,5 +1,7 @@ #!/bin/sh +hyprctl dispatch focuswindow emacs + # Check to see if an emacsclient is running if [ $(pgrep -c emacsclient) -gt 0 ]; then echo hi @@ -22,13 +24,13 @@ if [ $(pgrep -c emacsclient) -gt 0 ]; then exit else echo WAYLAND - emacsrg=$(wlrctl window list | rg "emacs:" | rg -v dired) + emacsrg=$(hyprctl clients | rg "emacs:" | rg -v dired) echo $emacsrg emacswin=$(echo $emacsrg | sed 's/.*\: //') echo $emacswin - exec wlrctl toplevel focus title:"$emacswin" + exec hyprctl dispatch focuswindow emacs exit fi fi diff --git a/scripts/fflof b/scripts/fflof index f98ff91..b1c1224 100755 --- a/scripts/fflof +++ b/scripts/fflof @@ -25,12 +25,12 @@ if [ $(pgrep -c firefox) -gt 0 ]; then exit else # WAYLAND - ffrg=$(wlrctl window list | rg firefox) + ffrg=$(hyprctl clients | rg firefox) ffwin=$(echo $ffrg | sed 's/.*\: //') # echo $ffwin - exec wlrctl toplevel focus firefox + exec hyprctl dispatch focuswindow firefox exit fi fi diff --git a/scripts/rbw.sh b/scripts/rbw.sh new file mode 100755 index 0000000..39573c6 --- /dev/null +++ b/scripts/rbw.sh @@ -0,0 +1,71 @@ +#!/usr/bin/env bash +# Very basic interface for rbw using rofi + +if [ $(hostname) = "syl" ]; then + style="laptop-rbw-wayland" + #echo "this is hidpi" +else + style="desktop-rbw" + #echo "this is not hidpi" +fi + +# Get all password files and create an array +root=~/.password-store +CACHE=~/.local/tmp/pass_rofi +seat=seat0 + +rbw sync +rbw list + +list_passwords() { + rbw list +} + +passwords=$(rbw list) + +prompt='search for passwords...' +SECRET=$(list_passwords | rofi -sync -i -p="${prompt}" -dmenu -theme ~/.config/rofi/launchers-git/$style.rasi) + +# Ask whether pass, user or both are required + +options=("Password" \ + "User" \ + "User and password" \ + "QR-Code" \ + "OTP") + +option=$(printf '%s\n' "${options[@]%}" | rofi -sync -i -dmenu -width 400 -lines 4 -prompt="..." -theme ~/.config/rofi/launchers-git/$style.rasi) + +echo $option + +case ${option} in + Password ) + echo "${SECRET}" + wtype $(rbw get "${SECRET}") + ;; + User ) + wtype $(rbw get --full "${SECRET}" | rg Username: | awk '{$1 = ""; print $0}') + ;; + "User and password" ) + wtype $(rbw get --full "${SECRET}" | rg Username: | awk '{$1 = ""; print $0}') + wtype -P tab + wtype $(rbw get "${SECRET}") + ;; + "QR-Code" ) + if [[ $SECRET =~ wifi$ ]]; then + # Produce a valid wifi QR-code + WIFISSID=$(pass get_user ${SECRET}) + WIFIPASS=$(pass get_pass ${SECRET}) + WIFIQR="WIFI:T:WPA;S:${WIFISSID};P:${WIFIPASS};;" + qrencode -s 8 -o - $WIFIQR | feh --title "pass: QR-WIFI" - + else + # Only password + pass show -q1 ${SECRET} + fi + ;; + "OTP" ) + wtype $(rbw code "${SECRET}") + ;; +esac + +# wl-copy -o -s ${seat} ${PASSWD_PASS} diff --git a/scripts/startup.sh b/scripts/startup.sh index 50ab96f..ecdea6c 100755 --- a/scripts/startup.sh +++ b/scripts/startup.sh @@ -1,5 +1,6 @@ #!/bin/sh +waybar & kwalletd5 & systemctl --user stop jellyfin-mpv-shim.service & systemctl --user stop nextcloud-client.service & @@ -12,9 +13,3 @@ rbw-agent & emacs --daemon & nextcloud --background & batmon & - -killall eww - -eww open bar0 & -eww open notifications & -eww open sidebar & diff --git a/scripts/wb-toggle b/scripts/wb-toggle new file mode 100755 index 0000000..a413253 --- /dev/null +++ b/scripts/wb-toggle @@ -0,0 +1,10 @@ +#!/bin/sh + +if [ $(pgrep -c waybar) -gt 0 ]; then + echo "killing" + kill $(pgrep waybar) +else + echo "starting" + waybar & +fi +