commit 6efc2e63426c2169a418c4e2c2eca4153696e9bd Author: Michael Neuper <73108749+michaelneuper@users.noreply.github.com> Date: Mon, 14 Nov 2022 18:56:24 +0200 Initial commit Diffstat:
| A | .Xresources | | | 114 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | .bashrc | | | 73 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | .config/alacritty/alacritty.yml | | | 909 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | .config/fish/conf.d/omf.fish | | | 7 | +++++++ |
| A | .config/fish/config.fish | | | 230 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | .config/fish/fish_variables | | | 33 | +++++++++++++++++++++++++++++++++ |
| A | .config/kitty/kitty.bak | | | 43 | +++++++++++++++++++++++++++++++++++++++++++ |
| A | .config/kitty/kitty.conf | | | 856 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | .config/kwinrc | | | 131 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | .config/lf/colors | | | 177 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | .config/lf/draw_img | | | 68 | ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | .config/lf/icons | | | 376 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | .config/lf/image | | | 17 | +++++++++++++++++ |
| A | .config/lf/lfrc | | | 86 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | .config/lf/preview | | | 48 | ++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | .config/pcmanfm/default/pcmanfm.conf | | | 26 | ++++++++++++++++++++++++++ |
| A | .config/picom/picom.bak | | | 418 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | .config/picom/picom.conf | | | 120 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | .config/polybar/bars.ini | | | 551 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | .config/polybar/colors.ini | | | 45 | +++++++++++++++++++++++++++++++++++++++++++++ |
| A | .config/polybar/config.ini | | | 302 | ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | .config/polybar/images/polybar-example-1.jpg | | | 0 | |
| A | .config/polybar/images/polybar-example-2.jpg | | | 0 | |
| A | .config/polybar/images/polybar-example-3-awesomewm.jpg | | | 0 | |
| A | .config/polybar/launch.sh | | | 17 | +++++++++++++++++ |
| A | .config/polybar/modules.ini | | | 1167 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | .config/polybar/preview.ini | | | 310 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | .config/polybar/preview.sh | | | 14 | ++++++++++++++ |
| A | .config/polybar/scripts/check-all-updates.sh | | | 24 | ++++++++++++++++++++++++ |
| A | .config/polybar/scripts/checkupdates | | | 117 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | .config/polybar/scripts/get_mpris_status.sh | | | 99 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | .config/polybar/scripts/get_spotify_status.sh | | | 54 | ++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | .config/polybar/scripts/launcher.sh | | | 13 | +++++++++++++ |
| A | .config/polybar/scripts/pavolume.sh | | | 194 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | .config/polybar/scripts/polywins.sh | | | 241 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | .config/polybar/scripts/powermenu.sh | | | 94 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | .config/polybar/scripts/rofi/colors.rasi | | | 10 | ++++++++++ |
| A | .config/polybar/scripts/rofi/confirm.rasi | | | 24 | ++++++++++++++++++++++++ |
| A | .config/polybar/scripts/rofi/launcher.rasi | | | 119 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | .config/polybar/scripts/rofi/message.rasi | | | 24 | ++++++++++++++++++++++++ |
| A | .config/polybar/scripts/rofi/networkmenu.rasi | | | 123 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | .config/polybar/scripts/rofi/powermenu.rasi | | | 123 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | .config/polybar/scripts/rofi/styles.rasi | | | 126 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | .config/polybar/scripts/scroll_mpris_status.sh | | | 21 | +++++++++++++++++++++ |
| A | .config/polybar/scripts/style-switch.sh | | | 15 | +++++++++++++++ |
| A | .config/polybar/scripts/styles.sh | | | 76 | ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | .config/polybar/scripts/updates.sh | | | 45 | +++++++++++++++++++++++++++++++++++++++++++++ |
| A | .config/polybar/scripts/weather.py | | | 83 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | .config/polybar/user_modules.ini | | | 406 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | .config/screenkey.json | | | 28 | ++++++++++++++++++++++++++++ |
| A | .config/starship.toml | | | 150 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | .config/zathura/zathurarc | | | 15 | +++++++++++++++ |
| A | .zshrc | | | 197 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
53 files changed, 8559 insertions(+), 0 deletions(-)
diff --git a/.Xresources b/.Xresources @@ -0,0 +1,114 @@ +! __ __ _ _ +!| \/ | \ | | +!| \ / | \| | Michael Neuper +!| |\/| | . ` | https://michaelneuper.com +!| | | | |\ | https://github.com/michaelneuper +!|_| |_|_| \_| +! +!-- Xft settings --! +Xft.dpi: 93.34 +Xft.antialias: 1 +Xft.hinting: 1 +Xft.rgba: rgb +Xft.autohint: 0 +Xft.hintstyle: hintslight +Xft.lcdfilter: lcddefault + +!-- XTerm settings --! +XTerm*renderFont: true +XTerm*faceName: xft:Mononoki Nerd Font, \ + xft:JoyPixels:size=12, \ + xft:Monospace:style=Medium:size=12 +XTerm*faceSize: 11 +XTerm*utf8: 2 +XTerm*locale: true + +XTerm.vt100.translations: #override \n\ + Ctrl <Key> j: smaller-vt-font() \n\ + Ctrl <Key> k: larger-vt-font() + + +! Every shell is a login shell by default (for inclusion of all necessary environment variables) +XTerm*loginshell: true + +! I like a LOT of scrollback... +XTerm*savelines: 16384 + +! double-click to select whole URLs :D +XTerm*charClass: 33:48,36-47:48,58-59:48,61:48,63-64:48,95:48,126:48 + +!-- URxvt settiongs --! +URxvt*imLocale: en_US.UTF-8 +URxvt*termName: rxvt-unicode-256color +URxvt*buffered: false +URxvt.intensityStyles: false +URxvt.font: xft:Mononoki Nerd Font:size=12, \ + xft:JoyPixels:size=12, \ + xft:Monospace:style=Medium:size=12 +URxvt.saveLines: 2000 +URxvt.scrollBar: false +URxvt.cursorColor: white + +!! Extensions +URxvt.perl-ext-common: default,matcher,resize-font,url-select,keyboard-select,clipboard +URxvt.colorUL: #4682B4 +!! url-select +URxvt.keysym.M-u: perl:url-select:select_next +URxvt.url-select.launcher: urxvt -e lynx -cfg=~/.lynx.cfg -lss=~/.lynx.lss +URxvt.url-select.underline: true +!! keyboard-select: +URxvt.keysym.M-Escape: perl:keyboard-select:activate +!! resize-font +URxvt.keysym.C-k: font-size:increase +URxvt.keysym.C-j: font-size:decrease +!! Matcher +URxvt.url-launcher: urxvt -e lynx -cfg=~/.lynx.cfg -lss=~/.lynx.lss +URxvt.matcher.button: 1 +!!clipboard +URxvt.keysym.M-c: perl:clipboard:copy +URxvt.keysym.M-v: perl:clipboard:paste +URxvt*depth: 32 + +! COLORS FOR SXIV +Sxiv.foreground: #bbc2cf +Sxiv.background: #282c34 +Sxiv.font: SF Mono:style=bold:size=11 + + +! FOR ALL OTHER PROGRAMS USE XRESOURCES +! This includes xterm and urxvt +*.foreground: #bbc2cf +*.background: #282c34 +*.cursorColor: #bbc2cf + +! black +*.color0: #1c1f24 +*.color8: #5b6268 + +! red +*.color1: #ff6c6b +*.color9: #da8548 + +! green +*.color2: #98be65 +*.color10: #4db5bd + +! yellow +*.color3: #da8548 +*.color11: #ecbe7b + +! blue +*.color4: #51afef +*.color12: #3071db + +! magenta +*.color5: #c678dd +*.color13: #a9a1e1 + +! cyan +*.color6: #5699af +*.color14: #46d9ff + +! white +*.color7: #202328 +*.color15: #dfdfdf diff --git a/.bashrc b/.bashrc @@ -0,0 +1,73 @@ +# If not running interactively, don't do anything +[[ $- != *i* ]] && return + +# Prompt +PS1='\[\e[0;91m\][\[\e[0;93m\]\u\[\e[0;32m\]@\[\e[0;38;5;25m\]\h \[\e[0;38;5;250m\]\w\[\e[0;91m\]]\[\e[0m\]$ \[\e[0m\]' + +# Load starship prompt if starship is installed +# if [ -x /usr/bin/starship ]; then +# __main() { +# local major="${BASH_VERSINFO[0]}" +# local minor="${BASH_VERSINFO[1]}" +# +# if ((major > 4)) || { ((major == 4)) && ((minor >= 1)); }; then +# source <("/usr/bin/starship" init bash --print-full-init) +# else +# source /dev/stdin <<<"$("/usr/bin/starship" init bash --print-full-init)" +# fi +# } +# __main +# unset -f __main +# fi + +# Aliases +alias dir='dir --color=auto' +alias egrep='egrep --color=auto' +alias fgrep='fgrep --color=auto' +alias fixpacman="sudo rm /var/lib/pacman/db.lck" +alias grep='grep --color=auto' +alias grubup="sudo update-grub" +alias hw='hwinfo --short' +alias psmem10='ps auxf | sort -nr -k 4 | head -10' +alias psmem='ps auxf | sort -nr -k 4' +alias rmpkg="sudo pacman -Rdd" +alias tarnow='tar -acf ' +alias untar='tar -zxvf ' +alias upd='/usr/bin/update' +alias vdir='vdir --color=auto' +alias wget='wget -c ' + +# Help normies +alias apt-get='man pacman' +alias apt='man pacman' +alias helpme='cht.sh --shell' +alias please='sudo' +alias tb='nc termbin.com 9999' + +# Cleanup orphaned packages +alias cleanup='sudo pacman -Rns `pacman -Qtdq`' + +# Get the error messages from journalctl +alias jctl="journalctl -p 3 -xb" + +# Recent installed packages +alias rip="expac --timefmt='%Y-%m-%d %T' '%l\t%n %v' | sort | tail -200 | nl" + +# Runs when bash is started + +# Stop using ugly java font +export _JAVA_OPTIONS='-Dawt.useSystemAAFontSettings=gasp' +alias java='java "$_SILENT_JAVA_OPTIONS"' + +# Fix global menu in GTK apps +if [ -n "$GTK_MODULES" ]; then + GTK_MODULES="${GTK_MODULES}:appmenu-gtk-module" # unity-gtk-module + #GTK_MODULES="${GTK_MODULES}:unity-gtk-module" # unity-gtk-module +else + GTK_MODULES="appmenu-gtk-module" + #GTK_MODULES="unity-gtk-module" +fi + +if [ -z "$UBUNTU_MENUPROXY" ]; then + UBUNTU_MENUPROXY=1 +fi diff --git a/.config/alacritty/alacritty.yml b/.config/alacritty/alacritty.yml @@ -0,0 +1,909 @@ +# 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 itself. +env: + # TERM variable + # + # This value is used to set the `$TERM` environment variable for + # each instance of Alacritty. If it is not present, alacritty will + # check the local terminfo database and use `alacritty` if it is + # available, otherwise `xterm-256color` is used. + TERM: xterm-256color + +window: + # Window dimensions (changes require restart) + # + # Specified in number of columns/lines, not pixels. + # If both are `0`, this setting is ignored. + #dimensions: + # columns: 0 + # lines: 0 + + # Window position (changes require restart) + # + # Specified in number of pixels. + # If the position is not set, the window manager will handle the placement. + #position: + # x: 0 + # y: 0 + + # Window padding (changes require restart) + # + # 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. + padding: + x: 10 + y: 10 + + # Spread additional padding evenly around the terminal content. + dynamic_padding: false + + # Window decorations + # + # Values for `decorations`: + # - full: Borders and title bar + # - none: Neither borders nor title bar + # + # Values for `decorations` (macOS only): + # - transparent: Title bar, transparent background and title bar buttons + # - buttonless: Title bar, transparent background, but no title bar buttons + #decorations: full + + # Startup Mode (changes require restart) + # + # Values for `startup_mode`: + # - Windowed + # - Maximized + # - Fullscreen + # + # Values for `startup_mode` (macOS only): + # - SimpleFullscreen + #startup_mode: Windowed + + # Window title + title: Alacritty + + # Window class (Linux/BSD only): + class: + # Application instance name + instance: Alacritty + # General application class + general: Alacritty + + # GTK theme variant (Linux/BSD only) + # + # Override the variant of the GTK theme. Commonly supported values are `dark` and `light`. + # Set this to `None` to use the default theme variant. + #gtk_theme_variant: None + +scrolling: + # Maximum number of lines in the scrollback buffer. + # Specifying '0' will disable scrolling. + history: 5000 + + # Number of lines the viewport will move for every line scrolled when + # scrollback is enabled (history > 0). + #multiplier: 3 + + # Scroll to the bottom when new text is written to the terminal. + #auto_scroll: false + +# Spaces per Tab (changes require restart) +# +# This setting defines the width of a tab in cells. +# +# Some applications, like Emacs, rely on knowing about the width of a tab. +# To prevent unexpected behavior in these applications, it's also required to +# change the `it` value in terminfo when altering this setting. +#tabspaces: 8 + +# Font configuration +font: + # Normal (roman) font face + normal: + # Font family + # + # Default: + # - (macOS) Menlo + # - (Linux/BSD) monospace + # - (Windows) Consolas + # family: Fira Code + # family: SF Mono + # family: CodeNewRoman Nerd Font + # family: RobotoMono Nerd Font + # family: Hack + # family: JetBrains Mono + # family: UbuntuMono Nerd Font + # family: Monofur Nerd Font + # family: TerminessTTF Nerd Font + family: Mononoki Nerd Font + + # The `style` can be specified to pick a specific face. + style: Regular + + # Bold font face + bold: + # Font family + # + # If the bold family is not specified, it will fall back to the + # value specified for the normal font. + # family: Fira Code + # family: SF Mono + # family: CodeNewRoman Nerd Font + # family: RobotoMono Nerd Font + # family: Hack + # family: JetBrains Mono + # family: UbuntuMono Nerd Font + # family: Monofur Nerd Font + # family: TerminessTTF Nerd Font + # family: Mononoki Nerd Font + + # The `style` can be specified to pick a specific face. + style: Bold + + # Italic font face + italic: + # Font family + # + # If the italic family is not specified, it will fall back to the + # value specified for the normal font. + # family: Fira Code + # family: SF Mono + # family: CodeNewRoman Nerd Font + # family: RobotoMono Nerd Font + # family: Hack + # family: JetBrains Mono + # family: UbuntuMono Nerd Font + # family: Monofuritalic Nerd Font Mono + # family: TerminessTTF Nerd Font + # family: Mononoki Nerd Font + + # The `style` can be specified to pick a specific face. + style: Italic + + # Bold italic font face + bold_italic: + # Font family + # + # If the bold italic family is not specified, it will fall back to the + # value specified for the normal font. + # family: Fira Code + # family: CodeNewRoman Nerd Font + # family: RobotoMono Nerd Font + # family: Hack + # family: JetBrains Mono + # family: UbuntuMono Nerd Font + # family: Monofuritalic Nerd Font Mono + # family: TerminessTTF Nerd Font + # family: Mononoki Nerd Font + + # The `style` can be specified to pick a specific face. + style: Bold Italic + + # Point size + size: 14.0 + + # Offset is the extra space around each character. `offset.y` can be thought of + # as modifying the line spacing, and `offset.x` as modifying the letter spacing. + offset: + x: 0 + y: 1 + + # 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 upwards. + #glyph_offset: + # x: 0 + # y: 0 + + # Thin stroke font rendering (macOS only) + # + # Thin strokes are suitable for retina displays, but for non-retina screens + # it is recommended to set `use_thin_strokes` 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 + +# If `true`, bold text is drawn using the bright color variants. +draw_bold_text_with_bright_colors: true + +####################################### +## START OF COLOR SCHEMES ## +####################################### +schemes: + ### One Dark ### + one-dark: &one-dark + primary: + # background: '0x1e2127' + background: '0x282c34' + foreground: '0xabb2bf' + bright_foreground: '0xe6efff' + normal: + black: '0x1e2127' + red: '0xe06c75' + green: '0x98c379' + yellow: '0xd19a66' + blue: '0x61afef' + magenta: '0xc678dd' + cyan: '0x56b6c2' + white: '0x828791' + bright: + black: '0x5c6370' + red: '0xe06c75' + green: '0x98c379' + yellow: '0xd19a66' + blue: '0x61afef' + magenta: '0xc678dd' + cyan: '0x56b6c2' + white: '0xe6efff' + dim: + black: '0x1e2127' + red: '0xe06c75' + green: '0x98c379' + yellow: '0xd19a66' + blue: '0x61afef' + magenta: '0xc678dd' + cyan: '0x56b6c2' + white: '0x828791' + + ### Doom One ### + doom-one: &doom-one + primary: + background: '#282c34' + foreground: '#bbc2cf' + cursor: + text: CellBackground + cursor: '#528bff' + selection: + text: CellForeground + background: '#3e4451' + normal: + black: '#1c1f24' + red: '#ff6c6b' + green: '#98be65' + yellow: '#da8548' + blue: '#51afef' + magenta: '#c678dd' + cyan: '#5699af' + white: '#202328' + bright: + black: '#5b6268' + red: '#da8548' + green: '#4db5bd' + yellow: '#ecbe7b' + blue: '#3071db' # This is 2257a0 in Doom Emacs but I lightened it. + magenta: '#a9a1e1' + cyan: '#46d9ff' + white: '#dfdfdf' + + ### Dracula ### + dracula: &dracula + primary: + background: '#282a36' + foreground: '#f8f8f2' + cursor: + text: CellBackground + cursor: CellForeground + vi_mode_cursor: + text: CellBackground + cursor: CellForeground + search: + matches: + foreground: '#44475a' + background: '#50fa7b' + focused_match: + foreground: '#44475a' + background: '#ffb86c' + bar: + background: '#282a36' + foreground: '#f8f8f2' + line_indicator: + foreground: None + background: None + selection: + text: CellForeground + background: '#44475a' + normal: + black: '#000000' + red: '#ff5555' + green: '#50fa7b' + yellow: '#f1fa8c' + blue: '#bd93f9' + magenta: '#ff79c6' + cyan: '#8be9fd' + white: '#bfbfbf' + bright: + black: '#4d4d4d' + red: '#ff6e67' + green: '#5af78e' + yellow: '#f4f99d' + blue: '#caa9fa' + magenta: '#ff92d0' + cyan: '#9aedfe' + white: '#e6e6e6' + dim: + black: '#14151b' + red: '#ff2222' + green: '#1ef956' + yellow: '#ebf85b' + blue: '#4d5b86' + magenta: '#ff46b0' + cyan: '#59dffc' + white: '#e6e6d1' + + ### Gruvbox dark ### + gruvbox-dark: &gruvbox-dark + # Default colors + primary: + # hard contrast: background = '0x1d2021' + background: '#282828' + # soft contrast: background = '0x32302f' + foreground: '#ebdbb2' + + # Normal colors + normal: + black: '#282828' + red: '#cc241d' + green: '#98971a' + yellow: '#d79921' + blue: '#458588' + magenta: '#b16286' + cyan: '#689d6a' + white: '#a89984' + + # Bright colors + bright: + black: '#928374' + red: '#fb4934' + green: '#b8bb26' + yellow: '#fabd2f' + blue: '#83a598' + magenta: '#d3869b' + cyan: '#8ec07c' + white: '#ebdbb2' + +### Monokai ### + monokai-pro: &monokai-pro + # Default colors + primary: + background: '#2D2A2E' + foreground: '#FCFCFA' + + # Normal colors + normal: + black: '#403E41' + red: '#FF6188' + green: '#A9DC76' + yellow: '#FFD866' + blue: '#FC9867' + magenta: '#AB9DF2' + cyan: '#78DCE8' + white: '#FCFCFA' + + # Bright colors + bright: + black: '#727072' + red: '#FF6188' + green: '#A9DC76' + yellow: '#FFD866' + blue: '#FC9867' + magenta: '#AB9DF2' + cyan: '#78DCE8' + white: '#FCFCFA' + + ### Nord ### + nord: &nord + # Default colors + primary: + background: '#2E3440' + foreground: '#D8DEE9' + + # Normal colors + normal: + black: '#3B4252' + red: '#BF616A' + green: '#A3BE8C' + yellow: '#EBCB8B' + blue: '#81A1C1' + magenta: '#B48EAD' + cyan: '#88C0D0' + white: '#E5E9F0' + + # Bright colors + bright: + black: '#4C566A' + red: '#BF616A' + green: '#A3BE8C' + yellow: '#EBCB8B' + blue: '#81A1C1' + magenta: '#B48EAD' + cyan: '#8FBCBB' + white: '#ECEFF4' + + ### Oceanic Next ### + oceanic-next: &oceanic-next + # Default colors + primary: + background: '#1b2b34' + foreground: '#d8dee9' + + # Colors the cursor will use if `custom_cursor_colors` is true + cursor: + text: '#1b2b34' + cursor: '#ffffff' + + # Normal colors + normal: + black: '#343d46' + red: '#EC5f67' + green: '#99C794' + yellow: '#FAC863' + blue: '#6699cc' + magenta: '#c594c5' + cyan: '#5fb3b3' + white: '#d8dee9' + + # Bright colors + bright: + black: '#343d46' + red: '#EC5f67' + green: '#99C794' + yellow: '#FAC863' + blue: '#6699cc' + magenta: '#c594c5' + cyan: '#5fb3b3' + white: '#d8dee9' + + ### Palenight ### + palenight: &palenight + # Default colors + primary: + background: '#292d3e' + foreground: '#d0d0d0' + + # Normal colors + normal: + black: '#292d3e' + red: '#f07178' + green: '#c3e88d' + yellow: '#ffcb6b' + blue: '#82aaff' + magenta: '#c792ea' + cyan: '#89ddff' + white: '#d0d0d0' + + # Bright colors + bright: + black: '#434758' + red: '#ff8b92' + green: '#ddffa7' + yellow: '#ffe585' + blue: '#9cc4ff' + magenta: '#e1acff' + cyan: '#a3f7ff' + white: '#ffffff' + + ### Solarized Dark ### + solarized-dark: &solarized-dark + # Default colors + primary: + background: '#002b36' # base03 + foreground: '#839496' # base0 + + # Cursor colors + cursor: + text: '#002b36' # base03 + cursor: '#839496' # base0 + + # Normal colors + normal: + black: '#073642' # base02 + red: '#dc322f' # red + green: '#859900' # green + yellow: '#b58900' # yellow + blue: '#268bd2' # blue + magenta: '#d33682' # magenta + cyan: '#2aa198' # cyan + white: '#eee8d5' # base2 + + # Bright colors + bright: + black: '#002b36' # base03 + red: '#cb4b16' # orange + green: '#586e75' # base01 + yellow: '#657b83' # base00 + blue: '#839496' # base0 + magenta: '#6c71c4' # violet + cyan: '#93a1a1' # base1 + white: '#fdf6e3' # base3 + + ### Solarized Light ### + solarized-light: &solarized-light + # Default colors + primary: + background: '#fdf6e3' # base3 + foreground: '#657b83' # base00 + + # Cursor colors + cursor: + text: '#fdf6e3' # base3 + cursor: '#657b83' # base00 + + # Normal colors + normal: + black: '#073642' # base02 + red: '#dc322f' # red + green: '#859900' # green + yellow: '#b58900' # yellow + blue: '#268bd2' # blue + magenta: '#d33682' # magenta + cyan: '#2aa198' # cyan + white: '#eee8d5' # base2 + + # Bright colors + bright: + black: '#002b36' # base03 + red: '#cb4b16' # orange + green: '#586e75' # base01 + yellow: '#657b83' # base00 + blue: '#839496' # base0 + magenta: '#6c71c4' # violet + cyan: '#93a1a1' # base1 + white: '#fdf6e3' # base3 + + ### Tomorrow Night ### + tomorrow-night: &tomorrow-night + # Default colors + primary: + background: '#1d1f21' + foreground: '#c5c8c6' + + # Colors the cursor will use if `custom_cursor_colors` is true + cursor: + text: '#1d1f21' + cursor: '#ffffff' + + # Normal colors + normal: + black: '#1d1f21' + red: '#cc6666' + green: '#b5bd68' + yellow: '#e6c547' + blue: '#81a2be' + magenta: '#b294bb' + cyan: '#70c0ba' + white: '#373b41' + + # Bright colors + bright: + black: '#666666' + red: '#ff3334' + green: '#9ec400' + yellow: '#f0c674' + blue: '#81a2be' + magenta: '#b77ee0' + cyan: '#54ced6' + white: '#282a2e' + +###################################################################### +## SET THEME: Choose ONE color scheme from those in the above list. ## +## ################################################################### +# Available themes are: +# *one-dark +# *doom-one +# *dracula +# *gruvbox-dark +# *monokai-pro +# *nord +# *oceanic-next +# *palenight +# *solarized-light +# *solarized-dark +# *tomorrow-night + +colors: *one-dark + +####################################### +## END OF COLOR SCHEMES ## +####################################### + +# 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. +# +# Values for `animation`: +# - Ease +# - EaseOut +# - EaseOutSine +# - EaseOutQuad +# - EaseOutCubic +# - EaseOutQuart +# - EaseOutQuint +# - EaseOutExpo +# - EaseOutCirc +# - Linear +# +# Specifying a `duration` of `0` will disable the visual bell. +#visual_bell: +# animation: EaseOutExpo +# duration: 0 +# color: '#ffffff' + +# Background opacity +# +# Window opacity as a floating point number from `0.0` to `1.0`. +# The value `0.0` is completely transparent and `1.0` is opaque. +## background_opacity: 1.0 +window: + opacity: 1.0 + +#selection: + #semantic_escape_chars: ",โ`|:\"' ()[]{}<>\t" + + # When set to `true`, selected text will be copied to the primary clipboard. + #save_to_clipboard: false + +# Allow terminal applications to change Alacritty's window title. +dynamic_title: true + +cursor: + # Cursor style + # + # Values for `style`: + # - โ Block + # - _ Underline + # - | Beam + style: Block + + # If this is `true`, the cursor will be rendered as a hollow box when the + # window is not focused. + #unfocused_hollow: true + +# Live config reload (changes require restart) +#live_config_reload: true + +# 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. +# +# Default: +# - (macOS) /bin/bash --login +# - (Linux/BSD) user login shell +# - (Windows) powershell +# shell: +# program: /bin/bash +# args: +# - --login + +# 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 + +# WinPTY backend (Windows only) +# +# Alacritty defaults to using the newer ConPTY backend if it is available, +# since it resolves a lot of bugs and is quite a bit faster. If it is not +# available, the the WinPTY backend will be used instead. +# +# Setting this option to `true` makes Alacritty use the legacy WinPTY backend, +# even if the ConPTY backend is available. +#winpty_backend: false + +# Send ESC (\x1b) before characters when alt is pressed. +#alt_send_esc: true + +#debug: + # Display the time it takes to redraw each frame. + #render_timer: false + + # Keep the log file after quitting Alacritty. + #persistent_logging: false + + # Log level + # + # Values for `log_level`: + # - None + # - Error + # - Warn + # - Info + # - Debug + # - Trace + #log_level: Warn + + # Print all received window events. + #print_events: false + + # Record all characters and escape sequences as test data. + #ref_test: false + +#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: false + + url: + # URL launcher + # + # 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/BSD) xdg-open + # - (Windows) explorer + launcher: + program: xdg-open + args: [] + + # URL modifiers + # + # 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: None + +# Mouse bindings +# +# Mouse bindings are specified as a list of objects, much like the key +# bindings further below. +# +# Each mouse binding will specify a: +# +# - `mouse`: +# +# - Middle +# - Left +# - Right +# - Numeric identifier such as `5` +# +# - `action` (see key bindings) +# +# And optionally: +# +# - `mods` (see key bindings) +#mouse_bindings: +# - { mouse: Middle, action: PasteSelection } + +# Key bindings +# +# Key bindings are specified as a list of objects. For example, this is the +# default paste binding: +# +# `- { key: V, mods: Control|Shift, action: Paste }` +# +# Each key binding will specify a: +# +# - `key`: Identifier of the key pressed +# +# - A-Z +# - F1-F24 +# - Key0-Key9 +# +# A full list with available key codes can be found here: +# https://docs.rs/glutin/*/glutin/event/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`. +# +# Then exactly one of: +# +# - `chars`: Send a byte sequence to the running application +# +# 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. +# +# - `action`: Execute a predefined action +# +# - Copy +# - Paste +# - PasteSelection +# - IncreaseFontSize +# - DecreaseFontSize +# - ResetFontSize +# - ScrollPageUp +# - ScrollPageDown +# - ScrollLineUp +# - ScrollLineDown +# - ScrollToTop +# - ScrollToBottom +# - ClearHistory +# - Hide +# - Minimize +# - Quit +# - ToggleFullscreen +# - SpawnNewInstance +# - ClearLogNotice +# - ReceiveChar +# - None +# +# (macOS only): +# - ToggleSimpleFullscreen: Enters fullscreen without occupying another space +# +# - `command`: Fork and execute a specified command plus arguments +# +# The `command` field must be a map containing a `program` string and an +# `args` array of command line parameter strings. For example: +# `{ program: "alacritty", args: ["-e", "vttest"] }` +# +# And optionally: +# +# - `mods`: Key modifiers to filter binding actions +# +# - Command +# - Control +# - Option +# - Super +# - Shift +# - Alt +# +# Multiple `mods` can be combined using `|` like this: +# `mods: Control|Shift`. +# Whitespace and capitalization are relevant and must match the example. +# +# - `mode`: Indicate a binding for only specific terminal reported modes +# +# This is mainly used to send applications the correct escape sequences +# when in different modes. +# +# - AppCursor +# - AppKeypad +# - Alt +# +# A `~` operator can be used before a mode to apply the binding whenever +# the mode is *not* active, e.g. `~Alt`. +# +# 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 `ReceiveChar` action. Alternatively, you can use `None` for +# a no-op if you do not wish to receive input characters for that binding. +key_bindings: + # (Windows, Linux, and BSD 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: Plus, mods: Control, action: IncreaseFontSize } + - { key: Minus, mods: Control, action: DecreaseFontSize } + - { key: F11, mods: None, action: ToggleFullscreen } + - { key: Paste, mods: None, action: Paste } + - { key: Copy, mods: None, action: Copy } + - { key: L, mods: Control, action: ClearLogNotice } + - { key: L, mods: Control, chars: "\x0c" } + - { key: PageUp, mods: None, action: ScrollPageUp, mode: ~Alt } + - { key: PageDown, mods: None, action: ScrollPageDown, mode: ~Alt } + - { key: Home, mods: Shift, action: ScrollToTop, mode: ~Alt } + - { key: End, mods: Shift, action: ScrollToBottom, mode: ~Alt } diff --git a/.config/fish/conf.d/omf.fish b/.config/fish/conf.d/omf.fish @@ -0,0 +1,7 @@ +# Path to Oh My Fish install. +set -q XDG_DATA_HOME + and set -gx OMF_PATH "$XDG_DATA_HOME/omf" + or set -gx OMF_PATH "$HOME/.local/share/omf" + +# Load Oh My Fish configuration. +source $OMF_PATH/init.fish diff --git a/.config/fish/config.fish b/.config/fish/config.fish @@ -0,0 +1,230 @@ +### ADDING TO THE PATH +# First line removes the path; second line sets it. Without the first line, +# your path gets massive and fish becomes very slow. +set -e fish_user_paths +set -U fish_user_paths $HOME/.local/bin $HOME/Applications $fish_user_paths + +### EXPORT ### +set fish_greeting # Supresses fish's intro message +set TERM "xterm-256color" # Sets the terminal type +set EDITOR "nvim" # $EDITOR use neovim in terminal +set VISUAL "notepadqq" # $VISUAL use notepadqq in GUI mode + +### SET MANPAGER +### Uncomment only one of these! + +### "bat" as manpager +set -x MANPAGER "sh -c 'col -bx | bat -l man -p'" + +### "vim" as manpager +# set -x MANPAGER '/bin/bash -c "vim -MRn -c \"set buftype=nofile showtabline=0 ft=man ts=8 nomod nolist norelativenumber nonu noma\" -c \"normal L\" -c \"nmap q :qa<CR>\"</dev/tty <(col -b)"' + +### "nvim" as manpager +# set -x MANPAGER "nvim -c 'set ft=man' -" + +### SET EITHER DEFAULT EMACS MODE OR VI MODE ### +function fish_user_key_bindings + # fish_default_key_bindings + fish_vi_key_bindings +end +### END OF VI MODE ### + +### AUTOCOMPLETE AND HIGHLIGHT COLORS ### + +## One Dark Colors +set fish_color_normal '#c678dd' +set fish_color_autosuggestion '#abb2bf' +set fish_color_command '#56b6c2' +set fish_color_error '#e06c75' +set fish_color_param '#56b6c2' + +### FUNCTIONS ### + +function commits + git log --author="$argv" --format=format:%ad --date=short | uniq -c | awk '{print $1}' | spark | lolcat +end + +# Functions needed for !! and !$ +function __history_previous_command + switch (commandline -t) + case "!" + commandline -t $history[1]; commandline -f repaint + case "*" + commandline -i ! + end +end + +function __history_previous_command_arguments + switch (commandline -t) + case "!" + commandline -t "" + commandline -f history-token-search-backward + case "*" + commandline -i '$' + end +end +# The bindings for !! and !$ +if [ $fish_key_bindings = "fish_vi_key_bindings" ]; + bind -Minsert ! __history_previous_command + bind -Minsert '$' __history_previous_command_arguments +else + bind ! __history_previous_command + bind '$' __history_previous_command_arguments +end + +# Function for creating a backup file +# ex: backup file.txt +# result: copies file as file.txt.bak +function backup --argument filename + cp $filename $filename.bak +end + +# Function for copying files and directories, even recursively. +# ex: copy DIRNAME LOCATIONS +# result: copies the directory and all of its contents. +function copy + set count (count $argv | tr -d \n) + if test "$count" = 2; and test -d "$argv[1]" + set from (echo $argv[1] | trim-right /) + set to (echo $argv[2]) + command cp -r $from $to + else + command cp $argv + end +end + +# Function for printing a column (splits input on whitespace) +# ex: echo 1 2 3 | coln 3 +# output: 3 +function coln + while read -l input + echo $input | awk '{print $'$argv[1]'}' + end +end + +# Function for printing a row +# ex: seq 3 | rown 3 +# output: 3 +function rown --argument index + sed -n "$index p" +end + +# Function for ignoring the first 'n' lines +# ex: seq 10 | skip 5 +# results: prints everything but the first 5 lines +function skip --argument n + tail +(math 1 + $n) +end + +# Function for taking the first 'n' lines +# ex: seq 10 | take 5 +# results: prints only the first 5 lines +function take --argument number + head -$number +end + +### END OF FUNCTIONS ### + + +### ALIASES ### +# \x1b[2J <- clears tty +# \x1b[1;1H <- goes to (1, 1) (start) +# alias clear='echo -en "\x1b[2J\x1b[1;1H" ; echo; echo; seq 1 (tput cols) | sort -R | spark | lolcat; echo; echo' + +# Navigation +alias ..='cd ..' +alias ...='cd ../..' +alias .3='cd ../../..' +alias .4='cd ../../../..' +alias .5='cd ../../../../..' + +# Vim +alias vim='nvim' +alias v='nvim' + +# Change "ls" to "exa" +alias ls='exa -l --color=always --group-directories-first --no-user --no-time --icons' # my preferred listing +alias la='exa -al --color=always --group-directories-first --no-user --no-time --icons' # all files and dirs +alias ll='exa -l --color=always --group-directories-first --header --icons' # long format +alias lt='exa -aT --color=always --group-directories-first' # tree listing +alias l.='exa -a | egrep "^\."' + +# Change "cat" to "bat" +alias cat='bat' + +# Pacman and Paru +alias update='sudo pacman -Syu' # update only standard pkgs +alias pacsyyu='sudo pacman -Syyu' # Refresh pkglist & update standard pkgs +alias parsua='paru -Sua --noconfirm' # update only AUR pkgs (paru) +alias parsyu='paru -Syu --noconfirm' # update standard pkgs and AUR pkgs (paru) +alias unlock='sudo rm /var/lib/pacman/db.lck' # remove pacman lock +alias cleanup='sudo pacman -Rns (pacman -Qtdq)' # remove orphaned packages + +# get fastest mirrors +alias mirror="sudo reflector -f 30 -l 30 --number 10 --verbose --save /etc/pacman.d/mirrorlist" +alias mirrord="sudo reflector --latest 50 --number 20 --sort delay --save /etc/pacman.d/mirrorlist" +alias mirrors="sudo reflector --latest 50 --number 20 --sort score --save /etc/pacman.d/mirrorlist" +alias mirrora="sudo reflector --latest 50 --number 20 --sort age --save /etc/pacman.d/mirrorlist" + +# Colorize grep output (good for log files) +alias grep='rg --color=auto' # change grep to ripgrep +alias egrep='egrep --color=auto' +alias fgrep='fgrep --color=auto' + +# confirm before overwriting something +alias cp="cp -i" +alias mv='mv -i' +alias rm='rm -i' + +# adding flags +alias df='df -h' # human-readable sizes +alias free='free -m' # show sizes in MB +# alias lynx='lynx -cfg=~/.lynx/lynx.cfg -lss=~/.lynx/lynx.lss -vikeys' +alias paru='paru --bottomup' # list pkgs from the bottum up + +# Merge Xresources +alias merge='xrdb -merge ~/.Xresources' + +# git +alias addup='git add -u' +alias addall='git add .' +alias branch='git branch' +alias checkout='git checkout' +alias clone='git clone' +alias commit='git commit -m' +alias fetch='git fetch' +alias pull='git pull origin' +alias push='git push origin' +alias tag='git tag' +alias newtag='git tag -a' + +# get error messages from journalctl +alias jctl="journalctl -p 3 -xb" + +# gpg encryption +# verify signature for isos +alias gpg-check="gpg2 --keyserver-options auto-key-retrieve --verify" +# receive the key of a developer +alias gpg-retrieve="gpg2 --keyserver-options auto-key-retrieve --receive-keys" + +# youtube-dl +alias yta-best="youtube-dl --extract-audio --audio-format best " +alias yta-mp3="youtube-dl --extract-audio --audio-format mp3 " +alias ytv-best="youtube-dl -f bestvideo+bestaudio " + +# the terminal rickroll +alias rr='curl -s -L https://raw.githubusercontent.com/keroserene/rickrollrc/master/roll.sh | bash' + +# Useful aliases +alias np='notepadqq' # notepadqq +alias myip="curl http://ipecho.net/plain; echo" # get ip address + +### RANDOM COLOR SCRIPT ### +# Install it from the AUR: shell-color-scripts +# colorscript random + +### SETTING THE STARSHIP PROMPT ### +starship init fish | source + +### ADD ICONS ### +source ~/.local/share/icons-in-terminal/icons.fish diff --git a/.config/fish/fish_variables b/.config/fish/fish_variables @@ -0,0 +1,33 @@ +# This file contains fish universal variable definitions. +# VERSION: 3.0 +SETUVAR __fish_initialized:3400 +SETUVAR _fish_abbr_pu:pacman\x20update +SETUVAR fish_color_autosuggestion:\x23abb2bf +SETUVAR fish_color_cancel:\x2dr +SETUVAR fish_color_command:\x2356b6c2 +SETUVAR fish_color_comment:red +SETUVAR fish_color_cwd:green +SETUVAR fish_color_cwd_root:red +SETUVAR fish_color_end:green +SETUVAR fish_color_error:\x23e06c75 +SETUVAR fish_color_escape:brcyan +SETUVAR fish_color_history_current:\x2d\x2dbold +SETUVAR fish_color_host:normal +SETUVAR fish_color_host_remote:yellow +SETUVAR fish_color_normal:\x23c678dd +SETUVAR fish_color_operator:brcyan +SETUVAR fish_color_param:\x2356b6c2 +SETUVAR fish_color_quote:yellow +SETUVAR fish_color_redirection:cyan\x1e\x2d\x2dbold +SETUVAR fish_color_search_match:\x2d\x2dbackground\x3d111 +SETUVAR fish_color_selection:white\x1e\x2d\x2dbold\x1e\x2d\x2dbackground\x3dbrblack +SETUVAR fish_color_status:red +SETUVAR fish_color_user:brgreen +SETUVAR fish_color_valid_path:\x2d\x2dunderline +SETUVAR fish_key_bindings:fish_vi_key_bindings +SETUVAR fish_pager_color_completion:normal +SETUVAR fish_pager_color_description:B3A06D\x1eyellow\x1e\x2di +SETUVAR fish_pager_color_prefix:cyan\x1e\x2d\x2dbold\x1e\x2d\x2dunderline +SETUVAR fish_pager_color_progress:brwhite\x1e\x2d\x2dbackground\x3dcyan +SETUVAR fish_pager_color_selected_background:\x2dr +SETUVAR fish_user_paths:/home/michael/\x2elocal/bin\x1e/home/michael/Applications diff --git a/.config/kitty/kitty.bak b/.config/kitty/kitty.bak @@ -0,0 +1,43 @@ +# github colors for Kitty + +background #24292e +foreground #d1d5da +selection_background #284566 +selection_foreground #d1d5da +url_color #d1d5da +cursor #c8e1ff +cursor_text_color background + +# Tabs +active_tab_background #2188ff +active_tab_foreground #1f2428 +inactive_tab_background #666666 +inactive_tab_foreground #1f2428 + +# Windows Border +active_border_color #444c56 +inactive_border_color #444c56 + +# normal +color0 #586069 +color1 #ea4a5a +color2 #34d058 +color3 #ffea7f +color4 #2188ff +color5 #b392f0 +color6 #39c5cf +color7 #d1d5da + +# bright +color8 #959da5 +color9 #f97583 +color10 #85e89d +color11 #ffea7f +color12 #79b8ff +color13 #b392f0 +color14 #56d4dd +color15 #fafbfc + +# extended colors +color16 #ffea7f +color17 #f97583 diff --git a/.config/kitty/kitty.conf b/.config/kitty/kitty.conf @@ -0,0 +1,856 @@ +# vim:fileencoding=utf-8:ft=conf:foldmethod=marker + +#: Fonts {{{ + +#: kitty has very powerful font management. You can configure +#: individual font faces and even specify special fonts for particular +#: characters. + +# font_family Monaco +font_family Fira Code +# font_family Hasklig +# font_family mononoki +# font_family iconsolata +# font_family Input +bold_font auto +italic_font auto +bold_italic_font auto + +#: You can specify different fonts for the bold/italic/bold-italic +#: variants. By default they are derived automatically, by the OSes +#: font system. Setting them manually is useful for font families that +#: have many weight variants like Book, Medium, Thick, etc. For +#: example:: + +# font_family Hasklig Medium +# bold_font Hasklig Bold +# italic_font Hasklig Book Italic +# bold_italic_font Hasklig Medium Italic + + +# font_family Iosevka Term Regular +# bold_font Iosevka Term Bold +# italic_font Iosevka Term Oblique +# bold_italic_font Iosevka Term Bold Oblique + +#: font_family Operator Mono Book +#: bold_font Operator Mono Medium +#: italic_font Operator Mono Book Italic +#: bold_italic_font Operator Mono Medium Italic +# + +# font_family IBM Plex Mono Text Regular +# bold_font IBM Plex Mono Text Medium +# italic_font IBM Plex Mono Medium Italic +# bold_italic_font IBM Plex Mono Bold Italic + +# font_family Ubuntu Mono Regular +# bold_font Ubuntu Mono Bold +# italic_font Ubuntu Mono Italic +# bold_italic_font Ubuntu Mono Bold Italic + +# font_family Fantasque Sans Mono Regular +# bold_font Fantasque Sans Mono bold +# italic_font Fantasque Sans Mono Italic +# bold_italic_font Fantasque Sans Mono BoldItalic + + +# font_family Iconsolata Regular +# bold_font Iconsolata Bold +# italic_font IBM Plex Mono Medium Italic +# bold_italic_font IBM Plex Mono Bold Italic + +# font_family Monoid Retina +# bold_font Monoid Bold +# italic_font Monoid Italic +# bold_italic_font Monoid Italic + +# font_family Input Regular +# bold_font Input Bold +# italic_font Input Italic +# bold_italic_font Input Italic + +font_size 13.5 + +#: Font size (in pts) + +adjust_line_height 3 +# adjust_column_width 0 + +#: Change the size of each character cell kitty renders. You can use +#: either numbers, which are interpreted as pixels or percentages +#: (number followed by %), which are interpreted as percentages of the +#: unmodified values. You can use negative pixels or percentages less +#: than 100% to reduce sizes (but this might cause rendering +#: artifacts). + +# symbol_map U+E0A0-U+E0A2,U+E0B0-U+E0B3 PowerlineSymbols + +#: Map the specified unicode codepoints to a particular font. Useful +#: if you need special rendering for some symbols, such as for +#: Powerline. Avoids the need for patched fonts. Each unicode code +#: point is specified in the form U+<code point in hexadecimal>. You +#: can specify multiple code points, separated by commas and ranges +#: separated by hyphens. symbol_map itself can be specified multiple +#: times. Syntax is:: + +#: symbol_map codepoints Font Family Name + +# box_drawing_scale 0.001, 1, 1.5, 2 + +#: Change the sizes of the lines used for the box drawing unicode +#: characters These values are in pts. They will be scaled by the +#: monitor DPI to arrive at a pixel value. There must be four values +#: corresponding to thin, normal, thick, and very thick lines. + +#: }}} + +#: Cursor customization {{{ + +# cursor magenta +cursor white + +#: Default cursor color + +# cursor_shape block + +#: The cursor shape can be one of (block, beam, underline) + +cursor_blink_interval 0 +# cursor_stop_blinking_after 15.0 + +#: The interval (in seconds) at which to blink the cursor. Set to zero +#: to disable blinking. Note that numbers smaller than repaint_delay +#: will be limited to repaint_delay. Stop blinking cursor after the +#: specified number of seconds of keyboard inactivity. Set to zero to +#: never stop blinking. + +#: }}} + +#: Scrollback {{{ + +# scrollback_lines 2000 + +#: Number of lines of history to keep in memory for scrolling back. +#: Memory is allocated on demand. + +# scrollback_pager less --chop-long-lines --RAW-CONTROL-CHARS +INPUT_LINE_NUMBER + +#: Program with which to view scrollback in a new window. The +#: scrollback buffer is passed as STDIN to this program. If you change +#: it, make sure the program you use can handle ANSI escape sequences +#: for colors and text formatting. INPUT_LINE_NUMBER in the command +#: line above will be replaced by an integer representing which line +#: should be at the top of the screen. + +# wheel_scroll_multiplier 5 + +#: Modify the amount scrolled by the mouse wheel or touchpad. Use +#: negative numbers to change scroll direction. + +#: }}} + +#: Mouse {{{ + +# url_color #0087BD +# url_style curly + +#: The color and style for highlighting URLs on mouse-over. url_style +#: can be one of: none, single, double, curly + +# open_url_modifiers kitty_mod + +#: The modifier keys to press when clicking with the mouse on URLs to +#: open the URL + +# open_url_with chrome + +#: The program with which to open URLs that are clicked on. The +#: special value default means to use the operating system's default +#: URL handler. + +# copy_on_select no + +#: Copy to clipboard on select. With this enabled, simply selecting +#: text with the mouse will cause the text to be copied to clipboard. +#: Useful on platforms such as macOS/Wayland that do not have the +#: concept of primary selections. Note that this is a security risk, +#: as all programs, including websites open in your browser can read +#: the contents of the clipboard. + +# rectangle_select_modifiers ctrl+alt + +#: The modifiers to use rectangular selection (i.e. to select text in +#: a rectangular block with the mouse) + +# select_by_word_characters :@-./_~?&=%+# + +#: Characters considered part of a word when double clicking. In +#: addition to these characters any character that is marked as an +#: alpha-numeric character in the unicode database will be matched. + +# click_interval 0.5 + +#: The interval between successive clicks to detect double/triple +#: clicks (in seconds) + +# mouse_hide_wait 3.0 + +#: Hide mouse cursor after the specified number of seconds of the +#: mouse not being used. Set to zero to disable mouse cursor hiding. + +# focus_follows_mouse no + +#: Set the active window to the window under the mouse when moving the +#: mouse around + +#: }}} + +#: Performance tuning {{{ + +# repaint_delay 10 + +#: Delay (in milliseconds) between screen updates. Decreasing it, +#: increases frames-per-second (FPS) at the cost of more CPU usage. +#: The default value yields ~100 FPS which is more than sufficient for +#: most uses. Note that to actually achieve 100 FPS you have to either +#: set sync_to_monitor to no or use a monitor with a high refresh +#: rate. + +# input_delay 3 + +#: Delay (in milliseconds) before input from the program running in +#: the terminal is processed. Note that decreasing it will increase +#: responsiveness, but also increase CPU usage and might cause flicker +#: in full screen programs that redraw the entire screen on each loop, +#: because kitty is so fast that partial screen updates will be drawn. + +# sync_to_monitor no + +#: Sync screen updates to the refresh rate of the monitor. This +#: prevents tearing (https://en.wikipedia.org/wiki/Screen_tearing) +#: when scrolling. However, it limits the rendering speed to the +#: refresh rate of your monitor. With a very high speed mouse/high +#: keyboard repeat rate, you may notice some slight input latency. If +#: so, set this to no. + +#: }}} + +#: Terminal bell {{{ + +enable_audio_bell yes + +#: Enable/disable the audio bell. Useful in environments that require +#: silence. + +# visual_bell_duration 0.0 + +#: Visual bell duration. Flash the screen when a bell occurs for the +#: specified number of seconds. Set to zero to disable. + +window_alert_on_bell yes + +#: Request window attention on bell. Makes the dock icon bounce on +#: macOS or the taskbar flash on linux. + +bell_on_tab yes + +#: Show a bell symbol on the tab if a bell occurs in one of the +#: windows in the tab and the window is not the currently focused +#: window + +#: }}} + +#: Window layout {{{ + +# remember_window_size yes +# initial_window_width 640 +# initial_window_height 400 + +#: If enabled, the window size will be remembered so that new +#: instances of kitty will have the same size as the previous +#: instance. If disabled, the window will initially have size +#: configured by initial_window_width/height, in pixels. You can use a +#: suffix of "c" on the width/height values to have them interpreted +#: as number of cells instead of pixels. + +enabled_layouts Tall:bias=65, Fat:bias=65, Stack, Grid, Horizontal, Vertical + +#: The enabled window layouts. A comma separated list of layout names. +#: The special value * means all layouts. The first listed layout will +#: be used as the startup layout. For a list of available layouts, see +#: the layouts. + +# window_resize_step_cells 2 +# window_resize_step_lines 2 + +#: The step size (in units of cell width/cell height) to use when +#: resizing windows. The cells value is used for horizontal resizing +#: and the lines value for vertical resizing. + +window_border_width 1 + +#: The width (in pts) of window borders. Will be rounded to the +#: nearest number of pixels based on screen resolution. Note that +#: borders are displayed only when more than one window is visible. +#: They are meant to separate multiple windows. + +window_margin_width 4 + +#: The window margin (in pts) (blank area outside the border) + +# single_window_margin_width -1000.0 + +#: The window margin (in pts) to use when only a single window is +#: visible. Negative values will cause the value of +#: window_margin_width to be used instead. + +window_padding_width 6 + +#: The window padding (in pts) (blank area between the text and the +#: window border) + +active_border_color #666666 + +#: The color for the border of the active window + +inactive_border_color #333333 + +#: The color for the border of inactive windows + +# bell_border_color #ff5a00 + +#: The color for the border of inactive windows in which a bell has +#: occurred + +inactive_text_alpha .8 + +#: Fade the text in inactive windows by the specified amount (a number +#: between zero and one, with zero being fully faded). + +#: }}} + +#: Tab bar {{{ + +# tab_bar_edge bottom + +#: Which edge to show the tab bar on, top or bottom + +tab_bar_margin_width 4 + +#: The margin to the left and right of the tab bar (in pts) + +tab_bar_style fade + +#: The tab bar style, can be one of: fade or separator. In the fade +#: style, each tab's edges fade into the background color, in the +#: separator style, tabs are separated by a configurable separator. + +# tab_fade 0.25 0.5 0.75 1 +tab_fade 1 1 1 + +#: Control how each tab fades into the background when using fade for +#: the tab_bar_style. Each number is an alpha (between zero and one) +#: that controls how much the corresponding cell fades into the +#: background, with zero being no fade and one being full fade. You +#: can change the number of cells used by adding/removing entries to +#: this list. + +# tab_separator " " + +#: The separator between tabs in the tab bar when using separator as +#: the tab_bar_style. + +active_tab_foreground #282828 +active_tab_background #bbbbbb +active_tab_font_style bold +inactive_tab_foreground #eeeeee +inactive_tab_background #282828 +inactive_tab_font_style normal + +#: Tab bar colors and styles + +#: }}} + +#: Color scheme {{{ + +foreground #eeeeee +background #282828 + +#: The foreground and background colors + +# background_opacity 1.0 +# dynamic_background_opacity no + +#: The opacity of the background. A number between 0 and 1, where 1 is +#: opaque and 0 is fully transparent. This will only work if +#: supported by the OS (for instance, when using a compositor under +#: X11). Note that it only sets the default background color's +#: opacity. This is so that things like the status bar in vim, +#: powerline prompts, etc. still look good. But it means that if you +#: use a color theme with a background color in your editor, it will +#: not be rendered as transparent. Instead you should change the +#: default background color in your kitty config and not use a +#: background color in the editor color scheme. Or use the escape +#: codes to set the terminals default colors in a shell script to +#: launch your editor. Be aware that using a value less than 1.0 is a +#: (possibly significant) performance hit. If you want to dynamically +#: change transparency of windows set dynamic_background_opacity to +#: yes (this is off by default as it has a performance cost) + +# dim_opacity 0.75 + +#: How much to dim text that has the DIM/FAINT attribute set. One +#: means no dimming and zero means fully dimmed (i.e. invisible). + +# selection_foreground #000000 +# selection_background #FFFACD + +#: The foreground and background for text selected with the mouse + + +#: The 16 terminal colors. There are 8 basic colors, each color has a +#: dull and bright version. You can also set the remaining colors from +#: the 256 color table as color16 to color255. + +color0 #282828 +color8 #484848 + +#: black + +color1 #f43753 +color9 #f43753 + +#: red + +color2 #c9d05c +color10 #c9d05c + +#: green + +color3 #ffc24b +color11 #ffc24b + +#: yellow + +color4 #b3deef +color12 #b3deef + +#: blue + +color5 #d3b987 +color13 #d3b987 + +#: magenta + +color6 #73cef4 +color14 #73cef4 + +#: cyan + +color7 #eeeeee +color15 #ffffff + +#: white + +#: }}} + +#: Advanced {{{ + +# shell zsh + +#: The shell program to execute. The default value of . means to use +#: whatever shell is set as the default shell for the current user. +#: Note that on macOS if you change this, you might need to add +#: --login to ensure that the shell starts in interactive mode and +#: reads its startup rc files. + +editor nvim + +#: The console editor to use when editing the kitty config file or +#: similar tasks. A value of . means to use the environment variable +#: EDITOR. Note that this environment variable has to be set not just +#: in your shell startup scripts but system-wide, otherwise kitty will +#: not see it. + +# close_on_child_death nvim + +#: Close the window when the child process (shell) exits. If no (the +#: default), the terminal will remain open when the child exits as +#: long as there are still processes outputting to the terminal (for +#: example disowned or backgrounded processes). If yes, the window +#: will close as soon as the child process exits. Note that setting it +#: to yes means that any background processes still using the terminal +#: can fail silently because their stdout/stderr/stdin no longer work. + +# allow_remote_control no + +#: Allow other programs to control kitty. If you turn this on other +#: programs can control all aspects of kitty, including sending text +#: to kitty windows, opening new windows, closing windows, reading the +#: content of windows, etc. Note that this even works over ssh +#: connections. + +# startup_session none + +#: Path to a session file to use for all kitty instances. Can be +#: overridden by using the kitty --session command line option for +#: individual instances. See sessions in the kitty documentation for +#: details. Note that relative paths are interpreted with respect to +#: the kitty config directory. Environment variables in the path are +#: expanded. + +# clipboard_control write-clipboard write-primary + +#: Allow programs running in kitty to read and write from the +#: clipboard. You can control exactly which actions are allowed. The +#: set of possible actions is: write-clipboard read-clipboard write- +#: primary read-primary The default is to allow writing to the +#: clipboard and primary selection. Note that enabling the read +#: functionality is a security risk as it means that any program, even +#: one running on a remote server via SSH can read your clipboard. + +# term xterm-kitty + +#: The value of the TERM environment variable to set. Changing this +#: can break many terminal programs, only change it if you know what +#: you are doing, not because you read some advice on Stack Overflow +#: to change it. + +#: }}} + +#: OS specific tweaks {{{ + +macos_titlebar_color #333333 + +#: Change the color of the kitty window's titlebar on macOS. A value +#: of system means to use the default system color, a value of +#: background means to use the background color of the currently +#: active window and finally you can use an arbitrary color, such as +#: #12af59 or red. WARNING: This option works by using a hack, as +#: there is no proper Cocoa API for it. It sets the background color +#: of the entire window and makes the titlebar transparent. As such it +#: is incompatible with background_opacity. If you want to use both, +#: you are probably better off just hiding the titlebar with +#: macos_hide_titlebar. + +# macos_hide_titlebar yes + +#: Hide the kitty window's title bar on macOS. + +# x11_hide_window_decorations no + +#: Hide the window decorations (title bar and window borders) on X11 +#: and Wayland. Whether this works and exactly what effect it has +#: depends on the window manager, as it is the job of the window +#: manager/compositor to draw window decorations. + +macos_option_as_alt no + +#: Use the option key as an alt key. With this set to no, kitty will +#: use the macOS native Option+Key = unicode character behavior. This +#: will break any Alt+key keyboard shortcuts in your terminal +#: programs, but you can use the macOS unicode input technique. + +# macos_hide_from_tasks no + +#: Hide the kitty window from running tasks (Option+Tab) on macOS. + +# macos_quit_when_last_window_closed no + +#: Have kitty quit when all the top-level windows are closed. By +#: default, kitty will stay running, even with no open windows, as is +#: the expected behavior on macOS. + +#: }}} + +#: Keyboard shortcuts {{{ + +#: For a list of key names, see: GLFW keys +#: <http://www.glfw.org/docs/latest/group__keys.html>. The name to use +#: is the part after the GLFW_KEY_ prefix. For a list of modifier +#: names, see: GLFW mods +#: <http://www.glfw.org/docs/latest/group__mods.html> + +#: On Linux you can also use XKB key names to bind keys that are not +#: supported by GLFW. See XKB keys +#: <https://github.com/xkbcommon/libxkbcommon/blob/master/xkbcommon/xkbcommon- +#: keysyms.h> for a list of key names. The name to use is the part +#: after the XKB_KEY_ prefix. Note that you should only use an XKB key +#: name for keys that are not present in the list of GLFW keys. + +#: You can use the special action no_op to unmap a keyboard shortcut +#: that is assigned in the default configuration. + +#: You can combine multiple actions to be triggered by a single +#: shortcut, using the syntax below:: + +#: map key combine <separator> action1 <separator> action2 <separator> action3 ... + +#: For example:: + +#: map kitty_mod+e combine : new_window : next_layout + +#: this will create a new window and switch to the next available +#: layout + +#: You can use multi-key shortcuts using the syntax shown below:: + +#: map key1>key2>key3 action + +#: For example:: + +#: map ctrl+f>2 set_font_size 20 + +# kitty_mod ctrl+shift + +#: The value of kitty_mod is used as the modifier for all default +#: shortcuts, you can change it in your kitty.conf to change the +#: modifiers for all the default shortcuts. + +# clear_all_shortcuts no + +#: You can have kitty remove all shortcut definition seen up to this +#: point. Useful, for instance, to remove the default shortcuts. + +#: Clipboard {{{ + +# map cmd+c copy_to_clipboard +# map kitty_mod+c copy_to_clipboard +# map cmd+v paste_from_clipboard +# map kitty_mod+v paste_from_clipboard +# map kitty_mod+s paste_from_selection +# map shift+insert paste_from_selection +# map kitty_mod+o pass_selection_to_program + +#: You can also pass the contents of the current selection to any +#: program using pass_selection_to_program. By default, the system's +#: open program is used, but you can specify your own, for example:: + +#: map kitty_mod+o pass_selection_to_program firefox + +#: You can pass the current selection to a terminal program running in +#: a new kitty window, by using the @selection placeholder:: + +#: map kitty_mod+y new_window less @selection + +#: }}} + +#: Scrolling {{{ + +# map kitty_mod+up scroll_line_up +# map kitty_mod+k scroll_line_up +# map kitty_mod+down scroll_line_down +# map kitty_mod+j scroll_line_down +# map kitty_mod+page_up scroll_page_up +# map kitty_mod+page_down scroll_page_down +map kitty_mod+b scroll_page_up +map kitty_mod+f scroll_page_down +# map kitty_mod+home scroll_home +# map kitty_mod+end scroll_end +# map kitty_mod+h show_scrollback + +#: You can send the contents of the current screen + history buffer as +#: stdin to an arbitrary program using the placeholders @text (which +#: is the plain text) and @ansi (which includes text styling escape +#: codes). For only the current screen, use @screen or @ansi_screen. +#: For example, the following command opens the scrollback buffer in +#: less in a new window:: + +#: map kitty_mod+y new_window @ansi less +G -R + +#: }}} + +#: Window management {{{ + +# map kitty_mod+enter new_window +map kitty_mod+enter no_op +map kitty_mod+enter new_window_with_cwd + +#: You can open a new window running an arbitrary program, for +#: example:: + +#: map kitty_mod+y new_window mutt + +#: You can open a new window with the current working directory set to +#: the working directory of the current window using:: + +#: map ctrl+alt+enter new_window_with_cwd + +# map cmd+n new_os_window +# map kitty_mod+n new_os_window +# map kitty_mod+w close_window +# map kitty_mod+] next_window +# map kitty_mod+[ previous_window +map kitty_mod+j previous_window +map kitty_mod+k next_window +map kitty_mod+up move_window_forward +map kitty_mod+down move_window_backward +# map kitty_mod+f move_window_forward +# map kitty_mod+b move_window_backward +# map kitty_mod+` move_window_to_top +# map kitty_mod+r start_resizing_window +# map kitty_mod+1 first_window +# map kitty_mod+2 second_window +# map kitty_mod+3 third_window +# map kitty_mod+4 fourth_window +# map kitty_mod+5 fifth_window +# map kitty_mod+6 sixth_window +map kitty_mod+6 no_op +# map kitty_mod+7 seventh_window +# map kitty_mod+8 eighth_window +# map kitty_mod+9 ninth_window +# map kitty_mod+0 tenth_window +#: }}} + +#: Tab management {{{ + +# map kitty_mod+right next_tab +# map kitty_mod+left previous_tab +map kitty_mod+] no_op +map kitty_mod+] next_tab +map kitty_mod+[ no_op +map kitty_mod+[ previous_tab +# map kitty_mod+t new_tab +# map kitty_mod+q close_tab +# map kitty_mod+. move_tab_forward +# map kitty_mod+, move_tab_backward +map kitty_mod+right no_op +map kitty_mod+right move_tab_forward +map kitty_mod+left no_op +map kitty_mod+left move_tab_backward +# map kitty_mod+alt+t set_tab_title +map kitty_mod+t no_op +map kitty_mod+t new_tab_with_cwd + +#: You can also create shortcuts to go to specific tabs, with 1 being +#: the first tab:: + +#: map ctrl+alt+1 goto_tab 1 +#: map ctrl+alt+2 goto_tab 2 + +#: Just as with new_window above, you can also pass the name of +#: arbitrary commands to run when using new_tab and use +#: new_tab_with_cwd. +#: }}} + +#: Layout management {{{ + +# map kitty_mod+l next_layout + +#: You can also create shortcuts to switch to specific layouts:: + +map kitty_mod+0 no_op +map kitty_mod+0 goto_layout stack +map kitty_mod+9 no_op +map kitty_mod+9 goto_layout tall:bias=65 +map kitty_mod+8 no_op +map kitty_mod+8 goto_layout fat:bias=65 +#: map ctrl+alt+t goto_layout tall +#: map ctrl+alt+s goto_layout stack +#: }}} + +#: Font sizes {{{ + +#: You can change the font size for all top-level kitty windows at a +#: time or only the current one. + +map kitty_mod+equal change_font_size all +2.0 +map kitty_mod+minus change_font_size all -2.0 +map kitty_mod+backspace change_font_size all 0 + +#: To setup shortcuts for specific font sizes:: + +#: map kitty_mod+f6 change_font_size all 10.0 + +#: To setup shortcuts to change only the current window's font size:: + +#: map kitty_mod+f6 change_font_size current 10.0 +#: }}} + +#: Select and act on visible text {{{ + +#: Use the hints kitten to select text and either pass it to an +#: external program or insert it into the terminal or copy it to the +#: clipboard. + +# map kitty_mod+e kitten hints + +#: Open a currently visible URL using the keyboard. The program used +#: to open the URL is specified in open_url_with. + +# map kitty_mod+p>f kitten hints --type path --program - + +#: Select a path/filename and insert it into the terminal. Useful, for +#: instance to run git commands on a filename output from a previous +#: git command. + +# map kitty_mod+p>shift+f kitten hints --type path + +#: Select a path/filename and open it with the default open program. + +# map kitty_mod+p>l kitten hints --type line --program - + +#: Select a line of text and insert it into the terminal. Use for the +#: output of things like: ls -1 + +# map kitty_mod+p>w kitten hints --type word --program - + +#: Select words and insert into terminal. + +# map kitty_mod+p>h kitten hints --type hash --program - + +#: Select something that looks like a hash and insert it into the +#: terminal. Useful with git, which uses sha1 hashes to identify +#: commits + + +#: The hints kitten has many more modes of operation that you can map +#: to different shortcuts. For a full description see kittens/hints. +#: }}} + +#: Miscellaneous {{{ + + +# map kitty_mod+f11 toggle_fullscreen +# map kitty_mod+u input_unicode_character +# map kitty_mod+f2 edit_config_file +# map kitty_mod+escape kitty_shell window + +#: Open the kitty shell in a new window/tab/overlay/os_window to +#: control kitty using commands. + +# map kitty_mod+a>m set_background_opacity +0.1 +# map kitty_mod+a>l set_background_opacity -0.1 +# map kitty_mod+a>1 set_background_opacity 1 +# map kitty_mod+a>d set_background_opacity default + +#: You can tell kitty to send arbitrary (UTF-8) encoded text to the +#: client program when pressing specified shortcut keys. For example:: + +#: map ctrl+alt+a send_text all Special text + +#: This will send "Special text" when you press the ctrl+alt+a key +#: combination. The text to be sent is a python string literal so you +#: can use escapes like \x1b to send control codes or \u21fb to send +#: unicode characters (or you can just input the unicode characters +#: directly as UTF-8 text). The first argument to send_text is the +#: keyboard modes in which to activate the shortcut. The possible +#: values are normal or application or kitty or a comma separated +#: combination of them. The special keyword all means all modes. The +#: modes normal and application refer to the DECCKM cursor key mode +#: for terminals, and kitty refers to the special kitty extended +#: keyboard protocol. + +#: Another example, that outputs a word and then moves the cursor to +#: the start of the line (same as pressing the Home key):: + +#: map ctrl+alt+a send_text normal Word\x1b[H +#: map ctrl+alt+a send_text application Word\x1bOH + +map ctrl+space send_text all \x10 + +#: }}} + + +# }}} diff --git a/.config/kwinrc b/.config/kwinrc @@ -0,0 +1,131 @@ +[$Version] +update_info=kwin.upd:replace-scalein-with-scale,kwin.upd:port-minimizeanimation-effect-to-js,kwin.upd:port-scale-effect-to-js,kwin.upd:port-dimscreen-effect-to-js,kwin.upd:auto-bordersize,kwin.upd:animation-speed,kwin.upd:desktop-grid-click-behavior,kwin.upd:no-swap-encourage,kwin.upd:make-translucency-effect-disabled-by-default,kwin.upd:remove-flip-switch-effect,kwin.upd:remove-cover-switch-effect,kwin.upd:remove-cubeslide-effect,kwin.upd:remove-xrender-backend,kwin.upd:enable-scale-effect-by-default,kwin.upd:overview-group-plugin-id,kwin.upd:animation-speed-cleanup,bismuth_new_logger.upd:bismuth-new-logger + +[Compositing] +GLTextureFilter=1 +OpenGLIsUnsafe=false + +[Desktops] +Id_1=3c846e1f-5a40-4576-af1e-9036f9d3a6ef +Id_10=835daa22-5aed-4d35-ab24-372d423d5434 +Id_2=e11103df-e66c-49e3-b4f4-939f0aa4bab2 +Id_3=8fe6b0bc-e044-4858-af51-d498afe838ea +Id_4=58721676-cbb9-4c8c-99d5-32325af5a411 +Id_5=fe910dbd-cf59-4af2-88c3-bbd657c799a7 +Id_6=a2515119-7ee2-471c-b508-3a0951ce3758 +Id_7=bbb4e046-fa1f-4f1a-8739-4b97de0cc639 +Id_8=9b13d630-eea7-4663-9cbc-1f539d4f88fe +Id_9=df6d3baa-ed0f-457d-939e-95f80cd172d7 +Name_1=I +Name_10=X +Name_2=II +Name_3=III +Name_4=IV +Name_5=V +Name_6=VI +Name_7=VII +Name_8=VIII +Name_9=IX +Number=10 +Rows=1 + +[Effect-Blur] +NoiseStrength=0 + +[Effect-MagicLamp] +AnimationDuration=200 + +[Effect-PresentWindows] +BorderActivateAll=9 + +[Effect-Wobbly] +Drag=85 +ResizeWobble=false +Stiffness=10 +WobblynessLevel=1 + +[Effect-blur] +BlurStrength=7 +NoiseStrength=1 + +[Effect-diminactive] +DimFullScreen=false +Strength=5 + +[Effect-kwin4_effect_translucency] +ComboboxPopups=90 +Dialogs=86 +Inactive=91 +Menus=91 +MoveResize=91 + +[Effect-magiclamp] +AnimationDuration=200 + +[Effect-magnifier] +InitialZoom=1.2 + +[Effect-presentwindows] +BorderActivateAll=9 + +[Effect-windowview] +BorderActivateAll=9 + +[Effect-wobblywindows] +Drag=85 +ResizeWobble=false +Stiffness=10 +WobblynessLevel=1 + +[NightColor] +Active=true +LatitudeAuto=-29.8556 +LongitudeAuto=31.0449 + +[Plugins] +bismuthEnabled=true +blurEnabled=true +contrastEnabled=false +diminactiveEnabled=true +forceblurEnabled=false +kwin4_effect_dialogparentEnabled=false +kwin4_effect_dimscreenEnabled=true +kwin4_effect_lightlyshadersEnabled=false +kwin4_effect_open_close_kineticEnabled=true +kwin4_effect_scaleEnabled=false +kwin4_effect_shapecornersEnabled=false +kwin4_effect_squashEnabled=false +magiclampEnabled=true +opacify-kwinEnabled=false +overviewEnabled=true +sheetEnabled=true +slidebackEnabled=true +zoomEnabled=false + +[Script-bismuth] +enableFloatingLayout=true +enableQuarterLayout=true +floatingClass=kcalc +ignoreClass=yakuake,spectacle,Conky,zoom,Virtual Box +layoutPerDesktop=false +screenGapBottom=6 +screenGapLeft=6 +screenGapRight=6 +screenGapTop=6 +tileLayoutGap=6 + +[Script-forceblur] +blurContent=true +patterns=yakuake\nurxvt\nkeepassxc\nAlacritty + +[TabBox] +BorderActivate=9 +LayoutName=big_icons + +[org.kde.kdecoration2] +BorderSize=Tiny +BorderSizeAuto=false +ButtonsOnLeft=XIA +ButtonsOnRight=M +library=org.kde.bismuth.decoration +theme=Bismuth diff --git a/.config/lf/colors b/.config/lf/colors @@ -0,0 +1,177 @@ +# vim:ft=dircolors +# (This is not a dircolors file but it helps to highlight colors and comments) + +# default values from dircolors +# (entries with a leading # are not implemented in lf) +# #no 00 # NORMAL +# fi 00 # FILE +# #rs 0 # RESET +# di 01;34 # DIR +# ln 01;36 # LINK +# #mh 00 # MULTIHARDLINK +# pi 40;33 # FIFO +# so 01;35 # SOCK +# #do 01;35 # DOOR +# bd 40;33;01 # BLK +# cd 40;33;01 # CHR +# or 40;31;01 # ORPHAN +# #mi 00 # MISSING +# su 37;41 # SETUID +# sg 30;43 # SETGID +# #ca 30;41 # CAPABILITY +# tw 30;42 # STICKY_OTHER_WRITABLE +# ow 34;42 # OTHER_WRITABLE +# st 37;44 # STICKY +# ex 01;32 # EXEC + +# default values from lf (with matching order) +# ln 01;36 # LINK +# or 31;01 # ORPHAN +# tw 01;34 # STICKY_OTHER_WRITABLE +# ow 01;34 # OTHER_WRITABLE +# st 01;34 # STICKY +# di 01;34 # DIR +# pi 33 # FIFO +# so 01;35 # SOCK +# bd 33;01 # BLK +# cd 33;01 # CHR +# su 01;32 # SETUID +# sg 01;32 # SETGID +# ex 01;32 # EXEC +# fi 00 # FILE + +# file types (with matching order) +ln 01;36 # LINK +or 31;01 # ORPHAN +tw 34 # STICKY_OTHER_WRITABLE +ow 34 # OTHER_WRITABLE +st 01;34 # STICKY +di 01;34 # DIR +pi 33 # FIFO +so 01;35 # SOCK +bd 33;01 # BLK +cd 33;01 # CHR +su 01;32 # SETUID +sg 01;32 # SETGID +ex 31;01 # EXEC +fi 00 # FILE + +# archives or compressed (dircolors defaults) +*.tar 01;32 +*.tgz 01;32 +*.arc 01;32 +*.arj 01;32 +*.taz 01;32 +*.lha 01;32 +*.lz4 01;32 +*.lzh 01;32 +*.lzma 01;32 +*.tlz 01;32 +*.txz 01;32 +*.tzo 01;32 +*.t7z 01;32 +*.zip 01;32 +*.z 01;32 +*.dz 01;32 +*.gz 01;32 +*.lrz 01;32 +*.lz 01;32 +*.lzo 01;32 +*.xz 01;32 +*.zst 01;32 +*.tzst 01;32 +*.bz2 01;32 +*.bz 01;32 +*.tbz 01;32 +*.tbz2 01;32 +*.tz 01;32 +*.deb 01;32 +*.rpm 01;32 +*.jar 01;32 +*.war 01;32 +*.ear 01;32 +*.sar 01;32 +*.rar 01;32 +*.alz 01;32 +*.ace 01;32 +*.zoo 01;32 +*.cpio 01;32 +*.7z 01;32 +*.rz 01;32 +*.cab 01;32 +*.wim 01;32 +*.swm 01;32 +*.dwm 01;32 +*.esd 01;32 + +# image formats (dircolors defaults) +*.jpg 01;35 +*.jpeg 01;35 +*.mjpg 01;35 +*.mjpeg 01;35 +*.gif 01;35 +*.bmp 01;35 +*.pbm 01;35 +*.pgm 01;35 +*.ppm 01;35 +*.tga 01;35 +*.xbm 01;35 +*.xpm 01;35 +*.tif 01;35 +*.tiff 01;35 +*.png 01;35 +*.svg 01;35 +*.svgz 01;35 +*.mng 01;35 +*.pcx 01;35 +*.mov 01;35 +*.mpg 01;35 +*.mpeg 01;35 +*.m2v 01;35 +*.mkv 01;35 +*.webm 01;35 +*.ogm 01;35 +*.mp4 01;35 +*.m4v 01;35 +*.mp4v 01;35 +*.vob 01;35 +*.qt 01;35 +*.nuv 01;35 +*.wmv 01;35 +*.asf 01;35 +*.rm 01;35 +*.rmvb 01;35 +*.flc 01;35 +*.avi 01;35 +*.fli 01;35 +*.flv 01;35 +*.gl 01;35 +*.dl 01;35 +*.xcf 01;35 +*.xwd 01;35 +*.yuv 01;35 +*.cgm 01;35 +*.emf 01;35 +*.ogv 01;35 +*.ogx 01;35 + +# audio formats (dircolors defaults) +*.aac 00;36 +*.au 00;36 +*.flac 00;36 +*.m4a 00;36 +*.mid 00;36 +*.midi 00;36 +*.mka 00;36 +*.mp3 00;36 +*.mpc 00;36 +*.ogg 00;36 +*.ra 00;36 +*.wav 00;36 +*.oga 00;36 +*.opus 00;36 +*.spx 00;36 +*.xspf 00;36 + +# other formats +*.pdf 31;01 diff --git a/.config/lf/draw_img b/.config/lf/draw_img @@ -0,0 +1,68 @@ +#!/usr/bin/env bash + +clear_screen() { + printf '\e[%sH\e[9999C\e[1J%b\e[1;%sr' \ + "$((LINES-2))" "${TMUX:+\e[2J}" "$max_items" +} + +# Get a file's mime_type. +mime_type=$(file -bi "$1") + +# File isn't an image file, give warning. +if [[ $mime_type != image/* ]]; then + lf -remote "send $id echoerr 'Not an image'" + exit +fi + +w3m_paths=(/usr/{local/,}{lib,libexec,lib64,libexec64}/w3m/w3mi*) +read -r w3m _ < <(type -p w3mimgdisplay "${w3m_paths[@]}") +read -r LINES COLUMNS < <(stty size) + +# Get terminal window size in pixels and set it to WIDTH and HEIGHT. +export $(xdotool getactivewindow getwindowgeometry --shell) + +# Get the image size in pixels. +read -r img_width img_height < <("$w3m" <<< "5;${CACHE:-$1}") + +((img_width > WIDTH)) && { + ((img_height=img_height*WIDTH/img_width)) + ((img_width=WIDTH)) +} + +((img_height > HEIGHT)) && { + ((img_width=img_width*HEIGHT/img_height)) + ((img_height=HEIGHT)) +} + +# Variable needed for centering image. +HALF_HEIGHT=$(expr $HEIGHT / 2) +HALF_WIDTH=$(expr $WIDTH / 2) +HALF_IMG_HEIGHT=$(expr $img_height / 2) +HALF_IMG_WIDTH=$(expr $img_width / 2) +X_POS=$(expr $HALF_WIDTH - $HALF_IMG_WIDTH) +Y_POS=$(expr $HALF_HEIGHT - $HALF_IMG_HEIGHT) + +clear_screen +# Hide the cursor. +printf '\e[?25l' + +# Display the image. +printf '0;1;%s;%s;%s;%s;;;;;%s\n3;\n4\n' \ + ${X_POS:-0} \ + ${Y_POS:-0} \ + "$img_width" \ + "$img_height" \ + "${CACHE:-$1}" | "$w3m" &>/dev/null + +# Wait for user input. +read -ern 1 + +# Clear the image. +printf '6;%s;%s;%s;%s\n3;' \ + "${X_POS:-0}" \ + "${Y_POS:-0}" \ + "$WIDTH" \ + "$HEIGHT" | "$w3m" &>/dev/null + +clear_screen + diff --git a/.config/lf/icons b/.config/lf/icons @@ -0,0 +1,376 @@ +# vim:ft=conf + +# These examples require Nerd Fonts or a compatible font to be used. +# See https://www.nerdfonts.com for more information. + +# default values from lf (with matching order) +# ln l # LINK +# or l # ORPHAN +# tw t # STICKY_OTHER_WRITABLE +# ow d # OTHER_WRITABLE +# st t # STICKY +# di d # DIR +# pi p # FIFO +# so s # SOCK +# bd b # BLK +# cd c # CHR +# su u # SETUID +# sg g # SETGID +# ex x # EXEC +# fi - # FILE + +# file types (with matching order) +ln ๏ # LINK +or ๏ # ORPHAN +tw t # STICKY_OTHER_WRITABLE +ow ๏ # OTHER_WRITABLE +st t # STICKY +di ๏ # DIR +pi p # FIFO +so s # SOCK +bd b # BLK +cd c # CHR +su u # SETUID +sg g # SETGID +# ex ๏ง # EXEC +ex ๏ฑ # EXEC +fi ๏ # FILE + +# file extensions (vim-devicons) +*.styl ๎ +*.sass ๎ +*.scss ๎ +*.htm ๎ +*.html ๎ +*.slim ๎ +*.haml ๎ +*.ejs ๎ +*.css ๎ +*.less ๎ +*.md ๏ +*.mdx ๎ +*.markdown ๎ +*.rmd ๎ +*.json ๎ +*.webmanifest ๎ +*.js ๎ +*.mjs ๎ +*.jsx ๎บ +*.rb ๎ +*.gemspec ๎ +*.rake ๎ +*.php ๎ +*.py ๎ +*.pyc ๎ +*.pyo ๎ +*.pyd ๎ +*.coffee ๎ +*.mustache ๎ +*.hbs ๎ +*.conf ๎ +*.ini ๎ +*.yml ๎ +*.yaml ๎ +*.toml ๎ +*.bat ๎ +*.mk ๎ +*.jpg ๎ +*.jpeg ๎ +*.bmp ๎ +*.png ๎ +*.webp ๎ +*.gif ๎ +*.ico ๎ +*.twig ๎ +*.cpp ๎ +*.c++ ๎ +*.cxx ๎ +*.cc ๎ +*.cp ๎ +*.c ๎ +*.cs ๏ +*.h ๏ฝ +*.hh ๏ฝ +*.hpp ๏ฝ +*.hxx ๏ฝ +*.hs ๎ +*.lhs ๎ +*.nix ๏ +*.lua ๎ +*.java ๎ธ +*.sh ๎ +*.fish ๎ +*.bash ๎ +*.zsh ๎ +*.ksh ๎ +*.csh ๎ +*.awk ๎ +*.ps1 ๎ +*.ml ฮป +*.mli ฮป +*.diff ๎จ +*.db ๎ +*.sql ๎ +*.dump ๎ +*.clj ๎จ +*.cljc ๎จ +*.cljs ๎ช +*.edn ๎ช +*.scala ๎ท +*.go ๎ง +*.dart ๎ +*.xul ๎ +*.sln ๎ +*.suo ๎ +*.pl ๎ฉ +*.pm ๎ฉ +*.t ๎ฉ +*.rss ๎ +'*.f#' ๎ง +*.fsscript ๎ง +*.fsx ๎ง +*.fs ๎ง +*.fsi ๎ง +*.rs ๎จ +*.rlib ๎จ +*.d ๎ฏ +*.erl ๎ฑ +*.hrl ๎ฑ +*.ex ๎ญ +*.exs ๎ญ +*.eex ๎ญ +*.leex ๎ญ +*.heex ๎ญ +*.vim ๎ซ +*.ai ๎ด +*.psd ๎ธ +*.psb ๎ธ +*.ts ๎จ +*.tsx ๎บ +*.jl ๎ค +*.pp ๏ +*.vue ๏ต +*.elm ๎ฌ +*.swift ๎ +*.xcplayground ๎ +*.tex ๏ญจ +*.r ๏ณ +*.rproj ๏ซ +*.sol ๏ฒน +*.pem ๏ + +# file names (vim-devicons) (case-insensitive not supported in lf) +*gruntfile.coffee ๎ +*gruntfile.js ๎ +*gruntfile.ls ๎ +*gulpfile.coffee ๎ +*gulpfile.js ๎ +*gulpfile.ls ๎ +*mix.lock ๎ญ +*dropbox ๎ +*.ds_store ๎ +*.gitconfig ๎ +*.gitignore ๎ +*.gitattributes ๎ +*.gitlab-ci.yml ๏ +*.bashrc ๎ +*.zshrc ๎ +*.zshenv ๎ +*.zprofile ๎ +*.vimrc ๎ซ +*.gvimrc ๎ซ +*_vimrc ๎ซ +*_gvimrc ๎ซ +*.bashprofile ๎ +*favicon.ico ๎ฃ +*license ๎ +*node_modules ๎ +*react.jsx ๎บ +*procfile ๎ +*dockerfile ๎ฐ +*docker-compose.yml ๎ฐ +*rakefile ๎ +*config.ru ๎ +*gemfile ๎ +*makefile ๎ +*cmakelists.txt ๎ +*robots.txt ๏ฎง + +# file names (case-sensitive adaptations) +*Gruntfile.coffee ๎ +*Gruntfile.js ๎ +*Gruntfile.ls ๎ +*Gulpfile.coffee ๎ +*Gulpfile.js ๎ +*Gulpfile.ls ๎ +*Dropbox ๎ +*.DS_Store ๎ +*LICENSE ๎ +*React.jsx ๎บ +*Procfile ๎ +*Dockerfile ๎ฐ +*Docker-compose.yml ๎ฐ +*Rakefile ๎ +*Gemfile ๎ +*Makefile ๎ +*CMakeLists.txt ๎ + +# file patterns (vim-devicons) (patterns not supported in lf) +# .*jquery.*\.js$ ๎ +# .*angular.*\.js$ ๎ +# .*backbone.*\.js$ ๎ +# .*require.*\.js$ ๎ฐ +# .*materialize.*\.js$ ๎ถ +# .*materialize.*\.css$ ๎ถ +# .*mootools.*\.js$ ๎ +# .*vimrc.* ๎ซ +# Vagrantfile$ ๏ธ + +# file patterns (file name adaptations) +*jquery.min.js ๎ +*angular.min.js ๎ +*backbone.min.js ๎ +*require.min.js ๎ฐ +*materialize.min.js ๎ถ +*materialize.min.css ๎ถ +*mootools.min.js ๎ +*vimrc ๎ซ +Vagrantfile ๏ธ + +# archives or compressed (extensions from dircolors defaults) +*.tar ๏ +*.tgz ๏ +*.arc ๏ +*.arj ๏ +*.taz ๏ +*.lha ๏ +*.lz4 ๏ +*.lzh ๏ +*.lzma ๏ +*.tlz ๏ +*.txz ๏ +*.tzo ๏ +*.t7z ๏ +*.zip ๏ +*.z ๏ +*.dz ๏ +*.gz ๏ +*.lrz ๏ +*.lz ๏ +*.lzo ๏ +*.xz ๏ +*.zst ๏ +*.tzst ๏ +*.bz2 ๏ +*.bz ๏ +*.tbz ๏ +*.tbz2 ๏ +*.tz ๏ +*.deb ๏ +*.rpm ๏ +*.jar ๏ +*.war ๏ +*.ear ๏ +*.sar ๏ +*.rar ๏ +*.alz ๏ +*.ace ๏ +*.zoo ๏ +*.cpio ๏ +*.7z ๏ +*.rz ๏ +*.cab ๏ +*.wim ๏ +*.swm ๏ +*.dwm ๏ +*.esd ๏ + +# image and video formats (extensions from dircolors defaults) +*.jpg ๏ +*.jpeg ๏ +*.mjpg ๏ +*.mjpeg ๏ +*.gif ๏ +*.bmp ๏ +*.pbm ๏ +*.pgm ๏ +*.ppm ๏ +*.tga ๏ +*.xbm ๏ +*.xpm ๏ +*.tif ๏ +*.tiff ๏ +*.png ๏ +*.svg ๏ +*.svgz ๏ +*.mng ๏ +*.pcx ๏ +*.mov ๏ +*.mpg ๏ +*.mpeg ๏ +*.m2v ๏ +*.mkv ๏ +*.webm ๏ +*.ogm ๏ +*.mp4 ๏ +*.m4v ๏ +*.mp4v ๏ +*.vob ๏ +*.qt ๏ +*.nuv ๏ +*.wmv ๏ +*.asf ๏ +*.rm ๏ +*.rmvb ๏ +*.flc ๏ +*.avi ๏ +*.fli ๏ +*.flv ๏ +*.gl ๏ +*.dl ๏ +*.xcf ๏ +*.xwd ๏ +*.yuv ๏ +*.cgm ๏ +*.emf ๏ +*.ogv ๏ +*.ogx ๏ + +# audio formats (extensions from dircolors defaults) +*.aac ๏ +*.au ๏ +*.flac ๏ +*.m4a ๏ +*.mid ๏ +*.midi ๏ +*.mka ๏ +*.mp3 ๏ +*.mpc ๏ +*.ogg ๏ +*.ra ๏ +*.wav ๏ +*.oga ๏ +*.opus ๏ +*.spx ๏ +*.xspf ๏ + +# document formats +*.docx ๏ +*.doc ๏ +*.odt ๏ +*.ott ๏ +*.xlsx ๏ +*.ods ๏ +*.ots ๏ +*.pptx ๏ +*.ppt ๏ +*.odp ๏ +*.otp ๏ + +# other formats +*.desktop ๏ +*.pdf ๏ +*.xml ๎ +*.epub ๎ +*.xopp ๏ฑ +*.txt ๏ถ diff --git a/.config/lf/image b/.config/lf/image @@ -0,0 +1,17 @@ +#!/usr/bin/env bash +readonly ID_PREVIEW="preview" +main() { + case "$1" in + "clear") + declare -p -A cmd=([action]=remove [identifier]="$ID_PREVIEW") \ + > "$FIFO_UEBERZUG" + ;; + "draw") + declare -p -A cmd=([action]=add [identifier]="$ID_PREVIEW" \ + [x]="$3" [y]="$4" [max_width]="$5" [max_height]="$6" \ + [path]="$2") > "$FIFO_UEBERZUG" + ;; + "*") echo "Unknown command: '$1', '$2'" ;; + esac +} +main "$@" diff --git a/.config/lf/lfrc b/.config/lf/lfrc @@ -0,0 +1,86 @@ +# Basic Settings +set ignorecase true +set icons true + +# Custom Functions +cmd mkdir ${{ + printf "Directory Name: " + read ans + mkdir $ans +}} + +cmd mkfile ${{ + printf "File Name: " + read ans + $EDITOR $ans +}} + +cmd trash ${{ + trash-put "$f" +}} + +# Archive bindings +cmd unarchive ${{ + case "$f" in + *.zip) unzip "$f" ;; + *.tar.gz) tar -xzvf "$f" ;; + *.tar.bz2) tar -xjvf "$f" ;; + *.tar) tar -xvf "$f" ;; + *) echo "Unsupported format" ;; + esac +}} + +# Trash bindings +cmd trash ${{ + files=$(printf "$fx" | tr '\n' ';') + while [ "$files" ]; do + file=${files%%;*} + + trash-put "$(basename "$file")" + if [ "$files" = "$file" ]; then + files='' + else + files="${files#*;}" + fi + done +}} + +cmd restore_trash ${{ + trash-restore +}} + +# Bindings +# Remove some defaults +map m +map o +map n +map "'" +map '"' +map d +map v + +map v $nvim "$f" + +map au unarchive + +# Basic Functions +map . set hidden! +map DD trash +map p paste +map x cut +map y copy +map <enter> open +map R reload +map mf mkfile +map md mkdir +map C clear + +map dd trash +map dr restore_trash + +# Movement +map gd cd ~/Documents +map gD cd ~/Downloads +map gp cd ~/Pictures +map gc cd ~/.config +map gt cd ~/.local/share/Trash/files diff --git a/.config/lf/preview b/.config/lf/preview @@ -0,0 +1,48 @@ +#!/bin/sh + +# Clear the last preview (if any) +$HOME/.config/lf/image clear + +# Calculate where the image should be placed on the screen. +num=$(printf "%0.f\n" "`echo "$(tput cols) / 2" | bc`") +numb=$(printf "%0.f\n" "`echo "$(tput cols) - $num - 1" | bc`") +numc=$(printf "%0.f\n" "`echo "$(tput lines) - 2" | bc`") + +case "$1" in + *.tgz|*.tar.gz) tar tzf "$1";; + *.tar.bz2|*.tbz2) tar tjf "$1";; + *.tar.txz|*.txz) xz --list "$1";; + *.tar) tar tf "$1";; + *.zip|*.jar|*.war|*.ear|*.oxt) unzip -l "$1";; + *.rar) unrar l "$1";; + *.7z) 7z l "$1";; + *.[1-8]) man "$1" | col -b ;; + *.o) nm "$1" | less ;; + *.torrent) transmission-show "$1";; + *.iso) iso-info --no-header -l "$1";; + *odt,*.ods,*.odp,*.sxw) odt2txt "$1";; + *.doc) catdoc "$1" ;; + *.docx) docx2txt "$1" - ;; + *.csv) cat "$1" | sed s/,/\\n/g ;; + *.pdf) + CACHE=$(mktemp /tmp/thumbcache.XXXXX) + pdftoppm -png -f 1 -singlefile "$1" "$CACHE" + $HOME/.config/lf/image draw "$CACHE.png" $num 1 $numb $numc + ;; + *.epub) + CACHE=$(mktemp /tmp/thumbcache.XXXXX) + epub-thumbnailer "$1" "$CACHE" 1024 + $HOME/.config/lf/image draw "$CACHE" $num 1 $numb $numc + ;; + *.bmp|*.jpg|*.jpeg|*.png|*.xpm) + $HOME/.config/lf/image draw "$1" $num 1 $numb $numc + ;; + *.wav|*.mp3|*.flac|*.m4a|*.wma|*.ape|*.ac3|*.og[agx]|*.spx|*.opus|*.as[fx]|*.flac) exiftool "$1";; + *.avi|*.mp4|*.wmv|*.dat|*.3gp|*.ogv|*.mkv|*.mpg|*.mpeg|*.vob|*.fl[icv]|*.m2v|*.mov|*.webm|*.ts|*.mts|*.m4v|*.r[am]|*.qt|*.divx) + CACHE=$(mktemp /tmp/thumbcache.XXXXX) + ffmpegthumbnailer -i "$1" -o "$CACHE" -s 0 + $HOME/.config/lf/image draw "$CACHE" $num 1 $numb $numc + ;; + *) highlight --out-format ansi "$1" || cat "$1";; +esac + diff --git a/.config/pcmanfm/default/pcmanfm.conf b/.config/pcmanfm/default/pcmanfm.conf @@ -0,0 +1,26 @@ +[config] +bm_open_method=0 + +[volume] +mount_on_startup=1 +mount_removable=1 +autorun=1 + +[ui] +always_show_tabs=0 +max_tab_chars=32 +win_width=1904 +win_height=1029 +splitter_pos=278 +media_in_new_tab=0 +desktop_folder_new_win=0 +change_tab_on_drop=1 +close_on_unmount=1 +focus_previous=0 +side_pane_mode=dirtree +view_mode=icon +show_hidden=0 +sort=name;ascending; +toolbar=newtab;navigation;home; +show_statusbar=1 +pathbar_mode_buttons=0 diff --git a/.config/picom/picom.bak b/.config/picom/picom.bak @@ -0,0 +1,418 @@ +################################# +# 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_WINDOW_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.8 + +# 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 = [ + "90:class_g = 'Alacritty'" +]; + + +################################# +# 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 = 6 + +# 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 = "dual-kawase"; +# blur-size = 12 +# +# blur-deviation = false +# +blur-strength = 6 + +# 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 = 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"; +# +# 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 # +################################# + +# Enable remote control via D-Bus. See the man page for more details. +# 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 `xr_glx_hybrid`. +# `xrender` is the default one. +# +# backend = "glx" +backend = "xrender"; + +# Enable/disable VSync. +# vsync = false +vsync = false; + +# 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_WINDOW_OPACITY' on client windows, useful for window managers +# not passing '_NET_WM_WINDOW_OPACITY' of client windows to frame windows. +# +# detect-client-opacity = false +detect-client-opacity = true; + +# 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/picom/picom.conf b/.config/picom/picom.conf @@ -0,0 +1,120 @@ +# ____ _____ +# | _ \_ _| Derek Taylor (DistroTube) +# | | | || | http://www.youtube.com/c/DistroTube +# | |_| || | http://www.gitlab.com/dwt1/ +# |____/ |_| +# +# My config. Not much to see here; just some pretty standard stuff. + +# 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 = true; + +# The blur radius for shadows, in pixels. (defaults to 12) +shadow-radius = 8; + +# The opacity of shadows. (0.0 - 1.0, defaults to 0.75) +shadow-opacity = .6 + +# The left offset for shadows, in pixels. (defaults to -15) +shadow-offset-x = -3; + +# The top offset for shadows, in pixels. (defaults to -15) +shadow-offset-y = -3; + +# 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'", + "class_g = 'slop'", + "class_g = 'Polybar'", + "class_g = 'trayer'", + "_GTK_FRAME_EXTENTS@:c" +]; + + +# 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. +# don't need this, we disable fading for all normal windows with wintypes: {} +fade-exclude = [ + "class_g = 'slop'" # maim +] + +# Opacity of inactive windows. (0.1 - 1.0, defaults to 1.0) +inactive-opacity = 0.8 +# inactive-opacity = 1.00 + +# Opacity of window titlebars and borders. (0.1 - 1.0, disabled by default) +# frame-opacity = 1.0 +frame-opacity = 1.00 + +# Default opacity for dropdown menus and popup menus. (0.0 - 1.0, defaults to 1.0) +# menu-opacity = 1.0 +# menu-opacity is depreciated use dropdown-menu and popup-menu instead. + +#If using these 2 below change their values in line 510 & 511 aswell +popup_menu = { opacity = 0.8; } +dropdown_menu = { opacity = 0.8; } + + +# 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.00 + +# Dim inactive windows. (0.0 - 1.0, defaults to 0.0) +# inactive-dim = 0.0 + +# Specify a list of conditions of windows that should always be considered focused. +# focus-exclude = [] +focus-exclude = [ + "class_g = 'Cairo-clock'", + "class_g = 'Bar'", # lemonbar + "class_g = 'slop'", # maim + "class_g = 'trayer'" # trayer +]; + +opacity-rule = [ + "100:class_g = 'XTerm'", + "100:class_g = 'URxvt'", + "100:class_g = 'firefox'", + "100:class_g = 'Thunderbird'", + "90:class_g = 'Alacritty'" +]; + +wintypes: +{ + normal = { fade = false; shadow = true; } + tooltip = { fade = true; shadow = true; opacity = 0.75; focus = true; full-shadow = false; }; + dock = { shadow = false; } + dnd = { shadow = true; } + popup_menu = { opacity = 0.8; } + dropdown_menu = { opacity = 0.8; } +}; + diff --git a/.config/polybar/bars.ini b/.config/polybar/bars.ini @@ -0,0 +1,551 @@ +;; โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ +;; โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ +;; โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ +;; โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ +;; โโCreatedโByโAdityaโShakyaโ@adi1090xโโโโโโโโโโโโโโโโโโ +;; โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ + +;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ + +[bar] +fill = โฝ +empty = โฝ +indicator = +; Nerd font : ๏จ ๏ง , ๏ธ โฝ, ๏กณ ๏ค ๏ฅ ๏คฟ , ๏ฅ ๏ชฏ + +[module/volume] +type = internal/alsa + +; Soundcard to be used +; Usually in the format hw:# where # is the card number +; You can find the different card numbers in `/proc/asound/cards` +master-soundcard = default +speaker-soundcard = default +headphone-soundcard = default + +; Name of the master, speaker and headphone mixers +; Use the following command to list available mixer controls: +; $ amixer scontrols | sed -nr "s/.*'([[:alnum:]]+)'.*/\1/p" +; If master, speaker or headphone-soundcard isn't the default, +; use `amixer -c # scontrols` instead where # is the number +; of the master, speaker or headphone soundcard respectively +; +; Default: Master +master-mixer = Master + +; Optionally define speaker and headphone mixers +; Default: none +;;speaker-mixer = Speaker +; Default: none +;;headphone-mixer = Headphone + +; NOTE: This is required if headphone_mixer is defined +; Use the following command to list available device controls +; $ amixer controls | sed -r "/CARD/\!d; s/.*=([0-9]+).*name='([^']+)'.*/printf '%3.0f: %s\n' '\1' '\2'/e" | sort +; You may also need to use `amixer -c # controls` as above for the mixer names +; Default: none +;;headphone-id = 9 + +; Use volume mapping (similar to amixer -M and alsamixer), where the increase in volume is linear to the ear +; Default: false +;;mapped = true + +; Interval for volume increase/decrease (in percent points) +; Default: 5 +interval = 5 + +; Available tags: +; <label-volume> (default) +; <ramp-volume> +; <bar-volume> +format-volume = <ramp-volume> <bar-volume> + +; Available tags: +; <label-muted> (default) +; <ramp-volume> +; <bar-volume> +format-muted = <label-muted> +format-muted-prefix = ๎จ +format-muted-prefix-foreground = ${color.red} + +; Available tokens: +; %percentage% (default) +label-volume = %percentage%% + +; Available tokens: +; %percentage% (default +label-muted = " Muted" +label-muted-foreground = ${color.sep} + +; Only applies if <ramp-volume> is used +ramp-volume-0 = ๎จ +ramp-volume-1 = ๎จ +ramp-volume-2 = ๎จ +ramp-volume-foreground = ${color.blue} + +; Only applies if <bar-volume> is used +bar-volume-format = "%fill%%indicator%%empty%" +bar-volume-width = 11 +bar-volume-gradient = false + +bar-volume-indicator = ${bar.indicator} +bar-volume-indicator-foreground = ${color.foreground} +bar-volume-indicator-font = 2 + +bar-volume-fill = ${bar.fill} +bar-volume-fill-font = 2 +bar-volume-foreground-0 = ${color.green} +bar-volume-foreground-1 = ${color.green} +bar-volume-foreground-2 = ${color.yellow} +bar-volume-foreground-3 = ${color.yellow} +bar-volume-foreground-4 = ${color.red} + +bar-volume-empty = ${bar.empty} +bar-volume-empty-font = 2 +bar-volume-empty-foreground = ${color.sep} + +; If defined, it will replace <ramp-volume> when +; headphones are plugged in to `headphone_control_numid` +; If undefined, <ramp-volume> will be used for both +; Only applies if <ramp-volume> is used +ramp-headphones-0 = ๎ฅผ + +;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ + +[module/brightness] +;type = internal/xbacklight +type = internal/backlight + +; Use the following command to list available cards: +; $ ls -1 /sys/class/backlight/ +;card = intel_backlight +card = amdgpu_bl0 + +; Available tags: +; <label> (default) +; <ramp> +; <bar> +format = <ramp> <bar> + +; Available tokens: +; %percentage% (default) +label = %percentage%% + +; Only applies if <ramp> is used +ramp-0 = ๎ฆฃ +ramp-1 = ๎ฆฃ +ramp-2 = ๎ฆ +ramp-3 = ๎งฃ +ramp-4 = ๎งฃ +ramp-foreground = ${color.lime} + +; Only applies if <bar> is used +bar-format = "%fill%%indicator%%empty%" +bar-width = 11 +bar-gradient = false + +bar-indicator = ${bar.indicator} +bar-indicator-foreground = ${color.foreground} +bar-indicator-font = 2 + +bar-fill = ${bar.fill} +bar-fill-font = 2 +bar-foreground-0 = ${color.green} +bar-foreground-1 = ${color.green} +bar-foreground-2 = ${color.yellow} +bar-foreground-3 = ${color.yellow} +bar-foreground-4 = ${color.red} + +bar-empty = ${bar.empty} +bar-empty-font = 2 +bar-empty-foreground = ${color.sep} + +;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ + +[module/battery_bar] +type = internal/battery + +; This is useful in case the battery never reports 100% charge +full-at = 99 + +; Use the following command to list batteries and adapters: +; $ ls -1 /sys/class/power_supply/ +battery = BAT1 +adapter = ACAD + +; If an inotify event haven't been reported in this many +; seconds, manually poll for new values. +; +; Needed as a fallback for systems that don't report events +; on sysfs/procfs. +; +; Disable polling by setting the interval to 0. +; +; Default: 5 +poll-interval = 2 + +; see "man date" for details on how to format the time string +; NOTE: if you want to use syntax tags here you need to use %%{...} +; Default: %H:%M:%S +time-format = %H:%M + +; Available tags: +; <label-charging> (default) +; <bar-capacity> +; <ramp-capacity> +; <animation-charging> +format-charging = <bar-capacity> +format-charging-prefix = "๎ค" +format-charging-prefix-foreground = ${color.green} + +; Available tags: +; <label-discharging> (default) +; <bar-capacity> +; <ramp-capacity> +; <animation-discharging> +format-discharging = <bar-capacity> +format-discharging-prefix = "๎ค" +format-discharging-prefix-foreground = ${color.pink} + +; Available tags: +; <label-full> (default) +; <bar-capacity> +; <ramp-capacity> +format-full = <label-full> +format-full-prefix = "๎ค" +format-full-prefix-foreground = ${color.red} + +; Available tokens: +; %percentage% (default) +; %time% +; %consumption% (shows current charge rate in watts) + +label-charging = %percentage%% + +; Available tokens: +; %percentage% (default) +; %time% +; %consumption% (shows current discharge rate in watts) +label-discharging = %percentage%% + +; Available tokens: +; %percentage% (default) +label-full = Full + +; Only applies if <bar-capacity> is used +bar-capacity-format = " %fill%%indicator%%empty%" +bar-capacity-width = 11 +bar-capacity-gradient = false + +bar-capacity-indicator = ${bar.indicator} +bar-capacity-indicator-font = 2 +bar-capacity-indicator-foreground = ${color.foreground} + +bar-capacity-fill = ${bar.fill} +bar-capacity-fill-font = 2 +bar-capacity-foreground-0 = ${color.green} +bar-capacity-foreground-1 = ${color.green} +bar-capacity-foreground-2 = ${color.yellow} +bar-capacity-foreground-3 = ${color.yellow} +bar-capacity-foreground-4 = ${color.red} + +bar-capacity-empty = ${bar.empty} +bar-capacity-empty-font = 2 +bar-capacity-empty-foreground = ${color.sep} +bar-fill-font = 2 + +;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ + +[module/cpu_bar] +type = internal/cpu + +; Seconds to sleep between updates +; Default: 1 +interval = 0.5 + +; Available tags: +; <label> (default) +; <bar-load> +; <ramp-load> +; <ramp-coreload> +;;format = <label> <ramp-coreload> +format = <bar-load><label> +format-prefix = ๎ฅ +format-prefix-foreground = ${color.teal} + +; Available tokens: +; %percentage% (default) - total cpu load averaged over all cores +; %percentage-sum% - Cumulative load on all cores +; %percentage-cores% - load percentage for each core +; %percentage-core[1-9]% - load percentage for specific core +label = " %percentage%%" + +; Only applies if <bar-load> is used +bar-load-format = " %fill%%indicator%%empty%" +bar-load-width = 11 +bar-load-gradient = false + +bar-load-indicator = ${bar.indicator} +bar-load-indicator-font = 2 +bar-load-indicator-foreground = ${color.foreground} + +bar-load-fill = ${bar.fill} +bar-load-fill-font = 2 +bar-load-foreground-0 = ${color.green} +bar-load-foreground-1 = ${color.green} +bar-load-foreground-2 = ${color.yellow} +bar-load-foreground-3 = ${color.yellow} +bar-load-foreground-4 = ${color.red} + +bar-load-empty = ${bar.empty} +bar-load-empty-font = 2 +bar-load-empty-foreground = ${color.sep} + +;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ + +[module/filesystem_bar] +type = internal/fs + +; Mountpoints to display +mount-0 = / +;;mount-1 = /home +;;mount-2 = /var + +; Seconds to sleep between updates +; Default: 30 +interval = 30 + +; Display fixed precision values +; Default: false +fixed-values = false + +; Spacing between entries +; Default: 2 +;;spacing = 4 + +; Available tags: +; <label-mounted> (default) +; <bar-free> +; <bar-used> +; <ramp-capacity> +format-mounted = <bar-used><label-mounted> +format-mounted-prefix = ๎ฅบ +format-mounted-prefix-foreground = ${color.purple} + +; Available tags: +; <label-unmounted> (default) +format-unmounted = <label-unmounted> +format-unmounted-prefix = ๎ฅบ +format-unmounted-prefix-foreground = ${color.red} + +; Available tokens: +; %mountpoint% +; %type% +; %fsname% +; %percentage_free% +; %percentage_used% +; %total% +; %free% +; %used% +; Default: %mountpoint% %percentage_free%% +label-mounted = " %used%/%total%" + +; Available tokens: +; %mountpoint% +; Default: %mountpoint% is not mounted +label-unmounted = " %mountpoint%: not mounted" + +; Only applies if <bar-used> is used +bar-used-format = " %fill%%indicator%%empty%" +bar-used-width = 11 +bar-used-gradient = false + +bar-used-indicator = ${bar.indicator} +bar-used-indicator-font = 2 +bar-used-indicator-foreground = ${color.foreground} + +bar-used-fill = ${bar.fill} +bar-used-fill-font = 2 +bar-used-foreground-0 = ${color.green} +bar-used-foreground-1 = ${color.green} +bar-used-foreground-2 = ${color.yellow} +bar-used-foreground-3 = ${color.yellow} +bar-used-foreground-4 = ${color.red} + +bar-used-empty = ${bar.empty} +bar-used-empty-font = 2 +bar-used-empty-foreground = ${color.sep} + +;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ + +[module/memory_bar] +type = internal/memory + +; Seconds to sleep between updates +; Default: 1 +interval = 2 + +; Available tags: +; <label> (default) +; <bar-used> +; <bar-free> +; <ramp-used> +; <ramp-free> +; <bar-swap-used> +; <bar-swap-free> +; <ramp-swap-used> +; <ramp-swap-free> +format = <bar-used><label> +format-prefix = ๎ฆน +format-prefix-foreground = ${color.indigo} + +; Available tokens: +; %percentage_used% (default) +; %percentage_free% +; %gb_used% +; %gb_free% +; %gb_total% +; %mb_used% +; %mb_free% +; %mb_total% +; %percentage_swap_used% +; %percentage_swap_free% +; %mb_swap_total% +; %mb_swap_free% +; %mb_swap_used% +; %gb_swap_total% +; %gb_swap_free% +; %gb_swap_used% + +label = " %mb_used%" + +; Only applies if <bar-used> is used +bar-used-format = " %fill%%indicator%%empty%" +bar-used-width = 11 +bar-used-gradient = false + +bar-used-indicator = ${bar.indicator} +bar-used-indicator-font = 2 +bar-used-indicator-foreground = ${color.foreground} + +bar-used-fill = ${bar.fill} +bar-used-fill-font = 2 +bar-used-foreground-0 = ${color.green} +bar-used-foreground-1 = ${color.green} +bar-used-foreground-2 = ${color.yellow} +bar-used-foreground-3 = ${color.yellow} +bar-used-foreground-4 = ${color.red} + +bar-used-empty = ${bar.empty} +bar-used-empty-font = 2 +bar-used-empty-foreground = ${color.sep} + +;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ + +[module/mpd_bar] +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 + +; Seconds to sleep between progressbar/song timer sync +; Default: 1 +interval = 1 + +; Available tags: +; <label-song> (default) +; <label-time> +; <bar-progress> +; <toggle> - gets replaced with <icon-(pause|play)> +; <toggle-stop> - gets replaced with <icon-(stop|play)> +; <icon-random> +; <icon-repeat> +; <icon-repeatone> (deprecated) +; <icon-single> - Toggle playing only a single song. Replaces <icon-repeatone> +; <icon-consume> +; <icon-prev> +; <icon-stop> +; <icon-play> +; <icon-pause> +; <icon-next> +; <icon-seekb> +; <icon-seekf> +format-online = <label-song><bar-progress><label-time> +format-online-prefix = ๎ฆจ +format-online-prefix-foreground = ${color.green} + +;format-playing = ${self.format-online} +;format-paused = ${self.format-online} +;format-stopped = ${self.format-online} + +; Available tags: +; <label-offline> +format-offline = <label-offline> +format-offline-prefix = ๎ฆจ +format-offline-prefix-foreground = ${color.red} + +; Available tokens: +; %artist% +; %album-artist% +; %album% +; %date% +; %title% +; Default: %artist% - %title% +label-song = " %artist% - %title%" +label-song-maxlen = 25 +label-song-ellipsis = true + +; Available tokens: +; %elapsed% +; %total% +; Default: %elapsed% / %total% +label-time = " %elapsed% / %total%" + +; Available tokens: +; None +label-offline = " Offline" + +; Only applies if <icon-X> is used +icon-play = ๎ฆป +icon-pause = ๎ฆฏ +icon-stop = ๎งข +icon-next = ๎ง +icon-prev = ๎ง +icon-seekf = +icon-seekb = +icon-random = +icon-repeat = +icon-repeatone = +icon-single = +icon-consume = + +; Used to display the state of random/repeat/repeatone/single +; Only applies if <icon-[random|repeat|repeatone|single]> is used +toggle-on-foreground = ${color.primary} +toggle-off-foreground = ${color.secondary} + +; Only applies if <bar-progress> is used +bar-progress-format = " %fill%%indicator%%empty%" +bar-progress-width = 11 +bar-progress-gradient = false + +bar-progress-indicator = ${bar.indicator} +bar-progress-indicator-font = 2 +bar-progress-indicator-foreground = ${color.foreground} + +bar-progress-fill = ${bar.fill} +bar-progress-fill-font = 2 +bar-progress-foreground-0 = ${color.green} +bar-progress-foreground-1 = ${color.green} +bar-progress-foreground-2 = ${color.yellow} +bar-progress-foreground-3 = ${color.yellow} +bar-progress-foreground-4 = ${color.red} + +bar-progress-empty = ${bar.empty} +bar-progress-empty-font = 2 +bar-progress-empty-foreground = ${color.sep} + +;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ diff --git a/.config/polybar/colors.ini b/.config/polybar/colors.ini @@ -0,0 +1,45 @@ +;; โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ +;; โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ +;; โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ +;; โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ +;; โโCreatedโByโAdityaโShakyaโ@adi1090xโโโโโโโโโโโโโโโโโโโโโโโโโโ +;; โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ + +;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ + +[color] + +;; Use pywal.sh in scripts directory to use colors from an image/wallpaper. + +;; main colors +; background = #141C21 +background = #23272E +; foreground = #93A1A1 +; foreground = #979eab +foreground = #ABB2BF +sep = #3C4449 + +white = #FFFFFF +black = #000000 +red = #EC7875 +pink = #EC407A +purple = #BA68C8 +; blue = #42A5F5 +blue = #61AFEF +; cyan = #4DD0E1 +cyan = #56B6C2 +teal = #00B19F +; green = #61C766 +green = #98C379 +lime = #B9C244 +; yellow = #FDD835 +yellow = #E5C07B +amber = #FBC02D +; orange = #E57C46 +orange = #D19A66 +brown = #AC8476 +indigo = #6C77BB +gray = #9E9E9E +blue-gray = #6D8895 + +;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ diff --git a/.config/polybar/config.ini b/.config/polybar/config.ini @@ -0,0 +1,302 @@ +;; โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ +;; โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ +;; โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ +;; โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ +;; โโCreatedโByโAdityaโShakyaโ@adi1090xโโโโโโโโโโโโโโโโโโโโโโโโโโ +;; โโModified By Raven @raven2czโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ +;; โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ + +;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ + +;; Global WM Settings + +[global/wm] +; Adjust the _NET_WM_STRUT_PARTIAL top value +; Used for top aligned bars +margin-bottom = 0 + +; Adjust the _NET_WM_STRUT_PARTIAL bottom value +; Used for bottom aligned bars +margin-top = 0 + +;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ + +;; File Inclusion +; include an external file, like module file, etc. + +include-file = ~/.config/polybar/bars.ini +include-file = ~/.config/polybar/colors.ini +include-file = ~/.config/polybar/modules.ini +include-file = ~/.config/polybar/user_modules.ini + +;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ + +;; Bar Settings + +[bar/main] +; Use either of the following command to list available outputs: +; If unspecified, the application will pick the first one it finds. +; $ polybar -m | cut -d ':' -f 1 +; $ xrandr -q | grep " connected" | cut -d ' ' -f1 +; monitor = + +; Use the specified monitor as a fallback if the main one is not found. +; monitor-fallback = + +; Require the monitor to be in connected state +; XRandR sometimes reports my monitor as being disconnected (when in use) +monitor-strict = false + +; Tell the Window Manager not to configure the window. +; Use this to detach the bar if your WM is locking its size/position. +override-redirect = false + +; Put the bar at the bottom of the screen +bottom = false + +; Prefer fixed center position for the `modules-center` block +; When false, the center position will be based on the size of the other blocks. +fixed-center = true + +; Dimension defined as pixel value (e.g. 35) or percentage (e.g. 50%), +; the percentage can optionally be extended with a pixel offset like so: +; 50%:-10, this will result in a width or height of 50% minus 10 pixels +width = 100%:-10px +height = 30 + +; Offset defined as pixel value (e.g. 35) or percentage (e.g. 50%) +; the percentage can optionally be extended with a pixel offset like so: +; 50%:-10, this will result in an offset in the x or y direction +; of 50% minus 10 pixels +offset-x = 5px +offset-y = 5px + +; Background ARGB color (e.g. #f00, #ff992a, #ddff1023) +background = ${color.background} + +; Foreground ARGB color (e.g. #f00, #ff992a, #ddff1023) +foreground = ${color.foreground} + +; Background gradient (vertical steps) +; background-[0-9]+ = #aarrggbb +;;background-0 = + +; Value used for drawing rounded corners +; Note: This shouldn't be used together with border-size because the border +; doesn't get rounded +; Individual top/bottom values can be defined using: +; radius-{top,bottom} +border-size = 0.0 +radius = 0.0 +radius-top = 0.0 +radius-bottom = 0.0 + +; Under-/overline pixel size and argb color +; Individual values can be defined using: +; {overline,underline}-size +; {overline,underline}-color +line-size = 2 +line-color = ${color.foreground} + +; Values applied to all borders +; Individual side values can be defined using: +; border-{left,top,right,bottom}-size +; border-{left,top,right,bottom}-color +; The top and bottom borders are added to the bar height, so the effective +; window height is: +; height + border-top-size + border-bottom-size +; Meanwhile the effective window width is defined entirely by the width key and +; the border is placed withing this area. So you effectively only have the +; following horizontal space on the bar: +; width - border-right-size - border-left-size +border-bottom-size = 0.0 +border-bottom-color = ${color.blue} + +; Number of spaces to add at the beginning/end of the bar +; Individual side values can be defined using: +; padding-{left,right} +padding = 2 + +; Number of spaces to add before/after each module +; Individual side values can be defined using: +; module-margin-{left,right} +module-margin-left = 1 +module-margin-right = 1 + +;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ + +; Fonts are defined using <font-name>;<vertical-offset> +; Font names are specified using a fontconfig pattern. +; font-0 = NotoSans-Regular:size=8;2 +; font-1 = MaterialIcons:size=10 +; font-2 = Termsynu:size=8;-1 +; font-3 = FontAwesome:size=10 +; See the Fonts wiki page for more details + +; font-0 = "Iosevka Nerd Font:size=10;4" +; font-1 = "Iosevka Nerd Font:size=10;3" +; font-0 = "SF Mono Ligatues:size=10.5;3" +font-0 = "scientifica:size=12;3" +font-1 = "feather:size=12;3" +font-2 = "Apple Color Emoji:size=11;3" +font-3 = "Iosevka Nerd Font:size=12;4" +font-4 = "Noto Sans Mono:size=12;3" + +; Modules are added to one of the available blocks +; modules-left = cpu ram +; modules-center = xwindow xbacklight +; modules-right = ipc clock + +modules-left = arch sep workspaces sep title sep +modules-center = mpris-play-pause mpris +modules-right = sep alsa sep cpu memory filesystem uptime sep date sep powermenu + +;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ + +; The separator will be inserted between the output of each module +separator = + +; Opacity value between 0.0 and 1.0 used on fade in/out +dim-value = 1.0 + +; Value to be used to set the WM_NAME atom +; If the value is empty or undefined, the atom value +; will be created from the following template: polybar-[BAR]_[MONITOR] +; NOTE: The placeholders are not available for custom values +wm-name = + +; Locale used to localize various module data (e.g. date) +; Expects a valid libc locale, for example: sv_SE.UTF-8 +locale = + +; Position of the system tray window +; If empty or undefined, tray support will be disabled +; NOTE: A center aligned tray will cover center aligned modules +; +; Available positions: +; left +; center +; right +; none +tray-position = center + +; If true, the bar will not shift its +; contents when the tray changes +tray-detached = false + +; Tray icon max size +tray-maxsize = 16 + +; Background color for the tray container +; ARGB color (e.g. #f00, #ff992a, #ddff1023) +; By default the tray container will use the bar +; background color. +tray-background = ${color.background} + +; Tray offset defined as pixel value (e.g. 35) or percentage (e.g. 50%) +tray-offset-x = 0 +tray-offset-y = 0 + +; Pad the sides of each tray icon +tray-padding = 5 + +; Scale factor for tray clients +tray-scale = 1.0 + +; Restack the bar window and put it above the +; selected window manager's root +; +; Fixes the issue where the bar is being drawn +; on top of fullscreen window's +; +; Currently supported WM's: +; bspwm +; i3 (requires: `override-redirect = true`) +wm-restack = i3foreground + +; Set a DPI values used when rendering text +; This only affects scalable fonts +; dpi = + +; Enable support for inter-process messaging +; See the Messaging wiki page for more details. +enable-ipc = true + +; Fallback click handlers that will be called if +; there's no matching module handler found. +click-left = +click-middle = +click-right = +scroll-up = +scroll-down = +double-click-left = +double-click-middle = +double-click-right = + +; Requires polybar to be built with xcursor support (xcb-util-cursor) +; Possible values are: +; - default : The default pointer as before, can also be an empty string (default) +; - pointer : Typically in the form of a hand +; - ns-resize : Up and down arrows, can be used to indicate scrolling +cursor-click = +cursor-scroll = + +;; WM Workspace Specific + +; bspwm +;;scroll-up = bspwm-desknext +;;scroll-down = bspwm-deskprev +;;scroll-up = bspc desktop -f prev.local +;;scroll-down = bspc desktop -f next.local + +;i3 +;;scroll-up = i3wm-wsnext +;;scroll-down = i3wm-wsprev +;;scroll-up = i3-msg workspace next_on_output +;;scroll-down = i3-msg workspace prev_on_output + +;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ + +;; Application Settings + +[settings] +; The throttle settings lets the eventloop swallow up til X events +; if they happen within Y millisecond after first event was received. +; This is done to prevent flood of update event. +; +; For example if 5 modules emit an update event at the same time, we really +; just care about the last one. But if we wait too long for events to swallow +; the bar would appear sluggish so we continue if timeout +; expires or limit is reached. +throttle-output = 5 +throttle-output-for = 10 + +; Time in milliseconds that the input handler will wait between processing events +;throttle-input-for = 30 + +; Reload upon receiving XCB_RANDR_SCREEN_CHANGE_NOTIFY events +screenchange-reload = false + +; Compositing operators +; @see: https://www.cairographics.org/manual/cairo-cairo-t.html#cairo-operator-t +compositing-background = source +compositing-foreground = over +compositing-overline = over +compositing-underline = over +compositing-border = over + +; Define fallback values used by all module formats +;format-foreground = +;format-background = +;format-underline = +;format-overline = +;format-spacing = +;format-padding = +;format-margin = +;format-offset = + +; Enables pseudo-transparency for the bar +; If set to true the bar can be transparent without a compositor. +pseudo-transparency = true + +;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ diff --git a/.config/polybar/images/polybar-example-1.jpg b/.config/polybar/images/polybar-example-1.jpg Binary files differ. diff --git a/.config/polybar/images/polybar-example-2.jpg b/.config/polybar/images/polybar-example-2.jpg Binary files differ. diff --git a/.config/polybar/images/polybar-example-3-awesomewm.jpg b/.config/polybar/images/polybar-example-3-awesomewm.jpg Binary files differ. diff --git a/.config/polybar/launch.sh b/.config/polybar/launch.sh @@ -0,0 +1,17 @@ +#!/usr/bin/env bash + +# Add this script to your wm startup file. +DIR="$HOME/.config/polybar" + +# 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 the bar +polybar -q main -c "$DIR"/config.ini & + +# IPC settings and test +ln -sf /tmp/polybar_mqueue.$! /tmp/ipc-main +echo message >/tmp/ipc-main diff --git a/.config/polybar/modules.ini b/.config/polybar/modules.ini @@ -0,0 +1,1167 @@ +;; โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ +;; โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ +;; โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ +;; โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ +;; โโCreatedโByโAdityaโShakyaโ@adi1090xโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ +;; โโModified By Raven @raven2czโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ +;; โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ + +;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ + +[module/alsa] +type = internal/alsa + +; Soundcard to be used +; Usually in the format hw:# where # is the card number +; You can find the different card numbers in `/proc/asound/cards` +master-soundcard = default +speaker-soundcard = default +headphone-soundcard = default + +; Name of the master, speaker and headphone mixers +; Use the following command to list available mixer controls: +; $ amixer scontrols | sed -nr "s/.*'([[:alnum:]]+)'.*/\1/p" +; If master, speaker or headphone-soundcard isn't the default, +; use `amixer -c # scontrols` instead where # is the number +; of the master, speaker or headphone soundcard respectively +; +; Default: Master +master-mixer = Master + +; Optionally define speaker and headphone mixers +; Default: none +;;speaker-mixer = Speaker +; Default: none +;;headphone-mixer = Headphone + +; NOTE: This is required if headphone_mixer is defined +; Use the following command to list available device controls +; $ amixer controls | sed -r "/CARD/\!d; s/.*=([0-9]+).*name='([^']+)'.*/printf '%3.0f: %s\n' '\1' '\2'/e" | sort +; You may also need to use `amixer -c # controls` as above for the mixer names +; Default: none +;;headphone-id = 9 + +; Use volume mapping (similar to amixer -M and alsamixer), where the increase in volume is linear to the ear +; Default: false +;;mapped = true + +; Interval for volume increase/decrease (in percent points) +; Default: 5 +interval = 5 + +; Available tags: +; <label-volume> (default) +; <ramp-volume> +; <bar-volume> +format-volume = <ramp-volume> <label-volume> + +; Available tags: +; <label-muted> (default) +; <ramp-volume> +; <bar-volume> +format-muted = <label-muted> +format-muted-prefix = ๎จ +format-muted-prefix-foreground = ${color.red} + +; Available tokens: +; %percentage% (default) +label-volume = %percentage%% +label-volume-foreground = ${color.foreground} + +; Available tokens: +; %percentage% (default +label-muted = " Muted" +label-muted-foreground = ${color.sep} + +; Only applies if <ramp-volume> is used +ramp-volume-0 = ๎จ +ramp-volume-1 = ๎จ +ramp-volume-2 = ๎จ +ramp-volume-foreground = ${color.blue} + +; If defined, it will replace <ramp-volume> when +; headphones are plugged in to `headphone_control_numid` +; If undefined, <ramp-volume> will be used for both +; Only applies if <ramp-volume> is used +ramp-headphones-0 = ๎ฅผ +ramp-headphones-background = ${color.blue} + +;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ + +[module/backlight] +;type = internal/xbacklight +type = internal/backlight + +; Use the following command to list available cards: +; $ ls -1 /sys/class/backlight/ +;card = intel_backlight +card = amdgpu_bl0 + +; Available tags: +; <label> (default) +; <ramp> +; <bar> +format = <ramp> <label> + +; Available tokens: +; %percentage% (default) +label = %percentage%% + +; Only applies if <ramp> is used +ramp-0 = ๎ฆฃ +ramp-1 = ๎ฆฃ +ramp-2 = ๎ฆ +ramp-3 = ๎งฃ +ramp-4 = ๎งฃ +ramp-foreground = ${color.lime} + +;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ + +[module/battery] +type = internal/battery + +; This is useful in case the battery never reports 100% charge +full-at = 99 + +; Use the following command to list batteries and adapters: +; $ ls -1 /sys/class/power_supply/ +battery = BAT1 +adapter = ACAD + +; If an inotify event haven't been reported in this many +; seconds, manually poll for new values. +; +; Needed as a fallback for systems that don't report events +; on sysfs/procfs. +; +; Disable polling by setting the interval to 0. +; +; Default: 5 +poll-interval = 2 + +; see "man date" for details on how to format the time string +; NOTE: if you want to use syntax tags here you need to use %%{...} +; Default: %H:%M:%S +time-format = %H:%M + +; Available tags: +; <label-charging> (default) +; <bar-capacity> +; <ramp-capacity> +; <animation-charging> +format-charging = <label-charging> +format-charging-prefix = "๎ค" +format-charging-prefix-foreground = ${color.green} + +; Available tags: +; <label-discharging> (default) +; <bar-capacity> +; <ramp-capacity> +; <animation-discharging> +format-discharging = <label-discharging> +format-discharging-prefix = "๎ค" +format-discharging-prefix-foreground = ${color.pink} + +; Available tags: +; <label-full> (default) +; <bar-capacity> +; <ramp-capacity> +format-full = <label-full> +format-full-prefix = ๎ค +format-full-prefix-foreground = ${color.red} + +; Available tokens: +; %percentage% (default) +; %time% +; %consumption% (shows current charge rate in watts) +label-charging = " %percentage%%" + +; Available tokens: +; %percentage% (default) +; %time% +; %consumption% (shows current discharge rate in watts) +label-discharging = " %percentage%%" + +; Available tokens: +; %percentage% (default) +label-full = " Full" + +; Only applies if <ramp-capacity> is used +ramp-capacity-0 = +ramp-capacity-1 = +ramp-capacity-2 = +ramp-capacity-3 = +ramp-capacity-4 = + +; Only applies if <bar-capacity> is used +;bar-capacity-width = 10 + +; Only applies if <animation-charging> is used +animation-charging-0 = +animation-charging-1 = + +; Framerate in milliseconds +animation-charging-framerate = 750 + +; Only applies if <animation-discharging> is used +;;animation-discharging-0 = ${battery.anim0} +;;animation-discharging-1 = ${battery.anim1} + +; Framerate in milliseconds +;animation-discharging-framerate = 500 + +;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ + +;;[module/bspwm] +;;type = internal/bspwm + +; Only show workspaces defined on the same output as the bar +; NOTE: The bspwm and XRandR monitor names must match, which they do by default. +; Default: true +;;pin-workspaces = true + +; Output mode flags after focused state label +; Default: false +;;inline-mode = false + +; Create click handler used to focus workspace +; Default: true +;;enable-click = false + +; Create scroll handlers used to cycle workspaces +; Default: true +;;enable-scroll = false + +; Set the scroll cycle direction +; Default: true +;;reverse-scroll = false + +; Use fuzzy (partial) matching on labels when assigning +; icons to workspaces +; Example: code;โ will apply the icon to all workspaces +; containing 'code' in the label +; Default: false +;;fuzzy-match = true + +; ws-icon-[0-9]+ = label;icon +; Note that the label needs to correspond with the bspwm workspace name +;;ws-icon-0 = code;โ +;;ws-icon-1 = office;โ +;;ws-icon-2 = graphics;โ +;;ws-icon-3 = mail;โ +;;ws-icon-4 = web;โ +;;ws-icon-default = โ + +; Available tags: +; <label-monitor> +; <label-state> - gets replaced with <label-(focused|urgent|occupied|empty)> +; <label-mode> - gets replaced with <label-(monocle|tiled|fullscreen|floating|locked|sticky|private)> +; Default: <label-state> +;;format = <label-state> <label-mode> + +; Available tokens: +; %name% +; Default: %name% +;;label-monitor = %name% + +; If any values for label-dimmed-N are defined, the workspace/mode +; colors will get overridden with those values if the monitor is out of focus +; To only override workspaces in a specific state, use: +; label-dimmed-focused +; label-dimmed-occupied +; label-dimmed-urgent +; label-dimmed-empty +;;label-dimmed-foreground = #555 +;;label-dimmed-underline = ${bar/top.background} +;;label-dimmed-focused-background = #f00 + +; Available tokens: +; %name% +; %icon% +; %index% +; Default: %icon% %name% +;;label-focused = %icon% +;;label-focused-foreground = #ffffff +;;label-focused-background = #3f3f3f +;;label-focused-underline = #fba922 + +; Available tokens: +; %name% +; %icon% +; %index% +; Default: %icon% %name% +;;label-occupied = %icon% +;;label-occupied-underline = #555555 + +; Available tokens: +; %name% +; %icon% +; %index% +; Default: %icon% %name% +;;label-urgent = %icon% +;;label-urgent-foreground = #000000 +;;label-urgent-background = #bd2c40 +;;label-urgent-underline = #9b0a20 + +; Available tokens: +; %name% +; %icon% +; %index% +; Default: %icon% %name% +;;label-empty = %icon% +;;label-empty-foreground = #55 + +; The following labels will be used to indicate the layout/mode +; for the focused workspace. Requires <label-mode> +; +; Available tokens: +; None +;label-monocle = ๎ฃฟ +;label-tiled = ๎ซ +;label-fullscreen = ๎ +;label-floating = ๎ถ +;label-pseudotiled = P +;label-locked = ๎ข +;label-locked-foreground = #bd2c40 +;label-sticky = ๎ +;label-sticky-foreground = #fba922 +;label-private = ๎ +;label-private-foreground = #bd2c40 + +; Separator in between workspaces +;;label-separator = | +;;label-separator-padding = 2 +;;label-separator-foreground = #ffb52a + +;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ + +[module/cpu] +type = internal/cpu + +; Seconds to sleep between updates +; Default: 1 +interval = 1 + +; Available tags: +; <label> (default) +; <bar-load> +; <ramp-load> +; <ramp-coreload> +;;format = <label> <ramp-coreload> +format = <label> +format-prefix = ๎ฅ +format-prefix-foreground = ${color.green} + +; Available tokens: +; %percentage% (default) - total cpu load averaged over all cores +; %percentage-sum% - Cumulative load on all cores +; %percentage-cores% - load percentage for each core +; %percentage-core[1-9]% - load percentage for specific core +label = " %percentage%%" + +; Spacing between individual per-core ramps +;;ramp-coreload-spacing = 1 +;;ramp-coreload-0 = ${cpu.load0} +;;ramp-coreload-1 = ${cpu.load1} + +;;ramp-load-0 = ${cpu.load0} +;;ramp-load-1 = ${cpu.load1} + +;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ + +[module/date] +type = internal/date + +; Seconds to sleep between updates +interval = 1.0 + +; See "http://en.cppreference.com/w/cpp/io/manip/put_time" for details on how to format the date string +; NOTE: if you want to use syntax tags here you need to use %%{...} +date = %A, %d %B + +; Optional time format +time = %k:%M + +; if `date-alt` or `time-alt` is defined, clicking +; the module will toggle between formats +date-alt = %A, %d %B %Y +time-alt = %I:%M:%S %p + +; Available tags: +; <label> (default) +format = <label> +format-prefix = "๎คน " +format-prefix-foreground = ${color.white} + +; Available tokens: +; %date% +; %time% +; Default: %date% +label = %date% at %{F#4DD0E1}%time%%{F-} +label-font = 0 +;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ + +[module/filesystem] +type = internal/fs + +; Mountpoints to display +mount-0 = / +;;mount-1 = /home +;;mount-2 = /var + +; Seconds to sleep between updates +; Default: 30 +interval = 30 + +; Display fixed precision values +; Default: false +fixed-values = true + +; Spacing between entries +; Default: 2 +;;spacing = 4 + +; Available tags: +; <label-mounted> (default) +; <bar-free> +; <bar-used> +; <ramp-capacity> +format-mounted = <label-mounted> +format-mounted-prefix = ๎ฅบ +format-mounted-prefix-foreground = ${color.orange} + +; Available tags: +; <label-unmounted> (default) +format-unmounted = <label-unmounted> +format-unmounted-prefix = ๎ฅบ +format-unmounted-prefix-foreground = ${color.red} + +; Available tokens: +; %mountpoint% +; %type% +; %fsname% +; %percentage_free% +; %percentage_used% +; %total% +; %free% +; %used% +; Default: %mountpoint% %percentage_free%% +label-mounted = " %free%" + +; Available tokens: +; %mountpoint% +; Default: %mountpoint% is not mounted +label-unmounted = " %mountpoint%: NA" + +;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ + +;;[module/github] +;;type = internal/github + +; Accessing an access token stored in file +;;token = ${file:/path/to/file/containing/github/access.token} + +; Accessing an access token stored in an environment variable +;;token = ${env:GITHUB_ACCESS_TOKEN} + +; Whether empty notifications should be displayed or not +;;empty-notifications = false + +; Number of seconds in between requests +;;interval = 10 + +; Available tags: +; <label> (default) +;;format = <label> +;;format-prefix = ๎ฅถ + +; Available tokens: +; %notifications% (default) +; Default: Notifications: %notifications% +;;label = %notifications% + +;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ + +;;[module/i3] +;;type = internal/i3 + +; Only show workspaces defined on the same output as the bar +; +; Useful if you want to show monitor specific workspaces +; on different bars +; +; Default: false +;;pin-workspaces = true + +; This will split the workspace name on ':' +; Default: false +;;strip-wsnumbers = true + +; Sort the workspaces by index instead of the default +; sorting that groups the workspaces by output +; Default: false +;;index-sort = true + +; Create click handler used to focus workspace +; Default: true +;;enable-click = false + +; Create scroll handlers used to cycle workspaces +; Default: true +;;enable-scroll = false + +; Wrap around when reaching the first/last workspace +; Default: true +;;wrapping-scroll = false + +; Set the scroll cycle direction +; Default: true +;;reverse-scroll = false + +; Use fuzzy (partial) matching on labels when assigning +; icons to workspaces +; Example: code;โ will apply the icon to all workspaces +; containing 'code' in the label +; Default: false +;;fuzzy-match = true + +; ws-icon-[0-9]+ = label;icon +; NOTE: The label needs to match the name of the i3 workspace +;;ws-icon-0 = 1;โ +;;ws-icon-1 = 2;โ +;;ws-icon-2 = 3;โ +;;ws-icon-3 = 4;โ +;;ws-icon-4 = 5;โ +;;ws-icon-default = โ +; NOTE: You cannot skip icons, e.g. to get a ws-icon-6 +; you must also define a ws-icon-5. + +; Available tags: +; <label-state> (default) - gets replaced with <label-(focused|unfocused|visible|urgent)> +; <label-mode> (default) +;;format = <label-state> <label-mode> + +; Available tokens: +; %mode% +; Default: %mode% +;;label-mode = %mode% +;;label-mode-padding = 2 +;;label-mode-background = #e60053 + +; Available tokens: +; %name% +; %icon% +; %index% +; %output% +; Default: %icon% %name% +;;label-focused = %index% +;;label-focused-foreground = #ffffff +;;label-focused-background = #3f3f3f +;;label-focused-underline = #fba922 +;;label-focused-padding = 4 + +; Available tokens: +; %name% +; %icon% +; %index% +; %output% +; Default: %icon% %name% +;;label-unfocused = %index% +;;label-unfocused-padding = 4 + +; Available tokens: +; %name% +; %icon% +; %index% +; %output% +; Default: %icon% %name% +;;label-visible = %index% +;;label-visible-underline = #555555 +;;label-visible-padding = 4 + +; Available tokens: +; %name% +; %icon% +; %index% +; %output% +; Default: %icon% %name% +;;label-urgent = %index% +;;label-urgent-foreground = #000000 +;;label-urgent-background = #bd2c40 +;;label-urgent-padding = 4 + +; Separator in between workspaces +;;label-separator = | +;;label-separator-padding = 2 +;;label-separator-foreground = #ffb52a + +;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ + +[module/memory] +type = internal/memory + +; Seconds to sleep between updates +; Default: 1 +interval = 1 + +; Available tags: +; <label> (default) +; <bar-used> +; <bar-free> +; <ramp-used> +; <ramp-free> +; <bar-swap-used> +; <bar-swap-free> +; <ramp-swap-used> +; <ramp-swap-free> +format = <label> +format-prefix = ๎ฆน +format-prefix-foreground = ${color.blue} + +; Available tokens: +; %percentage_used% (default) +; %percentage_free% +; %gb_used% +; %gb_free% +; %gb_total% +; %mb_used% +; %mb_free% +; %mb_total% +; %percentage_swap_used% +; %percentage_swap_free% +; %mb_swap_total% +; %mb_swap_free% +; %mb_swap_used% +; %gb_swap_total% +; %gb_swap_free% +; %gb_swap_used% + +label = " %mb_used%" + +; Only applies if <ramp-used> is used +;;ramp-used-0 = ${memory.used0} +;;ramp-used-1 = ${memory.used1} +;;ramp-used-2 = ${memory.used2} + +; Only applies if <ramp-free> is used +;;ramp-free-0 = ${memory.free0} +;;ramp-free-1 = ${memory.free1} +;;ramp-free-2 = ${memory.free2} + +;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ + +[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 + +; Seconds to sleep between progressbar/song timer sync +; Default: 1 +interval = 1 + +; Available tags: +; <label-song> (default) +; <label-time> +; <bar-progress> +; <toggle> - gets replaced with <icon-(pause|play)> +; <toggle-stop> - gets replaced with <icon-(stop|play)> +; <icon-random> +; <icon-repeat> +; <icon-repeatone> (deprecated) +; <icon-single> - Toggle playing only a single song. Replaces <icon-repeatone> +; <icon-consume> +; <icon-prev> +; <icon-stop> +; <icon-play> +; <icon-pause> +; <icon-next> +; <icon-seekb> +; <icon-seekf> +format-online = <label-song> <icon-prev> <toggle> <icon-next> +format-online-prefix = ๎ฆจ +format-online-prefix-foreground = ${color.green} + +;format-playing = ${self.format-online} +;format-paused = ${self.format-online} +;format-stopped = ${self.format-online} + +; Available tags: +; <label-offline> +format-offline = <label-offline> +format-offline-prefix = ๎ฆจ +format-offline-prefix-foreground = ${color.red} + +; Available tokens: +; %artist% +; %album-artist% +; %album% +; %date% +; %title% +; Default: %artist% - %title% +label-song = " %artist% - %title%" +label-song-maxlen = 25 +label-song-ellipsis = true + +; Available tokens: +; %elapsed% +; %total% +; Default: %elapsed% / %total% +label-time = %elapsed% / %total% +label-time-background = ${color.background-alt} +label-time-padding = 1 + +; Available tokens: +; None +label-offline = " Offline" + +; Only applies if <icon-X> is used +icon-play = ๎ฆบ +icon-play-foreground = ${color.cyan} +icon-pause = ๎ฆฎ +icon-pause-foreground = ${color.cyan} +icon-stop = ๎ง +icon-stop-foreground = ${color.red} +icon-next = ๎ง +icon-next-foreground = ${color.cyan} +icon-prev = ๎ง +icon-prev-foreground = ${color.cyan} +icon-seekf = +icon-seekb = +icon-random = +icon-repeat = +icon-repeatone = +icon-single = +icon-consume = + +; Used to display the state of random/repeat/repeatone/single +; Only applies if <icon-[random|repeat|repeatone|single]> is used +toggle-on-foreground = ${color.primary} +toggle-off-foreground = ${color.red} + +; Only applies if <bar-progress> is used +;;bar-progress-width = 45 +;;bar-progress-indicator = | +;;bar-progress-fill = โ +;;bar-progress-empty = โ + +;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ + +; If you use both a wired and a wireless network, just add 2 module definitions. For example +[module/wired-network] +type = internal/network +;interface = enp38s0 +interface = eth0 + +[module/wireless-network] +type = internal/network +interface = wlp3s0 + +; Normal Module +[module/network] +type = internal/network +interface = wlan0 + +; Seconds to sleep between updates +; Default: 1 +interval = 1.0 + +; Test connectivity every Nth update +; A value of 0 disables the feature +; NOTE: Experimental (needs more testing) +; Default: 0 +;ping-interval = 3 + +; @deprecated: Define min width using token specifiers (%downspeed:min% and %upspeed:min%) +; Minimum output width of upload/download rate +; Default: 3 +;;udspeed-minwidth = 5 + +; Accumulate values from all interfaces +; when querying for up/downspeed rate +; Default: false +accumulate-stats = true + +; Consider an `UNKNOWN` interface state as up. +; Some devices have an unknown state, even when they're running +; Default: false +unknown-as-up = true + +; Available tags: +; <label-connected> (default) +; <ramp-signal> +format-connected = <label-connected> +format-connected-prefix = ๎จ +format-connected-prefix-foreground = ${color.purple} + +; Available tags: +; <label-disconnected> (default) +format-disconnected = <label-disconnected> +format-disconnected-prefix = ๎จ +format-disconnected-prefix-foreground = ${color.orange} + +; Available tags: +; <label-connected> (default) +; <label-packetloss> +; <animation-packetloss> +;;format-packetloss = <animation-packetloss> <label-connected> + +; Available tokens: +; %ifname% [wireless+wired] +; %local_ip% [wireless+wired] +; %local_ip6% [wireless+wired] +; %essid% [wireless] +; %signal% [wireless] +; %upspeed% [wireless+wired] +; %downspeed% [wireless+wired] +; %linkspeed% [wired] +; Default: %ifname% %local_ip% +label-connected = "%{A1:networkmanager_dmenu &:} %essid% %{F#6C77BB}๎ฅ%{F-} %downspeed%%{A}" + +; Available tokens: +; %ifname% [wireless+wired] +; Default: (none) +label-disconnected = "%{A1:networkmanager_dmenu &:} Offline%{A}" + +; Available tokens: +; %ifname% [wireless+wired] +; %local_ip% [wireless+wired] +; %local_ip6% [wireless+wired] +; %essid% [wireless] +; %signal% [wireless] +; %upspeed% [wireless+wired] +; %downspeed% [wireless+wired] +; %linkspeed% [wired] +; Default: (none) +;label-packetloss = %essid% +;label-packetloss-foreground = #eefafafa + +; Only applies if <ramp-signal> is used +ramp-signal-0 = +ramp-signal-1 = +ramp-signal-2 = + +; Only applies if <animation-packetloss> is used +;;animation-packetloss-0 = โ +;;animation-packetloss-0-foreground = #ffa64c +;;animation-packetloss-1 = โ +;;animation-packetloss-1-foreground = #000000 +; Framerate in milliseconds +;;animation-packetloss-framerate = 500 + +;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ + +[module/pulseaudio] +type = internal/pulseaudio + +; Sink to be used, if it exists (find using `pacmd list-sinks`, name field) +; If not, uses default sink +sink = alsa_output.pci-0000_03_00.6.analog-stereo + +; Use PA_VOLUME_UI_MAX (~153%) if true, or PA_VOLUME_NORM (100%) if false +; Default: true +use-ui-max = false + +; Interval for volume increase/decrease (in percent points) +; Default: 5 +interval = 5 + +; Available tags: +; <label-volume> (default) +; <ramp-volume> +; <bar-volume> +format-volume = <ramp-volume> <label-volume> + +; Available tags: +; <label-muted> (default) +; <ramp-volume> +; <bar-volume> +format-muted = <label-muted> +format-muted-prefix = ๎จ +format-muted-prefix-foreground = ${color.red} + +; Available tokens: +; %percentage% (default) +label-volume = %percentage%% + +; Available tokens: +; %percentage% (default +label-muted = " Muted" +label-muted-foreground = ${color.sep} + +; Only applies if <ramp-volume> is used +ramp-volume-0 = ๎จ +ramp-volume-1 = ๎จ +ramp-volume-2 = ๎จ +ramp-volume-foreground = ${color.blue} + +;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ + +[module/temp-cpu] +type = internal/temperature + +; Seconds to sleep between updates +; Default: 1 +interval = 2 + +; Thermal zone to use +; To list all the zone types, run +; $ for i in /sys/class/thermal/thermal_zone*; do echo "$i: $(<$i/type)"; done +; Default: 0 +thermal-zone = 0 + +; Full path of temperature sysfs path +; Use `sensors` to find preferred temperature source, then run +; $ for i in /sys/class/hwmon/hwmon*/temp*_input; do echo "$(<$(dirname $i)/name): $(cat ${i%_*}_label 2>/dev/null || echo $(basename ${i%_*})) $(readlink -f $i)"; done +; to find path to desired file +; Default reverts to thermal zone setting +;;hwmon-path = /sys/devices/platform/coretemp.0/hwmon/hwmon2/temp1_input +hwmon-path = /sys/devices/pci0000:00/0000:00:18.3/hwmon/hwmon3/temp2_input + +; Threshold temperature to display warning label (in degrees celsius) +; Default: 80 +base-temperature = 40 +warn-temperature = 75 + +; Whether or not to show units next to the temperature tokens (ยฐC, ยฐF) +; Default: true +units = true + +; Available tags: +; <label> (default) +; <ramp> +format = <ramp>cpu <label> + +; Available tags: +; <label-warn> (default) +; <ramp> +format-warn = <ramp>cpu <label-warn> + +; Available tokens: +; %temperature% (deprecated) +; %temperature-c% (default, temperature in ยฐC) +; %temperature-f% (temperature in ยฐF) +label = %temperature-c% + +; Available tokens: +; %temperature% (deprecated) +; %temperature-c% (default, temperature in ยฐC) +; %temperature-f% (temperature in ยฐF) +label-warn = "%temperature-c%" +label-warn-foreground = ${color.red} + +; Requires the <ramp> tag +; The icon selection will range from 0 to `warn-temperature` +; with the current temperature as index. +ramp-0 = ๎งช +ramp-1 = ๎งช +ramp-2 = ๎งช +ramp-3 = ๎งช +ramp-4 = ๎งช +ramp-foreground = ${color.cyan} + +;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ + +[module/temp-gpu] +type = internal/temperature + +; Seconds to sleep between updates +; Default: 1 +interval = 2 + +; Thermal zone to use +; To list all the zone types, run +; $ for i in /sys/class/thermal/thermal_zone*; do echo "$i: $(<$i/type)"; done +; Default: 0 +thermal-zone = 0 + +; Full path of temperature sysfs path +; Use `sensors` to find preferred temperature source, then run +; $ for i in /sys/class/hwmon/hwmon*/temp*_input; do echo "$(<$(dirname $i)/name): $(cat ${i%_*}_label 2>/dev/null || echo $(basename ${i%_*})) $(readlink -f $i)"; done +; to find path to desired file +; Default reverts to thermal zone setting +;;hwmon-path = /sys/devices/platform/coretemp.0/hwmon/hwmon2/temp1_input +hwmon-path = /sys/devices/pci0000:00/0000:00:03.1/0000:2d:00.0/0000:2e:00.0/0000:2f:00.0/hwmon/hwmon2/temp1_input + +; Threshold temperature to display warning label (in degrees celsius) +; Default: 80 +base-temperature = 40 +warn-temperature = 75 + +; Whether or not to show units next to the temperature tokens (ยฐC, ยฐF) +; Default: true +units = true + +; Available tags: +; <label> (default) +; <ramp> +format = <ramp>gpu <label> + +; Available tags: +; <label-warn> (default) +; <ramp> +format-warn = <ramp>gpu <label-warn> + +; Available tokens: +; %temperature% (deprecated) +; %temperature-c% (default, temperature in ยฐC) +; %temperature-f% (temperature in ยฐF) +label = %temperature-c% + +; Available tokens: +; %temperature% (deprecated) +; %temperature-c% (default, temperature in ยฐC) +; %temperature-f% (temperature in ยฐF) +label-warn = "%temperature-c%" +label-warn-foreground = ${color.red} + +; Requires the <ramp> tag +; The icon selection will range from 0 to `warn-temperature` +; with the current temperature as index. +ramp-0 = ๎งช +ramp-1 = ๎งช +ramp-2 = ๎งช +ramp-3 = ๎งช +ramp-4 = ๎งช +ramp-foreground = ${color.cyan} + +;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ + +[module/keyboard] +type = internal/xkeyboard + +; List of indicators to ignore +blacklist-0 = num lock +blacklist-1 = scroll lock + +; Available tags: +; <label-layout> (default) +; <label-indicator> (default) +format = <label-layout> <label-indicator> +format-prefix = ๎ฅ +format-prefix-foreground = ${color.blue-gray} + +; Available tokens: +; %layout% +; %name% +; %number% +; Default: %layout% +label-layout = " %layout%" + +; Available tokens: +; %name% +; Default: %name% +label-indicator-on = "%name%" +label-indicator-on-foreground = ${color.cyan} + +;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ + +[module/title] +type = internal/xwindow + +; Available tags: +; <label> (default) +format = <label> +format-prefix = +format-foreground = ${color.foreground} + +; Available tokens: +; %title% +; Default: %title% +label = "%title%" +label-maxlen = 60 + +; Used instead of label when there is no window title +label-empty = "Desktop" + +;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ + +[module/workspaces] +type = internal/xworkspaces + +; Only show workspaces defined on the same output as the bar +; +; Useful if you want to show monitor specific workspaces +; on different bars +; +; Default: false +pin-workspaces = true + +; Create click handler used to focus desktop +; Default: true +enable-click = true + +; Create scroll handlers used to cycle desktops +; Default: true +enable-scroll = true + +; icon-[0-9]+ = <desktop-name>;<icon> +; NOTE: The desktop name needs to match the name configured by the WM +; You can get a list of the defined desktops using: +; $ xprop -root _NET_DESKTOP_NAMES +icon-0 = I;I +icon-1 = II;II +icon-2 = III;III +icon-3 = IV;IV +icon-4 = V;V +icon-5 = VI;VI +icon-6 = VII;VII +icon-7 = VIII;VIII +icon-8 = IX;IX +icon-9 = X;X +icon-default = ๎ฆข + +; Available tags: +; <label-monitor> +; <label-state> - gets replaced with <label-(active|urgent|occupied|empty)> +; Default: <label-state> +format = <label-state> + +; Available tokens: +; %name% +; Default: %name% +label-monitor = %name% + +; Available tokens: +; %name% +; %icon% +; %index% +; Default: %icon% %name% +label-active = [ %icon% ] +label-active-foreground = ${color.purple} +; label-active-underline = ${color.purple} + +; Available tokens: +; %name% +; %icon% +; %index% +; Default: %icon% %name% +label-occupied = %icon% +label-occupied-foreground = ${color.blue} + +; Available tokens: +; %name% +; %icon% +; %index% +; Default: %icon% %name% +label-urgent = %icon% +label-urgent-foreground = ${color.red} +label-urgent-underline = ${color.red} + +; Available tokens: +; %name% +; %icon% +; %index% +; Default: %icon% %name% +label-empty = %icon% +label-empty-foreground = ${color.foreground} + +label-active-padding = 2 +label-urgent-padding = 1 +label-occupied-padding = 1 +label-empty-padding = 1 + +;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ diff --git a/.config/polybar/preview.ini b/.config/polybar/preview.ini @@ -0,0 +1,310 @@ +;; โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ +;; โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ +;; โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ +;; โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ +;; โโCreatedโByโAdityaโShakyaโ@adi1090xโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ +;; โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ + +;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ + +;; Global WM Settings + +[global/wm] +; Adjust the _NET_WM_STRUT_PARTIAL top value +; Used for top aligned bars +margin-bottom = 0 + +; Adjust the _NET_WM_STRUT_PARTIAL bottom value +; Used for bottom aligned bars +margin-top = 0 + +;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ + +;; File Inclusion +; include an external file, like module file, etc. + +include-file = ~/.config/polybar/bars.ini +include-file = ~/.config/polybar/colors.ini +include-file = ~/.config/polybar/modules.ini +include-file = ~/.config/polybar/user_modules.ini + +;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ + +;; Bar Settings + +[bar/main] +; Use either of the following command to list available outputs: +; If unspecified, the application will pick the first one it finds. +; $ polybar -m | cut -d ':' -f 1 +; $ xrandr -q | grep " connected" | cut -d ' ' -f1 +monitor = + +; Use the specified monitor as a fallback if the main one is not found. +monitor-fallback = + +; Require the monitor to be in connected state +; XRandR sometimes reports my monitor as being disconnected (when in use) +monitor-strict = false + +; Tell the Window Manager not to configure the window. +; Use this to detach the bar if your WM is locking its size/position. +override-redirect = false + +; Put the bar at the bottom of the screen +bottom = false + +; Prefer fixed center position for the `modules-center` block +; When false, the center position will be based on the size of the other blocks. +fixed-center = true + +; Dimension defined as pixel value (e.g. 35) or percentage (e.g. 50%), +; the percentage can optionally be extended with a pixel offset like so: +; 50%:-10, this will result in a width or height of 50% minus 10 pixels +width = 100% +height = 34 + +; Offset defined as pixel value (e.g. 35) or percentage (e.g. 50%) +; the percentage can optionally be extended with a pixel offset like so: +; 50%:-10, this will result in an offset in the x or y direction +; of 50% minus 10 pixels +offset-x = 0% +offset-y = 0% + +; Background ARGB color (e.g. #f00, #ff992a, #ddff1023) +background = ${color.background} + +; Foreground ARGB color (e.g. #f00, #ff992a, #ddff1023) +foreground = ${color.foreground} + +; Background gradient (vertical steps) +; background-[0-9]+ = #aarrggbb +;;background-0 = + +; Value used for drawing rounded corners +; Note: This shouldn't be used together with border-size because the border +; doesn't get rounded +; Individual top/bottom values can be defined using: +; radius-{top,bottom} +radius-top = 0.0 +radius-bottom = 0.0 + +; Under-/overline pixel size and argb color +; Individual values can be defined using: +; {overline,underline}-size +; {overline,underline}-color +line-size = 5 +line-color = ${color.background} + +; Values applied to all borders +; Individual side values can be defined using: +; border-{left,top,right,bottom}-size +; border-{left,top,right,bottom}-color +; The top and bottom borders are added to the bar height, so the effective +; window height is: +; height + border-top-size + border-bottom-size +; Meanwhile the effective window width is defined entirely by the width key and +; the border is placed withing this area. So you effectively only have the +; following horizontal space on the bar: +; width - border-right-size - border-left-size +border-bottom-size = 0 +border-bottom-color = ${color.foreground} + +; Number of spaces to add at the beginning/end of the bar +; Individual side values can be defined using: +; padding-{left,right} +padding = 0 + +; Number of spaces to add before/after each module +; Individual side values can be defined using: +; module-margin-{left,right} +module-margin-left = 1 +module-margin-right = 1 + +;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ + +; Fonts are defined using <font-name>;<vertical-offset> +; Font names are specified using a fontconfig pattern. +; font-0 = NotoSans-Regular:size=8;2 +; font-1 = MaterialIcons:size=10 +; font-2 = Termsynu:size=8;-1 +; font-3 = FontAwesome:size=10 +; See the Fonts wiki page for more details + +font-0 = "Iosevka Nerd Font:size=10;4" +font-1 = "Iosevka Nerd Font:size=10;3" +font-2 = "feather:size=12;3" + +; Modules are added to one of the available blocks +; modules-left = cpu ram +; modules-center = xwindow xbacklight +; modules-right = ipc clock + +;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ + +[bar/top] +inherit = bar/main +offset-y = 10 +modules-center = title sep menu sep term files browser settings sep filesystem sep temperature sep color-switch sep keyboard sep pulseaudio sep backlight sep updates sep powermenu +enable-ipc = true + +[bar/mid] +inherit = bar/main +offset-y = 54 +modules-center = volume sep brightness sep battery_bar sep cpu_bar sep filesystem_bar sep memory_bar sep mpd_bar +enable-ipc = true + +[bar/bottom] +inherit = bar/main +offset-y = 98 +modules-center = launcher sep workspaces sep cpu sep memory sep mpd sep alsa sep battery sep network sep date sep sysmenu +enable-ipc = true + +;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ + +; The separator will be inserted between the output of each module +separator = + +; Opacity value between 0.0 and 1.0 used on fade in/out +dim-value = 1.0 + +; Value to be used to set the WM_NAME atom +; If the value is empty or undefined, the atom value +; will be created from the following template: polybar-[BAR]_[MONITOR] +; NOTE: The placeholders are not available for custom values +wm-name = + +; Locale used to localize various module data (e.g. date) +; Expects a valid libc locale, for example: sv_SE.UTF-8 +locale = + +; Position of the system tray window +; If empty or undefined, tray support will be disabled +; NOTE: A center aligned tray will cover center aligned modules +; +; Available positions: +; left +; center +; right +; none +tray-position = none + +; If true, the bar will not shift its +; contents when the tray changes +tray-detached = false + +; Tray icon max size +tray-maxsize = 16 + +; Background color for the tray container +; ARGB color (e.g. #f00, #ff992a, #ddff1023) +; By default the tray container will use the bar +; background color. +tray-background = ${color.background} + +; Tray offset defined as pixel value (e.g. 35) or percentage (e.g. 50%) +tray-offset-x = 0 +tray-offset-y = 0 + +; Pad the sides of each tray icon +tray-padding = 0 + +; Scale factor for tray clients +tray-scale = 1.0 + +; Restack the bar window and put it above the +; selected window manager's root +; +; Fixes the issue where the bar is being drawn +; on top of fullscreen window's +; +; Currently supported WM's: +; bspwm +; i3 (requires: `override-redirect = true`) +;;wm-restack = + +; Set a DPI values used when rendering text +; This only affects scalable fonts +; dpi = + +; Enable support for inter-process messaging +; See the Messaging wiki page for more details. +;enable-ipc = true + +; Fallback click handlers that will be called if +; there's no matching module handler found. +click-left = +click-middle = +click-right = +scroll-up = +scroll-down = +double-click-left = +double-click-middle = +double-click-right = + +; Requires polybar to be built with xcursor support (xcb-util-cursor) +; Possible values are: +; - default : The default pointer as before, can also be an empty string (default) +; - pointer : Typically in the form of a hand +; - ns-resize : Up and down arrows, can be used to indicate scrolling +cursor-click = +cursor-scroll = + +;; WM Workspace Specific + +; bspwm +;;scroll-up = bspwm-desknext +;;scroll-down = bspwm-deskprev +;;scroll-up = bspc desktop -f prev.local +;;scroll-down = bspc desktop -f next.local + +;i3 +;;scroll-up = i3wm-wsnext +;;scroll-down = i3wm-wsprev +;;scroll-up = i3-msg workspace next_on_output +;;scroll-down = i3-msg workspace prev_on_output + +;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ + +;; Application Settings + +[settings] +; The throttle settings lets the eventloop swallow up til X events +; if they happen within Y millisecond after first event was received. +; This is done to prevent flood of update event. +; +; For example if 5 modules emit an update event at the same time, we really +; just care about the last one. But if we wait too long for events to swallow +; the bar would appear sluggish so we continue if timeout +; expires or limit is reached. +throttle-output = 5 +throttle-output-for = 10 + +; Time in milliseconds that the input handler will wait between processing events +;throttle-input-for = 30 + +; Reload upon receiving XCB_RANDR_SCREEN_CHANGE_NOTIFY events +screenchange-reload = false + +; Compositing operators +; @see: https://www.cairographics.org/manual/cairo-cairo-t.html#cairo-operator-t +compositing-background = source +compositing-foreground = over +compositing-overline = over +compositing-underline = over +compositing-border = over + +; Define fallback values used by all module formats +;format-foreground = +;format-background = +;format-underline = +;format-overline = +;format-spacing = +;format-padding = +;format-margin = +;format-offset = + +; Enables pseudo-transparency for the bar +; If set to true the bar can be transparent without a compositor. +pseudo-transparency = false + +;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ diff --git a/.config/polybar/preview.sh b/.config/polybar/preview.sh @@ -0,0 +1,14 @@ +#!/usr/bin/env bash + +DIR="$HOME/.config/polybar" + +# 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 the preview bar +polybar -q top -c "$DIR"/preview.ini & +polybar -q mid -c "$DIR"/preview.ini & +polybar -q bottom -c "$DIR"/preview.ini & diff --git a/.config/polybar/scripts/check-all-updates.sh b/.config/polybar/scripts/check-all-updates.sh @@ -0,0 +1,24 @@ +#!/bin/bash +#source https://github.com/x70b1/polybar-scripts +if [[ -f "/usr/bin/apt" ]]; then + # apt is available + updates=$(LANG=C apt-get upgrade -s |grep -P '^\d+ upgraded'|cut -d" " -f1) +else + # arch variant + if ! updates_arch=$(checkupdates 2> /dev/null | wc -l ); then + updates_arch=0 + fi + + # if ! updates_aur=$(cower -u 2> /dev/null | wc -l); then + if ! updates_aur=$(trizen -Su --aur --quiet | wc -l); then + updates_aur=0 + fi + + updates=$(("$updates_arch" + "$updates_aur")) +fi + +if [ "$updates" -gt 0 ]; then + echo " $updates" +else + echo "0" +fi diff --git a/.config/polybar/scripts/checkupdates b/.config/polybar/scripts/checkupdates @@ -0,0 +1,117 @@ +#!/usr/bin/bash +# +# checkupdates: Safely print a list of pending updates. +# +# Copyright (c) 2013 Kyle Keen <keenerd@gmail.com> +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. +# + +declare -r myname='checkupdates' +declare -r myver='1.0.0' + +plain() { + (( QUIET )) && return + local mesg=$1; shift + printf "${BOLD} ${mesg}${ALL_OFF}\n" "$@" >&1 +} + +msg() { + (( QUIET )) && return + local mesg=$1; shift + printf "${GREEN}==>${ALL_OFF}${BOLD} ${mesg}${ALL_OFF}\n" "$@" >&1 +} + +msg2() { + (( QUIET )) && return + local mesg=$1; shift + printf "${BLUE} ->${ALL_OFF}${BOLD} ${mesg}${ALL_OFF}\n" "$@" >&1 +} + +ask() { + local mesg=$1; shift + printf "${BLUE}::${ALL_OFF}${BOLD} ${mesg}${ALL_OFF}" "$@" >&1 +} + +warning() { + local mesg=$1; shift + printf "${YELLOW}==> $(gettext "WARNING:")${ALL_OFF}${BOLD} ${mesg}${ALL_OFF}\n" "$@" >&2 +} + +error() { + local mesg=$1; shift + printf "${RED}==> $(gettext "ERROR:")${ALL_OFF}${BOLD} ${mesg}${ALL_OFF}\n" "$@" >&2 +} + +# check if messages are to be printed using color +unset ALL_OFF BOLD BLUE GREEN RED YELLOW +if [[ -t 2 && ! $USE_COLOR = "n" ]]; then + # prefer terminal safe colored and bold text when tput is supported + if tput setaf 0 &>/dev/null; then + ALL_OFF="$(tput sgr0)" + BOLD="$(tput bold)" + BLUE="${BOLD}$(tput setaf 4)" + GREEN="${BOLD}$(tput setaf 2)" + RED="${BOLD}$(tput setaf 1)" + YELLOW="${BOLD}$(tput setaf 3)" + else + ALL_OFF="\e[1;0m" + BOLD="\e[1;1m" + BLUE="${BOLD}\e[1;34m" + GREEN="${BOLD}\e[1;32m" + RED="${BOLD}\e[1;31m" + YELLOW="${BOLD}\e[1;33m" + fi +fi +readonly ALL_OFF BOLD BLUE GREEN RED YELLOW + + +if (( $# > 0 )); then + echo "${myname} v${myver}" + echo + echo "Safely print a list of pending updates" + echo + echo "Usage: ${myname}" + echo + echo 'Note: Export the "CHECKUPDATES_DB" variable to change the path of the temporary database.' + exit 0 +fi + +if ! type -P fakeroot >/dev/null; then + error 'Cannot find the fakeroot binary.' + exit 1 +fi + +if [[ -z $CHECKUPDATES_DB ]]; then + CHECKUPDATES_DB="${TMPDIR:-/tmp}/checkup-db-${USER}/" +fi + +trap 'rm -f $CHECKUPDATES_DB/db.lck' INT TERM EXIT + +DBPath="$(pacman-conf DBPath)" +if [[ -z "$DBPath" ]] || [[ ! -d "$DBPath" ]]; then + DBPath="/var/lib/pacman/" +fi + +mkdir -p "$CHECKUPDATES_DB" +ln -s "${DBPath}/local" "$CHECKUPDATES_DB" &> /dev/null +if ! fakeroot -- pacman -Sy --dbpath "$CHECKUPDATES_DB" --logfile /dev/null &> /dev/null; then + error 'Cannot fetch updates' + exit 1 +fi +pacman -Qu --dbpath "$CHECKUPDATES_DB" 2> /dev/null | grep -v '\[.*\]' + +exit 0 + +# vim: set noet: diff --git a/.config/polybar/scripts/get_mpris_status.sh b/.config/polybar/scripts/get_mpris_status.sh @@ -0,0 +1,99 @@ +#!/bin/bash + +# The name of polybar bar which houses the main spotify module and the control modules. +PARENT_BAR="${1:-music}" +PARENT_BAR_PID=$(pgrep -a "polybar" | grep "$PARENT_BAR" | cut -d" " -f1) + +urldecode() { : "${*//+/ }"; echo -e "${_//%/\\x}"; } + +send_hook() { + [ -z "$1" ] && echo "send_hook: missing arg" && exit 1 + polybar-msg hook mpris-play-pause "$1" 1>/dev/null 2>&1 +} + + +extract_meta() { + grep "$1\W" <<< "$meta" | awk '{$1=$2=""; print $0}' | sed 's/^ *//; s/; */;/g' | paste -s -d/ - +} + +# if "icon" given, determine icon. otherwise, print metadata +get_info() { + if [ -z "$1" ]; then + echo "Usage: get_info PLAYER [icon]" + exit 1 + fi + + meta=$(playerctl -p "$1" metadata) + + # get title + title=$(extract_meta title) + # if no title, try url e.g. vlc + if [ -z "$title" ]; then + title=$(extract_meta url) + title=$(urldecode "${title##*/}") + fi + + # if not "icon", display information and return + if [ "$2" != "icon" ]; then + artist=$(extract_meta artist) + [ -z "$artist" ] && artist=$(extract_meta albumArtist) + + if [ -n "$artist" ]; then + album=$(extract_meta album) + [ -n "$album" ] && echo -n " ๏ค $album ๎ฑ" + + echo -n " ๏ด $artist ๎ฑ " + fi + + echo "$title" + return 0 + fi + + # determine icon: + # if player name is recognised, use it + case "$1" in + spotify* | vlc | mpv) echo "$1";; + kdeconnect*) echo "kdeconnect";; + chromium*) + # if a browser, search window titles: + + # this tries to avoid title messing up the regex + regex_title=$(echo "$title" | tr "[:punct:]" ".") + windowname=$(xdotool search --name --class --classname "$regex_title" getwindowname 2>/dev/null) + case $windowname in + "") ;; # ignore if empty + *Netflix*) echo "netflix";; + *YouTube*) echo "youtube";; + *"Prime Video"*) echo "prime";; + *"Corridor Digital"*) echo "corridor";; + *) echo "browser";; + esac;; + *) echo "none";; + esac +} + +# manually go through players +read -d'\n' -ra PLAYERS <<<"$(playerctl -l 2>/dev/null)" +declare -a PAUSED +for player in "${PLAYERS[@]}"; do + [ "$player" = "playerctld" ] && continue; + + p_status=$(playerctl -p "$player" status 2>/dev/null) + + # if we have one playing, we'll use it and EXIT + if [ "$p_status" = "Playing" ]; then + send_hook 1 + get_info "$player" "$2" + exit 0; + fi + + [ "$p_status" = "Paused" ] && PAUSED+=("$player") +done + +# if we have a paused, show it otherwise assume there are no players or have all stopped +if [ -n "${PAUSED[0]}" ]; then + send_hook 2 + get_info "${PAUSED[0]}" "$2" +else + [ "$2" = icon ] && echo "none" || echo " ๏ฆฑ " +fi diff --git a/.config/polybar/scripts/get_spotify_status.sh b/.config/polybar/scripts/get_spotify_status.sh @@ -0,0 +1,54 @@ +#!/bin/bash + +# The name of polybar bar which houses the main spotify module and the control modules. +PARENT_BAR="now-playing" +PARENT_BAR_PID=$(pgrep -a "polybar" | grep "$PARENT_BAR" | cut -d" " -f1) + +# Set the source audio player here. +# Players supporting the MPRIS spec are supported. +# Examples: spotify, vlc, chrome, mpv and others. +# Use `playerctld` to always detect the latest player. +# See more here: https://github.com/altdesktop/playerctl/#selecting-players-to-control +PLAYER="spotify" + +callDbus() { + if ! pgrep -x spotify >/dev/null; then + echo ""; exit + fi + + cmd="org.freedesktop.DBus.Properties.Get" + domain="org.mpris.MediaPlayer2" + path="/org/mpris/MediaPlayer2" + + meta=$(dbus-send --print-reply --dest=${domain}.spotify \ + /org/mpris/MediaPlayer2 org.freedesktop.DBus.Properties.Get string:${domain}.Player string:Metadata) + + artist=$(echo "$meta" | sed -nr '/xesam:artist"/,+2s/^ +string "(.*)"$/\1/p' | tail -1 | sed 's/\&/\\&/g' | sed 's#\/#\\/#g') + album=$(echo "$meta" | sed -nr '/xesam:album"/,+2s/^ +variant +string "(.*)"$/\1/p' | tail -1| sed 's/\&/\\&/g'| sed 's#\/#\\/#g') + title=$(echo "$meta" | sed -nr '/xesam:title"/,+2s/^ +variant +string "(.*)"$/\1/p' | tail -1 | sed 's/\&/\\&/g'| sed 's#\/#\\/#g') + + echo "${*:-%title% [%artist%]}" | sed "s/%artist%/$artist/g;s/%title%/$title/g;s/%album%/$album/g"i | sed "s/\&/\&/g" | sed "s#\/#\/#g" +} + +PLAYERCTL_STATUS=$(playerctl --player=$PLAYER status 2>/dev/null) +EXIT_CODE=$? + +if [ $EXIT_CODE -eq 0 ]; then + STATUS=$PLAYERCTL_STATUS +else + STATUS="No player is running" +fi + +if [ "$1" == "--status" ]; then + echo "$STATUS" +else + if [ "$STATUS" = "Stopped" ]; then + echo "No music is playing" + elif [ "$STATUS" = "Paused" ]; then + echo `callDbus` + elif [ "$STATUS" = "No player is running" ]; then + echo "$STATUS" + else + echo `callDbus` + fi +fi diff --git a/.config/polybar/scripts/launcher.sh b/.config/polybar/scripts/launcher.sh @@ -0,0 +1,13 @@ +#!/usr/bin/env bash + +FILE="$HOME/.config/polybar/scripts/rofi/colors.rasi" + +## random accent color +#COLORS=('#EC7875' '#EC6798' '#BE78D1' '#75A4CD' '#00C7DF' '#00B19F' '#61C766' \ +# '#B9C244' '#EBD369' '#EDB83F' '#E57C46' '#AC8476' '#6C77BB' '#6D8895') +#AC="${COLORS[$(( $RANDOM % 14 ))]}" +#SE="${COLORS[$(( $RANDOM % 14 ))]}" +#sed -i -e "s/ac: .*/ac: ${AC}FF;/g" $FILE +#sed -i -e "s/se: .*/se: ${SE}FF;/g" $FILE + +rofi -no-config -no-lazy-grab -show drun -modi drun -theme ~/.config/polybar/scripts/rofi/launcher.rasi diff --git a/.config/polybar/scripts/pavolume.sh b/.config/polybar/scripts/pavolume.sh @@ -0,0 +1,194 @@ +#!/usr/bin/env bash + +# finds the active sink for pulse audio and increments the volume. useful when you have multiple audio outputs and have a key bound to vol-up and down + +osd='no' +inc='2' +capvol='no' +maxvol='200' +autosync='yes' + +# Muted status +# yes: muted +# no : not muted +curStatus="no" +active_sink="" +limit=$((100 - inc)) +maxlimit=$((maxvol - inc)) + +reloadSink() { + active_sink=$(pacmd list-sinks | awk '/* index:/{print $3}') +} + +function volUp { + + getCurVol + + if [ "$capvol" = 'yes' ] + then + if [ "$curVol" -le 100 ] && [ "$curVol" -ge "$limit" ] + then + pactl set-sink-volume "$active_sink" -- 100% + elif [ "$curVol" -lt "$limit" ] + then + pactl set-sink-volume "$active_sink" -- "+$inc%" + fi + elif [ "$curVol" -le "$maxvol" ] && [ "$curVol" -ge "$maxlimit" ] + then + pactl set-sink-volume "$active_sink" "$maxvol%" + elif [ "$curVol" -lt "$maxlimit" ] + then + pactl set-sink-volume "$active_sink" "+$inc%" + fi + + getCurVol + + if [ ${osd} = 'yes' ] + then + qdbus org.kde.kded /modules/kosd showVolume "$curVol" 0 + fi + + if [ ${autosync} = 'yes' ] + then + volSync + fi +} + +function volDown { + + pactl set-sink-volume "$active_sink" "-$inc%" + getCurVol + + if [ ${osd} = 'yes' ] + then + qdbus org.kde.kded /modules/kosd showVolume "$curVol" 0 + fi + + if [ ${autosync} = 'yes' ] + then + volSync + fi + +} + +function getSinkInputs { + input_array=$(pacmd list-sink-inputs | grep -B 4 "sink: $1 " | awk '/index:/{print $2}') +} + +function volSync { + getSinkInputs "$active_sink" + getCurVol + + for each in $input_array + do + pactl set-sink-input-volume "$each" "$curVol%" + done +} + +function getCurVol { + curVol=$(pacmd list-sinks | grep -A 15 "index: $active_sink$" | grep 'volume:' | grep -E -v 'base volume:' | awk -F : '{print $3}' | grep -o -P '.{0,3}%'| sed s/.$// | tr -d ' ') +} + +function volMute { + case "$1" in + mute) + pactl set-sink-mute "$active_sink" 1 + curVol=0 + status=1 + ;; + unmute) + pactl set-sink-mute "$active_sink" 0 + getCurVol + status=0 + ;; + esac + + if [ ${osd} = 'yes' ] + then + qdbus org.kde.kded /modules/kosd showVolume ${curVol} ${status} + fi + +} + +function volMuteStatus { + curStatus=$(pacmd list-sinks | grep -A 15 "index: $active_sink$" | awk '/muted/{ print $2}') +} + +# Prints output for bar +# Listens for events for fast update speed +function listen { + firstrun=0 + + pactl subscribe 2>/dev/null | { + while true; do + { + # If this is the first time just continue + # and print the current state + # Otherwise wait for events + # This is to prevent the module being empty until + # an event occurs + if [ $firstrun -eq 0 ] + then + firstrun=1 + else + read -r event || break + if ! echo "$event" | grep -e "on card" -e "on sink" + then + # Avoid double events + continue + fi + fi + } &>/dev/null + output + done + } +} + +function output() { + reloadSink + getCurVol + volMuteStatus + if [ "${curStatus}" = 'yes' ] + then + echo "๏ฆ $curVol%" + else + echo "๏จ $curVol%" + fi +} #}}} + +reloadSink +case "$1" in + --up) + volUp + ;; + --down) + volDown + ;; + --togmute) + volMuteStatus + if [ "$curStatus" = 'yes' ] + then + volMute unmute + else + volMute mute + fi + ;; + --mute) + volMute mute + ;; + --unmute) + volMute unmute + ;; + --sync) + volSync + ;; + --listen) + # Listen for changes and immediately create new output for the bar + # This is faster than having the script on an interval + listen + ;; + *) + # By default print output for bar + output + ;; +esac diff --git a/.config/polybar/scripts/polywins.sh b/.config/polybar/scripts/polywins.sh @@ -0,0 +1,241 @@ +#!/bin/sh +# POLYWINS + +# SETTINGS {{{ --- + +active_text_color="#FFFFFF" +active_bg= +active_underline="#00FFFF" + +inactive_text_color="${foreground}" +inactive_bg= +inactive_underline= + +separator="ยท" +show="window_class" # options: window_title, window_class, window_classname +forbidden_classes="Polybar Conky Gmrun Xfdesktop Xfce4-panel" +empty_desktop_message="Desktop" + +char_limit=20 +max_windows=15 +char_case="normal" # normal, upper, lower +add_spaces="true" +resize_increment=16 +wm_border_width=1 # setting this might be required for accurate resize position + +# --- }}} + +main() { + # If no argument passed... + if [ -z "$2" ]; then + # ...print new window list every time + # the active window changes or + # a window is opened or closed + xprop -root -spy _NET_CLIENT_LIST _NET_ACTIVE_WINDOW | + while IFS= read -r _; do + generate_window_list + done + + # If arguments are passed, run requested on-click function + else + "$@" + fi +} + +# ON-CLICK FUNCTIONS {{{ --- + +raise_or_minimize() { + if [ "$(get_active_wid)" = "$1" ]; then + if [[ "$DESKTOP_SESSION" == "i3" ]]; then + i3-msg '[instance="^"$1"]' move scratchpad + else + wmctrl -ir "$1" -b toggle,hidden + fi + else + wmctrl -ia "$1" + fi +} + +close() { + wmctrl -ic "$1" +} + +slop_resize() { + wmctrl -ia "$1" + wmctrl -ir "$1" -e "$(slop -f 0,%x,%y,%w,%h)" +} + +increment_size() { + while IFS="[ .]" read -r wid ws wx wy ww wh _; do + test "$wid" != "$1" && continue + x=$(( wx - wm_border_width * 2 - resize_increment / 2 )) + y=$(( wy - wm_border_width * 2 - resize_increment / 2 )) + w=$(( ww + resize_increment )) + h=$(( wh + resize_increment )) + done <<-EOF + $(wmctrl -lG) + EOF + + wmctrl -ir "$1" -e "0,$x,$y,$w,$h" +} + +decrement_size() { + while IFS="[ .]" read -r wid ws wx wy ww wh _; do + test "$wid" != "$1" && continue + x=$(( wx - wm_border_width * 2 + resize_increment / 2 )) + y=$(( wy - wm_border_width * 2 + resize_increment / 2 )) + w=$(( ww - resize_increment )) + h=$(( wh - resize_increment )) + done <<-EOF + $(wmctrl -lG) + EOF + + wmctrl -ir "$1" -e "0,$x,$y,$w,$h" +} + +# --- }}} + +# WINDOW LIST SETUP {{{ --- + +active_left="%{F$active_text_color}" +active_right="%{F-}" +inactive_left="%{F$inactive_text_color}" +inactive_right="%{F-}" +separator="%{F$inactive_text_color}$separator%{F-}" + +if [ -n "$active_underline" ]; then + active_left="${active_left}%{+u}%{u$active_underline}" + active_right="%{-u}${active_right}" +fi + +if [ -n "$active_bg" ]; then + active_left="${active_left}%{B$active_bg}" + active_right="%{B-}${active_right}" +fi + +if [ -n "$inactive_underline" ]; then + inactive_left="${inactive_left}%{+u}%{u$inactive_underline}" + inactive_right="%{-u}${inactive_right}" +fi + +if [ -n "$inactive_bg" ]; then + inactive_left="${inactive_left}%{B$inactive_bg}" + inactive_right="%{B-}${inactive_right}" +fi + +get_active_wid() { + active_wid=$(xprop -root _NET_ACTIVE_WINDOW) + active_wid="${active_wid#*\# }" + active_wid="${active_wid%,*}" # Necessary for XFCE + while [ ${#active_wid} -lt 10 ]; do + active_wid="0x0${active_wid#*x}" + done + echo "$active_wid" +} + +get_active_workspace() { + wmctrl -d | + while IFS="[ .]" read -r number active_status _; do + test "$active_status" = "*" && echo "$number" && break + done +} + +generate_window_list() { + active_workspace=$(get_active_workspace) + active_wid=$(get_active_wid) + window_count=0 + on_click="$0" + + # Format each window name one by one + # Space and . are both used as IFS, + # because classname and class are separated by '.' + while IFS="[ .\.]" read -r wid ws cname cls host title; do + # Don't show the window if on another workspace (-1 = sticky) + if [ "$ws" != "$active_workspace" ] && [ "$ws" != "-1" ]; then + continue + fi + + # Don't show the window if its class is forbidden + case "$forbidden_classes" in + *$cls*) continue ;; + esac + + # If max number of windows reached, just increment + # the windows counter + if [ "$window_count" -ge "$max_windows" ]; then + window_count=$(( window_count + 1 )) + continue + fi + + # Show the user-selected window property + case "$show" in + "window_class") w_name="$cls" ;; + "window_classname") w_name="$cname" ;; + "window_title") w_name="$title" ;; + esac + + # Use user-selected character case + case "$char_case" in + "lower") w_name=$( + echo "$w_name" | tr '[:upper:]' '[:lower:]' + ) ;; + "upper") w_name=$( + echo "$w_name" | tr '[:lower:]' '[:upper:]' + ) ;; + esac + + # Truncate displayed name to user-selected limit + if [ "${#w_name}" -gt "$char_limit" ]; then + w_name="$(echo "$w_name" | cut -c1-$((char_limit-1)))โฆ" + fi + + # Apply add-spaces setting + if [ "$add_spaces" = "true" ]; then + w_name=" $w_name " + fi + + # Add left and right formatting to displayed name + if [ "$wid" = "$active_wid" ]; then + w_name="${active_left}${w_name}${active_right}" + else + w_name="${inactive_left}${w_name}${inactive_right}" + fi + + # Add separator unless the window is first in list + if [ "$window_count" != 0 ]; then + printf "%s" "$separator" + fi + + # Add on-click action Polybar formatting + printf "%s" "%{A1:$on_click raise_or_minimize $wid:}" + printf "%s" "%{A2:$on_click close $wid:}" + printf "%s" "%{A3:$on_click slop_resize $wid:}" + printf "%s" "%{A4:$on_click increment_size $wid:}" + printf "%s" "%{A5:$on_click decrement_size $wid:}" + # Print the final window name + printf "%s" "$w_name" + printf "%s" "%{A}%{A}%{A}%{A}%{A}" + + window_count=$(( window_count + 1 )) + done <<-EOF + $(wmctrl -lx) + EOF + + # After printing all the windows, + # print number of hidden windows + if [ "$window_count" -gt "$max_windows" ]; then + printf "%s" "+$(( window_count - max_windows ))" + fi + + # Print empty desktop message if no windows are open + if [ "$window_count" = 0 ]; then + printf "%s" "$empty_desktop_message" + fi + + # Print newline + echo "" +} + +# --- }}} + +main "$@" diff --git a/.config/polybar/scripts/powermenu.sh b/.config/polybar/scripts/powermenu.sh @@ -0,0 +1,94 @@ +#!/usr/bin/env bash + +## Author : Aditya Shakya +## Mail : adi1090x@gmail.com +## Github : @adi1090x +## Twitter : @adi1090x + +dir="~/.config/polybar/scripts/rofi" +uptime=$(uptime -p | sed -e 's/up //g') + +rofi_command="rofi -theme $dir/powermenu.rasi" + +# Options +shutdown="๎ง Shutdown" +reboot="๎ง Restart" +lock="๎ฆ Lock" +suspend="๎ฆฃ Sleep" +logout="๎ฆ Logout" + +# Confirmation +confirm_exit() { + rofi -dmenu\ + -i\ + -no-fixed-num-lines\ + -p "Are You Sure? : "\ + -theme $dir/confirm.rasi +} + +# Message +msg() { + rofi -theme "$dir/message.rasi" -e "Available Options - yes / y / no / n" +} + +# Variable passed to rofi +options="$lock\n$suspend\n$logout\n$reboot\n$shutdown" + +chosen="$(echo -e "$options" | $rofi_command -p "Uptime: $uptime" -dmenu -selected-row 0)" +case $chosen in + $shutdown) + ans=$(confirm_exit &) + if [[ $ans == "yes" || $ans == "YES" || $ans == "y" || $ans == "Y" ]]; then + systemctl poweroff + elif [[ $ans == "no" || $ans == "NO" || $ans == "n" || $ans == "N" ]]; then + exit 0 + else + msg + fi + ;; + $reboot) + ans=$(confirm_exit &) + if [[ $ans == "yes" || $ans == "YES" || $ans == "y" || $ans == "Y" ]]; then + systemctl reboot + elif [[ $ans == "no" || $ans == "NO" || $ans == "n" || $ans == "N" ]]; then + exit 0 + else + msg + fi + ;; + $lock) + if [[ -f /usr/bin/i3lock ]]; then + i3lock + elif [[ -f /usr/bin/betterlockscreen ]]; then + betterlockscreen -l + fi + ;; + $suspend) + ans=$(confirm_exit &) + if [[ $ans == "yes" || $ans == "YES" || $ans == "y" || $ans == "Y" ]]; then + mpc -q pause + amixer set Master mute + systemctl suspend + elif [[ $ans == "no" || $ans == "NO" || $ans == "n" || $ans == "N" ]]; then + exit 0 + else + msg + fi + ;; + $logout) + ans=$(confirm_exit &) + if [[ $ans == "yes" || $ans == "YES" || $ans == "y" || $ans == "Y" ]]; then + if [[ "$DESKTOP_SESSION" == "Openbox" ]]; then + openbox --exit + elif [[ "$DESKTOP_SESSION" == "bspwm" ]]; then + bspc quit + elif [[ "$DESKTOP_SESSION" == "i3" ]]; then + i3-msg exit + fi + elif [[ $ans == "no" || $ans == "NO" || $ans == "n" || $ans == "N" ]]; then + exit 0 + else + msg + fi + ;; +esac diff --git a/.config/polybar/scripts/rofi/colors.rasi b/.config/polybar/scripts/rofi/colors.rasi @@ -0,0 +1,10 @@ +/* colors */ + +* { + al: #00000000; + bg: #141C21FF; + bga: #1E262BFF; + fg: #93A1A1FF; + ac: #D12F2CFF; + se: #33C5BAFF; +} diff --git a/.config/polybar/scripts/rofi/confirm.rasi b/.config/polybar/scripts/rofi/confirm.rasi @@ -0,0 +1,24 @@ +/* Confirm Dialog */ + +@import "colors.rasi" + +* { + background-color: @bg; + text-color: @fg; + font: "Iosevka Nerd Font 10"; +} + +window { + width: 210px; + padding: 25px; + border: 0px 0px 1px 0px; + border-radius: 0px; + border-color: @se; + location: center; + y-offset: -2em; +} + +entry { + expand: true; + text-color: @ac; +} diff --git a/.config/polybar/scripts/rofi/launcher.rasi b/.config/polybar/scripts/rofi/launcher.rasi @@ -0,0 +1,119 @@ +/* + * + * Author : Aditya Shakya + * Mail : adi1090x@gmail.com + * Github : @adi1090x + * Twitter : @adi1090x + * + */ + +configuration { + font: "Iosevka Nerd Font 10"; + show-icons: true; + icon-theme: "Papirus"; + display-drun: "๎ง"; + drun-display-format: "{name}"; + disable-history: false; + fullscreen: false; + hide-scrollbar: true; + sidebar-mode: false; +} + +@import "colors.rasi" + +window { + transparency: "real"; + background-color: @bg; + text-color: @fg; + border: 0px 0px 0px 0px; + border-color: @ac; + border-radius: 0px; + width: 500px; + location: center; + x-offset: 0; + y-offset: 0; +} + +prompt { + enabled: true; + padding: 0px; + background-color: @bga; + text-color: @ac; + font: "feather 12"; +} + +entry { + background-color: @al; + text-color: @fg; + placeholder-color: @fg; + expand: true; + horizontal-align: 0; + placeholder: "Search..."; + padding: 0px 0px 0px 5px; + blink: true; +} + +inputbar { + children: [ prompt, entry ]; + background-color: @bga; + text-color: @fg; + expand: false; + border: 0px 0px 1px 0px; + border-radius: 0px; + border-color: @se; + margin: 0px; + padding: 10px; +} + +listview { + background-color: @al; + padding: 0px; + columns: 1; + lines: 6; + spacing: 5px; + cycle: true; + dynamic: true; + layout: vertical; +} + +mainbox { + background-color: @al; + border: 0px; + border-radius: 0px; + border-color: @ac; + children: [ inputbar, listview ]; + spacing: 5px; + padding: 5px; +} + +element { + background-color: @al; + background: @bg; + text-color: @fg; + orientation: horizontal; + border-radius: 0px; + padding: 8px; +} + +element-icon { + background-color: inherit; + size: 24px; + border: 0px; +} + +element-text { + background-color: inherit; + text-color: inherit; + expand: true; + horizontal-align: 0; + vertical-align: 0.5; + margin: 0px 2.5px 0px 2.5px; +} + +element selected { + background-color: @se; + text-color: @bg; + border: 0px 0px 0px 0px; + border-radius: 0px; + border-color: @ac; +} diff --git a/.config/polybar/scripts/rofi/message.rasi b/.config/polybar/scripts/rofi/message.rasi @@ -0,0 +1,24 @@ +/* Confirm Dialog */ + +@import "colors.rasi" + +* { + background-color: @bg; + text-color: @fg; + font: "Iosevka Nerd Font 10"; +} + +window { + width: 320px; + padding: 25px; + border: 0px 0px 1px 0px; + border-radius: 0px; + border-color: @se; + location: center; + y-offset: -2em; +} + +entry { + expand: true; + text-color: @ac; +} diff --git a/.config/polybar/scripts/rofi/networkmenu.rasi b/.config/polybar/scripts/rofi/networkmenu.rasi @@ -0,0 +1,123 @@ +/* + * + * Author : Aditya Shakya + * Mail : adi1090x@gmail.com + * Github : @adi1090x + * Twitter : @adi1090x + * + */ + +configuration { + font: "Iosevka Nerd Font 10"; + show-icons: true; + icon-theme: "Papirus"; + display-drun: "๎ง"; + drun-display-format: "{name}"; + disable-history: false; + fullscreen: false; + hide-scrollbar: true; + sidebar-mode: false; +} + +@import "colors.rasi" + +window { + transparency: "real"; + background-color: @bg; + text-color: @fg; + border: 0px 0px 0px 0px; + border-color: @ac; + border-radius: 0px; + width: 400px; + location: center; + x-offset: 0; + y-offset: 0; +} + +prompt { + enabled: true; + padding: 0px 0px 0px 10px; + background-color: @bga; + text-color: @fg; +} + +textbox-prompt-colon { + padding: 0px; + background-color: @bga; + text-color: @ac; + expand: false; + str: "๎จ"; + font: "feather 12"; +} + +entry { + background-color: @al; + text-color: @fg; + placeholder-color: @fg; + expand: true; + horizontal-align: 0; + placeholder: "Search..."; + padding: 0px 0px 0px 5px; + blink: true; +} + +inputbar { + children: [ textbox-prompt-colon, prompt ]; + background-color: @bga; + text-color: @fg; + expand: false; + border: 0px 0px 1px 0px; + border-radius: 0px; + border-color: @se; + margin: 0px; + padding: 10px; +} + +listview { + background-color: @al; + padding: 0px; + columns: 1; + lines: 8; + spacing: 5px; + cycle: true; + dynamic: true; + layout: vertical; +} + +mainbox { + background-color: @al; + border: 0px; + border-radius: 0px; + border-color: @ac; + children: [ inputbar, listview ]; + spacing: 5px; + padding: 5px; +} + +element { + background-color: @al; + text-color: @fg; + orientation: horizontal; + border-radius: 0px; + padding: 8px 8px 8px -15px; +} + +element-icon { + size: 24px; + border: 0px; +} + +element-text { + expand: true; + horizontal-align: 0; + vertical-align: 0.5; + margin: 0px 2.5px 0px 2.5px; +} + +element selected { + background-color: @se; + text-color: @bg; + border: 0px 0px 0px 0px; + border-radius: 0px; + border-color: @ac; +} diff --git a/.config/polybar/scripts/rofi/powermenu.rasi b/.config/polybar/scripts/rofi/powermenu.rasi @@ -0,0 +1,123 @@ +/* + * + * Author : Aditya Shakya + * Mail : adi1090x@gmail.com + * Github : @adi1090x + * Twitter : @adi1090x + * + */ + +configuration { + font: "Iosevka Nerd Font 10"; + show-icons: true; + icon-theme: "Papirus"; + display-drun: "๎ง"; + drun-display-format: "{name}"; + disable-history: false; + fullscreen: false; + hide-scrollbar: true; + sidebar-mode: false; +} + +@import "colors.rasi" + +window { + transparency: "real"; + background-color: @bg; + text-color: @fg; + border: 0px 0px 0px 0px; + border-color: @ac; + border-radius: 0px; + width: 350px; + location: center; + x-offset: 0; + y-offset: 0; +} + +prompt { + enabled: true; + padding: 0px 0px 0px 10px; + background-color: @bga; + text-color: @fg; +} + +textbox-prompt-colon { + padding: 0px; + background-color: @bga; + text-color: @ac; + expand: false; + str: "๎ง"; + font: "feather 12"; +} + +entry { + background-color: @al; + text-color: @fg; + placeholder-color: @fg; + expand: true; + horizontal-align: 0; + placeholder: "Search..."; + padding: 0px 0px 0px 5px; + blink: true; +} + +inputbar { + children: [ textbox-prompt-colon, prompt ]; + background-color: @bga; + text-color: @fg; + expand: false; + border: 0px 0px 1px 0px; + border-radius: 0px; + border-color: @se; + margin: 0px; + padding: 10px; +} + +listview { + background-color: @al; + padding: 0px; + columns: 1; + lines: 5; + spacing: 5px; + cycle: true; + dynamic: true; + layout: vertical; +} + +mainbox { + background-color: @al; + border: 0px; + border-radius: 0px; + border-color: @ac; + children: [ inputbar, listview ]; + spacing: 5px; + padding: 5px; +} + +element { + background-color: @al; + text-color: @fg; + orientation: horizontal; + border-radius: 0px; + padding: 8px 8px 8px -20px; +} + +element-icon { + size: 24px; + border: 0px; +} + +element-text { + expand: true; + horizontal-align: 0; + vertical-align: 0.5; + margin: 0px 2.5px 0px 2.5px; +} + +element selected { + background-color: @se; + text-color: @bg; + border: 0px 0px 0px 0px; + border-radius: 0px; + border-color: @ac; +} diff --git a/.config/polybar/scripts/rofi/styles.rasi b/.config/polybar/scripts/rofi/styles.rasi @@ -0,0 +1,126 @@ +/* + * + * Author : Aditya Shakya + * Mail : adi1090x@gmail.com + * Github : @adi1090x + * Twitter : @adi1090x + * + */ + +configuration { + font: "Iosevka Nerd Font 10"; + show-icons: true; + icon-theme: "Papirus"; + display-drun: "๎ง"; + drun-display-format: "{name}"; + disable-history: false; + fullscreen: false; + hide-scrollbar: true; + sidebar-mode: false; +} + +@import "colors.rasi" + +window { + transparency: "real"; + background-color: @bg; + text-color: @fg; + border: 0px 0px 0px 0px; + border-color: @ac; + border-radius: 0px; + width: 350px; + location: center; + x-offset: 0; + y-offset: 0; +} + +prompt { + enabled: true; + padding: 0px 0px 0px 5px; + background-color: @bga; + text-color: @fg; +} + +textbox-prompt-colon { + padding: 0px; + background-color: @bga; + text-color: @ac; + expand: false; + str: "๎ฅฃ"; + font: "feather 12"; +} + +entry { + background-color: @al; + text-color: @fg; + placeholder-color: @fg; + expand: true; + horizontal-align: 0; + placeholder: "Search..."; + padding: 0px 0px 0px 10px; + blink: true; +} + +inputbar { + children: [ textbox-prompt-colon, entry ]; + background-color: @bga; + text-color: @fg; + expand: false; + border: 0px 0px 1px 0px; + border-radius: 0px; + border-color: @se; + margin: 0px; + padding: 10px; +} + +listview { + background-color: @al; + padding: 0px; + columns: 1; + lines: 5; + spacing: 5px; + cycle: true; + dynamic: true; + layout: vertical; +} + +mainbox { + background-color: @al; + border: 0px; + border-radius: 0px; + border-color: @ac; + children: [ inputbar, listview ]; + spacing: 5px; + padding: 5px; +} + +element { + background-color: @al; + text-color: @fg; + orientation: horizontal; + border-radius: 0px; + padding: 8px 8px 8px -20px; +} + +element-icon { + background-color: inherit; + size: 24px; + border: 0px; +} + +element-text { + background-color: inherit; + text-color: inherit; + expand: true; + horizontal-align: 0; + vertical-align: 0.5; + margin: 0px 2.5px 0px 2.5px; +} + +element selected { + background-color: @se; + text-color: @bg; + border: 0px 0px 0px 0px; + border-radius: 0px; + border-color: @ac; +} diff --git a/.config/polybar/scripts/scroll_mpris_status.sh b/.config/polybar/scripts/scroll_mpris_status.sh @@ -0,0 +1,21 @@ +#!/bin/bash + +cmd="${0%/*}/get_mpris_status.sh $1" + +zscroll -l 50 \ + --scroll-padding "$(printf ' %.0s' {1..8})" \ + -d 0.5 \ + -M "$cmd icon" \ + -m "none" "-b ''" \ + -m "browser" "-b '๏ '" \ + -m "netflix" "-b '๏ฑ '" \ + -m "youtube" "-b '๏ ช '" \ + -m "prime" "-b '๏ฐ '" \ + -m "spotify" "-b '๏ผ '" \ + -m "vlc" "-b '๏ฉป '" \ + -m "mpv" "-b '๏ '" \ + -m "kdeconnect" "-b '๏ '" \ + -m "corridor" "-b '๏ข '" \ + -U 1 -u t "$cmd" & + +wait diff --git a/.config/polybar/scripts/style-switch.sh b/.config/polybar/scripts/style-switch.sh @@ -0,0 +1,15 @@ +#!/usr/bin/env bash + +SDIR="$HOME/.config/polybar/scripts" + +# Launch Rofi +MENU="$(rofi -no-config -no-lazy-grab -sep "|" -dmenu -i -p '' \ +-theme $SDIR/rofi/styles.rasi \ +<<< "๎ฅ Default|๎ฅ Nord|๎ฅ Gruvbox|๎ฅ Dark|๎ฅ Cherry|")" + case "$MENU" in + *Default) "$SDIR"/styles.sh --default ;; + *Nord) "$SDIR"/styles.sh --nord ;; + *Gruvbox) "$SDIR"/styles.sh --gruvbox ;; + *Dark) "$SDIR"/styles.sh --dark ;; + *Cherry) "$SDIR"/styles.sh --cherry ;; + esac diff --git a/.config/polybar/scripts/styles.sh b/.config/polybar/scripts/styles.sh @@ -0,0 +1,76 @@ +#!/usr/bin/env bash + +# Color files +PFILE="$HOME/.config/polybar/colors.ini" +RFILE="$HOME/.config/polybar/scripts/rofi/colors.rasi" + +# Change colors +change_color() { + # polybar + sed -i -e "s/background = #.*/background = $BG/g" $PFILE + sed -i -e "s/foreground = #.*/foreground = $FG/g" $PFILE + sed -i -e "s/sep = #.*/sep = $SEP/g" $PFILE + + # rofi + cat > $RFILE <<- EOF + /* colors */ + + * { + al: #00000000; + bg: ${BG}FF; + bga: ${BGA}FF; + fg: ${FG}FF; + ac: ${AC}FF; + se: ${SE}FF; + } + EOF + + polybar-msg cmd restart +} + +if [[ $1 = "--default" ]]; then + BG="#212B30" + FG="#C4C7C5" + BGA="#263035" + SEP="#3F5360" + AC="#EC407A" + SE="#4DD0E1" + change_color +elif [[ $1 = "--nord" ]]; then + BG="#3B4252" + FG="#E5E9F0" + BGA="#454C5C" + SEP="#5B6579" + AC="#BF616A" + SE="#88C0D0" + change_color +elif [[ $1 = "--gruvbox" ]]; then + BG="#282828" + FG="#EBDBB2" + BGA="#313131" + SEP="#505050" + AC="#FB4934" + SE="#8EC07C" + change_color +elif [[ $1 = "--dark" ]]; then + BG="#141C21" + FG="#93A1A1" + BGA="#1E262B" + SEP="#3C4449" + AC="#D12F2C" + SE="#33C5BA" + change_color +elif [[ $1 = "--cherry" ]]; then + BG="#1F1626" + FG="#FFFFFF" + BGA="#292030" + SEP="#473F4E" + AC="#D94084" + SE="#4F5D95" + change_color +else + cat <<- _EOF_ + No option specified, Available options: + --default --nord --gruvbox --dark --cherry + _EOF_ +fi diff --git a/.config/polybar/scripts/updates.sh b/.config/polybar/scripts/updates.sh @@ -0,0 +1,45 @@ +#!/usr/bin/env bash + +NOTIFY_ICON=/usr/share/icons/Papirus/32x32/apps/system-software-update.svg + +get_total_updates() { UPDATES=$(checkupdates 2>/dev/null | wc -l); } + +while true; do + get_total_updates + + # notify user of updates + if hash notify-send &>/dev/null; then + if (( UPDATES > 50 )); then + notify-send -u critical -i $NOTIFY_ICON \ + "You really need to update!!" "$UPDATES New packages" + elif (( UPDATES > 25 )); then + notify-send -u normal -i $NOTIFY_ICON \ + "You should update soon" "$UPDATES New packages" + elif (( UPDATES > 2 )); then + notify-send -u low -i $NOTIFY_ICON \ + "$UPDATES New packages" + fi + fi + + # when there are updates available + # every 10 seconds another check for updates is done + while (( UPDATES > 0 )); do + if (( UPDATES == 1 )); then + echo "$UPDATES" + elif (( UPDATES > 1 )); then + echo "$UPDATES" + else + echo "None" + fi + sleep 10 + get_total_updates + done + + # when no updates are available, use a longer loop, this saves on CPU + # and network uptime, only checking once every 30 min for new updates + while (( UPDATES == 0 )); do + echo "None" + sleep 1800 + get_total_updates + done +done diff --git a/.config/polybar/scripts/weather.py b/.config/polybar/scripts/weather.py @@ -0,0 +1,83 @@ +# 3-simple-weather Copyright (C) 2020 BrutalWizard (https://github.com/bru74lw1z4rd). +# This program comes with ABSOLUTELY NO WARRANTY; +# This is free software, and you are welcome to redistribute it +# under certain conditions; + +# More info about wether at - https://openweathermap.org/weather-conditions +# To show icons from this script you will need to buy "Font Awesome Pro" font - https://fontawesome.com/ +# Also you can change icon in arrays to yours icons + +# Configured for NerdFonts - GitHub raven2cz @raven2cz + +import requests +import json + +# Settings +city = "<CITY>" # Your town +api_key = "<API-KEY>" # Your openweather api key +units = "metric" # Unit system {imperial or metric} +temperature_unit = "C" # Units of measurement. That will be showed in UI. Does not affect on API. + +icons_list = { + "01d": "๏ ", # Clear sky day. + "01n": "๏", # Clear sky night. + "02d": "๎", # Few clouds day. + "02n": "๎ฆ", # Few clouds night. + "03d": "๏", # Scattered clouds day. + "03n": "๏", # Scattered clouds night. + "04d": "๎ถ", # Broken clouds day. + "04n": "๎ท", # Broken clouds night. + "09d": "๎", # Shower rain day. + "09n": "๎ฅ", # Shower rain night. + "10d": "๎", # Rain day. + "10n": "๎", # Rain night + "11d": "๏", # Thunderstorm day. + "11n": "๏", # Thunderstorm night + "13d": "๎", # Snow day. Snowflake alternative: ๏ + "13n": "๎ ", # Snow night. Snowflake alternative: ๏ + "50d": "๏พ", # Mist day. + "50n": "๏พ" # Mist night. +} + +atmophere_icons_list = { + 701: "๏พ", # Mist + 711: "๎", # Smoke + 721: "๎ฎ", # Haze + 731: "๎", # Dust (Sand / dust whirls) + 741: "๎", # Fog + 751: "๎บ", # Sand + 761: "๎", # Dust + 762: "๎", # Ash + 771: "๎จ", # Squalls + 781: "๎" # Tornado +} + +def main(): + try: + # Get data from openweather + url = ('http://api.openweathermap.org/data/2.5/weather?q={}&units={}&appid={}').format(city, units, api_key) + result = requests.get(url) + + # If result was received + if(result.status_code == requests.codes['ok']): + # Read json + weather = result.json() + + # Get info from array + id = int(weather['weather'][0]['id']) + group = weather['weather'][0]['main'].capitalize() + icon = weather['weather'][0]['icon'].capitalize() + temp = int(float(weather['main']['temp'])) + + # Load another icons for Atmosphere group + if(group == "Atmosphere"): + return atmophere_icons_list[id] + ' {}ยฐ{}'.format(temp, temperature_unit) + + return icons_list[icon] + '%{F${foreground}' + ' {}ยฐ{}'.format(temp, temperature_unit) + '%{F-}' + else: + return "๏ฑ" # Return reload icon + except: + return "๏ฑ" # Return reload icon + +if __name__ == "__main__": + print(main()) diff --git a/.config/polybar/user_modules.ini b/.config/polybar/user_modules.ini @@ -0,0 +1,406 @@ +;; โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ-----โ +;; โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ +;; โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ +;; โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ +;; โโCreatedโByโAdityaโShakyaโ@adi1090xโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ +;; โโModified By Raven @raven2czโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ +;; โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ-----โ + +;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ + +[module/launcher] +type = custom/text + +content = ๎ฅน +content-foreground = ${color.purple} + +; "click-(left|middle|right)" will be executed using "/usr/bin/env sh -c $COMMAND" +click-left = ~/.config/polybar/scripts/launcher.sh & +;;click-middle = ~/.config/polybar/scripts/launcher-full +click-right = ~/.config/polybar/scripts/style-switch.sh & + +; "scroll-(up|down)" will be executed using "/usr/bin/env sh -c $COMMAND" +;;scroll-up = ~/.config/polybar/scripts/launcher.sh & +;;scroll-down = ~/.config/polybar/scripts/color-switch.sh & + +;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ + +[module/sysmenu] +type = custom/text + +content = ๎ง +content-foreground = ${color.cyan} + +click-left = xfce4-session-logout & + +;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ + +[module/color-switch] +type = custom/text + +content = ๎ฅฝ +content-foreground = ${color.red} + +click-left = ~/.config/polybar/scripts/style-switch.sh & + +;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ + +[module/sep] +type = custom/text +content = | + +content-foreground = ${color.sep} + +;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ + +[module/apps] +type = custom/text + +[module/term] +inherit = module/apps +content = ๎งฉ +content-foreground = ${color.blue-gray} +click-left = alacritty & +click-middle = urxvt & +click-right = xfce4-terminal & + +[module/files] +inherit = module/apps +content = ๎ฅฌ +content-foreground = ${color.blue} +click-left = dolphin & +click-right = thunar & + +[module/browser] +inherit = module/apps +content = ๎คถ +content-foreground = ${color.orange} +click-left = firefox & +click-right = chromium & + +[module/settings] +inherit = module/apps +content = ๎ง +content-foreground = ${color.teal} +click-left = xfce4-settings-manager & +click-right = lxappearance & + +[module/screenshot] +inherit = module/apps +content = ๏ฐ +content-foreground = ${color.cyan} +click-left = spectacle & +click-right = xfce4-screenshooter & + +;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ + +[module/powermenu] +type = custom/menu + +; If true, <label-toggle> will be to the left of the menu items (default). +; If false, it will be on the right of all the items. +expand-right = true + +; "menu-LEVEL-N" has the same properties as "label-NAME" with +; the additional "exec" property +; +; Available exec commands: +; menu-open-LEVEL +; menu-close +; Other commands will be executed using "/usr/bin/env sh -c $COMMAND" +menu-0-0 = " Reboot |" +menu-0-0-exec = menu-open-1 +menu-0-1 = " Shutdown " +menu-0-1-exec = menu-open-2 + +menu-1-0 = " Back |" +menu-1-0-exec = menu-open-0 +menu-1-1 = " Reboot " +menu-1-1-exec = systemctl reboot + +menu-2-0 = " Shutdown |" +menu-2-0-exec = systemctl poweroff +menu-2-1 = " Back " +menu-2-1-exec = menu-open-0 + +; Available tags: +; <label-toggle> (default) - gets replaced with <label-(open|close)> +; <menu> (default) +; Note that if you use <label-toggle> you must also include +; the definition for <label-open> + +format = <label-toggle><menu> + +label-open = ๎ง +label-open-foreground = ${color.cyan} +label-open-padding = 1 +label-close = ๎จ +label-close-foreground = ${color.red} +label-close-padding = 1 + +; Optional item separator +; Default: none +;label-separator = " | " +;label-separator-foreground = ${color.foreground} +;label-separator-background = ${color.background-alt} + +;;label-open-foreground = ${color.foreground} +;;label-close-foreground = ${color.background} + +;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ + +[module/menu] +type = custom/menu + +; If true, <label-toggle> will be to the left of the menu items (default). +; If false, it will be on the right of all the items. +expand-right = true + +; "menu-LEVEL-N" has the same properties as "label-NAME" with +; the additional "exec" property +; +; Available exec commands: +; menu-open-LEVEL +; menu-close +; Other commands will be executed using "/usr/bin/env sh -c $COMMAND" +menu-0-0 =" ๎ฆ Menu | " +menu-0-0-exec = ~/.config/polybar/scripts/launcher.sh & + +menu-0-1 ="๎ฅฌ Files | " +menu-0-1-exec = thunar & + +menu-0-2 ="๎งฉ Terminal | " +menu-0-2-exec = termite & + +menu-0-3 ="๎คถ Browser " +menu-0-3-exec = firefox & + +; Available tags: +; <label-toggle> (default) - gets replaced with <label-(open|close)> +; <menu> (default) +; Note that if you use <label-toggle> you must also include +; the definition for <label-open> + +format = <label-toggle><menu> + +label-open = ๎ฅน +label-open-foreground = ${color.yellow} +label-open-padding = 1 +label-close = ๎จ +label-close-foreground = ${color.red} +label-close-padding = 1 + +; Optional item separator +; Default: none +;label-separator = " | " + +;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ + +[module/polywins] +type = custom/script +exec = ~/.config/polybar/scripts/polywins.sh 2>/dev/null +format = <label> +label = %output% +label-padding = 1 +tail = true + +;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ + +[module/uptime] +;https://github.com/jaagr/polybar/wiki/User-contributed-modules#uptime +type = custom/script +exec = uptime | awk -F, '{sub(".*up ",x,$1);print $1}' +interval = 100 +label = %output% + +format-prefix = "๏ " +format-prefix-foreground = ${color.blue-gray} +format-underline = + +;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ + +[module/kernel] +type = custom/script +exec = uname -r +tail = false +interval = 1024 + +format-foreground = ${color.foreground} +format-background = ${color.background} +format-prefix = "๎ " +format-prefix-foreground = ${color.blue} +format-underline = ${color.gray} + +;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ + +[module/networkspeedup] +;https://github.com/jaagr/polybar/wiki/Module:-network +type = internal/network +;interface = wlp3s0 +;interface = enp14s0 +;interface = enp0s31f6 +;interface = enp38s0 +interface = eth0 +label-connected = "%upspeed:7%" +format-connected = <label-connected> +format-connected-prefix = "๏ข +" +format-connected-prefix-foreground = ${color.cyan} + +;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ + +[module/networkspeeddown] +;https://github.com/jaagr/polybar/wiki/Module:-network +type = internal/network +;interface = wlp3s0 +;interface = enp14s0 +;interface = enp0s31f6 +;interface = enp38s0 +interface = eth0 +label-connected = "%downspeed:7%" +format-connected = <label-connected> +format-connected-prefix = "๏ฃ " +format-connected-prefix-foreground = ${color.cyan} + +;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ + +[module/updates] +type = custom/script + +; Available tokens: +; %counter% +; Command to be executed (using "/usr/bin/env sh -c [command]") +exec = ~/.config/polybar/scripts/updates.sh + +; Conditional command that, if defined, needs to exit successfully +; before the main exec command is invoked. +; Default: "" +;;exec-if = "" + +; Will the script output continous content? +; Default: false +tail = true + +; Seconds to sleep between updates +; Default: 2 (0 if `tail = true`) +interval = 5 + +; Available tags: +; <output> - deprecated +; <label> (default) +format = <label> +format-prefix = ๎ฆฌ +format-prefix-foreground = ${color.yellow} + +; Available tokens: +; %output% +; Default: %output% +label = " %output%" + +; Available tokens: +; %counter% +; %pid% +; +; "click-(left|middle|right)" will be executed using "/usr/bin/env sh -c [command]" +click-left = exo-open --launch TerminalEmulator & +click-right = exo-open --launch TerminalEmulator & +;;double-click-left = echo double left %counter% +;;double-click-middle = echo double middle %counter% +;;double-click-right = echo double right %counter% + +; Available tokens: +; %counter% +; %pid% +; +; "scroll-(up|down)" will be executed using "/usr/bin/env sh -c [command]" +;;scroll-up = echo scroll up %counter% +;;scroll-down = echo scroll down %counter% + +[module/pacman-updates] +type = custom/script +;exec = pacman -Qu | wc -l +exec = checkupdates | wc -l +interval = 1000 +label = Repo: %output% +format-foreground = ${color.foreground} +format-background = ${color.background} +format-prefix = "๏ญ " +format-prefix-foreground = ${color.yellow} +;format-underline = ${color.yellow} + +[module/aur-updates] +type = custom/script +exec = cower -u | wc -l +interval = 1000 +label = Aur: %output% +format-foreground = ${color.foreground} +format-background = ${color.background} +format-prefix = "๏ก " +format-prefix-foreground = ${color.yellow} +format-underline = ${color.yellow} + +[module/updates-common] +type = custom/script +exec = ~/.config/polybar/scripts/check-all-updates.sh +interval = 600 +label = Updates: %output% +format-foreground = ${color.foreground} +format-background = ${color.background} +format-prefix = "๏ฃ " +format-prefix-foreground = ${color.yellow} + +;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ + +[module/release] +type = custom/script +; exec = (lsb_release -d | awk {'print $2'} ;echo " "; lsb_release -r | awk {'print $2'}) | tr -d '\n' +interval = 6000 + +format-foreground = ${color.foreground} +format-background = ${color.background} +format-prefix = "๎ " +format-prefix-foreground = ${color.green} +format-underline = ${color.green} + +;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ + +[module/mpris-play-pause] +type = custom/ipc +hook-0 = echo "%{F${foreground}} ๏ %{F-}" +hook-1 = echo "%{F${foreground}} ๏ %{F-}" +initial = 2 +click-left = playerctl play-pause +scroll-up = playerctl previous +scroll-down = playerctl next + +[module/mpris] +type = custom/script +tail = true +format = <label> +exec = ~/.config/polybar/scripts/scroll_mpris_status.sh +click-left = playerctl play-pause +scroll-up = playerctl previous +scroll-down = playerctl next + +;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ + +[module/weather] +type = custom/script +exec = python3 ~/.config/polybar/scripts/weather.py +interval = 600 +format-foreground = ${color.yellow} +cursor-click = python3 ~/.config/polybar/scripts/weather.py + +;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ + +[module/xmenu] +type = custom/script +interval = 1200 +exec = echo "๏ก " +click-left = "sh ~/xmenu/xmenu.sh" +format-foreground = ${color.foreground} +format-background = ${color.background} + +[module/arch] +type = custom/script +exec = echo "๏ " +format-foreground = ${color.blue} diff --git a/.config/screenkey.json b/.config/screenkey.json @@ -0,0 +1,27 @@ +{ + "no_systray": false, + "timeout": 1.0, + "recent_thr": 0.1, + "compr_cnt": 2, + "ignore": [], + "position": "bottom", + "persist": false, + "window": false, + "font_desc": "Noto Sans Semi-Bold 10", + "font_size": "small", + "font_color": "white", + "bg_color": "black", + "opacity": 0.7, + "key_mode": "composed", + "bak_mode": "full", + "mods_mode": "normal", + "mods_only": false, + "multiline": false, + "vis_shift": false, + "vis_space": true, + "geometry": null, + "screen": 0, + "start_disabled": false, + "mouse": false, + "button_hide_duration": 1 +} +\ No newline at end of file diff --git a/.config/starship.toml b/.config/starship.toml @@ -0,0 +1,150 @@ +# __ __ _ _ +#| \/ | \ | | +#| \ / | \| | Michael Neuper +#| |\/| | . ` | https://michaelneuper.com +#| | | | |\ | https://github.com/michaelneuper +#|_| |_|_| \_| +# +## LEFT +format = """ + [[$directory$git_branch$git_state]($style)](yellow)$git_status + $character """ + +## RIGHT +right_format = """ +$cmd_duration $time""" + +[directory] +style = "bold white" +truncation_length = 0 +truncate_to_repo = true +repo_root_format = "[$before_root_path]($style)[$repo_root]($repo_root_style)[$path]($style)[$read_only]($read_only_style) " +truncation_symbol = "repo: " +read_only = "๐" +read_only_style = "red" + +[git_status] +style = "" +ahead = "[๎ช ${count}](green)" +# diverged = "โโก${ahead_count}โฃ${behind_count}" +behind = "[๎ช${count}](red)" +up_to_date = "" +deleted = "[๏ ](red)" +conflicted = "" +untracked = "[๏ด ](white)" +stashed = "" +modified = "[๏ ](yellow)" +staged = "" +renamed = "[๏ ](purple)" +format = ' ([$conflicted$deleted$renamed$modified$staged$untracked$ahead_behind]($style))' + +[git_branch] +format = "[\\[[[$symbol](bold grey)$branch$tag](green)\\]]($style)" +symbol = "โ " +style = "purple" + +[cmd_duration] +min_time = 1 +show_milliseconds = false +format = "[$duration]($style)" +disabled = false + +[character] # Tells whether last command was successful or not +success_symbol = " [โฏ](bold blue)" +error_symbol = " [โฏ](bold red)" +vicmd_symbol = "[ โฎ](bold purple)" + +[time] +style = "bold grey" +format = "๏ \\[$time\\]" +utc_time_offset = "local" +disabled = false + +# Somethere at the beginning +[battery] +full_symbol = "๏ธ " +charging_symbol = "๏ " +discharging_symbol = "๏ " +disabled = true + +[[battery.display]] # "bold red" style when capacity is between 0% and 10% +threshold = 15 +style = "bold red" +disabled = true + +[[battery.display]] # "bold yellow" style when capacity is between 10% and 30% +threshold = 50 +style = "bold yellow" +disabled = true + +[[battery.display]] # "bold green" style when capacity is between 10% and 30% +threshold = 80 +style = "bold green" +disabled = true + +# SYMBOLS +[status] +symbol = "x" +format = '[\[$symbol$status_common_meaning$status_signal_name$status_maybe_int\]]($style)' +map_symbol = true +disabled = false + +[aws] +symbol = "๎ฝ " + +[conda] +symbol = "๏ " + +[dart] +symbol = "๎ " + +[docker_context] +symbol = "๏ " + +[elixir] +symbol = "๎ต " + +[elm] +symbol = "๎ฌ " + +[golang] +symbol = "๎ง " + +[hg_branch] +symbol = "๏ " + +[java] +symbol = "๎ " + +[julia] +symbol = "๎ค " + +[nim] +symbol = "๏ค " + +[nix_shell] +symbol = "๏ " + +[nodejs] +symbol = "๎ " + +[package] +symbol = "๏ฃ " + +[perl] +symbol = "๎ฉ " + +[php] +symbol = "๎ " + +[python] +symbol = "๎ " + +[ruby] +symbol = "๎พ " + +[rust] +symbol = "๎จ " + +[swift] +symbol = "๏ฏฃ " diff --git a/.config/zathura/zathurarc b/.config/zathura/zathurarc @@ -0,0 +1,15 @@ +set sandbox none +set statusbar-h-padding 0 +set statusbar-v-padding 0 +set page-padding 1 +set selection-clipboard clipboard +map u scroll half-up +map d scroll half-down +map D toggle_page_mode +map r reload +map R rotate +map K zoom in +map J zoom out +map i recolor +map p print +map g goto top diff --git a/.zshrc b/.zshrc @@ -0,0 +1,197 @@ +# __ __ _ _ +#| \/ | \ | | +#| \ / | \| | Michael Neuper +#| |\/| | . ` | https://michaelneuper.com +#| | | | |\ | https://github.com/michaelneuper +#|_| |_|_| \_| +# +# If you come from bash you might have to change your $PATH. +# export PATH=$HOME/bin:/usr/local/bin:$PATH + +# Set $PATH if ~/.local/bin exist +if [ -d "$HOME/.local/bin" ]; then + export PATH=$HOME/.local/bin:$PATH +fi + +eval "$(starship init zsh)" +function set_win_title(){ + echo -ne "\033]0; $USER@$HOST:${PWD/$HOME/~} \007" +} +precmd_functions+=(set_win_title) + +## Plugins section: Enable fish style features +# Use syntax highlighting +# source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh + +# Use autosuggestion +# source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh + +# Use history substring search +# source /usr/share/zsh/plugins/zsh-history-substring-search/zsh-history-substring-search.zsh + +# Use fzf +source /usr/share/fzf/key-bindings.zsh +source /usr/share/fzf/completion.zsh + +# Arch Linux command-not-found support, you must have package pkgfile installed +# https://wiki.archlinux.org/index.php/Pkgfile#.22Command_not_found.22_hook +[[ -e /usr/share/doc/pkgfile/command-not-found.zsh ]] && source /usr/share/doc/pkgfile/command-not-found.zsh + + +## Options section +setopt correct # Auto correct mistakes +setopt extendedglob # Extended globbing. Allows using regular expressions with * +setopt nocaseglob # Case insensitive globbing +setopt rcexpandparam # Array expension with parameters +setopt nocheckjobs # Don't warn about running processes when exiting +setopt numericglobsort # Sort filenames numerically when it makes sense +setopt nobeep # No beep +setopt appendhistory # Immediately append history instead of overwriting +setopt histignorealldups # If a new command is a duplicate, remove the older one +setopt autocd # if only directory path is entered, cd there. +setopt auto_pushd +setopt pushd_ignore_dups +setopt pushdminus + +# Completion. +autoload -Uz compinit +compinit +zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' # Case insensitive tab completion +zstyle ':completion:*' rehash true # automatically find new executables in path +zstyle ':completion:*' list-colors "${(s.:.)LS_COLORS}" # Colored completion (different colors for dirs/files/etc) +zstyle ':completion:*' completer _expand _complete _ignored _approximate +zstyle ':completion:*' menu select +zstyle ':completion:*' select-prompt '%SScrolling active: current selection at %p%s' +zstyle ':completion:*:descriptions' format '%U%F{cyan}%d%f%u' + +# Speed up completions +zstyle ':completion:*' accept-exact '*(N)' +zstyle ':completion:*' use-cache on +zstyle ':completion:*' cache-path ~/.cache/zcache + +# automatically load bash completion functions +autoload -U +X bashcompinit && bashcompinit + +HISTFILE=~/.zhistory +HISTSIZE=50000 +SAVEHIST=10000 + + +## Keys +# Use emacs key bindings +bindkey -e + +# [PageUp] - Up a line of history +if [[ -n "${terminfo[kpp]}" ]]; then + bindkey -M emacs "${terminfo[kpp]}" up-line-or-history + bindkey -M viins "${terminfo[kpp]}" up-line-or-history + bindkey -M vicmd "${terminfo[kpp]}" up-line-or-history +fi +# [PageDown] - Down a line of history +if [[ -n "${terminfo[knp]}" ]]; then + bindkey -M emacs "${terminfo[knp]}" down-line-or-history + bindkey -M viins "${terminfo[knp]}" down-line-or-history + bindkey -M vicmd "${terminfo[knp]}" down-line-or-history +fi + +# Start typing + [Up-Arrow] - fuzzy find history forward +if [[ -n "${terminfo[kcuu1]}" ]]; then + autoload -U up-line-or-beginning-search + zle -N up-line-or-beginning-search + + bindkey -M emacs "${terminfo[kcuu1]}" up-line-or-beginning-search + bindkey -M viins "${terminfo[kcuu1]}" up-line-or-beginning-search + bindkey -M vicmd "${terminfo[kcuu1]}" up-line-or-beginning-search +fi +# Start typing + [Down-Arrow] - fuzzy find history backward +if [[ -n "${terminfo[kcud1]}" ]]; then + autoload -U down-line-or-beginning-search + zle -N down-line-or-beginning-search + + bindkey -M emacs "${terminfo[kcud1]}" down-line-or-beginning-search + bindkey -M viins "${terminfo[kcud1]}" down-line-or-beginning-search + bindkey -M vicmd "${terminfo[kcud1]}" down-line-or-beginning-search +fi + +# [Home] - Go to beginning of line +if [[ -n "${terminfo[khome]}" ]]; then + bindkey -M emacs "${terminfo[khome]}" beginning-of-line + bindkey -M viins "${terminfo[khome]}" beginning-of-line + bindkey -M vicmd "${terminfo[khome]}" beginning-of-line +fi +# [End] - Go to end of line +if [[ -n "${terminfo[kend]}" ]]; then + bindkey -M emacs "${terminfo[kend]}" end-of-line + bindkey -M viins "${terminfo[kend]}" end-of-line + bindkey -M vicmd "${terminfo[kend]}" end-of-line +fi + +# [Shift-Tab] - move through the completion menu backwards +if [[ -n "${terminfo[kcbt]}" ]]; then + bindkey -M emacs "${terminfo[kcbt]}" reverse-menu-complete + bindkey -M viins "${terminfo[kcbt]}" reverse-menu-complete + bindkey -M vicmd "${terminfo[kcbt]}" reverse-menu-complete +fi + +# [Backspace] - delete backward +bindkey -M emacs '^?' backward-delete-char +bindkey -M viins '^?' backward-delete-char +bindkey -M vicmd '^?' backward-delete-char +# [Delete] - delete forward +if [[ -n "${terminfo[kdch1]}" ]]; then + bindkey -M emacs "${terminfo[kdch1]}" delete-char + bindkey -M viins "${terminfo[kdch1]}" delete-char + bindkey -M vicmd "${terminfo[kdch1]}" delete-char +else + bindkey -M emacs "^[[3~" delete-char + bindkey -M viins "^[[3~" delete-char + bindkey -M vicmd "^[[3~" delete-char + + bindkey -M emacs "^[3;5~" delete-char + bindkey -M viins "^[3;5~" delete-char + bindkey -M vicmd "^[3;5~" delete-char +fi + + +# Common use +alias grubup="sudo update-grub" +alias fixpacman="sudo rm /var/lib/pacman/db.lck" +alias tarnow='tar -acf ' +alias untar='tar -zxvf ' +alias wget='wget -c ' +alias rmpkg="sudo pacman -Rdd" +alias psmem='ps auxf | sort -nr -k 4' +alias psmem10='ps auxf | sort -nr -k 4 | head -10' +alias ..='cd ..' +alias ...='cd ../..' +alias ....='cd ../../..' +alias .....='cd ../../../..' +alias ......='cd ../../../../..' +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' +alias hw='hwinfo --short' # Hardware Info +alias big="expac -H M '%m\t%n' | sort -h | nl" # Sort installed packages according to size in MB (expac must be installed) +alias gitpkg='pacman -Q | grep -i "\-git" | wc -l' # List amount of -git packages + +# Get fastest mirrors +alias mirror="sudo reflector -f 30 -l 30 --number 10 --verbose --save /etc/pacman.d/mirrorlist" +alias mirrord="sudo reflector --latest 50 --number 20 --sort delay --save /etc/pacman.d/mirrorlist" +alias mirrors="sudo reflector --latest 50 --number 20 --sort score --save /etc/pacman.d/mirrorlist" +alias mirrora="sudo reflector --latest 50 --number 20 --sort age --save /etc/pacman.d/mirrorlist" + +# Help normies +alias apt-get='man pacman' +alias apt='man pacman' +alias helpme='cht.sh --shell' +alias pacdiff='sudo -H DIFFPROG=meld pacdiff' # Compare .pacnew & .pacsave files +alias paru="paru --bottomup" +alias please='sudo' +alias tb='nc termbin.com 9999' +alias upd="/usr/bin/update" + +# Replace yay with paru if installed +[ ! -x /usr/bin/yay ] && [ -x /usr/bin/paru ] && alias yay='paru' +