diff options
author | Hydrogen <hydrogen@h2.gay> | 2025-03-26 19:04:55 +0000 |
---|---|---|
committer | Hydrogen <hydrogen@h2.gay> | 2025-03-26 19:04:55 +0000 |
commit | e53bad7fe05585c1a7410a36629b534b33c3cd30 (patch) | |
tree | 683b72302d618ef97928e31f03ddaa20ba61b67b |
Add my configs from Lambda
-rw-r--r-- | .bash_aliases | 4 | ||||
-rw-r--r-- | .bashrc | 118 | ||||
-rw-r--r-- | .config/alacritty/alacritty.toml | 941 | ||||
-rw-r--r-- | .config/doom/config.el | 133 | ||||
-rw-r--r-- | .config/doom/custom.el | 21 | ||||
-rw-r--r-- | .config/doom/init.el | 195 | ||||
-rw-r--r-- | .config/doom/packages.el | 51 | ||||
-rw-r--r-- | .config/i3/config | 134 | ||||
-rwxr-xr-x | .config/i3/polybar.sh | 10 | ||||
-rw-r--r-- | .config/picom/picom.conf | 319 | ||||
-rw-r--r-- | .config/polybar/config.ini | 218 | ||||
-rw-r--r-- | .config/rofi/config.rasi | 15 | ||||
-rw-r--r-- | .config/rofi/simple-tokyonight.rasi | 115 | ||||
-rwxr-xr-x | .local/bin/rofi-power | 280 | ||||
-rw-r--r-- | .mpd/mpd.conf | 426 |
15 files changed, 2980 insertions, 0 deletions
diff --git a/.bash_aliases b/.bash_aliases new file mode 100644 index 0000000..cb4785d --- /dev/null +++ b/.bash_aliases @@ -0,0 +1,4 @@ +# -*- mode: sh -*- +alias cg="git --git-dir=$HOME/.config.git/ --work-tree=$HOME" \ + userctl="systemctl --user " \ + e="emacsclient --alternate-editor= --create-frame " @@ -0,0 +1,118 @@ +# ~/.bashrc: executed by bash(1) for non-login shells. +# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) +# for examples + +# If not running interactively, don't do anything +case $- in + *i*) ;; + *) return;; +esac + +# don't put duplicate lines or lines starting with space in the history. +# See bash(1) for more options +HISTCONTROL=ignoreboth + +# append to the history file, don't overwrite it +shopt -s histappend + +# for setting history length see HISTSIZE and HISTFILESIZE in bash(1) +HISTSIZE=1000 +HISTFILESIZE=2000 + +# check the window size after each command and, if necessary, +# update the values of LINES and COLUMNS. +shopt -s checkwinsize + +# If set, the pattern "**" used in a pathname expansion context will +# match all files and zero or more directories and subdirectories. +#shopt -s globstar + +# make less more friendly for non-text input files, see lesspipe(1) +#[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)" + +# set variable identifying the chroot you work in (used in the prompt below) +if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then + debian_chroot=$(cat /etc/debian_chroot) +fi + +# set a fancy prompt (non-color, unless we know we "want" color) +case "$TERM" in + xterm-color|*-256color) color_prompt=yes;; +esac + +# uncomment for a colored prompt, if the terminal has the capability; turned +# off by default to not distract the user: the focus in a terminal window +# should be on the output of commands, not on the prompt +#force_color_prompt=yes + +if [ -n "$force_color_prompt" ]; then + if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then + # We have color support; assume it's compliant with Ecma-48 + # (ISO/IEC-6429). (Lack of such support is extremely rare, and such + # a case would tend to support setf rather than setaf.) + color_prompt=yes + else + color_prompt= + fi +fi + +#if [ "$color_prompt" = yes ]; then +# PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ ' +#else +# PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ ' +#fi +#unset color_prompt force_color_prompt + +# If this is an xterm set the title to user@host:dir +case "$TERM" in +xterm*|rxvt*) + PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1" + ;; +*) + ;; +esac + +# enable color support of ls and also add handy aliases +if [ -x /usr/bin/dircolors ]; then + test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)" + alias ls='ls --color=auto' + #alias dir='dir --color=auto' + #alias vdir='vdir --color=auto' + + #alias grep='grep --color=auto' + #alias fgrep='fgrep --color=auto' + #alias egrep='egrep --color=auto' +fi + +# colored GCC warnings and errors +#export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01' + +# Alias definitions. +# You may want to put all your additions into a separate file like +# ~/.bash_aliases, instead of adding them here directly. +# See /usr/share/doc/bash-doc/examples in the bash-doc package. + +if [ -f ~/.bash_aliases ]; then + . ~/.bash_aliases +fi + +# enable programmable completion features (you don't need to enable +# this, if it's already enabled in /etc/bash.bashrc and /etc/profile +# sources /etc/bash.bashrc). +if ! shopt -oq posix; then + if [ -f /usr/share/bash-completion/bash_completion ]; then + . /usr/share/bash-completion/bash_completion + elif [ -f /etc/bash_completion ]; then + . /etc/bash_completion + fi +fi + +export PATH="$PATH:/home/hydrogen/.local/bin:/home/hydrogen/qmk-work/venv/bin:/home/hydrogen/.config/emacs/bin" +export PS1="\[\033[01;32m\]\h\[\033[00m\] \[\033[01;34m\]\w\[\033[00m\] \$ " +export GTK_IM_MODULE='uim' +export QT_IM_MODULE='uim' +export XMODIFIERS='@im=uim' + +#THIS MUST BE AT THE END OF THE FILE FOR SDKMAN TO WORK!!! +export SDKMAN_DIR="$HOME/.sdkman" +[[ -s "$HOME/.sdkman/bin/sdkman-init.sh" ]] && source "$HOME/.sdkman/bin/sdkman-init.sh" diff --git a/.config/alacritty/alacritty.toml b/.config/alacritty/alacritty.toml new file mode 100644 index 0000000..32c0811 --- /dev/null +++ b/.config/alacritty/alacritty.toml @@ -0,0 +1,941 @@ + +# ipc_socket = true | false # (unix only) +# Offer IPC using alacritty msg +# Default: true + +# ipc_socket = true + + +# SHELL +# shell = "<string>" | { program = "<string>", args = ["<string>",] } +# You can set shell.program to the path of your favorite shell, e.g. /bin/zsh. Entries in shell.args are passed as arguments to the shell. +# Default: + +# Linux/BSD/macOS: $SHELL or the user's login shell. +# Windows: "powershell" + +# working_directory = "<string>" | "None" +# Directory the shell is started in. When this is unset, or "None", the working directory of the parent process will be used. +# Default: "None" + +# Example: + +# [shell] +# program = "/bin/zsh" +# args = ["-l"] + +[terminal.shell] +program = "/usr/bin/bash" +args = ["-l"] + + +# ENV +# All key-value pairs in the [env] section will be added as environment variables for any process spawned by Alacritty, including its shell. Some entries may override variables set by alacritty itself. +# Example: + +# [env] +# WINIT_X11_SCALE_FACTOR = "1.0" + +# [env] + + +# WINDOW +# This section documents the [window] table of the configuration file. + +# dimensions = { columns = <integer>, lines = <integer> } +# Window dimensions (changes require restart). +# Number of lines/columns (not pixels) in the terminal. Both lines and columns must be non-zero for this to take effect. The number of columns must be at least 2, while using a value of 0 for columns and lines will fall back to the window manager's recommended size +# Default: { column = 0, lines = 0 } + +# position = "None" | { x = <integer>, y = <integer> } +# Window startup position. +# Specified in number of pixels. +# If the position is "None", the window manager will handle placement. +# Default: "None" + +# padding = { x = 3, y = 3 } +# Blank space added around the window in pixels. This padding is scaled by DPI and the specified value is always added at both opposing sides. +# Default: { x = 0, y = 0 } + +# dynamic_padding = true | false +# Spread additional padding evenly around the terminal content. +# Default: false + +# Window decorations. +# decorations = "Full" | "None" | "Transparent" | "Buttonless" + +# Full +# Borders and title bar. + +# None +# Neither borders nor title bar. + +# Transparent (macOS only) +# Title bar, transparent background and title bar buttons. + +# Buttonless (macOS only) +# Title bar, transparent background and no title bar buttons. + +# Default: "Full" + +# Background opacity (works on macOS & KDE Wayland only) +# opacity = <float> +# Background opacity as a floating point number from 0.0 to 1.0. The value 0.0 is completely transparent and 1.0 is opaque. +# Default: 1.0 + +# Request compositor to blur content behind transparent windows (works on macOS & KDE Wayland only). +# Default: false +# blur = true | false + +# Startup mode (changes require restart) +# startup_mode = "Windowed" | "Maximized" | "Fullscreen" | "SimpleFullscreen" + +# Windowed +# Regular window. + +# Maximized +# The window will be maximized on startup. + +# Fullscreen +# The window will be fullscreened on startup. + +# SimpleFullscreen (macOS only) +# Same as Fullscreen, but you can stack windows on top. + +# Default: "Windowed" + +# Window title. +# title = "<string>" +# Default: "Alacritty" + +# dynamic_title = true | false +# Allow terminal applications to change Alacritty's window title. +# Default: true + +# Window class. +# class = { instance = "<string>", general = "<string>" } # (Linux/BSD only) +# On Wayland, general is used as app_id and instance is ignored. +# Default: { instance = "Alacritty", general = "Alacritty" } + +# Override the variant of the System theme/GTK theme/Wayland client side decorations. Set this to "None" to use the system's default theme variant. +# decorations_theme_variant = "Dark" | "Light" | "None" +# Default: "None" + +# resize_increments = true | false +# Prefer resizing window by discrete steps equal to cell dimensions. +# Default: false + +# option_as_alt = "OnlyLeft" | "OnlyRight" | "Both" | "None" # (macos only) +# Make Option key behave as Alt. +# Default: "None" + +# Example: + +# [window] +# padding = { x = 3, y = 3 } +# dynamic_padding = true +# opacity = 0.9 + +[window] +startup_mode = "Windowed" +title = "Alacritty" +dynamic_title = true +decorations_theme_variant = "None" +decorations = "Full" +opacity = 0.85 +blur = true +padding = { x = 3, y = 3 } + + +# SCROLLING +# This section documents the [scrolling] table of the configuration file. +# history = <integer> +# Maximum number of lines in the scrollback buffer. +# Specifying 0 will disable scrolling. +# Limited to 100000. +# Default: 10000 + +# multiplier = <integer> +# Number of line scrolled for every input scroll increment. +# Default: 3 + +[scrolling] +history = 10000 +multiplier = 3 + + +# FONT +# This section documents the [font] table of the configuration file. +# normal = { family = "<string>", style = "<string>" } + +# Default: +# Linux/BSD: { family = "monospace", style = "Regular" } +# Windows: { family = "Consolas", style = "Regular" } +# macOS: { family = "Menlo", style = "Regular" } + +# bold = { family = "<string>", style = "<string>" } +# If the family is not specified, it will fall back to the value specified for the normal font. +# Default: { style = "Bold" } + +# italic = { family = "<string>", style = "<string>" } +# If the family is not specified, it will fall back to the value specified for the normal font. +# Default: { style = "Italic" } + +# bold_italic = { family = "<string>", style = "<string>" } +# If the family is not specified, it will fall back to the value specified for the normal font. +# Default: { style = "Bold Italic" } + +# size = <float> +# Font size in points. +# Default: 11.25 + +# offset = { x = <integer>, y = <integer> } +# Offset is the extra space around each character. The 'y' can be thought of as modifying the line spacing, and 'x' as modifying the letter spacing. +# Default: { x = 0, y = 0 } + +# glyph_offset = { x = <integer>, y = <integer> } +# Glyph offset determines the locations of the glyphs within their cells with the default being at the bottom. Increasing x moves the glyph to the right, increasing y moves the glyph upward. + +# builtin_box_drawing = true | false +# When true, Alacritty will use a custom built-in font for box drawing characters (Unicode points U+2500 - U+259F) and powerline symbols (Unicode points U+E0B0 - U+E0B3). +# Default: true + +[font] +normal = { family = "Hack Nerd Font", style = "Regular" } +size = 9 +builtin_box_drawing = true + +# COLORS +# This section documents the [colors] table of the configuration file. +# Colors are specified using their hexadecimal values with a # prefix: #RRGGBB. + +# colors primary +# This section documents the [colors.primary] table of the configuration file. + +[colors] +#foreground = "#f0f0f0" +#background = "#181818" +#dim_foreground = "#828482" +#bright_foreground = "None" +#cursor = { text = "CellBackground", cursor = "CellForeground" } + +# foreground = "<string>" +# Default: "#d8d8d8" + +# background = "<string>" +# Default: "#181818" + +# dim_foreground = "<string>" +# If this is not set, the color is automatically calculated based on the foreground color. +# Default: "#828482" + +# bright_foreground = "<string>" +# This color is only used when draw_bold_text_with_bright_colors is true. +# If this is not set, the normal foreground will be used. +# Default: "None" + +# cursor = { text = "<string>", cursor = "<string>" } +# Colors which should be used to draw the terminal cursor. +# Allowed values are hexadecimal colors like #ff00ff, or CellForeground/CellBackground, which references the affected cell. +# Default: { text = "CellBackground", cursor = "CellForeground" } + +# vi_mode_cursor = { text = "<string>", cursor = "<string>" } +# Colors for the cursor when the vi mode is active. +# Allowed values are hexadecimal colors like #ff00ff, or CellForeground/CellBackground, which references the affected cell. +# Default: { text = "CellBackground", cursor = "CellForeground" } + + +# colors search +# This section documents the [colors.search] table of the configuration. +# Allowed values are hexadecimal colors like #ff00ff, or CellForeground/CellBackground, which references the affected cell. + +[colors.search] +matches = { foreground = "#ff1818", background = "#ac4242" } +focused_match = { foreground = "#ff1818", background = "#f4bf75" } + +# matches = { foreground = "<string>", background = "<string>" } +# Default: { foreground = "#181818", background = "#ac4242" } + +# focused_match = { foreground = "<string>", background = "<string>" } +# Default: { foreground = "#181818", background = "#f4bf75" } + +# indexed_colors = [{ index = <integer>, color = "<string>" },] +# The indexed colors include all colors from 16 to 256. When these are not set, they're filled with sensible defaults. +# Default: [] + +# transparent_background_colors = true | false +# Whether or not window.opacity applies to all cell backgrounds, or only to the default background. When set to true all cells will be transparent regardless of their background color. +# Default: false + +# draw_bold_text_with_bright_colors = true | false +# When true, bold text is drawn using the bright color variants. +# Default: false + +# colors hints +# This section documents the [colors.hints] table of the configuration. + +[colors.hints] +start = { foreground = "#181818", background = "#f4bf75" } +end = { foreground = "#181818", background = "#ac4242" } + +# start = { foreground = "<string>", background = "<string>" } +# First character in the hint label. +# Allowed values are hexadecimal colors like #ff00ff, or CellForeground/CellBackground, which references the affected cell. +# Default: { foreground = "#181818", background = "#f4bf75" } + +# end = { foreground = "<string>", background = "<string>" } +# All characters after the first one in the hint label. +# Allowed values are hexadecimal colors like #ff00ff, or CellForeground/CellBackground, which references the affected cell. +# Default: { foreground = "#181818", background = "#ac4242" } + +# line_indicator = { foreground = "<string>", background = "<string>" } +# Color used for the indicator displaying the position in history during search and vi mode. +# Setting this to "None" will use the opposing primary color. +# Default: { foreground = "None", background = "None" } + +# footer_bar = { foreground = "<string>", background = "<string>" } +# Color used for the footer bar on the bottom, used by search regex input, hyperlink URI preview, etc. +# Default: { foreground = "#181818", background = "#d8d8d8" } + +# selection = { text = "<string>", background = "<string>" } +# Colors used for drawing selections. +# Allowed values are hexadecimal colors like #ff00ff, or CellForeground/CellBackground, which references the affected cell. +# Default: { text = "CellBackground", background = "CellForeground" } + +# normal +# This section documents the [colors.normal] table of the configuration. +# Defaults from Alacritty.org used. + +[colors.normal] +black = "#181818" +red = "#ac4242" +green = "#90a959" +yellow = "#f4bf75" +blue = "#6a9fb5" +magenta = "#aa759f" +cyan = "#75b5aa" +white = "#d8d8d8" + +# bright +# This section documents the [colors.bright] table of the configuration. +# Defaults from Alacritty.org used. + +[colors.bright] +black = "#6b6b6b" +red = "#c55555" +green = "#aac474" +yellow = "#feca88" +blue = "#82b8c8" +magenta = "#c28cb8" +cyan = "#93d3c3" +white = "#f8f8f8" + + +# dim +# This section documents the [colors.dim] table of the configuration. +# If the dim colors are not set, they will be calculated automatically based on the normal colors. + + +[colors.dim] +black = "#0f0f0f" +red = "#712b2b" +green = "#5f6f3a" +yellow = "#a17e4d" +blue = "#456877" +magenta = "#704d68" +cyan = "#4d7770" +white = "#8e8e8e" + + +# BELL +# This section documents the [bell] table of the configuration file. + +# animation = "Ease" | "EaseOut" | "EaseOutSine" | "EaseOutQuad" | "EaseOutCubic" | "EaseOutQuart" | "EaseOutQuint" | "EaseOutExpo" | "EaseOutCirc" | "Linear" +# Visual bell animation effect for flashing the screen when the visual bell is rung. +# Default: "Linear" + +# duration = <integer> +# Duration of the visual bell flash in milliseconds. A `duration` of `0` will disable the visual bell animation. +# Default: 0 + +# color = "<string>" +# Visual bell animation color. +# Default: "#ffffff" + +# command = "<string>" | { program = "<string>", args = ["<string>",] } +# This program is executed whenever the bell is rung. +# When set to "None", no command will be executed. +# Default: "None" + +[bell] +animation = "Linear" +duration = 0 +#color = "#ffffff" +#command = "None" + + +# SELECTION +# This section documents the [selection] table of the configuration file. +# semantic_escape_chars = "<string>" +# This string contains all characters that are used as separators for "semantic words" in Alacritty. + +# Default: ",│`|:\"' ()[]{}<>\t" + +# save_to_clipboard = true | false +# When set to true, selected text will be copied to the primary clipboard. +# Default: false + +[selection] +semantic_escape_chars = ",│`|:\"' ()[]{}<>\t" +save_to_clipboard = false + + +# CURSOR +# This section documents the [cursor] table of the configuration file. + +# style = { <shape>, <blinking> } + +# shape = "Block" | "Underline" | "Beam" +# Default: "Block" + +# blinking = "Never" | "Off" | "On" | "Always" +# Never - Prevent the cursor from ever blinking +# Off - Disable blinking by default +# On - Enable blinking by default +# Always -Force the cursor to always blink +# Default: "Off" + +# vi_mode_style = { <shape>, <blinking> } | "None" +# If the vi mode cursor style is "None" or not specified, it will fall back to the active value of the normal cursor. +# Default: "None" + +# blink_interval = <integer> +# Cursor blinking interval in milliseconds. +# Default: 750 + +# blink_timeout = <integer> +# Time after which cursor stops blinking, in seconds. +# Specifying 0 will disable timeout for blinking. +# Default: 5 + +# unfocused_hollow = true | false +# When this is true, the cursor will be rendered as a hollow box when the window is not focused. +# Default: true +# thickness = <float> +# Thickness of the cursor relative to the cell width as floating point number from 0.0 to 1.0. +# Default: 0.15 + +[cursor] +style = { shape = "Block", blinking = "On" } +unfocused_hollow = true +thickness = 0.2 + + +# TERMINAL +# This section documents the [terminal] table of the configuration file. +# osc52 = "Disabled" | "OnlyCopy" | "OnlyPaste" | "CopyPaste" +# Controls the ability to write to the system clipboard with the OSC 52 escape sequence. While this escape sequence is useful to copy contents from the remote server, allowing any application to read from the clipboard can be easily abused while not providing significant benefits over explicitly pasting text. +# Default: "OnlyCopy" + +#[terminal] + + +# MOUSE +# This section documents the [mouse] table of the configuration file. +# hide_when_typing = true | false +# When this is true, the cursor is temporarily hidden when typing. +# Default: false + +# bindings = [{ <mouse>, <mods>, <mode>, <action> | <chars> },] +# See keyboard.bindings for full documentation on mods, mode, action, and chars. + +# When an application running within Alacritty captures the mouse, the `Shift` modifier can be used to suppress mouse reporting. If no action is found for the event, actions for the event without the `Shift` modifier are triggered instead. +# mouse = "Middle" | "Left" | "Right" | "Back" | "Forward" | <integer> +# Mouse button which needs to be pressed to trigger this binding. +# action = <keyboard.bindings.action> | "ExpandSelection" + +# ExpandSelection +# Expand the selection to the current mouse cursor location. +# Example: + +# [mouse] +# bindings = [ +# { mouse = "Right", mods = "Control", action = "Paste" }, +# ] + +[mouse] +hide_when_typing = false + +[general] + +# live_config_reload = true | false +# Live config reload (changes require restart) +# Default: true + +live_config_reload = true +# Alacritty - TOML configuration file format. + +# DESCRIPTION +# An example configuration file for Alacritty preconfigured with default values. + +# SYNTAX +# Alacritty's configuration file uses the TOML format. +# The format's specification can be found at https://toml.io/en/v1.0.0. + +# GENERAL + +# import = ["<string>",] + +# Import additional configuration files. +# Imports are loaded in order, skipping all missing files, with the importing file being loaded last. If a field is already present in a previous import, it will be replaced. +# All imports must either be absolute paths starting with /, or paths relative to the user's home directory starting with ~/. + +# Example: + +# import = [ +# "~/.config/alacritty/base16-dark.toml", +# "~/.config/alacritty/keybindings.toml", +# ] + +import = [] + +[terminal] + + +# HINTS +# This section documents the [hints] table of the configuration file. +# Terminal hints can be used to find text or hyperlinks in the visible part of the terminal and pipe it to other applications. + +# alphabet = "<string>" +# Keys used for the hint labels. +# Default: "jfkdls;ahgurieowpq" + +# enabled = [{ <regex>, <hyperlinks>, <post_processing>, <persist>, <action>, <command> <binding>, <mouse> },] +# Array with all available hints. +# Each hint must have at least one of regex or hyperlinks and either an action or a command. + +# regex = "<string>" +# Regex each line will be compared against. + +# hyperlinks = true | false +# When this is true, all OSC 8 escape sequence hyperlinks will be included in the hints. + +# post_processing = true | false +# When this is true, heuristics will be used to shorten the match if there are characters likely not to be part of the hint (e.g. a trailing .). This is most useful for URIs and applies only to regex matches. + +# persist = true | false +# When this is true, hints remain persistent after selection. + +# action = "Copy" | "Paste" | "Select" | "MoveViModeCursor" +# Copy +# Copy the hint's text to the clipboard. + +# Paste +# Paste the hint's text to the terminal or search. + +# Select +# Select the hint's text. + +# MoveViModeCursor +# Move the vi mode cursor to the beginning of the hint. + +# command = "<string>" | { program = "<string>", args = ["<string>",] } +# Command which will be executed when the hint is clicked or selected with the binding. +# The hint's text is always attached as the last argument. + +# binding = { key = "<string>", mods = "<string>", mode = "<string>" } +# See keyboard.bindings for documentation on available values. +# This controls which key binding is used to start the keyboard hint selection process. + +# mouse = { mods = "<string>", enabled = true | false } +# See keyboard.bindings for documentation on available mods. +# The enabled field controls if the hint should be underlined when hovering over the hint text with all mods pressed. + +# Default: + +# [[hints.enabled]] +# command = "xdg-open" # On Linux/BSD +# # command = "open" # On macOS +# # command = { program = "cmd", args = [ "/c", "start", "" ] } # On Windows +# hyperlinks = true +# post_processing = true +# persist = false +# mouse.enabled = true +# binding = { key = "U", mods = "Control|Shift" } +# regex = "(ipfs:|ipns:|magnet:|mailto:|gemini://|gopher://|https://|http://|news:|file:|git://|ssh:|ftp://)[^\u0000-\u001F\u007F-\u009F<>\"\\s{-}\\^⟨⟩`]+" + +#[hints] + +# KEYBOARD +# This section documents the [keyboard] table of the configuration file. + +# bindings = [{ <key>, <mods>, <mode>, <action> | <chars> },] + +# To unset a default binding, you can use the action "ReceiveChar" to remove it or "None" to inhibit any action. +# Multiple keybindings can be triggered by a single key press and will be executed in the order they are defined in. + +# key = "<string>" + +# The regular keys like "A", "0", and "Я" can be mapped directly without any special syntax. Full list of named keys like "F1" and the syntax for dead keys can be found here: + + # https://docs.rs/winit/latest/winit/keyboard/enum.NamedKey.html + # https://docs.rs/winit/latest/winit/keyboard/enum.Key.html#variant.Dead + +# Numpad keys are prefixed by Numpad: "NumpadEnter" | "NumpadAdd" | "NumpadComma" | "NumpadDivide" | "NumpadEquals" | "NumpadSubtract" | "NumpadMultiply" | "Numpad[0-9]". +# The key field also supports using scancodes, which are specified as a decimal number. + +# mods = "Command" | "Control" | "Option" | "Super" | "Shift" | "Alt" +# Multiple modifiers can be combined using |, like this: "Control | Shift". + +# mode = "AppCursor" | "AppKeypad" | "Search" | "Alt" | "Vi" +# This defines a terminal mode which must be active for this binding to have an effect. +# Prepending ~ to a mode will require the mode to not = be active for the binding to take effect. +# Multiple modes can be combined using |, like this: "~Vi|Search". + +# chars = "<string>" +# Writes the specified string to the terminal. + +# LIST OF ACTIONS + +# format: +# action name +# description of action function + +# Expandable List: + + # None + # No action. + + # Paste + # Paste contents of system clipboard. + + # Copy + # Store current selection into clipboard. + + # ReceiveChar + # Allow receiving char input. + + # IncreaseFontSize + # Increase font size. + + # DecreaseFontSize + # Decrease font size. + + # ResetFontSize + # Reset font size to the config value. + + # ScrollPageUp + # Scroll exactly one page up. + + # ScrollPageDown + # Scroll exactly one page down. + + # ScrollHalfPageUp + # Scroll half a page up. + + # ScrollHalfPageDown + # Scroll half a page down. + + # ScrollLineUp + # Scroll one line up. + + # ScrollLineDown + # Scroll one line down. + + # ScrollToTop + # Scroll all the way to the top. + + # ScrollToBottom + # Scroll all the way to the bottom. + + # ClearHistory + # Clear the display buffer(s) to remove history. + + # Hide + # Hide the Alacritty window. + + # Minimize + # Minimize the Alacritty window. + + # Quit + # Quit Alacritty. + + # ClearLogNotice + # Clear warning and error notices. + + # SpawnNewInstance + # Spawn a new instance of Alacritty. + + # CreateNewWindow + # Create a new Alacritty window. + + # ToggleFullscreen + # Toggle fullscreen. + + # ToggleMaximized + # Toggle maximized. + + # ClearSelection + # Clear active selection. + + # ToggleViMode + # Toggle vi mode. + + # SearchForward + # Start a forward buffer search. + + # SearchBackward + # Start a backward buffer search. + +# + +# Vi mode actions +# Expandable List: + + # Up + # Move up. + + # Down + # Move down. + + # Left + # Move left. + + # Right + # Move right. + + # First + # First column, or beginning of the line when already at the first column. + + # Last + # Last column, or beginning of the line when already at the last column. + + # FirstOccupied + # First non-empty cell in this terminal row, or first non-empty cell of the line when already at the first cell of the row. + + # High + # Move to top of screen. + + # Middle + # Move to center of screen. + + # Low + # Move to bottom of screen. + + # SemanticLeft + # Move to start of semantically separated word. + + # SemanticRight + # Move to start of next semantically separated word. + + # SemanticLeftEnd + # Move to end of previous semantically separated word. + + # SemanticRightEnd + # Move to end of semantically separated word. + + # WordLeft + # Move to start of whitespace separated word. + + # WordRight + # Move to start of next whitespace separated word. + + # WordLeftEnd + # Move to end of previous whitespace separated word. + + # WordRightEnd + # Move to end of whitespace separated word. + + # Bracket + # Move to opposing bracket. + + # ToggleNormalSelection + # Toggle normal vi selection. + + # ToggleLineSelection + # Toggle line vi selection. + + # ToggleBlockSelection + # Toggle block vi selection. + + # ToggleSemanticSelection + # Toggle semantic vi selection. + + # SearchNext + # Jump to the beginning of the next match. + + # SearchPrevious + # Jump to the beginning of the previous match. + + # SearchStart + # Jump to the next start of a match to the left of the origin. + + # SearchEnd + # Jump to the next end of a match to the right of the origin. + + # Open + # Launch the URL below the vi mode cursor. + + # CenterAroundViCursor + # Centers the screen around the vi mode cursor. + + # InlineSearchForward + # Search forward within the current line. + + # InlineSearchBcakward + # Search backward within the current line. + + # InlineSearchForwardShort + # Search forward within the current line, stopping just short of the character. + + # InlineSearchBackwardShort + # Search backward within the current line, stopping just short of the character. + + # InlineSearchNext + # Jump to the next inline search match. + + # InlineSearchPrevious + # Jump to the previous inline search match. + + # Search actions: + # SearchFocusNext + + # Move the focus to the next search match. + # SearchFocusPrevious + + # Move the focus to the previous search match. + # SearchConfirm + + # Confirm the active search. + # SearchCancel + + # Cancel the active search. + # SearchClear + + # Reset the search regex. + # SearchDeleteWord + + # Delete the last word in the search regex. + # SearchHistoryPrevious + + # Go to the previous regex in the search history. + # SearchHistoryNext + + # Go to the next regex in the search history. + # macOS exclusive: + + # ToggleSimpleFullscreen + # Enter fullscreen without occupying another space. + + # HideOtherApplications + # Hide all windows other than Alacritty. + + # CreateNewTab + # Create new window in a tab. + + # SelectNextTab + # Select next tab. + + # SelectPreviousTab + # Select previous tab. + + # SelectTab1 + # Select the first tab. + + # SelectTab2 + # Select the second tab. + + # SelectTab3 + # Select the third tab. + + # SelectTab4 + # Select the fourth tab. + + # SelectTab5 + # Select the fifth tab. + + # SelectTab6 + # Select the sixth tab. + + # SelectTab7 + # Select the seventh tab. + + # SelectTab8 + # Select the eighth tab. + + # SelectTab9 + # Select the ninth tab. + + # SelectLastTab + # Select the last tab. + + # Linux/BSD exclusive: + # CopySelection + + # Copy from the selection buffer. + # PasteSelection + + # Paste from the selection buffer. + # Default: See alacritty-bindings(5) + + +# + +# Example: + +# [keyboard] +# bindings = [ +# { key = "N", mods = "Control|Shift", action = "CreateNewWindow" }, +# { key = "L", mods = "Control|Shift", chars = "l" }, +# ] + +#[keyboard] + + +# DEBUG +# This section documents the [debug] table of the configuration file. +# Debug options are meant to help troubleshoot issues with Alacritty. These can change or be removed entirely without warning, so their stability shouldn't be relied upon. + +# render_timer = true | false +# Display the time it takes to draw each frame. +# Default: false + +# persistent_logging = true | false +# Keep the log file after quitting Alacritty. +# Default: false +# log_level = "Off" | "Error" | "Warn" | "Info" | "Debug" | "Trace" +# Default: "Warn" + +# To add extra libraries to logging ALACRITTY_EXTRA_LOG_TARGETS variable can be used. +# Example: + +# ALACRITTY_EXTRA_LOG_TARGETS="winit;vte" alacritty -vvv + +# renderer = "glsl3" | "gles2" | "gles2_pure" | "None" +# Force use of a specific renderer, "None" will use the highest available one. +# Default: "None" + +# print_events = true | false +# Log all received window events. +# Default: false + +# highlight_damage = true | false +# Highlight window damage information. +# Default: false + +# prefer_egl = true | false +# Use EGL as display API if the current platform allows it. Note that transparency may not work with EGL on Linux/BSD. +# Default: false + +#[debug] + + +# SEE ALSO +# alacritty(1), alacritty-msg(1), alacritty-bindings(5) + +# BUGS +# Found a bug? Please report it at https://github.com/alacritty/alacritty/issues. + +# MAINTAINERS +# · Christian Duerr <contact@christianduerr.com> +# · Kirill Chibisov <contact@kchibisov.com> diff --git a/.config/doom/config.el b/.config/doom/config.el new file mode 100644 index 0000000..2a15960 --- /dev/null +++ b/.config/doom/config.el @@ -0,0 +1,133 @@ +;;; $DOOMDIR/config.el -*- lexical-binding: t; -*- + +;; Place your private configuration here! Remember, you do not need to run 'doom +;; sync' after modifying this file! + + +;; Some functionality uses this to identify you, e.g. GPG configuration, email +;; clients, file templates and snippets. It is optional. +;; (setq user-full-name "John Doe" +;; user-mail-address "john@doe.com") + +;; Doom exposes five (optional) variables for controlling fonts in Doom: +;; +;; - `doom-font' -- the primary font to use +;; - `doom-variable-pitch-font' -- a non-monospace font (where applicable) +;; - `doom-big-font' -- used for `doom-big-font-mode'; use this for +;; presentations or streaming. +;; - `doom-symbol-font' -- for symbols +;; - `doom-serif-font' -- for the `fixed-pitch-serif' face +;; +;; See 'C-h v doom-font' for documentation and more examples of what they +;; accept. For example: +;; +(setq doom-font (font-spec :family "Hack Nerd Font" :size 12)) ;:weight 'normal)) +(setq doom-variable-pitch-font (font-spec :family "VL ゴシック" :size 12)) +;(add-to-list 'default-frame-alist '(alpha-background . 100)) +;(add-to-list 'default-frame-alist '(font . "Hack")) +;(set-frame-parameter (selected-frame) 'font "Hack") +;(set-frame-parameter (selected-frame) 'alpha '(85 85)) +;(add-to-list 'default-frame-alist '(alpha 85 85)) +;; +;; If you or Emacs can't find your font, use 'M-x describe-font' to look them +;; up, `M-x eval-region' to execute elisp code, and 'M-x doom/reload-font' to +;; refresh your font settings. If Emacs still can't find your font, it likely +;; wasn't installed correctly. Font issues are rarely Doom issues! + +;; There are two ways to load a theme. Both assume the theme is installed and +;; available. You can either set `doom-theme' or manually load a theme with the +;; `load-theme' function. This is the default: +(setq doom-theme 'doom-one-light) + +;; This determines the style of line numbers in effect. If set to `nil', line +;; numbers are disabled. For relative line numbers, set this to `relative'. +(setq display-line-numbers-type t) + +;; If you use `org' and don't want your org files in the default location below, +;; change `org-directory'. It must be set before org loads! +(setq org-directory "~/org/") + +;; put autosaves in their place +(setq backup-directory "~/.config/emacs/.local/cache/autosave/") +(setq backup-directory-alist '(("." . "~/.config/emacs/.local/cache/autosave/")) + backup-by-copying t ; Don't delink hardlinks + version-control t ; Use version numbers on backups + delete-old-versions t ; Automatically delete excess backups + kept-new-versions 20 ; how many of the newest versions to keep + kept-old-versions 5) ; and how many of the old + +;; Whenever you reconfigure a package, make sure to wrap your config in an +;; `after!' block, otherwise Doom's defaults may override your settings. E.g. +;; +;; (after! PACKAGE +;; (setq x y)) +;; +;; The exceptions to this rule: +;; +;; - Setting file/directory variables (like `org-directory') +;; - Setting variables which explicitly tell you to set them before their +;; package is loaded (see 'C-h v VARIABLE' to look up their documentation). +;; - Setting doom variables (which start with 'doom-' or '+'). +;; +;; Here are some additional functions/macros that will help you configure Doom. +;; +;; - `load!' for loading external *.el files relative to this one +;; - `use-package!' for configuring packages +;; - `after!' for running code after a package has loaded +;; - `add-load-path!' for adding directories to the `load-path', relative to +;; this file. Emacs searches the `load-path' when you load packages with +;; `require' or `use-package'. +;; - `map!' for binding new keys +;; +;; To get information about any of these functions/macros, move the cursor over +;; the highlighted symbol at press 'K' (non-evil users must press 'C-c c k'). +;; This will open documentation for it, including demos of how they are used. +;; Alternatively, use `C-h o' to look up a symbol (functions, variables, faces, +;; etc). +;; +;; You can also try 'gd' (or 'C-c c d') to jump to their definition and see how +;; they are implemented. +(keymap-global-set "C-c C-c" 'treemacs-select-window) +(after! org + (setq org-hide-emphasis-markers t)) + +(require 'org-bullets) +(use-package org-bullets + :config + (add-hook 'org-mode-hook (lambda () (org-bullets-mode 1)))) + +(font-lock-add-keywords 'org-mode + '(("^ *\\([-]\\) " + (0 (prog1 () (compose-region (match-beginning 1) (match-end 1) "•")))))) + +;(let* (variable-tuple (:font "DejaVu Sans"))) +;(let* 'base-font-color (face-foreground 'default nil 'default)) +;(let* 'headline (font-spec :inherit default :weight bold :foreground ,base-font-color)) +;; +;(custom-theme-set-faces +; 'doom-one-light +; '(org-level-8 ((t (,@headline ,(:font "DejaVu Sans"))))) +; '(org-level-7 ((t (,@headline ,(:font "DejaVu Sans"))))) +; '(org-level-6 ((t (,@headline ,(:font "DejaVu Sans"))))) +; '(org-level-5 ((t (,@headline ,(:font "DejaVu Sans"))))) +; '(org-level-4 ((t (,@headline ,(:font "DejaVu Sans") :height 1.1)))) +; '(org-level-3 ((t (,@headline ,(:font "DejaVu Sans") :height 1.25)))) +; '(org-level-2 ((t (,@headline ,(:font "DejaVu Sans") :height 1.5)))) +; '(org-level-1 ((t (,@headline ,(:font "DejaVu Sans") :height 1.75)))) +; '(org-document-title ((t (,@headline ,@variable-tuple :height 2.0 :underline nil))))) + +(let* ((variable-tuple '(:family "Sans Serif")) + (base-font-color (face-foreground 'default nil 'default)) + (headline `(:inherit default :weight bold :foreground ,base-font-color))) + + (custom-theme-set-faces + 'user + `(org-level-8 ((t (,@headline ,@variable-tuple)))) + `(org-level-7 ((t (,@headline ,@variable-tuple)))) + `(org-level-6 ((t (,@headline ,@variable-tuple)))) + `(org-level-5 ((t (,@headline ,@variable-tuple)))) + `(org-level-4 ((t (,@headline ,@variable-tuple :height 1.1)))) + `(org-level-3 ((t (,@headline ,@variable-tuple :height 1.25)))) + `(org-level-2 ((t (,@headline ,@variable-tuple :height 1.5)))) + `(org-level-1 ((t (,@headline ,@variable-tuple :height 1.75)))) + `(org-document-title ((t (,@headline ,@variable-tuple :height 2.0 :underline nil)))))) diff --git a/.config/doom/custom.el b/.config/doom/custom.el new file mode 100644 index 0000000..71edceb --- /dev/null +++ b/.config/doom/custom.el @@ -0,0 +1,21 @@ +;;; custom.el -*- lexical-binding: t; -*- + +;(setq doom-theme 'doom-one-light) +; (setq default-input-method "japanese-mozc") +(custom-set-variables + ;; custom-set-variables was added by Custom. + ;; If you edit it by hand, you could mess it up, so be careful. + ;; Your init file should contain only one such instance. + ;; If there is more than one, they won't work right. + ;'(custom-enabled-themes '(doom-one-light)) + '(custom-safe-themes + '("5c7720c63b729140ed88cf35413f36c728ab7c70f8cd8422d9ee1cedeb618de5" default)) + '(package-selected-packages + '(git srv pfuture pandoc mozc lua-mode hydra ht fsm dired-hide-dotfiles cfrs + ace-window))) +(custom-set-faces + ;; custom-set-faces was added by Custom. + ;; If you edit it by hand, you could mess it up, so be careful. + ;; Your init file should contain only one such instance. + ;; If there is more than one, they won't work right. + ) diff --git a/.config/doom/init.el b/.config/doom/init.el new file mode 100644 index 0000000..045e7d3 --- /dev/null +++ b/.config/doom/init.el @@ -0,0 +1,195 @@ +;;; init.el -*- lexical-binding: t; -*- + +;; This file controls what Doom modules are enabled and what order they load +;; in. Remember to run 'doom sync' after modifying it! + +;; NOTE Press 'SPC h d h' (or 'C-h d h' for non-vim users) to access Doom's +;; documentation. There you'll find a link to Doom's Module Index where all +;; of our modules are listed, including what flags they support. + +;; NOTE Move your cursor over a module's name (or its flags) and press 'K' (or +;; 'C-c c k' for non-vim users) to view its documentation. This works on +;; flags as well (those symbols that start with a plus). +;; +;; Alternatively, press 'gd' (or 'C-c c d') on a module to browse its +;; directory (for easy access to its source code). + +(doom! :input + ;;bidi ; (tfel ot) thgir etirw uoy gnipleh + ;;chinese + japanese + ;;layout ; auie,ctsrnm is the superior home row + + :completion + company ; the ultimate code completion backend + ;;helm ; the *other* search engine for love and life + ;;ido ; the other *other* search engine... + ;;ivy ; a search engine for love and life + vertico ; the search engine of the future + + :ui + ;;deft ; notational velocity for Emacs + doom ; what makes DOOM look the way it does + ;;doom-dashboard ; a nifty splash screen for Emacs + ;;doom-quit ; DOOM quit-message prompts when you quit Emacs + ;;(emoji +unicode) ; 🙂 + hl-todo ; highlight TODO/FIXME/NOTE/DEPRECATED/HACK/REVIEW + ;;hydra + ;;indent-guides ; highlighted indent columns + ;;ligatures ; ligatures and symbols to make your code pretty again + ;;minimap ; show a map of the code on the side + modeline ; snazzy, Atom-inspired modeline, plus API + ;;nav-flash ; blink cursor line after big motions + ;;neotree ; a project drawer, like NERDTree for vim + ophints ; highlight the region an operation acts on + (popup +defaults) ; tame sudden yet inevitable temporary windows + ;;tabs ; a tab bar for Emacs + treemacs ; a project drawer, like neotree but cooler + ;;unicode ; extended unicode support for various languages + (vc-gutter +pretty) ; vcs diff in the fringe + vi-tilde-fringe ; fringe tildes to mark beyond EOB + ;;window-select ; visually switch windows + ;;workspaces ; tab emulation, persistence & separate workspaces + ;;zen ; distraction-free coding or writing + + :editor + ;;(evil +everywhere); come to the dark side, we have cookies + file-templates ; auto-snippets for empty files + fold ; (nigh) universal code folding + ;;(format +onsave) ; automated prettiness + ;;god ; run Emacs commands without modifier keys + ;;lispy ; vim for lisp, for people who don't like vim + ;;multiple-cursors ; editing in many places at once + ;;objed ; text object editing for the innocent + ;;parinfer ; turn lisp into python, sort of + ;;rotate-text ; cycle region at point between text candidates + snippets ; my elves. They type so I don't have to + ;;word-wrap ; soft wrapping with language-aware indent + + :emacs + dired ; making dired pretty [functional] + electric ; smarter, keyword-based electric-indent + ;;ibuffer ; interactive buffer management + undo ; persistent, smarter undo for your inevitable mistakes + vc ; version-control and Emacs, sitting in a tree + + :term + ;;eshell ; the elisp shell that works everywhere + ;;shell ; simple shell REPL for Emacs + ;;term ; basic terminal emulator for Emacs + vterm ; the best terminal emulation in Emacs + + :checkers + syntax ; tasing you for every semicolon you forget + ;;(spell +flyspell) ; tasing you for misspelling mispelling + ;;grammar ; tasing grammar mistake every you make + + :tools + ;;ansible + ;;biblio ; Writes a PhD for you (citation needed) + ;;collab ; buffers with friends + ;;debugger ; FIXME stepping through code, to help you add bugs + ;;direnv + ;;docker + ;;editorconfig ; let someone else argue about tabs vs spaces + ;;ein ; tame Jupyter notebooks with emacs + (eval +overlay) ; run code, run (also, repls) + ;;gist ; interacting with github gists + lookup ; navigate your code and its documentation + ;;lsp ; M-x vscode + magit ; a git porcelain for Emacs + ;;make ; run make tasks from Emacs + ;;pass ; password manager for nerds + ;;pdf ; pdf enhancements + ;;prodigy ; FIXME managing external services & code builders + ;;rgb ; creating color strings + ;;taskrunner ; taskrunner for all your projects + ;;terraform ; infrastructure as code + ;;tmux ; an API for interacting with tmux + ;;tree-sitter ; syntax and parsing, sitting in a tree... + ;;upload ; map local to remote projects via ssh/ftp + + :os + (:if IS-MAC macos) ; improve compatibility with macOS + ;;tty ; improve the terminal Emacs experience + + :lang + ;;agda ; types of types of types of types... + ;;beancount ; mind the GAAP + ;;(cc +lsp) ; C > C++ == 1 + ;;clojure ; java with a lisp + ;;common-lisp ; if you've seen one lisp, you've seen them all + ;;coq ; proofs-as-programs + ;;crystal ; ruby at the speed of c + ;;csharp ; unity, .NET, and mono shenanigans + ;;data ; config/data formats + ;;(dart +flutter) ; paint ui and not much else + ;;dhall + ;;elixir ; erlang done right + ;;elm ; care for a cup of TEA? + emacs-lisp ; drown in parentheses + ;;erlang ; an elegant language for a more civilized age + ;;ess ; emacs speaks statistics + ;;factor + ;;faust ; dsp, but you get to keep your soul + ;;fortran ; in FORTRAN, GOD is REAL (unless declared INTEGER) + ;;fsharp ; ML stands for Microsoft's Language + ;;fstar ; (dependent) types and (monadic) effects and Z3 + ;;gdscript ; the language you waited for + ;;(go +lsp) ; the hipster dialect + ;;(graphql +lsp) ; Give queries a REST + ;;(haskell +lsp) ; a language that's lazier than I am + ;;hy ; readability of scheme w/ speed of python + ;;idris ; a language you can depend on + ;;json ; At least it ain't XML + ;;(java +lsp) ; the poster child for carpal tunnel syndrome + ;;javascript ; all(hope(abandon(ye(who(enter(here)))))) + ;;julia ; a better, faster MATLAB + ;;kotlin ; a better, slicker Java(Script) + ;;latex ; writing papers in Emacs has never been so fun + ;;lean ; for folks with too much to prove + ;;ledger ; be audit you can be + ;;lua ; one-based indices? one-based indices + markdown ; writing docs for people to ignore + ;;nim ; python + lisp at the speed of c + ;;nix ; I hereby declare "nix geht mehr!" + ;;ocaml ; an objective camel + org ; organize your plain life in plain text + ;;php ; perl's insecure younger brother + ;;plantuml ; diagrams for confusing people more + ;;purescript ; javascript, but functional + python ; beautiful is better than ugly + ;;qt ; the 'cutest' gui framework ever + ;;racket ; a DSL for DSLs + ;;raku ; the artist formerly known as perl6 + ;;rest ; Emacs as a REST client + ;;rst ; ReST in peace + ;;(ruby +rails) ; 1.step {|i| p "Ruby is #{i.even? ? 'love' : 'life'}"} + ;;(rust +lsp) ; Fe2O3.unwrap().unwrap().unwrap().unwrap() + ;;scala ; java, but good + ;;(scheme +guile) ; a fully conniving family of lisps + sh ; she sells {ba,z,fi}sh shells on the C xor + ;;sml + ;;solidity ; do you need a blockchain? No. + ;;swift ; who asked for emoji variables? + ;;terra ; Earth and Moon in alignment for performance. + ;;web ; the tubes + ;;yaml ; JSON, but readable + ;;zig ; C, but simpler + + :email + ;;(mu4e +org +gmail) + ;;notmuch + ;;(wanderlust +gmail) + + :app + ;;calendar + ;;emms + ;;everywhere ; *leave* Emacs!? You must be joking + ;;irc ; how neckbeards socialize + ;;(rss +org) ; emacs as an RSS reader + ;;twitter ; twitter client https://twitter.com/vnought + + :config + ;;literate + (default +bindings +smartparens)) diff --git a/.config/doom/packages.el b/.config/doom/packages.el new file mode 100644 index 0000000..a4c8b61 --- /dev/null +++ b/.config/doom/packages.el @@ -0,0 +1,51 @@ +;; -*- no-byte-compile: t; -*- +;;; $DOOMDIR/packages.el + +;; To install a package with Doom you must declare them here and run 'doom sync' +;; on the command line, then restart Emacs for the changes to take effect -- or +;; use 'M-x doom/reload'. + + +;; To install SOME-PACKAGE from MELPA, ELPA or emacsmirror: +;; (package! some-package) +(package! org-bullets) + +;; To install a package directly from a remote git repo, you must specify a +;; `:recipe'. You'll find documentation on what `:recipe' accepts here: +;; https://github.com/radian-software/straight.el#the-recipe-format +;; (package! another-package +;; :recipe (:host github :repo "username/repo")) + +;; If the package you are trying to install does not contain a PACKAGENAME.el +;; file, or is located in a subdirectory of the repo, you'll need to specify +;; `:files' in the `:recipe': +;; (package! this-package +;; :recipe (:host github :repo "username/repo" +;; :files ("some-file.el" "src/lisp/*.el"))) + +;; If you'd like to disable a package included with Doom, you can do so here +;; with the `:disable' property: +;; (package! builtin-package :disable t) + +;; You can override the recipe of a built in package without having to specify +;; all the properties for `:recipe'. These will inherit the rest of its recipe +;; from Doom or MELPA/ELPA/Emacsmirror: +;; (package! builtin-package :recipe (:nonrecursive t)) +;; (package! builtin-package-2 :recipe (:repo "myfork/package")) + +;; Specify a `:branch' to install a package from a particular branch or tag. +;; This is required for some packages whose default branch isn't 'master' (which +;; our package manager can't deal with; see radian-software/straight.el#279) +;; (package! builtin-package :recipe (:branch "develop")) + +;; Use `:pin' to specify a particular commit to install. +;; (package! builtin-package :pin "1a2b3c4d5e") + + +;; Doom's packages are pinned to a specific commit and updated from release to +;; release. The `unpin!' macro allows you to unpin single packages... +;; (unpin! pinned-package) +;; ...or multiple packages +;; (unpin! pinned-package another-pinned-package) +;; ...Or *all* packages (NOT RECOMMENDED; will likely break things) +;; (unpin! t) diff --git a/.config/i3/config b/.config/i3/config new file mode 100644 index 0000000..28ab37b --- /dev/null +++ b/.config/i3/config @@ -0,0 +1,134 @@ +set $mod Mod4 +set $alt Mod1 +exec setxkbmap -option compose:menu + +font pango:Hack Nerd Font 10 + +# session setup +# xdg autostart stuff +exec --no-startup-id dex --autostart --environment i3 +# screen locking setup +exec --no-startup-id xss-lock --transfer-sleep-lock -- i3lock --nofork --image /home/hydrogen/画像/AwayTooLong.png +exec --no-startup-id feh --bg-center --no-fehbg /home/hydrogen/画像/AwayTooLong.png +exec_always --no-startup-id /home/hydrogen/.config/i3/polybar.sh +exec_always --no-startup-id picom -b +exec_always --no-startup-id killall xborders; ~/.local/bin/xborders --border-radius 11 --border-width 3 --border-rgba '#C4DDDD' + +floating_modifier $mod +tiling_drag modifier + +default_border none +default_floating_border none +gaps inner 6 +gaps outer 0 + +# keys to run programs +bindsym $mod+space exec "rofi -modi combi -show combi -combi-modi 'window,drun,run'" +bindsym $mod+Insert exec "exec emacsclient --alternate-editor= --create-frame" +bindsym $mod+Return exec alacritty + +# screenshot keys +bindsym Print exec flameshot gui +bindsym Pause exec flameshot launcher +bindsym $alt+Print exec flameshot screen +bindsym $alt+Shift+Print exec flameshot full + +# floating window definitions +for_window [class="TeamSpeak 3"] floating enable +for_window [class="protonvpn-app"] floating enable +for_window [class="Anki"] floating enable +for_window [class="feh"] floating enable +for_window [class="mpv"] floating enable +for_window [title="フレンドリスト"] floating enable +for_window [title="仮想マシンマネージャー"] floating enable, move position 1530 px 100 px, resizeset 320 px 550 px + +# scratchpad keys +bindsym $mod+minus move scratchpad +bindsym $mod+equal scratchpad show + +# audio controls +set $refresh_i3status killall -SIGUSR1 i3status +bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +5% && $refresh_i3status +bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -5% && $refresh_i3status +bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle && $refresh_i3status +bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle && $refresh_i3status +bindsym XF86AudioPrev exec mpc prev +bindsym XF86AudioPlay exec mpc toggle +bindsym XF86AudioNext exec mpc next + +# change window positioning modes +bindsym $mod+h split h +bindsym $mod+v split v +bindsym $mod+f fullscreen toggle +bindsym $mod+s layout stacking +bindsym $mod+w layout tabbed +bindsym $mod+e layout toggle split +bindsym $mod+grave floating toggle +bindsym $mod+$alt+grave focus mode_toggle +bindsym $mod+a focus parent + +# change focus +bindsym $mod+Left focus left +bindsym $mod+Down focus down +bindsym $mod+Up focus up +bindsym $mod+Right focus right +# move window +bindsym $mod+Shift+Left move left +bindsym $mod+Shift+Down move down +bindsym $mod+Shift+Up move up +bindsym $mod+Shift+Right move right + +# define workspaces +set $ws1 "1" +set $ws2 "2" +set $ws3 "3" +set $ws4 "4" +set $ws5 "5" +set $ws6 "6" +set $ws7 "7" +set $ws8 "8" +set $ws9 "9" +set $ws10 "10" +# change workspace +bindsym $mod+1 workspace number $ws1 +bindsym $mod+2 workspace number $ws2 +bindsym $mod+3 workspace number $ws3 +bindsym $mod+4 workspace number $ws4 +bindsym $mod+5 workspace number $ws5 +bindsym $mod+6 workspace number $ws6 +bindsym $mod+7 workspace number $ws7 +bindsym $mod+8 workspace number $ws8 +bindsym $mod+9 workspace number $ws9 +bindsym $mod+0 workspace number $ws10 +# move window to workspace +bindsym $mod+Shift+1 move container to workspace number $ws1 +bindsym $mod+Shift+2 move container to workspace number $ws2 +bindsym $mod+Shift+3 move container to workspace number $ws3 +bindsym $mod+Shift+4 move container to workspace number $ws4 +bindsym $mod+Shift+5 move container to workspace number $ws5 +bindsym $mod+Shift+6 move container to workspace number $ws6 +bindsym $mod+Shift+7 move container to workspace number $ws7 +bindsym $mod+Shift+8 move container to workspace number $ws8 +bindsym $mod+Shift+9 move container to workspace number $ws9 +bindsym $mod+Shift+0 move container to workspace number $ws10 + +bindsym $mod+q kill + +# session reload, quit and lock +bindsym $mod+Shift+c reload +bindsym $mod+Shift+r restart +#bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'youre trying to say you like the tty better than me, right?' -B 'Yeah' 'i3-msg exit'" +bindsym Control+$alt+Delete exec "rofi -modi power:/home/hydrogen/.local/bin/rofi-power -show power" + +mode "resize" { + bindsym Left resize shrink width 15 px + bindsym Down resize grow height 15 px + bindsym Up resize shrink height 15 px + bindsym Right resize grow width 15 px + + bindsym Return mode "default" + bindsym Escape mode "default" + bindsym $mod+r mode "default" +} + +bindsym $mod+r mode "resize" diff --git a/.config/i3/polybar.sh b/.config/i3/polybar.sh new file mode 100755 index 0000000..40a23f8 --- /dev/null +++ b/.config/i3/polybar.sh @@ -0,0 +1,10 @@ +#!/usr/bin/env sh + +# Terminate already running bar instances +killall -q polybar + +# Wait until the processes have been shut down +while pgrep -x polybar >/dev/null; do sleep 0.1; done + +# Launch polybar +polybar --config="/home/hydrogen/.config/polybar/config.ini" top & diff --git a/.config/picom/picom.conf b/.config/picom/picom.conf new file mode 100644 index 0000000..ef60d46 --- /dev/null +++ b/.config/picom/picom.conf @@ -0,0 +1,319 @@ +################################# +# Shadows # +################################# + +# Enabled client-side shadows on windows. Note desktop windows +# (windows with '_NET_WM_WINDOW_TYPE_DESKTOP') never get shadow, +# unless explicitly requested using the wintypes option. +# +# Can be set per-window using rules. +# +# Default: false +shadow = true; +# The blur radius for shadows, in pixels. +# +# Default: 12 +shadow-radius = 12; + +# The opacity of shadows. +# +# Range: 0.0 - 1.0 +# Default: 0.75 +# shadow-opacity = .75 + +# The left offset for shadows, in pixels. +# +# Default: -15 +shadow-offset-x = -12; + +# The top offset for shadows, in pixels. +# +# Default: -15 +shadow-offset-y = -12; + +# Hex string color value of shadow. Formatted like "#RRGGBB", e.g. "#C0FFEE". +# +# Default: #000000 +# shadow-color = "#000000" + +# Crop shadow of a window fully on a particular monitor to that monitor. This is +# currently implemented using the X RandR extension. +# +# Default: false +# crop-shadow-to-monitor = false +# + + +################################# +# Fading # +################################# + +# Fade windows in/out when opening/closing and when opacity changes, +# unless no-fading-openclose is used. Can be set per-window using rules. +# +# Default: false +fading = true; + +# Opacity change between steps while fading in. (0.01 - 1.0, defaults to 0.028) +fade-in-step = 0.08; + +# Opacity change between steps while fading out. (0.01 - 1.0, defaults to 0.03) +fade-out-step = 0.08; + +# The time between steps in fade step, in milliseconds. (> 0, defaults to 10) +# fade-delta = 10 + +# Do not fade on window open/close. +# no-fading-openclose = false + +# Do not fade destroyed ARGB windows with WM frame. Workaround of bugs in Openbox, Fluxbox, etc. +# no-fading-destroyed-argb = false + + +################################# +# Transparency / Opacity # +################################# + +# Opacity of window titlebars and borders. +# +# Range: 0.1 - 1.0 +# Default: 1.0 (disabled) +frame-opacity = 0.7; + +# Use fixed inactive dim value, instead of adjusting according to window opacity. +# +# Default: false +# inactive-dim-fixed = true +#mark-ovredir-focused = false; +# inactive-dim = 0.2; + +################################# +# Corners # +################################# + +# Sets the radius of rounded window corners. When > 0, the compositor will +# round the corners of windows. Does not interact well with +# `transparent-clipping`. +# +# Default: 0 (disabled) +corner-radius = 9 + +################################# +# Blur # +################################# + +# Parameters for background blurring, see BLUR section in the man page for more information. +blur-method = "dual_kawase"; +#blur-size = 12 +# +#blur-deviation = false +# +blur-strength = 2 + +# Blur background of semi-transparent / ARGB windows. +# Can be set per-window using rules. +# +# Default: false +blur-background = true + +# Blur background of windows when the window frame is not opaque. +# Implies: +# blur-background +# +# Default: false +#blur-background-frame = false + +# Use fixed blur strength rather than adjusting according to window opacity. +# +# Default: false +# blur-background-fixed = true + + +# Specify the blur convolution kernel, with the following format: +# example: +# blur-kern = "5,5,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1"; +# Can also be a pre-defined kernel, see the man page. +# +# Default: "" +#blur-kern = "11x11gaussian"; + +################################# +# General Settings # +################################# + +# Enable remote control via D-Bus. See the man page for more details. +# +# Default: false +# dbus = true + +# Daemonize process. Fork to background after initialization. Causes issues with certain (badly-written) drivers. +# daemon = false + +# Specify the backend to use: `xrender`, `glx`, or `egl`. +# +# Default: "xrender" +backend = "glx" + +# Use higher precision during rendering, and apply dither when presenting the +# rendered screen. Reduces banding artifacts, but may cause performance +# degradation. Only works with OpenGL. +dithered-present = false; + +# Enable/disable VSync. +# +# Default: false +vsync = true; + +# Try to detect windows with rounded corners and don't consider them +# shaped windows. The accuracy is not very high, unfortunately. +# +# Has nothing to do with `corner-radius`. +# +# Default: false +detect-rounded-corners = true; + +# Detect '_NET_WM_WINDOW_OPACITY' on client windows, useful for window managers +# not passing '_NET_WM_WINDOW_OPACITY' of client windows to frame windows. +# +# Default: false +detect-client-opacity = true; + +# Use EWMH '_NET_ACTIVE_WINDOW' to determine currently focused window, +# rather than listening to 'FocusIn'/'FocusOut' event. May be more accurate, +# provided that the WM supports it. +# +# Default: false +# use-ewmh-active-win = true + +# Unredirect all windows if a full-screen opaque window is detected, +# to maximize performance for full-screen windows. Known to cause flickering +# when redirecting/unredirecting windows. +# +# Default: false +# unredir-if-possible = false + +# Delay before unredirecting the window, in milliseconds. +# +# Default: 0. +# unredir-if-possible-delay = 0 + +# Use 'WM_TRANSIENT_FOR' to group windows, and consider windows +# in the same group focused at the same time. +# +# Default: false +detect-transient = true; + +# Use 'WM_CLIENT_LEADER' to group windows, and consider windows in the same +# group focused at the same time. This usually means windows from the same application +# will be considered focused or unfocused at the same time. +# 'WM_TRANSIENT_FOR' has higher priority if detect-transient is enabled, too. +# +# Default: false +# detect-client-leader = false + +# Use of damage information for rendering. This cause the only the part of the +# screen that has actually changed to be redrawn, instead of the whole screen +# every time. Should improve performance. +# +# Default: false +use-damage = true; + +# Use X Sync fence to wait for the completion of rendering of other windows, +# before using their content to render the current screen. +# +# Required for explicit sync drivers, such as nvidia. +# +# Default: false +# xrender-sync-fence = false + +# GLX backend: Use specified GLSL fragment shader for rendering window +# contents. Read the man page for a detailed explanation of the interface. +# +# Can be set per-window using rules. +# +# window-shader-fg = "default" + +# Force all windows to be painted with blending. Useful if you +# have a `window-shader-fg` that could turn opaque pixels transparent. +# +# Default: false +# force-win-blend = false + +# Do not use EWMH to detect fullscreen windows. +# Reverts to checking if a window is fullscreen based only on its size and coordinates. +# +# Default: false +# no-ewmh-fullscreen = false + +# Dimming bright windows so their brightness doesn't exceed this set value. +# Brightness of a window is estimated by averaging all pixels in the window, +# so this could comes with a performance hit. +# Setting this to 1.0 disables this behaviour. Requires --use-damage to be disabled. +# +# Default: 1.0 (disabled) +# max-brightness = 1.0 + +# Make transparent windows clip other windows like non-transparent windows do, +# instead of blending on top of them. e.g. placing a transparent window on top +# of another window will cut a "hole" in that window, and show the desktop background +# underneath. +# +# Default: false +# transparent-clipping = false + +# Set the log level. Possible values are: +# "trace", "debug", "info", "warn", "error" +# in increasing level of importance. Case insensitive. +# If using the "TRACE" log level, it's better to log into a file +# using *--log-file*, since it can generate a huge stream of logs. +# +# Default: "warn" +# log-level = "warn"; + +# Set the log file. +# If *--log-file* is never specified, logs will be written to stderr. +# Otherwise, logs will to written to the given file, though some of the early +# logs might still be written to the stderr. +# When setting this option from the config file, it is recommended to use an absolute path. +# +# log-file = "/path/to/your/log/file" + +# Write process ID to a file. +# write-pid-path = "/path/to/your/log/file" + +# Rule-based per-window options. +# +# See WINDOW RULES section in the man page for how these work. +rules = ({ + match = "window_type = 'tooltip'"; + fade = false; + shadow = true; + opacity = 0.75; + full-shadow = false; +}, { + match = "window_type = 'dock' ||" + "window_type = 'desktop' ||" + "name = 'xborders' ||" + "_GTK_FRAME_EXTENTS@"; + blur-background = false; +}, { + match = "window_type = 'dock' ||" + "window_type = 'desktop'"; + corner-radius = 0; +}, { + match = "name = 'Notification' ||" + "class_g = 'Conky' ||" + "class_g ?= 'Notify-osd' ||" + "class_g = 'Cairo-clock' ||" + "window_type = 'dock' ||" + "_GTK_FRAME_EXTENTS@"; + shadow = false; +}, +{ match = "fullscreen"; corner-radius = 0 }) + +# `@include` directive can be used to include additional configuration files. +# Relative paths are search either in the parent of this configuration file +# (when the configuration is loaded through a symlink, the symlink will be +# resolved first). Or in `$XDG_CONFIG_HOME/picom/include`. +# +# @include "extra.conf" diff --git a/.config/polybar/config.ini b/.config/polybar/config.ini new file mode 100644 index 0000000..5331d56 --- /dev/null +++ b/.config/polybar/config.ini @@ -0,0 +1,218 @@ +;========================================================== +; +; +; ██████╗ ██████╗ ██╗ ██╗ ██╗██████╗ █████╗ ██████╗ +; ██╔══██╗██╔═══██╗██║ ╚██╗ ██╔╝██╔══██╗██╔══██╗██╔══██╗ +; ██████╔╝██║ ██║██║ ╚████╔╝ ██████╔╝███████║██████╔╝ +; ██╔═══╝ ██║ ██║██║ ╚██╔╝ ██╔══██╗██╔══██║██╔══██╗ +; ██║ ╚██████╔╝███████╗██║ ██████╔╝██║ ██║██║ ██║ +; ╚═╝ ╚═════╝ ╚══════╝╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝ +; +; +; To learn more about how to configure Polybar +; go to https://github.com/polybar/polybar +; +; The README contains a lot of information +; +;========================================================== + +[colors] +background = #00282A2E +background-alt = #00373B41 +; foreground = #C5C8C6 +foreground = #282A2E +primary = #BD1000 +clock-primary = #D51402 +secondary = #8ABEB7 +alert = #C31F10 +disabled = #88857C + +[bar/top] +width = 100% +height = 24pt +radius = 0 + +; dpi = 96 + +background = ${colors.background} +foreground = ${colors.foreground} + +line-size = 3pt + +border-size = 4pt +border-color = #00000000 + +padding-left = 0 +padding-right = 1 + +module-margin = 1 + +separator = | +separator-foreground = ${colors.disabled} + +font-0 = monospace;2 + +modules-left = xworkspaces xwindow +modules-center = mpd-artist mpd-bar mpd-song +modules-right = pulseaudio memory cpu systray date + +fixed-center = true + +;cursor-click = pointer +;cursor-scroll = ns-resize + +enable-ipc = true + +; wm-restack = generic +; wm-restack = bspwm +; wm-restack = i3 + +; override-redirect = true + +; This module is not active by default (to enable it, add it to one of the +; modules-* list above). +; Please note that only a single tray can exist at any time. If you launch +; multiple bars with this module, only a single one will show it, the others +; will produce a warning. Which bar gets the module is timing dependent and can +; be quite random. +; For more information, see the documentation page for this module: +; https://polybar.readthedocs.io/en/stable/user/modules/tray.html +[module/systray] +type = internal/tray + +format-margin = 8pt +tray-spacing = 16pt + +[module/xworkspaces] +type = internal/xworkspaces + +reverse-scroll = true + +label-active = %name% +label-active-background = ${colors.background-alt} +label-active-underline= ${colors.clock-primary} +label-active-padding = 1 + +label-occupied = %name% +label-occupied-padding = 1 + +label-urgent = %name% +label-urgent-background = ${colors.alert} +label-urgent-padding = 1 + +label-empty = %name% +label-empty-foreground = ${colors.disabled} +label-empty-padding = 1 + +[module/xwindow] +type = internal/xwindow +label = %title:0:60:...% + +[module/filesystem] +type = internal/fs +interval = 25 + +mount-0 = / + +label-mounted = %{F#F0C674}%mountpoint%%{F-} %percentage_used%% + +label-unmounted = %mountpoint% not mounted +label-unmounted-foreground = ${colors.disabled} + +[module/pulseaudio] +type = internal/pulseaudio + +format-volume-prefix = "VOL " +format-volume-prefix-foreground = ${colors.primary} +format-volume = <label-volume> + +label-volume = %percentage%% + +label-muted = muted +label-muted-foreground = ${colors.disabled} + +[module/xkeyboard] +type = internal/xkeyboard +blacklist-0 = num lock + +label-layout = %layout% +label-layout-foreground = ${colors.primary} + +label-indicator-padding = 2 +label-indicator-margin = 1 +label-indicator-foreground = ${colors.background} +label-indicator-background = ${colors.secondary} + +[module/memory] +type = internal/memory +interval = 2 +format-prefix = "RAM " +format-prefix-foreground = ${colors.primary} +label = %percentage_used:2%% + +[module/cpu] +type = internal/cpu +interval = 2 +format-prefix = "CPU " +format-prefix-foreground = ${colors.primary} +label = %percentage:2%% + +[network-base] +type = internal/network +interval = 5 +format-connected = <label-connected> +format-disconnected = <label-disconnected> +label-disconnected = %{F#F0C674}%ifname%%{F#707880} disconnected + +[module/wlan] +inherit = network-base +interface-type = wireless +label-connected = %{F#F0C674}%ifname%%{F-} %essid% %local_ip% + +[module/eth] +inherit = network-base +interface-type = wired +label-connected = %{F#F0C674}%ifname%%{F-} %local_ip% + +[module/date] +type = internal/date +interval = 1 + +date = %H:%M +date-alt = %Y-%m-%d %H:%M:%S + +label = %date% +label-foreground = ${colors.clock-primary} + +[module/mpd-artist] +type = internal/mpd +host = 127.0.0.1 +port = 6600 +label-song = %artist% +format-online = <label-song> +[module/mpd-bar] +type = internal/mpd +host = 127.0.0.1 +port = 6600 +label-song = - +format-online = <bar-progress> +bar-progress-width = 20 +bar-progress-indicator = | +bar-progress-fill = ─ +bar-progress-empty = ─ +[module/mpd-song] +type = internal/mpd +host = 127.0.0.1 +port = 6600 +label-song = %title% +format-online = <label-song> + +;[module/greg] +;type = custom/script +;exec = ~/.local/bin/howgreg +;format-prefix = "GRG " +;format-prefix-foreground = ${colors.primary} + +[settings] +screenchange-reload = true +pseudo-transparency = true diff --git a/.config/rofi/config.rasi b/.config/rofi/config.rasi new file mode 100644 index 0000000..32b1231 --- /dev/null +++ b/.config/rofi/config.rasi @@ -0,0 +1,15 @@ +/*-*- mode: css; -*-*/ +/* Rofi config file */ +configuration { + font: "Hack Nerd Font 14"; + show-icons: true; + display-window: "Window"; + display-drun: ""; + modes: [window,drun,run,ssh,filebrowser,combi]; +} + +@theme "simple-tokyonight" + +listview { + lines: 12; +} diff --git a/.config/rofi/simple-tokyonight.rasi b/.config/rofi/simple-tokyonight.rasi new file mode 100644 index 0000000..ec20673 --- /dev/null +++ b/.config/rofi/simple-tokyonight.rasi @@ -0,0 +1,115 @@ +/*-*- mode: css; -*-*/ +* { + font: "Hack Nerd Font 14"; + + bg0 : #1a1b26; + bg1 : #1f2335; + bg2 : #24283b; + bg3 : #414868; + fg0 : #c0caf5; + fg1 : #a9b1d6; + fg2 : #737aa2; + red : #f7768e; + green : #9ece6a; + yellow : #e0af68; + blue : #7aa2f7; + magenta : #9a7ecc; + cyan : #4abaaf; + + accent: @magenta; + urgent: @yellow; + + background-color : transparent; + text-color : @fg0; + + padding : 0; + spacing : 0; +} + +element-icon, element-text, scrollbar { + cursor: pointer; +} + +window { + location : center; + width : 1000px; + x-offset : 4px; + y-offset : 26px; + + background-color: @bg1; + border: 1px; + border-color: @bg3; + border-radius: 6px; +} + +inputbar { + spacing : 8px; + padding : 4px 8px; + children : [ icon-search, entry ]; + + background-color: @bg0; +} + +icon-search, entry, element-icon, element-text { + vertical-align: 0.5; +} + +icon-search { + expand : false; + filename : "search-symbolic"; + size : 14px; +} + +textbox { + padding : 4px 8px; + background-color : @bg2; +} + +listview { + padding : 4px 0px; + lines : 12; + columns : 1; + scrollbar : true; + fixed-height : false; + dynamic : true; +} + +element { + padding : 4px 8px; + spacing : 8px; +} + +element normal urgent { + text-color: @urgent; +} + +element normal active { + text-color: @accent; +} + +element alternate active { + text-color: @accent; +} + +element selected { + text-color : @bg1; + background-color : @accent; +} + +element selected urgent { + background-color: @urgent; +} + +element-icon { + size: 0.8em; +} + +element-text { + text-color: inherit; +} + +scrollbar { + handle-width : 4px; + handle-color : @fg2; + padding : 0 4px; +} diff --git a/.local/bin/rofi-power b/.local/bin/rofi-power new file mode 100755 index 0000000..2387f9d --- /dev/null +++ b/.local/bin/rofi-power @@ -0,0 +1,280 @@ +#!/usr/bin/env bash + +# This script defines just a mode for rofi instead of being a self-contained +# executable that launches rofi by itself. This makes it more flexible than +# running rofi inside this script as now the user can call rofi as one pleases. +# For instance: +# +# rofi -show powermenu -modi powermenu:./rofi-power-menu +# +# See README.md for more information. + +set -e +set -u + +# All supported choices +all=(shutdown reboot suspend hibernate logout lockscreen) + +# By default, show all (i.e., just copy the array) +show=("${all[@]}") + +declare -A texts +texts[lockscreen]="lock screen" +texts[switchuser]="switch user" +texts[logout]="log out" +texts[suspend]="suspend" +texts[hibernate]="hibernate" +texts[reboot]="reboot" +texts[shutdown]="shut down" + +declare -A icons +icons[lockscreen]="\Uf033e" +icons[switchuser]="\Uf0019" +icons[logout]="\Uf0343" +icons[suspend]="\Uf04b2" +icons[hibernate]="\Uf02ca" +icons[reboot]="\Uf0709" +icons[shutdown]="\Uf0425" +icons[cancel]="\Uf0156" + +declare -A actions +actions[lockscreen]="loginctl lock-session ${XDG_SESSION_ID-}" +#actions[switchuser]="???" +actions[logout]="loginctl terminate-session ${XDG_SESSION_ID-}" +actions[suspend]="systemctl suspend" +actions[hibernate]="systemctl hibernate" +actions[reboot]="systemctl reboot" +actions[shutdown]="systemctl poweroff" + +# By default, ask for confirmation for actions that are irreversible +confirmations=(reboot shutdown logout) + +# By default, no dry run +dryrun=false +showsymbols=true +showtext=true + +function check_valid { + option="$1" + shift 1 + for entry in "${@}" + do + if [ -z "${actions[$entry]+x}" ] + then + echo "Invalid choice in $1: $entry" >&2 + exit 1 + fi + done +} + +# Parse command-line options +parsed=$(getopt --options=h --longoptions=help,dry-run,confirm:,choices:,choose:,symbols,no-symbols,text,no-text,symbols-font: --name "$0" -- "$@") +if [ $? -ne 0 ]; then + echo 'Terminating...' >&2 + exit 1 +fi +eval set -- "$parsed" +unset parsed +while true; do + case "$1" in + "-h"|"--help") + echo "rofi-power-menu - a power menu mode for Rofi" + echo + echo "Usage: rofi-power-menu [--choices CHOICES] [--confirm CHOICES]" + echo " [--choose CHOICE] [--dry-run] [--symbols|--no-symbols]" + echo + echo "Use with Rofi in script mode. For instance, to ask for shutdown or reboot:" + echo + echo " rofi -show menu -modi \"menu:rofi-power-menu --choices=shutdown/reboot\"" + echo + echo "Available options:" + echo " --dry-run Don't perform the selected action but print it to stderr." + echo " --choices CHOICES Show only the selected choices in the given order. Use /" + echo " as the separator. Available choices are lockscreen," + echo " logout,suspend, hibernate, reboot and shutdown. By" + echo " default, all available choices are shown." + echo " --confirm CHOICES Require confirmation for the gives choices only. Use / as" + echo " the separator. Available choices are lockscreen, logout," + echo " suspend, hibernate, reboot and shutdown. By default, only" + echo " irreversible actions logout, reboot and shutdown require" + echo " confirmation." + echo " --choose CHOICE Preselect the given choice and only ask for a" + echo " confirmation (if confirmation is set to be requested). It" + echo " is strongly recommended to combine this option with" + echo " --confirm=CHOICE if the choice wouldn't require" + echo " confirmation by default. Available choices are" + echo " lockscreen, logout, suspend, hibernate, reboot and" + echo " shutdown." + echo " --[no-]symbols Show Unicode symbols or not. Requires a font with support" + echo " for the symbols. Use, for instance, fonts from the" + echo " Nerdfonts collection. By default, they are shown" + echo " --[no-]text Show text description or not." + echo " --symbols-font FONT Use the given font for symbols. By default, the symbols" + echo " use the same font as the text. That font is configured" + echo " with rofi." + echo " -h,--help Show this help text." + exit 0 + ;; + "--dry-run") + dryrun=true + shift 1 + ;; + "--confirm") + IFS='/' read -ra confirmations <<< "$2" + check_valid "$1" "${confirmations[@]}" + shift 2 + ;; + "--choices") + IFS='/' read -ra show <<< "$2" + check_valid "$1" "${show[@]}" + shift 2 + ;; + "--choose") + # Check that the choice is valid + check_valid "$1" "$2" + selectionID="$2" + shift 2 + ;; + "--symbols") + showsymbols=true + shift 1 + ;; + "--no-symbols") + showsymbols=false + shift 1 + ;; + "--text") + showtext=true + shift 1 + ;; + "--no-text") + showtext=false + shift 1 + ;; + "--symbols-font") + symbols_font="$2" + shift 2 + ;; + "--") + shift + break + ;; + *) + echo "Internal error" >&2 + exit 1 + ;; + esac +done + +if [ "$showsymbols" = "false" -a "$showtext" = "false" ] +then + echo "Invalid options: cannot have --no-symbols and --no-text enabled at the same time." >&2 + exit 1 +fi + +# Define the messages after parsing the CLI options so that it is possible to +# configure them in the future. + +function write_message { + if [ -z ${symbols_font+x} ]; + then + icon="<span font_size=\"medium\">$1</span>" + else + icon="<span font=\"${symbols_font}\" font_size=\"medium\">$1</span>" + fi + text="<span font_size=\"medium\">$2</span>" + if [ "$showsymbols" = "true" ] + then + if [ "$showtext" = "true" ] + then + echo -n "\u200e$icon \u2068$text\u2069" + else + echo -n "\u200e$icon" + fi + else + echo -n "$text" + fi +} + +function print_selection { + echo -e "$1" | $(read -r -d '' entry; echo "echo $entry") +} + +declare -A messages +declare -A confirmationMessages +for entry in "${all[@]}" +do + messages[$entry]=$(write_message "${icons[$entry]}" "${texts[$entry]^}") +done +for entry in "${all[@]}" +do + confirmationMessages[$entry]=$(write_message "${icons[$entry]}" "Yes, ${texts[$entry]}") +done +confirmationMessages[cancel]=$(write_message "${icons[cancel]}" "No, cancel") + +if [ $# -gt 0 ] +then + # If arguments given, use those as the selection + selection="${@}" +else + # Otherwise, use the CLI passed choice if given + if [ -n "${selectionID+x}" ] + then + selection="${messages[$selectionID]}" + fi +fi + +# Don't allow custom entries +echo -e "\0no-custom\x1ftrue" +# Use markup +echo -e "\0markup-rows\x1ftrue" + +if [ -z "${selection+x}" ] +then + echo -e "\0prompt\x1fpower" + for entry in "${show[@]}" + do + echo -e "${messages[$entry]}\0icon\x1f${icons[$entry]}" + done +else + for entry in "${show[@]}" + do + if [ "$selection" = "$(print_selection "${messages[$entry]}")" ] + then + # Check if the selected entry is listed in confirmation requirements + for confirmation in "${confirmations[@]}" + do + if [ "$entry" = "$confirmation" ] + then + # Ask for confirmation + echo -e "\0prompt\x1fAre you sure" + echo -e "${confirmationMessages[$entry]}\0icon\x1f${icons[$entry]}" + echo -e "${confirmationMessages[cancel]}\0icon\x1f${icons[cancel]}" + exit 0 + fi + done + # If not, then no confirmation is required, so mark confirmed + selection=$(print_selection "${confirmationMessages[$entry]}") + fi + if [ "$selection" = "$(print_selection "${confirmationMessages[$entry]}")" ] + then + if [ $dryrun = true ] + then + # Tell what would have been done + echo "Selected: $entry" >&2 + else + # Perform the action + ${actions[$entry]} + fi + exit 0 + fi + if [ "$selection" = "$(print_selection "${confirmationMessages[cancel]}")" ] + then + # Do nothing + exit 0 + fi + done + # The selection didn't match anything, so raise an error + echo "Invalid selection: $selection" >&2 + exit 1 +fi diff --git a/.mpd/mpd.conf b/.mpd/mpd.conf new file mode 100644 index 0000000..681c1ba --- /dev/null +++ b/.mpd/mpd.conf @@ -0,0 +1,426 @@ +# An example configuration file for MPD. +# Read the user manual for documentation: http://www.musicpd.org/doc/user/ +# or /usr/share/doc/mpd/html/user.html + + +# Files and directories ####################################################### +# +# This setting controls the top directory which MPD will search to discover the +# available audio files and add them to the daemon's online database. This +# setting defaults to the XDG directory, otherwise the music directory will be +# be disabled and audio files will only be accepted over ipc socket (using +# file:// protocol) or streaming files over an accepted protocol. +# +music_directory "/home/hydrogen/音楽" +# +# This setting sets the MPD internal playlist directory. The purpose of this +# directory is storage for playlists created by MPD. The server will use +# playlist files not created by the server but only if they are in the MPD +# format. This setting defaults to playlist saving being disabled. +# +playlist_directory "/home/hydrogen/.mpd/playlists" +# +# This setting sets the location of the MPD database. This file is used to +# load the database at server start up and store the database while the +# server is not up. This setting defaults to disabled which will allow +# MPD to accept files over ipc socket (using file:// protocol) or streaming +# files over an accepted protocol. +# +#db_file "/home/hydrogen/.mpd/tag_cache" + +# These settings are the locations for the daemon log files for the daemon. +# +# The special value "syslog" makes MPD use the local syslog daemon. This +# setting defaults to logging to syslog. +# +# If you use systemd, do not configure a log_file. With systemd, MPD +# defaults to the systemd journal, which is fine. +# +#log_file "/var/log/mpd/mpd.log" + +# This setting sets the location of the file which stores the process ID +# for use of mpd --kill and some init scripts. This setting is disabled by +# default and the pid file will not be stored. +# +# If you use systemd, do not configure a pid_file. +# +#pid_file "/run/mpd/pid" + +# This setting sets the location of the file which contains information about +# most variables to get MPD back into the same general shape it was in before +# it was brought down. This setting is disabled by default and the server +# state will be reset on server start up. +# +state_file "/home/hydrogen/.mpd/state" +# +# The location of the sticker database. This is a database which +# manages dynamic information attached to songs. +# +sticker_file "/home/hydrogen/.mpd/sticker.sql" +# +############################################################################### + + +# General music daemon options ################################################ +# +# This setting specifies the user that MPD will run as. MPD should never run as +# root and you may use this setting to make MPD change its user ID after +# initialization. This setting is disabled by default and MPD is run as the +# current user. +# +#user "" +# +# This setting specifies the group that MPD will run as. If not specified +# primary group of user specified with "user" setting will be used (if set). +# This is useful if MPD needs to be a member of group such as "audio" to +# have permission to use sound card. +# +#group "nogroup" +# +# This setting sets the address for the daemon to listen on. Careful attention +# should be paid if this is assigned to anything other than the default, any. +# This setting can deny access to control of the daemon. Not effective if +# systemd socket activation is in use. +# +# For network +bind_to_address "localhost" +# +# And for Unix Socket +#bind_to_address "/run/mpd/socket" +# +# This setting is the TCP port that is desired for the daemon to get assigned +# to. +# +#port "6600" +# +# Suppress all messages below the given threshold. Use "verbose" for +# troubleshooting. Available setting arguments are "notice", "info", "verbose", +# "warning" and "error". +# +#log_level "notice" +# +# Setting "restore_paused" to "yes" puts MPD into pause mode instead +# of starting playback after startup. +# +restore_paused "yes" +# +# This setting enables MPD to create playlists in a format usable by other +# music players. +# +#save_absolute_paths_in_playlists "no" +# +# This setting defines a list of tag types that will be extracted during the +# audio file discovery process. The complete list of possible values can be +# found in the user manual. +#metadata_to_use "artist,album,title,track,name,genre,date,composer,performer,disc" +# +# This example just enables the "comment" tag without disabling all +# the other supported tags: +#metadata_to_use "+comment" +# +# This setting enables automatic update of MPD's database when files in +# music_directory are changed. +# +#auto_update "yes" +# +# Limit the depth of the directories being watched, 0 means only watch +# the music directory itself. There is no limit by default. +# +#auto_update_depth "3" +# +############################################################################### + + +# Symbolic link behavior ###################################################### +# +# If this setting is set to "yes", MPD will discover audio files by following +# symbolic links outside of the configured music_directory. +# +#follow_outside_symlinks "yes" +# +# If this setting is set to "yes", MPD will discover audio files by following +# symbolic links inside of the configured music_directory. +# +#follow_inside_symlinks "yes" +# +############################################################################### + + +# Zeroconf / Avahi Service Discovery ########################################## +# +# If this setting is set to "yes", service information will be published with +# Zeroconf / Avahi. +# +#zeroconf_enabled "yes" +# +# The argument to this setting will be the Zeroconf / Avahi unique name for +# this MPD server on the network. %h will be replaced with the hostname. +# +#zeroconf_name "Music Player @ %h" +# +############################################################################### + + +# Permissions ################################################################# +# +# If this setting is set, MPD will require password authorization. The password +# setting can be specified multiple times for different password profiles. +# +#password "password@read,add,control,admin" +# +# This setting specifies the permissions a user has who has not yet logged in. +# +#default_permissions "read,add,control,admin" +# +############################################################################### + + +# Database ####################################################################### +# +# An example of a database section instead of the old 'db_file' setting. +# It enables mounting other storages into the music directory. +# +database { + plugin "simple" + path "/home/hydrogen/.mpd/tag_cache" + cache_directory "/home/hydrogen/.mpd/cache" +} +# +# An example of database config for a satellite setup +# +#music_directory "nfs://fileserver.local/srv/mp3" +#database { +# plugin "proxy" +# host "other.mpd.host" +# port "6600" +#} + +# Input ####################################################################### +# +#input { +# plugin "curl" +# proxy "proxy.isp.com:8080" +# proxy_user "user" +# proxy_password "password" +#} + +# Decoder ##################################################################### +# + +decoder { + plugin "hybrid_dsd" + enabled "no" +# gapless "no" +} +decoder { + plugin "wildmidi" + enabled "no" + #config_file "/etc/timidity/timidity.cfg" +} + +# +############################################################################### + +# Audio Output ################################################################ +# +# MPD supports various audio output types, as well as playing through multiple +# audio outputs at the same time, through multiple audio_output settings +# blocks. Setting this block is optional, though the server will only attempt +# autodetection for one sound card. +# +audio_output { + type "pulse" + name "MPD " +} +# +# An example of an ALSA output: +# +#audio_output { +# type "alsa" +# name "My ALSA Device" +## device "hw:0,0" # optional +## mixer_type "hardware" # optional +## mixer_device "default" # optional +## mixer_control "PCM" # optional +## mixer_index "0" # optional +#} +# +# An example of an OSS output: +# +#audio_output { +# type "oss" +# name "My OSS Device" +## device "/dev/dsp" # optional +## mixer_type "hardware" # optional +## mixer_device "/dev/mixer" # optional +## mixer_control "PCM" # optional +#} +# +# An example of a shout output (for streaming to Icecast): +# +#audio_output { +# type "shout" +# encoder "vorbis" # optional +# name "My Shout Stream" +# host "localhost" +# port "8000" +# mount "/mpd.ogg" +# password "hackme" +# quality "5.0" +# bitrate "128" +# format "44100:16:1" +## protocol "icecast2" # optional +## user "source" # optional +## description "My Stream Description" # optional +## url "http://example.com" # optional +## genre "jazz" # optional +## public "no" # optional +## timeout "2" # optional +## mixer_type "software" # optional +#} +# +# An example of a recorder output: +# +#audio_output { +# type "recorder" +# name "My recorder" +# encoder "vorbis" # optional, vorbis or lame +# path "/var/lib/mpd/recorder/mpd.ogg" +## quality "5.0" # do not define if bitrate is defined +# bitrate "128" # do not define if quality is defined +# format "44100:16:1" +#} +# +# An example of a httpd output (built-in HTTP streaming server): +# +#audio_output { +# type "httpd" +# name "My HTTP Stream" +# encoder "vorbis" # optional, vorbis or lame +# port "8000" +# bind_to_address "0.0.0.0" # optional, IPv4 or IPv6 +## quality "5.0" # do not define if bitrate is defined +# bitrate "128" # do not define if quality is defined +# format "44100:16:1" +# max_clients "0" # optional 0=no limit +#} +# +# An example of a pulseaudio output (streaming to a remote pulseaudio server) +# Please see README.Debian if you want mpd to play through the pulseaudio +# daemon started as part of your graphical desktop session! +# +#audio_output { +# type "pulse" +# name "My Pulse Output" +## server "remote_server" # optional +## sink "remote_server_sink" # optional +## media_role "media_role" #optional +#} +# +# An example of a winmm output (Windows multimedia API). +# +#audio_output { +# type "winmm" +# name "My WinMM output" +## device "Digital Audio (S/PDIF) (High Definition Audio Device)" # optional +# or +## device "0" # optional +## mixer_type "hardware" # optional +#} +# +# An example of an openal output. +# +#audio_output { +# type "openal" +# name "My OpenAL output" +## device "Digital Audio (S/PDIF) (High Definition Audio Device)" # optional +#} +# +# An example of an sndio output. +# +#audio_output { +# type "sndio" +# name "sndio output" +# mixer_type "hardware" +#} +# +# An example of an OS X output: +# +#audio_output { +# type "osx" +# name "My OS X Device" +## device "Built-in Output" # optional +## channel_map "-1,-1,0,1" # optional +#} +# +## Example "pipe" output: +# +#audio_output { +# type "pipe" +# name "my pipe" +# command "aplay -f cd 2>/dev/null" +## Or if you're want to use AudioCompress +# command "AudioCompress -m | aplay -f cd 2>/dev/null" +## Or to send raw PCM stream through PCM: +# command "nc example.org 8765" +# format "44100:16:2" +#} +# +## An example of a null output (for no audio output): +# +#audio_output { +# type "null" +# name "My Null Output" +# mixer_type "none" # optional +#} +# +############################################################################### + + +# Normalization automatic volume adjustments ################################## +# +# This setting specifies the type of ReplayGain to use. This setting can have +# the argument "off", "album", "track" or "auto". "auto" is a special mode that +# chooses between "track" and "album" depending on the current state of +# random playback. If random playback is enabled then "track" mode is used. +# See <https://wiki.hydrogenaud.io/index.php?title=Replaygain> for +# more details about ReplayGain. +# This setting is off by default. +# +#replaygain "album" +# +# This setting sets the pre-amp used for files that have ReplayGain tags. By +# default this setting is disabled. +# +#replaygain_preamp "0" +# +# This setting sets the pre-amp used for files that do NOT have ReplayGain tags. +# By default this setting is disabled. +# +#replaygain_missing_preamp "0" +# +# This setting enables or disables ReplayGain limiting. +# MPD calculates actual amplification based on the ReplayGain tags +# and replaygain_preamp / replaygain_missing_preamp setting. +# If replaygain_limit is enabled MPD will never amplify audio signal +# above its original level. If replaygain_limit is disabled such amplification +# might occur. By default this setting is enabled. +# +#replaygain_limit "yes" +# +# This setting enables on-the-fly normalization volume adjustment. This will +# result in the volume of all playing audio to be adjusted so the output has +# equal "loudness". This setting is disabled by default. +# +#volume_normalization "no" +# +############################################################################### + +# Character Encoding ########################################################## +# +# If file or directory names do not display correctly for your locale then you +# may need to modify this setting. +# +filesystem_charset "UTF-8" +# +############################################################################### |