commit 50c69c75c5504cf822855c145d3c0ee5d8ee8722 Author: テクニカル諏訪子 Date: Wed Jan 5 01:52:15 2022 +0900 ケロロリちゃんのドットファイル diff --git a/.Xclients b/.Xclients new file mode 100755 index 0000000..e9ea196 --- /dev/null +++ b/.Xclients @@ -0,0 +1,10 @@ +#!/bin/sh + +# +# ~/.Xclients +# +# Executed by xdm/gdm/kdm at login +# + +/bin/bash --login -i ~/.xinitrc + diff --git a/.bash_profile b/.bash_profile new file mode 100644 index 0000000..5545f00 --- /dev/null +++ b/.bash_profile @@ -0,0 +1,5 @@ +# +# ~/.bash_profile +# + +[[ -f ~/.bashrc ]] && . ~/.bashrc diff --git a/.bashrc b/.bashrc new file mode 100644 index 0000000..f06afed --- /dev/null +++ b/.bashrc @@ -0,0 +1,139 @@ +# +# ~/.bashrc +# + +[[ $- != *i* ]] && return + +colors() { + local fgc bgc vals seq0 + + printf "Color escapes are %s\n" '\e[${value};...;${value}m' + printf "Values 30..37 are \e[33mforeground colors\e[m\n" + printf "Values 40..47 are \e[43mbackground colors\e[m\n" + printf "Value 1 gives a \e[1mbold-faced look\e[m\n\n" + + # foreground colors + for fgc in {30..37}; do + # background colors + for bgc in {40..47}; do + fgc=${fgc#37} # white + bgc=${bgc#40} # black + + vals="${fgc:+$fgc;}${bgc}" + vals=${vals%%;} + + seq0="${vals:+\e[${vals}m}" + printf " %-9s" "${seq0:-(default)}" + printf " ${seq0}TEXT\e[m" + printf " \e[${vals:+${vals+$vals;}}1mBOLD\e[m" + done + echo; echo + done +} + +[ -r /usr/share/bash-completion/bash_completion ] && . /usr/share/bash-completion/bash_completion + +# Change the window title of X terminals +case ${TERM} in + xterm*|rxvt*|Eterm*|aterm|kterm|gnome*|interix|konsole*) + PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME%%.*}:${PWD/#$HOME/\~}\007"' + ;; + screen*) + PROMPT_COMMAND='echo -ne "\033_${USER}@${HOSTNAME%%.*}:${PWD/#$HOME/\~}\033\\"' + ;; +esac + +use_color=true + +# Set colorful PS1 only on colorful terminals. +# dircolors --print-database uses its own built-in database +# instead of using /etc/DIR_COLORS. Try to use the external file +# first to take advantage of user additions. Use internal bash +# globbing instead of external grep binary. +safe_term=${TERM//[^[:alnum:]]/?} # sanitize TERM +match_lhs="" +[[ -f ~/.dir_colors ]] && match_lhs="${match_lhs}$(<~/.dir_colors)" +[[ -f /etc/DIR_COLORS ]] && match_lhs="${match_lhs}$(/dev/null \ + && match_lhs=$(dircolors --print-database) +[[ $'\n'${match_lhs} == *$'\n'"TERM "${safe_term}* ]] && use_color=true + +if ${use_color} ; then + # Enable colors for ls, etc. Prefer ~/.dir_colors #64489 + if type -P dircolors >/dev/null ; then + if [[ -f ~/.dir_colors ]] ; then + eval $(dircolors -b ~/.dir_colors) + elif [[ -f /etc/DIR_COLORS ]] ; then + eval $(dircolors -b /etc/DIR_COLORS) + fi + fi + + if [[ ${EUID} == 0 ]] ; then + PS1='\[\033[01;31m\][\h\[\033[01;36m\] \W\[\033[01;31m\]]\$\[\033[00m\] ' + else + PS1='\[\033[01;32m\][\u@\h\[\033[01;37m\] \W\[\033[01;32m\]]\$\[\033[00m\] ' + fi + + alias ls='ls --color=auto' + alias grep='grep --colour=auto' + alias egrep='egrep --colour=auto' + alias fgrep='fgrep --colour=auto' +else + if [[ ${EUID} == 0 ]] ; then + # show root@ when we don't have colors + PS1='\u@\h \W \$ ' + else + PS1='\u@\h \w \$ ' + fi +fi + +unset use_color safe_term match_lhs sh + +alias cp="cp -i" # confirm before overwriting something +alias df='df -h' # human-readable sizes +alias free='free -m' # show sizes in MB +alias np='nano -w PKGBUILD' +alias more=less + +xhost +local:root > /dev/null 2>&1 + +complete -cf sudo + +# Bash won't get SIGWINCH if another process is in the foreground. +# Enable checkwinsize so that bash will check the terminal size when +# it regains control. #65623 +# http://cnswww.cns.cwru.edu/~chet/bash/FAQ (E11) +shopt -s checkwinsize + +shopt -s expand_aliases + +# export QT_SELECT=4 + +# Enable history appending instead of overwriting. #139609 +shopt -s histappend + +# +# # ex - archive extractor +# # usage: ex +ex () +{ + if [ -f $1 ] ; then + case $1 in + *.tar.bz2) tar xjf $1 ;; + *.tar.gz) tar xzf $1 ;; + *.bz2) bunzip2 $1 ;; + *.rar) unrar x $1 ;; + *.gz) gunzip $1 ;; + *.tar) tar xf $1 ;; + *.tbz2) tar xjf $1 ;; + *.tgz) tar xzf $1 ;; + *.zip) unzip $1 ;; + *.Z) uncompress $1;; + *.7z) 7z x $1 ;; + *) echo "'$1' cannot be extracted via ex()" ;; + esac + else + echo "'$1' is not a valid file" + fi +} diff --git a/.config/alacritty/alacritty.yml b/.config/alacritty/alacritty.yml new file mode 100644 index 0000000..e94bd2d --- /dev/null +++ b/.config/alacritty/alacritty.yml @@ -0,0 +1,540 @@ +# Configuration for Alacritty, the GPU enhanced terminal emulator + +# Any items in the `env` entry below will be added as +# environment variables. Some entries may override variables +# set by alacritty it self. +# env: + # TERM env customization. + # + # If this property is not set, alacritty will set it to xterm-256color. + # + # Note that some xterm terminfo databases don't declare support for italics. + # You can verify this by checking for the presence of `smso` and `sitm` in + # `infocmp xterm-256color`. + # TERM: xterm-256color-italic + +window: + # Window dimensions (changes require restart) + # + # Specified in number of columns/lines, not pixels. If both are zero this + # setting is ignored. + dimensions: + columns: 100 + lines: 85 + + # Window padding (changes require restart) + # + # Blank space added around the window in pixels. This padding is not scaled by + # DPI and the specified value is always added at both opposing sides. + padding: + x: 0 + y: 0 + + # Spread additional padding evenly around the terminal content. + dynamic_padding: false + + # Window decorations + # + # Available values: + # - full: borders and title bar + # - none: neither borders nor title bar + # - transparent: title bar, transparent background and title bar buttons + # - buttonless: title bar, transparent background, but no title bar buttons + decorations: none + + # Startup Mode (changes require restart) + # + # Values for `startup_mode`: + # - Windowed + # - Maximized + # - Fullscreen + # + # Values for `startup_mode` (macOS only): + # - SimpleFullscreen + startup_mode: Windowed + +scrolling: + # maximum number of lines in the scrollback buffer. Specifying '0' will + # disable scrolling. + history: 1000 + + # Number of lines the viewport will move for every line scrolled when + # scrollback is enabled (history > 0). + multiplier: 3 + +# Font configuration (changes require restart) +font: + # The normal (roman) font face to use. + # Style can be specified to pick a specific face. + normal: + family: Monospace + style: Regular + # family: "Fira Code" + # family: "Source Code Pro" + # style: Retina + + # The bold font face + bold: + family: Monospace + style: Bold + # family: "Fira Code" + # family: "Source Code Pro" + + # The italic font face + italic: + family: Monospace + style: Italic + # style: "Light Oblique" + # family: "Fira Code" + # family: "Source Code Pro" + # style: "Medium Italic" + + # Point size of the font + size: 12.0 + + # Offset is the extra space around each character. offset.y can be thought of + # as modifying the linespacing, and offset.x as modifying the letter spacing. + offset: + x: 0 + y: 0 + + # Glyph offset determines the locations of the glyphs within their cells with + # the default being at the bottom. Increase the x offset to move the glyph to + # the right, increase the y offset to move the glyph upward. + glyph_offset: + x: 0 + y: 0 + + # Thin stroke font rendering (macOS only) + # + # Thin strokes are suitable for retina displays, but for non-retina you + # probably want this set to false. + # + # macOS >= 10.14.x: + # + # If the font quality on non-retina display looks bad then set + # `use_thin_strokes` to `true` and enable font smoothing by running the + # following command: + # `defaults write -g CGFontRenderingFontSmoothingDisabled -bool NO` + # + # This is a global setting and will require a log out or restart to take + # effect. + use_thin_strokes: true + +# When true, bold text is drawn using the bright variant of colors. +draw_bold_text_with_bright_colors: true + +# Use custom cursor colors. If true, display the cursor in the cursor.foreground +# and cursor.background colors, otherwise invert the colors of the cursor. +custom_cursor_colors: true + +# Colors +colors: + + # Tomorrow (https://github.com/aarowill/base17-alacritty/blob/master/colors/base16-tomorrow.yml) + # Default colors + primary: + background: '0x232629' + foreground: '0xfcfcfc' + # Colors the cursor will use if `custom_cursor_colors` is true + cursor: + text: '0x232629' + cursor: '0xfcfcfc' + # Normal colors + normal: + black: '0x232629' + red: '0xda4453' + green: '0x27ae60' + yellow: '0xfdbc4b' + blue: '0x3daee9' + magenta: '0xea81e8' + cyan: '0x93cee9' + white: '0xfcfcfc' + # Bright colors + bright: + black: "0x928374" + red: "0xfb4934" + green: "0xb8bb26" + yellow: "0xfabd2f" + blue: "0x83a598" + magenta: "0xd3869b" + cyan: "0x8ec07c" + white: "0xebdbb2" + +# Visual Bell +# +# Any time the BEL code is received, Alacritty "rings" the visual bell. Once +# rung, the terminal background will be set to white and transition back to the +# default background color. You can control the rate of this transition by +# setting the `duration` property (represented in milliseconds). You can also +# configure the transition function by setting the `animation` property. +# +# Possible values for `animation` +# `Ease` +# `EaseOut` +# `EaseOutSine` +# `EaseOutQuad` +# `EaseOutCubic` +# `EaseOutQuart` +# `EaseOutQuint` +# `EaseOutExpo` +# `EaseOutCirc` +# `Linear` +# +# To completely disable the visual bell, set its duration to 0. +# +bell: + animation: EaseOutExpo + color: '0xffffff' + duration: 0 + +# Background opacity +background_opacity: 1.0 + +# Key bindings +# +# Key bindings are specified as a list of objects. Each binding will specify a +# key and modifiers required to trigger it, terminal modes where the binding is +# applicable, and what should be done when the key binding fires. It can either +# send a byte sequence to the running application (`chars`), execute a +# predefined action (`action`) or fork and execute a specified command plus +# arguments (`command`). +# +# Bindings are always filled by default, but will be replaced when a new binding +# with the same triggers is defined. To unset a default binding, it can be +# mapped to the `None` action. +# +# Example: +# `- { key: V, mods: Control|Shift, action: Paste }` +# +# Available fields: +# - key +# - mods (optional) +# - chars | action | command (exactly one required) +# - mode (optional) +# +# Values for `key`: +# - `A` -> `Z` +# - `F1` -> `F12` +# - `Key1` -> `Key0` +# +# A full list with available key codes can be found here: +# https://docs.rs/glutin/*/glutin/enum.VirtualKeyCode.html#variants +# +# Instead of using the name of the keys, the `key` field also supports using +# the scancode of the desired key. Scancodes have to be specified as a +# decimal number. +# This command will allow you to display the hex scancodes for certain keys: +# `showkey --scancodes` +# +# Values for `mods`: +# - Command +# - Control +# - Option +# - Super +# - Shift +# - Alt +# +# Multiple `mods` can be combined using `|` like this: `mods: Control|Shift`. +# Whitespace and capitalization is relevant and must match the example. +# +# Values for `chars`: +# The `chars` field writes the specified string to the terminal. This makes +# it possible to pass escape sequences. +# To find escape codes for bindings like `PageUp` ("\x1b[5~"), you can run +# the command `showkey -a` outside of tmux. +# Note that applications use terminfo to map escape sequences back to +# keys. It is therefore required to update the terminfo when +# changing an escape sequence. +# +# Values for `action`: +# - Paste +# - PasteSelection +# - Copy +# - IncreaseFontSize +# - DecreaseFontSize +# - ResetFontSize +# - ScrollPageUp +# - ScrollPageDown +# - ScrollLineUp +# - ScrollLineDown +# - ScrollToTop +# - ScrollToBottom +# - ClearHistory +# - Hide +# - Quit +# - ClearLogNotice +# - SpawnNewInstance +# - ToggleFullscreen +# - None +# +# Values for `action` (macOS only): +# - ToggleSimpleFullscreen: Enters fullscreen without occupying another space +# +# Values for `command`: +# The `command` field must be a map containing a `program` string and +# an `args` array of command line parameter strings. +# +# Example: +# `command: { program: "alacritty", args: ["-e", "vttest"] }` +# +# Values for `mode`: +# - ~AppCursor +# - AppCursor +# - ~AppKeypad +# - AppKeypad +# +key_bindings: + + # (Windows/Linux only) + #- { key: V, mods: Control|Shift, action: Paste } + #- { key: C, mods: Control|Shift, action: Copy } + #- { key: Insert, mods: Shift, action: PasteSelection } + #- { key: Key0, mods: Control, action: ResetFontSize } + #- { key: Equals, mods: Control, action: IncreaseFontSize } + #- { key: Add, mods: Control, action: IncreaseFontSize } + #- { key: Subtract, mods: Control, action: DecreaseFontSize } + #- { key: Minus, mods: Control, action: DecreaseFontSize } + #- { key: Return, mods: Alt, action: ToggleFullscreen } + + # (macOS only) + #- { key: Key0, mods: Command, action: ResetFontSize } + #- { key: Equals, mods: Command, action: IncreaseFontSize } + #- { key: Add, mods: Command, action: IncreaseFontSize } + #- { key: Minus, mods: Command, action: DecreaseFontSize } + #- { key: K, mods: Command, action: ClearHistory } + #- { key: K, mods: Command, chars: "\x0c" } + #- { key: V, mods: Command, action: Paste } + #- { key: C, mods: Command, action: Copy } + #- { key: H, mods: Command, action: Hide } + #- { key: Q, mods: Command, action: Quit } + #- { key: W, mods: Command, action: Quit } + #- { key: F, mods: Command|Control, action: ToggleFullscreen } + + - { key: Paste, action: Paste } + - { key: Copy, action: Copy } + - { key: L, mods: Control, action: ClearLogNotice } + - { key: L, mods: Control, chars: "\x0c" } + - { key: Home, mods: Alt, chars: "\x1b[1;3H" } + - { key: Home, chars: "\x1bOH", mode: AppCursor } + - { key: Home, chars: "\x1b[H", mode: ~AppCursor } + - { key: End, mods: Alt, chars: "\x1b[1;3F" } + - { key: End, chars: "\x1bOF", mode: AppCursor } + - { key: End, chars: "\x1b[F", mode: ~AppCursor } + - { key: PageUp, mods: Shift, action: ScrollPageUp, mode: ~Alt } + - { key: PageUp, mods: Shift, chars: "\x1b[5;2~", mode: Alt } + - { key: PageUp, mods: Control, chars: "\x1b[5;5~" } + - { key: PageUp, mods: Alt, chars: "\x1b[5;3~" } + - { key: PageUp, chars: "\x1b[5~" } + - { key: PageDown, mods: Shift, action: ScrollPageDown, mode: ~Alt } + - { key: PageDown, mods: Shift, chars: "\x1b[6;2~", mode: Alt } + - { key: PageDown, mods: Control, chars: "\x1b[6;5~" } + - { key: PageDown, mods: Alt, chars: "\x1b[6;3~" } + - { key: PageDown, chars: "\x1b[6~" } + - { key: Tab, mods: Shift, chars: "\x1b[Z" } + - { key: Back, chars: "\x7f" } + - { key: Back, mods: Alt, chars: "\x1b\x7f" } + - { key: Insert, chars: "\x1b[2~" } + - { key: Delete, chars: "\x1b[3~" } + - { key: Left, mods: Shift, chars: "\x1b[1;2D" } + - { key: Left, mods: Control, chars: "\x1b[1;5D" } + - { key: Left, mods: Alt, chars: "\x1b[1;3D" } + - { key: Left, chars: "\x1b[D", mode: ~AppCursor } + - { key: Left, chars: "\x1bOD", mode: AppCursor } + - { key: Right, mods: Shift, chars: "\x1b[1;2C" } + - { key: Right, mods: Control, chars: "\x1b[1;5C" } + - { key: Right, mods: Alt, chars: "\x1b[1;3C" } + - { key: Right, chars: "\x1b[C", mode: ~AppCursor } + - { key: Right, chars: "\x1bOC", mode: AppCursor } + - { key: Up, mods: Shift, chars: "\x1b[1;2A" } + - { key: Up, mods: Control, chars: "\x1b[1;5A" } + - { key: Up, mods: Alt, chars: "\x1b[1;3A" } + - { key: Up, chars: "\x1b[A", mode: ~AppCursor } + - { key: Up, chars: "\x1bOA", mode: AppCursor } + - { key: Down, mods: Shift, chars: "\x1b[1;2B" } + - { key: Down, mods: Control, chars: "\x1b[1;5B" } + - { key: Down, mods: Alt, chars: "\x1b[1;3B" } + - { key: Down, chars: "\x1b[B", mode: ~AppCursor } + - { key: Down, chars: "\x1bOB", mode: AppCursor } + - { key: F1, chars: "\x1bOP" } + - { key: F2, chars: "\x1bOQ" } + - { key: F3, chars: "\x1bOR" } + - { key: F4, chars: "\x1bOS" } + - { key: F5, chars: "\x1b[15~" } + - { key: F6, chars: "\x1b[17~" } + - { key: F7, chars: "\x1b[18~" } + - { key: F8, chars: "\x1b[19~" } + - { key: F9, chars: "\x1b[20~" } + - { key: F10, chars: "\x1b[21~" } + - { key: F11, chars: "\x1b[23~" } + - { key: F12, chars: "\x1b[24~" } + - { key: F1, mods: Shift, chars: "\x1b[1;2P" } + - { key: F2, mods: Shift, chars: "\x1b[1;2Q" } + - { key: F3, mods: Shift, chars: "\x1b[1;2R" } + - { key: F4, mods: Shift, chars: "\x1b[1;2S" } + - { key: F5, mods: Shift, chars: "\x1b[15;2~" } + - { key: F6, mods: Shift, chars: "\x1b[17;2~" } + - { key: F7, mods: Shift, chars: "\x1b[18;2~" } + - { key: F8, mods: Shift, chars: "\x1b[19;2~" } + - { key: F9, mods: Shift, chars: "\x1b[20;2~" } + - { key: F10, mods: Shift, chars: "\x1b[21;2~" } + - { key: F11, mods: Shift, chars: "\x1b[23;2~" } + - { key: F12, mods: Shift, chars: "\x1b[24;2~" } + - { key: F1, mods: Control, chars: "\x1b[1;5P" } + - { key: F2, mods: Control, chars: "\x1b[1;5Q" } + - { key: F3, mods: Control, chars: "\x1b[1;5R" } + - { key: F4, mods: Control, chars: "\x1b[1;5S" } + - { key: F5, mods: Control, chars: "\x1b[15;5~" } + - { key: F6, mods: Control, chars: "\x1b[17;5~" } + - { key: F7, mods: Control, chars: "\x1b[18;5~" } + - { key: F8, mods: Control, chars: "\x1b[19;5~" } + - { key: F9, mods: Control, chars: "\x1b[20;5~" } + - { key: F10, mods: Control, chars: "\x1b[21;5~" } + - { key: F11, mods: Control, chars: "\x1b[23;5~" } + - { key: F12, mods: Control, chars: "\x1b[24;5~" } + - { key: F1, mods: Alt, chars: "\x1b[1;6P" } + - { key: F2, mods: Alt, chars: "\x1b[1;6Q" } + - { key: F3, mods: Alt, chars: "\x1b[1;6R" } + - { key: F4, mods: Alt, chars: "\x1b[1;6S" } + - { key: F5, mods: Alt, chars: "\x1b[15;6~" } + - { key: F6, mods: Alt, chars: "\x1b[17;6~" } + - { key: F7, mods: Alt, chars: "\x1b[18;6~" } + - { key: F8, mods: Alt, chars: "\x1b[19;6~" } + - { key: F9, mods: Alt, chars: "\x1b[20;6~" } + - { key: F10, mods: Alt, chars: "\x1b[21;6~" } + - { key: F11, mods: Alt, chars: "\x1b[23;6~" } + - { key: F12, mods: Alt, chars: "\x1b[24;6~" } + - { key: F1, mods: Super, chars: "\x1b[1;3P" } + - { key: F2, mods: Super, chars: "\x1b[1;3Q" } + - { key: F3, mods: Super, chars: "\x1b[1;3R" } + - { key: F4, mods: Super, chars: "\x1b[1;3S" } + - { key: F5, mods: Super, chars: "\x1b[15;3~" } + - { key: F6, mods: Super, chars: "\x1b[17;3~" } + - { key: F7, mods: Super, chars: "\x1b[18;3~" } + - { key: F8, mods: Super, chars: "\x1b[19;3~" } + - { key: F9, mods: Super, chars: "\x1b[20;3~" } + - { key: F10, mods: Super, chars: "\x1b[21;3~" } + - { key: F11, mods: Super, chars: "\x1b[23;3~" } + - { key: F12, mods: Super, chars: "\x1b[24;3~" } + - { key: NumpadEnter, chars: "\n" } + +mouse: + # Click settings + # + # The `double_click` and `triple_click` settings control the time + # alacritty should wait for accepting multiple clicks as one double + # or triple click. + double_click: { threshold: 300 } + triple_click: { threshold: 300 } + + # If this is `true`, the cursor is temporarily hidden when typing. + hide_when_typing: true + + # URL launcher + # url: + # This program is executed when clicking on a text which is recognized as a URL. + # The URL is always added to the command as the last parameter. + # + # When set to `None`, URL launching will be disabled completely. + # + # Default: + # - (macOS) open + # - (Linux) xdg-open + # - (Windows) explorer + # launcher: + # program: xdg-open + # args: [] + + # These are the modifiers that need to be held down for opening URLs when clicking + # on them. The available modifiers are documented in the key binding section. + # modifiers: Control|Shift + +selection: + semantic_escape_chars: ",│`|:\"' ()[]{}<>" + + # When set to `true`, selected text will be copied to the primary clipboard. + save_to_clipboard: false + +# Startup directory +# +# Directory the shell is started in. If this is unset, or `None`, the working +# directory of the parent process will be used. +working_directory: None + +# Send ESC (\x1b) before characters when alt is pressed. +alt_send_esc: true + +# Mouse bindings +# +# Available fields: +# - mouse +# - action +# - mods (optional) +# +# Values for `mouse`: +# - Middle +# - Left +# - Right +# - Numeric identifier such as `5` +# +# All available `mods` and `action` values are documented in the key binding +# section. +mouse_bindings: + - { mouse: Middle, action: PasteSelection } + +cursor: + # Cursor style + # + # Values for 'style': + # - ▇ Block + # - _ Underline + # - | Beam + style: + blinking: Always + blinking_interval: 500 + + # If this is `true`, the cursor will be rendered as a hollow box when the + # window is not focused. + unfocused_hollow: true + +# dynamic_title: false + +# Live config reload (changes require restart) +live_config_reload: true + +debug: + # Should display the render timer + render_timer: false + + # Keep the log file after quitting Alacritty. + persistent_logging: false + + # Log level + # + # Values for `log_level`: + # - OFF + # - ERROR + # - WARN + # - INFO + # - DEBUG + # - TRACE + log_level: OFF + + # Print all received window events. + print_events: false + + # Record all characters and escape sequences as test data. + ref_test: false + +# Shell +# +# You can set shell.program to the path of your favorite shell, e.g. /bin/fish. +# Entries in shell.args are passed unmodified as arguments to the shell. +#shell: +# program: /usr/bin/zsh +# args: +# - -l +# - -c +# - "tmux" + +# vim: nospell diff --git a/.config/conky/conky.conf b/.config/conky/conky.conf new file mode 100644 index 0000000..2ab5a64 --- /dev/null +++ b/.config/conky/conky.conf @@ -0,0 +1,81 @@ +-- Conky, a system monitor https://github.com/brndnmtthws/conky +-- +-- This configuration file is Lua code. You can write code in here, and it will +-- execute when Conky loads. You can use it to generate your own advanced +-- configurations. +-- +-- Try this (remove the `--`): +-- +-- print("Loading Conky config") +-- +-- For more on Lua, see: +-- https://www.lua.org/pil/contents.html + +conky.config = { + alignment = 'top_right', + background = true, + border_width = 1, + cpu_avg_samples = 2, + default_color = 'white', + default_outline_color = 'white', + default_shade_color = 'white', + double_buffer = true, + draw_borders = false, + draw_graph_borders = true, + draw_outline = false, + draw_shades = false, + extra_newline = false, + font = 'DejaVu Sans Mono:size=12', + gap_x = 18, + gap_y = 50, + minimum_height = 5, + minimum_width = 5, + net_avg_samples = 2, + no_buffers = true, + out_to_console = false, + out_to_ncurses = false, + out_to_stderr = false, + out_to_x = true, + own_window = true, + own_window_class = 'Conky', + own_window_transparent = false, + own_window_argb_visual = true, + own_window_argb_value = 60, + own_window_type = 'override', + show_graph_range = false, + show_graph_scale = false, + stippled_borders = 0, + update_interval = 1.0, + uppercase = false, + use_spacer = 'none', + use_xft = true, +} + +conky.text = [[ +${color magenta}INF:$color $sysname $kernel $machine +$hr +${color magenta}UPT:$color $uptime +${color magenta}FRQ:$color $freq MHz +${color magenta}FRQ:$color $freq_g GHz +${color magenta}RAM:$color $mem/$memmax - $memperc% ${membar 4} +${color magenta}SWP:$color $swap/$swapmax - $swapperc% ${swapbar 4} +${color magenta}CPU:$color $cpu% ${cpubar 4} +${color magenta}PRO:$color $processes ${color magenta}RUN:$color $running_processes +$hr +${color magenta}SDA: $color${fs_used /}/${fs_size /} ${fs_bar 6 /} +${color magenta}SDB: $color${fs_used /run/media/suwako/5ee60164-691b-424d-93e0-378c8c39db8e}/${fs_size /run/media/suwako/5ee60164-691b-424d-93e0-378c8c39db8e} ${fs_bar 6 /run/media/suwako/5ee60164-691b-424d-93e0-378c8c39db8e} +${color magenta}SDC: $color${fs_used /run/media/suwako/MEGA-SSD}/${fs_size /run/media/suwako/MEGA-SSD} ${fs_bar 6 /run/media/suwako/MEGA-SSD} +$hr +${color magenta}NET: +U:$color ${upspeed} ${color magenta} - D:$color ${downspeed} +${color magenta}IP: $color${addr enp8s0} +$hr +${color orange}XMR: $color${curl rate.sx/1xmr} +${color orange}BTC: $color${curl rate.sx/1btc} +$hr +${color magenta}Name PID CPU% MEM% +${color cyan} ${top name 1} ${top pid 1} ${top cpu 1} ${top mem 1} +${color cyan} ${top name 2} ${top pid 2} ${top cpu 2} ${top mem 2} +${color cyan} ${top name 3} ${top pid 3} ${top cpu 3} ${top mem 3} +${color cyan} ${top name 4} ${top pid 4} ${top cpu 4} ${top mem 4} +]] diff --git a/.config/i3/config b/.config/i3/config new file mode 100644 index 0000000..1cf91d7 --- /dev/null +++ b/.config/i3/config @@ -0,0 +1,175 @@ +# set modifier +set $super Mod4 +set $alt Mod1 + +# set font +font pango: Noto Sans 8 + +# Use Mouse+$super to drag floating windows to their wanted position +floating_modifier $super + +# autostart +exec --no-startup-id fcitx5 +exec --no-startup-id hsetroot -center ~/.local/share/wallpapers/89596288_p0.png +exec --no-startup-id xsettingsd & +#exec --no-startup-id compton -b -i 1 --shadow-red 1.0 --shadow-blue 1.0 --inactive-dim 0.5 --shadow-offset-x 1 --shadow-offset-y 1 +exec --no-startup-id picom -b -i 1 --inactive-dim 0.5 + +# screenlock +exec --no-startup-id xset s off +exec --no-startup-id xset -dpms +exec --no-startup-id xset s noblank + +# start a terminal +bindsym $super+Return exec alacritty + +# start dmenu (a program launcher) +bindsym $super+Shift+d exec i3-dmenu-desktop --dmenu="dmenu -i -fn 'Noto Sans:size=8'" +bindsym $super+d exec rofi -lines 12 -padding 18 -width 60 -location 0 -show drun -sidebar-mode -columns 3 -font 'Noto Sans 8' + +# common apps keybinds +bindsym Print exec scrot 'Cheese_%a-%d%b%y_%H.%M.png' -e 'sxiv ~/$f' +bindsym $super+l exec i3lock -i ~/.local/share/wallpapers/d-abstract-k--wallpaper-1920x1080-wallpaper.jpg +bindsym $super+Shift+w exec firefox +bindsym $super+Shift+f exec thunar;workspace 3;focus +bindsym $super+Shift+g exec geany + +#change volume +bindsym XF86AudioRaiseVolume exec amixer -q set Master 5%+ +bindsym XF86AudioLowerVolume exec amixer -q set Master 5%- +bindsym XF86AudioMute exec amixer set Master toggle + +# music control +bindsym XF86AudioNext exec mpc next +bindsym XF86AudioPrev exec mpc prev +bindsym XF86AudioPlay exec mpc toggle +bindsym XF86AudioStop exec mpc stop + +# kill focused window +bindsym $super+c kill +bindsym $alt+F4 kill + +# change focus +bindsym $super+Left focus left +bindsym $super+Down focus down +bindsym $super+Up focus up +bindsym $super+Right focus right + +# move focused window +bindsym $super+Shift+Left move left +bindsym $super+Shift+Down move down +bindsym $super+Shift+Up move up +bindsym $super+Shift+Right move right + +# split in horizontal orientation +bindsym $super+h split h + +# split in vertical orientation +bindsym $super+v split v + +# enter fullscreen mode for the focused container +bindsym $super+f fullscreen toggle + +# change container layout split +bindsym $super+s layout toggle split + +# toggle tiling / floating +bindsym $super+space floating toggle + +# change focus between tiling / floating windows +bindsym $super+Shift+space focus mode_toggle + +# switch to workspace +bindsym $alt+Control+Right workspace next +bindsym $alt+Control+Left workspace prev +bindsym $super+1 workspace 1 +bindsym $super+2 workspace 2 +bindsym $super+3 workspace 3 +bindsym $super+4 workspace 4 +bindsym $super+5 workspace 5 +bindsym $super+6 workspace 6 +bindsym $super+7 workspace 7 +bindsym $super+8 workspace 8 +bindsym $super+9 workspace 9 + +# move focused container to workspace +bindsym $super+Shift+1 move container to workspace 1 +bindsym $super+Shift+2 move container to workspace 2 +bindsym $super+Shift+3 move container to workspace 3 +bindsym $super+Shift+4 move container to workspace 4 +bindsym $super+Shift+5 move container to workspace 5 +bindsym $super+Shift+6 move container to workspace 6 +bindsym $super+Shift+7 move container to workspace 7 +bindsym $super+Shift+8 move container to workspace 8 +bindsym $super+Shift+9 move container to workspace 9 + +# restart i3 inplace (preserves your layout/session, can be used to upgrade i3) +bindsym $super+Shift+r restart + +# exit i3 +bindsym $super+q exec "i3-nagbar -t warning -m 'ログアウトするの?' -b 'Yes' 'i3-msg exit'" +bindsym $super+Shift+q exec "i3-nagbar -t warning -m 'シャットダウンするの?' -b 'Yes' 'shutdown -h now'" + +# resize window (you can also use the mouse for that) +mode "resize" { + bindsym Left resize shrink width 5 px or 5 ppt + bindsym Down resize grow height 5 px or 5 ppt + bindsym Up resize shrink height 5 px or 5 ppt + bindsym Right resize grow width 5 px or 5 ppt + bindsym Return mode "default" + bindsym Escape mode "default" +} +bindsym $super+r mode "resize" + +# panel +#bar { +# workspace_buttons yes +# position top +# colors { +# background #232629 +# statusline #232629 +# separator #4f4f4f +# +# # colour of border, background, and text +# focused_workspace #ed1515 #da4453 #fcfcfc +# active_workspace #95a5a6 #31363b #fcfcfc +# inactive_workspace #95a5a6 #31363b #fcfcfc +# urgent_workspace #2f343f #ebcb8b #2f343f +# } +# status_command i3status +#} + +# Start polybar instead of i3bar +exec_always --no-startup-id $HOME/.config/polybar/launch.sh +exec_always --no-startup-id conky + +# window rules, you can find the window class using xprop +for_window [class=".*"] border pixel 4 +assign [class=qutebrowser] 1 +assign [class=Gajim|nheko|Geary] 2 +assign [class=Thunar|File-roller] 3 +assign [class=Geany|Evince|Gucharmap|Soffice|libreoffice*] 4 +assign [class=Audacity|Vlc|mpv|Ghb|Xfburn|Gimp*|Inkscape] 5 +assign [class=Lxappearance|System-config-printer.py|Lxtask|GParted|Pavucontrol|Exo-helper*|Lxrandr|Arandr] 6 +for_window [class=sxiv|feh|Audacious|File-roller|Lxappearance|Lxtask|Pavucontrol] floating enable +for_window [class=URxvt|Firefox|Geany|Evince|Soffice|libreoffice*|mpv|Ghb|Xfburn|Gimp*|Inkscape|Vlc|Lxappearance|Audacity] focus +for_window [class=Xfburn|GParted|System-config-printer.py|Lxtask|Pavucontrol|Exo-helper*|Lxrandr|Arandr] focus + +# colour of border, background, text, indicator, and child_border +client.focused #bf616a #232629 #fcfcfc #e93de9 #e93de9 +client.focused_inactive #232629 #232629 #fcfcfc #232629 #232629 +client.unfocused #232629 #232629 #fcfcfc #232629 #232629 +client.urgent #232629 #232629 #fcfcfc #232629 #232629 +client.placeholder #232629 #232629 #fcfcfc #232629 #232629 +client.background #232629 + +for_window [class=".*"] border pixel 4 +for_window [class=".*"] border_radius 50 +#gaps inner all set 20 +gaps inner 14 +gaps outer 10 +#smart_gaps on +smart_gaps inverse_outer + +smart_borders on +#smart_borders no_gaps diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim new file mode 100644 index 0000000..113f739 --- /dev/null +++ b/.config/nvim/init.vim @@ -0,0 +1,254 @@ +" vim: set sw=2 ts=2 et foldlevel=0 foldmethod=marker: +" +if empty(glob('~/.local/share/nvim/site/autoload/plug.vim')) + silent !curl -fLo ~/.local/share/nvim/site/autoload/plug.vim --create-dirs + \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim + autocmd VimEnter * PlugInstall --sync | source $MYVIMRC +endif + +call plug#begin('~/.vim/plugged') +" Plug 'takac/vim-hardtime' +Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --no-bash' } +Plug 'junegunn/fzf.vim' +Plug 'scrooloose/nerdtree' +Plug 'jiangmiao/auto-pairs' +Plug 'itchyny/lightline.vim' +Plug 'nvim-lua/popup.nvim' +Plug 'nvim-lua/plenary.nvim' +"Plug 'nvim-cmp' +Plug 'nvim-telescope/telescope.nvim' +Plug 'kyazdani42/nvim-web-devicons' +Plug 'hoob3rt/lualine.nvim' +" {{{ +if 0 " toggle 0/1 for powerline + let g:lightline = { + \ 'colorscheme': 'seoul256', + \ 'separator': { 'left': '', 'right': '' }, + \ 'subseparator': { 'left': '', 'right': '' }, + \ 'component': { + \ 'readonly': '%{&readonly?"":""}', + \ } + \ } +else + let g:lightline = { + \ 'colorscheme': 'solarized', + \ 'subseparator': { 'left': '>', 'right': '' } + \ } + " \ 'separator': { 'left': '▓▒░', 'right': '░▒▓' }, +endif +" }}} +"Plug 'yuezk/vim-js' +"Plug 'maxmellon/vim-jsx-pretty' +""{{{ +"let g:polyglot_disabled = ['jsx'] +""}}} +Plug 'sheerun/vim-polyglot' +Plug 'tpope/vim-commentary' +Plug 'tpope/vim-fugitive' +" Plug 'joshdick/onedark.vim' +" Plug 'Th3Whit3Wolf/one-nvim' +Plug 'airblade/vim-rooter' +"Plug 'styled-components/vim-styled-components', { 'branch': 'main' } +Plug 'djoshea/vim-autoread' +Plug 'bkad/camelcasemotion' +Plug 'tpope/vim-surround' +Plug 'maxbrunsfeld/vim-yankstack' +Plug 'simeji/winresizer' +Plug 'neovim/nvim-lspconfig' +Plug 'hrsh7th/nvim-compe' +Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'} +" Plug 'christianchiarulli/nvcode-color-schemes.vim' +Plug 'smarquez1/nvcode-color-schemes.vim', { 'branch': 'patch-1' } +call plug#end() + +" Split window nativation +" CTRL + W → h = horizontal split +" CTRL + W → s = vertical split +nmap :wincmd k +nmap :wincmd j +nmap :wincmd h +nmap :wincmd l + +" Split window resize +nmap - +nmap + +nmap < +nmap > + +" Color scheme configuration +set termguicolors +let &t_8f = "\[38;2;%lu;%lu;%lum" +let &t_8b = "\[48;2;%lu;%lu;%lum" +colorscheme onedark +set mousefocus + +" Relative line numbers + current line as absolute +set number relativenumber +set nu rnu + +" Open NERDTree when directory is opened +autocmd StdinReadPre * let s:std_in=1 +autocmd VimEnter * if argc() == 1 && isdirectory(argv()[0]) && !exists("s:std_in") | exe 'NERDTree' argv()[0] | wincmd p | ene | exe 'cd '.argv()[0] | endif + +" Execute NERDTreeFind on ctrl+n +function MyNerdToggle() + if &filetype == 'nerdtree' || exists("g:NERDTree") && g:NERDTree.IsOpen() + :NERDTreeToggle + else + :NERDTreeFind + endif +endfunction +nnoremap :call MyNerdToggle() +let g:NERDTreeMapActivateNode = '' +let g:NERDTreeMapOpenInTab = 't' +let g:NERDTreeWinPos = "left" +nmap ,n :NERDTreeToggle + +" Space as leader +let mapleader = " " + +" Change leader key timeout +set timeoutlen=1500 + +" Two spaces for fzf +nnoremap :Files + +" Enable syntax highlight +syntax on + +" if hidden is not set, TextEdit might fail. +set hidden +set lazyredraw +set tabstop=2 + +set shiftwidth=2 +set shiftround + +" Some servers have issues with backup files, see #649 +set nobackup +set nowritebackup + +" You will have bad experience for diagnostic messages when it's default 4000. +set updatetime=300 + +" don't give |ins-completion-menu| messages. +set shortmess+=c + +" always show signcolumns +set signcolumn=yes + +" Use system buffer +set clipboard+=unnamedplus + +" Save on focus loose +:au FocusLost * :wa + +" Spaces instead of tabs +set softtabstop=2 +set expandtab + +" Enable mouse clicks +set mouse=a +map +map + +" Open git status after space gst +nnoremap gst :GFiles? +nnoremap gf GFiles + +" Telescope +nnoremap ff Telescope find_files +nnoremap fg Telescope live_grep +nnoremap fb Telescope buffers +nnoremap fh Telescope help_tags + + +" Start searching before pressing enter +set incsearch + +" Use camel case motion for words +map w CamelCaseMotion_w +map b CamelCaseMotion_b +map e CamelCaseMotion_e +map ge CamelCaseMotion_ge +sunmap w +sunmap b +sunmap e +sunmap ge + +" Remap autopair to prevent conflict with yarn-stack +let g:AutoPairsShortcutToggle = '' + + +" Import LSP configs +lua require('lsp-config') + +" nvim-compe +set completeopt=menuone,noselect +let g:compe = {} +let g:compe.enabled = v:true +let g:compe.autocomplete = v:true +let g:compe.debug = v:false +let g:compe.min_length = 1 +let g:compe.preselect = 'enable' +let g:compe.throttle_time = 80 +let g:compe.source_timeout = 200 +let g:compe.incomplete_delay = 400 +let g:compe.max_abbr_width = 100 +let g:compe.max_kind_width = 100 +let g:compe.max_menu_width = 100 +let g:compe.documentation = v:true + +let g:compe.source = {} +let g:compe.source.path = v:true +let g:compe.source.buffer = v:true +let g:compe.source.calc = v:true +let g:compe.source.nvim_lsp = v:true +let g:compe.source.nvim_lua = v:true +let g:compe.source.vsnip = v:true + +" Show diagnostics in popup +autocmd CursorHold * lua vim.diagnostic.open_float() +autocmd CursorHoldI * silent! lua vim.lsp.buf.signature_help() + +let g:winresizer_start_key = '' + +" Tabline +function MyTabLine() + let s = '' + for i in range(tabpagenr('$')) + " select the highlighting + if i + 1 == tabpagenr() + let s .= '%#TabLineSel#' + else + let s .= '%#TabLine#' + endif + " set the tab page number (for mouse clicks) + let s .= '%' . (i + 1) . 'T' + " the label is made by MyTabLabel() + let s .= ' %{MyTabLabel(' . (i + 1) . ')} ' + if i + 1 == tabpagenr() + let s .= '%#TabLineSep#ÓÇ∞' + elseif i + 2 == tabpagenr() + let s .= '%#TabLineSep2#ÓÇ∞' + else + let s .= 'ÓDZ' + endif + endfor + " after the last tab fill with TabLineFill and reset tab page nr + let s .= '%#TabLineFill#%T' + " right-align the label to close the current tab page + if tabpagenr('$') > 1 + let s .= '%=%#TabLine#%999X' + endif + return s +endfunction +function MyTabLabel(n) + let buflist = tabpagebuflist(a:n) + let winnr = tabpagewinnr(a:n) + let name = bufname(buflist[winnr - 1]) + let label = fnamemodify(name, ':t') + return len(label) == 0 ? '[No Name]' : label +endfunction +set tabline=%!MyTabLine() + diff --git a/.config/nvim/lua/lsp-config.lua b/.config/nvim/lua/lsp-config.lua new file mode 100644 index 0000000..36f7881 --- /dev/null +++ b/.config/nvim/lua/lsp-config.lua @@ -0,0 +1,103 @@ +local nvim_lsp = require("lspconfig") + +-- Add various shortcuts +local on_attach = function(client, bufnr) + local buf_map = vim.api.nvim_buf_set_keymap + vim.cmd("command! LspDef lua vim.lsp.buf.definition()") + vim.cmd("command! LspFormatting lua vim.lsp.buf.formatting()") + vim.cmd("command! LspCodeAction lua vim.lsp.buf.code_action()") + vim.cmd("command! LspHover lua vim.lsp.buf.hover()") + vim.cmd("command! LspRename lua vim.lsp.buf.rename()") + vim.cmd("command! LspRefs lua vim.lsp.buf.references()") + vim.cmd("command! LspTypeDef lua vim.lsp.buf.type_definition()") + vim.cmd("command! LspImplementation lua vim.lsp.buf.implementation()") + vim.cmd("command! LspDiagPrev lua vim.lsp.diagnostic.goto_prev()") + vim.cmd("command! LspDiagNext lua vim.lsp.diagnostic.goto_next()") + vim.cmd( + "command! LspDiagLine lua vim.diagnostic.open_float()") + vim.cmd("command! LspSignatureHelp lua vim.lsp.buf.signature_help()") + + buf_map(bufnr, "n", "gd", ":LspDef", {silent = true}) + buf_map(bufnr, "n", "rn", ":LspRename", {silent = true}) + buf_map(bufnr, "n", "gr", ":LspRefs", {silent = true}) + buf_map(bufnr, "n", "gi", ":LspImplementation", {silent = true}) + buf_map(bufnr, "n", "gy", ":LspTypeDef", {silent = true}) + buf_map(bufnr, "n", "K", ":LspHover", {silent = true}) + buf_map(bufnr, "n", "[c", ":LspDiagPrev", {silent = true}) + buf_map(bufnr, "n", "]c", ":LspDiagNext", {silent = true}) + buf_map(bufnr, "n", "ga", ":LspCodeAction", {silent = true}) + buf_map(bufnr, "n", "a", ":LspDiagLine", {silent = true}) + buf_map(bufnr, "i", "", " LspSignatureHelp", {silent = true}) + + if client.resolved_capabilities.document_formatting then + vim.api.nvim_exec([[ + augroup LspAutocommands + autocmd! * + autocmd BufWritePost LspFormatting + augroup END + ]], true) + end +end + +-- Typescript setup +nvim_lsp.tsserver.setup { + on_attach = function(client) + client.resolved_capabilities.document_formatting = false + on_attach(client) + end +} + +-- Formatter setup +local eslint = { + lintCommand = "eslint_d -f unix --stdin --stdin-filename ${INPUT}", + lintStdin = true, + lintFormats = {"%f:%l:%c: %m"}, + lintIgnoreExitCode = true, + formatCommand = "eslint_d --fix-to-stdout --stdin --stdin-filename=${INPUT}", + formatStdin = true +} +nvim_lsp.efm.setup { + on_attach = function(client) + client.resolved_capabilities.document_formatting = true + client.resolved_capabilities.goto_definition = false + on_attach(client) + end, + root_dir = function() + return vim.fn.getcwd() + end, + settings = { + languages = { + javascript = {eslint}, + javascriptreact = {eslint}, + ["javascript.jsx"] = {eslint}, + typescript = {eslint}, + ["typescript.tsx"] = {eslint}, + typescriptreact = {eslint} + } + }, + filetypes = { + "javascript", + "javascriptreact", + "javascript.jsx", + "typescript", + "typescript.tsx", + "typescriptreact" + }, +} + +-- Show diagnostics in popup +vim.lsp.handlers["textDocument/publishDiagnostics"] = vim.lsp.with( + vim.lsp.diagnostic.on_publish_diagnostics, { + virtual_text = false, + underline = true, + signs = true, + } +) + +-- Tree sitter setup +require'nvim-treesitter.configs'.setup { + ensure_installed = "maintained", + highlight = { + enable = true, + }, +} diff --git a/.config/picom.conf b/.config/picom.conf new file mode 100644 index 0000000..f3d45e1 --- /dev/null +++ b/.config/picom.conf @@ -0,0 +1,419 @@ +################################# +# 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. +# +# shadow = false +shadow = true; + +# The blur radius for shadows, in pixels. (defaults to 12) +# shadow-radius = 12 +shadow-radius = 7; + +# The opacity of shadows. (0.0 - 1.0, defaults to 0.75) +# shadow-opacity = .75 + +# The left offset for shadows, in pixels. (defaults to -15) +# shadow-offset-x = -15 +shadow-offset-x = -7; + +# The top offset for shadows, in pixels. (defaults to -15) +# shadow-offset-y = -15 +shadow-offset-y = -7; + +# Red color value of shadow (0.0 - 1.0, defaults to 0). +# shadow-red = 0 + +# Green color value of shadow (0.0 - 1.0, defaults to 0). +# shadow-green = 0 + +# Blue color value of shadow (0.0 - 1.0, defaults to 0). +# shadow-blue = 0 + +# Hex string color value of shadow (#000000 - #FFFFFF, defaults to #000000). This option will override options set shadow-(red/green/blue) +# shadow-color = "#000000" + +# Specify a list of conditions of windows that should have no shadow. +# +# examples: +# shadow-exclude = "n:e:Notification"; +# +# shadow-exclude = [] +shadow-exclude = [ + "name = 'Notification'", + "class_g = 'Conky'", + "class_g ?= 'Notify-osd'", + "class_g = 'Cairo-clock'", + "_GTK_FRAME_EXTENTS@:c" +]; + +# Specify a list of conditions of windows that should have no shadow painted over, such as a dock window. +# clip-shadow-above = [] + +# Specify a X geometry that describes the region in which shadow should not +# be painted in, such as a dock window region. Use +# shadow-exclude-reg = "x10+0+0" +# for example, if the 10 pixels on the bottom of the screen should not have shadows painted on. +# +# shadow-exclude-reg = "" + +# Crop shadow of a window fully on a particular Xinerama screen to the screen. +# xinerama-shadow-crop = false + + +################################# +# Fading # +################################# + + +# Fade windows in/out when opening/closing and when opacity changes, +# unless no-fading-openclose is used. +#fading = false +fading = true; + +# Opacity change between steps while fading in. (0.01 - 1.0, defaults to 0.028) +# fade-in-step = 0.028 +fade-in-step = 0.03; + +# Opacity change between steps while fading out. (0.01 - 1.0, defaults to 0.03) +# fade-out-step = 0.03 +fade-out-step = 0.03; + +# The time between steps in fade step, in milliseconds. (> 0, defaults to 10) +# fade-delta = 10 + +# Specify a list of conditions of windows that should not be faded. +# fade-exclude = [] + +# 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 inactive windows. (0.1 - 1.0, defaults to 1.0) +inactive-opacity = 1 +#inactive-opacity = 0.8; + +# Opacity of window titlebars and borders. (0.1 - 1.0, disabled by default) +# frame-opacity = 1.0 +frame-opacity = 0.7; + +# Let inactive opacity set by -i override the '_NET_WM_OPACITY' values of windows. +# inactive-opacity-override = true +inactive-opacity-override = false; + +# Default opacity for active windows. (0.0 - 1.0, defaults to 1.0) +# active-opacity = 1.0 + +# Dim inactive windows. (0.0 - 1.0, defaults to 0.0) +inactive-dim = 0.5 + +# Specify a list of conditions of windows that should never be considered focused. +# focus-exclude = [] +focus-exclude = [ "class_g = 'Cairo-clock'" ]; + +# Use fixed inactive dim value, instead of adjusting according to window opacity. +# inactive-dim-fixed = 1.0 + +# Specify a list of opacity rules, in the format `PERCENT:PATTERN`, +# like `50:name *= "Firefox"`. picom-trans is recommended over this. +# Note we don't make any guarantee about possible conflicts with other +# programs that set '_NET_WM_WINDOW_OPACITY' on frame or client windows. +# example: +# opacity-rule = [ "80:class_g = 'URxvt'" ]; +# +# opacity-rule = [] + + +################################# +# 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`. +corner-radius = 0 + +# Exclude conditions for rounded corners. +rounded-corners-exclude = [ + "window_type = 'dock'", + "window_type = 'desktop'" +]; + + +################################# +# Background-Blurring # +################################# + + +# Parameters for background blurring, see the *BLUR* section for more information. +#blur-method = "kernel" +blur-size = 92 + +blur-deviation = false + +blur-strength = 99 + +# Blur background of semi-transparent / ARGB windows. +# Bad in performance, with driver-dependent behavior. +# The name of the switch may change without prior notifications. +# +blur-background = false + +# Blur background of windows when the window frame is not opaque. +# Implies: +# blur-background +# Bad in performance, with driver-dependent behavior. The name may change. +# +blur-background-frame = false + + +# Use fixed blur strength rather than adjusting according to window opacity. +blur-background-fixed = false + + +# 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"; +# +# blur-kern = "" +blur-kern = "3x3box"; + + +# Exclude conditions for background blur. +# blur-background-exclude = [] +blur-background-exclude = [ + "window_type = 'dock'", + #"window_type = 'desktop'", + "_GTK_FRAME_EXTENTS@:c" +]; + +################################# +# General Settings # +################################# + +# Daemonize process. Fork to background after initialization. Causes issues with certain (badly-written) drivers. +# daemon = false + +# Specify the backend to use: `xrender`, `glx`, or `xr_glx_hybrid`. +# `xrender` is the default one. +# +# backend = "glx" +backend = "xrender"; + +# Enable/disable VSync. +# vsync = false +vsync = true; + +# Enable remote control via D-Bus. See the *D-BUS API* section below for more details. +# dbus = false + +# Try to detect WM windows (a non-override-redirect window with no +# child that has 'WM_STATE') and mark them as active. +# +# mark-wmwin-focused = false +mark-wmwin-focused = true; + +# Mark override-redirect windows that doesn't have a child window with 'WM_STATE' focused. +# mark-ovredir-focused = false +mark-ovredir-focused = true; + +# Try to detect windows with rounded corners and don't consider them +# shaped windows. The accuracy is not very high, unfortunately. +# +# detect-rounded-corners = false +detect-rounded-corners = true; + +# Detect '_NET_WM_OPACITY' on client windows, useful for window managers +# not passing '_NET_WM_OPACITY' of client windows to frame windows. +# +# detect-client-opacity = false +detect-client-opacity = true; + +# Specify refresh rate of the screen. If not specified or 0, picom will +# try detecting this with X RandR extension. +# +# refresh-rate = 60 +refresh-rate = 0; + +# Use EWMH '_NET_ACTIVE_WINDOW' to determine currently focused window, +# rather than listening to 'FocusIn'/'FocusOut' event. Might have more accuracy, +# provided that the WM supports it. +# +# use-ewmh-active-win = false + +# 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. +# +# unredir-if-possible = false + +# Delay before unredirecting the window, in milliseconds. Defaults to 0. +# unredir-if-possible-delay = 0 + +# Conditions of windows that shouldn't be considered full-screen for unredirecting screen. +# unredir-if-possible-exclude = [] + +# Use 'WM_TRANSIENT_FOR' to group windows, and consider windows +# in the same group focused at the same time. +# +# detect-transient = 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. +# +# detect-client-leader = false + +# Resize damaged region by a specific number of pixels. +# A positive value enlarges it while a negative one shrinks it. +# If the value is positive, those additional pixels will not be actually painted +# to screen, only used in blur calculation, and such. (Due to technical limitations, +# with use-damage, those pixels will still be incorrectly painted to screen.) +# Primarily used to fix the line corruption issues of blur, +# in which case you should use the blur radius value here +# (e.g. with a 3x3 kernel, you should use `--resize-damage 1`, +# with a 5x5 one you use `--resize-damage 2`, and so on). +# May or may not work with *--glx-no-stencil*. Shrinking doesn't function correctly. +# +# resize-damage = 1 + +# Specify a list of conditions of windows that should be painted with inverted color. +# Resource-hogging, and is not well tested. +# +# invert-color-include = [] + +# GLX backend: Avoid using stencil buffer, useful if you don't have a stencil buffer. +# Might cause incorrect opacity when rendering transparent content (but never +# practically happened) and may not work with blur-background. +# My tests show a 15% performance boost. Recommended. +# +# glx-no-stencil = false + +# GLX backend: Avoid rebinding pixmap on window damage. +# Probably could improve performance on rapid window content changes, +# but is known to break things on some drivers (LLVMpipe, xf86-video-intel, etc.). +# Recommended if it works. +# +# glx-no-rebind-pixmap = false + +# Disable the use of damage information. +# This cause the whole screen to be redrawn everytime, instead of the part of the screen +# has actually changed. Potentially degrades the performance, but might fix some artifacts. +# The opposing option is use-damage +# +# no-use-damage = false +use-damage = true; + +# Use X Sync fence to sync clients' draw calls, to make sure all draw +# calls are finished before picom starts drawing. Needed on nvidia-drivers +# with GLX backend for some users. +# +# xrender-sync-fence = false + +# GLX backend: Use specified GLSL fragment shader for rendering window contents. +# See `compton-default-fshader-win.glsl` and `compton-fake-transparency-fshader-win.glsl` +# in the source tree for examples. +# +# glx-fshader-win = "" + +# Force all windows to be painted with blending. Useful if you +# have a glx-fshader-win that could turn opaque pixels transparent. +# +# 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. +# +# 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) +# +# max-brightness = 1.0 + +# Make transparent windows clip other windows like non-transparent windows do, +# instead of blending on top of them. +# +# transparent-clipping = false + +# Set the log level. Possible values are: +# "trace", "debug", "info", "warn", "error" +# in increasing level of importance. Case doesn't matter. +# 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. +# +# log-level = "debug" +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" + +# Show all X errors (for debugging) +# show-all-xerrors = false + +# Write process ID to a file. +# write-pid-path = "/path/to/your/log/file" + +# Window type settings +# +# 'WINDOW_TYPE' is one of the 15 window types defined in EWMH standard: +# "unknown", "desktop", "dock", "toolbar", "menu", "utility", +# "splash", "dialog", "normal", "dropdown_menu", "popup_menu", +# "tooltip", "notification", "combo", and "dnd". +# +# Following per window-type options are available: :: +# +# fade, shadow::: +# Controls window-type-specific shadow and fade settings. +# +# opacity::: +# Controls default opacity of the window type. +# +# focus::: +# Controls whether the window of this type is to be always considered focused. +# (By default, all window types except "normal" and "dialog" has this on.) +# +# full-shadow::: +# Controls whether shadow is drawn under the parts of the window that you +# normally won't be able to see. Useful when the window has parts of it +# transparent, and you want shadows in those areas. +# +# clip-shadow-above::: +# Controls wether shadows that would have been drawn above the window should +# be clipped. Useful for dock windows that should have no shadow painted on top. +# +# redir-ignore::: +# Controls whether this type of windows should cause screen to become +# redirected again after been unredirected. If you have unredir-if-possible +# set, and doesn't want certain window to cause unnecessary screen redirection, +# you can set this to `true`. +# +wintypes: +{ + tooltip = { fade = true; shadow = true; opacity = 0.75; focus = true; full-shadow = false; }; + dock = { shadow = false; clip-shadow-above = true; } + dnd = { shadow = false; } + popup_menu = { opacity = 0.8; } + dropdown_menu = { opacity = 0.8; } +}; diff --git a/.config/polybar/bar.ini b/.config/polybar/bar.ini new file mode 100644 index 0000000..06785aa --- /dev/null +++ b/.config/polybar/bar.ini @@ -0,0 +1,50 @@ +[bar/example] +;monitor = ${env:MONITOR:HDMI-1} +monitor = ${env:MONITOR:} +width = 100% +height = 30 +;offset-x = 1% +;offset-y = 1% +radius = 6.0 +fixed-center = false + +background = ${colors.background} +foreground = ${colors.foreground} + +line-size = 3 +line-color = #f00 + +border-size = 4 +border-color = #00000000 + +padding-left = 0 +padding-right = 2 + +module-margin-left = 1 +module-margin-right = 2 + +font-0 = "SauceCodePro Nerd Font:style=Regular:size=15;4" +font-1 = "FontAwesome:style=Regular:size=10;4" +font-2 = "Noto Sans:size=11;1" + +modules-left = bspwm i3 +;modules-center = mpd +modules-right = filesystem xbacklight alsa pulseaudio xkeyboard memory cpu wlan eth battery temperature date fcitx powermenu + +tray-position = right +tray-padding = 2 +;tray-background = #0063ff + +;wm-restack = bspwm +wm-restack = i3 + +;override-redirect = true + +;scroll-up = bspwm-desknext +;scroll-down = bspwm-deskprev + +scroll-up = i3-next +scroll-down = i3-prev + +cursor-click = pointer +cursor-scroll = ns-resize diff --git a/.config/polybar/blocks/blocks_none.ini b/.config/polybar/blocks/blocks_none.ini new file mode 100644 index 0000000..898fc7a --- /dev/null +++ b/.config/polybar/blocks/blocks_none.ini @@ -0,0 +1,29 @@ +; --------------------------------------------- +; Alter Linux i3wm edition +; polybar block module (none) +; +; Watasuke +; Twitter: @Watasuke102 +; Email : Watasuke102@gmail.com +; +; (c) 2020 Fascode Network. +; --------------------------------------------- + + +; block (each module begin and end) +[module/block-base] +type = custom/text +content-background = ${color.bg-bar} +content-foreground = ${color.block} +[module/left-begin] +inherit = module/block-base +content = " " +[module/left-end] +inherit = module/block-base +content = " " +[module/right-begin] +inherit = module/block-base +content = " " +[module/right-end] +inherit = module/block-base +content = " " diff --git a/.config/polybar/blocks/blocks_round.ini b/.config/polybar/blocks/blocks_round.ini new file mode 100644 index 0000000..6e9321b --- /dev/null +++ b/.config/polybar/blocks/blocks_round.ini @@ -0,0 +1,33 @@ +; --------------------------------------------- +; Alter Linux i3wm edition +; polybar block module (round) +; +; Watasuke +; Twitter: @Watasuke102 +; Email : Watasuke102@gmail.com +; +; (c) 2020 Fascode Network. +; --------------------------------------------- + + +; block (each module begin and end) +[module/block-base] +type = custom/text +content-background = ${color.bg-bar} +content-foreground = ${color.block} +; (| +[module/left-begin] +inherit = module/block-base +content = "" +; |) +[module/left-end] +inherit = module/block-base +content = " " +; (| +[module/right-begin] +inherit = module/block-base +content = "" +; |) +[module/right-end] +inherit = module/block-base +content = " " diff --git a/.config/polybar/blocks/blocks_sharp.ini b/.config/polybar/blocks/blocks_sharp.ini new file mode 100644 index 0000000..bcc3e4f --- /dev/null +++ b/.config/polybar/blocks/blocks_sharp.ini @@ -0,0 +1,34 @@ + +; --------------------------------------------- +; Alter Linux i3wm edition +; polybar block module (sharp) +; +; Watasuke +; Twitter: @Watasuke102 +; Email : Watasuke102@gmail.com +; +; (c) 2020 Fascode Network. +; --------------------------------------------- + + +; block (each module begin and end) +[module/block-base] +type = custom/text +content-background = ${color.bg-bar} +content-foreground = ${color.block} +; \| +[module/left-begin] +inherit = module/block-base +content = " " +; |\ +[module/left-end] +inherit = module/block-base +content = " " +; /| +[module/right-begin] +inherit = module/block-base +content = " " +; |/ +[module/right-end] +inherit = module/block-base +content = " " diff --git a/.config/polybar/blocks/blocks_sharprev.ini b/.config/polybar/blocks/blocks_sharprev.ini new file mode 100644 index 0000000..014f599 --- /dev/null +++ b/.config/polybar/blocks/blocks_sharprev.ini @@ -0,0 +1,33 @@ +; --------------------------------------------- +; Alter Linux i3wm edition +; polybar block module (sharp) +; +; Watasuke +; Twitter: @Watasuke102 +; Email : Watasuke102@gmail.com +; +; (c) 2020 Fascode Network. +; --------------------------------------------- + + +; block (each module begin and end) +[module/block-base] +type = custom/text +content-background = ${color.bg-bar} +content-foreground = ${color.block} +;\| +[module/right-begin] +inherit = module/block-base +content = " " +; |\ +[module/right-end] +inherit = module/block-base +content = " " +; /| +[module/left-begin] +inherit = module/block-base +content = " " +; |/ +[module/left-end] +inherit = module/block-base +content = " " diff --git a/.config/polybar/colors/colors_clear_dark.ini b/.config/polybar/colors/colors_clear_dark.ini new file mode 100644 index 0000000..c8ef5c2 --- /dev/null +++ b/.config/polybar/colors/colors_clear_dark.ini @@ -0,0 +1,16 @@ +; --------------------------------------------- +; Alter Linux i3wm edition +; polybar color list (clear dark) +; +; Watasuke +; Twitter: @Watasuke102 +; Email : Watasuke102@gmail.com +; +; (c) 2020 Fascode Network. +; --------------------------------------------- + +[color] +bg-bar = #66393d55 +bg-mod = #cc131527 +block = #ae131527 +mod = #dddddd diff --git a/.config/polybar/colors/colors_orig.ini b/.config/polybar/colors/colors_orig.ini new file mode 100644 index 0000000..2691000 --- /dev/null +++ b/.config/polybar/colors/colors_orig.ini @@ -0,0 +1,10 @@ +[colors] +;background = ${xrdb:color0:#222} +background = #232629 +background-alt = #444 +;foreground = ${xrdb:color7:#222} +foreground = #fcfcfc +foreground-alt = #555 +primary = #ffb52a +secondary = #e60053 +alert = #bd2c40 diff --git a/.config/polybar/colors/colors_unclear_dark.ini b/.config/polybar/colors/colors_unclear_dark.ini new file mode 100644 index 0000000..184dec9 --- /dev/null +++ b/.config/polybar/colors/colors_unclear_dark.ini @@ -0,0 +1,16 @@ +; --------------------------------------------- +; Alter Linux i3wm edition +; polybar color list (unclear dark) +; +; Watasuke +; Twitter: @Watasuke102 +; Email : Watasuke102@gmail.com +; +; (c) 2020 Fascode Network. +; --------------------------------------------- + +[color] +bg-bar = #393d55 +bg-mod = #131527 +block = #131527 +mod = #bbbbbb diff --git a/.config/polybar/colors/icons/icons_colorful_dark.ini b/.config/polybar/colors/icons/icons_colorful_dark.ini new file mode 100644 index 0000000..bab1dee --- /dev/null +++ b/.config/polybar/colors/icons/icons_colorful_dark.ini @@ -0,0 +1,18 @@ +; --------------------------------------------- +; Alter Linux i3wm edition +; polybar icon color list (colorful) +; +; Watasuke +; Twitter: @Watasuke102 +; Email : Watasuke102@gmail.com +; +; (c) 2020 Fascode Network. +; --------------------------------------------- + +[color] +icon_launcher= #15d1a8 +icon_cpu = #fff030 +icon_memory = #ad4dd8 +icon_network = #3796f0 +icon_battery = #40db68 +icon_power = #ff4e26 diff --git a/.config/polybar/colors/icons/icons_simple_dark.ini b/.config/polybar/colors/icons/icons_simple_dark.ini new file mode 100644 index 0000000..64a734f --- /dev/null +++ b/.config/polybar/colors/icons/icons_simple_dark.ini @@ -0,0 +1,18 @@ +; --------------------------------------------- +; Alter Linux i3wm edition +; polybar icon color list (colorful) +; +; Watasuke +; Twitter: @Watasuke102 +; Email : Watasuke102@gmail.com +; +; (c) 2020 Fascode Network. +; --------------------------------------------- + +[color] +icon_launcher= #ddd +icon_cpu = #ddd +icon_memory = #ddd +icon_network = #ddd +icon_battery = #ddd +icon_power = #ddd diff --git a/.config/polybar/config b/.config/polybar/config new file mode 100644 index 0000000..3a02f62 --- /dev/null +++ b/.config/polybar/config @@ -0,0 +1,29 @@ +;========================================================== +; +; +; ██████╗ ██████╗ ██╗ ██╗ ██╗██████╗ █████╗ ██████╗ +; ██╔══██╗██╔═══██╗██║ ╚██╗ ██╔╝██╔══██╗██╔══██╗██╔══██╗ +; ██████╔╝██║ ██║██║ ╚████╔╝ ██████╔╝███████║██████╔╝ +; ██╔═══╝ ██║ ██║██║ ╚██╔╝ ██╔══██╗██╔══██║██╔══██╗ +; ██║ ╚██████╔╝███████╗██║ ██████╔╝██║ ██║██║ ██║ +; ╚═╝ ╚═════╝ ╚══════╝╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝ +; +; +; To learn more about how to configure Polybar +; go to https://github.com/jaagr/polybar +; +; The README contains alot of information +; +;========================================================== + +[global/wm] +include-file = ~/.config/polybar/colors/colors_orig.ini +;include-file = ~/.config/polybar/colors/colors_unclear_dark.ini +include-file = ~/.config/polybar/colors/icons/icons_colorful_dark.ini +include-file = ~/.config/polybar/blocks/blocks_none.ini +include-file = ~/.config/polybar/modules.ini + +include-file = ~/.config/polybar/bar.ini + +include-file = ~/.config/polybar/settings.ini +include-file = ~/.config/polybar/wm.ini diff --git a/.config/polybar/launch.sh b/.config/polybar/launch.sh new file mode 100755 index 0000000..f01349b --- /dev/null +++ b/.config/polybar/launch.sh @@ -0,0 +1,20 @@ +#!/usr/bin/env bash + +# Terminate already running bar instances +killall -q polybar + +# Wait until the processes have been shut down +while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done + +# Launch bar1 and bar2 +if type "xrandr"; then + for m in $(xrandr --query | grep " connected" | cut -d" " -f1); do + MONITOR=$m polybar --reload example & + done +else + polybar --reload example & +fi + +#polybar example + +echo "Bars launched..." diff --git a/.config/polybar/modules.ini b/.config/polybar/modules.ini new file mode 100644 index 0000000..413cb65 --- /dev/null +++ b/.config/polybar/modules.ini @@ -0,0 +1,19 @@ +include-file = ~/.config/polybar/modules/fcitx.ini +include-file = ~/.config/polybar/modules/xwindow.ini +include-file = ~/.config/polybar/modules/xkeyboard.ini +include-file = ~/.config/polybar/modules/filesystem.ini +include-file = ~/.config/polybar/modules/bspwm.ini +include-file = ~/.config/polybar/modules/i3.ini +include-file = ~/.config/polybar/modules/mpd.ini +include-file = ~/.config/polybar/modules/xbacklight.ini +include-file = ~/.config/polybar/modules/backlight-acpi.ini +include-file = ~/.config/polybar/modules/cpu.ini +include-file = ~/.config/polybar/modules/memory.ini +include-file = ~/.config/polybar/modules/wlan.ini +include-file = ~/.config/polybar/modules/eth.ini +include-file = ~/.config/polybar/modules/date.ini +include-file = ~/.config/polybar/modules/pulseaudio.ini +include-file = ~/.config/polybar/modules/alsa.ini +include-file = ~/.config/polybar/modules/battery.ini +include-file = ~/.config/polybar/modules/temperature.ini +include-file = ~/.config/polybar/modules/powermenu.ini diff --git a/.config/polybar/modules/alsa.ini b/.config/polybar/modules/alsa.ini new file mode 100644 index 0000000..2e61cb4 --- /dev/null +++ b/.config/polybar/modules/alsa.ini @@ -0,0 +1,27 @@ +[module/alsa] +type = internal/alsa + +format-volume = +label-volume = VOL +label-volume-foreground = ${root.foreground} + +format-muted-prefix = " " +format-muted-foreground = ${colors.foreground-alt} +label-muted = sound muted + +bar-volume-width = 10 +bar-volume-foreground-0 = #55aa55 +bar-volume-foreground-1 = #55aa55 +bar-volume-foreground-2 = #55aa55 +bar-volume-foreground-3 = #55aa55 +bar-volume-foreground-4 = #55aa55 +bar-volume-foreground-5 = #f5a70a +bar-volume-foreground-6 = #ff5555 +bar-volume-gradient = false +bar-volume-indicator = | +bar-volume-indicator-font = 2 +bar-volume-fill = ─ +bar-volume-fill-font = 2 +bar-volume-empty = ─ +bar-volume-empty-font = 2 +bar-volume-empty-foreground = ${colors.foreground-alt} diff --git a/.config/polybar/modules/backlight-acpi.ini b/.config/polybar/modules/backlight-acpi.ini new file mode 100644 index 0000000..0e2f048 --- /dev/null +++ b/.config/polybar/modules/backlight-acpi.ini @@ -0,0 +1,4 @@ +[module/backlight-acpi] +inherit = module/xbacklight +type = internal/backlight +card = intel_backlight diff --git a/.config/polybar/modules/battery.ini b/.config/polybar/modules/battery.ini new file mode 100644 index 0000000..4f35957 --- /dev/null +++ b/.config/polybar/modules/battery.ini @@ -0,0 +1,32 @@ +[module/battery] +type = internal/battery +battery = BAT0 +adapter = AC +full-at = 98 + +format-charging = +format-charging-underline = #ffb52a + +format-discharging = +format-discharging-underline = ${self.format-charging-underline} + +format-full-prefix = " " +format-full-prefix-foreground = ${colors.foreground-alt} +format-full-underline = ${self.format-charging-underline} + +ramp-capacity-0 =  +ramp-capacity-1 =  +ramp-capacity-2 =  +ramp-capacity-foreground = ${colors.foreground-alt} + +animation-charging-0 =  +animation-charging-1 =  +animation-charging-2 =  +animation-charging-foreground = ${colors.foreground-alt} +animation-charging-framerate = 750 + +animation-discharging-0 =  +animation-discharging-1 =  +animation-discharging-2 =  +animation-discharging-foreground = ${colors.foreground-alt} +animation-discharging-framerate = 750 diff --git a/.config/polybar/modules/bspwm.ini b/.config/polybar/modules/bspwm.ini new file mode 100644 index 0000000..ea632c3 --- /dev/null +++ b/.config/polybar/modules/bspwm.ini @@ -0,0 +1,21 @@ +[module/bspwm] +type = internal/bspwm + +label-focused = %index% +label-focused-background = ${colors.background-alt} +label-focused-underline= ${colors.primary} +label-focused-padding = 2 + +label-occupied = %index% +label-occupied-padding = 2 + +label-urgent = %index%! +label-urgent-background = ${colors.alert} +label-urgent-padding = 2 + +label-empty = %index% +label-empty-foreground = ${colors.foreground-alt} +label-empty-padding = 2 + +; Separator in between workspaces +; label-separator = | diff --git a/.config/polybar/modules/cpu.ini b/.config/polybar/modules/cpu.ini new file mode 100644 index 0000000..5458a52 --- /dev/null +++ b/.config/polybar/modules/cpu.ini @@ -0,0 +1,7 @@ +[module/cpu] +type = internal/cpu +interval = 2 +format-prefix = " " +format-prefix-foreground = ${colors.foreground-alt} +format-underline = #f90000 +label = %percentage:2%% diff --git a/.config/polybar/modules/date.ini b/.config/polybar/modules/date.ini new file mode 100644 index 0000000..c863fbd --- /dev/null +++ b/.config/polybar/modules/date.ini @@ -0,0 +1,17 @@ +[module/date] +type = internal/date +interval = 1.0 + +date = %Y年%m月%d日 (%a) +date-alt = %Y-%m-%d% + +time = %H:%M:%S +time-alt = %H:%M:%S + +format-prefix = 🕓 +format-prefix-foreground = ${colors.foreground-alt} +format-underline = #fc54f9 + +label = %date% %time% +label-font = 3 +label-foreground = #ea81e8 diff --git a/.config/polybar/modules/eth.ini b/.config/polybar/modules/eth.ini new file mode 100644 index 0000000..be688f9 --- /dev/null +++ b/.config/polybar/modules/eth.ini @@ -0,0 +1,15 @@ +[module/eth] +type = internal/network +interface = enp0s25 +interval = 3.0 + +format-connected-underline = #55aa55 +format-connected-prefix = " " +format-connected-prefix-foreground = ${colors.foreground-alt} +label-connected = %local_ip% + +format-disconnected = +;format-disconnected = +;format-disconnected-underline = ${self.format-connected-underline} +;label-disconnected = %ifname% disconnected +;label-disconnected-foreground = ${colors.foreground-alt} diff --git a/.config/polybar/modules/fcitx.ini b/.config/polybar/modules/fcitx.ini new file mode 100644 index 0000000..febb185 --- /dev/null +++ b/.config/polybar/modules/fcitx.ini @@ -0,0 +1,6 @@ +[module/fcitx] +type = custom/script +exec = ~/.config/polybar/polybar-fcitx5-script.sh +tail = true +interval = 0 +format-prefix = "KBD" diff --git a/.config/polybar/modules/filesystem.ini b/.config/polybar/modules/filesystem.ini new file mode 100644 index 0000000..717f6b0 --- /dev/null +++ b/.config/polybar/modules/filesystem.ini @@ -0,0 +1,9 @@ +[module/filesystem] +type = internal/fs +interval = 25 + +mount-0 = / + +label-mounted = %{F#0a81f5}%mountpoint%%{F-}: %percentage_used%% +label-unmounted = %mountpoint% not mounted +label-unmounted-foreground = ${colors.foreground-alt} diff --git a/.config/polybar/modules/i3.ini b/.config/polybar/modules/i3.ini new file mode 100644 index 0000000..45b3f80 --- /dev/null +++ b/.config/polybar/modules/i3.ini @@ -0,0 +1,37 @@ +[module/i3] +type = internal/i3 +format = +format-foreground = ${color.mod} +format-background = ${color.bg-mod} +index-sort = true +wrapping-scroll = false + +; Only show workspaces on the same output as the bar +;pin-workspaces = true + +label-mode-padding = 2 +label-mode-foreground = #000 +label-mode-background = ${colors.primary} +; focused = Active workspace on focused monitor +label-focused = %index% +label-focused-background = ${module/bspwm.label-focused-background} +label-focused-underline = ${module/bspwm.label-focused-underline} +label-focused-padding = ${module/bspwm.label-focused-padding} + +; unfocused = Inactive workspace on any monitor +label-unfocused = %index% +label-unfocused-padding = ${module/bspwm.label-occupied-padding} + +; visible = Active workspace on unfocused monitor +label-visible = %index% +label-visible-background = ${self.label-focused-background} +label-visible-underline = ${self.label-focused-underline} +label-visible-padding = ${self.label-focused-padding} + +; urgent = Workspace with urgency hint set +label-urgent = %index% +label-urgent-background = ${module/bspwm.label-urgent-background} +label-urgent-padding = ${module/bspwm.label-urgent-padding} + +; Separator in between workspaces +; label-separator = | diff --git a/.config/polybar/modules/memory.ini b/.config/polybar/modules/memory.ini new file mode 100644 index 0000000..542d08b --- /dev/null +++ b/.config/polybar/modules/memory.ini @@ -0,0 +1,7 @@ +[module/memory] +type = internal/memory +interval = 2 +format-prefix = " " +format-prefix-foreground = ${colors.foreground-alt} +format-underline = #4bffdc +label = %percentage_used%% diff --git a/.config/polybar/modules/mpd.ini b/.config/polybar/modules/mpd.ini new file mode 100644 index 0000000..39ca5ef --- /dev/null +++ b/.config/polybar/modules/mpd.ini @@ -0,0 +1,37 @@ +[module/mpd] +type = internal/mpd + +; Host where mpd is running (either ip or domain name) +; Can also be the full path to a unix socket where mpd is running. +host = 127.0.0.1 +port = 6600 +;password = mysecretpassword + +format-online = > +label-song = 𝄞 %artist% - %title% +label-offline = 🎜 mpd is offline + +icon-play = ⏵ +icon-pause = ⏸ +icon-stop = ⏹ +icon-prev = ⏮ +icon-next = ⏭ +icon-seekb = ⏪ +icon-seekf = ⏩ +icon-random = 🔀 +icon-repeat = 🔁 +icon-repeatone = 🔂 +icon-single = 🔂 +icon-consume = ✀ + +toggle-on-foreground = #ff +toggle-off-foreground = #55 + +bar-progress-width = 45 +bar-progress-indicator = | +bar-progress-fill = ─ +bar-progress-empty = ─ + +; Seconds to sleep between progressbar/song timer sync +; Default: 1 +interval = 2 diff --git a/.config/polybar/modules/powermenu.ini b/.config/polybar/modules/powermenu.ini new file mode 100644 index 0000000..121f626 --- /dev/null +++ b/.config/polybar/modules/powermenu.ini @@ -0,0 +1,32 @@ +[module/powermenu] +type = custom/menu +content = "%{T1}  %{T-}" +content-foreground = ${color.icon_power} +content-background = ${color.bg-mod} +click-left = exec rofi -show power + +expand-right = true + +format-spacing = 1 + +label-open =  +label-open-foreground = ${colors.secondary} +label-close =  cancel +label-close-foreground = ${colors.secondary} +label-separator = | +label-separator-foreground = ${colors.foreground-alt} + +menu-0-0 = reboot +menu-0-0-exec = menu-open-1 +menu-0-1 = power off +menu-0-1-exec = menu-open-2 + +menu-1-0 = cancel +menu-1-0-exec = menu-open-0 +menu-1-1 = reboot +menu-1-1-exec = sudo reboot + +menu-2-0 = power off +menu-2-0-exec = sudo poweroff +menu-2-1 = cancel +menu-2-1-exec = menu-open-0 diff --git a/.config/polybar/modules/pulseaudio.ini b/.config/polybar/modules/pulseaudio.ini new file mode 100644 index 0000000..43b2d91 --- /dev/null +++ b/.config/polybar/modules/pulseaudio.ini @@ -0,0 +1,26 @@ +[module/pulseaudio] +type = internal/pulseaudio + +format-volume = +label-volume = VOL %percentage%% +label-volume-foreground = ${root.foreground} + +label-muted = 🔇 muted +label-muted-foreground = #666 + +bar-volume-width = 10 +bar-volume-foreground-0 = #55aa55 +bar-volume-foreground-1 = #55aa55 +bar-volume-foreground-2 = #55aa55 +bar-volume-foreground-3 = #55aa55 +bar-volume-foreground-4 = #55aa55 +bar-volume-foreground-5 = #f5a70a +bar-volume-foreground-6 = #ff5555 +bar-volume-gradient = false +bar-volume-indicator = | +bar-volume-indicator-font = 2 +bar-volume-fill = ─ +bar-volume-fill-font = 2 +bar-volume-empty = ─ +bar-volume-empty-font = 2 +bar-volume-empty-foreground = ${colors.foreground-alt} diff --git a/.config/polybar/modules/temperature.ini b/.config/polybar/modules/temperature.ini new file mode 100644 index 0000000..fb9b8c0 --- /dev/null +++ b/.config/polybar/modules/temperature.ini @@ -0,0 +1,18 @@ +[module/temperature] +type = internal/temperature +thermal-zone = 0 +warn-temperature = 60 + +format =