diff --git a/bash/.bashrc b/.bashrc similarity index 100% rename from bash/.bashrc rename to .bashrc diff --git a/.config/alacritty/alacritty-themes/.eslintignore b/.config/alacritty/alacritty-themes/.eslintignore new file mode 100755 index 0000000..c24b718 --- /dev/null +++ b/.config/alacritty/alacritty-themes/.eslintignore @@ -0,0 +1 @@ +src/templates diff --git a/.config/alacritty/alacritty-themes/.eslintrc.js b/.config/alacritty/alacritty-themes/.eslintrc.js new file mode 100755 index 0000000..55c528e --- /dev/null +++ b/.config/alacritty/alacritty-themes/.eslintrc.js @@ -0,0 +1,25 @@ +'use strict'; + +module.exports = { + root: true, + parserOptions: { + ecmaVersion: 2017, + sourceType: 'module', + }, + plugins: ['prettier', 'node'], + extends: ['eslint:recommended', 'plugin:node/recommended', 'prettier'], + env: { + node: true, + }, + rules: { + 'prettier/prettier': 'error', + //'node/no-unsupported-features': ['error', { ignores: ['modules'] }], + 'node/no-unpublished-require': 0, + 'node/no-missing-require': 0, + }, + overrides: [ + { + files: ['test/**'], + }, + ], +}; diff --git a/.config/alacritty/alacritty-themes/.gitignore b/.config/alacritty/alacritty-themes/.gitignore new file mode 100755 index 0000000..dba8a59 --- /dev/null +++ b/.config/alacritty/alacritty-themes/.gitignore @@ -0,0 +1,2 @@ +node_modules +temp diff --git a/.config/alacritty/alacritty-themes/.husky/commit-msg b/.config/alacritty/alacritty-themes/.husky/commit-msg new file mode 100755 index 0000000..0bd658f --- /dev/null +++ b/.config/alacritty/alacritty-themes/.husky/commit-msg @@ -0,0 +1,4 @@ +#!/bin/sh +. "$(dirname "$0")/_/husky.sh" + +npx --no-install commitlint --edit "$1" diff --git a/.config/alacritty/alacritty-themes/.husky/pre-commit b/.config/alacritty/alacritty-themes/.husky/pre-commit new file mode 100755 index 0000000..01d4d99 --- /dev/null +++ b/.config/alacritty/alacritty-themes/.husky/pre-commit @@ -0,0 +1,5 @@ +#!/bin/sh +. "$(dirname "$0")/_/husky.sh" + +npm run lint +npm test diff --git a/.config/alacritty/alacritty-themes/.npmignore b/.config/alacritty/alacritty-themes/.npmignore new file mode 100755 index 0000000..b2fbed0 --- /dev/null +++ b/.config/alacritty/alacritty-themes/.npmignore @@ -0,0 +1,3 @@ +demo.gif +convert.js +temp diff --git a/.config/alacritty/alacritty-themes/.prettierrc.js b/.config/alacritty/alacritty-themes/.prettierrc.js new file mode 100755 index 0000000..997b7bd --- /dev/null +++ b/.config/alacritty/alacritty-themes/.prettierrc.js @@ -0,0 +1,6 @@ +'use strict'; + +module.exports = { + singleQuote: true, + trailingComma: 'es5', +}; diff --git a/.config/alacritty/alacritty-themes/CHANGELOG.md b/.config/alacritty/alacritty-themes/CHANGELOG.md new file mode 100755 index 0000000..436d64b --- /dev/null +++ b/.config/alacritty/alacritty-themes/CHANGELOG.md @@ -0,0 +1,72 @@ +## [4.4.2](https://github.com/rajasegar/alacritty-themes/compare/v4.4.1...v4.4.2) (2022-07-17) + +## [4.4.1](https://github.com/rajasegar/alacritty-themes/compare/v4.4.0...v4.4.1) (2022-06-24) + + +### Features + +* **cli:** Add createBackup method ([#157](https://github.com/rajasegar/alacritty-themes/issues/157)) ([ffe2abf](https://github.com/rajasegar/alacritty-themes/commit/ffe2abf804f7134c493f844dff52d2f0bad9be7a)), closes [#131](https://github.com/rajasegar/alacritty-themes/issues/131) + +# [4.4.0](https://github.com/rajasegar/alacritty-themes/compare/v4.3.0...v4.4.0) (2022-06-22) + + +### Features + +* **dependencies:** Update dependencies ([#156](https://github.com/rajasegar/alacritty-themes/issues/156)) ([939aa5b](https://github.com/rajasegar/alacritty-themes/commit/939aa5b602bd8538ba0867bec39ef89c6262e059)) + +# [4.3.0](https://github.com/rajasegar/alacritty-themes/compare/v4.2.0...v4.3.0) (2022-02-11) + + +### Features + +* **alacritty:** update readme ([#101](https://github.com/rajasegar/alacritty-themes/issues/101)) ([37d2bd6](https://github.com/rajasegar/alacritty-themes/commit/37d2bd6911d6328addbb51b98ef9cc269e8110d8)) + +# [4.2.0](https://github.com/rajasegar/alacritty-themes/compare/v4.1.6...v4.2.0) (2022-01-20) + + +### Features + +* **convert:** remove convert file ([#89](https://github.com/rajasegar/alacritty-themes/issues/89)) ([e15d125](https://github.com/rajasegar/alacritty-themes/commit/e15d12571de91f99ef66f132f0487c035d94f47d)) + +## [4.1.6](https://github.com/rajasegar/alacritty-themes/compare/v4.1.5...v4.1.6) (2021-11-27) + + +### Bug Fixes + +* check if alacrittyConfigPath is undefined before reading the file ([#74](https://github.com/rajasegar/alacritty-themes/issues/74)) ([afd82eb](https://github.com/rajasegar/alacritty-themes/commit/afd82ebbe516bf942a6f0cefb6438b207d6590fc)) + +## [4.1.5](https://github.com/rajasegar/alacritty-themes/compare/v4.1.4...v4.1.5) (2021-11-12) + + +### Bug Fixes + +* possible alacritty locations ([#68](https://github.com/rajasegar/alacritty-themes/issues/68)) ([9b1cb94](https://github.com/rajasegar/alacritty-themes/commit/9b1cb94de6ec6ad97c6508107b2ae886c812ec11)), closes [#67](https://github.com/rajasegar/alacritty-themes/issues/67) + +## [4.1.4](https://github.com/rajasegar/alacritty-themes/compare/v4.1.3...v4.1.4) (2021-11-09) + + +### Bug Fixes + +* add theme folder method ([#58](https://github.com/rajasegar/alacritty-themes/issues/58)) ([0c4b6fa](https://github.com/rajasegar/alacritty-themes/commit/0c4b6fa5978c12b1c8be6a84db195c70b2d22404)) + +## [4.1.3](https://github.com/rajasegar/alacritty-themes/compare/v4.1.2...v4.1.3) (2021-09-28) + + +### Bug Fixes + +* set project dir as rootDirectory ([#47](https://github.com/rajasegar/alacritty-themes/issues/47)) ([82782dc](https://github.com/rajasegar/alacritty-themes/commit/82782dcb0bdb3c404881562e6e1e25adc54f4e78)) + +## [4.1.2](https://github.com/rajasegar/alacritty-themes/compare/v4.1.1...v4.1.2) (2021-09-21) + + +### Bug Fixes + +* stop removing existing comments on the alacritty file ([#42](https://github.com/rajasegar/alacritty-themes/issues/42)) ([98a5d68](https://github.com/rajasegar/alacritty-themes/commit/98a5d68d4be76eb8a7e9ccd9277ada5a44ef71e6)), closes [#30](https://github.com/rajasegar/alacritty-themes/issues/30) + +## [4.1.1](https://github.com/rajasegar/alacritty-themes/compare/v4.1.0...v4.1.1) (2021-08-18) + + +### Bug Fixes + +* format error in action yml ([ce94628](https://github.com/rajasegar/alacritty-themes/commit/ce9462883f7f56fd3f49377b6c90a574f560baff)) +* github action to install deps first ([a1a7f00](https://github.com/rajasegar/alacritty-themes/commit/a1a7f0053e83827b5de511a5ba17537278970473)) diff --git a/.config/alacritty/alacritty-themes/LICENSE b/.config/alacritty/alacritty-themes/LICENSE new file mode 100755 index 0000000..0974c51 --- /dev/null +++ b/.config/alacritty/alacritty-themes/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2020 Rajasegar Chandran + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/.config/alacritty/alacritty-themes/README.md b/.config/alacritty/alacritty-themes/README.md new file mode 100755 index 0000000..f759624 --- /dev/null +++ b/.config/alacritty/alacritty-themes/README.md @@ -0,0 +1,106 @@ +# :rainbow: alacritty-themes :lollipop: + +![Build and Deploy](https://github.com/rajasegar/alacritty-themes/workflows/Build%20and%20Deploy/badge.svg) +[![npm version](http://img.shields.io/npm/v/alacritty-themes.svg?style=flat)](https://npmjs.org/package/alacritty-themes 'View this project on npm') +[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release) +[![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg)](https://conventionalcommits.org) + +Themes :candy: for [alacritty](https://github.com/alacritty/alacritty) A cross-platform, GPU-accelerated terminal emulator + +To find the list of themes, you can visit the alacritty [wiki page](https://github.com/alacritty/alacritty/wiki/Color-schemes) + +- Live preview the themes +- 200+ Themes to choose from +- Apply any theme with just one command at the terminal +- Option to create your `alacritty.yml` config file +- Simple, Easy and intuitive User experience + +## Install + +Install the `alacritty-themes` package globally with [npm](https://npmjs.com) + +``` +npm i -g alacritty-themes +``` + +If you are using `npx` you don't have to install the package: + +``` +npx alacritty-themes +``` + +If you are using Archlinux, you can install it from [AUR](https://aur.archlinux.org/packages/alacritty-themes/) + +``` +paru -S alacritty-themes +``` + +## Usage + +``` +alacritty-themes +``` + +To apply a theme directly, provide the theme name as an option + +``` +alacritty-themes Dracula +``` + +To find the themes, you can check the file names [here](/themes) + +![alacritty-themes demo gif](demo.gif) + +Choose the theme from the list of options by typing the theme name and press `Enter` to apply. +The list of options are cycled through automatically so you can go to the last theme +by just pressing `up arrow` key. +The search is fuzzy so you can enter any part of the theme name to search. + +If no `alacritty.yml` is found in your `$HOME` path, you can create one using the `--create` or `-c` option. + +``` +alacritty-themes --create +``` + +## Backups + +We have experienced some errors when stringifying. +Probably, those are happening when changing themes, +that's the reason we decided to create backups of the `alacritty.yml` before changing the theme. + +This action could produce a bunch of backup files, +while we get a better solution you can remove all the backups with a +single command: `rm ~/.config/alacritty/alacritty.yml.*` + +## Bonus Tip: Alias + +You can also create an alias for `alacritty-themes` like `at` +Just append this below line to your `~/.bashrc` or `~/.bash_profile` + +``` +alias at='alacritty-themes' +``` + +Now you can simply use `at` to choose themes for your alacritty terminal. + +``` +at +``` + +## Discussions + +If you have some questions about alacritty-themes, please use the [Discussions Tab](https://github.com/rajasegar/alacritty-themes/discussions) in the correct category that way our community can solve their questions faster. + +## Contributors + +**Alacritty-Themes** is built by this great community: + +| rajasegar | juanvqz | +| :---------------------------------------------------------------------------------------------: | :-----------------------------------------------------------------------------------------: | +| @rajasegar | @juanvqz | +| Chennai, IND | Oaxaca, MX | + +| | +| :------------------------------------------------------------------------------------------------------------------: | +| You Next? | +| Internet | diff --git a/.config/alacritty/alacritty-themes/alacritty.yml b/.config/alacritty/alacritty-themes/alacritty.yml new file mode 100755 index 0000000..2e69904 --- /dev/null +++ b/.config/alacritty/alacritty-themes/alacritty.yml @@ -0,0 +1,546 @@ +# 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: alacritty + LANG: "en_US.UTF-8" + LC_CTYPE: en_US.UTF-8 + +#window: + # Window background opacity + # + # Specified in floating number from `0.0` to `1.0`. + # The value `0.0` is completely transparent and `1.0` is opaque. + #opacity: 1.0 + + # 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: 0 + # y: 0 + + # 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: 10000 + + # Number of lines the viewport will move for every line scrolled when + # scrollback is enabled (history > 0). + #multiplier: 3 + +# Font configuration +font: + # Normal (roman) font face + normal: + # Font family + # + # Default: + # - (macOS) Menlo + # - (Linux/BSD) monospace + # - (Windows) Consolas + family: "monospace" + + # 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: monospace + + # 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: monospace + + # 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: monospace + + # The `style` can be specified to pick a specific face. + #style: Bold Italic + + # Point size + size: 11.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: 0 + + # 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 + +# If `true`, bold text is drawn using the bright color variants. +#draw_bold_text_with_bright_colors: false + +# Colors (Tomorrow Night Bright) +colors: + # Default colors + primary: + background: '#282c34' + foreground: '#eaeaea' + + # Bright and dim foreground colors + # + # The dimmed foreground color is calculated automatically if it is not present. + # If the bright foreground color is not set, or `draw_bold_text_with_bright_colors` + # is `false`, the normal foreground color will be used. + #dim_foreground: '#9a9a9a' + #bright_foreground: '#ffffff' + + # Cursor colors + # + # Colors which should be used to draw the terminal cursor. If these are unset, + # the cursor color will be the inverse of the cell color. + #cursor: + # text: '#000000' + # cursor: '#ffffff' + + # Selection colors + # + # Colors which should be used to draw the selection area. If selection + # background is unset, selection color will be the inverse of the cell colors. + # If only text is unset the cell text color will remain the same. + #selection: + # text: '#eaeaea' + # background: '#404040' + + # Normal colors + #normal: + # black: '#000000' + # red: '#d54e53' + # green: '#b9ca4a' + # yellow: '#e6c547' + # blue: '#7aa6da' + # magenta: '#c397d8' + # cyan: '#70c0ba' + # white: '#eaeaea' + + # Bright colors + #bright: + # black: '#666666' + # red: '#ff3334' + # green: '#9ec400' + # yellow: '#e7c547' + # blue: '#7aa6da' + # magenta: '#b77ee0' + # cyan: '#54ced6' + # white: '#ffffff' + + # Dim colors + # + # If the dim colors are not set, they will be calculated automatically based + # on the `normal` colors. + #dim: + # black: '#000000' + # red: '#8c3336' + # green: '#7a8530' + # yellow: '#97822e' + # blue: '#506d8f' + # magenta: '#80638e' + # cyan: '#497e7a' + # white: '#9a9a9a' + + # Indexed Colors + # + # The indexed colors include all colors from 16 to 256. + # When these are not set, they're filled with sensible defaults. + # + # Example: + # `- { index: 16, color: '#ff00ff' }` + # + #indexed_colors: [] + +# 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' + +#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: /usr/local/bin/tmux + #args: + #- -u # force UTF-8 in tmux + +# 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 + +#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. +# +# To trigger mouse bindings when an application running within Alacritty captures the mouse, the +# `Shift` modifier is automatically added as a requirement. +# +# 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. +# +# If the same trigger is assigned to multiple actions, all of them are executed +# at once. +#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: Add, mods: Control, action: IncreaseFontSize } + #- { key: Subtract, mods: Control, action: DecreaseFontSize } + #- { key: Minus, mods: Control, action: DecreaseFontSize } + + # (Windows only) + #- { key: Return, mods: Alt, action: ToggleFullscreen } + + # (macOS only) + #- { key: Key0, mods: Command, action: ResetFontSize } + #- { key: Equals, mods: Command, action: IncreaseFontSize } + #- { key: Add, mods: Command, action: IncreaseFontSize } + #- { key: Minus, mods: Command, action: DecreaseFontSize } + #- { key: K, mods: Command, action: ClearHistory } + #- { key: K, mods: Command, chars: "\x0c" } + #- { key: V, mods: Command, action: Paste } + #- { key: C, mods: Command, action: Copy } + #- { key: H, mods: Command, action: Hide } + #- { key: M, mods: Command, action: Minimize } + #- { key: Q, mods: Command, action: Quit } + #- { key: W, mods: Command, action: Quit } + #- { key: F, mods: Command|Control, action: ToggleFullscreen } + + #- { key: Paste, action: Paste } + #- { key: Copy, action: Copy } + #- { key: L, mods: Control, action: ClearLogNotice } + #- { key: L, mods: Control, chars: "\x0c" } + #- { key: PageUp, mods: Shift, action: ScrollPageUp, mode: ~Alt } + #- { key: PageDown, mods: Shift, action: ScrollPageDown, mode: ~Alt } + #- { key: Home, mods: Shift, action: ScrollToTop, mode: ~Alt } + #- { key: End, mods: Shift, action: ScrollToBottom, mode: ~Alt } + +#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 diff --git a/.config/alacritty/alacritty-themes/bin/cli.js b/.config/alacritty/alacritty-themes/bin/cli.js new file mode 100755 index 0000000..5ca57b3 --- /dev/null +++ b/.config/alacritty/alacritty-themes/bin/cli.js @@ -0,0 +1,107 @@ +#!/usr/bin/env node + +const fs = require('fs'); +const path = require('path'); +const prompts = require('prompts'); +const temp = require('temp').track(); + +const { createBackup, themesFolder } = require('../src/helpers'); + +const { + applyTheme, + createConfigFile, + getAlacrittyConfig, + getCurrentTheme, +} = require('../index'); + +let themes = fs.readdirSync(themesFolder()).map((f) => f.replace('.yml', '')); + +function main() { + createBackup(); + const argumentsExist = process.argv.length > 2; + const isAltThemesFolder = + process.argv.includes('--directory') || process.argv.includes('-d'); + + if (argumentsExist && !isAltThemesFolder) { + if (process.argv.includes('--help') || process.argv.includes('-h')) { + console.log( + 'Usage: \n\talacritty-themes [options] [theme-name] | [themes-directory]\n' + ); + console.log( + 'Description: \n\tThemes candy for alacritty A cross-platform GPU-accelerated terminal emulator\n' + ); + console.log('Options: \n\t--help, -h\tshows this help message and exit'); + console.log('\t--create, -C\tcreates a new config file'); + console.log('\t--current, -c\tshows applied theme name'); + console.log('\t--list, -l\tlists all available themes'); + console.log('\t--directory, -d\tspecify themes directory'); + } else if ( + process.argv.includes('--create') || + process.argv.includes('-C') + ) { + createConfigFile(); + } else if ( + process.argv.includes('--current') || + process.argv.includes('-c') + ) { + console.log(getCurrentTheme()); + } else if (process.argv.includes('--list') || process.argv.includes('-l')) { + themes.map((theme, index) => { + console.log(index, theme); + }); + } else { + // the 3rd arg is theme name + applyTheme(process.argv[2], themesFolder()); + } + } else { + let themesFolderPath = themesFolder(); + + // Alternative themes folder specified + if (isAltThemesFolder) { + themesFolderPath = path.resolve(process.argv[3]); + themes = fs + .readdirSync(themesFolderPath) + .map((f) => f.replace('.yml', '')); + } + + // Copy original config to new file + // + const tempDir = temp.mkdirSync('alacritty-themes'); + const backupPath = path.join(tempDir, 'alacritty.yml'); + + const ymlPath = getAlacrittyConfig(); + fs.copyFile(ymlPath, backupPath, (err) => { + if (err) throw err; + }); + + (async () => { + const response = await prompts({ + type: 'autocomplete', + name: 'theme', + message: 'Select a theme', + choices: themes.map((t) => { + return { + title: t, + value: t, + }; + }), + onState: (state) => { + state.value && applyTheme(state.value, themesFolderPath, true); // set preview true + }, + }); + + if (response.theme) { + applyTheme(response.theme, themesFolderPath); + } else { + // Restore original config + fs.readFile(backupPath, 'utf8', (err, data) => { + fs.writeFile(ymlPath, data, 'utf8', (err2) => { + if (err2) throw err2; + }); + }); + } + })(); + } +} + +main(); diff --git a/.config/alacritty/alacritty-themes/commitlint.config.js b/.config/alacritty/alacritty-themes/commitlint.config.js new file mode 100755 index 0000000..422b194 --- /dev/null +++ b/.config/alacritty/alacritty-themes/commitlint.config.js @@ -0,0 +1 @@ +module.exports = { extends: ['@commitlint/config-conventional'] }; diff --git a/.config/alacritty/alacritty-themes/contributing.md b/.config/alacritty/alacritty-themes/contributing.md new file mode 100755 index 0000000..233f5fc --- /dev/null +++ b/.config/alacritty/alacritty-themes/contributing.md @@ -0,0 +1,105 @@ +# Contributing to alacritty-themes + +First and foremost, thank you! We appreciate that you want to contribute to alacritty-themes, your time is valuable, and your contributions mean a lot to us. + + +## Important! + +By contributing to this project, you: + +* Agree that you have authored 100% of the content +* Agree that you have the necessary rights to the content +* Agree that you have received the necessary permissions from your employer to make the contributions (if applicable) +* Agree that the content you contribute may be provided under the Project license(s) +* Agree that, if you did not author 100% of the content, the appropriate licenses and copyrights have been added along with any other necessary attribution. + + +## Getting started + +**What does "contributing" mean?** + +Creating an issue is the simplest form of contributing to a project. But there are many ways to contribute, including the following: + +- Updating or correcting documentation +- Feature requests +- Bug reports + +If you'd like to learn more about contributing in general, the [Guide to Idiomatic Contributing](https://github.com/jonschlinkert/idiomatic-contributing) has a lot of useful information. + +**Showing support for alacritty-themes** + +Please keep in mind that open source software is built by people like you, who spend their free time creating things the rest the community can use. + +Don't have time to contribute? No worries, here are some other ways to show your support for alacritty-themes: + +- star the [project](https://github.com/rajasegar/alacritty-themes) +- tweet your support for alacritty-themes + + +## Issues + +Please only create issues for bug reports or feature requests. Issues discussing any other topics may be closed by the project's maintainers without further explanation. + +Do not create issues about bumping dependencies unless a bug has been identified and you can demonstrate that it effects this library. + +**Help us to help you** + +Remember that we’re here to help, but not to make guesses about what you need help with: + +- Whatever bug or issue you're experiencing, assume that it will not be as obvious to the maintainers as it is to you. +- Spell it out completely. Keep in mind that maintainers need to think about _all potential use cases_ of a library. It's important that you explain how you're using a library so that maintainers can make that connection and solve the issue. + +_It can't be understated how frustrating and draining it can be to maintainers to have to ask clarifying questions on the most basic things, before it's even possible to start debugging. Please try to make the best use of everyone's time involved, including yourself, by providing this information up front._ + +### Before creating an issue + +Please try to determine if the issue is caused by an underlying library, and if so, create the issue there. Sometimes this is difficult to know. We only ask that you attempt to give a reasonable attempt to find out. Oftentimes the readme will have advice about where to go to create issues. + +Try to follow these guidelines: + +- **Avoid creating issues for implementation help** - It's much better for discoverability, SEO, and semantics - to keep the issue tracker focused on bugs and feature requests - to ask implementation-related questions on [stackoverflow.com][so] +- **Investigate the issue** - Search for exising issues (open or closed) that address the issue, and might have even resolved it already. +- **Check the readme** - oftentimes you will find notes about creating issues, and where to go depending on the type of issue. +- Create the issue in the appropriate repository. + +### Creating an issue + +Please be as descriptive as possible when creating an issue. Give us the information we need to successfully answer your question or address your issue by answering the following in your issue: + +- **description**: (required) What is the bug you're experiencing? How are you using this library/app? +- **OS**: (required) what operating system are you on? +- **version**: (required) please note the version of alacritty-themes are you using +- **error messages**: (required) please paste any error messages into the issue, or a [gist](https://gist.github.com/) +- **extensions, plugins, helpers, etc** (if applicable): please list any extensions you're using + + +### Closing issues + +The original poster or the maintainers of alacritty-themes may close an issue at any time. Typically, but not exclusively, issues are closed when: + +- The issue is resolved +- The project's maintainers have determined the issue is out of scope +- An issue is clearly a duplicate of another issue, in which case the duplicate issue will be linked. +- A discussion has clearly run its course + + +## Next steps + +**Tips for creating idiomatic issues** + +Spending just a little extra time to review best practices and brush up on your contributing skills will, at minimum, make your issue easier to read, easier to resolve, and more likely to be found by others who have the same or similar issue in the future. At best, it will open up doors and potential career opportunities by helping you be at your best. + +The following resources were hand-picked to help you be the most effective contributor you can be: + +- The [Guide to Idiomatic Contributing](https://github.com/jonschlinkert/idiomatic-contributing) is a great place for newcomers to start, but there is also information for experienced contributors there. +- Take some time to learn basic markdown. We can't stress this enough. Don't start pasting code into GitHub issues before you've taken a moment to review this [markdown cheatsheet](https://gist.github.com/jonschlinkert/5854601) +- The GitHub guide to [basic markdown](https://help.github.com/articles/markdown-basics/) is another great markdown resource. +- Learn about [GitHub Flavored Markdown](https://help.github.com/articles/github-flavored-markdown/). And if you want to really go above and beyond, read [mastering markdown](https://guides.github.com/features/mastering-markdown/). + +At the very least, please try to: + +- Use backticks to wrap code. This ensures that it retains its formatting and isn't modified when it's rendered by GitHub, and makes the code more readable to others +- When applicable, use syntax highlighting by adding the correct language name after the first "code fence" + + +[so]: http://stackoverflow.com/questions/tagged/alacritty-themes diff --git a/.config/alacritty/alacritty-themes/demo.gif b/.config/alacritty/alacritty-themes/demo.gif new file mode 100755 index 0000000..b2194c0 Binary files /dev/null and b/.config/alacritty/alacritty-themes/demo.gif differ diff --git a/.config/alacritty/alacritty-themes/index.js b/.config/alacritty/alacritty-themes/index.js new file mode 100755 index 0000000..b67445d --- /dev/null +++ b/.config/alacritty/alacritty-themes/index.js @@ -0,0 +1,133 @@ +const YAML = require('yaml'); +const fs = require('fs'); +const fsPromises = fs.promises; +const { Pair } = require('yaml/types'); + +const { + NoAlacrittyFileFoundError, + alacrittyConfigPath, + alacrittyFileExists, + alacrittyTemplatePath, + pathToAlacrittyFile, + themeFilePath, +} = require('./src/helpers'); +const { exit } = require('process'); + +// pick the correct config file or handle errors, if it doesn't exist +function getAlacrittyConfig() { + if (!alacrittyFileExists()) { + throw NoAlacrittyFileFoundError; + } + + return alacrittyConfigPath(); +} + +function createConfigFile() { + const templatePath = alacrittyTemplatePath(); + const configTemplate = fs.readFileSync(templatePath, 'utf8'); + const directories = pathToAlacrittyFile(); + const configFile = `${directories}alacritty.yml`; + + // If .config/alacritty folder doesn't exists, create one + if (!fs.existsSync(directories)) { + fs.mkdirSync(directories); + } + + return fsPromises + .writeFile(configFile, configTemplate, 'utf8') + .then(() => { + console.log( + `The alacritty.yml config file was created here ${configFile}` + ); + }) + .catch((err) => { + if (err) throw err; + }); +} + +function getCurrentTheme() { + if (!alacrittyConfigPath()) { + console.log( + 'No Alacritty configuration file found\nRun: `alacritty-themes -C` to create one' + ); + exit(1); + } + const themeFile = fs.readFileSync(alacrittyConfigPath(), 'utf8'); + const themeDoc = YAML.parse(themeFile); + + return themeDoc.theme ? themeDoc.theme : 'default'; +} + +function updateThemeWithFile( + data, + themeName, + themePath, + ymlPath, + preview = false +) { + const themeFile = fs.readFileSync(themePath, 'utf8'); + const themeDoc = YAML.parseDocument(themeFile); + const themeColors = themeDoc.contents.items.find( + (i) => i.key.value === 'colors' + ); + + const alacrittyDoc = YAML.parseDocument(data); + if (alacrittyDoc.contents === null) { + alacrittyDoc.contents = { items: [] }; + } + const alacrittyColors = alacrittyDoc.contents.items.find( + (i) => i.key.value === 'colors' + ); + + if (alacrittyColors) { + alacrittyColors.value = themeColors.value; + } else { + alacrittyDoc.contents.items.push(new Pair('colors', themeColors.value)); + } + + const alacrittyTheme = alacrittyDoc.contents.items.find( + (i) => i.key.value === 'theme' + ); + + if (alacrittyTheme) { + alacrittyTheme.value = themeName; + } else { + alacrittyDoc.contents.items.push(new Pair('theme', themeName)); + } + + const newContent = String(alacrittyDoc); + + return fsPromises + .writeFile(ymlPath, newContent, 'utf8') + .then(() => { + if (!preview) { + console.log(`The theme "${themeName}" has been applied successfully!`); + } + }) + .catch((err) => { + if (err) throw err; + }); +} + +function updateTheme(data, theme, themesFolder, ymlPath, preview = false) { + const isSpecificFile = + fs.existsSync(theme) && !fs.lstatSync(theme).isDirectory(); + const themePath = isSpecificFile ? theme : themeFilePath(theme, themesFolder); + + return updateThemeWithFile(data, theme, themePath, ymlPath, preview); +} + +function applyTheme(theme, themesFolder, preview = false) { + const ymlPath = getAlacrittyConfig(); + + return fsPromises.readFile(ymlPath, 'utf8').then((data) => { + return updateTheme(data, theme, themesFolder, ymlPath, preview); + }); +} + +module.exports = { + applyTheme, + createConfigFile, + getAlacrittyConfig, + getCurrentTheme, +}; diff --git a/.config/alacritty/alacritty-themes/package.json b/.config/alacritty/alacritty-themes/package.json new file mode 100755 index 0000000..cc76ede --- /dev/null +++ b/.config/alacritty/alacritty-themes/package.json @@ -0,0 +1,98 @@ +{ + "name": "alacritty-themes", + "version": "4.4.2", + "description": "Themes for Alacritty : A cross-platform GPU-Accelerated Terminal emulator", + "main": "index.js", + "bin": { + "alacritty-themes": "./bin/cli.js" + }, + "scripts": { + "test": "mocha --recursive", + "deploy": "git push && git push --tags && npm publish", + "lint": "eslint .", + "semantic-release": "semantic-release" + }, + "keywords": [ + "alacritty", + "theme", + "themes", + "terminal emulators", + "terminal" + ], + "author": "Rajasegar Chandran ", + "license": "MIT", + "dependencies": { + "prompts": "2.4.2", + "temp": "0.9.4", + "yaml": "1.10.2" + }, + "preferGlobal": true, + "devDependencies": { + "@commitlint/cli": "17.0.3", + "@commitlint/config-conventional": "17.0.3", + "@semantic-release/changelog": "6.0.1", + "@semantic-release/git": "10.0.1", + "eslint": "8.20.0", + "eslint-config-prettier": "8.5.0", + "eslint-plugin-node": "11.1.0", + "eslint-plugin-prettier": "4.2.1", + "husky": "8.0.1", + "mocha": "10.0.0", + "mock-fs": "5.1.2", + "prettier": "2.7.1", + "semantic-release": "^19.0.2", + "sinon": "14.0.0" + }, + "engines": { + "node": ">=14.0.0" + }, + "release": { + "branches": [ + "master" + ], + "plugins": [ + [ + "@semantic-release/commit-analyzer", + { + "preset": "angular", + "releaseRules": [ + { + "type": "docs", + "scope": "README", + "release": "patch" + }, + { + "type": "refactor", + "scope": "core-*", + "release": "minor" + }, + { + "type": "refactor", + "release": "patch" + } + ], + "parserOpts": { + "noteKeywords": [ + "BREAKING CHANGE", + "BREAKING CHANGES" + ] + } + } + ], + "@semantic-release/release-notes-generator", + "@semantic-release/changelog", + "@semantic-release/npm", + [ + "@semantic-release/git", + { + "assets": [ + "package.json", + "CHANGELOG.md" + ], + "message": "release(version): Release ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}" + } + ], + "@semantic-release/github" + ] + } +} diff --git a/.config/alacritty/alacritty-themes/settings.js b/.config/alacritty/alacritty-themes/settings.js new file mode 100755 index 0000000..024e735 --- /dev/null +++ b/.config/alacritty/alacritty-themes/settings.js @@ -0,0 +1,3 @@ +module.exports = { + PROJECT_DIR: __dirname, +}; diff --git a/.config/alacritty/alacritty-themes/src/helpers/index.js b/.config/alacritty/alacritty-themes/src/helpers/index.js new file mode 100755 index 0000000..ccc274b --- /dev/null +++ b/.config/alacritty/alacritty-themes/src/helpers/index.js @@ -0,0 +1,134 @@ +const fs = require('fs'); +const fsPromises = fs.promises; +const path = require('path'); +const settings = require('../../settings'); + +const NoAlacrittyFileFoundError = new Error( + 'No Alacritty configuration file found.\nExpected one of the following files to exist:\n' + + possibleLocations().join('\n') + + '\nOr you can create a new one using `alacritty-themes --create`' +); + +function createBackup() { + if (!alacrittyFileExists()) { + return; + } + + const backupFile = `${pathToAlacrittyFile()}alacritty.yml.${Date.now()}.bak`; + + fsPromises + .copyFile(alacrittyFile(), backupFile) + .then(() => { + console.log(`Automatic backup file was created: ${backupFile}`); + }) + .catch((err) => { + if (err) throw err; + }); +} + +function rootDirectory() { + return settings.PROJECT_DIR; +} + +function themeFilePath(themeName, themesFolder) { + return path.join(themesFolder, `${themeName}.yml`); +} + +function themesFolder() { + return path.join(rootDirectory(), 'themes'); +} + +function isWindows() { + return process.env.OS === 'Windows_NT'; +} + +function windowsHome() { + return process.env.APPDATA; +} + +function linuxHome() { + return process.env.HOME; +} + +function archHome() { + return process.env.XDG_CONFIG_HOME; +} + +function alacrittyFile() { + return `${pathToAlacrittyFile()}alacritty.yml`; +} + +function pathToAlacrittyFile() { + return isWindows() + ? pathToAlacrittyFileOnWindows() + : pathToAlacrittyFileOnLinux(); +} + +function pathToAlacrittyFileOnWindows() { + return path.join(windowsHome(), 'alacritty/'); +} + +function pathToAlacrittyFileOnLinux() { + return path.join(linuxHome(), '.config/alacritty/'); +} + +function alacrittyTemplatePath() { + return path.join(rootDirectory(), 'alacritty.yml'); +} + +function alacrittyFileExists() { + return possibleLocations().some(function (location) { + return fs.existsSync(location); + }); +} + +function alacrittyConfigPath() { + return possibleLocations().find(function (location) { + if (!fs.existsSync(location)) return; + + return location; + }); +} + +function possibleLocations() { + let locations = []; + + if (linuxHome()) { + locations.push( + path.join(linuxHome(), '.config/alacritty/alacritty.yml'), + path.join(linuxHome(), '.alacritty.yml') + ); + } + + if (isWindows()) { + locations.push(path.join(windowsHome(), 'alacritty/alacritty.yml')); + } + + // locations where the alacritty config can be located according to + // https://github.com/alacritty/alacritty#configuration + if (archHome()) { + locations.push( + path.join(archHome(), 'alacritty/alacritty.yml'), + path.join(archHome(), 'alacritty.yml') + ); + } + + return locations; +} + +module.exports = { + NoAlacrittyFileFoundError, + alacrittyConfigPath, + alacrittyFileExists, + alacrittyTemplatePath, + archHome, + createBackup, + isWindows, + linuxHome, + pathToAlacrittyFile, + possibleLocations, + rootDirectory, + themeFilePath, + themesFolder, + windowsHome, +}; diff --git a/.config/alacritty/alacritty-themes/test/index.test.js b/.config/alacritty/alacritty-themes/test/index.test.js new file mode 100755 index 0000000..868d97d --- /dev/null +++ b/.config/alacritty/alacritty-themes/test/index.test.js @@ -0,0 +1,99 @@ +/* globals describe it afterEach */ +'use strict'; + +const assert = require('assert'); +const mockFs = require('mock-fs'); +const fs = require('fs'); +const YAML = require('yaml'); + +const { getAlacrittyConfig, createConfigFile, applyTheme } = require('../'); + +const { + NoAlacrittyFileFoundError, + alacrittyTemplatePath, + linuxHome, + themeFilePath, + themesFolder, +} = require('../src/helpers'); + +const homeDir = linuxHome(); + +afterEach(mockFs.restore); + +describe('Alacritty Themes', () => { + it('returns NoAlacrittyFileFoundError error', () => { + mockFs(); + assert.throws(() => getAlacrittyConfig(), NoAlacrittyFileFoundError); + }); + + it('creates an alacritty.yml config file', async () => { + const templatePath = alacrittyTemplatePath(); + const mockDir = { + 'alacritty.yml': mockFs.load(templatePath), + }; + mockDir[`${homeDir}/.config/`] = { alacritty: {} }; + mockFs(mockDir); + await createConfigFile(); + const ymlPath = getAlacrittyConfig(); + assert.strictEqual(ymlPath, `${homeDir}/.config/alacritty/alacritty.yml`); + }); + + it('sets the correct theme colors', async () => { + const templatePath = alacrittyTemplatePath(); + const draculaPath = themeFilePath('Dracula', themesFolder()); + const draculaTemplateContent = mockFs.bypass(() => + fs.readFileSync(draculaPath, 'utf8') + ); + const draculaParsedContent = YAML.parse(draculaTemplateContent); + + const mockDir = { + 'alacritty.yml': mockFs.load(templatePath), + themes: { + 'Dracula.yml': draculaTemplateContent, + }, + }; + + mockDir[`${homeDir}/.config`] = { alacritty: {} }; + mockFs(mockDir); + await createConfigFile(); + const ymlPath = getAlacrittyConfig(); + await applyTheme('Dracula', themesFolder()); + const newAlacrittyFile = fs.readFileSync(ymlPath, 'utf8'); + const alacrittyParsedContent = YAML.parse(newAlacrittyFile); + + assert.deepStrictEqual( + alacrittyParsedContent.colors, + draculaParsedContent.colors + ); + }); + + it('keeps comments', async () => { + const alacrittyPath = alacrittyTemplatePath(); + const alacrittyContent = mockFs.bypass(() => + fs.readFileSync(alacrittyPath, 'utf8') + ); + const draculaPath = themeFilePath('Dracula', themesFolder()); + const draculaContent = mockFs.bypass(() => + fs.readFileSync(draculaPath, 'utf8') + ); + + const mockDir = { + 'alacritty.yml': alacrittyContent, + themes: { + 'Dracula.yml': draculaContent, + }, + }; + mockDir[`${homeDir}/.config`] = { alacritty: {} }; + mockFs(mockDir); + await createConfigFile(); + const userAlacrittyPath = getAlacrittyConfig(); + await applyTheme('Dracula', themesFolder()); + const userAlacrittyFile = fs.readFileSync(userAlacrittyPath, 'utf8'); + const alacritty = YAML.parseDocument(userAlacrittyFile); + + assert.strictEqual( + alacritty.commentBefore, + ' Configuration for Alacritty, the GPU enhanced terminal emulator.' + ); + }); +}); diff --git a/.config/alacritty/alacritty-themes/test/src/helpers/index.test.js b/.config/alacritty/alacritty-themes/test/src/helpers/index.test.js new file mode 100755 index 0000000..92e61db --- /dev/null +++ b/.config/alacritty/alacritty-themes/test/src/helpers/index.test.js @@ -0,0 +1,133 @@ +/* globals describe it afterEach */ +const assert = require('assert'); +const fs = require('fs'); +const mockFs = require('mock-fs'); +const sinon = require('sinon'); + +const helper = require('../../../src/helpers'); +const settings = require('../../../settings'); + +afterEach(() => { + sinon.restore(); +}); + +describe('rootDirectory', () => { + it('returns the alacritty-themes root directory', () => { + let alacrittyThemeDirectory = '/home/rajasegar/projects/alacritty-themes'; + sinon.stub(helper, 'rootDirectory').returns(alacrittyThemeDirectory); + + assert.strictEqual(helper.rootDirectory(), alacrittyThemeDirectory); + }); +}); + +describe('themeFilePath', 'themesFolder', () => { + it('returns a theme file', () => { + let path = `${settings.PROJECT_DIR}/themes/TokyoNight_Storm.yml`; + let themePath = {}; + themePath[path] = '# TokyoNight Alacritty Colors'; + mockFs(themePath); + + assert.strictEqual( + path, + helper.themeFilePath('TokyoNight_Storm', helper.themesFolder()) + ); + }); + + it('does not return a theme file', () => { + let path = `${settings.PROJECT_DIR}/themes/TokyoNight_Storm.yml`; + let themePath = {}; + themePath[path] = '# TokyoNight Alacritty Colors'; + + mockFs({ + 'TokyoNight_Storm.yml': '# TokyoNight Alacritty Colors', + }); + + assert.strictEqual( + fs.existsSync(helper.themeFilePath('Dracula', helper.themesFolder())), + false + ); + }); +}); + +describe('isWindows', () => { + it('returns true', () => { + sinon.stub(helper, 'isWindows').returns(true); + + assert.strictEqual(helper.isWindows(), true); + }); + + it('returns false', () => { + sinon.stub(helper, 'isWindows').returns(false); + + assert.strictEqual(helper.isWindows(), false); + }); +}); + +describe('linuxHome', () => { + it('returns user linux root directory', () => { + let home = '/home/rajasegar'; + sinon.stub(helper, 'linuxHome').returns(home); + + assert.strictEqual(helper.linuxHome(), home); + }); +}); + +describe('archHome', () => { + it('returns user arch root directory', () => { + let home = '/users/rajasegar'; + sinon.stub(helper, 'archHome').returns(home); + + assert.strictEqual(helper.archHome(), home); + }); +}); + +describe('pathToAlacrittyFile', () => { + it('returns the path to alacritty file on linux', () => { + let home = '/home/rajasegar'; + sinon.stub(helper, 'isWindows').returns(false); + sinon + .stub(helper, 'pathToAlacrittyFile') + .returns(`${home}/.config/alacritty/`); + + assert.strictEqual( + helper.pathToAlacrittyFile(), + `${home}/.config/alacritty/` + ); + }); +}); + +describe('possibleLocations', () => { + it('returns an array', () => { + let locations = typeof helper.possibleLocations(); + + assert(locations, 'array'); + }); + + it('returns Linux possible locations', () => { + let home = '/home/rajasegar'; + sinon.stub(helper, 'linuxHome').returns(home); + + let locations = helper.possibleLocations(); + + assert(locations, [ + `${home}/.config/alacritty/alacritty.yml`, + `${home}/.config/.alacritty.yml`, + ]); + }); + + it('includes Arch possible locations', () => { + let home = '/home/rajasegar'; + let local = '/usr/local'; + sinon.stub(helper, 'linuxHome').returns(home); + sinon.stub(helper, 'archHome').returns(local); + + let locations = helper.possibleLocations(); + + assert(locations, [ + `${home}/.config/alacritty/alacritty.yml`, + `${home}/.alacritty.yml`, + `${local}/alacritty/alacritty.yml`, + `${local}/alacritty.yml`, + ]); + }); +}); diff --git a/.config/alacritty/alacritty-themes/themes/3024.dark.yml b/.config/alacritty/alacritty-themes/themes/3024.dark.yml new file mode 100755 index 0000000..087f869 --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/3024.dark.yml @@ -0,0 +1,27 @@ +colors: + name: 3024 (dark) + author: Chris Kempson + primary: + background: "#090300" + foreground: "#a5a2a2" + cursor: + text: "#090300" + cursor: "#a5a2a2" + normal: + black: "#090300" + red: "#db2d20" + green: "#01a252" + yellow: "#fded02" + blue: "#01a0e4" + magenta: "#a16a94" + cyan: "#b5e4f4" + white: "#a5a2a2" + bright: + black: "#5c5855" + red: "#db2d20" + green: "#01a252" + yellow: "#fded02" + blue: "#01a0e4" + magenta: "#a16a94" + cyan: "#b5e4f4" + white: "#f7f7f7" diff --git a/.config/alacritty/alacritty-themes/themes/3024.light.yml b/.config/alacritty/alacritty-themes/themes/3024.light.yml new file mode 100755 index 0000000..deb16b5 --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/3024.light.yml @@ -0,0 +1,27 @@ +colors: + name: 3024 (light) + author: Chris Kempson + primary: + background: "#f7f7f7" + foreground: "#4a4543" + cursor: + text: "#f7f7f7" + cursor: "#4a4543" + normal: + black: "#090300" + red: "#db2d20" + green: "#01a252" + yellow: "#fded02" + blue: "#01a0e4" + magenta: "#a16a94" + cyan: "#b5e4f4" + white: "#a5a2a2" + bright: + black: "#5c5855" + red: "#db2d20" + green: "#01a252" + yellow: "#fded02" + blue: "#01a0e4" + magenta: "#a16a94" + cyan: "#b5e4f4" + white: "#f7f7f7" diff --git a/.config/alacritty/alacritty-themes/themes/Afterglow.yml b/.config/alacritty/alacritty-themes/themes/Afterglow.yml new file mode 100755 index 0000000..8ac1691 --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Afterglow.yml @@ -0,0 +1,48 @@ +colors: + # Default colors + primary: + background: '#2c2c2c' + foreground: '#d6d6d6' + + dim_foreground: '#dbdbdb' + bright_foreground: '#d9d9d9' + dim_background: '#202020' # not sure + bright_background: '#3a3a3a' # not sure + + # Cursor colors + cursor: + text: '#2c2c2c' + cursor: '#d9d9d9' + + # Normal colors + normal: + black: '#1c1c1c' + red: '#bc5653' + green: '#909d63' + yellow: '#ebc17a' + blue: '#7eaac7' + magenta: '#aa6292' + cyan: '#86d3ce' + white: '#cacaca' + + # Bright colors + bright: + black: '#636363' + red: '#bc5653' + green: '#909d63' + yellow: '#ebc17a' + blue: '#7eaac7' + magenta: '#aa6292' + cyan: '#86d3ce' + white: '#f7f7f7' + + # Dim colors + dim: + black: '#232323' + red: '#74423f' + green: '#5e6547' + yellow: '#8b7653' + blue: '#556b79' + magenta: '#6e4962' + cyan: '#5c8482' + white: '#828282' diff --git a/.config/alacritty/alacritty-themes/themes/Alabaster.yml b/.config/alacritty/alacritty-themes/themes/Alabaster.yml new file mode 100755 index 0000000..525f70e --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Alabaster.yml @@ -0,0 +1,27 @@ +colors: + name: Alabaster + author: tonsky + primary: + background: "#F7F7F7" + foreground: "#000000" + cursor: + text: "#448C27" + cursor: "#000000" + normal: + black: "#000000" + red: "#AA3731" + green: "#448C27" + yellow: "#CB9000" + blue: "#325CC0" + magenta: "#7A3E9D" + cyan: "#0083B2" + white: "#BBBBBB" + bright: + black: "#777777" + red: "#F05050" + green: "#60CB00" + yellow: "#FFBC5D" + blue: "#007ACC" + magenta: "#E64CE6" + cyan: "#00AACB" + white: "#FFFFFF" diff --git a/.config/alacritty/alacritty-themes/themes/Argonaut.yml b/.config/alacritty/alacritty-themes/themes/Argonaut.yml new file mode 100755 index 0000000..1a7c386 --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Argonaut.yml @@ -0,0 +1,32 @@ +colors: + # Default colors + primary: + background: '#292C3E' + foreground: '#EBEBEB' + + # Cursor colors + cursor: + text: '#FF261E' + cursor: '#FF261E' + + # Normal colors + normal: + black: '#0d0d0d' + red: '#FF301B' + green: '#A0E521' + yellow: '#FFC620' + blue: '#1BA6FA' + magenta: '#8763B8' + cyan: '#21DEEF' + white: '#EBEBEB' + + # Bright colors + bright: + black: '#6D7070' + red: '#FF4352' + green: '#B8E466' + yellow: '#FFD750' + blue: '#1BA6FA' + magenta: '#A578EA' + cyan: '#73FBF1' + white: '#FEFEF8' diff --git a/.config/alacritty/alacritty-themes/themes/Ashes.dark.yml b/.config/alacritty/alacritty-themes/themes/Ashes.dark.yml new file mode 100755 index 0000000..db4a737 --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Ashes.dark.yml @@ -0,0 +1,27 @@ +colors: + name: Ashes (dark) + author: Chris Kempson + primary: + background: "#1c2023" + foreground: "#c7ccd1" + cursor: + text: "#1c2023" + cursor: "#c7ccd1" + normal: + black: "#1c2023" + red: "#c7ae95" + green: "#95c7ae" + yellow: "#aec795" + blue: "#ae95c7" + magenta: "#c795ae" + cyan: "#95aec7" + white: "#c7ccd1" + bright: + black: "#747c84" + red: "#c7ae95" + green: "#95c7ae" + yellow: "#aec795" + blue: "#ae95c7" + magenta: "#c795ae" + cyan: "#95aec7" + white: "#f3f4f5" diff --git a/.config/alacritty/alacritty-themes/themes/Ashes.light.yml b/.config/alacritty/alacritty-themes/themes/Ashes.light.yml new file mode 100755 index 0000000..3e87eaa --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Ashes.light.yml @@ -0,0 +1,27 @@ +colors: + name: Ashes (light) + author: Chris Kempson + primary: + background: "#f3f4f5" + foreground: "#565e65" + cursor: + text: "#f3f4f5" + cursor: "#565e65" + normal: + black: "#1c2023" + red: "#c7ae95" + green: "#95c7ae" + yellow: "#aec795" + blue: "#ae95c7" + magenta: "#c795ae" + cyan: "#95aec7" + white: "#c7ccd1" + bright: + black: "#747c84" + red: "#c7ae95" + green: "#95c7ae" + yellow: "#aec795" + blue: "#ae95c7" + magenta: "#c795ae" + cyan: "#95aec7" + white: "#f3f4f5" diff --git a/.config/alacritty/alacritty-themes/themes/Astromouse.yml b/.config/alacritty/alacritty-themes/themes/Astromouse.yml new file mode 100755 index 0000000..f3c68c8 --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Astromouse.yml @@ -0,0 +1,27 @@ +colors: + name: astromouse + author: "" + primary: + background: "#000000" + foreground: "#ffffff" + cursor: + text: "#000000" + cursor: "#ffffff" + normal: + black: "#1c1c1c" + red: "#d770af" + green: "#9acc79" + yellow: "#d0d26b" + blue: "#77b6c5" + magenta: "#a488d9" + cyan: "#7fcab3" + white: "#8d8d8d" + bright: + black: "#3d3a3a" + red: "#d28abf" + green: "#8fb676" + yellow: "#c8bc45" + blue: "#8fa7b9" + magenta: "#bd89de" + cyan: "#6ec2a8" + white: "#dad3d3" diff --git a/.config/alacritty/alacritty-themes/themes/Atelierdune.dark.yml b/.config/alacritty/alacritty-themes/themes/Atelierdune.dark.yml new file mode 100755 index 0000000..3f8bb72 --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Atelierdune.dark.yml @@ -0,0 +1,27 @@ +colors: + name: Atelierdune (dark) + author: Chris Kempson + primary: + background: "#20201d" + foreground: "#a6a28c" + cursor: + text: "#20201d" + cursor: "#a6a28c" + normal: + black: "#20201d" + red: "#d73737" + green: "#60ac39" + yellow: "#cfb017" + blue: "#6684e1" + magenta: "#b854d4" + cyan: "#1fad83" + white: "#a6a28c" + bright: + black: "#7d7a68" + red: "#d73737" + green: "#60ac39" + yellow: "#cfb017" + blue: "#6684e1" + magenta: "#b854d4" + cyan: "#1fad83" + white: "#fefbec" diff --git a/.config/alacritty/alacritty-themes/themes/Atelierdune.light.yml b/.config/alacritty/alacritty-themes/themes/Atelierdune.light.yml new file mode 100755 index 0000000..6344f7d --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Atelierdune.light.yml @@ -0,0 +1,27 @@ +colors: + name: Atelierdune (light) + author: Chris Kempson + primary: + background: "#fefbec" + foreground: "#6e6b5e" + cursor: + text: "#fefbec" + cursor: "#6e6b5e" + normal: + black: "#20201d" + red: "#d73737" + green: "#60ac39" + yellow: "#cfb017" + blue: "#6684e1" + magenta: "#b854d4" + cyan: "#1fad83" + white: "#a6a28c" + bright: + black: "#7d7a68" + red: "#d73737" + green: "#60ac39" + yellow: "#cfb017" + blue: "#6684e1" + magenta: "#b854d4" + cyan: "#1fad83" + white: "#fefbec" diff --git a/.config/alacritty/alacritty-themes/themes/Atelierforest.dark.yml b/.config/alacritty/alacritty-themes/themes/Atelierforest.dark.yml new file mode 100755 index 0000000..c0736fe --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Atelierforest.dark.yml @@ -0,0 +1,27 @@ +colors: + name: Atelierforest (dark) + author: Chris Kempson + primary: + background: "#1b1918" + foreground: "#a8a19f" + cursor: + text: "#1b1918" + cursor: "#a8a19f" + normal: + black: "#1b1918" + red: "#f22c40" + green: "#5ab738" + yellow: "#d5911a" + blue: "#407ee7" + magenta: "#6666ea" + cyan: "#00ad9c" + white: "#a8a19f" + bright: + black: "#766e6b" + red: "#f22c40" + green: "#5ab738" + yellow: "#d5911a" + blue: "#407ee7" + magenta: "#6666ea" + cyan: "#00ad9c" + white: "#f1efee" diff --git a/.config/alacritty/alacritty-themes/themes/Atelierforest.light.yml b/.config/alacritty/alacritty-themes/themes/Atelierforest.light.yml new file mode 100755 index 0000000..59cab11 --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Atelierforest.light.yml @@ -0,0 +1,27 @@ +colors: + name: Atelierforest (light) + author: Chris Kempson + primary: + background: "#f1efee" + foreground: "#68615e" + cursor: + text: "#f1efee" + cursor: "#68615e" + normal: + black: "#1b1918" + red: "#f22c40" + green: "#5ab738" + yellow: "#d5911a" + blue: "#407ee7" + magenta: "#6666ea" + cyan: "#00ad9c" + white: "#a8a19f" + bright: + black: "#766e6b" + red: "#f22c40" + green: "#5ab738" + yellow: "#d5911a" + blue: "#407ee7" + magenta: "#6666ea" + cyan: "#00ad9c" + white: "#f1efee" diff --git a/.config/alacritty/alacritty-themes/themes/Atelierheath.dark.yml b/.config/alacritty/alacritty-themes/themes/Atelierheath.dark.yml new file mode 100755 index 0000000..bb448bb --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Atelierheath.dark.yml @@ -0,0 +1,27 @@ +colors: + name: Atelierheath (dark) + author: Chris Kempson + primary: + background: "#1b181b" + foreground: "#ab9bab" + cursor: + text: "#1b181b" + cursor: "#ab9bab" + normal: + black: "#1b181b" + red: "#ca402b" + green: "#379a37" + yellow: "#bb8a35" + blue: "#516aec" + magenta: "#7b59c0" + cyan: "#159393" + white: "#ab9bab" + bright: + black: "#776977" + red: "#ca402b" + green: "#379a37" + yellow: "#bb8a35" + blue: "#516aec" + magenta: "#7b59c0" + cyan: "#159393" + white: "#f7f3f7" diff --git a/.config/alacritty/alacritty-themes/themes/Atelierheath.light.yml b/.config/alacritty/alacritty-themes/themes/Atelierheath.light.yml new file mode 100755 index 0000000..f5c2814 --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Atelierheath.light.yml @@ -0,0 +1,27 @@ +colors: + name: Atelierheath (light) + author: Chris Kempson + primary: + background: "#f7f3f7" + foreground: "#695d69" + cursor: + text: "#f7f3f7" + cursor: "#695d69" + normal: + black: "#1b181b" + red: "#ca402b" + green: "#379a37" + yellow: "#bb8a35" + blue: "#516aec" + magenta: "#7b59c0" + cyan: "#159393" + white: "#ab9bab" + bright: + black: "#776977" + red: "#ca402b" + green: "#379a37" + yellow: "#bb8a35" + blue: "#516aec" + magenta: "#7b59c0" + cyan: "#159393" + white: "#f7f3f7" diff --git a/.config/alacritty/alacritty-themes/themes/Atelierlakeside.dark.yml b/.config/alacritty/alacritty-themes/themes/Atelierlakeside.dark.yml new file mode 100755 index 0000000..81445bd --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Atelierlakeside.dark.yml @@ -0,0 +1,27 @@ +colors: + name: Atelierlakeside (dark) + author: Chris Kempson + primary: + background: "#161b1d" + foreground: "#7ea2b4" + cursor: + text: "#161b1d" + cursor: "#7ea2b4" + normal: + black: "#161b1d" + red: "#d22d72" + green: "#568c3b" + yellow: "#8a8a0f" + blue: "#257fad" + magenta: "#5d5db1" + cyan: "#2d8f6f" + white: "#7ea2b4" + bright: + black: "#5a7b8c" + red: "#d22d72" + green: "#568c3b" + yellow: "#8a8a0f" + blue: "#257fad" + magenta: "#5d5db1" + cyan: "#2d8f6f" + white: "#ebf8ff" diff --git a/.config/alacritty/alacritty-themes/themes/Atelierlakeside.light.yml b/.config/alacritty/alacritty-themes/themes/Atelierlakeside.light.yml new file mode 100755 index 0000000..b7eef45 --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Atelierlakeside.light.yml @@ -0,0 +1,27 @@ +colors: + name: Atelierlakeside (light) + author: Chris Kempson + primary: + background: "#ebf8ff" + foreground: "#516d7b" + cursor: + text: "#ebf8ff" + cursor: "#516d7b" + normal: + black: "#161b1d" + red: "#d22d72" + green: "#568c3b" + yellow: "#8a8a0f" + blue: "#257fad" + magenta: "#5d5db1" + cyan: "#2d8f6f" + white: "#7ea2b4" + bright: + black: "#5a7b8c" + red: "#d22d72" + green: "#568c3b" + yellow: "#8a8a0f" + blue: "#257fad" + magenta: "#5d5db1" + cyan: "#2d8f6f" + white: "#ebf8ff" diff --git a/.config/alacritty/alacritty-themes/themes/Atelierseaside.dark.yml b/.config/alacritty/alacritty-themes/themes/Atelierseaside.dark.yml new file mode 100755 index 0000000..9161f4d --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Atelierseaside.dark.yml @@ -0,0 +1,27 @@ +colors: + name: Atelierseaside (dark) + author: Chris Kempson + primary: + background: "#131513" + foreground: "#8ca68c" + cursor: + text: "#131513" + cursor: "#8ca68c" + normal: + black: "#131513" + red: "#e6193c" + green: "#29a329" + yellow: "#c3c322" + blue: "#3d62f5" + magenta: "#ad2bee" + cyan: "#1999b3" + white: "#8ca68c" + bright: + black: "#687d68" + red: "#e6193c" + green: "#29a329" + yellow: "#c3c322" + blue: "#3d62f5" + magenta: "#ad2bee" + cyan: "#1999b3" + white: "#f0fff0" diff --git a/.config/alacritty/alacritty-themes/themes/Atelierseaside.light.yml b/.config/alacritty/alacritty-themes/themes/Atelierseaside.light.yml new file mode 100755 index 0000000..e016c1f --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Atelierseaside.light.yml @@ -0,0 +1,27 @@ +colors: + name: Atelierseaside (light) + author: Chris Kempson + primary: + background: "#f0fff0" + foreground: "#5e6e5e" + cursor: + text: "#f0fff0" + cursor: "#5e6e5e" + normal: + black: "#131513" + red: "#e6193c" + green: "#29a329" + yellow: "#c3c322" + blue: "#3d62f5" + magenta: "#ad2bee" + cyan: "#1999b3" + white: "#8ca68c" + bright: + black: "#687d68" + red: "#e6193c" + green: "#29a329" + yellow: "#c3c322" + blue: "#3d62f5" + magenta: "#ad2bee" + cyan: "#1999b3" + white: "#f0fff0" diff --git a/.config/alacritty/alacritty-themes/themes/Ayu-Dark.yml b/.config/alacritty/alacritty-themes/themes/Ayu-Dark.yml new file mode 100755 index 0000000..b86ae8b --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Ayu-Dark.yml @@ -0,0 +1,28 @@ +# Colors (Ayu Dark) +colors: + # Default colors + primary: + background: '#0A0E14' + foreground: '#B3B1AD' + + # Normal colors + normal: + black: '#01060E' + red: '#EA6C73' + green: '#91B362' + yellow: '#F9AF4F' + blue: '#53BDFA' + magenta: '#FAE994' + cyan: '#90E1C6' + white: '#C7C7C7' + + # Bright colors + bright: + black: '#686868' + red: '#F07178' + green: '#C2D94C' + yellow: '#FFB454' + blue: '#59C2FF' + magenta: '#FFEE99' + cyan: '#95E6CB' + white: '#FFFFFF' diff --git a/.config/alacritty/alacritty-themes/themes/Ayu-Mirage.yml b/.config/alacritty/alacritty-themes/themes/Ayu-Mirage.yml new file mode 100755 index 0000000..7c59efb --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Ayu-Mirage.yml @@ -0,0 +1,28 @@ +# Colors (Ayu Mirage) +colors: + # Default colors + primary: + background: '#202734' + foreground: '#CBCCC6' + + # Normal colors + normal: + black: '#191E2A' + red: '#FF3333' + green: '#BAE67E' + yellow: '#FFA759' + blue: '#73D0FF' + magenta: '#FFD580' + cyan: '#95E6CB' + white: '#C7C7C7' + + # Bright colors + bright: + black: '#686868' + red: '#F27983' + green: '#A6CC70' + yellow: '#FFCC66' + blue: '#5CCFE6' + magenta: '#FFEE99' + cyan: '#95E6CB' + white: '#FFFFFF' diff --git a/.config/alacritty/alacritty-themes/themes/Base16-Default-Dark.yml b/.config/alacritty/alacritty-themes/themes/Base16-Default-Dark.yml new file mode 100755 index 0000000..5ffa618 --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Base16-Default-Dark.yml @@ -0,0 +1,33 @@ +# Colors (Base16 Default Dark) +colors: + # Default colors + primary: + background: '#181818' + foreground: '#d8d8d8' + + # Colors the cursor will use if `custom_cursor_colors` is true + cursor: + text: '#d8d8d8' + cursor: '#d8d8d8' + + # Normal colors + normal: + black: '#181818' + red: '#ab4642' + green: '#a1b56c' + yellow: '#f7ca88' + blue: '#7cafc2' + magenta: '#ba8baf' + cyan: '#86c1b9' + white: '#d8d8d8' + + # Bright colors + bright: + black: '#585858' + red: '#ab4642' + green: '#a1b56c' + yellow: '#f7ca88' + blue: '#7cafc2' + magenta: '#ba8baf' + cyan: '#86c1b9' + white: '#f8f8f8' diff --git a/.config/alacritty/alacritty-themes/themes/Baskerville - Count Von Count.yml b/.config/alacritty/alacritty-themes/themes/Baskerville - Count Von Count.yml new file mode 100755 index 0000000..124032f --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Baskerville - Count Von Count.yml @@ -0,0 +1,27 @@ +colors: + name: Count Von Count + author: Baskerville + primary: + background: "#000000" + foreground: "#919191" + cursor: + text: "#000000" + cursor: "#919191" + normal: + black: "#303030" + red: "#c10023" + green: "#a83334" + yellow: "#b51d2c" + blue: "#8c4b46" + magenta: "#7d534f" + cyan: "#9a413d" + white: "#c6c6c6" + bright: + black: "#5e5e5e" + red: "#ff8781" + green: "#ffa095" + yellow: "#ff948b" + blue: "#feb2aa" + magenta: "#ebbbb5" + cyan: "#ffaaa0" + white: "#ffffff" diff --git a/.config/alacritty/alacritty-themes/themes/Baskerville - Eldorado dark.yml b/.config/alacritty/alacritty-themes/themes/Baskerville - Eldorado dark.yml new file mode 100755 index 0000000..82909e8 --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Baskerville - Eldorado dark.yml @@ -0,0 +1,27 @@ +colors: + name: Eldorado dark + author: Baskerville + primary: + background: "#292929" + foreground: "#a2a2a2" + cursor: + text: "#292929" + cursor: "#a2a2a2" + normal: + black: "#4e4e4e" + red: "#a9635d" + green: "#468459" + yellow: "#84763d" + blue: "#5879af" + magenta: "#9c6594" + cyan: "#008592" + white: "#cfcfcf" + bright: + black: "#777777" + red: "#ffbbb2" + green: "#9ddeaf" + yellow: "#e0ce91" + blue: "#b3d1ff" + magenta: "#fabdf0" + cyan: "#79e0ed" + white: "#ffffff" diff --git a/.config/alacritty/alacritty-themes/themes/Baskerville - FarSide.yml b/.config/alacritty/alacritty-themes/themes/Baskerville - FarSide.yml new file mode 100755 index 0000000..97b8e76 --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Baskerville - FarSide.yml @@ -0,0 +1,27 @@ +colors: + name: FarSide + author: Baskerville + primary: + background: "#000000" + foreground: "#919191" + cursor: + text: "#000000" + cursor: "#919191" + normal: + black: "#303030" + red: "#a43261" + green: "#006ca5" + yellow: "#007086" + blue: "#6751a6" + magenta: "#913e88" + cyan: "#0061b1" + white: "#c6c6c6" + bright: + black: "#5e5e5e" + red: "#ff9fc9" + green: "#3bd6ff" + yellow: "#00ddf4" + blue: "#d5b8ff" + magenta: "#ffa7f6" + cyan: "#93c9ff" + white: "#ffffff" diff --git a/.config/alacritty/alacritty-themes/themes/Baskerville - ivory dark.yml b/.config/alacritty/alacritty-themes/themes/Baskerville - ivory dark.yml new file mode 100755 index 0000000..7d73c50 --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Baskerville - ivory dark.yml @@ -0,0 +1,27 @@ +colors: + name: Ivory Dark + author: Baskerville + primary: + background: "#2d2c28" + foreground: "#a4a6ab" + cursor: + text: "#2d2c28" + cursor: "#a4a6ab" + normal: + black: "#5b5955" + red: "#c4756e" + green: "#559a6a" + yellow: "#9b8a4b" + blue: "#6a8dca" + magenta: "#b577ac" + cyan: "#019baa" + white: "#dbdde2" + bright: + black: "#707277" + red: "#f6a299" + green: "#82c896" + yellow: "#cab775" + blue: "#98bbfb" + magenta: "#e5a4db" + cyan: "#53cad9" + white: "#f7f9ff" diff --git a/.config/alacritty/alacritty-themes/themes/Baskerville - lost woods.yml b/.config/alacritty/alacritty-themes/themes/Baskerville - lost woods.yml new file mode 100755 index 0000000..d1a48c9 --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Baskerville - lost woods.yml @@ -0,0 +1,27 @@ +colors: + name: Lost Woods + author: Baskerville + primary: + background: "#000000" + foreground: "#919191" + cursor: + text: "#000000" + cursor: "#919191" + normal: + black: "#303030" + red: "#a13a38" + green: "#00715d" + yellow: "#006f32" + blue: "#a43261" + magenta: "#913e88" + cyan: "#007086" + white: "#c6c6c6" + bright: + black: "#5e5e5e" + red: "#ffa59a" + green: "#24dfc4" + yellow: "#73db95" + blue: "#ff9fc9" + magenta: "#ffa7f6" + cyan: "#00ddf4" + white: "#ffffff" diff --git a/.config/alacritty/alacritty-themes/themes/Baskerville-ivorylight.yml b/.config/alacritty/alacritty-themes/themes/Baskerville-ivorylight.yml new file mode 100755 index 0000000..1782e60 --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Baskerville-ivorylight.yml @@ -0,0 +1,27 @@ +colors: + name: Ivory Light + author: Baskerville + primary: + background: "#fef9ec" + foreground: "#6d727e" + cursor: + text: "#fef9ec" + cursor: "#6d727e" + normal: + black: "#c5c1b4" + red: "#e75c58" + green: "#00a250" + yellow: "#a08a00" + blue: "#208ffb" + magenta: "#d160c4" + cyan: "#00a4c1" + white: "#3e424d" + bright: + black: "#a1a6b2" + red: "#b22b31" + green: "#007427" + yellow: "#715f00" + blue: "#0065ca" + magenta: "#a03196" + cyan: "#007693" + white: "#282c36" diff --git a/.config/alacritty/alacritty-themes/themes/Belge.yml b/.config/alacritty/alacritty-themes/themes/Belge.yml new file mode 100755 index 0000000..2514510 --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Belge.yml @@ -0,0 +1,27 @@ +colors: + name: Belge + author: "" + primary: + background: "#000000" + foreground: "#ffffff" + cursor: + text: "#000000" + cursor: "#ffffff" + normal: + black: "#252525" + red: "#ef6769" + green: "#a6e22e" + yellow: "#fd971f" + blue: "#6495ed" + magenta: "#deb887" + cyan: "#b0c4de" + white: "#dbdcdc" + bright: + black: "#454545" + red: "#fc7ca5" + green: "#b6e354" + yellow: "#fd971f" + blue: "#87ceeb" + magenta: "#996600" + cyan: "#87ceeb" + white: "#fdfdfd" diff --git a/.config/alacritty/alacritty-themes/themes/Bespin.dark.yml b/.config/alacritty/alacritty-themes/themes/Bespin.dark.yml new file mode 100755 index 0000000..3d5620f --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Bespin.dark.yml @@ -0,0 +1,27 @@ +colors: + name: Bespin (dark) + author: Chris Kempson + primary: + background: "#28211c" + foreground: "#8a8986" + cursor: + text: "#28211c" + cursor: "#8a8986" + normal: + black: "#28211c" + red: "#cf6a4c" + green: "#54be0d" + yellow: "#f9ee98" + blue: "#5ea6ea" + magenta: "#9b859d" + cyan: "#afc4db" + white: "#8a8986" + bright: + black: "#666666" + red: "#cf6a4c" + green: "#54be0d" + yellow: "#f9ee98" + blue: "#5ea6ea" + magenta: "#9b859d" + cyan: "#afc4db" + white: "#baae9e" diff --git a/.config/alacritty/alacritty-themes/themes/Bespin.light.yml b/.config/alacritty/alacritty-themes/themes/Bespin.light.yml new file mode 100755 index 0000000..903a8d9 --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Bespin.light.yml @@ -0,0 +1,27 @@ +colors: + name: Bespin (light) + author: Chris Kempson + primary: + background: "#baae9e" + foreground: "#5e5d5c" + cursor: + text: "#baae9e" + cursor: "#5e5d5c" + normal: + black: "#28211c" + red: "#cf6a4c" + green: "#54be0d" + yellow: "#f9ee98" + blue: "#5ea6ea" + magenta: "#9b859d" + cyan: "#afc4db" + white: "#8a8986" + bright: + black: "#666666" + red: "#cf6a4c" + green: "#54be0d" + yellow: "#f9ee98" + blue: "#5ea6ea" + magenta: "#9b859d" + cyan: "#afc4db" + white: "#baae9e" diff --git a/.config/alacritty/alacritty-themes/themes/Bitmute.yml b/.config/alacritty/alacritty-themes/themes/Bitmute.yml new file mode 100755 index 0000000..f751507 --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Bitmute.yml @@ -0,0 +1,27 @@ +colors: + name: Bitmute + author: "" + primary: + background: "#000000" + foreground: "#ffffff" + cursor: + text: "#000000" + cursor: "#ffffff" + normal: + black: "#282828" + red: "#b76969" + green: "#719d72" + yellow: "#909858" + blue: "#68668f" + magenta: "#966894" + cyan: "#688891" + white: "#8e8e8e" + bright: + black: "#494949" + red: "#b87e7e" + green: "#839d84" + yellow: "#919864" + blue: "#73718f" + magenta: "#987397" + cyan: "#758c93" + white: "#aeaeae" diff --git a/.config/alacritty/alacritty-themes/themes/Bleh-1.yml b/.config/alacritty/alacritty-themes/themes/Bleh-1.yml new file mode 100755 index 0000000..2b7dda9 --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Bleh-1.yml @@ -0,0 +1,27 @@ +colors: + name: Bleh-1 + author: "" + primary: + background: "#000000" + foreground: "#ffffff" + cursor: + text: "#000000" + cursor: "#ffffff" + normal: + black: "#666666" + red: "#996578" + green: "#889965" + yellow: "#998565" + blue: "#657a99" + magenta: "#8b6599" + cyan: "#65998d" + white: "#a5a5a4" + bright: + black: "#8c847f" + red: "#bd4b76" + green: "#95b548" + yellow: "#bd814b" + blue: "#4c83bf" + magenta: "#a04bbd" + cyan: "#4dbda8" + white: "#848484" diff --git a/.config/alacritty/alacritty-themes/themes/Blood-Moon.yml b/.config/alacritty/alacritty-themes/themes/Blood-Moon.yml new file mode 100755 index 0000000..2ca9bf4 --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Blood-Moon.yml @@ -0,0 +1,28 @@ +# Colors (Blood Moon) +colors: + # Default colors + primary: + background: '#10100E' + foreground: '#C6C6C4' + + # Normal colors + normal: + black: '#10100E' + red: '#C40233' + green: '#009F6B' + yellow: '#FFD700' + blue: '#0087BD' + magenta: '#9A4EAE' + cyan: '#20B2AA' + white: '#C6C6C4' + + # Bright colors + bright: + black: '#696969' + red: '#FF2400' + green: '#03C03C' + yellow: '#FDFF00' + blue: '#007FFF' + magenta: '#FF1493' + cyan: '#00CCCC' + white: '#FFFAFA' diff --git a/.config/alacritty/alacritty-themes/themes/Breeze.yml b/.config/alacritty/alacritty-themes/themes/Breeze.yml new file mode 100755 index 0000000..b0d07e0 --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Breeze.yml @@ -0,0 +1,44 @@ +# KDE Breeze (Ported from Konsole) +colors: + # Default colors + primary: + background: '#232627' + foreground: '#fcfcfc' + + dim_foreground: '#eff0f1' + bright_foreground: '#ffffff' + dim_background: '#31363b' + bright_background: '#000000' + + # Normal colors + normal: + black: '#232627' + red: '#ed1515' + green: '#11d116' + yellow: '#f67400' + blue: '#1d99f3' + magenta: '#9b59b6' + cyan: '#1abc9c' + white: '#fcfcfc' + + # Bright colors + bright: + black: '#7f8c8d' + red: '#c0392b' + green: '#1cdc9a' + yellow: '#fdbc4b' + blue: '#3daee9' + magenta: '#8e44ad' + cyan: '#16a085' + white: '#ffffff' + + # Dim colors + dim: + black: '#31363b' + red: '#783228' + green: '#17a262' + yellow: '#b65619' + blue: '#1b668f' + magenta: '#614a73' + cyan: '#186c60' + white: '#63686d' diff --git a/.config/alacritty/alacritty-themes/themes/Brewer.dark.yml b/.config/alacritty/alacritty-themes/themes/Brewer.dark.yml new file mode 100755 index 0000000..941693d --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Brewer.dark.yml @@ -0,0 +1,27 @@ +colors: + name: Brewer (dark) + author: Chris Kempson + primary: + background: "#0c0d0e" + foreground: "#b7b8b9" + cursor: + text: "#0c0d0e" + cursor: "#b7b8b9" + normal: + black: "#0c0d0e" + red: "#e31a1c" + green: "#31a354" + yellow: "#dca060" + blue: "#3182bd" + magenta: "#756bb1" + cyan: "#80b1d3" + white: "#b7b8b9" + bright: + black: "#737475" + red: "#e31a1c" + green: "#31a354" + yellow: "#dca060" + blue: "#3182bd" + magenta: "#756bb1" + cyan: "#80b1d3" + white: "#fcfdfe" diff --git a/.config/alacritty/alacritty-themes/themes/Brewer.light.yml b/.config/alacritty/alacritty-themes/themes/Brewer.light.yml new file mode 100755 index 0000000..ea31ce2 --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Brewer.light.yml @@ -0,0 +1,27 @@ +colors: + name: Brewer (light) + author: Chris Kempson + primary: + background: "#fcfdfe" + foreground: "#515253" + cursor: + text: "#fcfdfe" + cursor: "#515253" + normal: + black: "#0c0d0e" + red: "#e31a1c" + green: "#31a354" + yellow: "#dca060" + blue: "#3182bd" + magenta: "#756bb1" + cyan: "#80b1d3" + white: "#b7b8b9" + bright: + black: "#737475" + red: "#e31a1c" + green: "#31a354" + yellow: "#dca060" + blue: "#3182bd" + magenta: "#756bb1" + cyan: "#80b1d3" + white: "#fcfdfe" diff --git a/.config/alacritty/alacritty-themes/themes/Campbell.yml b/.config/alacritty/alacritty-themes/themes/Campbell.yml new file mode 100755 index 0000000..a34ca33 --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Campbell.yml @@ -0,0 +1,28 @@ +# Campbell (Windows 10 default) +colors: + # Default colors + primary: + background: '#0c0c0c' + foreground: '#cccccc' + + # Normal colors + normal: + black: '#0c0c0c' + red: '#c50f1f' + green: '#13a10e' + yellow: '#c19c00' + blue: '#0037da' + magenta: '#881798' + cyan: '#3a96dd' + white: '#cccccc' + + # Bright colors + bright: + black: '#767676' + red: '#e74856' + green: '#16c60c' + yellow: '#f9f1a5' + blue: '#3b78ff' + magenta: '#b4009e' + cyan: '#61d6d6' + white: '#f2f2f2' diff --git a/.config/alacritty/alacritty-themes/themes/Catppuccin.yml b/.config/alacritty/alacritty-themes/themes/Catppuccin.yml new file mode 100755 index 0000000..c5a9002 --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Catppuccin.yml @@ -0,0 +1,37 @@ +# Colors (catppuccin) +colors: + # Default colors + primary: + background: '0x1E1D2F' + foreground: '0xD9E0EE' + + cursor: + text: '0x1E1D2F' + cursor: '0xF5E0DC' + + # Normal colors + normal: + black: '0x6E6C7E' + red: '0xF28FAD' + green: '0xABE9B3' + yellow: '0xFAE3B0' + blue: '0x96CDFB' + magenta: '0xF5C2E7' + cyan: '0x89DCEB' + white: '0xD9E0EE' + + # Bright colors + bright: + black: '0x988BA2' + red: '0xF28FAD' + green: '0xABE9B3' + yellow: '0xFAE3B0' + blue: '0x96CDFB' + magenta: '0xF5C2E7' + cyan: '0x89DCEB' + white: '0xD9E0EE' + + indexed_colors: + - { index: 16, color: '0xF8BD96' } + - { index: 17, color: '0xF5E0DC' } + diff --git a/.config/alacritty/alacritty-themes/themes/Chalk.dark.yml b/.config/alacritty/alacritty-themes/themes/Chalk.dark.yml new file mode 100755 index 0000000..d26de0e --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Chalk.dark.yml @@ -0,0 +1,27 @@ +colors: + name: Chalk (dark) + author: Chris Kempson + primary: + background: "#151515" + foreground: "#d0d0d0" + cursor: + text: "#151515" + cursor: "#d0d0d0" + normal: + black: "#151515" + red: "#fb9fb1" + green: "#acc267" + yellow: "#ddb26f" + blue: "#6fc2ef" + magenta: "#e1a3ee" + cyan: "#12cfc0" + white: "#d0d0d0" + bright: + black: "#505050" + red: "#fb9fb1" + green: "#acc267" + yellow: "#ddb26f" + blue: "#6fc2ef" + magenta: "#e1a3ee" + cyan: "#12cfc0" + white: "#f5f5f5" diff --git a/.config/alacritty/alacritty-themes/themes/Chalk.light.yml b/.config/alacritty/alacritty-themes/themes/Chalk.light.yml new file mode 100755 index 0000000..1d26658 --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Chalk.light.yml @@ -0,0 +1,27 @@ +colors: + name: Chalk (light) + author: Chris Kempson + primary: + background: "#f5f5f5" + foreground: "#303030" + cursor: + text: "#f5f5f5" + cursor: "#303030" + normal: + black: "#151515" + red: "#fb9fb1" + green: "#acc267" + yellow: "#ddb26f" + blue: "#6fc2ef" + magenta: "#e1a3ee" + cyan: "#12cfc0" + white: "#d0d0d0" + bright: + black: "#505050" + red: "#fb9fb1" + green: "#acc267" + yellow: "#ddb26f" + blue: "#6fc2ef" + magenta: "#e1a3ee" + cyan: "#12cfc0" + white: "#f5f5f5" diff --git a/.config/alacritty/alacritty-themes/themes/Challenger-Deep.yml b/.config/alacritty/alacritty-themes/themes/Challenger-Deep.yml new file mode 100755 index 0000000..0d0dfcf --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Challenger-Deep.yml @@ -0,0 +1,27 @@ +colors: + # Default colors + primary: + background: '0x1b182c' + foreground: '0xcbe3e7' + + # Normal colors + normal: + black: '0x100e23' + red: '0xff8080' + green: '0x95ffa4' + yellow: '0xffe9aa' + blue: '0x91ddff' + magenta: '0xc991e1' + cyan: '0xaaffe4' + white: '0xcbe3e7' + + # Bright colors + bright: + black: '0x565575' + red: '0xff5458' + green: '0x62d196' + yellow: '0xffb378' + blue: '0x65b2ff' + magenta: '0x906cff' + cyan: '0x63f2f1' + white: '0xa6b3cc' diff --git a/.config/alacritty/alacritty-themes/themes/Cloud.yml b/.config/alacritty/alacritty-themes/themes/Cloud.yml new file mode 100755 index 0000000..295b3fe --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Cloud.yml @@ -0,0 +1,27 @@ +colors: + name: Cloud + author: "" + primary: + background: "#000000" + foreground: "#ffffff" + cursor: + text: "#000000" + cursor: "#ffffff" + normal: + black: "#222827" + red: "#d5a8e3" + green: "#9c75dd" + yellow: "#9898ae" + blue: "#654a96" + magenta: "#625566" + cyan: "#a9d1df" + white: "#e6ebe5" + bright: + black: "#5d6f74" + red: "#cd749c" + green: "#63b0b0" + yellow: "#c0c0dd" + blue: "#5786bc" + magenta: "#3f3442" + cyan: "#849da2" + white: "#d9d6cf" diff --git a/.config/alacritty/alacritty-themes/themes/Cobalt-2.yml b/.config/alacritty/alacritty-themes/themes/Cobalt-2.yml new file mode 100755 index 0000000..bc79f7f --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Cobalt-2.yml @@ -0,0 +1,33 @@ +# Colors (Cobalt 2) +colors: + cursor: + text: '#fefff2' + cursor: '#f0cc09' + + selection: + text: '#b5b5b5' + background: '#18354f' + + primary: + background: '#132738' + foreground: '#ffffff' + + normal: + black: '#000000' + red: '#ff0000' + green: '#38de21' + yellow: '#ffe50a' + blue: '#1460d2' + magenta: '#ff005d' + cyan: '#00bbbb' + white: '#bbbbbb' + + bright: + black: '#555555' + red: '#f40e17' + green: '#3bd01d' + yellow: '#edc809' + blue: '#5555ff' + magenta: '#ff55ff' + cyan: '#6ae3fa' + white: '#ffffff' diff --git a/.config/alacritty/alacritty-themes/themes/Codeschool.dark.yml b/.config/alacritty/alacritty-themes/themes/Codeschool.dark.yml new file mode 100755 index 0000000..19832ca --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Codeschool.dark.yml @@ -0,0 +1,27 @@ +colors: + name: Codeschool (dark) + author: Chris Kempson + primary: + background: "#232c31" + foreground: "#9ea7a6" + cursor: + text: "#232c31" + cursor: "#9ea7a6" + normal: + black: "#232c31" + red: "#2a5491" + green: "#237986" + yellow: "#a03b1e" + blue: "#484d79" + magenta: "#c59820" + cyan: "#b02f30" + white: "#9ea7a6" + bright: + black: "#3f4944" + red: "#2a5491" + green: "#237986" + yellow: "#a03b1e" + blue: "#484d79" + magenta: "#c59820" + cyan: "#b02f30" + white: "#b5d8f6" diff --git a/.config/alacritty/alacritty-themes/themes/Codeschool.light.yml b/.config/alacritty/alacritty-themes/themes/Codeschool.light.yml new file mode 100755 index 0000000..395532e --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Codeschool.light.yml @@ -0,0 +1,27 @@ +colors: + name: Codeschool (light) + author: Chris Kempson + primary: + background: "#b5d8f6" + foreground: "#2a343a" + cursor: + text: "#b5d8f6" + cursor: "#2a343a" + normal: + black: "#232c31" + red: "#2a5491" + green: "#237986" + yellow: "#a03b1e" + blue: "#484d79" + magenta: "#c59820" + cyan: "#b02f30" + white: "#9ea7a6" + bright: + black: "#3f4944" + red: "#2a5491" + green: "#237986" + yellow: "#a03b1e" + blue: "#484d79" + magenta: "#c59820" + cyan: "#b02f30" + white: "#b5d8f6" diff --git a/.config/alacritty/alacritty-themes/themes/Colorfulcolors.yml b/.config/alacritty/alacritty-themes/themes/Colorfulcolors.yml new file mode 100755 index 0000000..d507bab --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Colorfulcolors.yml @@ -0,0 +1,27 @@ +colors: + name: Colorful Colors + author: "" + primary: + background: "#000000" + foreground: "#ffffff" + cursor: + text: "#000000" + cursor: "#ffffff" + normal: + black: "#151515" + red: "#ff8eaf" + green: "#a6e25f" + yellow: "#f8e578" + blue: "#a6e2f0" + magenta: "#e85b92" + cyan: "#5f868f" + white: "#d5f1f2" + bright: + black: "#696969" + red: "#ed4c7a" + green: "#a6e179" + yellow: "#ffdf6b" + blue: "#79d2ff" + magenta: "#bb5d79" + cyan: "#87a8af" + white: "#e2f1f6" diff --git a/.config/alacritty/alacritty-themes/themes/DOOMICIDE darkocean.yml b/.config/alacritty/alacritty-themes/themes/DOOMICIDE darkocean.yml new file mode 100755 index 0000000..2b2c6c9 --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/DOOMICIDE darkocean.yml @@ -0,0 +1,27 @@ +colors: + name: Dark Ocean + author: DOOMICIDE + primary: + background: "#000000" + foreground: "#ffffff" + cursor: + text: "#000000" + cursor: "#ffffff" + normal: + black: "#000000" + red: "#571dc2" + green: "#14db49" + yellow: "#403d70" + blue: "#385a70" + magenta: "#384894" + cyan: "#4f3a5e" + white: "#999999" + bright: + black: "#38372c" + red: "#7c54b0" + green: "#a2e655" + yellow: "#9c6f59" + blue: "#323f5c" + magenta: "#5e6c99" + cyan: "#667d77" + white: "#ffffff" diff --git a/.config/alacritty/alacritty-themes/themes/Darkside.yml b/.config/alacritty/alacritty-themes/themes/Darkside.yml new file mode 100755 index 0000000..bedc41e --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Darkside.yml @@ -0,0 +1,27 @@ +# Colors (Darkside) +colors: + primary: + background: '#222324' + foreground: '#BABABA' + + # Normal colors + normal: + black: '#000000' + red: '#E8341C' + green: '#68C256' + yellow: '#F2D42C' + blue: '#1C98E8' + magenta: '#8E69C9' + cyan: '#1C98E8' + white: '#BABABA' + + # Bright colors + bright: + black: '#666666' + red: '#E05A4F' + green: '#77B869' + yellow: '#EFD64B' + blue: '#387CD3' + magenta: '#957BBE' + cyan: '#3D97E2' + white: '#BABABA' diff --git a/.config/alacritty/alacritty-themes/themes/Darktooth.yml b/.config/alacritty/alacritty-themes/themes/Darktooth.yml new file mode 100755 index 0000000..b893f77 --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Darktooth.yml @@ -0,0 +1,40 @@ +# Colors (Darktooth) +colors: + + # Default colors + primary: + background: '#282828' + foreground: '#fdf4c1' + + # Normal colors + normal: + black: '#282828' + red: '#9d0006' + green: '#79740e' + yellow: '#b57614' + blue: '#076678' + magenta: '#8f3f71' + cyan: '#00a7af' + white: '#fdf4c1' + + # Bright colors + bright: + black: '#32302f' + red: '#fb4933' + green: '#b8bb26' + yellow: '#fabd2f' + blue: '#83a598' + magenta: '#d3869b' + cyan: '#3fd7e5' + white: '#ffffc8' + + # Dim colors (Optional) + dim: + black: '#1d2021' + red: '#421e1e' + green: '#232b0f' + yellow: '#4d3b27' + blue: '#2b3c44' + magenta: '#4e3d45' + cyan: '#205161' + white: '#f4e8ba' diff --git a/.config/alacritty/alacritty-themes/themes/Dawn.yml b/.config/alacritty/alacritty-themes/themes/Dawn.yml new file mode 100755 index 0000000..e378fdf --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Dawn.yml @@ -0,0 +1,27 @@ +colors: + name: Dawn + author: Escapist + primary: + background: "#181B20" + foreground: "#9B9081" + cursor: + text: "#181B20" + cursor: "#9B9081" + normal: + black: "#353535" + red: "#744B40" + green: "#6D6137" + yellow: "#765636" + blue: "#61564B" + magenta: "#6B4A49" + cyan: "#435861" + white: "#B3B3B3" + bright: + black: "#5F5F5F" + red: "#785850" + green: "#6F6749" + yellow: "#776049" + blue: "#696057" + magenta: "#6F5A59" + cyan: "#525F66" + white: "#CDCDCD" diff --git a/.config/alacritty/alacritty-themes/themes/Deafened.yml b/.config/alacritty/alacritty-themes/themes/Deafened.yml new file mode 100755 index 0000000..87d753d --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Deafened.yml @@ -0,0 +1,27 @@ +colors: + name: Deafened + author: "" + primary: + background: "#000000" + foreground: "#ffffff" + cursor: + text: "#000000" + cursor: "#ffffff" + normal: + black: "#3d3e3d" + red: "#755a5b" + green: "#68755a" + yellow: "#756e5a" + blue: "#5b6976" + magenta: "#755b76" + cyan: "#465457" + white: "#ccccc6" + bright: + black: "#5a5b5c" + red: "#a37679" + green: "#87a376" + yellow: "#a39b76" + blue: "#758ba3" + magenta: "#9f76a3" + cyan: "#899ca1" + white: "#f8f8f2" diff --git a/.config/alacritty/alacritty-themes/themes/Default.dark.yml b/.config/alacritty/alacritty-themes/themes/Default.dark.yml new file mode 100755 index 0000000..87d3060 --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Default.dark.yml @@ -0,0 +1,27 @@ +colors: + name: Default (dark) + author: Chris Kempson + primary: + background: "#151515" + foreground: "#d0d0d0" + cursor: + text: "#151515" + cursor: "#d0d0d0" + normal: + black: "#151515" + red: "#ac4142" + green: "#90a959" + yellow: "#f4bf75" + blue: "#6a9fb5" + magenta: "#aa759f" + cyan: "#75b5aa" + white: "#d0d0d0" + bright: + black: "#505050" + red: "#ac4142" + green: "#90a959" + yellow: "#f4bf75" + blue: "#6a9fb5" + magenta: "#aa759f" + cyan: "#75b5aa" + white: "#f5f5f5" diff --git a/.config/alacritty/alacritty-themes/themes/Default.light.yml b/.config/alacritty/alacritty-themes/themes/Default.light.yml new file mode 100755 index 0000000..9a5f11c --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Default.light.yml @@ -0,0 +1,27 @@ +colors: + name: Default (light) + author: Chris Kempson + primary: + background: "#f5f5f5" + foreground: "#303030" + cursor: + text: "#f5f5f5" + cursor: "#303030" + normal: + black: "#151515" + red: "#ac4142" + green: "#90a959" + yellow: "#f4bf75" + blue: "#6a9fb5" + magenta: "#aa759f" + cyan: "#75b5aa" + white: "#d0d0d0" + bright: + black: "#505050" + red: "#ac4142" + green: "#90a959" + yellow: "#f4bf75" + blue: "#6a9fb5" + magenta: "#aa759f" + cyan: "#75b5aa" + white: "#f5f5f5" diff --git a/.config/alacritty/alacritty-themes/themes/Derp.yml b/.config/alacritty/alacritty-themes/themes/Derp.yml new file mode 100755 index 0000000..90e9675 --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Derp.yml @@ -0,0 +1,27 @@ +colors: + name: Derp + author: "" + primary: + background: "#000000" + foreground: "#ffffff" + cursor: + text: "#000000" + cursor: "#ffffff" + normal: + black: "#111111" + red: "#d36265" + green: "#aece91" + yellow: "#e7e18c" + blue: "#5297cf" + magenta: "#963c59" + cyan: "#5e7175" + white: "#bebebe" + bright: + black: "#666666" + red: "#ef8171" + green: "#cfefb3" + yellow: "#fff796" + blue: "#74b8ef" + magenta: "#b85e7b" + cyan: "#a3babf" + white: "#ffffff" diff --git a/.config/alacritty/alacritty-themes/themes/Digerati.yml b/.config/alacritty/alacritty-themes/themes/Digerati.yml new file mode 100755 index 0000000..84908fa --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Digerati.yml @@ -0,0 +1,27 @@ +colors: + name: Digerati + author: "" + primary: + background: "#000000" + foreground: "#ffffff" + cursor: + text: "#000000" + cursor: "#ffffff" + normal: + black: "#303030" + red: "#c03000" + green: "#b1d631" + yellow: "#fecf35" + blue: "#426870" + magenta: "#6d506d" + cyan: "#4bb5c1" + white: "#e2e2e5" + bright: + black: "#5f5f5f" + red: "#ff3a78" + green: "#a6cd07" + yellow: "#b5c865" + blue: "#4a7781" + magenta: "#ff3b77" + cyan: "#4bb5c1" + white: "#e2e2e5" diff --git a/.config/alacritty/alacritty-themes/themes/Dkeg - canvasedpastel.yml b/.config/alacritty/alacritty-themes/themes/Dkeg - canvasedpastel.yml new file mode 100755 index 0000000..6b46e20 --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Dkeg - canvasedpastel.yml @@ -0,0 +1,27 @@ +colors: + name: Canvased Pastel + author: dkeg + primary: + background: "#170f0d" + foreground: "#746c48" + cursor: + text: "#170f0d" + cursor: "#746c48" + normal: + black: "#26251c" + red: "#323027" + green: "#3d4339" + yellow: "#443b2c" + blue: "#534d35" + magenta: "#646756" + cyan: "#7b8574" + white: "#837b61" + bright: + black: "#999f91" + red: "#9b9773" + green: "#b2b08c" + yellow: "#c4bb8c" + blue: "#c4b67a" + magenta: "#cfc995" + cyan: "#d3d4b6" + white: "#d6d3ac" diff --git a/.config/alacritty/alacritty-themes/themes/Dkeg - catchmeifyoucan.yml b/.config/alacritty/alacritty-themes/themes/Dkeg - catchmeifyoucan.yml new file mode 100755 index 0000000..9d843e8 --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Dkeg - catchmeifyoucan.yml @@ -0,0 +1,27 @@ +colors: + name: Catch Me If You Can + author: dkeg + primary: + background: "#170f0d" + foreground: "#f9f9f9" + cursor: + text: "#170f0d" + cursor: "#f9f9f9" + normal: + black: "#130f0c" + red: "#604c38" + green: "#8d7f85" + yellow: "#907256" + blue: "#aa8d70" + magenta: "#b9a38d" + cyan: "#c4bfbf" + white: "#c4ae99" + bright: + black: "#c69f77" + red: "#cab9a8" + green: "#d5c6b8" + yellow: "#dcd1c7" + blue: "#e0e0e2" + magenta: "#e4dad2" + cyan: "#eae3dc" + white: "#f6f2f0" diff --git a/.config/alacritty/alacritty-themes/themes/Dkeg - citystreets.yml b/.config/alacritty/alacritty-themes/themes/Dkeg - citystreets.yml new file mode 100755 index 0000000..3a0dd5e --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Dkeg - citystreets.yml @@ -0,0 +1,27 @@ +colors: + name: City Streets + author: dkeg + primary: + background: "#000000" + foreground: "#d3d3d3" + cursor: + text: "#000000" + cursor: "#d3d3d3" + normal: + black: "#201e24" + red: "#2d2b30" + green: "#3f3d40" + yellow: "#413c3e" + blue: "#423e41" + magenta: "#4e4a4b" + cyan: "#6e6765" + white: "#837e81" + bright: + black: "#837c78" + red: "#89827d" + green: "#a7a099" + yellow: "#c2bec1" + blue: "#c3bcb2" + magenta: "#cbc5ba" + cyan: "#e3ddd2" + white: "#efe8dc" diff --git a/.config/alacritty/alacritty-themes/themes/Dkeg - colorstar.yml b/.config/alacritty/alacritty-themes/themes/Dkeg - colorstar.yml new file mode 100755 index 0000000..fe0a313 --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Dkeg - colorstar.yml @@ -0,0 +1,27 @@ +colors: + name: Color Star + author: dkeg + primary: + background: "#000000" + foreground: "#d3d3d3" + cursor: + text: "#000000" + cursor: "#d3d3d3" + normal: + black: "#03010f" + red: "#503b43" + green: "#353b64" + yellow: "#8c2424" + blue: "#6067ac" + magenta: "#624d19" + cyan: "#7c83c0" + white: "#9a600f" + bright: + black: "#ab9e9e" + red: "#b28930" + green: "#bbada9" + yellow: "#c37305" + blue: "#d0ae58" + magenta: "#d7b559" + cyan: "#f4e199" + white: "#f6f4df" diff --git a/.config/alacritty/alacritty-themes/themes/Dkeg - panels.yml b/.config/alacritty/alacritty-themes/themes/Dkeg - panels.yml new file mode 100755 index 0000000..4b4fdec --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Dkeg - panels.yml @@ -0,0 +1,27 @@ +colors: + name: Panels + author: dkeg + primary: + background: "#000000" + foreground: "#d3d3d3" + cursor: + text: "#000000" + cursor: "#d3d3d3" + normal: + black: "#191927" + red: "#282f5e" + green: "#2b4593" + yellow: "#344276" + blue: "#4e3a4f" + magenta: "#61372f" + cyan: "#6b484c" + white: "#744537" + bright: + black: "#905749" + red: "#94431c" + green: "#9f582a" + yellow: "#a38687" + blue: "#e1750f" + magenta: "#eaaf25" + cyan: "#fa8e08" + white: "#fca806" diff --git a/.config/alacritty/alacritty-themes/themes/Dkeg - redphoenix.yml b/.config/alacritty/alacritty-themes/themes/Dkeg - redphoenix.yml new file mode 100755 index 0000000..058e9b5 --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Dkeg - redphoenix.yml @@ -0,0 +1,27 @@ +colors: + name: Red Phoenix + author: dkeg + primary: + background: "#111111" + foreground: "#ffffff" + cursor: + text: "#111111" + cursor: "#ffffff" + normal: + black: "#131313" + red: "#2d2d2d" + green: "#4c3a3d" + yellow: "#4e4e4e" + blue: "#6f6f6f" + magenta: "#909090" + cyan: "#aaa998" + white: "#b1b1b1" + bright: + black: "#d1d1d1" + red: "#d2c3ad" + green: "#df9767" + yellow: "#e1e1e1" + blue: "#ededed" + magenta: "#ed4b19" + cyan: "#f2361e" + white: "#fa390f" diff --git a/.config/alacritty/alacritty-themes/themes/Dkeg - teva.yml b/.config/alacritty/alacritty-themes/themes/Dkeg - teva.yml new file mode 100755 index 0000000..464807a --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Dkeg - teva.yml @@ -0,0 +1,27 @@ +colors: + name: Teva + author: dkeg + primary: + background: "#170f0d" + foreground: "#746c48" + cursor: + text: "#170f0d" + cursor: "#746c48" + normal: + black: "#191f31" + red: "#282e39" + green: "#303844" + yellow: "#3b444a" + blue: "#3c4435" + magenta: "#4e534f" + cyan: "#5d5d35" + white: "#66695d" + bright: + black: "#706d56" + red: "#8b7852" + green: "#909581" + yellow: "#91703a" + blue: "#948658" + magenta: "#a19662" + cyan: "#ad9152" + white: "#c6a13f" diff --git a/.config/alacritty/alacritty-themes/themes/Dkeg - unsiftedwheat.yml b/.config/alacritty/alacritty-themes/themes/Dkeg - unsiftedwheat.yml new file mode 100755 index 0000000..354b30a --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Dkeg - unsiftedwheat.yml @@ -0,0 +1,27 @@ +colors: + name: Unsifted Wheat + author: dkeg + primary: + background: "#111111" + foreground: "#d3d3d3" + cursor: + text: "#111111" + cursor: "#d3d3d3" + normal: + black: "#382c2f" + red: "#48393a" + green: "#65534d" + yellow: "#79665a" + blue: "#836e5e" + magenta: "#8e7766" + cyan: "#917781" + white: "#9a846d" + bright: + black: "#ac9377" + red: "#baa17e" + green: "#bca282" + yellow: "#c1a67e" + blue: "#cfb48e" + magenta: "#d1baa3" + cyan: "#dfc39b" + white: "#eed8c4" diff --git a/.config/alacritty/alacritty-themes/themes/Dkeg - vwbug.yml b/.config/alacritty/alacritty-themes/themes/Dkeg - vwbug.yml new file mode 100755 index 0000000..134900f --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Dkeg - vwbug.yml @@ -0,0 +1,27 @@ +colors: + name: VWbug + author: dkeg + primary: + background: "#170f0d" + foreground: "#746c48" + cursor: + text: "#170f0d" + cursor: "#746c48" + normal: + black: "#261e26" + red: "#312c38" + green: "#4d353b" + yellow: "#503b43" + blue: "#57403e" + magenta: "#665453" + cyan: "#6e5450" + white: "#8e7266" + bright: + black: "#906756" + red: "#927e7e" + green: "#ad6042" + yellow: "#b48b6f" + blue: "#c4ab98" + magenta: "#d9c9b6" + cyan: "#e7ddd1" + white: "#faf7f2" diff --git a/.config/alacritty/alacritty-themes/themes/Dotshare.yml b/.config/alacritty/alacritty-themes/themes/Dotshare.yml new file mode 100755 index 0000000..0a6dde4 --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Dotshare.yml @@ -0,0 +1,27 @@ +colors: + name: Dotshare + author: "" + primary: + background: "#000000" + foreground: "#ffffff" + cursor: + text: "#000000" + cursor: "#ffffff" + normal: + black: "#101010" + red: "#e84f4f" + green: "#b8d68c" + yellow: "#e1aa5d" + blue: "#7dc1cf" + magenta: "#9b64fb" + cyan: "#6d878d" + white: "#dddddd" + bright: + black: "#404040" + red: "#d23d3d" + green: "#a0cf5d" + yellow: "#f39d21" + blue: "#4e9fb1" + magenta: "#8542ff" + cyan: "#42717b" + white: "#dddddd" diff --git a/.config/alacritty/alacritty-themes/themes/Dracula.yml b/.config/alacritty/alacritty-themes/themes/Dracula.yml new file mode 100755 index 0000000..1acdcd7 --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Dracula.yml @@ -0,0 +1,28 @@ +# Colors (Dracula) +colors: + # Default colors + primary: + background: '#282a36' + foreground: '#f8f8f2' + + # Normal colors + normal: + black: '#000000' + red: '#ff5555' + green: '#50fa7b' + yellow: '#f1fa8c' + blue: '#caa9fa' + magenta: '#ff79c6' + cyan: '#8be9fd' + white: '#bfbfbf' + + # Bright colors + bright: + black: '#575b70' + red: '#ff6e67' + green: '#5af78e' + yellow: '#f4f99d' + blue: '#caa9fa' + magenta: '#ff92d0' + cyan: '#9aedfe' + white: '#e6e6e6' diff --git a/.config/alacritty/alacritty-themes/themes/Dwmrob.yml b/.config/alacritty/alacritty-themes/themes/Dwmrob.yml new file mode 100755 index 0000000..66f0107 --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Dwmrob.yml @@ -0,0 +1,27 @@ +colors: + name: DWM rob + author: "" + primary: + background: "#000000" + foreground: "#ffffff" + cursor: + text: "#000000" + cursor: "#ffffff" + normal: + black: "#151515" + red: "#bf7979" + green: "#97b26b" + yellow: "#cdcda1" + blue: "#4a5463" + magenta: "#9c3885" + cyan: "#88aadd" + white: "#ffffff" + bright: + black: "#505450" + red: "#f4a45f" + green: "#c5f779" + yellow: "#ffffaf" + blue: "#7d8794" + magenta: "#e628ba" + cyan: "#99ccff" + white: "#dedede" diff --git a/.config/alacritty/alacritty-themes/themes/Eighties.dark.yml b/.config/alacritty/alacritty-themes/themes/Eighties.dark.yml new file mode 100755 index 0000000..eb0355a --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Eighties.dark.yml @@ -0,0 +1,27 @@ +colors: + name: Eighties (dark) + author: Chris Kempson + primary: + background: "#2d2d2d" + foreground: "#d3d0c8" + cursor: + text: "#2d2d2d" + cursor: "#d3d0c8" + normal: + black: "#2d2d2d" + red: "#f2777a" + green: "#99cc99" + yellow: "#ffcc66" + blue: "#6699cc" + magenta: "#cc99cc" + cyan: "#66cccc" + white: "#d3d0c8" + bright: + black: "#747369" + red: "#f2777a" + green: "#99cc99" + yellow: "#ffcc66" + blue: "#6699cc" + magenta: "#cc99cc" + cyan: "#66cccc" + white: "#f2f0ec" diff --git a/.config/alacritty/alacritty-themes/themes/Eighties.light.yml b/.config/alacritty/alacritty-themes/themes/Eighties.light.yml new file mode 100755 index 0000000..44af069 --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Eighties.light.yml @@ -0,0 +1,27 @@ +colors: + name: Eighties (light) + author: Chris Kempson + primary: + background: "#f2f0ec" + foreground: "#515151" + cursor: + text: "#f2f0ec" + cursor: "#515151" + normal: + black: "#2d2d2d" + red: "#f2777a" + green: "#99cc99" + yellow: "#ffcc66" + blue: "#6699cc" + magenta: "#cc99cc" + cyan: "#66cccc" + white: "#d3d0c8" + bright: + black: "#747369" + red: "#f2777a" + green: "#99cc99" + yellow: "#ffcc66" + blue: "#6699cc" + magenta: "#cc99cc" + cyan: "#66cccc" + white: "#f2f0ec" diff --git a/.config/alacritty/alacritty-themes/themes/Embers.dark.yml b/.config/alacritty/alacritty-themes/themes/Embers.dark.yml new file mode 100755 index 0000000..f203753 --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Embers.dark.yml @@ -0,0 +1,27 @@ +colors: + name: Embers (dark) + author: Chris Kempson + primary: + background: "#16130f" + foreground: "#a39a90" + cursor: + text: "#16130f" + cursor: "#a39a90" + normal: + black: "#16130f" + red: "#826d57" + green: "#57826d" + yellow: "#6d8257" + blue: "#6d5782" + magenta: "#82576d" + cyan: "#576d82" + white: "#a39a90" + bright: + black: "#5a5047" + red: "#826d57" + green: "#57826d" + yellow: "#6d8257" + blue: "#6d5782" + magenta: "#82576d" + cyan: "#576d82" + white: "#dbd6d1" diff --git a/.config/alacritty/alacritty-themes/themes/Embers.light.yml b/.config/alacritty/alacritty-themes/themes/Embers.light.yml new file mode 100755 index 0000000..84ba283 --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Embers.light.yml @@ -0,0 +1,27 @@ +colors: + name: Embers (light) + author: Chris Kempson + primary: + background: "#dbd6d1" + foreground: "#433b32" + cursor: + text: "#dbd6d1" + cursor: "#433b32" + normal: + black: "#16130f" + red: "#826d57" + green: "#57826d" + yellow: "#6d8257" + blue: "#6d5782" + magenta: "#82576d" + cyan: "#576d82" + white: "#a39a90" + bright: + black: "#5a5047" + red: "#826d57" + green: "#57826d" + yellow: "#6d8257" + blue: "#6d5782" + magenta: "#82576d" + cyan: "#576d82" + white: "#dbd6d1" diff --git a/.config/alacritty/alacritty-themes/themes/Epiphany.yml b/.config/alacritty/alacritty-themes/themes/Epiphany.yml new file mode 100755 index 0000000..4562eae --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Epiphany.yml @@ -0,0 +1,27 @@ +colors: + name: Epiphany + author: "" + primary: + background: "#000000" + foreground: "#ffffff" + cursor: + text: "#000000" + cursor: "#ffffff" + normal: + black: "#565656" + red: "#ac4f4f" + green: "#88ab77" + yellow: "#d0d9ad" + blue: "#677088" + magenta: "#cdcdb4" + cyan: "#445362" + white: "#ffffff" + bright: + black: "#656565" + red: "#e85555" + green: "#8ccd6c" + yellow: "#c5d67d" + blue: "#647396" + magenta: "#cdb4c9" + cyan: "#505b6c" + white: "#c0c0c0" diff --git a/.config/alacritty/alacritty-themes/themes/Eqie6.yml b/.config/alacritty/alacritty-themes/themes/Eqie6.yml new file mode 100755 index 0000000..7804767 --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Eqie6.yml @@ -0,0 +1,27 @@ +colors: + name: Eqie6 + author: "" + primary: + background: "#111111" + foreground: "#cccccc" + cursor: + text: "#111111" + cursor: "#cccccc" + normal: + black: "#222222" + red: "#e84f4f" + green: "#b7ce42" + yellow: "#fea63c" + blue: "#66a9b9" + magenta: "#b7416e" + cyan: "#6d878d" + white: "#cccccc" + bright: + black: "#666666" + red: "#d23d3d" + green: "#bde077" + yellow: "#ffe863" + blue: "#aaccbb" + magenta: "#e16a98" + cyan: "#42717b" + white: "#ffffff" diff --git a/.config/alacritty/alacritty-themes/themes/Erebus.yml b/.config/alacritty/alacritty-themes/themes/Erebus.yml new file mode 100755 index 0000000..ab8a56c --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Erebus.yml @@ -0,0 +1,27 @@ +colors: + name: Erebus + author: "" + primary: + background: "#000000" + foreground: "#ffffff" + cursor: + text: "#000000" + cursor: "#ffffff" + normal: + black: "#757575" + red: "#ff5f5f" + green: "#de8a36" + yellow: "#d78787" + blue: "#af5fd7" + magenta: "#ff87d7" + cyan: "#dea3e5" + white: "#b8b8b8" + bright: + black: "#b8b8b8" + red: "#d78787" + green: "#ff9f6f" + yellow: "#ff5f5f" + blue: "#dea3e5" + magenta: "#d7afaf" + cyan: "#af5fd7" + white: "#757575" diff --git a/.config/alacritty/alacritty-themes/themes/Euphrasia.yml b/.config/alacritty/alacritty-themes/themes/Euphrasia.yml new file mode 100755 index 0000000..c373f81 --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Euphrasia.yml @@ -0,0 +1,27 @@ +colors: + name: Euphrasia + author: "" + primary: + background: "#cfcfd9" + foreground: "#1c2027" + cursor: + text: "#cfcfd9" + cursor: "#1c2027" + normal: + black: "#192033" + red: "#a62a3e" + green: "#38912b" + yellow: "#b27d12" + blue: "#355c9a" + magenta: "#7c4f9f" + cyan: "#258f8f" + white: "#77858c" + bright: + black: "#666666" + red: "#f04758" + green: "#93c724" + yellow: "#ddb62b" + blue: "#45a3e6" + magenta: "#c953ef" + cyan: "#60c6c8" + white: "#c0c0c0" diff --git a/.config/alacritty/alacritty-themes/themes/Fishbone.yml b/.config/alacritty/alacritty-themes/themes/Fishbone.yml new file mode 100755 index 0000000..76e114a --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Fishbone.yml @@ -0,0 +1,27 @@ +colors: + name: Fishbone + author: "" + primary: + background: "#000000" + foreground: "#ffffff" + cursor: + text: "#000000" + cursor: "#ffffff" + normal: + black: "#293b3b" + red: "#bf5357" + green: "#41a551" + yellow: "#aea64f" + blue: "#416ea5" + magenta: "#bf6053" + cyan: "#714da5" + white: "#876868" + bright: + black: "#344040" + red: "#bf6367" + green: "#51a55f" + yellow: "#aea75d" + blue: "#5177a5" + magenta: "#bf6e63" + cyan: "#7859a5" + white: "#876f6f" diff --git a/.config/alacritty/alacritty-themes/themes/Garuda.dr460nized.yml b/.config/alacritty/alacritty-themes/themes/Garuda.dr460nized.yml new file mode 100755 index 0000000..29bf2dc --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Garuda.dr460nized.yml @@ -0,0 +1,27 @@ +colors: + name: Garuda (dr460nized) + author: dr460nf1r3 + primary: + background: '0x0a1124' + foreground: '0xeec49a' + cursor: + text: '0x0a1124' + cursor: '0xeec49a' + normal: + black: '0x0a1124' + red: '0x5F4149' + green: '0xEB3247' + yellow: '0xBC4349' + blue: '0xF35645' + magenta: '0xF6A73B' + cyan: '0xFAD32F' + white: '0xeec49a' + bright: + black: '0xa6896b' + red: '0x5F4149' + green: '0xEB3247' + yellow: '0xBC4349' + blue: '0xF35645' + magenta: '0xF6A73B' + cyan: '0xFAD32F' + white: '0xeec49a' diff --git a/.config/alacritty/alacritty-themes/themes/Gjm.yml b/.config/alacritty/alacritty-themes/themes/Gjm.yml new file mode 100755 index 0000000..5cb9041 --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Gjm.yml @@ -0,0 +1,27 @@ +colors: + name: GJM + author: "" + primary: + background: "#1c1c1c" + foreground: "#c5c5c5" + cursor: + text: "#1c1c1c" + cursor: "#c5c5c5" + normal: + black: "#1c1c1c" + red: "#ff005b" + green: "#cee318" + yellow: "#ffe755" + blue: "#048ac7" + magenta: "#833c9f" + cyan: "#0ac1cd" + white: "#e5e5e5" + bright: + black: "#666666" + red: "#ff00a0" + green: "#ccff00" + yellow: "#ff9f00" + blue: "#48c6ff" + magenta: "#be67e1" + cyan: "#63e7f0" + white: "#f3f3f3" diff --git a/.config/alacritty/alacritty-themes/themes/Gnometerm.yml b/.config/alacritty/alacritty-themes/themes/Gnometerm.yml new file mode 100755 index 0000000..dff8be5 --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Gnometerm.yml @@ -0,0 +1,27 @@ +colors: + name: Gnometerm + author: "" + primary: + background: "#000000" + foreground: "#ffffff" + cursor: + text: "#000000" + cursor: "#ffffff" + normal: + black: "#000000" + red: "#cc0000" + green: "#4e9a06" + yellow: "#c4a000" + blue: "#3465a4" + magenta: "#75507b" + cyan: "#06989a" + white: "#d3d7cf" + bright: + black: "#555753" + red: "#ef2929" + green: "#8ae234" + yellow: "#fce94f" + blue: "#729fcf" + magenta: "#ad7fa8" + cyan: "#34e2e2" + white: "#eeeeec" diff --git a/.config/alacritty/alacritty-themes/themes/Google.dark.yml b/.config/alacritty/alacritty-themes/themes/Google.dark.yml new file mode 100755 index 0000000..4f4bbfd --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Google.dark.yml @@ -0,0 +1,27 @@ +colors: + name: Google (dark) + author: Chris Kempson + primary: + background: "#1d1f21" + foreground: "#c5c8c6" + cursor: + text: "#1d1f21" + cursor: "#c5c8c6" + normal: + black: "#1d1f21" + red: "#cc342b" + green: "#198844" + yellow: "#fba922" + blue: "#3971ed" + magenta: "#a36ac7" + cyan: "#3971ed" + white: "#c5c8c6" + bright: + black: "#969896" + red: "#cc342b" + green: "#198844" + yellow: "#fba922" + blue: "#3971ed" + magenta: "#a36ac7" + cyan: "#3971ed" + white: "#ffffff" diff --git a/.config/alacritty/alacritty-themes/themes/Google.light.yml b/.config/alacritty/alacritty-themes/themes/Google.light.yml new file mode 100755 index 0000000..61894c0 --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Google.light.yml @@ -0,0 +1,27 @@ +colors: + name: Google (light) + author: Chris Kempson + primary: + background: "#ffffff" + foreground: "#373b41" + cursor: + text: "#ffffff" + cursor: "#373b41" + normal: + black: "#1d1f21" + red: "#cc342b" + green: "#198844" + yellow: "#fba922" + blue: "#3971ed" + magenta: "#a36ac7" + cyan: "#3971ed" + white: "#c5c8c6" + bright: + black: "#969896" + red: "#cc342b" + green: "#198844" + yellow: "#fba922" + blue: "#3971ed" + magenta: "#a36ac7" + cyan: "#3971ed" + white: "#ffffff" diff --git a/.config/alacritty/alacritty-themes/themes/Gotham.yml b/.config/alacritty/alacritty-themes/themes/Gotham.yml new file mode 100755 index 0000000..4d279a7 --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Gotham.yml @@ -0,0 +1,27 @@ +colors: + name: Gotham + author: whatyouhide + primary: + background: "#0a0f14" + foreground: "#98d1ce" + cursor: + text: "#0a0f14" + cursor: "#98d1ce" + normal: + black: "#0a0f14" + red: "#c33027" + green: "#26a98b" + yellow: "#edb54b" + blue: "#195465" + magenta: "#4e5165" + cyan: "#33859d" + white: "#98d1ce" + bright: + black: "#10151b" + red: "#d26939" + green: "#081f2d" + yellow: "#245361" + blue: "#093748" + magenta: "#888ba5" + cyan: "#599caa" + white: "#d3ebe9" diff --git a/.config/alacritty/alacritty-themes/themes/Grandshell.yml b/.config/alacritty/alacritty-themes/themes/Grandshell.yml new file mode 100755 index 0000000..66b8166 --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Grandshell.yml @@ -0,0 +1,27 @@ +colors: + name: Grandshell + author: "" + primary: + background: "#000000" + foreground: "#bebebe" + cursor: + text: "#000000" + cursor: "#bebebe" + normal: + black: "#000000" + red: "#f25a5a" + green: "#77bb33" + yellow: "#efc334" + blue: "#5555dd" + magenta: "#c350ff" + cyan: "#5af2ee" + white: "#bebebe" + bright: + black: "#222222" + red: "#ffbbbb" + green: "#dcf692" + yellow: "#f6df92" + blue: "#b2baf6" + magenta: "#f09fff" + cyan: "#5af2ee" + white: "#eeeeee" diff --git a/.config/alacritty/alacritty-themes/themes/Grayscale.dark.yml b/.config/alacritty/alacritty-themes/themes/Grayscale.dark.yml new file mode 100755 index 0000000..8757321 --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Grayscale.dark.yml @@ -0,0 +1,27 @@ +colors: + name: Grayscale (dark) + author: Chris Kempson + primary: + background: "#101010" + foreground: "#b9b9b9" + cursor: + text: "#101010" + cursor: "#b9b9b9" + normal: + black: "#101010" + red: "#7c7c7c" + green: "#8e8e8e" + yellow: "#a0a0a0" + blue: "#686868" + magenta: "#747474" + cyan: "#868686" + white: "#b9b9b9" + bright: + black: "#525252" + red: "#7c7c7c" + green: "#8e8e8e" + yellow: "#a0a0a0" + blue: "#686868" + magenta: "#747474" + cyan: "#868686" + white: "#f7f7f7" diff --git a/.config/alacritty/alacritty-themes/themes/Grayscale.light.yml b/.config/alacritty/alacritty-themes/themes/Grayscale.light.yml new file mode 100755 index 0000000..4f798dd --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Grayscale.light.yml @@ -0,0 +1,27 @@ +colors: + name: Grayscale (light) + author: Chris Kempson + primary: + background: "#f7f7f7" + foreground: "#464646" + cursor: + text: "#f7f7f7" + cursor: "#464646" + normal: + black: "#101010" + red: "#7c7c7c" + green: "#8e8e8e" + yellow: "#a0a0a0" + blue: "#686868" + magenta: "#747474" + cyan: "#868686" + white: "#b9b9b9" + bright: + black: "#525252" + red: "#7c7c7c" + green: "#8e8e8e" + yellow: "#a0a0a0" + blue: "#686868" + magenta: "#747474" + cyan: "#868686" + white: "#f7f7f7" diff --git a/.config/alacritty/alacritty-themes/themes/Greenscreen.dark.yml b/.config/alacritty/alacritty-themes/themes/Greenscreen.dark.yml new file mode 100755 index 0000000..25834ea --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Greenscreen.dark.yml @@ -0,0 +1,27 @@ +colors: + name: Greenscreen (dark) + author: Chris Kempson + primary: + background: "#001100" + foreground: "#00bb00" + cursor: + text: "#001100" + cursor: "#00bb00" + normal: + black: "#001100" + red: "#007700" + green: "#00bb00" + yellow: "#007700" + blue: "#009900" + magenta: "#00bb00" + cyan: "#005500" + white: "#00bb00" + bright: + black: "#007700" + red: "#007700" + green: "#00bb00" + yellow: "#007700" + blue: "#009900" + magenta: "#00bb00" + cyan: "#005500" + white: "#00ff00" diff --git a/.config/alacritty/alacritty-themes/themes/Greenscreen.light.yml b/.config/alacritty/alacritty-themes/themes/Greenscreen.light.yml new file mode 100755 index 0000000..d5ee1e5 --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Greenscreen.light.yml @@ -0,0 +1,27 @@ +colors: + name: Greenscreen (light) + author: Chris Kempson + primary: + background: "#00ff00" + foreground: "#005500" + cursor: + text: "#00ff00" + cursor: "#005500" + normal: + black: "#001100" + red: "#007700" + green: "#00bb00" + yellow: "#007700" + blue: "#009900" + magenta: "#00bb00" + cyan: "#005500" + white: "#00bb00" + bright: + black: "#007700" + red: "#007700" + green: "#00bb00" + yellow: "#007700" + blue: "#009900" + magenta: "#00bb00" + cyan: "#005500" + white: "#00ff00" diff --git a/.config/alacritty/alacritty-themes/themes/Gruvbox-Dark.yml b/.config/alacritty/alacritty-themes/themes/Gruvbox-Dark.yml new file mode 100755 index 0000000..d0611a8 --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Gruvbox-Dark.yml @@ -0,0 +1,30 @@ +# Colors (Gruvbox dark) +colors: + # Default colors + primary: + # hard contrast: background = '#1d2021' + background: '#282828' + # soft contrast: background = '#32302f' + 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' diff --git a/.config/alacritty/alacritty-themes/themes/Gruvbox-Light.yml b/.config/alacritty/alacritty-themes/themes/Gruvbox-Light.yml new file mode 100755 index 0000000..271d5c9 --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Gruvbox-Light.yml @@ -0,0 +1,30 @@ +# Colors (Gruvbox light) +colors: + # Default colors + primary: + # hard contrast: background = '#f9f5d7' + background: '#fbf1c7' + # soft contrast: background = '#f2e5bc' + foreground: '#3c3836' + + # Normal colors + normal: + black: '#fbf1c7' + red: '#cc241d' + green: '#98971a' + yellow: '#d79921' + blue: '#458588' + magenta: '#b16286' + cyan: '#689d6a' + white: '#7c6f64' + + # Bright colors + bright: + black: '#928374' + red: '#9d0006' + green: '#79740e' + yellow: '#b57614' + blue: '#076678' + magenta: '#8f3f71' + cyan: '#427b58' + white: '#3c3836' diff --git a/.config/alacritty/alacritty-themes/themes/Gslob nature-suede.yml b/.config/alacritty/alacritty-themes/themes/Gslob nature-suede.yml new file mode 100755 index 0000000..c36e981 --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Gslob nature-suede.yml @@ -0,0 +1,27 @@ +colors: + name: Nature Suede + author: Gslob + primary: + background: "#170f0d" + foreground: "#746c48" + cursor: + text: "#170f0d" + cursor: "#746c48" + normal: + black: "#392925" + red: "#98724c" + green: "#908f32" + yellow: "#aa964c" + blue: "#7b854e" + magenta: "#6b5644" + cyan: "#5c5142" + white: "#c8b55b" + bright: + black: "#544b2e" + red: "#af652f" + green: "#c3c13d" + yellow: "#c8b55b" + blue: "#70a16c" + magenta: "#98724c" + cyan: "#778725" + white: "#e4dc8c" diff --git a/.config/alacritty/alacritty-themes/themes/Gutterslob - aikofog.yml b/.config/alacritty/alacritty-themes/themes/Gutterslob - aikofog.yml new file mode 100755 index 0000000..692bd8e --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Gutterslob - aikofog.yml @@ -0,0 +1,27 @@ +colors: + name: aikofog + author: Gutterslob + primary: + background: "#f1eee9" + foreground: "#b2b3b8" + cursor: + text: "#f1eee9" + cursor: "#b2b3b8" + normal: + black: "#757475" + red: "#936a6f" + green: "#668462" + yellow: "#7f7b62" + blue: "#6e7291" + magenta: "#846887" + cyan: "#637e7b" + white: "#9a9a9a" + bright: + black: "#4a4a4a" + red: "#d76572" + green: "#4fae42" + yellow: "#a8981f" + blue: "#7782cf" + magenta: "#b754c4" + cyan: "#2ea89a" + white: "#c4c4c4" diff --git a/.config/alacritty/alacritty-themes/themes/Gutterslob - lumifoo.yml b/.config/alacritty/alacritty-themes/themes/Gutterslob - lumifoo.yml new file mode 100755 index 0000000..6ee3e93 --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Gutterslob - lumifoo.yml @@ -0,0 +1,27 @@ +colors: + name: Lumifoo + author: Gutterslob + primary: + background: "#1e2021" + foreground: "#888a8c" + cursor: + text: "#1e2021" + cursor: "#888a8c" + normal: + black: "#515151" + red: "#bf6382" + green: "#65a446" + yellow: "#ad8a43" + blue: "#6b85c2" + magenta: "#9e6bb8" + cyan: "#5c9d88" + white: "#919191" + bright: + black: "#707172" + red: "#eaaec2" + green: "#aed49b" + yellow: "#d4c3a0" + blue: "#afc4e9" + magenta: "#d2b1e2" + cyan: "#a4d0c1" + white: "#d0d0d0" diff --git a/.config/alacritty/alacritty-themes/themes/Gutterslob lightwhite.yml b/.config/alacritty/alacritty-themes/themes/Gutterslob lightwhite.yml new file mode 100755 index 0000000..57a62d3 --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Gutterslob lightwhite.yml @@ -0,0 +1,27 @@ +colors: + name: Light White + author: Gutterslob + primary: + background: "#000000" + foreground: "#ffffff" + cursor: + text: "#000000" + cursor: "#ffffff" + normal: + black: "#808080" + red: "#c48980" + green: "#8da862" + yellow: "#b29b7a" + blue: "#809bc4" + magenta: "#aa88b2" + cyan: "#82adad" + white: "#bfbfbf" + bright: + black: "#9c9c9c" + red: "#a15048" + green: "#4b7508" + yellow: "#916f27" + blue: "#567cb0" + magenta: "#964e8f" + cyan: "#4e848a" + white: "#9c9c9c" diff --git a/.config/alacritty/alacritty-themes/themes/Hund.yml b/.config/alacritty/alacritty-themes/themes/Hund.yml new file mode 100755 index 0000000..d5e79e3 --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Hund.yml @@ -0,0 +1,27 @@ +colors: + name: hund + author: hund + primary: + background: "#161616" + foreground: "#FFFFFF" + cursor: + text: "#161616" + cursor: "#FFFFFF" + normal: + black: "#222222" + red: "#E84F4F" + green: "#B7CE42" + yellow: "#FEA63C" + blue: "#66AABB" + magenta: "#B7416E" + cyan: "#6D878D" + white: "#DDDDDD" + bright: + black: "#666666" + red: "#D23D3D" + green: "#BDE077" + yellow: "#FFE863" + blue: "#AACCBB" + magenta: "#E16A98" + cyan: "#42717B" + white: "#CCCCCC" diff --git a/.config/alacritty/alacritty-themes/themes/Hybrid.yml b/.config/alacritty/alacritty-themes/themes/Hybrid.yml new file mode 100755 index 0000000..a446532 --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Hybrid.yml @@ -0,0 +1,28 @@ +# Colors (Hybrid) +colors: + # Default colors + primary: + background: '#27292c' + foreground: '#d0d2d1' + + # Normal colors + normal: + black: '#35383b' + red: '#b05655' + green: '#769972' + yellow: '#e1a574' + blue: '#7693ac' + magenta: '#977ba0' + cyan: '#749e99' + white: '#848b92' + + # Bright colors + bright: + black: '#484c52' + red: '#d27c7b' + green: '#dffebe' + yellow: '#f0d189' + blue: '#96b1c9' + magenta: '#bfa5c7' + cyan: '#9fc9c3' + white: '#fcf7e2' diff --git a/.config/alacritty/alacritty-themes/themes/Hyper.yml b/.config/alacritty/alacritty-themes/themes/Hyper.yml new file mode 100755 index 0000000..41a9c3d --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Hyper.yml @@ -0,0 +1,31 @@ +# Colors (Hyper) +colors: + # Default colors + primary: + background: '#000000' + foreground: '#ffffff' + cursor: + text: '#F81CE5' + cursor: '#ffffff' + + # Normal colors + normal: + black: '#000000' + red: '#fe0100' + green: '#33ff00' + yellow: '#feff00' + blue: '#0066ff' + magenta: '#cc00ff' + cyan: '#00ffff' + white: '#d0d0d0' + + # Bright colors + bright: + black: '#808080' + red: '#fe0100' + green: '#33ff00' + yellow: '#feff00' + blue: '#0066ff' + magenta: '#cc00ff' + cyan: '#00ffff' + white: '#FFFFFF' diff --git a/.config/alacritty/alacritty-themes/themes/IR-Black.yml b/.config/alacritty/alacritty-themes/themes/IR-Black.yml new file mode 100755 index 0000000..da5c7da --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/IR-Black.yml @@ -0,0 +1,32 @@ +# Colors (IR Black) +colors: + # Default colors + primary: + background: '#000000' + foreground: '#ffffff' + + cursor: + text: '#ffffff' + cursor: '#ffffff' + + # Normal colors + normal: + black: '#4e4e4e' + red: '#ff6c60' + green: '#a8ff60' + yellow: '#ffffb6' + blue: '#96cbfe' + magenta: '#ff73fd' + cyan: '#c6c5fe' + white: '#eeeeee' + + # Bright colors + bright: + black: '#7c7c7c' + red: '#ffb6b0' + green: '#ceffab' + yellow: '#ffffcb' + blue: '#b5dcfe' + magenta: '#ff9cfe' + cyan: '#dfdffe' + white: '#ffffff' diff --git a/.config/alacritty/alacritty-themes/themes/Iceberg-Dark.yml b/.config/alacritty/alacritty-themes/themes/Iceberg-Dark.yml new file mode 100755 index 0000000..2d2280e --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Iceberg-Dark.yml @@ -0,0 +1,28 @@ +# Colors (Iceberg Dark) +colors: + # Default colors + primary: + background: '#161821' + foreground: '#d2d4de' + + # Normal colors + normal: + black: '#161821' + red: '#e27878' + green: '#b4be82' + yellow: '#e2a478' + blue: '#84a0c6' + magenta: '#a093c7' + cyan: '#89b8c2' + white: '#c6c8d1' + + # Bright colors + bright: + black: '#6b7089' + red: '#e98989' + green: '#c0ca8e' + yellow: '#e9b189' + blue: '#91acd1' + magenta: '#ada0d3' + cyan: '#95c4ce' + white: '#d2d4de' diff --git a/.config/alacritty/alacritty-themes/themes/Iceberg-Light.yml b/.config/alacritty/alacritty-themes/themes/Iceberg-Light.yml new file mode 100755 index 0000000..d2f3e01 --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Iceberg-Light.yml @@ -0,0 +1,28 @@ +# Colors (Iceberg Light) +colors: + # Default colors + primary: + background: '0xe8e9ec' + foreground: '0x33374c' + + # Normal colors + normal: + black: '0xdcdfe7' + red: '0xcc517a' + green: '0x668e3d' + yellow: '0xc57339' + blue: '0x2d539e' + magenta: '0x7759b4' + cyan: '0x3f83a6' + white: '0x33374c' + + # Bright colors + bright: + black: '0x8389a3' + red: '0xcc3768' + green: '0x598030' + yellow: '0xb6662d' + blue: '0x22478e' + magenta: '0x6845ad' + cyan: '0x327698' + white: '0x262a3f' diff --git a/.config/alacritty/alacritty-themes/themes/Iiamblack.yml b/.config/alacritty/alacritty-themes/themes/Iiamblack.yml new file mode 100755 index 0000000..4257861 --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Iiamblack.yml @@ -0,0 +1,27 @@ +colors: + name: Iiamblack + author: iiamblack + primary: + background: "#000000" + foreground: "#ffffff" + cursor: + text: "#000000" + cursor: "#ffffff" + normal: + black: "#393939" + red: "#da4939" + green: "#519f50" + yellow: "#cc7833" + blue: "#6d9cbe" + magenta: "#9f5079" + cyan: "#435d75" + white: "#dddddd" + bright: + black: "#474747" + red: "#ff6c5c" + green: "#a5c261" + yellow: "#bc9458" + blue: "#d0d0ff" + magenta: "#a761c2" + cyan: "#6e98a4" + white: "#dddddd" diff --git a/.config/alacritty/alacritty-themes/themes/Insignificato.yml b/.config/alacritty/alacritty-themes/themes/Insignificato.yml new file mode 100755 index 0000000..619a74e --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Insignificato.yml @@ -0,0 +1,27 @@ +colors: + name: Insignificato + author: "" + primary: + background: "#000000" + foreground: "#ffffff" + cursor: + text: "#000000" + cursor: "#ffffff" + normal: + black: "#3d3e3d" + red: "#755a5b" + green: "#68755a" + yellow: "#756e5a" + blue: "#5b6976" + magenta: "#755b76" + cyan: "#5b7674" + white: "#808080" + bright: + black: "#5a5b5c" + red: "#a37679" + green: "#87a376" + yellow: "#a39b76" + blue: "#758ba3" + magenta: "#9f76a3" + cyan: "#75a3a1" + white: "#aeafb0" diff --git a/.config/alacritty/alacritty-themes/themes/Invisibone.yml b/.config/alacritty/alacritty-themes/themes/Invisibone.yml new file mode 100755 index 0000000..9feff58 --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Invisibone.yml @@ -0,0 +1,27 @@ +colors: + name: Invisibone + author: Baskerville + primary: + background: "#232323" + foreground: "#A0A0A0" + cursor: + text: "#232323" + cursor: "#A0A0A0" + normal: + black: "#303030" + red: "#D370A3" + green: "#6D9E3F" + yellow: "#B58858" + blue: "#6095C5" + magenta: "#AC7BDE" + cyan: "#3BA275" + white: "#CFCFCF" + bright: + black: "#686868" + red: "#FFA7DA" + green: "#A3D572" + yellow: "#EFBD8B" + blue: "#98CBFE" + magenta: "#E5B0FF" + cyan: "#75DAA9" + white: "#FFFFFF" diff --git a/.config/alacritty/alacritty-themes/themes/Isotope.dark.yml b/.config/alacritty/alacritty-themes/themes/Isotope.dark.yml new file mode 100755 index 0000000..a12bbfc --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Isotope.dark.yml @@ -0,0 +1,27 @@ +colors: + name: Isotope (dark) + author: Chris Kempson + primary: + background: "#000000" + foreground: "#d0d0d0" + cursor: + text: "#000000" + cursor: "#d0d0d0" + normal: + black: "#000000" + red: "#ff0000" + green: "#33ff00" + yellow: "#ff0099" + blue: "#0066ff" + magenta: "#cc00ff" + cyan: "#00ffff" + white: "#d0d0d0" + bright: + black: "#808080" + red: "#ff0000" + green: "#33ff00" + yellow: "#ff0099" + blue: "#0066ff" + magenta: "#cc00ff" + cyan: "#00ffff" + white: "#ffffff" diff --git a/.config/alacritty/alacritty-themes/themes/Isotope.light.yml b/.config/alacritty/alacritty-themes/themes/Isotope.light.yml new file mode 100755 index 0000000..b3a4bc1 --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Isotope.light.yml @@ -0,0 +1,27 @@ +colors: + name: Isotope (light) + author: Chris Kempson + primary: + background: "#ffffff" + foreground: "#606060" + cursor: + text: "#ffffff" + cursor: "#606060" + normal: + black: "#000000" + red: "#ff0000" + green: "#33ff00" + yellow: "#ff0099" + blue: "#0066ff" + magenta: "#cc00ff" + cyan: "#00ffff" + white: "#d0d0d0" + bright: + black: "#808080" + red: "#ff0000" + green: "#33ff00" + yellow: "#ff0099" + blue: "#0066ff" + magenta: "#cc00ff" + cyan: "#00ffff" + white: "#ffffff" diff --git a/.config/alacritty/alacritty-themes/themes/Jasonwryan.yml b/.config/alacritty/alacritty-themes/themes/Jasonwryan.yml new file mode 100755 index 0000000..e39542e --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Jasonwryan.yml @@ -0,0 +1,27 @@ +colors: + name: Jason Wryan + author: "" + primary: + background: "#000000" + foreground: "#ffffff" + cursor: + text: "#000000" + cursor: "#ffffff" + normal: + black: "#222222" + red: "#9e5641" + green: "#6c7e55" + yellow: "#caaf2b" + blue: "#4c8ea1" + magenta: "#956d9d" + cyan: "#7c9aa6" + white: "#909090" + bright: + black: "#454545" + red: "#cc896d" + green: "#7db37d" + yellow: "#bfb556" + blue: "#6bc1d0" + magenta: "#c18fcb" + cyan: "#8fadbf" + white: "#ffffff" diff --git a/.config/alacritty/alacritty-themes/themes/Jellybeans.yml b/.config/alacritty/alacritty-themes/themes/Jellybeans.yml new file mode 100755 index 0000000..0a7bcd2 --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Jellybeans.yml @@ -0,0 +1,38 @@ +# Colors (Jellybeans) +colors: + # Default colors + primary: + background: '#161616' + foreground: '#e4e4e4' + + # Cursor volors + cursor: + text: '#feffff' + cursor: '#ffb472' + + # Normal colors + normal: + black: '#a3a3a3' + red: '#e98885' + green: '#a3c38b' + yellow: '#ffc68d' + blue: '#a6cae2' + magenta: '#e7cdfb' + cyan: '#00a69f' + white: '#e4e4e4' + + # Bright colors + bright: + black: '#c8c8c8' + red: '#ffb2b0' + green: '#c8e2b9' + yellow: '#ffe1af' + blue: '#bddff7' + magenta: '#fce2ff' + cyan: '#0bbdb6' + white: '#feffff' + + # Selection colors + selection: + text: '#5963a2' + background: '#f6f6f6' diff --git a/.config/alacritty/alacritty-themes/themes/Jmbi.yml b/.config/alacritty/alacritty-themes/themes/Jmbi.yml new file mode 100755 index 0000000..78ed93e --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Jmbi.yml @@ -0,0 +1,27 @@ +colors: + name: jmbi + author: jmbi + primary: + background: "#1e1e1e" + foreground: "#ffffff" + cursor: + text: "#1e1e1e" + cursor: "#ffffff" + normal: + black: "#5A7260" + red: "#8F423C" + green: "#BBBB88" + yellow: "#F9D25B" + blue: "#E0BA69" + magenta: "#709289" + cyan: "#D13516" + white: "#EFE2E0" + bright: + black: "#8DA691" + red: "#EEAA88" + green: "#CCC68D" + yellow: "#EEDD99" + blue: "#C9B957" + magenta: "#FFCBAB" + cyan: "#C25431" + white: "#F9F1ED" diff --git a/.config/alacritty/alacritty-themes/themes/Jwr-dark.yml b/.config/alacritty/alacritty-themes/themes/Jwr-dark.yml new file mode 100755 index 0000000..271757d --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Jwr-dark.yml @@ -0,0 +1,27 @@ +colors: + name: JWR dark + author: "" + primary: + background: "#000000" + foreground: "#ffffff" + cursor: + text: "#000000" + cursor: "#ffffff" + normal: + black: "#333333" + red: "#8c4665" + green: "#287373" + yellow: "#7c7c99" + blue: "#395573" + magenta: "#5e468c" + cyan: "#31658c" + white: "#899ca1" + bright: + black: "#3d3d3d" + red: "#bf4d80" + green: "#53a6a6" + yellow: "#9e9ecb" + blue: "#477ab3" + magenta: "#7e62b3" + cyan: "#6096bf" + white: "#c0c0c0" diff --git a/.config/alacritty/alacritty-themes/themes/Kanagawa.yml b/.config/alacritty/alacritty-themes/themes/Kanagawa.yml new file mode 100755 index 0000000..9a11131 --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Kanagawa.yml @@ -0,0 +1,35 @@ +# Colors (Kanagawa) +colors: + # Default colors + primary: + background: '0x1f1f28' + foreground: '0xdcd7ba' + + # Normal colors + normal: + black: '0x090618' + red: '0xc34043' + green: '0x76946a' + yellow: '0xc0a36e' + blue: '0x7e9cd8' + magenta: '0x957fb8' + cyan: '0x6a9589' + white: '0xc8c093' + + # Bright colors + bright: + black: '0x727169' + red: '0xe82424' + green: '0x98bb6c' + yellow: '0xe6c384' + blue: '0x7fb4ca' + magenta: '0x938aa9' + cyan: '0x7aa89f' + white: '0xdcd7ba' + selection: + background: '0x2d4f67' + foreground: '0xc8c093' + + indexed_colors: + - { index: 16, color: '0xffa066' } + - { index: 17, color: '0xff5d62' } diff --git a/.config/alacritty/alacritty-themes/themes/Kasugano.yml b/.config/alacritty/alacritty-themes/themes/Kasugano.yml new file mode 100755 index 0000000..08669d6 --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Kasugano.yml @@ -0,0 +1,27 @@ +colors: + name: Kasugano + author: Kori Ayakashi + primary: + background: "#1b1b1b" + foreground: "#ffffff" + cursor: + text: "#1b1b1b" + cursor: "#ffffff" + normal: + black: "#3D3D3D" + red: "#6673BF" + green: "#3EA290" + yellow: "#B0EAD9" + blue: "#31658C" + magenta: "#596196" + cyan: "#8292B2" + white: "#C8CACC" + bright: + black: "#4D4D4D" + red: "#899AFF" + green: "#52AD91" + yellow: "#98C9BB" + blue: "#477AB3" + magenta: "#7882BF" + cyan: "#95A7CC" + white: "#EDEFF2" diff --git a/.config/alacritty/alacritty-themes/themes/Kitty.yml b/.config/alacritty/alacritty-themes/themes/Kitty.yml new file mode 100755 index 0000000..32a5281 --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Kitty.yml @@ -0,0 +1,27 @@ +colors: + # Default colors + primary: + background: '#000000' + foreground: '#dddddd' + + # Normal colors + normal: + black: '#000000' + red: '#cc0403' + green: '#19cb00' + yellow: '#cecb00' + blue: '#0d73cc' + magenta: '#cb1ed1' + cyan: '#0dcdcd' + white: '#dddddd' + + # Bright colors + bright: + black: '#767676' + red: '#f2201f' + green: '#23fd00' + yellow: '#fffd00' + blue: '#1a8fff' + magenta: '#fd28ff' + cyan: '#14ffff' + white: '#ffffff' diff --git a/.config/alacritty/alacritty-themes/themes/Londontube.dark.yml b/.config/alacritty/alacritty-themes/themes/Londontube.dark.yml new file mode 100755 index 0000000..227a04d --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Londontube.dark.yml @@ -0,0 +1,27 @@ +colors: + name: Londontube (dark) + author: Chris Kempson + primary: + background: "#231f20" + foreground: "#d9d8d8" + cursor: + text: "#231f20" + cursor: "#d9d8d8" + normal: + black: "#231f20" + red: "#ee2e24" + green: "#00853e" + yellow: "#ffd204" + blue: "#009ddc" + magenta: "#98005d" + cyan: "#85cebc" + white: "#d9d8d8" + bright: + black: "#737171" + red: "#ee2e24" + green: "#00853e" + yellow: "#ffd204" + blue: "#009ddc" + magenta: "#98005d" + cyan: "#85cebc" + white: "#ffffff" diff --git a/.config/alacritty/alacritty-themes/themes/Londontube.light.yml b/.config/alacritty/alacritty-themes/themes/Londontube.light.yml new file mode 100755 index 0000000..f479610 --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Londontube.light.yml @@ -0,0 +1,27 @@ +colors: + name: Londontube (light) + author: Chris Kempson + primary: + background: "#ffffff" + foreground: "#5a5758" + cursor: + text: "#ffffff" + cursor: "#5a5758" + normal: + black: "#231f20" + red: "#ee2e24" + green: "#00853e" + yellow: "#ffd204" + blue: "#009ddc" + magenta: "#98005d" + cyan: "#85cebc" + white: "#d9d8d8" + bright: + black: "#737171" + red: "#ee2e24" + green: "#00853e" + yellow: "#ffd204" + blue: "#009ddc" + magenta: "#98005d" + cyan: "#85cebc" + white: "#ffffff" diff --git a/.config/alacritty/alacritty-themes/themes/Marrakesh.dark.yml b/.config/alacritty/alacritty-themes/themes/Marrakesh.dark.yml new file mode 100755 index 0000000..1a47917 --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Marrakesh.dark.yml @@ -0,0 +1,27 @@ +colors: + name: Marrakesh (dark) + author: Chris Kempson + primary: + background: "#201602" + foreground: "#948e48" + cursor: + text: "#201602" + cursor: "#948e48" + normal: + black: "#201602" + red: "#c35359" + green: "#18974e" + yellow: "#a88339" + blue: "#477ca1" + magenta: "#8868b3" + cyan: "#75a738" + white: "#948e48" + bright: + black: "#6c6823" + red: "#c35359" + green: "#18974e" + yellow: "#a88339" + blue: "#477ca1" + magenta: "#8868b3" + cyan: "#75a738" + white: "#faf0a5" diff --git a/.config/alacritty/alacritty-themes/themes/Marrakesh.light.yml b/.config/alacritty/alacritty-themes/themes/Marrakesh.light.yml new file mode 100755 index 0000000..5d47436 --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Marrakesh.light.yml @@ -0,0 +1,27 @@ +colors: + name: Marrakesh (light) + author: Chris Kempson + primary: + background: "#faf0a5" + foreground: "#5f5b17" + cursor: + text: "#faf0a5" + cursor: "#5f5b17" + normal: + black: "#201602" + red: "#c35359" + green: "#18974e" + yellow: "#a88339" + blue: "#477ca1" + magenta: "#8868b3" + cyan: "#75a738" + white: "#948e48" + bright: + black: "#6c6823" + red: "#c35359" + green: "#18974e" + yellow: "#a88339" + blue: "#477ca1" + magenta: "#8868b3" + cyan: "#75a738" + white: "#faf0a5" diff --git a/.config/alacritty/alacritty-themes/themes/Material-Theme.yml b/.config/alacritty/alacritty-themes/themes/Material-Theme.yml new file mode 100755 index 0000000..3bf4c2e --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Material-Theme.yml @@ -0,0 +1,28 @@ +# Colors (Material Theme) +colors: + # Default colors + primary: + background: '#263238' + foreground: '#eeffff' + + # Normal colors + normal: + black: '#000000' # Arbitrary + red: '#e53935' + green: '#91b859' + yellow: '#ffb62c' + blue: '#6182b8' + magenta: '#ff5370' # Dark pink of the original material theme + cyan: '#39adb5' + white: '#a0a0a0' # Arbitrary + + # Bright colors + bright: + black: '#4e4e4e' # Arbitrary + red: '#ff5370' + green: '#c3e88d' + yellow: '#ffcb6b' + blue: '#82aaff' + magenta: '#f07178' # Pink of the original material theme + cyan: '#89ddff' + white: '#ffffff' # Arbitrary diff --git a/.config/alacritty/alacritty-themes/themes/Material.yml b/.config/alacritty/alacritty-themes/themes/Material.yml new file mode 100755 index 0000000..9d7f038 --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Material.yml @@ -0,0 +1,27 @@ +colors: + name: Material + author: "" + primary: + background: "#263238" + foreground: "#eceff1" + cursor: + text: "#263238" + cursor: "#eceff1" + normal: + black: "#263238" + red: "#ff9800" + green: "#8bc34a" + yellow: "#ffc107" + blue: "#03a9f4" + magenta: "#e91e63" + cyan: "#009688" + white: "#cfd8dc" + bright: + black: "#37474f" + red: "#ffa74d" + green: "#9ccc65" + yellow: "#ffa000" + blue: "#81d4fa" + magenta: "#ad1457" + cyan: "#26a69a" + white: "#eceff1" diff --git a/.config/alacritty/alacritty-themes/themes/Mikado.yml b/.config/alacritty/alacritty-themes/themes/Mikado.yml new file mode 100755 index 0000000..a65a0f4 --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Mikado.yml @@ -0,0 +1,27 @@ +colors: + name: Mikado + author: "" + primary: + background: "#000000" + foreground: "#ffffff" + cursor: + text: "#000000" + cursor: "#ffffff" + normal: + black: "#322a2c" + red: "#a04363" + green: "#9b9329" + yellow: "#bf7a29" + blue: "#6a8c8c" + magenta: "#856774" + cyan: "#757978" + white: "#bcbcaf" + bright: + black: "#46423b" + red: "#ae837a" + green: "#b4aa30" + yellow: "#c7a551" + blue: "#74999e" + magenta: "#9c818e" + cyan: "#9fa590" + white: "#c1c4bc" diff --git a/.config/alacritty/alacritty-themes/themes/Mikazuki.yml b/.config/alacritty/alacritty-themes/themes/Mikazuki.yml new file mode 100755 index 0000000..f000024 --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Mikazuki.yml @@ -0,0 +1,27 @@ +colors: + name: Mikazuki + author: "" + primary: + background: "#000000" + foreground: "#ffffff" + cursor: + text: "#000000" + cursor: "#ffffff" + normal: + black: "#2a1d17" + red: "#da1657" + green: "#3ea250" + yellow: "#e3d33d" + blue: "#3ea290" + magenta: "#ff850d" + cyan: "#8c16da" + white: "#e9e9e9" + bright: + black: "#4f362b" + red: "#da4375" + green: "#6cb87a" + yellow: "#e3da84" + blue: "#8ca8a3" + magenta: "#ffa64f" + cyan: "#a167c7" + white: "#fdfdfd" diff --git a/.config/alacritty/alacritty-themes/themes/Mocha.dark.yml b/.config/alacritty/alacritty-themes/themes/Mocha.dark.yml new file mode 100755 index 0000000..5656153 --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Mocha.dark.yml @@ -0,0 +1,27 @@ +colors: + name: Mocha (dark) + author: Chris Kempson + primary: + background: "#3b3228" + foreground: "#d0c8c6" + cursor: + text: "#3b3228" + cursor: "#d0c8c6" + normal: + black: "#3b3228" + red: "#cb6077" + green: "#beb55b" + yellow: "#f4bc87" + blue: "#8ab3b5" + magenta: "#a89bb9" + cyan: "#7bbda4" + white: "#d0c8c6" + bright: + black: "#7e705a" + red: "#cb6077" + green: "#beb55b" + yellow: "#f4bc87" + blue: "#8ab3b5" + magenta: "#a89bb9" + cyan: "#7bbda4" + white: "#f5eeeb" diff --git a/.config/alacritty/alacritty-themes/themes/Mocha.light.yml b/.config/alacritty/alacritty-themes/themes/Mocha.light.yml new file mode 100755 index 0000000..1cb5c89 --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Mocha.light.yml @@ -0,0 +1,27 @@ +colors: + name: Mocha (light) + author: Chris Kempson + primary: + background: "#f5eeeb" + foreground: "#645240" + cursor: + text: "#f5eeeb" + cursor: "#645240" + normal: + black: "#3b3228" + red: "#cb6077" + green: "#beb55b" + yellow: "#f4bc87" + blue: "#8ab3b5" + magenta: "#a89bb9" + cyan: "#7bbda4" + white: "#d0c8c6" + bright: + black: "#7e705a" + red: "#cb6077" + green: "#beb55b" + yellow: "#f4bc87" + blue: "#8ab3b5" + magenta: "#a89bb9" + cyan: "#7bbda4" + white: "#f5eeeb" diff --git a/.config/alacritty/alacritty-themes/themes/Molokai.yml b/.config/alacritty/alacritty-themes/themes/Molokai.yml new file mode 100755 index 0000000..eff4174 --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Molokai.yml @@ -0,0 +1,26 @@ +# Colors (Molokai Dark) +colors: + # Default colors + primary: + background: '#1B1D1E' + foreground: '#F8F8F2' + # Normal colors + normal: + black: '#333333' + red: '#C4265E' + green: '#86B42B' + yellow: '#B3B42B' + blue: '#6A7EC8' + magenta: '#8C6BC8' + cyan: '#56ADBC' + white: '#E3E3DD' + # Bright colors + bright: + black: '#666666' + red: '#F92672' + green: '#A6E22E' + yellow: '#E2E22E' + blue: '#819AFF' + magenta: '#AE81FF' + cyan: '#66D9EF' + white: '#F8F8F2' diff --git a/.config/alacritty/alacritty-themes/themes/Monokai-Pro.yml b/.config/alacritty/alacritty-themes/themes/Monokai-Pro.yml new file mode 100755 index 0000000..d4539cb --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Monokai-Pro.yml @@ -0,0 +1,28 @@ +# Colors (Monokai Pro) +colors: + # 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' diff --git a/.config/alacritty/alacritty-themes/themes/Monokai-Soda.yml b/.config/alacritty/alacritty-themes/themes/Monokai-Soda.yml new file mode 100755 index 0000000..3dff99e --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Monokai-Soda.yml @@ -0,0 +1,28 @@ +# Colors (Monokai Soda) +colors: + # Default colors + primary: + background: '#1a1a1a' + foreground: '#c4c5b5' + + # Normal colors + normal: + black: '#1a1a1a' + red: '#f4005f' + green: '#98e024' + yellow: '#fa8419' + blue: '#9d65ff' + magenta: '#f4005f' + cyan: '#58d1eb' + white: '#c4c5b5' + + # Bright colors + bright: + black: '#625e4c' + red: '#f4005f' + green: '#98e024' + yellow: '#e0d561' + blue: '#9d65ff' + magenta: '#f4005f' + cyan: '#58d1eb' + white: '#f6f6ef' diff --git a/.config/alacritty/alacritty-themes/themes/Monokai.dark.yml b/.config/alacritty/alacritty-themes/themes/Monokai.dark.yml new file mode 100755 index 0000000..0811a8f --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Monokai.dark.yml @@ -0,0 +1,27 @@ +colors: + name: Monokai (dark) + author: Chris Kempson + primary: + background: "#272822" + foreground: "#f8f8f2" + cursor: + text: "#272822" + cursor: "#f8f8f2" + normal: + black: "#272822" + red: "#f92672" + green: "#a6e22e" + yellow: "#f4bf75" + blue: "#66d9ef" + magenta: "#ae81ff" + cyan: "#a1efe4" + white: "#f8f8f2" + bright: + black: "#75715e" + red: "#f92672" + green: "#a6e22e" + yellow: "#f4bf75" + blue: "#66d9ef" + magenta: "#ae81ff" + cyan: "#a1efe4" + white: "#f9f8f5" diff --git a/.config/alacritty/alacritty-themes/themes/Monokai.light.yml b/.config/alacritty/alacritty-themes/themes/Monokai.light.yml new file mode 100755 index 0000000..52386b1 --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Monokai.light.yml @@ -0,0 +1,27 @@ +colors: + name: Monokai (light) + author: Chris Kempson + primary: + background: "#f9f8f5" + foreground: "#49483e" + cursor: + text: "#f9f8f5" + cursor: "#49483e" + normal: + black: "#272822" + red: "#f92672" + green: "#a6e22e" + yellow: "#f4bf75" + blue: "#66d9ef" + magenta: "#ae81ff" + cyan: "#a1efe4" + white: "#f8f8f2" + bright: + black: "#75715e" + red: "#f92672" + green: "#a6e22e" + yellow: "#f4bf75" + blue: "#66d9ef" + magenta: "#ae81ff" + cyan: "#a1efe4" + white: "#f9f8f5" diff --git a/.config/alacritty/alacritty-themes/themes/Monotheme.yml b/.config/alacritty/alacritty-themes/themes/Monotheme.yml new file mode 100755 index 0000000..d520f9b --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Monotheme.yml @@ -0,0 +1,27 @@ +colors: + name: Mono Theme + author: "" + primary: + background: "#000000" + foreground: "#ffffff" + cursor: + text: "#000000" + cursor: "#ffffff" + normal: + black: "#000000" + red: "#6b6b6b" + green: "#c4c4c4" + yellow: "#b3b3b3" + blue: "#999999" + magenta: "#717171" + cyan: "#8a8a8a" + white: "#b5cabb" + bright: + black: "#202020" + red: "#464646" + green: "#f8f8f8" + yellow: "#eeeeee" + blue: "#7c7c7c" + magenta: "#adadad" + cyan: "#c0c0c0" + white: "#99ac9e" diff --git a/.config/alacritty/alacritty-themes/themes/Mostly-bright.yml b/.config/alacritty/alacritty-themes/themes/Mostly-bright.yml new file mode 100755 index 0000000..af47f7d --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Mostly-bright.yml @@ -0,0 +1,27 @@ +colors: + name: Mostly Bright + author: m83 + primary: + background: "#F3F3F3" + foreground: "#707070" + cursor: + text: "#F3F3F3" + cursor: "#707070" + normal: + black: "#D3D3D3" + red: "#EF6B7B" + green: "#A1D569" + yellow: "#F59335" + blue: "#4EC2E8" + magenta: "#FEC7CD" + cyan: "#95C1C0" + white: "#707070" + bright: + black: "#B3B3B3" + red: "#ED5466" + green: "#AFDB80" + yellow: "#F59335" + blue: "#5DC7EA" + magenta: "#D2A4B4" + cyan: "#75A1A0" + white: "#909090" diff --git a/.config/alacritty/alacritty-themes/themes/Muse.yml b/.config/alacritty/alacritty-themes/themes/Muse.yml new file mode 100755 index 0000000..aa04cd8 --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Muse.yml @@ -0,0 +1,27 @@ +colors: + name: Muse + author: "" + primary: + background: "#000000" + foreground: "#ffffff" + cursor: + text: "#000000" + cursor: "#ffffff" + normal: + black: "#2e3436" + red: "#a31604" + green: "#447241" + yellow: "#c1951a" + blue: "#425387" + magenta: "#965d98" + cyan: "#06989a" + white: "#d3d7cf" + bright: + black: "#555753" + red: "#c60001" + green: "#27a343" + yellow: "#d5a30e" + blue: "#4a5a8d" + magenta: "#893c8c" + cyan: "#12bccb" + white: "#eeeeec" diff --git a/.config/alacritty/alacritty-themes/themes/Muzieca lowcontrast.yml b/.config/alacritty/alacritty-themes/themes/Muzieca lowcontrast.yml new file mode 100755 index 0000000..898da2a --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Muzieca lowcontrast.yml @@ -0,0 +1,27 @@ +colors: + name: Low Contrast + author: Muzieca + primary: + background: "#3c3b37" + foreground: "#93a1a1" + cursor: + text: "#3c3b37" + cursor: "#93a1a1" + normal: + black: "#5f5f5f" + red: "#d96468" + green: "#a2d964" + yellow: "#d9c964" + blue: "#64a2d9" + magenta: "#9a64d9" + cyan: "#64d9d5" + white: "#989898" + bright: + black: "#828282" + red: "#d98f93" + green: "#b8d98f" + yellow: "#d9cf8f" + blue: "#8f99d9" + magenta: "#b08fd9" + cyan: "#8fd9d5" + white: "#c5c5c5" diff --git a/.config/alacritty/alacritty-themes/themes/Muzieca mono.yml b/.config/alacritty/alacritty-themes/themes/Muzieca mono.yml new file mode 100755 index 0000000..5ca3924 --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Muzieca mono.yml @@ -0,0 +1,27 @@ +colors: + name: Mono + author: Muzieca + primary: + background: "#000000" + foreground: "#ffffff" + cursor: + text: "#000000" + cursor: "#ffffff" + normal: + black: "#000000" + red: "#111111" + green: "#222222" + yellow: "#333333" + blue: "#444444" + magenta: "#555555" + cyan: "#666666" + white: "#777777" + bright: + black: "#090909" + red: "#181818" + green: "#272727" + yellow: "#393939" + blue: "#484848" + magenta: "#595959" + cyan: "#707070" + white: "#818181" diff --git a/.config/alacritty/alacritty-themes/themes/Muzieca pastel white.yml b/.config/alacritty/alacritty-themes/themes/Muzieca pastel white.yml new file mode 100755 index 0000000..5e14099 --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Muzieca pastel white.yml @@ -0,0 +1,27 @@ +colors: + name: Pastel White + author: Muzieca + primary: + background: "#000000" + foreground: "#ffffff" + cursor: + text: "#000000" + cursor: "#ffffff" + normal: + black: "#646e5b" + red: "#db7464" + green: "#a7e160" + yellow: "#dbd560" + blue: "#69b2d6" + magenta: "#a073d6" + cyan: "#69e1d3" + white: "#9ea894" + bright: + black: "#88927e" + red: "#dba08f" + green: "#bde18b" + yellow: "#dbda8b" + blue: "#95a9d6" + magenta: "#b59fd6" + cyan: "#95e1d2" + white: "#c9d0c2" diff --git a/.config/alacritty/alacritty-themes/themes/Nancy.yml b/.config/alacritty/alacritty-themes/themes/Nancy.yml new file mode 100755 index 0000000..7407fc7 --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Nancy.yml @@ -0,0 +1,27 @@ +colors: + name: Nancy + author: "" + primary: + background: "#010101" + foreground: "#ffffff" + cursor: + text: "#010101" + cursor: "#ffffff" + normal: + black: "#1b1d1e" + red: "#f92672" + green: "#82b414" + yellow: "#fd971f" + blue: "#4e82aa" + magenta: "#8c54fe" + cyan: "#465457" + white: "#ccccc6" + bright: + black: "#505354" + red: "#ff5995" + green: "#b6e354" + yellow: "#feed6c" + blue: "#0c73c2" + magenta: "#9e6ffe" + cyan: "#899ca1" + white: "#f8f8f2" diff --git a/.config/alacritty/alacritty-themes/themes/Navy-and-ivory.yml b/.config/alacritty/alacritty-themes/themes/Navy-and-ivory.yml new file mode 100755 index 0000000..2471b30 --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Navy-and-ivory.yml @@ -0,0 +1,27 @@ +colors: + name: Navy and Ivory + author: hal + primary: + background: "#021b21" + foreground: "#e8dfd6" + cursor: + text: "#021b21" + cursor: "#e8dfd6" + normal: + black: "#032c36" + red: "#c2454e" + green: "#7cbf9e" + yellow: "#8a7a63" + blue: "#2e3340" + magenta: "#ff5879" + cyan: "#44b5b1" + white: "#f2f1b9" + bright: + black: "#065f73" + red: "#ef5847" + green: "#a2d9b1" + yellow: "#beb090" + blue: "#61778d" + magenta: "#ff99a1" + cyan: "#9ed9d8" + white: "#f6f6c9" diff --git a/.config/alacritty/alacritty-themes/themes/Neon.yml b/.config/alacritty/alacritty-themes/themes/Neon.yml new file mode 100755 index 0000000..6e4808a --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Neon.yml @@ -0,0 +1,27 @@ +colors: + name: Neon + author: "" + primary: + background: "#171717" + foreground: "#f8f8f8" + cursor: + text: "#171717" + cursor: "#f8f8f8" + normal: + black: "#171717" + red: "#d81765" + green: "#97d01a" + yellow: "#ffa800" + blue: "#16b1fb" + magenta: "#ff2491" + cyan: "#0fdcb6" + white: "#ebebeb" + bright: + black: "#38252c" + red: "#ff0000" + green: "#76b639" + yellow: "#e1a126" + blue: "#289cd5" + magenta: "#ff2491" + cyan: "#0a9b81" + white: "#f8f8f8" diff --git a/.config/alacritty/alacritty-themes/themes/New-Moon.yml b/.config/alacritty/alacritty-themes/themes/New-Moon.yml new file mode 100755 index 0000000..22a205e --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/New-Moon.yml @@ -0,0 +1,26 @@ +# Colors (New Moon) +colors: + # Default colors + primary: + background: '#2D2D2D' + foreground: '#B3B9C5' + # Normal colors + normal: + black: '#2D2D2D' + red: '#F2777A' + green: '#92D192' + yellow: '#FFD479' + blue: '#6AB0F3' + magenta: '#E1A6F2' + cyan: '#76D4D6' + white: '#B3B9C5' + # Bright colors + bright: + black: '#777C85' + red: '#F2777A' + green: '#76D4D6' + yellow: '#FFEEA6' + blue: '#6AB0F3' + magenta: '#E1A6F2' + cyan: '#76D4D6' + white: '#FFFFFF' diff --git a/.config/alacritty/alacritty-themes/themes/Nightfly.yml b/.config/alacritty/alacritty-themes/themes/Nightfly.yml new file mode 100755 index 0000000..69091ec --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Nightfly.yml @@ -0,0 +1,36 @@ +# Colors (Nightfly) +colors: + # Default colors + primary: + background: '#011627' + foreground: '#acb4c2' + + cursor: + text: '#fafafa' + cursor: '#9ca1aa' + + selection: + text: '#080808' + background: '#b2ceee' + + # Normal colors + normal: + black: '#1d3b53' + red: '#fc514e' + green: '#a1cd5e' + yellow: '#e3d18a' + blue: '#82aaff' + magenta: '#c792ea' + cyan: '#7fdbca' + white: '#a1aab8' + + # Bright colors + bright: + black: '#7c8f8f' + red: '#ff5874' + green: '#21c7a8' + yellow: '#ecc48d' + blue: '#82aaff' + magenta: '#ae81ff' + cyan: '#7fdbca' + white: '#d6deeb' diff --git a/.config/alacritty/alacritty-themes/themes/Nord.yml b/.config/alacritty/alacritty-themes/themes/Nord.yml new file mode 100755 index 0000000..3c98e0c --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Nord.yml @@ -0,0 +1,28 @@ +# Colors (Nord) +colors: + # 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' diff --git a/.config/alacritty/alacritty-themes/themes/Nova.yml b/.config/alacritty/alacritty-themes/themes/Nova.yml new file mode 100755 index 0000000..0463210 --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Nova.yml @@ -0,0 +1,32 @@ +# Colors (Nova) +colors: + # Default colors + primary: + background: '#3C4C55' + foreground: '#C5D4DD' + + cursor: + text: '#212121' + cursor: '#C0C5CE' + + # Normal colors + normal: + black: '#3C4C55' + red: '#DF8C8C' + green: '#A8CE93' + yellow: '#DADA93' + blue: '#83AFE5' + magenta: '#9A93E1' + cyan: '#7FC1CA' + white: '#C5D4DD' + + # Bright colors + bright: + black: '#899BA6' + red: '#F2C38F' + green: '#A8CE93' + yellow: '#DADA93' + blue: '#83AFE5' + magenta: '#D18EC2' + cyan: '#7FC1CA' + white: '#E6EEF3' diff --git a/.config/alacritty/alacritty-themes/themes/Nucolors.yml b/.config/alacritty/alacritty-themes/themes/Nucolors.yml new file mode 100755 index 0000000..6a74f48 --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Nucolors.yml @@ -0,0 +1,27 @@ +colors: + name: Nucolors + author: "" + primary: + background: "#000000" + foreground: "#ffffff" + cursor: + text: "#000000" + cursor: "#ffffff" + normal: + black: "#393939" + red: "#ff9f95" + green: "#e2ffc7" + yellow: "#ffffb9" + blue: "#a8ceea" + magenta: "#e2b5cc" + cyan: "#c2efff" + white: "#dddddd" + bright: + black: "#474747" + red: "#ff8d80" + green: "#dbffb3" + yellow: "#ffbe64" + blue: "#7eb6ff" + magenta: "#e296ff" + cyan: "#9ce9ff" + white: "#dddddd" diff --git a/.config/alacritty/alacritty-themes/themes/Nudge.yml b/.config/alacritty/alacritty-themes/themes/Nudge.yml new file mode 100755 index 0000000..665b610 --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Nudge.yml @@ -0,0 +1,27 @@ +colors: + name: Nudge + author: "" + primary: + background: "#000000" + foreground: "#ffffff" + cursor: + text: "#000000" + cursor: "#ffffff" + normal: + black: "#658280" + red: "#822f5d" + green: "#184a31" + yellow: "#9d4500" + blue: "#304465" + magenta: "#330801" + cyan: "#175552" + white: "#110005" + bright: + black: "#8ca8a6" + red: "#a24b76" + green: "#28634d" + yellow: "#9d5823" + blue: "#415c77" + magenta: "#532706" + cyan: "#3a6868" + white: "#330801" diff --git a/.config/alacritty/alacritty-themes/themes/NumixDarkest.yml b/.config/alacritty/alacritty-themes/themes/NumixDarkest.yml new file mode 100755 index 0000000..1c8a2c1 --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/NumixDarkest.yml @@ -0,0 +1,27 @@ +colors: + name: Numix Darkest + author: "" + primary: + background: "#282828" + foreground: "#a2a2a2" + cursor: + text: "#282828" + cursor: "#a2a2a2" + normal: + black: "#555555" + red: "#9c3528" + green: "#61bc3b" + yellow: "#f3b43a" + blue: "#0d68a8" + magenta: "#744560" + cyan: "#288e9c" + white: "#a2a2a2" + bright: + black: "#888888" + red: "#d64937" + green: "#86df5d" + yellow: "#fdd75a" + blue: "#0f75bd" + magenta: "#9e5e83" + cyan: "#37c3d6" + white: "#f9f9f9" diff --git a/.config/alacritty/alacritty-themes/themes/OK100 - Matrix.yml b/.config/alacritty/alacritty-themes/themes/OK100 - Matrix.yml new file mode 100755 index 0000000..57c105b --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/OK100 - Matrix.yml @@ -0,0 +1,27 @@ +colors: + name: Matrix + author: OK100 + primary: + background: "#000000" + foreground: "#00cc00" + cursor: + text: "#000000" + cursor: "#00cc00" + normal: + black: "#000000" + red: "#55ff55" + green: "#00cc00" + yellow: "#00cc00" + blue: "#005500" + magenta: "#55ff55" + cyan: "#00cc00" + white: "#00cc00" + bright: + black: "#000000" + red: "#55ff55" + green: "#55ff55" + yellow: "#55ff55" + blue: "#005500" + magenta: "#55ff55" + cyan: "#55ff55" + white: "#00cc00" diff --git a/.config/alacritty/alacritty-themes/themes/Ocean.dark.yml b/.config/alacritty/alacritty-themes/themes/Ocean.dark.yml new file mode 100755 index 0000000..72ddc9d --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Ocean.dark.yml @@ -0,0 +1,27 @@ +colors: + name: Ocean (dark) + author: Chris Kempson + primary: + background: "#2b303b" + foreground: "#c0c5ce" + cursor: + text: "#2b303b" + cursor: "#c0c5ce" + normal: + black: "#2b303b" + red: "#bf616a" + green: "#a3be8c" + yellow: "#ebcb8b" + blue: "#8fa1b3" + magenta: "#b48ead" + cyan: "#96b5b4" + white: "#c0c5ce" + bright: + black: "#65737e" + red: "#bf616a" + green: "#a3be8c" + yellow: "#ebcb8b" + blue: "#8fa1b3" + magenta: "#b48ead" + cyan: "#96b5b4" + white: "#eff1f5" diff --git a/.config/alacritty/alacritty-themes/themes/Ocean.light.yml b/.config/alacritty/alacritty-themes/themes/Ocean.light.yml new file mode 100755 index 0000000..889760a --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Ocean.light.yml @@ -0,0 +1,27 @@ +colors: + name: Ocean (light) + author: Chris Kempson + primary: + background: "#eff1f5" + foreground: "#4f5b66" + cursor: + text: "#eff1f5" + cursor: "#4f5b66" + normal: + black: "#2b303b" + red: "#bf616a" + green: "#a3be8c" + yellow: "#ebcb8b" + blue: "#8fa1b3" + magenta: "#b48ead" + cyan: "#96b5b4" + white: "#c0c5ce" + bright: + black: "#65737e" + red: "#bf616a" + green: "#a3be8c" + yellow: "#ebcb8b" + blue: "#8fa1b3" + magenta: "#b48ead" + cyan: "#96b5b4" + white: "#eff1f5" diff --git a/.config/alacritty/alacritty-themes/themes/Oceanic-Next.yml b/.config/alacritty/alacritty-themes/themes/Oceanic-Next.yml new file mode 100755 index 0000000..1e92c3a --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Oceanic-Next.yml @@ -0,0 +1,33 @@ +# Colors (Oceanic Next) +colors: + # 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' diff --git a/.config/alacritty/alacritty-themes/themes/One-Dark.yml b/.config/alacritty/alacritty-themes/themes/One-Dark.yml new file mode 100755 index 0000000..5a56179 --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/One-Dark.yml @@ -0,0 +1,30 @@ +# Colors (One Dark) +colors: + # Default colors + primary: + background: '#282c34' + foreground: '#abb2bf' + + # Normal colors + normal: + # NOTE: Use '#131613' for the `black` color if you'd like to see + # black text on the background. + black: '#282c34' + red: '#e06c75' + green: '#98c379' + yellow: '#d19a66' + blue: '#61afef' + magenta: '#c678dd' + cyan: '#56b6c2' + white: '#abb2bf' + + # Bright colors + bright: + black: '#5c6370' + red: '#e06c75' + green: '#98c379' + yellow: '#d19a66' + blue: '#61afef' + magenta: '#c678dd' + cyan: '#56b6c2' + white: '#ffffff' diff --git a/.config/alacritty/alacritty-themes/themes/One-Light.yml b/.config/alacritty/alacritty-themes/themes/One-Light.yml new file mode 100755 index 0000000..dae3ef7 --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/One-Light.yml @@ -0,0 +1,30 @@ +# Colors (One Light) +colors: + # Default colors + primary: + foreground: '#282c34' + background: '#ffffff' + + # Normal colors + normal: + # NOTE: Use '#131613' for the `black` color if you'd like to see + # black text on the background. + black: '#282c34' + red: '#e06c75' + green: '#98c379' + yellow: '#d19a66' + blue: '#61afef' + magenta: '#c678dd' + cyan: '#56b6c2' + white: '#abb2bf' + + # Bright colors + bright: + black: '#5c6370' + red: '#e06c75' + green: '#98c379' + yellow: '#d19a66' + blue: '#61afef' + magenta: '#c678dd' + cyan: '#56b6c2' + white: '#ffffff' diff --git a/.config/alacritty/alacritty-themes/themes/Orangish.yml b/.config/alacritty/alacritty-themes/themes/Orangish.yml new file mode 100755 index 0000000..a637fe8 --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Orangish.yml @@ -0,0 +1,27 @@ +colors: + name: Orangish + author: "" + primary: + background: "#000000" + foreground: "#ffffff" + cursor: + text: "#000000" + cursor: "#ffffff" + normal: + black: "#251f1f" + red: "#eb4509" + green: "#94e76b" + yellow: "#ffac18" + blue: "#46aede" + magenta: "#e32c57" + cyan: "#d6dbac" + white: "#efefef" + bright: + black: "#5e5e5e" + red: "#eb4509" + green: "#95e76b" + yellow: "#ffac18" + blue: "#46aede" + magenta: "#e32c57" + cyan: "#d6dbac" + white: "#efefef" diff --git a/.config/alacritty/alacritty-themes/themes/Oxide.yml b/.config/alacritty/alacritty-themes/themes/Oxide.yml new file mode 100755 index 0000000..e1749f2 --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Oxide.yml @@ -0,0 +1,33 @@ +# Colors (Oxide) +colors: + # Default colors + primary: + background: '#212121' + foreground: '#c0c5ce' + bright_foreground: '#f3f4f5' + + cursor: + text: '#212121' + cursor: '#c0c5ce' + + # Normal colors + normal: + black: '#212121' + red: '#e57373' + green: '#a6bc69' + yellow: '#fac863' + blue: '#6699cc' + magenta: '#c594c5' + cyan: '#5fb3b3' + white: '#c0c5ce' + + # Bright colors + bright: + black: '#5c5c5c' + red: '#e57373' + green: '#a6bc69' + yellow: '#fac863' + blue: '#6699cc' + magenta: '#c594c5' + cyan: '#5fb3b3' + white: '#f3f4f5' diff --git a/.config/alacritty/alacritty-themes/themes/Palenight.yml b/.config/alacritty/alacritty-themes/themes/Palenight.yml new file mode 100755 index 0000000..76eb244 --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Palenight.yml @@ -0,0 +1,33 @@ +# Colors (Palenight) +colors: + # Default colors + primary: + background: '#292d3e' + foreground: '#959dcb' + bright_foreground: '#d0d0d0' + + cursor: + text: '#292d3e' + cursor: '#959dcb' + + # 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' \ No newline at end of file diff --git a/.config/alacritty/alacritty-themes/themes/Panda.yml b/.config/alacritty/alacritty-themes/themes/Panda.yml new file mode 100755 index 0000000..66e39ac --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Panda.yml @@ -0,0 +1,29 @@ +# Colors (Panda) +colors: + cursor: + text: "#fefff2" + cursor: "#ffb86c" + selection: + text: "#e6e6e6" + background: "#555555" + primary: + background: "#292a2b" + foreground: "#e6e6e6" + normal: + black: "#292a2b" + red: "#ff2c6d" + green: "#19f9d8" + yellow: "#ffb86c" + blue: "#45a9f9" + magenta: "#ff75b5" + cyan: "#6fc1ff" + white: "#e6e6e6" + bright: + black: "#555555" + red: "#ff2c6d" + green: "#19f9d8" + yellow: "#ffcc95" + blue: "#6fc1ff" + magenta: "#ff9ac1" + cyan: "#6fc1ff" + white: "#ffffff" \ No newline at end of file diff --git a/.config/alacritty/alacritty-themes/themes/Paraiso.dark.yml b/.config/alacritty/alacritty-themes/themes/Paraiso.dark.yml new file mode 100755 index 0000000..c06bc7a --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Paraiso.dark.yml @@ -0,0 +1,27 @@ +colors: + name: Paraiso (dark) + author: Chris Kempson + primary: + background: "#2f1e2e" + foreground: "#a39e9b" + cursor: + text: "#2f1e2e" + cursor: "#a39e9b" + normal: + black: "#2f1e2e" + red: "#ef6155" + green: "#48b685" + yellow: "#fec418" + blue: "#06b6ef" + magenta: "#815ba4" + cyan: "#5bc4bf" + white: "#a39e9b" + bright: + black: "#776e71" + red: "#ef6155" + green: "#48b685" + yellow: "#fec418" + blue: "#06b6ef" + magenta: "#815ba4" + cyan: "#5bc4bf" + white: "#e7e9db" diff --git a/.config/alacritty/alacritty-themes/themes/Paraiso.light.yml b/.config/alacritty/alacritty-themes/themes/Paraiso.light.yml new file mode 100755 index 0000000..5ba6f92 --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Paraiso.light.yml @@ -0,0 +1,27 @@ +colors: + name: Paraiso (light) + author: Chris Kempson + primary: + background: "#e7e9db" + foreground: "#4f424c" + cursor: + text: "#e7e9db" + cursor: "#4f424c" + normal: + black: "#2f1e2e" + red: "#ef6155" + green: "#48b685" + yellow: "#fec418" + blue: "#06b6ef" + magenta: "#815ba4" + cyan: "#5bc4bf" + white: "#a39e9b" + bright: + black: "#776e71" + red: "#ef6155" + green: "#48b685" + yellow: "#fec418" + blue: "#06b6ef" + magenta: "#815ba4" + cyan: "#5bc4bf" + white: "#e7e9db" diff --git a/.config/alacritty/alacritty-themes/themes/Parker_brothers.yml b/.config/alacritty/alacritty-themes/themes/Parker_brothers.yml new file mode 100755 index 0000000..365f480 --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Parker_brothers.yml @@ -0,0 +1,27 @@ +colors: + name: Parker Brothers + author: "" + primary: + background: "#000000" + foreground: "#ffffff" + cursor: + text: "#000000" + cursor: "#ffffff" + normal: + black: "#322a2c" + red: "#79220e" + green: "#344b1b" + yellow: "#b45b00" + blue: "#434045" + magenta: "#5c1e25" + cyan: "#394745" + white: "#ae8842" + bright: + black: "#46423b" + red: "#aa261f" + green: "#76550f" + yellow: "#b57f02" + blue: "#908862" + magenta: "#624a35" + cyan: "#393e38" + white: "#a59058" diff --git a/.config/alacritty/alacritty-themes/themes/Pencil-Dark.yml b/.config/alacritty/alacritty-themes/themes/Pencil-Dark.yml new file mode 100755 index 0000000..44b859f --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Pencil-Dark.yml @@ -0,0 +1,26 @@ +# Colors (Pencil Dark) +colors: + # Default Colors + primary: + background: '#212121' + foreground: '#f1f1f1' + # Normal colors + normal: + black: '#212121' + red: '#c30771' + green: '#10a778' + yellow: '#a89c14' + blue: '#008ec4' + magenta: '#523c79' + cyan: '#20a5ba' + white: '#e0e0e0' + # Bright colors + bright: + black: '#212121' + red: '#fb007a' + green: '#5fd7af' + yellow: '#f3e430' + blue: '#20bbfc' + magenta: '#6855de' + cyan: '#4fb8cc' + white: '#f1f1f1' diff --git a/.config/alacritty/alacritty-themes/themes/Pencil-Light.yml b/.config/alacritty/alacritty-themes/themes/Pencil-Light.yml new file mode 100755 index 0000000..9d4256d --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Pencil-Light.yml @@ -0,0 +1,26 @@ +# Colors (Pencil Light) +colors: + # Default Colors + primary: + background: '#f1f1f1' + foreground: '#424242' + # Normal colors + normal: + black: '#212121' + red: '#c30771' + green: '#10a778' + yellow: '#a89c14' + blue: '#008ec4' + magenta: '#523c79' + cyan: '#20a5ba' + white: '#e0e0e0' + # Bright colors + bright: + black: '#212121' + red: '#fb007a' + green: '#5fd7af' + yellow: '#f3e430' + blue: '#20bbfc' + magenta: '#6855de' + cyan: '#4fb8cc' + white: '#f1f1f1' diff --git a/.config/alacritty/alacritty-themes/themes/Phrak1.yml b/.config/alacritty/alacritty-themes/themes/Phrak1.yml new file mode 100755 index 0000000..99e2295 --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Phrak1.yml @@ -0,0 +1,27 @@ +colors: + name: Phrak1 + author: "" + primary: + background: "#000000" + foreground: "#a8a8a8" + cursor: + text: "#000000" + cursor: "#a8a8a8" + normal: + black: "#000000" + red: "#a80000" + green: "#00a800" + yellow: "#a85400" + blue: "#0000a8" + magenta: "#a800a8" + cyan: "#00a8a8" + white: "#a8a8a8" + bright: + black: "#545054" + red: "#f85450" + green: "#50fc50" + yellow: "#f8fc50" + blue: "#5054f8" + magenta: "#f854f8" + cyan: "#50fcf8" + white: "#f8fcf8" diff --git a/.config/alacritty/alacritty-themes/themes/Pop!-OS.yml b/.config/alacritty/alacritty-themes/themes/Pop!-OS.yml new file mode 100755 index 0000000..71d8a47 --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Pop!-OS.yml @@ -0,0 +1,27 @@ +colors: + # Default colors + primary: + background: '#333333' + foreground: '#F2F2F2' + + # Normal colors + normal: + black: '#333333' + red: '#CC0000' + green: '#4E9A06' + yellow: '#C4A000' + blue: '#3465A4' + magenta: '#75507B' + cyan: '#06989A' + white: '#D3D7CF' + + # Bright colors + bright: + black: '#88807C' + red: '#F15D22' + green: '#73C48F' + yellow: '#FFCE51' + blue: '#48B9C7' + magenta: '#AD7FA8' + cyan: '#34E2E2' + white: '#EEEEEC' diff --git a/.config/alacritty/alacritty-themes/themes/Pretty-and-pastel.yml b/.config/alacritty/alacritty-themes/themes/Pretty-and-pastel.yml new file mode 100755 index 0000000..9ce14bc --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Pretty-and-pastel.yml @@ -0,0 +1,27 @@ +colors: + name: Pretty and Pastel + author: IWAFU + primary: + background: "#151515" + foreground: "#888888" + cursor: + text: "#151515" + cursor: "#888888" + normal: + black: "#292929" + red: "#CF6A4C" + green: "#19CB00" + yellow: "#FAD07A" + blue: "#8197BF" + magenta: "#8787AF" + cyan: "#668799" + white: "#888888" + bright: + black: "#525252" + red: "#FF9D80" + green: "#23FD00" + yellow: "#FFEFBF" + blue: "#ACCAFF" + magenta: "#C4C4FF" + cyan: "#80BFAF" + white: "#E8E8D3" diff --git a/.config/alacritty/alacritty-themes/themes/Pulp.yml b/.config/alacritty/alacritty-themes/themes/Pulp.yml new file mode 100755 index 0000000..4ec7815 --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Pulp.yml @@ -0,0 +1,27 @@ +colors: + name: Pulp + author: "" + primary: + background: "#000000" + foreground: "#ffffff" + cursor: + text: "#000000" + cursor: "#ffffff" + normal: + black: "#86817e" + red: "#d75756" + green: "#688c7d" + yellow: "#ffb365" + blue: "#68778c" + magenta: "#fdb3b2" + cyan: "#86abd9" + white: "#f7f8f2" + bright: + black: "#86817e" + red: "#a63a3a" + green: "#688c7d" + yellow: "#ffb365" + blue: "#68778c" + magenta: "#8c686a" + cyan: "#86abd9" + white: "#f7f8f2" diff --git a/.config/alacritty/alacritty-themes/themes/Railscasts.dark.yml b/.config/alacritty/alacritty-themes/themes/Railscasts.dark.yml new file mode 100755 index 0000000..0a43b4e --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Railscasts.dark.yml @@ -0,0 +1,27 @@ +colors: + name: Railscasts (dark) + author: Chris Kempson + primary: + background: "#2b2b2b" + foreground: "#e6e1dc" + cursor: + text: "#2b2b2b" + cursor: "#e6e1dc" + normal: + black: "#2b2b2b" + red: "#da4939" + green: "#a5c261" + yellow: "#ffc66d" + blue: "#6d9cbe" + magenta: "#b6b3eb" + cyan: "#519f50" + white: "#e6e1dc" + bright: + black: "#5a647e" + red: "#da4939" + green: "#a5c261" + yellow: "#ffc66d" + blue: "#6d9cbe" + magenta: "#b6b3eb" + cyan: "#519f50" + white: "#f9f7f3" diff --git a/.config/alacritty/alacritty-themes/themes/Railscasts.light.yml b/.config/alacritty/alacritty-themes/themes/Railscasts.light.yml new file mode 100755 index 0000000..356cd3f --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Railscasts.light.yml @@ -0,0 +1,27 @@ +colors: + name: Railscasts (light) + author: Chris Kempson + primary: + background: "#f9f7f3" + foreground: "#3a4055" + cursor: + text: "#f9f7f3" + cursor: "#3a4055" + normal: + black: "#2b2b2b" + red: "#da4939" + green: "#a5c261" + yellow: "#ffc66d" + blue: "#6d9cbe" + magenta: "#b6b3eb" + cyan: "#519f50" + white: "#e6e1dc" + bright: + black: "#5a647e" + red: "#da4939" + green: "#a5c261" + yellow: "#ffc66d" + blue: "#6d9cbe" + magenta: "#b6b3eb" + cyan: "#519f50" + white: "#f9f7f3" diff --git a/.config/alacritty/alacritty-themes/themes/Rasi.yml b/.config/alacritty/alacritty-themes/themes/Rasi.yml new file mode 100755 index 0000000..a93ebff --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Rasi.yml @@ -0,0 +1,27 @@ +colors: + name: Rasi + author: "" + primary: + background: "#000000" + foreground: "#ffffff" + cursor: + text: "#000000" + cursor: "#ffffff" + normal: + black: "#1b1d1e" + red: "#f92672" + green: "#82b414" + yellow: "#fd971f" + blue: "#4e82aa" + magenta: "#8c54fe" + cyan: "#465457" + white: "#ccccc6" + bright: + black: "#505354" + red: "#ff5995" + green: "#b6e354" + yellow: "#feed6c" + blue: "#0c73c2" + magenta: "#9e6ffe" + cyan: "#899ca1" + white: "#f8f8f2" diff --git a/.config/alacritty/alacritty-themes/themes/Rezza.yml b/.config/alacritty/alacritty-themes/themes/Rezza.yml new file mode 100755 index 0000000..d1bbe73 --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Rezza.yml @@ -0,0 +1,27 @@ +colors: + name: Rezza + author: "" + primary: + background: "#222222" + foreground: "#dddddd" + cursor: + text: "#222222" + cursor: "#dddddd" + normal: + black: "#191919" + red: "#803232" + green: "#5b762f" + yellow: "#aa9943" + blue: "#324c80" + magenta: "#706c9a" + cyan: "#92b19e" + white: "#ffffff" + bright: + black: "#252525" + red: "#982b2b" + green: "#89b83f" + yellow: "#efef60" + blue: "#2b4f98" + magenta: "#826ab1" + cyan: "#a1cdcd" + white: "#dddddd" diff --git a/.config/alacritty/alacritty-themes/themes/Rooster - SOS.yml b/.config/alacritty/alacritty-themes/themes/Rooster - SOS.yml new file mode 100755 index 0000000..959d8fa --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Rooster - SOS.yml @@ -0,0 +1,27 @@ +colors: + name: SOS + author: Rooster + primary: + background: "#373b43" + foreground: "#78796f" + cursor: + text: "#373b43" + cursor: "#78796f" + normal: + black: "#373b43" + red: "#fdcd39" + green: "#fbfd59" + yellow: "#deac40" + blue: "#afb171" + magenta: "#b387e7" + cyan: "#63e860" + white: "#efdecb" + bright: + black: "#373b43" + red: "#fdcd39" + green: "#fbfd59" + yellow: "#deac40" + blue: "#afb171" + magenta: "#b387e7" + cyan: "#63e860" + white: "#efdecb" diff --git a/.config/alacritty/alacritty-themes/themes/Rydgel.yml b/.config/alacritty/alacritty-themes/themes/Rydgel.yml new file mode 100755 index 0000000..8e8195a --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Rydgel.yml @@ -0,0 +1,27 @@ +colors: + name: Rydgel + author: "" + primary: + background: "#000000" + foreground: "#ffffff" + cursor: + text: "#000000" + cursor: "#ffffff" + normal: + black: "#303430" + red: "#bf7979" + green: "#97b26b" + yellow: "#cdcdc1" + blue: "#86a2be" + magenta: "#d9b798" + cyan: "#a1b5cd" + white: "#ffffff" + bright: + black: "#cdb5cd" + red: "#f4a45f" + green: "#c5f779" + yellow: "#ffffed" + blue: "#98afd9" + magenta: "#d7d998" + cyan: "#a1b5cd" + white: "#dedede" diff --git a/.config/alacritty/alacritty-themes/themes/S3r0-modified.yml b/.config/alacritty/alacritty-themes/themes/S3r0-modified.yml new file mode 100755 index 0000000..471a0d1 --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/S3r0-modified.yml @@ -0,0 +1,27 @@ +colors: + name: s3r0 modified + author: earsplit + primary: + background: "#1F1F1F" + foreground: "#C0B18B" + cursor: + text: "#1F1F1F" + cursor: "#C0B18B" + normal: + black: "#4A3637" + red: "#D17B49" + green: "#7B8748" + yellow: "#AF865A" + blue: "#535C5C" + magenta: "#775759" + cyan: "#6D715E" + white: "#C0B18B" + bright: + black: "#4A3637" + red: "#D17B49" + green: "#7B8748" + yellow: "#AF865A" + blue: "#535C5C" + magenta: "#775759" + cyan: "#6D715E" + white: "#C0B18B" diff --git a/.config/alacritty/alacritty-themes/themes/Seabird.yml b/.config/alacritty/alacritty-themes/themes/Seabird.yml new file mode 100755 index 0000000..efa7f99 --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Seabird.yml @@ -0,0 +1,28 @@ +# Colors (Seagull) +colors: + # Default colors + primary: + background: '#ffffff' + foreground: '#61707a' + + # Normal colors + normal: + black: '#0b141a' + red: '#ff4053' + green: '#11ab00' + yellow: '#bf8c00' + blue: '#0099ff' + magenta: '#9854ff' + cyan: '#00a5ab' + white: '#ffffff' + + # Bright colors + bright: + black: '#0b141a' + red: '#ff4053' + green: '#11ab00' + yellow: '#bf8c00' + blue: '#0099ff' + magenta: '#9854ff' + cyan: '#00a5ab' + white: '#ffffff' diff --git a/.config/alacritty/alacritty-themes/themes/Seoul256.yml b/.config/alacritty/alacritty-themes/themes/Seoul256.yml new file mode 100755 index 0000000..828f3a9 --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Seoul256.yml @@ -0,0 +1,28 @@ +# Colors (Seoul256) +colors: + # Default colors + primary: + background: '#3a3a3a' + foreground: '#d0d0d0' + + # Normal colors + normal: + black: '#4e4e4e' + red: '#d68787' + green: '#5f865f' + yellow: '#d8af5f' + blue: '#85add4' + magenta: '#d7afaf' + cyan: '#87afaf' + white: '#d0d0d0' + + # Bright colors + bright: + black: '#626262' + red: '#d75f87' + green: '#87af87' + yellow: '#ffd787' + blue: '#add4fb' + magenta: '#ffafaf' + cyan: '#87d7d7' + white: '#e4e4e4' diff --git a/.config/alacritty/alacritty-themes/themes/Sexcolors.yml b/.config/alacritty/alacritty-themes/themes/Sexcolors.yml new file mode 100755 index 0000000..c0da532 --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Sexcolors.yml @@ -0,0 +1,27 @@ +colors: + name: Sex Colors + author: "" + primary: + background: "#000000" + foreground: "#ffffff" + cursor: + text: "#000000" + cursor: "#ffffff" + normal: + black: "#252525" + red: "#ff9f95" + green: "#a6e22e" + yellow: "#fd971f" + blue: "#435e87" + magenta: "#789ec6" + cyan: "#5e7175" + white: "#dbdcdc" + bright: + black: "#454545" + red: "#ff8d80" + green: "#b6e354" + yellow: "#fd971f" + blue: "#587aa4" + magenta: "#46a4ff" + cyan: "#a3babf" + white: "#fdfdfd" diff --git a/.config/alacritty/alacritty-themes/themes/ShadesOfPurple.yml b/.config/alacritty/alacritty-themes/themes/ShadesOfPurple.yml new file mode 100755 index 0000000..d73212d --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/ShadesOfPurple.yml @@ -0,0 +1,36 @@ +# Shades of Purple Alacritty +# https://github.com/ahmadawais/shades-of-purple-alacritty + +# Colors +colors: + # Default colors + primary: + background: '#1E1E3F' + foreground: '#FFFFFF' + + # Colors the cursor will use if `custom_cursor_colors` is true + cursor: + text: '#1E1E3F' + cursor: '#FAD000' + + # Normal colors + normal: + black: '#000000' + red: '#D52822' + green: '#3DB72A' + yellow: '#FAD000' + blue: '#6943FF' + magenta: '#FF628C' + cyan: '#9EFFFF' + white: '#DBDBE0' + + # Bright colors + bright: + black: '#5C5C61' + red: '#FF000D' + green: '#3AD900' + yellow: '#FAD000' + blue: '#6943FF' + magenta: '#FF628C' + cyan: '#9EFFFF' + white: '#FFFFFF' diff --git a/.config/alacritty/alacritty-themes/themes/Shapeshifter.dark.yml b/.config/alacritty/alacritty-themes/themes/Shapeshifter.dark.yml new file mode 100755 index 0000000..eadc0a6 --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Shapeshifter.dark.yml @@ -0,0 +1,27 @@ +colors: + name: Shapeshifter (dark) + author: Chris Kempson + primary: + background: "#000000" + foreground: "#ababab" + cursor: + text: "#000000" + cursor: "#ababab" + normal: + black: "#000000" + red: "#e92f2f" + green: "#0ed839" + yellow: "#dddd13" + blue: "#3b48e3" + magenta: "#f996e2" + cyan: "#23edda" + white: "#ababab" + bright: + black: "#343434" + red: "#e92f2f" + green: "#0ed839" + yellow: "#dddd13" + blue: "#3b48e3" + magenta: "#f996e2" + cyan: "#23edda" + white: "#f9f9f9" diff --git a/.config/alacritty/alacritty-themes/themes/Shapeshifter.light.yml b/.config/alacritty/alacritty-themes/themes/Shapeshifter.light.yml new file mode 100755 index 0000000..8e95a83 --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Shapeshifter.light.yml @@ -0,0 +1,27 @@ +colors: + name: Shapeshifter (light) + author: Chris Kempson + primary: + background: "#f9f9f9" + foreground: "#102015" + cursor: + text: "#f9f9f9" + cursor: "#102015" + normal: + black: "#000000" + red: "#e92f2f" + green: "#0ed839" + yellow: "#dddd13" + blue: "#3b48e3" + magenta: "#f996e2" + cyan: "#23edda" + white: "#ababab" + bright: + black: "#343434" + red: "#e92f2f" + green: "#0ed839" + yellow: "#dddd13" + blue: "#3b48e3" + magenta: "#f996e2" + cyan: "#23edda" + white: "#f9f9f9" diff --git a/.config/alacritty/alacritty-themes/themes/Shic.yml b/.config/alacritty/alacritty-themes/themes/Shic.yml new file mode 100755 index 0000000..0594dd1 --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Shic.yml @@ -0,0 +1,27 @@ +colors: + name: Shic + author: "" + primary: + background: "#000000" + foreground: "#ffffff" + cursor: + text: "#000000" + cursor: "#ffffff" + normal: + black: "#494949" + red: "#b9716e" + green: "#588f7a" + yellow: "#aaa857" + blue: "#a0c3c0" + magenta: "#735e74" + cyan: "#695935" + white: "#b1b1b1" + bright: + black: "#484848" + red: "#8f5a58" + green: "#326f58" + yellow: "#c7c575" + blue: "#507f7c" + magenta: "#a387a6" + cyan: "#927c4b" + white: "#c7c7c7" diff --git a/.config/alacritty/alacritty-themes/themes/Simple_rainbow.yml b/.config/alacritty/alacritty-themes/themes/Simple_rainbow.yml new file mode 100755 index 0000000..e422022 --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Simple_rainbow.yml @@ -0,0 +1,27 @@ +colors: + name: Simple Rainbow + author: "" + primary: + background: "#575757" + foreground: "#dcdccc" + cursor: + text: "#575757" + cursor: "#dcdccc" + normal: + black: "#666666" + red: "#ff8278" + green: "#bde077" + yellow: "#eadc84" + blue: "#77bee0" + magenta: "#dd91f3" + cyan: "#ffc178" + white: "#dddddd" + bright: + black: "#888888" + red: "#ff8278" + green: "#bde077" + yellow: "#eadc84" + blue: "#77bee0" + magenta: "#dd91f3" + cyan: "#ffc178" + white: "#cccccc" diff --git a/.config/alacritty/alacritty-themes/themes/Snazzy.yml b/.config/alacritty/alacritty-themes/themes/Snazzy.yml new file mode 100755 index 0000000..01acc59 --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Snazzy.yml @@ -0,0 +1,28 @@ +# Colors (Snazzy) +colors: + # Default colors + primary: + background: '#282a36' + foreground: '#eff0eb' + + # Normal colors + normal: + black: '#282a36' + red: '#ff5c57' + green: '#5af78e' + yellow: '#f3f99d' + blue: '#57c7ff' + magenta: '#ff6ac1' + cyan: '#9aedfe' + white: '#f1f1f0' + + # Bright colors + bright: + black: '#686868' + red: '#ff5c57' + green: '#5af78e' + yellow: '#f3f99d' + blue: '#57c7ff' + magenta: '#ff6ac1' + cyan: '#9aedfe' + white: '#f1f1f0' diff --git a/.config/alacritty/alacritty-themes/themes/Solarized-Dark.yml b/.config/alacritty/alacritty-themes/themes/Solarized-Dark.yml new file mode 100755 index 0000000..8f5d561 --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Solarized-Dark.yml @@ -0,0 +1,33 @@ +# Colors (Solarized Dark) +colors: + # 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 diff --git a/.config/alacritty/alacritty-themes/themes/Solarized-Light.yml b/.config/alacritty/alacritty-themes/themes/Solarized-Light.yml new file mode 100755 index 0000000..b1d844a --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Solarized-Light.yml @@ -0,0 +1,33 @@ +# Colors (Solarized Light) +colors: + # 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 diff --git a/.config/alacritty/alacritty-themes/themes/Sourcerer.yml b/.config/alacritty/alacritty-themes/themes/Sourcerer.yml new file mode 100755 index 0000000..9e30290 --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Sourcerer.yml @@ -0,0 +1,29 @@ +# scorcerer colors +colors: + primary: + background: '#222222' + foreground: '#c2c2b0' + + cursor: + text: '#c2c2b0' + cursor: '#c2c2b0' + + normal: + black: '#111111' + red: '#aa4450' + green: '#719611' + yellow: '#cc8800' + blue: '#6688aa' + magenta: '#8f6f8f' + cyan: '#528b8b' + white: '#d3d3d3' + + bright: + black: '#181818' + red: '#ff6a6a' + green: '#b1d631' + yellow: '#ff9800' + blue: '#90b0d1' + magenta: '#8181a6' + cyan: '#87ceeb' + white: '#c1cdc1' diff --git a/.config/alacritty/alacritty-themes/themes/Splurge.yml b/.config/alacritty/alacritty-themes/themes/Splurge.yml new file mode 100755 index 0000000..be7d03f --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Splurge.yml @@ -0,0 +1,27 @@ +colors: + name: Splurge + author: "" + primary: + background: "#000000" + foreground: "#ffffff" + cursor: + text: "#000000" + cursor: "#ffffff" + normal: + black: "#4a4b4a" + red: "#d7699a" + green: "#80d468" + yellow: "#d7a169" + blue: "#6985d7" + magenta: "#c86ad4" + cyan: "#6fccd1" + white: "#dbdcdc" + bright: + black: "#696969" + red: "#f5a2b5" + green: "#a3f2a0" + yellow: "#f5cda2" + blue: "#a2c1f5" + magenta: "#d2a2f5" + cyan: "#a0e9f2" + white: "#fdfdfd" diff --git a/.config/alacritty/alacritty-themes/themes/Substrata.yml b/.config/alacritty/alacritty-themes/themes/Substrata.yml new file mode 100755 index 0000000..0951caf --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Substrata.yml @@ -0,0 +1,25 @@ +# Colors (substrata) +colors: + primary: + background: '#191c25' + foreground: '#b5b4c9' + normal: + black: '#2e313d' + red: '#cf8164' + green: '#76a065' + yellow: '#ab924c' + blue: '#8296b0' + magenta: '#a18daf' + cyan: '#659ea2' + white: '#b5b4c9' + bright: + black: '#5b5f71' + red: '#fe9f7c' + green: '#92c47e' + yellow: '#d2b45f' + blue: '#a0b9d8' + magenta: '#c6aed7' + cyan: '#7dc2c7' + white: '#f0ecfe' + + diff --git a/.config/alacritty/alacritty-themes/themes/Swayr.yml b/.config/alacritty/alacritty-themes/themes/Swayr.yml new file mode 100755 index 0000000..5306084 --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Swayr.yml @@ -0,0 +1,27 @@ +colors: + name: Swayr + author: "" + primary: + background: "#1c1709" + foreground: "#c2b9a1" + cursor: + text: "#1c1709" + cursor: "#c2b9a1" + normal: + black: "#1c1709" + red: "#8e4317" + green: "#787200" + yellow: "#945c00" + blue: "#315094" + magenta: "#5c2e40" + cyan: "#00617d" + white: "#c2b9a1" + bright: + black: "#4f4939" + red: "#f07935" + green: "#d9d138" + yellow: "#ffab26" + blue: "#8aa9ed" + magenta: "#ff8cb8" + cyan: "#43bfe0" + white: "#f2e8c9" diff --git a/.config/alacritty/alacritty-themes/themes/Sweetlove.yml b/.config/alacritty/alacritty-themes/themes/Sweetlove.yml new file mode 100755 index 0000000..3fb327b --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Sweetlove.yml @@ -0,0 +1,27 @@ +colors: + name: Sweet Love + author: Boroshlawa + primary: + background: "#1F1F1F" + foreground: "#C0B18B" + cursor: + text: "#1F1F1F" + cursor: "#C0B18B" + normal: + black: "#4A3637" + red: "#D17B49" + green: "#7B8748" + yellow: "#AF865A" + blue: "#535C5C" + magenta: "#775759" + cyan: "#6D715E" + white: "#C0B18B" + bright: + black: "#402E2E" + red: "#AC5D2F" + green: "#647035" + yellow: "#8F6840" + blue: "#444B4B" + magenta: "#614445" + cyan: "#585C49" + white: "#978965" diff --git a/.config/alacritty/alacritty-themes/themes/Taerminal.yml b/.config/alacritty/alacritty-themes/themes/Taerminal.yml new file mode 100755 index 0000000..83c1b96 --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Taerminal.yml @@ -0,0 +1,31 @@ +# Colors (Taerminal) +colors: + # Default colors + primary: + background: '#26282a' + foreground: '#f0f0f0' + cursor: + background: '#f0f0f0' + foreground: '#26282a' + + # Normal colors + normal: + black: '#26282a' + red: '#ff8878' + green: '#b4fb73' + yellow: '#fffcb7' + blue: '#8bbce5' + magenta: '#ffb2fe' + cyan: '#a2e1f8' + white: '#f1f1f1' + + # Bright colors + bright: + black: '#6f6f6f' + red: '#fe978b' + green: '#d6fcba' + yellow: '#fffed5' + blue: '#c2e3ff' + magenta: '#ffc6ff' + cyan: '#c0e9f8' + white: '#ffffff' diff --git a/.config/alacritty/alacritty-themes/themes/Tango.yml b/.config/alacritty/alacritty-themes/themes/Tango.yml new file mode 100755 index 0000000..721c850 --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Tango.yml @@ -0,0 +1,27 @@ +# Colors (Tango) +colors: + primary: + background: '#000000' + foreground: '#00ff00' + + # Normal colors + normal: + black: '#2e3436' + red: '#cc0000' + green: '#73d216' + yellow: '#edd400' + blue: '#3465a4' + magenta: '#75507b' + cyan: '#06989a' + white: '#d3d7cf' + + # Bright colors + bright: + black: '#2e3436' + red: '#ef2929' + green: '#8ae234' + yellow: '#fce94f' + blue: '#729fcf' + magenta: '#ad7fa8' + cyan: '#34e2e2' + white: '#eeeeec' diff --git a/.config/alacritty/alacritty-themes/themes/Tangoesque.yml b/.config/alacritty/alacritty-themes/themes/Tangoesque.yml new file mode 100755 index 0000000..d192fcc --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Tangoesque.yml @@ -0,0 +1,27 @@ +colors: + name: Tangoesque + author: "" + primary: + background: "#000000" + foreground: "#aaaaaa" + cursor: + text: "#000000" + cursor: "#aaaaaa" + normal: + black: "#202020" + red: "#ff6565" + green: "#93d44f" + yellow: "#eab93d" + blue: "#204a87" + magenta: "#ce5c00" + cyan: "#89b6e2" + white: "#cccccc" + bright: + black: "#606060" + red: "#ff8d8d" + green: "#c8e7a8" + yellow: "#ffc123" + blue: "#3465a4" + magenta: "#f57900" + cyan: "#46a4ff" + white: "#ffffff" diff --git a/.config/alacritty/alacritty-themes/themes/Tangoish.yml b/.config/alacritty/alacritty-themes/themes/Tangoish.yml new file mode 100755 index 0000000..c642890 --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Tangoish.yml @@ -0,0 +1,28 @@ +# Colors (Tangoish) +# Note: Orange is used in place of Cyan +colors: + primary: + background: '#2e3436' + foreground: '#eeeeec' + + # Normal colors + normal: + black: '#2e3436' + red: '#cc0000' + green: '#73d216' + yellow: '#edd400' + blue: '#3465a4' + magenta: '#75507b' + cyan: '#f57900' + white: '#d3d7cf' + + # Bright colors + bright: + black: '#2e3436' + red: '#ef2929' + green: '#8ae234' + yellow: '#fce94f' + blue: '#729fcf' + magenta: '#ad7fa8' + cyan: '#fcaf3e' + white: '#eeeeec' diff --git a/.config/alacritty/alacritty-themes/themes/Tartan.yml b/.config/alacritty/alacritty-themes/themes/Tartan.yml new file mode 100755 index 0000000..6323274 --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Tartan.yml @@ -0,0 +1,27 @@ +colors: + name: Tartan + author: "" + primary: + background: "#2b2b2b" + foreground: "#dedede" + cursor: + text: "#2b2b2b" + cursor: "#dedede" + normal: + black: "#2e3436" + red: "#cc0000" + green: "#4e9a06" + yellow: "#c4a000" + blue: "#3465a4" + magenta: "#75507b" + cyan: "#06989a" + white: "#d3d7cf" + bright: + black: "#555753" + red: "#ef2929" + green: "#8ae234" + yellow: "#fce94f" + blue: "#729fcf" + magenta: "#ad7fa8" + cyan: "#34e2e2" + white: "#eeeeec" diff --git a/.config/alacritty/alacritty-themes/themes/Tender.yml b/.config/alacritty/alacritty-themes/themes/Tender.yml new file mode 100755 index 0000000..db27a8e --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Tender.yml @@ -0,0 +1,28 @@ +# Colors (Tender) +colors: + # Default colors + primary: + background: '#282828' + foreground: '#eeeeee' + + # Normal colors + normal: + black: '#282828' + red: '#f43753' + green: '#c9d05c' + yellow: '#ffc24b' + blue: '#b3deef' + magenta: '#d3b987' + cyan: '#73cef4' + white: '#eeeeee' + + # Bright colors + bright: + black: '#4c4c4c' + red: '#f43753' + green: '#c9d05c' + yellow: '#ffc24b' + blue: '#b3deef' + magenta: '#d3b987' + cyan: '#73cef4' + white: '#feffff' diff --git a/.config/alacritty/alacritty-themes/themes/Terminal-app-Basic.yml b/.config/alacritty/alacritty-themes/themes/Terminal-app-Basic.yml new file mode 100755 index 0000000..30442b6 --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Terminal-app-Basic.yml @@ -0,0 +1,23 @@ +# Colors (Terminal.app Basic) +colors: + primary: + background: '#FFFFFF' + foreground: '#000000' + normal: + black: '#000000' + red: '#990000' + green: '#00A600' + yellow: '#999900' + blue: '#0000B2' + magenta: '#B200B2' + cyan: '#00A6B2' + white: '#BFBFBF' + bright: + black: '#666666' + red: '#E50000' + green: '#00D900' + yellow: '#E5E500' + blue: '#0000FF' + magenta: '#E500E5' + cyan: '#00E5E5' + white: '#E5E5E5' diff --git a/.config/alacritty/alacritty-themes/themes/Terminal-app.yml b/.config/alacritty/alacritty-themes/themes/Terminal-app.yml new file mode 100755 index 0000000..2642d1c --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Terminal-app.yml @@ -0,0 +1,28 @@ +# Colors (Terminal.app) +colors: + # Default colors + primary: + background: '#000000' + foreground: '#b6b6b6' + + # Normal colors + normal: + black: '#000000' + red: '#990000' + green: '#00a600' + yellow: '#999900' + blue: '#0000b2' + magenta: '#b200b2' + cyan: '#00a6b2' + white: '#bfbfbf' + + # Bright colors + bright: + black: '#666666' + red: '#e50000' + green: '#00d900' + yellow: '#e5e500' + blue: '#0000ff' + magenta: '#e500e5' + cyan: '#00e5e5' + white: '#e5e5e5' diff --git a/.config/alacritty/alacritty-themes/themes/Theme2.yml b/.config/alacritty/alacritty-themes/themes/Theme2.yml new file mode 100755 index 0000000..4b7f1e3 --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Theme2.yml @@ -0,0 +1,27 @@ +colors: + name: theme2 + author: "" + primary: + background: "#000000" + foreground: "#ffffff" + cursor: + text: "#000000" + cursor: "#ffffff" + normal: + black: "#191919" + red: "#eb3d51" + green: "#66b61a" + yellow: "#d98e1d" + blue: "#23ffa8" + magenta: "#ff00da" + cyan: "#68a783" + white: "#eaeaea" + bright: + black: "#484848" + red: "#be6262" + green: "#4b8a10" + yellow: "#e5d95e" + blue: "#23aaff" + magenta: "#ab005b" + cyan: "#bbcd81" + white: "#bbbbbb" diff --git a/.config/alacritty/alacritty-themes/themes/Thwump.yml b/.config/alacritty/alacritty-themes/themes/Thwump.yml new file mode 100755 index 0000000..5f67e1f --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Thwump.yml @@ -0,0 +1,27 @@ +colors: + name: thwump + author: "" + primary: + background: "#000000" + foreground: "#ffffff" + cursor: + text: "#000000" + cursor: "#ffffff" + normal: + black: "#202020" + red: "#a07070" + green: "#70a070" + yellow: "#a0a070" + blue: "#7070a0" + magenta: "#a070a0" + cyan: "#70a0a0" + white: "#a0a0a0" + bright: + black: "#505050" + red: "#d07070" + green: "#70d070" + yellow: "#d0d070" + blue: "#7070d0" + magenta: "#d070d0" + cyan: "#70d0d0" + white: "#f0f0f0" diff --git a/.config/alacritty/alacritty-themes/themes/Tlh.yml b/.config/alacritty/alacritty-themes/themes/Tlh.yml new file mode 100755 index 0000000..a1ba03b --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Tlh.yml @@ -0,0 +1,27 @@ +colors: + name: tlh + author: "" + primary: + background: "#101010" + foreground: "#66ff66" + cursor: + text: "#101010" + cursor: "#66ff66" + normal: + black: "#1c1c1c" + red: "#d81860" + green: "#60ff60" + yellow: "#f9fd75" + blue: "#4695c8" + magenta: "#a78edb" + cyan: "#43afce" + white: "#f3ebe2" + bright: + black: "#4d4d4d" + red: "#f00060" + green: "#70ff70" + yellow: "#f9fd80" + blue: "#5a9dc8" + magenta: "#b29fdb" + cyan: "#69b8ce" + white: "#eeeeee" diff --git a/.config/alacritty/alacritty-themes/themes/Tokyonight_Day.yml b/.config/alacritty/alacritty-themes/themes/Tokyonight_Day.yml new file mode 100755 index 0000000..54335c6 --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Tokyonight_Day.yml @@ -0,0 +1,34 @@ +# TokyoNight Alacritty Colors +colors: + name: TokyoNight Day + author: Folke + # Default colors + primary: + background: '0xe1e2e7' + foreground: '0x3760bf' + + # Normal colors + normal: + black: '0xe9e9ed' + red: '0xf52a65' + green: '0x587539' + yellow: '0x8c6c3e' + blue: '0x2e7de9' + magenta: '0x9854f1' + cyan: '0x007197' + white: '0x6172b0' + + # Bright colors + bright: + black: '0xa1a6c5' + red: '0xf52a65' + green: '0x587539' + yellow: '0x8c6c3e' + blue: '0x2e7de9' + magenta: '0x9854f1' + cyan: '0x007197' + white: '0x3760bf' + + indexed_colors: + - { index: 16, color: '0xb15c00' } + - { index: 17, color: '0xc64343' } diff --git a/.config/alacritty/alacritty-themes/themes/Tokyonight_Night.yml b/.config/alacritty/alacritty-themes/themes/Tokyonight_Night.yml new file mode 100755 index 0000000..63c1b09 --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Tokyonight_Night.yml @@ -0,0 +1,35 @@ +# TokyoNight Alacritty Colors +# https://github.com/folke/tokyonight.nvim/blob/main/extras/alacritty_tokyonight_night.yml +colors: + name: TokyoNight Night + author: Folke + # Default colors + primary: + background: '0x1a1b26' + foreground: '0xc0caf5' + + # Normal colors + normal: + black: '0x15161E' + red: '0xf7768e' + green: '0x9ece6a' + yellow: '0xe0af68' + blue: '0x7aa2f7' + magenta: '0xbb9af7' + cyan: '0x7dcfff' + white: '0xa9b1d6' + + # Bright colors + bright: + black: '0x414868' + red: '0xf7768e' + green: '0x9ece6a' + yellow: '0xe0af68' + blue: '0x7aa2f7' + magenta: '0xbb9af7' + cyan: '0x7dcfff' + white: '0xc0caf5' + + indexed_colors: + - { index: 16, color: '0xff9e64' } + - { index: 17, color: '0xdb4b4b' } diff --git a/.config/alacritty/alacritty-themes/themes/Tokyonight_Storm.yml b/.config/alacritty/alacritty-themes/themes/Tokyonight_Storm.yml new file mode 100755 index 0000000..6672a64 --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Tokyonight_Storm.yml @@ -0,0 +1,34 @@ +# TokyoNight Alacritty Colors +colors: + name: TokyoNight Storm + author: Folke + # Default colors + primary: + background: '0x24283b' + foreground: '0xc0caf5' + + # Normal colors + normal: + black: '0x1D202F' + red: '0xf7768e' + green: '0x9ece6a' + yellow: '0xe0af68' + blue: '0x7aa2f7' + magenta: '0xbb9af7' + cyan: '0x7dcfff' + white: '0xa9b1d6' + + # Bright colors + bright: + black: '0x414868' + red: '0xf7768e' + green: '0x9ece6a' + yellow: '0xe0af68' + blue: '0x7aa2f7' + magenta: '0xbb9af7' + cyan: '0x7dcfff' + white: '0xc0caf5' + + indexed_colors: + - { index: 16, color: '0xff9e64' } + - { index: 17, color: '0xdb4b4b' } diff --git a/.config/alacritty/alacritty-themes/themes/Tomorrow-Night-Bright.yml b/.config/alacritty/alacritty-themes/themes/Tomorrow-Night-Bright.yml new file mode 100755 index 0000000..1a04680 --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Tomorrow-Night-Bright.yml @@ -0,0 +1,28 @@ +# Colors (Tomorrow Night Bright) +colors: + # Default colors + primary: + background: '#000000' + foreground: '#eaeaea' + + # Normal colors + normal: + black: '#000000' + red: '#d54e53' + green: '#b9ca4a' + yellow: '#e6c547' + blue: '#7aa6da' + magenta: '#c397d8' + cyan: '#70c0ba' + white: '#424242' + + # Bright colors + bright: + black: '#666666' + red: '#ff3334' + green: '#9ec400' + yellow: '#e7c547' + blue: '#7aa6da' + magenta: '#b77ee0' + cyan: '#54ced6' + white: '#2a2a2a' diff --git a/.config/alacritty/alacritty-themes/themes/Tomorrow-Night.yml b/.config/alacritty/alacritty-themes/themes/Tomorrow-Night.yml new file mode 100755 index 0000000..9e3f5b5 --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Tomorrow-Night.yml @@ -0,0 +1,33 @@ +# Colors (Tomorrow Night) +colors: + # 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' diff --git a/.config/alacritty/alacritty-themes/themes/Tomorrow.dark.yml b/.config/alacritty/alacritty-themes/themes/Tomorrow.dark.yml new file mode 100755 index 0000000..da607d9 --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Tomorrow.dark.yml @@ -0,0 +1,27 @@ +colors: + name: Tomorrow (dark) + author: Chris Kempson + primary: + background: "#1d1f21" + foreground: "#c5c8c6" + cursor: + text: "#1d1f21" + cursor: "#c5c8c6" + normal: + black: "#1d1f21" + red: "#cc6666" + green: "#b5bd68" + yellow: "#f0c674" + blue: "#81a2be" + magenta: "#b294bb" + cyan: "#8abeb7" + white: "#c5c8c6" + bright: + black: "#969896" + red: "#cc6666" + green: "#b5bd68" + yellow: "#f0c674" + blue: "#81a2be" + magenta: "#b294bb" + cyan: "#8abeb7" + white: "#ffffff" diff --git a/.config/alacritty/alacritty-themes/themes/Tomorrow.light.yml b/.config/alacritty/alacritty-themes/themes/Tomorrow.light.yml new file mode 100755 index 0000000..c7f2f60 --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Tomorrow.light.yml @@ -0,0 +1,27 @@ +colors: + name: Tomorrow (light) + author: Chris Kempson + primary: + background: "#ffffff" + foreground: "#373b41" + cursor: + text: "#ffffff" + cursor: "#373b41" + normal: + black: "#1d1f21" + red: "#cc6666" + green: "#b5bd68" + yellow: "#f0c674" + blue: "#81a2be" + magenta: "#b294bb" + cyan: "#8abeb7" + white: "#c5c8c6" + bright: + black: "#969896" + red: "#cc6666" + green: "#b5bd68" + yellow: "#f0c674" + blue: "#81a2be" + magenta: "#b294bb" + cyan: "#8abeb7" + white: "#ffffff" diff --git a/.config/alacritty/alacritty-themes/themes/Trim-yer-beard.yml b/.config/alacritty/alacritty-themes/themes/Trim-yer-beard.yml new file mode 100755 index 0000000..2d7125b --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Trim-yer-beard.yml @@ -0,0 +1,27 @@ +colors: + name: Trim Yer Beard + author: franksn + primary: + background: "#191716" + foreground: "#DABA8B" + cursor: + text: "#191716" + cursor: "#DABA8B" + normal: + black: "#0F0E0D" + red: "#845336" + green: "#57553C" + yellow: "#A17E3E" + blue: "#43454F" + magenta: "#604848" + cyan: "#5C6652" + white: "#A18B62" + bright: + black: "#383332" + red: "#8C4F4A" + green: "#898471" + yellow: "#C8B491" + blue: "#65788F" + magenta: "#755E4A" + cyan: "#718062" + white: "#BC9D66" diff --git a/.config/alacritty/alacritty-themes/themes/Twilight.dark.yml b/.config/alacritty/alacritty-themes/themes/Twilight.dark.yml new file mode 100755 index 0000000..8c62d0f --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Twilight.dark.yml @@ -0,0 +1,27 @@ +colors: + name: Twilight (dark) + author: Chris Kempson + primary: + background: "#1e1e1e" + foreground: "#a7a7a7" + cursor: + text: "#1e1e1e" + cursor: "#a7a7a7" + normal: + black: "#1e1e1e" + red: "#cf6a4c" + green: "#8f9d6a" + yellow: "#f9ee98" + blue: "#7587a6" + magenta: "#9b859d" + cyan: "#afc4db" + white: "#a7a7a7" + bright: + black: "#5f5a60" + red: "#cf6a4c" + green: "#8f9d6a" + yellow: "#f9ee98" + blue: "#7587a6" + magenta: "#9b859d" + cyan: "#afc4db" + white: "#ffffff" diff --git a/.config/alacritty/alacritty-themes/themes/Twilight.light.yml b/.config/alacritty/alacritty-themes/themes/Twilight.light.yml new file mode 100755 index 0000000..70483e6 --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Twilight.light.yml @@ -0,0 +1,27 @@ +colors: + name: Twilight (light) + author: Chris Kempson + primary: + background: "#ffffff" + foreground: "#464b50" + cursor: + text: "#ffffff" + cursor: "#464b50" + normal: + black: "#1e1e1e" + red: "#cf6a4c" + green: "#8f9d6a" + yellow: "#f9ee98" + blue: "#7587a6" + magenta: "#9b859d" + cyan: "#afc4db" + white: "#a7a7a7" + bright: + black: "#5f5a60" + red: "#cf6a4c" + green: "#8f9d6a" + yellow: "#f9ee98" + blue: "#7587a6" + magenta: "#9b859d" + cyan: "#afc4db" + white: "#ffffff" diff --git a/.config/alacritty/alacritty-themes/themes/Ubuntu.yml b/.config/alacritty/alacritty-themes/themes/Ubuntu.yml new file mode 100755 index 0000000..74a0719 --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Ubuntu.yml @@ -0,0 +1,28 @@ +# Colors (Ubuntu) +colors: + # Default colors + primary: + background: '#300a24' + foreground: '#eeeeec' + + # Normal colors + normal: + black: '#2e3436' + red: '#cc0000' + green: '#4e9a06' + yellow: '#c4a000' + blue: '#3465a4' + magenta: '#75507b' + cyan: '#06989a' + white: '#d3d7cf' + + # Bright colors + bright: + black: '#555753' + red: '#ef2929' + green: '#8ae234' + yellow: '#fce94f' + blue: '#729fcf' + magenta: '#ad7fa8' + cyan: '#34e2e2' + white: '#eeeeec' diff --git a/.config/alacritty/alacritty-themes/themes/User 77 - Mashup colors.yml b/.config/alacritty/alacritty-themes/themes/User 77 - Mashup colors.yml new file mode 100755 index 0000000..bc70cae --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/User 77 - Mashup colors.yml @@ -0,0 +1,27 @@ +colors: + name: Mashup Colors + author: user 77 + primary: + background: "#171717" + foreground: "#b2a191" + cursor: + text: "#171717" + cursor: "#b2a191" + normal: + black: "#202020" + red: "#bf3f34" + green: "#707d22" + yellow: "#bf7a29" + blue: "#627a92" + magenta: "#75507b" + cyan: "#757978" + white: "#b2a191" + bright: + black: "#404040" + red: "#ff6c5f" + green: "#b8ca4b" + yellow: "#c7a551" + blue: "#95b9de" + magenta: "#ad7fa8" + cyan: "#9fa590" + white: "#e8d0c3" diff --git a/.config/alacritty/alacritty-themes/themes/Vacuous2.yml b/.config/alacritty/alacritty-themes/themes/Vacuous2.yml new file mode 100755 index 0000000..be3b701 --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Vacuous2.yml @@ -0,0 +1,27 @@ +colors: + name: Vacuous 2 + author: hal + primary: + background: "#101010" + foreground: "#d2c5bc" + cursor: + text: "#101010" + cursor: "#d2c5bc" + normal: + black: "#202020" + red: "#b91e2e" + green: "#81957c" + yellow: "#f9bb80" + blue: "#356579" + magenta: "#2d2031" + cyan: "#0b3452" + white: "#909090" + bright: + black: "#606060" + red: "#d14548" + green: "#a7b79a" + yellow: "#fae3a0" + blue: "#7491a1" + magenta: "#87314e" + cyan: "#0f829d" + white: "#fff0f0" diff --git a/.config/alacritty/alacritty-themes/themes/Visiblue.yml b/.config/alacritty/alacritty-themes/themes/Visiblue.yml new file mode 100755 index 0000000..eebc197 --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Visiblue.yml @@ -0,0 +1,27 @@ +colors: + name: VisiBlue + author: "" + primary: + background: "#000000" + foreground: "#666699" + cursor: + text: "#000000" + cursor: "#666699" + normal: + black: "#333366" + red: "#6666cc" + green: "#0099cc" + yellow: "#3366cc" + blue: "#006699" + magenta: "#0066ff" + cyan: "#669999" + white: "#99cccc" + bright: + black: "#333399" + red: "#9999ff" + green: "#00ccff" + yellow: "#6699ff" + blue: "#0099cc" + magenta: "#0099ff" + cyan: "#66cccc" + white: "#ccffff" diff --git a/.config/alacritty/alacritty-themes/themes/Visibone-alt-2.yml b/.config/alacritty/alacritty-themes/themes/Visibone-alt-2.yml new file mode 100755 index 0000000..4a86e23 --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Visibone-alt-2.yml @@ -0,0 +1,27 @@ +colors: + name: Visibone Alt. 2 + author: Gutterslob + primary: + background: "#333333" + foreground: "#CCCCCC" + cursor: + text: "#333333" + cursor: "#CCCCCC" + normal: + black: "#666666" + red: "#CC6699" + green: "#99CC66" + yellow: "#CC9966" + blue: "#6699CC" + magenta: "#9966CC" + cyan: "#66CC99" + white: "#CCCCCC" + bright: + black: "#999999" + red: "#FF99CC" + green: "#CCFF99" + yellow: "#FFCC99" + blue: "#99CCFF" + magenta: "#CC99FF" + cyan: "#99FFCC" + white: "#FFFFFF" diff --git a/.config/alacritty/alacritty-themes/themes/Visibone.yml b/.config/alacritty/alacritty-themes/themes/Visibone.yml new file mode 100755 index 0000000..8a0520d --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Visibone.yml @@ -0,0 +1,27 @@ +colors: + name: VisiBone + author: "" + primary: + background: "#000000" + foreground: "#ffffff" + cursor: + text: "#000000" + cursor: "#ffffff" + normal: + black: "#666666" + red: "#cc6666" + green: "#66cc99" + yellow: "#cc9966" + blue: "#6699cc" + magenta: "#cc6699" + cyan: "#66cccc" + white: "#cccccc" + bright: + black: "#999999" + red: "#ff9999" + green: "#99ffcc" + yellow: "#ffcc99" + blue: "#99ccff" + magenta: "#ff99cc" + cyan: "#99ffff" + white: "#ffffff" diff --git a/.config/alacritty/alacritty-themes/themes/Wombat.yml b/.config/alacritty/alacritty-themes/themes/Wombat.yml new file mode 100755 index 0000000..8122bd3 --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Wombat.yml @@ -0,0 +1,28 @@ +# Colors (Wombat) +colors: + # Default colors + primary: + background: '#1f1f1f' + foreground: '#e5e1d8' + + # Normal colors + normal: + black: '#000000' + red: '#f7786d' + green: '#bde97c' + yellow: '#efdfac' + blue: '#6ebaf8' + magenta: '#ef88ff' + cyan: '#90fdf8' + white: '#e5e1d8' + + # Bright colors + bright: + black: '#b4b4b4' + red: '#f99f92' + green: '#e3f7a1' + yellow: '#f2e9bf' + blue: '#b3d2ff' + magenta: '#e5bdff' + cyan: '#c2fefa' + white: '#ffffff' diff --git a/.config/alacritty/alacritty-themes/themes/X-dotshare.yml b/.config/alacritty/alacritty-themes/themes/X-dotshare.yml new file mode 100755 index 0000000..815c24d --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/X-dotshare.yml @@ -0,0 +1,27 @@ +colors: + name: X::DotShare + author: crshd + primary: + background: "#151515" + foreground: "#D7D0C7" + cursor: + text: "#151515" + cursor: "#D7D0C7" + normal: + black: "#101010" + red: "#E84F4F" + green: "#B8D68C" + yellow: "#E1AA5D" + blue: "#7DC1CF" + magenta: "#9B64FB" + cyan: "#6D878D" + white: "#DDDDDD" + bright: + black: "#404040" + red: "#D23D3D" + green: "#A0CF5D" + yellow: "#F39D21" + blue: "#4E9FB1" + magenta: "#8542FF" + cyan: "#42717B" + white: "#DDDDDD" diff --git a/.config/alacritty/alacritty-themes/themes/X-erosion.yml b/.config/alacritty/alacritty-themes/themes/X-erosion.yml new file mode 100755 index 0000000..d309336 --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/X-erosion.yml @@ -0,0 +1,27 @@ +colors: + name: X::Erosion + author: earsplit + primary: + background: "#181512" + foreground: "#BEA492" + cursor: + text: "#181512" + cursor: "#BEA492" + normal: + black: "#332D29" + red: "#8C644C" + green: "#746C48" + yellow: "#908A66" + blue: "#646A6D" + magenta: "#605655" + cyan: "#4B5C5E" + white: "#504339" + bright: + black: "#817267" + red: "#9F7155" + green: "#857B52" + yellow: "#9C956E" + blue: "#71777A" + magenta: "#656565" + cyan: "#556D70" + white: "#9A875F" diff --git a/.config/alacritty/alacritty-themes/themes/XTerm.yml b/.config/alacritty/alacritty-themes/themes/XTerm.yml new file mode 100755 index 0000000..8a03848 --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/XTerm.yml @@ -0,0 +1,27 @@ +# XTerm's default colors +colors: + # Default colors + primary: + background: '#000000' + foreground: '#ffffff' + # Normal colors + normal: + black: '#000000' + red: '#cd0000' + green: '#00cd00' + yellow: '#cdcd00' + blue: '#0000ee' + magenta: '#cd00cd' + cyan: '#00cdcd' + white: '#e5e5e5' + + # Bright colors + bright: + black: '#7f7f7f' + red: '#ff0000' + green: '#00ff00' + yellow: '#ffff00' + blue: '#5c5cff' + magenta: '#ff00ff' + cyan: '#00ffff' + white: '#ffffff' diff --git a/.config/alacritty/alacritty-themes/themes/Yousai.yml b/.config/alacritty/alacritty-themes/themes/Yousai.yml new file mode 100755 index 0000000..a44948c --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Yousai.yml @@ -0,0 +1,27 @@ +colors: + name: Yousai + author: Kori + primary: + background: "#F5E7DE" + foreground: "#34302D" + cursor: + text: "#F5E7DE" + cursor: "#34302D" + normal: + black: "#666661" + red: "#992E2E" + green: "#4C3226" + yellow: "#A67C53" + blue: "#4C7399" + magenta: "#BF9986" + cyan: "#D97742" + white: "#34302D" + bright: + black: "#7F7F7A" + red: "#B23636" + green: "#664233" + yellow: "#BF8F60" + blue: "#5986B2" + magenta: "#D9AE98" + cyan: "#F2854A" + white: "#4C4742" diff --git a/.config/alacritty/alacritty-themes/themes/Zenburn.yml b/.config/alacritty/alacritty-themes/themes/Zenburn.yml new file mode 100755 index 0000000..5f4c238 --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/Zenburn.yml @@ -0,0 +1,27 @@ +colors: + name: zenburn + author: "" + primary: + background: "#000000" + foreground: "#ffffff" + cursor: + text: "#000000" + cursor: "#ffffff" + normal: + black: "#1e2320" + red: "#705050" + green: "#60b48a" + yellow: "#dfaf8f" + blue: "#506070" + magenta: "#dc8cc3" + cyan: "#8cd0d3" + white: "#dcdccc" + bright: + black: "#709080" + red: "#dca3a3" + green: "#c3bf9f" + yellow: "#f0dfaf" + blue: "#94bff3" + magenta: "#ec93d3" + cyan: "#93e0e3" + white: "#ffffff" diff --git a/.config/alacritty/alacritty-themes/themes/github_dark.yml b/.config/alacritty/alacritty-themes/themes/github_dark.yml new file mode 100755 index 0000000..797bb82 --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/github_dark.yml @@ -0,0 +1,32 @@ +# github Alacritty Colors +colors: + # Default colors + primary: + background: '0x24292e' + foreground: '0xd1d5da' + + # Normal colors + normal: + black: '0x24292e' + red: '0xf14c4c' + green: '0x23d18b' + yellow: '0xe2e210' + blue: '0x3b8eea' + magenta: '0xbc3fbc' + cyan: '0x29b7da' + white: '0xd1d5da' + + # Bright colors + bright: + black: '0x666666' + red: '0xf14c4c' + green: '0x23d18b' + yellow: '0xf5f543' + blue: '0x3b8eea' + magenta: '0xd670d6' + cyan: '0x29b7da' + white: '0xd1d5da' + + indexed_colors: + - { index: 16, color: '0xd18616' } + - { index: 17, color: '0xf14c4c' } diff --git a/.config/alacritty/alacritty-themes/themes/github_dark_default.yml b/.config/alacritty/alacritty-themes/themes/github_dark_default.yml new file mode 100755 index 0000000..6f71676 --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/github_dark_default.yml @@ -0,0 +1,32 @@ +# github Alacritty Colors +colors: + # Default colors + primary: + background: '0x0d1117' + foreground: '0xb3b1ad' + + # Normal colors + normal: + black: '0x484f58' + red: '0xff7b72' + green: '0x3fb950' + yellow: '0xd29922' + blue: '0x58a6ff' + magenta: '0xbc8cff' + cyan: '0x39c5cf' + white: '0xb3b1ad' + + # Bright colors + bright: + black: '0x6e7681' + red: '0xffa198' + green: '0x56d364' + yellow: '0xe3b341' + blue: '0x79c0ff' + magenta: '0xd2a8ff' + cyan: '0x39c5cf' + white: '0xb3b1ad' + + indexed_colors: + - { index: 16, color: '0xd18616' } + - { index: 17, color: '0xffa198' } diff --git a/.config/alacritty/alacritty-themes/themes/github_dimmed.yml b/.config/alacritty/alacritty-themes/themes/github_dimmed.yml new file mode 100755 index 0000000..091c8ce --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/github_dimmed.yml @@ -0,0 +1,32 @@ +# github Alacritty Colors +colors: + # Default colors + primary: + background: '0x22272e' + foreground: '0x768390' + + # Normal colors + normal: + black: '0x22272e' + red: '0xff938a' + green: '0x6bc46d' + yellow: '0xc69026' + blue: '0x6cb6ff' + magenta: '0xb083f0' + cyan: '0x56d4dd' + white: '0x768390' + + # Bright colors + bright: + black: '0x636e7b' + red: '0xff938a' + green: '0x6bc46d' + yellow: '0xdaaa3f' + blue: '0x6cb6ff' + magenta: '0xdcbdfb' + cyan: '0x56d4dd' + white: '0x768390' + + indexed_colors: + - { index: 16, color: '0xd18616' } + - { index: 17, color: '0xff938a' } diff --git a/.config/alacritty/alacritty-themes/themes/github_light.yml b/.config/alacritty/alacritty-themes/themes/github_light.yml new file mode 100755 index 0000000..499306d --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/github_light.yml @@ -0,0 +1,32 @@ +# github Alacritty Colors +colors: + # Default colors + primary: + background: '0xffffff' + foreground: '0x586069' + + # Normal colors + normal: + black: '0x697179' + red: '0xd03d3d' + green: '0x14ce14' + yellow: '0x949800' + blue: '0x0451a5' + magenta: '0xbc05bc' + cyan: '0x0598bc' + white: '0x586069' + + # Bright colors + bright: + black: '0x666666' + red: '0xcd3131' + green: '0x14ce14' + yellow: '0xb5ba00' + blue: '0x0451a5' + magenta: '0xbc05bc' + cyan: '0x0598bc' + white: '0x586069' + + indexed_colors: + - { index: 16, color: '0xd18616' } + - { index: 17, color: '0xcd3131' } diff --git a/.config/alacritty/alacritty-themes/themes/github_light_default.yml b/.config/alacritty/alacritty-themes/themes/github_light_default.yml new file mode 100755 index 0000000..618864d --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/github_light_default.yml @@ -0,0 +1,32 @@ +# github Alacritty Colors +colors: + # Default colors + primary: + background: '0xffffff' + foreground: '0x4d5566' + + # Normal colors + normal: + black: '0x24292e' + red: '0xd73a49' + green: '0x22863a' + yellow: '0xb08800' + blue: '0x0366d6' + magenta: '0x6f42c1' + cyan: '0x1b7c83' + white: '0x4d5566' + + # Bright colors + bright: + black: '0x586069' + red: '0xcb2431' + green: '0x28a745' + yellow: '0xdbab09' + blue: '0x2188ff' + magenta: '0x8a63d2' + cyan: '0x1b7c83' + white: '0x4d5566' + + indexed_colors: + - { index: 16, color: '0xd18616' } + - { index: 17, color: '0xcb2431' } diff --git a/.config/alacritty/alacritty-themes/themes/iTerm-Default.yml b/.config/alacritty/alacritty-themes/themes/iTerm-Default.yml new file mode 100755 index 0000000..c7a6f88 --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/iTerm-Default.yml @@ -0,0 +1,28 @@ +# Colors (iTerm 2 default theme) +colors: + # Default colors + primary: + background: '#101421' + foreground: '#fffbf6' + + # Normal colors + normal: + black: '#2e2e2e' + red: '#eb4129' + green: '#abe047' + yellow: '#f6c744' + blue: '#47a0f3' + magenta: '#7b5cb0' + cyan: '#64dbed' + white: '#e5e9f0' + + # Bright colors + bright: + black: '#565656' + red: '#ec5357' + green: '#c0e17d' + yellow: '#f9da6a' + blue: '#49a4f8' + magenta: '#a47de9' + cyan: '#99faf2' + white: '#ffffff' diff --git a/.config/alacritty/alacritty-themes/themes/vscode.dark.yml b/.config/alacritty/alacritty-themes/themes/vscode.dark.yml new file mode 100755 index 0000000..b7401ad --- /dev/null +++ b/.config/alacritty/alacritty-themes/themes/vscode.dark.yml @@ -0,0 +1,27 @@ +colors: + name: vscode (dark) + author: senpai-10 + primary: + background: "#1E1E1E" + foreground: "#D4D4D4" + cursor: + text: "#1d1f21" + cursor: "#cccccc" + normal: + black: "#000000" + red: "#cd3131" + green: "#0dbc79" + yellow: "#e5e510" + blue: "#2472c8" + magenta: "#bc3fbc" + cyan: "#11a8cd" + white: "#e5e5e5" + bright: + black: "#666666" + red: "#f14c4c" + green: "#23d18b" + yellow: "#f5f543" + blue: "#3b8eea" + magenta: "#d670d6" + cyan: "#29b8db" + white: "#e5e5e5" \ No newline at end of file diff --git a/.config/alacritty/alacritty.yml b/.config/alacritty/alacritty.yml new file mode 100755 index 0000000..4deec3f --- /dev/null +++ b/.config/alacritty/alacritty.yml @@ -0,0 +1,1236 @@ +# Configuration for Alacritty, the GPU enhanced terminal emulator. + +# Import additional configuration files +# +# Imports are loaded in order, skipping all missing files, with the importing +# file being loaded last. If a field is already present in a previous import, it +# will be replaced. +# +# All imports must either be absolute paths starting with `/`, or paths relative +# to the user's home directory starting with `~/`. +#import: +# - /path/to/alacritty.yml +import: + - ~/.config/alacritty/dracula.yml +# 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: alacritty + +#window: + # Window dimensions (changes require restart) + # + # Number of lines/columns (not pixels) in the terminal. The number of columns + # must be at least `2`, while using a value of `0` for columns and lines will + # fall back to the window manager's recommended size. + #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: 0 + # y: 0 + + # 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 and no title bar buttons + #decorations: full + + # 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. + #opacity: 1.0 + + # 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 + + # Allow terminal applications to change Alacritty's window title. + #dynamic_title: true + + # 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: 10000 + + # Scrolling distance multiplier. + #multiplier: 3 + +# Font configuration +font: + # Normal (roman) font face + normal: + # Font family + + # Default: + # - (macOS) Menlo + # - (Linux/BSD) monospace + # - (Windows) Consolas + family: SourceCode Pro + + # 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: monospace + + # 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: monospace + + # 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: monospace + + # The `style` can be specified to pick a specific face. + #style: Bold Italic + + # Point size + size: 10 + + # 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: 0 + + # Glyph offset determines the locations of the glyphs within their cells with + # the default being at the bottom. Increasing `x` moves the glyph to the + # right, increasing `y` moves the glyph upward. + #glyph_offset: + # x: 0 + # y: 0 + + # Use built-in font for box drawing characters. + # + # If `true`, Alacritty will use a custom built-in font for box drawing + # characters (Unicode points 2500 - 259f). + # + #builtin_box_drawing: true + +# If `true`, bold text is drawn using the bright color variants. +#draw_bold_text_with_bright_colors: false + +# Colors (Tomorrow Night) +#colors: + # Default colors + #primary: + # background: '#1d1f21' + # foreground: '#c5c8c6' + + # Bright and dim foreground colors + # + # The dimmed foreground color is calculated automatically if it is not + # present. If the bright foreground color is not set, or + # `draw_bold_text_with_bright_colors` is `false`, the normal foreground + # color will be used. + #dim_foreground: '#828482' + #bright_foreground: '#eaeaea' + + # Cursor colors + # + # Colors which should be used to draw the terminal cursor. + # + # Allowed values are CellForeground/CellBackground, which reference the + # affected cell, or hexadecimal colors like #ff00ff. + #cursor: + # text: CellBackground + # cursor: CellForeground + + # Vi mode cursor colors + # + # Colors for the cursor when the vi mode is active. + # + # Allowed values are CellForeground/CellBackground, which reference the + # affected cell, or hexadecimal colors like #ff00ff. + #vi_mode_cursor: + # text: CellBackground + # cursor: CellForeground + + # Search colors + # + # Colors used for the search bar and match highlighting. + #search: + # Allowed values are CellForeground/CellBackground, which reference the + # affected cell, or hexadecimal colors like #ff00ff. + #matches: + # foreground: '#000000' + # background: '#ffffff' + #focused_match: + # foreground: '#ffffff' + # background: '#000000' + + # Keyboard hints + #hints: + # First character in the hint label + # + # Allowed values are CellForeground/CellBackground, which reference the + # affected cell, or hexadecimal colors like #ff00ff. + #start: + # foreground: '#1d1f21' + # background: '#e9ff5e' + + # All characters after the first one in the hint label + # + # Allowed values are CellForeground/CellBackground, which reference the + # affected cell, or hexadecimal colors like #ff00ff. + #end: + # foreground: '#e9ff5e' + # background: '#1d1f21' + + # Line indicator + # + # Color used for the indicator displaying the position in history during + # search and vi mode. + # + # By default, these will use the opposing primary color. + #line_indicator: + # foreground: None + # background: None + + # Footer bar + # + # Color used for the footer bar on the bottom, used by search regex input, + # hyperlink URI preview, etc. + # + #footer_bar: + # background: '#c5c8c6' + # foreground: '#1d1f21' + + # Selection colors + # + # Colors which should be used to draw the selection area. + # + # Allowed values are CellForeground/CellBackground, which reference the + # affected cell, or hexadecimal colors like #ff00ff. + #selection: + # text: CellBackground + # background: CellForeground + + +####################################### +## START OF COLOR SCHEMES ## +####################################### +schemes: + ### Doom One ### + DoomOne: &DoomOne + 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 ### + GruvboxDark: &GruvboxDark + # 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 ### + MonokaiPro: &MonokaiPro + # 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 ### + OceanicNext: &OceanicNext + # 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 ### + SolarizedDark: &SolarizedDark + # 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 ### + SolarizedLight: &SolarizedLight + # 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 ### + TomorrowNight: &TomorrowNight + # 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' + # Normal colors + #normal: + # black: '#1d1f21' + # red: '#cc6666' + # green: '#b5bd68' + # yellow: '#f0c674' + # blue: '#81a2be' + # magenta: '#b294bb' + # cyan: '#8abeb7' + # white: '#c5c8c6' + + # Bright colors + #bright: + # black: '#666666' + # red: '#d54e53' + # green: '#b9ca4a' + # yellow: '#e7c547' + # blue: '#7aa6da' + # magenta: '#c397d8' + # cyan: '#70c0b1' + # white: '#eaeaea' + + # Dim colors + # + # If the dim colors are not set, they will be calculated automatically based + # on the `normal` colors. + #dim: + # black: '#131415' + # red: '#864343' + # green: '#777c44' + # yellow: '#9e824c' + # blue: '#556a7d' + # magenta: '#75617b' + # cyan: '#5b7d78' + # white: '#828482' + + # Indexed Colors + # + # The indexed colors include all colors from 16 to 256. + # When these are not set, they're filled with sensible defaults. + # + # Example: + # `- { index: 16, color: '#ff00ff' }` + # + #indexed_colors: [] + # Transparent cell backgrounds + # + # Whether or not `window.opacity` applies to all cell backgrounds or only to + # the default background. When set to `true` all cells will be transparent + # regardless of their background color. + #transparent_background_colors: false + +# Bell +# +# The bell is rung every time the BEL control character is received. +#bell: + # Visual Bell Animation + # + # Animation effect for flashing the screen when the visual bell is rung. + # + # Values for `animation`: + # - Ease + # - EaseOut + # - EaseOutSine + # - EaseOutQuad + # - EaseOutCubic + # - EaseOutQuart + # - EaseOutQuint + # - EaseOutExpo + # - EaseOutCirc + # - Linear + #animation: EaseOutExpo + + # Duration of the visual bell flash in milliseconds. A `duration` of `0` will + # disable the visual bell animation. + #duration: 0 + + # Visual bell animation color. + #color: '#ffffff' + + # Bell Command + # + # This program is executed whenever the bell is rung. + # + # When set to `command: None`, no command will be executed. + # + # Example: + # command: + # program: notify-send + # args: ["Hello, World!"] + # + #command: None + +#selection: + # This string contains all characters that are used as separators for + # "semantic words" in Alacritty. + #semantic_escape_chars: ",│`|:\"' ()[]{}<>\t" + + # When set to `true`, selected text will be copied to the primary clipboard. + #save_to_clipboard: false + +#cursor: + # Cursor style + #style: + # Cursor shape + # + # Values for `shape`: + # - ▇ Block + # - _ Underline + # - | Beam + #shape: Block + + # Cursor blinking state + # + # Values for `blinking`: + # - Never: Prevent the cursor from ever blinking + # - Off: Disable blinking by default + # - On: Enable blinking by default + # - Always: Force the cursor to always blink + #blinking: Off + + # Vi mode cursor style + # + # If the vi mode cursor style is `None` or not specified, it will fall back to + # the style of the active value of the normal cursor. + # + # See `cursor.style` for available options. + #vi_mode_style: None + + # Cursor blinking interval in milliseconds. + #blink_interval: 750 + + # Time after which cursor stops blinking, in seconds. + # + # Specifying '0' will disable timeout for blinking. + #blink_timeout: 5 + + # If this is `true`, the cursor will be rendered as a hollow box when the + # window is not focused. + #unfocused_hollow: true + + # Thickness of the cursor relative to the cell width as floating point number + # from `0.0` to `1.0`. + #thickness: 0.15 + +# 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: +# - (Linux/BSD/macOS) `$SHELL` or the user's login shell, if `$SHELL` is unset +# - (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 + +# Send ESC (\x1b) before characters when alt is pressed. +#alt_send_esc: true + +# Offer IPC using `alacritty msg` (unix only) +#ipc_socket: true + +#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 + +# Hints +# +# Terminal hints can be used to find text or hyperlink in the visible part of +# the terminal and pipe it to other applications. +#hints: + # Keys used for the hint labels. + #alphabet: "jfkdls;ahgurieowpq" + + # List with all available hints + # + # Each hint must have any of `regex` or `hyperlinks` field and either an + # `action` or a `command` field. The fields `mouse`, `binding` and + # `post_processing` are optional. + # + # The `hyperlinks` option will cause OSC 8 escape sequence hyperlinks to be + # highlighted. + # + # The fields `command`, `binding.key`, `binding.mods`, `binding.mode` and + # `mouse.mods` accept the same values as they do in the `key_bindings` section. + # + # The `mouse.enabled` field controls if the hint should be underlined while + # the mouse with all `mouse.mods` keys held or the vi mode cursor is above it. + # + # If the `post_processing` field is set to `true`, heuristics will be used to + # shorten the match if there are characters likely not to be part of the hint + # (e.g. a trailing `.`). This is most useful for URIs and applies only to + # `regex` matches. + # + # Values for `action`: + # - Copy + # Copy the hint's text to the clipboard. + # - Paste + # Paste the hint's text to the terminal or search. + # - Select + # Select the hint's text. + # - MoveViModeCursor + # Move the vi mode cursor to the beginning of the hint. + #enabled: + # - regex: "(ipfs:|ipns:|magnet:|mailto:|gemini:|gopher:|https:|http:|news:|file:|git:|ssh:|ftp:)\ + # [^\u0000-\u001F\u007F-\u009F<>\"\\s{-}\\^⟨⟩`]+" + # hyperlinks: true + # command: xdg-open + # post_processing: true + # mouse: + # enabled: true + # mods: None + # binding: + # key: U + # mods: Control|Shift + +# Mouse bindings +# +# Mouse bindings are specified as a list of objects, much like the key +# bindings further below. +# +# To trigger mouse bindings when an application running within Alacritty +# captures the mouse, the `Shift` modifier is automatically added as a +# requirement. +# +# Each mouse binding will specify a: +# +# - `mouse`: +# +# - Middle +# - Left +# - Right +# - Numeric identifier such as `5` +# +# - `action` (see key bindings for actions not exclusive to mouse mode) +# +# - Mouse exclusive actions: +# +# - ExpandSelection +# Expand the selection to the current mouse cursor location. +# +# And optionally: +# +# - `mods` (see key bindings) +#mouse_bindings: +# - { mouse: Right, action: ExpandSelection } +# - { mouse: Right, mods: Control, action: ExpandSelection } +# - { mouse: Middle, mode: ~Vi, 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 +# +# - ToggleViMode +# - SearchForward +# Start searching toward the right of the search origin. +# - SearchBackward +# Start searching toward the left of the search origin. +# - Copy +# - Paste +# - IncreaseFontSize +# - DecreaseFontSize +# - ResetFontSize +# - ScrollPageUp +# - ScrollPageDown +# - ScrollHalfPageUp +# - ScrollHalfPageDown +# - ScrollLineUp +# - ScrollLineDown +# - ScrollToTop +# - ScrollToBottom +# - ClearHistory +# Remove the terminal's scrollback history. +# - Hide +# Hide the Alacritty window. +# - Minimize +# Minimize the Alacritty window. +# - Quit +# Quit Alacritty. +# - ToggleFullscreen +# - SpawnNewInstance +# Spawn a new instance of Alacritty. +# - CreateNewWindow +# Create a new Alacritty window from the current process. +# - ClearLogNotice +# Clear Alacritty's UI warning and error notice. +# - ClearSelection +# Remove the active selection. +# - ReceiveChar +# - None +# +# - Vi mode exclusive actions: +# +# - Open +# Perform the action of the first matching hint under the vi mode cursor +# with `mouse.enabled` set to `true`. +# - ToggleNormalSelection +# - ToggleLineSelection +# - ToggleBlockSelection +# - ToggleSemanticSelection +# Toggle semantic selection based on `selection.semantic_escape_chars`. +# - CenterAroundViCursor +# Center view around vi mode cursor +# +# - Vi mode exclusive cursor motion actions: +# +# - Up +# One line up. +# - Down +# One line down. +# - Left +# One character left. +# - Right +# One character right. +# - First +# First column, or beginning of the line when already at the first column. +# - Last +# Last column, or beginning of the line when already at the last column. +# - FirstOccupied +# First non-empty cell in this terminal row, or first non-empty cell of +# the line when already at the first cell of the row. +# - High +# Top of the screen. +# - Middle +# Center of the screen. +# - Low +# Bottom of the screen. +# - SemanticLeft +# Start of the previous semantically separated word. +# - SemanticRight +# Start of the next semantically separated word. +# - SemanticLeftEnd +# End of the previous semantically separated word. +# - SemanticRightEnd +# End of the next semantically separated word. +# - WordLeft +# Start of the previous whitespace separated word. +# - WordRight +# Start of the next whitespace separated word. +# - WordLeftEnd +# End of the previous whitespace separated word. +# - WordRightEnd +# End of the next whitespace separated word. +# - Bracket +# Character matching the bracket at the cursor's location. +# - SearchNext +# Beginning of the next match. +# - SearchPrevious +# Beginning of the previous match. +# - SearchStart +# Start of the match to the left of the vi mode cursor. +# - SearchEnd +# End of the match to the right of the vi mode cursor. +# +# - Search mode exclusive actions: +# - SearchFocusNext +# Move the focus to the next search match. +# - SearchFocusPrevious +# Move the focus to the previous search match. +# - SearchConfirm +# - SearchCancel +# - SearchClear +# Reset the search regex. +# - SearchDeleteWord +# Delete the last word in the search regex. +# - SearchHistoryPrevious +# Go to the previous regex in the search history. +# - SearchHistoryNext +# Go to the next regex in the search history. +# +# - macOS exclusive actions: +# - ToggleSimpleFullscreen +# Enter fullscreen without occupying another space. +# +# - Linux/BSD exclusive actions: +# +# - CopySelection +# Copy from the selection buffer. +# - PasteSelection +# Paste from the selection buffer. +# +# - `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 +# - Search +# - Alt +# - Vi +# +# 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. +# +# If the same trigger is assigned to multiple actions, all of them are executed +# in the order they were defined in. +#key_bindings: + #- { key: Paste, action: Paste } + #- { key: Copy, action: Copy } + #- { key: L, mods: Control, action: ClearLogNotice } + #- { key: L, mods: Control, mode: ~Vi|~Search, chars: "\x0c" } + #- { key: PageUp, mods: Shift, mode: ~Alt, action: ScrollPageUp } + #- { key: PageDown, mods: Shift, mode: ~Alt, action: ScrollPageDown } + #- { key: Home, mods: Shift, mode: ~Alt, action: ScrollToTop } + #- { key: End, mods: Shift, mode: ~Alt, action: ScrollToBottom } + + # Vi Mode + #- { key: Space, mods: Shift|Control, mode: ~Search, action: ToggleViMode } + #- { key: Space, mods: Shift|Control, mode: Vi|~Search, action: ScrollToBottom } + #- { key: Escape, mode: Vi|~Search, action: ClearSelection } + #- { key: I, mode: Vi|~Search, action: ToggleViMode } + #- { key: I, mode: Vi|~Search, action: ScrollToBottom } + #- { key: C, mods: Control, mode: Vi|~Search, action: ToggleViMode } + #- { key: Y, mods: Control, mode: Vi|~Search, action: ScrollLineUp } + #- { key: E, mods: Control, mode: Vi|~Search, action: ScrollLineDown } + #- { key: G, mode: Vi|~Search, action: ScrollToTop } + #- { key: G, mods: Shift, mode: Vi|~Search, action: ScrollToBottom } + #- { key: B, mods: Control, mode: Vi|~Search, action: ScrollPageUp } + #- { key: F, mods: Control, mode: Vi|~Search, action: ScrollPageDown } + #- { key: U, mods: Control, mode: Vi|~Search, action: ScrollHalfPageUp } + #- { key: D, mods: Control, mode: Vi|~Search, action: ScrollHalfPageDown } + #- { key: Y, mode: Vi|~Search, action: Copy } + #- { key: Y, mode: Vi|~Search, action: ClearSelection } + #- { key: Copy, mode: Vi|~Search, action: ClearSelection } + #- { key: V, mode: Vi|~Search, action: ToggleNormalSelection } + #- { key: V, mods: Shift, mode: Vi|~Search, action: ToggleLineSelection } + #- { key: V, mods: Control, mode: Vi|~Search, action: ToggleBlockSelection } + #- { key: V, mods: Alt, mode: Vi|~Search, action: ToggleSemanticSelection } + #- { key: Return, mode: Vi|~Search, action: Open } + #- { key: Z, mode: Vi|~Search, action: CenterAroundViCursor } + #- { key: K, mode: Vi|~Search, action: Up } + #- { key: J, mode: Vi|~Search, action: Down } + #- { key: H, mode: Vi|~Search, action: Left } + #- { key: L, mode: Vi|~Search, action: Right } + #- { key: Up, mode: Vi|~Search, action: Up } + #- { key: Down, mode: Vi|~Search, action: Down } + #- { key: Left, mode: Vi|~Search, action: Left } + #- { key: Right, mode: Vi|~Search, action: Right } + #- { key: Key0, mode: Vi|~Search, action: First } + #- { key: Key4, mods: Shift, mode: Vi|~Search, action: Last } + #- { key: Key6, mods: Shift, mode: Vi|~Search, action: FirstOccupied } + #- { key: H, mods: Shift, mode: Vi|~Search, action: High } + #- { key: M, mods: Shift, mode: Vi|~Search, action: Middle } + #- { key: L, mods: Shift, mode: Vi|~Search, action: Low } + #- { key: B, mode: Vi|~Search, action: SemanticLeft } + #- { key: W, mode: Vi|~Search, action: SemanticRight } + #- { key: E, mode: Vi|~Search, action: SemanticRightEnd } + #- { key: B, mods: Shift, mode: Vi|~Search, action: WordLeft } + #- { key: W, mods: Shift, mode: Vi|~Search, action: WordRight } + #- { key: E, mods: Shift, mode: Vi|~Search, action: WordRightEnd } + #- { key: Key5, mods: Shift, mode: Vi|~Search, action: Bracket } + #- { key: Slash, mode: Vi|~Search, action: SearchForward } + #- { key: Slash, mods: Shift, mode: Vi|~Search, action: SearchBackward } + #- { key: N, mode: Vi|~Search, action: SearchNext } + #- { key: N, mods: Shift, mode: Vi|~Search, action: SearchPrevious } + + # Search Mode + #- { key: Return, mode: Search|Vi, action: SearchConfirm } + #- { key: Escape, mode: Search, action: SearchCancel } + #- { key: C, mods: Control, mode: Search, action: SearchCancel } + #- { key: U, mods: Control, mode: Search, action: SearchClear } + #- { key: W, mods: Control, mode: Search, action: SearchDeleteWord } + #- { key: P, mods: Control, mode: Search, action: SearchHistoryPrevious } + #- { key: N, mods: Control, mode: Search, action: SearchHistoryNext } + #- { key: Up, mode: Search, action: SearchHistoryPrevious } + #- { key: Down, mode: Search, action: SearchHistoryNext } + #- { key: Return, mode: Search|~Vi, action: SearchFocusNext } + #- { key: Return, mods: Shift, mode: Search|~Vi, action: SearchFocusPrevious } + + # (Windows, Linux, and BSD only) + #- { key: V, mods: Control|Shift, mode: ~Vi, action: Paste } + #- { key: C, mods: Control|Shift, action: Copy } + #- { key: F, mods: Control|Shift, mode: ~Search, action: SearchForward } + #- { key: B, mods: Control|Shift, mode: ~Search, action: SearchBackward } + #- { key: C, mods: Control|Shift, mode: Vi|~Search, action: ClearSelection } + #- { 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: NumpadAdd, mods: Control, action: IncreaseFontSize } + #- { key: Minus, mods: Control, action: DecreaseFontSize } + #- { key: NumpadSubtract, mods: Control, action: DecreaseFontSize } + + # (Windows only) + #- { key: Return, mods: Alt, action: ToggleFullscreen } + + # (macOS only) + #- { key: K, mods: Command, mode: ~Vi|~Search, chars: "\x0c" } + #- { key: K, mods: Command, mode: ~Vi|~Search, action: ClearHistory } + #- { key: Key0, mods: Command, action: ResetFontSize } + #- { key: Equals, mods: Command, action: IncreaseFontSize } + #- { key: Plus, mods: Command, action: IncreaseFontSize } + #- { key: NumpadAdd, mods: Command, action: IncreaseFontSize } + #- { key: Minus, mods: Command, action: DecreaseFontSize } + #- { key: NumpadSubtract, mods: Command, action: DecreaseFontSize } + #- { key: V, mods: Command, action: Paste } + #- { key: C, mods: Command, action: Copy } + #- { key: C, mods: Command, mode: Vi|~Search, action: ClearSelection } + #- { key: H, mods: Command, action: Hide } + #- { key: H, mods: Command|Alt, action: HideOtherApplications } + #- { key: M, mods: Command, action: Minimize } + #- { key: Q, mods: Command, action: Quit } + #- { key: W, mods: Command, action: Quit } + #- { key: N, mods: Command, action: SpawnNewInstance } + #- { key: F, mods: Command|Control, action: ToggleFullscreen } + #- { key: F, mods: Command, mode: ~Search, action: SearchForward } + #- { key: B, mods: Command, mode: ~Search, action: SearchBackward } + +#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`: + # - Off + # - Error + # - Warn + # - Info + # - Debug + # - Trace + #log_level: Warn + + # Print all received window events. + #print_events: false + + # Highlight window damage information. + #highlight_damage: false diff --git a/.config/alacritty/dracula.yml b/.config/alacritty/dracula.yml new file mode 100755 index 0000000..a25eb4b --- /dev/null +++ b/.config/alacritty/dracula.yml @@ -0,0 +1,420 @@ +# Dracula theme for Alacritty +# https://draculatheme.com/alacritty +# +# Color palette +# https://spec.draculatheme.com +# +# Template +# https://github.com/alacritty/alacritty/blob/master/alacritty.yml + +# colors: +# primary: +# background: '#282a36' +# foreground: '#f8f8f2' +# bright_foreground: '#ffffff' +# cursor: +# text: CellBackground +# cursor: CellForeground +# vi_mode_cursor: +# text: CellBackground +# cursor: CellForeground +# search: +# matches: +# foreground: '#44475a' +# background: '#50fa7b' +# focused_match: +# foreground: '#44475a' +# background: '#ffb86c' +# footer_bar: +# background: '#282a36' +# foreground: '#f8f8f2' +# hints: +# start: +# foreground: '#282a36' +# background: '#f1fa8c' +# end: +# foreground: '#f1fa8c' +# background: '#282a36' +# line_indicator: +# foreground: None +# background: None +# selection: +# text: CellForeground +# background: '#44475a' +# normal: +# black: '#21222c' +# red: '#ff5555' +# green: '#50fa7b' +# yellow: '#f1fa8c' +# blue: '#bd93f9' +# magenta: '#ff79c6' +# cyan: '#8be9fd' +# white: '#f8f8f2' +# bright: +# black: '#6272a4' +# red: '#ff6e6e' +# green: '#69ff94' +# yellow: '#ffffa5' +# blue: '#d6acff' +# magenta: '#ff92df' +# cyan: '#a4ffff' +# white: '#ffffff' + +import: + - ~/.config/alacritty/alacritty-themes/themes/3024.dark.yml +schemes: + ### Doom One ### + DoomOne: &DoomOne + 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: '#dfdfdf' + 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 ### + GruvboxDark: &GruvboxDark + # 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 ### + MonokaiPro: &MonokaiPro + # 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 ### + OceanicNext: &OceanicNext + # 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 ### + SolarizedDark: &SolarizedDark + # 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 ### + SolarizedLight: &SolarizedLight + # 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 ### + TomorrowNight: &TomorrowNight + # 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: +# *DoomOne +# *Dracula +# *GruvboxDark +# *MonokaiPro +# *Nord +# *OceanicNext +# *Palenight +# *SolarizedLight +# *SolarizedDark +# *TomorrowNight + + # colors: *Jellybeans diff --git a/.config/awesome/ISSUE_TEMPLATE.md b/.config/awesome/ISSUE_TEMPLATE.md new file mode 100755 index 0000000..9441919 --- /dev/null +++ b/.config/awesome/ISSUE_TEMPLATE.md @@ -0,0 +1,55 @@ +# Please, read me! + +So that I can help you quickly and without having to redirect you here. + +# If you have a question + +Take the following steps: + +1. Use a web search engine +2. Search in [Awesome doc](https://awesomewm.org/doc) +3. Ask the [community](https://awesomewm.org/community) + +and, if you still don't have an answer, you can ask here. + +**Please be warned:** if your question is unrelated to this repository, a reply is only an act of kindness. + +# If you have an issue + +First do + +1. search the [issues section](https://github.com/lcpz/awesome-copycats/issues) and +2. search [lain issues section](https://github.com/lcpz/lain/issues) and +3. search [lain wiki](https://github.com/lcpz/lain/wiki) and +4. try with default Awesome configuration, usually located in `/etc/xdg/awesome/rc.lua` or `/usr/local/etc/xdg/awesome/rc.lua`. + +If you can't find a solution and your issue doesn't happen with default configuration, then go ahead and provide: + +* output of `awesome -v` and `lua -v` +* expected behavior and actual behavior +* steps to reproduce the problem +* X error log (if needed) + +# If Awesome fails to start + +Then something went wrong during its initialisation. You have to provide X error +log. There are two ways: + +1. Restart X like this: + ```shell + startx -- -keeptty -nolisten tcp > $HOME/.xorg.log 2>&1 + ``` + the error log will be output into `$HOME/.xorg.log`. + +2. Use [Xephyr](https://wikipedia.org/wiki/Xephyr): + ```shell + # set screen size as you like + Xephyr :1 -screen 1280x800 2> stdout.txt & DISPLAY=:1 awesome + ``` + the error log will be output into the file `stdout.txt`. + +Before reporting, read the log and see if you can solve it yourself. If you can't, then follow the [previous section](#issuesec). + +# If you have a new feature or theme request + +Write a detailed description of the desired design, preferably with screenshots or mockups. diff --git a/.config/awesome/README.rst b/.config/awesome/README.rst new file mode 100755 index 0000000..44e8e3e --- /dev/null +++ b/.config/awesome/README.rst @@ -0,0 +1,182 @@ +Awesome WM Copycats +=================== + +------------------------- +Themes for Awesome WM 4.x +------------------------- + +:Author: Luca CPZ +:Version: git +:License: BY-NC-SA_ +:Source: https://github.com/lcpz/awesome-copycats + +Description +=========== + +A set of themes for the Awesome_ window manager, version 4.x. + +See branches_ for previous versions. + +Purpose +======= + +The main purpose of this repository is to spread ready to use configurations, which can also serve as a cookbook for customisation. + +A secondary aim is to add new themes only when they constitute different UI/UX designs. + +Features +======== + +- Modularity +- Autohide widgets +- Autostart windowless processes +- Fast MPD and volume shortcuts (first time this trick has been used in Awesome) +- Shortcuts for copying to the clipboard, toggle wiboxes, widgets popups, screenshots capture, moving and magnifying clients +- Quake drop-down terminal +- Calendar with current day highlighted and months switch with a click/scroll +- Notifications for new mails, current song, volume level, hdd critical state, low battery +- OpenWeatherMap integration +- Net carrier status notifier +- Symbolic tag names +- DWM-like textual layoutbox +- Cairo wibar +- Custom layouts +- No borders when there's only one visible client +- Freedesktop.org compliant menu and desktop icons +- Vi-like client focus +- Non-empty tag browsing +- On-the-fly useless gaps resize +- Dynamic tagging + +Gallery +======= + +**Multicolor**, inspired by lucamanni_ + +.. image:: http://dotshare.it/public/images/uploads/650.png + +**Powerarrow**, porting of romockee_'s + +.. image:: http://dotshare.it/public/images/uploads/1453.png + +**Powerarrow Dark** + +.. image:: http://dotshare.it/public/images/uploads/649.jpg + +**Steamburn**, porting of ok100_'s dwm + +.. image:: http://dotshare.it/public/images/uploads/648.png + +**Blackburn** + +.. image:: http://dotshare.it/public/images/uploads/553.png + +**Dremora** + +.. image:: http://dotshare.it/public/images/uploads/652.png + +**Rainbow** + +.. image:: http://dotshare.it/public/images/uploads/606.png + +**Holo**, requested by amouly_ + +.. image:: http://dotshare.it/public/images/uploads/651.jpg + +**Copland**, inspired by foozer_ + +.. image:: http://dotshare.it/public/images/uploads/655.png + +**Vertex**, requested by swordfischer_ + +.. image:: http://dotshare.it/public/images/uploads/1432.jpg + +Installation +============ + +.. code-block:: shell + + git clone --recurse-submodules --remote-submodules --depth 1 -j 2 https://github.com/lcpz/awesome-copycats.git + mv -bv awesome-copycats/{*,.[^.]*} ~/.config/awesome; rm -rf awesome-copycats + +In case you do not want the Git files, use the following as the second command: + +.. code-block:: shell + + mv -bv awesome-copycats/* ~/.config/awesome; rm -rf awesome-copycats + +Usage +===== + +The modular structure allows to + +* set variables +* define startup processes +* change keybindings and layouts +* set client properties + +in ``rc.lua``, and + +* configure widgets +* define wiboxes and screen settings + +in ``theme.lua``, so that you just need to change ``chosen_theme`` variable in ``rc.lua`` to preserve your preferences *and* switch the theme, instead of having file redundancy. + +Just do the following: + +.. code-block:: shell + + $ cd ~/.config/awesome + $ cp rc.lua.template rc.lua + +Then, set the variable ``chosen_theme`` in ``rc.lua`` to your preferred theme, do your settings, and restart Awesome (``Mod4 + ctrl + r``). + +To customize a theme, head over to ``themes/$chosen_theme/theme.lua``. + +Otherwise, if you want to be synced with upstream, modify the theme path in ``rc.lua`` like this: + +.. code-block:: diff + + -beautiful.init(string.format("%s/.config/awesome/themes/%s/theme.lua", os.getenv("HOME"), chosen_theme)) + +beautiful.init(string.format("%s/.config/awesome/themes/%s/theme-personal.lua", os.getenv("HOME"), chosen_theme)) + +then, copy ``theme.lua`` to ``theme-personal.lua`` and do your customizations there. + +This way, you can safely ``git pull`` anytime. + +Notes +===== + +Complements are provided by lain_ and freedesktop_. **Be sure** to satisfy their dependencies_. In particular, mail_ and weather_ widgets have **mandatory** arguments. + +The fonts used in the screenshots are: Terminus_ (Multicolor, Powerarrow, Powerarrow Dark), Roboto_ (Holo, Vertex) and Tamzen_ (other ones). + +As taglist font, Blackburn and Dremora use Icons_, Vertex uses FontAwesome_: be sure to have bitmaps enabled if running under Debian or Ubuntu_. + +Every theme has a colorscheme_. + +Additional default software used: :: + + amixer dmenu librewolf mpc mpd scrot unclutter xbacklight xsel slock + +.. _BY-NC-SA: http://creativecommons.org/licenses/by-nc-sa/4.0 +.. _Awesome: http://github.com/awesomeWM/awesome +.. _branches: https://github.com/lcpz/awesome-copycats/branches +.. _lucamanni: https://github.com/lucamanni/awesome +.. _romockee: https://github.com/romockee/powerarrow +.. _ok100: http://ok100.deviantart.com/art/DWM-January-2013-348656846 +.. _amouly: https://bbs.archlinux.org/viewtopic.php?pid=1307158#p1307158 +.. _swordfischer: https://github.com/lcpz/awesome-copycats/issues/53 +.. _foozer: http://dotshare.it/dots/499 +.. _lain: https://github.com/lcpz/lain +.. _freedesktop: https://github.com/lcpz/awesome-freedesktop +.. _Terminus: http://terminus-font.sourceforge.net +.. _Roboto: https://fonts.google.com/specimen/Roboto +.. _Tamzen: https://github.com/sunaku/tamzen-font +.. _Icons: https://github.com/lcpz/dots/tree/master/.fonts +.. _FontAwesome: https://github.com/FortAwesome/Font-Awesome +.. _Ubuntu: https://wiki.ubuntu.com/Fonts#Enabling_Bitmapped_Fonts +.. _colorscheme: https://github.com/lcpz/dots/tree/master/.colors +.. _dependencies: https://github.com/lcpz/lain/wiki#dependencies +.. _mail: https://github.com/lcpz/lain/wiki/mail +.. _weather: https://github.com/lcpz/lain/wiki/weather diff --git a/.config/awesome/awesome-scratch/.gitignore b/.config/awesome/awesome-scratch/.gitignore new file mode 100755 index 0000000..b25c15b --- /dev/null +++ b/.config/awesome/awesome-scratch/.gitignore @@ -0,0 +1 @@ +*~ diff --git a/.config/awesome/awesome-scratch/README.md b/.config/awesome/awesome-scratch/README.md new file mode 100755 index 0000000..1330a68 --- /dev/null +++ b/.config/awesome/awesome-scratch/README.md @@ -0,0 +1,27 @@ +awesome-scratch +=============== + +scratchpad windows (similar to a quake console) for awesome wm + +###Usage +`scratch.toggle` is used to show and hide scratch windows. It takes a shell command to launch the scratch window and a rule to match the scratch window. + +for example using ezconfig we can add bindings for a scratch terminal and a scratch python repl: +``` + local launchprogs = ezconfig.keytable.join({ + -- scratchpad programs + ['M-c'] = { scratch.toggle, "urxvt -name scratch-term" + , { instance = "scratch-term" } } + , ['M-S-p'] = { scratch.toggle, "urxvt -name scratch-python -e python" + , { instance = "scratch-python" } } + ... +``` + +You'll also probably want to add a rule to make the scratch windows float: +``` + awful.rules.rules = { + ... + { rule = { instance = "scratch" }, + properties = { floating = true} }, + } +``` diff --git a/.config/awesome/awesome-scratch/scratch.lua b/.config/awesome/awesome-scratch/scratch.lua new file mode 100755 index 0000000..cddfa35 --- /dev/null +++ b/.config/awesome/awesome-scratch/scratch.lua @@ -0,0 +1,60 @@ +local client = client +local awful = require("awful") +local util = require("awful.util") + +local scratch = {} +local defaultRule = {instance = "scratch"} + +-- Turn on this scratch window client (add current tag to window's tags, +-- then set focus to the window) +local function turn_on(c) + local current_tag = awful.tag.selected(c.screen) + ctags = {current_tag} + for k,tag in pairs(c:tags()) do + if tag ~= current_tag then table.insert(ctags, tag) end + end + c:tags(ctags) + c:raise() + client.focus = c +end + +-- Turn off this scratch window client (remove current tag from window's tags) +local function turn_off(c) + local current_tag = awful.tag.selected(c.screen) + local ctags = {} + for k,tag in pairs(c:tags()) do + if tag ~= current_tag then table.insert(ctags, tag) end + end + c:tags(ctags) +end + +function scratch.raise(cmd, rule) + local rule = rule or defaultRule + local function matcher(c) return awful.rules.match(c, rule) end + + -- logic mostly copied form awful.client.run_or_raise, except we don't want + -- to change to or merge with scratchpad tag, just show the window + local clients = client.get() + local findex = util.table.hasitem(clients, client.focus) or 1 + local start = util.cycle(#clients, findex + 1) + + for c in awful.client.iterate(matcher, start) do + turn_on(c) + return + end + + -- client not found, spawn it + util.spawn(cmd) +end + +function scratch.toggle(cmd, rule, alwaysclose) + local rule = rule or defaultRule + + if client.focus and awful.rules.match(client.focus, rule) then + turn_off(client.focus) + else + scratch.raise(cmd, rule) + end +end + +return scratch diff --git a/.config/awesome/awesome-wm-widgets/.luacheckrc b/.config/awesome/awesome-wm-widgets/.luacheckrc new file mode 100755 index 0000000..e4f47fa --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/.luacheckrc @@ -0,0 +1,24 @@ +self = false + +globals = { + "screen", + "mouse", + "root", + "client" +} + +read_globals = { + "awesome", + "button", + "dbus", + "drawable", + "drawin", + "key", + "keygrabber", + "mousegrabber", + "selection", + "tag", + "window", + "table.unpack", + "math.atan2", +} \ No newline at end of file diff --git a/.config/awesome/awesome-wm-widgets/CODEOWNERS b/.config/awesome/awesome-wm-widgets/CODEOWNERS new file mode 100755 index 0000000..0661fff --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/CODEOWNERS @@ -0,0 +1 @@ +* @streetturtle diff --git a/.config/awesome/awesome-wm-widgets/LICENSE b/.config/awesome/awesome-wm-widgets/LICENSE new file mode 100755 index 0000000..1f89e49 --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/LICENSE @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) 2017 + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + diff --git a/.config/awesome/awesome-wm-widgets/README.md b/.config/awesome/awesome-wm-widgets/README.md new file mode 100755 index 0000000..1617fae --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/README.md @@ -0,0 +1,63 @@ +

+ logo +

+ +

+ + + GitHub repo size + GitHub Workflow Status + + + + +

+ +Set of widgets compatible with Awesome Window Manager v.4.3+. + +## Screenshots + +Spotify, CPU, RAM, brightness-arc, volume-arc and battery-arc widgets: + +

+ +

+ +Brightness, volume and battery widgets: + +

+ +

+ +![screenshot](./screenshot.png) + +Some more screenshots in this reddit [post](https://www.reddit.com/r/unixporn/comments/8qijmx/awesomewm_dark_theme/) + +# Installation + +Clone the repo under **~/.config/awesome/**, then follow an Installation section of widget's readme file. + +# Stargazers + +[![Stargazers over time](https://starchart.cc/streetturtle/awesome-wm-widgets.svg)](https://starchart.cc/streetturtle/awesome-wm-widgets) + +# Troubleshooting + +In case of any doubts/questions/problems: + - create an [issue](https://github.com/streetturtle/awesome-wm-widgets/issues/new/choose) + - raise a question on [Discussions](https://github.com/streetturtle/awesome-wm-widgets/discussions)! + - ping me on AwesomeWM's discord, here's an [invite](https://discord.gg/BPat4F87dg) + +# Support + +If you find anything useful here, you can: + - star a repo - this really motivates me to work on this project + - or + - or even become a [sponsor](https://github.com/sponsors/streetturtle) + +# Contributors + + + + + diff --git a/.config/awesome/awesome-wm-widgets/Screenshot from 2019-03-01 14-28-18.png b/.config/awesome/awesome-wm-widgets/Screenshot from 2019-03-01 14-28-18.png new file mode 100755 index 0000000..4c9bd87 Binary files /dev/null and b/.config/awesome/awesome-wm-widgets/Screenshot from 2019-03-01 14-28-18.png differ diff --git a/.config/awesome/awesome-wm-widgets/apt-widget/README.md b/.config/awesome/awesome-wm-widgets/apt-widget/README.md new file mode 100755 index 0000000..f3ac47a --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/apt-widget/README.md @@ -0,0 +1,27 @@ +# APT widget + +Widget which shows a list of APT packages to be updated: + +![screenshot](./screenshots/screenshot.gif) + +Features: + - scrollable list !!! (thanks to this [post](https://www.reddit.com/r/awesomewm/comments/isx89x/scrolling_a_layout_fixed_flexed_layout_widget/) of reddit) + - update single package + - update multiple packages + +## Installation + +Clone the repo under ~/.config/awesome/ folder, then in rc.lua add the following: + +```lua +local apt_widget = require("awesome-wm-widgets.apt-widget.apt-widget") + +... +s.mytasklist, -- Middle widget + { -- Right widgets + layout = wibox.layout.fixed.horizontal, + ... + apt_widget(), + ... +``` + diff --git a/.config/awesome/awesome-wm-widgets/apt-widget/apt-widget.lua b/.config/awesome/awesome-wm-widgets/apt-widget/apt-widget.lua new file mode 100755 index 0000000..c15c32f --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/apt-widget/apt-widget.lua @@ -0,0 +1,349 @@ +------------------------------------------------- +-- APT Widget for Awesome Window Manager +-- Lists containers and allows to manage them +-- More details could be found here: +-- https://github.com/streetturtle/awesome-wm-widgets/tree/master/apt-widget + +-- @author Pavel Makhov +-- @copyright 2021 Pavel Makhov +------------------------------------------------- + +local awful = require("awful") +local wibox = require("wibox") +local spawn = require("awful.spawn") +local naughty = require("naughty") +local gears = require("gears") +local beautiful = require("beautiful") + +local HOME_DIR = os.getenv("HOME") +local WIDGET_DIR = HOME_DIR .. '/.config/awesome/awesome-wm-widgets/apt-widget' +local ICONS_DIR = WIDGET_DIR .. '/icons/' + +local LIST_PACKAGES = [[sh -c "LC_ALL=c apt list --upgradable 2>/dev/null"]] + +--- Utility function to show warning messages +local function show_warning(message) + naughty.notify{ + preset = naughty.config.presets.critical, + title = 'Docker Widget', + text = message} +end + +local wibox_popup = wibox { + ontop = true, + visible = false, + shape = function(cr, width, height) + gears.shape.rounded_rect(cr, width, height, 4) + end, + border_width = 1, + border_color = beautiful.bg_focus, + max_widget_size = 500, + height = 500, + width = 300, +} + +local apt_widget = wibox.widget { + { + { + id = 'icon', + widget = wibox.widget.imagebox + }, + margins = 4, + layout = wibox.container.margin + }, + layout = wibox.layout.fixed.horizontal, + set_icon = function(self, new_icon) + self:get_children_by_id("icon")[1].image = new_icon + end +} + +--- Parses the line and creates the package table out of it +--- yaru-theme-sound/focal-updates,focal-updates 20.04.10.1 all [upgradable from: 20.04.8] +local parse_package = function(line) + local name,_,nv,type,ov = line:match('(.*)%/(.*)%s(.*)%s(.*)%s%[upgradable from: (.*)]') + + if name == nil then return nil end + + local package = { + name = name, + new_version = nv, + type = type, + old_version = ov + } + return package +end + +local function worker(user_args) + + local args = user_args or {} + + local icon = args.icon or ICONS_DIR .. 'white-black.svg' + + apt_widget:set_icon(icon) + + local pointer = 0 + local min_widgets = 5 + local carousel = false + + local function rebuild_widget(containers, errors, _, _) + + local to_update = {} + + if errors ~= '' then + show_warning(errors) + return + end + + local rows = wibox.layout.fixed.vertical() + rows:connect_signal("button::press", function(_,_,_,button) + if carousel then + if button == 4 then -- up scrolling + local cnt = #rows.children + local first_widget = rows.children[1] + rows:insert(cnt+1, first_widget) + rows:remove(1) + elseif button == 5 then -- down scrolling + local cnt = #rows.children + local last_widget = rows.children[cnt] + rows:insert(1, last_widget) + rows:remove(cnt+1) + end + else + if button == 5 then -- up scrolling + if pointer < #rows.children and ((#rows.children - pointer) >= min_widgets) then + pointer = pointer + 1 + rows.children[pointer].visible = false + end + elseif button == 4 then -- down scrolling + if pointer > 0 then + rows.children[pointer].visible = true + pointer = pointer - 1 + end + end + end + end) + + for line in containers:gmatch("[^\r\n]+") do + local package = parse_package(line) + + if package ~= nil then + + local refresh_button = wibox.widget { + { + { + id = 'icon', + image = ICONS_DIR .. 'refresh-cw.svg', + resize = false, + widget = wibox.widget.imagebox + }, + margins = 4, + widget = wibox.container.margin + }, + shape = gears.shape.circle, + opacity = 0.5, + widget = wibox.container.background + } + local old_cursor, old_wibox + refresh_button:connect_signal("mouse::enter", function(c) + c:set_opacity(1) + c:emit_signal('widget::redraw_needed') + local wb = mouse.current_wibox + old_cursor, old_wibox = wb.cursor, wb + wb.cursor = "hand1" + end) + refresh_button:connect_signal("mouse::leave", function(c) + c:set_opacity(0.5) + c:emit_signal('widget::redraw_needed') + if old_wibox then + old_wibox.cursor = old_cursor + old_wibox = nil + end + end) + + local row = wibox.widget { + { + { + { + { + id = 'checkbox', + checked = false, + color = beautiful.bg_normal, + paddings = 2, + shape = gears.shape.circle, + forced_width = 20, + forced_height = 20, + check_color = beautiful.fg_urgent, + border_color = beautiful.bg_urgent, + border_width = 1, + widget = wibox.widget.checkbox + }, + valign = 'center', + layout = wibox.container.place, + }, + { + { + id = 'name', + markup = '' .. package['name'] .. '', + widget = wibox.widget.textbox + }, + halign = 'left', + layout = wibox.container.place + }, + { + refresh_button, + halign = 'right', + valign = 'center', + fill_horizontal = true, + layout = wibox.container.place, + }, + spacing = 8, + layout = wibox.layout.fixed.horizontal + }, + margins = 8, + layout = wibox.container.margin + }, + id = 'row', + bg = beautiful.bg_normal, + widget = wibox.container.background, + click = function(self, checked) + local a = self:get_children_by_id('checkbox')[1] + if checked == nil then + a:set_checked(not a.checked) + else + a:set_checked(checked) + end + + if a.checked then + to_update[package['name']] = self + else + to_update[package['name']] = false + end + end, + update = function(self) + refresh_button:get_children_by_id('icon')[1]:set_image(ICONS_DIR .. 'watch.svg') + self:get_children_by_id('name')[1]:set_opacity(0.4) + self:get_children_by_id('name')[1]:emit_signal('widget::redraw_needed') + + spawn.easy_async( + string.format([[sh -c 'yes | aptdcon --hide-terminal -u %s']], package['name']), + function(stdout, stderr) -- luacheck:ignore 212 + rows:remove_widgets(self) + end) + + end + } + + row:connect_signal("mouse::enter", function(c) + c:set_bg(beautiful.bg_focus) + end) + row:connect_signal("mouse::leave", function(c) + c:set_bg(beautiful.bg_normal) + end) + + row:connect_signal("button::press", function(c, _, _, button) + if button == 1 then c:click() end + end) + + refresh_button:buttons(awful.util.table.join(awful.button({}, 1, function() + row:update() + end))) + + rows:add(row) + end + end + + + local header_checkbox = wibox.widget { + checked = false, + color = beautiful.bg_normal, + paddings = 2, + shape = gears.shape.circle, + forced_width = 20, + forced_height = 20, + check_color = beautiful.fg_urgent, + border_color = beautiful.bg_urgent, + border_width = 1, + widget = wibox.widget.checkbox + } + header_checkbox:connect_signal("button::press", function(c) + c:set_checked(not c.checked) + local cbs = rows.children + for _,v in ipairs(cbs) do + v:click(c.checked) + end + end) + + local header_refresh_icon = wibox.widget { + image = ICONS_DIR .. 'refresh-cw.svg', + resize = false, + widget = wibox.widget.imagebox + } + header_refresh_icon:buttons(awful.util.table.join(awful.button({}, 1, function() + print(#to_update) + for _,v in pairs(to_update) do + if v ~= nil then + v:update() + end + end + end))) + + local header_row = wibox.widget { + { + { + { + header_checkbox, + valign = 'center', + layout = wibox.container.place, + }, + { + { + id = 'name', + markup = '' .. #rows.children .. ' packages to update', + widget = wibox.widget.textbox + }, + halign = 'center', + layout = wibox.container.place + }, + { + header_refresh_icon, + halign = 'right', + valign = 'center', + layout = wibox.container.place, + }, + layout = wibox.layout.align.horizontal + }, + margins = 8, + layout = wibox.container.margin + }, + bg = beautiful.bg_normal, + widget = wibox.container.background + } + + wibox_popup:setup { + header_row, + rows, + layout = wibox.layout.fixed.vertical + } + end + + apt_widget:buttons( + awful.util.table.join( + awful.button({}, 1, function() + if wibox_popup.visible then + wibox_popup.visible = not wibox_popup.visible + else + spawn.easy_async(LIST_PACKAGES, + function(stdout, stderr) + rebuild_widget(stdout, stderr) + wibox_popup.visible = true + awful.placement.top(wibox_popup, { margins = { top = 20 }, parent = mouse}) + end) + end + end) + ) + ) + + return apt_widget +end + +return setmetatable(apt_widget, { __call = function(_, ...) return worker(...) end }) diff --git a/.config/awesome/awesome-wm-widgets/apt-widget/icons/black.svg b/.config/awesome/awesome-wm-widgets/apt-widget/icons/black.svg new file mode 100755 index 0000000..95c8410 --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/apt-widget/icons/black.svg @@ -0,0 +1,25 @@ + + + + + + + + + diff --git a/.config/awesome/awesome-wm-widgets/apt-widget/icons/help-circle.svg b/.config/awesome/awesome-wm-widgets/apt-widget/icons/help-circle.svg new file mode 100755 index 0000000..51fddd8 --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/apt-widget/icons/help-circle.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/.config/awesome/awesome-wm-widgets/apt-widget/icons/orange.svg b/.config/awesome/awesome-wm-widgets/apt-widget/icons/orange.svg new file mode 100755 index 0000000..0ec1388 --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/apt-widget/icons/orange.svg @@ -0,0 +1,25 @@ + + + + + + + + + diff --git a/.config/awesome/awesome-wm-widgets/apt-widget/icons/refresh-cw.svg b/.config/awesome/awesome-wm-widgets/apt-widget/icons/refresh-cw.svg new file mode 100755 index 0000000..39f52a5 --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/apt-widget/icons/refresh-cw.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/.config/awesome/awesome-wm-widgets/apt-widget/icons/watch.svg b/.config/awesome/awesome-wm-widgets/apt-widget/icons/watch.svg new file mode 100755 index 0000000..661a560 --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/apt-widget/icons/watch.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/.config/awesome/awesome-wm-widgets/apt-widget/icons/white-black.svg b/.config/awesome/awesome-wm-widgets/apt-widget/icons/white-black.svg new file mode 100755 index 0000000..dc7ee55 --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/apt-widget/icons/white-black.svg @@ -0,0 +1,25 @@ + + + + + + + + + diff --git a/.config/awesome/awesome-wm-widgets/apt-widget/icons/white-orange.svg b/.config/awesome/awesome-wm-widgets/apt-widget/icons/white-orange.svg new file mode 100755 index 0000000..c353bb5 --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/apt-widget/icons/white-orange.svg @@ -0,0 +1,25 @@ + + + + + + + + + diff --git a/.config/awesome/awesome-wm-widgets/apt-widget/screenshots/screenshot.gif b/.config/awesome/awesome-wm-widgets/apt-widget/screenshots/screenshot.gif new file mode 100755 index 0000000..6ffe2aa Binary files /dev/null and b/.config/awesome/awesome-wm-widgets/apt-widget/screenshots/screenshot.gif differ diff --git a/.config/awesome/awesome-wm-widgets/awesome-o.png b/.config/awesome/awesome-wm-widgets/awesome-o.png new file mode 100755 index 0000000..424d008 Binary files /dev/null and b/.config/awesome/awesome-wm-widgets/awesome-o.png differ diff --git a/.config/awesome/awesome-wm-widgets/awesome.png b/.config/awesome/awesome-wm-widgets/awesome.png new file mode 100755 index 0000000..6960955 Binary files /dev/null and b/.config/awesome/awesome-wm-widgets/awesome.png differ diff --git a/.config/awesome/awesome-wm-widgets/battery-widget/README.md b/.config/awesome/awesome-wm-widgets/battery-widget/README.md new file mode 100755 index 0000000..b15aac6 --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/battery-widget/README.md @@ -0,0 +1,75 @@ +# Battery widget + +Simple and easy-to-install widget for Awesome Window Manager. + +This widget consists of: + + - an icon which shows the battery level: + ![Battery Widget](./bat-wid-1.png) + - a pop-up window, which shows up when you hover over an icon: + ![Battery Widget](./bat-wid-2.png) + Alternatively you can use a tooltip (check the code): + ![Battery Widget](./bat-wid-22.png) + - a pop-up warning message which appears on bottom right corner when battery level is less that 15% (you can get the image [here](https://vk.com/images/stickers/1933/512.png)): + ![Battery Widget](./bat-wid-3.png) + +Note that widget uses the Arc icon theme, so it should be [installed](https://github.com/horst3180/arc-icon-theme#installation) first under **/usr/share/icons/Arc/** folder. + +## Customization + +It is possible to customize widget by providing a table with all or some of the following config parameters: + +| Name | Default | Description | +|---|---|---| +| `font` | Play 8 | Fond | +| `path_to_icons` | `/usr/share/icons/Arc/status/symbolic/` | Path to the folder with icons* | +| `show_current_level`| false | Show current charge level | +| `margin_right`|0| The right margin of the widget| +| `margin_left`|0| The left margin of the widget| +| `display_notification` | `false` | Display a notification on mouseover | +| `notification_position` | `top_right` | The notification position | +| `timeout` | 10 | How often in seconds the widget refreshes | +| `warning_msg_title` | _Huston, we have a problem_ | Title of the warning popup | +| `warning_msg_text` | _Battery is dying_ | Text of the warning popup | +| `warning_msg_position` | `bottom_right` | Position of the warning popup | +| `warning_msg_icon` | ~/.config/awesome/awesome-wm-widgets/battery-widget/spaceman.jpg | Icon of the warning popup | +| `enable_battery_warning` | `true` | Display low battery warning | + +*Note: the widget expects following icons to be present in the folder: + + - battery-caution-charging-symbolic.svg + - battery-empty-charging-symbolic.svg + - battery-full-charged-symbolic.svg + - battery-full-symbolic.svg + - battery-good-symbolic.svg + - battery-low-symbolic.svg + - battery-caution-symbolic.svg + - battery-empty-symbolic.svg + - battery-full-charging-symbolic.svg + - battery-good-charging-symbolic.svg + - battery-low-charging-symbolic.svg + - battery-missing-symbolic.svg + +## Installation + +This widget reads the output of acpi tool. + +- install `acpi` and check the output: + +```bash +$ sudo apt-get install acpi +$ acpi +Battery 0: Discharging, 66%, 02:34:06 remaining +``` + +```lua +local battery_widget = require("awesome-wm-widgets.battery-widget.battery") + +... +s.mytasklist, -- Middle widget + { -- Right widgets + layout = wibox.layout.fixed.horizontal, + ... + battery_widget(), + ... +``` diff --git a/.config/awesome/awesome-wm-widgets/battery-widget/bat-wid-1.png b/.config/awesome/awesome-wm-widgets/battery-widget/bat-wid-1.png new file mode 100755 index 0000000..00e1618 Binary files /dev/null and b/.config/awesome/awesome-wm-widgets/battery-widget/bat-wid-1.png differ diff --git a/.config/awesome/awesome-wm-widgets/battery-widget/bat-wid-2.png b/.config/awesome/awesome-wm-widgets/battery-widget/bat-wid-2.png new file mode 100755 index 0000000..ae20af2 Binary files /dev/null and b/.config/awesome/awesome-wm-widgets/battery-widget/bat-wid-2.png differ diff --git a/.config/awesome/awesome-wm-widgets/battery-widget/bat-wid-22.png b/.config/awesome/awesome-wm-widgets/battery-widget/bat-wid-22.png new file mode 100755 index 0000000..38761f7 Binary files /dev/null and b/.config/awesome/awesome-wm-widgets/battery-widget/bat-wid-22.png differ diff --git a/.config/awesome/awesome-wm-widgets/battery-widget/bat-wid-3.png b/.config/awesome/awesome-wm-widgets/battery-widget/bat-wid-3.png new file mode 100755 index 0000000..352b496 Binary files /dev/null and b/.config/awesome/awesome-wm-widgets/battery-widget/bat-wid-3.png differ diff --git a/.config/awesome/awesome-wm-widgets/battery-widget/battery.lua b/.config/awesome/awesome-wm-widgets/battery-widget/battery.lua new file mode 100755 index 0000000..452d7ef --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/battery-widget/battery.lua @@ -0,0 +1,200 @@ +------------------------------------------------- +-- Battery Widget for Awesome Window Manager +-- Shows the battery status using the ACPI tool +-- More details could be found here: +-- https://github.com/streetturtle/awesome-wm-widgets/tree/master/battery-widget + +-- @author Pavel Makhov +-- @copyright 2017 Pavel Makhov +------------------------------------------------- + +local awful = require("awful") +local naughty = require("naughty") +local watch = require("awful.widget.watch") +local wibox = require("wibox") +local gfs = require("gears.filesystem") +local dpi = require('beautiful').xresources.apply_dpi + +-- acpi sample outputs +-- Battery 0: Discharging, 75%, 01:51:38 remaining +-- Battery 0: Charging, 53%, 00:57:43 until charged + +local HOME = os.getenv("HOME") +local WIDGET_DIR = HOME .. '/.config/awesome/awesome-wm-widgets/battery-widget' + +local battery_widget = {} +local function worker(user_args) + local args = user_args or {} + + local font = args.font or 'Play 8' + local path_to_icons = args.path_to_icons or "/usr/share/icons/Arc/status/symbolic/" + local show_current_level = args.show_current_level or false + local margin_left = args.margin_left or 0 + local margin_right = args.margin_right or 0 + + local display_notification = args.display_notification or false + local display_notification_onClick = args.display_notification_onClick or true + local position = args.notification_position or "top_right" + local timeout = args.timeout or 10 + + local warning_msg_title = args.warning_msg_title or 'Huston, we have a problem' + local warning_msg_text = args.warning_msg_text or 'Battery is dying' + local warning_msg_position = args.warning_msg_position or 'bottom_right' + local warning_msg_icon = args.warning_msg_icon or WIDGET_DIR .. '/spaceman.jpg' + local enable_battery_warning = args.enable_battery_warning + if enable_battery_warning == nil then + enable_battery_warning = true + end + + if not gfs.dir_readable(path_to_icons) then + naughty.notify{ + title = "Battery Widget", + text = "Folder with icons doesn't exist: " .. path_to_icons, + preset = naughty.config.presets.critical + } + end + + local icon_widget = wibox.widget { + { + id = "icon", + widget = wibox.widget.imagebox, + resize = false + }, + valign = 'center', + layout = wibox.container.place, + } + local level_widget = wibox.widget { + font = font, + widget = wibox.widget.textbox + } + + battery_widget = wibox.widget { + icon_widget, + level_widget, + layout = wibox.layout.fixed.horizontal, + } + -- Popup with battery info + -- One way of creating a pop-up notification - naughty.notify + local notification + local function show_battery_status(batteryType) + awful.spawn.easy_async([[bash -c 'acpi']], + function(stdout, _, _, _) + naughty.destroy(notification) + notification = naughty.notify{ + text = stdout, + title = "Battery status", + icon = path_to_icons .. batteryType .. ".svg", + icon_size = dpi(16), + position = position, + timeout = 5, hover_timeout = 0.5, + width = 200, + screen = mouse.screen + } + end + ) + end + + -- Alternative to naughty.notify - tooltip. You can compare both and choose the preferred one + --battery_popup = awful.tooltip({objects = {battery_widget}}) + + -- To use colors from beautiful theme put + -- following lines in rc.lua before require("battery"): + -- beautiful.tooltip_fg = beautiful.fg_normal + -- beautiful.tooltip_bg = beautiful.bg_normal + + local function show_battery_warning() + naughty.notify { + icon = warning_msg_icon, + icon_size = 100, + text = warning_msg_text, + title = warning_msg_title, + timeout = 25, -- show the warning for a longer time + hover_timeout = 0.5, + position = warning_msg_position, + bg = "#F06060", + fg = "#EEE9EF", + width = 300, + screen = mouse.screen + } + end + local last_battery_check = os.time() + local batteryType = "battery-good-symbolic" + + watch("acpi -i", timeout, + function(widget, stdout) + local battery_info = {} + local capacities = {} + for s in stdout:gmatch("[^\r\n]+") do + local status, charge_str, _ = string.match(s, '.+: ([%a%s]+), (%d?%d?%d)%%,?(.*)') + if status ~= nil then + table.insert(battery_info, {status = status, charge = tonumber(charge_str)}) + else + local cap_str = string.match(s, '.+:.+last full capacity (%d+)') + table.insert(capacities, tonumber(cap_str)) + end + end + + local capacity = 0 + for _, cap in ipairs(capacities) do + capacity = capacity + cap + end + + local charge = 0 + local status + for i, batt in ipairs(battery_info) do + if capacities[i] ~= nil then + if batt.charge >= charge then + status = batt.status -- use most charged battery status + -- this is arbitrary, and maybe another metric should be used + end + + charge = charge + batt.charge * capacities[i] + end + end + charge = charge / capacity + + if show_current_level then + level_widget.text = string.format('%d%%', charge) + end + + if (charge >= 1 and charge < 15) then + batteryType = "battery-empty%s-symbolic" + if enable_battery_warning and status ~= 'Charging' and os.difftime(os.time(), last_battery_check) > 300 then + -- if 5 minutes have elapsed since the last warning + last_battery_check = os.time() + + show_battery_warning() + end + elseif (charge >= 15 and charge < 40) then batteryType = "battery-caution%s-symbolic" + elseif (charge >= 40 and charge < 60) then batteryType = "battery-low%s-symbolic" + elseif (charge >= 60 and charge < 80) then batteryType = "battery-good%s-symbolic" + elseif (charge >= 80 and charge <= 100) then batteryType = "battery-full%s-symbolic" + end + + if status == 'Charging' then + batteryType = string.format(batteryType, '-charging') + else + batteryType = string.format(batteryType, '') + end + + widget.icon:set_image(path_to_icons .. batteryType .. ".svg") + + -- Update popup text + -- battery_popup.text = string.gsub(stdout, "\n$", "") + end, + icon_widget) + + if display_notification then + battery_widget:connect_signal("mouse::enter", function() show_battery_status(batteryType) end) + battery_widget:connect_signal("mouse::leave", function() naughty.destroy(notification) end) + elseif display_notification_onClick then + battery_widget:connect_signal("button::press", function(_,_,_,button) + if (button == 3) then show_battery_status(batteryType) end + end) + battery_widget:connect_signal("mouse::leave", function() naughty.destroy(notification) end) + end + + return wibox.container.margin(battery_widget, margin_left, margin_right) +end + +return setmetatable(battery_widget, { __call = function(_, ...) return worker(...) end }) diff --git a/.config/awesome/awesome-wm-widgets/battery-widget/spaceman.jpg b/.config/awesome/awesome-wm-widgets/battery-widget/spaceman.jpg new file mode 100755 index 0000000..73ddaf3 Binary files /dev/null and b/.config/awesome/awesome-wm-widgets/battery-widget/spaceman.jpg differ diff --git a/.config/awesome/awesome-wm-widgets/batteryarc-widget/10_c.png b/.config/awesome/awesome-wm-widgets/batteryarc-widget/10_c.png new file mode 100755 index 0000000..3faf753 Binary files /dev/null and b/.config/awesome/awesome-wm-widgets/batteryarc-widget/10_c.png differ diff --git a/.config/awesome/awesome-wm-widgets/batteryarc-widget/10_d.png b/.config/awesome/awesome-wm-widgets/batteryarc-widget/10_d.png new file mode 100755 index 0000000..c9aa8d3 Binary files /dev/null and b/.config/awesome/awesome-wm-widgets/batteryarc-widget/10_d.png differ diff --git a/.config/awesome/awesome-wm-widgets/batteryarc-widget/20_c.png b/.config/awesome/awesome-wm-widgets/batteryarc-widget/20_c.png new file mode 100755 index 0000000..f0a191d Binary files /dev/null and b/.config/awesome/awesome-wm-widgets/batteryarc-widget/20_c.png differ diff --git a/.config/awesome/awesome-wm-widgets/batteryarc-widget/20_d.png b/.config/awesome/awesome-wm-widgets/batteryarc-widget/20_d.png new file mode 100755 index 0000000..15fabed Binary files /dev/null and b/.config/awesome/awesome-wm-widgets/batteryarc-widget/20_d.png differ diff --git a/.config/awesome/awesome-wm-widgets/batteryarc-widget/80_c.png b/.config/awesome/awesome-wm-widgets/batteryarc-widget/80_c.png new file mode 100755 index 0000000..e6dae75 Binary files /dev/null and b/.config/awesome/awesome-wm-widgets/batteryarc-widget/80_c.png differ diff --git a/.config/awesome/awesome-wm-widgets/batteryarc-widget/80_d.png b/.config/awesome/awesome-wm-widgets/batteryarc-widget/80_d.png new file mode 100755 index 0000000..220c8e3 Binary files /dev/null and b/.config/awesome/awesome-wm-widgets/batteryarc-widget/80_d.png differ diff --git a/.config/awesome/awesome-wm-widgets/batteryarc-widget/README.md b/.config/awesome/awesome-wm-widgets/batteryarc-widget/README.md new file mode 100755 index 0000000..98a2956 --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/batteryarc-widget/README.md @@ -0,0 +1,73 @@ +# Batteryarc widget + +[![GitHub issues by-label](https://img.shields.io/github/issues-raw/streetturtle/awesome-wm-widgets/batteryarc)](https://github.com/streetturtle/awesome-wm-widgets/labels/batteryarc) + +This widget is more informative version of [battery widget](https://github.com/streetturtle/awesome-wm-widgets/tree/master/battery-widget). + +Depending of the battery status it could look following ways: + + - ![10_d](./10_d.png) - less than 15 percent + - ![10_c](./10_c.png) - less than 15 percent, charging + - ![20_d](./20_d.png) - between 15 and 40 percent + - ![20_c](./20_c.png) - between 15 and 40 percent, charging + - ![80_d](./80_d.png) - more than 40 percent + - ![80_c](./80_c.png) - more than 40 percent, charging + +If a battery level is low then warning popup will show up: + +![warning](./warning.png) + +## Customization + +It is possible to customize widget by providing a table with all or some of the following config parameters: + +| Name | Default | Description | +|---|---|---| +| `font` | Play 6 | Font | +| `arc_thickness` | 2 | Thickness of the arc | +| `show_current_level`| false | Show current charge level | +| `size`| 18 | Size of the widget | +| `timeout` | 10 | How often in seconds the widget refreshes | +| `main_color` | `beautiful.fg_color` | Color of the text with the current charge level and the arc | +| `bg_color` | `#ffffff11` | Color of the charge level background | +| `low_level_color` | `#e53935` | Arc color when battery charge is less that 15% | +| `medium_level_color` | `#c0ca33` | Arc color when battery charge is between 15% and 40% | +| `charging_color` | `#43a047` | Color of the circle inside the arc when charging | +| `warning_msg_title` | _Huston, we have a problem_ | Title of the warning popup | +| `warning_msg_text` | _Battery is dying_ | Text of the warning popup | +| `warning_msg_position` | `bottom_right` | Position of the warning popup | +| `warning_msg_icon` | ~/.config/awesome/awesome-wm-widgets/batteryarc-widget/spaceman.jpg | Icon of the warning popup | +| `enable_battery_warning` | `true` | Display low battery warning | +| `show_notification_mode` | `on_hover` | How to trigger a notification with the battery status: `on_hover`, `on_click` or `off` | +| `notification_position` | `top_left` | Where to show she notification when triggered. Values: `top_right`, `top_left`, `bottom_left`, `bottom_right`, `top_middle`, `bottom_middle`. (default `top_right`) | + +## Requirements + +This widget requires the `acpi` command to be available to retrieve battery and +power information. + +## Installation + +Clone repo, include widget and use it in **rc.lua**: + +```lua +local batteryarc_widget = require("awesome-wm-widgets.batteryarc-widget.batteryarc") +... +s.mytasklist, -- Middle widget + { -- Right widgets + layout = wibox.layout.fixed.horizontal, + ... + --[[default]] + batteryarc_widget(), + --[[or customized]] + batteryarc_widget({ + show_current_level = true, + arc_thickness = 1, + }), + } + ... +``` + +## Troubleshooting + +In case of any doubts or questions please raise an [issue](https://github.com/streetturtle/awesome-wm-widgets/issues/new). diff --git a/.config/awesome/awesome-wm-widgets/batteryarc-widget/batteryarc.lua b/.config/awesome/awesome-wm-widgets/batteryarc-widget/batteryarc.lua new file mode 100755 index 0000000..55a7694 --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/batteryarc-widget/batteryarc.lua @@ -0,0 +1,170 @@ +------------------------------------------------- +-- Battery Arc Widget for Awesome Window Manager +-- Shows the battery level of the laptop +-- More details could be found here: +-- https://github.com/streetturtle/awesome-wm-widgets/tree/master/batteryarc-widget + +-- @author Pavel Makhov +-- @copyright 2020 Pavel Makhov +------------------------------------------------- + +local awful = require("awful") +local beautiful = require("beautiful") +local naughty = require("naughty") +local wibox = require("wibox") +local watch = require("awful.widget.watch") + +local HOME = os.getenv("HOME") +local WIDGET_DIR = HOME .. '/.config/awesome/awesome-wm-widgets/batteryarc-widget' + +local batteryarc_widget = {} + +local function worker(user_args) + + local args = user_args or {} + + local font = args.font or 'Play 6' + local arc_thickness = args.arc_thickness or 2 + local show_current_level = args.show_current_level or false + local size = args.size or 18 + local timeout = args.timeout or 10 + local show_notification_mode = args.show_notification_mode or 'on_hover' -- on_hover / on_click + local notification_position = args.notification_position or 'top_right' -- see naughty.notify position argument + + local main_color = args.main_color or beautiful.fg_color + local bg_color = args.bg_color or '#ffffff11' + local low_level_color = args.low_level_color or '#e53935' + local medium_level_color = args.medium_level_color or '#c0ca33' + local charging_color = args.charging_color or '#43a047' + + local warning_msg_title = args.warning_msg_title or 'Houston, we have a problem' + local warning_msg_text = args.warning_msg_text or 'Battery is dying' + local warning_msg_position = args.warning_msg_position or 'bottom_right' + local warning_msg_icon = args.warning_msg_icon or WIDGET_DIR .. '/spaceman.jpg' + local enable_battery_warning = args.enable_battery_warning + if enable_battery_warning == nil then + enable_battery_warning = true + end + + local text = wibox.widget { + font = font, + align = 'center', + valign = 'center', + widget = wibox.widget.textbox + } + + local text_with_background = wibox.container.background(text) + + batteryarc_widget = wibox.widget { + text_with_background, + max_value = 100, + rounded_edge = true, + thickness = arc_thickness, + start_angle = 4.71238898, -- 2pi*3/4 + forced_height = size, + forced_width = size, + bg = bg_color, + paddings = 2, + widget = wibox.container.arcchart + } + + local last_battery_check = os.time() + + --[[ Show warning notification ]] + local function show_battery_warning() + naughty.notify { + icon = warning_msg_icon, + icon_size = 100, + text = warning_msg_text, + title = warning_msg_title, + timeout = 25, -- show the warning for a longer time + hover_timeout = 0.5, + position = warning_msg_position, + bg = "#F06060", + fg = "#EEE9EF", + width = 300, + } + end + + local function update_widget(widget, stdout) + local charge = 0 + local status + for s in stdout:gmatch("[^\r\n]+") do + local cur_status, charge_str, _ = string.match(s, '.+: ([%a%s]+), (%d?%d?%d)%%,?(.*)') + if cur_status ~= nil and charge_str ~=nil then + local cur_charge = tonumber(charge_str) + if cur_charge > charge then + status = cur_status + charge = cur_charge + end + end + end + + widget.value = charge + + if status == 'Charging' then + text_with_background.bg = charging_color + text_with_background.fg = '#000000' + else + text_with_background.bg = '#00000000' + text_with_background.fg = main_color + end + + if show_current_level == true then + --- if battery is fully charged (100) there is not enough place for three digits, so we don't show any text + text.text = charge == 100 + and '' + or string.format('%d', charge) + else + text.text = '' + end + + if charge < 15 then + widget.colors = { low_level_color } + if enable_battery_warning and status ~= 'Charging' and os.difftime(os.time(), last_battery_check) > 300 then + -- if 5 minutes have elapsed since the last warning + last_battery_check = os.time() + + show_battery_warning() + end + elseif charge > 15 and charge < 40 then + widget.colors = { medium_level_color } + else + widget.colors = { main_color } + end + end + + watch("acpi", timeout, update_widget, batteryarc_widget) + + -- Popup with battery info + local notification + local function show_battery_status() + awful.spawn.easy_async([[bash -c 'acpi']], + function(stdout, _, _, _) + naughty.destroy(notification) + notification = naughty.notify { + text = stdout, + title = "Battery status", + timeout = 5, + width = 200, + position = notification_position, + } + end) + end + + if show_notification_mode == 'on_hover' then + batteryarc_widget:connect_signal("mouse::enter", function() show_battery_status() end) + batteryarc_widget:connect_signal("mouse::leave", function() naughty.destroy(notification) end) + elseif show_notification_mode == 'on_click' then + batteryarc_widget:connect_signal('button::press', function(_, _, _, button) + if (button == 1) then show_battery_status() end + end) + end + + return batteryarc_widget + +end + +return setmetatable(batteryarc_widget, { __call = function(_, ...) + return worker(...) +end }) diff --git a/.config/awesome/awesome-wm-widgets/batteryarc-widget/spaceman.jpg b/.config/awesome/awesome-wm-widgets/batteryarc-widget/spaceman.jpg new file mode 100755 index 0000000..73ddaf3 Binary files /dev/null and b/.config/awesome/awesome-wm-widgets/batteryarc-widget/spaceman.jpg differ diff --git a/.config/awesome/awesome-wm-widgets/batteryarc-widget/warning.png b/.config/awesome/awesome-wm-widgets/batteryarc-widget/warning.png new file mode 100755 index 0000000..55ca790 Binary files /dev/null and b/.config/awesome/awesome-wm-widgets/batteryarc-widget/warning.png differ diff --git a/.config/awesome/awesome-wm-widgets/bitbucket-widget/README.md b/.config/awesome/awesome-wm-widgets/bitbucket-widget/README.md new file mode 100755 index 0000000..197a765 --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/bitbucket-widget/README.md @@ -0,0 +1,69 @@ +# Bitbucket widget + +The widget shows the number of pull requests assigned to the user and when clicked shows them in the list with some additional information. When item in the list is clicked - it opens the pull request in the browser. + +## How it works + +Widget uses cURL to query Bitbucket's [REST API](https://developer.atlassian.com/bitbucket/api/2/reference/). In order to be authenticated, widget uses a [netrc](https://ec.haxx.se/usingcurl/usingcurl-netrc) feature of the cURL, which is basically allows storing basic auth credentials in a **.netrc** file in home folder. + +Bitbucket allows using [App Passwords](https://confluence.atlassian.com/bitbucket/app-passwords-828781300.html) (available in the account settings) - simply generate one for the widget and use it as password in **.netrc** file. + +## Customization + +It is possible to customize widget by providing a table with all or some of the following config parameters: + +| Name | Default | Description | +|---|---|---| +| `icon` | `~/.config/awesome/awesome-wm-widgets/bitbucket-widget/bitbucket-icon-gradient-blue.svg` | Path to the icon | +| `host` | Required | e.g _http://api.bitbucket.org_ | +| `uuid` | Required | e.g _{123e4567-e89b-12d3-a456-426614174000}_ | +| `workspace` | Required | Workspace ID| +| `repo_slug` | Required | Repository slug | +| `timeout` | 60 | How often in seconds the widget refreshes | + +Note: + - host most likely should start with _api._ + - to get your UUID you may call `curl -s -n 'https://api.bitbucket.org/2.0/user'` + +## Installation + +Create a **.netrc** file in you home directory with following content: + +```bash +machine api.bitbucket.org +login mikey@tmnt.com +password cowabunga +``` + +Then change file's permissions to 600 (so only you can read/write it): + +```bash +chmod 600 ~/.netrc +``` +And test if it works by calling the API: + +```bash +curl -s -n 'https://api.bitbucket.org/2.0/repositories/' +``` + +Also, to properly setup required parameters you can use `test_bitbucket_api.sh` script - it uses the same curl call as widget. + +Then clone/download repo and use widget in **rc.lua**: + +```lua +local bitbucket_widget = require("awesome-wm-widgets.bitbucket-widget.bitbucket") +... +s.mytasklist, -- Middle widget + { -- Right widgets + layout = wibox.layout.fixed.horizontal, + ... + -- default + bitbucket_widget({ + host = 'https://api.bitbucket.org', + uuid = '{123e4567-e89b-12d3-a456-426614174000}', + workspace = 'workspace', + repo_slug = 'slug' + + }}), + ... +``` diff --git a/.config/awesome/awesome-wm-widgets/bitbucket-widget/bitbucket-icon-gradient-blue.svg b/.config/awesome/awesome-wm-widgets/bitbucket-widget/bitbucket-icon-gradient-blue.svg new file mode 100755 index 0000000..ea700ea --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/bitbucket-widget/bitbucket-icon-gradient-blue.svg @@ -0,0 +1 @@ +bitbucket-icon-gradient-blue \ No newline at end of file diff --git a/.config/awesome/awesome-wm-widgets/bitbucket-widget/bitbucket.lua b/.config/awesome/awesome-wm-widgets/bitbucket-widget/bitbucket.lua new file mode 100755 index 0000000..b85e653 --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/bitbucket-widget/bitbucket.lua @@ -0,0 +1,371 @@ +------------------------------------------------- +-- Bitbucket Widget for Awesome Window Manager +-- Shows the number of currently assigned pull requests +-- More details could be found here: +-- https://github.com/streetturtle/awesome-wm-widgets/tree/master/bitbucket-widget + +-- @author Pavel Makhov +-- @copyright 2020 Pavel Makhov +------------------------------------------------- + +local awful = require("awful") +local wibox = require("wibox") +local watch = require("awful.widget.watch") +local json = require("json") +local spawn = require("awful.spawn") +local naughty = require("naughty") +local gears = require("gears") +local beautiful = require("beautiful") +local gfs = require("gears.filesystem") + +local HOME_DIR = os.getenv("HOME") +local WIDGET_DIR = HOME_DIR .. '/.config/awesome/awesome-wm-widgets/bitbucket-widget/' + +local GET_PRS_CMD= [[bash -c "curl -s --show-error -n ]] + .. [['%s/2.0/repositories/%s/%s/pullrequests]] + .. [[?fields=values.participants.approved,values.title,values.links.html,values.author.display_name,]] + .. [[values.author.uuid,values.author.links.avatar,values.source.branch,values.destination.branch,]] + .. [[values.comment_count,values.created_on&q=reviewers.uuid+%%3D+%%22%s%%22+AND+state+%%3D+%%22OPEN%%22']] + .. [[ | jq '.[] '"]] +local DOWNLOAD_AVATAR_CMD = [[bash -c "curl -L -n --create-dirs -o %s/.cache/awmw/bitbucket-widget/avatars/%s %s"]] + +local bitbucket_widget = wibox.widget { + { + { + id = 'icon', + widget = wibox.widget.imagebox + }, + margins = 4, + layout = wibox.container.margin + }, + { + id = "txt", + widget = wibox.widget.textbox + }, + { + id = "new_pr", + widget = wibox.widget.textbox + }, + layout = wibox.layout.fixed.horizontal, + set_text = function(self, new_value) + self.txt.text = new_value + end, + set_icon = function(self, new_value) + self:get_children_by_id('icon')[1]:set_image(new_value) + end +} + +local function show_warning(message) + naughty.notify{ + preset = naughty.config.presets.critical, + title = 'Bitbucket Widget', + text = message} +end + +local popup = awful.popup{ + ontop = true, + visible = false, + shape = gears.shape.rounded_rect, + border_width = 1, + border_color = beautiful.bg_focus, + maximum_width = 400, + offset = { y = 5 }, + widget = {} +} + +--- Converts string representation of date (2020-06-02T11:25:27Z) to date +local function parse_date(date_str) + local pattern = "(%d+)%-(%d+)%-(%d+)T(%d+):(%d+):(%d+)%Z" + local y, m, d, h, min, sec, _ = date_str:match(pattern) + + return os.time{year = y, month = m, day = d, hour = h, min = min, sec = sec} +end + +--- Converts seconds to "time ago" represenation, like '1 hour ago' +local function to_time_ago(seconds) + local days = seconds / 86400 + if days > 1 then + days = math.floor(days + 0.5) + return days .. (days == 1 and ' day' or ' days') .. ' ago' + end + + local hours = (seconds % 86400) / 3600 + if hours > 1 then + hours = math.floor(hours + 0.5) + return hours .. (hours == 1 and ' hour' or ' hours') .. ' ago' + end + + local minutes = ((seconds % 86400) % 3600) / 60 + if minutes > 1 then + minutes = math.floor(minutes + 0.5) + return minutes .. (minutes == 1 and ' minute' or ' minutes') .. ' ago' + end +end + +local function ellipsize(text, length) + return (text:len() > length and length > 0) + and text:sub(0, length - 3) .. '...' + or text +end + +local function count_approves(participants) + local res = 0 + for i = 1, #participants do + if participants[i]['approved'] then res = res + 1 end + end + return res +end + +local function worker(user_args) + + local args = user_args or {} + + local icon = args.icon or WIDGET_DIR .. '/bitbucket-icon-gradient-blue.svg' + local host = args.host or show_warning('Bitbucket host is not set') + local uuid = args.uuid or show_warning('UUID is not set') + local workspace = args.workspace or show_warning('Workspace is not set') + local repo_slug = args.repo_slug or show_warning('Repo slug is not set') + local timeout = args.timeout or 60 + + local current_number_of_prs + + local to_review_rows = {layout = wibox.layout.fixed.vertical} + local my_review_rows = {layout = wibox.layout.fixed.vertical} + local rows = {layout = wibox.layout.fixed.vertical} + + bitbucket_widget:set_icon(icon) + + local update_widget = function(widget, stdout, stderr, _, _) + if stderr ~= '' then + show_warning(stderr) + return + end + + local result = json.decode(stdout) + + current_number_of_prs = rawlen(result) + + if current_number_of_prs == 0 then + widget:set_visible(false) + return + end + + widget:set_visible(true) + widget:set_text(current_number_of_prs) + + for i = 0, #rows do rows[i]=nil end + + for i = 0, #to_review_rows do to_review_rows[i]=nil end + table.insert(to_review_rows, { + { + markup = 'PRs to review', + align = 'center', + forced_height = 20, + widget = wibox.widget.textbox + }, + bg = beautiful.bg_normal, + widget = wibox.container.background + }) + + for i = 0, #my_review_rows do my_review_rows[i]=nil end + table.insert(my_review_rows, { + { + markup = 'My PRs', + align = 'center', + forced_height = 20, + widget = wibox.widget.textbox + }, + bg = beautiful.bg_normal, + widget = wibox.container.background + }) + local current_time = os.time(os.date("!*t")) + + for _, pr in ipairs(result) do + local path_to_avatar = os.getenv("HOME") ..'/.cache/awmw/bitbucket-widget/avatars/' .. pr.author.uuid + local number_of_approves = count_approves(pr.participants) + + local row = wibox.widget { + { + { + { + { + resize = true, + image = path_to_avatar, + forced_width = 40, + forced_height = 40, + widget = wibox.widget.imagebox + }, + id = 'avatar', + margins = 8, + layout = wibox.container.margin + }, + { + { + id = 'title', + markup = '' .. ellipsize(pr.title, 50) .. '', + widget = wibox.widget.textbox, + forced_width = 400 + }, + { + { + { + { + text = ellipsize(pr.source.branch.name, 30), + widget = wibox.widget.textbox + }, + { + text = '->', + widget = wibox.widget.textbox + }, + { + text = pr.destination.branch.name, + widget = wibox.widget.textbox + }, + spacing = 8, + layout = wibox.layout.fixed.horizontal + }, + { + { + text = pr.author.display_name, + widget = wibox.widget.textbox + }, + { + text = to_time_ago(os.difftime(current_time, parse_date(pr.created_on))), + widget = wibox.widget.textbox + }, + spacing = 8, + expand = 'none', + layout = wibox.layout.fixed.horizontal + }, + forced_width = 285, + layout = wibox.layout.fixed.vertical + }, + { + { + { + image = WIDGET_DIR .. '/check.svg', + resize = false, + widget = wibox.widget.imagebox + }, + { + text = number_of_approves, + widget = wibox.widget.textbox + }, + layout = wibox.layout.fixed.horizontal + }, + { + { + image = WIDGET_DIR .. '/message-circle.svg', + resize = false, + widget = wibox.widget.imagebox + }, + { + text = pr.comment_count, + widget = wibox.widget.textbox + }, + layout = wibox.layout.fixed.horizontal + }, + layout = wibox.layout.fixed.vertical + }, + layout = wibox.layout.fixed.horizontal + }, + + spacing = 8, + layout = wibox.layout.fixed.vertical + }, + spacing = 8, + layout = wibox.layout.fixed.horizontal + }, + margins = 8, + layout = wibox.container.margin + }, + bg = beautiful.bg_normal, + widget = wibox.container.background + } + + if not gfs.file_readable(path_to_avatar) then + local cmd = string.format(DOWNLOAD_AVATAR_CMD, HOME_DIR, pr.author.uuid, pr.author.links.avatar.href) + spawn.easy_async(cmd, function() row:get_children_by_id('avatar')[1]:set_image(path_to_avatar) end) + end + + + row:connect_signal("mouse::enter", function(c) c:set_bg(beautiful.bg_focus) end) + row:connect_signal("mouse::leave", function(c) c:set_bg(beautiful.bg_normal) end) + + row:get_children_by_id('title')[1]:buttons( + awful.util.table.join( + awful.button({}, 1, function() + spawn.with_shell("xdg-open " .. pr.links.html.href) + popup.visible = false + end) + ) + ) + row:get_children_by_id('avatar')[1]:buttons( + awful.util.table.join( + awful.button({}, 1, function() + spawn.with_shell( + string.format('xdg-open "https://bitbucket.org/%s/%s/pull-requests?state=OPEN&author=%s"', + workspace, repo_slug, pr.author.uuid) + ) + popup.visible = false + end) + ) + ) + + local old_cursor, old_wibox + row:get_children_by_id('title')[1]:connect_signal("mouse::enter", function() + local wb = mouse.current_wibox + old_cursor, old_wibox = wb.cursor, wb + wb.cursor = "hand1" + end) + row:get_children_by_id('title')[1]:connect_signal("mouse::leave", function() + if old_wibox then + old_wibox.cursor = old_cursor + old_wibox = nil + end + end) + + row:get_children_by_id('avatar')[1]:connect_signal("mouse::enter", function() + local wb = mouse.current_wibox + old_cursor, old_wibox = wb.cursor, wb + wb.cursor = "hand1" + end) + row:get_children_by_id('avatar')[1]:connect_signal("mouse::leave", function() + if old_wibox then + old_wibox.cursor = old_cursor + old_wibox = nil + end + end) + + if (pr.author.uuid == '{' .. uuid .. '}') then + table.insert(my_review_rows, row) + else + table.insert(to_review_rows, row) + end + end + + table.insert(rows, to_review_rows) + if (#my_review_rows > 1) then + table.insert(rows, my_review_rows) + end + popup:setup(rows) + end + + bitbucket_widget:buttons( + awful.util.table.join( + awful.button({}, 1, function() + if popup.visible then + popup.visible = not popup.visible + else + popup:move_next_to(mouse.current_widget_geometry) + end + end) + ) + ) + + watch(string.format(GET_PRS_CMD, host, workspace, repo_slug, uuid, uuid), + timeout, update_widget, bitbucket_widget) + return bitbucket_widget +end + +return setmetatable(bitbucket_widget, { __call = function(_, ...) return worker(...) end }) diff --git a/.config/awesome/awesome-wm-widgets/bitbucket-widget/check.svg b/.config/awesome/awesome-wm-widgets/bitbucket-widget/check.svg new file mode 100755 index 0000000..e9e44ac --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/bitbucket-widget/check.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/.config/awesome/awesome-wm-widgets/bitbucket-widget/clipboard.svg b/.config/awesome/awesome-wm-widgets/bitbucket-widget/clipboard.svg new file mode 100755 index 0000000..5c6dfd3 --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/bitbucket-widget/clipboard.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/.config/awesome/awesome-wm-widgets/bitbucket-widget/copy.svg b/.config/awesome/awesome-wm-widgets/bitbucket-widget/copy.svg new file mode 100755 index 0000000..bab2098 --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/bitbucket-widget/copy.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/.config/awesome/awesome-wm-widgets/bitbucket-widget/git-pull-request.svg b/.config/awesome/awesome-wm-widgets/bitbucket-widget/git-pull-request.svg new file mode 100755 index 0000000..c2e2867 --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/bitbucket-widget/git-pull-request.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/.config/awesome/awesome-wm-widgets/bitbucket-widget/message-circle.svg b/.config/awesome/awesome-wm-widgets/bitbucket-widget/message-circle.svg new file mode 100755 index 0000000..43eacbb --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/bitbucket-widget/message-circle.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/.config/awesome/awesome-wm-widgets/bitbucket-widget/test_bitbucket_api.sh b/.config/awesome/awesome-wm-widgets/bitbucket-widget/test_bitbucket_api.sh new file mode 100755 index 0000000..378b3ef --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/bitbucket-widget/test_bitbucket_api.sh @@ -0,0 +1,8 @@ +#!/usr/bin/env bash + +HOST='https://api.bitbucket.org' +ACCOUNT_ID='' +WORKSPACE='' +REPO_SLUG='' + +curl -s -n "${HOST}/2.0/repositories/${WORKSPACE}/${REPO_SLUG}/pullrequests?fields=values.title,values.links.html,values.author.display_name,values.author.links.avatar&q=reviewers.account_id+%3D+%22${ACCOUNT_ID}%22" \ No newline at end of file diff --git a/.config/awesome/awesome-wm-widgets/bitbucket-widget/user.svg b/.config/awesome/awesome-wm-widgets/bitbucket-widget/user.svg new file mode 100755 index 0000000..4058dee --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/bitbucket-widget/user.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/.config/awesome/awesome-wm-widgets/brightness-widget/README.md b/.config/awesome/awesome-wm-widgets/brightness-widget/README.md new file mode 100755 index 0000000..0cdb774 --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/brightness-widget/README.md @@ -0,0 +1,94 @@ +# Brightness widget + +This widget represents current brightness level, depending on config parameters could be an arcchart or icon with text: ![Brightness widget](./br-wid-1.png) + +## Customization + +It is possible to customize widget by providing a table with all or some of the following config parameters: + +| Name | Default | Description | +|---|---|---| +| `type`| `arc` | The widget type. Could be `arc` or `icon_and_text` | +| `program` | `light` | The program used to control the brightness, either `light`, `xbacklight`, or `brightnessctl`. | +| `step` | 5 | Step | +| `base` | 20 | Base level to set brightness to on left click. | +| `path_to_icon` | `/usr/share/icons/Arc/status/symbolic/display-brightness-symbolic.svg` | Path to the icon | +| `font` | `beautiful.font` | Font name and size, like `Play 12` | +| `timeout` | 1 | How often in seconds the widget refreshes. Check the note below | +| `tooltip` | false | Display brightness level in a tooltip when the mouse cursor hovers the widget | +| `percentage` | false | Display a '%' character after the brightness level | + +_Note:_ If brightness is controlled only by the widget (either by a mouse, or by a shortcut, then the `timeout` could be quite big, as there is no reason to synchronize the brightness level). + +## Installation + +To choose the right `program` argument, first you need to check which of them works better for you. + + - using `xbacklight`: + + Install (on Ubuntu it's available in the apt repository) it and check if it works by running: + + ```bash + xbacklight -get + ``` + + If there is no output it means that it doesn't work, you can either try to fix it, or try to use `light`. + + - using `light` command: + + Install (on Ubuntu it's available in the apt repository) from the repo: [github.com/haikarainen/light](https://github.com/haikarainen/light) and check if it works by running + + ```bash + light -G + 49.18 + light -A 5 + ``` + If you're on Ubuntu/debian and if the brightness level doesn't change, try to do this: https://github.com/haikarainen/light/issues/113#issuecomment-632638436. + + - using `brightnessctl`: + + On Ubuntu it is available in the apt repository. Install and check the ouptut of the following command. + ```bash + brightnessctl --list + ``` + +Then clone this repo under **~/.config/awesome/**: + +```bash +git clone https://github.com/streetturtle/awesome-wm-widgets.git ~/.config/awesome/awesome-wm-widgets +``` + +Require widget at the beginning of **rc.lua**: + +```lua +local brightness_widget = require("awesome-wm-widgets.brightness-widget.brightness") +``` + +Add the widget to the tasklist: + +```lua +s.mytasklist, -- Middle widget + { -- Right widgets + layout = wibox.layout.fixed.horizontal, + ... + -- default + brightness_widget(), + -- or customized + brightness_widget{ + type = 'icon_and_text', + program = 'xbacklight', + step = 2, + } + } + ... +``` + +## Controls + +In order to change brightness by shortcuts you can add them to the `globalkeys` table in the **rc.lua**: + +```lua +awful.key({ modkey }, ";", function () brightness_widget:inc() end, {description = "increase brightness", group = "custom"}), +awful.key({ modkey, "Shift"}, ";", function () brightness_widget:dec() end, {description = "decrease brightness", group = "custom"}), +``` +On a laptop you can use `XF86MonBrightnessUp` and `XF86MonBrightnessDown` keys. diff --git a/.config/awesome/awesome-wm-widgets/brightness-widget/br-wid-1.png b/.config/awesome/awesome-wm-widgets/brightness-widget/br-wid-1.png new file mode 100755 index 0000000..b00b0e6 Binary files /dev/null and b/.config/awesome/awesome-wm-widgets/brightness-widget/br-wid-1.png differ diff --git a/.config/awesome/awesome-wm-widgets/brightness-widget/brightness.lua b/.config/awesome/awesome-wm-widgets/brightness-widget/brightness.lua new file mode 100755 index 0000000..b1cb107 --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/brightness-widget/brightness.lua @@ -0,0 +1,195 @@ +------------------------------------------------- +-- Brightness Widget for Awesome Window Manager +-- Shows the brightness level of the laptop display +-- More details could be found here: +-- https://github.com/streetturtle/awesome-wm-widgets/tree/master/brightness-widget + +-- @author Pavel Makhov +-- @copyright 2021 Pavel Makhov +------------------------------------------------- + +local awful = require("awful") +local wibox = require("wibox") +local watch = require("awful.widget.watch") +local spawn = require("awful.spawn") +local gfs = require("gears.filesystem") +local naughty = require("naughty") +local beautiful = require("beautiful") + +local ICON_DIR = gfs.get_configuration_dir() .. "awesome-wm-widgets/brightness-widget/" +local get_brightness_cmd +local set_brightness_cmd +local inc_brightness_cmd +local dec_brightness_cmd + +local brightness_widget = {} + +local function show_warning(message) + naughty.notify({ + preset = naughty.config.presets.critical, + title = "Brightness Widget", + text = message, + }) +end + +local function worker(user_args) + local args = user_args or {} + + local type = args.type or 'arc' -- arc or icon_and_text + local path_to_icon = args.path_to_icon or ICON_DIR .. 'brightness.svg' + local font = args.font or beautiful.font + local timeout = args.timeout or 100 + + local program = args.program or 'light' + local step = args.step or 5 + local base = args.base or 20 + local current_level = 0 -- current brightness value + local tooltip = args.tooltip or false + local percentage = args.percentage or false + if program == 'light' then + get_brightness_cmd = 'light -G' + set_brightness_cmd = 'light -S %d' -- + inc_brightness_cmd = 'light -A ' .. step + dec_brightness_cmd = 'light -U ' .. step + elseif program == 'xbacklight' then + get_brightness_cmd = 'xbacklight -get' + set_brightness_cmd = 'xbacklight -set %d' -- + inc_brightness_cmd = 'xbacklight -inc ' .. step + dec_brightness_cmd = 'xbacklight -dec ' .. step + elseif program == 'brightnessctl' then + get_brightness_cmd = "brightnessctl get" + set_brightness_cmd = "brightnessctl set %d%%" -- + inc_brightness_cmd = "brightnessctl set +" .. step .. "%" + dec_brightness_cmd = "brightnessctl set " .. step .. "-%" + else + show_warning(program .. " command is not supported by the widget") + return + end + + if type == 'icon_and_text' then + brightness_widget.widget = wibox.widget { + { + { + image = path_to_icon, + resize = false, + widget = wibox.widget.imagebox, + }, + valign = 'center', + layout = wibox.container.place + }, + { + id = 'txt', + font = font, + widget = wibox.widget.textbox + }, + spacing = 4, + layout = wibox.layout.fixed.horizontal, + set_value = function(self, level) + local display_level = level + if percentage then + display_level = display_level .. '%' + end + self:get_children_by_id('txt')[1]:set_text(display_level) + end + } + elseif type == 'arc' then + brightness_widget.widget = wibox.widget { + { + { + image = path_to_icon, + resize = true, + widget = wibox.widget.imagebox, + }, + valign = 'center', + layout = wibox.container.place + }, + max_value = 100, + thickness = 2, + start_angle = 4.71238898, -- 2pi*3/4 + forced_height = 18, + forced_width = 18, + paddings = 2, + widget = wibox.container.arcchart, + set_value = function(self, level) + self:set_value(level) + end + } + else + show_warning(type .. " type is not supported by the widget") + return + + end + + local update_widget = function(widget, stdout, _, _, _) + local brightness_level = tonumber(string.format("%.0f", stdout)) + current_level = brightness_level + widget:set_value(brightness_level) + end + + function brightness_widget:set(value) + current_level = value + spawn.easy_async(string.format(set_brightness_cmd, value), function() + spawn.easy_async(get_brightness_cmd, function(out) + update_widget(brightness_widget.widget, out) + end) + end) + end + local old_level = 0 + function brightness_widget:toggle() + if old_level < 0.1 then + -- avoid toggling between '0' and 'almost 0' + old_level = 1 + end + if current_level < 0.1 then + -- restore previous level + current_level = old_level + else + -- save current brightness for later + old_level = current_level + current_level = 0 + end + brightness_widget:set(current_level) + end + function brightness_widget:inc() + spawn.easy_async(inc_brightness_cmd, function() + spawn.easy_async(get_brightness_cmd, function(out) + update_widget(brightness_widget.widget, out) + end) + end) + end + function brightness_widget:dec() + spawn.easy_async(dec_brightness_cmd, function() + spawn.easy_async(get_brightness_cmd, function(out) + update_widget(brightness_widget.widget, out) + end) + end) + end + + brightness_widget.widget:buttons( + awful.util.table.join( + awful.button({}, 1, function() brightness_widget:set(base) end), + awful.button({}, 3, function() brightness_widget:toggle() end), + awful.button({}, 4, function() brightness_widget:inc() end), + awful.button({}, 5, function() brightness_widget:dec() end) + ) + ) + + watch(get_brightness_cmd, timeout, update_widget, brightness_widget.widget) + + if tooltip then + awful.tooltip { + objects = { brightness_widget.widget }, + timer_function = function() + return current_level .. " %" + end, + } + end + + return brightness_widget.widget +end + +return setmetatable(brightness_widget, { + __call = function(_, ...) + return worker(...) + end, +}) diff --git a/.config/awesome/awesome-wm-widgets/brightness-widget/brightness.svg b/.config/awesome/awesome-wm-widgets/brightness-widget/brightness.svg new file mode 100755 index 0000000..d334372 --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/brightness-widget/brightness.svg @@ -0,0 +1,153 @@ + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + diff --git a/.config/awesome/awesome-wm-widgets/calendar-widget/README.md b/.config/awesome/awesome-wm-widgets/calendar-widget/README.md new file mode 100755 index 0000000..b663a18 --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/calendar-widget/README.md @@ -0,0 +1,89 @@ +# Calendar Widget + +Calendar widget for Awesome WM - slightly improved version of the `wibox.widget.calendar`. + +## Features + + +### Customization + +| Name | Default | Description | +|---|---|---| +| theme | `naughty` | The theme to use | +| placement | `top` | The position of the popup | +| radius | 8 | The popup radius | +| start_sunday | false | Start the week on Sunday | + + - themes: + + | Name | Screenshot | + |---|---| + | nord | ![nord_theme](./nord.png) | + | outrun | ![outrun_theme](./outrun.png) | + | light | ![outrun_theme](./light.png) | + | dark | ![outrun_theme](./dark.png) | + | naughty (default) | from local theme | + + - setup widget placement + + top center - in case you clock is centered: + + ![calendar_top](./calendar_top.png) + + top right - for default awesome config: + + ![calendar_top_right](./calendar_top_right.png) + + bottom right - in case your wibar at the bottom: + + ![calendar_bottom_right](./calendar_bottom_right.png) + + - setup first day of week + + By setting `start_sunday` to true: + ![calendar_start_sunday](./calendar_start_sunday.png) + + - mouse support: + move to the next and previous month. Using mouse buttons or scroll wheel. + + You can configure this by specifying the button to move to next/previous. + Usually these are configured as follows. If you want to use other mouse buttons, you can find their number using `xev`. + + | number | button | + |--------|---------------| + | 4 | scroll up | + | 5 | scroll down | + | 1 | left click | + | 2 | right click | + | 3 | middles click | + + By default `previous_month_button` is 5, `next_month_button` is 4. + + +## How to use + +This widget needs an 'anchor' - another widget which triggers visibility of the calendar. Default `mytextclock` is the perfect candidate! +Just after mytextclock is instantiated, create the widget and add the mouse listener to it. + +```lua +local calendar_widget = require("awesome-wm-widgets.calendar-widget.calendar") +-- ... +-- Create a textclock widget +mytextclock = wibox.widget.textclock() +-- default +local cw = calendar_widget() +-- or customized +local cw = calendar_widget({ + theme = 'outrun', + placement = 'bottom_right', + start_sunday = true, + radius = 8, +-- with customized next/previous (see table above) + previous_month_button = 1, + next_month_button = 3, +}) +mytextclock:connect_signal("button::press", + function(_, _, _, button) + if button == 1 then cw.toggle() end + end) +``` diff --git a/.config/awesome/awesome-wm-widgets/calendar-widget/calendar.lua b/.config/awesome/awesome-wm-widgets/calendar-widget/calendar.lua new file mode 100755 index 0000000..bc4a877 --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/calendar-widget/calendar.lua @@ -0,0 +1,258 @@ +------------------------------------------------- +-- Calendar Widget for Awesome Window Manager +-- Shows the current month and supports scroll up/down to switch month +-- More details could be found here: +-- https://github.com/streetturtle/awesome-wm-widgets/tree/master/calendar-widget + +-- @author Pavel Makhov +-- @copyright 2019 Pavel Makhov +------------------------------------------------- + +local awful = require("awful") +local beautiful = require("beautiful") +local wibox = require("wibox") +local gears = require("gears") +local naughty = require("naughty") + +local calendar_widget = {} + +local function worker(user_args) + + local calendar_themes = { + nord = { + bg = '#2E3440', + fg = '#D8DEE9', + focus_date_bg = '#88C0D0', + focus_date_fg = '#000000', + weekend_day_bg = '#3B4252', + weekday_fg = '#88C0D0', + header_fg = '#E5E9F0', + border = '#4C566A' + }, + outrun = { + bg = '#0d0221', + fg = '#D8DEE9', + focus_date_bg = '#650d89', + focus_date_fg = '#2de6e2', + weekend_day_bg = '#261447', + weekday_fg = '#2de6e2', + header_fg = '#f6019d', + border = '#261447' + }, + dark = { + bg = '#000000', + fg = '#ffffff', + focus_date_bg = '#ffffff', + focus_date_fg = '#000000', + weekend_day_bg = '#444444', + weekday_fg = '#ffffff', + header_fg = '#ffffff', + border = '#333333' + }, + light = { + bg = '#ffffff', + fg = '#000000', + focus_date_bg = '#000000', + focus_date_fg = '#ffffff', + weekend_day_bg = '#AAAAAA', + weekday_fg = '#000000', + header_fg = '#000000', + border = '#CCCCCC' + }, + monokai = { + bg = '#272822', + fg = '#F8F8F2', + focus_date_bg = '#AE81FF', + focus_date_fg = '#ffffff', + weekend_day_bg = '#75715E', + weekday_fg = '#FD971F', + header_fg = '#F92672', + border = '#75715E' + }, + naughty = { + bg = beautiful.notification_bg or beautiful.bg, + fg = beautiful.notification_fg or beautiful.fg, + focus_date_bg = beautiful.notification_fg or beautiful.fg, + focus_date_fg = beautiful.notification_bg or beautiful.bg, + weekend_day_bg = beautiful.bg_focus, + weekday_fg = beautiful.fg, + header_fg = beautiful.fg, + border = beautiful.border_normal + } + + } + + local args = user_args or {} + + if args.theme ~= nil and calendar_themes[args.theme] == nil then + naughty.notify({ + preset = naughty.config.presets.critical, + title = 'Calendar Widget', + text = 'Theme "' .. args.theme .. '" not found, fallback to default'}) + args.theme = 'naughty' + end + + local theme = args.theme or 'naughty' + local placement = args.placement or 'top' + local radius = args.radius or 8 + local next_month_button = args.next_month_button or 4 + local previous_month_button = args.previous_month_button or 5 + local start_sunday = args.start_sunday or false + + local styles = {} + local function rounded_shape(size) + return function(cr, width, height) + gears.shape.rounded_rect(cr, width, height, size) + end + end + + styles.month = { + padding = 4, + bg_color = calendar_themes[theme].bg, + border_width = 0, + } + + styles.normal = { + markup = function(t) return t end, + shape = rounded_shape(4) + } + + styles.focus = { + fg_color = calendar_themes[theme].focus_date_fg, + bg_color = calendar_themes[theme].focus_date_bg, + markup = function(t) return '' .. t .. '' end, + shape = rounded_shape(4) + } + + styles.header = { + fg_color = calendar_themes[theme].header_fg, + bg_color = calendar_themes[theme].bg, + markup = function(t) return '' .. t .. '' end + } + + styles.weekday = { + fg_color = calendar_themes[theme].weekday_fg, + bg_color = calendar_themes[theme].bg, + markup = function(t) return '' .. t .. '' end, + } + + local function decorate_cell(widget, flag, date) + if flag == 'monthheader' and not styles.monthheader then + flag = 'header' + end + + -- highlight only today's day + if flag == 'focus' then + local today = os.date('*t') + if not (today.month == date.month and today.year == date.year) then + flag = 'normal' + end + end + + local props = styles[flag] or {} + if props.markup and widget.get_text and widget.set_markup then + widget:set_markup(props.markup(widget:get_text())) + end + -- Change bg color for weekends + local d = { year = date.year, month = (date.month or 1), day = (date.day or 1) } + local weekday = tonumber(os.date('%w', os.time(d))) + local default_bg = (weekday == 0 or weekday == 6) + and calendar_themes[theme].weekend_day_bg + or calendar_themes[theme].bg + local ret = wibox.widget { + { + { + widget, + halign = 'center', + widget = wibox.container.place + }, + margins = (props.padding or 2) + (props.border_width or 0), + widget = wibox.container.margin + }, + shape = props.shape, + shape_border_color = props.border_color or '#000000', + shape_border_width = props.border_width or 0, + fg = props.fg_color or calendar_themes[theme].fg, + bg = props.bg_color or default_bg, + widget = wibox.container.background + } + + return ret + end + + local cal = wibox.widget { + date = os.date('*t'), + font = beautiful.get_font(), + fn_embed = decorate_cell, + long_weekdays = true, + start_sunday = start_sunday, + widget = wibox.widget.calendar.month + } + + local popup = awful.popup { + ontop = true, + visible = false, + shape = rounded_shape(radius), + offset = { y = 5 }, + border_width = 1, + border_color = calendar_themes[theme].border, + widget = cal + } + + popup:buttons( + awful.util.table.join( + awful.button({}, next_month_button, function() + local a = cal:get_date() + a.month = a.month + 1 + cal:set_date(nil) + cal:set_date(a) + popup:set_widget(cal) + end), + awful.button({}, previous_month_button, function() + local a = cal:get_date() + a.month = a.month - 1 + cal:set_date(nil) + cal:set_date(a) + popup:set_widget(cal) + end) + ) + ) + + function calendar_widget.toggle() + + if popup.visible then + -- to faster render the calendar refresh it and just hide + cal:set_date(nil) -- the new date is not set without removing the old one + cal:set_date(os.date('*t')) + popup:set_widget(nil) -- just in case + popup:set_widget(cal) + popup.visible = not popup.visible + else + if placement == 'top' then + awful.placement.top(popup, { margins = { top = 30 }, parent = awful.screen.focused() }) + elseif placement == 'top_right' then + awful.placement.top_right(popup, { margins = { top = 30, right = 10}, parent = awful.screen.focused() }) + elseif placement == 'top_left' then + awful.placement.top_left(popup, { margins = { top = 30, left = 10}, parent = awful.screen.focused() }) + elseif placement == 'bottom_right' then + awful.placement.bottom_right(popup, { margins = { bottom = 30, right = 10}, + parent = awful.screen.focused() }) + elseif placement == 'bottom_left' then + awful.placement.bottom_left(popup, { margins = { bottom = 30, left = 10}, + parent = awful.screen.focused() }) + else + awful.placement.top(popup, { margins = { top = 30 }, parent = awful.screen.focused() }) + end + + popup.visible = true + + end + end + + return calendar_widget + +end + +return setmetatable(calendar_widget, { __call = function(_, ...) + return worker(...) +end }) diff --git a/.config/awesome/awesome-wm-widgets/calendar-widget/calendar_bottom_right.png b/.config/awesome/awesome-wm-widgets/calendar-widget/calendar_bottom_right.png new file mode 100755 index 0000000..2bc2e82 Binary files /dev/null and b/.config/awesome/awesome-wm-widgets/calendar-widget/calendar_bottom_right.png differ diff --git a/.config/awesome/awesome-wm-widgets/calendar-widget/calendar_start_sunday.png b/.config/awesome/awesome-wm-widgets/calendar-widget/calendar_start_sunday.png new file mode 100755 index 0000000..126a218 Binary files /dev/null and b/.config/awesome/awesome-wm-widgets/calendar-widget/calendar_start_sunday.png differ diff --git a/.config/awesome/awesome-wm-widgets/calendar-widget/calendar_top.png b/.config/awesome/awesome-wm-widgets/calendar-widget/calendar_top.png new file mode 100755 index 0000000..3e6b66b Binary files /dev/null and b/.config/awesome/awesome-wm-widgets/calendar-widget/calendar_top.png differ diff --git a/.config/awesome/awesome-wm-widgets/calendar-widget/calendar_top_right.png b/.config/awesome/awesome-wm-widgets/calendar-widget/calendar_top_right.png new file mode 100755 index 0000000..4a29022 Binary files /dev/null and b/.config/awesome/awesome-wm-widgets/calendar-widget/calendar_top_right.png differ diff --git a/.config/awesome/awesome-wm-widgets/calendar-widget/dark.png b/.config/awesome/awesome-wm-widgets/calendar-widget/dark.png new file mode 100755 index 0000000..540289f Binary files /dev/null and b/.config/awesome/awesome-wm-widgets/calendar-widget/dark.png differ diff --git a/.config/awesome/awesome-wm-widgets/calendar-widget/light.png b/.config/awesome/awesome-wm-widgets/calendar-widget/light.png new file mode 100755 index 0000000..ab675d1 Binary files /dev/null and b/.config/awesome/awesome-wm-widgets/calendar-widget/light.png differ diff --git a/.config/awesome/awesome-wm-widgets/calendar-widget/nord.png b/.config/awesome/awesome-wm-widgets/calendar-widget/nord.png new file mode 100755 index 0000000..94f9f7e Binary files /dev/null and b/.config/awesome/awesome-wm-widgets/calendar-widget/nord.png differ diff --git a/.config/awesome/awesome-wm-widgets/calendar-widget/outrun.png b/.config/awesome/awesome-wm-widgets/calendar-widget/outrun.png new file mode 100755 index 0000000..d59c123 Binary files /dev/null and b/.config/awesome/awesome-wm-widgets/calendar-widget/outrun.png differ diff --git a/.config/awesome/awesome-wm-widgets/cmus-widget/README.md b/.config/awesome/awesome-wm-widgets/cmus-widget/README.md new file mode 100755 index 0000000..e33655e --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/cmus-widget/README.md @@ -0,0 +1,53 @@ +# Cmus widget + +Cmus widget that shows the current playing track. + +![widget](./screenshots/cmus-widget.png) + +Left click toggles playback. + +## Installation + +Clone the repo under **~/.config/awesome/** and add widget in **rc.lua**: + +```lua +local cmus_widget = require('awesome-wm-widgets.cmus-widget.cmus') +... +s.mytasklist, -- Middle widget + { -- Right widgets + layout = wibox.layout.fixed.horizontal, + ... + -- default + cmus_widget(), + -- customized + cmus_widget{ + space = 5, + timeout = 5 + }, +``` + +### Shortcuts + +To improve responsiveness of the widget when playback is changed by a shortcut use corresponding methods of the widget: + +```lua +awful.key({ modkey, "Shift" }, "p", function () cmus_widget:play_pause() end, {description = "toggle track", group = "cmus"}), +awful.key({ }, "XF86AudioPlay", function () cmus_widget:play() end, {description = "play track", group = "cmus"}), +awful.key({ }, "XF86AudioPause", function () cmus_widget:play() end, {description = "pause track", group = "cmus"}), +awful.key({ }, "XF86AudioNext", function () cmus_widget:next_track() end, {description = "next track", group = "cmus"}), +awful.key({ }, "XF86AudioPrev", function () cmus_widget:prev_track() end, {description = "previous track", group = "cmus"}), +awful.key({ }, "XF86AudioStop", function () cmus_widget:stop() end, {description = "stop cmus", group = "cmus"}), +``` + +## Customization + +It is possible to customize the widget by providing a table with all or some of the following config parameters: + +### Generic parameter + +| Name | Default | Description | +|---|---|---| +| `font` | `beautiful.font` | Font name and size, like `Play 12` | +| `path_to_icons` | `/usr/share/icons/Arc/actions/symbolic/` | Alternative path for the icons | +| `timeout`| `10` | Refresh cooldown | +| `space` | `3` | Space between icon and track title | diff --git a/.config/awesome/awesome-wm-widgets/cmus-widget/cmus.lua b/.config/awesome/awesome-wm-widgets/cmus-widget/cmus.lua new file mode 100755 index 0000000..b1287c5 --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/cmus-widget/cmus.lua @@ -0,0 +1,149 @@ +------------------------------------------------- +-- Cmus Widget for Awesome Window Manager +-- Show what's playing, play/pause, etc + +-- @author Augusto Gunsch +-- @copyright 2022 Augusto Gunsch +------------------------------------------------- + +local awful = require("awful") +local wibox = require("wibox") +local watch = require("awful.widget.watch") +local spawn = require("awful.spawn") +local beautiful = require('beautiful') + +local cmus_widget = {} + +local function worker(user_args) + + local args = user_args or {} + local font = args.font or beautiful.font + + local path_to_icons = args.path_to_icons or "/usr/share/icons/Arc/actions/symbolic/" + local timeout = args.timeout or 10 + local space = args.space or 3 + + cmus_widget.widget = wibox.widget { + { + { + id = "playback_icon", + resize = false, + widget = wibox.widget.imagebox, + }, + layout = wibox.container.place + }, + { + id = "text", + font = font, + widget = wibox.widget.textbox + }, + spacing = space, + layout = wibox.layout.fixed.horizontal, + update_icon = function(self, name) + self:get_children_by_id("playback_icon")[1]:set_image(path_to_icons .. name) + end, + set_title = function(self, title) + self:get_children_by_id("text")[1]:set_text(title) + end + } + + local function update_widget(widget, stdout, _, _, code) + if code == 0 then + local cmus_info = {} + + for s in stdout:gmatch("[^\r\n]+") do + local key, val = string.match(s, "^tag (%a+) (.+)$") + + if key and val then + cmus_info[key] = val + else + key, val = string.match(s, "^set (%a+) (.+)$") + + if key and val then + cmus_info[key] = val + else + key, val = string.match(s, "^(%a+) (.+)$") + if key and val then + cmus_info[key] = val + end + end + end + end + + local title = cmus_info.title + + if not title and cmus_info.file then + title = cmus_info.file:gsub("%..-$", "") + title = title:gsub("^.+/", "") + end + + if title then + if cmus_info["status"] == "playing" then + widget:update_icon("media-playback-start-symbolic.svg") + elseif cmus_info["status"] == "paused" then + widget:update_icon("media-playback-pause-symbolic.svg") + else + widget:update_icon("media-playback-stop-symbolic.svg") + end + + widget:set_title(title) + widget.visible = true + else + widget.visible = false + end + else + widget.visible = false + end + end + + function cmus_widget:update() + spawn.easy_async("cmus-remote -Q", + function(stdout, _, _, code) + update_widget(cmus_widget.widget, stdout, _, _, code) + end) + end + + function cmus_widget:play_pause() + spawn("cmus-remote -u") + cmus_widget.update() + end + + function cmus_widget:pause() + spawn("cmus-remote -U") + cmus_widget.update() + end + + function cmus_widget:play() + spawn("cmus-remote -p") + cmus_widget.update() + end + + function cmus_widget:next_track() + spawn("cmus-remote -n") + cmus_widget.update() + end + + function cmus_widget:prev_track() + spawn("cmus-remote -r") + cmus_widget.update() + end + + function cmus_widget:stop() + spawn("cmus-remote -s") + cmus_widget.update() + end + + cmus_widget.widget:buttons( + awful.util.table.join( + awful.button({}, 1, function() cmus_widget:play_pause() end) + ) + ) + + watch("cmus-remote -Q", timeout, update_widget, cmus_widget.widget) + + return cmus_widget.widget +end + +return setmetatable(cmus_widget, { __call = function(_, ...) + return worker(...) +end }) diff --git a/.config/awesome/awesome-wm-widgets/cmus-widget/screenshots/cmus-widget.png b/.config/awesome/awesome-wm-widgets/cmus-widget/screenshots/cmus-widget.png new file mode 100755 index 0000000..ba04401 Binary files /dev/null and b/.config/awesome/awesome-wm-widgets/cmus-widget/screenshots/cmus-widget.png differ diff --git a/.config/awesome/awesome-wm-widgets/cpu-widget/README.md b/.config/awesome/awesome-wm-widgets/cpu-widget/README.md new file mode 100755 index 0000000..b323f9b --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/cpu-widget/README.md @@ -0,0 +1,71 @@ +# CPU widget + +[![GitHub issues by-label](https://img.shields.io/github/issues-raw/streetturtle/awesome-wm-widgets/cpu)](https://github.com/streetturtle/awesome-wm-widgets/labels/cpu) + +This widget shows the average CPU load among all cores of the machine: + +![screenshot](./cpu.gif) + +## How it works + +To measure the load I took Paul Colby's bash [script](http://colby.id.au/calculating-cpu-usage-from-proc-stat/) and rewrote it in Lua, which was quite simple. +So awesome simply reads the first line of /proc/stat: + +```bash +$ cat /proc/stat | grep '^cpu ' +cpu 197294 718 50102 2002182 3844 0 2724 0 0 0 +``` + +and calculates the percentage. + +## Customization + +It is possible to customize widget by providing a table with all or some of the following config parameters: + +| Name | Default | Description | +|---|---|---| +| `width` | 50 | Width of the widget | +| `step_width` | 2 | Width of the step | +| `step_spacing` | 1 | Space size between steps | +| `color` | `beautiful.fg_normal` | Color of the graph | +| `enable_kill_button` | `false` | Show button which kills the process | +| `process_info_max_length` | `-1` | Truncate the process information. Some processes may have a very long list of parameters which won't fit in the screen, this options allows to truncate it to the given length. | +| `timeout` | 1 | How often in seconds the widget refreshes | + +### Example + +```lua +cpu_widget({ + width = 70, + step_width = 2, + step_spacing = 0, + color = '#434c5e' +}) +``` + +The config above results in the following widget: + +![custom](./custom.png) + +## Installation + +Clone/download repo and use widget in **rc.lua**: + +```lua +local cpu_widget = require("awesome-wm-widgets.cpu-widget.cpu-widget") +... +s.mytasklist, -- Middle widget + { -- Right widgets + layout = wibox.layout.fixed.horizontal, + ... + -- default + cpu_widget(), + -- or custom + cpu_widget({ + width = 70, + step_width = 2, + step_spacing = 0, + color = '#434c5e' + }) + ... +``` diff --git a/.config/awesome/awesome-wm-widgets/cpu-widget/cpu-widget.lua b/.config/awesome/awesome-wm-widgets/cpu-widget/cpu-widget.lua new file mode 100755 index 0000000..11debe8 --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/cpu-widget/cpu-widget.lua @@ -0,0 +1,339 @@ +------------------------------------------------- +-- CPU Widget for Awesome Window Manager +-- Shows the current CPU utilization +-- More details could be found here: +-- https://github.com/streetturtle/awesome-wm-widgets/tree/master/cpu-widget + +-- @author Pavel Makhov +-- @copyright 2020 Pavel Makhov +------------------------------------------------- + +local awful = require("awful") +local watch = require("awful.widget.watch") +local wibox = require("wibox") +local beautiful = require("beautiful") +local gears = require("gears") + +local CMD = [[sh -c "grep '^cpu.' /proc/stat; ps -eo '%p|%c|%C|' -o "%mem" -o '|%a' --sort=-%cpu ]] + .. [[| head -11 | tail -n +2"]] + +-- A smaller command, less resource intensive, used when popup is not shown. +local CMD_slim = [[grep --max-count=1 '^cpu.' /proc/stat]] + +local HOME_DIR = os.getenv("HOME") +local WIDGET_DIR = HOME_DIR .. '/.config/awesome/awesome-wm-widgets/cpu-widget' + +local cpu_widget = {} +local cpu_rows = { + spacing = 4, + layout = wibox.layout.fixed.vertical, +} +local is_update = true +local process_rows = { + layout = wibox.layout.fixed.vertical, +} + +-- Splits the string by separator +-- @return table with separated substrings +local function split(string_to_split, separator) + if separator == nil then separator = "%s" end + local t = {} + + for str in string.gmatch(string_to_split, "([^".. separator .."]+)") do + table.insert(t, str) + end + + return t +end + +-- Checks if a string starts with a another string +local function starts_with(str, start) + return str:sub(1, #start) == start +end + + +local function create_textbox(args) + return wibox.widget{ + text = args.text, + align = args.align or 'left', + markup = args.markup, + forced_width = args.forced_width or 40, + widget = wibox.widget.textbox + } +end + +local function create_process_header(params) + local res = wibox.widget{ + create_textbox{markup = 'PID'}, + create_textbox{markup = 'Name'}, + { + create_textbox{markup = '%CPU'}, + create_textbox{markup = '%MEM'}, + params.with_action_column and create_textbox{forced_width = 20} or nil, + layout = wibox.layout.align.horizontal + }, + layout = wibox.layout.ratio.horizontal + } + res:ajust_ratio(2, 0.2, 0.47, 0.33) + + return res +end + +local function create_kill_process_button() + return wibox.widget{ + { + id = "icon", + image = WIDGET_DIR .. '/window-close-symbolic.svg', + resize = false, + opacity = 0.1, + widget = wibox.widget.imagebox + }, + widget = wibox.container.background + } +end + +local function worker(user_args) + + local args = user_args or {} + + local width = args.width or 50 + local step_width = args.step_width or 2 + local step_spacing = args.step_spacing or 1 + local color = args.color or beautiful.fg_normal + local background_color = args.background_color or "#00000000" + local enable_kill_button = args.enable_kill_button or false + local process_info_max_length = args.process_info_max_length or -1 + local timeout = args.timeout or 1 + + local cpugraph_widget = wibox.widget { + max_value = 100, + background_color = background_color, + forced_width = width, + step_width = step_width, + step_spacing = step_spacing, + widget = wibox.widget.graph, + color = "linear:0,0:0,20:0,#FF0000:0.3,#FFFF00:0.6," .. color + } + + -- This timer periodically executes the heavy command while the popup is open. + -- It is stopped when the popup is closed and only the slim command is run then. + -- This greatly improves performance while the popup is closed at the small cost + -- of a slightly longer popup opening time. + local popup_timer = gears.timer { + timeout = timeout + } + + local popup = awful.popup{ + ontop = true, + visible = false, + shape = gears.shape.rounded_rect, + border_width = 1, + border_color = beautiful.bg_normal, + maximum_width = 300, + offset = { y = 5 }, + widget = {} + } + + -- Do not update process rows when mouse cursor is over the widget + popup:connect_signal("mouse::enter", function() is_update = false end) + popup:connect_signal("mouse::leave", function() is_update = true end) + + cpugraph_widget:buttons( + awful.util.table.join( + awful.button({}, 1, function() + if popup.visible then + popup.visible = not popup.visible + -- When the popup is not visible, stop the timer + popup_timer:stop() + else + popup:move_next_to(mouse.current_widget_geometry) + -- Restart the timer, when the popup becomes visible + -- Emit the signal to start the timer directly and not wait the timeout first + popup_timer:start() + popup_timer:emit_signal("timeout") + end + end) + ) + ) + + --- By default graph widget goes from left to right, so we mirror it and push up a bit + cpu_widget = wibox.widget { + { + cpugraph_widget, + reflection = {horizontal = true}, + layout = wibox.container.mirror + }, + bottom = 2, + color = background_color, + widget = wibox.container.margin + } + + -- This part runs constantly, also when the popup is closed. + -- It updates the graph widget in the bar. + local maincpu = {} + watch(CMD_slim, timeout, function(widget, stdout) + + local _, user, nice, system, idle, iowait, irq, softirq, steal, _, _ = + stdout:match('(%w+)%s+(%d+)%s(%d+)%s(%d+)%s(%d+)%s(%d+)%s(%d+)%s(%d+)%s(%d+)%s(%d+)%s(%d+)') + + local total = user + nice + system + idle + iowait + irq + softirq + steal + + local diff_idle = idle - tonumber(maincpu['idle_prev'] == nil and 0 or maincpu['idle_prev']) + local diff_total = total - tonumber(maincpu['total_prev'] == nil and 0 or maincpu['total_prev']) + local diff_usage = (1000 * (diff_total - diff_idle) / diff_total + 5) / 10 + + maincpu['total_prev'] = total + maincpu['idle_prev'] = idle + + widget:add_value(diff_usage) + end, + cpugraph_widget + ) + + -- This part runs whenever the timer is fired. + -- It therefore only runs when the popup is open. + local cpus = {} + popup_timer:connect_signal('timeout', function() + awful.spawn.easy_async(CMD, function(stdout, _, _, _) + local i = 1 + local j = 1 + for line in stdout:gmatch("[^\r\n]+") do + if starts_with(line, 'cpu') then + + if cpus[i] == nil then cpus[i] = {} end + + local name, user, nice, system, idle, iowait, irq, softirq, steal, _, _ = + line:match('(%w+)%s+(%d+)%s(%d+)%s(%d+)%s(%d+)%s(%d+)%s(%d+)%s(%d+)%s(%d+)%s(%d+)%s(%d+)') + + local total = user + nice + system + idle + iowait + irq + softirq + steal + + local diff_idle = idle - tonumber(cpus[i]['idle_prev'] == nil and 0 or cpus[i]['idle_prev']) + local diff_total = total - tonumber(cpus[i]['total_prev'] == nil and 0 or cpus[i]['total_prev']) + local diff_usage = (1000 * (diff_total - diff_idle) / diff_total + 5) / 10 + + cpus[i]['total_prev'] = total + cpus[i]['idle_prev'] = idle + + local row = wibox.widget + { + create_textbox{text = name}, + create_textbox{text = math.floor(diff_usage) .. '%'}, + { + max_value = 100, + value = diff_usage, + forced_height = 20, + forced_width = 150, + paddings = 1, + margins = 4, + border_width = 1, + border_color = beautiful.bg_focus, + background_color = beautiful.bg_normal, + bar_border_width = 1, + bar_border_color = beautiful.bg_focus, + color = "linear:150,0:0,0:0,#D08770:0.3,#BF616A:0.6," .. beautiful.fg_normal, + widget = wibox.widget.progressbar, + + }, + layout = wibox.layout.ratio.horizontal + } + row:ajust_ratio(2, 0.15, 0.15, 0.7) + cpu_rows[i] = row + i = i + 1 + else + if is_update == true then + + local columns = split(line, '|') + + local pid = columns[1] + local comm = columns[2] + local cpu = columns[3] + local mem = columns[4] + local cmd = columns[5] + + local kill_proccess_button = enable_kill_button and create_kill_process_button() or nil + + local pid_name_rest = wibox.widget{ + create_textbox{text = pid}, + create_textbox{text = comm}, + { + create_textbox{text = cpu, align = 'center'}, + create_textbox{text = mem, align = 'center'}, + kill_proccess_button, + layout = wibox.layout.fixed.horizontal + }, + layout = wibox.layout.ratio.horizontal + } + pid_name_rest:ajust_ratio(2, 0.2, 0.47, 0.33) + + local row = wibox.widget { + { + pid_name_rest, + top = 4, + bottom = 4, + widget = wibox.container.margin + }, + widget = wibox.container.background + } + + row:connect_signal("mouse::enter", function(c) c:set_bg(beautiful.bg_focus) end) + row:connect_signal("mouse::leave", function(c) c:set_bg(beautiful.bg_normal) end) + + if enable_kill_button then + row:connect_signal("mouse::enter", function() kill_proccess_button.icon.opacity = 1 end) + row:connect_signal("mouse::leave", function() kill_proccess_button.icon.opacity = 0.1 end) + + kill_proccess_button:buttons( + awful.util.table.join( awful.button({}, 1, function() + row:set_bg('#ff0000') + awful.spawn.with_shell('kill -9 ' .. pid) + end) ) ) + end + + awful.tooltip { + objects = { row }, + mode = 'outside', + preferred_positions = {'bottom'}, + timer_function = function() + local text = cmd + if process_info_max_length > 0 and text:len() > process_info_max_length then + text = text:sub(0, process_info_max_length - 3) .. '...' + end + + return text + :gsub('%s%-', '\n\t-') -- put arguments on a new line + :gsub(':/', '\n\t\t:/') -- java classpath uses : to separate jars + end, + } + + process_rows[j] = row + + j = j + 1 + end + + end + end + popup:setup { + { + cpu_rows, + { + orientation = 'horizontal', + forced_height = 15, + color = beautiful.bg_focus, + widget = wibox.widget.separator + }, + create_process_header{with_action_column = enable_kill_button}, + process_rows, + layout = wibox.layout.fixed.vertical, + }, + margins = 8, + widget = wibox.container.margin + } + end) + end) + + return cpu_widget +end + +return setmetatable(cpu_widget, { __call = function(_, ...) + return worker(...) +end }) diff --git a/.config/awesome/awesome-wm-widgets/cpu-widget/cpu.gif b/.config/awesome/awesome-wm-widgets/cpu-widget/cpu.gif new file mode 100755 index 0000000..cb97262 Binary files /dev/null and b/.config/awesome/awesome-wm-widgets/cpu-widget/cpu.gif differ diff --git a/.config/awesome/awesome-wm-widgets/cpu-widget/cpu.png b/.config/awesome/awesome-wm-widgets/cpu-widget/cpu.png new file mode 100755 index 0000000..96ba29f Binary files /dev/null and b/.config/awesome/awesome-wm-widgets/cpu-widget/cpu.png differ diff --git a/.config/awesome/awesome-wm-widgets/cpu-widget/custom.png b/.config/awesome/awesome-wm-widgets/cpu-widget/custom.png new file mode 100755 index 0000000..be275e4 Binary files /dev/null and b/.config/awesome/awesome-wm-widgets/cpu-widget/custom.png differ diff --git a/.config/awesome/awesome-wm-widgets/cpu-widget/window-close-symbolic.svg b/.config/awesome/awesome-wm-widgets/cpu-widget/window-close-symbolic.svg new file mode 100755 index 0000000..46ff888 --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/cpu-widget/window-close-symbolic.svg @@ -0,0 +1,95 @@ + + + + + + + + Gnome Symbolic Icon Theme + + + + image/svg+xml + + Gnome Symbolic Icon Theme + + + + + + + + + + + + + + + + + + diff --git a/.config/awesome/awesome-wm-widgets/docker-widget/README.md b/.config/awesome/awesome-wm-widgets/docker-widget/README.md new file mode 100755 index 0000000..01c1fbf --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/docker-widget/README.md @@ -0,0 +1,38 @@ +# Docker Widget + +[![GitHub issues by-label](https://img.shields.io/github/issues-raw/streetturtle/awesome-wm-widgets/docker)](https://github.com/streetturtle/awesome-wm-widgets/labels/docker) +![Twitter URL](https://img.shields.io/twitter/url?url=https%3A%2F%2Fgithub.com%2Fstreetturtle%2Fawesome-wm-widgets%2Fedit%2Fmaster%2Fdocker-widget) + +The widget allows to manage docker containers, namely start/stop/pause/unpause: + +

+ +

+ +## Customization + +It is possible to customize widget by providing a table with all or some of the following config parameters: + +| Name | Default | Description | +|---|---|---| +| `icon` | `./docker-widget/icons/docker.svg` | Path to the icon | +| `number_of_containers` | `-1` | Number of last created containers to show | + +## Installation + +Clone the repo under **~/.config/awesome/** and add widget in **rc.lua**: + +```lua +local docker_widget = require("awesome-wm-widgets.docker-widget.docker") +... +s.mytasklist, -- Middle widget + { -- Right widgets + layout = wibox.layout.fixed.horizontal, + ... + -- default + docker_widget(), + -- customized + docker_widget{ + number_of_containers = 5 + }, +``` diff --git a/.config/awesome/awesome-wm-widgets/docker-widget/docker.gif b/.config/awesome/awesome-wm-widgets/docker-widget/docker.gif new file mode 100755 index 0000000..3b39b5f Binary files /dev/null and b/.config/awesome/awesome-wm-widgets/docker-widget/docker.gif differ diff --git a/.config/awesome/awesome-wm-widgets/docker-widget/docker.lua b/.config/awesome/awesome-wm-widgets/docker-widget/docker.lua new file mode 100755 index 0000000..f5ce7fa --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/docker-widget/docker.lua @@ -0,0 +1,377 @@ +------------------------------------------------- +-- Docker Widget for Awesome Window Manager +-- Lists containers and allows to manage them +-- More details could be found here: +-- https://github.com/streetturtle/awesome-wm-widgets/tree/master/docker-widget + +-- @author Pavel Makhov +-- @copyright 2020 Pavel Makhov +------------------------------------------------- + +local awful = require("awful") +local wibox = require("wibox") +local spawn = require("awful.spawn") +local naughty = require("naughty") +local gears = require("gears") +local beautiful = require("beautiful") + +local HOME_DIR = os.getenv("HOME") +local WIDGET_DIR = HOME_DIR .. '/.config/awesome/awesome-wm-widgets/docker-widget' +local ICONS_DIR = WIDGET_DIR .. '/icons/' + +local LIST_CONTAINERS_CMD = [[bash -c "docker container ls -a -s -n %s]] + .. [[ --format '{{.Names}}::{{.ID}}::{{.Image}}::{{.Status}}::{{.Size}}'"]] + +--- Utility function to show warning messages +local function show_warning(message) + naughty.notify{ + preset = naughty.config.presets.critical, + title = 'Docker Widget', + text = message} +end + +local popup = awful.popup{ + ontop = true, + visible = false, + shape = gears.shape.rounded_rect, + border_width = 1, + border_color = beautiful.bg_focus, + maximum_width = 400, + offset = { y = 5 }, + widget = {} +} + +local docker_widget = wibox.widget { + { + { + id = 'icon', + widget = wibox.widget.imagebox + }, + margins = 4, + layout = wibox.container.margin + }, + shape = function(cr, width, height) + gears.shape.rounded_rect(cr, width, height, 4) + end, + widget = wibox.container.background, + set_icon = function(self, new_icon) + self:get_children_by_id("icon")[1].image = new_icon + end +} + +local parse_container = function(line) + local name, id, image, status, how_long, size = line:match('(.*)::(.*)::(.*)::(%w*) (.*)::(.*)') + local actual_status + if status == 'Up' and how_long:find('Paused') then actual_status = 'Paused' + else actual_status = status end + + how_long = how_long:gsub('%s?%(.*%)%s?', '') + + local container = { + name = name, + id = id, + image = image, + status = actual_status, + how_long = how_long, + size = size, + is_up = function() return status == 'Up' end, + is_paused = function() return actual_status:find('Paused') end, + is_exited = function() return status == 'Exited' end + } + return container +end + +local status_to_icon_name = { + Up = ICONS_DIR .. 'play.svg', + Exited = ICONS_DIR .. 'square.svg', + Paused = ICONS_DIR .. 'pause.svg' +} + +local function worker(user_args) + + local args = user_args or {} + + local icon = args.icon or ICONS_DIR .. 'docker.svg' + local number_of_containers = args.number_of_containers or -1 + + docker_widget:set_icon(icon) + + local rows = { + { widget = wibox.widget.textbox }, + layout = wibox.layout.fixed.vertical, + } + + local function rebuild_widget(containers, errors, _, _) + if errors ~= '' then + show_warning(errors) + return + end + + for i = 0, #rows do rows[i]=nil end + + for line in containers:gmatch("[^\r\n]+") do + + local container = parse_container(line) + + + local status_icon = wibox.widget { + image = status_to_icon_name[container['status']], + resize = false, + widget = wibox.widget.imagebox + } + + + local start_stop_button + if container.is_up() or container.is_exited() then + start_stop_button = wibox.widget { + { + { + id = 'icon', + image = ICONS_DIR .. (container:is_up() and 'stop-btn.svg' or 'play-btn.svg'), + opacity = 0.4, + resize = false, + widget = wibox.widget.imagebox + }, + left = 2, + right = 2, + layout = wibox.container.margin + }, + shape = gears.shape.circle, + bg = '#00000000', + widget = wibox.container.background + } + local old_cursor, old_wibox + start_stop_button:connect_signal("mouse::enter", function(c) + c:set_bg('#3B4252') + + local wb = mouse.current_wibox + old_cursor, old_wibox = wb.cursor, wb + wb.cursor = "hand1" + c:get_children_by_id("icon")[1]:set_opacity(1) + c:get_children_by_id("icon")[1]:emit_signal('widget::redraw_needed') end) + start_stop_button:connect_signal("mouse::leave", function(c) + c:set_bg('#00000000') + if old_wibox then + old_wibox.cursor = old_cursor + old_wibox = nil + end + c:get_children_by_id("icon")[1]:set_opacity(0.4) + c:get_children_by_id("icon")[1]:emit_signal('widget::redraw_needed') + end) + + start_stop_button:buttons( + gears.table.join( awful.button({}, 1, function() + local command + if container:is_up() then command = 'stop' else command = 'start' end + + status_icon:set_opacity(0.2) + status_icon:emit_signal('widget::redraw_needed') + + spawn.easy_async('docker ' .. command .. ' ' .. container['name'], function() + if errors ~= '' then show_warning(errors) end + spawn.easy_async(string.format(LIST_CONTAINERS_CMD, number_of_containers), + function(stdout, stderr) + rebuild_widget(stdout, stderr) + end) + end) + end) ) ) + else + start_stop_button = nil + end + + + local pause_unpause_button + if container.is_up() then + pause_unpause_button = wibox.widget { + { + { + id = 'icon', + image = ICONS_DIR .. (container:is_paused() and 'unpause-btn.svg' or 'pause-btn.svg'), + opacity = 0.4, + resize = false, + widget = wibox.widget.imagebox + }, + left = 2, + right = 2, + layout = wibox.container.margin + }, + shape = gears.shape.circle, + bg = '#00000000', + widget = wibox.container.background + } + local old_cursor, old_wibox + pause_unpause_button:connect_signal("mouse::enter", function(c) + c:set_bg('#3B4252') + local wb = mouse.current_wibox + old_cursor, old_wibox = wb.cursor, wb + wb.cursor = "hand1" + c:get_children_by_id("icon")[1]:set_opacity(1) + c:get_children_by_id("icon")[1]:emit_signal('widget::redraw_needed') + end) + pause_unpause_button:connect_signal("mouse::leave", function(c) + c:set_bg('#00000000') + if old_wibox then + old_wibox.cursor = old_cursor + old_wibox = nil + end + c:get_children_by_id("icon")[1]:set_opacity(0.4) + c:get_children_by_id("icon")[1]:emit_signal('widget::redraw_needed') + end) + + pause_unpause_button:buttons( + gears.table.join( awful.button({}, 1, function() + local command + if container:is_paused() then command = 'unpause' else command = 'pause' end + + status_icon:set_opacity(0.2) + status_icon:emit_signal('widget::redraw_needed') + + awful.spawn.easy_async('docker ' .. command .. ' ' .. container['name'], function(_, stderr) + if stderr ~= '' then show_warning(stderr) end + spawn.easy_async(string.format(LIST_CONTAINERS_CMD, number_of_containers), + function(stdout, container_errors) + rebuild_widget(stdout, container_errors) + end) + end) + end) ) ) + else + pause_unpause_button = nil + end + + local delete_button + if not container.is_up() then + delete_button = wibox.widget { + { + { + id = 'icon', + image = ICONS_DIR .. 'trash-btn.svg', + opacity = 0.4, + resize = false, + widget = wibox.widget.imagebox + }, + margins = 4, + layout = wibox.container.margin + }, + shape = gears.shape.circle, + bg = '#00000000', + widget = wibox.container.background + } + delete_button:buttons( + gears.table.join( awful.button({}, 1, function() + awful.spawn.easy_async('docker rm ' .. container['name'], function(_, rm_stderr) + if rm_stderr ~= '' then show_warning(rm_stderr) end + spawn.easy_async(string.format(LIST_CONTAINERS_CMD, number_of_containers), + function(lc_stdout, lc_stderr) + rebuild_widget(lc_stdout, lc_stderr) end) + end) + end))) + + local old_cursor, old_wibox + delete_button:connect_signal("mouse::enter", function(c) + c:set_bg('#3B4252') + local wb = mouse.current_wibox + old_cursor, old_wibox = wb.cursor, wb + wb.cursor = "hand1" + c:get_children_by_id("icon")[1]:set_opacity(1) + c:get_children_by_id("icon")[1]:emit_signal('widget::redraw_needed') + end) + delete_button:connect_signal("mouse::leave", function(c) + c:set_bg('#00000000') + if old_wibox then + old_wibox.cursor = old_cursor + old_wibox = nil + end + c:get_children_by_id("icon")[1]:set_opacity(0.4) + c:get_children_by_id("icon")[1]:emit_signal('widget::redraw_needed') + end) + else + delete_button = nil + end + + + local row = wibox.widget { + { + { + { + { + status_icon, + margins = 8, + layout = wibox.container.margin + }, + valign = 'center', + layout = wibox.container.place + }, + { + { + { + markup = '' .. container['name'] .. '', + widget = wibox.widget.textbox + }, + { + text = container['size'], + widget = wibox.widget.textbox + }, + { + text = container['how_long'], + widget = wibox.widget.textbox + }, + forced_width = 180, + layout = wibox.layout.fixed.vertical + }, + valign = 'center', + layout = wibox.container.place + }, + { + { + start_stop_button, + pause_unpause_button, + delete_button, + layout = wibox.layout.align.horizontal + }, + forced_width = 90, + valign = 'center', + haligh = 'center', + layout = wibox.container.place, + }, + spacing = 8, + layout = wibox.layout.align.horizontal + }, + margins = 8, + layout = wibox.container.margin + }, + bg = beautiful.bg_normal, + widget = wibox.container.background + } + + + row:connect_signal("mouse::enter", function(c) c:set_bg(beautiful.bg_focus) end) + row:connect_signal("mouse::leave", function(c) c:set_bg(beautiful.bg_normal) end) + + table.insert(rows, row) + end + + popup:setup(rows) + end + + docker_widget:buttons( + gears.table.join( + awful.button({}, 1, function() + if popup.visible then + docker_widget:set_bg('#00000000') + popup.visible = not popup.visible + else + docker_widget:set_bg(beautiful.bg_focus) + spawn.easy_async(string.format(LIST_CONTAINERS_CMD, number_of_containers), + function(stdout, stderr) + rebuild_widget(stdout, stderr) + popup:move_next_to(mouse.current_widget_geometry) + end) + end + end) + ) + ) + + return docker_widget +end + +return setmetatable(docker_widget, { __call = function(_, ...) return worker(...) end }) diff --git a/.config/awesome/awesome-wm-widgets/docker-widget/icons/docker.svg b/.config/awesome/awesome-wm-widgets/docker-widget/icons/docker.svg new file mode 100755 index 0000000..468ce94 --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/docker-widget/icons/docker.svg @@ -0,0 +1 @@ +Docker icon diff --git a/.config/awesome/awesome-wm-widgets/docker-widget/icons/pause-btn.svg b/.config/awesome/awesome-wm-widgets/docker-widget/icons/pause-btn.svg new file mode 100755 index 0000000..ac2900b --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/docker-widget/icons/pause-btn.svg @@ -0,0 +1,10 @@ + + + + \ No newline at end of file diff --git a/.config/awesome/awesome-wm-widgets/docker-widget/icons/pause.svg b/.config/awesome/awesome-wm-widgets/docker-widget/icons/pause.svg new file mode 100755 index 0000000..33f1ad2 --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/docker-widget/icons/pause.svg @@ -0,0 +1,16 @@ + + + + + \ No newline at end of file diff --git a/.config/awesome/awesome-wm-widgets/docker-widget/icons/play-btn.svg b/.config/awesome/awesome-wm-widgets/docker-widget/icons/play-btn.svg new file mode 100755 index 0000000..573ae7e --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/docker-widget/icons/play-btn.svg @@ -0,0 +1,9 @@ + + + \ No newline at end of file diff --git a/.config/awesome/awesome-wm-widgets/docker-widget/icons/play-btn.svg- b/.config/awesome/awesome-wm-widgets/docker-widget/icons/play-btn.svg- new file mode 100755 index 0000000..455a61d --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/docker-widget/icons/play-btn.svg- @@ -0,0 +1,9 @@ + + + \ No newline at end of file diff --git a/.config/awesome/awesome-wm-widgets/docker-widget/icons/play.svg b/.config/awesome/awesome-wm-widgets/docker-widget/icons/play.svg new file mode 100755 index 0000000..4f0ee04 --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/docker-widget/icons/play.svg @@ -0,0 +1,15 @@ + + + + \ No newline at end of file diff --git a/.config/awesome/awesome-wm-widgets/docker-widget/icons/square.svg b/.config/awesome/awesome-wm-widgets/docker-widget/icons/square.svg new file mode 100755 index 0000000..d8424d1 --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/docker-widget/icons/square.svg @@ -0,0 +1,15 @@ + + + + \ No newline at end of file diff --git a/.config/awesome/awesome-wm-widgets/docker-widget/icons/stop-btn.svg b/.config/awesome/awesome-wm-widgets/docker-widget/icons/stop-btn.svg new file mode 100755 index 0000000..f676d01 --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/docker-widget/icons/stop-btn.svg @@ -0,0 +1,10 @@ + + + + diff --git a/.config/awesome/awesome-wm-widgets/docker-widget/icons/trash-btn.svg b/.config/awesome/awesome-wm-widgets/docker-widget/icons/trash-btn.svg new file mode 100755 index 0000000..78d8035 --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/docker-widget/icons/trash-btn.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/.config/awesome/awesome-wm-widgets/docker-widget/icons/unpause-btn.svg b/.config/awesome/awesome-wm-widgets/docker-widget/icons/unpause-btn.svg new file mode 100755 index 0000000..db5b25f --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/docker-widget/icons/unpause-btn.svg @@ -0,0 +1,10 @@ + + + + \ No newline at end of file diff --git a/.config/awesome/awesome-wm-widgets/email-widget/README.md b/.config/awesome/awesome-wm-widgets/email-widget/README.md new file mode 100755 index 0000000..510792d --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/email-widget/README.md @@ -0,0 +1,36 @@ +# Email widget + +This widget consists of an icon with counter which shows number of unread emails: ![email icon](./em-wid-1.png) +and a popup message which appears when mouse hovers over an icon: ![email popup](./em-wid-2.png) + +Note that widget uses the Arc icon theme, so it should be [installed](https://github.com/horst3180/arc-icon-theme#installation) first under **/usr/share/icons/Arc/** folder. + +## Installation + +To install it put **email.lua** and **email-widget** folder under **~/.config/awesome**. Then + + - in **email.lua** change path to python scripts; + - in python scripts add your credentials (note that password should be encrypted using pgp for example); + - add widget to awesome: + +```lua +local email_widget, email_icon = require("email") + +... +s.mytasklist, -- Middle widget + { -- Right widgets + layout = wibox.layout.fixed.horizontal, + ... + email_icon, + email_widget, + ... +``` + +## How it works + +This widget uses the output of two python scripts, first is called every 20 seconds - it returns number of unread emails and second is called when mouse hovers over an icon and displays content of those emails. For both of them you'll need to provide your credentials and imap server. For testing, they can simply be called from console: + +``` bash +python ~/.config/awesome/email/count_unread_emails.py +python ~/.config/awesome/email/read_emails.py +``` diff --git a/.config/awesome/awesome-wm-widgets/email-widget/count_unread_emails.py b/.config/awesome/awesome-wm-widgets/email-widget/count_unread_emails.py new file mode 100755 index 0000000..a843814 --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/email-widget/count_unread_emails.py @@ -0,0 +1,16 @@ +#!/usr/bin/python + +import imaplib +import re + +M=imaplib.IMAP4_SSL("mail.teenagemutantninjaturtles.com", 993) +M.login("mickey@tmnt.com","cowabunga") + +status, counts = M.status("INBOX","(MESSAGES UNSEEN)") + +if status == "OK": + unread = re.search(r'UNSEEN\s(\d+)', counts[0].decode('utf-8')).group(1) +else: + unread = "N/A" + +print(unread) diff --git a/.config/awesome/awesome-wm-widgets/email-widget/em-wid-1.png b/.config/awesome/awesome-wm-widgets/email-widget/em-wid-1.png new file mode 100755 index 0000000..5290ea8 Binary files /dev/null and b/.config/awesome/awesome-wm-widgets/email-widget/em-wid-1.png differ diff --git a/.config/awesome/awesome-wm-widgets/email-widget/em-wid-2.png b/.config/awesome/awesome-wm-widgets/email-widget/em-wid-2.png new file mode 100755 index 0000000..0a0fd3a Binary files /dev/null and b/.config/awesome/awesome-wm-widgets/email-widget/em-wid-2.png differ diff --git a/.config/awesome/awesome-wm-widgets/email-widget/email.lua b/.config/awesome/awesome-wm-widgets/email-widget/email.lua new file mode 100755 index 0000000..df80678 --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/email-widget/email.lua @@ -0,0 +1,44 @@ +local wibox = require("wibox") +local awful = require("awful") +local naughty = require("naughty") +local watch = require("awful.widget.watch") + +local path_to_icons = "/usr/share/icons/Arc/actions/22/" + +local email_widget = wibox.widget.textbox() +email_widget:set_font('Play 9') + +local email_icon = wibox.widget.imagebox() +email_icon:set_image(path_to_icons .. "/mail-mark-new.png") + +watch( + "python /home//.config/awesome/email-widget/count_unread_emails.py", 20, + function(_, stdout) + local unread_emails_num = tonumber(stdout) or 0 + if (unread_emails_num > 0) then + email_icon:set_image(path_to_icons .. "/mail-mark-unread.png") + email_widget:set_text(stdout) + elseif (unread_emails_num == 0) then + email_icon:set_image(path_to_icons .. "/mail-message-new.png") + email_widget:set_text("") + end + end +) + + +local function show_emails() + awful.spawn.easy_async([[bash -c 'python /home//.config/awesome/email-widget/read_unread_emails.py']], + function(stdout) + naughty.notify{ + text = stdout, + title = "Unread Emails", + timeout = 5, hover_timeout = 0.5, + width = 400, + } + end + ) +end + +email_icon:connect_signal("mouse::enter", function() show_emails() end) + +return email_widget, email_icon diff --git a/.config/awesome/awesome-wm-widgets/email-widget/read_unread_emails.py b/.config/awesome/awesome-wm-widgets/email-widget/read_unread_emails.py new file mode 100755 index 0000000..fda8188 --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/email-widget/read_unread_emails.py @@ -0,0 +1,44 @@ +#!/usr/bin/python + +import imaplib +import email +import datetime + +def process_mailbox(M): + rv, data = M.search(None, "(UNSEEN)") + if rv != 'OK': + print "No messages found!" + return + + for num in data[0].split(): + rv, data = M.fetch(num, '(BODY.PEEK[])') + if rv != 'OK': + print "ERROR getting message", num + return + msg = email.message_from_bytes(data[0][1]) + for header in [ 'From', 'Subject', 'Date' ]: + hdr = email.header.make_header(email.header.decode_header(msg[header])) + if header == 'Date': + date_tuple = email.utils.parsedate_tz(str(hdr)) + if date_tuple: + local_date = datetime.datetime.fromtimestamp(email.utils.mktime_tz(date_tuple)) + print("{}: {}".format(header, local_date.strftime("%a, %d %b %Y %H:%M:%S"))) + else: + print('{}: {}'.format(header, hdr)) + # with code below you can process text of email + # if msg.is_multipart(): + # for payload in msg.get_payload(): + # if payload.get_content_maintype() == 'text': + # print payload.get_payload() + # else: + # print msg.get_payload() + + +M=imaplib.IMAP4_SSL("mail.teenagemutantninjaturtles.com", 993) +M.login("mickey@tmnt.com","cowabunga") + +rv, data = M.select("INBOX") +if rv == 'OK': + process_mailbox(M) +M.close() +M.logout() diff --git a/.config/awesome/awesome-wm-widgets/experiments/spotify-player/README.md b/.config/awesome/awesome-wm-widgets/experiments/spotify-player/README.md new file mode 100755 index 0000000..b19d5ac --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/experiments/spotify-player/README.md @@ -0,0 +1,5 @@ +# Spotify Player + +In progress + +![spotify-player](./spotify-player.png) \ No newline at end of file diff --git a/.config/awesome/awesome-wm-widgets/experiments/spotify-player/spotify-indicator.svg b/.config/awesome/awesome-wm-widgets/experiments/spotify-player/spotify-indicator.svg new file mode 100755 index 0000000..0b96c0a --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/experiments/spotify-player/spotify-indicator.svg @@ -0,0 +1,8 @@ + + + + + + diff --git a/.config/awesome/awesome-wm-widgets/experiments/spotify-player/spotify-player.lua b/.config/awesome/awesome-wm-widgets/experiments/spotify-player/spotify-player.lua new file mode 100755 index 0000000..981978b --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/experiments/spotify-player/spotify-player.lua @@ -0,0 +1,192 @@ +------------------------------------------------- +-- Spotify Player Widget for Awesome Window Manager +-- More details could be found here: +-- https://github.com/streetturtle/awesome-wm-widgets/tree/master/spotify-player + +-- @author Pavel Makhov +-- @copyright 2021 Pavel Makhov +------------------------------------------------- +--luacheck:ignore +local awful = require("awful") +local wibox = require("wibox") +local watch = require("awful.widget.watch") +local spawn = require("awful.spawn") +local naughty = require("naughty") +local gears = require("gears") +local beautiful = require("beautiful") +local gfs = require("gears.filesystem") +local gs = require("gears.string") +local awesomebuttons = require("awesome-buttons.awesome-buttons") + +local HOME_DIR = os.getenv("HOME") +local WIDGET_DIR = HOME_DIR .. '/.config/awesome/awesome-wm-widgets/experiments/spotify-player/' +local ICON_DIR = WIDGET_DIR + +local spotify_player = {} + +local function show_warning(message) + naughty.notify{ + preset = naughty.config.presets.critical, + title = 'Spotify Player Widget', + text = message} +end + +local function worker(user_args) + + local args = user_args or {} + local artwork_size = args.artwork_size or 300 + + local timeout = args.timeout or 1 + + local popup = awful.popup{ + ontop = true, + bg = beautiful.bg_normal .. '88', + visible = false, + shape = gears.shape.rounded_rect, + border_width = 1, + border_color = beautiful.bg_focus, + width = artwork_size, + maximum_width = 300, + offset = { y = 5 }, + widget = {} + } + + local rows = { + expand = 'none', + layout = wibox.layout.align.vertical, + } + + spotify_player.widget = wibox.widget { + image = ICON_DIR .. 'spotify-indicator.svg', + widget = wibox.widget.imagebox + } + + local artwork_widget = wibox.widget { + forced_height = artwork_size, + forced_width = artwork_size, + widget = wibox.widget.imagebox + } + + local artist_w = wibox.widget { + align = 'center', + widget = wibox.widget.textbox, + set_artist = function(self, artist) + self:set_markup('' .. artist .. '') + end + } + + local title_w = wibox.widget { + align = 'center', + forced_height = 30, + widget = wibox.widget.textbox, + set_title = function(self, title) + self:set_markup('' .. title .. '') + end + } + + local play_pause_btn = awesomebuttons.with_icon{ type = 'outline', icon = 'play', icon_size = 32, icon_margin = 8, color = '#1DB954', shape = 'circle', onclick = function() + spawn.with_shell('sp play') + end} + + local buttons_w = wibox.widget { + { + awesomebuttons.with_icon{ icon = 'rewind', icon_size = 32, icon_margin = 8, color = '#18800000', shape = 'circle', onclick = function() + spawn.with_shell('sp prev') + end}, + play_pause_btn, + awesomebuttons.with_icon{ icon = 'fast-forward', icon_size = 32, icon_margin = 8, color = '#18800000', shape = 'circle', onclick = function() + spawn.with_shell('sp next') + end}, + spacing = 16, + layout = wibox.layout.fixed.horizontal + }, + halign = 'center', + layout = wibox.container.place, + } + + local some_w = wibox.widget { + artwork_widget, + { + { + { + { + title_w, + artist_w, + buttons_w, + layout = wibox.layout.fixed.vertical + }, + top = 8, + bottom = 8, + widget = wibox.container.margin + }, + bg = '#33333388', + widget = wibox.container.background + }, + valign = 'bottom', + content_fill_horizontal = true, + layout = wibox.container.place, + }, + layout = wibox.layout.stack + } + + popup:setup({ + some_w, + layout = wibox.layout.fixed.vertical, + }) + + local update_widget = function(widget, stdout, stderr, _, _) + for i = 0, #rows do rows[i]=nil end + + if string.find(stdout, 'Error: Spotify is not running.') ~= nil then + return + end + + local track_id, length, art_url, album, album_artist, artist, auto_rating, disc_number, title, track_number, url = + string.match(stdout, 'trackid|(.*)\nlength|(.*)\nartUrl|(.*)\nalbum|(.*)\nalbumArtist|(.*)\nartist|(.*)\nautoRating|(.*)\ndiscNumber|(.*)\ntitle|(.*)\ntrackNumber|(.*)\nurl|(.*)') + + title = string.gsub(title, "&", '&') + artist_w:set_artist(artist) + title_w:set_title(title) + + -- spotify client bug: https://community.spotify.com/t5/Desktop-Linux/MPRIS-cover-art-url-file-not-found/td-p/4920104 + art_url = art_url:gsub('https://open.spotify.com', 'https://i.scdn.co') + if ((art_url ~= nil or art_url ~='') and not gfs.file_readable('/tmp/' .. track_id)) then + spawn.easy_async('touch /tmp/' .. track_id, function() + spawn.easy_async('curl -L -s --show-error --create-dirs -o /tmp/' .. track_id .. ' '.. art_url, function(stdout, stderr) + if stderr ~= '' then + show_warning(stderr) + return + end + artwork_widget:set_image('/tmp/' .. track_id) + end) + end) + else + artwork_widget:set_image('/tmp/' .. track_id) + end + end + + function spotify_player:tog() + if popup.visible then + popup.visible = not popup.visible + else + popup:move_next_to(mouse.current_widget_geometry) + end + end + + spotify_player.widget:buttons( + awful.util.table.join( + awful.button({}, 1, function() spotify_player:tog() end) + ) + ) + + watch('sp metadata', timeout, update_widget) + + watch('sp status', 1, function(_, stdout) + stdout = string.gsub(stdout, "\n", "") + play_pause_btn:set_icon(stdout == 'Playing' and 'pause' or 'play') + end) + + return spotify_player +end + +return setmetatable(spotify_player, { __call = function(_, ...) return worker(...) end }) diff --git a/.config/awesome/awesome-wm-widgets/experiments/spotify-player/spotify-player.png b/.config/awesome/awesome-wm-widgets/experiments/spotify-player/spotify-player.png new file mode 100755 index 0000000..7bfecfc Binary files /dev/null and b/.config/awesome/awesome-wm-widgets/experiments/spotify-player/spotify-player.png differ diff --git a/.config/awesome/awesome-wm-widgets/fs-widget/README.md b/.config/awesome/awesome-wm-widgets/fs-widget/README.md new file mode 100755 index 0000000..4657e9e --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/fs-widget/README.md @@ -0,0 +1,29 @@ +# Filesystem Widget + +This widget shows file system disk space usage which is based on the `df` output. When clicked another widget appears with more detailed information. By default, it monitors the "/" mount. It can be configured with a list of mounts to monitor though only the first will show in the wibar. To have multiple mounts displayed on the wibar simply define multiple `fs_widgets` with different mounts as arguments. + +![](./screenshot.png) + +## Customizations + +It is possible to customize widget by providing a table with all or some of the following config parameters: + +| Name | Default | Description | +|---|---|---| +| `mounts` | `{'/'}` | Table with mounts to monitor, check the output from a `df` command for available options (column 'Mounted on') | +| `timeout` | 60 | How often in seconds the widget refreshes | + +## Installation + +Clone/download repo and use the widget in **rc.lua**: + +```lua + local fs_widget = require("awesome-wm-widgets.fs-widget.fs-widget") + ... + s.mywibox:setup { + s.mytasklist, -- Middle widget + { -- Right widgets + fs_widget(), --default + fs_widget({ mounts = { '/', '/mnt/music' } }), -- multiple mounts + ... +``` diff --git a/.config/awesome/awesome-wm-widgets/fs-widget/fs-widget.lua b/.config/awesome/awesome-wm-widgets/fs-widget/fs-widget.lua new file mode 100755 index 0000000..ca76193 --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/fs-widget/fs-widget.lua @@ -0,0 +1,190 @@ +local awful = require("awful") +local watch = require("awful.widget.watch") +local wibox = require("wibox") +local beautiful = require("beautiful") +local gears = require("gears") + +local storage_bar_widget = {} + +--- Table with widget configuration, consists of three sections: +--- - general - general configuration +--- - widget - configuration of the widget displayed on the wibar +--- - popup - configuration of the popup +local config = {} + +-- general +config.mounts = { '/' } +config.refresh_rate = 60 + +-- wibar widget +config.widget_width = 40 +config.widget_bar_color = '#aaaaaa' +config.widget_onclick_bg = '#ff0000' +config.widget_border_color = '#535d6c66' +config.widget_background_color = '#22222233' + +-- popup +config.popup_bg = '#22222233' +config.popup_border_width = 1 +config.popup_border_color = '#535d6c66' +config.popup_bar_color = '#aaaaaa' +config.popup_bar_background_color = '#22222233' +config.popup_bar_border_color = '#535d6c66' + +local function worker(user_args) + local args = user_args or {} + + -- Setup config for the widget instance. + -- The `_config` table will keep the first existing value after checking + -- in this order: user parameter > beautiful > module default. + local _config = {} + for prop, value in pairs(config) do + _config[prop] = args[prop] or beautiful[prop] or value + end + + storage_bar_widget = wibox.widget { + { + id = 'progressbar', + color = _config.widget_bar_color, + max_value = 100, + forced_height = 20, + forced_width = _config.widget_width, + paddings = 2, + margins = 4, + border_width = 1, + border_radius = 2, + border_color = _config.widget_border_color, + background_color = _config.widget_background_color, + widget = wibox.widget.progressbar + }, + shape = function(cr, width, height) + gears.shape.rounded_rect(cr, width, height, 4) + end, + widget = wibox.container.background, + set_value = function(self, new_value) + self:get_children_by_id("progressbar")[1].value = new_value + end + } + + local disk_rows = { + { widget = wibox.widget.textbox }, + spacing = 4, + layout = wibox.layout.fixed.vertical, + } + + local disk_header = wibox.widget { + { + markup = 'Mount', + forced_width = 150, + align = 'left', + widget = wibox.widget.textbox, + }, + { + markup = 'Used', + align = 'left', + widget = wibox.widget.textbox, + }, + layout = wibox.layout.ratio.horizontal + } + disk_header:ajust_ratio(1, 0, 0.3, 0.7) + + local popup = awful.popup { + bg = _config.popup_bg, + ontop = true, + visible = false, + shape = gears.shape.rounded_rect, + border_width = _config.popup_border_width, + border_color = _config.popup_border_color, + maximum_width = 400, + offset = { y = 5 }, + widget = {} + } + + storage_bar_widget:buttons( + awful.util.table.join( + awful.button({}, 1, function() + if popup.visible then + popup.visible = not popup.visible + storage_bar_widget:set_bg('#00000000') + else + storage_bar_widget:set_bg(_config.widget_background_color) + popup:move_next_to(mouse.current_widget_geometry) + end + end) + ) + ) + + local disks = {} + watch([[bash -c "df | tail -n +2"]], _config.refresh_rate, + function(widget, stdout) + for line in stdout:gmatch("[^\r\n$]+") do + local filesystem, size, used, avail, perc, mount = + line:match('([%p%w]+)%s+([%d%w]+)%s+([%d%w]+)%s+([%d%w]+)%s+([%d]+)%%%s+([%p%w]+)') + + disks[mount] = {} + disks[mount].filesystem = filesystem + disks[mount].size = size + disks[mount].used = used + disks[mount].avail = avail + disks[mount].perc = perc + disks[mount].mount = mount + + if disks[mount].mount == _config.mounts[1] then + widget:set_value(tonumber(disks[mount].perc)) + end + end + + for k, v in ipairs(_config.mounts) do + + local row = wibox.widget { + { + text = disks[v].mount, + forced_width = 150, + widget = wibox.widget.textbox + }, + { + color = _config.popup_bar_color, + max_value = 100, + value = tonumber(disks[v].perc), + forced_height = 20, + paddings = 1, + margins = 4, + border_width = 1, + border_color = _config.popup_bar_border_color, + background_color = _config.popup_bar_background_color, + bar_border_width = 1, + bar_border_color = _config.popup_bar_border_color, + widget = wibox.widget.progressbar, + }, + { + text = math.floor(disks[v].used / 1024 / 1024) + .. '/' + .. math.floor(disks[v].size / 1024 / 1024) .. 'GB(' + .. math.floor(disks[v].perc) .. '%)', + widget = wibox.widget.textbox + }, + layout = wibox.layout.ratio.horizontal + } + row:ajust_ratio(2, 0.3, 0.3, 0.4) + + disk_rows[k] = row + end + popup:setup { + { + disk_header, + disk_rows, + layout = wibox.layout.fixed.vertical, + }, + margins = 8, + widget = wibox.container.margin + } + end, + storage_bar_widget + ) + + return storage_bar_widget +end + +return setmetatable(storage_bar_widget, { __call = function(_, ...) + return worker(...) +end }) diff --git a/.config/awesome/awesome-wm-widgets/fs-widget/screenshot.png b/.config/awesome/awesome-wm-widgets/fs-widget/screenshot.png new file mode 100755 index 0000000..41e6ccc Binary files /dev/null and b/.config/awesome/awesome-wm-widgets/fs-widget/screenshot.png differ diff --git a/.config/awesome/awesome-wm-widgets/gerrit-widget/README.md b/.config/awesome/awesome-wm-widgets/gerrit-widget/README.md new file mode 100755 index 0000000..62c89a1 --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/gerrit-widget/README.md @@ -0,0 +1,77 @@ +# Gerrit widget + +It shows number of currently assigned reviews in [Gerrit](https://www.gerritcodereview.com/) to the user (by default) : + + ![gerrit_widget](./gerrit_widget.png) + + when clicked it shows reviews in a list: + + ![popup](./popup.png) + + left click on an item will open review in the default browser, right click will copy the review number, which you can use to checkout this review by running `git-review -d `. + + Also, if a new review is assigned to the user, there will be a pop-up: + + ![new_review](./new_review.png) + +## Customization + +It is possible to customize widget by providing a table with all or some of the following config parameters: + +| Name | Default | Description | +|---|---|---| +| `icon`| `/.config/awesome/awesome-wm-widgets/gerrit-widget/gerrit_icon.svg`| Path to the icon | +| `host` | Required | Ex https://gerrit.tmnt.com | +| `query` | `is:reviewer AND status:open AND NOT is:wip` | Query to retrieve reviews | +| `timeout` | 10 | How often in seconds the widget refreshes | + +## Prerequisite + + - [curl](https://curl.haxx.se/) - is used to communicate with gerrit's [REST API](https://gerrit-review.googlesource.com/Documentation/rest-api.html) + - setup [netrc](https://ec.haxx.se/usingcurl-netrc.html) which is used to store username and password in order to call API's endpoints. + +## Installation + +1. This widget relies on Gerrit [REST API](https://gerrit-review.googlesource.com/Documentation/rest-api.html), so you need to have a permission to access it. You also need to setup [netrc](https://ec.haxx.se/usingcurl-netrc.html), as widget uses curl to communicate with API and you have to be authenticated. +To test if you have access to API and netrc setup is correct run following command, you should have a json response: + + ```bash + curl -s --request GET --netrc https://gerrit-host.com/a/changes/\?q\=status:open+AND+NOT+is:wip+AND+is:reviewer | tail -n +2 + ``` + Note: `tail -n +2` is needed to skip first line of the response, as gerrit returns some characters there in order to prevent XSS hacks. + +1. Download json parser for lua from [github.com/rxi/json.lua](https://github.com/rxi/json.lua) and place it under **~/.config/awesome/** (don't forget to star a repo): + + ```bash + wget -P ~/.config/awesome/ https://raw.githubusercontent.com/rxi/json.lua/master/json.lua + ``` + +1. Clone this repo (if not cloned yet) under **~/.config/awesome/**: + + ```bash + git clone https://github.com/streetturtle/awesome-wm-widgets.git ~/.config/awesome/ + ``` + +1. Require widget at the top of the **rc.lua**: + + ```lua + local gerrit_widget = require("awesome-wm-widgets.gerrit-widget.gerrit") + ``` + +1. Add widget to the tasklist: + + ```lua + s.mytasklist, -- Middle widget + { -- Right widgets + layout = wibox.layout.fixed.horizontal, + ... + --default + gerrit_widget({host = 'https://gerrit.tmnt.com'}), + --customized + gerrit_widget({ + host = 'https://gerrit.tmnt.com', + query = 'is:reviewer AND is:wip' + }) + ... + ``` + diff --git a/.config/awesome/awesome-wm-widgets/gerrit-widget/gerrit.lua b/.config/awesome/awesome-wm-widgets/gerrit-widget/gerrit.lua new file mode 100755 index 0000000..682eb0f --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/gerrit-widget/gerrit.lua @@ -0,0 +1,230 @@ +------------------------------------------------- +-- Gerrit Widget for Awesome Window Manager +-- Shows the number of currently assigned reviews +-- More details could be found here: +-- https://github.com/streetturtle/awesome-wm-widgets/tree/master/gerrit-widget + +-- @author Pavel Makhov +-- @copyright 2019 Pavel Makhov +------------------------------------------------- + +local awful = require("awful") +local wibox = require("wibox") +local watch = require("awful.widget.watch") +local json = require("json") +local spawn = require("awful.spawn") +local naughty = require("naughty") +local gears = require("gears") +local beautiful = require("beautiful") +local gfs = require("gears.filesystem") + +local HOME_DIR = os.getenv("HOME") +local PATH_TO_AVATARS = HOME_DIR .. '/.cache/awmw/gerrit-widget/avatars/' + +local GET_CHANGES_CMD = [[bash -c "curl -s -X GET -n %s/a/changes/\\?q\\=%s | tail -n +2"]] +local GET_USER_CMD = [[bash -c "curl -s -X GET -n %s/accounts/%s/ | tail -n +2"]] +local DOWNLOAD_AVATAR_CMD = [[bash -c "curl --create-dirs -o %s %s"]] + +local gerrit_widget = {} + +local function worker(user_args) + + local args = user_args or {} + + local icon = args.icons or HOME_DIR .. '/.config/awesome/awesome-wm-widgets/gerrit-widget/gerrit_icon.svg' + local host = args.host or naughty.notify{ + preset = naughty.config.presets.critical, + title = 'Gerrit Widget', + text = 'Gerrit host is unknown' + } + local query = args.query or 'is:reviewer AND status:open AND NOT is:wip' + local timeout = args.timeout or 10 + + local current_number_of_reviews + local previous_number_of_reviews = 0 + local name_dict = {} + + local rows = { + { widget = wibox.widget.textbox }, + layout = wibox.layout.fixed.vertical, + } + + local popup = awful.popup{ + ontop = true, + visible = false, + shape = gears.shape.rounded_rect, + border_width = 1, + border_color = beautiful.bg_focus, + maximum_width = 400, + offset = { y = 5 }, + widget = {} + } + + gerrit_widget = wibox.widget { + { + { + image = icon, + widget = wibox.widget.imagebox + }, + margins = 4, + layout = wibox.container.margin + }, + { + id = "txt", + widget = wibox.widget.textbox + }, + { + id = "new_rev", + widget = wibox.widget.textbox + }, + layout = wibox.layout.fixed.horizontal, + set_text = function(self, new_value) + self.txt.text = new_value + end, + set_unseen_review = function(self, is_new_review) + self.new_rev.text = is_new_review and '*' or '' + end + } + + local function get_name_by_user_id(user_id) + if name_dict[user_id] == nil then + name_dict[user_id] = {} + end + + if name_dict[user_id].username == nil then + name_dict[user_id].username = '' + spawn.easy_async(string.format(GET_USER_CMD, host, user_id), function(stdout) + local user = json.decode(stdout) + name_dict[tonumber(user_id)].username = user.name + if not gfs.file_readable(PATH_TO_AVATARS .. user_id) then + spawn.easy_async( + string.format(DOWNLOAD_AVATAR_CMD, PATH_TO_AVATARS .. user_id, user.avatars[1].url)) + end + end) + return name_dict[user_id].username + end + + return name_dict[user_id].username + end + + local update_widget = function(widget, stdout, _, _, _) + local reviews = json.decode(stdout) + + current_number_of_reviews = rawlen(reviews) + + if current_number_of_reviews == 0 then + widget:set_visible(false) + return + else + widget:set_visible(true) + end + + widget:set_visible(true) + if current_number_of_reviews > previous_number_of_reviews then + widget:set_unseen_review(true) + naughty.notify{ + icon = HOME_DIR ..'/.config/awesome/awesome-wm-widgets/gerrit-widget/gerrit_icon.svg', + title = 'New Incoming Review', + text = reviews[1].project .. '\n' .. get_name_by_user_id(reviews[1].owner._account_id) .. + reviews[1].subject .. '\n', + run = function() spawn.with_shell("xdg-open https://" .. host .. '/' .. reviews[1]._number) end + } + end + + previous_number_of_reviews = current_number_of_reviews + widget:set_text(current_number_of_reviews) + + for i = 0, #rows do rows[i]=nil end + for _, review in ipairs(reviews) do + + local row = wibox.widget { + { + { + { + { + resize = true, + image = PATH_TO_AVATARS .. review.owner._account_id, + forced_width = 40, + forced_height = 40, + widget = wibox.widget.imagebox + }, + margins = 8, + layout = wibox.container.margin + }, + { + { + markup = '' .. review.project .. '', + align = 'center', + widget = wibox.widget.textbox + }, + { + text = ' ' .. review.subject, + widget = wibox.widget.textbox + }, + { + text = ' ' .. get_name_by_user_id(review.owner._account_id), + widget = wibox.widget.textbox + }, + layout = wibox.layout.align.vertical + }, + spacing = 8, + layout = wibox.layout.fixed.horizontal + }, + margins = 8, + layout = wibox.container.margin + }, + widget = wibox.container.background + } + + row:connect_signal("button::release", function() + spawn.with_shell("xdg-open " .. host .. '/' .. review._number) + end) + + row:connect_signal("mouse::enter", function(c) c:set_bg(beautiful.bg_focus) end) + row:connect_signal("mouse::leave", function(c) c:set_bg(beautiful.bg_normal) end) + + row:buttons( + awful.util.table.join( + awful.button({}, 1, function() + spawn.with_shell("xdg-open " .. host .. '/' .. review._number) + popup.visible = false + end), + awful.button({}, 3, function() + spawn.with_shell("echo '" .. review._number .."' | xclip -selection clipboard") + popup.visible = false + end) + ) + ) + + table.insert(rows, row) + end + + popup:setup(rows) + end + + gerrit_widget:buttons( + awful.util.table.join( + awful.button({}, 1, function() + gerrit_widget:set_unseen_review(false) + if popup.visible then + popup.visible = not popup.visible + else + --local geo = mouse.current_widget_geometry + --if theme.calendar_placement == 'center' then + -- local x = geo.x + (geo.width / 2) - (popup:geometry().width / 2) -- align two widgets + -- popup:move_next_to({x = x, y = geo.y + 22, width = 0, height = geo.height}) + --else + -- popup:move_next_to(geo) + --end + + popup:move_next_to(mouse.current_widget_geometry) + end + end) + ) + ) + + watch(string.format(GET_CHANGES_CMD, host, query:gsub(" ", "+")), timeout, update_widget, gerrit_widget) + return gerrit_widget +end + +return setmetatable(gerrit_widget, { __call = function(_, ...) return worker(...) end }) diff --git a/.config/awesome/awesome-wm-widgets/gerrit-widget/gerrit_icon.svg b/.config/awesome/awesome-wm-widgets/gerrit-widget/gerrit_icon.svg new file mode 100755 index 0000000..4ac5652 --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/gerrit-widget/gerrit_icon.svg @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.config/awesome/awesome-wm-widgets/gerrit-widget/gerrit_widget.png b/.config/awesome/awesome-wm-widgets/gerrit-widget/gerrit_widget.png new file mode 100755 index 0000000..926bc4b Binary files /dev/null and b/.config/awesome/awesome-wm-widgets/gerrit-widget/gerrit_widget.png differ diff --git a/.config/awesome/awesome-wm-widgets/gerrit-widget/new_review.png b/.config/awesome/awesome-wm-widgets/gerrit-widget/new_review.png new file mode 100755 index 0000000..ebc9bad Binary files /dev/null and b/.config/awesome/awesome-wm-widgets/gerrit-widget/new_review.png differ diff --git a/.config/awesome/awesome-wm-widgets/gerrit-widget/popup.png b/.config/awesome/awesome-wm-widgets/gerrit-widget/popup.png new file mode 100755 index 0000000..e08879a Binary files /dev/null and b/.config/awesome/awesome-wm-widgets/gerrit-widget/popup.png differ diff --git a/.config/awesome/awesome-wm-widgets/github-activity-widget/README.md b/.config/awesome/awesome-wm-widgets/github-activity-widget/README.md new file mode 100755 index 0000000..2dbf98b --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/github-activity-widget/README.md @@ -0,0 +1,89 @@ +# GitHub Activity Widget + +Widget shows recent activities on GitHub. It is very similar to the GitHub's "All activity" feed on the main page: + +

+ +

+ +Mouse click on the item opens repo/issue/pr depending on the type of the activity. Mouse click on user's avatar opens user GitHub profile. + +## Customization + +It is possible to customize widget by providing a table with all or some of the following config parameters: + +| Name | Default | Description | +|---|---|---| +| `icon` | github.png from the widget sources | Widget icon displayed on the wibar | +| `username` | your username | Required parameter | +| `number_of_events` | 10 | Number of events to display in the list | + +## Installation + +Clone repo under **~/.config/awesome/** and add widget in **rc.lua**: + +```lua +local github_activity_widget = require("awesome-wm-widgets.github-activity-widget.github-activity-widget") +... +s.mytasklist, -- Middle widget + { -- Right widgets + layout = wibox.layout.fixed.horizontal, + ... + -- default + github_activity_widget{ + username = 'streetturtle', + }, + -- customized + github_activity_widget{ + username = 'streetturtle', + number_of_events = 5 + }, + +``` + + +## How it works + +Everything starts with this timer, which gets recent activities by calling GitHub [Events API](https://developer.github.com/v3/activity/events/) and stores the response under /.cache/awmw/github-activity-widget/activity.json directory: + +```lua +gears.timer { + timeout = 600, -- calls every ten minutes + call_now = true, + autostart = true, + callback = function() + spawn.easy_async(string.format(UPDATE_EVENTS_CMD, username, CACHE_DIR), function(stdout, stderr) + if stderr ~= '' then show_warning(stderr) return end + end) + end +} +``` + +There are several reasons to store output in a file and then use it as a source to build the widget, instead of calling it everytime the widget is opened: + - activity feed does not update that often + - events API doesn't provide filtering of fields, so the output is quite large (300 events) + - it's much faster to read file from filesystem + + Next important part is **rebuild_widget** function, which is called when mouse button clicks on the widget on the wibar. It receives a json string which contains first n events from the cache file. Those events are processed by `jq` (get first n events, remove unused fields, slightly change the json structure to simplify serialization to lua table). And then it builds a widget, row by row in a loop. To display the text part of the row we already have all neccessary information in the json string which was converted to lua table. But to show an avatar we should download it first. This is done in the following snippet. First it creates a template and then checks if file already exists, and sets it in template, otherwise, downloads it asynchronously and only then sets in: + + ```lua +local avatar_img = wibox.widget { + resize = true, + forced_width = 40, + forced_height = 40, + widget = wibox.widget.imagebox +} + +if gfs.file_readable(path_to_avatar) then + avatar_img:set_image(path_to_avatar) +else + -- download it first + spawn.easy_async(string.format( + DOWNLOAD_AVATAR_CMD, + CACHE_DIR, + event.actor.id, + event.actor.avatar_url), + -- and then set + function() avatar_img:set_image(path_to_avatar) end) +end + ``` diff --git a/.config/awesome/awesome-wm-widgets/github-activity-widget/github-activity-widget.lua b/.config/awesome/awesome-wm-widgets/github-activity-widget/github-activity-widget.lua new file mode 100755 index 0000000..af29b35 --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/github-activity-widget/github-activity-widget.lua @@ -0,0 +1,294 @@ +------------------------------------------------- +-- GitHub Widget for Awesome Window Manager +-- Shows the recent activity from GitHub +-- More details could be found here: +-- https://github.com/streetturtle/awesome-wm-widgets/tree/master/github-activity-widget + +-- @author Pavel Makhov +-- @copyright 2020 Pavel Makhov +------------------------------------------------- + +local awful = require("awful") +local wibox = require("wibox") +local json = require("json") +local spawn = require("awful.spawn") +local naughty = require("naughty") +local gears = require("gears") +local beautiful = require("beautiful") +local gfs = require("gears.filesystem") + +local HOME_DIR = os.getenv("HOME") +local WIDGET_DIR = HOME_DIR .. '/.config/awesome/awesome-wm-widgets/github-activity-widget' +local ICONS_DIR = WIDGET_DIR .. '/icons/' +local CACHE_DIR = HOME_DIR .. '/.cache/awmw/github-activity-widget' + +local GET_EVENTS_CMD = [[sh -c "cat %s/activity.json | jq '.[:%d] | [.[] ]] + .. [[| {type: .type, actor: .actor, repo: .repo, action: .payload.action, issue_url: .payload.issue.html_url, ]] + .. [[pr_url: .payload.pull_request.html_url, created_at: .created_at}]'"]] +local DOWNLOAD_AVATAR_CMD = [[sh -c "curl -n --create-dirs -o %s/avatars/%s %s"]] +local UPDATE_EVENTS_CMD = [[sh -c "curl -s --show-error https://api.github.com/users/%s/received_events ]] + ..[[> %s/activity.json"]] + +--- Utility function to show warning messages +local function show_warning(message) + naughty.notify{ + preset = naughty.config.presets.critical, + title = 'GitHub Activity Widget', + text = message} +end + +--- Converts string representation of date (2020-06-02T11:25:27Z) to date +local function parse_date(date_str) + local pattern = "(%d+)%-(%d+)%-(%d+)T(%d+):(%d+):(%d+)%Z" + local y, m, d, h, min, sec, _ = date_str:match(pattern) + + return os.time{year = y, month = m, day = d, hour = h, min = min, sec = sec} +end + +--- Converts seconds to "time ago" representation, like '1 hour ago' +local function to_time_ago(seconds) + local days = seconds / 86400 + if days > 1 then + days = math.floor(days + 0.5) + return days .. (days == 1 and ' day' or ' days') .. ' ago' + end + + local hours = (seconds % 86400) / 3600 + if hours > 1 then + hours = math.floor(hours + 0.5) + return hours .. (hours == 1 and ' hour' or ' hours') .. ' ago' + end + + local minutes = ((seconds % 86400) % 3600) / 60 + if minutes > 1 then + minutes = math.floor(minutes + 0.5) + return minutes .. (minutes == 1 and ' minute' or ' minutes') .. ' ago' + end +end + + +local popup = awful.popup{ + ontop = true, + visible = false, + shape = gears.shape.rounded_rect, + border_width = 1, + border_color = beautiful.bg_focus, + maximum_width = 350, + offset = { y = 5 }, + widget = {} +} + +local function generate_action_string(event) + local action_string = event.type + local icon = 'repo.svg' + local link = 'http://github.com/' .. event.repo.name + + if (event.type == "PullRequestEvent") then + action_string = event.action .. ' a pull request in' + link = event.pr_url + icon = 'git-pull-request.svg' + elseif (event.type == "IssuesEvent") then + action_string = event.action .. ' an issue in' + link = event.issue_url + icon = 'alert-circle.svg' + elseif (event.type == "IssueCommentEvent") then + action_string = event.action == 'created' and 'commented in issue' or event.action .. ' a comment in' + link = event.issue_url + icon = 'message-square.svg' + elseif (event.type == "WatchEvent") then + action_string = 'starred' + icon = 'star.svg' + elseif (event.type == "ForkEvent") then + action_string = 'forked' + icon = 'git-branch.svg' + elseif (event.type == "CreateEvent") then + action_string = 'created' + end + + return { action_string = action_string, link = link, icon = icon } +end + +local github_widget = wibox.widget { + { + { + { + id = 'icon', + widget = wibox.widget.imagebox + }, + id = "m", + margins = 4, + layout = wibox.container.margin + }, + layout = wibox.layout.fixed.horizontal, + }, + shape = function(cr, width, height) + gears.shape.rounded_rect(cr, width, height, 4) + end, + widget = wibox.container.background, + set_icon = function(self, new_icon) + self:get_children_by_id("icon")[1].image = new_icon + end +} + + +local function worker(user_args) + + if not gfs.dir_readable(CACHE_DIR) then + gfs.make_directories(CACHE_DIR) + end + + local args = user_args or {} + + local icon = args.icon or ICONS_DIR .. 'github.png' + local username = args.username or show_warning('No username provided') + local number_of_events = args.number_of_events or 10 + + github_widget:set_icon(icon) + + local rows = { + layout = wibox.layout.fixed.vertical, + } + + local rebuild_widget = function(stdout, stderr, _, _) + if stderr ~= '' then + show_warning(stderr) + return + end + + local current_time = os.time(os.date("!*t")) + + local events = json.decode(stdout) + + for i = 0, #rows do rows[i]=nil end + for _, event in ipairs(events) do + local path_to_avatar = CACHE_DIR .. '/avatars/' .. event.actor.id + + local avatar_img = wibox.widget { + resize = true, + forced_width = 40, + forced_height = 40, + widget = wibox.widget.imagebox + } + + if not gfs.file_readable(path_to_avatar) then + -- download it first + spawn.easy_async(string.format( + DOWNLOAD_AVATAR_CMD, + CACHE_DIR, + event.actor.id, + event.actor.avatar_url), function() avatar_img:set_image(path_to_avatar) end) + else + avatar_img:set_image(path_to_avatar) + end + + local action_and_link = generate_action_string(event) + + local avatar = wibox.widget { + avatar_img, + margins = 8, + layout = wibox.container.margin + } + avatar:buttons( + awful.util.table.join( + awful.button({}, 1, function() + spawn.with_shell('xdg-open http://github.com/' .. event.actor.login) + popup.visible = false + end) + ) + ) + + local repo_info = wibox.widget { + { + markup = ' ' .. event.actor.display_login .. ' ' .. action_and_link.action_string + .. ' ' .. event.repo.name .. '', + wrap = 'word', + widget = wibox.widget.textbox + }, + { + { + { + image = ICONS_DIR .. action_and_link.icon, + resize = true, + forced_height = 16, + forced_width = 16, + widget = wibox.widget.imagebox + }, + valign = 'center', + layout = wibox.container.place + }, + { + markup = to_time_ago(os.difftime(current_time, parse_date(event.created_at))), + widget = wibox.widget.textbox + }, + spacing = 4, + layout = wibox.layout.fixed.horizontal, + }, + layout = wibox.layout.align.vertical + } + repo_info:buttons( + awful.util.table.join( + awful.button({}, 1, function() + spawn.with_shell("xdg-open " .. action_and_link.link) + popup.visible = false + end) + ) + ) + + local row = wibox.widget { + { + { + avatar, + repo_info, + spacing = 4, + layout = wibox.layout.fixed.horizontal + }, + margins = 4, + layout = wibox.container.margin + }, + bg = beautiful.bg_normal, + widget = wibox.container.background + } + + row:connect_signal("mouse::enter", function(c) c:set_bg(beautiful.bg_focus) end) + row:connect_signal("mouse::leave", function(c) c:set_bg(beautiful.bg_normal) end) + + table.insert(rows, row) + end + + popup:setup(rows) + end + + github_widget:buttons( + awful.util.table.join( + awful.button({}, 1, function() + if popup.visible then + popup.visible = not popup.visible + github_widget:set_bg('#00000000') + else + github_widget:set_bg(beautiful.bg_focus) + spawn.easy_async(string.format(GET_EVENTS_CMD, CACHE_DIR, number_of_events), + function (stdout, stderr) + rebuild_widget(stdout, stderr) + popup:move_next_to(mouse.current_widget_geometry) + end) + end + end) + ) + ) + + -- Calls GitHub event API and stores response in "cache" file + gears.timer { + timeout = 600, + call_now = true, + autostart = true, + callback = function() + spawn.easy_async(string.format(UPDATE_EVENTS_CMD, username, CACHE_DIR), function(_, stderr) + if stderr ~= '' then show_warning(stderr) return end + end) + end + } + + return github_widget +end + +return setmetatable(github_widget, { __call = function(_, ...) return worker(...) end }) diff --git a/.config/awesome/awesome-wm-widgets/github-activity-widget/icons/alert-circle.svg b/.config/awesome/awesome-wm-widgets/github-activity-widget/icons/alert-circle.svg new file mode 100755 index 0000000..1c42eaf --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/github-activity-widget/icons/alert-circle.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/.config/awesome/awesome-wm-widgets/github-activity-widget/icons/git-branch.svg b/.config/awesome/awesome-wm-widgets/github-activity-widget/icons/git-branch.svg new file mode 100755 index 0000000..3f06c34 --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/github-activity-widget/icons/git-branch.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/.config/awesome/awesome-wm-widgets/github-activity-widget/icons/git-pull-request.svg b/.config/awesome/awesome-wm-widgets/github-activity-widget/icons/git-pull-request.svg new file mode 100755 index 0000000..c2e2867 --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/github-activity-widget/icons/git-pull-request.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/.config/awesome/awesome-wm-widgets/github-activity-widget/icons/github.png b/.config/awesome/awesome-wm-widgets/github-activity-widget/icons/github.png new file mode 100755 index 0000000..628da97 Binary files /dev/null and b/.config/awesome/awesome-wm-widgets/github-activity-widget/icons/github.png differ diff --git a/.config/awesome/awesome-wm-widgets/github-activity-widget/icons/message-square.svg b/.config/awesome/awesome-wm-widgets/github-activity-widget/icons/message-square.svg new file mode 100755 index 0000000..758ba42 --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/github-activity-widget/icons/message-square.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/.config/awesome/awesome-wm-widgets/github-activity-widget/icons/repo.svg b/.config/awesome/awesome-wm-widgets/github-activity-widget/icons/repo.svg new file mode 100755 index 0000000..f74a595 --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/github-activity-widget/icons/repo.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/.config/awesome/awesome-wm-widgets/github-activity-widget/icons/star.svg b/.config/awesome/awesome-wm-widgets/github-activity-widget/icons/star.svg new file mode 100755 index 0000000..0a3d39e --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/github-activity-widget/icons/star.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/.config/awesome/awesome-wm-widgets/github-activity-widget/screenshot.png b/.config/awesome/awesome-wm-widgets/github-activity-widget/screenshot.png new file mode 100755 index 0000000..f066cbc Binary files /dev/null and b/.config/awesome/awesome-wm-widgets/github-activity-widget/screenshot.png differ diff --git a/.config/awesome/awesome-wm-widgets/github-contributions-widget/README.md b/.config/awesome/awesome-wm-widgets/github-contributions-widget/README.md new file mode 100755 index 0000000..7d02008 --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/github-contributions-widget/README.md @@ -0,0 +1,63 @@ +# Github Contributions Widget + +The widget is inspired by the https://github-contributions.now.sh/ and relies on it's API. + +It shows the contribution graph, similar to the one on the github profile page: ![screenshot](./screenshots/screenshot.jpg) + +You might wonder what could be the reason to have your github's contributions in front of you all day long? The more you contribute, the nicer widget looks! Check out [Thomashighbaugh](https://github.com/Thomashighbaugh)'s graph: + +![](./screenshots/Thomashighbaugh.png) + +## Customization + +It is possible to customize the widget by providing a table with all or some of the following config parameters: + +| Name | Default | Description | +|---|---|---| +| `username` | `streetturtle` | GitHub username | +| `days` | `365` | Number of days in the past, more days - wider the widget | +| `color_of_empty_cells` | Theme's default | Color of the days with no contributions | +| `with_border` | `true` | Should the graph contains border or not | +| `margin_top` | `1` | Top margin | +| `theme` | `standard` | Color theme of the graph, see below | + +_Note:_ widget height is 21px (7 rows of 3x3 cells). So it would look nice on the wibar of 22-24px height. + +### Themes + +Following themes are available: + +| Theme name | Preview | +|---|---| +| standard | ![standard](./screenshots/standard.png) | +| classic | ![classic](./screenshots/classic.png) | +| teal | ![teal](./screenshots/teal.png) | +| leftpad | ![leftpad](./screenshots/leftpad.png) | +| dracula | ![dracula](./screenshots/dracula.png) | +| pink | ![pink](./screenshots/pink.png) | + +To add a new theme, simply add a new entry in `themes` table (themes.lua) with the colors of your theme. + +### Screenshots + +1000 days, with border: +![screenshot1](./screenshots/screenshot1.jpg) + +365 days, no border: +![screenshot2](./screenshots/screenshot2.jpg) + +## Installation + +Clone/download repo under **~/.config/awesome** and use widget in **rc.lua**: + +```lua +local github_contributions_widget = require("awesome-wm-widgets.github-contributions-widget.github-contributions-widget") +... +s.mytasklist, -- Middle widget + { -- Right widgets + layout = wibox.layout.fixed.horizontal, + ... + -- default + github_contributions_widget({username = ''}), + ... +``` diff --git a/.config/awesome/awesome-wm-widgets/github-contributions-widget/github-contributions-widget.lua b/.config/awesome/awesome-wm-widgets/github-contributions-widget/github-contributions-widget.lua new file mode 100755 index 0000000..113d474 --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/github-contributions-widget/github-contributions-widget.lua @@ -0,0 +1,104 @@ +------------------------------------------------- +-- Github Contributions Widget for Awesome Window Manager +-- Shows the contributions graph +-- More details could be found here: +-- https://github.com/streetturtle/awesome-wm-widgets/tree/master/github-contributions-widget + +-- @author Pavel Makhov +-- @copyright 2020 Pavel Makhov +------------------------------------------------- + +local awful = require("awful") +local naughty = require("naughty") +local wibox = require("wibox") +local gears = require("gears") +local widget_themes = require("awesome-wm-widgets.github-contributions-widget.themes") + +local GET_CONTRIBUTIONS_CMD = [[bash -c "curl -s https://github-contributions.vercel.app/api/v1/%s]] + .. [[ | jq -r '[.contributions[] ]] + .. [[ | select ( .date | strptime(\"%%Y-%%m-%%d\") | mktime < now)][:%s]| .[].intensity'"]] + +local github_contributions_widget = wibox.widget{ + reflection = { + horizontal = true, + vertical = true, + }, + widget = wibox.container.mirror +} + +local function show_warning(message) + naughty.notify{ + preset = naughty.config.presets.critical, + title = 'Github Contributions Widget', + text = message} +end + +local function worker(user_args) + + local args = user_args or {} + local username = args.username or 'streetturtle' + local days = args.days or 365 + local color_of_empty_cells = args.color_of_empty_cells + local with_border = args.with_border + local margin_top = args.margin_top or 1 + local theme = args.theme or 'standard' + + if widget_themes[theme] == nil then + show_warning('Theme ' .. theme .. ' does not exist') + theme = 'standard' + end + + if with_border == nil then with_border = true end + + local function get_square(color) + if color_of_empty_cells ~= nil and color == widget_themes[theme][0] then + color = color_of_empty_cells + end + + return wibox.widget{ + fit = function() + return 3, 3 + end, + draw = function(_, _, cr, _, _) + cr:set_source(gears.color(color)) + cr:rectangle(0, 0, with_border and 2 or 3, with_border and 2 or 3) + cr:fill() + end, + layout = wibox.widget.base.make_widget + } + end + + local col = {layout = wibox.layout.fixed.vertical} + local row = {layout = wibox.layout.fixed.horizontal} + local day_idx = 5 - os.date('%w') + for _ = 0, day_idx do + table.insert(col, get_square(color_of_empty_cells)) + end + + local update_widget = function(_, stdout, _, _, _) + for intensity in stdout:gmatch("[^\r\n]+") do + if day_idx %7 == 0 then + table.insert(row, col) + col = {layout = wibox.layout.fixed.vertical} + end + table.insert(col, get_square(widget_themes[theme][tonumber(intensity)])) + day_idx = day_idx + 1 + end + github_contributions_widget:setup( + { + row, + top = margin_top, + layout = wibox.container.margin + } + ) + end + + awful.spawn.easy_async(string.format(GET_CONTRIBUTIONS_CMD, username, days), + function(stdout) + update_widget(github_contributions_widget, stdout) + end) + + return github_contributions_widget +end + +return setmetatable(github_contributions_widget, { __call = function(_, ...) return worker(...) end }) diff --git a/.config/awesome/awesome-wm-widgets/github-contributions-widget/screenshots/Thomashighbaugh.png b/.config/awesome/awesome-wm-widgets/github-contributions-widget/screenshots/Thomashighbaugh.png new file mode 100755 index 0000000..b31245b Binary files /dev/null and b/.config/awesome/awesome-wm-widgets/github-contributions-widget/screenshots/Thomashighbaugh.png differ diff --git a/.config/awesome/awesome-wm-widgets/github-contributions-widget/screenshots/classic.png b/.config/awesome/awesome-wm-widgets/github-contributions-widget/screenshots/classic.png new file mode 100755 index 0000000..4652140 Binary files /dev/null and b/.config/awesome/awesome-wm-widgets/github-contributions-widget/screenshots/classic.png differ diff --git a/.config/awesome/awesome-wm-widgets/github-contributions-widget/screenshots/dracula.png b/.config/awesome/awesome-wm-widgets/github-contributions-widget/screenshots/dracula.png new file mode 100755 index 0000000..65fb769 Binary files /dev/null and b/.config/awesome/awesome-wm-widgets/github-contributions-widget/screenshots/dracula.png differ diff --git a/.config/awesome/awesome-wm-widgets/github-contributions-widget/screenshots/leftpad.png b/.config/awesome/awesome-wm-widgets/github-contributions-widget/screenshots/leftpad.png new file mode 100755 index 0000000..19e4f64 Binary files /dev/null and b/.config/awesome/awesome-wm-widgets/github-contributions-widget/screenshots/leftpad.png differ diff --git a/.config/awesome/awesome-wm-widgets/github-contributions-widget/screenshots/pink.png b/.config/awesome/awesome-wm-widgets/github-contributions-widget/screenshots/pink.png new file mode 100755 index 0000000..2fb7bc6 Binary files /dev/null and b/.config/awesome/awesome-wm-widgets/github-contributions-widget/screenshots/pink.png differ diff --git a/.config/awesome/awesome-wm-widgets/github-contributions-widget/screenshots/screenshot.jpg b/.config/awesome/awesome-wm-widgets/github-contributions-widget/screenshots/screenshot.jpg new file mode 100755 index 0000000..15ad456 Binary files /dev/null and b/.config/awesome/awesome-wm-widgets/github-contributions-widget/screenshots/screenshot.jpg differ diff --git a/.config/awesome/awesome-wm-widgets/github-contributions-widget/screenshots/screenshot1.jpg b/.config/awesome/awesome-wm-widgets/github-contributions-widget/screenshots/screenshot1.jpg new file mode 100755 index 0000000..d1eeb44 Binary files /dev/null and b/.config/awesome/awesome-wm-widgets/github-contributions-widget/screenshots/screenshot1.jpg differ diff --git a/.config/awesome/awesome-wm-widgets/github-contributions-widget/screenshots/screenshot2.jpg b/.config/awesome/awesome-wm-widgets/github-contributions-widget/screenshots/screenshot2.jpg new file mode 100755 index 0000000..5ce47f2 Binary files /dev/null and b/.config/awesome/awesome-wm-widgets/github-contributions-widget/screenshots/screenshot2.jpg differ diff --git a/.config/awesome/awesome-wm-widgets/github-contributions-widget/screenshots/standard.png b/.config/awesome/awesome-wm-widgets/github-contributions-widget/screenshots/standard.png new file mode 100755 index 0000000..e10479a Binary files /dev/null and b/.config/awesome/awesome-wm-widgets/github-contributions-widget/screenshots/standard.png differ diff --git a/.config/awesome/awesome-wm-widgets/github-contributions-widget/screenshots/teal.png b/.config/awesome/awesome-wm-widgets/github-contributions-widget/screenshots/teal.png new file mode 100755 index 0000000..f10de7a Binary files /dev/null and b/.config/awesome/awesome-wm-widgets/github-contributions-widget/screenshots/teal.png differ diff --git a/.config/awesome/awesome-wm-widgets/github-contributions-widget/themes.lua b/.config/awesome/awesome-wm-widgets/github-contributions-widget/themes.lua new file mode 100755 index 0000000..574f8fa --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/github-contributions-widget/themes.lua @@ -0,0 +1,46 @@ +local themes = { + standard = { + [4] = '#216e39', + [3] = '#30a14e', + [2] = '#40c463', + [1] = '#9be9a8', + [0] = '#ebedf0' + }, + classic = { + [4] = '#196127', + [3] = '#239a3b', + [2] = '#7bc96f', + [1] = '#c6e48b', + [0] = '#ebedf0', + }, + teal = { + [4] = '#458B74', + [3] = '#66CDAA', + [2] = '#76EEC6', + [1] = '#7FFFD4', + [0] = '#ebedf0', + }, + leftpad = { + [4] = '#F6F6F6', + [3] = '#DDDDDD', + [2] = '#A5A5A5', + [1] = '#646464', + [0] = '#2F2F2F', + }, + dracula = { + [4] = '#ff79c6', + [3] = '#bd93f9', + [2] = '#6272a4', + [1] = '#44475a', + [0] = '#282a36' + }, + pink = { + [4] = '#61185f', + [3] = '#a74aa8', + [2] = '#ca5bcc', + [1] = '#e48bdc', + [0] = '#ebedf0', + } +} + +return themes \ No newline at end of file diff --git a/.config/awesome/awesome-wm-widgets/github-prs-widget/README.md b/.config/awesome/awesome-wm-widgets/github-prs-widget/README.md new file mode 100755 index 0000000..1d4c27e --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/github-prs-widget/README.md @@ -0,0 +1,43 @@ +# GitHub PRs Widget + +

+ GitHub issues by-label +

+ +The widget shows the number of pull requests assigned to the user and when clicked shows additional information, such as + - author's name and avatar (opens user profile page when clicked); + - PR name (opens MR when clicked); + - name of the repository; + - when was created; + - number of comments; + +

+ +

+ +## Customization + +It is possible to customize widget by providing a table with all or some of the following config parameters: + +| Name | Default | Description | +|---|---|---| +| `reviewer` | Required | github user login | + +## Installation + +Install and setup [GitHub CLI](https://cli.github.com/) +Clone/download repo and use widget in **rc.lua**: + +```lua +local github_prs_widget = require("awesome-wm-widgets.github-prs-widget") +... +s.mytasklist, -- Middle widget +{ -- Right widgets + layout = wibox.layout.fixed.horizontal, + ... + github_prs_widget { + reviewer = 'streetturtle' + }, +} +... +``` diff --git a/.config/awesome/awesome-wm-widgets/github-prs-widget/icons/book.svg b/.config/awesome/awesome-wm-widgets/github-prs-widget/icons/book.svg new file mode 100755 index 0000000..7833095 --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/github-prs-widget/icons/book.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/.config/awesome/awesome-wm-widgets/github-prs-widget/icons/calendar.svg b/.config/awesome/awesome-wm-widgets/github-prs-widget/icons/calendar.svg new file mode 100755 index 0000000..45a15fe --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/github-prs-widget/icons/calendar.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/.config/awesome/awesome-wm-widgets/github-prs-widget/icons/git-pull-request.svg b/.config/awesome/awesome-wm-widgets/github-prs-widget/icons/git-pull-request.svg new file mode 100755 index 0000000..54c92b9 --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/github-prs-widget/icons/git-pull-request.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/.config/awesome/awesome-wm-widgets/github-prs-widget/icons/message-square.svg b/.config/awesome/awesome-wm-widgets/github-prs-widget/icons/message-square.svg new file mode 100755 index 0000000..e37df4b --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/github-prs-widget/icons/message-square.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/.config/awesome/awesome-wm-widgets/github-prs-widget/icons/user.svg b/.config/awesome/awesome-wm-widgets/github-prs-widget/icons/user.svg new file mode 100755 index 0000000..7704341 --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/github-prs-widget/icons/user.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/.config/awesome/awesome-wm-widgets/github-prs-widget/init.lua b/.config/awesome/awesome-wm-widgets/github-prs-widget/init.lua new file mode 100755 index 0000000..8d59ac8 --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/github-prs-widget/init.lua @@ -0,0 +1,434 @@ +------------------------------------------------- +-- GitHub Widget for Awesome Window Manager +-- Shows the number of currently assigned merge requests +-- and information about them +-- More details could be found here: +-- https://github.com/streetturtle/awesome-wm-widgets/tree/master/github-prs-widget + +-- @author Pavel Makhov +-- @copyright 2021 Pavel Makhov +------------------------------------------------- + +local awful = require("awful") +local wibox = require("wibox") +local watch = require("awful.widget.watch") +local json = require("json") +local spawn = require("awful.spawn") +local naughty = require("naughty") +local gears = require("gears") +local beautiful = require("beautiful") +local gfs = require("gears.filesystem") +local color = require("gears.color") + +local HOME_DIR = os.getenv("HOME") +local WIDGET_DIR = HOME_DIR .. '/.config/awesome/awesome-wm-widgets/github-prs-widget/' +local ICONS_DIR = WIDGET_DIR .. 'icons/' + +local AVATARS_DIR = HOME_DIR .. '/.cache/awmw/github-widget/avatars/' +local DOWNLOAD_AVATAR_CMD = [[sh -c "curl -L --create-dirs -o ''\\]] .. AVATARS_DIR .. [[%s %s"]] + +local GET_PRS_CMD = "gh api -X GET search/issues " + .. "-f 'q=review-requested:%s is:unmerged is:open' " + .. "-f per_page=30 " + .. "--jq '[.items[] | {url,repository_url,title,html_url,comments,assignees,user,created_at,draft}]'" + +local github_widget = wibox.widget { + { + { + { + { + { + id = 'icon', + widget = wibox.widget.imagebox + }, + { + id = 'error_marker', + draw = function(_, _, cr, width, height) + cr:set_source(color('#BF616A')) + cr:arc(width - height / 6, height / 6, height / 6, 0, math.pi * 2) + cr:fill() + end, + visible = false, + layout = wibox.widget.base.make_widget, + }, + layout = wibox.layout.stack + }, + margins = 4, + layout = wibox.container.margin + }, + { + id = "txt", + widget = wibox.widget.textbox + }, + { + id = "new_pr", + widget = wibox.widget.textbox + }, + spacing = 4, + layout = wibox.layout.fixed.horizontal, + }, + left = 4, + right = 4, + widget = wibox.container.margin + }, + shape = function(cr, width, height) + gears.shape.rounded_rect(cr, width, height, 4) + end, + widget = wibox.container.background, + set_text = function(self, new_value) + self:get_children_by_id('txt')[1]:set_text(new_value) + end, + set_icon = function(self, new_value) + self:get_children_by_id('icon')[1]:set_image(new_value) + end, + is_everything_ok = function(self, is_ok) + if is_ok then + self:get_children_by_id('error_marker')[1]:set_visible(false) + self:get_children_by_id('icon')[1]:set_opacity(1) + self:get_children_by_id('icon')[1]:emit_signal('widget:redraw_needed') + else + self.txt:set_text('') + self:get_children_by_id('error_marker')[1]:set_visible(true) + self:get_children_by_id('icon')[1]:set_opacity(0.2) + self:get_children_by_id('icon')[1]:emit_signal('widget:redraw_needed') + end + end +} + +local function show_warning(message) + naughty.notify{ + preset = naughty.config.presets.critical, + title = 'GitHub PRs Widget', + text = message} +end + +local popup = awful.popup{ + ontop = true, + visible = false, + shape = gears.shape.rounded_rect, + border_width = 1, + maximum_width = 400, + offset = { y = 5 }, + widget = {} +} + +--- Converts string representation of date (2020-06-02T11:25:27Z) to date +local function parse_date(date_str) + local pattern = "(%d+)%-(%d+)%-(%d+)T(%d+):(%d+):(%d+)%Z" + local y, m, d, h, min, sec, _ = date_str:match(pattern) + + return os.time{year = y, month = m, day = d, hour = h, min = min, sec = sec} +end + +--- Converts seconds to "time ago" represenation, like '1 hour ago' +local function to_time_ago(seconds) + local days = seconds / 86400 + if days > 1 then + days = math.floor(days + 0.5) + return days .. (days == 1 and ' day' or ' days') .. ' ago' + end + + local hours = (seconds % 86400) / 3600 + if hours > 1 then + hours = math.floor(hours + 0.5) + return hours .. (hours == 1 and ' hour' or ' hours') .. ' ago' + end + + local minutes = ((seconds % 86400) % 3600) / 60 + if minutes > 1 then + minutes = math.floor(minutes + 0.5) + return minutes .. (minutes == 1 and ' minute' or ' minutes') .. ' ago' + end +end + +local function ellipsize(text, length) + return (text:len() > length and length > 0) + and text:sub(0, length - 3) .. '...' + or text +end + +local warning_shown = false +local tooltip = awful.tooltip { + mode = 'outside', + preferred_positions = {'bottom'}, +} + +local config = {} + +config.reviewer = nil + +config.bg_normal = '#aaaaaa' +config.bg_focus = '#ffffff' + + +local function worker(user_args) + + local args = user_args or {} + + -- Setup config for the widget instance. + -- The `_config` table will keep the first existing value after checking + -- in this order: user parameter > beautiful > module default + local _config = {} + for prop, value in pairs(config) do + _config[prop] = args[prop] or beautiful[prop] or value + end + + local icon = args.icon or ICONS_DIR .. 'git-pull-request.svg' + local reviewer = args.reviewer + local timeout = args.timeout or 60 + + local current_number_of_prs + + local to_review_rows = {layout = wibox.layout.fixed.vertical} + local rows = {layout = wibox.layout.fixed.vertical} + + github_widget:set_icon(icon) + + local update_widget = function(widget, stdout, stderr, _, _) + + if stderr ~= '' then + if not warning_shown then + show_warning(stderr) + warning_shown = true + widget:is_everything_ok(false) + tooltip:add_to_object(widget) + + widget:connect_signal('mouse::enter', function() + tooltip.text = stderr + end) + end + return + end + + warning_shown = false + tooltip:remove_from_object(widget) + widget:is_everything_ok(true) + + local prs = json.decode(stdout) + + current_number_of_prs = #prs + + if current_number_of_prs == 0 then + widget:set_visible(false) + return + end + + widget:set_visible(true) + widget:set_text(current_number_of_prs) + + for i = 0, #rows do rows[i]=nil end + + for i = 0, #to_review_rows do to_review_rows[i]=nil end + table.insert(to_review_rows, { + { + markup = 'PRs to review', + align = 'center', + forced_height = 20, + widget = wibox.widget.textbox + }, + bg = _config.bg_normal, + widget = wibox.container.background + }) + + local current_time = os.time(os.date("!*t")) + + for _, pr in ipairs(prs) do + local path_to_avatar = AVATARS_DIR .. pr.user.id + local index = string.find(pr.repository_url, "/[^/]*$") + local repo = string.sub(pr.repository_url, index + 1) + + local row = wibox.widget { + { + { + { + { + resize = true, + image = path_to_avatar, + forced_width = 40, + forced_height = 40, + widget = wibox.widget.imagebox + }, + id = 'avatar', + margins = 4, + layout = wibox.container.margin + }, + { + { + id = 'title', + markup = '' .. ellipsize(pr.title, 60) .. '', + widget = wibox.widget.textbox, + forced_width = 400 + }, + { + { + { + { + image = ICONS_DIR .. 'book.svg', + forced_width = 12, + forced_height = 12, + resize = true, + widget = wibox.widget.imagebox + }, + { + text = repo, + widget = wibox.widget.textbox + }, + spacing = 4, + expand = 'none', + layout = wibox.layout.fixed.horizontal + }, + { + { + image = ICONS_DIR .. 'user.svg', + forced_width = 12, + forced_height = 12, + resize = true, + widget = wibox.widget.imagebox + }, + { + text = pr.user.login, + widget = wibox.widget.textbox + }, + spacing = 4, + expand = 'none', + layout = wibox.layout.fixed.horizontal + }, + spacing = 8, + expand = 'none', + layout = wibox.layout.fixed.horizontal + }, + { + { + { + image = ICONS_DIR .. 'user.svg', + forced_width = 12, + forced_height = 12, + resize = true, + widget = wibox.widget.imagebox + }, + { + text = to_time_ago(os.difftime(current_time, parse_date(pr.created_at))), + widget = wibox.widget.textbox + }, + spacing = 4, + expand = 'none', + layout = wibox.layout.fixed.horizontal + + }, + { + { + image = ICONS_DIR .. 'message-square.svg', + forced_width = 12, + forced_height = 12, + resize = true, + widget = wibox.widget.imagebox + }, + { + text = pr.comments, + widget = wibox.widget.textbox + }, + spacing = 4, + expand = 'none', + layout = wibox.layout.fixed.horizontal + + }, + spacing = 8, + layout = wibox.layout.fixed.horizontal + }, + layout = wibox.layout.fixed.vertical + }, + spacing = 4, + layout = wibox.layout.fixed.vertical + }, + spacing = 8, + layout = wibox.layout.fixed.horizontal + }, + margins = 8, + layout = wibox.container.margin + }, + bg = _config.bg_normal, + widget = wibox.container.background + } + + if not gfs.file_readable(path_to_avatar) then + spawn.easy_async(string.format( + DOWNLOAD_AVATAR_CMD, + pr.user.id, + pr.user.avatar_url), function() + row:get_children_by_id('avatar')[1]:set_image(path_to_avatar) + end) + end + + row:connect_signal("mouse::enter", function(c) c:set_bg(_config.bg_focus) end) + row:connect_signal("mouse::leave", function(c) c:set_bg(_config.bg_normal) end) + + row:get_children_by_id('title')[1]:buttons( + awful.util.table.join( + awful.button({}, 1, function() + spawn.with_shell("xdg-open " .. pr.html_url) + popup.visible = false + end) + ) + ) + row:get_children_by_id('avatar')[1]:buttons( + awful.util.table.join( + awful.button({}, 1, function() + spawn.with_shell("xdg-open " .. pr.user.html_url) + popup.visible = false + end) + ) + ) + + local old_cursor, old_wibox + row:get_children_by_id('title')[1]:connect_signal("mouse::enter", function() + local wb = mouse.current_wibox + old_cursor, old_wibox = wb.cursor, wb + wb.cursor = "hand1" + end) + row:get_children_by_id('title')[1]:connect_signal("mouse::leave", function() + if old_wibox then + old_wibox.cursor = old_cursor + old_wibox = nil + end + end) + + row:get_children_by_id('avatar')[1]:connect_signal("mouse::enter", function() + local wb = mouse.current_wibox + old_cursor, old_wibox = wb.cursor, wb + wb.cursor = "hand1" + end) + row:get_children_by_id('avatar')[1]:connect_signal("mouse::leave", function() + if old_wibox then + old_wibox.cursor = old_cursor + old_wibox = nil + end + end) + + table.insert(to_review_rows, row) + end + + table.insert(rows, to_review_rows) + popup:setup(rows) + end + + github_widget:buttons( + awful.util.table.join( + awful.button({}, 1, function() + if popup.visible then + popup.visible = not popup.visible + github_widget:set_bg('#00000000') + else + github_widget:set_bg(beautiful.bg_focus) + popup:move_next_to(mouse.current_widget_geometry) + end + end) + ) + ) + + watch(string.format(GET_PRS_CMD, reviewer), + timeout, update_widget, github_widget) + + return github_widget +end + +return setmetatable(github_widget, { __call = function(_, ...) return worker(...) end }) diff --git a/.config/awesome/awesome-wm-widgets/github-prs-widget/screenshots/screenshot1.png b/.config/awesome/awesome-wm-widgets/github-prs-widget/screenshots/screenshot1.png new file mode 100755 index 0000000..295b56e Binary files /dev/null and b/.config/awesome/awesome-wm-widgets/github-prs-widget/screenshots/screenshot1.png differ diff --git a/.config/awesome/awesome-wm-widgets/gitlab-widget/README.md b/.config/awesome/awesome-wm-widgets/gitlab-widget/README.md new file mode 100755 index 0000000..17007bc --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/gitlab-widget/README.md @@ -0,0 +1,48 @@ +# Gitlab widget + +

+ GitHub issues by-label +

+ +The widget shows the number of merge requests assigned to the user and when clicked shows additional information, such as + - author's name and avatar (opens user profile page when clicked); + - MR name (opens MR when clicked); + - source and target branches; + - when was created; + - number of comments; + - number of approvals. + +![screenshot](./screenshot.png) + +## Customization + +It is possible to customize widget by providing a table with all or some of the following config parameters: + +| Name | Default | Description | +|---|---|---| +| `icon` | `./icons/gitlab-icon.svg` | Path to the icon | +| `host` | Required | e.g _https://gitlab.yourcompany.com_ | +| `access_token` | Required | e.g _h2v531iYASDz6McxYk4A_ | +| `timeout` | 60 | How often in seconds the widget should be refreshed | + +_Note:_ + - to get the access token, go to **User Settings** -> **Access Tokens** and generate a token with **api** scope + +## Installation + +Clone/download repo and use widget in **rc.lua**: + +```lua +local gitlab_widget = require("awesome-wm-widgets.gitlab-widget.gitlab") +... +s.mytasklist, -- Middle widget + { -- Right widgets + layout = wibox.layout.fixed.horizontal, + ... + -- default + gitlab_widget{ + host = 'https://gitlab.yourcompany.com', + access_token = 'h2v531iYASDz6McxYk4A' + }, + ... +``` diff --git a/.config/awesome/awesome-wm-widgets/gitlab-widget/gitlab.lua b/.config/awesome/awesome-wm-widgets/gitlab-widget/gitlab.lua new file mode 100755 index 0000000..c0716d7 --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/gitlab-widget/gitlab.lua @@ -0,0 +1,401 @@ +------------------------------------------------- +-- Gitlab Widget for Awesome Window Manager +-- Shows the number of currently assigned merge requests +-- and information about them +-- More details could be found here: +-- https://github.com/streetturtle/awesome-wm-widgets/tree/master/gitlab-widget + +-- @author Pavel Makhov +-- @copyright 2020 Pavel Makhov +------------------------------------------------- + +local awful = require("awful") +local wibox = require("wibox") +local watch = require("awful.widget.watch") +local json = require("json") +local spawn = require("awful.spawn") +local naughty = require("naughty") +local gears = require("gears") +local beautiful = require("beautiful") +local gfs = require("gears.filesystem") +local color = require("gears.color") + +local HOME_DIR = os.getenv("HOME") +local WIDGET_DIR = HOME_DIR .. '/.config/awesome/awesome-wm-widgets/gitlab-widget/' +local GET_PRS_CMD= [[sh -c "curl -s --connect-timeout 5 --show-error --header 'PRIVATE-TOKEN: %s']] + ..[[ '%s/api/v4/merge_requests?state=opened'"]] +local DOWNLOAD_AVATAR_CMD = [[sh -c "curl -L --create-dirs -o %s/.cache/awmw/gitlab-widget/avatars/%s %s"]] + +local gitlab_widget = wibox.widget { + { + { + { + id = 'icon', + widget = wibox.widget.imagebox + }, + { + id = 'error_marker', + draw = function(_, _, cr, width, height) + cr:set_source(color(beautiful.fg_urgent)) + cr:arc(width - height/6, height/6, height/6, 0, math.pi*2) + cr:fill() + end, + visible = false, + layout = wibox.widget.base.make_widget, + }, + layout = wibox.layout.stack + }, + margins = 4, + layout = wibox.container.margin + }, + { + id = "txt", + widget = wibox.widget.textbox + }, + { + id = "new_pr", + widget = wibox.widget.textbox + }, + layout = wibox.layout.fixed.horizontal, + set_text = function(self, new_value) + self.txt.text = new_value + end, + set_icon = function(self, new_value) + self:get_children_by_id('icon')[1]:set_image(new_value) + end, + is_everything_ok = function(self, is_ok) + if is_ok then + self:get_children_by_id('error_marker')[1]:set_visible(false) + self:get_children_by_id('icon')[1]:set_opacity(1) + self:get_children_by_id('icon')[1]:emit_signal('widget:redraw_needed') + else + self.txt:set_text('') + self:get_children_by_id('error_marker')[1]:set_visible(true) + self:get_children_by_id('icon')[1]:set_opacity(0.2) + self:get_children_by_id('icon')[1]:emit_signal('widget:redraw_needed') + end + end +} + +local function show_warning(message) + naughty.notify{ + preset = naughty.config.presets.critical, + title = 'Gitlab Widget', + text = message} +end + +local popup = awful.popup{ + ontop = true, + visible = false, + shape = gears.shape.rounded_rect, + border_width = 1, + border_color = beautiful.bg_focus, + maximum_width = 400, + offset = { y = 5 }, + widget = {} +} + +--- Converts string representation of date (2020-06-02T11:25:27Z) to date +local function parse_date(date_str) + local pattern = "(%d+)%-(%d+)%-(%d+)T(%d+):(%d+):(%d+)%Z" + local y, m, d, h, min, sec, _ = date_str:match(pattern) + + return os.time{year = y, month = m, day = d, hour = h, min = min, sec = sec} +end + +--- Converts seconds to "time ago" represenation, like '1 hour ago' +local function to_time_ago(seconds) + local days = seconds / 86400 + if days > 1 then + days = math.floor(days + 0.5) + return days .. (days == 1 and ' day' or ' days') .. ' ago' + end + + local hours = (seconds % 86400) / 3600 + if hours > 1 then + hours = math.floor(hours + 0.5) + return hours .. (hours == 1 and ' hour' or ' hours') .. ' ago' + end + + local minutes = ((seconds % 86400) % 3600) / 60 + if minutes > 1 then + minutes = math.floor(minutes + 0.5) + return minutes .. (minutes == 1 and ' minute' or ' minutes') .. ' ago' + end +end + +local function ellipsize(text, length) + return (text:len() > length and length > 0) + and text:sub(0, length - 3) .. '...' + or text +end + +local warning_shown = false +local tooltip = awful.tooltip { + mode = 'outside', + preferred_positions = {'bottom'}, + } + +local function worker(user_args) + + local args = user_args or {} + + local icon = args.icon or WIDGET_DIR .. '/icons/gitlab-icon.svg' + local access_token = args.access_token or show_warning('API Token is not set') + local host = args.host or show_warning('Gitlab host is not set') + local timeout = args.timeout or 60 + + local current_number_of_prs + + local to_review_rows = {layout = wibox.layout.fixed.vertical} + local my_review_rows = {layout = wibox.layout.fixed.vertical} + local rows = {layout = wibox.layout.fixed.vertical} + + gitlab_widget:set_icon(icon) + + local update_widget = function(widget, stdout, stderr, _, _) + + if stderr ~= '' then + if not warning_shown then + show_warning(stderr) + warning_shown = true + widget:is_everything_ok(false) + tooltip:add_to_object(widget) + + widget:connect_signal('mouse::enter', function() + tooltip.text = stderr + end) + end + return + end + + warning_shown = false + tooltip:remove_from_object(widget) + widget:is_everything_ok(true) + + local result = json.decode(stdout) + + current_number_of_prs = rawlen(result) + + if current_number_of_prs == 0 then + widget:set_visible(false) + return + end + + widget:set_visible(true) + widget:set_text(current_number_of_prs) + + for i = 0, #rows do rows[i]=nil end + + for i = 0, #to_review_rows do to_review_rows[i]=nil end + table.insert(to_review_rows, { + { + markup = 'PRs to review', + align = 'center', + forced_height = 20, + widget = wibox.widget.textbox + }, + bg = beautiful.bg_normal, + widget = wibox.container.background + }) + + for i = 0, #my_review_rows do my_review_rows[i]=nil end + table.insert(my_review_rows, { + { + markup = 'My PRs', + align = 'center', + forced_height = 20, + widget = wibox.widget.textbox + }, + bg = beautiful.bg_normal, + widget = wibox.container.background + }) + local current_time = os.time(os.date("!*t")) + + for _, pr in ipairs(result) do + local path_to_avatar = os.getenv("HOME") ..'/.cache/awmw/gitlab-widget/avatars/' .. pr.author.id + + local row = wibox.widget { + { + { + { + { + resize = true, + image = path_to_avatar, + forced_width = 40, + forced_height = 40, + widget = wibox.widget.imagebox + }, + id = 'avatar', + margins = 8, + layout = wibox.container.margin + }, + { + { + id = 'title', + markup = '' .. ellipsize(pr.title, 50) .. '', + widget = wibox.widget.textbox, + forced_width = 400 + }, + { + { + { + { + text = pr.source_branch, + widget = wibox.widget.textbox + }, + { + text = '->', + widget = wibox.widget.textbox + }, + { + text = pr.target_branch, + widget = wibox.widget.textbox + }, + spacing = 8, + layout = wibox.layout.fixed.horizontal + }, + { + { + text = pr.author.name, + widget = wibox.widget.textbox + }, + { + text = to_time_ago(os.difftime(current_time, parse_date(pr.created_at))), + widget = wibox.widget.textbox + }, + spacing = 8, + expand = 'none', + layout = wibox.layout.fixed.horizontal + }, + forced_width = 285, + layout = wibox.layout.fixed.vertical + }, + { + { + { + -- image = number_of_approves > 0 and WIDGET_DIR .. '/check.svg' or '', + image = WIDGET_DIR .. '/icons/check.svg', + resize = false, + widget = wibox.widget.imagebox + }, + { + text = pr.upvotes, + widget = wibox.widget.textbox + }, + layout = wibox.layout.fixed.horizontal + }, + { + { + image = WIDGET_DIR .. '/icons/message-circle.svg', + resize = false, + widget = wibox.widget.imagebox + }, + { + text = pr.user_notes_count, + widget = wibox.widget.textbox + }, + layout = wibox.layout.fixed.horizontal + }, + layout = wibox.layout.fixed.vertical + }, + layout = wibox.layout.fixed.horizontal + }, + + spacing = 8, + layout = wibox.layout.fixed.vertical + }, + spacing = 8, + layout = wibox.layout.fixed.horizontal + }, + margins = 8, + layout = wibox.container.margin + }, + bg = beautiful.bg_normal, + widget = wibox.container.background + } + + if not gfs.file_readable(path_to_avatar) then + spawn.easy_async(string.format( + DOWNLOAD_AVATAR_CMD, + HOME_DIR, + pr.author.id, + pr.author.avatar_url), function() + row:get_children_by_id('avatar')[1]:set_image(path_to_avatar) + end) + end + + row:connect_signal("mouse::enter", function(c) c:set_bg(beautiful.bg_focus) end) + row:connect_signal("mouse::leave", function(c) c:set_bg(beautiful.bg_normal) end) + + row:get_children_by_id('title')[1]:buttons( + awful.util.table.join( + awful.button({}, 1, function() + spawn.with_shell("xdg-open " .. pr.web_url) + popup.visible = false + end) + ) + ) + row:get_children_by_id('avatar')[1]:buttons( + awful.util.table.join( + awful.button({}, 1, function() + spawn.with_shell("xdg-open " .. pr.author.web_url) + popup.visible = false + end) + ) + ) + + local old_cursor, old_wibox + row:get_children_by_id('title')[1]:connect_signal("mouse::enter", function() + local wb = mouse.current_wibox + old_cursor, old_wibox = wb.cursor, wb + wb.cursor = "hand1" + end) + row:get_children_by_id('title')[1]:connect_signal("mouse::leave", function() + if old_wibox then + old_wibox.cursor = old_cursor + old_wibox = nil + end + end) + + row:get_children_by_id('avatar')[1]:connect_signal("mouse::enter", function() + local wb = mouse.current_wibox + old_cursor, old_wibox = wb.cursor, wb + wb.cursor = "hand1" + end) + row:get_children_by_id('avatar')[1]:connect_signal("mouse::leave", function() + if old_wibox then + old_wibox.cursor = old_cursor + old_wibox = nil + end + end) + + table.insert(to_review_rows, row) + end + + table.insert(rows, to_review_rows) + if (#my_review_rows > 1) then + table.insert(rows, my_review_rows) + end + popup:setup(rows) + end + + gitlab_widget:buttons( + awful.util.table.join( + awful.button({}, 1, function() + if popup.visible then + popup.visible = not popup.visible + else + popup:move_next_to(mouse.current_widget_geometry) + end + end) + ) + ) + + watch(string.format(GET_PRS_CMD, access_token, host), + -- string.format(GET_PRS_CMD, host, workspace, repo_slug, uuid, uuid), + timeout, update_widget, gitlab_widget) + return gitlab_widget +end + +return setmetatable(gitlab_widget, { __call = function(_, ...) return worker(...) end }) diff --git a/.config/awesome/awesome-wm-widgets/gitlab-widget/icons/check.svg b/.config/awesome/awesome-wm-widgets/gitlab-widget/icons/check.svg new file mode 100755 index 0000000..e9e44ac --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/gitlab-widget/icons/check.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/.config/awesome/awesome-wm-widgets/gitlab-widget/icons/gitlab-icon.svg b/.config/awesome/awesome-wm-widgets/gitlab-widget/icons/gitlab-icon.svg new file mode 100755 index 0000000..abe3f37 --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/gitlab-widget/icons/gitlab-icon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/.config/awesome/awesome-wm-widgets/gitlab-widget/icons/message-circle.svg b/.config/awesome/awesome-wm-widgets/gitlab-widget/icons/message-circle.svg new file mode 100755 index 0000000..43eacbb --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/gitlab-widget/icons/message-circle.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/.config/awesome/awesome-wm-widgets/gitlab-widget/screenshot.png b/.config/awesome/awesome-wm-widgets/gitlab-widget/screenshot.png new file mode 100755 index 0000000..8ab6590 Binary files /dev/null and b/.config/awesome/awesome-wm-widgets/gitlab-widget/screenshot.png differ diff --git a/.config/awesome/awesome-wm-widgets/jira-widget/README.md b/.config/awesome/awesome-wm-widgets/jira-widget/README.md new file mode 100755 index 0000000..85abaf2 --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/jira-widget/README.md @@ -0,0 +1,59 @@ +# Jira widget + +The widget shows the number of tickets assigned to the user (or any other result of a JQL query, see customization section) and when clicked shows them in the list, grouped by the ticket status. Left-click on the item opens the issue in the default browser: + +

+screenshot +

+ +## How it works + +Widget uses cURL to query Jira's [REST API](https://developer.atlassian.com/server/jira/platform/rest-apis/). In order to be authenticated, widget uses a [netrc](https://ec.haxx.se/usingcurl/usingcurl-netrc) feature of the cURL, which is basically to store basic auth credentials in a .netrc file in home folder. + +If you are on Atlassian Cloud, then instead of providing a password in netrc file you can set an [API token](https://confluence.atlassian.com/cloud/api-tokens-938839638.html) which is a safer option, as you can revoke/change the token at any time. + +## Customization + +It is possible to customize widget by providing a table with all or some of the following config parameters: + +| Name | Default | Description | +|---|---|---| +| `host` | Required | Ex: _http://jira.tmnt.com_ | +| `query` | `jql=assignee=currentuser() AND resolution=Unresolved` | JQL query | +| `icon` | `~/.config/awesome/awesome-wm-widgets/jira-widget/jira-mark-gradient-blue.svg` | Path to the icon | +| `timeout` | 600 | How often in seconds the widget refreshes | + +## Installation + +Create a .netrc file in your home directory with following content: + +```bash +machine turtlejira.com +login mikey@tmnt.com +password cowabunga +``` + +Then change file's permissions to 600 (so only you can read/write it): + +```bash +chmod 600 ~/.netrc +``` +And test if it works by calling the API (`-n` option is to use the .netrc file for authentication): + +```bash +curl -n 'https://turtleninja.com/rest/api/2/search?jql=assignee=currentuser()+AND+resolution=Unresolved' +``` + +Clone/download repo and use the widget in **rc.lua**: + +```lua +local jira_widget = require("awesome-wm-widgets.jira-widget.jira") +... +s.mytasklist, -- Middle widget + { -- Right widgets + layout = wibox.layout.fixed.horizontal, + ... + -- default + jira_widget({host = 'http://jira.tmnt.com'}), + ... +``` diff --git a/.config/awesome/awesome-wm-widgets/jira-widget/icon/jira-mark-gradient-blue.svg b/.config/awesome/awesome-wm-widgets/jira-widget/icon/jira-mark-gradient-blue.svg new file mode 100755 index 0000000..74ea729 --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/jira-widget/icon/jira-mark-gradient-blue.svg @@ -0,0 +1 @@ +jira-icon-gradient-blue \ No newline at end of file diff --git a/.config/awesome/awesome-wm-widgets/jira-widget/jira.lua b/.config/awesome/awesome-wm-widgets/jira-widget/jira.lua new file mode 100755 index 0000000..f34e951 --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/jira-widget/jira.lua @@ -0,0 +1,305 @@ +------------------------------------------------- +-- Jira Widget for Awesome Window Manager +-- Shows the number of currently assigned issues +-- More details could be found here: +-- https://github.com/streetturtle/awesome-wm-widgets/tree/master/jira-widget + +-- @author Pavel Makhov +-- @copyright 2020 Pavel Makhov +------------------------------------------------- + +local awful = require("awful") +local wibox = require("wibox") +local watch = require("awful.widget.watch") +local json = require("json") +local spawn = require("awful.spawn") +local naughty = require("naughty") +local gears = require("gears") +local beautiful = require("beautiful") +local gfs = require("gears.filesystem") +local color = require("gears.color") + +local HOME_DIR = os.getenv("HOME") + +local GET_ISSUES_CMD = + [[bash -c "curl -s --show-error -X GET -n '%s/rest/api/2/search?%s&fields=id,assignee,summary,status'"]] +local DOWNLOAD_AVATAR_CMD = [[bash -c "curl -n --create-dirs -o %s/.cache/awmw/jira-widget/avatars/%s %s"]] + +local function show_warning(message) + naughty.notify{ + preset = naughty.config.presets.critical, + title = 'Jira Widget', + text = message} +end + +local jira_widget = wibox.widget { + { + { + { + { + id = 'c', + widget = wibox.widget.imagebox + }, + { + id = 'd', + draw = function(_, _, cr, width, height) + cr:set_source(color(beautiful.fg_urgent)) + cr:arc(width - height / 6, height / 6, height / 6, 0, math.pi * 2) + cr:fill() + end, + visible = false, + layout = wibox.widget.base.make_widget, + }, + id = 'b', + layout = wibox.layout.stack + }, + { + id = "txt", + widget = wibox.widget.textbox + }, + spacing = 4, + layout = wibox.layout.fixed.horizontal, + }, + margins = 4, + layout = wibox.container.margin + }, + shape = function(cr, width, height) + gears.shape.rounded_rect(cr, width, height, 4) + end, + widget = wibox.container.background, + set_text = function(self, new_value) + self:get_children_by_id('txt')[1]:set_text(new_value) + --self.txt.text = new_value + end, + set_icon = function(self, path) + self:get_children_by_id('c')[1]:set_image(path) + end, + is_everything_ok = function(self, is_ok) + if is_ok then + self:get_children_by_id('d')[1]:set_visible(false) + self:get_children_by_id('c')[1]:set_opacity(1) + self:get_children_by_id('c')[1]:emit_signal('widget:redraw_needed') + else + --self.txt:set_text('') + self:get_children_by_id('txt')[1]:set_text('') + self:get_children_by_id('d')[1]:set_visible(true) + self:get_children_by_id('c')[1]:set_opacity(0.2) + self:get_children_by_id('c')[1]:emit_signal('widget:redraw_needed') + end + end +} + +local popup = awful.popup{ + ontop = true, + visible = false, + shape = gears.shape.rounded_rect, + border_width = 1, + border_color = beautiful.bg_focus, + maximum_width = 400, + offset = { y = 5 }, + widget = {} +} + +local number_of_issues + +local warning_shown = false +local tooltip = awful.tooltip { + mode = 'outside', + preferred_positions = {'bottom'}, + } + +local function worker(user_args) + + local args = user_args or {} + + local icon = args.icon or + HOME_DIR .. '/.config/awesome/awesome-wm-widgets/jira-widget/icon/jira-mark-gradient-blue.svg' + local host = args.host or show_warning('Jira host is unknown') + local query = args.query or 'jql=assignee=currentuser() AND resolution=Unresolved' + local timeout = args.timeout or 600 + + jira_widget:set_icon(icon) + + local separator_widget = { + orientation = 'horizontal', + forced_height = 1, + color = beautiful.bg_focus, + widget = wibox.widget.separator + } + + local update_widget = function(widget, stdout, stderr, _, _) + if stderr ~= '' then + if not warning_shown then + show_warning(stderr) + warning_shown = true + widget:is_everything_ok(false) + tooltip:add_to_object(widget) + + widget:connect_signal('mouse::enter', function() + tooltip.text = stderr + end) + end + return + end + + warning_shown = false + tooltip:remove_from_object(widget) + widget:is_everything_ok(true) + + local result = json.decode(stdout) + + number_of_issues = rawlen(result.issues) + + if number_of_issues == 0 then + widget:set_visible(false) + return + end + + widget:set_visible(true) + widget:set_text(number_of_issues) + + local rows = { layout = wibox.layout.fixed.vertical } + + for i = 0, #rows do rows[i]=nil end + + -- sort issues based on the status + table.sort(result.issues, function(a,b) return a.fields.status.name > b.fields.status.name end) + + local cur_status = '' + for _, issue in ipairs(result.issues) do + + local name + if issue.fields.assignee.name == nil then + name = issue.fields.assignee.displayName + else + name = issue.fields.assignee.name + end + + local path_to_avatar = HOME_DIR ..'/.cache/awmw/jira-widget/avatars/' .. name + + if not gfs.file_readable(path_to_avatar) then + spawn.easy_async(string.format( + DOWNLOAD_AVATAR_CMD, + HOME_DIR, + name, + issue.fields.assignee.avatarUrls['48x48'])) + end + + if (cur_status ~= issue.fields.status.name) then + -- do not insert separator before first item + if (cur_status ~= '') then + table.insert(rows, separator_widget) + end + + table.insert(rows, wibox.widget { + { + { + markup = "" .. issue.fields.status.name .. "", + widget = wibox.widget.textbox, + }, + left = 8, + layout = wibox.container.margin + }, + bg = beautiful.bg_normal, + widget = wibox.container.background + }) + cur_status = issue.fields.status.name + end + + local row = wibox.widget { + { + { + { + { + resize = true, + image = path_to_avatar, + forced_width = 40, + forced_height = 40, + widget = wibox.widget.imagebox + }, + left = 4, + layout = wibox.container.margin + }, + { + { + markup = '' .. issue.fields.summary .. '', + widget = wibox.widget.textbox + }, + { + { + markup = "" .. issue.key .. "", + widget = wibox.widget.textbox + }, + { + markup = "" + .. issue.fields.assignee.displayName .. "", + widget = wibox.widget.textbox + }, + spacing = 8, + layout = wibox.layout.fixed.horizontal + }, + layout = wibox.layout.align.vertical + }, + spacing = 8, + layout = wibox.layout.fixed.horizontal + }, + margins = 4, + layout = wibox.container.margin + }, + bg = beautiful.bg_normal, + widget = wibox.container.background + } + + local old_cursor, old_wibox + row:connect_signal("mouse::enter", function(c) + c:set_bg(beautiful.bg_focus) + c:set_shape(function(cr, width, height) + gears.shape.rounded_rect(cr, width, height, 4) + end) + local wb = mouse.current_wibox + old_cursor, old_wibox = wb.cursor, wb + wb.cursor = "hand1" + end) + row:connect_signal("mouse::leave", function(c) + c:set_bg(beautiful.bg_normal) + c:set_shape(nil) + if old_wibox then + old_wibox.cursor = old_cursor + old_wibox = nil + end + end) + + row:buttons( + awful.util.table.join( + awful.button({}, 1, function() + spawn.with_shell("xdg-open " .. host .. '/browse/' .. issue.key) + popup.visible = false + jira_widget:set_bg('#00000000') + end) + ) + ) + + table.insert(rows, row) + end + + popup:setup(rows) + end + + jira_widget:buttons( + awful.util.table.join( + awful.button({}, 1, function() + if popup.visible then + jira_widget:set_bg('#00000000') + popup.visible = not popup.visible + else + jira_widget:set_bg(beautiful.bg_focus) + popup:move_next_to(mouse.current_widget_geometry) + end + end) + ) + ) + watch(string.format(GET_ISSUES_CMD, host, query:gsub(' ', '+')), timeout, update_widget, jira_widget) + return jira_widget +end + +return setmetatable(jira_widget, { __call = function(_, ...) return worker(...) end }) diff --git a/.config/awesome/awesome-wm-widgets/jira-widget/screenshot/screenshot.png b/.config/awesome/awesome-wm-widgets/jira-widget/screenshot/screenshot.png new file mode 100755 index 0000000..7bfe9b6 Binary files /dev/null and b/.config/awesome/awesome-wm-widgets/jira-widget/screenshot/screenshot.png differ diff --git a/.config/awesome/awesome-wm-widgets/logout-menu-widget/README.md b/.config/awesome/awesome-wm-widgets/logout-menu-widget/README.md new file mode 100755 index 0000000..6f8ca27 --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/logout-menu-widget/README.md @@ -0,0 +1,45 @@ +# Logout Menu Widget + +This widget shows a menu with options to log out from the current session, lock, reboot, suspend and power off the computer, similar to [logout-popup-widget](https://github.com/streetturtle/awesome-wm-widgets/tree/master/logout-popup-widget): + +![demo](./logout-menu.gif) + +## Installation + +Clone this repo (if not cloned yet) under **./.config/awesome/** + +```bash +cd ./.config/awesome/ +git clone https://github.com/streetturtle/awesome-wm-widgets +``` +Then add the widget to the wibar: + +```lua +local logout_menu_widget = require("awesome-wm-widgets.logout-menu-widget.logout-menu") + +s.mytasklist, -- Middle widget + { -- Right widgets + layout = wibox.layout.fixed.horizontal, + ... + -- default + logout_menu_widget(), + -- custom + logout_menu_widget{ + font = 'Play 14', + onlock = function() awful.spawn.with_shell('i3lock-fancy') end + } + ... +``` + +## Customization + +It is possible to customize the widget by providing a table with all or some of the following config parameters: + +| Name | Default | Description | +|---|---|---| +| `font` | `beautiful.font` | Font of the menu items | +| `onlogout` | `function() awesome.quit() end` | Function which is called when the logout item is clicked | +| `onlock` | `function() awful.spawn.with_shell("i3lock") end` | Function which is called when the lock item is clicked | +| `onreboot` | `function() awful.spawn.with_shell("reboot") end` | Function which is called when the reboot item is clicked | +| `onsuspend` | `function() awful.spawn.with_shell("systemctl suspend") end` | Function which is called when the suspend item is clicked | +| `onpoweroff` | `function() awful.spawn.with_shell("shutdown now") end` | Function which is called when the poweroff item is clicked | diff --git a/.config/awesome/awesome-wm-widgets/logout-menu-widget/icons/lock.svg b/.config/awesome/awesome-wm-widgets/logout-menu-widget/icons/lock.svg new file mode 100755 index 0000000..3cfa528 --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/logout-menu-widget/icons/lock.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/.config/awesome/awesome-wm-widgets/logout-menu-widget/icons/log-out.svg b/.config/awesome/awesome-wm-widgets/logout-menu-widget/icons/log-out.svg new file mode 100755 index 0000000..77afebb --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/logout-menu-widget/icons/log-out.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/.config/awesome/awesome-wm-widgets/logout-menu-widget/icons/moon.svg b/.config/awesome/awesome-wm-widgets/logout-menu-widget/icons/moon.svg new file mode 100755 index 0000000..60e6ce8 --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/logout-menu-widget/icons/moon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/.config/awesome/awesome-wm-widgets/logout-menu-widget/icons/power.svg b/.config/awesome/awesome-wm-widgets/logout-menu-widget/icons/power.svg new file mode 100755 index 0000000..68b1be8 --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/logout-menu-widget/icons/power.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/.config/awesome/awesome-wm-widgets/logout-menu-widget/icons/power_w.svg b/.config/awesome/awesome-wm-widgets/logout-menu-widget/icons/power_w.svg new file mode 100755 index 0000000..1f9c4e3 --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/logout-menu-widget/icons/power_w.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/.config/awesome/awesome-wm-widgets/logout-menu-widget/icons/refresh-cw.svg b/.config/awesome/awesome-wm-widgets/logout-menu-widget/icons/refresh-cw.svg new file mode 100755 index 0000000..39f52a5 --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/logout-menu-widget/icons/refresh-cw.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/.config/awesome/awesome-wm-widgets/logout-menu-widget/logout-menu.gif b/.config/awesome/awesome-wm-widgets/logout-menu-widget/logout-menu.gif new file mode 100755 index 0000000..9f17b51 Binary files /dev/null and b/.config/awesome/awesome-wm-widgets/logout-menu-widget/logout-menu.gif differ diff --git a/.config/awesome/awesome-wm-widgets/logout-menu-widget/logout-menu.lua b/.config/awesome/awesome-wm-widgets/logout-menu-widget/logout-menu.lua new file mode 100755 index 0000000..85311b0 --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/logout-menu-widget/logout-menu.lua @@ -0,0 +1,136 @@ +------------------------------------------------- +-- Logout Menu Widget for Awesome Window Manager +-- More details could be found here: +-- https://github.com/streetturtle/awesome-wm-widgets/tree/master/logout-menu-widget + +-- @author Pavel Makhov +-- @copyright 2020 Pavel Makhov +------------------------------------------------- + +local awful = require("awful") +local wibox = require("wibox") +local gears = require("gears") +local beautiful = require("beautiful") + +local HOME = os.getenv('HOME') +local ICON_DIR = HOME .. '/.config/awesome/awesome-wm-widgets/logout-menu-widget/icons/' + +local logout_menu_widget = wibox.widget { + { + { + image = ICON_DIR .. 'power_w.svg', + resize = true, + widget = wibox.widget.imagebox, + }, + margins = 4, + layout = wibox.container.margin + }, + shape = function(cr, width, height) + gears.shape.rounded_rect(cr, width, height, 4) + end, + widget = wibox.container.background, +} + +local popup = awful.popup { + ontop = true, + visible = false, + shape = function(cr, width, height) + gears.shape.rounded_rect(cr, width, height, 4) + end, + border_width = 1, + border_color = beautiful.bg_focus, + maximum_width = 400, + offset = { y = 5 }, + widget = {} +} + +local function worker(user_args) + local rows = { layout = wibox.layout.fixed.vertical } + + local args = user_args or {} + + local font = args.font or beautiful.font + + local onlogout = args.onlogout or function () awesome.quit() end + local onlock = args.onlock or function() awful.spawn.with_shell("i3lock") end + local onreboot = args.onreboot or function() awful.spawn.with_shell("reboot") end + local onsuspend = args.onsuspend or function() awful.spawn.with_shell("systemctl suspend") end + local onpoweroff = args.onpoweroff or function() awful.spawn.with_shell("shutdown now") end + + local menu_items = { + { name = 'Log out', icon_name = 'log-out.svg', command = onlogout }, + { name = 'Lock', icon_name = 'lock.svg', command = onlock }, + { name = 'Reboot', icon_name = 'refresh-cw.svg', command = onreboot }, + { name = 'Suspend', icon_name = 'moon.svg', command = onsuspend }, + { name = 'Power off', icon_name = 'power.svg', command = onpoweroff }, + } + + for _, item in ipairs(menu_items) do + + local row = wibox.widget { + { + { + { + image = ICON_DIR .. item.icon_name, + resize = false, + widget = wibox.widget.imagebox + }, + { + text = item.name, + font = font, + widget = wibox.widget.textbox + }, + spacing = 12, + layout = wibox.layout.fixed.horizontal + }, + margins = 8, + layout = wibox.container.margin + }, + bg = beautiful.bg_normal, + widget = wibox.container.background + } + + row:connect_signal("mouse::enter", function(c) c:set_bg(beautiful.bg_focus) end) + row:connect_signal("mouse::leave", function(c) c:set_bg(beautiful.bg_normal) end) + + local old_cursor, old_wibox + row:connect_signal("mouse::enter", function() + local wb = mouse.current_wibox + old_cursor, old_wibox = wb.cursor, wb + wb.cursor = "hand1" + end) + row:connect_signal("mouse::leave", function() + if old_wibox then + old_wibox.cursor = old_cursor + old_wibox = nil + end + end) + + row:buttons(awful.util.table.join(awful.button({}, 1, function() + popup.visible = not popup.visible + item.command() + end))) + + table.insert(rows, row) + end + popup:setup(rows) + + logout_menu_widget:buttons( + awful.util.table.join( + awful.button({}, 1, function() + if popup.visible then + popup.visible = not popup.visible + logout_menu_widget:set_bg('#00000000') + else + popup:move_next_to(mouse.current_widget_geometry) + logout_menu_widget:set_bg(beautiful.bg_focus) + end + end) + ) + ) + + return logout_menu_widget + +end + +return setmetatable(logout_menu_widget, { __call = function(_, ...) return worker(...) end }) diff --git a/.config/awesome/awesome-wm-widgets/logout-popup-widget/README.md b/.config/awesome/awesome-wm-widgets/logout-popup-widget/README.md new file mode 100755 index 0000000..d95b692 --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/logout-popup-widget/README.md @@ -0,0 +1,84 @@ +# Logout Popup Widget + +Widget which allows performing lock, reboot, log out, power off and sleep actions. It can be called either by a shortcut, or by clicking on a widget in wibar. + +

+ screenshot +

+ +When the widget is shown, following shortcuts can be used: + - Escape - hide widget + - s - shutdown + - r - reboot + - u - suspend + - k - lock + - l - log out + +# Installation + +Clone this (if not cloned yet) and the [awesome-buttons](https://github.com/streetturtle/awesome-buttons) repos under **./.config/awesome/** + +```bash +cd ./.config/awesome/ +git clone https://github.com/streetturtle/awesome-wm-widgets +git clone https://github.com/streetturtle/awesome-buttons +``` +Then + +- to show by a shortcut - define a shortcut in `globalkeys`: + + ```lua + local logout_popup = require("awesome-wm-widgets.logout-popup-widget.logout-popup") + ... + globalkeys = gears.table.join( + ... + awful.key({ modkey }, "l", function() logout_popup.launch() end, {description = "Show logout screen", group = "custom"}), + ``` + +- to show by clicking on a widget in wibar - add widget to the wibar: + + ```lua + local logout_popup = require("awesome-wm-widgets.logout-popup-widget.logout-popup") + + s.mytasklist, -- Middle widget + { -- Right widgets + layout = wibox.layout.fixed.horizontal, + ... + logout_popup.widget{}, + ... + ``` + +# Customisation + +| Name | Default | Description | +|---|---|---| +| `icon` | `power.svg` | If used as widget - the path to the widget's icon | +| `icon_size` | `40` | Size of the icon | +| `icon_margin` | `16` | Margin around the icon | +| `bg_color` | `beautiful.bg_normal` | The color the background of the | +| `accent_color` | `beautiful.bg_focus` | The color of the buttons | +| `text_color` | `beautiful.fg_normal` | The color of text | +| `label_color` | `beautiful.fg_normal` | The color of the button's label | +| `phrases` | `{'Goodbye!'}` | The table with phrase(s) to show, if more than one provided, the phrase is chosen randomly. Leave empty (`{}`) to hide the phrase | +| `onlogout` | `function() awesome.quit() end` | Function which is called when the logout button is pressed | +| `onlock` | `function() awful.spawn.with_shell("systemctl suspend") end` | Function which is called when the lock button is pressed | +| `onreboot` | `function() awful.spawn.with_shell("reboot") end` | Function which is called when the reboot button is pressed | +| `onsuspend` | `function() awful.spawn.with_shell("systemctl suspend") end` | Function which is called when the suspend button is pressed | +| `onpoweroff` | `function() awful.spawn.with_shell("shutdown now") end` | Function which is called when the poweroff button is pressed | + +Some color themes for inspiration: + +![nord](./logout-nord.png) +![outrun](./logout-outrun.png) +![dark](./logout-dark.png) +![dracula](./logout-dracula.png) + +```lua +logout.launch{ + bg_color = "#261447", accent_color = "#ff4365", text_color = '#f706cf', icon_size = 40, icon_margin = 16, -- outrun + -- bg_color = "#0b0c10", accent_color = "#1f2833", text_color = '#66fce1', -- dark + -- bg_color = "#3B4252", accent_color = "#88C0D0", text_color = '#D8DEE9', -- nord + -- bg_color = "#282a36", accent_color = "#ff79c6", phrases = {}, -- dracula, no phrase + phrases = {"exit(0)", "Don't forget to be awesome.", "Yippee ki yay!"}, +} +``` diff --git a/.config/awesome/awesome-wm-widgets/logout-popup-widget/logout-dark.png b/.config/awesome/awesome-wm-widgets/logout-popup-widget/logout-dark.png new file mode 100755 index 0000000..06e7c9c Binary files /dev/null and b/.config/awesome/awesome-wm-widgets/logout-popup-widget/logout-dark.png differ diff --git a/.config/awesome/awesome-wm-widgets/logout-popup-widget/logout-dracula.png b/.config/awesome/awesome-wm-widgets/logout-popup-widget/logout-dracula.png new file mode 100755 index 0000000..3c61c46 Binary files /dev/null and b/.config/awesome/awesome-wm-widgets/logout-popup-widget/logout-dracula.png differ diff --git a/.config/awesome/awesome-wm-widgets/logout-popup-widget/logout-nord.png b/.config/awesome/awesome-wm-widgets/logout-popup-widget/logout-nord.png new file mode 100755 index 0000000..9ab4b55 Binary files /dev/null and b/.config/awesome/awesome-wm-widgets/logout-popup-widget/logout-nord.png differ diff --git a/.config/awesome/awesome-wm-widgets/logout-popup-widget/logout-outrun.png b/.config/awesome/awesome-wm-widgets/logout-popup-widget/logout-outrun.png new file mode 100755 index 0000000..9be68b5 Binary files /dev/null and b/.config/awesome/awesome-wm-widgets/logout-popup-widget/logout-outrun.png differ diff --git a/.config/awesome/awesome-wm-widgets/logout-popup-widget/logout-popup.lua b/.config/awesome/awesome-wm-widgets/logout-popup-widget/logout-popup.lua new file mode 100755 index 0000000..efe6882 --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/logout-popup-widget/logout-popup.lua @@ -0,0 +1,187 @@ +------------------------------------------------- +-- Logout widget for Awesome Window Manager +-- More details could be found here: +-- https://github.com/streetturtle/awesome-wm-widgets/tree/master/logout-widget + +-- @author Pavel Makhov +-- @copyright 2020 Pavel Makhov +------------------------------------------------- + +local awful = require("awful") +local capi = {keygrabber = keygrabber } +local wibox = require("wibox") +local gears = require("gears") +local beautiful = require("beautiful") +local awesomebuttons = require("awesome-buttons.awesome-buttons") + + +local HOME_DIR = os.getenv("HOME") +local WIDGET_DIR = HOME_DIR .. '/.config/awesome/awesome-wm-widgets/logout-popup-widget' + + +local w = wibox { + bg = beautiful.fg_normal, + max_widget_size = 500, + ontop = true, + height = 200, + width = 400, + shape = function(cr, width, height) + gears.shape.rounded_rect(cr, width, height, 8) + end +} + +local action = wibox.widget { + text = ' ', + widget = wibox.widget.textbox +} + +local phrase_widget = wibox.widget{ + align = 'center', + widget = wibox.widget.textbox +} + +local function create_button(icon_name, action_name, accent_color, label_color, onclick, icon_size, icon_margin) + + local button = awesomebuttons.with_icon { + type = 'basic', + icon = icon_name, + color = accent_color, + icon_size = icon_size, + icon_margin = icon_margin, + onclick = function() + onclick() + w.visible = false + capi.keygrabber.stop() + end + } + button:connect_signal("mouse::enter", function() + action:set_markup('' .. action_name .. '') + end) + + button:connect_signal("mouse::leave", function() action:set_markup(' ') end) + + return button +end + +local function launch(args) + args = args or {} + + local bg_color = args.bg_color or beautiful.bg_normal + local accent_color = args.accent_color or beautiful.bg_focus + local text_color = args.text_color or beautiful.fg_normal + local label_color = args.label_color or beautiful.fg_focus + local phrases = args.phrases or {'Goodbye!'} + local icon_size = args.icon_size or 40 + local icon_margin = args.icon_margin or 16 + + local onlogout = args.onlogout or function () awesome.quit() end + local onlock = args.onlock or function() awful.spawn.with_shell("i3lock") end + local onreboot = args.onreboot or function() awful.spawn.with_shell("reboot") end + local onsuspend = args.onsuspend or function() awful.spawn.with_shell("systemctl suspend") end + local onpoweroff = args.onpoweroff or function() awful.spawn.with_shell("shutdown now") end + + w:set_bg(bg_color) + if #phrases > 0 then + phrase_widget:set_markup( + '' .. phrases[ math.random( #phrases ) ] .. '') + end + + w:setup { + { + phrase_widget, + { + { + create_button('log-out', 'Log Out (l)', + accent_color, label_color, onlogout, icon_size, icon_margin), + create_button('lock', 'Lock (k)', + accent_color, label_color, onlock, icon_size, icon_margin), + create_button('refresh-cw', 'Reboot (r)', + accent_color, label_color, onreboot, icon_size, icon_margin), + create_button('moon', 'Suspend (u)', + accent_color, label_color, onsuspend, icon_size, icon_margin), + create_button('power', 'Power Off (s)', + accent_color, label_color, onpoweroff, icon_size, icon_margin), + id = 'buttons', + spacing = 8, + layout = wibox.layout.fixed.horizontal + }, + valign = 'center', + layout = wibox.container.place + }, + { + action, + haligh = 'center', + layout = wibox.container.place + }, + spacing = 32, + layout = wibox.layout.fixed.vertical + }, + id = 'a', + shape_border_width = 1, + valign = 'center', + layout = wibox.container.place + } + + w.screen = mouse.screen + w.visible = true + + awful.placement.centered(w) + capi.keygrabber.run(function(_, key, event) + if event == "release" then return end + if key then + if key == 'Escape' then + phrase_widget:set_text('') + capi.keygrabber.stop() + w.visible = false + elseif key == 's' then onpoweroff() + elseif key == 'r' then onreboot() + elseif key == 'u' then onsuspend() + elseif key == 'k' then onlock() + elseif key == 'l' then onlogout() + end + + if key == 'Escape' or string.match("srukl", key) then + phrase_widget:set_text('') + capi.keygrabber.stop() + w.visible = false + end + end + end) +end + +local function widget(args) + local icon = args.icon or WIDGET_DIR .. '/power.svg' + + local res = wibox.widget { + { + { + image = icon, + widget = wibox.widget.imagebox + }, + margins = 4, + layout = wibox.container.margin + }, + layout = wibox.layout.fixed.horizontal, + } + + res:buttons( + awful.util.table.join( + awful.button({}, 1, function() + if w.visible then + phrase_widget:set_text('') + capi.keygrabber.stop() + w.visible = false + else + launch(args) + end + end) + )) + + return res + +end + +return { + launch = launch, + widget = widget +} diff --git a/.config/awesome/awesome-wm-widgets/logout-popup-widget/power.svg b/.config/awesome/awesome-wm-widgets/logout-popup-widget/power.svg new file mode 100755 index 0000000..1f9c4e3 --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/logout-popup-widget/power.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/.config/awesome/awesome-wm-widgets/logout-popup-widget/screenshot.gif b/.config/awesome/awesome-wm-widgets/logout-popup-widget/screenshot.gif new file mode 100755 index 0000000..4975c19 Binary files /dev/null and b/.config/awesome/awesome-wm-widgets/logout-popup-widget/screenshot.gif differ diff --git a/.config/awesome/awesome-wm-widgets/logout-popup-widget/screenshot.png b/.config/awesome/awesome-wm-widgets/logout-popup-widget/screenshot.png new file mode 100755 index 0000000..74ed7f0 Binary files /dev/null and b/.config/awesome/awesome-wm-widgets/logout-popup-widget/screenshot.png differ diff --git a/.config/awesome/awesome-wm-widgets/mpdarc-widget/README.md b/.config/awesome/awesome-wm-widgets/mpdarc-widget/README.md new file mode 100755 index 0000000..2192410 --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/mpdarc-widget/README.md @@ -0,0 +1,26 @@ +# MPD Widget + +Music Player Daemon widget by @raphaelfournier. + +# Prerequisite + +Install `mpd` (Music Player Daemon itself) and `mpc` (Music Player Client - program for controlling mpd), both should be available in repo, e.g for Ubuntu: + +```bash +sudo apt-get install mpd mpc +``` + +## Installation + +To use this widget clone repo under **~/.config/awesome/** and then add it in **rc.lua**: + +```lua +local mpdarc_widget = require("awesome-wm-widgets.mpdarc-widget.mpdarc") +... +s.mytasklist, -- Middle widget + { -- Right widgets + layout = wibox.layout.fixed.horizontal, + ... + mpdarc_widget, + ... +``` diff --git a/.config/awesome/awesome-wm-widgets/mpdarc-widget/mpdarc.lua b/.config/awesome/awesome-wm-widgets/mpdarc-widget/mpdarc.lua new file mode 100755 index 0000000..f1d6930 --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/mpdarc-widget/mpdarc.lua @@ -0,0 +1,119 @@ +------------------------------------------------- +-- mpd Arc Widget for Awesome Window Manager +-- Modelled after Pavel Makhov's work + +-- @author Raphaël Fournier-S'niehotta +-- @copyright 2018 Raphaël Fournier-S'niehotta +------------------------------------------------- + +local awful = require("awful") +local beautiful = require("beautiful") +local spawn = require("awful.spawn") +local watch = require("awful.widget.watch") +local wibox = require("wibox") +local naughty = require("naughty") + +local GET_MPD_CMD = "mpc status" +local TOGGLE_MPD_CMD = "mpc toggle" +local PAUSE_MPD_CMD = "mpc pause" +local STOP_MPD_CMD = "mpc stop" +local NEXT_MPD_CMD = "mpc next" +local PREV_MPD_CMD = "mpc prev" + +local PATH_TO_ICONS = "/usr/share/icons/Arc" +local PAUSE_ICON_NAME = PATH_TO_ICONS .. "/actions/24/player_pause.png" +local PLAY_ICON_NAME = PATH_TO_ICONS .. "/actions/24/player_play.png" +local STOP_ICON_NAME = PATH_TO_ICONS .. "/actions/24/player_stop.png" + +local icon = wibox.widget { + id = "icon", + widget = wibox.widget.imagebox, + image = PLAY_ICON_NAME + } +local mirrored_icon = wibox.container.mirror(icon, { horizontal = true }) + +local mpdarc = wibox.widget { + mirrored_icon, + max_value = 1, + value = 0.75, + thickness = 2, + start_angle = 4.71238898, -- 2pi*3/4 + forced_height = 32, + forced_width = 32, + rounded_edge = true, + bg = "#ffffff11", + paddings = 0, + widget = wibox.container.arcchart +} + +local mpdarc_icon_widget = wibox.container.mirror(mpdarc, { horizontal = true }) +local mpdarc_current_song_widget = wibox.widget { + id = 'current_song', + widget = wibox.widget.textbox, + font = 'Play 9' +} + +local update_graphic = function(widget, stdout, _, _, _) + local current_song = string.gmatch(stdout, "[^\r\n]+")() + stdout = string.gsub(stdout, "\n", "") + local mpdpercent = string.match(stdout, "(%d%d)%%") + local mpdstatus = string.match(stdout, "%[(%a+)%]") + if mpdstatus == "playing" then + icon.image = PLAY_ICON_NAME + widget.colors = { beautiful.widget_main_color } + widget.value = tonumber((100-mpdpercent)/100) + mpdarc_current_song_widget.markup = current_song + elseif mpdstatus == "paused" then + icon.image = PAUSE_ICON_NAME + widget.colors = { beautiful.widget_main_color } + widget.value = tonumber(mpdpercent/100) + mpdarc_current_song_widget.markup = current_song + else + icon.image = STOP_ICON_NAME + if string.len(stdout) == 0 then -- MPD is not running + mpdarc_current_song_widget.markup = "MPD is not running" + else + widget.colors = { beautiful.widget_red } + mpdarc_current_song_widget.markup = "" + end + end +end + +mpdarc:connect_signal("button::press", function(_, _, _, button) + if (button == 1) then awful.spawn(TOGGLE_MPD_CMD, false) -- left click + elseif (button == 2) then awful.spawn(STOP_MPD_CMD, false) + elseif (button == 3) then awful.spawn(PAUSE_MPD_CMD, false) + elseif (button == 4) then awful.spawn(NEXT_MPD_CMD, false) -- scroll up + elseif (button == 5) then awful.spawn(PREV_MPD_CMD, false) -- scroll down + end + + spawn.easy_async(GET_MPD_CMD, function(stdout, stderr, exitreason, exitcode) + update_graphic(mpdarc, stdout, stderr, exitreason, exitcode) + end) +end) + +local notification +local function show_MPD_status() + spawn.easy_async(GET_MPD_CMD, + function(stdout, _, _, _) + notification = naughty.notify { + text = stdout, + title = "MPD", + timeout = 5, + hover_timeout = 0.5, + width = 600, + } + end) +end + +mpdarc:connect_signal("mouse::enter", function() show_MPD_status() end) +mpdarc:connect_signal("mouse::leave", function() naughty.destroy(notification) end) + +watch(GET_MPD_CMD, 1, update_graphic, mpdarc) + +local mpdarc_widget = wibox.widget{ + mpdarc_icon_widget, + mpdarc_current_song_widget, + layout = wibox.layout.align.horizontal, + } +return mpdarc_widget diff --git a/.config/awesome/awesome-wm-widgets/mpris-widget/README.md b/.config/awesome/awesome-wm-widgets/mpris-widget/README.md new file mode 100755 index 0000000..7efad78 --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/mpris-widget/README.md @@ -0,0 +1,26 @@ +# MPRIS Widget (In progress) + +Music Player Info widget cy @mgabs + +# Prerequisite + +Install `playerctl` (mpris implementation), should be available in repo, e.g for Ubuntu: + +```bash +sudo apt-get install playerctl +``` + +## Installation + +To use this widget clone repo under **~/.config/awesome/** and then add it in **rc.lua**: + +```lua +local mpris_widget = require("awesome-wm-widgets.mpris-widget") +... +s.mytasklist, -- Middle widget + { -- Right widgets + layout = wibox.layout.fixed.horizontal, + ... + mpris_widget(), + ... +``` diff --git a/.config/awesome/awesome-wm-widgets/mpris-widget/init.lua b/.config/awesome/awesome-wm-widgets/mpris-widget/init.lua new file mode 100755 index 0000000..5e45ffa --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/mpris-widget/init.lua @@ -0,0 +1,187 @@ +------------------------------------------------- +-- mpris based Arc Widget for Awesome Window Manager +-- Modelled after Pavel Makhov's work +-- @author Mohammed Gaber +-- requires - playerctl +-- @copyright 2020 +------------------------------------------------- +local awful = require("awful") +local beautiful = require("beautiful") +local watch = require("awful.widget.watch") +local wibox = require("wibox") +local gears = require("gears") + +local GET_MPD_CMD = "playerctl -p %s -f '{{status}};{{xesam:artist}};{{xesam:title}}' metadata" + +local TOGGLE_MPD_CMD = "playerctl play-pause" +local NEXT_MPD_CMD = "playerctl next" +local PREV_MPD_CMD = "playerctl previous" +local LIST_PLAYERS_CMD = "playerctl -l" + +local PATH_TO_ICONS = "/usr/share/icons/Arc" +local PAUSE_ICON_NAME = PATH_TO_ICONS .. "/actions/24/player_pause.png" +local PLAY_ICON_NAME = PATH_TO_ICONS .. "/actions/24/player_play.png" +local STOP_ICON_NAME = PATH_TO_ICONS .. "/actions/24/player_stop.png" +local LIBRARY_ICON_NAME = PATH_TO_ICONS .. "/actions/24/music-library.png" + +local default_player = '' + +local icon = wibox.widget { + id = "icon", + widget = wibox.widget.imagebox, + image = PLAY_ICON_NAME +} + +local mpris_widget = wibox.widget{ + { + id = 'artist', + widget = wibox.widget.textbox + }, + { + icon, + max_value = 1, + value = 0, + thickness = 2, + start_angle = 4.71238898, -- 2pi*3/4 + forced_height = 24, + forced_width = 24, + rounded_edge = true, + bg = "#ffffff11", + paddings = 0, + widget = wibox.container.arcchart + }, + { + id = 'title', + widget = wibox.widget.textbox + }, + layout = wibox.layout.fixed.horizontal, + set_text = function(self, artist, title) + self:get_children_by_id('artist')[1]:set_text(artist) + self:get_children_by_id('title')[1]:set_text(title) + end +} + +local rows = { layout = wibox.layout.fixed.vertical } + +local popup = awful.popup{ + bg = beautiful.bg_normal, + ontop = true, + visible = false, + shape = gears.shape.rounded_rect, + border_width = 1, + border_color = beautiful.bg_focus, + maximum_width = 400, + offset = { y = 5 }, + widget = {} +} + +local function rebuild_popup() + awful.spawn.easy_async(LIST_PLAYERS_CMD, function(stdout, _, _, _) + for i = 0, #rows do rows[i]=nil end + for player_name in stdout:gmatch("[^\r\n]+") do + if player_name ~='' and player_name ~=nil then + + local checkbox = wibox.widget{ + { + checked = player_name == default_player, + color = beautiful.bg_normal, + paddings = 2, + shape = gears.shape.circle, + forced_width = 20, + forced_height = 20, + check_color = beautiful.fg_urgent, + widget = wibox.widget.checkbox + }, + valign = 'center', + layout = wibox.container.place, + } + + checkbox:connect_signal("button::press", function() + default_player = player_name + rebuild_popup() + end) + + table.insert(rows, wibox.widget { + { + { + checkbox, + { + { + text = player_name, + align = 'left', + widget = wibox.widget.textbox + }, + left = 10, + layout = wibox.container.margin + }, + spacing = 8, + layout = wibox.layout.align.horizontal + }, + margins = 4, + layout = wibox.container.margin + }, + bg = beautiful.bg_normal, + widget = wibox.container.background + }) + end + end + end) + + popup:setup(rows) +end + +local function worker() + + -- retrieve song info + local current_song, artist, player_status + + local update_graphic = function(widget, stdout, _, _, _) + local words = gears.string.split(stdout, ';') + player_status = words[1] + artist = words[2] + current_song = words[3] + if current_song ~= nil then + if string.len(current_song) > 18 then + current_song = string.sub(current_song, 0, 9) .. ".." + end + end + + if player_status == "Playing" then + icon.image = PLAY_ICON_NAME + widget.colors = {beautiful.widget_main_color} + widget:set_text(artist, current_song) + elseif player_status == "Paused" then + icon.image = PAUSE_ICON_NAME + widget.colors = {beautiful.widget_main_color} + widget:set_text(artist, current_song) + elseif player_status == "Stopped" then + icon.image = STOP_ICON_NAME + else -- no player is running + icon.image = LIBRARY_ICON_NAME + widget.colors = {beautiful.widget_red} + end + end + + mpris_widget:buttons( + awful.util.table.join( + awful.button({}, 3, function() + if popup.visible then + popup.visible = not popup.visible + else + rebuild_popup() + popup:move_next_to(mouse.current_widget_geometry) + end + end), + awful.button({}, 4, function() awful.spawn(NEXT_MPD_CMD, false) end), + awful.button({}, 5, function() awful.spawn(PREV_MPD_CMD, false) end), + awful.button({}, 1, function() awful.spawn(TOGGLE_MPD_CMD, false) end) + ) + ) + + watch(string.format(GET_MPD_CMD, "'" .. default_player .. "'"), 1, update_graphic, mpris_widget) + + return mpris_widget + +end + +return setmetatable(mpris_widget, {__call = function(_, ...) return worker(...) end}) diff --git a/.config/awesome/awesome-wm-widgets/net-speed-widget/README.md b/.config/awesome/awesome-wm-widgets/net-speed-widget/README.md new file mode 100755 index 0000000..a09893e --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/net-speed-widget/README.md @@ -0,0 +1,22 @@ +# Net Speed Widget + +The widget and readme is in progress + +## Installation + +Please refer to the [installation](https://github.com/streetturtle/awesome-wm-widgets#installation) section of the repo. + +Clone repo, include widget and use it in **rc.lua**: + +```lua +local net_speed_widget = require("awesome-wm-widgets.net-speed-widget.net-speed") +... +s.mytasklist, -- Middle widget + { -- Right widgets + layout = wibox.layout.fixed.horizontal, + ... + net_speed_widget(), + ... + } + ... +``` diff --git a/.config/awesome/awesome-wm-widgets/net-speed-widget/icons/down.svg b/.config/awesome/awesome-wm-widgets/net-speed-widget/icons/down.svg new file mode 100755 index 0000000..9a98f39 --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/net-speed-widget/icons/down.svg @@ -0,0 +1,10 @@ + + + + + + + + diff --git a/.config/awesome/awesome-wm-widgets/net-speed-widget/icons/up.svg b/.config/awesome/awesome-wm-widgets/net-speed-widget/icons/up.svg new file mode 100755 index 0000000..e3c12a7 --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/net-speed-widget/icons/up.svg @@ -0,0 +1,10 @@ + + + + + + + + diff --git a/.config/awesome/awesome-wm-widgets/net-speed-widget/net-speed.lua b/.config/awesome/awesome-wm-widgets/net-speed-widget/net-speed.lua new file mode 100755 index 0000000..6dd3b05 --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/net-speed-widget/net-speed.lua @@ -0,0 +1,126 @@ +------------------------------------------------- +-- Net Speed Widget for Awesome Window Manager +-- Shows current upload/download speed +-- More details could be found here: +-- https://github.com/streetturtle/awesome-wm-widgets/tree/master/net-speed-widget + +-- @author Pavel Makhov +-- @copyright 2020 Pavel Makhov +------------------------------------------------- + +local watch = require("awful.widget.watch") +local wibox = require("wibox") + +local HOME_DIR = os.getenv("HOME") +local WIDGET_DIR = HOME_DIR .. '/.config/awesome/awesome-wm-widgets/net-speed-widget/' +local ICONS_DIR = WIDGET_DIR .. 'icons/' + +local net_speed_widget = {} + +local function convert_to_h(bytes) + local speed + local dim + local bits = bytes * 8 + if bits < 1000 then + speed = bits + dim = 'b/s' + elseif bits < 1000000 then + speed = bits/1000 + dim = 'kb/s' + elseif bits < 1000000000 then + speed = bits/1000000 + dim = 'mb/s' + elseif bits < 1000000000000 then + speed = bits/1000000000 + dim = 'gb/s' + else + speed = tonumber(bits) + dim = 'b/s' + end + return math.floor(speed + 0.5) .. dim +end + +local function split(string_to_split, separator) + if separator == nil then separator = "%s" end + local t = {} + + for str in string.gmatch(string_to_split, "([^".. separator .."]+)") do + table.insert(t, str) + end + + return t +end + +local function worker(user_args) + + local args = user_args or {} + + local interface = args.interface or '*' + local timeout = args.timeout or 1 + local width = args.width or 55 + + net_speed_widget = wibox.widget { + { + id = 'rx_speed', + forced_width = width, + align = 'right', + widget = wibox.widget.textbox + }, + { + image = ICONS_DIR .. 'down.svg', + widget = wibox.widget.imagebox + }, + { + image = ICONS_DIR .. 'up.svg', + widget = wibox.widget.imagebox + }, + { + id = 'tx_speed', + forced_width = width, + align = 'left', + widget = wibox.widget.textbox + }, + layout = wibox.layout.fixed.horizontal, + set_rx_text = function(self, new_rx_speed) + self:get_children_by_id('rx_speed')[1]:set_text(tostring(new_rx_speed)) + end, + set_tx_text = function(self, new_tx_speed) + self:get_children_by_id('tx_speed')[1]:set_text(tostring(new_tx_speed)) + end + } + + -- make sure these are not shared across different worker/widgets (e.g. two monitors) + -- otherwise the speed will be randomly split among the worker in each monitor + local prev_rx = 0 + local prev_tx = 0 + + local update_widget = function(widget, stdout) + + local cur_vals = split(stdout, '\r\n') + + local cur_rx = 0 + local cur_tx = 0 + + for i, v in ipairs(cur_vals) do + if i%2 == 1 then cur_rx = cur_rx + v end + if i%2 == 0 then cur_tx = cur_tx + v end + end + + local speed_rx = (cur_rx - prev_rx) / timeout + local speed_tx = (cur_tx - prev_tx) / timeout + + widget:set_rx_text(convert_to_h(speed_rx)) + widget:set_tx_text(convert_to_h(speed_tx)) + + prev_rx = cur_rx + prev_tx = cur_tx + end + + watch(string.format([[bash -c "cat /sys/class/net/%s/statistics/*_bytes"]], interface), + timeout, update_widget, net_speed_widget) + + return net_speed_widget + +end + +return setmetatable(net_speed_widget, { __call = function(_, ...) return worker(...) end }) diff --git a/.config/awesome/awesome-wm-widgets/pomodoroarc-widget/README.md b/.config/awesome/awesome-wm-widgets/pomodoroarc-widget/README.md new file mode 100755 index 0000000..49b1b2c --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/pomodoroarc-widget/README.md @@ -0,0 +1,16 @@ +# Pomodoro Widget + +:construction: This widget is under construction :construction_worker: + +## Installation + +This widget is based on [@jsspencer](https://github.com/jsspencer)' [pomo](https://github.com/jsspencer/pomo) - a simple pomodoro timer. +So first install/clone it anywhere you like, then either + - in widget's code provide path to the pomo.sh, or + - add pomo.sh to the PATH, or + - make a soft link in /usr/local/bin/ to it: + ```bash + sudo ln -sf /opt/pomodoro/pomo.sh /usr/local/bin/pomo + ``` + +Note that by default widget's code expects third way and calls script by `pomo`. \ No newline at end of file diff --git a/.config/awesome/awesome-wm-widgets/pomodoroarc-widget/pomodoroarc.lua b/.config/awesome/awesome-wm-widgets/pomodoroarc-widget/pomodoroarc.lua new file mode 100755 index 0000000..497a208 --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/pomodoroarc-widget/pomodoroarc.lua @@ -0,0 +1,135 @@ +------------------------------------------------- +-- Pomodoro Arc Widget for Awesome Window Manager +-- Modelled after Pavel Makhov's work + +-- @author Raphaël Fournier-S'niehotta +-- @copyright 2018 Raphaël Fournier-S'niehotta +------------------------------------------------- + +local awful = require("awful") +local beautiful = require("beautiful") +local spawn = require("awful.spawn") +local watch = require("awful.widget.watch") +local wibox = require("wibox") +local naughty = require("naughty") + +local GET_pomodoro_CMD = "pomo clock" +local PAUSE_pomodoro_CMD = "pomo pause" +local START_pomodoro_CMD = "pomo start" +local STOP_pomodoro_CMD = "pomo stop" + +local text = wibox.widget { + id = "txt", + --font = "Play 12", +font = "Inconsolata Medium 13", + widget = wibox.widget.textbox +} +-- mirror the text, because the whole widget will be mirrored after +local mirrored_text = wibox.container.margin(wibox.container.mirror(text, { horizontal = true })) +mirrored_text.right = 5 -- pour centrer le texte dans le rond +-- +--local mirrored_text = wibox.container.mirror(text, { horizontal = true }) + +-- mirrored text with background +local mirrored_text_with_background = wibox.container.background(mirrored_text) + +local pomodoroarc = wibox.widget { + mirrored_text_with_background, + max_value = 1, + thickness = 2, + start_angle = 4.71238898, -- 2pi*3/4 + forced_height = 32, + forced_width = 32, + rounded_edge = true, + bg = "#ffffff11", + paddings = 0, + widget = wibox.container.arcchart +} + +local pomodoroarc_widget = wibox.container.mirror(pomodoroarc, { horizontal = true }) + +local update_graphic = function(widget, stdout, _, _, _) + local pomostatus = string.match(stdout, " (%D?%D?):%D?%D?") + if pomostatus == "--" then +text.font = "Inconsolata Medium 13" + widget.colors = { beautiful.widget_main_color } + text.text = "25" + widget.value = 1 + else +text.font = "Inconsolata Medium 13" + local pomomin = string.match(stdout, "[ P]?[BW](%d?%d?):%d?%d?") + local pomosec = string.match(stdout, "[ P]?[BW]%d?%d?:(%d?%d?)") + local pomodoro = pomomin * 60 + pomosec + + local status = string.match(stdout, "([ P]?)[BW]%d?%d?:%d?%d?") + local workbreak = string.match(stdout, "[ P]?([BW])%d?%d?:%d?%d?") + text.text = pomomin + +-- Helps debugging + --naughty.notify { + --text = pomomin, + --title = "pomodoro debug", + --timeout = 5, + --hover_timeout = 0.5, + --width = 200, + --} + + if status == " " then -- clock ticking + if workbreak == "W" then + widget.value = tonumber(pomodoro/(25*60)) + if tonumber(pomomin) < 5 then -- last 5 min of pomo + widget.colors = { beautiful.widget_red } + else + widget.colors = { beautiful.widget_blue } + end + elseif workbreak == "B" then -- color during pause + widget.colors = { beautiful.widget_green } + widget.value = tonumber(pomodoro/(5*60)) + end + elseif status == "P" then -- paused + if workbreak == "W" then + widget.colors = { beautiful.widget_yellow } + widget.value = tonumber(pomodoro/(25*60)) +text.font = "Inconsolata Medium 13" + text.text = "PW" + elseif workbreak == "B" then + widget.colors = { beautiful.widget_yellow } + widget.value = tonumber(pomodoro/(5*60)) +text.font = "Inconsolata Medium 13" + text.text = "PB" + end + end + end +end + +pomodoroarc:connect_signal("button::press", function(_, _, _, button) + if (button == 2) then awful.spawn(PAUSE_pomodoro_CMD, false) + elseif (button == 1) then awful.spawn(START_pomodoro_CMD, false) + elseif (button == 3) then awful.spawn(STOP_pomodoro_CMD, false) + end + + spawn.easy_async(GET_pomodoro_CMD, function(stdout, stderr, exitreason, exitcode) + update_graphic(pomodoroarc, stdout, stderr, exitreason, exitcode) + end) +end) + +local notification +local function show_pomodoro_status() + spawn.easy_async(GET_pomodoro_CMD, + function(stdout, _, _, _) + notification = naughty.notify { + text = stdout, + title = "pomodoro status", + timeout = 5, + hover_timeout = 0.5, + width = 200, + } + end) +end + +pomodoroarc:connect_signal("mouse::enter", function() show_pomodoro_status() end) +pomodoroarc:connect_signal("mouse::leave", function() naughty.destroy(notification) end) + +watch(GET_pomodoro_CMD, 1, update_graphic, pomodoroarc) + +return pomodoroarc_widget diff --git a/.config/awesome/awesome-wm-widgets/ram-widget/README.md b/.config/awesome/awesome-wm-widgets/ram-widget/README.md new file mode 100755 index 0000000..568245b --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/ram-widget/README.md @@ -0,0 +1,41 @@ +# Ram widget + +This widget shows the RAM usage. When clicked another widget appears with more detailed information: + +![screenshot](./out.gif) + +Note: this widget is compatible with Awesome v4.3+, as it is using [awful.popup](https://awesomewm.org/doc/api/classes/awful.popup.html) + +## Customization + +It is possible to customize widget by providing a table with all or some of the following config parameters: + +| Name | Default | Description | +|---|---|---| +| `color_used` | `beautiful.bg_urgent` | Color for used RAM | +| `color_free` | `beautiful.fg_normal` | Color for free RAM | +| `color_buf` | `beautiful.border_color_active` | Color for buffers/cache | +| `widget_height` | `25` | Height of the widget | +| `widget_width` | `25` | Width of the widget | +| `widget_show_buf` | `false` | Whether to display buffers/cache separately in the tray widget. If `false`, buffers/cache are considered free RAM. | +| `timeout` | 1 | How often (in seconds) the widget refreshes | + +## Installation + +Please refer to the [installation](https://github.com/streetturtle/awesome-wm-widgets#installation) section of the repo. + +Clone repo, include widget and use it in **rc.lua**: + +```lua +local ram_widget = require("awesome-wm-widgets.ram-widget.ram-widget") +... +s.mytasklist, -- Middle widget + { -- Right widgets + layout = wibox.layout.fixed.horizontal, + ... + ram_widget(), + ... + } + ... +``` + diff --git a/.config/awesome/awesome-wm-widgets/ram-widget/out.gif b/.config/awesome/awesome-wm-widgets/ram-widget/out.gif new file mode 100755 index 0000000..736f894 Binary files /dev/null and b/.config/awesome/awesome-wm-widgets/ram-widget/out.gif differ diff --git a/.config/awesome/awesome-wm-widgets/ram-widget/ram-widget.lua b/.config/awesome/awesome-wm-widgets/ram-widget/ram-widget.lua new file mode 100755 index 0000000..867d28e --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/ram-widget/ram-widget.lua @@ -0,0 +1,108 @@ +local awful = require("awful") +local beautiful = require("beautiful") +local gears = require("gears") +local watch = require("awful.widget.watch") +local wibox = require("wibox") + + +local ramgraph_widget = {} + + +local function worker(user_args) + local args = user_args or {} + local timeout = args.timeout or 1 + local color_used = args.color_used or beautiful.bg_urgent + local color_free = args.color_free or beautiful.fg_normal + local color_buf = args.color_buf or beautiful.border_color_active + local widget_show_buf = args.widget_show_buf or false + local widget_height = args.widget_height or 25 + local widget_width = args.widget_width or 25 + + --- Main ram widget shown on wibar + ramgraph_widget = wibox.widget { + border_width = 0, + colors = { + color_used, + color_free, + color_buf, + }, + display_labels = false, + forced_height = widget_height, + forced_width = widget_width, + widget = wibox.widget.piechart + } + + --- Widget which is shown when user clicks on the ram widget + local popup = awful.popup{ + ontop = true, + visible = false, + widget = { + widget = wibox.widget.piechart, + forced_height = 200, + forced_width = 400, + colors = { + color_used, + color_free, + color_buf, -- buf_cache + }, + }, + shape = gears.shape.rounded_rect, + border_color = beautiful.border_color_active, + border_width = 1, + offset = { y = 5 }, + } + + --luacheck:ignore 231 + local total, used, free, shared, buff_cache, available, total_swap, used_swap, free_swap + + local function getPercentage(value) + return math.floor(value / (total+total_swap) * 100 + 0.5) .. '%' + end + + watch('bash -c "LANGUAGE=en_US.UTF-8 free | grep -z Mem.*Swap.*"', timeout, + function(widget, stdout) + total, used, free, shared, buff_cache, available, total_swap, used_swap, free_swap = + stdout:match('(%d+)%s*(%d+)%s*(%d+)%s*(%d+)%s*(%d+)%s*(%d+)%s*Swap:%s*(%d+)%s*(%d+)%s*(%d+)') + + if widget_show_buf then + widget.data = { used, free, buff_cache } + else + widget.data = { used, total-used } + end + + if popup.visible then + popup:get_widget().data_list = { + {'used ' .. getPercentage(used + used_swap), used + used_swap}, + {'free ' .. getPercentage(free + free_swap), free + free_swap}, + {'buff_cache ' .. getPercentage(buff_cache), buff_cache} + } + end + end, + ramgraph_widget + ) + + ramgraph_widget:buttons( + awful.util.table.join( + awful.button({}, 1, function() + popup:get_widget().data_list = { + {'used ' .. getPercentage(used + used_swap), used + used_swap}, + {'free ' .. getPercentage(free + free_swap), free + free_swap}, + {'buff_cache ' .. getPercentage(buff_cache), buff_cache} + } + + if popup.visible then + popup.visible = not popup.visible + else + popup:move_next_to(mouse.current_widget_geometry) + end + end) + ) + ) + + return ramgraph_widget +end + + +return setmetatable(ramgraph_widget, { __call = function(_, ...) + return worker(...) +end }) diff --git a/.config/awesome/awesome-wm-widgets/run-shell-2/run-shell-2.lua b/.config/awesome/awesome-wm-widgets/run-shell-2/run-shell-2.lua new file mode 100755 index 0000000..89491de --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/run-shell-2/run-shell-2.lua @@ -0,0 +1,102 @@ +------------------------------------------------- +-- Spotify Shell for Awesome Window Manager +-- Simplifies interaction with Spotify for Linux +-- More details could be found here: +-- https://github.com/streetturtle/awesome-wm-widgets/tree/master/spotify-shell + +-- @author Pavel Makhov +-- @copyright 2018 Pavel Makhov +------------------------------------------------- + +local awful = require("awful") +local gfs = require("gears.filesystem") +local wibox = require("wibox") +local gears = require("gears") +local completion = require("awful.completion") + +local run = require("awesome-wm-widgets.run-shell-2.run") + +local run_shell = awful.widget.prompt() + +local w = wibox { + bg = '#2e3440', + border_width = 1, + border_color = '#3b4252', + max_widget_size = 500, + ontop = true, + height = 50, + width = 250, + shape = function(cr, width, height) + gears.shape.rounded_rect(cr, width, height, 3) + -- ` gears.shape.infobubble(cr, width, height) + end +} + +local g = { + { + layout = wibox.container.margin, + left = 10, + run_shell, + }, + id = 'left', + layout = wibox.layout.fixed.horizontal +} + + +local function launch(type) + + if type == 'run' then + table.insert(g, 1, run.icon) + w:setup(g) + awful.placement.top(w, { margins = { top = 40 }, parent = awful.screen.focused() }) + w.visible = true + awful.prompt.run { + prompt = run.text, + bg_cursor = run.cursor_color, + textbox = run_shell.widget, + completion_callback = completion.shell, + exe_callback = function(...) + run_shell:spawn_and_handle_error(...) + end, + history_path = gfs.get_cache_dir() .. run.history, + done_callback = function() + w.visible = false + table.remove(g, 1) + end + } + elseif type == 'spotify' then + table.insert(g, 1, { + { + image = '/usr/share/icons/Papirus-Light/32x32/apps/spotify-linux-48x48.svg', + widget = wibox.widget.imagebox, + resize = false + }, + id = 'icon', + top = 9, + left = 10, + layout = wibox.container.margin + }) + w:setup(g) + awful.placement.top(w, { margins = { top = 40 }, parent = awful.screen.focused() }) + w.visible = true + + awful.prompt.run { + prompt = "Spotify Shell: ", + bg_cursor = '#84bd00', + textbox = run_shell.widget, + history_path = gfs.get_dir('cache') .. '/spotify_history', + exe_callback = function(input_text) + if not input_text or #input_text == 0 then return end + awful.spawn("sp " .. input_text) + end, + done_callback = function() + w.visible = false + table.remove(g, 1) + end + } + end +end + +return { + launch = launch +} diff --git a/.config/awesome/awesome-wm-widgets/run-shell-2/run.lua b/.config/awesome/awesome-wm-widgets/run-shell-2/run.lua new file mode 100755 index 0000000..12644ba --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/run-shell-2/run.lua @@ -0,0 +1,21 @@ +local wibox = require("wibox") + +local icon = { + { + markup = 'a', + widget = wibox.widget.textbox, + }, + id = 'icon', + top = 2, + left = 10, + layout = wibox.container.margin +} + +local text = 'Run: ' + +return { + icon = icon, + text = text, + cursor_color = '#74aeab', + history = '/history' +} \ No newline at end of file diff --git a/.config/awesome/awesome-wm-widgets/run-shell-3/README.md b/.config/awesome/awesome-wm-widgets/run-shell-3/README.md new file mode 100755 index 0000000..95749d1 --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/run-shell-3/README.md @@ -0,0 +1,34 @@ +# Run Shell + +Blurs / pixelates background and shows widget with run prompt: + +![screenshot](./blur.png) + +![screenshot](./pixelate.png) + +## Installation + +1. To blur / pixelate the background this widget used [ffmpeg](https://www.ffmpeg.org/) and [frei0r](https://frei0r.dyne.org/) plugins (if you want to pixelate the background), which you need to install. Installation of those depends on your distribution, for ffmpeg just follow the installation section of the site, for frei0r I was able to install it by simply running + + ``` + sudo apt-get install frei0r-plugins + ``` + +1. Clone this repo under **~/.config/awesome/**: + + ```bash + git clone https://github.com/streetturtle/awesome-wm-widgets.git ~/.config/awesome/awesome-wm-widgets + ``` + +1. Require widget at the beginning of **rc.lua**: + + ```lua + local run_shell = require("awesome-wm-widgets.run-shell-3.run-shell") + ``` + +1. Use it (don't forget to comment out the default prompt): + + ```lua + awful.key({modkey}, "r", function () run_shell.launch() end), + ``` +:warning: I am not 100% sure but it may (memory) leak. If awesome uses lots of RAM just reload config (Ctrl + Mod4 + r). diff --git a/.config/awesome/awesome-wm-widgets/run-shell-3/blur.png b/.config/awesome/awesome-wm-widgets/run-shell-3/blur.png new file mode 100755 index 0000000..4e8b54c Binary files /dev/null and b/.config/awesome/awesome-wm-widgets/run-shell-3/blur.png differ diff --git a/.config/awesome/awesome-wm-widgets/run-shell-3/pixelate.png b/.config/awesome/awesome-wm-widgets/run-shell-3/pixelate.png new file mode 100755 index 0000000..fedf320 Binary files /dev/null and b/.config/awesome/awesome-wm-widgets/run-shell-3/pixelate.png differ diff --git a/.config/awesome/awesome-wm-widgets/run-shell-3/run-shell.lua b/.config/awesome/awesome-wm-widgets/run-shell-3/run-shell.lua new file mode 100755 index 0000000..0015232 --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/run-shell-3/run-shell.lua @@ -0,0 +1,129 @@ +------------------------------------------------- +-- Run Shell for Awesome Window Manager +-- More details could be found here: +-- https://github.com/streetturtle/awesome-wm-widgets/tree/master/run-shell + +-- @author Pavel Makhov +-- @copyright 2018 Pavel Makhov +-- @copyright 2019 Pavel Makhov +------------------------------------------------- + +local awful = require("awful") +local gfs = require("gears.filesystem") +local wibox = require("wibox") +local gears = require("gears") +local naughty = require("naughty") +local completion = require("awful.completion") + +local run_shell = awful.widget.prompt() + +local widget = {} + +function widget.new() + local widget_instance = { + _cached_wiboxes = {}, + _cmd_pixelate = [[sh -c 'ffmpeg -loglevel panic -f x11grab -video_size 1920x1060 -y -i :0.0+%s,20 -vf ]] + .. [[frei0r=pixeliz0r -vframes 1 /tmp/i3lock-%s.png ; echo done']], + _cmd_blur = [[sh -c 'ffmpeg -loglevel panic -f x11grab -video_size 1920x1060 -y -i :0.0+%s,20 ]] + .. [[-filter_complex "boxblur=9" -vframes 1 /tmp/i3lock-%s.png ; echo done']] + } + + function widget_instance:_create_wibox() + local w = wibox { + visible = false, + ontop = true, + height = mouse.screen.geometry.height, + width = mouse.screen.geometry.width, + } + + w:setup { + { + { + { + { + markup = 'a', + widget = wibox.widget.textbox, + }, + id = 'icon', + left = 10, + layout = wibox.container.margin + }, + { + run_shell, + left = 10, + layout = wibox.container.margin, + }, + id = 'left', + layout = wibox.layout.fixed.horizontal + }, + widget = wibox.container.background, + bg = '#333333', + shape = function(cr, width, height) + gears.shape.rounded_rect(cr, width, height, 3) + end, + shape_border_color = '#74aeab', + shape_border_width = 1, + forced_width = 200, + forced_height = 50 + }, + layout = wibox.container.place + } + + return w + end + + function widget_instance:launch() + local s = mouse.screen + if not self._cached_wiboxes[s] then + self._cached_wiboxes[s] = {} + end + if not self._cached_wiboxes[s][1] then + self._cached_wiboxes[s][1] = self:_create_wibox() + end + local w = self._cached_wiboxes[s][1] + local rnd = math.random() + awful.spawn.with_line_callback( + string.format(self._cmd_blur, tostring(awful.screen.focused().geometry.x), rnd), { + stdout = function() + w.visible = true + w.bgimage = '/tmp/i3lock-' .. rnd ..'.png' + awful.placement.top(w, { margins = { top = 20 }, parent = awful.screen.focused() }) + awful.prompt.run { + prompt = 'Run: ', + bg_cursor = '#74aeab', + textbox = run_shell.widget, + completion_callback = completion.shell, + exe_callback = function(...) + run_shell:spawn_and_handle_error(...) + end, + history_path = gfs.get_cache_dir() .. "/history", + done_callback = function() + w.visible = false + w.bgimage = '' + awful.spawn([[bash -c 'rm -f /tmp/i3lock*']]) + end + } + end, + stderr = function(line) + naughty.notify { text = "ERR:" .. line } + end, + }) + + end + + return widget_instance +end + +local function get_default_widget() + if not widget.default_widget then + widget.default_widget = widget.new() + end + return widget.default_widget +end + +function widget.launch(...) + return get_default_widget():launch(...) +end + +return widget + diff --git a/.config/awesome/awesome-wm-widgets/run-shell/README.md b/.config/awesome/awesome-wm-widgets/run-shell/README.md new file mode 100755 index 0000000..9ae7f5d --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/run-shell/README.md @@ -0,0 +1,25 @@ +# Run Shell + +Run prompt which is put inside a widget: + +[Demo](https://imgur.com/ohjAuCQ.mp4) + +## Installation + +1. Clone this repo under **~/.config/awesome/**: + + ```bash + git clone https://github.com/streetturtle/awesome-wm-widgets.git ~/.config/awesome/awesome-wm-widgets + ``` + +1. Require widget at the beginning of **rc.lua**: + + ```lua + local run_shell = require("awesome-wm-widgets.run-shell.run-shell") + ``` + +1. Use it (don't forget to comment out the default prompt): + + ```lua + awful.key({modkey}, "r", function () run_shell.launch() end), + diff --git a/.config/awesome/awesome-wm-widgets/run-shell/out.mp4 b/.config/awesome/awesome-wm-widgets/run-shell/out.mp4 new file mode 100755 index 0000000..5db8172 Binary files /dev/null and b/.config/awesome/awesome-wm-widgets/run-shell/out.mp4 differ diff --git a/.config/awesome/awesome-wm-widgets/run-shell/run-shell.lua b/.config/awesome/awesome-wm-widgets/run-shell/run-shell.lua new file mode 100755 index 0000000..a43c4d5 --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/run-shell/run-shell.lua @@ -0,0 +1,169 @@ +------------------------------------------------- +-- Run Shell for Awesome Window Manager +-- More details could be found here: +-- https://github.com/streetturtle/awesome-wm-widgets/tree/master/run-shell + +-- @author Pavel Makhov +-- @copyright 2019 Pavel Makhov +------------------------------------------------- + +local awful = require("awful") +local gfs = require("gears.filesystem") +local wibox = require("wibox") +local gears = require("gears") +local completion = require("awful.completion") +local naughty = require("naughty") + +local HOME = os.getenv("HOME") + +local run_shell = awful.widget.prompt() + +local widget = {} + +function widget.new() + + local widget_instance = { + _cached_wiboxes = {} + } + + function widget_instance:_create_wibox() + local w = wibox { + visible = false, + ontop = true, + height = mouse.screen.geometry.height, + width = mouse.screen.geometry.width, + opacity = 0.9, + bg = 'radial:'.. mouse.screen.geometry.width/2 .. ',' + .. mouse.screen.geometry.height/2 .. ',20:' + .. mouse.screen.geometry.width/2 .. ',' + .. mouse.screen.geometry.height/2 + .. ',700:0,#2E344022:0.2,#4C566A88:1,#2E3440ff' + } + + local suspend_button = wibox.widget { + image = '/usr/share/icons/Arc/actions/symbolic/system-shutdown-symbolic.svg', + widget = wibox.widget.imagebox, + resize = false, + opacity = 0.2, + --luacheck:ignore 432 + set_hover = function(self, opacity) + self.opacity = opacity + self.image = '/usr/share/icons/Arc/actions/symbolic/system-shutdown-symbolic.svg' + end + } + + local turnoff_notification + + suspend_button:connect_signal("mouse::enter", function() + turnoff_notification = naughty.notify{ + icon = HOME .. "/.config/awesome/nichosi.png", + icon_size=100, + title = "Huston, we have a problem", + text = "You're about to turn off your computer", + timeout = 5, hover_timeout = 0.5, + position = "bottom_right", + bg = "#F06060", + fg = "#EEE9EF", + width = 300, + } + suspend_button:set_hover(1) + end) + + suspend_button:connect_signal("mouse::leave", function() + naughty.destroy(turnoff_notification) + suspend_button:set_hover(0.2) + end) + + suspend_button:connect_signal("button::press", function(_,_,_,button) + if (button == 1) then + awful.spawn("shutdown now") + end + end) + + w:setup { + { + { + { + { + { + markup = 'a', + widget = wibox.widget.textbox, + }, + id = 'icon', + left = 10, + layout = wibox.container.margin + }, + { + run_shell, + left = 10, + layout = wibox.container.margin, + }, + id = 'left', + layout = wibox.layout.fixed.horizontal + }, + bg = '#333333', + shape = function(cr, width, height) + gears.shape.rounded_rect(cr, width, height, 3) + end, + shape_border_color = '#74aeab', + shape_border_width = 1, + forced_width = 200, + forced_height = 50, + widget = wibox.container.background + }, + valign = 'center', + layout = wibox.container.place + }, + { + { + suspend_button, + layout = wibox.layout.fixed.horizontal + }, + valign = 'bottom', + layout = wibox.container.place, + }, + layout = wibox.layout.stack + } + + return w + end + + function widget_instance:launch() + local s = mouse.screen + if not self._cached_wiboxes[s] then + self._cached_wiboxes[s] = {} + end + if not self._cached_wiboxes[s][1] then + self._cached_wiboxes[s][1] = self:_create_wibox() + end + local w = self._cached_wiboxes[s][1] + w.visible = true + awful.placement.top(w, { margins = { top = 20 }, parent = awful.screen.focused() }) + awful.prompt.run { + prompt = 'Run: ', + bg_cursor = '#74aeab', + textbox = run_shell.widget, + completion_callback = completion.shell, + exe_callback = function(...) + run_shell:spawn_and_handle_error(...) + end, + history_path = gfs.get_cache_dir() .. "/history", + done_callback = function() w.visible = false end + } + end + + return widget_instance +end + +local function get_default_widget() + if not widget.default_widget then + widget.default_widget = widget.new() + end + return widget.default_widget +end + +function widget.launch(...) + return get_default_widget():launch(...) +end + +return widget diff --git a/.config/awesome/awesome-wm-widgets/screenshot.png b/.config/awesome/awesome-wm-widgets/screenshot.png new file mode 100755 index 0000000..9406ebf Binary files /dev/null and b/.config/awesome/awesome-wm-widgets/screenshot.png differ diff --git a/.config/awesome/awesome-wm-widgets/screenshot_with_sprtrs.png b/.config/awesome/awesome-wm-widgets/screenshot_with_sprtrs.png new file mode 100755 index 0000000..361d5a2 Binary files /dev/null and b/.config/awesome/awesome-wm-widgets/screenshot_with_sprtrs.png differ diff --git a/.config/awesome/awesome-wm-widgets/scripts/update_site.sh b/.config/awesome/awesome-wm-widgets/scripts/update_site.sh new file mode 100755 index 0000000..35fc971 --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/scripts/update_site.sh @@ -0,0 +1,14 @@ +mkdir ./_widgets +for D in *; do + if [[ -d "${D}" ]] && [[ ${D} == *"-widget"* ]]; then + echo "${D}" + cp ${D}/README.md ./_widgets/${D}.md + sed -i '1s/^/---\nlayout: page\n---\n/' ./_widgets/${D}.md + + mkdir -p ./assets/img/widgets/screenshots/${D} + + find ${D}/ \( -name '*.jpg' -o -name '*.png' -o -name '*.gif' \) -exec cp '{}' ./assets/img/widgets/screenshots/${D} \; + + sed -i "s/](\.\(\/screenshots\)\{0,1\}/](..\/awesome-wm-widgets\/assets\/img\/widgets\/screenshots\/$D/g" ./_widgets/${D}.md + fi +done diff --git a/.config/awesome/awesome-wm-widgets/spotify-shell/README.md b/.config/awesome/awesome-wm-widgets/spotify-shell/README.md new file mode 100755 index 0000000..0f4981d --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/spotify-shell/README.md @@ -0,0 +1,73 @@ +# Spotify Shell + + +![demo](./demo.gif) + +## Features + +1. Supports following commands (same as `sp` client): + - `play`/`pause`/`next`; + - any other string will start a search and play the first result for a given search query; + - feh - shows the current artwork with `feh`; + +1. Stores history and allows navigating through it; + +1. Highly customizable + +## Controls + +Keyboard navigation (copied from [`awful.prompt`](https://awesomewm.org/doc/api/libraries/awful.prompt.html) API documentation page): + +| Name | Usage | +|---|---| +| CTRL+A | beginning-of-line | +| CTRL+B | backward-char | +| CTRL+C | cancel | +| CTRL+D | delete-char | +| CTRL+E | end-of-line | +| CTRL+J | accept-line | +| CTRL+M | accept-line | +| CTRL+F | move-cursor-right | +| CTRL+H | backward-delete-char | +| CTRL+K | kill-line | +| CTRL+U | unix-line-discard | +| CTRL+W | unix-word-rubout | +| CTRL+BACKSPACE | unix-word-rubout | +| SHIFT+INSERT | paste | +| HOME | beginning-of-line | +| END | end-of-line | +| CTRL+R | reverse history search, matches any history entry containing search term. | +| CTRL+S | forward history search, matches any history entry containing search term. | +| CTRL+UP | ZSH up line or search, matches any history entry starting with search term. | +| CTRL+DOWN | ZSH down line or search, matches any history entry starting with search term. | +| CTRL+DELETE | delete the currently visible history entry from history file. This does not delete new commands or history entries under user editing. | + + +## Installation + +1. Install [sp](https://gist.github.com/streetturtle/fa6258f3ff7b17747ee3) - CLI client for [Spotify for Linux](https://www.spotify.com/ca-en/download/linux/): + + ```bash + $ sudo git clone https://gist.github.com/fa6258f3ff7b17747ee3.git ~/dev/ + $ sudo ln -s ~/dev/sp /usr/local/bin/ + ``` + + Check if it works by running `sp help`. + +1. Get an 'id' and 'secret' from [developer.spotify.com](https://beta.developer.spotify.com/documentation/general/guides/app-settings/) and paste it in the header of the `sp` (`SP_ID` and `SP_SECRET`) - this enables search feature. + +1. Clone this repo under **~/.config/awesome/** + +1. Require spotify-shell at the beginning of **rc.lua**: + + ```lua + local spotify_shell = require("awesome-wm-widgets.spotify-shell.spotify-shell") + ``` + +1. Add a shortcut which will show Spotify Shell widget: + + ```lua + awful.key({ modkey, }, "d", function () spotify_shell.launch() end, {description = "spotify shell", group = "music"}), + ``` + +1. It uses icon from [Papirus Icon Theme](https://github.com/PapirusDevelopmentTeam/papirus-icon-theme). So you should either install this icon theme, or download an icon you want to use and provide path to it in **spotify-shell.lua**. diff --git a/.config/awesome/awesome-wm-widgets/spotify-shell/demo.gif b/.config/awesome/awesome-wm-widgets/spotify-shell/demo.gif new file mode 100755 index 0000000..6696b3a Binary files /dev/null and b/.config/awesome/awesome-wm-widgets/spotify-shell/demo.gif differ diff --git a/.config/awesome/awesome-wm-widgets/spotify-shell/spotify-shell.lua b/.config/awesome/awesome-wm-widgets/spotify-shell/spotify-shell.lua new file mode 100755 index 0000000..0611e66 --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/spotify-shell/spotify-shell.lua @@ -0,0 +1,75 @@ +------------------------------------------------- +-- Spotify Shell for Awesome Window Manager +-- Simplifies interaction with Spotify for Linux +-- More details could be found here: +-- https://github.com/streetturtle/awesome-wm-widgets/tree/master/spotify-shell + +-- @author Pavel Makhov +-- @copyright 2018 Pavel Makhov +------------------------------------------------- + +local awful = require("awful") +local gfs = require("gears.filesystem") +local wibox = require("wibox") +local gears = require("gears") + +local ICON = '/usr/share/icons/Papirus-Light/32x32/apps/spotify-linux-48x48.svg' + +local spotify_shell = awful.widget.prompt() + +local w = wibox { + bg = '#1e252c', + border_width = 1, + border_color = '#84bd00', + max_widget_size = 500, + ontop = true, + height = 50, + width = 250, + shape = function(cr, width, height) + gears.shape.rounded_rect(cr, width, height, 3) + end +} + +w:setup { + { + { + image = ICON, + widget = wibox.widget.imagebox, + resize = false + }, + id = 'icon', + top = 9, + left = 10, + layout = wibox.container.margin + }, + { + layout = wibox.container.margin, + left = 10, + spotify_shell, + }, + id = 'left', + layout = wibox.layout.fixed.horizontal +} + +local function launch() + w.visible = true + + awful.placement.top(w, { margins = {top = 40}, parent = awful.screen.focused()}) + awful.prompt.run{ + prompt = "Spotify Shell: ", + bg_cursor = '#84bd00', + textbox = spotify_shell.widget, + history_path = gfs.get_dir('cache') .. '/spotify_history', + exe_callback = function(input_text) + if not input_text or #input_text == 0 then return end + awful.spawn("sp " .. input_text) + end, + done_callback = function() + w.visible = false + end + } +end + +return { + launch = launch +} diff --git a/.config/awesome/awesome-wm-widgets/spotify-widget/README.md b/.config/awesome/awesome-wm-widgets/spotify-widget/README.md new file mode 100755 index 0000000..3a7b8d7 --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/spotify-widget/README.md @@ -0,0 +1,95 @@ +# Spotify widget + +This widget displays currently playing song on [Spotify for Linux](https://www.spotify.com/download/linux/) client: ![screenshot](./spo-wid-1.png) + +Some features: + + - status icon which shows if music is currently playing + - artist and name of the current song + - dim widget if spotify is paused + - trim long artist/song names + - tooltip with more info about the song + +## Controls + + - left click - play/pause + - scroll up - play next song + - scroll down - play previous song + +## Dependencies + +Note that widget uses the Arc icon theme, so it should be [installed](https://github.com/horst3180/arc-icon-theme#installation) first under **/usr/share/icons/Arc/** folder. + +## Customization + +It is possible to customize widget by providing a table with all or some of the following config parameters: + +| Name | Default | Description | +|---|---|---| +| `play_icon` | `/usr/share/icons/Arc/actions/24/player_play.png` | Play icon | +| `pause_icon` | `/usr/share/icons/Arc/actions/24/player_pause.png` | Pause icon | +| `font` | `Play 9`| Font | +| `dim_when_paused` | `false` | Decrease the widget opacity if spotify is paused | +| `dim_opacity` | `0.2` | Widget's opacity when dimmed, `dim_when_paused` should be set to `true` | +| `max_length` | `15` | Maximum lentgh of artist and title names. Text will be ellipsized if longer. | +| `show_tooltip` | `true` | Show tooltip on hover with information about the playing song | +| `timeout` | 1 | How often in seconds the widget refreshes | +| `sp_bin` | `sp` | Path to the `sp` binary. Required if `sp` is not in environment PATH. | + + +### Example: + +```lua +spotify_widget({ + font = 'Ubuntu Mono 9', + play_icon = '/usr/share/icons/Papirus-Light/24x24/categories/spotify.svg', + pause_icon = '/usr/share/icons/Papirus-Dark/24x24/panel/spotify-indicator.svg', + dim_when_paused = true, + dim_opacity = 0.5, + max_length = -1, + show_tooltip = false, + sp_bin = gears.filesystem.get_configuration_dir() .. 'scripts/sp' +}) +``` + +Gives following widget + +Playing: +![screenshot](./spotify-widget-custom-playing.png) + +Paused: +![screenshot](./spotify-widget-custom-paused.png) + +## Installation + +First you need to have spotify CLI installed, it uses dbus to communicate with spotify-client: + +```bash +git clone https://gist.github.com/fa6258f3ff7b17747ee3.git +cd ./fa6258f3ff7b17747ee3 +chmod +x sp +# This widget will work by default if the binary is in the system PATH +sudo cp ./sp /usr/local/bin/ +# Alternatively, you may save the binary anywhere and supply the path via this widget's sp_bin argument: +# cp ./sp ~/.config/awesome/scripts/ +``` + +Then clone repo under **~/.config/awesome/** and add widget in **rc.lua**: + +```lua +local spotify_widget = require("awesome-wm-widgets.spotify-widget.spotify") +... +s.mytasklist, -- Middle widget + { -- Right widgets + layout = wibox.layout.fixed.horizontal, + ... + -- default + spotify_widget(), + -- customized + spotify_widget({ + font = 'Ubuntu Mono 9', + play_icon = '/usr/share/icons/Papirus-Light/24x24/categories/spotify.svg', + pause_icon = '/usr/share/icons/Papirus-Dark/24x24/panel/spotify-indicator.svg' + }), + ... +``` diff --git a/.config/awesome/awesome-wm-widgets/spotify-widget/spo-wid-1.png b/.config/awesome/awesome-wm-widgets/spotify-widget/spo-wid-1.png new file mode 100755 index 0000000..5c7e403 Binary files /dev/null and b/.config/awesome/awesome-wm-widgets/spotify-widget/spo-wid-1.png differ diff --git a/.config/awesome/awesome-wm-widgets/spotify-widget/spotify-widget-custom-paused.png b/.config/awesome/awesome-wm-widgets/spotify-widget/spotify-widget-custom-paused.png new file mode 100755 index 0000000..9ac9c4a Binary files /dev/null and b/.config/awesome/awesome-wm-widgets/spotify-widget/spotify-widget-custom-paused.png differ diff --git a/.config/awesome/awesome-wm-widgets/spotify-widget/spotify-widget-custom-playing.png b/.config/awesome/awesome-wm-widgets/spotify-widget/spotify-widget-custom-playing.png new file mode 100755 index 0000000..f9628f9 Binary files /dev/null and b/.config/awesome/awesome-wm-widgets/spotify-widget/spotify-widget-custom-playing.png differ diff --git a/.config/awesome/awesome-wm-widgets/spotify-widget/spotify.lua b/.config/awesome/awesome-wm-widgets/spotify-widget/spotify.lua new file mode 100755 index 0000000..2c30685 --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/spotify-widget/spotify.lua @@ -0,0 +1,171 @@ +------------------------------------------------- +-- Spotify Widget for Awesome Window Manager +-- Shows currently playing song on Spotify for Linux client +-- More details could be found here: +-- https://github.com/streetturtle/awesome-wm-widgets/tree/master/spotify-widget + +-- @author Pavel Makhov +-- @copyright 2020 Pavel Makhov +------------------------------------------------- + +local awful = require("awful") +local wibox = require("wibox") +local watch = require("awful.widget.watch") + +local function ellipsize(text, length) + -- utf8 only available in Lua 5.3+ + if utf8 == nil then + return text:sub(0, length) + end + return (utf8.len(text) > length and length > 0) + and text:sub(0, utf8.offset(text, length - 2) - 1) .. '...' + or text +end + +local spotify_widget = {} + +local function worker(user_args) + + local args = user_args or {} + + local play_icon = args.play_icon or '/usr/share/icons/Arc/actions/24/player_play.png' + local pause_icon = args.pause_icon or '/usr/share/icons/Arc/actions/24/player_pause.png' + local font = args.font or 'Play 9' + local dim_when_paused = args.dim_when_paused == nil and false or args.dim_when_paused + local dim_opacity = args.dim_opacity or 0.2 + local max_length = args.max_length or 15 + local show_tooltip = args.show_tooltip == nil and true or args.show_tooltip + local timeout = args.timeout or 1 + local sp_bin = args.sp_bin or 'sp' + + local GET_SPOTIFY_STATUS_CMD = sp_bin .. ' status' + local GET_CURRENT_SONG_CMD = sp_bin .. ' current' + + local cur_artist = '' + local cur_title = '' + local cur_album = '' + + spotify_widget = wibox.widget { + { + id = 'artistw', + font = font, + widget = wibox.widget.textbox, + }, + { + layout = wibox.layout.stack, + { + id = "icon", + widget = wibox.widget.imagebox, + }, + { + widget = wibox.widget.textbox, + font = font, + text = ' ', + forced_height = 1 + } + }, + { + layout = wibox.container.scroll.horizontal, + max_size = 100, + step_function = wibox.container.scroll.step_functions.waiting_nonlinear_back_and_forth, + speed = 40, + { + id = 'titlew', + font = font, + widget = wibox.widget.textbox + } + }, + layout = wibox.layout.align.horizontal, + set_status = function(self, is_playing) + self:get_children_by_id('icon')[1]:set_image(is_playing and play_icon or pause_icon) + if dim_when_paused then + self:get_children_by_id('icon')[1]:set_opacity(is_playing and 1 or dim_opacity) + + self:get_children_by_id('titlew')[1]:set_opacity(is_playing and 1 or dim_opacity) + self:get_children_by_id('titlew')[1]:emit_signal('widget::redraw_needed') + + self:get_children_by_id('artistw')[1]:set_opacity(is_playing and 1 or dim_opacity) + self:get_children_by_id('artistw')[1]:emit_signal('widget::redraw_needed') + end + end, + set_text = function(self, artist, song) + local artist_to_display = ellipsize(artist, max_length) + if self:get_children_by_id('artistw')[1]:get_markup() ~= artist_to_display then + self:get_children_by_id('artistw')[1]:set_markup(artist_to_display) + end + local title_to_display = ellipsize(song, max_length) + if self:get_children_by_id('titlew')[1]:get_markup() ~= title_to_display then + self:get_children_by_id('titlew')[1]:set_markup(title_to_display) + end + end + } + + local update_widget_icon = function(widget, stdout, _, _, _) + stdout = string.gsub(stdout, "\n", "") + widget:set_status(stdout == 'Playing' and true or false) + end + + local update_widget_text = function(widget, stdout, _, _, _) + if string.find(stdout, 'Error: Spotify is not running.') ~= nil then + widget:set_text('','') + widget:set_visible(false) + return + end + + local escaped = string.gsub(stdout, "&", '&') + local album, _, artist, title = + string.match(escaped, 'Album%s*(.*)\nAlbumArtist%s*(.*)\nArtist%s*(.*)\nTitle%s*(.*)\n') + + if album ~= nil and title ~=nil and artist ~= nil then + cur_artist = artist + cur_title = title + cur_album = album + + widget:set_text(artist, title) + widget:set_visible(true) + end + end + + watch(GET_SPOTIFY_STATUS_CMD, timeout, update_widget_icon, spotify_widget) + watch(GET_CURRENT_SONG_CMD, timeout, update_widget_text, spotify_widget) + + --- Adds mouse controls to the widget: + -- - left click - play/pause + -- - scroll up - play next song + -- - scroll down - play previous song + spotify_widget:connect_signal("button::press", function(_, _, _, button) + if (button == 1) then + awful.spawn("sp play", false) -- left click + elseif (button == 4) then + awful.spawn("sp next", false) -- scroll up + elseif (button == 5) then + awful.spawn("sp prev", false) -- scroll down + end + awful.spawn.easy_async(GET_SPOTIFY_STATUS_CMD, function(stdout, stderr, exitreason, exitcode) + update_widget_icon(spotify_widget, stdout, stderr, exitreason, exitcode) + end) + end) + + + if show_tooltip then + local spotify_tooltip = awful.tooltip { + mode = 'outside', + preferred_positions = {'bottom'}, + } + + spotify_tooltip:add_to_object(spotify_widget) + + spotify_widget:connect_signal('mouse::enter', function() + spotify_tooltip.markup = 'Album: ' .. cur_album + .. '\nArtist: ' .. cur_artist + .. '\nSong: ' .. cur_title + end) + end + + return spotify_widget + +end + +return setmetatable(spotify_widget, { __call = function(_, ...) + return worker(...) +end }) diff --git a/.config/awesome/awesome-wm-widgets/stackoverflow-widget/README.md b/.config/awesome/awesome-wm-widgets/stackoverflow-widget/README.md new file mode 100755 index 0000000..0098062 --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/stackoverflow-widget/README.md @@ -0,0 +1,47 @@ +# Stackoverflow widget + +When clicked, widget shows latest questions from stackoverflow.com with a given tag(s). + +![screenshot](./screenshot.png) + +## Customization + +It is possible to customize widget by providing a table with all or some of the following config parameters: + +| Name | Default | Description | +|---|---|---| +| `icon`| `/.config/awesome/awesome-wm-widgets/stackoverflow-widget/so-icon.svg` | Path to the icon | +| `limit` | 5 | Number of items to show in the widget | +| `tagged` | awesome-wm | Tag, or comma-separated tags | +| `timeout` | 300 | How often in seconds the widget refreshes | + +## Installation + +1. Clone this repo (if not cloned yet) under **~/.config/awesome/**: + + ```bash + git clone https://github.com/streetturtle/awesome-wm-widgets.git ~/.config/awesome/ + ``` + +1. Require widget at the top of the **rc.lua**: + + ```lua + local stackoverflow_widget = require("awesome-wm-widgets.stackoverflow-widget.stackoverflow") + ``` + +1. Add widget to the tasklist: + + ```lua + s.mytasklist, -- Middle widget + { -- Right widgets + layout = wibox.layout.fixed.horizontal, + ... + --default + stackoverflow_widget(), + --customized + stackoverflow_widget({ + limit = 10 + }) + ... + ``` + diff --git a/.config/awesome/awesome-wm-widgets/stackoverflow-widget/screenshot.png b/.config/awesome/awesome-wm-widgets/stackoverflow-widget/screenshot.png new file mode 100755 index 0000000..b0058ab Binary files /dev/null and b/.config/awesome/awesome-wm-widgets/stackoverflow-widget/screenshot.png differ diff --git a/.config/awesome/awesome-wm-widgets/stackoverflow-widget/so-icon.svg b/.config/awesome/awesome-wm-widgets/stackoverflow-widget/so-icon.svg new file mode 100755 index 0000000..5298d4c --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/stackoverflow-widget/so-icon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/.config/awesome/awesome-wm-widgets/stackoverflow-widget/stackoverflow.lua b/.config/awesome/awesome-wm-widgets/stackoverflow-widget/stackoverflow.lua new file mode 100755 index 0000000..15d2837 --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/stackoverflow-widget/stackoverflow.lua @@ -0,0 +1,125 @@ +------------------------------------------------- +-- Stackoverflow Widget for Awesome Window Manager +-- Shows new questions by a given tag +-- More details could be found here: +-- https://github.com/streetturtle/awesome-wm-widgets/tree/master/stackoverflow-widget + +-- @author Pavel Makhov +-- @copyright 2019 Pavel Makhov +------------------------------------------------- + +local awful = require("awful") +local wibox = require("wibox") +local watch = require("awful.widget.watch") +local json = require("json") +local spawn = require("awful.spawn") +local gears = require("gears") +local beautiful = require("beautiful") + +local HOME_DIR = os.getenv("HOME") + +local GET_QUESTIONS_CMD = [[bash -c "curl --compressed -s -X GET]] + .. [[ 'http://api.stackexchange.com/2.2/questions/no-answers]] + .. [[?page=1&pagesize=%s&order=desc&sort=activity&tagged=%s&site=stackoverflow'"]] + +local stackoverflow_widget = {} + +local function worker(user_args) + + local args = user_args or {} + + local icon = args.icon or HOME_DIR .. '/.config/awesome/awesome-wm-widgets/stackoverflow-widget/so-icon.svg' + local limit = args.limit or 5 + local tagged = args.tagged or 'awesome-wm' + local timeout = args.timeout or 300 + + local rows = { + { widget = wibox.widget.textbox }, + layout = wibox.layout.fixed.vertical, + } + + local popup = awful.popup{ + ontop = true, + visible = false, + shape = gears.shape.rounded_rect, + border_width = 1, + border_color = beautiful.bg_focus, + maximum_width = 400, + preferred_positions = 'top', + offset = { y = 5 }, + widget = {} + } + + stackoverflow_widget = wibox.widget { + { + image = icon, + widget = wibox.widget.imagebox + }, + { + id = "txt", + widget = wibox.widget.textbox + }, + layout = wibox.layout.fixed.horizontal, + set_text = function(self, new_value) + self.txt.text = new_value + end, + } + + local update_widget = function(_, stdout, _, _, _) + + local result = json.decode(stdout) + + for i = 0, #rows do rows[i]=nil end + for _, item in ipairs(result.items) do + local tags = '' + for i = 1, #item.tags do tags = tags .. item.tags[i] .. ' ' end + local row = wibox.widget { + { + { + { + text = item.title, + widget = wibox.widget.textbox + }, + { + text = tags, + align = 'right', + widget = wibox.widget.textbox + }, + layout = wibox.layout.align.vertical + }, + margins = 8, + layout = wibox.container.margin + }, + widget = wibox.container.background + } + + row:connect_signal("button::release", function() + spawn.with_shell("xdg-open " .. item.link) + popup.visible = false + end) + + row:connect_signal("mouse::enter", function(c) c:set_bg(beautiful.bg_focus) end) + row:connect_signal("mouse::leave", function(c) c:set_bg(beautiful.bg_normal) end) + + table.insert(rows, row) + end + + popup:setup(rows) + end + + stackoverflow_widget:buttons( + awful.util.table.join( + awful.button({}, 1, function() + if popup.visible then + popup.visible = not popup.visible + else + popup:move_next_to(mouse.current_widget_geometry) + end + end) + ) + ) + watch(string.format(GET_QUESTIONS_CMD, limit, tagged), timeout, update_widget, stackoverflow_widget) + return stackoverflow_widget +end + +return setmetatable(stackoverflow_widget, { __call = function(_, ...) return worker(...) end }) diff --git a/.config/awesome/awesome-wm-widgets/todo-widget/README.md b/.config/awesome/awesome-wm-widgets/todo-widget/README.md new file mode 100755 index 0000000..c97d845 --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/todo-widget/README.md @@ -0,0 +1,28 @@ +# ToDo Widget + +This widget displays a list of todo items and allows marking item as done/undone, delete an item and create new ones: + +![screenshot](./todo.gif) + +# Installation + +Widget persists todo items as a JSON, so in order to simplify JSON serialisation/deserialisation download a **json.lua** from this repository: https://github.com/rxi/json.lua under `~/.config/awesone` folder. And don't forget to star a repo :) + +Then clone this repository under **~/.config/awesome/** and add the widget in **rc.lua**: + +```lua +local todo_widget = require("awesome-wm-widgets.todo-widget.todo") +... +s.mytasklist, -- Middle widget + { -- Right widgets + layout = wibox.layout.fixed.horizontal, + ... + -- default + todo_widget(), + ... +``` +Also note that widget uses [Arc Icons](https://github.com/horst3180/arc-icon-theme) and expects them to be installed under `/usr/share/icons/Arc/`. + +# Theming + +Widget uses your theme's colors. In case you want to have different colors, without changing your theme, please create an issue for it. I'll extract them as widget parameters. diff --git a/.config/awesome/awesome-wm-widgets/todo-widget/checkbox-checked-symbolic.svg b/.config/awesome/awesome-wm-widgets/todo-widget/checkbox-checked-symbolic.svg new file mode 100755 index 0000000..afeca62 --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/todo-widget/checkbox-checked-symbolic.svg @@ -0,0 +1,148 @@ + + + + + + + + image/svg+xml + + Gnome Symbolic Icon Theme + + + + + + + Gnome Symbolic Icon Theme + + + + + + + + + + + + + + diff --git a/.config/awesome/awesome-wm-widgets/todo-widget/chevron-down.svg b/.config/awesome/awesome-wm-widgets/todo-widget/chevron-down.svg new file mode 100755 index 0000000..dceeb0f --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/todo-widget/chevron-down.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/.config/awesome/awesome-wm-widgets/todo-widget/chevron-up.svg b/.config/awesome/awesome-wm-widgets/todo-widget/chevron-up.svg new file mode 100755 index 0000000..88474ce --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/todo-widget/chevron-up.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/.config/awesome/awesome-wm-widgets/todo-widget/list-add-symbolic.svg b/.config/awesome/awesome-wm-widgets/todo-widget/list-add-symbolic.svg new file mode 100755 index 0000000..9cc2d3a --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/todo-widget/list-add-symbolic.svg @@ -0,0 +1,157 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + diff --git a/.config/awesome/awesome-wm-widgets/todo-widget/todo.gif b/.config/awesome/awesome-wm-widgets/todo-widget/todo.gif new file mode 100755 index 0000000..7160e21 Binary files /dev/null and b/.config/awesome/awesome-wm-widgets/todo-widget/todo.gif differ diff --git a/.config/awesome/awesome-wm-widgets/todo-widget/todo.lua b/.config/awesome/awesome-wm-widgets/todo-widget/todo.lua new file mode 100755 index 0000000..78ca262 --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/todo-widget/todo.lua @@ -0,0 +1,340 @@ +------------------------------------------------- +-- ToDo Widget for Awesome Window Manager +-- More details could be found here: +-- https://github.com/streetturtle/awesome-wm-widgets/tree/master/todo-widget + +-- @author Pavel Makhov +-- @copyright 2020 Pavel Makhov +------------------------------------------------- + +local awful = require("awful") +local wibox = require("wibox") +local json = require("json") +local spawn = require("awful.spawn") +local gears = require("gears") +local beautiful = require("beautiful") +local gfs = require("gears.filesystem") + +local HOME_DIR = os.getenv("HOME") +local WIDGET_DIR = HOME_DIR .. '/.config/awesome/awesome-wm-widgets/todo-widget' +local STORAGE = HOME_DIR .. '/.cache/awmw/todo-widget/todos.json' + +local GET_TODO_ITEMS = 'bash -c "cat ' .. STORAGE .. '"' + +local rows = { layout = wibox.layout.fixed.vertical } +local todo_widget = {} +local update_widget +todo_widget.widget = wibox.widget { + { + { + { + { + id = "icon", + forced_height = 16, + forced_width = 16, + widget = wibox.widget.imagebox + }, + valign = 'center', + layout = wibox.container.place + }, + { + id = "txt", + widget = wibox.widget.textbox + }, + spacing = 4, + layout = wibox.layout.fixed.horizontal, + }, + margins = 4, + layout = wibox.container.margin + }, + shape = function(cr, width, height) + gears.shape.rounded_rect(cr, width, height, 4) + end, + widget = wibox.container.background, + set_text = function(self, new_value) + self:get_children_by_id("txt")[1].text = new_value + end, + set_icon = function(self, new_value) + self:get_children_by_id("icon")[1].image = new_value + end +} + +function todo_widget:update_counter(todos) + local todo_count = 0 + for _,p in ipairs(todos) do + if not p.status then + todo_count = todo_count + 1 + end + end + + todo_widget.widget:set_text(todo_count) +end + +local popup = awful.popup{ + bg = beautiful.bg_normal, + ontop = true, + visible = false, + shape = gears.shape.rounded_rect, + border_width = 1, + border_color = beautiful.bg_focus, + maximum_width = 400, + offset = { y = 5 }, + widget = {} +} + +local add_button = wibox.widget { + { + { + image = WIDGET_DIR .. '/list-add-symbolic.svg', + resize = false, + widget = wibox.widget.imagebox + }, + top = 11, + left = 8, + right = 8, + layout = wibox.container.margin + }, + shape = function(cr, width, height) + gears.shape.circle(cr, width, height, 12) + end, + widget = wibox.container.background +} + +add_button:connect_signal("button::press", function() + local pr = awful.widget.prompt() + + table.insert(rows, wibox.widget { + { + { + pr.widget, + spacing = 8, + layout = wibox.layout.align.horizontal + }, + margins = 8, + layout = wibox.container.margin + }, + bg = beautiful.bg_normal, + widget = wibox.container.background + }) + awful.prompt.run{ + prompt = "New item: ", + bg = beautiful.bg_normal, + bg_cursor = beautiful.fg_urgent, + textbox = pr.widget, + exe_callback = function(input_text) + if not input_text or #input_text == 0 then return end + spawn.easy_async(GET_TODO_ITEMS, function(stdout) + local res = json.decode(stdout) + table.insert(res.todo_items, {todo_item = input_text, status = false}) + spawn.easy_async_with_shell("echo '" .. json.encode(res) .. "' > " .. STORAGE, function() + spawn.easy_async(GET_TODO_ITEMS, function(items) update_widget(items) end) + end) + end) + end + } + popup:setup(rows) +end) +add_button:connect_signal("mouse::enter", function(c) c:set_bg(beautiful.bg_focus) end) +add_button:connect_signal("mouse::leave", function(c) c:set_bg(beautiful.bg_normal) end) + +local function worker(user_args) + + local args = user_args or {} + + local icon = args.icon or WIDGET_DIR .. '/checkbox-checked-symbolic.svg' + + todo_widget.widget:set_icon(icon) + + function update_widget(stdout) + local result = json.decode(stdout) + if result == nil or result == '' then result = {} end + todo_widget:update_counter(result.todo_items) + + for i = 0, #rows do rows[i]=nil end + + local first_row = wibox.widget { + { + {widget = wibox.widget.textbox}, + { + markup = 'ToDo', + align = 'center', + forced_width = 350, -- for horizontal alignment + forced_height = 40, + widget = wibox.widget.textbox + }, + add_button, + spacing = 8, + layout = wibox.layout.fixed.horizontal + }, + bg = beautiful.bg_normal, + widget = wibox.container.background + } + + table.insert(rows, first_row) + + for i, todo_item in ipairs(result.todo_items) do + + local checkbox = wibox.widget { + checked = todo_item.status, + color = beautiful.bg_normal, + paddings = 2, + shape = gears.shape.circle, + forced_width = 20, + forced_height = 20, + check_color = beautiful.fg_urgent, + widget = wibox.widget.checkbox + } + + checkbox:connect_signal("button::press", function(c) + c:set_checked(not c.checked) + todo_item.status = not todo_item.status + result.todo_items[i] = todo_item + spawn.easy_async_with_shell("echo '" .. json.encode(result) .. "' > " .. STORAGE, function () + todo_widget:update_counter(result.todo_items) + end) + end) + + + local trash_button = wibox.widget { + { + { image = WIDGET_DIR .. '/window-close-symbolic.svg', + resize = false, + widget = wibox.widget.imagebox + }, + margins = 5, + layout = wibox.container.margin + }, + border_width = 1, + shape = function(cr, width, height) + gears.shape.circle(cr, width, height, 10) + end, + widget = wibox.container.background + } + + trash_button:connect_signal("button::press", function() + table.remove(result.todo_items, i) + spawn.easy_async_with_shell("printf '" .. json.encode(result) .. "' > " .. STORAGE, function () + spawn.easy_async(GET_TODO_ITEMS, function(items) update_widget(items) end) + end) + end) + + + local move_up = wibox.widget { + image = WIDGET_DIR .. '/chevron-up.svg', + resize = false, + widget = wibox.widget.imagebox + } + + move_up:connect_signal("button::press", function() + local temp = result.todo_items[i] + result.todo_items[i] = result.todo_items[i-1] + result.todo_items[i-1] = temp + spawn.easy_async_with_shell("printf '" .. json.encode(result) .. "' > " .. STORAGE, function () + spawn.easy_async(GET_TODO_ITEMS, function(items) update_widget(items) end) + end) + end) + + local move_down = wibox.widget { + image = WIDGET_DIR .. '/chevron-down.svg', + resize = false, + widget = wibox.widget.imagebox + } + + move_down:connect_signal("button::press", function() + local temp = result.todo_items[i] + result.todo_items[i] = result.todo_items[i+1] + result.todo_items[i+1] = temp + spawn.easy_async_with_shell("printf '" .. json.encode(result) .. "' > " .. STORAGE, function () + spawn.easy_async(GET_TODO_ITEMS, function(items) update_widget(items) end) + end) + end) + + + local move_buttons = { + layout = wibox.layout.fixed.vertical + } + + if i == 1 and #result.todo_items > 1 then + table.insert(move_buttons, move_down) + elseif i == #result.todo_items and #result.todo_items > 1 then + table.insert(move_buttons, move_up) + elseif #result.todo_items > 1 then + table.insert(move_buttons, move_up) + table.insert(move_buttons, move_down) + end + + local row = wibox.widget { + { + { + { + checkbox, + valign = 'center', + layout = wibox.container.place, + }, + { + { + text = todo_item.todo_item, + align = 'left', + widget = wibox.widget.textbox + }, + left = 10, + layout = wibox.container.margin + }, + { + { + move_buttons, + valign = 'center', + layout = wibox.container.place, + }, + { + trash_button, + valign = 'center', + layout = wibox.container.place, + }, + spacing = 8, + layout = wibox.layout.align.horizontal + }, + spacing = 8, + layout = wibox.layout.align.horizontal + }, + margins = 8, + layout = wibox.container.margin + }, + bg = beautiful.bg_normal, + widget = wibox.container.background + } + + row:connect_signal("mouse::enter", function(c) c:set_bg(beautiful.bg_focus) end) + row:connect_signal("mouse::leave", function(c) c:set_bg(beautiful.bg_normal) end) + + table.insert(rows, row) + end + + popup:setup(rows) + end + + todo_widget.widget:buttons( + gears.table.join( + awful.button({}, 1, function() + if popup.visible then + todo_widget.widget:set_bg('#00000000') + popup.visible = not popup.visible + else + todo_widget.widget:set_bg(beautiful.bg_focus) + popup:move_next_to(mouse.current_widget_geometry) + end + end) + ) + ) + + spawn.easy_async(GET_TODO_ITEMS, function(stdout) update_widget(stdout) end) + + return todo_widget.widget +end + +if not gfs.file_readable(STORAGE) then + spawn.easy_async(string.format([[bash -c "dirname %s | xargs mkdir -p && echo '{\"todo_items\":{}}' > %s"]], + STORAGE, STORAGE)) +end + +return setmetatable(todo_widget, { __call = function(_, ...) return worker(...) end }) diff --git a/.config/awesome/awesome-wm-widgets/todo-widget/window-close-symbolic.svg b/.config/awesome/awesome-wm-widgets/todo-widget/window-close-symbolic.svg new file mode 100755 index 0000000..46ff888 --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/todo-widget/window-close-symbolic.svg @@ -0,0 +1,95 @@ + + + + + + + + Gnome Symbolic Icon Theme + + + + image/svg+xml + + Gnome Symbolic Icon Theme + + + + + + + + + + + + + + + + + + diff --git a/.config/awesome/awesome-wm-widgets/translate-widget/README.MD b/.config/awesome/awesome-wm-widgets/translate-widget/README.MD new file mode 100755 index 0000000..a82fda7 --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/translate-widget/README.MD @@ -0,0 +1,38 @@ +# Translate Widget + +This widget allows quickly translate words or phrases without opening a browser - just using Awesome. To provide direction of the translation add the 2 letters code of the source and target languages at the end of the phrase, for example _hello enfr_ will translate _hello_ from English to French. This widget is based on [Watson Language Translator](https://www.ibm.com/watson/services/language-translator/) from IBM. + +![demo](./demo.gif) + +## Controls + + - Mod4 + c - opens a translate prompt; + - left click on the popup widget - copies the translation to the clipboard and closes widget; + - right click on the popup widget - copies text to translate to the clipboard and closes widget. + +## Installation + +1. Clone repo under **~/.config/awesome/** +1. Create an IBM Cloud API key at [cloud.ibm.com/iam/apikeys](https://cloud.ibm.com/iam/apikeys) +1. Copy a service URL by going to [resource list](https://cloud.ibm.com/resources), then under "Services" select "Language Translator" option, and then copy URL from the "Credentials" section +1. Require widget in **rc.lua**: + + ```lua + local translate = require("awesome-wm-widgets.translate-widget.translate") + ``` + +1. Add a shortcut to run translate prompt: + + ```lua + awful.key({ modkey }, "c", function() + translate.launch{api_key = '', url = 'url'} + end, { description = "run translate prompt", group = "launcher" }) + ``` + + + + + + + + diff --git a/.config/awesome/awesome-wm-widgets/translate-widget/demo.gif b/.config/awesome/awesome-wm-widgets/translate-widget/demo.gif new file mode 100755 index 0000000..3645d47 Binary files /dev/null and b/.config/awesome/awesome-wm-widgets/translate-widget/demo.gif differ diff --git a/.config/awesome/awesome-wm-widgets/translate-widget/demo1.gif b/.config/awesome/awesome-wm-widgets/translate-widget/demo1.gif new file mode 100755 index 0000000..62cc9f4 Binary files /dev/null and b/.config/awesome/awesome-wm-widgets/translate-widget/demo1.gif differ diff --git a/.config/awesome/awesome-wm-widgets/translate-widget/gnome-translate.svg b/.config/awesome/awesome-wm-widgets/translate-widget/gnome-translate.svg new file mode 100755 index 0000000..ca02b1a --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/translate-widget/gnome-translate.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/.config/awesome/awesome-wm-widgets/translate-widget/translate.lua b/.config/awesome/awesome-wm-widgets/translate-widget/translate.lua new file mode 100755 index 0000000..d680c4e --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/translate-widget/translate.lua @@ -0,0 +1,201 @@ +------------------------------------------------- +-- Translate Widget based on the Yandex.Translate API +-- https://tech.yandex.com/translate/ + +-- @author Pavel Makhov +-- @copyright 2020 Pavel Makhov +------------------------------------------------- + +local awful = require("awful") +local spawn = require("awful.spawn") +local capi = {keygrabber = keygrabber } +local beautiful = require("beautiful") +local json = require("json") +local naughty = require("naughty") +local wibox = require("wibox") +local gears = require("gears") +local gfs = require("gears.filesystem") + +local TRANSLATE_CMD = [[bash -c 'curl -s -u "apikey:%s" -H "Content-Type: application/json"]] + ..[[ -d '\''{"text": ["%s"], "model_id":"%s"}'\'' "%s/v3/translate?version=2018-05-01"']] +local ICON = os.getenv("HOME") .. '/.config/awesome/awesome-wm-widgets/translate-widget/gnome-translate.svg' + +--- Returns two values - string to translate and direction: +-- 'dog enfr' -> 'dog', 'en-fr' +-- @param input_string user's input which consists of +-- text to translate and direction, 'dog enfr' +local function extract(input_string) + local word, lang = input_string:match('^(.+)%s(%a%a%a%a)$') + + if word ~= nil and lang ~= nil then + lang = lang:sub(1, 2) .. '-' .. lang:sub(3) + end + return word, lang +end + +local function show_warning(message) + naughty.notify{ + preset = naughty.config.presets.critical, + title = 'Translate Shell', + text = message} +end + +local w = awful.popup { + widget = {}, + visible = false, + border_width = 1, + maximum_width = 400, + width = 400, + border_color = '#66ccff', + ontop = true, + bg = beautiful.bg_normal, + shape = function(cr, width, height) + gears.shape.rounded_rect(cr, width, height, 3) + end, +} +awful.placement.top(w, { margins = {top = 40}}) + + +--- Main function - takes the user input and shows the widget with translation +-- @param request_string - user input (dog enfr) +local function translate(to_translate, lang, api_key, url) + + local cmd = string.format(TRANSLATE_CMD, api_key, to_translate, lang, url) + spawn.easy_async(cmd, function (stdout, stderr) + if stderr ~= '' then + show_warning(stderr) + end + + local resp = json.decode(stdout) + + w:setup { + { + { + { + { + image = ICON, + widget = wibox.widget.imagebox, + resize = false + }, + valign = 'center', + layout = wibox.container.place, + }, + { + { + id = 'src', + markup = '' .. lang:sub(1,2) .. ': ' + .. to_translate .. '', + widget = wibox.widget.textbox + }, + { + id = 'res', + markup = '' .. lang:sub(4) .. ': ' + .. resp.translations[1].translation .. '', + widget = wibox.widget.textbox + }, + id = 'text', + layout = wibox.layout.fixed.vertical, + }, + id = 'left', + spacing = 8, + layout = wibox.layout.fixed.horizontal + }, + bg = beautiful.bg_normal, + forced_width = 400, + widget = wibox.container.background + }, + color = beautiful.bg_normal, + margins = 8, + widget = wibox.container.margin + } + + w.visible = true + w:buttons( + awful.util.table.join( + awful.button({}, 1, function() + spawn.with_shell("echo '" .. resp.translations[1].translation .. "' | xclip -selection clipboard") + w.visible = false + end), + awful.button({}, 3, function() + spawn.with_shell("echo '" .. to_translate .."' | xclip -selection clipboard") + w.visible = false + end) + ) + ) + + capi.keygrabber.run(function(_, key, event) + if event == "release" then return end + if key then + capi.keygrabber.stop() + w.visible = false + end + end) + end) +end + +local prompt = awful.widget.prompt() +local input_widget = wibox { + visible = false, + width = 300, + height = 100, + maxmimum_width = 300, + maxmimum_height = 900, + ontop = true, + screen = mouse.screen, + expand = true, + bg = beautiful.bg_normal, + max_widget_size = 500, + border_width = 1, + border_color = '#66ccff', + shape = function(cr, width, height) + gears.shape.rounded_rect(cr, width, height, 3) + end, +} + +input_widget:setup{ + { + prompt, + bg = beautiful.bg_normal, + widget = wibox.container.background + }, + margins = 8, + widget = wibox.container.margin +} + +local function launch(user_args) + + local args = user_args or {} + + local api_key = args.api_key + local url = args.url + + awful.placement.top(input_widget, { margins = {top = 40}, parent = awful.screen.focused()}) + input_widget.visible = true + + awful.prompt.run { + prompt = "Translate: ", + textbox = prompt.widget, + history_path = gfs.get_dir('cache') .. '/translate_history', + bg_cursor = '#66ccff', + exe_callback = function(text) + if not text or #text == 0 then return end + local to_translate, lang = extract(text) + if not to_translate or #to_translate==0 or not lang or #lang == 0 then + naughty.notify({ + preset = naughty.config.presets.critical, + title = 'Translate Widget Error', + text = 'Language is not provided', + }) + return + end + translate(to_translate, lang, api_key, url) + end, + done_callback = function() + input_widget.visible = false + end + } +end + +return { + launch = launch +} diff --git a/.config/awesome/awesome-wm-widgets/volume-widget/README.md b/.config/awesome/awesome-wm-widgets/volume-widget/README.md new file mode 100755 index 0000000..4fc7f55 --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/volume-widget/README.md @@ -0,0 +1,119 @@ +# Volume widget + +Volume widget based on [amixer](https://linux.die.net/man/1/amixer) (is used for controlling the audio volume) and [pacmd](https://linux.die.net/man/1/pacmd) (is used for selecting a sink/source). Also, the widget provides an easy way to customize how it looks, following types are supported out-of-the-box: + +![types](screenshots/variations.png) + +From left to right: `horizontal_bar`, `vertical_bar`, `icon`, `icon_and_text`, `arc` + +A right-click on the widget opens a popup where you can choose a sink/source: +![sink-sources](screenshots/volume-sink-sources.png) + +Left click toggles mute and middle click opens a mixer ([pavucontrol](https://freedesktop.org/software/pulseaudio/pavucontrol/) by default). + +### Features + + - switch between sinks/sources by right click on the widget; + - more responsive than previous versions of volume widget, which were refreshed once a second; + - 5 predefined customizable looks; + +## Installation + +Clone the repo under **~/.config/awesome/** and add widget in **rc.lua**: + +```lua +local volume_widget = require('awesome-wm-widgets.volume-widget.volume') +... +s.mytasklist, -- Middle widget + { -- Right widgets + layout = wibox.layout.fixed.horizontal, + ... + -- default + volume_widget(), + -- customized + volume_widget{ + widget_type = 'arc' + }, +``` + +Note that widget uses following command the get the current volume: `amixer -D pulse sget Master`, so please make sure that it works for you, otherwise you need to set parameter `device = 'default'`. + +### Shortcuts + +To improve responsiveness of the widget when volume level is changed by a shortcut use corresponding methods of the widget: + +```lua +awful.key({ modkey }, "]", function() volume_widget:inc(5) end), +awful.key({ modkey }, "[", function() volume_widget:dec(5) end), +awful.key({ modkey }, "\\", function() volume_widget:toggle() end), +``` + +## Customization + +It is possible to customize the widget by providing a table with all or some of the following config parameters: + +### Generic parameter + +| Name | Default | Description | +|---|---|---| +| `mixer_cmd` | `pavucontrol` | command to run on middle click (e.g. a mixer program) | +| `step` | `5` | How much the volume is raised or lowered at once (in %) | +| `widget_type`| `icon_and_text`| Widget type, one of `horizontal_bar`, `vertical_bar`, `icon`, `icon_and_text`, `arc` | +| `device` | `pulse` | Select the device name to control | + +Depends on the chosen widget type add parameters from the corresponding section below: + +#### `icon` parameters + +| Name | Default | Description | +|---|---|---| +| `icon_dir`| `./icons`| Path to the folder with icons | + +_Note:_ if you are changing icons, the folder should contain following .svg images: + - audio-volume-high-symbolic + - audio-volume-medium-symbolic + - audio-volume-low-symbolic + - audio-volume-muted-symbolic + +#### `icon_and_text` parameters + +| Name | Default | Description | +|---|---|---| +| `icon_dir`| `./icons`| Path to the folder with icons | +| `font` | `beautiful.font` | Font name and size, like `Play 12` | + +#### `arc` parameters + +| Name | Default | Description | +|---|---|---| +| `thickness` | 2 | Thickness of the arc | +| `main_color` | `beautiful.fg_color` | Color of the arc | +| `bg_color` | `#ffffff11` | Color of the arc's background | +| `mute_color` | `beautiful.fg_urgent` | Color of the arc when mute | +| `size` | 18 | Size of the widget | + +#### `horizontal_bar` parameters + +| Name | Default | Description | +|---|---|---| +| `main_color` | `beautiful.fg_normal` | Color of the bar | +| `mute_color` | `beautiful.fg_urgent` | Color of the bar when mute | +| `bg_color` | `'#ffffff11'` | Color of the bar's background | +| `width` | `50` | The bar width | +| `margins` | `10` | Top and bottom margins (if your wibar is 22 px high, bar will be 2 px = 22 - 2*10) | +| `shape` | `'bar'` | [gears.shape](https://awesomewm.org/doc/api/libraries/gears.shape.html), could be `octogon`, `hexagon`, `powerline`, etc | +| `with_icon` | `true` | Show volume icon| + +_Note:_ I didn't figure out how does the `forced_height` property of progressbar widget work (maybe it doesn't work at all), thus there is a workaround with margins. + +#### `vertical_bar` parameters + +| Name | Default | Description | +|---|---|---| +| `main_color` | `beautiful.fg_normal` | Color of the bar | +| `mute_color` | `beautiful.fg_urgent` | Color of the bar when mute | +| `bg_color` | `'#ffffff11'` | Color of the bar's background | +| `width` | `10` | The bar width | +| `margins` | `20` | Top and bottom margins (if your wibar is 22 px high, bar will be 2 px = 22 - 2*10) | +| `shape` | `'bar'` | [gears.shape](https://awesomewm.org/doc/api/libraries/gears.shape.html), could be `octogon`, `hexagon`, `powerline`, etc | +| `with_icon` | `true` | Show volume icon| diff --git a/.config/awesome/awesome-wm-widgets/volume-widget/icons/audio-volume-high-symbolic.svg b/.config/awesome/awesome-wm-widgets/volume-widget/icons/audio-volume-high-symbolic.svg new file mode 100755 index 0000000..985c107 --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/volume-widget/icons/audio-volume-high-symbolic.svg @@ -0,0 +1,88 @@ + + + + + + image/svg+xml + + + + + + + + + + + + + + + diff --git a/.config/awesome/awesome-wm-widgets/volume-widget/icons/audio-volume-low-symbolic.svg b/.config/awesome/awesome-wm-widgets/volume-widget/icons/audio-volume-low-symbolic.svg new file mode 100755 index 0000000..7eb4531 --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/volume-widget/icons/audio-volume-low-symbolic.svg @@ -0,0 +1,88 @@ + + + + + + image/svg+xml + + + + + + + + + + + + + + + diff --git a/.config/awesome/awesome-wm-widgets/volume-widget/icons/audio-volume-medium-symbolic.svg b/.config/awesome/awesome-wm-widgets/volume-widget/icons/audio-volume-medium-symbolic.svg new file mode 100755 index 0000000..11e44fe --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/volume-widget/icons/audio-volume-medium-symbolic.svg @@ -0,0 +1,88 @@ + + + + + + image/svg+xml + + + + + + + + + + + + + + + diff --git a/.config/awesome/awesome-wm-widgets/volume-widget/icons/audio-volume-muted-symbolic.svg b/.config/awesome/awesome-wm-widgets/volume-widget/icons/audio-volume-muted-symbolic.svg new file mode 100755 index 0000000..e577d05 --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/volume-widget/icons/audio-volume-muted-symbolic.svg @@ -0,0 +1,88 @@ + + + + + + image/svg+xml + + + + + + + + + + + + + + + diff --git a/.config/awesome/awesome-wm-widgets/volume-widget/screenshots/variations.png b/.config/awesome/awesome-wm-widgets/volume-widget/screenshots/variations.png new file mode 100755 index 0000000..21d7ead Binary files /dev/null and b/.config/awesome/awesome-wm-widgets/volume-widget/screenshots/variations.png differ diff --git a/.config/awesome/awesome-wm-widgets/volume-widget/screenshots/volume-sink-sources.png b/.config/awesome/awesome-wm-widgets/volume-widget/screenshots/volume-sink-sources.png new file mode 100755 index 0000000..7d010bc Binary files /dev/null and b/.config/awesome/awesome-wm-widgets/volume-widget/screenshots/volume-sink-sources.png differ diff --git a/.config/awesome/awesome-wm-widgets/volume-widget/utils.lua b/.config/awesome/awesome-wm-widgets/volume-widget/utils.lua new file mode 100755 index 0000000..417a666 --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/volume-widget/utils.lua @@ -0,0 +1,105 @@ + + +local utils = {} + +local function split(string_to_split, separator) + if separator == nil then separator = "%s" end + local t = {} + + for str in string.gmatch(string_to_split, "([^".. separator .."]+)") do + table.insert(t, str) + end + + return t +end + +function utils.extract_sinks_and_sources(pacmd_output) + local sinks = {} + local sources = {} + local device + local properties + local ports + local in_sink = false + local in_source = false + local in_device = false + local in_properties = false + local in_ports = false + for line in pacmd_output:gmatch("[^\r\n]+") do + if string.match(line, 'source%(s%) available.') then + in_sink = false + in_source = true + end + if string.match(line, 'sink%(s%) available.') then + in_sink = true + in_source = false + end + + if string.match(line, 'index:') then + in_device = true + in_properties = false + device = { + id = line:match(': (%d+)'), + is_default = string.match(line, '*') ~= nil + } + if in_sink then + table.insert(sinks, device) + elseif in_source then + table.insert(sources, device) + end + end + + if string.match(line, '^\tproperties:') then + in_device = false + in_properties = true + properties = {} + device['properties'] = properties + end + + if string.match(line, 'ports:') then + in_device = false + in_properties = false + in_ports = true + ports = {} + device['ports'] = ports + end + + if string.match(line, 'active port:') then + in_device = false + in_properties = false + in_ports = false + device['active_port'] = line:match(': (.+)'):gsub('<',''):gsub('>','') + end + + if in_device then + local t = split(line, ': ') + local key = t[1]:gsub('\t+', ''):lower() + local value = t[2]:gsub('^<', ''):gsub('>$', '') + device[key] = value + end + + if in_properties then + local t = split(line, '=') + local key = t[1]:gsub('\t+', ''):gsub('%.', '_'):gsub('-', '_'):gsub(':', ''):gsub("%s+$", "") + local value + if t[2] == nil then + value = t[2] + else + value = t[2]:gsub('"', ''):gsub("^%s+", ""):gsub(' Analog Stereo', '') + end + properties[key] = value + end + + if in_ports then + local t = split(line, ': ') + local key = t[1] + if key ~= nil then + key = key:gsub('\t+', '') + end + ports[key] = t[2] + end + end + + return sinks, sources +end + +return utils \ No newline at end of file diff --git a/.config/awesome/awesome-wm-widgets/volume-widget/volume-2.svg b/.config/awesome/awesome-wm-widgets/volume-widget/volume-2.svg new file mode 100755 index 0000000..10f1c67 --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/volume-widget/volume-2.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/.config/awesome/awesome-wm-widgets/volume-widget/volume.lua b/.config/awesome/awesome-wm-widgets/volume-widget/volume.lua new file mode 100755 index 0000000..4c44042 --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/volume-widget/volume.lua @@ -0,0 +1,228 @@ +------------------------------------------------- +-- The Ultimate Volume Widget for Awesome Window Manager +-- More details could be found here: +-- https://github.com/streetturtle/awesome-wm-widgets/tree/master/volume-widget + +-- @author Pavel Makhov +-- @copyright 2020 Pavel Makhov +------------------------------------------------- + +local awful = require("awful") +local wibox = require("wibox") +local spawn = require("awful.spawn") +local gears = require("gears") +local beautiful = require("beautiful") +local watch = require("awful.widget.watch") +local utils = require("awesome-wm-widgets.volume-widget.utils") + + +local LIST_DEVICES_CMD = [[sh -c "pacmd list-sinks; pacmd list-sources"]] +local function GET_VOLUME_CMD(device) return 'amixer -D ' .. device .. ' sget Master' end +local function INC_VOLUME_CMD(device, step) return 'amixer -D ' .. device .. ' sset Master ' .. step .. '%+' end +local function DEC_VOLUME_CMD(device, step) return 'amixer -D ' .. device .. ' sset Master ' .. step .. '%-' end +local function TOG_VOLUME_CMD(device) return 'amixer -D ' .. device .. ' sset Master toggle' end + + +local widget_types = { + icon_and_text = require("awesome-wm-widgets.volume-widget.widgets.icon-and-text-widget"), + icon = require("awesome-wm-widgets.volume-widget.widgets.icon-widget"), + arc = require("awesome-wm-widgets.volume-widget.widgets.arc-widget"), + horizontal_bar = require("awesome-wm-widgets.volume-widget.widgets.horizontal-bar-widget"), + vertical_bar = require("awesome-wm-widgets.volume-widget.widgets.vertical-bar-widget") +} +local volume = {} + +local rows = { layout = wibox.layout.fixed.vertical } + +local popup = awful.popup{ + bg = beautiful.bg_normal, + ontop = true, + visible = false, + shape = gears.shape.rounded_rect, + border_width = 1, + border_color = beautiful.bg_focus, + maximum_width = 400, + offset = { y = 5 }, + widget = {} +} + +local function build_main_line(device) + if device.active_port ~= nil and device.ports[device.active_port] ~= nil then + return device.properties.device_description .. ' · ' .. device.ports[device.active_port] + else + return device.properties.device_description + end +end + +local function build_rows(devices, on_checkbox_click, device_type) + local device_rows = { layout = wibox.layout.fixed.vertical } + for _, device in pairs(devices) do + + local checkbox = wibox.widget { + checked = device.is_default, + color = beautiful.bg_normal, + paddings = 2, + shape = gears.shape.circle, + forced_width = 20, + forced_height = 20, + check_color = beautiful.fg_urgent, + widget = wibox.widget.checkbox + } + + checkbox:connect_signal("button::press", function() + spawn.easy_async(string.format([[sh -c 'pacmd set-default-%s "%s"']], device_type, device.name), function() + on_checkbox_click() + end) + end) + + local row = wibox.widget { + { + { + { + checkbox, + valign = 'center', + layout = wibox.container.place, + }, + { + { + text = build_main_line(device), + align = 'left', + widget = wibox.widget.textbox + }, + left = 10, + layout = wibox.container.margin + }, + spacing = 8, + layout = wibox.layout.align.horizontal + }, + margins = 4, + layout = wibox.container.margin + }, + bg = beautiful.bg_normal, + widget = wibox.container.background + } + + row:connect_signal("mouse::enter", function(c) c:set_bg(beautiful.bg_focus) end) + row:connect_signal("mouse::leave", function(c) c:set_bg(beautiful.bg_normal) end) + + local old_cursor, old_wibox + row:connect_signal("mouse::enter", function() + local wb = mouse.current_wibox + old_cursor, old_wibox = wb.cursor, wb + wb.cursor = "hand1" + end) + row:connect_signal("mouse::leave", function() + if old_wibox then + old_wibox.cursor = old_cursor + old_wibox = nil + end + end) + + row:connect_signal("button::press", function() + spawn.easy_async(string.format([[sh -c 'pacmd set-default-%s "%s"']], device_type, device.name), function() + on_checkbox_click() + end) + end) + + table.insert(device_rows, row) + end + + return device_rows +end + +local function build_header_row(text) + return wibox.widget{ + { + markup = "" .. text .. "", + align = 'center', + widget = wibox.widget.textbox + }, + bg = beautiful.bg_normal, + widget = wibox.container.background + } +end + +local function rebuild_popup() + spawn.easy_async(LIST_DEVICES_CMD, function(stdout) + + local sinks, sources = utils.extract_sinks_and_sources(stdout) + + for i = 0, #rows do rows[i]=nil end + + table.insert(rows, build_header_row("SINKS")) + table.insert(rows, build_rows(sinks, function() rebuild_popup() end, "sink")) + table.insert(rows, build_header_row("SOURCES")) + table.insert(rows, build_rows(sources, function() rebuild_popup() end, "source")) + + popup:setup(rows) + end) +end + + +local function worker(user_args) + + local args = user_args or {} + + local mixer_cmd = args.mixer_cmd or 'pavucontrol' + local widget_type = args.widget_type + local refresh_rate = args.refresh_rate or 1 + local step = args.step or 5 + local device = args.device or 'pulse' + + if widget_types[widget_type] == nil then + volume.widget = widget_types['icon_and_text'].get_widget(args.icon_and_text_args) + else + volume.widget = widget_types[widget_type].get_widget(args) + end + + local function update_graphic(widget, stdout) + local mute = string.match(stdout, "%[(o%D%D?)%]") -- \[(o\D\D?)\] - [on] or [off] + if mute == 'off' then widget:mute() + elseif mute == 'on' then widget:unmute() + end + local volume_level = string.match(stdout, "(%d?%d?%d)%%") -- (\d?\d?\d)\%) + volume_level = string.format("% 3d", volume_level) + widget:set_volume_level(volume_level) + end + + function volume:inc(s) + spawn.easy_async(INC_VOLUME_CMD(device, s or step), function(stdout) update_graphic(volume.widget, stdout) end) + end + + function volume:dec(s) + spawn.easy_async(DEC_VOLUME_CMD(device, s or step), function(stdout) update_graphic(volume.widget, stdout) end) + end + + function volume:toggle() + spawn.easy_async(TOG_VOLUME_CMD(device), function(stdout) update_graphic(volume.widget, stdout) end) + end + + function volume:mixer() + if mixer_cmd then + spawn.easy_async(mixer_cmd) + end + end + + volume.widget:buttons( + awful.util.table.join( + awful.button({}, 3, function() + if popup.visible then + popup.visible = not popup.visible + else + rebuild_popup() + popup:move_next_to(mouse.current_widget_geometry) + end + end), + awful.button({}, 4, function() volume:inc() end), + awful.button({}, 5, function() volume:dec() end), + awful.button({}, 2, function() volume:mixer() end), + awful.button({}, 1, function() volume:toggle() end) + ) + ) + + watch(GET_VOLUME_CMD(device), refresh_rate, update_graphic, volume.widget) + + return volume.widget +end + +return setmetatable(volume, { __call = function(_, ...) return worker(...) end }) diff --git a/.config/awesome/awesome-wm-widgets/volume-widget/widgets/arc-widget.lua b/.config/awesome/awesome-wm-widgets/volume-widget/widgets/arc-widget.lua new file mode 100755 index 0000000..b512f12 --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/volume-widget/widgets/arc-widget.lua @@ -0,0 +1,46 @@ +local wibox = require("wibox") +local beautiful = require('beautiful') + +local ICON_DIR = os.getenv("HOME") .. '/.config/awesome/awesome-wm-widgets/volume-widget/icons/' + +local widget = {} + +function widget.get_widget(widgets_args) + local args = widgets_args or {} + + local thickness = args.thickness or 2 + local main_color = args.main_color or beautiful.fg_color + local bg_color = args.bg_color or '#ffffff11' + local mute_color = args.mute_color or beautiful.fg_urgent + local size = args.size or 18 + + return wibox.widget { + { + id = "icon", + image = ICON_DIR .. 'audio-volume-high-symbolic.svg', + resize = true, + widget = wibox.widget.imagebox, + }, + max_value = 100, + thickness = thickness, + start_angle = 4.71238898, -- 2pi*3/4 + forced_height = size, + forced_width = size, + bg = bg_color, + paddings = 2, + widget = wibox.container.arcchart, + set_volume_level = function(self, new_value) + self.value = new_value + end, + mute = function(self) + self.colors = { mute_color } + end, + unmute = function(self) + self.colors = { main_color } + end + } + +end + + +return widget \ No newline at end of file diff --git a/.config/awesome/awesome-wm-widgets/volume-widget/widgets/horizontal-bar-widget.lua b/.config/awesome/awesome-wm-widgets/volume-widget/widgets/horizontal-bar-widget.lua new file mode 100755 index 0000000..be1f38d --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/volume-widget/widgets/horizontal-bar-widget.lua @@ -0,0 +1,58 @@ +local wibox = require("wibox") +local beautiful = require('beautiful') +local gears = require("gears") + +local ICON_DIR = os.getenv("HOME") .. '/.config/awesome/awesome-wm-widgets/volume-widget/icons/' + +local widget = {} + +function widget.get_widget(widgets_args) + local args = widgets_args or {} + + local main_color = args.main_color or beautiful.fg_normal + local mute_color = args.mute_color or beautiful.fg_urgent + local bg_color = args.bg_color or '#ffffff11' + local width = args.width or 50 + local margins = args.margins or 10 + local shape = args.shape or 'bar' + local with_icon = args.with_icon == true and true or false + + local bar = wibox.widget { + { + { + id = "icon", + image = ICON_DIR .. 'audio-volume-high-symbolic.svg', + resize = false, + widget = wibox.widget.imagebox, + }, + valign = 'center', + visible = with_icon, + layout = wibox.container.place, + }, + { + id = 'bar', + max_value = 100, + forced_width = width, + color = main_color, + margins = { top = margins, bottom = margins }, + background_color = bg_color, + shape = gears.shape[shape], + widget = wibox.widget.progressbar, + }, + spacing = 4, + layout = wibox.layout.fixed.horizontal, + set_volume_level = function(self, new_value) + self:get_children_by_id('bar')[1]:set_value(tonumber(new_value)) + end, + mute = function(self) + self:get_children_by_id('bar')[1]:set_color(mute_color) + end, + unmute = function(self) + self:get_children_by_id('bar')[1]:set_color(main_color) + end + } + + return bar +end + +return widget diff --git a/.config/awesome/awesome-wm-widgets/volume-widget/widgets/icon-and-text-widget.lua b/.config/awesome/awesome-wm-widgets/volume-widget/widgets/icon-and-text-widget.lua new file mode 100755 index 0000000..b1a2793 --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/volume-widget/widgets/icon-and-text-widget.lua @@ -0,0 +1,59 @@ +local wibox = require("wibox") +local beautiful = require('beautiful') + +local widget = {} + +local ICON_DIR = os.getenv("HOME") .. '/.config/awesome/awesome-wm-widgets/volume-widget/icons/' + +function widget.get_widget(widgets_args) + local args = widgets_args or {} + + local font = args.font or beautiful.font + local icon_dir = args.icon_dir or ICON_DIR + + return wibox.widget { + { + { + id = "icon", + resize = false, + widget = wibox.widget.imagebox, + }, + valign = 'center', + layout = wibox.container.place + }, + { + id = 'txt', + font = font, + widget = wibox.widget.textbox + }, + layout = wibox.layout.fixed.horizontal, + set_volume_level = function(self, new_value) + self:get_children_by_id('txt')[1]:set_text(new_value) + local volume_icon_name + if self.is_muted then + volume_icon_name = 'audio-volume-muted-symbolic' + else + local new_value_num = tonumber(new_value) + if (new_value_num >= 0 and new_value_num < 33) then + volume_icon_name="audio-volume-low-symbolic" + elseif (new_value_num < 66) then + volume_icon_name="audio-volume-medium-symbolic" + else + volume_icon_name="audio-volume-high-symbolic" + end + end + self:get_children_by_id('icon')[1]:set_image(icon_dir .. volume_icon_name .. '.svg') + end, + mute = function(self) + self.is_muted = true + self:get_children_by_id('icon')[1]:set_image(icon_dir .. 'audio-volume-muted-symbolic.svg') + end, + unmute = function(self) + self.is_muted = false + end + } + +end + + +return widget \ No newline at end of file diff --git a/.config/awesome/awesome-wm-widgets/volume-widget/widgets/icon-widget.lua b/.config/awesome/awesome-wm-widgets/volume-widget/widgets/icon-widget.lua new file mode 100755 index 0000000..cc39a3d --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/volume-widget/widgets/icon-widget.lua @@ -0,0 +1,46 @@ +local wibox = require("wibox") + +local widget = {} + +local ICON_DIR = os.getenv("HOME") .. '/.config/awesome/awesome-wm-widgets/volume-widget/icons/' + +function widget.get_widget(widgets_args) + local args = widgets_args or {} + + local icon_dir = args.icon_dir or ICON_DIR + + return wibox.widget { + { + id = "icon", + resize = false, + widget = wibox.widget.imagebox, + }, + valign = 'center', + layout = wibox.container.place, + set_volume_level = function(self, new_value) + local volume_icon_name + if self.is_muted then + volume_icon_name = 'audio-volume-muted-symbolic' + else + local new_value_num = tonumber(new_value) + if (new_value_num >= 0 and new_value_num < 33) then + volume_icon_name="audio-volume-low-symbolic" + elseif (new_value_num < 66) then + volume_icon_name="audio-volume-medium-symbolic" + else + volume_icon_name="audio-volume-high-symbolic" + end + end + self:get_children_by_id('icon')[1]:set_image(icon_dir .. volume_icon_name .. '.svg') + end, + mute = function(self) + self.is_muted = true + self:get_children_by_id('icon')[1]:set_image(icon_dir .. 'audio-volume-muted-symbolic.svg') + end, + unmute = function(self) + self.is_muted = false + end + } +end + +return widget \ No newline at end of file diff --git a/.config/awesome/awesome-wm-widgets/volume-widget/widgets/vertical-bar-widget.lua b/.config/awesome/awesome-wm-widgets/volume-widget/widgets/vertical-bar-widget.lua new file mode 100755 index 0000000..6f32b50 --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/volume-widget/widgets/vertical-bar-widget.lua @@ -0,0 +1,64 @@ +local wibox = require("wibox") +local beautiful = require('beautiful') +local gears = require("gears") + +local ICON_DIR = os.getenv("HOME") .. '/.config/awesome/awesome-wm-widgets/volume-widget/icons/' + +local widget = {} + +function widget.get_widget(widgets_args) + local args = widgets_args or {} + + local main_color = args.main_color or beautiful.fg_normal + local mute_color = args.mute_color or beautiful.fg_urgent + local bg_color = args.bg_color or '#ffffff11' + local width = args.width or 10 + local margins = args.height or 2 + local shape = args.shape or 'bar' + local with_icon = args.with_icon == true and true or false + + local bar = wibox.widget { + { + { + id = "icon", + image = ICON_DIR .. 'audio-volume-high-symbolic.svg', + resize = false, + widget = wibox.widget.imagebox, + }, + valign = 'center', + visible = with_icon, + layout = wibox.container.place, + }, + { + { + id = 'bar', + max_value = 100, + forced_width = width, + forced_height = 5, + margins = { top = margins, bottom = margins }, + color = main_color, + background_color = bg_color, + shape = gears.shape[shape], + widget = wibox.widget.progressbar, + }, + forced_width = width, + direction = 'east', + layout = wibox.container.rotate, + }, + spacing = 4, + layout = wibox.layout.fixed.horizontal, + set_volume_level = function(self, new_value) + self:get_children_by_id('bar')[1]:set_value(tonumber(new_value)) + end, + mute = function(self) + self:get_children_by_id('bar')[1]:set_color(mute_color) + end, + unmute = function(self) + self:get_children_by_id('bar')[1]:set_color(main_color) + end + } + + return bar +end + +return widget diff --git a/.config/awesome/awesome-wm-widgets/weather-widget/README.md b/.config/awesome/awesome-wm-widgets/weather-widget/README.md new file mode 100755 index 0000000..3bf6228 --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/weather-widget/README.md @@ -0,0 +1,144 @@ +# Weather widget + +

+ GitHub issues by-label + + + Twitter URL + +

+ +The widget showing current, hourly and daily weather forecast: + +

+ screenshot +

+ +The widget consists of three sections: + - current weather, including humidity, wind speed, UV index + - hourly forecast for the next 24 hours + - daily forecast for the next five days + +## Customization + +It is possible to customize widget by providing a table with all or some of the following config parameters: + +| Name | Default | Description | +|---|---|---| +| coordinates | Required | Table with two elements: latitude and longitude, e.g. `{46.204400, 6.143200}` | +| api_key | Required | Get it [here](https://openweathermap.org/appid) | +| font_name | `beautiful.font:gsub("%s%d+$", "")` | **Name** of the font to use e.g. 'Play' | +| both_units_widget | false | Show temperature in both units - '28°C (83°F) | +| units | metric | `metric` for celsius, `imperial` for fahrenheit | +| show_hourly_forecast | false | Show hourly forecase section | +| time_format_12h |false | 12 or 24 hour format (13:00 - default or 1pm) | +| show_daily_forecast | false | Show daily forecast section | +| icon_pack_name | weather-underground-icons | Name of the icon pack, could be `weather-underground-icon` or `VitalyGorbachev` or create your own, more details below | +| icons_extension | `.png` | File extension of icons in the pack | +| timeout | 120 | How often in seconds the widget refreshes | + +### Icons: + +The widget comes with two predefined icon packs: + + - weather-underground-icons taken from [here](https://github.com/manifestinteractive/weather-underground-icons) + - VitalyGorbachev taken from [here](https://www.flaticon.com/authors/vitaly-gorbachev) + +To add your custom icons, create a folder with the pack name under `/icons` and use the folder name in widget's config. There should be 18 icons, preferably 128x128 minimum. Icons should also respect the naming convention, please check widget's source. + +### Examples: + +#### Custom font, icons + +![example1](./example1.png) + +```lua +weather_curl_widget({ + api_key='', + coordinates = {45.5017, -73.5673}, + time_format_12h = true, + units = 'imperial', + both_units_widget = true, + font_name = 'Carter One', + icons = 'VitalyGorbachev', + icons_extension = '.svg', + show_hourly_forecast = true, + show_daily_forecast = true, +}), +``` + +#### Only current weather + +![example2](./example2.png) + +```lua +weather_curl_widget({ + api_key='', + coordinates = {45.5017, -73.5673}, +}), +``` + +## Installation + +1. Download json parser for lua from [github.com/rxi/json.lua](https://github.com/rxi/json.lua) and place it under **~/.config/awesome/** (don't forget to star a repo ): + + ```bash + wget -P ~/.config/awesome/ https://raw.githubusercontent.com/rxi/json.lua/master/json.lua + ``` + +1. Clone this repo under **~/.config/awesome/**: + + ```bash + git clone https://github.com/streetturtle/awesome-wm-widgets.git ~/.config/awesome/ + ``` + +1. Get Open Weather Map app id here: [openweathermap.org/appid](https://openweathermap.org/appid). + +1. Require weather widget at the beginning of **rc.lua**: + + ```lua + local weather_widget = require("awesome-wm-widgets.weather-widget.weather") + ``` + +1. Add widget to the tasklist: + + ```lua + s.mytasklist, -- Middle widget + { -- Right widgets + layout = wibox.layout.fixed.horizontal, + ... + --default + weather_widget({ + api_key='', + coordinates = {45.5017, -73.5673}, + }), + , + --customized + weather_curl_widget({ + api_key='', + coordinates = {45.5017, -73.5673}, + time_format_12h = true, + units = 'imperial', + both_units_widget = true, + font_name = 'Carter One', + icons = 'VitalyGorbachev', + icons_extension = '.svg', + show_hourly_forecast = true, + show_daily_forecast = true, + }), + ... + ``` + +## More screenshots + +Only negative temperature: + +![negative](./negative.png) + +Both positive and negative tempertature: + +![both](./both.png) + +## How it works + +TBW diff --git a/.config/awesome/awesome-wm-widgets/weather-widget/both.png b/.config/awesome/awesome-wm-widgets/weather-widget/both.png new file mode 100755 index 0000000..0947a37 Binary files /dev/null and b/.config/awesome/awesome-wm-widgets/weather-widget/both.png differ diff --git a/.config/awesome/awesome-wm-widgets/weather-widget/example1.png b/.config/awesome/awesome-wm-widgets/weather-widget/example1.png new file mode 100755 index 0000000..7074faa Binary files /dev/null and b/.config/awesome/awesome-wm-widgets/weather-widget/example1.png differ diff --git a/.config/awesome/awesome-wm-widgets/weather-widget/example2.png b/.config/awesome/awesome-wm-widgets/weather-widget/example2.png new file mode 100755 index 0000000..857274b Binary files /dev/null and b/.config/awesome/awesome-wm-widgets/weather-widget/example2.png differ diff --git a/.config/awesome/awesome-wm-widgets/weather-widget/example_response.json b/.config/awesome/awesome-wm-widgets/weather-widget/example_response.json new file mode 100755 index 0000000..2b90a6e --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/weather-widget/example_response.json @@ -0,0 +1,1419 @@ +{ + "lat": 45.5, + "lon": -73.57, + "timezone": "America/Toronto", + "timezone_offset": -14400, + "current": { + "dt": 1603155313, + "sunrise": 1603106181, + "sunset": 1603144896, + "temp": 8.91, + "feels_like": 7.97, + "pressure": 1025, + "humidity": 100, + "dew_point": 8.91, + "uvi": 2.37, + "clouds": 90, + "visibility": 4828, + "wind_speed": 1, + "wind_deg": 40, + "weather": [ + { + "id": 500, + "main": "Rain", + "description": "light rain", + "icon": "10n" + }, + { + "id": 701, + "main": "Mist", + "description": "mist", + "icon": "50n" + } + ], + "rain": { + "1h": 0.65 + } + }, + "hourly": [ + { + "dt": 1603152000, + "temp": -8.91, + "feels_like": 7.95, + "pressure": 1025, + "humidity": 100, + "dew_point": 8.91, + "clouds": 90, + "visibility": 10000, + "wind_speed": 1.03, + "wind_deg": 32, + "weather": [ + { + "id": 500, + "main": "Rain", + "description": "light rain", + "icon": "10n" + } + ], + "pop": 1, + "rain": { + "1h": 0.4 + } + }, + { + "dt": 1603155600, + "temp": -9.16, + "feels_like": 7.7, + "pressure": 1025, + "humidity": 91, + "dew_point": 7.77, + "clouds": 95, + "visibility": 10000, + "wind_speed": 1.34, + "wind_deg": 67, + "weather": [ + { + "id": 500, + "main": "Rain", + "description": "light rain", + "icon": "10n" + } + ], + "pop": 0.29, + "rain": { + "1h": 0.87 + } + }, + { + "dt": 1603159200, + "temp": -9.24, + "feels_like": 7.7, + "pressure": 1024, + "humidity": 88, + "dew_point": 7.36, + "clouds": 98, + "visibility": 10000, + "wind_speed": 1.32, + "wind_deg": 48, + "weather": [ + { + "id": 500, + "main": "Rain", + "description": "light rain", + "icon": "10n" + } + ], + "pop": 0.59, + "rain": { + "1h": 0.42 + } + }, + { + "dt": 1603162800, + "temp": -9.18, + "feels_like": 6.91, + "pressure": 1023, + "humidity": 86, + "dew_point": 6.96, + "clouds": 99, + "visibility": 10000, + "wind_speed": 2.23, + "wind_deg": 42, + "weather": [ + { + "id": 804, + "main": "Clouds", + "description": "overcast clouds", + "icon": "04n" + } + ], + "pop": 0.86 + }, + { + "dt": 1603166400, + "temp": -9.09, + "feels_like": 6.46, + "pressure": 1023, + "humidity": 88, + "dew_point": 7.21, + "clouds": 100, + "visibility": 10000, + "wind_speed": 2.83, + "wind_deg": 46, + "weather": [ + { + "id": 500, + "main": "Rain", + "description": "light rain", + "icon": "10n" + } + ], + "pop": 0.94, + "rain": { + "1h": 0.6 + } + }, + { + "dt": 1603170000, + "temp": -8.96, + "feels_like": 6.43, + "pressure": 1022, + "humidity": 91, + "dew_point": 7.62, + "clouds": 100, + "visibility": 5405, + "wind_speed": 2.81, + "wind_deg": 18, + "weather": [ + { + "id": 501, + "main": "Rain", + "description": "moderate rain", + "icon": "10n" + } + ], + "pop": 1, + "rain": { + "1h": 1.89 + } + }, + { + "dt": 1603173600, + "temp": -8.84, + "feels_like": 6.29, + "pressure": 1021, + "humidity": 91, + "dew_point": 7.6, + "clouds": 100, + "visibility": 7599, + "wind_speed": 2.8, + "wind_deg": 35, + "weather": [ + { + "id": 501, + "main": "Rain", + "description": "moderate rain", + "icon": "10n" + } + ], + "pop": 1, + "rain": { + "1h": 2.07 + } + }, + { + "dt": 1603177200, + "temp": -8.92, + "feels_like": 6.34, + "pressure": 1021, + "humidity": 92, + "dew_point": 7.78, + "clouds": 100, + "visibility": 8594, + "wind_speed": 2.91, + "wind_deg": 44, + "weather": [ + { + "id": 501, + "main": "Rain", + "description": "moderate rain", + "icon": "10n" + } + ], + "pop": 1, + "rain": { + "1h": 1.19 + } + }, + { + "dt": 1603180800, + "temp": -9.08, + "feels_like": 7.18, + "pressure": 1020, + "humidity": 93, + "dew_point": 8.06, + "clouds": 100, + "visibility": 9347, + "wind_speed": 2.06, + "wind_deg": 37, + "weather": [ + { + "id": 501, + "main": "Rain", + "description": "moderate rain", + "icon": "10n" + } + ], + "pop": 1, + "rain": { + "1h": 1.02 + } + }, + { + "dt": 1603184400, + "temp": -8.98, + "feels_like": 6.28, + "pressure": 1019, + "humidity": 93, + "dew_point": 8, + "clouds": 100, + "visibility": 6164, + "wind_speed": 3.16, + "wind_deg": 354, + "weather": [ + { + "id": 501, + "main": "Rain", + "description": "moderate rain", + "icon": "10n" + } + ], + "pop": 1, + "rain": { + "1h": 1.89 + } + }, + { + "dt": 1603188000, + "temp": -8.69, + "feels_like": 5.78, + "pressure": 1019, + "humidity": 92, + "dew_point": 7.58, + "clouds": 100, + "visibility": 5143, + "wind_speed": 3.31, + "wind_deg": 29, + "weather": [ + { + "id": 501, + "main": "Rain", + "description": "moderate rain", + "icon": "10n" + } + ], + "pop": 1, + "rain": { + "1h": 2.6 + } + }, + { + "dt": 1603191600, + "temp": -8.6, + "feels_like": 6.08, + "pressure": 1019, + "humidity": 92, + "dew_point": 7.42, + "clouds": 100, + "visibility": 6072, + "wind_speed": 2.73, + "wind_deg": 29, + "weather": [ + { + "id": 501, + "main": "Rain", + "description": "moderate rain", + "icon": "10n" + } + ], + "pop": 1, + "rain": { + "1h": 2.3 + } + }, + { + "dt": 1603195200, + "temp": -8.56, + "feels_like": 6.68, + "pressure": 1019, + "humidity": 92, + "dew_point": 7.45, + "clouds": 100, + "visibility": 6697, + "wind_speed": 1.8, + "wind_deg": 16, + "weather": [ + { + "id": 501, + "main": "Rain", + "description": "moderate rain", + "icon": "10d" + } + ], + "pop": 1, + "rain": { + "1h": 2.58 + } + }, + { + "dt": 1603198800, + "temp": -8.74, + "feels_like": 6.88, + "pressure": 1020, + "humidity": 91, + "dew_point": 7.38, + "clouds": 100, + "visibility": 10000, + "wind_speed": 1.77, + "wind_deg": 319, + "weather": [ + { + "id": 501, + "main": "Rain", + "description": "moderate rain", + "icon": "10d" + } + ], + "pop": 1, + "rain": { + "1h": 1.06 + } + }, + { + "dt": 1603202400, + "temp": -8.93, + "feels_like": 7.32, + "pressure": 1020, + "humidity": 90, + "dew_point": 7.48, + "clouds": 100, + "visibility": 10000, + "wind_speed": 1.42, + "wind_deg": 291, + "weather": [ + { + "id": 500, + "main": "Rain", + "description": "light rain", + "icon": "10d" + } + ], + "pop": 1, + "rain": { + "1h": 0.95 + } + }, + { + "dt": 1603206000, + "temp": -9.07, + "feels_like": 6.75, + "pressure": 1021, + "humidity": 89, + "dew_point": 7.43, + "clouds": 100, + "visibility": 10000, + "wind_speed": 2.43, + "wind_deg": 276, + "weather": [ + { + "id": 500, + "main": "Rain", + "description": "light rain", + "icon": "10d" + } + ], + "pop": 1, + "rain": { + "1h": 0.31 + } + }, + { + "dt": 1603209600, + "temp": -9.31, + "feels_like": 6.58, + "pressure": 1022, + "humidity": 86, + "dew_point": 7.17, + "clouds": 100, + "visibility": 10000, + "wind_speed": 2.93, + "wind_deg": 262, + "weather": [ + { + "id": 804, + "main": "Clouds", + "description": "overcast clouds", + "icon": "04d" + } + ], + "pop": 0.8 + }, + { + "dt": 1603213200, + "temp": -10.07, + "feels_like": 6.68, + "pressure": 1023, + "humidity": 80, + "dew_point": 6.78, + "clouds": 100, + "visibility": 10000, + "wind_speed": 3.77, + "wind_deg": 269, + "weather": [ + { + "id": 804, + "main": "Clouds", + "description": "overcast clouds", + "icon": "04d" + } + ], + "pop": 0.8 + }, + { + "dt": 1603216800, + "temp": -11.87, + "feels_like": 7.99, + "pressure": 1023, + "humidity": 67, + "dew_point": 6.15, + "clouds": 99, + "visibility": 10000, + "wind_speed": 4.21, + "wind_deg": 265, + "weather": [ + { + "id": 804, + "main": "Clouds", + "description": "overcast clouds", + "icon": "04d" + } + ], + "pop": 0.8 + }, + { + "dt": 1603220400, + "temp": -12.05, + "feels_like": 7.95, + "pressure": 1024, + "humidity": 64, + "dew_point": 5.63, + "clouds": 100, + "visibility": 10000, + "wind_speed": 4.38, + "wind_deg": 270, + "weather": [ + { + "id": 804, + "main": "Clouds", + "description": "overcast clouds", + "icon": "04d" + } + ], + "pop": 0 + }, + { + "dt": 1603224000, + "temp": -11.74, + "feels_like": 7.54, + "pressure": 1025, + "humidity": 63, + "dew_point": 5.08, + "clouds": 100, + "visibility": 10000, + "wind_speed": 4.38, + "wind_deg": 276, + "weather": [ + { + "id": 804, + "main": "Clouds", + "description": "overcast clouds", + "icon": "04d" + } + ], + "pop": 0 + }, + { + "dt": 1603227600, + "temp": -11.09, + "feels_like": 7.13, + "pressure": 1026, + "humidity": 62, + "dew_point": 4.24, + "clouds": 100, + "visibility": 10000, + "wind_speed": 3.79, + "wind_deg": 293, + "weather": [ + { + "id": 804, + "main": "Clouds", + "description": "overcast clouds", + "icon": "04d" + } + ], + "pop": 0 + }, + { + "dt": 1603231200, + "temp": -10.13, + "feels_like": 6.51, + "pressure": 1027, + "humidity": 63, + "dew_point": 3.43, + "clouds": 100, + "visibility": 10000, + "wind_speed": 3.13, + "wind_deg": 318, + "weather": [ + { + "id": 804, + "main": "Clouds", + "description": "overcast clouds", + "icon": "04n" + } + ], + "pop": 0 + }, + { + "dt": 1603234800, + "temp": -9.53, + "feels_like": 7.02, + "pressure": 1028, + "humidity": 63, + "dew_point": 3.02, + "clouds": 100, + "visibility": 10000, + "wind_speed": 1.4, + "wind_deg": 329, + "weather": [ + { + "id": 804, + "main": "Clouds", + "description": "overcast clouds", + "icon": "04n" + } + ], + "pop": 0 + }, + { + "dt": 1603238400, + "temp": -9.2, + "feels_like": 7.3, + "pressure": 1028, + "humidity": 65, + "dew_point": 3.03, + "clouds": 100, + "visibility": 10000, + "wind_speed": 0.56, + "wind_deg": 52, + "weather": [ + { + "id": 804, + "main": "Clouds", + "description": "overcast clouds", + "icon": "04n" + } + ], + "pop": 0 + }, + { + "dt": 1603242000, + "temp": -8.73, + "feels_like": 6.57, + "pressure": 1029, + "humidity": 68, + "dew_point": 3.28, + "clouds": 100, + "visibility": 10000, + "wind_speed": 0.98, + "wind_deg": 75, + "weather": [ + { + "id": 804, + "main": "Clouds", + "description": "overcast clouds", + "icon": "04n" + } + ], + "pop": 0 + }, + { + "dt": 1603245600, + "temp": -8.12, + "feels_like": 5.55, + "pressure": 1029, + "humidity": 71, + "dew_point": 3.27, + "clouds": 89, + "visibility": 10000, + "wind_speed": 1.57, + "wind_deg": 68, + "weather": [ + { + "id": 804, + "main": "Clouds", + "description": "overcast clouds", + "icon": "04n" + } + ], + "pop": 0 + }, + { + "dt": 1603249200, + "temp": -7.83, + "feels_like": 4.86, + "pressure": 1029, + "humidity": 71, + "dew_point": 3.05, + "clouds": 93, + "visibility": 10000, + "wind_speed": 2.07, + "wind_deg": 68, + "weather": [ + { + "id": 804, + "main": "Clouds", + "description": "overcast clouds", + "icon": "04n" + } + ], + "pop": 0 + }, + { + "dt": 1603252800, + "temp": -7.49, + "feels_like": 4.21, + "pressure": 1029, + "humidity": 72, + "dew_point": 2.8, + "clouds": 94, + "visibility": 10000, + "wind_speed": 2.48, + "wind_deg": 66, + "weather": [ + { + "id": 804, + "main": "Clouds", + "description": "overcast clouds", + "icon": "04n" + } + ], + "pop": 0 + }, + { + "dt": 1603256400, + "temp": -6.92, + "feels_like": 3.31, + "pressure": 1029, + "humidity": 73, + "dew_point": 2.47, + "clouds": 96, + "visibility": 10000, + "wind_speed": 2.87, + "wind_deg": 81, + "weather": [ + { + "id": 804, + "main": "Clouds", + "description": "overcast clouds", + "icon": "04n" + } + ], + "pop": 0 + }, + { + "dt": 1603260000, + "temp": -6.49, + "feels_like": 2.48, + "pressure": 1029, + "humidity": 74, + "dew_point": 2.22, + "clouds": 96, + "visibility": 10000, + "wind_speed": 3.38, + "wind_deg": 78, + "weather": [ + { + "id": 804, + "main": "Clouds", + "description": "overcast clouds", + "icon": "04n" + } + ], + "pop": 0 + }, + { + "dt": 1603263600, + "temp": -6.3, + "feels_like": 1.81, + "pressure": 1028, + "humidity": 71, + "dew_point": 1.55, + "clouds": 100, + "visibility": 10000, + "wind_speed": 3.89, + "wind_deg": 84, + "weather": [ + { + "id": 804, + "main": "Clouds", + "description": "overcast clouds", + "icon": "04n" + } + ], + "pop": 0 + }, + { + "dt": 1603267200, + "temp": -6.22, + "feels_like": 1.39, + "pressure": 1027, + "humidity": 69, + "dew_point": 0.99, + "clouds": 98, + "visibility": 10000, + "wind_speed": 4.27, + "wind_deg": 74, + "weather": [ + { + "id": 804, + "main": "Clouds", + "description": "overcast clouds", + "icon": "04n" + } + ], + "pop": 0 + }, + { + "dt": 1603270800, + "temp": -6.69, + "feels_like": 1.66, + "pressure": 1026, + "humidity": 65, + "dew_point": 0.79, + "clouds": 96, + "visibility": 10000, + "wind_speed": 4.47, + "wind_deg": 69, + "weather": [ + { + "id": 804, + "main": "Clouds", + "description": "overcast clouds", + "icon": "04n" + } + ], + "pop": 0.05 + }, + { + "dt": 1603274400, + "temp": -6.53, + "feels_like": 1.74, + "pressure": 1024, + "humidity": 68, + "dew_point": 1.07, + "clouds": 97, + "visibility": 10000, + "wind_speed": 4.23, + "wind_deg": 65, + "weather": [ + { + "id": 804, + "main": "Clouds", + "description": "overcast clouds", + "icon": "04n" + } + ], + "pop": 0.28 + }, + { + "dt": 1603278000, + "temp": -6.41, + "feels_like": 1.87, + "pressure": 1023, + "humidity": 73, + "dew_point": 1.96, + "clouds": 97, + "visibility": 10000, + "wind_speed": 4.08, + "wind_deg": 73, + "weather": [ + { + "id": 500, + "main": "Rain", + "description": "light rain", + "icon": "10n" + } + ], + "pop": 0.35, + "rain": { + "1h": 0.17 + } + }, + { + "dt": 1603281600, + "temp": -6.42, + "feels_like": 2.71, + "pressure": 1022, + "humidity": 79, + "dew_point": 3.21, + "clouds": 98, + "visibility": 9620, + "wind_speed": 3.16, + "wind_deg": 71, + "weather": [ + { + "id": 500, + "main": "Rain", + "description": "light rain", + "icon": "10d" + } + ], + "pop": 0.62, + "rain": { + "1h": 0.37 + } + }, + { + "dt": 1603285200, + "temp": -6.67, + "feels_like": 3.38, + "pressure": 1021, + "humidity": 86, + "dew_point": 4.59, + "clouds": 100, + "visibility": 10000, + "wind_speed": 2.95, + "wind_deg": 84, + "weather": [ + { + "id": 501, + "main": "Rain", + "description": "moderate rain", + "icon": "10d" + } + ], + "pop": 0.9, + "rain": { + "1h": 1.08 + } + }, + { + "dt": 1603288800, + "temp": -8.55, + "feels_like": 5.61, + "pressure": 1019, + "humidity": 87, + "dew_point": 6.64, + "clouds": 100, + "visibility": 10000, + "wind_speed": 3.05, + "wind_deg": 135, + "weather": [ + { + "id": 500, + "main": "Rain", + "description": "light rain", + "icon": "10d" + } + ], + "pop": 1, + "rain": { + "1h": 0.23 + } + }, + { + "dt": 1603292400, + "temp": -10.85, + "feels_like": 8.09, + "pressure": 1018, + "humidity": 95, + "dew_point": 10.13, + "clouds": 100, + "visibility": 10000, + "wind_speed": 4.04, + "wind_deg": 150, + "weather": [ + { + "id": 500, + "main": "Rain", + "description": "light rain", + "icon": "10d" + } + ], + "pop": 1, + "rain": { + "1h": 0.31 + } + }, + { + "dt": 1603296000, + "temp": -13.37, + "feels_like": 10.29, + "pressure": 1017, + "humidity": 90, + "dew_point": 11.93, + "clouds": 100, + "visibility": 10000, + "wind_speed": 5.19, + "wind_deg": 170, + "weather": [ + { + "id": 500, + "main": "Rain", + "description": "light rain", + "icon": "10d" + } + ], + "pop": 1, + "rain": { + "1h": 0.32 + } + }, + { + "dt": 1603299600, + "temp": -13.92, + "feels_like": 11.34, + "pressure": 1015, + "humidity": 94, + "dew_point": 13.07, + "clouds": 100, + "visibility": 6450, + "wind_speed": 5.01, + "wind_deg": 177, + "weather": [ + { + "id": 501, + "main": "Rain", + "description": "moderate rain", + "icon": "10d" + } + ], + "pop": 1, + "rain": { + "1h": 3.08 + } + }, + { + "dt": 1603303200, + "temp": -14.85, + "feels_like": 12.78, + "pressure": 1014, + "humidity": 95, + "dew_point": 14.1, + "clouds": 100, + "visibility": 10000, + "wind_speed": 4.79, + "wind_deg": 183, + "weather": [ + { + "id": 502, + "main": "Rain", + "description": "heavy intensity rain", + "icon": "10d" + } + ], + "pop": 1, + "rain": { + "1h": 4.94 + } + }, + { + "dt": 1603306800, + "temp": -15.94, + "feels_like": 13.56, + "pressure": 1014, + "humidity": 93, + "dew_point": 14.96, + "clouds": 100, + "visibility": 7138, + "wind_speed": 5.61, + "wind_deg": 207, + "weather": [ + { + "id": 501, + "main": "Rain", + "description": "moderate rain", + "icon": "10d" + } + ], + "pop": 1, + "rain": { + "1h": 2.71 + } + }, + { + "dt": 1603310400, + "temp": -16.72, + "feels_like": 14.6, + "pressure": 1014, + "humidity": 93, + "dew_point": 15.66, + "clouds": 100, + "visibility": 10000, + "wind_speed": 5.64, + "wind_deg": 208, + "weather": [ + { + "id": 501, + "main": "Rain", + "description": "moderate rain", + "icon": "10d" + } + ], + "pop": 1, + "rain": { + "1h": 1.33 + } + }, + { + "dt": 1603314000, + "temp": -16.74, + "feels_like": 14.61, + "pressure": 1014, + "humidity": 94, + "dew_point": 15.81, + "clouds": 100, + "visibility": 10000, + "wind_speed": 5.75, + "wind_deg": 216, + "weather": [ + { + "id": 500, + "main": "Rain", + "description": "light rain", + "icon": "10d" + } + ], + "pop": 1, + "rain": { + "1h": 0.89 + } + }, + { + "dt": 1603317600, + "temp": -17.05, + "feels_like": 14.53, + "pressure": 1015, + "humidity": 92, + "dew_point": 15.83, + "clouds": 100, + "visibility": 10000, + "wind_speed": 6.3, + "wind_deg": 234, + "weather": [ + { + "id": 500, + "main": "Rain", + "description": "light rain", + "icon": "10n" + } + ], + "pop": 1, + "rain": { + "1h": 0.51 + } + }, + { + "dt": 1603321200, + "temp": -16.74, + "feels_like": 14.18, + "pressure": 1016, + "humidity": 87, + "dew_point": 14.65, + "clouds": 100, + "visibility": 10000, + "wind_speed": 5.74, + "wind_deg": 257, + "weather": [ + { + "id": 500, + "main": "Rain", + "description": "light rain", + "icon": "10n" + } + ], + "pop": 1, + "rain": { + "1h": 0.22 + } + } + ], + "daily": [ + { + "dt": 1603123200, + "sunrise": 1603106181, + "sunset": 1603144896, + "temp": { + "day": 12, + "min": 8.91, + "max": 12.73, + "night": 9.05, + "eve": 9.72, + "morn": 12.73 + }, + "feels_like": { + "day": 9.92, + "night": 7.02, + "eve": 7.88, + "morn": 8.02 + }, + "pressure": 1025, + "humidity": 78, + "dew_point": 8.34, + "wind_speed": 2.41, + "wind_deg": 242, + "weather": [ + { + "id": 501, + "main": "Rain", + "description": "moderate rain", + "icon": "10d" + } + ], + "clouds": 100, + "pop": 1, + "rain": 8.77, + "uvi": 2.37 + }, + { + "dt": 1603209600, + "sunrise": 1603192663, + "sunset": 1603231195, + "temp": { + "day": 9.07, + "min": 7.83, + "max": 11.87, + "night": 7.83, + "eve": 11.09, + "morn": 8.98 + }, + "feels_like": { + "day": 6.75, + "night": 4.86, + "eve": 7.13, + "morn": 6.28 + }, + "pressure": 1021, + "humidity": 89, + "dew_point": 7.43, + "wind_speed": 2.43, + "wind_deg": 276, + "weather": [ + { + "id": 502, + "main": "Rain", + "description": "heavy intensity rain", + "icon": "10d" + } + ], + "clouds": 100, + "pop": 1, + "rain": 18.46, + "uvi": 2.3 + }, + { + "dt": 1603296000, + "sunrise": 1603279145, + "sunset": 1603317495, + "temp": { + "day": 10.85, + "min": 6.42, + "max": 16.74, + "night": 12.25, + "eve": 16.74, + "morn": 6.69 + }, + "feels_like": { + "day": 8.09, + "night": 8.59, + "eve": 14.61, + "morn": 1.66 + }, + "pressure": 1018, + "humidity": 95, + "dew_point": 10.13, + "wind_speed": 4.04, + "wind_deg": 150, + "weather": [ + { + "id": 502, + "main": "Rain", + "description": "heavy intensity rain", + "icon": "10d" + } + ], + "clouds": 100, + "pop": 1, + "rain": 16.19, + "uvi": 2.32 + }, + { + "dt": 1603382400, + "sunrise": 1603365627, + "sunset": 1603403795, + "temp": { + "day": 9.95, + "min": 7.29, + "max": 11.27, + "night": 7.29, + "eve": 11.01, + "morn": 9.44 + }, + "feels_like": { + "day": 5.45, + "night": 2.63, + "eve": 8.07, + "morn": 5.65 + }, + "pressure": 1027, + "humidity": 57, + "dew_point": 2.03, + "wind_speed": 4, + "wind_deg": 283, + "weather": [ + { + "id": 802, + "main": "Clouds", + "description": "scattered clouds", + "icon": "03d" + } + ], + "clouds": 27, + "pop": 0, + "uvi": 2.36 + }, + { + "dt": 1603468800, + "sunrise": 1603452109, + "sunset": 1603490097, + "temp": { + "day": 12.02, + "min": 6.62, + "max": 17.04, + "night": 15.91, + "eve": 17.04, + "morn": 7.09 + }, + "feels_like": { + "day": 8.48, + "night": 11.82, + "eve": 12.58, + "morn": 3.07 + }, + "pressure": 1022, + "humidity": 72, + "dew_point": 7.29, + "wind_speed": 4.1, + "wind_deg": 147, + "weather": [ + { + "id": 500, + "main": "Rain", + "description": "light rain", + "icon": "10d" + } + ], + "clouds": 99, + "pop": 0.29, + "rain": 0.22, + "uvi": 2.2 + }, + { + "dt": 1603555200, + "sunrise": 1603538592, + "sunset": 1603576400, + "temp": { + "day": 8.39, + "min": 6.83, + "max": 15.86, + "night": 6.83, + "eve": 9.56, + "morn": 12.99 + }, + "feels_like": { + "day": 3.79, + "night": 3.04, + "eve": 6.58, + "morn": 10.39 + }, + "pressure": 1022, + "humidity": 58, + "dew_point": 0.71, + "wind_speed": 3.87, + "wind_deg": 10, + "weather": [ + { + "id": 500, + "main": "Rain", + "description": "light rain", + "icon": "10d" + } + ], + "clouds": 72, + "pop": 0.9, + "rain": 2.54, + "uvi": 2.07 + }, + { + "dt": 1603641600, + "sunrise": 1603625075, + "sunset": 1603662705, + "temp": { + "day": 5.33, + "min": 3.23, + "max": 7.24, + "night": 4.97, + "eve": 6.59, + "morn": 3.97 + }, + "feels_like": { + "day": 1.26, + "night": 0.02, + "eve": 2.58, + "morn": -0.34 + }, + "pressure": 1025, + "humidity": 61, + "dew_point": -5.56, + "wind_speed": 2.67, + "wind_deg": 37, + "weather": [ + { + "id": 803, + "main": "Clouds", + "description": "broken clouds", + "icon": "04d" + } + ], + "clouds": 74, + "pop": 0.08, + "uvi": 2.25 + }, + { + "dt": 1603728000, + "sunrise": 1603711558, + "sunset": 1603749010, + "temp": { + "day": 3.7, + "min": 2.09, + "max": 3.88, + "night": 3.54, + "eve": 3.54, + "morn": 2.09 + }, + "feels_like": { + "day": -0.28, + "night": -0.76, + "eve": -0.86, + "morn": -2.81 + }, + "pressure": 1021, + "humidity": 90, + "dew_point": 2.33, + "wind_speed": 3.35, + "wind_deg": 32, + "weather": [ + { + "id": 502, + "main": "Rain", + "description": "heavy intensity rain", + "icon": "10d" + } + ], + "clouds": 100, + "pop": 1, + "rain": 12.43 + } + ] +} \ No newline at end of file diff --git a/.config/awesome/awesome-wm-widgets/weather-widget/icons/VitalyGorbachev/broken-clouds-night.svg b/.config/awesome/awesome-wm-widgets/weather-widget/icons/VitalyGorbachev/broken-clouds-night.svg new file mode 100755 index 0000000..8b7fc48 --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/weather-widget/icons/VitalyGorbachev/broken-clouds-night.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/.config/awesome/awesome-wm-widgets/weather-widget/icons/VitalyGorbachev/broken-clouds.svg b/.config/awesome/awesome-wm-widgets/weather-widget/icons/VitalyGorbachev/broken-clouds.svg new file mode 100755 index 0000000..d42ea59 --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/weather-widget/icons/VitalyGorbachev/broken-clouds.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/.config/awesome/awesome-wm-widgets/weather-widget/icons/VitalyGorbachev/clear-sky-night.svg b/.config/awesome/awesome-wm-widgets/weather-widget/icons/VitalyGorbachev/clear-sky-night.svg new file mode 100755 index 0000000..44f096c --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/weather-widget/icons/VitalyGorbachev/clear-sky-night.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/.config/awesome/awesome-wm-widgets/weather-widget/icons/VitalyGorbachev/clear-sky.svg b/.config/awesome/awesome-wm-widgets/weather-widget/icons/VitalyGorbachev/clear-sky.svg new file mode 100755 index 0000000..dc82163 --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/weather-widget/icons/VitalyGorbachev/clear-sky.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/.config/awesome/awesome-wm-widgets/weather-widget/icons/VitalyGorbachev/few-clouds-night.svg b/.config/awesome/awesome-wm-widgets/weather-widget/icons/VitalyGorbachev/few-clouds-night.svg new file mode 100755 index 0000000..8b7fc48 --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/weather-widget/icons/VitalyGorbachev/few-clouds-night.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/.config/awesome/awesome-wm-widgets/weather-widget/icons/VitalyGorbachev/few-clouds.svg b/.config/awesome/awesome-wm-widgets/weather-widget/icons/VitalyGorbachev/few-clouds.svg new file mode 100755 index 0000000..d42ea59 --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/weather-widget/icons/VitalyGorbachev/few-clouds.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/.config/awesome/awesome-wm-widgets/weather-widget/icons/VitalyGorbachev/mist-night.svg b/.config/awesome/awesome-wm-widgets/weather-widget/icons/VitalyGorbachev/mist-night.svg new file mode 100755 index 0000000..960b07d --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/weather-widget/icons/VitalyGorbachev/mist-night.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/.config/awesome/awesome-wm-widgets/weather-widget/icons/VitalyGorbachev/mist.svg b/.config/awesome/awesome-wm-widgets/weather-widget/icons/VitalyGorbachev/mist.svg new file mode 100755 index 0000000..770f8d7 --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/weather-widget/icons/VitalyGorbachev/mist.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/.config/awesome/awesome-wm-widgets/weather-widget/icons/VitalyGorbachev/rain-night.svg b/.config/awesome/awesome-wm-widgets/weather-widget/icons/VitalyGorbachev/rain-night.svg new file mode 100755 index 0000000..11ecf00 --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/weather-widget/icons/VitalyGorbachev/rain-night.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/.config/awesome/awesome-wm-widgets/weather-widget/icons/VitalyGorbachev/rain.svg b/.config/awesome/awesome-wm-widgets/weather-widget/icons/VitalyGorbachev/rain.svg new file mode 100755 index 0000000..11ecf00 --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/weather-widget/icons/VitalyGorbachev/rain.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/.config/awesome/awesome-wm-widgets/weather-widget/icons/VitalyGorbachev/scattered-clouds-night.svg b/.config/awesome/awesome-wm-widgets/weather-widget/icons/VitalyGorbachev/scattered-clouds-night.svg new file mode 100755 index 0000000..8b7fc48 --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/weather-widget/icons/VitalyGorbachev/scattered-clouds-night.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/.config/awesome/awesome-wm-widgets/weather-widget/icons/VitalyGorbachev/scattered-clouds.svg b/.config/awesome/awesome-wm-widgets/weather-widget/icons/VitalyGorbachev/scattered-clouds.svg new file mode 100755 index 0000000..d42ea59 --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/weather-widget/icons/VitalyGorbachev/scattered-clouds.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/.config/awesome/awesome-wm-widgets/weather-widget/icons/VitalyGorbachev/shower-rain-night.svg b/.config/awesome/awesome-wm-widgets/weather-widget/icons/VitalyGorbachev/shower-rain-night.svg new file mode 100755 index 0000000..4d1897c --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/weather-widget/icons/VitalyGorbachev/shower-rain-night.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/.config/awesome/awesome-wm-widgets/weather-widget/icons/VitalyGorbachev/shower-rain.svg b/.config/awesome/awesome-wm-widgets/weather-widget/icons/VitalyGorbachev/shower-rain.svg new file mode 100755 index 0000000..4d1897c --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/weather-widget/icons/VitalyGorbachev/shower-rain.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/.config/awesome/awesome-wm-widgets/weather-widget/icons/VitalyGorbachev/snow-night.svg b/.config/awesome/awesome-wm-widgets/weather-widget/icons/VitalyGorbachev/snow-night.svg new file mode 100755 index 0000000..bee891e --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/weather-widget/icons/VitalyGorbachev/snow-night.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/.config/awesome/awesome-wm-widgets/weather-widget/icons/VitalyGorbachev/snow.svg b/.config/awesome/awesome-wm-widgets/weather-widget/icons/VitalyGorbachev/snow.svg new file mode 100755 index 0000000..e2ea140 --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/weather-widget/icons/VitalyGorbachev/snow.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/.config/awesome/awesome-wm-widgets/weather-widget/icons/VitalyGorbachev/thunderstorm-night.svg b/.config/awesome/awesome-wm-widgets/weather-widget/icons/VitalyGorbachev/thunderstorm-night.svg new file mode 100755 index 0000000..1813197 --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/weather-widget/icons/VitalyGorbachev/thunderstorm-night.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/.config/awesome/awesome-wm-widgets/weather-widget/icons/VitalyGorbachev/thunderstorm.svg b/.config/awesome/awesome-wm-widgets/weather-widget/icons/VitalyGorbachev/thunderstorm.svg new file mode 100755 index 0000000..44a733c --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/weather-widget/icons/VitalyGorbachev/thunderstorm.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/.config/awesome/awesome-wm-widgets/weather-widget/icons/weather-underground-icons/broken-clouds-night.png b/.config/awesome/awesome-wm-widgets/weather-widget/icons/weather-underground-icons/broken-clouds-night.png new file mode 100755 index 0000000..061d1cd Binary files /dev/null and b/.config/awesome/awesome-wm-widgets/weather-widget/icons/weather-underground-icons/broken-clouds-night.png differ diff --git a/.config/awesome/awesome-wm-widgets/weather-widget/icons/weather-underground-icons/broken-clouds.png b/.config/awesome/awesome-wm-widgets/weather-widget/icons/weather-underground-icons/broken-clouds.png new file mode 100755 index 0000000..5967d92 Binary files /dev/null and b/.config/awesome/awesome-wm-widgets/weather-widget/icons/weather-underground-icons/broken-clouds.png differ diff --git a/.config/awesome/awesome-wm-widgets/weather-widget/icons/weather-underground-icons/clear-sky-night.png b/.config/awesome/awesome-wm-widgets/weather-widget/icons/weather-underground-icons/clear-sky-night.png new file mode 100755 index 0000000..cc40d0f Binary files /dev/null and b/.config/awesome/awesome-wm-widgets/weather-widget/icons/weather-underground-icons/clear-sky-night.png differ diff --git a/.config/awesome/awesome-wm-widgets/weather-widget/icons/weather-underground-icons/clear-sky.png b/.config/awesome/awesome-wm-widgets/weather-widget/icons/weather-underground-icons/clear-sky.png new file mode 100755 index 0000000..acf8e5c Binary files /dev/null and b/.config/awesome/awesome-wm-widgets/weather-widget/icons/weather-underground-icons/clear-sky.png differ diff --git a/.config/awesome/awesome-wm-widgets/weather-widget/icons/weather-underground-icons/few-clouds-night.png b/.config/awesome/awesome-wm-widgets/weather-widget/icons/weather-underground-icons/few-clouds-night.png new file mode 100755 index 0000000..9c34fab Binary files /dev/null and b/.config/awesome/awesome-wm-widgets/weather-widget/icons/weather-underground-icons/few-clouds-night.png differ diff --git a/.config/awesome/awesome-wm-widgets/weather-widget/icons/weather-underground-icons/few-clouds.png b/.config/awesome/awesome-wm-widgets/weather-widget/icons/weather-underground-icons/few-clouds.png new file mode 100755 index 0000000..7580fc5 Binary files /dev/null and b/.config/awesome/awesome-wm-widgets/weather-widget/icons/weather-underground-icons/few-clouds.png differ diff --git a/.config/awesome/awesome-wm-widgets/weather-widget/icons/weather-underground-icons/mist-night.png b/.config/awesome/awesome-wm-widgets/weather-widget/icons/weather-underground-icons/mist-night.png new file mode 100755 index 0000000..102142a Binary files /dev/null and b/.config/awesome/awesome-wm-widgets/weather-widget/icons/weather-underground-icons/mist-night.png differ diff --git a/.config/awesome/awesome-wm-widgets/weather-widget/icons/weather-underground-icons/mist.png b/.config/awesome/awesome-wm-widgets/weather-widget/icons/weather-underground-icons/mist.png new file mode 100755 index 0000000..102142a Binary files /dev/null and b/.config/awesome/awesome-wm-widgets/weather-widget/icons/weather-underground-icons/mist.png differ diff --git a/.config/awesome/awesome-wm-widgets/weather-widget/icons/weather-underground-icons/rain-night.png b/.config/awesome/awesome-wm-widgets/weather-widget/icons/weather-underground-icons/rain-night.png new file mode 100755 index 0000000..49f0903 Binary files /dev/null and b/.config/awesome/awesome-wm-widgets/weather-widget/icons/weather-underground-icons/rain-night.png differ diff --git a/.config/awesome/awesome-wm-widgets/weather-widget/icons/weather-underground-icons/rain.png b/.config/awesome/awesome-wm-widgets/weather-widget/icons/weather-underground-icons/rain.png new file mode 100755 index 0000000..49f0903 Binary files /dev/null and b/.config/awesome/awesome-wm-widgets/weather-widget/icons/weather-underground-icons/rain.png differ diff --git a/.config/awesome/awesome-wm-widgets/weather-widget/icons/weather-underground-icons/scattered-clouds-night.png b/.config/awesome/awesome-wm-widgets/weather-widget/icons/weather-underground-icons/scattered-clouds-night.png new file mode 100755 index 0000000..63cb1b2 Binary files /dev/null and b/.config/awesome/awesome-wm-widgets/weather-widget/icons/weather-underground-icons/scattered-clouds-night.png differ diff --git a/.config/awesome/awesome-wm-widgets/weather-widget/icons/weather-underground-icons/scattered-clouds.png b/.config/awesome/awesome-wm-widgets/weather-widget/icons/weather-underground-icons/scattered-clouds.png new file mode 100755 index 0000000..63cb1b2 Binary files /dev/null and b/.config/awesome/awesome-wm-widgets/weather-widget/icons/weather-underground-icons/scattered-clouds.png differ diff --git a/.config/awesome/awesome-wm-widgets/weather-widget/icons/weather-underground-icons/shower-rain-night.png b/.config/awesome/awesome-wm-widgets/weather-widget/icons/weather-underground-icons/shower-rain-night.png new file mode 100755 index 0000000..49f0903 Binary files /dev/null and b/.config/awesome/awesome-wm-widgets/weather-widget/icons/weather-underground-icons/shower-rain-night.png differ diff --git a/.config/awesome/awesome-wm-widgets/weather-widget/icons/weather-underground-icons/shower-rain.png b/.config/awesome/awesome-wm-widgets/weather-widget/icons/weather-underground-icons/shower-rain.png new file mode 100755 index 0000000..49f0903 Binary files /dev/null and b/.config/awesome/awesome-wm-widgets/weather-widget/icons/weather-underground-icons/shower-rain.png differ diff --git a/.config/awesome/awesome-wm-widgets/weather-widget/icons/weather-underground-icons/snow-night.png b/.config/awesome/awesome-wm-widgets/weather-widget/icons/weather-underground-icons/snow-night.png new file mode 100755 index 0000000..0a7f006 Binary files /dev/null and b/.config/awesome/awesome-wm-widgets/weather-widget/icons/weather-underground-icons/snow-night.png differ diff --git a/.config/awesome/awesome-wm-widgets/weather-widget/icons/weather-underground-icons/snow.png b/.config/awesome/awesome-wm-widgets/weather-widget/icons/weather-underground-icons/snow.png new file mode 100755 index 0000000..0a7f006 Binary files /dev/null and b/.config/awesome/awesome-wm-widgets/weather-widget/icons/weather-underground-icons/snow.png differ diff --git a/.config/awesome/awesome-wm-widgets/weather-widget/icons/weather-underground-icons/thunderstorm-night.png b/.config/awesome/awesome-wm-widgets/weather-widget/icons/weather-underground-icons/thunderstorm-night.png new file mode 100755 index 0000000..2102104 Binary files /dev/null and b/.config/awesome/awesome-wm-widgets/weather-widget/icons/weather-underground-icons/thunderstorm-night.png differ diff --git a/.config/awesome/awesome-wm-widgets/weather-widget/icons/weather-underground-icons/thunderstorm.png b/.config/awesome/awesome-wm-widgets/weather-widget/icons/weather-underground-icons/thunderstorm.png new file mode 100755 index 0000000..2102104 Binary files /dev/null and b/.config/awesome/awesome-wm-widgets/weather-widget/icons/weather-underground-icons/thunderstorm.png differ diff --git a/.config/awesome/awesome-wm-widgets/weather-widget/locale/de.lua b/.config/awesome/awesome-wm-widgets/weather-widget/locale/de.lua new file mode 100755 index 0000000..2a9236a --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/weather-widget/locale/de.lua @@ -0,0 +1,13 @@ +local de = { + warning_title = "Wetter Widget", + parameter_warning = "Folgende benötigte Parameter fehlen: ", + directions = { + "N", "NNO", "NO", "ONO", "O", "OSO", "SO", "SSO", "S", "SSW", "SW", "WSW", "W", "WNW", "NW", "NNW", "N" + }, + feels_like = "Gefühlt: ", + wind = "Wind: ", + humidity = "Luftfeuchtigkeit: ", + uv = "UV-Index: " +} + +return de diff --git a/.config/awesome/awesome-wm-widgets/weather-widget/locale/en.lua b/.config/awesome/awesome-wm-widgets/weather-widget/locale/en.lua new file mode 100755 index 0000000..377dc6f --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/weather-widget/locale/en.lua @@ -0,0 +1,14 @@ +local en = { + warning_title = "Weather Widget", + parameter_warning = "Required parameters are not set: ", + directions = { + "N", "NNE", "NE", "ENE", "E", "ESE", "SE", "SSE", "S", "SSW", "SW", + "WSW", "W", "WNW", "NW", "NNW", "N" + }, + feels_like = "Feels like ", + wind = "Wind: ", + humidity = "Humidity: ", + uv = "UV: " +} + +return en diff --git a/.config/awesome/awesome-wm-widgets/weather-widget/locale/fr.lua b/.config/awesome/awesome-wm-widgets/weather-widget/locale/fr.lua new file mode 100755 index 0000000..de50814 --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/weather-widget/locale/fr.lua @@ -0,0 +1,14 @@ +local fr = { + warning_title = "Widget Météo", + parameter_warning = "Les paramètres suivants sont obligatoires : ", + directions = { + "N", "NNE", "NE", "ENE", "E", "ESE", "SE", "SSE", "S", "SSO", "SO", + "OSO", "O", "ONO", "NO", "NNO", "N" + }, + feels_like = "ressentie à ", + wind = "Vent : ", + humidity = "Humidité : ", + uv = "Indice UV : " +} + +return fr diff --git a/.config/awesome/awesome-wm-widgets/weather-widget/locale/pt.lua b/.config/awesome/awesome-wm-widgets/weather-widget/locale/pt.lua new file mode 100755 index 0000000..e7f4012 --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/weather-widget/locale/pt.lua @@ -0,0 +1,14 @@ +local pt = { + warning_title = "Widget do tempo", + parameter_warning = "Parâmetros necessários não definidos: ", + directions = { + "N", "NNE", "NE", "ENE", "L", "ESE", "SE", "SSE", "S", "SSO", "SO", + "OSO", "O", "ONO", "NO", "NNO", "N" + }, + feels_like = "Sensação de ", + wind = "Vento: ", + humidity = "Umidade: ", + uv = "UV: " +} + +return pt diff --git a/.config/awesome/awesome-wm-widgets/weather-widget/negative.png b/.config/awesome/awesome-wm-widgets/weather-widget/negative.png new file mode 100755 index 0000000..afcf567 Binary files /dev/null and b/.config/awesome/awesome-wm-widgets/weather-widget/negative.png differ diff --git a/.config/awesome/awesome-wm-widgets/weather-widget/weather-widget.png b/.config/awesome/awesome-wm-widgets/weather-widget/weather-widget.png new file mode 100755 index 0000000..c7fc37e Binary files /dev/null and b/.config/awesome/awesome-wm-widgets/weather-widget/weather-widget.png differ diff --git a/.config/awesome/awesome-wm-widgets/weather-widget/weather.lua b/.config/awesome/awesome-wm-widgets/weather-widget/weather.lua new file mode 100755 index 0000000..3ec1c3f --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/weather-widget/weather.lua @@ -0,0 +1,575 @@ +------------------------------------------------- +-- Weather Widget based on the OpenWeatherMap +-- https://openweathermap.org/ +-- +-- @author Pavel Makhov +-- @copyright 2020 Pavel Makhov +------------------------------------------------- +local awful = require("awful") +local watch = require("awful.widget.watch") +local json = require("json") +local naughty = require("naughty") +local wibox = require("wibox") +local gears = require("gears") +local beautiful = require("beautiful") + +local HOME_DIR = os.getenv("HOME") +local WIDGET_DIR = HOME_DIR .. '/.config/awesome/awesome-wm-widgets/weather-widget' +local GET_FORECAST_CMD = [[bash -c "curl -s --show-error -X GET '%s'"]] + +local SYS_LANG = os.getenv("LANG"):sub(1, 2) +if SYS_LANG == "C" or SYS_LANG == "C." then + -- C-locale is a common fallback for simple English + SYS_LANG = "en" +end +-- default language is ENglish +local LANG = gears.filesystem.file_readable(WIDGET_DIR .. "/" .. "locale/" .. + SYS_LANG .. ".lua") and SYS_LANG or "en" +local LCLE = require("awesome-wm-widgets.weather-widget.locale." .. LANG) + + +local function show_warning(message) + naughty.notify { + preset = naughty.config.presets.critical, + title = LCLE.warning_title, + text = message + } +end + +if SYS_LANG ~= LANG then + show_warning("Your language is not supported yet. Language set to English") +end + +local weather_widget = {} +local warning_shown = false +local tooltip = awful.tooltip { + mode = 'outside', + preferred_positions = {'bottom'} +} + +local weather_popup = awful.popup { + ontop = true, + visible = false, + shape = gears.shape.rounded_rect, + border_width = 1, + border_color = beautiful.bg_focus, + maximum_width = 400, + offset = {y = 5}, + hide_on_right_click = true, + widget = {} +} + +--- Maps openWeatherMap icon name to file name w/o extension +local icon_map = { + ["01d"] = "clear-sky", + ["02d"] = "few-clouds", + ["03d"] = "scattered-clouds", + ["04d"] = "broken-clouds", + ["09d"] = "shower-rain", + ["10d"] = "rain", + ["11d"] = "thunderstorm", + ["13d"] = "snow", + ["50d"] = "mist", + ["01n"] = "clear-sky-night", + ["02n"] = "few-clouds-night", + ["03n"] = "scattered-clouds-night", + ["04n"] = "broken-clouds-night", + ["09n"] = "shower-rain-night", + ["10n"] = "rain-night", + ["11n"] = "thunderstorm-night", + ["13n"] = "snow-night", + ["50n"] = "mist-night" +} + +--- Return wind direction as a string +local function to_direction(degrees) + -- Ref: https://www.campbellsci.eu/blog/convert-wind-directions + if degrees == nil then return "Unknown dir" end + local directions = LCLE.directions + return directions[math.floor((degrees % 360) / 22.5) + 1] +end + +--- Convert degrees Celsius to Fahrenheit +local function celsius_to_fahrenheit(c) return c * 9 / 5 + 32 end + +-- Convert degrees Fahrenheit to Celsius +local function fahrenheit_to_celsius(f) return (f - 32) * 5 / 9 end + +local function gen_temperature_str(temp, fmt_str, show_other_units, units) + local temp_str = string.format(fmt_str, temp) + local s = temp_str .. '°' .. (units == 'metric' and 'C' or 'F') + + if (show_other_units) then + local temp_conv, units_conv + if (units == 'metric') then + temp_conv = celsius_to_fahrenheit(temp) + units_conv = 'F' + else + temp_conv = fahrenheit_to_celsius(temp) + units_conv = 'C' + end + + local temp_conv_str = string.format(fmt_str, temp_conv) + s = s .. ' ' .. '(' .. temp_conv_str .. '°' .. units_conv .. ')' + end + return s +end + +local function uvi_index_color(uvi) + local color + if uvi >= 0 and uvi < 3 then color = '#A3BE8C' + elseif uvi >= 3 and uvi < 6 then color = '#EBCB8B' + elseif uvi >= 6 and uvi < 8 then color = '#D08770' + elseif uvi >= 8 and uvi < 11 then color = '#BF616A' + elseif uvi >= 11 then color = '#B48EAD' + end + + return '' .. uvi .. '' +end + +local function worker(user_args) + + local args = user_args or {} + + --- Validate required parameters + if args.coordinates == nil or args.api_key == nil then + show_warning(LCLE.parameter_warning .. + (args.coordinates == nil and 'coordinates' or '') .. + (args.api_key == nil and ', api_key ' or '')) + return + end + + local coordinates = args.coordinates + local api_key = args.api_key + local font_name = args.font_name or beautiful.font:gsub("%s%d+$", "") + local units = args.units or 'metric' + local time_format_12h = args.time_format_12h + local both_units_widget = args.both_units_widget or false + local show_hourly_forecast = args.show_hourly_forecast + local show_daily_forecast = args.show_daily_forecast + local icon_pack_name = args.icons or 'weather-underground-icons' + local icons_extension = args.icons_extension or '.png' + local timeout = args.timeout or 120 + + local ICONS_DIR = WIDGET_DIR .. '/icons/' .. icon_pack_name .. '/' + local owm_one_cal_api = + ('https://api.openweathermap.org/data/2.5/onecall' .. + '?lat=' .. coordinates[1] .. '&lon=' .. coordinates[2] .. '&appid=' .. api_key .. + '&units=' .. units .. '&exclude=minutely' .. + (show_hourly_forecast == false and ',hourly' or '') .. + (show_daily_forecast == false and ',daily' or '') .. + '&lang=' .. LANG) + + weather_widget = wibox.widget { + { + { + { + { + id = 'icon', + resize = true, + widget = wibox.widget.imagebox + }, + valign = 'center', + widget = wibox.container.place, + }, + { + id = 'txt', + widget = wibox.widget.textbox + }, + layout = wibox.layout.fixed.horizontal, + }, + left = 4, + right = 4, + layout = wibox.container.margin + }, + shape = function(cr, width, height) + gears.shape.rounded_rect(cr, width, height, 4) + end, + widget = wibox.container.background, + set_image = function(self, path) + self:get_children_by_id('icon')[1].image = path + end, + set_text = function(self, text) + self:get_children_by_id('txt')[1].text = text + end, + is_ok = function(self, is_ok) + if is_ok then + self:get_children_by_id('icon')[1]:set_opacity(1) + self:get_children_by_id('icon')[1]:emit_signal('widget:redraw_needed') + else + self:get_children_by_id('icon')[1]:set_opacity(0.2) + self:get_children_by_id('icon')[1]:emit_signal('widget:redraw_needed') + end + end + } + + local current_weather_widget = wibox.widget { + { + { + { + id = 'icon', + resize = true, + forced_width = 128, + forced_height = 128, + widget = wibox.widget.imagebox + }, + align = 'center', + widget = wibox.container.place + }, + { + id = 'description', + font = font_name .. ' 10', + align = 'center', + widget = wibox.widget.textbox + }, + forced_width = 128, + layout = wibox.layout.align.vertical + }, + { + { + { + id = 'temp', + font = font_name .. ' 36', + widget = wibox.widget.textbox + }, + { + id = 'feels_like_temp', + align = 'center', + font = font_name .. ' 9', + widget = wibox.widget.textbox + }, + layout = wibox.layout.fixed.vertical + }, + { + { + id = 'wind', + font = font_name .. ' 9', + widget = wibox.widget.textbox + }, + { + id = 'humidity', + font = font_name .. ' 9', + widget = wibox.widget.textbox + }, + { + id = 'uv', + font = font_name .. ' 9', + widget = wibox.widget.textbox + }, + expand = 'inside', + layout = wibox.layout.align.vertical + }, + spacing = 16, + forced_width = 150, + layout = wibox.layout.fixed.vertical + }, + forced_width = 300, + layout = wibox.layout.flex.horizontal, + update = function(self, weather) + self:get_children_by_id('icon')[1]:set_image( + ICONS_DIR .. icon_map[weather.weather[1].icon] .. icons_extension) + self:get_children_by_id('temp')[1]:set_text(gen_temperature_str(weather.temp, '%.0f', false, units)) + self:get_children_by_id('feels_like_temp')[1]:set_text( + LCLE.feels_like .. gen_temperature_str(weather.feels_like, '%.0f', false, units)) + self:get_children_by_id('description')[1]:set_text(weather.weather[1].description) + self:get_children_by_id('wind')[1]:set_markup( + LCLE.wind .. '' .. weather.wind_speed .. 'm/s (' .. to_direction(weather.wind_deg) .. ')') + self:get_children_by_id('humidity')[1]:set_markup(LCLE.humidity .. '' .. weather.humidity .. '%') + self:get_children_by_id('uv')[1]:set_markup(LCLE.uv .. uvi_index_color(weather.uvi)) + end + } + + + local daily_forecast_widget = { + forced_width = 300, + layout = wibox.layout.flex.horizontal, + update = function(self, forecast, timezone_offset) + local count = #self + for i = 0, count do self[i]=nil end + for i, day in ipairs(forecast) do + if i > 5 then break end + local day_forecast = wibox.widget { + { + text = os.date('%a', tonumber(day.dt) + tonumber(timezone_offset)), + align = 'center', + font = font_name .. ' 9', + widget = wibox.widget.textbox + }, + { + { + { + image = ICONS_DIR .. icon_map[day.weather[1].icon] .. icons_extension, + resize = true, + forced_width = 48, + forced_height = 48, + widget = wibox.widget.imagebox + }, + align = 'center', + layout = wibox.container.place + }, + { + text = day.weather[1].description, + font = font_name .. ' 8', + align = 'center', + forced_height = 50, + widget = wibox.widget.textbox + }, + layout = wibox.layout.fixed.vertical + }, + { + { + text = gen_temperature_str(day.temp.day, '%.0f', false, units), + align = 'center', + font = font_name .. ' 9', + widget = wibox.widget.textbox + }, + { + text = gen_temperature_str(day.temp.night, '%.0f', false, units), + align = 'center', + font = font_name .. ' 9', + widget = wibox.widget.textbox + }, + layout = wibox.layout.fixed.vertical + }, + spacing = 8, + layout = wibox.layout.fixed.vertical + } + table.insert(self, day_forecast) + end + end + } + + local hourly_forecast_graph = wibox.widget { + step_width = 12, + color = '#EBCB8B', + background_color = beautiful.bg_normal, + forced_height = 100, + forced_width = 300, + widget = wibox.widget.graph, + set_max_value = function(self, new_max_value) + self.max_value = new_max_value + end, + set_min_value = function(self, new_min_value) + self.min_value = new_min_value + end + } + local hourly_forecast_negative_graph = wibox.widget { + step_width = 12, + color = '#5E81AC', + background_color = beautiful.bg_normal, + forced_height = 100, + forced_width = 300, + widget = wibox.widget.graph, + set_max_value = function(self, new_max_value) + self.max_value = new_max_value + end, + set_min_value = function(self, new_min_value) + self.min_value = new_min_value + end + } + + local hourly_forecast_widget = { + layout = wibox.layout.fixed.vertical, + update = function(self, hourly) + local hours_below = { + id = 'hours', + forced_width = 300, + layout = wibox.layout.flex.horizontal + } + local temp_below = { + id = 'temp', + forced_width = 300, + layout = wibox.layout.flex.horizontal + } + + local max_temp = -1000 + local min_temp = 1000 + local values = {} + for i, hour in ipairs(hourly) do + if i > 25 then break end + values[i] = hour.temp + if max_temp < hour.temp then max_temp = hour.temp end + if min_temp > hour.temp then min_temp = hour.temp end + if (i - 1) % 5 == 0 then + table.insert(hours_below, wibox.widget { + text = os.date(time_format_12h and '%I%p' or '%H:00', tonumber(hour.dt)), + align = 'center', + font = font_name .. ' 9', + widget = wibox.widget.textbox + }) + table.insert(temp_below, wibox.widget { + markup = '' + .. string.format('%.0f', hour.temp) .. '°' .. '', + align = 'center', + font = font_name .. ' 9', + widget = wibox.widget.textbox + }) + end + end + + hourly_forecast_graph:set_max_value(math.max(max_temp, math.abs(min_temp))) + hourly_forecast_graph:set_min_value(min_temp > 0 and min_temp * 0.7 or 0) -- move graph a bit up + + hourly_forecast_negative_graph:set_max_value(math.abs(min_temp)) + hourly_forecast_negative_graph:set_min_value(max_temp < 0 and math.abs(max_temp) * 0.7 or 0) + + for _, value in ipairs(values) do + if value >= 0 then + hourly_forecast_graph:add_value(value) + hourly_forecast_negative_graph:add_value(0) + else + hourly_forecast_graph:add_value(0) + hourly_forecast_negative_graph:add_value(math.abs(value)) + end + end + + local count = #self + for i = 0, count do self[i]=nil end + + -- all temperatures are positive + if min_temp > 0 then + table.insert(self, wibox.widget{ + { + hourly_forecast_graph, + reflection = {horizontal = true}, + widget = wibox.container.mirror + }, + { + temp_below, + valign = 'bottom', + widget = wibox.container.place + }, + id = 'graph', + layout = wibox.layout.stack + }) + table.insert(self, hours_below) + + -- all temperatures are negative + elseif max_temp < 0 then + table.insert(self, hours_below) + table.insert(self, wibox.widget{ + { + hourly_forecast_negative_graph, + reflection = {horizontal = true, vertical = true}, + widget = wibox.container.mirror + }, + { + temp_below, + valign = 'top', + widget = wibox.container.place + }, + id = 'graph', + layout = wibox.layout.stack + }) + + -- there are both negative and positive temperatures + else + table.insert(self, wibox.widget{ + { + hourly_forecast_graph, + reflection = {horizontal = true}, + widget = wibox.container.mirror + }, + { + temp_below, + valign = 'bottom', + widget = wibox.container.place + }, + id = 'graph', + layout = wibox.layout.stack + }) + table.insert(self, wibox.widget{ + { + hourly_forecast_negative_graph, + reflection = {horizontal = true, vertical = true}, + widget = wibox.container.mirror + }, + { + hours_below, + valign = 'top', + widget = wibox.container.place + }, + id = 'graph', + layout = wibox.layout.stack + }) + end + end + } + + local function update_widget(widget, stdout, stderr) + if stderr ~= '' then + if not warning_shown then + if (stderr ~= 'curl: (52) Empty reply from server' + and stderr ~= 'curl: (28) Failed to connect to api.openweathermap.org port 443: Connection timed out' + and stderr:find('^curl: %(18%) transfer closed with %d+ bytes remaining to read$') ~= nil + ) then + show_warning(stderr) + end + warning_shown = true + widget:is_ok(false) + tooltip:add_to_object(widget) + + widget:connect_signal('mouse::enter', function() tooltip.text = stderr end) + end + return + end + + warning_shown = false + tooltip:remove_from_object(widget) + widget:is_ok(true) + + local result = json.decode(stdout) + + widget:set_image(ICONS_DIR .. icon_map[result.current.weather[1].icon] .. icons_extension) + widget:set_text(gen_temperature_str(result.current.temp, '%.0f', both_units_widget, units)) + + current_weather_widget:update(result.current) + + local final_widget = { + current_weather_widget, + spacing = 16, + layout = wibox.layout.fixed.vertical + } + + if show_hourly_forecast then + hourly_forecast_widget:update(result.hourly) + table.insert(final_widget, hourly_forecast_widget) + end + + if show_daily_forecast then + daily_forecast_widget:update(result.daily, result.timezone_offset) + table.insert(final_widget, daily_forecast_widget) + end + + weather_popup:setup({ + { + final_widget, + margins = 10, + widget = wibox.container.margin + }, + bg = beautiful.bg_normal, + widget = wibox.container.background + }) + end + + weather_widget:buttons(gears.table.join(awful.button({}, 1, function() + if weather_popup.visible then + weather_widget:set_bg('#00000000') + weather_popup.visible = not weather_popup.visible + else + weather_widget:set_bg(beautiful.bg_focus) + weather_popup:move_next_to(mouse.current_widget_geometry) + end + end))) + + watch( + string.format(GET_FORECAST_CMD, owm_one_cal_api), + timeout, -- API limit is 1k req/day; day has 1440 min; every 2 min is good + update_widget, weather_widget + ) + + return weather_widget +end + +return setmetatable(weather_widget, {__call = function(_, ...) return worker(...) end}) diff --git a/.config/awesome/awesome-wm-widgets/widgets-icons.png b/.config/awesome/awesome-wm-widgets/widgets-icons.png new file mode 100755 index 0000000..ba9c551 Binary files /dev/null and b/.config/awesome/awesome-wm-widgets/widgets-icons.png differ diff --git a/.config/awesome/awesome-wm-widgets/word-clock-widget/README.md b/.config/awesome/awesome-wm-widgets/word-clock-widget/README.md new file mode 100755 index 0000000..9bf1032 --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/word-clock-widget/README.md @@ -0,0 +1,74 @@ +# word clock widget + +Widget displaying current time using words: + +![screenshot](./screenshots/halfpastthree.png) + +## Customization + +It is possible to customize widget by providing a table with all or some of the following config parameters: + +| Name | Default | Description | +|---|---|---| +| main_color | `beautiful.fg_normal` | Color of the word on odd position | +| accent_color | `beautiful.fg_urgent` | Color of the word on even position | +| font | `beautiful.font` | Font (`Play 20`) | +| is_human_readable | `false` | _nine fifteen_ or _fifteen past nine_ | +| military_time | `false` | 12 or 24 time format | +| with_spaces | `false` | Separate words with spaces | + +## Installation + +Clone repo, include widget and use it in **rc.lua**: + +```lua +local word_clock = require("awesome-wm-widgets.word-clock-widget.word-clock") +... +s.mytasklist, -- Middle widget + { -- Right widgets + layout = wibox.layout.fixed.horizontal, + ... + word_clock(), + ... +``` + +# Screenshots + +```lua + word_clock{ + font = 'Carter One 12', + accent_color = '#ff79c6', + main_color = '#8be9fd', + is_human_readable = true, +} +``` +![](./screenshots/halfpastthree_color.png) + + +```lua +word_clock{ + font = 'Carter One 12', + is_human_readable = true, +} +``` +![](./screenshots/twentythreepastnine.png) + + +```lua +word_clock{ + font = 'Carter One 12', + is_human_readable = true, + military_time = true +} +``` +![](./screenshots/twentythreepasttwentyone.png) + + +```lua +word_clock{ + font = 'Carter One 12', + accent_color = '#f00', + main_color = '#0f0', +} +``` +![](./screenshots/onetwentyseven.png) diff --git a/.config/awesome/awesome-wm-widgets/word-clock-widget/screenshots/halfpastthree.png b/.config/awesome/awesome-wm-widgets/word-clock-widget/screenshots/halfpastthree.png new file mode 100755 index 0000000..af9e0d9 Binary files /dev/null and b/.config/awesome/awesome-wm-widgets/word-clock-widget/screenshots/halfpastthree.png differ diff --git a/.config/awesome/awesome-wm-widgets/word-clock-widget/screenshots/halfpastthree_color.png b/.config/awesome/awesome-wm-widgets/word-clock-widget/screenshots/halfpastthree_color.png new file mode 100755 index 0000000..3c2cdd7 Binary files /dev/null and b/.config/awesome/awesome-wm-widgets/word-clock-widget/screenshots/halfpastthree_color.png differ diff --git a/.config/awesome/awesome-wm-widgets/word-clock-widget/screenshots/onetwentyseven.png b/.config/awesome/awesome-wm-widgets/word-clock-widget/screenshots/onetwentyseven.png new file mode 100755 index 0000000..08e852c Binary files /dev/null and b/.config/awesome/awesome-wm-widgets/word-clock-widget/screenshots/onetwentyseven.png differ diff --git a/.config/awesome/awesome-wm-widgets/word-clock-widget/screenshots/testpasttwentyone.png b/.config/awesome/awesome-wm-widgets/word-clock-widget/screenshots/testpasttwentyone.png new file mode 100755 index 0000000..41d266f Binary files /dev/null and b/.config/awesome/awesome-wm-widgets/word-clock-widget/screenshots/testpasttwentyone.png differ diff --git a/.config/awesome/awesome-wm-widgets/word-clock-widget/screenshots/twentythreepastnine.png b/.config/awesome/awesome-wm-widgets/word-clock-widget/screenshots/twentythreepastnine.png new file mode 100755 index 0000000..7d18e22 Binary files /dev/null and b/.config/awesome/awesome-wm-widgets/word-clock-widget/screenshots/twentythreepastnine.png differ diff --git a/.config/awesome/awesome-wm-widgets/word-clock-widget/screenshots/twentythreepasttwentyone.png b/.config/awesome/awesome-wm-widgets/word-clock-widget/screenshots/twentythreepasttwentyone.png new file mode 100755 index 0000000..8a8218f Binary files /dev/null and b/.config/awesome/awesome-wm-widgets/word-clock-widget/screenshots/twentythreepasttwentyone.png differ diff --git a/.config/awesome/awesome-wm-widgets/word-clock-widget/word-clock.lua b/.config/awesome/awesome-wm-widgets/word-clock-widget/word-clock.lua new file mode 100755 index 0000000..12d5d83 --- /dev/null +++ b/.config/awesome/awesome-wm-widgets/word-clock-widget/word-clock.lua @@ -0,0 +1,140 @@ +------------------------------------------------- +-- Text Clock Widget for Awesome Window Manager +-- Shows current time in words, e.g. 11.54 -> eleven fifty four +-- More details could be found here: +-- https://github.com/streetturtle/awesome-wm-widgets/tree/master/text-clock-widget + +-- @author Pavel Makhov +-- @copyright 2020 Pavel Makhov +------------------------------------------------- + +local wibox = require("wibox") +local beautiful = require("beautiful") +local gears = require("gears") + +local function tablelength(T) + local count = 0 + for _ in pairs(T) do count = count + 1 end + return count +end + +local function split(string_to_split, separator) + if separator == nil then separator = "%s" end + local t = {} + + for str in string.gmatch(string_to_split, "([^".. separator .."]+)") do + table.insert(t, str) + end + + return t +end + +local function convertNumberToName(num) + local lowNames = {"zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine", + "ten", "eleven", "twelve", "thirteen", "fourteen", "fifteen", "sixteen", "seventeen", + "eighteen", "nineteen"}; + local tensNames = {"twenty", "thirty", "forty", "fifty", "sixty", "seventy", "eighty", "ninety"} + local tens, ones, result + + if num < tablelength(lowNames) then + result = lowNames[num + 1]; + else + tens = math.floor(num / 10); + ones = num % 10; + if (tens <= 9) then + result = tensNames[tens - 2 + 1]; + if (ones > 0) then + result = result .. " " .. lowNames[ones + 1]; + end + else + result = "unknown" + end + end + return result; +end + +local text_clock = {} + +local function worker(user_args) + + local args = user_args or {} + + local main_color = args.main_color or beautiful.fg_normal + local accent_color = args.accent_color or beautiful.fg_urgent + local font = args.font or beautiful.font + local is_human_readable = args.is_human_readable + local military_time = args.military_time + local with_spaces = args.with_spaces + + if military_time == nil then military_time = false end + if with_spaces == nil then with_spaces = false end + if is_human_readable == nil then is_human_readable = false end + + text_clock = wibox.widget { + { + id = 'clock', + font = font, + widget = wibox.widget.textbox, + }, + layout = wibox.layout.align.horizontal, + set_text = function(self, time) + local t = split(time) + local res = '' + for i, v in ipairs(t) do + res = res .. '' .. v .. '' + .. (with_spaces and ' ' or '') + end + self:get_children_by_id('clock')[1]:set_markup(res) + end + } + + gears.timer { + timeout = 1, + call_now = true, + autostart = true, + callback = function() + local time = os.date((military_time and '%H' or '%I') .. ':%M') + local h,m = time:match('(%d+):(%d+)') + local min = tonumber(m) + local hour = tonumber(h) + + if is_human_readable then + + if min == 0 then + text_clock:set_text(convertNumberToName(hour) .. " o'clock") + else + local mm + if min == 15 or min == 45 then + mm = 'quater' + elseif min == 30 then + mm = 'half' + else + mm = convertNumberToName((min < 31) and min or 60 - min) + end + + local to_past + + if min < 31 then + to_past = 'past' + else + to_past = 'to' + hour = hour + 1 + end + + text_clock:set_text(mm .. ' ' .. to_past .. ' ' .. convertNumberToName(hour)) + end + else + text_clock:set_text(convertNumberToName(hour) .. ' ' .. convertNumberToName(min)) + end + end + } + + return text_clock + +end + +return setmetatable(text_clock, { __call = function(_, ...) + return worker(...) +end }) \ No newline at end of file diff --git a/.config/awesome/bling/.editorconfig b/.config/awesome/bling/.editorconfig new file mode 100755 index 0000000..33997d4 --- /dev/null +++ b/.config/awesome/bling/.editorconfig @@ -0,0 +1,24 @@ +root = true + +[*] +charset = utf-8 +end_of_line = lf +indent_size = 4 +indent_style = tab +trim_trailing_whitespace = true + +[*.lua] +indent_size = 4 +indent_style = space +max_line_length = 80 + +[*.yml] +indent_size = 2 +indent_style = space + +[*.{html,css}] +indent_size = 2 +indent_style = space + +[*.md] +trim_trailing_whitespace = false diff --git a/.config/awesome/bling/AUTHORS.md b/.config/awesome/bling/AUTHORS.md new file mode 100755 index 0000000..471cad5 --- /dev/null +++ b/.config/awesome/bling/AUTHORS.md @@ -0,0 +1,10 @@ +The following developers have contributed major code to bling: + + * [Nooo37](https://github.com/Nooo37) + * [JavaCafe01](https://github.com/JavaCafe01) + * [Grumph](https://github.com/Grumph) + * [Bysmutheye](https://github.com/Bysmutheye) + * [HumblePresent](https://github.com/HumblePresent) + * [Kasper24](https://github.com/Kasper24) + * [undefinedDarkness](https://github.com/undefinedDarkness) + * [eylles](https://github.com/eylles) diff --git a/.config/awesome/bling/CODEOWNERS b/.config/awesome/bling/CODEOWNERS new file mode 100755 index 0000000..50f5c5c --- /dev/null +++ b/.config/awesome/bling/CODEOWNERS @@ -0,0 +1,2 @@ +/module/* @Nooo37 +/widget/* @JavaCafe01 diff --git a/.config/awesome/bling/LICENSE b/.config/awesome/bling/LICENSE new file mode 100755 index 0000000..f8bc52d --- /dev/null +++ b/.config/awesome/bling/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2021 BlingCorp + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/.config/awesome/bling/README.md b/.config/awesome/bling/README.md new file mode 100755 index 0000000..fd46651 --- /dev/null +++ b/.config/awesome/bling/README.md @@ -0,0 +1,41 @@ +

+ +

+

+ +All documentation, instructions, and previews are [here](https://blingcorp.github.io/bling/). + +## Features + +- Layouts + - mstab (master-slave tab layout) + - centered + - vertical + - horizontal + - equalarea +- Modules + - Flash Focus + - Tabbed container + - Tiled Wallpaper + - Wallpaper Easy Setup + - Window Swallowing + - Scratchpad +- Signals + - Playerctl +- Widgets + - Tag Preview + - Task Preview + +All naming credit goes to [JavaCafe01](https://github.com/JavaCafe01). + +### Dependencies + +In order to use the `tabbed` modules `pick` function, you need to install `xwininfo`. + +## Contributing + +Contributions are welcome 💛 + +Before requesting changes, makes sure that your editor has an "editorconfig" extension installed, this will use our code style everytime when you edit in the `bling` folder. + +When adding a layout/module/signal/widget, please add theme variables for customization and add the according documentation under `docs`. diff --git a/.config/awesome/bling/bling-dev-1.rockspec b/.config/awesome/bling/bling-dev-1.rockspec new file mode 100755 index 0000000..575d3f0 --- /dev/null +++ b/.config/awesome/bling/bling-dev-1.rockspec @@ -0,0 +1,63 @@ +package = "bling" +version = "dev-1" + +source = { + url = "git://github.com/BlingCorp/bling", + branch = "master", +} + +description = { + summary = "Utilities for the AwesomeWM", + detailed = [[ + This module extends the Awesome window manager with alternative layouts, + flash focus, tabbing, a simple tiling wallpaper generator, a declarative + wallpaper setter, window swallowing and a playerctl signal. + ]], + homepage = "https://github.com/BlingCorp/bling", + license = "MIT", +} + +dependencies = { + "lua >= 5.1", +} + +build = { + type = "builtin", + modules = { + ["bling"] = "init.lua", + ["bling.helpers"] = "helpers/init.lua", + ["bling.helpers.client"] = "helpers/client.lua", + ["bling.helpers.color"] = "helpers/color.lua", + ["bling.helpers.filesystem"] = "helpers/filesystem.lua", + ["bling.helpers.shape"] = "helpers/shape.lua", + ["bling.helpers.time"] = "helpers/time.lua", + ["bling.layout"] = "layout/init.lua", + ["bling.layout.centered"] = "layout/centered.lua", + ["bling.layout.deck"] = "layout/deck.lua", + ["bling.layout.equalarea"] = "layout/equalarea.lua", + ["bling.layout.horizontal"] = "layout/horizontal.lua", + ["bling.layout.mstab"] = "layout/mstab.lua", + ["bling.layout.vertical"] = "layout/vertical.lua", + ["bling.module"] = "module/init.lua", + ["bling.module.flash_focus"] = "module/flash_focus.lua", + ["bling.module.scratchpad"] = "module/scratchpad.lua", + ["bling.module.tabbed"] = "module/tabbed.lua", + ["bling.module.tiled_wallpaper"] = "module/tiled_wallpaper.lua", + ["bling.module.wallpaper"] = "module/wallpaper.lua", + ["bling.module.window_swallowing"] = "module/window_swallowing.lua", + ["bling.signal"] = "signal/init.lua", + ["bling.signal.playerctl"] = "signal/playerctl/init.lua", + ["bling.signal.playerctl.playerctl_cli"] = "signal/playerctl/playerctl_cli.lua", + ["bling.signal.playerctl.playerctl_lib"] = "signal/playerctl/playerctl_lib.lua", + ["bling.widget"] = "widget/init.lua", + ["bling.widget.tabbar.boxes"] = "widget/tabbar/boxes.lua", + ["bling.widget.tabbar.default"] = "widget/tabbar/default.lua", + ["bling.widget.tabbar.modern"] = "widget/tabbar/modern.lua", + ["bling.widget.tabbed_misc"] = "widget/tabbed_misc/init.lua", + ["bling.widget.tabbed_misc.custom_tasklist"] = "widget/tabbed_misc/custom_tasklist.lua", + ["bling.widget.tabbed_misc.titlebar_indicator"] = "widget/tabbed_misc/titlebar_indicator.lua", + ["bling.widget.tag_preview"] = "widget/tag_preview.lua", + ["bling.widget.task_preview"] = "widget/task_preview.lua", + ["bling.widget.window_switcher"] = "widget/window_switcher.lua", + }, +} diff --git a/.config/awesome/bling/docs/.nojekyll b/.config/awesome/bling/docs/.nojekyll new file mode 100755 index 0000000..e69de29 diff --git a/.config/awesome/bling/docs/_sidebar.md b/.config/awesome/bling/docs/_sidebar.md new file mode 100755 index 0000000..9216d34 --- /dev/null +++ b/.config/awesome/bling/docs/_sidebar.md @@ -0,0 +1,23 @@ +- [Home](home.md) + +- [Layouts](layouts/layout.md) + +- Modules + - [Flash Focus](module/flash.md) + - [Tabbed](module/tabbed.md) + - [Tiled Wallpaper](module/twall.md) + - [Wallpaper Easy Setup](module/wall.md) + - [Window Swallowing](module/swal.md) + - [Scratchpad](module/scratch.md) + +- Signals + - [Playerctl](signals/pctl.md) + +- Widgets + - [Tag Preview](widgets/tag_preview.md) + - [Task Preview](widgets/task_preview.md) + - [Tabbed Misc](widgets/tabbed_misc.md) + - [Window Switcher](widgets/window_switcher.md) + +- Extra + - [Theme Variable Template](theme.md) diff --git a/.config/awesome/bling/docs/home.md b/.config/awesome/bling/docs/home.md new file mode 100755 index 0000000..6a35a11 --- /dev/null +++ b/.config/awesome/bling/docs/home.md @@ -0,0 +1,34 @@ +#
🌟 Bling - Utilities for AwesomeWM 🌟
+ +## Why + +[AwesomeWM](https://awesomewm.org/) is literally what it stands for, an awesome window manager. + +Its unique selling point has always been the widget system, which allows for fancy buttons, sliders, bars, dashboards and anything you can imagine. But that feature can be a curse. Most modules focus on the widget side of things which leave the actual window managing part of AwesomeWM underdeveloped compared to, for example, [xmonad](https://xmonad.org/) even though it's probably just as powerfull in that area. + +This project focuses on that problem - adding new layouts and modules that make use of the widget system, but primarily focus on the new window managing features. + +## Installation +- clone this repo into your `~/.config/awesome` folder + - `git clone https://github.com/BlingCorp/bling.git ~/.config/awesome/bling` +- require the module in your `rc.lua`, and make sure it's under the beautiful module initialization + +```lua +-- other imports + +local beautiful = require("beautiful") + +-- other configuration stuff here + +beautiful.init("some_theme.lua") +local bling = require("bling") +``` + +## Contributors +A special thanks to all our contributors... + + + + + +Made with [contributors-img](https://contrib.rocks). diff --git a/.config/awesome/bling/docs/index.html b/.config/awesome/bling/docs/index.html new file mode 100755 index 0000000..ea8d732 --- /dev/null +++ b/.config/awesome/bling/docs/index.html @@ -0,0 +1,28 @@ + + + + + Bling Docs + + + + + + + +
+ + + + + + diff --git a/.config/awesome/bling/docs/javacafe.css b/.config/awesome/bling/docs/javacafe.css new file mode 100755 index 0000000..18962da --- /dev/null +++ b/.config/awesome/bling/docs/javacafe.css @@ -0,0 +1,1069 @@ +@import url("https://fonts.googleapis.com/css?family=Roboto+Mono|Source+Sans+Pro:300,400,600"); + +* { + -webkit-font-smoothing: antialiased; + -webkit-overflow-scrolling: touch; + -webkit-tap-highlight-color: #ffffff; + -webkit-text-size-adjust: none; + -webkit-touch-callout: none; + box-sizing: border-box; +} + +body:not(.ready) { + overflow: hidden; +} + +body:not(.ready) [data-cloak], +body:not(.ready) .app-nav, +body:not(.ready) > nav { + display: none; +} + +::-webkit-scrollbar, +::-webkit-scrollbar-track, +::-webkit-scrollbar-track-piece { + background: transparent !important; + -webkit-box-shadow: none !important; + -moz-box-shadow: none !important; + box-shadow: none !important; + border: none !important; + width: 8px !important; +} +::-webkit-scrollbar-thumb { + background:#29343d !important; + width:8px !important; + border: none !important; + border-radius: 2px !important; +} + + +div#app { + font-size: 30px; + font-weight: lighter; + margin: 40vh auto; + text-align: center; +} + +div#app:empty::before { + content: 'Loading...'; +} + +.emoji { + height: 1.2rem; + vertical-align: middle; +} + +.progress { + background-color: var(--theme-color, #7ed491); + height: 2px; + left: 0px; + position: fixed; + right: 0px; + top: 0px; + transition: width 0.2s, opacity 0.4s; + width: 0%; + z-index: 999999; +} + +.search a:hover { + color: var(--theme-color, #7ed491); +} + +.search .search-keyword { + color: var(--theme-color, #7ed491); + font-style: normal; + font-weight: bold; +} + +html, +body { + height: 100%; +} + +body { + -moz-osx-font-smoothing: grayscale; + -webkit-font-smoothing: antialiased; + color: #34495e; + font-family: 'Source Sans Pro', 'Helvetica Neue', Arial, sans-serif; + font-size: 15px; + letter-spacing: 0; + margin: 0; + overflow-x: hidden; +} + +img { + max-width: 65%; +} + +a[disabled] { + cursor: not-allowed; + opacity: 0.6; +} + +kbd { + border: solid 1px #ccc; + border-radius: 3px; + display: inline-block; + font-size: 12px !important; + line-height: 12px; + margin-bottom: 3px; + padding: 3px 5px; + vertical-align: middle; +} + +li input[type='checkbox'] { + margin: 0 0.2em 0.25em 0; + vertical-align: middle; +} + +.app-nav { + margin: 25px 60px 0 0; + position: absolute; + right: 0; + text-align: right; + z-index: 10; +/* navbar dropdown */ +} + +.app-nav.no-badge { + margin-right: 25px; +} + +.app-nav p { + margin: 0; +} + +.app-nav > a { + margin: 0 1rem; + padding: 5px 0; +} + +.app-nav ul, +.app-nav li { + display: inline-block; + list-style: none; + margin: 0; +} + +.app-nav a { + color: inherit; + font-size: 16px; + text-decoration: none; + transition: color 0.3s; +} + +.app-nav a:hover { + color: var(--theme-color, #7ed491); +} + +.app-nav a.active { + border-bottom: 2px solid var(--theme-color, #7ed491); + color: var(--theme-color, #7ed491); +} + +.app-nav li { + display: inline-block; + margin: 0 1rem; + padding: 5px 0; + position: relative; + cursor: pointer; +} + +.app-nav li ul { + background-color: #fff; + border: 1px solid #ddd; + border-bottom-color: #ccc; + border-radius: 4px; + box-sizing: border-box; + display: none; + max-height: calc(100vh - 61px); + overflow-y: auto; + padding: 10px 0; + position: absolute; + right: -15px; + text-align: left; + top: 100%; + white-space: nowrap; +} + +.app-nav li ul li { + display: block; + font-size: 14px; + line-height: 1rem; + margin: 0; + margin: 8px 14px; + white-space: nowrap; +} + +.app-nav li ul a { + display: block; + font-size: inherit; + margin: 0; + padding: 0; +} + +.app-nav li ul a.active { + border-bottom: 0; +} + +.app-nav li:hover ul { + display: block; +} + +.github-corner { + border-bottom: 0; + position: fixed; + right: 0; + text-decoration: none; + top: 0; + z-index: 1; +} + +.github-corner:hover .octo-arm { + -webkit-animation: octocat-wave 560ms ease-in-out; + animation: octocat-wave 560ms ease-in-out; +} + +.github-corner svg { + color: #fff; + fill: var(--theme-color, #7ed491); + height: 80px; + width: 80px; +} + +main { + display: block; + position: relative; + width: 100vw; + height: 100%; + z-index: 0; +} + +main.hidden { + display: none; +} + +.anchor { + display: inline-block; + text-decoration: none; + transition: all 0.3s; +} + +.anchor span { + color: #FFFFFF; +} + +.anchor:hover { + text-decoration: underline; +} + +.sidebar { + border-right: 1px solid rgba(0,0,0,0.07); + overflow-y: auto; + padding: 40px 0 0; + position: absolute; + top: 0; + bottom: 0; + left: 0; + transition: transform 250ms ease-out; + width: 300px; + z-index: 20; +} + +.sidebar > h1 { + margin: 0 auto 1rem; + font-size: 1.5rem; + font-weight: 300; + text-align: center; +} + +.sidebar > h1 a { + color: inherit; + text-decoration: none; +} + +.sidebar > h1 .app-nav { + display: block; + position: static; +} + +.sidebar .sidebar-nav { + line-height: 2em; + padding-bottom: 40px; +} + +.sidebar li.collapse .app-sub-sidebar { + display: none; +} + +.sidebar ul { + margin: 0 0 0 15px; + padding: 0; +} + +.sidebar li > p { + font-weight: 700; + margin: 0; +} + +.sidebar ul, +.sidebar ul li { + list-style: none; +} + +.sidebar ul li a { + border-bottom: none; + display: block; +} + +.sidebar ul li ul { + padding-left: 20px; +} + +.sidebar::-webkit-scrollbar { + width: 4px; +} + +.sidebar::-webkit-scrollbar-thumb { + background: transparent; + border-radius: 4px; +} + +.sidebar:hover::-webkit-scrollbar-thumb { + background: rgba(136,136,136,0.4); +} + +.sidebar:hover::-webkit-scrollbar-track { + background: rgba(136,136,136,0.1); +} + +.sidebar-toggle { + background-color: transparent; + background-color: #1a2026; + border: 0; + outline: none; + padding: 10px; + position: absolute; + bottom: 0; + left: 0; + text-align: center; + transition: opacity 0.3s; + width: 284px; + z-index: 30; + cursor: pointer; +} + +.sidebar-toggle:hover .sidebar-toggle-button { + opacity: 0.4; +} + +.sidebar-toggle span { + background-color: var(--theme-color, #7ed491); + display: block; + margin-bottom: 4px; + width: 16px; + height: 2px; +} + +body.sticky .sidebar, +body.sticky .sidebar-toggle { + position: fixed; +} + +.content { + padding-top: 60px; + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 300px; + transition: left 250ms ease; +} + +.markdown-section { + margin: 0 auto; + max-width: 80%; + padding: 30px 15px 40px 15px; + position: relative; +} + +.markdown-section > * { + box-sizing: border-box; + font-size: inherit; +} + +.markdown-section > :first-child { + margin-top: 0 !important; +} + +.markdown-section hr { + border: none; + border-bottom: 1px solid #eee; + margin: 2em 0; +} + +.markdown-section iframe { + border: 1px solid #eee; +/* fix horizontal overflow on iOS Safari */ + width: 1px; + min-width: 100%; +} + +.markdown-section table { + border-collapse: collapse; + border-spacing: 0; + display: block; + margin-bottom: 1rem; + overflow: auto; + width: 100%; +} + +.markdown-section th { + border: 1px solid #29343d; + color: #9fb4c4; + background-color: #13181c; + font-weight: bold; + padding: 6px 13px; +} + +.markdown-section td { + border: 1px solid #29343d; + color: #9fb4c4; + background-color: #13181c; + padding: 6px 13px; +} + +.markdown-section tr { + border-top: 1px solid #303436; +} + +.markdown-section tr:nth-child(2n) { + background-color: #FFFFFF; +} + +.markdown-section p.tip { + background-color: #f8f8f8; + border-bottom-right-radius: 2px; + border-left: 4px solid #f66; + border-top-right-radius: 2px; + margin: 2em 0; + padding: 12px 24px 12px 30px; + position: relative; +} + +.markdown-section p.tip:before { + background-color: #f66; + border-radius: 100%; + color: #fff; + content: '!'; + font-family: 'Dosis', 'Source Sans Pro', 'Helvetica Neue', Arial, sans-serif; + font-size: 14px; + font-weight: bold; + left: -12px; + line-height: 20px; + position: absolute; + height: 20px; + width: 20px; + text-align: center; + top: 14px; +} + +.markdown-section p.tip code { + background-color: #eaeaea; +} + +.markdown-section p.tip em { + color: #eaeaea; +} + +.markdown-section p.warn { + background: #eaeaea; + border-radius: 2px; + padding: 1rem; +} + +.markdown-section ul.task-list > li { + list-style-type: none; +} + +body.close .sidebar { + transform: translateX(-300px); +} + +body.close .sidebar-toggle { + width: auto; +} + +body.close .content { + left: 0; +} + +@media print { + .github-corner, + .sidebar-toggle, + .sidebar, + .app-nav { + display: none; + } +} + +@media screen and (max-width: 768px) { + .github-corner, + .sidebar-toggle, + .sidebar { + position: fixed; + } + + .app-nav { + margin-top: 16px; + } + + .app-nav li ul { + top: 30px; + } + + main { + height: auto; + overflow-x: hidden; + } + + .sidebar { + left: -300px; + transition: transform 250ms ease-out; + } + + .content { + left: 0; + max-width: 100vw; + position: static; + padding-top: 20px; + transition: transform 250ms ease; + } + + .app-nav, + .github-corner { + transition: transform 250ms ease-out; + } + + .sidebar-toggle { + background-color: transparent; + width: auto; + padding: 30px 30px 10px 10px; + } + + body.close .sidebar { + transform: translateX(300px); + } + + body.close .sidebar-toggle { + background-color: rgba(255,255,255,0.8); + transition: 1s background-color; + width: 284px; + padding: 10px; + } + + body.close .content { + transform: translateX(300px); + } + + body.close .app-nav, + body.close .github-corner { + display: none; + } + + .github-corner:hover .octo-arm { + -webkit-animation: none; + animation: none; + } + + .github-corner .octo-arm { + -webkit-animation: octocat-wave 560ms ease-in-out; + animation: octocat-wave 560ms ease-in-out; + } +} + +@-webkit-keyframes octocat-wave { + 0%, 100% { + transform: rotate(0); + } + 20%, 60% { + transform: rotate(-25deg); + } + 40%, 80% { + transform: rotate(10deg); + } +} + +@keyframes octocat-wave { + 0%, 100% { + transform: rotate(0); + } + 20%, 60% { + transform: rotate(-25deg); + } + 40%, 80% { + transform: rotate(10deg); + } +} + +section.cover { + align-items: center; + background-position: center center; + background-repeat: no-repeat; + background-size: cover; + height: 100vh; + width: 100vw; + display: none; +} + +section.cover.show { + display: flex; +} + +section.cover.has-mask .mask { + background-color: #fff; + opacity: 0.8; + position: absolute; + top: 0; + height: 100%; + width: 100%; +} + +section.cover .cover-main { + flex: 1; + margin: -20px 16px 0; + text-align: center; + position: relative; +} + +section.cover a { + color: inherit; + text-decoration: none; +} + +section.cover a:hover { + text-decoration: none; +} + +section.cover p { + line-height: 1.5rem; + margin: 1em 0; +} + +section.cover h1 { + color: inherit; + font-size: 2.5rem; + font-weight: 300; + margin: 0.625rem 0 2.5rem; + position: relative; + text-align: center; +} + +section.cover h1 a { + display: block; +} + +section.cover h1 small { + bottom: -0.4375rem; + font-size: 1rem; + position: absolute; +} + +section.cover blockquote { + font-size: 1.5rem; + text-align: center; +} + +section.cover ul { + line-height: 1.8; + list-style-type: none; + margin: 1em auto; + max-width: 500px; + padding: 0; +} + +section.cover .cover-main > p:last-child a { + border-color: var(--theme-color, #7ed491); + border-radius: 2rem; + border-style: solid; + border-width: 1px; + box-sizing: border-box; + color: var(--theme-color, #7ed491); + display: inline-block; + font-size: 1.05rem; + letter-spacing: 0.1rem; + margin: 0.5rem 1rem; + padding: 0.75em 2rem; + text-decoration: none; + transition: all 0.15s ease; +} + +section.cover .cover-main > p:last-child a:last-child { + background-color: var(--theme-color, #7ed491); + color: #fff; +} + +section.cover .cover-main > p:last-child a:last-child:hover { + color: inherit; + opacity: 0.8; +} + +section.cover .cover-main > p:last-child a:hover { + color: inherit; +} + +section.cover blockquote > p > a { + border-bottom: 2px solid var(--theme-color, #7ed491); + transition: color 0.3s; +} + +section.cover blockquote > p > a:hover { + color: var(--theme-color, #7ed491); +} + +body { + background-color: #181e24; +} + +/* sidebar */ +.sidebar { + background-color: #1a2026; + color: #fff; +} + +.sidebar > h1 a { + font-weight: bold; +} + +.sidebar li { + margin: 6px 0 6px 0; +} + +.sidebar ul li a { + color: #eaeaea; + font-size: 14px; + font-weight: normal; + overflow: hidden; + text-decoration: none; + text-overflow: ellipsis; + white-space: nowrap; +} + +.sidebar ul li a:hover { + text-decoration: underline; +} + +.sidebar ul li ul { + padding: 0; +} + +.sidebar ul li.active > a { + border-right: 2px solid; + color: var(--theme-color, #7ed491); + font-weight: 600; +} + +.app-sub-sidebar li::before { + content: '-'; + padding-right: 4px; + float: left; +} + +/* markdown content found on pages */ +.markdown-section h1, +.markdown-section h2, +.markdown-section h3, +.markdown-section h4, +.markdown-section strong { + color: #eaeaea; + font-weight: 600; +} + +.markdown-section a { + color: var(--theme-color, #7ed491); + font-weight: 600; +} + +.markdown-section h1 { + font-size: 2rem; + margin: 0 0 1rem; +} + +.markdown-section h2 { + font-size: 1.75rem; + margin: 45px 0 0.8rem; +} + +.markdown-section h3 { + font-size: 1.5rem; + margin: 40px 0 0.6rem; +} + +.markdown-section h4 { + font-size: 1.25rem; +} + +.markdown-section h5 { + font-size: 1rem; +} + +.markdown-section h6 { + color: #777; + font-size: 1rem; +} + +.markdown-section figure, +.markdown-section p { + margin: 1.2em 0; +} + +.markdown-section p, +.markdown-section ul, +.markdown-section ol { + line-height: 1.6rem; + word-spacing: 0.05rem; +} + +.markdown-section ul, +.markdown-section ol { + padding-left: 1.5rem; +} + +.markdown-section blockquote { + border-left: 4px solid var(--theme-color, #7ed491); + color: #858585; + margin: 2em 0; + padding-left: 20px; +} + +.markdown-section blockquote p { + font-weight: 600; + margin-left: 0; +} + +.markdown-section iframe { + margin: 1em 0; +} + +.markdown-section em { + color: #7f8c8d; +} + +.markdown-section code, +.markdown-section pre, +.markdown-section output::after { + font-family: 'Roboto Mono', Monaco, courier, monospace; +} + +.markdown-section code, +.markdown-section pre { + color: #575D74; + background-color: #13181c +} + +.markdown-section pre, +.markdown-section output { + margin: 1.2em 0; + position: relative; +} + +.markdown-section pre > code, +.markdown-section output { + border-radius: 2px; + display: block; +} + +.markdown-section pre > code, +.markdown-section output::after { + -moz-osx-font-smoothing: initial; + -webkit-font-smoothing: initial; +} + +.markdown-section code { + border-radius: 2px; + color: #3b4b58 + margin: 0 2px; + padding: 3px 5px; + white-space: pre-wrap; +} + +.markdown-section > :not(h1):not(h2):not(h3):not(h4):not(h5):not(h6) code { + font-size: 0.8rem; +} + +.markdown-section pre { + padding: 0 1.4rem; + line-height: 1.5rem; + overflow: auto; + word-wrap: normal; +} + +.markdown-section pre > code { + color: #eaeaea; + font-size: 0.8rem; + padding: 2.2em 5px; + line-height: inherit; + margin: 0 2px; + max-width: inherit; + overflow: inherit; + white-space: inherit; +} + +.markdown-section output { + padding: 1.7rem 1.4rem; + border: 1px dotted #ccc; +} + +.markdown-section output > :first-child { + margin-top: 0; +} + +.markdown-section output > :last-child { + margin-bottom: 0; +} + +.markdown-section code::after, +.markdown-section code::before, +.markdown-section output::after, +.markdown-section output::before { + letter-spacing: 0.05rem; +} + +.markdown-section pre::after, +.markdown-section output::after { + color: #ccc; + font-size: 0.6rem; + font-weight: 600; + height: 15px; + line-height: 15px; + padding: 5px 10px 0; + position: absolute; + right: 0; + text-align: right; + top: 0; +} + +.markdown-section pre::after, +.markdown-section output::after { + content: attr(data-lang); +} + +.markdown-section p, .markdown-section ul, .markdown-section ol { + color: #eaeaea; +} + +/* code highlight */ +.token.comment { + color: #575D74; +} + +.token.prolog, +.token.doctype, +.token.cdata { + color: #8e908c; +} + +.token.namespace { + opacity: 0.7; +} + +.token.boolean { + color: #FCC5A3 +} + +.token.number { + color: #FCC5A3; +} + +.token.punctuation { + color: #fca3ab; +} + +.token.property { + color: #d7c1ed; +} + +.token.tag { + color: #2973b7; +} + +.token.string { + color: var(--theme-color, #93cfab); +} + +.token.selector { + color: #6679cc; +} + +.token.attr-name { + color: #2973b7; +} + +.token.entity, +.token.url, +.language-css .token.string, +.style .token.string { + color: #22a2c9; +} + +.token.attr-value, +.token.control, +.token.directive, +.token.unit { + color: var(--theme-color, #7ed491); +} + +.token.keyword { + color: #d7c1ed +} + +.token.function { + color: #bac8ef; +} + +.token.statement { + color: #fca2aa; +} + +.token.regex, +.token.atrule { + color: #22a2c9; +} + +.token.placeholder, +.token.variable { + color: #3d8fd1; +} + +.token.deleted { + text-decoration: line-through; +} + +.token.inserted { + border-bottom: 1px dotted #202746; + text-decoration: none; +} + +.token.italic { + font-style: italic; +} + +.token.bold { + font-weight: bold; +} + +.token.important { + color: #ccaced; +} + +.token.entity { + cursor: help; +} + +code .token { + -moz-osx-font-smoothing: initial; + -webkit-font-smoothing: initial; + min-height: 1.5rem; + position: relative; + left: auto; +} \ No newline at end of file diff --git a/.config/awesome/bling/docs/layouts/layout.md b/.config/awesome/bling/docs/layouts/layout.md new file mode 100755 index 0000000..85fc547 --- /dev/null +++ b/.config/awesome/bling/docs/layouts/layout.md @@ -0,0 +1,65 @@ +## 📎 Layouts + +Choose layouts from the list below and add them to to your `awful.layouts` list in your `rc.lua`. + +Everyone of them supports multiple master clients and master width factor making them easy to use. + +The mstab layout uses the tab theme from the tabbed module. + +```lua +bling.layout.mstab +bling.layout.centered +bling.layout.vertical +bling.layout.horizontal +bling.layout.equalarea +bling.layout.deck +``` + +### Theme Variables + +```lua +-- mstab +theme.mstab_bar_disable = false -- disable the tabbar +theme.mstab_bar_ontop = false -- whether you want to allow the bar to be ontop of clients +theme.mstab_dont_resize_slaves = false -- whether the tabbed stack windows should be smaller than the + -- currently focused stack window (set it to true if you use + -- transparent terminals. False if you use shadows on solid ones +theme.mstab_bar_padding = "default" -- how much padding there should be between clients and your tabbar + -- by default it will adjust based on your useless gaps. + -- If you want a custom value. Set it to the number of pixels (int) +theme.mstab_border_radius = 0 -- border radius of the tabbar +theme.mstab_bar_height = 40 -- height of the tabbar +theme.mstab_tabbar_position = "top" -- position of the tabbar (mstab currently does not support left,right) +theme.mstab_tabbar_style = "default" -- style of the tabbar ("default", "boxes" or "modern") + -- defaults to the tabbar_style so only change if you want a + -- different style for mstab and tabbed +``` + +### Previews + +#### Mstab (dynamic tabbing layout) + +![](https://imgur.com/HZRgApE.png) + +*screenshot by [JavaCafe01](https://github.com/JavaCafe01)* + +#### Centered + +![](https://media.discordapp.net/attachments/769673106842845194/780095998239834142/unknown.png) + +*screenshot by [HeavyRain266](https://github.com/HeavyRain266)* + +#### Equal area + +![](https://imgur.com/JCFFywv.png) + +*screenshot by [bysmutheye](https://github.com/bysmutheye)* + +#### Deck + +The left area shows the deck layout in action. In this screenshot it is used together with [layout machi](https://github.com/xinhaoyuan/layout-machi) and its sublayout support. + +![](https://cdn.discordapp.com/attachments/635625954219261982/877957824225894430/unknown.png) + +*screenshot by [JavaCafe01](https://github.com/JavaCafe01)* + diff --git a/.config/awesome/bling/docs/module/flash.md b/.config/awesome/bling/docs/module/flash.md new file mode 100755 index 0000000..a12b78d --- /dev/null +++ b/.config/awesome/bling/docs/module/flash.md @@ -0,0 +1,33 @@ +## 🔦 Flash Focus + +Flash focus does an opacity animation effect on a client when it is focused. + + +### Usage + +There are two ways in which you can use this module. You can enable it by calling the `enable()` function: +```lua +bling.module.flash_focus.enable() +``` +This connects to the focus signal of a client, which means that the flash focus will activate however you focus the client. + +The other way is to call the function itself like this: `bling.module.flash_focus.flashfocus(someclient)`. This allows you to activate on certain keybinds like so: +```lua +awful.key({modkey}, "Up", + function() + awful.client.focus.bydirection("up") + bling.module.flash_focus.flashfocus(client.focus) + end, {description = "focus up", group = "client"}) +``` + +### Theme Variables +```lua +theme.flash_focus_start_opacity = 0.6 -- the starting opacity +theme.flash_focus_step = 0.01 -- the step of animation +``` + +### Preview + +![](https://imgur.com/5txYrlV.gif) + +*gif by [JavaCafe01](https://github.com/JavaCafe01)* diff --git a/.config/awesome/bling/docs/module/scratch.md b/.config/awesome/bling/docs/module/scratch.md new file mode 100755 index 0000000..54f8ddd --- /dev/null +++ b/.config/awesome/bling/docs/module/scratch.md @@ -0,0 +1,75 @@ +## 🍃 Scratchpad + +An easy way to create multiple scratchpads. + +### A... what? + +You can think about a scratchpad as a window whose visibility can be toggled, but still runs in the background without being visible (or minimized) most of the time. Many people use it to have one terminal in which to perform minor tasks, but it is the most useful for windows which only need a couple seconds in between your actual activity, such as music players or chat applications. + +### Rubato Animation Support + +#### Awestore is now deprecated from Bling, we are switching to Rubato. + +Please go over to the [rubato](https://github.com/andOrlando/rubato) repository for installation instructions. Give it a star as well! The animations are completely optional, and if you choose not to use it, you do not need rubato installed. + +### Usage + +To initalize a scratchpad you can do something like the following: + +```lua +local bling = require("bling") +local rubato = require("rubato") -- Totally optional, only required if you are using animations. + +-- These are example rubato tables. You can use one for just y, just x, or both. +-- The duration and easing is up to you. Please check out the rubato docs to learn more. +local anim_y = rubato.timed { + pos = 1090, + rate = 60, + easing = rubato.quadratic, + intro = 0.1, + duration = 0.3, + awestore_compat = true -- This option must be set to true. +} + +local anim_x = rubato.timed { + pos = -970, + rate = 60, + easing = rubato.quadratic, + intro = 0.1, + duration = 0.3, + awestore_compat = true -- This option must be set to true. +} + +local term_scratch = bling.module.scratchpad { + command = "wezterm start --class spad", -- How to spawn the scratchpad + rule = { instance = "spad" }, -- The rule that the scratchpad will be searched by + sticky = true, -- Whether the scratchpad should be sticky + autoclose = true, -- Whether it should hide itself when losing focus + floating = true, -- Whether it should be floating (MUST BE TRUE FOR ANIMATIONS) + geometry = {x=360, y=90, height=900, width=1200}, -- The geometry in a floating state + reapply = true, -- Whether all those properties should be reapplied on every new opening of the scratchpad (MUST BE TRUE FOR ANIMATIONS) + dont_focus_before_close = false, -- When set to true, the scratchpad will be closed by the toggle function regardless of whether its focused or not. When set to false, the toggle function will first bring the scratchpad into focus and only close it on a second call + rubato = {x = anim_x, y = anim_y} -- Optional. This is how you can pass in the rubato tables for animations. If you don't want animations, you can ignore this option. +} +``` + +Once initalized, you can use the object (which in this case is named `term_scratch`) like this: + +```lua +term_scratch:toggle() -- toggles the scratchpads visibility +term_scratch:turn_on() -- turns the scratchpads visibility on +term_scratch:turn_off() -- turns the scratchpads visibility off +``` + +You can also connect to signals as you are used to for further customization. For example like that: + +```lua +term_scratch:connect_signal("turn_on", function(c) naughty.notify({title = "Turned on!"}) end) +``` + +The following signals are currently available. `turn_on`, `turn_off` and `inital_apply` pass the client on which they operated as an argument: + +- `turn_on` fires when the scratchpad is turned on on a tag that it wasn't present on before +- `turn_off` fires when the scratchpad is turned off on a tag +- `spawn` fires when the scratchpad is launched with the given command +- `inital_apply` fires after `spawn`, when a corresponding client has been found and the properties have been applied diff --git a/.config/awesome/bling/docs/module/swal.md b/.config/awesome/bling/docs/module/swal.md new file mode 100755 index 0000000..0b3fed6 --- /dev/null +++ b/.config/awesome/bling/docs/module/swal.md @@ -0,0 +1,25 @@ +## 😋 Window Swallowing + +Can your window manager swallow? It probably can... + +### Usage + +To activate and deactivate window swallowing here are the following functions. If you want to activate it, just call the `start` function once in your `rc.lua`. +```lua +bling.module.window_swallowing.start() -- activates window swallowing +bling.module.window_swallowing.stop() -- deactivates window swallowing +bling.module.window_swallowing.toggle() -- toggles window swallowing +``` + +### Theme Variables +```lua +theme.parent_filter_list = {"firefox", "Gimp"} -- class names list of parents that should not be swallowed +theme.child_filter_list = { "Dragon" } -- class names list that should not swallow their parents +theme.swallowing_filter = true -- whether the filters above should be active +``` + +### Preview + +![](https://media.discordapp.net/attachments/635625813143978012/769180910683684864/20-10-23-14-40-32.gif) + +*gif by [Nooo37](https://github.com/Nooo37)* diff --git a/.config/awesome/bling/docs/module/tabbed.md b/.config/awesome/bling/docs/module/tabbed.md new file mode 100755 index 0000000..e705357 --- /dev/null +++ b/.config/awesome/bling/docs/module/tabbed.md @@ -0,0 +1,66 @@ +## 📑 Tabbed + +Tabbed implements a tab container. There are also different themes for the tabs. + +### Usage + +You should bind these functions to keys in order to use the tabbed module effectively: +```lua +bling.module.tabbed.pick() -- picks a client with your cursor to add to the tabbing group +bling.module.tabbed.pop() -- removes the focused client from the tabbing group +bling.module.tabbed.iter() -- iterates through the currently focused tabbing group +bling.module.tabbed.pick_with_dmenu() -- picks a client with a dmenu application (defaults to rofi, other options can be set with a string parameter like "dmenu") +bling.module.tabbed.pick_by_direction(dir) -- picks a client based on direction ("up", "down", "left" or "right") +``` + +### Theme Variables + +```lua +-- For tabbed only +theme.tabbed_spawn_in_tab = false -- whether a new client should spawn into the focused tabbing container + +-- For tabbar in general +theme.tabbar_ontop = false +theme.tabbar_radius = 0 -- border radius of the tabbar +theme.tabbar_style = "default" -- style of the tabbar ("default", "boxes" or "modern") +theme.tabbar_font = "Sans 11" -- font of the tabbar +theme.tabbar_size = 40 -- size of the tabbar +theme.tabbar_position = "top" -- position of the tabbar +theme.tabbar_bg_normal = "#000000" -- background color of the focused client on the tabbar +theme.tabbar_fg_normal = "#ffffff" -- foreground color of the focused client on the tabbar +theme.tabbar_bg_focus = "#1A2026" -- background color of unfocused clients on the tabbar +theme.tabbar_fg_focus = "#ff0000" -- foreground color of unfocused clients on the tabbar +theme.tabbar_bg_focus_inactive = nil -- background color of the focused client on the tabbar when inactive +theme.tabbar_fg_focus_inactive = nil -- foreground color of the focused client on the tabbar when inactive +theme.tabbar_bg_normal_inactive = nil -- background color of unfocused clients on the tabbar when inactive +theme.tabbar_fg_normal_inactive = nil -- foreground color of unfocused clients on the tabbar when inactive +theme.tabbar_disable = false -- disable the tab bar entirely + +-- the following variables are currently only for the "modern" tabbar style +theme.tabbar_color_close = "#f9929b" -- chnges the color of the close button +theme.tabbar_color_min = "#fbdf90" -- chnges the color of the minimize button +theme.tabbar_color_float = "#ccaced" -- chnges the color of the float button +``` + +### Preview + +Modern theme: + + + +*screenshot by [JavaCafe01](https://github.com/JavaCafe01)* + +### Signals +The tabbed module emits a few signals for the purpose of integration, +```lua +-- bling::tabbed::update -- triggered whenever a tabbed object is updated +-- tabobj -- the object that caused the update +-- bling::tabbed::client_added -- triggered whenever a new client is added to a tab group +-- tabobj -- the object that the client was added to +-- client -- the client that added +-- bling::tabbed::client_removed -- triggered whenever a client is removed from a tab group +-- tabobj -- the object that the client was removed from +-- client -- the client that was removed +-- bling::tabbed::changed_focus -- triggered whenever a tab group's focus is changed +-- tabobj -- the modified tab group +``` diff --git a/.config/awesome/bling/docs/module/twall.md b/.config/awesome/bling/docs/module/twall.md new file mode 100755 index 0000000..69c09c3 --- /dev/null +++ b/.config/awesome/bling/docs/module/twall.md @@ -0,0 +1,26 @@ +## 🏬 Tiled Wallpaper + +### Usage + +The function to set an automatically created tiled wallpaper can be called the following way (you don't need to set every option in the table): +```lua +awful.screen.connect_for_each_screen(function(s) -- that way the wallpaper is applied to every screen + bling.module.tiled_wallpaper("x", s, { -- call the actual function ("x" is the string that will be tiled) + fg = "#ff0000", -- define the foreground color + bg = "#00ffff", -- define the background color + offset_y = 25, -- set a y offset + offset_x = 25, -- set a x offset + font = "Hack", -- set the font (without the size) + font_size = 14, -- set the font size + padding = 100, -- set padding (default is 100) + zickzack = true -- rectangular pattern or criss cross + }) +end) +``` + +### Preview + +![](https://media.discordapp.net/attachments/702548913999314964/773887721294135296/tiled-wallpapers.png?width=1920&height=1080) + +*screenshots by [Nooo37](https://github.com/Nooo37)* + diff --git a/.config/awesome/bling/docs/module/wall.md b/.config/awesome/bling/docs/module/wall.md new file mode 100755 index 0000000..cdab6cc --- /dev/null +++ b/.config/awesome/bling/docs/module/wall.md @@ -0,0 +1,142 @@ +## 🎇 Wallpaper Easy Setup + +This is a simple-to-use, extensible, declarative wallpaper manager. + +### Practical Examples + +```lua +-- A default Awesome wallpaper +bling.module.wallpaper.setup() + +-- A slideshow with pictures from different sources changing every 30 minutes +bling.module.wallpaper.setup { + wallpaper = {"/images/my_dog.jpg", "/images/my_cat.jpg"}, + change_timer = 1800 +} + +-- A random wallpaper with images from multiple folders +bling.module.wallpaper.setup { + set_function = bling.module.wallpaper.setters.random, + wallpaper = {"/path/to/a/folder", "/path/to/another/folder"}, + change_timer = 631, -- prime numbers are better for timers + position = "fit", + background = "#424242" +} + +-- wallpapers based on a schedule, like awesome-glorious-widgets dynamic wallpaper +-- https://github.com/manilarome/awesome-glorious-widgets/tree/master/dynamic-wallpaper +bling.module.wallpaper.setup { + set_function = bling.module.wallpaper.setters.simple_schedule, + wallpaper = { + ["06:22:00"] = "morning-wallpaper.jpg", + ["12:00:00"] = "noon-wallpaper.jpg", + ["17:58:00"] = "night-wallpaper.jpg", + ["24:00:00"] = "midnight-wallpaper.jpg", + }, + position = "maximized", +} + +-- random wallpapers, from different folder depending on time of the day +bling.module.wallpaper.setup { + set_function = bling.module.wallpaper.setters.simple_schedule, + wallpaper = { + ["09:00:00"] = "~/Pictures/safe_for_work", + ["18:00:00"] = "~/Pictures/personal", + }, + schedule_set_function = bling.module.wallpaper.setters.random + position = "maximized", + recursive = false, + change_timer = 600 +} + +-- setup for multiple screens at once +-- the 'screen' argument can be a table of screen objects +bling.module.wallpaper.setup { + set_function = bling.module.wallpaper.setters.random, + screen = screen, -- The awesome 'screen' variable is an array of all screen objects + wallpaper = {"/path/to/a/folder", "/path/to/another/folder"}, + change_timer = 631 +} +``` +### Details + +The setup function will do 2 things: call the set-function when awesome requests a wallpaper, and manage a timer to call `set_function` periodically. + +Its argument is a args table that is passed to ohter functions (setters and wallpaper functions), so you define everything with setup. + +The `set_function` is a function called every times a wallpaper is needed. + +The module provides some setters: + +* `bling.module.wallpaper.setters.awesome_wallpaper`: beautiful.theme_assets.wallpaper with defaults from beautiful. +* `bling.module.wallpaper.setters.simple`: slideshow from the `wallpaper` argument. +* `bling.module.wallpaper.setters.random`: same as simple but in a random way. +* `bling.module.wallpaper.setters.simple_schedule`: takes a table of `["HH:MM:SS"] = wallpaper` arguments, where wallpaper is the `wallpaper` argument used by `schedule_set_function`. + +A wallpaper is one of the following elements: + +* a color +* an image +* a folder containing images +* a function that sets a wallpaper +* everything gears.wallpaper functions can manage (cairo surface, cairo pattern string) +* a list containing any of the elements above + +To set up for multiple screens, two possible methods are: +* Call the `setup` function for each screen, passing the appropriate configuration and `screen` arg +* Call the `setup` function once, passing a table of screens as the `screen` arg. This applies the same configuration to all screens in the table +_Note_: Multiple screen setup only works for the `simple` and `random` setters + +```lua +-- This is a valid wallpaper definition +bling.module.wallpaper.setup { + wallpaper = { -- a list + "black", "#112233", -- colors + "wall1.jpg", "wall2.png", -- files + "/path/to/wallpapers", -- folders + -- cairo patterns + "radial:600,50,100:105,550,900:0,#2200ff:0.5,#00ff00:1,#101010", + -- or functions that set a wallpaper + function(args) bling.module.tiled_wallpaper("\\o/", args.screen) end, + bling.module.wallpaper.setters.awesome_wallpaper, + }, + change_timer = 10, +} +``` +The provided setters `simple` and `random` will use 2 internal functions that you can use to write your own setter: + +* `bling.module.wallpaper.prepare_list`: return a list of wallpapers directly usable by `apply` (for now, it just explores folders) +* `bling.module.wallpaper.apply`: a wrapper for gears.wallpaper functions, using the args table of setup + +Here are the defaults: + +```lua +-- Default parameters +bling.module.wallpaper.setup { + screen = nil, -- the screen to apply the wallpaper, as seen in gears.wallpaper functions + screens = nil, -- an array of screens to apply the wallpaper on. If 'screen' is also provided, this is overridden + change_timer = nil, -- the timer in seconds. If set, call the set_function every change_timer seconds + set_function = nil, -- the setter function + + -- parameters used by bling.module.wallpaper.prepare_list + wallpaper = nil, -- the wallpaper object, see simple or simple_schedule documentation + image_formats = {"jpg", "jpeg", "png", "bmp"}, -- when searching in folder, consider these files only + recursive = true, -- when searching in folder, search also in subfolders + + -- parameters used by bling.module.wallpaper.apply + position = nil, -- use a function of gears.wallpaper when applicable ("centered", "fit", "maximized", "tiled") + background = beautiful.bg_normal or "black", -- see gears.wallpaper functions + ignore_aspect = false, -- see gears.wallpaper.maximized + offset = {x = 0, y = 0}, -- see gears.wallpaper functions + scale = 1, -- see gears.wallpaper.centered + + -- parameters that only apply to bling.module.wallpaper.setter.awesome (as a setter or as a wallpaper function) + colors = { -- see beautiful.theme_assets.wallpaper + bg = beautiful.bg_color, -- the actual default is this color but darkened or lightned + fg = beautiful.fg_color, + alt_fg = beautiful.fg_focus + } +} +``` + +Check documentation in [module/wallpaper.lua](module/wallpaper.lua) for more details. diff --git a/.config/awesome/bling/docs/signals/pctl.md b/.config/awesome/bling/docs/signals/pctl.md new file mode 100755 index 0000000..89a0709 --- /dev/null +++ b/.config/awesome/bling/docs/signals/pctl.md @@ -0,0 +1,240 @@ +## 🎵 Playerctl + +This is a signal module in which you can connect to certain bling signals to grab playerctl info. Currently, this is what it supports: + +- Song title and artist +- Album art (the path this module downloaded the art to) +- If playing or not +- Position +- Song length +- If there are no players on + +This module relies on `playerctl` and `curl`. If you have this module disabled, you won't need those programs. With this module, you can create a widget like below without worrying about the backend. + +![](https://user-images.githubusercontent.com/33443763/107377569-fa807900-6a9f-11eb-93c1-174c58eb7bf1.png) + +*screenshot by [javacafe](https://github.com/JavaCafe01)* + +### Usage + +To enable: `playerctl = bling.signal.playerctl.lib/cli()` + +To disable: `playerctl:disable()` + +#### Playerctl_lib Signals + +**Note**: When connecting to signals with the new `playerctl` module, the object itself is always given to you as the first parameter. + +```lua +-- metadata +-- title (string) +-- artist (string) +-- album_path (string) +-- album (string) +-- new (bool) +-- player_name (string) +-- position +-- interval_sec (number) +-- length_sec (number) +-- player_name (string) +-- playback_status +-- playing (boolean) +-- player_name (string) +-- seeked +-- position (number) +-- player_name (string) +-- volume +-- volume (number) +-- player_name (string) +-- loop_status +-- loop_status (string) +-- player_name (string) +-- shuffle +-- shuffle (boolean) +-- player_name (string) +-- exit +-- player_name (string) +-- no_players +-- (No parameters) +``` + +#### Playerctl_cli Signals + +```lua +-- metadata +-- title (string) +-- artist (string) +-- album_path (string) +-- album (string) +-- player_name (string) +-- position +-- interval_sec (number) +-- length_sec (number) +-- playback_status +-- playing (boolean) +-- volume +-- volume (number) +-- loop_status +-- loop_status (string) +-- shuffle +-- shuffle (bool) +-- no_players +-- (No parameters) +``` + +#### Playerctl Functions + +With this library we also give the user a way to interact with Playerctl, such as playing, pausing, seeking, etc. + +Here are the functions provided: + +```lua +-- disable() +-- pause(player) +-- play(player) +-- stop(player) +-- play_pause(player) +-- previous(player) +-- next(player) +-- set_loop_status(loop_status, player) +-- cycle_loop_status(player) +-- set_position(position, player) +-- set_shuffle(shuffle, player) +-- cycle_shuffle(player) +-- set_volume(volume, player) +-- get_manager() +-- get_active_player() +-- get_player_of_name(name) +``` + +### Example Implementation + +Lets say we have an imagebox. If I wanted to set the imagebox to show the album art, all I have to do is this: + +```lua +local art = wibox.widget { + image = "default_image.png", + resize = true, + forced_height = dpi(80), + forced_width = dpi(80), + widget = wibox.widget.imagebox +} + +local name_widget = wibox.widget { + markup = 'No players', + align = 'center', + valign = 'center', + widget = wibox.widget.textbox +} + +local title_widget = wibox.widget { + markup = 'Nothing Playing', + align = 'center', + valign = 'center', + widget = wibox.widget.textbox +} + +local artist_widget = wibox.widget { + markup = 'Nothing Playing', + align = 'center', + valign = 'center', + widget = wibox.widget.textbox +} + +-- Get Song Info +local playerctl = bling.signal.playerctl.lib() +playerctl:connect_signal("metadata", + function(_, title, artist, album_path, album, new, player_name) + -- Set art widget + art:set_image(gears.surface.load_uncached(album_path)) + + -- Set player name, title and artist widgets + name_widget:set_markup_silently(player_name) + title_widget:set_markup_silently(title) + artist_widget:set_markup_silently(artist) +end) +``` + +Thats all! You don't even have to worry about updating the widgets, the signals will handle that for you. + +Here's another example in which you get a notification with the album art, title, and artist whenever the song changes. + +```lua +local naughty = require("naughty") +local playerctl = bling.signal.playerctl.lib() + +playerctl:connect_signal("metadata", + function(_, title, artist, album_path, album, new, player_name) + if new == true then + naughty.notify({title = title, text = artist, image = album_path}) + end +end) +``` + +We can also link a playerctl function to a button click! + +```lua +local playerctl = bling.signal.playerctl.lib() +button:buttons(gears.table.join( + awful.button({}, 1, function() + playerctl:play_pause() + end) +)) +``` + +### Theme Variables and Configuration + +By default, this module will output signals from the most recently active player. If you wish to customize the behavior furthur, the following configuration options are available depending on the selected backend. Here is a summary of the two backends and which configuration options they support. + +| Option | playerctl_cli | playerctl_lib | +| ------------------- | ------------------ | ------------------ | +| ignore | :heavy_check_mark: | :heavy_check_mark: | +| player | :heavy_check_mark: | :heavy_check_mark: | +| update_on_activity | | :heavy_check_mark: | +| interval | :heavy_check_mark: | :heavy_check_mark: | +| debounce_delay | :heavy_check_mark: | :heavy_check_mark: | + +- `ignore`: This option is either a string with a single name or a table of strings containing names of players that will be ignored by this module. It is empty by default. + +- `player`: This option is either a string with a single name or a table of strings containing names of players this module will emit signals for. It also acts as a way to prioritize certain players over others with players listed earlier in the table being preferred over players listed later. The special name `%any` can be used once to match any player not found in the list. It is empty by default. + +- `update_on_activity`: This option is a boolean that, when true, will cause the module to output signals from the most recently active player while still adhering to the player priority specified with the `player` option. If `false`, the module will output signals from the player that started first, again, while still adhering to the player priority. It is `true` by default. + +- `interval`: This option is a number specifying the update interval for fetching the player position. It is 1 by default. + +- `debounce_delay`: This option is a number specifying the debounce timer interval. If a new metadata signal gets emitted before debounce_delay has passed, the last signal will be dropped. +This is to help with some players sending multiple signals. It is `0.35` by default. + +These options can be set through a call to `bling.signal.playerctl.lib/cli()` or these theme variables: + +```lua +theme.playerctl_ignore = {} +theme.playerctl_player = {} +theme.playerctl_update_on_activity = true +theme.playerctl_position_update_interval = 1 +``` + +#### Example Configurations + +```lua +-- Prioritize ncspot over all other players and ignore firefox players (e.g. YouTube and Twitch tabs) completely +playerctl = bling.signal.playerctl.lib { + ignore = "firefox", + player = {"ncspot", "%any"} +} + +-- OR in your theme file: +-- Same config as above but with theme variables +theme.playerctl_ignore = "firefox" +theme.playerctl_player = {"ncspot", "%any"} + +-- Prioritize vlc over all other players and deprioritize spotify +theme.playerctl_backend = "playerctl_lib" +theme.playerctl_player = {"vlc", "%any", "spotify"} + +-- Disable priority of most recently active players +theme.playerctl_update_on_activity = false + +-- Only emit the position signal every 2 seconds +theme.playerctl_position_update_interval = 2 +``` diff --git a/.config/awesome/bling/docs/theme.md b/.config/awesome/bling/docs/theme.md new file mode 100755 index 0000000..0d1d0b3 --- /dev/null +++ b/.config/awesome/bling/docs/theme.md @@ -0,0 +1,117 @@ +```lua +--[[ Bling theme variables template +This file has all theme variables of the bling module. +Every variable has a small comment on what it does. +You might just want to copy that whole part into your theme.lua and start adjusting from there. +--]] + + +-- window swallowing +theme.dont_swallow_classname_list = {"firefox", "Gimp"} -- list of class names that should not be swallowed +theme.dont_swallow_filter_activated = true -- whether the filter above should be active + +-- flash focus +theme.flash_focus_start_opacity = 0.6 -- the starting opacity +theme.flash_focus_step = 0.01 -- the step of animation + +-- playerctl signal +theme.playerctl_backend = "playerctl_cli" -- backend to use +theme.playerctl_ignore = {} -- list of players to be ignored +theme.playerctl_player = {} -- list of players to be used in priority order +theme.playerctl_update_on_activity = true -- whether to prioritize the most recently active players or not +theme.playerctl_position_update_interval = 1 -- the update interval for fetching the position from playerctl + +-- tabbed +theme.tabbed_spawn_in_tab = false -- whether a new client should spawn into the focused tabbing container + +-- tabbar general +theme.tabbar_ontop = false +theme.tabbar_radius = 0 -- border radius of the tabbar +theme.tabbar_style = "default" -- style of the tabbar ("default", "boxes" or "modern") +theme.tabbar_font = "Sans 11" -- font of the tabbar +theme.tabbar_size = 40 -- size of the tabbar +theme.tabbar_position = "top" -- position of the tabbar +theme.tabbar_bg_normal = "#000000" -- background color of the focused client on the tabbar +theme.tabbar_fg_normal = "#ffffff" -- foreground color of the focused client on the tabbar +theme.tabbar_bg_focus = "#1A2026" -- background color of unfocused clients on the tabbar +theme.tabbar_fg_focus = "#ff0000" -- foreground color of unfocused clients on the tabbar +theme.tabbar_bg_focus_inactive = nil -- background color of the focused client on the tabbar when inactive +theme.tabbar_fg_focus_inactive = nil -- foreground color of the focused client on the tabbar when inactive +theme.tabbar_bg_normal_inactive = nil -- background color of unfocused clients on the tabbar when inactive +theme.tabbar_fg_normal_inactive = nil -- foreground color of unfocused clients on the tabbar when inactive +theme.tabbar_disable = false -- disable the tab bar entirely + +-- mstab +theme.mstab_bar_disable = false -- disable the tabbar +theme.mstab_bar_ontop = false -- whether you want to allow the bar to be ontop of clients +theme.mstab_dont_resize_slaves = false -- whether the tabbed stack windows should be smaller than the + -- currently focused stack window (set it to true if you use + -- transparent terminals. False if you use shadows on solid ones +theme.mstab_bar_padding = "default" -- how much padding there should be between clients and your tabbar + -- by default it will adjust based on your useless gaps. + -- If you want a custom value. Set it to the number of pixels (int) +theme.mstab_border_radius = 0 -- border radius of the tabbar +theme.mstab_bar_height = 40 -- height of the tabbar +theme.mstab_tabbar_position = "top" -- position of the tabbar (mstab currently does not support left,right) +theme.mstab_tabbar_style = "default" -- style of the tabbar ("default", "boxes" or "modern") + -- defaults to the tabbar_style so only change if you want a + -- different style for mstab and tabbed + +-- the following variables are currently only for the "modern" tabbar style +theme.tabbar_color_close = "#f9929b" -- chnges the color of the close button +theme.tabbar_color_min = "#fbdf90" -- chnges the color of the minimize button +theme.tabbar_color_float = "#ccaced" -- chnges the color of the float button + +-- tag preview widget +theme.tag_preview_widget_border_radius = 0 -- Border radius of the widget (With AA) +theme.tag_preview_client_border_radius = 0 -- Border radius of each client in the widget (With AA) +theme.tag_preview_client_opacity = 0.5 -- Opacity of each client +theme.tag_preview_client_bg = "#000000" -- The bg color of each client +theme.tag_preview_client_border_color = "#ffffff" -- The border color of each client +theme.tag_preview_client_border_width = 3 -- The border width of each client +theme.tag_preview_widget_bg = "#000000" -- The bg color of the widget +theme.tag_preview_widget_border_color = "#ffffff" -- The border color of the widget +theme.tag_preview_widget_border_width = 3 -- The border width of the widget +theme.tag_preview_widget_margin = 0 -- The margin of the widget + +-- task preview widget +theme.task_preview_widget_border_radius = 0 -- Border radius of the widget (With AA) +theme.task_preview_widget_bg = "#000000" -- The bg color of the widget +theme.task_preview_widget_border_color = "#ffffff" -- The border color of the widget +theme.task_preview_widget_border_width = 3 -- The border width of the widget +theme.task_preview_widget_margin = 0 -- The margin of the widget + +-- tabbed misc widget(s) +theme.bling_tabbed_misc_titlebar_indicator = { + layout_spacing = dpi(4), + icon_size = dpi(20), + icon_margin = dpi(4), + bg_color_focus = "#ff0000", + bg_color = "#00000000", + icon_shape = function(cr, w, h) + gears.shape.rounded_rect(cr, w, h, 0) + end, + layout = wibox.layout.fixed.horizontal +} + +-- window switcher widget +theme.window_switcher_widget_bg = "#000000" -- The bg color of the widget +theme.window_switcher_widget_border_width = 3 -- The border width of the widget +theme.window_switcher_widget_border_radius = 0 -- The border radius of the widget +theme.window_switcher_widget_border_color = "#ffffff" -- The border color of the widget +theme.window_switcher_clients_spacing = 20 -- The space between each client item +theme.window_switcher_client_icon_horizontal_spacing = 5 -- The space between client icon and text +theme.window_switcher_client_width = 150 -- The width of one client widget +theme.window_switcher_client_height = 250 -- The height of one client widget +theme.window_switcher_client_margins = 10 -- The margin between the content and the border of the widget +theme.window_switcher_thumbnail_margins = 10 -- The margin between one client thumbnail and the rest of the widget +theme.thumbnail_scale = false -- If set to true, the thumbnails fit policy will be set to "fit" instead of "auto" +theme.window_switcher_name_margins = 10 -- The margin of one clients title to the rest of the widget +theme.window_switcher_name_valign = "center" -- How to vertically align one clients title +theme.window_switcher_name_forced_width = 200 -- The width of one title +theme.window_switcher_name_font = "sans 11" -- The font of all titles +theme.window_switcher_name_normal_color = "#ffffff" -- The color of one title if the client is unfocused +theme.window_switcher_name_focus_color = "#ff0000" -- The color of one title if the client is focused +theme.window_switcher_icon_valign = "center" -- How to vertically align the one icon +theme.window_switcher_icon_width = 40 -- The width of one icon +``` diff --git a/.config/awesome/bling/docs/widgets/tabbed_misc.md b/.config/awesome/bling/docs/widgets/tabbed_misc.md new file mode 100755 index 0000000..89c4557 --- /dev/null +++ b/.config/awesome/bling/docs/widgets/tabbed_misc.md @@ -0,0 +1,117 @@ +## 🧱 Tabbed Miscellaneous + +This comprises a few widgets to better represent tabbed groups (from the tabbed module) in your desktop. +The widgets currently included are: +- Titlebar Indicator +- Tasklist + +![Preview Image](https://i.imgur.com/ZeYSrxY.png) + +## Titlebar Indicator + +### Usage + +To use the task list indicator: +**NOTE:** Options can be set as theme vars under the table `theme.bling_tabbed_misc_titlebar_indicator` + +```lua +bling.widget.tabbed_misc.titlebar_indicator(client, { + layout = wibox.layout.fixed.vertical, + layout_spacing = dpi(5), -- Set spacing in between items + icon_size = dpi(24), -- Set icon size + icon_margin = 0, -- Set icon margin + fg_color = "#cccccc", -- Normal color for text + fg_color_focus = "#ffffff", -- Color for focused text + bg_color_focus = "#282828", -- Color for the focused items + bg_color = "#1d2021", -- Color for normal / unfocused items + icon_shape = gears.shape.circle -- Set icon shape, +}) +``` + +a widget_template option is also available: +```lua +bling.widget.tabbed_misc.titlebar_indicator(client, { + widget_template = { + { + widget = awful.widget.clienticon, + id = 'icon_role' + }, + widget = wibox.container.margin, + margins = 2, + id = 'bg_role', + update_callback = function(self, client, group) + if client == group.clients[group.focused_idx] then + self.margins = 5 + end + end + } +}) +``` + +### Example Implementation + +You normally embed the widget in your titlebar... +```lua +awful.titlebar(c).widget = { + { -- Left + bling.widget.tabbed_misc.titlebar_indicator(c), + layout = wibox.layout.fixed.horizontal + }, + { -- Middle + { -- Title + align = "center", + widget = awful.titlebar.widget.titlewidget(c) + }, + buttons = buttons, + layout = wibox.layout.flex.horizontal + }, + { -- Right + awful.titlebar.widget.maximizedbutton(c), + awful.titlebar.widget.closebutton (c), + layout = wibox.layout.fixed.horizontal + }, + layout = wibox.layout.align.horizontal + } +``` + +## Tasklist +The module exports a function that can be added to your tasklist as a `update_callback` + +### Usage +```lua +awful.widget.tasklist({ + screen = s, + filter = awful.widget.tasklist.filter.currenttags, + layout = { + spacing = dpi(10), + layout = wibox.layout.fixed.vertical, + }, + style = { + bg_normal = "#00000000", + }, + widget_template = { + { + { + widget = wibox.widget.imagebox, + id = "icon_role", + align = "center", + valign = "center", + }, + width = dpi(24), + height = dpi(24), + widget = wibox.container.constraint, + }, + widget = wibox.container.background, -- IT MUST BE A CONTAINER WIDGET AS THAT IS WHAT THE FUNCTION EXPECTS + update_callback = require("bling.widget.tabbed_misc").custom_tasklist, + id = "background_role", + }, +}) +``` + +If you need to do something else, it can be used like so +```lua +update_callback = function(self, client, index, clients) + require("bling.widget.tabbed_misc").custom_tasklist(self, client, index, clients) + require("naughty").notify({ text = "Tasklist was updated" }) +end +``` diff --git a/.config/awesome/bling/docs/widgets/tag_preview.md b/.config/awesome/bling/docs/widgets/tag_preview.md new file mode 100755 index 0000000..bdf033d --- /dev/null +++ b/.config/awesome/bling/docs/widgets/tag_preview.md @@ -0,0 +1,155 @@ +## 🔍 Tag Preview + +This is a popup widget that will show a preview of a specified tag that illustrates the position, size, content, and icon of all clients. + +![](https://imgur.com/zFdvs4K.gif) + +*gif by [javacafe](https://github.com/JavaCafe01)* + +### Usage + +To enable: + +```lua +bling.widget.tag_preview.enable { + show_client_content = false, -- Whether or not to show the client content + x = 10, -- The x-coord of the popup + y = 10, -- The y-coord of the popup + scale = 0.25, -- The scale of the previews compared to the screen + honor_padding = false, -- Honor padding when creating widget size + honor_workarea = false, -- Honor work area when creating widget size + placement_fn = function(c) -- Place the widget using awful.placement (this overrides x & y) + awful.placement.top_left(c, { + margins = { + top = 30, + left = 30 + } + }) + end, + background_widget = wibox.widget { -- Set a background image (like a wallpaper) for the widget + image = beautiful.wallpaper, + horizontal_fit_policy = "fit", + vertical_fit_policy = "fit", + widget = wibox.widget.imagebox + } +} +``` + +Here are the signals available: + +```lua +-- bling::tag_preview::update -- first line is the signal +-- t (tag) -- indented lines are function parameters +-- bling::tag_preview::visibility +-- s (screen) +-- v (boolean) +``` + +By default, the widget is not visible. You must implement when it will update and when it will show. + +### Example Implementation + +We can trigger the widget to show the specific tag when hovering over it in the taglist. The code shown below is the example taglist from the [AwesomeWM docs](https://awesomewm.org/doc/api/classes/awful.widget.taglist.html). Basically, we are going to update the widget and toggle it through the taglist's `create_callback`. (The bling addons are commented) +```lua +s.mytaglist = awful.widget.taglist { + screen = s, + filter = awful.widget.taglist.filter.all, + style = { + shape = gears.shape.powerline + }, + layout = { + spacing = -12, + spacing_widget = { + color = '#dddddd', + shape = gears.shape.powerline, + widget = wibox.widget.separator, + }, + layout = wibox.layout.fixed.horizontal + }, + widget_template = { + { + { + { + { + { + id = 'index_role', + widget = wibox.widget.textbox, + }, + margins = 4, + widget = wibox.container.margin, + }, + bg = '#dddddd', + shape = gears.shape.circle, + widget = wibox.container.background, + }, + { + { + id = 'icon_role', + widget = wibox.widget.imagebox, + }, + margins = 2, + widget = wibox.container.margin, + }, + { + id = 'text_role', + widget = wibox.widget.textbox, + }, + layout = wibox.layout.fixed.horizontal, + }, + left = 18, + right = 18, + widget = wibox.container.margin + }, + id = 'background_role', + widget = wibox.container.background, + -- Add support for hover colors and an index label + create_callback = function(self, c3, index, objects) --luacheck: no unused args + self:get_children_by_id('index_role')[1].markup = ' '..index..' ' + self:connect_signal('mouse::enter', function() + + -- BLING: Only show widget when there are clients in the tag + if #c3:clients() > 0 then + -- BLING: Update the widget with the new tag + awesome.emit_signal("bling::tag_preview::update", c3) + -- BLING: Show the widget + awesome.emit_signal("bling::tag_preview::visibility", s, true) + end + + if self.bg ~= '#ff0000' then + self.backup = self.bg + self.has_backup = true + end + self.bg = '#ff0000' + end) + self:connect_signal('mouse::leave', function() + + -- BLING: Turn the widget off + awesome.emit_signal("bling::tag_preview::visibility", s, false) + + if self.has_backup then self.bg = self.backup end + end) + end, + update_callback = function(self, c3, index, objects) --luacheck: no unused args + self:get_children_by_id('index_role')[1].markup = ' '..index..' ' + end, + }, + buttons = taglist_buttons +} +``` + +### Theme Variables + +```lua +theme.tag_preview_widget_border_radius = 0 -- Border radius of the widget (With AA) +theme.tag_preview_client_border_radius = 0 -- Border radius of each client in the widget (With AA) +theme.tag_preview_client_opacity = 0.5 -- Opacity of each client +theme.tag_preview_client_bg = "#000000" -- The bg color of each client +theme.tag_preview_client_border_color = "#ffffff" -- The border color of each client +theme.tag_preview_client_border_width = 3 -- The border width of each client +theme.tag_preview_widget_bg = "#000000" -- The bg color of the widget +theme.tag_preview_widget_border_color = "#ffffff" -- The border color of the widget +theme.tag_preview_widget_border_width = 3 -- The border width of the widget +theme.tag_preview_widget_margin = 0 -- The margin of the widget +``` + +NOTE: I recommend to only use the widget border radius theme variable when not using shadows with a compositor, as anti-aliased rounding with the outer widgets made with AwesomeWM rely on the actual bg being transparent. If you want rounding with shadows on the widget, use a compositor like [jonaburg's fork](https://github.com/jonaburg/picom). diff --git a/.config/awesome/bling/docs/widgets/task_preview.md b/.config/awesome/bling/docs/widgets/task_preview.md new file mode 100755 index 0000000..30a85f8 --- /dev/null +++ b/.config/awesome/bling/docs/widgets/task_preview.md @@ -0,0 +1,152 @@ +## 🔍 Task Preview + +This is a popup widget that will show a preview of the specified client. It is supposed to mimic the small popup that Windows has when hovering over the application icon. + +![](https://user-images.githubusercontent.com/33443763/124705653-d7b98b80-deaa-11eb-8091-42bbe62365be.png) + +*image by [javacafe](https://github.com/JavaCafe01)* + +### Usage + +To enable: + +```lua +bling.widget.task_preview.enable { + x = 20, -- The x-coord of the popup + y = 20, -- The y-coord of the popup + height = 200, -- The height of the popup + width = 200, -- The width of the popup + placement_fn = function(c) -- Place the widget using awful.placement (this overrides x & y) + awful.placement.bottom(c, { + margins = { + bottom = 30 + } + }) + end +} +``` + +To allow for more customization, there is also a `widget_structure` property (as seen in some default awesome widgets) which is optional. An example is as follows - +```lua +bling.widget.task_preview.enable { + x = 20, -- The x-coord of the popup + y = 20, -- The y-coord of the popup + height = 200, -- The height of the popup + width = 200, -- The width of the popup + placement_fn = function(c) -- Place the widget using awful.placement (this overrides x & y) + awful.placement.bottom(c, { + margins = { + bottom = 30 + } + }) + end, + -- Your widget will automatically conform to the given size due to a constraint container. + widget_structure = { + { + { + { + id = 'icon_role', + widget = awful.widget.clienticon, -- The client icon + }, + { + id = 'name_role', -- The client name / title + widget = wibox.widget.textbox, + }, + layout = wibox.layout.flex.horizontal + }, + widget = wibox.container.margin, + margins = 5 + }, + { + id = 'image_role', -- The client preview + resize = true, + valign = 'center', + halign = 'center', + widget = wibox.widget.imagebox, + }, + layout = wibox.layout.fixed.vertical + } +} +``` + +Here are the signals available: + +```lua +-- bling::task_preview::visibility -- first line is the signal +-- s (screen) -- indented lines are function parameters +-- v (boolean) +-- c (client) +``` + +By default, the widget is not visible. You must implement when it will update and when it will show. + +### Example Implementation + +We can trigger the widget to show the specific client when hovering over it in the tasklist. The code shown below is the example icon only tasklist from the [AwesomeWM docs](https://awesomewm.org/doc/api/classes/awful.widget.tasklist.html). Basically, we are going to toggle the widget through the tasklist's `create_callback`. (The bling addons are commented) +```lua +s.mytasklist = awful.widget.tasklist { + screen = s, + filter = awful.widget.tasklist.filter.currenttags, + buttons = tasklist_buttons, + layout = { + spacing_widget = { + { + forced_width = 5, + forced_height = 24, + thickness = 1, + color = '#777777', + widget = wibox.widget.separator + }, + valign = 'center', + halign = 'center', + widget = wibox.container.place, + }, + spacing = 1, + layout = wibox.layout.fixed.horizontal + }, + -- Notice that there is *NO* wibox.wibox prefix, it is a template, + -- not a widget instance. + widget_template = { + { + wibox.widget.base.make_widget(), + forced_height = 5, + id = 'background_role', + widget = wibox.container.background, + }, + { + { + id = 'clienticon', + widget = awful.widget.clienticon, + }, + margins = 5, + widget = wibox.container.margin + }, + nil, + create_callback = function(self, c, index, objects) --luacheck: no unused args + self:get_children_by_id('clienticon')[1].client = c + + -- BLING: Toggle the popup on hover and disable it off hover + self:connect_signal('mouse::enter', function() + awesome.emit_signal("bling::task_preview::visibility", s, + true, c) + end) + self:connect_signal('mouse::leave', function() + awesome.emit_signal("bling::task_preview::visibility", s, + false, c) + end) + end, + layout = wibox.layout.align.vertical, + }, +} +``` + +### Theme Variables +```lua +theme.task_preview_widget_border_radius = 0 -- Border radius of the widget (With AA) +theme.task_preview_widget_bg = "#000000" -- The bg color of the widget +theme.task_preview_widget_border_color = "#ffffff" -- The border color of the widget +theme.task_preview_widget_border_width = 3 -- The border width of the widget +theme.task_preview_widget_margin = 0 -- The margin of the widget +``` + +NOTE: I recommend to only use the widget border radius theme variable when not using shadows with a compositor, as anti-aliased rounding with the outer widgets made with AwesomeWM rely on the actual bg being transparent. If you want rounding with shadows on the widget, use a compositor like [jonaburg's fork](https://github.com/jonaburg/picom). diff --git a/.config/awesome/bling/docs/widgets/window_switcher.md b/.config/awesome/bling/docs/widgets/window_switcher.md new file mode 100755 index 0000000..8f48257 --- /dev/null +++ b/.config/awesome/bling/docs/widgets/window_switcher.md @@ -0,0 +1,67 @@ +## 🎨 Window Switcher + +A popup with client previews that allows you to switch clients similar to the alt-tab menu in MacOS, GNOME, and Windows. + +![](https://user-images.githubusercontent.com/70270606/133311802-8aef1012-346f-4f4c-843d-10d9de54ffeb.png) + +*image by [No37](https://github.com/Nooo37)* + +### Usage + +To enable: + +```lua +bling.widget.window_switcher.enable { + type = "thumbnail", -- set to anything other than "thumbnail" to disable client previews + + -- keybindings (the examples provided are also the default if kept unset) + hide_window_switcher_key = "Escape", -- The key on which to close the popup + minimize_key = "n", -- The key on which to minimize the selected client + unminimize_key = "N", -- The key on which to unminimize all clients + kill_client_key = "q", -- The key on which to close the selected client + cycle_key = "Tab", -- The key on which to cycle through all clients + previous_key = "Left", -- The key on which to select the previous client + next_key = "Right", -- The key on which to select the next client + vim_previous_key = "h", -- Alternative key on which to select the previous client + vim_next_key = "l", -- Alternative key on which to select the next client + + cycleClientsByIdx = awful.client.focus.byidx, -- The function to cycle the clients + filterClients = awful.widget.tasklist.filter.currenttags, -- The function to filter the viewed clients +} +``` + +To run the window swicher you have to emit this signal from within your configuration (usually using a keybind). + +```lua +awesome.emit_signal("bling::window_switcher::turn_on") +``` + +For example: +```lua + awful.key({Mod1}, "Tab", function() + awesome.emit_signal("bling::window_switcher::turn_on") + end, {description = "Window Switcher", group = "bling"}) +``` + +### Theme Variables +```lua +theme.window_switcher_widget_bg = "#000000" -- The bg color of the widget +theme.window_switcher_widget_border_width = 3 -- The border width of the widget +theme.window_switcher_widget_border_radius = 0 -- The border radius of the widget +theme.window_switcher_widget_border_color = "#ffffff" -- The border color of the widget +theme.window_switcher_clients_spacing = 20 -- The space between each client item +theme.window_switcher_client_icon_horizontal_spacing = 5 -- The space between client icon and text +theme.window_switcher_client_width = 150 -- The width of one client widget +theme.window_switcher_client_height = 250 -- The height of one client widget +theme.window_switcher_client_margins = 10 -- The margin between the content and the border of the widget +theme.window_switcher_thumbnail_margins = 10 -- The margin between one client thumbnail and the rest of the widget +theme.thumbnail_scale = false -- If set to true, the thumbnails fit policy will be set to "fit" instead of "auto" +theme.window_switcher_name_margins = 10 -- The margin of one clients title to the rest of the widget +theme.window_switcher_name_valign = "center" -- How to vertically align one clients title +theme.window_switcher_name_forced_width = 200 -- The width of one title +theme.window_switcher_name_font = "sans 11" -- The font of all titles +theme.window_switcher_name_normal_color = "#ffffff" -- The color of one title if the client is unfocused +theme.window_switcher_name_focus_color = "#ff0000" -- The color of one title if the client is focused +theme.window_switcher_icon_valign = "center" -- How to vertically align the one icon +theme.window_switcher_icon_width = 40 -- The width of one icon +``` diff --git a/.config/awesome/bling/helpers/client.lua b/.config/awesome/bling/helpers/client.lua new file mode 100755 index 0000000..0e14c51 --- /dev/null +++ b/.config/awesome/bling/helpers/client.lua @@ -0,0 +1,127 @@ +local awful = require("awful") +local gears = require("gears") + +local _client = {} + +--- Turn off passed client +-- Remove current tag from window's tags +-- +-- @param c A client +function _client.turn_off(c, current_tag) + if current_tag == nil then + current_tag = c.screen.selected_tag + end + local ctags = {} + for k, tag in pairs(c:tags()) do + if tag ~= current_tag then + table.insert(ctags, tag) + end + end + c:tags(ctags) + c.sticky = false +end + +--- Turn on passed client (add current tag to window's tags) +-- +-- @param c A client +function _client.turn_on(c) + local current_tag = c.screen.selected_tag + ctags = { current_tag } + for k, tag in pairs(c:tags()) do + if tag ~= current_tag then + table.insert(ctags, tag) + end + end + c:tags(ctags) + c:raise() + client.focus = c +end + +--- Sync two clients +-- +-- @param to_c The client to which to write all properties +-- @param from_c The client from which to read all properties +function _client.sync(to_c, from_c) + if not from_c or not to_c then + return + end + if not from_c.valid or not to_c.valid then + return + end + if from_c.modal then + return + end + to_c.floating = from_c.floating + to_c.maximized = from_c.maximized + to_c.above = from_c.above + to_c.below = from_c.below + to_c:geometry(from_c:geometry()) + -- TODO: Should also copy over the position in a tiling layout +end + +--- Checks whether the passed client is a childprocess of a given process ID +-- +-- @param c A client +-- @param pid The process ID +-- @return True if the passed client is a childprocess of the given PID otherwise false +function _client.is_child_of(c, pid) + -- io.popen is normally discouraged. Should probably be changed + if not c or not c.valid then + return false + end + if tostring(c.pid) == tostring(pid) then + return true + end + local pid_cmd = [[pstree -T -p -a -s ]] + .. tostring(c.pid) + .. [[ | sed '2q;d' | grep -o '[0-9]*$' | tr -d '\n']] + local handle = io.popen(pid_cmd) + local parent_pid = handle:read("*a") + handle:close() + return tostring(parent_pid) == tostring(pid) + or tostring(parent_pid) == tostring(c.pid) +end + +--- Finds all clients that satisfy the passed rule +-- +-- @param rule The rule to be searched for +-- @retrun A list of clients that match the given rule +function _client.find(rule) + local function matcher(c) + return awful.rules.match(c, rule) + end + local clients = client.get() + local findex = gears.table.hasitem(clients, client.focus) or 1 + local start = gears.math.cycle(#clients, findex + 1) + + local matches = {} + for c in awful.client.iterate(matcher, start) do + matches[#matches + 1] = c + end + + return matches +end + +--- Gets the next client by direction from the focused one +-- +-- @param direction it the direction as a string ("up", "down", "left" or "right") +-- @retrun the client in the given direction starting at the currently focused one, nil otherwise +function _client.get_by_direction(direction) + local sel = client.focus + if not sel then + return nil + end + local cltbl = sel.screen:get_clients() + local geomtbl = {} + for i, cl in ipairs(cltbl) do + geomtbl[i] = cl:geometry() + end + local target = gears.geometry.rectangle.get_in_direction( + direction, + geomtbl, + sel:geometry() + ) + return cltbl[target] +end + +return _client diff --git a/.config/awesome/bling/helpers/color.lua b/.config/awesome/bling/helpers/color.lua new file mode 100755 index 0000000..4042360 --- /dev/null +++ b/.config/awesome/bling/helpers/color.lua @@ -0,0 +1,158 @@ +local tonumber = tonumber +local string = string +local math = math +local floor = math.floor +local max = math.max +local min = math.min +local abs = math.abs +local format = string.format + +local _color = {} + +--- Try to guess if a color is dark or light. +-- +-- @string color The color with hexadecimal HTML format `"#RRGGBB"`. +-- @treturn bool `true` if the color is dark, `false` if it is light. +function _color.is_dark(color) + -- Try to determine if the color is dark or light + local numeric_value = 0 + for s in color:gmatch("[a-fA-F0-9][a-fA-F0-9]") do + numeric_value = numeric_value + tonumber("0x" .. s) + end + return (numeric_value < 383) +end + +function _color.is_opaque(color) + if type(color) == "string" then + color = _color.hex_to_rgba(color) + end + + return color.a < 0.01 +end + +--- Lighten a color. +-- +-- @string color The color to lighten with hexadecimal HTML format `"#RRGGBB"`. +-- @int[opt=26] amount How much light from 0 to 255. Default is around 10%. +-- @treturn string The lighter color +function _color.lighten(color, amount) + amount = amount or 26 + local c = { + r = tonumber("0x" .. color:sub(2, 3)), + g = tonumber("0x" .. color:sub(4, 5)), + b = tonumber("0x" .. color:sub(6, 7)), + } + + c.r = c.r + amount + c.r = c.r < 0 and 0 or c.r + c.r = c.r > 255 and 255 or c.r + c.g = c.g + amount + c.g = c.g < 0 and 0 or c.g + c.g = c.g > 255 and 255 or c.g + c.b = c.b + amount + c.b = c.b < 0 and 0 or c.b + c.b = c.b > 255 and 255 or c.b + + return string.format("#%02x%02x%02x", c.r, c.g, c.b) +end + +--- Darken a color. +-- +-- @string color The color to darken with hexadecimal HTML format `"#RRGGBB"`. +-- @int[opt=26] amount How much dark from 0 to 255. Default is around 10%. +-- @treturn string The darker color +function _color.darken(color, amount) + amount = amount or 26 + return _color.lighten(color, -amount) +end + +-- Returns a value that is clipped to interval edges if it falls outside the interval +function _color.clip(num, min_num, max_num) + return max(min(num, max_num), min_num) +end + +-- Converts the given hex color to rgba +function _color.hex_to_rgba(color) + color = color:gsub("#", "") + return { r = tonumber("0x" .. color:sub(1, 2)), + g = tonumber("0x" .. color:sub(3, 4)), + b = tonumber("0x" .. color:sub(5, 6)), + a = #color == 8 and tonumber("0x" .. color:sub(7, 8)) or 255 } +end + +-- Converts the given rgba color to hex +function _color.rgba_to_hex(color) + local r = _color.clip(color.r or color[1], 0, 255) + local g = _color.clip(color.g or color[2], 0, 255) + local b = _color.clip(color.b or color[3], 0, 255) + local a = _color.clip(color.a or color[4] or 255, 0, 255) + return "#" .. format("%02x%02x%02x%02x", + floor(r), + floor(g), + floor(b), + floor(a)) +end + +-- Converts the given hex color to hsv +function _color.hex_to_hsv(color) + local color = _color.hex2rgb(color) + local C_max = max(color.r, color.g, color.b) + local C_min = min(color.r, color.g, color.b) + local delta = C_max - C_min + local H, S, V + if delta == 0 then + H = 0 + elseif C_max == color.r then + H = 60 * (((color.g - color.b) / delta) % 6) + elseif C_max == color.g then + H = 60 * (((color.b - color.r) / delta) + 2) + elseif C_max == color.b then + H = 60 * (((color.r - color.g) / delta) + 4) + end + if C_max == 0 then + S = 0 + else + S = delta / C_max + end + V = C_max + + return { h = H, + s = S * 100, + v = V * 100 } +end + +-- Converts the given hsv color to hex +function _color.hsv_to_hex(H, S, V) + S = S / 100 + V = V / 100 + if H > 360 then H = 360 end + if H < 0 then H = 0 end + local C = V * S + local X = C * (1 - abs(((H / 60) % 2) - 1)) + local m = V - C + local r_, g_, b_ = 0, 0, 0 + if H >= 0 and H < 60 then + r_, g_, b_ = C, X, 0 + elseif H >= 60 and H < 120 then + r_, g_, b_ = X, C, 0 + elseif H >= 120 and H < 180 then + r_, g_, b_ = 0, C, X + elseif H >= 180 and H < 240 then + r_, g_, b_ = 0, X, C + elseif H >= 240 and H < 300 then + r_, g_, b_ = X, 0, C + elseif H >= 300 and H < 360 then + r_, g_, b_ = C, 0, X + end + local r, g, b = (r_ + m) * 255, (g_ + m) * 255, (b_ + m) * 255 + return ("#%02x%02x%02x"):format(floor(r), floor(g), floor(b)) +end + +function _color.multiply(color, amount) + return { _color.clip(color.r * amount, 0, 255), + _color.clip(color.g * amount, 0, 255), + _color.clip(color.b * amount, 0, 255), + 255 } +end + +return _color diff --git a/.config/awesome/bling/helpers/filesystem.lua b/.config/awesome/bling/helpers/filesystem.lua new file mode 100755 index 0000000..f06139a --- /dev/null +++ b/.config/awesome/bling/helpers/filesystem.lua @@ -0,0 +1,62 @@ +local Gio = require("lgi").Gio +local awful = require("awful") +local string = string + +local _filesystem = {} + +--- Get a list of files from a given directory. +-- @string path The directory to search. +-- @tparam[opt] table exts Specific extensions to limit the search to. eg:`{ "jpg", "png" }` +-- If ommited, all files are considered. +-- @bool[opt=false] recursive List files from subdirectories +-- @staticfct bling.helpers.filesystem.get_random_file_from_dir +function _filesystem.list_directory_files(path, exts, recursive) + recursive = recursive or false + local files, valid_exts = {}, {} + + -- Transforms { "jpg", ... } into { [jpg] = #, ... } + if exts then + for i, j in ipairs(exts) do + valid_exts[j:lower()] = i + end + end + + -- Build a table of files from the path with the required extensions + local file_list = Gio.File.new_for_path(path):enumerate_children( + "standard::*", + 0 + ) + if file_list then + for file in function() + return file_list:next_file() + end do + local file_type = file:get_file_type() + if file_type == "REGULAR" then + local file_name = file:get_display_name() + if + not exts + or valid_exts[file_name:lower():match(".+%.(.*)$") or ""] + then + table.insert(files, file_name) + end + elseif recursive and file_type == "DIRECTORY" then + local file_name = file:get_display_name() + files = gears.table.join( + files, + list_directory_files(file_name, exts, recursive) + ) + end + end + end + + return files +end + +function _filesystem.save_image_async_curl(url, filepath, callback) + awful.spawn.with_line_callback(string.format("curl -L -s %s -o %s", url, filepath), + { + exit=callback + }) +end + +return _filesystem diff --git a/.config/awesome/bling/helpers/icon_theme.lua b/.config/awesome/bling/helpers/icon_theme.lua new file mode 100755 index 0000000..c4d4583 --- /dev/null +++ b/.config/awesome/bling/helpers/icon_theme.lua @@ -0,0 +1,142 @@ +local lgi = require("lgi") +local Gio = lgi.Gio +local Gtk = lgi.require("Gtk", "3.0") +local gobject = require("gears.object") +local gtable = require("gears.table") +local setmetatable = setmetatable +local ipairs = ipairs + +local icon_theme = { mt = {} } + +local name_lookup = +{ + ["jetbrains-studio"] = "android-studio" +} + +local function get_icon_by_pid_command(self, client, apps) + local pid = client.pid + if pid ~= nil then + local handle = io.popen(string.format("ps -p %d -o comm=", pid)) + local pid_command = handle:read("*a"):gsub("^%s*(.-)%s*$", "%1") + handle:close() + + for _, app in ipairs(apps) do + local executable = app:get_executable() + if executable and executable:find(pid_command, 1, true) then + return self:get_gicon_path(app:get_icon()) + end + end + end +end + +local function get_icon_by_icon_name(self, client, apps) + local icon_name = client.icon_name and client.icon_name:lower() or nil + if icon_name ~= nil then + for _, app in ipairs(apps) do + local name = app:get_name():lower() + if name and name:find(icon_name, 1, true) then + return self:get_gicon_path(app:get_icon()) + end + end + end +end + +local function get_icon_by_class(self, client, apps) + if client.class ~= nil then + local class = name_lookup[client.class] or client.class:lower() + + -- Try to remove dashes + local class_1 = class:gsub("[%-]", "") + + -- Try to replace dashes with dot + local class_2 = class:gsub("[%-]", ".") + + -- Try to match only the first word + local class_3 = class:match("(.-)-") or class + class_3 = class_3:match("(.-)%.") or class_3 + class_3 = class_3:match("(.-)%s+") or class_3 + + local possible_icon_names = { class, class_3, class_2, class_1 } + for _, app in ipairs(apps) do + local id = app:get_id():lower() + for _, possible_icon_name in ipairs(possible_icon_names) do + if id and id:find(possible_icon_name, 1, true) then + return self:get_gicon_path(app:get_icon()) + end + end + end + end +end + +function icon_theme:get_client_icon_path(client) + local apps = Gio.AppInfo.get_all() + + return get_icon_by_pid_command(self, client, apps) or + get_icon_by_icon_name(self, client, apps) or + get_icon_by_class(self, client, apps) or + client.icon or + self:choose_icon({"window", "window-manager", "xfwm4-default", "window_list" }) +end + +function icon_theme:choose_icon(icons_names) + local icon_info = self.gtk_theme:choose_icon(icons_names, self.icon_size, 0); + if icon_info then + local icon_path = icon_info:get_filename() + if icon_path then + return icon_path + end + end + + return "" +end + +function icon_theme:get_gicon_path(gicon) + if gicon == nil then + return "" + end + + local icon_info = self.gtk_theme:lookup_by_gicon(gicon, self.icon_size, 0); + if icon_info then + local icon_path = icon_info:get_filename() + if icon_path then + return icon_path + end + end + + return "" +end + +function icon_theme:get_icon_path(icon_name) + local icon_info = self.gtk_theme:lookup_icon(icon_name, self.icon_size, 0) + if icon_info then + local icon_path = icon_info:get_filename() + if icon_path then + return icon_path + end + end + + return "" +end + +local function new(theme_name, icon_size) + local ret = gobject{} + gtable.crush(ret, icon_theme, true) + + ret.name = theme_name or nil + ret.icon_size = icon_size or 48 + + if theme_name then + ret.gtk_theme = Gtk.IconTheme.new() + Gtk.IconTheme.set_custom_theme(ret.gtk_theme, theme_name); + else + ret.gtk_theme = Gtk.IconTheme.get_default() + end + + return ret +end + +function icon_theme.mt:__call(...) + return new(...) +end + +return setmetatable(icon_theme, icon_theme.mt) \ No newline at end of file diff --git a/.config/awesome/bling/helpers/init.lua b/.config/awesome/bling/helpers/init.lua new file mode 100755 index 0000000..f2c898e --- /dev/null +++ b/.config/awesome/bling/helpers/init.lua @@ -0,0 +1,7 @@ +return { + client = require(... .. ".client"), + color = require(... .. ".color"), + filesystem = require(... .. ".filesystem"), + shape = require(... .. ".shape"), + time = require(... .. ".time"), +} diff --git a/.config/awesome/bling/helpers/shape.lua b/.config/awesome/bling/helpers/shape.lua new file mode 100755 index 0000000..fedc544 --- /dev/null +++ b/.config/awesome/bling/helpers/shape.lua @@ -0,0 +1,30 @@ +local gears = require("gears") + +local shape = {} + +-- Create rounded rectangle shape (in one line) + +function shape.rrect(radius) + return function(cr, width, height) + gears.shape.rounded_rect(cr, width, height, radius) + end +end + +-- Create partially rounded rect + +function shape.prrect(radius, tl, tr, br, bl) + return function(cr, width, height) + gears.shape.partially_rounded_rect( + cr, + width, + height, + tl, + tr, + br, + bl, + radius + ) + end +end + +return shape diff --git a/.config/awesome/bling/helpers/time.lua b/.config/awesome/bling/helpers/time.lua new file mode 100755 index 0000000..5ab0f25 --- /dev/null +++ b/.config/awesome/bling/helpers/time.lua @@ -0,0 +1,24 @@ +local time = {} + +--- Parse a time string to seconds (from midnight) +-- +-- @string time The time (`HH:MM:SS`) +-- @treturn int The number of seconds since 00:00:00 +function time.hhmmss_to_seconds(time) + hour_sec = tonumber(string.sub(time, 1, 2)) * 3600 + min_sec = tonumber(string.sub(time, 4, 5)) * 60 + get_sec = tonumber(string.sub(time, 7, 8)) + return (hour_sec + min_sec + get_sec) +end + +--- Get time difference in seconds. +-- +-- @tparam string base The time to compare from (`HH:MM:SS`). +-- @tparam string base The time to compare to (`HH:MM:SS`). +-- @treturn int Number of seconds between the two times. +function time.time_diff(base, compare) + local diff = time.hhmmss_to_seconds(base) - time.hhmmss_to_seconds(compare) + return diff +end + +return time diff --git a/.config/awesome/bling/icons/layouts/centered.png b/.config/awesome/bling/icons/layouts/centered.png new file mode 100755 index 0000000..5e4d07f Binary files /dev/null and b/.config/awesome/bling/icons/layouts/centered.png differ diff --git a/.config/awesome/bling/icons/layouts/deck.png b/.config/awesome/bling/icons/layouts/deck.png new file mode 100755 index 0000000..829d0c2 Binary files /dev/null and b/.config/awesome/bling/icons/layouts/deck.png differ diff --git a/.config/awesome/bling/icons/layouts/equalarea.png b/.config/awesome/bling/icons/layouts/equalarea.png new file mode 100755 index 0000000..47164a9 Binary files /dev/null and b/.config/awesome/bling/icons/layouts/equalarea.png differ diff --git a/.config/awesome/bling/icons/layouts/horizontal.png b/.config/awesome/bling/icons/layouts/horizontal.png new file mode 100755 index 0000000..217f4eb Binary files /dev/null and b/.config/awesome/bling/icons/layouts/horizontal.png differ diff --git a/.config/awesome/bling/icons/layouts/mstab.png b/.config/awesome/bling/icons/layouts/mstab.png new file mode 100755 index 0000000..4372846 Binary files /dev/null and b/.config/awesome/bling/icons/layouts/mstab.png differ diff --git a/.config/awesome/bling/icons/layouts/vertical.png b/.config/awesome/bling/icons/layouts/vertical.png new file mode 100755 index 0000000..3561673 Binary files /dev/null and b/.config/awesome/bling/icons/layouts/vertical.png differ diff --git a/.config/awesome/bling/images/bling_banner-2x.png b/.config/awesome/bling/images/bling_banner-2x.png new file mode 100755 index 0000000..9e2ab30 Binary files /dev/null and b/.config/awesome/bling/images/bling_banner-2x.png differ diff --git a/.config/awesome/bling/images/bling_banner.png b/.config/awesome/bling/images/bling_banner.png new file mode 100755 index 0000000..43de6c9 Binary files /dev/null and b/.config/awesome/bling/images/bling_banner.png differ diff --git a/.config/awesome/bling/init.lua b/.config/awesome/bling/init.lua new file mode 100755 index 0000000..23c0acf --- /dev/null +++ b/.config/awesome/bling/init.lua @@ -0,0 +1,11 @@ +--[[ + Bling + Layouts, widgets and utilities for Awesome WM +--]] +return { + layout = require(... .. ".layout"), + module = require(... .. ".module"), + helpers = require(... .. ".helpers"), + signal = require(... .. ".signal"), + widget = require(... .. ".widget"), +} diff --git a/.config/awesome/bling/layout/centered.lua b/.config/awesome/bling/layout/centered.lua new file mode 100755 index 0000000..7929dd8 --- /dev/null +++ b/.config/awesome/bling/layout/centered.lua @@ -0,0 +1,80 @@ +local awful = require("awful") +local math = math + +local mylayout = {} + +mylayout.name = "centered" + +function mylayout.arrange(p) + local area = p.workarea + local t = p.tag or screen[p.screen].selected_tag + local nmaster = math.min(t.master_count, #p.clients) + local nslaves = #p.clients - nmaster + + local master_area_width = area.width * t.master_width_factor + if t.master_count == 0 then master_area_width = 0 end + local slave_width = 0.5 * (area.width - master_area_width) + local master_area_x = area.x + slave_width + + + -- Special case: few slaves -> make masters take more space - unless requested otherwise! + if nslaves < 2 and t.master_fill_policy ~= "master_width_factor" then + master_area_x = area.x + + if nslaves == 1 then + slave_width = area.width - master_area_width + else + master_area_width = area.width + end + end + + + -- iterate through masters + for idx = 1, nmaster do + local c = p.clients[idx] + local g + g = { + x = master_area_x, + y = area.y + (nmaster - idx) * (area.height / nmaster), + width = master_area_width, + height = area.height / nmaster, + } + p.geometries[c] = g + end + + + -- iterate through slaves + local number_of_left_sided_slaves = math.floor(nslaves / 2) + local number_of_right_sided_slaves = nslaves - number_of_left_sided_slaves + local left_iterator = 0 + local right_iterator = 0 + + for idx = 1, nslaves do + local c = p.clients[idx + nmaster] + local g + if idx % 2 == 0 then + g = { + x = area.x, + y = area.y + + left_iterator + * (area.height / number_of_left_sided_slaves), + width = slave_width, + height = area.height / number_of_left_sided_slaves, + } + left_iterator = left_iterator + 1 + else + g = { + x = master_area_x + master_area_width, + y = area.y + + right_iterator + * (area.height / number_of_right_sided_slaves), + width = slave_width, + height = area.height / number_of_right_sided_slaves, + } + right_iterator = right_iterator + 1 + end + p.geometries[c] = g + end +end + +return mylayout diff --git a/.config/awesome/bling/layout/deck.lua b/.config/awesome/bling/layout/deck.lua new file mode 100755 index 0000000..e0500b9 --- /dev/null +++ b/.config/awesome/bling/layout/deck.lua @@ -0,0 +1,37 @@ +local mylayout = {} + +mylayout.name = "deck" + +function mylayout.arrange(p) + local area = p.workarea + local t = p.tag or screen[p.screen].selected_tag + local client_count = #p.clients + + if client_count == 1 then + local c = p.clients[1] + local g = { + x = area.x, + y = area.y, + width = area.width, + height = area.height, + } + p.geometries[c] = g + return + end + + local xoffset = area.width * 0.1 / (client_count - 1) + local yoffset = area.height * 0.1 / (client_count - 1) + + for idx = 1, client_count do + local c = p.clients[idx] + local g = { + x = area.x + (idx - 1) * xoffset, + y = area.y + (idx - 1) * yoffset, + width = area.width - (xoffset * (client_count - 1)), + height = area.height - (yoffset * (client_count - 1)), + } + p.geometries[c] = g + end +end + +return mylayout diff --git a/.config/awesome/bling/layout/equalarea.lua b/.config/awesome/bling/layout/equalarea.lua new file mode 100755 index 0000000..37e972d --- /dev/null +++ b/.config/awesome/bling/layout/equalarea.lua @@ -0,0 +1,77 @@ +local math = math +local screen = screen +local mylayout = {} +mylayout.name = "equalarea" + +local function divide(p, g, low, high, cls, mwfact, mcount) + if low == high then + p.geometries[cls[low]] = g + else + local masters = math.max(0, math.min(mcount, high) - low + 1) + local numblock = high - low + 1 + local slaves = numblock - masters + local smalldiv + if numblock > 5 and (numblock % 5) == 0 then + smalldiv = math.floor(numblock / 5) + else + if (numblock % 3) == 0 then + smalldiv = math.floor(numblock / 3) + else + smalldiv = math.floor(numblock / 2) + end + end + local bigdiv = numblock - smalldiv + local smallmasters = math.min(masters, smalldiv) + local bigmasters = masters - smallmasters + local smallg = {} + local bigg = {} + smallg.x = g.x + smallg.y = g.y + if g.width > (g.height * 1.3) then + smallg.height = g.height + bigg.height = g.height + bigg.width = math.floor( + g.width + * (bigmasters * (mwfact - 1) + bigdiv) + / (slaves + mwfact * masters) + ) + smallg.width = g.width - bigg.width + bigg.y = g.y + bigg.x = g.x + smallg.width + else + smallg.width = g.width + bigg.width = g.width + bigg.height = math.floor( + g.height + * (bigmasters * (mwfact - 1) + bigdiv) + / (slaves + mwfact * masters) + ) + smallg.height = g.height - bigg.height + bigg.x = g.x + bigg.y = g.y + smallg.height + end + divide(p, smallg, low, high - bigdiv, cls, mwfact, mcount) + divide(p, bigg, low + smalldiv, high, cls, mwfact, mcount) + end + return +end + +function mylayout.arrange(p) + local t = p.tag or screen[p.screen].selected_tag + local wa = p.workarea + local cls = p.clients + + if #cls == 0 then + return + end + local mwfact = t.master_width_factor * 2 + local mcount = t.master_count + local g = {} + g.height = wa.height + g.width = wa.width + g.x = wa.x + g.y = wa.y + divide(p, g, 1, #cls, cls, mwfact, mcount) +end + +return mylayout diff --git a/.config/awesome/bling/layout/horizontal.lua b/.config/awesome/bling/layout/horizontal.lua new file mode 100755 index 0000000..23f9c9e --- /dev/null +++ b/.config/awesome/bling/layout/horizontal.lua @@ -0,0 +1,56 @@ +local math = math + +local mylayout = {} + +mylayout.name = "horizontal" + +function mylayout.arrange(p) + local area = p.workarea + local t = p.tag or screen[p.screen].selected_tag + local mwfact = t.master_width_factor + local nmaster = math.min(t.master_count, #p.clients) + local nslaves = #p.clients - nmaster + + local master_area_height = area.height * mwfact + local slave_area_height = area.height - master_area_height + + -- Special case: no slaves + if nslaves == 0 then + master_area_height = area.height + slave_area_height = 0 + end + + -- Special case: no masters + if nmaster == 0 then + master_area_height = 0 + slave_area_height = area.height + end + + -- itearte through masters + for idx = 1, nmaster do + local c = p.clients[idx] + local g = { + x = area.x + (idx - 1) * (area.width / nmaster), + y = area.y, + width = area.width / nmaster, + height = master_area_height, + } + p.geometries[c] = g + end + + -- iterate through slaves + for idx = 1, nslaves do + local c = p.clients[idx + nmaster] + local g = { + x = area.x, + y = area.y + + master_area_height + + (idx - 1) * (slave_area_height / nslaves), + width = area.width, + height = slave_area_height / nslaves, + } + p.geometries[c] = g + end +end + +return mylayout diff --git a/.config/awesome/bling/layout/init.lua b/.config/awesome/bling/layout/init.lua new file mode 100755 index 0000000..de30ed6 --- /dev/null +++ b/.config/awesome/bling/layout/init.lua @@ -0,0 +1,46 @@ +local beautiful = require("beautiful") +local gears = require("gears") + +local M = {} +local relative_lua_path = tostring(...) + +local function get_layout_icon_path(name) + local relative_icon_path = relative_lua_path + :match("^.*bling"):gsub("%.", "/") + .. "/icons/layouts/" .. name .. ".png" + + for p in package.path:gmatch('([^;]+)') do + p = p:gsub("?.*", "") + local absolute_icon_path = p .. relative_icon_path + if gears.filesystem.file_readable(absolute_icon_path) then + return absolute_icon_path + end + end +end + +local function get_icon(icon_raw) + if icon_raw ~= nil then + return gears.color.recolor_image(icon_raw, beautiful.fg_normal) + else + return nil + end +end + +local layouts = { + "mstab", + "vertical", + "horizontal", + "centered", + "equalarea", + "deck" +} + +for _, layout_name in ipairs(layouts) do + local icon_raw = get_layout_icon_path(layout_name) + if beautiful["layout_" .. layout_name] == nil then + beautiful["layout_" .. layout_name] = get_icon(icon_raw) + end + M[layout_name] = require(... .. "." .. layout_name) +end + +return M diff --git a/.config/awesome/bling/layout/mstab.lua b/.config/awesome/bling/layout/mstab.lua new file mode 100755 index 0000000..88ce0cb --- /dev/null +++ b/.config/awesome/bling/layout/mstab.lua @@ -0,0 +1,236 @@ +local awful = require("awful") +local gears = require("gears") +local wibox = require("wibox") +local beautiful = require("beautiful") + +local mylayout = {} + +mylayout.name = "mstab" + +local tabbar_disable = beautiful.mstab_bar_disable or false +local tabbar_ontop = beautiful.mstab_bar_ontop or false +local tabbar_padding = beautiful.mstab_bar_padding or "default" +local border_radius = beautiful.mstab_border_radius + or beautiful.border_radius + or 0 +local tabbar_position = beautiful.mstab_tabbar_position + or beautiful.tabbar_position + or "top" + +local bar_style = beautiful.mstab_tabbar_style + or beautiful.tabbar_style + or "default" +local bar = require( + tostring(...):match(".*bling") .. ".widget.tabbar." .. bar_style +) +local tabbar_size = bar.size + or beautiful.mstab_bar_height + or beautiful.tabbar_size + or 40 +local dont_resize_slaves = beautiful.mstab_dont_resize_slaves or false + +-- The top_idx is the idx of the slave clients (excluding all master clients) +-- that should be on top of all other slave clients ("the focused slave") +-- by creating a variable outside of the arrange function, this layout can "remember" that client +-- by creating it as a new property of every tag, this layout can be active on different tags and +-- still have different "focused slave clients" +for idx, tag in ipairs(root.tags()) do + tag.top_idx = 1 +end + +-- Haven't found a signal that is emitted when a new tag is added. That should work though +-- since you can't use a layout on a tag that you haven't selected previously +tag.connect_signal("property::selected", function(t) + if not t.top_idx then + t.top_idx = 1 + end +end) + +function update_tabbar( + clients, + t, + top_idx, + area, + master_area_width, + slave_area_width +) + local s = t.screen + + -- create the list of clients for the tabbar + local clientlist = bar.layout() + for idx, c in ipairs(clients) do + -- focus with right click, kill with mid click, minimize with left click + local buttons = gears.table.join( + awful.button({}, 1, function() + c:raise() + client.focus = c + end), + awful.button({}, 2, function() + c:kill() + end), + awful.button({}, 3, function() + c.minimized = true + end) + ) + local client_box = bar.create(c, (idx == top_idx), buttons) + clientlist:add(client_box) + end + + -- if no tabbar exists, create one + if not s.tabbar then + s.tabbar = wibox({ + ontop = tabbar_ontop, + shape = function(cr, width, height) + gears.shape.rounded_rect(cr, width, height, border_radius) + end, + bg = bar.bg_normal, + visible = true, + }) + + -- Change visibility of the tab bar when layout, selected tag or number of clients (visible, master, slave) changes + local function adjust_visibility() + local name = awful.layout.getname( awful.layout.get( s ) ) + s.tabbar.visible = (name == mylayout.name) + end + + tag.connect_signal("property::selected", adjust_visibility) + tag.connect_signal("property::layout", adjust_visibility) + tag.connect_signal("tagged", adjust_visibility) + tag.connect_signal("untagged", adjust_visibility) + tag.connect_signal("property::master_count", adjust_visibility) + client.connect_signal("property::minimized", adjust_visibility) + end + + -- update the tabbar size and position (to support gap size change on the fly) + if tabbar_position == "top" then + s.tabbar.x = area.x + master_area_width + t.gap + s.tabbar.y = area.y + t.gap + s.tabbar.width = slave_area_width - 2 * t.gap + s.tabbar.height = tabbar_size + elseif tabbar_position == "bottom" then + s.tabbar.x = area.x + master_area_width + t.gap + s.tabbar.y = area.y + area.height - tabbar_size - t.gap + s.tabbar.width = slave_area_width - 2 * t.gap + s.tabbar.height = tabbar_size + elseif tabbar_position == "left" then + s.tabbar.x = area.x + master_area_width + t.gap + s.tabbar.y = area.y + t.gap + s.tabbar.width = tabbar_size + s.tabbar.height = area.height - 2 * t.gap + elseif tabbar_position == "right" then + s.tabbar.x = area.x + + master_area_width + + slave_area_width + - tabbar_size + - t.gap + s.tabbar.y = area.y + t.gap + s.tabbar.width = tabbar_size + s.tabbar.height = area.height - 2 * t.gap + end + + -- update clientlist + s.tabbar:setup({ layout = wibox.layout.flex.horizontal, clientlist }) +end + +function mylayout.arrange(p) + local area = p.workarea + local t = p.tag or screen[p.screen].selected_tag + local s = t.screen + local mwfact = t.master_width_factor + local nmaster = math.min(t.master_count, #p.clients) + local nslaves = #p.clients - nmaster + + local master_area_width = area.width * mwfact + local slave_area_width = area.width - master_area_width + + -- "default" means that it uses standard useless gap size + if tabbar_padding == "default" then + tabbar_padding = 2 * t.gap + end + + -- Special case: No masters -> full screen slave width + if nmaster == 0 then + master_area_width = 1 + slave_area_width = area.width + end + + -- Special case: One or zero slaves -> no tabbar (essentially tile right) + if nslaves <= 1 then + -- since update_tabbar isnt called that way we have to hide it manually + if s.tabbar then + s.tabbar.visible = false + end + -- otherwise just do tile right + awful.layout.suit.tile.right.arrange(p) + return + end + + -- Iterate through masters + for idx = 1, nmaster do + local c = p.clients[idx] + local g = { + x = area.x, + y = area.y + (idx - 1) * (area.height / nmaster), + width = master_area_width, + height = area.height / nmaster, + } + p.geometries[c] = g + end + + local tabbar_size_change = 0 + local tabbar_width_change = 0 + local tabbar_y_change = 0 + local tabbar_x_change = 0 + if not tabbar_disable then + if tabbar_position == "top" then + tabbar_size_change = tabbar_size + tabbar_padding + tabbar_y_change = tabbar_size + tabbar_padding + elseif tabbar_position == "bottom" then + tabbar_size_change = tabbar_size + tabbar_padding + elseif tabbar_position == "left" then + tabbar_width_change = tabbar_size + tabbar_padding + tabbar_x_change = tabbar_size + tabbar_padding + elseif tabbar_position == "right" then + tabbar_width_change = tabbar_size + tabbar_padding + end + end + + -- Iterate through slaves + -- (also creates a list of all slave clients for update_tabbar) + local slave_clients = {} + for idx = 1, nslaves do + local c = p.clients[idx + nmaster] + slave_clients[#slave_clients + 1] = c + if c == client.focus then + t.top_idx = #slave_clients + end + local g = { + x = area.x + master_area_width + tabbar_x_change, + y = area.y + tabbar_y_change, + width = slave_area_width - tabbar_width_change, + height = area.height - tabbar_size_change, + } + if not dont_resize_slaves and idx ~= t.top_idx then + g = { + x = area.x + master_area_width + slave_area_width / 4, + y = area.y + tabbar_size + area.height / 4, + width = slave_area_width / 2, + height = area.height / 4 - tabbar_size, + } + end + p.geometries[c] = g + end + + if not tabbar_disable then + update_tabbar( + slave_clients, + t, + t.top_idx, + area, + master_area_width, + slave_area_width + ) + end +end + +return mylayout diff --git a/.config/awesome/bling/layout/vertical.lua b/.config/awesome/bling/layout/vertical.lua new file mode 100755 index 0000000..8b6811e --- /dev/null +++ b/.config/awesome/bling/layout/vertical.lua @@ -0,0 +1,56 @@ +local math = math + +local mylayout = {} + +mylayout.name = "vertical" + +function mylayout.arrange(p) + local area = p.workarea + local t = p.tag or screen[p.screen].selected_tag + local mwfact = t.master_width_factor + local nmaster = math.min(t.master_count, #p.clients) + local nslaves = #p.clients - nmaster + + local master_area_width = area.width * mwfact + local slave_area_width = area.width - master_area_width + + -- Special case: no slaves + if nslaves == 0 then + master_area_width = area.width + slave_area_width = 0 + end + + -- Special case: no masters + if nmaster == 0 then + master_area_width = 0 + slave_area_width = area.width + end + + -- iterate through masters + for idx = 1, nmaster do + local c = p.clients[idx] + local g = { + x = area.x, + y = area.y + (idx - 1) * (area.height / nmaster), + width = master_area_width, + height = area.height / nmaster, + } + p.geometries[c] = g + end + + -- itearte through slaves + for idx = 1, nslaves do + local c = p.clients[idx + nmaster] + local g = { + x = area.x + + master_area_width + + (idx - 1) * (slave_area_width / nslaves), + y = area.y, + width = slave_area_width / nslaves, + height = area.height, + } + p.geometries[c] = g + end +end + +return mylayout diff --git a/.config/awesome/bling/module/flash_focus.lua b/.config/awesome/bling/module/flash_focus.lua new file mode 100755 index 0000000..35f3cf0 --- /dev/null +++ b/.config/awesome/bling/module/flash_focus.lua @@ -0,0 +1,39 @@ +local gears = require("gears") +local beautiful = require("beautiful") + +local op = beautiful.flash_focus_start_opacity or 0.6 +local stp = beautiful.flash_focus_step or 0.01 + +local flashfocus = function(c) + if c and #c.screen.clients > 1 then + c.opacity = op + local q = op + local g = gears.timer({ + timeout = stp, + call_now = false, + autostart = true, + }) + + g:connect_signal("timeout", function() + if not c.valid then + return + end + if q >= 1 then + c.opacity = 1 + g:stop() + else + c.opacity = q + q = q + stp + end + end) + end +end + +local enable = function() + client.connect_signal("focus", flashfocus) +end +local disable = function() + client.disconnect_signal("focus", flashfocus) +end + +return { enable = enable, disable = disable, flashfocus = flashfocus } diff --git a/.config/awesome/bling/module/init.lua b/.config/awesome/bling/module/init.lua new file mode 100755 index 0000000..ed127f6 --- /dev/null +++ b/.config/awesome/bling/module/init.lua @@ -0,0 +1,8 @@ +return { + window_swallowing = require(... .. ".window_swallowing"), + tiled_wallpaper = require(... .. ".tiled_wallpaper"), + wallpaper = require(... .. ".wallpaper"), + flash_focus = require(... .. ".flash_focus"), + tabbed = require(... .. ".tabbed"), + scratchpad = require(... .. ".scratchpad"), +} diff --git a/.config/awesome/bling/module/scratchpad.lua b/.config/awesome/bling/module/scratchpad.lua new file mode 100755 index 0000000..6ef011f --- /dev/null +++ b/.config/awesome/bling/module/scratchpad.lua @@ -0,0 +1,374 @@ +local awful = require("awful") +local gears = require("gears") +local naughty = require("naughty") +local helpers = require(tostring(...):match(".*bling") .. ".helpers") +local capi = { awesome = awesome, client = client } +local ruled = capi.awesome.version ~= "v4.3" and require("ruled") or nil +local pairs = pairs + +local Scratchpad = { mt = {} } + +--- Called when the turn off animation has ended +local function on_animate_turn_off_end(self, tag) + -- When toggling off a scratchpad that's present on multiple tags + -- depsite still being unminizmied on the other tags it will become invisible + -- as it's position could be outside the screen from the animation + self.client:geometry({ + x = self.geometry.x + self.client.screen.geometry.x, + y = self.geometry.y + self.client.screen.geometry.y, + width = self.geometry.width, + height = self.geometry.height, + }) + + helpers.client.turn_off(self.client, tag) + + self.turning_off = false + + self:emit_signal("turn_off", self.client) +end + +--- The turn off animation +local function animate_turn_off(self, anim, axis) + self.screen_on_toggled_scratchpad = self.client.screen + self.tag_on_toggled_scratchpad = self.screen_on_toggled_scratchpad.selected_tag + + if self.client.floating == false then + -- Save the client geometry before floating it + local non_floating_x = self.client.x + local non_floating_y = self.client.y + local non_floating_width = self.client.width + local non_floating_height = self.client.height + + -- Can't animate non floating clients + self.client.floating = true + + -- Set the client geometry back to what it was before floating it + self.client:geometry({ + x = non_floating_x, + y = non_floating_y, + width = non_floating_width, + height = non_floating_height, + }) + end + + if axis == "x" then + anim.pos = self.client.x + else + anim.pos = self.client.y + end + + anim:set(anim:initial()) +end + +-- Handles changing tag mid animation +local function abort_if_tag_was_switched(self) + -- Check for the following scenerio: + -- Toggle on scratchpad at tag 1 + -- Toggle on scratchpad at tag 2 + -- Toggle off scratchpad at tag 1 + -- Switch to tag 2 + -- Outcome: The client will remain on tag 1 and will instead be removed from tag 2 + if (self.turning_off) and (self.screen_on_toggled_scratchpad and + self.screen_on_toggled_scratchpad.selected_tag) ~= self.tag_on_toggled_scratchpad + then + if self.rubato.x then + self.rubato.x:abort() + end + if self.rubato.y then + self.rubato.y:abort() + end + on_animate_turn_off_end(self, self.tag_on_toggled_scratchpad) + self.screen_on_toggled_scratchpad.selected_tag = nil + self.tag_on_toggled_scratchpad = nil + end +end + +--- The turn on animation +local function animate_turn_on(self, anim, axis) + -- Check for the following scenerio: + -- Toggle on scratchpad at tag 1 + -- Toggle on scratchpad at tag 2 + -- The animation will instantly end + -- as the timer pos is already at the on position + -- from toggling on the scratchpad at tag 1 + if axis == "x" and anim.pos == self.geometry.x then + anim.pos = anim:initial() + else + if anim.pos == self.geometry.y then + anim.pos = anim:initial() + end + end + + if axis == "x" then + anim:set(self.geometry.x) + else + anim:set(self.geometry.y) + end +end + +--- Creates a new scratchpad object based on the argument +-- +-- @param args A table of possible arguments +-- @return The new scratchpad object +function Scratchpad:new(args) + args = args or {} + if args.awestore then + naughty.notify({ + title = "Bling Error", + text = "Awestore is no longer supported! Please take a look at the scratchpad documentation and use rubato for animations instead.", + }) + end + + args.rubato = args.rubato or {} + + local ret = gears.object{} + gears.table.crush(ret, Scratchpad) + gears.table.crush(ret, args) + + if ret.rubato.x then + ret.rubato.x:subscribe(function(pos) + if ret.client and ret.client.valid then + ret.client.x = pos + end + abort_if_tag_was_switched(ret) + end) + + ret.rubato.x.ended:subscribe(function() + if ((ret.rubato.y and ret.rubato.y.state == false) or (ret.rubato.y == nil)) and ret.turning_off == true then + on_animate_turn_off_end(ret) + end + end) + end + if ret.rubato.y then + ret.rubato.y:subscribe(function(pos) + if ret.client and ret.client.valid then + ret.client.y = pos + end + abort_if_tag_was_switched(ret) + end) + + ret.rubato.y.ended:subscribe(function() + if ((ret.rubato.x and ret.rubato.x.state == false) or (ret.rubato.x == nil)) and ret.turning_off == true then + on_animate_turn_off_end(ret) + end + end) + end + + return ret +end + +--- Find all clients that satisfy the the rule +-- +-- @return A list of all clients that satisfy the rule +function Scratchpad:find() + return helpers.client.find(self.rule) +end + +--- Applies the objects scratchpad properties to a given client +-- +-- @param c A client to which to apply the properties +function Scratchpad:apply(c) + if not c or not c.valid then + return + end + c.floating = self.floating + c.sticky = self.sticky + c.fullscreen = false + c.maximized = false + c:geometry({ + x = self.geometry.x + awful.screen.focused().geometry.x, + y = self.geometry.y + awful.screen.focused().geometry.y, + width = self.geometry.width, + height = self.geometry.height, + }) + + if self.autoclose then + c:connect_signal("unfocus", function(c1) + c1.sticky = false -- client won't turn off if sticky + helpers.client.turn_off(c1) + end) + end +end + +--- Turns the scratchpad on +function Scratchpad:turn_on() + self.client = self:find()[1] + + local anim_x = self.rubato.x + local anim_y = self.rubato.y + + local in_anim = false + if (anim_x and anim_x.state == true) or (anim_y and anim_y.state == true) then + in_anim = true + end + + if self.client and not in_anim and self.client.first_tag and self.client.first_tag.selected then + self.client:raise() + capi.client.focus = self.client + return + end + if self.client and not in_anim then + -- if a client was found, turn it on + if self.reapply then + self:apply(self.client) + end + -- c.sticky was set to false in turn_off so it has to be reapplied anyway + self.client.sticky = self.sticky + + if anim_x then + animate_turn_on(self, anim_x, "x") + end + if anim_y then + animate_turn_on(self, anim_y, "y") + end + + helpers.client.turn_on(self.client) + self:emit_signal("turn_on", self.client) + + return + end + if not self.client then + -- if no client was found, spawn one, find the corresponding window, + -- apply the properties only once (until the next closing) + local pid = awful.spawn.with_shell(self.command) + if capi.awesome.version ~= "v4.3" then + ruled.client.append_rule({ + id = "scratchpad", + rule = self.rule, + properties = { + -- If a scratchpad is opened it should spawn at the current tag + -- the same way it will behave if the client was already open + tag = awful.screen.focused().selected_tag, + switch_to_tags = false, + -- Hide the client until the gemoetry rules are applied + hidden = true, + minimized = true, + }, + callback = function(c) + -- For a reason I can't quite get the gemotery rules will fail to apply unless we use this timer + gears.timer({ + timeout = 0.15, + autostart = true, + single_shot = true, + callback = function() + self.client = c + + self:apply(c) + c.hidden = false + c.minimized = false + -- Some clients fail to gain focus + c:activate({}) + + if anim_x then + animate_turn_on(self, anim_x, "x") + end + if anim_y then + animate_turn_on(self, anim_y, "y") + end + + self:emit_signal("inital_apply", c) + + -- Discord spawns 2 windows, so keep the rule until the 2nd window shows + if c.name ~= "Discord Updater" then + ruled.client.remove_rule("scratchpad") + end + -- In a case Discord is killed before the second window spawns + c:connect_signal("request::unmanage", function() + ruled.client.remove_rule("scratchpad") + end) + end, + }) + end, + }) + else + local function inital_apply(c1) + if helpers.client.is_child_of(c1, pid) then + self.client = c1 + + self:apply(c1) + if anim_x then + animate_turn_on(self, anim_x, "x") + end + if anim_y then + animate_turn_on(self, anim_y, "y") + end + self:emit_signal("inital_apply", c1) + client.disconnect_signal("manage", inital_apply) + end + end + client.connect_signal("manage", inital_apply) + end + end +end + +--- Turns the scratchpad off +function Scratchpad:turn_off() + self.client = self:find()[1] + + -- Get the tweens + local anim_x = self.rubato.x + local anim_y = self.rubato.y + + local in_anim = false + if (anim_x and anim_x.state == true) or (anim_y and anim_y.state == true) then + in_anim = true + end + + if self.client and not in_anim then + if anim_x then + self.turning_off = true + animate_turn_off(self, anim_x, "x") + end + if anim_y then + self.turning_off = true + animate_turn_off(self, anim_y, "y") + end + + if not anim_x and not anim_y then + helpers.client.turn_off(self.client) + self:emit_signal("turn_off", self.client) + end + end +end + +--- Turns the scratchpad off if it is focused otherwise it raises the scratchpad +function Scratchpad:toggle() + local is_turn_off = false + local c = self:find()[1] + if self.dont_focus_before_close then + if c then + if c.sticky and #c:tags() > 0 then + is_turn_off = true + else + local current_tag = c.screen.selected_tag + for k, tag in pairs(c:tags()) do + if tag == current_tag then + is_turn_off = true + break + else + is_turn_off = false + end + end + end + end + else + is_turn_off = capi.client.focus + and awful.rules.match(capi.client.focus, self.rule) + end + + if is_turn_off then + self:turn_off() + else + self:turn_on() + end +end + +--- Make the module callable without putting a `:new` at the end of it +-- +-- @param args A table of possible arguments +-- @return The new scratchpad object +function Scratchpad.mt:__call(...) + return Scratchpad:new(...) +end + +return setmetatable(Scratchpad, Scratchpad.mt) diff --git a/.config/awesome/bling/module/tabbed.lua b/.config/awesome/bling/module/tabbed.lua new file mode 100755 index 0000000..c53ec03 --- /dev/null +++ b/.config/awesome/bling/module/tabbed.lua @@ -0,0 +1,274 @@ +--[[ + +This module currently works by adding a new property to each client that is tabbed. +That new property is called bling_tabbed. +So each client in a tabbed state has the property "bling_tabbed" which is a table. +Each client that is not tabbed doesn't have that property. +In the function themselves, the same object is refered to as "tabobj" which is why +you will often see something like: "local tabobj = some_client.bling_tabbed" at the beginning +of a function. + +--]] + +local awful = require("awful") +local wibox = require("wibox") +local gears = require("gears") +local beautiful = require("beautiful") +local helpers = require(tostring(...):match(".*bling") .. ".helpers") + +local bar_style = beautiful.tabbar_style or "default" +local bar = require( + tostring(...):match(".*bling") .. ".widget.tabbar." .. bar_style +) + +tabbed = {} + +-- helper function to connect to the (un)focus signals +local function update_tabbar_from(c) + if not c or not c.bling_tabbed then + return + end + tabbed.update_tabbar(c.bling_tabbed) +end + +-- used to change focused tab relative to the currently focused one +tabbed.iter = function(idx) + if not idx then + idx = 1 + end + if not client.focus or not client.focus.bling_tabbed then + return + end + local tabobj = client.focus.bling_tabbed + local new_idx = (tabobj.focused_idx + idx) % #tabobj.clients + if new_idx == 0 then + new_idx = #tabobj.clients + end + tabbed.switch_to(tabobj, new_idx) +end + +-- removes a given client from its tab object +tabbed.remove = function(c) + if not c or not c.bling_tabbed then + return + end + local tabobj = c.bling_tabbed + table.remove(tabobj.clients, tabobj.focused_idx) + if not beautiful.tabbar_disable then + awful.titlebar.hide(c, bar.position) + end + c.bling_tabbed = nil + c:disconnect_signal("focus", update_tabbar_from) + c:disconnect_signal("unfocus", update_tabbar_from) + awesome.emit_signal("bling::tabbed::client_removed", tabobj, c) + tabbed.switch_to(tabobj, 1) +end + +-- removes the currently focused client from the tab object +tabbed.pop = function() + if not client.focus or not client.focus.bling_tabbed then + return + end + tabbed.remove(client.focus) +end + +-- adds a client to a given tabobj +tabbed.add = function(c, tabobj) + if c.bling_tabbed then + tabbed.remove(c) + end + c:connect_signal("focus", update_tabbar_from) + c:connect_signal("unfocus", update_tabbar_from) + helpers.client.sync(c, tabobj.clients[tabobj.focused_idx]) + tabobj.clients[#tabobj.clients + 1] = c + tabobj.focused_idx = #tabobj.clients + -- calls update even though switch_to calls update again + -- but the new client needs to have the tabobj property + -- before a clean switch can happen + tabbed.update(tabobj) + awesome.emit_signal("bling::tabbed::client_added", tabobj, c) + tabbed.switch_to(tabobj, #tabobj.clients) +end + +-- use xwininfo to select one client and make it tab in the currently focused tab +tabbed.pick = function() + if not client.focus then + return + end + -- this function uses xwininfo to grab a client window id which is then + -- compared to all other clients window ids + + local xwininfo_cmd = + [[ xwininfo | grep 'xwininfo: Window id:' | cut -d " " -f 4 ]] + awful.spawn.easy_async_with_shell(xwininfo_cmd, function(output) + for _, c in ipairs(client.get()) do + if tonumber(c.window) == tonumber(output) then + if not client.focus.bling_tabbed and not c.bling_tabbed then + tabbed.init(client.focus) + tabbed.add(c, client.focus.bling_tabbed) + end + if not client.focus.bling_tabbed and c.bling_tabbed then + tabbed.add(client.focus, c.bling_tabbed) + end + if client.focus.bling_tabbed and not c.bling_tabbed then + tabbed.add(c, client.focus.bling_tabbed) + end + -- TODO: Should also merge tabs when focus and picked + -- both are tab groups + end + end + end) +end + +-- select a client by direction and make it tab in the currently focused tab +tabbed.pick_by_direction = function(direction) + local sel = client.focus + if not sel then + return + end + if not sel.bling_tabbed then + tabbed.init(sel) + end + local c = helpers.client.get_by_direction(direction) + if not c then + return + end + tabbed.add(c, sel.bling_tabbed) +end + +-- use dmenu to select a client and make it tab in the currently focused tab +tabbed.pick_with_dmenu = function(dmenu_command) + if not client.focus then + return + end + + if not dmenu_command then + dmenu_command = "rofi -dmenu -i" + end + + -- get all clients from the current tag + -- ignores the case where multiple tags are selected + local t = awful.screen.focused().selected_tag + local list_clients = {} + local list_clients_string = "" + for idx, c in ipairs(t:clients()) do + if c.window ~= client.focus.window then + list_clients[#list_clients + 1] = c + if #list_clients ~= 1 then + list_clients_string = list_clients_string .. "\\n" + end + list_clients_string = list_clients_string + .. tostring(c.window) + .. " " + .. c.name + end + end + + if #list_clients == 0 then + return + end + -- calls the actual dmenu + local xprop_cmd = [[ echo -e "]] + .. list_clients_string + .. [[" | ]] + .. dmenu_command + .. [[ | awk '{ print $1 }' ]] + awful.spawn.easy_async_with_shell(xprop_cmd, function(output) + for _, c in ipairs(list_clients) do + if tonumber(c.window) == tonumber(output) then + if not client.focus.bling_tabbed then + tabbed.init(client.focus) + end + local tabobj = client.focus.bling_tabbed + tabbed.add(c, tabobj) + end + end + end) +end + +-- update everything about one tab object +tabbed.update = function(tabobj) + local currently_focused_c = tabobj.clients[tabobj.focused_idx] + -- update tabobj of each client and other things + for idx, c in ipairs(tabobj.clients) do + if c.valid then + c.bling_tabbed = tabobj + helpers.client.sync(c, currently_focused_c) + -- the following handles killing a client while the client is tabbed + c:connect_signal("unmanage", function(c) + tabbed.remove(c) + end) + end + end + + -- Maybe remove if I'm the only one using it? + awesome.emit_signal("bling::tabbed::update", tabobj) + if not beautiful.tabbar_disable then + tabbed.update_tabbar(tabobj) + end +end + +-- change focused tab by absolute index +tabbed.switch_to = function(tabobj, new_idx) + local old_focused_c = tabobj.clients[tabobj.focused_idx] + tabobj.focused_idx = new_idx + for idx, c in ipairs(tabobj.clients) do + if idx ~= new_idx then + helpers.client.turn_off(c) + else + helpers.client.turn_on(c) + c:raise() + if old_focused_c and old_focused_c.valid then + c:swap(old_focused_c) + end + helpers.client.sync(c, old_focused_c) + end + end + awesome.emit_signal("bling::tabbed::changed_focus", tabobj) + tabbed.update(tabobj) +end + +tabbed.update_tabbar = function(tabobj) + local flexlist = bar.layout() + local tabobj_focused_client = tabobj.clients[tabobj.focused_idx] + local tabobj_is_focused = (client.focus == tabobj_focused_client) + -- itearte over all tabbed clients to create the widget tabbed list + for idx, c in ipairs(tabobj.clients) do + local buttons = gears.table.join(awful.button({}, 1, function() + tabbed.switch_to(tabobj, idx) + end)) + local wid_temp = bar.create(c, (idx == tabobj.focused_idx), buttons, + not tabobj_is_focused) + flexlist:add(wid_temp) + end + -- add tabbar to each tabbed client (clients will be hided anyway) + for _, c in ipairs(tabobj.clients) do + local titlebar = awful.titlebar(c, { + bg = bar.bg_normal, + size = bar.size, + position = bar.position, + }) + titlebar:setup({ layout = wibox.layout.flex.horizontal, flexlist }) + end +end + +tabbed.init = function(c) + local tabobj = {} + tabobj.clients = { c } + c:connect_signal("focus", update_tabbar_from) + c:connect_signal("unfocus", update_tabbar_from) + tabobj.focused_idx = 1 + tabbed.update(tabobj) +end + +if beautiful.tabbed_spawn_in_tab then + client.connect_signal("manage", function(c) + local s = awful.screen.focused() + local previous_client = awful.client.focus.history.get(s, 1) + if previous_client and previous_client.bling_tabbed then + tabbed.add(c, previous_client.bling_tabbed) + end + end) +end + +return tabbed diff --git a/.config/awesome/bling/module/tiled_wallpaper.lua b/.config/awesome/bling/module/tiled_wallpaper.lua new file mode 100755 index 0000000..75014cf --- /dev/null +++ b/.config/awesome/bling/module/tiled_wallpaper.lua @@ -0,0 +1,56 @@ +--[[ + This module makes use of cairo surfaces + For documentation take a look at the C docs: + https://www.cairographics.org/ + They can be applied to lua by changing the naming conventions + and adjusting for the missing namespaces (and classes) + for example: + cairo_rectangle(cr, 1, 1, 1, 1) in C would be written as + cr:rectangle(1, 1, 1, 1) in lua + and + cairo_fill(cr) in C would be written as + cr:fill() in lua +--]] + +local cairo = require("lgi").cairo +local gears = require("gears") + +function create_tiled_wallpaper(str, s, args_table) + -- user input + args_table = args_table or {} + local fg = args_table.fg or "#ff0000" + local bg = args_table.bg or "#00ffff" + local offset_x = args_table.offset_x + local offset_y = args_table.offset_y + local font = args_table.font or "Hack" + local font_size = tonumber(args_table.font_size) or 16 + local zickzack_bool = args_table.zickzack or false + local padding = args_table.padding or 100 + + -- create cairo image wallpaper + local img = cairo.ImageSurface(cairo.Format.RGB24, padding, padding) + cr = cairo.Context(img) + + cr:set_source(gears.color(bg)) + cr:paint() + + cr:set_source(gears.color(fg)) + + cr:set_font_size(font_size) + cr:select_font_face(font) + + if zickzack_bool then + cr:set_source(gears.color(fg)) + cr:move_to(padding / 2 + font_size, padding / 2 + font_size) + cr:show_text(str) + end + + cr:set_source(gears.color(fg)) + cr:move_to(font_size, font_size) + cr:show_text(str) + + -- tile cairo image + gears.wallpaper.tiled(img, s, { x = offset_x, y = offset_y }) +end + +return create_tiled_wallpaper diff --git a/.config/awesome/bling/module/wallpaper.lua b/.config/awesome/bling/module/wallpaper.lua new file mode 100755 index 0000000..e7bddf6 --- /dev/null +++ b/.config/awesome/bling/module/wallpaper.lua @@ -0,0 +1,362 @@ +--------------------------------------------------------------------------- +-- High-level declarative function for setting your wallpaper. +-- +-- +-- An easy way to setup a complex wallpaper with slideshow, random, schedule, extensibility. +-- +-- @usage +-- local wallpaper = require("wallpaper") +-- -- A silly example +-- wallpaper.setup { -- I want a wallpaper +-- change_timer = 500, -- changing every 5 minutes +-- set_function = wallpaper.setters.random, -- in a random way +-- wallpaper = {"#abcdef", +-- "~/Pictures", +-- wallpaper.setters.awesome}, -- from this list (a color, a directory with pictures and the Awesome wallpaper) +-- recursive = false, -- do not read subfolders of "~/Pictures" +-- position = "centered", -- center it on the screen (for pictures) +-- scale = 2, -- 2 time bigger (for pictures) +-- } +-- +-- @author Grumph +-- @copyright 2021 Grumph +-- +--------------------------------------------------------------------------- + +local awful = require("awful") +local beautiful = require("beautiful") +local gears = require("gears") +local helpers = require(tostring(...):match(".*bling") .. ".helpers") + +local setters = {} + +--- Apply a wallpaper. +-- +-- This function is a helper that will apply a wallpaper_object, +-- either using gears.wallpaper.set or gears.wallpaper.* higher level functions when applicable. +-- @param wallpaper_object A wallpaper object, either +-- a `pattern` (see `gears.wallpaper.set`) +-- a `surf` (see `gears.wallpaper.centered`) +-- a function that actually sets the wallpaper. +-- @tparam table args The argument table containing any of the arguments below. +-- @int[opt=nil] args.screen The screen to use (as used in `gears.wallpaper` functions) +-- @string[opt=nil or "centered"] args.position The `gears.wallpaper` position function to use. +-- Must be set when wallpaper is a file. +-- It can be `"centered"`, `"fit"`, `"tiled"` or `"maximized"`. +-- @string[opt=beautiful.bg_normal or "black"] args.background See `gears.wallpaper`. +-- @bool[opt=false] args.ignore_aspect See `gears.wallpaper`. +-- @tparam[opt={x=0,y=0}] table args.offset See `gears.wallpaper`. +-- @int[opt=1] args.scale See `gears.wallpaper`. +function apply(wallpaper_object, args) + args.background = args.background or beautiful.bg_normal or "black" + args.ignore_aspect = args.ignore_aspect or false -- false = keep aspect ratio + args.offset = args.offset or { x = 0, y = 0 } + args.scale = args.scale or 1 + local positions = { + ["centered"] = function(s) + gears.wallpaper.centered( + wallpaper_object, + s, + args.background, + args.scale + ) + end, + ["tiled"] = function(s) + gears.wallpaper.tiled(wallpaper_object, s, args.offset) + end, + ["maximized"] = function(s) + gears.wallpaper.maximized( + wallpaper_object, + s, + args.ignore_aspect, + args.offset + ) + end, + ["fit"] = function(s) + gears.wallpaper.fit(wallpaper_object, s, args.background) + end, + } + local call_func = nil + if + type(wallpaper_object) == "string" + and gears.filesystem.file_readable(wallpaper_object) + then + -- path of an image file, we use a position function + local p = args.position or "centered" + call_func = positions[p] + elseif type(wallpaper_object) == "function" then + -- function + wallpaper_object(args) + elseif + (not gears.color.ensure_pango_color(wallpaper_object, nil)) + and args.position + then + -- if the user sets a position function, wallpaper_object should be a cairo surface + call_func = positions[args.position] + else + gears.wallpaper.set(wallpaper_object) + end + if call_func then + call_func(args.screen) + end +end + +--- Converts `args.wallpaper` to a list of `wallpaper_objects` readable by `apply` function). +-- +-- @tparam table args The argument table containing the argument below. +-- @param[opt=`beautiful.wallpaper_path` or `"black"`] args.wallpaper A wallpaper object. +-- It can be a color or a cairo pattern (what `gears.wallpaper.set` understands), +-- a cairo suface (set with gears.wallpaper.set if `args.position` is nil, or with +-- `gears.wallpaper` position functions, see `args.position`), +-- a function similar to args.set_function that will effectively set a wallpaper (usually +-- with `gears.wallpaper` functions), +-- a path to a file, +-- path to a directory containing images, +-- or a list with any of the previous choices. +-- @tparam[opt=`{"jpg", "jpeg", "png", "bmp"}`] table args.image_formats A list of +-- file extensions to filter when `args.wallpaper` is a directory. +-- @bool[opt=true] args.recursive Either to recurse or not when `args.wallpaper` is a directory. +-- @treturn table A list of `wallpaper_objects` (what `apply` can read). +-- @see apply +function prepare_list(args) + args.image_formats = args.image_formats or { "jpg", "jpeg", "png", "bmp" } + args.recursive = args.recursive or true + + local wallpapers = (args.wallpaper or beautiful.wallpaper_path or "black") + local res = {} + if type(wallpapers) ~= "table" then + wallpapers = { wallpapers } + end + for _, w in ipairs(wallpapers) do + -- w is either: + -- - a directory path (string) + -- - an image path or a color (string) + -- - a cairo surface or a cairo pattern + -- - a function for setting the wallpaper + if type(w) == "string" and gears.filesystem.dir_readable(w) then + local file_list = helpers.filesystem.list_directory_files( + w, + args.image_formats, + args.recursive + ) + for _, f in ipairs(file_list) do + res[#res + 1] = w .. "/" .. f + end + else + res[#res + 1] = w + end + end + return res +end + +local simple_index = 0 +--- Set the next wallpaper in a list. +-- +-- @tparam table args See `prepare_list` and `apply` arguments +-- @see apply +-- @see prepare_list +function setters.simple(args) + local wallpapers = prepare_list(args) + simple_index = (simple_index % #wallpapers) + 1 + if type(args.screen) == 'table' then + for _,v in ipairs(args.screen) do + args.screen = v + apply(wallpapers[simple_index], args) + args.screen = nil + end + else + apply(wallpapers[simple_index], args) + end +end + +--- Set a random wallpaper from a list. +-- +-- @tparam table args See `prepare_list` and `apply` arguments +-- @see apply +-- @see prepare_list +function setters.random(args) + local wallpapers = prepare_list(args) + if type(args.screen) == 'table' then + for _,v in ipairs(args.screen) do + args.screen = v + apply(wallpapers[math.random(#wallpapers)], args) + args.screen = nil + end + else + apply(wallpapers[math.random(#wallpapers)], args) + end +end + +local simple_schedule_object = nil +--- A schedule setter. +-- +-- This simple schedule setter was freely inspired by [dynamic-wallpaper](https://github.com/manilarome/awesome-glorious-widgets/blob/master/dynamic-wallpaper/init.lua). +-- @tparam table args The argument table containing any of the arguments below. +-- @tparam table args.wallpaper The schedule table, with the form +-- { +-- ["HH:MM:SS"] = wallpaper, +-- ["HH:MM:SS"] = wallpaper2, +-- } +-- The wallpapers definition can be anything the `schedule_set_function` can read +-- (what you would place in `args.wallpaper` for this function), +-- @tparam[opt=`setters.simple`] function args.wallpaper_set_function The set_function used by default +function setters.simple_schedule(args) + local function update_wallpaper() + local fake_args = gears.table.join(args, { + wallpaper = args.wallpaper[simple_schedule_object.closest_lower_time], + }) + simple_schedule_object.schedule_set_function(fake_args) + end + if not simple_schedule_object then + simple_schedule_object = {} + -- initialize the schedule object, so we don't do it for every call + simple_schedule_object.schedule_set_function = args.schedule_set_function + or setters.simple + -- we get the sorted time keys + simple_schedule_object.times = {} + for k in pairs(args.wallpaper) do + table.insert(simple_schedule_object.times, k) + end + table.sort(simple_schedule_object.times) + -- now we get the closest time which is below current time (the current applicable period) + local function update_timer() + local current_time = os.date("%H:%M:%S") + local next_time = simple_schedule_object.times[1] + simple_schedule_object.closest_lower_time = + simple_schedule_object.times[#simple_schedule_object.times] + for _, k in ipairs(simple_schedule_object.times) do + if k > current_time then + next_time = k + break + end + simple_schedule_object.closest_lower_time = k + end + simple_schedule_object.timer.timeout = helpers.time.time_diff( + next_time, + current_time + ) + if simple_schedule_object.timer.timeout < 0 then + -- the next_time is the day after, so we add 24 hours to the timer + simple_schedule_object.timer.timeout = simple_schedule_object.timer.timeout + + 86400 + end + simple_schedule_object.timer:again() + update_wallpaper() + end + simple_schedule_object.timer = gears.timer({ + callback = update_timer, + }) + update_timer() + else + -- if called again (usually when the change_timer is set), we just change the wallpaper depending on current parameters + update_wallpaper() + end +end + +--- Set the AWESOME wallpaper. +-- +-- @tparam table args The argument table containing the argument below. +-- @param[opt=`beautiful.bg_normal`] args.colors.bg The bg color. +-- If the default is used, the color is darkened if `beautiful.bg_normal` is light +-- or lightned if `beautiful.bg_normal` is dark. +-- @param[opt=`beautiful.fg_normal`] args.colors.fg The fg color. +-- @param[opt=`beautiful.fg_focus`] args.colors.alt_fg The alt_fg color. +-- +-- see beautiful.theme_assets.wallpaper +function setters.awesome_wallpaper(args) + local colors = { + bg = beautiful.bg_normal, + fg = beautiful.fg_normal, + alt_fg = beautiful.bg_focus, + } + colors.bg = helpers.color.is_dark(beautiful.bg_normal) + and helpers.color.lighten(colors.bg) + or helpers.color.darken(colors.bg) + if type(args.colors) == "table" then + colors.bg = args.colors.bg or colors.bg + colors.fg = args.colors.fg or colors.fg + colors.alt_fg = args.colors.alt_fg or colors.alt_fg + end + -- Generate wallpaper: + if not args.screen then + for s in screen do + gears.wallpaper.set( + beautiful.theme_assets.wallpaper( + colors.bg, + colors.fg, + colors.alt_fg, + s + ) + ) + end + else + gears.wallpaper.set( + beautiful.theme_assets.wallpaper( + colors.bg, + colors.fg, + colors.alt_fg, + args.screen + ) + ) + end +end + +--- Setup a wallpaper. +-- +-- @tparam table args Parameters for the wallpaper. It may also contain all parameters your `args.set_function` needs +-- @int[opt=nil] args.screen The screen to use (as used in `gears.wallpaper` functions) +-- @int[opt=nil] args.change_timer Time in seconds for wallpaper changes +-- @tparam[opt=`setters.awesome` or `setters.simple`] function args.set_function A function to set the wallpaper +-- It takes args as parameter (the same args as the setup function). +-- This function is called at `"request::wallpaper"` `screen` signals and at `args.change_timer` timeouts. +-- There is no obligation, but for consistency, the function should use `args.wallpaper` as a feeder. +-- If `args.wallpaper` is defined, the default function is `setters.simple`, else it will be `setters.awesome`. +-- +-- @usage +-- local wallpaper = require("wallpaper") +-- wallpaper.setup { +-- change_timer = 631, -- Prime number is better +-- set_function = wallpaper.setters.random, +-- -- parameters for the random setter +-- wallpaper = '/data/pictures/wallpapers', +-- position = "maximized", +-- } +-- +-- @see apply +-- @see prepare_list +-- @see setters.simple +function setup(args) + local config = args or {} + config.set_function = config.set_function + or (config.wallpaper and setters.simple or setters.awesome_wallpaper) + local function set_wallpaper(s) + if type(config.screen) ~= 'table' then + if config.screen and s and config.screen ~= s then return end + config.screen = s or config.screen + end + config.set_function(config) + end + + if config.change_timer and config.change_timer > 0 then + gears.timer({ + timeout = config.change_timer, + call_now = false, + autostart = true, + callback = function() + set_wallpaper() + end, + }) + end + if awesome.version == "v4.3" or awesome.version == "4.3" then + awful.screen.connect_for_each_screen(set_wallpaper) + else + screen.connect_signal("request::wallpaper", set_wallpaper) + end +end + +return { + setup = setup, + setters = setters, + apply = apply, + prepare_list = prepare_list, +} diff --git a/.config/awesome/bling/module/window_swallowing.lua b/.config/awesome/bling/module/window_swallowing.lua new file mode 100755 index 0000000..60950aa --- /dev/null +++ b/.config/awesome/bling/module/window_swallowing.lua @@ -0,0 +1,128 @@ +local awful = require("awful") +local gears = require("gears") +local beautiful = require("beautiful") + +local helpers = require(tostring(...):match(".*bling") .. ".helpers") + +-- It might actually swallow too much, that's why there is a filter option by classname +-- without the don't-swallow-list it would also swallow for example +-- file pickers or new firefox windows spawned by an already existing one + +local window_swallowing_activated = false + +-- you might want to add or remove applications here +local parent_filter_list = beautiful.parent_filter_list + or beautiful.dont_swallow_classname_list + or { "firefox", "Gimp", "Google-chrome" } +local child_filter_list = beautiful.child_filter_list + or beautiful.dont_swallow_classname_list or { } + +-- for boolean values the or chain way to set the values breaks with 2 vars +-- and always defaults to true so i had to do this to se the right value... +local swallowing_filter = true +local filter_vars = { beautiful.swallowing_filter, beautiful.dont_swallow_filter_activated } +for _, var in pairs(filter_vars) do + swallowing_filter = var +end + +-- check if element exist in table +-- returns true if it is +local function is_in_table(element, table) + local res = false + for _, value in pairs(table) do + if element:match(value) then + res = true + break + end + end + return res +end + +-- if the swallowing filter is active checks the child and parent classes +-- against their filters +local function check_swallow(parent, child) + local res = true + if swallowing_filter then + local prnt = not is_in_table(parent, parent_filter_list) + local chld = not is_in_table(child, child_filter_list) + res = ( prnt and chld ) + end + return res +end + +-- async function to get the parent's pid +-- recieves a child process pid and a callback function +-- parent_pid in format "init(1)---ancestorA(pidA)---ancestorB(pidB)...---process(pid)" +function get_parent_pid(child_ppid, callback) + local ppid_cmd = string.format("pstree -A -p -s %s", child_ppid) + awful.spawn.easy_async(ppid_cmd, function(stdout, stderr, reason, exit_code) + -- primitive error checking + if stderr and stderr ~= "" then + callback(stderr) + return + end + local ppid = stdout + callback(nil, ppid) + end) +end + + +-- the function that will be connected to / disconnected from the spawn client signal +local function manage_clientspawn(c) + -- get the last focused window to check if it is a parent window + local parent_client = awful.client.focus.history.get(c.screen, 1) + if not parent_client then + return + elseif parent_client.type == "dialog" or parent_client.type == "splash" then + return + end + + get_parent_pid(c.pid, function(err, ppid) + if err then + return + end + parent_pid = ppid + if + -- will search for "(parent_client.pid)" inside the parent_pid string + ( tostring(parent_pid):find("("..tostring(parent_client.pid)..")") ) + and check_swallow(parent_client.class, c.class) + then + c:connect_signal("unmanage", function() + if parent_client then + helpers.client.turn_on(parent_client) + helpers.client.sync(parent_client, c) + end + end) + + helpers.client.sync(c, parent_client) + helpers.client.turn_off(parent_client) + end + end) +end + +-- without the following functions that module would be autoloaded by require("bling") +-- a toggle window swallowing hotkey is also possible that way + +local function start() + client.connect_signal("manage", manage_clientspawn) + window_swallowing_activated = true +end + +local function stop() + client.disconnect_signal("manage", manage_clientspawn) + window_swallowing_activated = false +end + +local function toggle() + if window_swallowing_activated then + stop() + else + start() + end +end + +return { + start = start, + stop = stop, + toggle = toggle, +} diff --git a/.config/awesome/bling/signal/init.lua b/.config/awesome/bling/signal/init.lua new file mode 100755 index 0000000..c513381 --- /dev/null +++ b/.config/awesome/bling/signal/init.lua @@ -0,0 +1,3 @@ +return { + playerctl = require(... .. ".playerctl"), +} diff --git a/.config/awesome/bling/signal/playerctl/init.lua b/.config/awesome/bling/signal/playerctl/init.lua new file mode 100755 index 0000000..357b02c --- /dev/null +++ b/.config/awesome/bling/signal/playerctl/init.lua @@ -0,0 +1,46 @@ +local awful = require("awful") +local gtimer = require("gears.timer") +local beautiful = require("beautiful") +local naughty = require("naughty") + +-- Use CLI backend as default as it is supported on most if not all systems +local backend_config = beautiful.playerctl_backend or "playerctl_cli" +local backends = { + playerctl_cli = require(... .. ".playerctl_cli"), + playerctl_lib = require(... .. ".playerctl_lib"), +} + +local backend = nil + +local function enable_wrapper(args) + local open = naughty.action { name = "Open" } + + open:connect_signal("invoked", function() + awful.spawn("xdg-open https://blingcorp.github.io/bling/#/signals/pctl") + end) + + gtimer.delayed_call(function() + naughty.notify({ + title = "Bling Error", + text = "Global signals are deprecated! Please take a look at the playerctl documentation.", + app_name = "Bling Error", + app_icon = "system-error", + actions = { open } + }) + end) + + backend_config = (args and args.backend) or backend_config + backend = backends[backend_config](args) + return backend +end + +local function disable_wrapper() + backend:disable() +end + +return { + lib = backends.playerctl_lib, + cli = backends.playerctl_cli, + enable = enable_wrapper, + disable = disable_wrapper +} \ No newline at end of file diff --git a/.config/awesome/bling/signal/playerctl/playerctl_cli.lua b/.config/awesome/bling/signal/playerctl/playerctl_cli.lua new file mode 100755 index 0000000..d091407 --- /dev/null +++ b/.config/awesome/bling/signal/playerctl/playerctl_cli.lua @@ -0,0 +1,348 @@ +-- Playerctl signals +-- +-- Provides: +-- metadata +-- title (string) +-- artist (string) +-- album_path (string) +-- album (string) +-- player_name (string) +-- position +-- interval_sec (number) +-- length_sec (number) +-- playback_status +-- playing (boolean) +-- volume +-- volume (number) +-- loop_status +-- loop_status (string) +-- shuffle +-- shuffle (bool) +-- no_players +-- (No parameters) + +local awful = require("awful") +local gobject = require("gears.object") +local gtable = require("gears.table") +local gtimer = require("gears.timer") +local gstring = require("gears.string") +local beautiful = require("beautiful") +local helpers = require(tostring(...):match(".*bling") .. ".helpers") +local setmetatable = setmetatable +local tonumber = tonumber +local ipairs = ipairs +local type = type +local capi = { awesome = awesome } + +local playerctl = { mt = {} } + +function playerctl:disable() + self._private.metadata_timer:stop() + self._private.metadata_timer = nil + awful.spawn.with_shell("killall playerctl") +end + +function playerctl:pause(player) + if player ~= nil then + awful.spawn.with_shell("playerctl --player=" .. player .. " pause") + else + awful.spawn.with_shell(self._private.cmd .. "pause") + end +end + +function playerctl:play(player) + if player ~= nil then + awful.spawn.with_shell("playerctl --player=" .. player .. " play") + else + awful.spawn.with_shell(self._private.cmd .. "play") + end +end + +function playerctl:stop(player) + if player ~= nil then + awful.spawn.with_shell("playerctl --player=" .. player .. " stop") + else + awful.spawn.with_shell(self._private.cmd .. "stop") + end +end + +function playerctl:play_pause(player) + if player ~= nil then + awful.spawn.with_shell("playerctl --player=" .. player .. " play-pause") + else + awful.spawn.with_shell(self._private.cmd .. "play-pause") + end +end + +function playerctl:previous(player) + if player ~= nil then + awful.spawn.with_shell("playerctl --player=" .. player .. " previous") + else + awful.spawn.with_shell(self._private.cmd .. "previous") + end +end + +function playerctl:next(player) + if player ~= nil then + awful.spawn.with_shell("playerctl --player=" .. player .. " next") + else + awful.spawn.with_shell(self._private.cmd .. "next") + end +end + +function playerctl:set_loop_status(loop_status, player) + if player ~= nil then + awful.spawn.with_shell("playerctl --player=" .. player .. " loop " .. loop_status) + else + awful.spawn.with_shell(self._private.cmd .. "loop " .. loop_status) + end +end + +function playerctl:cycle_loop_status(player) + local function set_loop_status(loop_status) + if loop_status == "None" then + self:set_loop_status("Track") + elseif loop_status == "Track" then + self:set_loop_status("Playlist") + elseif loop_status == "Playlist" then + self:set_loop_status("None") + end + end + + if player ~= nil then + awful.spawn.easy_async_with_shell("playerctl --player=" .. player .. " loop", function(stdout) + set_loop_status(stdout) + end) + else + set_loop_status(self._private.loop_status) + end +end + +function playerctl:set_position(position, player) + if player ~= nil then + awful.spawn.with_shell("playerctl --player=" .. player .. " position " .. position) + else + awful.spawn.with_shell(self._private.cmd .. "position " .. position) + end +end + +function playerctl:set_shuffle(shuffle, player) + shuffle = shuffle and "on" or "off" + + if player ~= nil then + awful.spawn.with_shell("playerctl --player=" .. player .. " shuffle " .. shuffle) + else + awful.spawn.with_shell(self._private.cmd .. "shuffle " .. shuffle) + end +end + +function playerctl:cycle_shuffle(player) + if player ~= nil then + awful.spawn.easy_async_with_shell("playerctl --player=" .. player .. " shuffle", function(stdout) + local shuffle = stdout == "on" and true or false + self:set_shuffle(not self._private.shuffle) + end) + else + self:set_shuffle(not self._private.shuffle) + end +end + +function playerctl:set_volume(volume, player) + if player ~= nil then + awful.spawn.with_shell("playerctl --player=" .. player .. " volume " .. volume) + else + awful.spawn.with_shell(self._private.cmd .. "volume " .. volume) + end +end + +local function emit_player_metadata(self) + local metadata_cmd = self._private.cmd .. "metadata --format 'title_{{title}}artist_{{artist}}art_url_{{mpris:artUrl}}player_name_{{playerName}}album_{{album}}' -F" + + awful.spawn.with_line_callback(metadata_cmd, { + stdout = function(line) + local title = gstring.xml_escape(line:match('title_(.*)artist_')) or "" + local artist = gstring.xml_escape(line:match('artist_(.*)art_url_')) or "" + local art_url = line:match('art_url_(.*)player_name_') or "" + local player_name = line:match('player_name_(.*)album_') or "" + local album = gstring.xml_escape(line:match('album_(.*)')) or "" + + art_url = art_url:gsub('%\n', '') + if player_name == "spotify" then + art_url = art_url:gsub("open.spotify.com", "i.scdn.co") + end + + if self._private.metadata_timer + and self._private.metadata_timer.started + then + self._private.metadata_timer:stop() + end + + self._private.metadata_timer = gtimer { + timeout = self.debounce_delay, + autostart = true, + single_shot = true, + callback = function() + if title and title ~= "" then + if art_url ~= "" then + local art_path = os.tmpname() + helpers.filesystem.save_image_async_curl(art_url, art_path, function() + self:emit_signal("metadata", title, artist, art_path, album, player_name) + capi.awesome.emit_signal("bling::playerctl::title_artist_album", title, artist, art_path) + end) + else + self:emit_signal("metadata", title, artist, "", album, player_name) + capi.awesome.emit_signal("bling::playerctl::title_artist_album", title, artist, "") + end + else + self:emit_signal("no_players") + capi.awesome.emit_signal("bling::playerctl::no_players") + end + end + } + + collectgarbage("collect") + end, + }) +end + +local function emit_player_position(self) + local position_cmd = self._private.cmd .. "position" + local length_cmd = self._private.cmd .. "metadata mpris:length" + + awful.widget.watch(position_cmd, self.interval, function(_, interval) + awful.spawn.easy_async_with_shell(length_cmd, function(length) + local length_sec = tonumber(length) -- in microseconds + local interval_sec = tonumber(interval) -- in seconds + if length_sec and interval_sec then + if interval_sec >= 0 and length_sec > 0 then + self:emit_signal("position", interval_sec, length_sec / 1000000) + capi.awesome.emit_signal("bling::playerctl::position", interval_sec, length_sec / 1000000) + end + end + end) + collectgarbage("collect") + end) +end + +local function emit_player_playback_status(self) + local status_cmd = self._private.cmd .. "status -F" + + awful.spawn.with_line_callback(status_cmd, { + stdout = function(line) + if line:find("Playing") then + self:emit_signal("playback_status", true) + capi.awesome.emit_signal("bling::playerctl::status", true) + else + self:emit_signal("playback_status", false) + capi.awesome.emit_signal("bling::playerctl::status", false) + end + end, + }) +end + +local function emit_player_volume(self) + local volume_cmd = self._private.cmd .. "volume -F" + + awful.spawn.with_line_callback(volume_cmd, { + stdout = function(line) + self:emit_signal("volume", tonumber(line)) + end, + }) +end + +local function emit_player_loop_status(self) + local loop_status_cmd = self._private.cmd .. "loop -F" + + awful.spawn.with_line_callback(loop_status_cmd, { + stdout = function(line) + self._private.loop_status = line + self:emit_signal("loop_status", line:lower()) + end, + }) +end + +local function emit_player_shuffle(self) + local shuffle_cmd = self._private.cmd .. "shuffle -F" + + awful.spawn.with_line_callback(shuffle_cmd, { + stdout = function(line) + if line:find("On") then + self._private.shuffle = true + self:emit_signal("shuffle", true) + else + self._private.shuffle = false + self:emit_signal("shuffle", false) + end + end, + }) +end + +local function parse_args(self, args) + if args.player then + self._private.cmd = self._private.cmd .. "--player=" + + if type(args.player) == "string" then + self._private.cmd = self._private.cmd .. args.player .. " " + elseif type(args.player) == "table" then + for index, player in ipairs(args.player) do + self._private.cmd = self._private.cmd .. player + if index < #args.player then + self._private.cmd = self._private.cmd .. "," + else + self._private.cmd = self._private.cmd .. " " + end + end + end + end + + if args.ignore then + self._private.cmd = self._private.cmd .. "--ignore-player=" + + if type(args.ignore) == "string" then + self._private.cmd = self._private.cmd .. args.ignore .. " " + elseif type(args.ignore) == "table" then + for index, player in ipairs(args.ignore) do + self._private.cmd = self._private.cmd .. player + if index < #args.ignore then + self._private.cmd = self._private.cmd .. "," + else + self._private.cmd = self._private.cmd .. " " + end + end + end + end +end + +local function new(args) + args = args or {} + + local ret = gobject{} + gtable.crush(ret, playerctl, true) + + ret.interval = args.interval or beautiful.playerctl_position_update_interval or 1 + ret.debounce_delay = args.debounce_delay or beautiful.playerctl_debounce_delay or 0.35 + + ret._private = {} + ret._private.metadata_timer = nil + ret._private.cmd = "playerctl " + parse_args(ret, args) + + emit_player_metadata(ret) + emit_player_position(ret) + emit_player_playback_status(ret) + emit_player_volume(ret) + emit_player_loop_status(ret) + emit_player_shuffle(ret) + + return ret +end + +function playerctl.mt:__call(...) + return new(...) +end + +-- On startup instead of on playerctl object init to make it +-- possible to have more than one of these running +awful.spawn.with_shell("killall playerctl") + +return setmetatable(playerctl, playerctl.mt) diff --git a/.config/awesome/bling/signal/playerctl/playerctl_lib.lua b/.config/awesome/bling/signal/playerctl/playerctl_lib.lua new file mode 100755 index 0000000..1df1e1f --- /dev/null +++ b/.config/awesome/bling/signal/playerctl/playerctl_lib.lua @@ -0,0 +1,560 @@ +-- Playerctl signals +-- +-- Provides: +-- metadata +-- title (string) +-- artist (string) +-- album_path (string) +-- album (string) +-- new (bool) +-- player_name (string) +-- position +-- interval_sec (number) +-- length_sec (number) +-- player_name (string) +-- playback_status +-- playing (boolean) +-- player_name (string) +-- seeked +-- position (number) +-- player_name (string) +-- volume +-- volume (number) +-- player_name (string) +-- loop_status +-- loop_status (string) +-- player_name (string) +-- shuffle +-- shuffle (boolean) +-- player_name (string) +-- exit +-- player_name (string) +-- no_players +-- (No parameters) + +local awful = require("awful") +local gobject = require("gears.object") +local gtable = require("gears.table") +local gtimer = require("gears.timer") +local gstring = require("gears.string") +local beautiful = require("beautiful") +local helpers = require(tostring(...):match(".*bling") .. ".helpers") +local setmetatable = setmetatable +local ipairs = ipairs +local pairs = pairs +local type = type +local capi = { awesome = awesome } + +local playerctl = { mt = {} } + +function playerctl:disable() + -- Restore default settings + self.ignore = {} + self.priority = {} + self.update_on_activity = true + self.interval = 1 + self.debounce_delay = 0.35 + + -- Reset timers + self._private.manager = nil + self._private.metadata_timer:stop() + self._private.metadata_timer = nil + self._private.position_timer:stop() + self._private.position_timer = nil + + -- Reset default values + self._private.last_position = -1 + self._private.last_length = -1 + self._private.last_player = nil + self._private.last_title = "" + self._private.last_artist = "" + self._private.last_artUrl = "" +end + +function playerctl:pause(player) + player = player or self._private.manager.players[1] + if player then + player:pause() + end +end + +function playerctl:play(player) + player = player or self._private.manager.players[1] + if player then + player:play() + end +end + +function playerctl:stop(player) + player = player or self._private.manager.players[1] + if player then + player:stop() + end +end + +function playerctl:play_pause(player) + player = player or self._private.manager.players[1] + if player then + player:play_pause() + end +end + +function playerctl:previous(player) + player = player or self._private.manager.players[1] + if player then + player:previous() + end +end + +function playerctl:next(player) + player = player or self._private.manager.players[1] + if player then + player:next() + end +end + +function playerctl:set_loop_status(loop_status, player) + player = player or self._private.manager.players[1] + if player then + player:set_loop_status(loop_status) + end +end + +function playerctl:cycle_loop_status(player) + player = player or self._private.manager.players[1] + if player then + if player.loop_status == "NONE" then + player:set_loop_status("TRACK") + elseif player.loop_status == "TRACK" then + player:set_loop_status("PLAYLIST") + elseif player.loop_status == "PLAYLIST" then + player:set_loop_status("NONE") + end + end +end + +function playerctl:set_position(position, player) + player = player or self._private.manager.players[1] + if player then + player:set_position(position * 1000000) + end +end + +function playerctl:set_shuffle(shuffle, player) + player = player or self._private.manager.players[1] + if player then + player:set_shuffle(shuffle) + end +end + +function playerctl:cycle_shuffle(player) + player = player or self._private.manager.players[1] + if player then + player:set_shuffle(not player.shuffle) + end +end + +function playerctl:set_volume(volume, player) + player = player or self._private.manager.players[1] + if player then + player:set_volume(volume) + end +end + +function playerctl:get_manager() + return self._private.manager +end + +function playerctl:get_active_player() + return self._private.manager.players[1] +end + +function playerctl:get_player_of_name(name) + for _, player in ipairs(self._private.manager.players[1]) do + if player.name == name then + return player + end + end + + return nil +end + +local function emit_metadata_signal(self, title, artist, artUrl, album, new, player_name) + title = gstring.xml_escape(title) + artist = gstring.xml_escape(artist) + album = gstring.xml_escape(album) + + -- Spotify client doesn't report its art URL's correctly... + if player_name == "spotify" then + artUrl = artUrl:gsub("open.spotify.com", "i.scdn.co") + end + + if artUrl ~= "" then + local art_path = os.tmpname() + helpers.filesystem.save_image_async_curl(artUrl, art_path, function() + self:emit_signal("metadata", title, artist, art_path, album, new, player_name) + capi.awesome.emit_signal("bling::playerctl::title_artist_album", title, artist, art_path, player_name) + end) + else + capi.awesome.emit_signal("bling::playerctl::title_artist_album", title, artist, "", player_name) + self:emit_signal("metadata", title, artist, "", album, new, player_name) + end +end + +local function metadata_cb(self, player, metadata) + if self.update_on_activity then + self._private.manager:move_player_to_top(player) + end + + local data = metadata.value + + local title = data["xesam:title"] or "" + local artist = data["xesam:artist"][1] or "" + for i = 2, #data["xesam:artist"] do + artist = artist .. ", " .. data["xesam:artist"][i] + end + local artUrl = data["mpris:artUrl"] or "" + local album = data["xesam:album"] or "" + + if player == self._private.manager.players[1] then + self._private.active_player = player + + -- Callback can be called even though values we care about haven't + -- changed, so check to see if they have + if + player ~= self._private.last_player + or title ~= self._private.last_title + or artist ~= self._private.last_artist + or artUrl ~= self._private.last_artUrl + then + if (title == "" and artist == "" and artUrl == "") then return end + + if self._private.metadata_timer ~= nil and self._private.metadata_timer.started then + self._private.metadata_timer:stop() + end + + self._private.metadata_timer = gtimer { + timeout = self.debounce_delay, + autostart = true, + single_shot = true, + callback = function() + emit_metadata_signal(self, title, artist, artUrl, album, true, player.player_name) + end + } + + -- Re-sync with position timer when track changes + self._private.position_timer:again() + self._private.last_player = player + self._private.last_title = title + self._private.last_artist = artist + self._private.last_artUrl = artUrl + end + end +end + +local function position_cb(self) + local player = self._private.manager.players[1] + if player then + + local position = player:get_position() / 1000000 + local length = (player.metadata.value["mpris:length"] or 0) / 1000000 + if position ~= self._private.last_position or length ~= self._private.last_length then + capi.awesome.emit_signal("bling::playerctl::position", position, length, player.player_name) + self:emit_signal("position", position, length, player.player_name) + self._private.last_position = position + self._private.last_length = length + end + end +end + +local function playback_status_cb(self, player, status) + if self.update_on_activity then + self._private.manager:move_player_to_top(player) + end + + if player == self._private.manager.players[1] then + self._private.active_player = player + + -- Reported as PLAYING, PAUSED, or STOPPED + if status == "PLAYING" then + self:emit_signal("playback_status", true, player.player_name) + capi.awesome.emit_signal("bling::playerctl::status", true, player.player_name) + else + self:emit_signal("playback_status", false, player.player_name) + capi.awesome.emit_signal("bling::playerctl::status", false, player.player_name) + end + end +end + +local function seeked_cb(self, player, position) + if self.update_on_activity then + self._private.manager:move_player_to_top(player) + end + + if player == self._private.manager.players[1] then + self._private.active_player = player + self:emit_signal("seeked", position / 1000000, player.player_name) + end +end + +local function volume_cb(self, player, volume) + if self.update_on_activity then + self._private.manager:move_player_to_top(player) + end + + if player == self._private.manager.players[1] then + self._private.active_player = player + self:emit_signal("volume", volume, player.player_name) + end +end + +local function loop_status_cb(self, player, loop_status) + if self.update_on_activity then + self._private.manager:move_player_to_top(player) + end + + if player == self._private.manager.players[1] then + self._private.active_player = player + self:emit_signal("loop_status", loop_status:lower(), player.player_name) + end +end + +local function shuffle_cb(self, player, shuffle) + if self.update_on_activity then + self._private.manager:move_player_to_top(player) + end + + if player == self._private.manager.players[1] then + self._private.active_player = player + self:emit_signal("shuffle", shuffle, player.player_name) + end +end + +local function exit_cb(self, player) + if player == self._private.manager.players[1] then + self:emit_signal("exit", player.player_name) + end +end + +-- Determine if player should be managed +local function name_is_selected(self, name) + if self.ignore[name.name] then + return false + end + + if #self.priority > 0 then + for _, arg in pairs(self.priority) do + if arg == name.name or arg == "%any" then + return true + end + end + return false + end + + return true +end + +-- Create new player and connect it to callbacks +local function init_player(self, name) + if name_is_selected(self, name) then + local player = self._private.lgi_Playerctl.Player.new_from_name(name) + self._private.manager:manage_player(player) + player.on_metadata = function(player, metadata) + metadata_cb(self, player, metadata) + end + player.on_playback_status = function(player, playback_status) + playback_status_cb(self, player, playback_status) + end + player.on_seeked = function(player, position) + seeked_cb(self, player, position) + end + player.on_volume = function(player, volume) + volume_cb(self, player, volume) + end + player.on_loop_status = function(player, loop_status) + loop_status_cb(self, player, loop_status) + end + player.on_shuffle = function(player, shuffle_status) + shuffle_cb(self, player, shuffle_status) + end + player.on_exit = function(player, shuffle_status) + exit_cb(self, player) + end + + -- Start position timer if its not already running + if not self._private.position_timer.started then + self._private.position_timer:again() + end + end +end + +-- Determine if a player name comes before or after another according to the +-- priority order +local function player_compare_name(self, name_a, name_b) + local any_index = math.huge + local a_match_index = nil + local b_match_index = nil + + if name_a == name_b then + return 0 + end + + for index, name in ipairs(self.priority) do + if name == "%any" then + any_index = (any_index == math.huge) and index or any_index + elseif name == name_a then + a_match_index = a_match_index or index + elseif name == name_b then + b_match_index = b_match_index or index + end + end + + if not a_match_index and not b_match_index then + return 0 + elseif not a_match_index then + return (b_match_index < any_index) and 1 or -1 + elseif not b_match_index then + return (a_match_index < any_index) and -1 or 1 + elseif a_match_index == b_match_index then + return 0 + else + return (a_match_index < b_match_index) and -1 or 1 + end +end + +-- Sorting function used by manager if a priority order is specified +local function player_compare(self, a, b) + local player_a = self._private.lgi_Playerctl.Player(a) + local player_b = self._private.lgi_Playerctl.Player(b) + return player_compare_name(self, player_a.player_name, player_b.player_name) +end + +local function get_current_player_info(self, player) + local title = player:get_title() or "" + local artist = player:get_artist() or "" + local artUrl = player:print_metadata_prop("mpris:artUrl") or "" + local album = player:get_album() or "" + + emit_metadata_signal(self, title, artist, artUrl, album, false, player.player_name) + playback_status_cb(self, player, player.playback_status) + volume_cb(self, player, player.volume) + loop_status_cb(self, player, player.loop_status) + shuffle_cb(self, player, player.shuffle) +end + +local function start_manager(self) + self._private.manager = self._private.lgi_Playerctl.PlayerManager() + + if #self.priority > 0 then + self._private.manager:set_sort_func(function(a, b) + return player_compare(self, a, b) + end) + end + + -- Timer to update track position at specified interval + self._private.position_timer = gtimer { + timeout = self.interval, + callback = function() + position_cb(self) + end, + } + + -- Manage existing players on startup + for _, name in ipairs(self._private.manager.player_names) do + init_player(self, name) + end + + if self._private.manager.players[1] then + get_current_player_info(self, self._private.manager.players[1]) + end + + local _self = self + + -- Callback to manage new players + function self._private.manager:on_name_appeared(name) + init_player(_self, name) + end + + function self._private.manager:on_player_appeared(player) + if player == self.players[1] then + _self._private.active_player = player + end + end + + function self._private.manager:on_player_vanished(player) + if #self.players == 0 then + _self._private.metadata_timer:stop() + _self._private.position_timer:stop() + _self:emit_signal("no_players") + capi.awesome.emit_signal("bling::playerctl::no_players") + elseif player == _self._private.active_player then + _self._private.active_player = self.players[1] + get_current_player_info(_self, self.players[1]) + end + end +end + +local function parse_args(self, args) + self.ignore = {} + if type(args.ignore) == "string" then + self.ignore[args.ignore] = true + elseif type(args.ignore) == "table" then + for _, name in pairs(args.ignore) do + self.ignore[name] = true + end + end + + self.priority = {} + if type(args.player) == "string" then + self.priority[1] = args.player + elseif type(args.player) == "table" then + self.priority = args.player + end +end + +local function new(args) + args = args or {} + + local ret = gobject{} + gtable.crush(ret, playerctl, true) + + -- Grab settings from beautiful variables if not set explicitly + args.ignore = args.ignore or beautiful.playerctl_ignore + args.player = args.player or beautiful.playerctl_player + ret.update_on_activity = args.update_on_activity or + beautiful.playerctl_update_on_activity or true + ret.interval = args.interval or beautiful.playerctl_position_update_interval or 1 + ret.debounce_delay = args.debounce_delay or beautiful.playerctl_debounce_delay or 0.35 + parse_args(ret, args) + + ret._private = {} + + -- Metadata callback for title, artist, and album art + ret._private.last_player = nil + ret._private.last_title = "" + ret._private.last_artist = "" + ret._private.last_artUrl = "" + + -- Track position callback + ret._private.last_position = -1 + ret._private.last_length = -1 + + -- Grab playerctl library + ret._private.lgi_Playerctl = require("lgi").Playerctl + ret._private.manager = nil + ret._private.metadata_timer = nil + ret._private.position_timer = nil + + -- Ensure main event loop has started before starting player manager + gtimer.delayed_call(function() + start_manager(ret) + end) + + return ret +end + +function playerctl.mt:__call(...) + return new(...) +end + +return setmetatable(playerctl, playerctl.mt) diff --git a/.config/awesome/bling/theme-var-template.lua b/.config/awesome/bling/theme-var-template.lua new file mode 100755 index 0000000..13d0f5a --- /dev/null +++ b/.config/awesome/bling/theme-var-template.lua @@ -0,0 +1,105 @@ +--[[ Bling theme variables template + +This file has all theme variables of the bling module. +Every variable has a small comment on what it does. +You might just want to copy that whole part into your theme.lua and start adjusting from there. + +--]] +-- LuaFormatter off +-- window swallowing +theme.dont_swallow_classname_list = { "firefox", "Gimp" } -- list of class names that should not be swallowed +theme.dont_swallow_filter_activated = true -- whether the filter above should be active + +-- flash focus +theme.flash_focus_start_opacity = 0.6 -- the starting opacity +theme.flash_focus_step = 0.01 -- the step of animation + +-- playerctl signal +theme.playerctl_backend = "playerctl_cli" -- backend to use +theme.playerctl_ignore = {} -- list of players to be ignored +theme.playerctl_player = {} -- list of players to be used in priority order +theme.playerctl_update_on_activity = true -- whether to prioritize the most recently active players or not +theme.playerctl_position_update_interval = 1 -- the update interval for fetching the position from playerctl + +-- tabbed +theme.tabbed_spawn_in_tab = false -- whether a new client should spawn into the focused tabbing container + +-- tabbar general +theme.tabbar_disable = false -- disable the tab bar entirely +theme.tabbar_ontop = false +theme.tabbar_radius = 0 -- border radius of the tabbar +theme.tabbar_style = "default" -- style of the tabbar ("default", "boxes" or "modern") +theme.tabbar_font = "Sans 11" -- font of the tabbar +theme.tabbar_size = 40 -- size of the tabbar +theme.tabbar_position = "top" -- position of the tabbar +theme.tabbar_bg_normal = "#000000" -- background color of the focused client on the tabbar +theme.tabbar_fg_normal = "#ffffff" -- foreground color of the focused client on the tabbar +theme.tabbar_bg_focus = "#1A2026" -- background color of unfocused clients on the tabbar +theme.tabbar_fg_focus = "#ff0000" -- foreground color of unfocused clients on the tabbar +theme.tabbar_bg_focus_inactive = nil -- background color of the focused client on the tabbar when inactive +theme.tabbar_fg_focus_inactive = nil -- foreground color of the focused client on the tabbar when inactive +theme.tabbar_bg_normal_inactive = nil -- background color of unfocused clients on the tabbar when inactive +theme.tabbar_fg_normal_inactive = nil -- foreground color of unfocused clients on the tabbar when inactive + +-- mstab +theme.mstab_bar_disable = false -- disable the tabbar +theme.mstab_bar_ontop = false -- whether you want to allow the bar to be ontop of clients +theme.mstab_dont_resize_slaves = false -- whether the tabbed stack windows should be smaller than the +-- currently focused stack window (set it to true if you use +-- transparent terminals. False if you use shadows on solid ones +theme.mstab_bar_padding = "default" -- how much padding there should be between clients and your tabbar +-- by default it will adjust based on your useless gaps. +-- If you want a custom value. Set it to the number of pixels (int) +theme.mstab_border_radius = 0 -- border radius of the tabbar +theme.mstab_bar_height = 40 -- height of the tabbar +theme.mstab_tabbar_position = "top" -- position of the tabbar (mstab currently does not support left,right) +theme.mstab_tabbar_style = "default" -- style of the tabbar ("default", "boxes" or "modern") +-- defaults to the tabbar_style so only change if you want a +-- different style for mstab and tabbed + +-- the following variables are currently only for the "modern" tabbar style +theme.tabbar_color_close = "#f9929b" -- changes the color of the close button +theme.tabbar_color_min = "#fbdf90" -- changes the color of the minimize button +theme.tabbar_color_float = "#ccaced" -- changes the color of the float button + +-- tag preview widget +theme.tag_preview_widget_border_radius = 0 -- Border radius of the widget (With AA) +theme.tag_preview_client_border_radius = 0 -- Border radius of each client in the widget (With AA) +theme.tag_preview_client_opacity = 0.5 -- Opacity of each client +theme.tag_preview_client_bg = "#000000" -- The bg color of each client +theme.tag_preview_client_border_color = "#ffffff" -- The border color of each client +theme.tag_preview_client_border_width = 3 -- The border width of each client +theme.tag_preview_widget_bg = "#000000" -- The bg color of the widget +theme.tag_preview_widget_border_color = "#ffffff" -- The border color of the widget +theme.tag_preview_widget_border_width = 3 -- The border width of the widget +theme.tag_preview_widget_margin = 0 -- The margin of the widget + +-- task preview widget +theme.task_preview_widget_border_radius = 0 -- Border radius of the widget (With AA) +theme.task_preview_widget_bg = "#000000" -- The bg color of the widget +theme.task_preview_widget_border_color = "#ffffff" -- The border color of the widget +theme.task_preview_widget_border_width = 3 -- The border width of the widget +theme.task_preview_widget_margin = 0 -- The margin of the widget + +-- window switcher +theme.window_switcher_widget_bg = "#000000" -- The bg color of the widget +theme.window_switcher_widget_border_width = 3 -- The border width of the widget +theme.window_switcher_widget_border_radius = 0 -- The border radius of the widget +theme.window_switcher_widget_border_color = "#ffffff" -- The border color of the widget +theme.window_switcher_clients_spacing = 20 -- The space between each client item +theme.window_switcher_client_icon_horizontal_spacing = 5 -- The space between client icon and text +theme.window_switcher_client_width = 150 -- The width of one client widget +theme.window_switcher_client_height = 250 -- The height of one client widget +theme.window_switcher_client_margins = 10 -- The margin between the content and the border of the widget +theme.window_switcher_thumbnail_margins = 10 -- The margin between one client thumbnail and the rest of the widget +theme.thumbnail_scale = false -- If set to true, the thumbnails fit policy will be set to "fit" instead of "auto" +theme.window_switcher_name_margins = 10 -- The margin of one clients title to the rest of the widget +theme.window_switcher_name_valign = "center" -- How to vertically align one clients title +theme.window_switcher_name_forced_width = 200 -- The width of one title +theme.window_switcher_name_font = "Sans 11" -- The font of all titles +theme.window_switcher_name_normal_color = "#ffffff" -- The color of one title if the client is unfocused +theme.window_switcher_name_focus_color = "#ff0000" -- The color of one title if the client is focused +theme.window_switcher_icon_valign = "center" -- How to vertically align the one icon +theme.window_switcher_icon_width = 40 -- The width of one icon + +-- LuaFormatter on diff --git a/.config/awesome/bling/widget/app_launcher/init.lua b/.config/awesome/bling/widget/app_launcher/init.lua new file mode 100755 index 0000000..b74c2ab --- /dev/null +++ b/.config/awesome/bling/widget/app_launcher/init.lua @@ -0,0 +1,1053 @@ +local Gio = require("lgi").Gio +local awful = require("awful") +local gobject = require("gears.object") +local gtable = require("gears.table") +local gtimer = require("gears.timer") +local gfilesystem = require("gears.filesystem") +local wibox = require("wibox") +local beautiful = require("beautiful") +local color = require(tostring(...):match(".*bling") .. ".helpers.color") +local prompt = require(... .. ".prompt") +local dpi = beautiful.xresources.apply_dpi +local string = string +local table = table +local math = math +local ipairs = ipairs +local pairs = pairs +local root = root +local capi = { screen = screen, mouse = mouse } +local path = ... + +local app_launcher = { mt = {} } + +local terminal_commands_lookup = +{ + alacritty = "alacritty -e", + termite = "termite -e", + rxvt = "rxvt -e", + terminator = "terminator -e" +} + +local function string_levenshtein(str1, str2) + local len1 = string.len(str1) + local len2 = string.len(str2) + local matrix = {} + local cost = 0 + + -- quick cut-offs to save time + if (len1 == 0) then + return len2 + elseif (len2 == 0) then + return len1 + elseif (str1 == str2) then + return 0 + end + + -- initialise the base matrix values + for i = 0, len1, 1 do + matrix[i] = {} + matrix[i][0] = i + end + for j = 0, len2, 1 do + matrix[0][j] = j + end + + -- actual Levenshtein algorithm + for i = 1, len1, 1 do + for j = 1, len2, 1 do + if (str1:byte(i) == str2:byte(j)) then + cost = 0 + else + cost = 1 + end + + matrix[i][j] = math.min(matrix[i-1][j] + 1, matrix[i][j-1] + 1, matrix[i-1][j-1] + cost) + end + end + + -- return the last value - this is the Levenshtein distance + return matrix[len1][len2] +end + +local function case_insensitive_pattern(pattern) + -- find an optional '%' (group 1) followed by any character (group 2) + local p = pattern:gsub("(%%?)(.)", function(percent, letter) + if percent ~= "" or not letter:match("%a") then + -- if the '%' matched, or `letter` is not a letter, return "as is" + return percent .. letter + else + -- else, return a case-insensitive character class of the matched letter + return string.format("[%s%s]", letter:lower(), letter:upper()) + end + end) + + return p +end + +local function has_value(tab, val) + for index, value in pairs(tab) do + if val:find(case_insensitive_pattern(value)) then + return true + end + end + return false +end + +local function select_app(self, x, y) + local widgets = self._private.grid:get_widgets_at(x, y) + if widgets then + self._private.active_widget = widgets[1] + if self._private.active_widget ~= nil then + self._private.active_widget.selected = true + self._private.active_widget:get_children_by_id("background")[1].bg = self.app_selected_color + local name_widget = self._private.active_widget:get_children_by_id("name")[1] + if name_widget then + name_widget.markup = string.format("%s", self.app_name_selected_color, name_widget.text) + end + local generic_name_widget = self._private.active_widget:get_children_by_id("generic_name")[1] + if generic_name_widget then + generic_name_widget.markup = string.format("%s", self.app_name_selected_color, generic_name_widget.text) + end + end + end +end + +local function unselect_app(self) + if self._private.active_widget ~= nil then + self._private.active_widget.selected = false + self._private.active_widget:get_children_by_id("background")[1].bg = self.app_normal_color + local name_widget = self._private.active_widget:get_children_by_id("name")[1] + if name_widget then + name_widget.markup = string.format("%s", self.app_name_normal_color, name_widget.text) + end + local generic_name_widget = self._private.active_widget:get_children_by_id("generic_name")[1] + if generic_name_widget then + generic_name_widget.markup = string.format("%s", self.app_name_normal_color, generic_name_widget.text) + end + self._private.active_widget = nil + end +end + +local function create_app_widget(self, entry) + local icon = self.app_show_icon == true and + { + widget = wibox.widget.imagebox, + halign = self.app_icon_halign, + forced_width = self.app_icon_width, + forced_height = self.app_icon_height, + image = entry.icon + } or nil + + local name = self.app_show_name == true and + { + widget = wibox.widget.textbox, + id = "name", + font = self.app_name_font, + markup = entry.name + } or nil + + local generic_name = entry.generic_name ~= nil and self.app_show_generic_name == true and + { + widget = wibox.widget.textbox, + id = "generic_name", + font = self.app_name_font, + markup = entry.generic_name ~= "" and " (" .. entry.generic_name .. ")" or "" + } or nil + + local app = wibox.widget + { + widget = wibox.container.background, + id = "background", + forced_width = self.app_width, + forced_height = self.app_height, + shape = self.app_shape, + bg = self.app_normal_color, + { + widget = wibox.container.margin, + margins = self.app_content_padding, + { + -- Using this hack instead of container.place because that will fuck with the name/icon halign + layout = wibox.layout.align.vertical, + expand = "outside", + nil, + { + layout = wibox.layout.fixed.vertical, + spacing = self.app_content_spacing, + icon, + { + widget = wibox.container.place, + halign = self.app_name_halign, + { + layout = wibox.layout.fixed.horizontal, + spacing = self.app_name_generic_name_spacing, + name, + generic_name + } + } + }, + nil + } + } + } + + function app.spawn() + if entry.terminal == true then + if self.terminal ~= nil then + local terminal_command = terminal_commands_lookup[self.terminal] or self.terminal + awful.spawn(terminal_command .. " " .. entry.executable) + else + awful.spawn.easy_async("gtk-launch " .. entry.executable, function(stdout, stderr) + if stderr then + awful.spawn(entry.executable) + end + end) + end + else + awful.spawn(entry.executable) + end + + if self.hide_on_launch then + self:hide() + end + end + + app:connect_signal("mouse::enter", function(_self) + local widget = capi.mouse.current_wibox + if widget then + widget.cursor = "hand2" + end + + local app = _self + if app.selected then + app:get_children_by_id("background")[1].bg = self.app_selected_hover_color + else + local is_opaque = color.is_opaque(self.app_normal_color) + local is_dark = color.is_dark(self.app_normal_color) + local app_normal_color = color.hex_to_rgba(self.app_normal_color) + local hover_color = (is_dark or is_opaque) and + color.rgba_to_hex(color.multiply(app_normal_color, 2.5)) or + color.rgba_to_hex(color.multiply(app_normal_color, 0.5)) + app:get_children_by_id("background")[1].bg = self.app_normal_hover_color + end + end) + + app:connect_signal("mouse::leave", function(_self) + local widget = capi.mouse.current_wibox + if widget then + widget.cursor = "left_ptr" + end + + local app = _self + if app.selected then + app:get_children_by_id("background")[1].bg = self.app_selected_color + else + app:get_children_by_id("background")[1].bg = self.app_normal_color + end + end) + + app:connect_signal("button::press", function(_self, lx, ly, button, mods, find_widgets_result) + if button == 1 then + local app = _self + if self._private.active_widget == app or not self.select_before_spawn then + app.spawn() + else + -- Unmark the previous app + unselect_app(self) + + -- Mark this app + local pos = self._private.grid:get_widget_position(app) + select_app(self, pos.row, pos.col) + end + end + end) + + return app +end + +local function search(self, text) + unselect_app(self) + + local pos = self._private.grid:get_widget_position(self._private.active_widget) + + -- Reset all the matched entries + self._private.matched_entries = {} + -- Remove all the grid widgets + self._private.grid:reset() + + if text == "" then + self._private.matched_entries = self._private.all_entries + else + for index, entry in pairs(self._private.all_entries) do + text = text:gsub( "%W", "" ) + + -- Check if there's a match by the app name or app command + if string.find(entry.name:lower(), text:lower(), 1, true) ~= nil or + self.search_commands and string.find(entry.commandline, text:lower(), 1, true) ~= nil + then + table.insert(self._private.matched_entries, { + name = entry.name, + generic_name = entry.generic_name, + commandline = entry.commandline, + executable = entry.executable, + terminal = entry.terminal, + icon = entry.icon + }) + end + end + + -- Sort by string similarity + table.sort(self._private.matched_entries, function(a, b) + return string_levenshtein(text, a.name) < string_levenshtein(text, b.name) + end) + end + for index, entry in pairs(self._private.matched_entries) do + -- Only add the widgets for apps that are part of the first page + if #self._private.grid.children + 1 <= self._private.max_apps_per_page then + self._private.grid:add(create_app_widget(self, entry)) + end + end + + -- Recalculate the apps per page based on the current matched entries + self._private.apps_per_page = math.min(#self._private.matched_entries, self._private.max_apps_per_page) + + -- Recalculate the pages count based on the current apps per page + self._private.pages_count = math.ceil(math.max(1, #self._private.matched_entries) / math.max(1, self._private.apps_per_page)) + + -- Page should be 1 after a search + self._private.current_page = 1 + + -- This is an option to mimic rofi behaviour where after a search + -- it will reselect the app whose index is the same as the app index that was previously selected + -- and if matched_entries.length < current_index it will instead select the app with the greatest index + if self.try_to_keep_index_after_searching then + if self._private.grid:get_widgets_at(pos.row, pos.col) == nil then + local app = self._private.grid.children[#self._private.grid.children] + pos = self._private.grid:get_widget_position(app) + end + select_app(self, pos.row, pos.col) + -- Otherwise select the first app on the list + else + select_app(self, 1, 1) + end +end + +local function page_backward(self, direction) + if self._private.current_page > 1 then + self._private.current_page = self._private.current_page - 1 + elseif self.wrap_page_scrolling and #self._private.matched_entries >= self._private.max_apps_per_page then + self._private.current_page = self._private.pages_count + elseif self.wrap_app_scrolling then + local rows, columns = self._private.grid:get_dimension() + unselect_app(self) + select_app(self, math.min(rows, #self._private.grid.children % self.apps_per_row), columns) + return + else + return + end + + local pos = self._private.grid:get_widget_position(self._private.active_widget) + + -- Remove the current page apps from the grid + self._private.grid:reset() + + local max_app_index_to_include = self._private.apps_per_page * self._private.current_page + local min_app_index_to_include = max_app_index_to_include - self._private.apps_per_page + + for index, entry in pairs(self._private.matched_entries) do + -- Only add widgets that are between this range (part of the current page) + if index > min_app_index_to_include and index <= max_app_index_to_include then + self._private.grid:add(create_app_widget(self, entry)) + end + end + + local rows, columns = self._private.grid:get_dimension() + if self._private.current_page < self._private.pages_count then + if direction == "up" then + select_app(self, rows, columns) + else + -- Keep the same row from last page + select_app(self, pos.row, columns) + end + elseif self.wrap_page_scrolling then + if direction == "up" then + select_app(self, math.min(rows, #self._private.grid.children % self.apps_per_row), columns) + else + -- Keep the same row from last page + select_app(self, math.min(pos.row, #self._private.grid.children % self.apps_per_row), columns) + end + end +end + +local function page_forward(self, direction) + local min_app_index_to_include = 0 + local max_app_index_to_include = self._private.apps_per_page + + if self._private.current_page < self._private.pages_count then + min_app_index_to_include = self._private.apps_per_page * self._private.current_page + self._private.current_page = self._private.current_page + 1 + max_app_index_to_include = self._private.apps_per_page * self._private.current_page + elseif self.wrap_page_scrolling and #self._private.matched_entries >= self._private.max_apps_per_page then + self._private.current_page = 1 + min_app_index_to_include = 0 + max_app_index_to_include = self._private.apps_per_page + elseif self.wrap_app_scrolling then + unselect_app(self) + select_app(self, 1, 1) + return + else + return + end + + local pos = self._private.grid:get_widget_position(self._private.active_widget) + + -- Remove the current page apps from the grid + self._private.grid:reset() + + for index, entry in pairs(self._private.matched_entries) do + -- Only add widgets that are between this range (part of the current page) + if index > min_app_index_to_include and index <= max_app_index_to_include then + self._private.grid:add(create_app_widget(self, entry)) + end + end + + if self._private.current_page > 1 or self.wrap_page_scrolling then + if direction == "down" then + select_app(self, 1, 1) + else + local last_col_max_row = math.min(pos.row, #self._private.grid.children % self.apps_per_row) + if last_col_max_row ~= 0 then + select_app(self, last_col_max_row, 1) + else + select_app(self, pos.row, 1) + end + end + end +end + +local function scroll_up(self) + if #self._private.grid.children < 1 then + self._private.active_widget = nil + return + end + + local rows, columns = self._private.grid:get_dimension() + local pos = self._private.grid:get_widget_position(self._private.active_widget) + local is_bigger_than_first_app = pos.col > 1 or pos.row > 1 + + -- Check if the current marked app is not the first + if is_bigger_than_first_app then + unselect_app(self) + if pos.row == 1 then + select_app(self, rows, pos.col - 1) + else + select_app(self, pos.row - 1, pos.col) + end + else + page_backward(self, "up") + end +end + +local function scroll_down(self) + if #self._private.grid.children < 1 then + self._private.active_widget = nil + return + end + + local rows, columns = self._private.grid:get_dimension() + local pos = self._private.grid:get_widget_position(self._private.active_widget) + local is_less_than_max_app = self._private.grid:index(self._private.active_widget) < #self._private.grid.children + + -- Check if we can scroll down the app list + if is_less_than_max_app then + -- Unmark the previous app + unselect_app(self) + if pos.row == rows then + select_app(self, 1, pos.col + 1) + else + select_app(self, pos.row + 1, pos.col) + end + else + page_forward(self, "down") + end +end + +local function scroll_left(self) + if #self._private.grid.children < 1 then + self._private.active_widget = nil + return + end + + local pos = self._private.grid:get_widget_position(self._private.active_widget) + local is_bigger_than_first_column = pos.col > 1 + + -- Check if the current marked app is not the first + if is_bigger_than_first_column then + unselect_app(self) + select_app(self, pos.row, pos.col - 1) + else + page_backward(self, "left") + end +end + +local function scroll_right(self) + if #self._private.grid.children < 1 then + self._private.active_widget = nil + return + end + + local rows, columns = self._private.grid:get_dimension() + local pos = self._private.grid:get_widget_position(self._private.active_widget) + local is_less_than_max_column = pos.col < columns + + -- Check if we can scroll down the app list + if is_less_than_max_column then + -- Unmark the previous app + unselect_app(self) + + -- Scroll up to the max app if there are directly to the right of previous app + if self._private.grid:get_widgets_at(pos.row, pos.col + 1) == nil then + local app = self._private.grid.children[#self._private.grid.children] + pos = self._private.grid:get_widget_position(app) + select_app(self, pos.row, pos.col) + else + select_app(self, pos.row, pos.col + 1) + end + + else + page_forward(self, "right") + end +end + +local function reset(self) + self._private.grid:reset() + self._private.matched_entries = self._private.all_entries + self._private.apps_per_page = self._private.max_apps_per_page + self._private.pages_count = math.ceil(#self._private.all_entries / self._private.apps_per_page) + self._private.current_page = 1 + + for index, entry in pairs(self._private.all_entries) do + -- Only add the apps that are part of the first page + if index <= self._private.apps_per_page then + self._private.grid:add(create_app_widget(self, entry)) + else + break + end + end + + select_app(self, 1, 1) +end + +local function generate_apps(self) + self._private.all_entries = {} + self._private.matched_entries = {} + + local app_info = Gio.AppInfo + local apps = app_info.get_all() + if self.sort_alphabetically then + table.sort(apps, function(a, b) + local app_a_score = app_info.get_name(a):lower() + if has_value(self.favorites, app_info.get_name(a)) then + app_a_score = "aaaaaaaaaaa" .. app_a_score + end + local app_b_score = app_info.get_name(b):lower() + if has_value(self.favorites, app_info.get_name(b)) then + app_b_score = "aaaaaaaaaaa" .. app_b_score + end + + return app_a_score < app_b_score + end) + elseif self.reverse_sort_alphabetically then + table.sort(apps, function(a, b) + local app_a_score = app_info.get_name(a):lower() + if has_value(self.favorites, app_info.get_name(a)) then + app_a_score = "zzzzzzzzzzz" .. app_a_score + end + local app_b_score = app_info.get_name(b):lower() + if has_value(self.favorites, app_info.get_name(b)) then + app_b_score = "zzzzzzzzzzz" .. app_b_score + end + + return app_a_score > app_b_score + end) + else + table.sort(apps, function(a, b) + local app_a_favorite = has_value(self.favorites, app_info.get_name(a)) + local app_b_favorite = has_value(self.favorites, app_info.get_name(b)) + + if app_a_favorite and not app_b_favorite then + return true + elseif app_b_favorite and not app_a_favorite then + return false + elseif app_a_favorite and app_b_favorite then + return app_info.get_name(a):lower() < app_info.get_name(b):lower() + else + return false + end + end) + end + + local icon_theme = require(tostring(path):match(".*bling") .. ".helpers.icon_theme")(self.icon_theme, self.icon_size) + + for _, app in ipairs(apps) do + if app.should_show(app) then + local name = app_info.get_name(app) + local commandline = app_info.get_commandline(app) + local executable = app_info.get_executable(app) + local icon = icon_theme:get_gicon_path(app_info.get_icon(app)) + + -- Check if this app should be skipped, depanding on the skip_names / skip_commands table + if not has_value(self.skip_names, name) and not has_value(self.skip_commands, commandline) then + -- Check if this app should be skipped becuase it's iconless depanding on skip_empty_icons + if icon ~= "" or self.skip_empty_icons == false then + if icon == "" then + if self.default_app_icon_name ~= nil then + icon = icon_theme:get_icon_path(self.default_app_icon_name) + elseif self.default_app_icon_path ~= nil then + icon = self.default_app_icon_path + else + icon = icon_theme:choose_icon({"application-all", "application", "application-default-icon", "app"}) + end + end + + local desktop_app_info = Gio.DesktopAppInfo.new(app_info.get_id(app)) + local terminal = Gio.DesktopAppInfo.get_string(desktop_app_info, "Terminal") == "true" and true or false + local generic_name = Gio.DesktopAppInfo.get_string(desktop_app_info, "GenericName") or nil + + table.insert(self._private.all_entries, { + name = name, + generic_name = generic_name, + commandline = commandline, + executable = executable, + terminal = terminal, + icon = icon + }) + end + end + end + end +end + +--- Shows the app launcher +function app_launcher:show() + local screen = self.screen + if self.show_on_focused_screen then + screen = awful.screen.focused() + end + + screen.app_launcher = self._private.widget + screen.app_launcher.screen = screen + self._private.prompt:start() + + local animation = self.rubato + if animation ~= nil then + if self._private.widget.goal_x == nil then + self._private.widget.goal_x = self._private.widget.x + end + if self._private.widget.goal_y == nil then + self._private.widget.goal_y = self._private.widget.y + self._private.widget.placement = nil + end + + if animation.x then + animation.x.ended:unsubscribe() + animation.x:set(self._private.widget.goal_x) + gtimer { + timeout = 0.01, + call_now = false, + autostart = true, + single_shot = true, + callback = function() + screen.app_launcher.visible = true + end + } + end + if animation.y then + animation.y.ended:unsubscribe() + animation.y:set(self._private.widget.goal_y) + gtimer { + timeout = 0.01, + call_now = false, + autostart = true, + single_shot = true, + callback = function() + screen.app_launcher.visible = true + end + } + end + else + screen.app_launcher.visible = true + end + + self:emit_signal("bling::app_launcher::visibility", true) +end + +--- Hides the app launcher +function app_launcher:hide() + local screen = self.screen + if self.show_on_focused_screen then + screen = awful.screen.focused() + end + + if screen.app_launcher == nil or screen.app_launcher.visible == false then + return + end + + self._private.prompt:stop() + + local animation = self.rubato + if animation ~= nil then + if animation.x then + animation.x:set(animation.x:initial()) + end + if animation.y then + animation.y:set(animation.y:initial()) + end + + local anim_x_duration = (animation.x and animation.x.duration) or 0 + local anim_y_duration = (animation.y and animation.y.duration) or 0 + local turn_off_on_anim_x_end = (anim_x_duration >= anim_y_duration) and true or false + + if turn_off_on_anim_x_end then + animation.x.ended:subscribe(function() + if self.reset_on_hide == true then reset(self) end + screen.app_launcher.visible = false + screen.app_launcher = nil + animation.x.ended:unsubscribe() + end) + else + animation.y.ended:subscribe(function() + if self.reset_on_hide == true then reset(self) end + screen.app_launcher.visible = false + screen.app_launcher = nil + animation.y.ended:unsubscribe() + end) + end + else + if self.reset_on_hide == true then reset(self) end + screen.app_launcher.visible = false + screen.app_launcher = nil + end + + self:emit_signal("bling::app_launcher::visibility", false) +end + +--- Toggles the app launcher +function app_launcher:toggle() + local screen = self.screen + if self.show_on_focused_screen then + screen = awful.screen.focused() + end + + if screen.app_launcher and screen.app_launcher.visible then + self:hide() + else + self:show() + end +end + +-- Returns a new app launcher +local function new(args) + args = args or {} + + args.terminal = args.terminal or nil + args.favorites = args.favorites or {} + args.search_commands = args.search_commands == nil and true or args.search_commands + args.skip_names = args.skip_names or {} + args.skip_commands = args.skip_commands or {} + args.skip_empty_icons = args.skip_empty_icons ~= nil and args.skip_empty_icons or false + args.sort_alphabetically = args.sort_alphabetically == nil and true or args.sort_alphabetically + args.reverse_sort_alphabetically = args.reverse_sort_alphabetically ~= nil and args.reverse_sort_alphabetically or false + args.select_before_spawn = args.select_before_spawn == nil and true or args.select_before_spawn + args.hide_on_left_clicked_outside = args.hide_on_left_clicked_outside == nil and true or args.hide_on_left_clicked_outside + args.hide_on_right_clicked_outside = args.hide_on_right_clicked_outside == nil and true or args.hide_on_right_clicked_outside + args.hide_on_launch = args.hide_on_launch == nil and true or args.hide_on_launch + args.try_to_keep_index_after_searching = args.try_to_keep_index_after_searching ~= nil and args.try_to_keep_index_after_searching or false + args.reset_on_hide = args.reset_on_hide == nil and true or args.reset_on_hide + args.save_history = args.save_history == nil and true or args.save_history + args.wrap_page_scrolling = args.wrap_page_scrolling == nil and true or args.wrap_page_scrolling + args.wrap_app_scrolling = args.wrap_app_scrolling == nil and true or args.wrap_app_scrolling + + args.default_app_icon_name = args.default_app_icon_name or nil + args.default_app_icon_path = args.default_app_icon_path or nil + args.icon_theme = args.icon_theme or nil + args.icons_size = args.icons_size or nil + + args.type = args.type or "dock" + args.show_on_focused_screen = args.show_on_focused_screen == nil and true or args.show_on_focused_screen + args.screen = args.screen or capi.screen.primary + args.placement = args.placement or awful.placement.centered + args.rubato = args.rubato or nil + args.shirnk_width = args.shirnk_width ~= nil and args.shirnk_width or false + args.shrink_height = args.shrink_height ~= nil and args.shrink_height or false + args.background = args.background or "#000000" + args.shape = args.shape or nil + + args.prompt_height = args.prompt_height or dpi(100) + args.prompt_margins = args.prompt_margins or dpi(0) + args.prompt_paddings = args.prompt_paddings or dpi(30) + args.prompt_shape = args.prompt_shape or nil + args.prompt_color = args.prompt_color or beautiful.fg_normal or "#FFFFFF" + args.prompt_border_width = args.prompt_border_width or beautiful.border_width or dpi(0) + args.prompt_border_color = args.prompt_border_color or beautiful.border_color or args.prompt_color + args.prompt_text_halign = args.prompt_text_halign or "left" + args.prompt_text_valign = args.prompt_text_valign or "center" + args.prompt_icon_text_spacing = args.prompt_icon_text_spacing or dpi(10) + args.prompt_show_icon = args.prompt_show_icon == nil and true or args.prompt_show_icon + args.prompt_icon_font = args.prompt_icon_font or beautiful.font + args.prompt_icon_color = args.prompt_icon_color or beautiful.bg_normal or "#000000" + args.prompt_icon = args.prompt_icon or "" + args.prompt_icon_markup = args.prompt_icon_markup or string.format("%s", args.prompt_icon_color, args.prompt_icon) + args.prompt_text = args.prompt_text or "Search: " + args.prompt_start_text = args.prompt_start_text or "" + args.prompt_font = args.prompt_font or beautiful.font + args.prompt_text_color = args.prompt_text_color or beautiful.bg_normal or "#000000" + args.prompt_cursor_color = args.prompt_cursor_color or beautiful.bg_normal or "#000000" + + args.apps_per_row = args.apps_per_row or 5 + args.apps_per_column = args.apps_per_column or 3 + args.apps_margin = args.apps_margin or dpi(30) + args.apps_spacing = args.apps_spacing or dpi(30) + + args.expand_apps = args.expand_apps == nil and true or args.expand_apps + args.app_width = args.app_width or dpi(300) + args.app_height = args.app_height or dpi(120) + args.app_shape = args.app_shape or nil + args.app_normal_color = args.app_normal_color or beautiful.bg_normal or "#000000" + args.app_normal_hover_color = args.app_normal_hover_color or (color.is_dark(args.app_normal_color) or color.is_opaque(args.app_normal_color)) and + color.rgba_to_hex(color.multiply(color.hex_to_rgba(args.app_normal_color), 2.5)) or + color.rgba_to_hex(color.multiply(color.hex_to_rgba(args.app_normal_color), 0.5)) + args.app_selected_color = args.app_selected_color or beautiful.fg_normal or "#FFFFFF" + args.app_selected_hover_color = args.app_selected_hover_color or (color.is_dark(args.app_normal_color) or color.is_opaque(args.app_normal_color)) and + color.rgba_to_hex(color.multiply(color.hex_to_rgba(args.app_selected_color), 2.5)) or + color.rgba_to_hex(color.multiply(color.hex_to_rgba(args.app_selected_color), 0.5)) + args.app_content_padding = args.app_content_padding or dpi(10) + args.app_content_spacing = args.app_content_spacing or dpi(10) + args.app_show_icon = args.app_show_icon == nil and true or args.app_show_icon + args.app_icon_halign = args.app_icon_halign or "center" + args.app_icon_width = args.app_icon_width or dpi(70) + args.app_icon_height = args.app_icon_height or dpi(70) + args.app_show_name = args.app_show_name == nil and true or args.app_show_name + args.app_name_generic_name_spacing = args.app_name_generic_name_spacing or dpi(0) + args.app_name_halign = args.app_name_halign or "center" + args.app_name_font = args.app_name_font or beautiful.font + args.app_name_normal_color = args.app_name_normal_color or beautiful.fg_normal or "#FFFFFF" + args.app_name_selected_color = args.app_name_selected_color or beautiful.bg_normal or "#000000" + args.app_show_generic_name = args.app_show_generic_name ~= nil and args.app_show_generic_name or false + + local ret = gobject({}) + ret._private = {} + ret._private.text = "" + + gtable.crush(ret, app_launcher) + gtable.crush(ret, args) + + -- Calculate the grid width and height + local grid_width = ret.shirnk_width == false + and dpi((ret.app_width * ret.apps_per_column) + ((ret.apps_per_column - 1) * ret.apps_spacing)) + or nil + local grid_height = ret.shrink_height == false + and dpi((ret.app_height * ret.apps_per_row) + ((ret.apps_per_row - 1) * ret.apps_spacing)) + or nil + + -- These widgets need to be later accessed + ret._private.prompt = prompt + { + prompt = ret.prompt_text, + text = ret.prompt_start_text, + font = ret.prompt_font, + reset_on_stop = ret.reset_on_hide, + bg_cursor = ret.prompt_cursor_color, + history_path = ret.save_history == true and gfilesystem.get_cache_dir() .. "/history" or nil, + changed_callback = function(text) + if text == ret._private.text then + return + end + + if ret._private.search_timer ~= nil and ret._private.search_timer.started then + ret._private.search_timer:stop() + end + + ret._private.search_timer = gtimer { + timeout = 0.05, + autostart = true, + single_shot = true, + callback = function() + search(ret, text) + end + } + + ret._private.text = text + end, + keypressed_callback = function(mod, key, cmd) + if key == "Escape" then + ret:hide() + end + if key == "Return" then + if ret._private.active_widget ~= nil then + ret._private.active_widget.spawn() + end + end + if key == "Up" then + scroll_up(ret) + end + if key == "Down" then + scroll_down(ret) + end + if key == "Left" then + scroll_left(ret) + end + if key == "Right" then + scroll_right(ret) + end + end + } + ret._private.grid = wibox.widget + { + layout = wibox.layout.grid, + forced_width = grid_width, + forced_height = grid_height, + orientation = "horizontal", + homogeneous = true, + expand = ret.expand_apps, + spacing = ret.apps_spacing, + forced_num_rows = ret.apps_per_row, + buttons = + { + awful.button({}, 4, function() scroll_up(ret) end), + awful.button({}, 5, function() scroll_down(ret) end) + } + } + ret._private.widget = awful.popup + { + type = args.type, + visible = false, + ontop = true, + placement = ret.placement, + shape = ret.shape, + bg = ret.background, + widget = + { + layout = wibox.layout.fixed.vertical, + { + widget = wibox.container.margin, + margins = ret.prompt_margins, + { + widget = wibox.container.background, + forced_height = ret.prompt_height, + shape = ret.prompt_shape, + bg = ret.prompt_color, + fg = ret.prompt_text_color, + border_width = ret.prompt_border_width, + border_color = ret.prompt_border_color, + { + widget = wibox.container.margin, + margins = ret.prompt_paddings, + { + widget = wibox.container.place, + halign = ret.prompt_text_halign, + valign = ret.prompt_text_valign, + { + layout = wibox.layout.fixed.horizontal, + spacing = ret.prompt_icon_text_spacing, + { + widget = wibox.widget.textbox, + font = ret.prompt_icon_font, + markup = ret.prompt_icon_markup + }, + ret._private.prompt.textbox + } + } + } + } + }, + { + widget = wibox.container.margin, + margins = ret.apps_margin, + ret._private.grid + } + } + } + + -- Private variables to be used to be used by the scrolling and searching functions + ret._private.max_apps_per_page = ret.apps_per_column * ret.apps_per_row + ret._private.apps_per_page = ret._private.max_apps_per_page + ret._private.pages_count = 0 + ret._private.current_page = 1 + + generate_apps(ret) + reset(ret) + + if ret.rubato and ret.rubato.x then + ret.rubato.x:subscribe(function(pos) + ret._private.widget.x = pos + end) + end + if ret.rubato and ret.rubato.y then + ret.rubato.y:subscribe(function(pos) + ret._private.widget.y = pos + end) + end + + if ret.hide_on_left_clicked_outside then + awful.mouse.append_client_mousebinding( + awful.button({ }, 1, function (c) + ret:hide() + end) + ) + + awful.mouse.append_global_mousebinding( + awful.button({ }, 1, function (c) + ret:hide() + end) + ) + end + if ret.hide_on_right_clicked_outside then + awful.mouse.append_client_mousebinding( + awful.button({ }, 3, function (c) + ret:hide() + end) + ) + + awful.mouse.append_global_mousebinding( + awful.button({ }, 3, function (c) + ret:hide() + end) + ) + end + + local kill_old_inotify_process_script = [[ ps x | grep "inotifywait -e modify /usr/share/applications" | grep -v grep | awk '{print $1}' | xargs kill ]] + local subscribe_script = [[ bash -c "while (inotifywait -e modify /usr/share/applications -qq) do echo; done" ]] + + awful.spawn.easy_async_with_shell(kill_old_inotify_process_script, function() + awful.spawn.with_line_callback(subscribe_script, {stdout = function(_) + generate_apps(ret) + end}) + end) + + return ret +end + +function app_launcher.text(args) + args = args or {} + + args.prompt_height = args.prompt_height or dpi(50) + args.prompt_margins = args.prompt_margins or dpi(30) + args.prompt_paddings = args.prompt_paddings or dpi(15) + args.app_width = args.app_width or dpi(400) + args.app_height = args.app_height or dpi(40) + args.apps_spacing = args.apps_spacing or dpi(10) + args.apps_per_row = args.apps_per_row or 15 + args.apps_per_column = args.apps_per_column or 1 + args.app_name_halign = args.app_name_halign or "left" + args.app_show_icon = args.app_show_icon ~= nil and args.app_show_icon or false + args.app_show_generic_name = args.app_show_generic_name == nil and true or args.app_show_generic_name + args.apps_margin = args.apps_margin or { left = dpi(40), right = dpi(40), bottom = dpi(30) } + + return new(args) +end + +function app_launcher.mt:__call(...) + return new(...) +end + +return setmetatable(app_launcher, app_launcher.mt) diff --git a/.config/awesome/bling/widget/app_launcher/prompt.lua b/.config/awesome/bling/widget/app_launcher/prompt.lua new file mode 100755 index 0000000..fae3b86 --- /dev/null +++ b/.config/awesome/bling/widget/app_launcher/prompt.lua @@ -0,0 +1,656 @@ +--------------------------------------------------------------------------- +--- Modified Prompt module. +-- @author Julien Danjou <julien@danjou.info> +-- @copyright 2008 Julien Danjou +--------------------------------------------------------------------------- + +local akey = require("awful.key") +local keygrabber = require("awful.keygrabber") +local gobject = require("gears.object") +local gdebug = require('gears.debug') +local gtable = require("gears.table") +local gcolor = require("gears.color") +local gstring = require("gears.string") +local gfs = require("gears.filesystem") +local wibox = require("wibox") +local beautiful = require("beautiful") +local io = io +local table = table +local math = math +local ipairs = ipairs +local unpack = unpack or table.unpack -- luacheck: globals unpack (compatibility with Lua 5.1) +local capi = { selection = selection } + +local prompt = { mt = {} } + +--- Private data +local data = {} +data.history = {} + +local function itera(inc,a, i) + i = i + inc + local v = a[i] + if v then return i,v end +end + +local function history_check_load(id, max) + if id and id ~= "" and not data.history[id] then + data.history[id] = { max = 50, table = {} } + + if max then + data.history[id].max = max + end + + local f = io.open(id, "r") + if not f then return end + + -- Read history file + for line in f:lines() do + if gtable.hasitem(data.history[id].table, line) == nil then + table.insert(data.history[id].table, line) + if #data.history[id].table >= data.history[id].max then + break + end + end + end + f:close() + end +end + +local function is_word_char(c) + if string.find(c, "[{[(,.:;_-+=@/ ]") then + return false + else + return true + end +end + +local function cword_start(s, pos) + local i = pos + if i > 1 then + i = i - 1 + end + while i >= 1 and not is_word_char(s:sub(i, i)) do + i = i - 1 + end + while i >= 1 and is_word_char(s:sub(i, i)) do + i = i - 1 + end + if i <= #s then + i = i + 1 + end + return i +end + +local function cword_end(s, pos) + local i = pos + while i <= #s and not is_word_char(s:sub(i, i)) do + i = i + 1 + end + while i <= #s and is_word_char(s:sub(i, i)) do + i = i + 1 + end + return i +end + +local function history_save(id) + if data.history[id] then + gfs.make_parent_directories(id) + local f = io.open(id, "w") + if not f then + gdebug.print_warning("Failed to write the history to "..id) + return + end + for i = 1, math.min(#data.history[id].table, data.history[id].max) do + f:write(data.history[id].table[i] .. "\n") + end + f:close() + end +end + +local function history_items(id) + if data.history[id] then + return #data.history[id].table + else + return -1 + end +end + +local function history_add(id, command) + if data.history[id] and command ~= "" then + local index = gtable.hasitem(data.history[id].table, command) + if index == nil then + table.insert(data.history[id].table, command) + + -- Do not exceed our max_cmd + if #data.history[id].table > data.history[id].max then + table.remove(data.history[id].table, 1) + end + + history_save(id) + else + -- Bump this command to the end of history + table.remove(data.history[id].table, index) + table.insert(data.history[id].table, command) + history_save(id) + end + end +end + +local function have_multibyte_char_at(text, position) + return text:sub(position, position):wlen() == -1 +end + +local function prompt_text_with_cursor(args) + local char, spacer, text_start, text_end, ret + local text = args.text or "" + local _prompt = args.prompt or "" + local underline = args.cursor_ul or "none" + + if args.select_all then + if #text == 0 then char = " " else char = gstring.xml_escape(text) end + spacer = " " + text_start = "" + text_end = "" + elseif #text < args.cursor_pos then + char = " " + spacer = "" + text_start = gstring.xml_escape(text) + text_end = "" + else + local offset = 0 + if have_multibyte_char_at(text, args.cursor_pos) then + offset = 1 + end + char = gstring.xml_escape(text:sub(args.cursor_pos, args.cursor_pos + offset)) + spacer = " " + text_start = gstring.xml_escape(text:sub(1, args.cursor_pos - 1)) + text_end = gstring.xml_escape(text:sub(args.cursor_pos + 1 + offset)) + end + + local cursor_color = gcolor.ensure_pango_color(args.cursor_color) + local text_color = gcolor.ensure_pango_color(args.text_color) + + if args.highlighter then + text_start, text_end = args.highlighter(text_start, text_end) + end + + ret = _prompt .. text_start .. "" .. char .. "" .. text_end .. spacer + + return ret +end + +local function update(self) + self.textbox:set_font(self.font) + self.textbox:set_markup(prompt_text_with_cursor{ + text = self.command, text_color = self.fg_cursor, cursor_color = self.bg_cursor, + cursor_pos = self._private_cur_pos, cursor_ul = self.ul_cursor, select_all = self.select_all, + prompt = self.prompt, highlighter = self.highlighter }) +end + +local function exec(self, cb, command_to_history) + self.textbox:set_markup("") + history_add(self.history_path, command_to_history) + keygrabber.stop(self._private.grabber) + if cb then cb(self.command) end + if self.done_callback then + self.done_callback() + end +end + +function prompt:start() + -- The cursor position + if self.reset_on_stop == true or self._private_cur_pos == nil then + self._private_cur_pos = (self.select_all and 1) or self.text:wlen() + 1 + end + if self.reset_on_stop == true then self.text = "" self.command = "" end + + self.textbox:set_font(self.font) + self.textbox:set_markup(prompt_text_with_cursor{ + text = self.reset_on_stop and self.text or self.command, text_color = self.fg_cursor, cursor_color = self.bg_cursor, + cursor_pos = self._private_cur_pos, cursor_ul = self.ul_cursor, select_all = self.select_all, + prompt = self.prompt, highlighter = self.highlighter}) + + self._private.search_term = nil + + history_check_load(self.history_path, self.history_max) + local history_index = history_items(self.history_path) + 1 + + -- The completion element to use on completion request. + local ncomp = 1 + + local command_before_comp + local cur_pos_before_comp + + self._private.grabber = keygrabber.run(function(modifiers, key, event) + -- Convert index array to hash table + local mod = {} + for _, v in ipairs(modifiers) do mod[v] = true end + + if event ~= "press" then + if self.keyreleased_callback then + self.keyreleased_callback(mod, key, self.command) + end + return + end + + -- Call the user specified callback. If it returns true as + -- the first result then return from the function. Treat the + -- second and third results as a new command and new prompt + -- to be set (if provided) + if self.keypressed_callback then + local user_catched, new_command, new_prompt = + self.keypressed_callback(mod, key, self.command) + if new_command or new_prompt then + if new_command then + self.command = new_command + end + if new_prompt then + self.prompt = new_prompt + end + update(self) + end + if user_catched then + if self.changed_callback then + self.changed_callback(self.command) + end + return + end + end + + local filtered_modifiers = {} + + -- User defined cases + if self.hooks[key] then + -- Remove caps and num lock + for _, m in ipairs(modifiers) do + if not gtable.hasitem(akey.ignore_modifiers, m) then + table.insert(filtered_modifiers, m) + end + end + + for _,v in ipairs(self.hooks[key]) do + if #filtered_modifiers == #v[1] then + local match = true + for _,v2 in ipairs(v[1]) do + match = match and mod[v2] + end + if match then + local cb + local ret, quit = v[3](self.command) + local original_command = self.command + + -- Support both a "simple" and a "complex" way to + -- control if the prompt should quit. + quit = quit == nil and (ret ~= true) or (quit~=false) + + -- Allow the callback to change the command + self.command = (ret ~= true) and ret or self.command + + -- Quit by default, but allow it to be disabled + if ret and type(ret) ~= "boolean" then + cb = self.exe_callback + if not quit then + self._private_cur_pos = ret:wlen() + 1 + update(self) + end + elseif quit then + -- No callback. + cb = function() end + end + + -- Execute the callback + if cb then + exec(self, cb, original_command) + end + + return + end + end + end + end + + -- Get out cases + if (mod.Control and (key == "c" or key == "g")) + or (not mod.Control and key == "Escape") then + self:stop() + return false + elseif (mod.Control and (key == "j" or key == "m")) + -- or (not mod.Control and key == "Return") + -- or (not mod.Control and key == "KP_Enter") + then + exec(self, self.exe_callback, self.command) + -- We already unregistered ourselves so we don't want to return + -- true, otherwise we may unregister someone else. + return + end + + -- Control cases + if mod.Control then + self.select_all = nil + if key == "v" then + local selection = capi.selection() + if selection then + -- Remove \n + local n = selection:find("\n") + if n then + selection = selection:sub(1, n - 1) + end + self.command = self.command:sub(1, self._private_cur_pos - 1) .. selection .. self.command:sub(self._private_cur_pos) + self._private_cur_pos = self._private_cur_pos + #selection + end + elseif key == "a" then + self._private_cur_pos = 1 + elseif key == "b" then + if self._private_cur_pos > 1 then + self._private_cur_pos = self._private_cur_pos - 1 + if have_multibyte_char_at(self.command, self._private_cur_pos) then + self._private_cur_pos = self._private_cur_pos - 1 + end + end + elseif key == "d" then + if self._private_cur_pos <= #self.command then + self.command = self.command:sub(1, self._private_cur_pos - 1) .. self.command:sub(self._private_cur_pos + 1) + end + elseif key == "p" then + if history_index > 1 then + history_index = history_index - 1 + + self.command = data.history[self.history_path].table[history_index] + self._private_cur_pos = #self.command + 2 + end + elseif key == "n" then + if history_index < history_items(self.history_path) then + history_index = history_index + 1 + + self.command = data.history[self.history_path].table[history_index] + self._private_cur_pos = #self.command + 2 + elseif history_index == history_items(self.history_path) then + history_index = history_index + 1 + + self.command = "" + self._private_cur_pos = 1 + end + elseif key == "e" then + self._private_cur_pos = #self.command + 1 + elseif key == "r" then + self._private.search_term = self._private.search_term or self.command:sub(1, self._private_cur_pos - 1) + for i,v in (function(a,i) return itera(-1,a,i) end), data.history[self.history_path].table, history_index do + if v:find(self._private.search_term,1,true) ~= nil then + self.command=v + history_index=i + self._private_cur_pos=#self.command+1 + break + end + end + elseif key == "s" then + self._private.search_term = self._private.search_term or self.command:sub(1, self._private_cur_pos - 1) + for i,v in (function(a,i) return itera(1,a,i) end), data.history[self.history_path].table, history_index do + if v:find(self._private.search_term,1,true) ~= nil then + self.command=v + history_index=i + self._private_cur_pos=#self.command+1 + break + end + end + elseif key == "f" then + if self._private_cur_pos <= #self.command then + if have_multibyte_char_at(self.command, self._private_cur_pos) then + self._private_cur_pos = self._private_cur_pos + 2 + else + self._private_cur_pos = self._private_cur_pos + 1 + end + end + elseif key == "h" then + if self._private_cur_pos > 1 then + local offset = 0 + if have_multibyte_char_at(self.command, self._private_cur_pos - 1) then + offset = 1 + end + self.command = self.command:sub(1, self._private_cur_pos - 2 - offset) .. self.command:sub(self._private_cur_pos) + self._private_cur_pos = self._private_cur_pos - 1 - offset + end + elseif key == "k" then + self.command = self.command:sub(1, self._private_cur_pos - 1) + elseif key == "u" then + self.command = self.command:sub(self._private_cur_pos, #self.command) + self._private_cur_pos = 1 + elseif key == "Prior" then + self._private.search_term = self.command:sub(1, self._private_cur_pos - 1) or "" + for i,v in (function(a,i) return itera(-1,a,i) end), data.history[self.history_path].table, history_index do + if v:find(self._private.search_term,1,true) == 1 then + self.command=v + history_index=i + break + end + end + elseif key == "Next" then + self._private.search_term = self.command:sub(1, self._private_cur_pos - 1) or "" + for i,v in (function(a,i) return itera(1,a,i) end), data.history[self.history_path].table, history_index do + if v:find(self._private.search_term,1,true) == 1 then + self.command=v + history_index=i + break + end + end + elseif key == "w" or key == "BackSpace" then + local wstart = 1 + local wend = 1 + local cword_start_pos = 1 + local cword_end_pos = 1 + while wend < self._private_cur_pos do + wend = self.command:find("[{[(,.:;_-+=@/ ]", wstart) + if not wend then wend = #self.command + 1 end + if self._private_cur_pos >= wstart and self._private_cur_pos <= wend + 1 then + cword_start_pos = wstart + cword_end_pos = self._private_cur_pos - 1 + break + end + wstart = wend + 1 + end + self.command = self.command:sub(1, cword_start_pos - 1) .. self.command:sub(cword_end_pos + 1) + self._private_cur_pos = cword_start_pos + elseif key == "Delete" then + -- delete from history only if: + -- we are not dealing with a new command + -- the user has not edited an existing entry + if self.command == data.history[self.history_path].table[history_index] then + table.remove(data.history[self.history_path].table, history_index) + if history_index <= history_items(self.history_path) then + self.command = data.history[self.history_path].table[history_index] + self._private_cur_pos = #self.command + 2 + elseif history_index > 1 then + history_index = history_index - 1 + + self.command = data.history[self.history_path].table[history_index] + self._private_cur_pos = #self.command + 2 + else + self.command = "" + self._private_cur_pos = 1 + end + end + end + elseif mod.Mod1 or mod.Mod3 then + if key == "b" then + self._private_cur_pos = cword_start(self.command, self._private_cur_pos) + elseif key == "f" then + self._private_cur_pos = cword_end(self.command, self._private_cur_pos) + elseif key == "d" then + self.command = self.command:sub(1, self._private_cur_pos - 1) .. self.command:sub(cword_end(self.command, self._private_cur_pos)) + elseif key == "BackSpace" then + local wstart = cword_start(self.command, self._private_cur_pos) + self.command = self.command:sub(1, wstart - 1) .. self.command:sub(self._private_cur_pos) + self._private_cur_pos = wstart + end + else + if self.completion_callback then + if key == "Tab" or key == "ISO_Left_Tab" then + if key == "ISO_Left_Tab" or mod.Shift then + if ncomp == 1 then return end + if ncomp == 2 then + self.command = command_before_comp + self.textbox:set_font(self.font) + self.textbox:set_markup(prompt_text_with_cursor{ + text = command_before_comp, text_color = self.fg_cursor, cursor_color = self.bg_cursor, + cursor_pos = self._private_cur_pos, cursor_ul = self.ul_cursor, select_all = self.select_all, + prompt = self.prompt }) + self._private_cur_pos = cur_pos_before_comp + ncomp = 1 + return + end + + ncomp = ncomp - 2 + elseif ncomp == 1 then + command_before_comp = self.command + cur_pos_before_comp = self._private_cur_pos + end + local matches + self.command, self._private_cur_pos, matches = self.completion_callback(command_before_comp, cur_pos_before_comp, ncomp) + ncomp = ncomp + 1 + key = "" + -- execute if only one match found and autoexec flag set + if matches and #matches == 1 and args.autoexec then + exec(self, self.exe_callback) + return + end + elseif key ~= "Shift_L" and key ~= "Shift_R" then + ncomp = 1 + end + end + + -- Typin cases + if mod.Shift and key == "Insert" then + local selection = capi.selection() + if selection then + -- Remove \n + local n = selection:find("\n") + if n then + selection = selection:sub(1, n - 1) + end + self.command = self.command:sub(1, self._private_cur_pos - 1) .. selection .. self.command:sub(self._private_cur_pos) + self._private_cur_pos = self._private_cur_pos + #selection + end + elseif key == "Home" then + self._private_cur_pos = 1 + elseif key == "End" then + self._private_cur_pos = #self.command + 1 + elseif key == "BackSpace" then + if self._private_cur_pos > 1 then + local offset = 0 + if have_multibyte_char_at(self.command, self._private_cur_pos - 1) then + offset = 1 + end + self.command = self.command:sub(1, self._private_cur_pos - 2 - offset) .. self.command:sub(self._private_cur_pos) + self._private_cur_pos = self._private_cur_pos - 1 - offset + end + elseif key == "Delete" then + self.command = self.command:sub(1, self._private_cur_pos - 1) .. self.command:sub(self._private_cur_pos + 1) + elseif key == "Left" then + self._private_cur_pos = self._private_cur_pos - 1 + elseif key == "Right" then + self._private_cur_pos = self._private_cur_pos + 1 + elseif key == "Prior" then + if history_index > 1 then + history_index = history_index - 1 + + self.command = data.history[self.history_path].table[history_index] + self._private_cur_pos = #self.command + 2 + end + elseif key == "Next" then + if history_index < history_items(self.history_path) then + history_index = history_index + 1 + + self.command = data.history[self.history_path].table[history_index] + self._private_cur_pos = #self.command + 2 + elseif history_index == history_items(self.history_path) then + history_index = history_index + 1 + + self.command = "" + self._private_cur_pos = 1 + end + else + -- wlen() is UTF-8 aware but #key is not, + -- so check that we have one UTF-8 char but advance the cursor of # position + if key:wlen() == 1 then + if self.select_all then self.command = "" end + self.command = self.command:sub(1, self._private_cur_pos - 1) .. key .. self.command:sub(self._private_cur_pos) + self._private_cur_pos = self._private_cur_pos + #key + end + end + if self._private_cur_pos < 1 then + self._private_cur_pos = 1 + elseif self._private_cur_pos > #self.command + 1 then + self._private_cur_pos = #self.command + 1 + end + self.select_all = nil + end + + update(self) + if self.changed_callback then + self.changed_callback(self.command) + end + end) +end + +function prompt:stop() + keygrabber.stop(self._private.grabber) + history_save(self.history_path) + if self.done_callback then self.done_callback() end + return false +end + +local function new(args) + args = args or {} + + args.command = args.text or "" + args.prompt = args.prompt or "" + args.text = args.text or "" + args.font = args.font or beautiful.prompt_font or beautiful.font + args.bg_cursor = args.bg_cursor or beautiful.prompt_bg_cursor or beautiful.bg_focus or "white" + args.fg_cursor = args.fg_cursor or beautiful.prompt_fg_cursor or beautiful.fg_focus or "black" + args.ul_cursor = args.ul_cursor or nil + args.reset_on_stop = args.reset_on_stop == nil and true or args.reset_on_stop + args.select_all = args.select_all or nil + args.highlighter = args.highlighter or nil + args.hooks = args.hooks or {} + args.keypressed_callback = args.keypressed_callback or nil + args.changed_callback = args.changed_callback or nil + args.done_callback = args.done_callback or nil + args.history_max = args.history_max or nil + args.history_path = args.history_path or nil + args.completion_callback = args.completion_callback or nil + args.exe_callback = args.exe_callback or nil + args.textbox = args.textbox or wibox.widget.textbox() + + -- Build the hook map + local hooks = {} + for _,v in ipairs(args.hooks) do + if #v == 3 then + local _,key,callback = unpack(v) + if type(callback) == "function" then + hooks[key] = hooks[key] or {} + hooks[key][#hooks[key]+1] = v + else + gdebug.print_warning("The hook's 3rd parameter has to be a function.") + end + else + gdebug.print_warning("The hook has to have 3 parameters.") + end + end + args.hooks = hooks + + local ret = gobject({}) + ret._private = {} + gtable.crush(ret, prompt) + gtable.crush(ret, args) + + return ret +end + +function prompt.mt:__call(...) + return new(...) +end + +return setmetatable(prompt, prompt.mt) \ No newline at end of file diff --git a/.config/awesome/bling/widget/init.lua b/.config/awesome/bling/widget/init.lua new file mode 100755 index 0000000..d3c6ebd --- /dev/null +++ b/.config/awesome/bling/widget/init.lua @@ -0,0 +1,7 @@ +return { + tag_preview = require(... .. ".tag_preview"), + task_preview = require(... .. ".task_preview"), + window_switcher = require(... .. ".window_switcher"), + tabbed_misc = require(... .. ".tabbed_misc"), + app_launcher = require(... .. ".app_launcher"), +} diff --git a/.config/awesome/bling/widget/tabbar/boxes.lua b/.config/awesome/bling/widget/tabbar/boxes.lua new file mode 100755 index 0000000..720f420 --- /dev/null +++ b/.config/awesome/bling/widget/tabbar/boxes.lua @@ -0,0 +1,57 @@ +local awful = require("awful") +local gears = require("gears") +local wibox = require("wibox") + +local beautiful = require("beautiful") + +local bg_normal = beautiful.tabbar_bg_normal or beautiful.bg_normal or "#ffffff" +local fg_normal = beautiful.tabbar_fg_normal or beautiful.fg_normal or "#000000" +local bg_focus = beautiful.tabbar_bg_focus or beautiful.bg_focus or "#000000" +local fg_focus = beautiful.tabbar_fg_focus or beautiful.fg_focus or "#ffffff" +local bg_focus_inactive = beautiful.tabbar_bg_focus_inactive or bg_focus +local fg_focus_inactive = beautiful.tabbar_fg_focus_inactive or fg_focus +local bg_normal_inactive = beautiful.tabbar_bg_normal_inactive or bg_normal +local fg_normal_inactive = beautiful.tabbar_fg_normal_inactive or fg_normal +local font = beautiful.tabbar_font or beautiful.font or "Hack 15" +local size = beautiful.tabbar_size or 40 +local position = beautiful.tabbar_position or "bottom" + +local function create(c, focused_bool, buttons, inactive_bool) + local bg_temp = inactive_bool and bg_normal_inactive or bg_normal + local fg_temp = inactive_bool and fg_normal_inactive or fg_normal + if focused_bool then + bg_temp = inactive_bool and bg_focus_inactive or bg_focus + fg_temp = inactive_bool and fg_focus_inactive or fg_focus + end + local wid_temp = wibox.widget({ + { + { + awful.widget.clienticon(c), + left = 10, + right = 10, + bottom = 10, + top = 10, + widget = wibox.container.margin(), + }, + widget = wibox.container.place(), + }, + buttons = buttons, + bg = bg_temp, + widget = wibox.container.background(), + }) + return wid_temp +end + +local layout = wibox.layout.fixed.horizontal +if position == "left" or position == "right" then + layout = wibox.layout.fixed.vertical +end + +return { + layout = layout, + create = create, + position = position, + size = size, + bg_normal = bg_normal, + bg_focus = bg_normal, +} diff --git a/.config/awesome/bling/widget/tabbar/default.lua b/.config/awesome/bling/widget/tabbar/default.lua new file mode 100755 index 0000000..ad6b0b1 --- /dev/null +++ b/.config/awesome/bling/widget/tabbar/default.lua @@ -0,0 +1,60 @@ +local gears = require("gears") +local wibox = require("wibox") + +local beautiful = require("beautiful") + +local bg_normal = beautiful.tabbar_bg_normal or beautiful.bg_normal or "#ffffff" +local fg_normal = beautiful.tabbar_fg_normal or beautiful.fg_normal or "#000000" +local bg_focus = beautiful.tabbar_bg_focus or beautiful.bg_focus or "#000000" +local fg_focus = beautiful.tabbar_fg_focus or beautiful.fg_focus or "#ffffff" +local bg_focus_inactive = beautiful.tabbar_bg_focus_inactive or bg_focus +local fg_focus_inactive = beautiful.tabbar_fg_focus_inactive or fg_focus +local bg_normal_inactive = beautiful.tabbar_bg_normal_inactive or bg_normal +local fg_normal_inactive = beautiful.tabbar_fg_normal_inactive or fg_normal +local font = beautiful.tabbar_font or beautiful.font or "Hack 15" +local size = beautiful.tabbar_size or 20 +local position = beautiful.tabbar_position or "top" + +local function create(c, focused_bool, buttons, inactive_bool) + local flexlist = wibox.layout.flex.horizontal() + local title_temp = c.name or c.class or "-" + local bg_temp = inactive_bool and bg_normal_inactive or bg_normal + local fg_temp = inactive_bool and fg_normal_inactive or fg_normal + if focused_bool then + bg_temp = inactive_bool and bg_focus_inactive or bg_focus + fg_temp = inactive_bool and fg_focus_inactive or fg_focus + end + local text_temp = wibox.widget.textbox() + text_temp.align = "center" + text_temp.valign = "center" + text_temp.font = font + text_temp.markup = "" + .. title_temp + .. "" + c:connect_signal("property::name", function(_) + local title_temp = c.name or c.class or "-" + text_temp.markup = "" + .. title_temp + .. "" + end) + local wid_temp = wibox.widget({ + text_temp, + buttons = buttons, + bg = bg_temp, + widget = wibox.container.background(), + }) + return wid_temp +end + +return { + layout = wibox.layout.flex.horizontal, + create = create, + position = position, + size = size, + bg_normal = bg_normal, + bg_focus = bg_focus, +} diff --git a/.config/awesome/bling/widget/tabbar/modern.lua b/.config/awesome/bling/widget/tabbar/modern.lua new file mode 100755 index 0000000..5f48066 --- /dev/null +++ b/.config/awesome/bling/widget/tabbar/modern.lua @@ -0,0 +1,271 @@ +local awful = require("awful") +local gears = require("gears") +local wibox = require("wibox") +local beautiful = require("beautiful") +local xresources = require("beautiful.xresources") +local dpi = xresources.apply_dpi +local helpers = require(tostring(...):match(".*bling") .. ".helpers") + +local bg_normal = beautiful.tabbar_bg_normal or beautiful.bg_normal or "#ffffff" +local fg_normal = beautiful.tabbar_fg_normal or beautiful.fg_normal or "#000000" +local bg_focus = beautiful.tabbar_bg_focus or beautiful.bg_focus or "#000000" +local fg_focus = beautiful.tabbar_fg_focus or beautiful.fg_focus or "#ffffff" +local bg_focus_inactive = beautiful.tabbar_bg_focus_inactive or bg_focus +local fg_focus_inactive = beautiful.tabbar_fg_focus_inactive or fg_focus +local bg_normal_inactive = beautiful.tabbar_bg_normal_inactive or bg_normal +local fg_normal_inactive = beautiful.tabbar_fg_normal_inactive or fg_normal +local font = beautiful.tabbar_font or beautiful.font or "Hack 15" +local size = beautiful.tabbar_size or dpi(40) +local border_radius = beautiful.mstab_border_radius + or beautiful.border_radius + or 6 +local position = beautiful.tabbar_position or "top" +local close_color = beautiful.tabbar_color_close + or beautiful.xcolor1 + or "#f9929b" +local min_color = beautiful.tabbar_color_min or beautiful.xcolor3 or "#fbdf90" +local float_color = beautiful.tabbar_color_float + or beautiful.xcolor5 + or "#ccaced" + +-- Helper to create buttons +local function create_title_button(c, color_focus, color_unfocus) + local tb_color = wibox.widget({ + wibox.widget.textbox(), + forced_width = dpi(8), + forced_height = dpi(8), + bg = color_focus, + shape = gears.shape.circle, + widget = wibox.container.background, + }) + + local tb = wibox.widget({ + tb_color, + width = dpi(25), + height = dpi(25), + strategy = "min", + layout = wibox.layout.constraint, + }) + + local function update() + if client.focus == c then + tb_color.bg = color_focus + else + tb_color.bg = color_unfocus + end + end + update() + c:connect_signal("focus", update) + c:connect_signal("unfocus", update) + + tb:connect_signal("mouse::enter", function() + tb_color.bg = color_focus .. "70" + end) + + tb:connect_signal("mouse::leave", function() + tb_color.bg = color_focus + end) + + tb.visible = true + return tb +end + +local function create(c, focused_bool, buttons, inactive_bool) + -- local flexlist = wibox.layout.flex.horizontal() + local title_temp = c.name or c.class or "-" + local bg_temp = inactive_bool and bg_normal_inactive or bg_normal + local fg_temp = inactive_bool and fg_normal_inactive or fg_normal + if focused_bool then + bg_temp = inactive_bool and bg_focus_inactive or bg_focus + fg_temp = inactive_bool and fg_focus_inactive or fg_focus + end + local text_temp = wibox.widget.textbox() + text_temp.align = "center" + text_temp.valign = "center" + text_temp.font = font + text_temp.markup = "" + .. title_temp + .. "" + c:connect_signal("property::name", function(_) + local title_temp = c.name or c.class or "-" + text_temp.markup = "" + .. title_temp + .. "" + end) + + local tab_content = wibox.widget({ + { + awful.widget.clienticon(c), + top = dpi(6), + left = dpi(15), + bottom = dpi(6), + widget = wibox.container.margin, + }, + text_temp, + nill, + expand = "none", + layout = wibox.layout.align.horizontal, + }) + + local close = create_title_button(c, close_color, bg_normal) + close:connect_signal("button::press", function() + c:kill() + end) + + local floating = create_title_button(c, float_color, bg_normal) + floating:connect_signal("button::press", function() + c.floating = not c.floating + end) + + local min = create_title_button(c, min_color, bg_normal) + min:connect_signal("button::press", function() + c.minimized = true + end) + + if focused_bool then + tab_content = wibox.widget({ + { + awful.widget.clienticon(c), + top = dpi(10), + left = dpi(15), + bottom = dpi(10), + widget = wibox.container.margin, + }, + text_temp, + { + { min, floating, close, layout = wibox.layout.fixed.horizontal }, + top = dpi(10), + right = dpi(10), + bottom = dpi(10), + widget = wibox.container.margin, + }, + expand = "none", + layout = wibox.layout.align.horizontal, + }) + end + + local main_content = nil + local left_shape = nil + local right_shape = nil + + if position == "top" then + main_content = wibox.widget({ + { + tab_content, + bg = bg_temp, + shape = helpers.shape.prrect( + border_radius, + true, + true, + false, + false + ), + widget = wibox.container.background, + }, + top = dpi(8), + widget = wibox.container.margin, + }) + + left_shape = helpers.shape.prrect( + border_radius, + false, + false, + true, + false + ) + right_shape = helpers.shape.prrect( + border_radius, + false, + false, + false, + true + ) + else + main_content = wibox.widget({ + { + tab_content, + bg = bg_temp, + shape = helpers.shape.prrect( + border_radius, + false, + false, + true, + true + ), + widget = wibox.container.background, + }, + bottom = dpi(8), + widget = wibox.container.margin, + }) + + left_shape = helpers.shape.prrect( + border_radius, + false, + true, + false, + false + ) + right_shape = helpers.shape.prrect( + border_radius, + true, + false, + false, + false + ) + end + + local wid_temp = wibox.widget({ + buttons = buttons, + { + { + { + wibox.widget.textbox(), + bg = bg_normal, + shape = left_shape, + widget = wibox.container.background, + }, + bg = bg_temp, + shape = gears.rectangle, + widget = wibox.container.background, + }, + width = border_radius + (border_radius / 2), + height = size, + strategy = "exact", + layout = wibox.layout.constraint, + }, + main_content, + { + { + { + wibox.widget.textbox(), + bg = bg_normal, + shape = right_shape, + widget = wibox.container.background, + }, + bg = bg_temp, + shape = gears.rectangle, + widget = wibox.container.background, + }, + width = border_radius + (border_radius / 2), + height = size, + strategy = "exact", + layout = wibox.layout.constraint, + }, + + layout = wibox.layout.align.horizontal, + }) + return wid_temp +end + +return { + layout = wibox.layout.flex.horizontal, + create = create, + position = position, + size = size, + bg_normal = bg_normal, + bg_focus = bg_focus, +} diff --git a/.config/awesome/bling/widget/tabbar/pure.lua b/.config/awesome/bling/widget/tabbar/pure.lua new file mode 100755 index 0000000..5be82e5 --- /dev/null +++ b/.config/awesome/bling/widget/tabbar/pure.lua @@ -0,0 +1,81 @@ +local awful = require("awful") +local gears = require("gears") +local wibox = require("wibox") +local gcolor = require("gears.color") +local beautiful = require("beautiful") + +local bg_normal = beautiful.tabbar_bg_normal or beautiful.bg_normal or "#ffffff" +local fg_normal = beautiful.tabbar_fg_normal or beautiful.fg_normal or "#000000" +local bg_focus = beautiful.tabbar_bg_focus or beautiful.bg_focus or "#000000" +local fg_focus = beautiful.tabbar_fg_focus or beautiful.fg_focus or "#ffffff" +local bg_focus_inactive = beautiful.tabbar_bg_focus_inactive or bg_focus +local fg_focus_inactive = beautiful.tabbar_fg_focus_inactive or fg_focus +local bg_normal_inactive = beautiful.tabbar_bg_normal_inactive or bg_normal +local fg_normal_inactive = beautiful.tabbar_fg_normal_inactive or fg_normal +local font = beautiful.tabbar_font or beautiful.font or "Hack 15" +local size = beautiful.tabbar_size or 20 +local position = beautiful.tabbar_position or "top" + +local function create(c, focused_bool, buttons, inactive_bool) + local bg_temp = inactive_bool and bg_normal_inactive or bg_normal + local fg_temp = inactive_bool and fg_normal_inactive or fg_normal + if focused_bool then + bg_temp = inactive_bool and bg_focus_inactive or bg_focus + fg_temp = inactive_bool and fg_focus_inactive or fg_focus + end + + local wid_temp = wibox.widget({ + { + { -- Left + wibox.widget.base.make_widget( + awful.titlebar.widget.iconwidget(c) + ), + buttons = buttons, + layout = wibox.layout.fixed.horizontal, + }, + { -- Title + wibox.widget.base.make_widget( + awful.titlebar.widget.titlewidget(c) + ), + buttons = buttons, + widget = wibox.container.place, + }, + { -- Right + focused_bool and wibox.widget.base.make_widget( + awful.titlebar.widget.floatingbutton(c) + ) or nil, + focused_bool and wibox.widget.base.make_widget( + awful.titlebar.widget.stickybutton(c) + ) or nil, + focused_bool and wibox.widget.base.make_widget( + awful.titlebar.widget.ontopbutton(c) + ) or nil, + focused_bool and wibox.widget.base.make_widget( + awful.titlebar.widget.maximizedbutton(c) + ) or nil, + focused_bool and wibox.widget.base.make_widget( + awful.titlebar.widget.minimizebutton(c) + ) or nil, + focused_bool and wibox.widget.base.make_widget( + awful.titlebar.widget.closebutton(c) + ) or nil, + layout = wibox.layout.fixed.horizontal, + }, + layout = wibox.layout.align.horizontal, + }, + bg = bg_temp, + fg = fg_temp, + widget = wibox.container.background, + }) + + return wid_temp +end + +return { + layout = wibox.layout.flex.horizontal, + create = create, + position = position, + size = size, + bg_normal = bg_normal, + bg_focus = bg_focus, +} diff --git a/.config/awesome/bling/widget/tabbed_misc/custom_tasklist.lua b/.config/awesome/bling/widget/tabbed_misc/custom_tasklist.lua new file mode 100755 index 0000000..ac22377 --- /dev/null +++ b/.config/awesome/bling/widget/tabbed_misc/custom_tasklist.lua @@ -0,0 +1,51 @@ +local wibox = require("wibox") +local awful = require("awful") +local gears = require("gears") +local beautiful = require("beautiful") +local dpi = require("beautiful.xresources").apply_dpi + +local function tabobj_support(self, c, index, clients) + -- Self is the background widget in this context + if not c.bling_tabbed and #c.bling_tabbed.clients > 1 then + return + end + + local group = c.bling_tabbed + + -- TODO: Allow customization here + local layout_v = wibox.widget { + vertical_spacing = dpi(2), + horizontal_spacing = dpi(2), + layout = wibox.layout.grid.horizontal, + forced_num_rows = 2, + forced_num_cols = 2, + homogeneous = true + } + + local wrapper = wibox.widget({ + layout_v, + id = "click_role", + widget = wibox.container.margin, + margins = dpi(5), + }) + + -- To get the ball rolling. + for idx, c in ipairs(group.clients) do + if not (c and c.icon) then goto skip end + + -- Add to the last layout + layout_v:add(wibox.widget { + { + widget = awful.widget.clienticon, + client = c + }, + widget = wibox.container.constraint, + width = dpi(24), + height = dpi(24) + }) + ::skip:: + end + self.widget = wrapper +end + +return tabobj_support diff --git a/.config/awesome/bling/widget/tabbed_misc/init.lua b/.config/awesome/bling/widget/tabbed_misc/init.lua new file mode 100755 index 0000000..1de3fbb --- /dev/null +++ b/.config/awesome/bling/widget/tabbed_misc/init.lua @@ -0,0 +1,9 @@ +return { + titlebar_indicator = require( + tostring(...):match(".*bling") + .. ".widget.tabbed_misc.titlebar_indicator" + ), + custom_tasklist = require( + tostring(...):match(".*bling") .. ".widget.tabbed_misc.custom_tasklist" + ), +} diff --git a/.config/awesome/bling/widget/tabbed_misc/titlebar_indicator.lua b/.config/awesome/bling/widget/tabbed_misc/titlebar_indicator.lua new file mode 100755 index 0000000..46959cd --- /dev/null +++ b/.config/awesome/bling/widget/tabbed_misc/titlebar_indicator.lua @@ -0,0 +1,133 @@ +local wibox = require("wibox") +local awful = require("awful") +local gears = require("gears") +local beautiful = require("beautiful") +local dpi = require("beautiful.xresources").apply_dpi +local tabbed_module = require( + tostring(...):match(".*bling") .. ".module.tabbed" +) + +-- Just check if a table contains a value. +local function tbl_contains(tbl, item) + for _, v in ipairs(tbl) do + if v == item then + return true + end + end + return false +end + +-- Needs to be run, every time a new titlbear is created +return function(c, opts) + -- Args & Fallback -- Widget templates are in their original loactions + opts = gears.table.crush({ + layout_spacing = dpi(4), + icon_size = dpi(20), + icon_margin = dpi(4), + bg_color_focus = "#ff0000", + bg_color = "#00000000", + fg_color = "#fafafa", + fg_color_focus = "#e0e0e0", + icon_shape = function(cr, w, h) + gears.shape.rounded_rect(cr, w, h, 0) + end, + layout = wibox.layout.fixed.horizontal, + }, gears.table.join( + opts, + beautiful.bling_tabbed_misc_titlebar_indicator + )) + + -- Container to store icons + local tabbed_icons = wibox.widget({ + layout = opts.layout, + spacing = opts.layout_spacing, + }) + + awesome.connect_signal("bling::tabbed::client_removed", function(_, removed_c) + -- Remove from list + for idx, icon in ipairs(tabbed_icons.children) do + if icon._client == removed_c then + tabbed_icons:remove(idx) + end + end + + -- Empty list + if removed_c == c then + tabbed_icons:reset() + end + end) + + local function recreate(group) + if tbl_contains(group.clients, c) then + tabbed_icons:reset() + local focused = group.clients[group.focused_idx] + + -- Autohide? + if #group.clients == 1 then + return + end + + for idx, client in ipairs(group.clients) do + local widget = wibox.widget( + opts.widget_template or { + { + { + { + id = "icon_role", + forced_width = opts.icon_size, + forced_height = opts.icon_size, + widget = awful.widget.clienticon, + }, + margins = opts.icon_margin, + widget = wibox.container.margin, + }, + shape = opts.icon_shape, + id = "bg_role", + widget = wibox.container.background, + }, + halign = "center", + valign = "center", + widget = wibox.container.place, + }) + + widget._client = client + + -- No creation call back since this would be called on creation & every time the widget updated. + if opts.widget_template and opts.widget_template.update_callback then + opts.widget_template.update_callback(widget, client, group) + end + + -- Add icons & etc + for _, w in ipairs(widget:get_children_by_id("icon_role")) do + -- TODO: Allow fallback icon? + w.image = client.icon + w.client = client + end + + for _, w in ipairs(widget:get_children_by_id("bg_role")) do + w:add_button(awful.button({}, 1, function() + tabbed_module.switch_to(group, idx) + end)) + if client == focused then + w.bg = opts.bg_color_focus + w.fg = opts.fg_color_focus + else + w.bg = opts.bg_color + w.fg = opts.fg_color + end + end + + for _, w in ipairs(widget:get_children_by_id("text_role")) do + w.text = client.name + end + + tabbed_icons:add(widget) + end + end + end + + awesome.connect_signal("bling::tabbed::client_added", recreate) + awesome.connect_signal("bling::tabbed::changed_focus", recreate) + + return tabbed_icons +end diff --git a/.config/awesome/bling/widget/tag_preview.lua b/.config/awesome/bling/widget/tag_preview.lua new file mode 100755 index 0000000..2a181b4 --- /dev/null +++ b/.config/awesome/bling/widget/tag_preview.lua @@ -0,0 +1,246 @@ +-- +-- Provides: +-- bling::tag_preview::update -- first line is the signal +-- t (tag) -- indented lines are function parameters +-- bling::tag_preview::visibility +-- s (screen) +-- v (boolean) +-- +local awful = require("awful") +local wibox = require("wibox") +local helpers = require(tostring(...):match(".*bling") .. ".helpers") +local gears = require("gears") +local beautiful = require("beautiful") +local dpi = beautiful.xresources.apply_dpi +local cairo = require("lgi").cairo + +local function draw_widget( + t, + tag_preview_image, + scale, + screen_radius, + client_radius, + client_opacity, + client_bg, + client_border_color, + client_border_width, + widget_bg, + widget_border_color, + widget_border_width, + geo, + margin, + background_image +) + local client_list = wibox.layout.manual() + client_list.forced_height = geo.height + client_list.forced_width = geo.width + local tag_screen = t.screen + for i, c in ipairs(t:clients()) do + if not c.hidden and not c.minimized then + + + local img_box = wibox.widget ({ + resize = true, + forced_height = 100 * scale, + forced_width = 100 * scale, + widget = wibox.widget.imagebox, + }) + + -- If fails to set image, fallback to a awesome icon + if not pcall(function() img_box.image = gears.surface.load(c.icon) end) then + img_box.image = beautiful.theme_assets.awesome_icon (24, "#222222", "#fafafa") + end + + if tag_preview_image then + if c.prev_content or t.selected then + local content + if t.selected then + content = gears.surface(c.content) + else + content = gears.surface(c.prev_content) + end + local cr = cairo.Context(content) + local x, y, w, h = cr:clip_extents() + local img = cairo.ImageSurface.create( + cairo.Format.ARGB32, + w - x, + h - y + ) + cr = cairo.Context(img) + cr:set_source_surface(content, 0, 0) + cr.operator = cairo.Operator.SOURCE + cr:paint() + + img_box = wibox.widget({ + image = gears.surface.load(img), + resize = true, + opacity = client_opacity, + forced_height = math.floor(c.height * scale), + forced_width = math.floor(c.width * scale), + widget = wibox.widget.imagebox, + }) + end + end + + local client_box = wibox.widget({ + { + nil, + { + nil, + img_box, + nil, + expand = "outside", + layout = wibox.layout.align.horizontal, + }, + nil, + expand = "outside", + widget = wibox.layout.align.vertical, + }, + forced_height = math.floor(c.height * scale), + forced_width = math.floor(c.width * scale), + bg = client_bg, + shape_border_color = client_border_color, + shape_border_width = client_border_width, + shape = helpers.shape.rrect(client_radius), + widget = wibox.container.background, + }) + + client_box.point = { + x = math.floor((c.x - geo.x) * scale), + y = math.floor((c.y - geo.y) * scale), + } + + client_list:add(client_box) + end + end + + return wibox.widget { + { + background_image, + { + { + { + { + client_list, + forced_height = geo.height, + forced_width = geo.width, + widget = wibox.container.place, + }, + layout = wibox.layout.align.horizontal, + }, + layout = wibox.layout.align.vertical, + }, + margins = margin, + widget = wibox.container.margin, + }, + layout = wibox.layout.stack + }, + bg = widget_bg, + shape_border_width = widget_border_width, + shape_border_color = widget_border_color, + shape = helpers.shape.rrect(screen_radius), + widget = wibox.container.background, + } +end + +local enable = function(opts) + local opts = opts or {} + + local tag_preview_image = opts.show_client_content or false + local widget_x = opts.x or dpi(20) + local widget_y = opts.y or dpi(20) + local scale = opts.scale or 0.2 + local work_area = opts.honor_workarea or false + local padding = opts.honor_padding or false + local placement_fn = opts.placement_fn or nil + local background_image = opts.background_widget or nil + + local margin = beautiful.tag_preview_widget_margin or dpi(0) + local screen_radius = beautiful.tag_preview_widget_border_radius or dpi(0) + local client_radius = beautiful.tag_preview_client_border_radius or dpi(0) + local client_opacity = beautiful.tag_preview_client_opacity or 0.5 + local client_bg = beautiful.tag_preview_client_bg or "#000000" + local client_border_color = beautiful.tag_preview_client_border_color + or "#ffffff" + local client_border_width = beautiful.tag_preview_client_border_width + or dpi(3) + local widget_bg = beautiful.tag_preview_widget_bg or "#000000" + local widget_border_color = beautiful.tag_preview_widget_border_color + or "#ffffff" + local widget_border_width = beautiful.tag_preview_widget_border_width + or dpi(3) + + local tag_preview_box = awful.popup({ + type = "dropdown_menu", + visible = false, + ontop = true, + placement = placement_fn, + widget = wibox.container.background, + input_passthrough = true, + bg = "#00000000", + }) + + tag.connect_signal("property::selected", function(t) + -- Awesome switches up tags on startup really fast it seems, probably depends on what rules you have set + -- which can cause the c.content to not show the correct image + gears.timer + { + timeout = 0.1, + call_now = false, + autostart = true, + single_shot = true, + callback = function() + if t.selected == true then + for _, c in ipairs(t:clients()) do + c.prev_content = gears.surface.duplicate_surface(c.content) + end + end + end + } + end) + + awesome.connect_signal("bling::tag_preview::update", function(t) + local geo = t.screen:get_bounding_geometry({ + honor_padding = padding, + honor_workarea = work_area, + }) + + tag_preview_box.maximum_width = scale * geo.width + margin * 2 + tag_preview_box.maximum_height = scale * geo.height + margin * 2 + + + tag_preview_box.widget = draw_widget( + t, + tag_preview_image, + scale, + screen_radius, + client_radius, + client_opacity, + client_bg, + client_border_color, + client_border_width, + widget_bg, + widget_border_color, + widget_border_width, + geo, + margin, + background_image + ) + end) + + awesome.connect_signal("bling::tag_preview::visibility", function(s, v) + if not placement_fn then + tag_preview_box.x = s.geometry.x + widget_x + tag_preview_box.y = s.geometry.y + widget_y + end + + if v == false then + tag_preview_box.widget = nil + collectgarbage("collect") + end + + tag_preview_box.visible = v + end) +end + +return {enable = enable, draw_widget = draw_widget} diff --git a/.config/awesome/bling/widget/task_preview.lua b/.config/awesome/bling/widget/task_preview.lua new file mode 100755 index 0000000..3b54867 --- /dev/null +++ b/.config/awesome/bling/widget/task_preview.lua @@ -0,0 +1,199 @@ +-- +-- Provides: +-- bling::task_preview::visibility +-- s (screen) +-- v (boolean) +-- c (client) +-- +local awful = require("awful") +local wibox = require("wibox") +local helpers = require(tostring(...):match(".*bling") .. ".helpers") +local gears = require("gears") +local beautiful = require("beautiful") +local dpi = beautiful.xresources.apply_dpi +local cairo = require("lgi").cairo + +-- TODO: rename structure to something better? +local function draw_widget( + c, + widget_template, + screen_radius, + widget_bg, + widget_border_color, + widget_border_width, + margin, + widget_width, + widget_height +) + if not pcall(function() + return type(c.content) + end) then + return + end + + local content = nil + if c.active then + content = gears.surface(c.content) + elseif c.prev_content then + content = gears.surface(c.prev_content) + end + + local img = nil + if content ~= nil then + local cr = cairo.Context(content) + local x, y, w, h = cr:clip_extents() + img = cairo.ImageSurface.create(cairo.Format.ARGB32, w - x, h - y) + cr = cairo.Context(img) + cr:set_source_surface(content, 0, 0) + cr.operator = cairo.Operator.SOURCE + cr:paint() + end + + local widget = wibox.widget({ + (widget_template or { + { + { + { + { + id = "icon_role", + resize = true, + forced_height = dpi(20), + forced_width = dpi(20), + widget = wibox.widget.imagebox, + }, + { + { + id = "name_role", + align = "center", + widget = wibox.widget.textbox, + }, + left = dpi(4), + right = dpi(4), + widget = wibox.container.margin, + }, + layout = wibox.layout.align.horizontal, + }, + { + { + { + id = "image_role", + resize = true, + clip_shape = helpers.shape.rrect(screen_radius), + widget = wibox.widget.imagebox, + }, + valign = "center", + halign = "center", + widget = wibox.container.place, + }, + top = margin * 0.25, + widget = wibox.container.margin, + }, + fill_space = true, + layout = wibox.layout.fixed.vertical, + }, + margins = margin, + widget = wibox.container.margin, + }, + bg = widget_bg, + shape_border_width = widget_border_width, + shape_border_color = widget_border_color, + shape = helpers.shape.rrect(screen_radius), + widget = wibox.container.background, + }), + width = widget_width, + height = widget_height, + widget = wibox.container.constraint, + }) + + -- TODO: have something like a create callback here? + + for _, w in ipairs(widget:get_children_by_id("image_role")) do + w.image = img -- TODO: copy it with gears.surface.xxx or something + end + + for _, w in ipairs(widget:get_children_by_id("name_role")) do + w.text = c.name + end + + for _, w in ipairs(widget:get_children_by_id("icon_role")) do + w.image = c.icon -- TODO: detect clienticon + end + + return widget +end + +local enable = function(opts) + local opts = opts or {} + + local widget_x = opts.x or dpi(20) + local widget_y = opts.y or dpi(20) + local widget_height = opts.height or dpi(200) + local widget_width = opts.width or dpi(200) + local placement_fn = opts.placement_fn or nil + + local margin = beautiful.task_preview_widget_margin or dpi(0) + local screen_radius = beautiful.task_preview_widget_border_radius or dpi(0) + local widget_bg = beautiful.task_preview_widget_bg or "#000000" + local widget_border_color = beautiful.task_preview_widget_border_color + or "#ffffff" + local widget_border_width = beautiful.task_preview_widget_border_width + or dpi(3) + + local task_preview_box = awful.popup({ + type = "dropdown_menu", + visible = false, + ontop = true, + placement = placement_fn, + widget = wibox.container.background, -- A dummy widget to make awful.popup not scream + input_passthrough = true, + bg = "#00000000", + }) + + tag.connect_signal("property::selected", function(t) + -- Awesome switches up tags on startup really fast it seems, probably depends on what rules you have set + -- which can cause the c.content to not show the correct image + gears.timer + { + timeout = 0.1, + call_now = false, + autostart = true, + single_shot = true, + callback = function() + if t.selected == true then + for _, c in ipairs(t:clients()) do + c.prev_content = gears.surface.duplicate_surface(c.content) + end + end + end + } + end) + + awesome.connect_signal("bling::task_preview::visibility", function(s, v, c) + if v then + -- Update task preview contents + task_preview_box.widget = draw_widget( + c, + opts.structure, + screen_radius, + widget_bg, + widget_border_color, + widget_border_width, + margin, + widget_width, + widget_height + ) + else + task_preview_box.widget = nil + collectgarbage("collect") + end + + if not placement_fn then + task_preview_box.x = s.geometry.x + widget_x + task_preview_box.y = s.geometry.y + widget_y + end + + task_preview_box.visible = v + end) +end + +return { enable = enable, draw_widget = draw_widget } diff --git a/.config/awesome/bling/widget/window_switcher.lua b/.config/awesome/bling/widget/window_switcher.lua new file mode 100755 index 0000000..97dbeb1 --- /dev/null +++ b/.config/awesome/bling/widget/window_switcher.lua @@ -0,0 +1,461 @@ +local cairo = require("lgi").cairo +local awful = require("awful") +local gears = require("gears") +local wibox = require("wibox") +local beautiful = require("beautiful") +local helpers = require(tostring(...):match(".*bling") .. ".helpers") +local dpi = beautiful.xresources.apply_dpi + +local window_switcher_first_client -- The client that was focused when the window_switcher was activated +local window_switcher_minimized_clients = {} -- The clients that were minimized when the window switcher was activated +local window_switcher_grabber + +local get_num_clients = function() + local minimized_clients_in_tag = 0 + local matcher = function(c) + return awful.rules.match( + c, + { + minimized = true, + skip_taskbar = false, + hidden = false, + first_tag = awful.screen.focused().selected_tag, + } + ) + end + for c in awful.client.iterate(matcher) do + minimized_clients_in_tag = minimized_clients_in_tag + 1 + end + return minimized_clients_in_tag + #awful.screen.focused().clients +end + +local window_switcher_hide = function(window_switcher_box) + -- Add currently focused client to history + if client.focus then + local window_switcher_last_client = client.focus + awful.client.focus.history.add(window_switcher_last_client) + -- Raise client that was focused originally + -- Then raise last focused client + if + window_switcher_first_client and window_switcher_first_client.valid + then + window_switcher_first_client:raise() + window_switcher_last_client:raise() + end + end + + -- Minimize originally minimized clients + local s = awful.screen.focused() + for _, c in pairs(window_switcher_minimized_clients) do + if c and c.valid and not (client.focus and client.focus == c) then + c.minimized = true + end + end + -- Reset helper table + window_switcher_minimized_clients = {} + + -- Resume recording focus history + awful.client.focus.history.enable_tracking() + -- Stop and hide window_switcher + awful.keygrabber.stop(window_switcher_grabber) + window_switcher_box.visible = false + window_switcher_box.widget = nil + collectgarbage("collect") +end + +local function draw_widget( + type, + background, + border_width, + border_radius, + border_color, + clients_spacing, + client_icon_horizontal_spacing, + client_width, + client_height, + client_margins, + thumbnail_margins, + thumbnail_scale, + name_margins, + name_valign, + name_forced_width, + name_font, + name_normal_color, + name_focus_color, + icon_valign, + icon_width, + mouse_keys, + filterClients +) + filterClients = filterClients or awful.widget.tasklist.filter.currenttags + local tasklist_widget = type == "thumbnail" + and awful.widget.tasklist({ + screen = awful.screen.focused(), + filter = filterClients, + buttons = mouse_keys, + style = { + font = name_font, + fg_normal = name_normal_color, + fg_focus = name_focus_color, + }, + layout = { + layout = wibox.layout.flex.horizontal, + spacing = clients_spacing, + }, + widget_template = { + widget = wibox.container.background, + id = "bg_role", + forced_width = client_width, + forced_height = client_height, + create_callback = function(self, c, _, __) + local content = gears.surface(c.content) + local cr = cairo.Context(content) + local x, y, w, h = cr:clip_extents() + local img = cairo.ImageSurface.create( + cairo.Format.ARGB32, + w - x, + h - y + ) + cr = cairo.Context(img) + cr:set_source_surface(content, 0, 0) + cr.operator = cairo.Operator.SOURCE + cr:paint() + self:get_children_by_id("thumbnail")[1].image = + gears.surface.load( + img + ) + end, + { + { + { + horizontal_fit_policy = thumbnail_scale == true + and "fit" + or "auto", + vertical_fit_policy = thumbnail_scale == true + and "fit" + or "auto", + id = "thumbnail", + widget = wibox.widget.imagebox, + }, + margins = thumbnail_margins, + widget = wibox.container.margin, + }, + { + { + { + id = "icon_role", + widget = wibox.widget.imagebox, + }, + forced_width = icon_width, + valign = icon_valign, + widget = wibox.container.place, + }, + { + { + forced_width = name_forced_width, + valign = name_valign, + id = "text_role", + widget = wibox.widget.textbox, + }, + margins = name_margins, + widget = wibox.container.margin, + }, + spacing = client_icon_horizontal_spacing, + layout = wibox.layout.fixed.horizontal, + }, + layout = wibox.layout.flex.vertical, + }, + }, + }) + or awful.widget.tasklist({ + screen = awful.screen.focused(), + filter = filterClients, + buttons = mouse_keys, + style = { + font = name_font, + fg_normal = name_normal_color, + fg_focus = name_focus_color, + }, + layout = { + layout = wibox.layout.fixed.vertical, + spacing = clients_spacing, + }, + widget_template = { + widget = wibox.container.background, + id = "bg_role", + forced_width = client_width, + forced_height = client_height, + { + { + { + id = "icon_role", + widget = wibox.widget.imagebox, + }, + forced_width = icon_width, + valign = icon_valign, + widget = wibox.container.place, + }, + { + { + forced_width = name_forced_width, + valign = name_valign, + id = "text_role", + widget = wibox.widget.textbox, + }, + margins = name_margins, + widget = wibox.container.margin, + }, + spacing = client_icon_horizontal_spacing, + layout = wibox.layout.fixed.horizontal, + }, + }, + }) + + return wibox.widget({ + { + tasklist_widget, + margins = client_margins, + widget = wibox.container.margin, + }, + shape_border_width = border_width, + shape_border_color = border_color, + bg = background, + shape = helpers.shape.rrect(border_radius), + widget = wibox.container.background, + }) +end + +local enable = function(opts) + local opts = opts or {} + + local type = opts.type or "thumbnail" + local background = beautiful.window_switcher_widget_bg or "#000000" + local border_width = beautiful.window_switcher_widget_border_width or dpi(3) + local border_radius = beautiful.window_switcher_widget_border_radius + or dpi(0) + local border_color = beautiful.window_switcher_widget_border_color + or "#ffffff" + local clients_spacing = beautiful.window_switcher_clients_spacing or dpi(20) + local client_icon_horizontal_spacing = beautiful.window_switcher_client_icon_horizontal_spacing + or dpi(5) + local client_width = beautiful.window_switcher_client_width + or dpi(type == "thumbnail" and 150 or 500) + local client_height = beautiful.window_switcher_client_height + or dpi(type == "thumbnail" and 250 or 50) + local client_margins = beautiful.window_switcher_client_margins or dpi(10) + local thumbnail_margins = beautiful.window_switcher_thumbnail_margins + or dpi(5) + local thumbnail_scale = beautiful.thumbnail_scale or false + local name_margins = beautiful.window_switcher_name_margins or dpi(10) + local name_valign = beautiful.window_switcher_name_valign or "center" + local name_forced_width = beautiful.window_switcher_name_forced_width + or dpi(type == "thumbnail" and 200 or 550) + local name_font = beautiful.window_switcher_name_font or beautiful.font + local name_normal_color = beautiful.window_switcher_name_normal_color + or "#FFFFFF" + local name_focus_color = beautiful.window_switcher_name_focus_color + or "#FF0000" + local icon_valign = beautiful.window_switcher_icon_valign or "center" + local icon_width = beautiful.window_switcher_icon_width or dpi(40) + + local hide_window_switcher_key = opts.hide_window_switcher_key or "Escape" + + local select_client_key = opts.select_client_key or 1 + local minimize_key = opts.minimize_key or "n" + local unminimize_key = opts.unminimize_key or "N" + local kill_client_key = opts.kill_client_key or "q" + + local cycle_key = opts.cycle_key or "Tab" + + local previous_key = opts.previous_key or "Left" + local next_key = opts.next_key or "Right" + + local vim_previous_key = opts.vim_previous_key or "h" + local vim_next_key = opts.vim_next_key or "l" + + local scroll_previous_key = opts.scroll_previous_key or 4 + local scroll_next_key = opts.scroll_next_key or 5 + + local cycleClientsByIdx = opts.cycleClientsByIdx or awful.client.focus.byidx + local filterClients = opts.filterClients or awful.widget.tasklist.filter.currenttags + + local window_switcher_box = awful.popup({ + bg = "#00000000", + visible = false, + ontop = true, + placement = awful.placement.centered, + screen = awful.screen.focused(), + widget = wibox.container.background, -- A dummy widget to make awful.popup not scream + widget = { + { + draw_widget(), + margins = client_margins, + widget = wibox.container.margin, + }, + shape_border_width = border_width, + shape_border_color = border_color, + bg = background, + shape = helpers.shape.rrect(border_radius), + widget = wibox.container.background, + }, + }) + + local mouse_keys = gears.table.join( + awful.button({ + modifiers = { "Any" }, + button = select_client_key, + on_press = function(c) + client.focus = c + end, + }), + + awful.button({ + modifiers = { "Any" }, + button = scroll_previous_key, + on_press = function() + cycleClientsByIdx(-1) + end, + }), + + awful.button({ + modifiers = { "Any" }, + button = scroll_next_key, + on_press = function() + cycleClientsByIdx(1) + end, + }) + ) + + local keyboard_keys = { + [hide_window_switcher_key] = function() + window_switcher_hide(window_switcher_box) + end, + + [minimize_key] = function() + if client.focus then + client.focus.minimized = true + end + end, + [unminimize_key] = function() + if awful.client.restore() then + client.focus = awful.client.restore() + end + end, + [kill_client_key] = function() + if client.focus then + client.focus:kill() + end + end, + + [cycle_key] = function() + cycleClientsByIdx(1) + end, + + [previous_key] = function() + cycleClientsByIdx(1) + end, + [next_key] = function() + cycleClientsByIdx(-1) + end, + + [vim_previous_key] = function() + cycleClientsByIdx(1) + end, + [vim_next_key] = function() + cycleClientsByIdx(-1) + end, + } + + window_switcher_box:connect_signal("property::width", function() + if window_switcher_box.visible and get_num_clients() == 0 then + window_switcher_hide(window_switcher_box) + end + end) + + window_switcher_box:connect_signal("property::height", function() + if window_switcher_box.visible and get_num_clients() == 0 then + window_switcher_hide(window_switcher_box) + end + end) + + awesome.connect_signal("bling::window_switcher::turn_on", function() + local number_of_clients = get_num_clients() + if number_of_clients == 0 then + return + end + + -- Store client that is focused in a variable + window_switcher_first_client = client.focus + + -- Stop recording focus history + awful.client.focus.history.disable_tracking() + + -- Go to previously focused client (in the tag) + awful.client.focus.history.previous() + + -- Track minimized clients + -- Unminimize them + -- Lower them so that they are always below other + -- originally unminimized windows + local clients = awful.screen.focused().selected_tag:clients() + for _, c in pairs(clients) do + if c.minimized then + table.insert(window_switcher_minimized_clients, c) + c.minimized = false + c:lower() + end + end + + -- Start the keygrabber + window_switcher_grabber = awful.keygrabber.run(function(_, key, event) + if event == "release" then + -- Hide if the modifier was released + -- We try to match Super or Alt or Control since we do not know which keybind is + -- used to activate the window switcher (the keybind is set by the user in keys.lua) + if + key:match("Super") + or key:match("Alt") + or key:match("Control") + then + window_switcher_hide(window_switcher_box) + end + -- Do nothing + return + end + + -- Run function attached to key, if it exists + if keyboard_keys[key] then + keyboard_keys[key]() + end + end) + + window_switcher_box.widget = draw_widget( + type, + background, + border_width, + border_radius, + border_color, + clients_spacing, + client_icon_horizontal_spacing, + client_width, + client_height, + client_margins, + thumbnail_margins, + thumbnail_scale, + name_margins, + name_valign, + name_forced_width, + name_font, + name_normal_color, + name_focus_color, + icon_valign, + icon_width, + mouse_keys, + filterClients + ) + window_switcher_box.screen = awful.screen.focused() + window_switcher_box.visible = true + end) +end + +return { enable = enable } diff --git a/.config/awesome/freedesktop/LICENSE b/.config/awesome/freedesktop/LICENSE new file mode 100755 index 0000000..23cb790 --- /dev/null +++ b/.config/awesome/freedesktop/LICENSE @@ -0,0 +1,339 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Lesser General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + {description} + Copyright (C) {year} {fullname} + + 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, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + {signature of Ty Coon}, 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. diff --git a/.config/awesome/freedesktop/README.rst b/.config/awesome/freedesktop/README.rst new file mode 100755 index 0000000..16ca579 --- /dev/null +++ b/.config/awesome/freedesktop/README.rst @@ -0,0 +1,51 @@ +Awesome-Freedesktop +=================== + +------------------------------------------------------------------- +Freedesktop.org menu and desktop icons support for Awesome WM 4.x +------------------------------------------------------------------- + +:First author: Antonio Terceiro +:Maintainer: Luca CPZ +:Version: git +:License: GNU-GPL2_ +:Source: https://github.com/lcpz/awesome-freedesktop + +Description +----------- + +A port of awesome-freedesktop_ to Awesome_ 4.x. + +See branches_ for previous versions. + +Since the introduction of Menubar_ as a core library to provide Freedesktop.org +functionalities in Awesome, we can now avoid the dirty work by simply exploiting +``menubar.utils``. + +At the moment, the menu is complete, while the desktop icons are rather simple. Our goal +is to add the following features: + +- A better way to handle desktop icons path. +- Ability to drag and line up icons. +- Event-based signals, in particular: + - Updating trash icon according to its status. + - Dynamic update (no need to restart Awesome to see changes on the desktop). + +Screenshot +---------- + +.. image:: screenshot.png + :align: center + :alt: Showcase of Freedesktop.org support in Awesome, using Adwaita icons + +Installation and usage +---------------------- + +Read the wiki_. + +.. _GNU-GPL2: http://www.gnu.org/licenses/gpl-2.0.html +.. _awesome-freedesktop: https://github.com/terceiro/awesome-freedesktop +.. _Awesome: https://github.com/awesomeWM/awesome +.. _branches: https://github.com/lcpz/awesome-freedesktop/branches +.. _Menubar: https://github.com/awesomeWM/awesome/tree/master/lib/menubar +.. _wiki: https://github.com/lcpz/awesome-freedesktop/wiki diff --git a/.config/awesome/freedesktop/awesome-freedesktop-scm-1.rockspec b/.config/awesome/freedesktop/awesome-freedesktop-scm-1.rockspec new file mode 100755 index 0000000..0dde608 --- /dev/null +++ b/.config/awesome/freedesktop/awesome-freedesktop-scm-1.rockspec @@ -0,0 +1,19 @@ +package = "awesome-freedesktop" +version = "scm-1" +source = { + url = "git+https://github.com/lcpz/awesome-freedesktop.git", + tag = "master", +} +description = { + summary = "Freedesktop.org menu and desktop icons support for Awesome WM", + homepage = "https://github.com/lcpz/awesome-freedesktop", + license = "GPL-2.0" +} +dependencies = { + "lua >= 5.3", +} +supported_platforms = { "linux" } +build = { + type = "builtin", + modules = { freedesktop = "init.lua" } +} diff --git a/.config/awesome/freedesktop/desktop.lua b/.config/awesome/freedesktop/desktop.lua new file mode 100755 index 0000000..676ebdb --- /dev/null +++ b/.config/awesome/freedesktop/desktop.lua @@ -0,0 +1,259 @@ +--[[ + + Awesome-Freedesktop + Freedesktop.org compliant desktop entries and menu + + Desktop section + + Licensed under GNU General Public License v2 + * (c) 2016, Luke Bonham + * (c) 2009-2015, Antonio Terceiro + +--]] + +local awful = require("awful") +local theme = require("beautiful") +local utils = require("menubar.utils") +local wibox = require("wibox") + +local io = io +local ipairs = ipairs +local mouse = mouse +local os = os +local string = string +local screen = screen +local table = table + +-- Desktop icons +-- freedesktop.desktop +local desktop = { + -- Default desktop basic icons + baseicons = { + [1] = { + label = "This PC", + icon = "computer", + onclick = "computer://" + }, + [2] = { + label = "Home", + icon = "user-home", + onclick = os.getenv("HOME") + }, + [3] = { + label = "Trash", + icon = "user-trash", + onclick = "trash://" + } + }, + -- Default parameters + iconsize = { width = 48, height = 48 }, + labelsize = { width = 140, height = 20 }, + margin = { x = 20, y = 20 }, +} + +-- MIME types list +local mime_types = {} + +-- Icons positioning +desktop.current_pos = {} + +-- @return iterator on input pipe +local function pipelines(...) + local f = assert(io.popen(...)) + return function () + local data = f:read() + if data == nil then f:close() end + return data + end +end + +-- Adds an icon to desktop +-- @param args settings from desktop.add_icons +-- @param label icon string label +-- @param icon icon string file path +-- @param onclick function to execute on click +function desktop.add_single_icon(args, label, icon, onclick) + local s = args.screen + local dcp = desktop.current_pos + + -- define icon dimensions and position + if not dcp[s] then + dcp[s] = { x = (screen[s].geometry.x + args.iconsize.width + args.margin.x), y = screen[s].geometry.y + 20 + args.margin.y } + end + + local tot_height = (icon and args.iconsize.height or 0) + (label and args.labelsize.height or 0) + if tot_height == 0 then return end + + if dcp[s].y + tot_height > screen[s].geometry.y + screen[s].geometry.height - 20 - args.margin.y then + dcp[s].x = dcp[s].x + args.labelsize.width + args.iconsize.width + args.margin.x + dcp[s].y = 20 + args.margin.y + end + + local common = { screen = s, bg = "#00000000", visible = true, type = "desktop" } + + -- create icon container + if icon then + common.width = args.iconsize.width + common.height = args.iconsize.height + common.x = dcp[s].x + common.y = dcp[s].y + + icon = wibox.widget { + image = icon, + resize = false, + widget = wibox.widget.imagebox + } + + icon:buttons(awful.button({ }, 1, nil, onclick)) + + icon_container = wibox(common) + icon_container:set_widget(icon) + + dcp[s].y = dcp[s].y + args.iconsize.height + 5 + end + + -- create label container + if label then + common.width = args.labelsize.width + common.height = args.labelsize.height + common.x = dcp[s].x - (args.labelsize.width/2) + args.iconsize.width/2 + common.y = dcp[s].y + + caption = wibox.widget { + text = label, + align = "center", + forced_width = common.width, + forced_height = common.height, + ellipsize = "middle", + widget = wibox.widget.textbox + } + + caption:buttons(awful.button({ }, 1, onclick)) + caption_container = wibox(common) + caption_container:set_widget(caption) + end + + dcp[s].y = dcp[s].y + args.labelsize.height + args.margin.y + + desktop.current_pos = dcp + + return dcp +end + +-- Adds base icons (This PC, Trash, etc) to desktop +-- @param args settings from desktop.add_icons +function desktop.add_base_icons(args) + for _,base in ipairs(args.baseicons) do + desktop.add_single_icon(args, base.label, utils.lookup_icon(base.icon), function() + awful.spawn(string.format("%s '%s'", args.open_with, base.onclick)) + end) + end +end + +-- Looks up a suitable icon for filename +-- @param filename string file name +-- @return icon file path (string) +function desktop.lookup_file_icon(filename) + -- load system MIME types + if #mime_types == 0 then + for line in io.lines("/etc/mime.types") do + if not line:find("^#") then + local parsed = {} + for w in line:gmatch("[^%s]+") do + table.insert(parsed, w) + end + if #parsed > 1 then + for i = 2, #parsed do + mime_types[parsed[i]] = parsed[1]:gsub("/", "-") + end + end + end + end + end + + -- try to search a possible icon among standards + local extension = filename:match("%a+$") + local mime = mime_types[extension] or "" + local mime_family = mime:match("^%a+") or "" + + local possible_filenames = { + mime, "gnome-mime-" .. mime, + mime_family, "gnome-mime-" .. mime_family, + extension + } + + for i, filename in ipairs(possible_filenames) do + local icon = utils.lookup_icon(filename) + if icon then return icon end + end + + -- if we don"t find ad icon, then pretend is a plain text file + return utils.lookup_icon("text-x-generic") +end + +-- Parse subdirectories and files list from input directory +-- @input dir directory to parse (string) +-- @return files table with found entries +function desktop.parse_dirs_and_files(dir) + local files = {} + local paths = pipelines('find '..dir..' -maxdepth 1 -type d |sort|tail -n +1') + for path in paths do + if path:match("[^/]+$") then + local file = {} + file.filename = path:match("[^/]+$") + file.path = path + file.show = true + file.icon = utils.lookup_icon("folder") + table.insert(files, file) + end + end + local paths = pipelines('find '..dir..' -maxdepth 1 -type f') + for path in paths do + if not path:find("%.desktop$") then + local file = {} + file.filename = path:match("[^/]+$") + file.path = path + file.show = true + file.icon = desktop.lookup_file_icon(file.filename) + table.insert(files, file) + end + end + return files +end + +-- Adds subdirectories and files icons from args.dir +-- @param args settings from desktop.add_icons +function desktop.add_dirs_and_files_icons(args) + for _, file in ipairs(desktop.parse_dirs_and_files(args.dir)) do + if file.show then + local label = args.showlabels and file.filename or nil + local onclick = function () awful.spawn(string.format("%s '%s'", args.open_with, file.path)) end + desktop.add_single_icon(args, label, file.icon, onclick) + end + end +end + +-- Main function, adds base, directory and files icons +-- @param args user defined settings, with fallback on defaults +function desktop.add_icons(args) + args = args or {} + args.screen = args.screen or mouse.screen + args.dir = args.dir or os.getenv("HOME") .. "/Desktop" + args.showlabels = args.showlabel or true + args.open_with = args.open_with or "xdg_open" + args.baseicons = args.baseicons or desktop.baseicons + args.iconsize = args.iconsize or desktop.iconsize + args.labelsize = args.labelsize or desktop.labelsize + args.margin = args.margin or desktop.margin + + -- trying to fallback on Adwaita if theme.icon_theme is not defined + -- if Adwaita is missing too, no icons will be shown + if not theme.icon_theme then + theme.icon_theme = args.icon_theme or "Adwaita" + end + + desktop.add_base_icons(args) + desktop.add_dirs_and_files_icons(args) +end + +return desktop diff --git a/.config/awesome/freedesktop/init.lua b/.config/awesome/freedesktop/init.lua new file mode 100755 index 0000000..9350b44 --- /dev/null +++ b/.config/awesome/freedesktop/init.lua @@ -0,0 +1,15 @@ +--[[ + + Awesome-Freedesktop + Freedesktop.org compliant desktop entries and menu + + Licensed under GNU General Public License v2 + * (c) 2016, Luke Bonham + * (c) 2009-2015, Antonio Terceiro + +--]] + +return { + desktop = require("freedesktop.desktop"), + menu = require("freedesktop.menu") +} diff --git a/.config/awesome/freedesktop/menu.lua b/.config/awesome/freedesktop/menu.lua new file mode 100755 index 0000000..fed6e6b --- /dev/null +++ b/.config/awesome/freedesktop/menu.lua @@ -0,0 +1,121 @@ + +--[[ + + Awesome-Freedesktop + Freedesktop.org compliant desktop entries and menu + + Menu section + + Licensed under GNU General Public License v2 + * (c) 2016, Luke Bonham + * (c) 2014, Harvey Mittens + +--]] + +local Gio = require("lgi").Gio +local awful_menu = require("awful.menu") +local menu_gen = require("menubar.menu_gen") +local menu_utils = require("menubar.utils") + +local io, pairs, string, table, os = io, pairs, string, table, os + +-- Expecting a wm_name of awesome omits too many applications and tools +menu_utils.wm_name = "" + +-- Menu +-- freedesktop.menu +local menu = {} + +-- Check if a path is a directory. +-- @tparam string path The directory path +-- @treturn boolean True if path exists and is a directory +function menu.is_dir(path) + return Gio.File.new_for_path(path):query_file_type({}) == "DIRECTORY" +end + +-- Remove non existent paths in order to avoid issues +local existent_paths = {} +for k,v in pairs(menu_gen.all_menu_dirs) do + if menu.is_dir(v) then + table.insert(existent_paths, v) + end +end +menu_gen.all_menu_dirs = existent_paths + +-- Determines whether an table includes a certain element +-- @param tab a given table +-- @param val the element to search for +-- @return true if the given string is found within the search table; otherwise, false if not +function menu.has_value (tab, val) + for index, value in pairs(tab) do + if val:find(value) then + return true + end + end + return false +end + +-- Use MenuBar parsing utils to build a menu for Awesome +-- @return awful.menu +function menu.build(args) + local args = args or {} + local before = args.before or {} + local after = args.after or {} + local skip_items = args.skip_items or {} + local sub_menu = args.sub_menu or false + + local result = {} + local _menu = awful_menu({ items = before }) + + menu_gen.generate(function(entries) + -- Add category icons + for k, v in pairs(menu_gen.all_categories) do + table.insert(result, { k, {}, v.icon }) + end + + -- Get items table + for k, v in pairs(entries) do + for _, cat in pairs(result) do + if cat[1] == v.category then + if not menu.has_value(skip_items, v.name) then + table.insert(cat[2], { v.name, v.cmdline, v.icon }) + end + break + end + end + end + + -- Cleanup things a bit + for i = #result, 1, -1 do + local v = result[i] + if #v[2] == 0 then + -- Remove unused categories + table.remove(result, i) + else + --Sort entries alphabetically (by name) + table.sort(v[2], function (a, b) return string.byte(a[1]) < string.byte(b[1]) end) + -- Replace category name with nice name + v[1] = menu_gen.all_categories[v[1]].name + end + end + + -- Sort categories alphabetically also + table.sort(result, function(a, b) return string.byte(a[1]) < string.byte(b[1]) end) + + -- Add menu item to hold the generated menu + if sub_menu then + result = {{sub_menu, result}} + end + + -- Add items to menu + for _, v in pairs(result) do _menu:add(v) end + for _, v in pairs(after) do _menu:add(v) end + end) + + -- Hold the menu in the module + menu.menu = _menu + + return _menu +end + +return menu diff --git a/.config/awesome/freedesktop/screenshot.png b/.config/awesome/freedesktop/screenshot.png new file mode 100755 index 0000000..bf254ac Binary files /dev/null and b/.config/awesome/freedesktop/screenshot.png differ diff --git a/.config/awesome/lain/.github/workflows/main.yml b/.config/awesome/lain/.github/workflows/main.yml new file mode 100755 index 0000000..37957f6 --- /dev/null +++ b/.config/awesome/lain/.github/workflows/main.yml @@ -0,0 +1,17 @@ +name: Lain + +on: [push] + +permissions: + contents: read + +jobs: + linting: + runs-on: ubuntu-latest + steps: + - run: echo "Running tests triggered by a ${{ github.event_name }} event." + - run: echo "Testing ${{ github.ref }} from ${{ github.repository }} on ${{ runner.os }}" + - name: Check out code + uses: actions/checkout@v3 + - name: Run tests + uses: lunarmodules/luacheck@v0 diff --git a/.config/awesome/lain/.gitmodules b/.config/awesome/lain/.gitmodules new file mode 100755 index 0000000..d95bcb5 --- /dev/null +++ b/.config/awesome/lain/.gitmodules @@ -0,0 +1,3 @@ +[submodule "lain.wiki"] + path = wiki + url = https://github.com/lcpz/lain.wiki.git diff --git a/.config/awesome/lain/.luacheckrc b/.config/awesome/lain/.luacheckrc new file mode 100755 index 0000000..9944223 --- /dev/null +++ b/.config/awesome/lain/.luacheckrc @@ -0,0 +1,27 @@ +-- Only allow symbols available in all Lua versions +std = "min" + +allow_defined = true +max_line_length = false +cache = true + +-- Global objects defined by the C code +read_globals = { + "awesome", + "mousegrabber", + "table.unpack", + "unpack", + "utf8" +} + +globals = { + "client", + "mouse", + "root", + "screen" +} + +-- https://luacheck.readthedocs.io/en/stable/warnings.html +ignore = { + "131" +} diff --git a/.config/awesome/lain/ISSUE_TEMPLATE.md b/.config/awesome/lain/ISSUE_TEMPLATE.md new file mode 100755 index 0000000..e9dcc0b --- /dev/null +++ b/.config/awesome/lain/ISSUE_TEMPLATE.md @@ -0,0 +1,33 @@ +# Please, read me! + +So that I can help you quickly and without having to redirect you here. + +# If you have an issue + +**Please read the [wiki](https://github.com/lcpz/lain/wiki) and search the [Issues section](https://github.com/lcpz/lain/issues) first.** + +If you can't find a solution there, then go ahead and provide: + +* output of `awesome -v` and `lua -v` +* expected behavior and actual behavior +* steps to reproduce the problem +* X error log + +# How to provide X error log + +There are two ways: + +* (Physically) Restart X like this: + ```shell + startx -- -keeptty -nolisten tcp > $HOME/.xorg.log 2>&1 + ``` + the error log will be output into `$HOME/.xorg.log`. + +* (Virtually) Use [Xephyr](https://wikipedia.org/wiki/Xephyr): + ```shell + # set screen size as you like + Xephyr :1 -screen 1280x800 2> stdout.txt & DISPLAY=:1 awesome + ``` + the error log will be output in the file `stdout.txt`. + +Before reporting, read the log and see if you can solve it yourself. diff --git a/.config/awesome/lain/LICENSE b/.config/awesome/lain/LICENSE new file mode 100755 index 0000000..23cb790 --- /dev/null +++ b/.config/awesome/lain/LICENSE @@ -0,0 +1,339 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Lesser General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + {description} + Copyright (C) {year} {fullname} + + 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, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + {signature of Ty Coon}, 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. diff --git a/.config/awesome/lain/README.rst b/.config/awesome/lain/README.rst new file mode 100755 index 0000000..616c7cd --- /dev/null +++ b/.config/awesome/lain/README.rst @@ -0,0 +1,40 @@ +Lain +==== + +.. image:: https://github.com/lcpz/lain/actions/workflows/main.yml/badge.svg + +------------------------------------------------- +Layouts, widgets and utilities for Awesome WM 4.x +------------------------------------------------- + +:Author: Luca CPZ +:Version: git +:License: GNU-GPL2_ +:Source: https://github.com/lcpz/lain + +Description +----------- + +Successor of awesome-vain_, this module provides alternative layouts, asynchronous widgets and utility functions for Awesome_. + +Contributions +------------- + +Constructive criticism and suggestions are welcome. + +If you want to create a pull request, make sure that: + +- Your code fits with the general style of the module. In particular, you should use the same indentation pattern that the code uses, and also avoid adding space at the ends of lines. + +- Your code its easy to understand, maintainable, and modularized. You should also avoid code duplication wherever possible by adding functions to or using lain.helpers_. If something is unclear, or you can not write it in such a way that it will be clear, explain it with a comment. + +- You test your changes before submitting to make sure that your code works and does not break other parts of the module. + +- You update ``wiki`` submodule with a thorough section, if necessary. + +Contributed widgets have to be put in ``widget/contrib``. + +.. _GNU-GPL2: http://www.gnu.org/licenses/gpl-2.0.html +.. _awesome-vain: https://github.com/vain/awesome-vain +.. _Awesome: https://github.com/awesomeWM/awesome +.. _lain.helpers: https://github.com/lcpz/lain/blob/master/helpers.lua diff --git a/.config/awesome/lain/helpers.lua b/.config/awesome/lain/helpers.lua new file mode 100755 index 0000000..ef9e08b --- /dev/null +++ b/.config/awesome/lain/helpers.lua @@ -0,0 +1,203 @@ +--[[ + + Licensed under GNU General Public License v2 + * (c) 2013, Luca CPZ + +--]] + +local spawn = require("awful.spawn") +local timer = require("gears.timer") +local debug = require("debug") +local io = { lines = io.lines, + open = io.open } +local pairs = pairs +local rawget = rawget +local tsort = table.sort +local unpack = unpack or table.unpack -- lua 5.1 retro-compatibility + +-- Lain helper functions for internal use +-- lain.helpers +local helpers = {} + +helpers.lain_dir = debug.getinfo(1, 'S').source:match[[^@(.*/).*$]] +helpers.icons_dir = helpers.lain_dir .. 'icons/' +helpers.scripts_dir = helpers.lain_dir .. 'scripts/' + +-- {{{ Modules loader + +function helpers.wrequire(t, k) + return rawget(t, k) or require(t._NAME .. '.' .. k) +end + +-- }}} + +-- {{{ File operations + +-- check if the file exists and is readable +function helpers.file_exists(path) + local file = io.open(path, "rb") + if file then file:close() end + return file ~= nil +end + +-- get a table with all lines from a file +function helpers.lines_from(path) + local lines = {} + for line in io.lines(path) do + lines[#lines + 1] = line + end + return lines +end + +-- get a table with all lines from a file matching regexp +function helpers.lines_match(regexp, path) + local lines = {} + for line in io.lines(path) do + if string.match(line, regexp) then + lines[#lines + 1] = line + end + end + return lines +end + +-- get first line of a file +function helpers.first_line(path) + local file, first = io.open(path, "rb"), nil + if file then + first = file:read("*l") + file:close() + end + return first +end + +-- get first non empty line from a file +function helpers.first_nonempty_line(path) + for line in io.lines(path) do + if #line then return line end + end + return nil +end + +-- }}} + +-- {{{ Timer maker + +helpers.timer_table = {} + +function helpers.newtimer(name, timeout, fun, nostart, stoppable) + if not name or #name == 0 then return end + name = (stoppable and name) or timeout + if not helpers.timer_table[name] then + helpers.timer_table[name] = timer({ timeout = timeout }) + helpers.timer_table[name]:start() + end + helpers.timer_table[name]:connect_signal("timeout", fun) + if not nostart then + helpers.timer_table[name]:emit_signal("timeout") + end + return stoppable and helpers.timer_table[name] +end + +-- }}} + +-- {{{ Pipe operations + +-- run a command and execute a function on its output (asynchronous pipe) +-- @param cmd the input command +-- @param callback function to execute on cmd output +-- @return cmd PID +function helpers.async(cmd, callback) + return spawn.easy_async(cmd, + function (stdout, _, _, exit_code) + callback(stdout, exit_code) + end) +end + +-- like above, but call spawn.easy_async with a shell +function helpers.async_with_shell(cmd, callback) + return spawn.easy_async_with_shell(cmd, + function (stdout, _, _, exit_code) + callback(stdout, exit_code) + end) +end + +-- run a command and execute a function on its output line by line +function helpers.line_callback(cmd, callback) + return spawn.with_line_callback(cmd, { + stdout = function (line) + callback(line) + end, + }) +end + +-- }}} + +-- {{{ A map utility + +helpers.map_table = {} + +function helpers.set_map(element, value) + helpers.map_table[element] = value +end + +function helpers.get_map(element) + return helpers.map_table[element] +end + +-- }}} + +-- {{{ Misc + +-- check if an element exist on a table +function helpers.element_in_table(element, tbl) + for _, i in pairs(tbl) do + if i == element then + return true + end + end + return false +end + +-- iterate over table of records sorted by keys +function helpers.spairs(t) + -- collect the keys + local keys = {} + for k in pairs(t) do keys[#keys+1] = k end + + tsort(keys) + + -- return the iterator function + local i = 0 + return function() + i = i + 1 + if keys[i] then + return keys[i], t[keys[i]] + end + end +end + +-- create the partition of singletons of a given set +-- example: the trivial partition set of {a, b, c}, is {{a}, {b}, {c}} +function helpers.trivial_partition_set(set) + local ss = {} + for _,e in pairs(set) do + ss[#ss+1] = {e} + end + return ss +end + +-- create the powerset of a given set +function helpers.powerset(s) + if not s then return {} end + local t = {{}} + for i = 1, #s do + for j = 1, #t do + t[#t+1] = {s[i],unpack(t[j])} + end + end + return t +end + +-- }}} + +return helpers diff --git a/.config/awesome/lain/icons/cal/black/1.png b/.config/awesome/lain/icons/cal/black/1.png new file mode 100755 index 0000000..d2fb62e Binary files /dev/null and b/.config/awesome/lain/icons/cal/black/1.png differ diff --git a/.config/awesome/lain/icons/cal/black/10.png b/.config/awesome/lain/icons/cal/black/10.png new file mode 100755 index 0000000..507b079 Binary files /dev/null and b/.config/awesome/lain/icons/cal/black/10.png differ diff --git a/.config/awesome/lain/icons/cal/black/11.png b/.config/awesome/lain/icons/cal/black/11.png new file mode 100755 index 0000000..336141b Binary files /dev/null and b/.config/awesome/lain/icons/cal/black/11.png differ diff --git a/.config/awesome/lain/icons/cal/black/12.png b/.config/awesome/lain/icons/cal/black/12.png new file mode 100755 index 0000000..c589729 Binary files /dev/null and b/.config/awesome/lain/icons/cal/black/12.png differ diff --git a/.config/awesome/lain/icons/cal/black/13.png b/.config/awesome/lain/icons/cal/black/13.png new file mode 100755 index 0000000..377518b Binary files /dev/null and b/.config/awesome/lain/icons/cal/black/13.png differ diff --git a/.config/awesome/lain/icons/cal/black/14.png b/.config/awesome/lain/icons/cal/black/14.png new file mode 100755 index 0000000..6f4a9fe Binary files /dev/null and b/.config/awesome/lain/icons/cal/black/14.png differ diff --git a/.config/awesome/lain/icons/cal/black/15.png b/.config/awesome/lain/icons/cal/black/15.png new file mode 100755 index 0000000..1a271c1 Binary files /dev/null and b/.config/awesome/lain/icons/cal/black/15.png differ diff --git a/.config/awesome/lain/icons/cal/black/16.png b/.config/awesome/lain/icons/cal/black/16.png new file mode 100755 index 0000000..5e65835 Binary files /dev/null and b/.config/awesome/lain/icons/cal/black/16.png differ diff --git a/.config/awesome/lain/icons/cal/black/17.png b/.config/awesome/lain/icons/cal/black/17.png new file mode 100755 index 0000000..f3fa0a9 Binary files /dev/null and b/.config/awesome/lain/icons/cal/black/17.png differ diff --git a/.config/awesome/lain/icons/cal/black/18.png b/.config/awesome/lain/icons/cal/black/18.png new file mode 100755 index 0000000..7acb37a Binary files /dev/null and b/.config/awesome/lain/icons/cal/black/18.png differ diff --git a/.config/awesome/lain/icons/cal/black/19.png b/.config/awesome/lain/icons/cal/black/19.png new file mode 100755 index 0000000..a557957 Binary files /dev/null and b/.config/awesome/lain/icons/cal/black/19.png differ diff --git a/.config/awesome/lain/icons/cal/black/2.png b/.config/awesome/lain/icons/cal/black/2.png new file mode 100755 index 0000000..17b33e0 Binary files /dev/null and b/.config/awesome/lain/icons/cal/black/2.png differ diff --git a/.config/awesome/lain/icons/cal/black/20.png b/.config/awesome/lain/icons/cal/black/20.png new file mode 100755 index 0000000..558d111 Binary files /dev/null and b/.config/awesome/lain/icons/cal/black/20.png differ diff --git a/.config/awesome/lain/icons/cal/black/21.png b/.config/awesome/lain/icons/cal/black/21.png new file mode 100755 index 0000000..0bbedc8 Binary files /dev/null and b/.config/awesome/lain/icons/cal/black/21.png differ diff --git a/.config/awesome/lain/icons/cal/black/22.png b/.config/awesome/lain/icons/cal/black/22.png new file mode 100755 index 0000000..762d262 Binary files /dev/null and b/.config/awesome/lain/icons/cal/black/22.png differ diff --git a/.config/awesome/lain/icons/cal/black/23.png b/.config/awesome/lain/icons/cal/black/23.png new file mode 100755 index 0000000..a39dcee Binary files /dev/null and b/.config/awesome/lain/icons/cal/black/23.png differ diff --git a/.config/awesome/lain/icons/cal/black/24.png b/.config/awesome/lain/icons/cal/black/24.png new file mode 100755 index 0000000..c00dbca Binary files /dev/null and b/.config/awesome/lain/icons/cal/black/24.png differ diff --git a/.config/awesome/lain/icons/cal/black/25.png b/.config/awesome/lain/icons/cal/black/25.png new file mode 100755 index 0000000..dc9243c Binary files /dev/null and b/.config/awesome/lain/icons/cal/black/25.png differ diff --git a/.config/awesome/lain/icons/cal/black/26.png b/.config/awesome/lain/icons/cal/black/26.png new file mode 100755 index 0000000..50bb182 Binary files /dev/null and b/.config/awesome/lain/icons/cal/black/26.png differ diff --git a/.config/awesome/lain/icons/cal/black/27.png b/.config/awesome/lain/icons/cal/black/27.png new file mode 100755 index 0000000..0fbf9fc Binary files /dev/null and b/.config/awesome/lain/icons/cal/black/27.png differ diff --git a/.config/awesome/lain/icons/cal/black/28.png b/.config/awesome/lain/icons/cal/black/28.png new file mode 100755 index 0000000..def6ab2 Binary files /dev/null and b/.config/awesome/lain/icons/cal/black/28.png differ diff --git a/.config/awesome/lain/icons/cal/black/29.png b/.config/awesome/lain/icons/cal/black/29.png new file mode 100755 index 0000000..531923c Binary files /dev/null and b/.config/awesome/lain/icons/cal/black/29.png differ diff --git a/.config/awesome/lain/icons/cal/black/3.png b/.config/awesome/lain/icons/cal/black/3.png new file mode 100755 index 0000000..98b552d Binary files /dev/null and b/.config/awesome/lain/icons/cal/black/3.png differ diff --git a/.config/awesome/lain/icons/cal/black/30.png b/.config/awesome/lain/icons/cal/black/30.png new file mode 100755 index 0000000..ca58151 Binary files /dev/null and b/.config/awesome/lain/icons/cal/black/30.png differ diff --git a/.config/awesome/lain/icons/cal/black/31.png b/.config/awesome/lain/icons/cal/black/31.png new file mode 100755 index 0000000..6e8da21 Binary files /dev/null and b/.config/awesome/lain/icons/cal/black/31.png differ diff --git a/.config/awesome/lain/icons/cal/black/4.png b/.config/awesome/lain/icons/cal/black/4.png new file mode 100755 index 0000000..4335979 Binary files /dev/null and b/.config/awesome/lain/icons/cal/black/4.png differ diff --git a/.config/awesome/lain/icons/cal/black/5.png b/.config/awesome/lain/icons/cal/black/5.png new file mode 100755 index 0000000..576ec11 Binary files /dev/null and b/.config/awesome/lain/icons/cal/black/5.png differ diff --git a/.config/awesome/lain/icons/cal/black/6.png b/.config/awesome/lain/icons/cal/black/6.png new file mode 100755 index 0000000..56fa8ab Binary files /dev/null and b/.config/awesome/lain/icons/cal/black/6.png differ diff --git a/.config/awesome/lain/icons/cal/black/7.png b/.config/awesome/lain/icons/cal/black/7.png new file mode 100755 index 0000000..7c90b3a Binary files /dev/null and b/.config/awesome/lain/icons/cal/black/7.png differ diff --git a/.config/awesome/lain/icons/cal/black/8.png b/.config/awesome/lain/icons/cal/black/8.png new file mode 100755 index 0000000..9d1f28e Binary files /dev/null and b/.config/awesome/lain/icons/cal/black/8.png differ diff --git a/.config/awesome/lain/icons/cal/black/9.png b/.config/awesome/lain/icons/cal/black/9.png new file mode 100755 index 0000000..00d0933 Binary files /dev/null and b/.config/awesome/lain/icons/cal/black/9.png differ diff --git a/.config/awesome/lain/icons/cal/white/1.png b/.config/awesome/lain/icons/cal/white/1.png new file mode 100755 index 0000000..a0faa20 Binary files /dev/null and b/.config/awesome/lain/icons/cal/white/1.png differ diff --git a/.config/awesome/lain/icons/cal/white/10.png b/.config/awesome/lain/icons/cal/white/10.png new file mode 100755 index 0000000..7d9343b Binary files /dev/null and b/.config/awesome/lain/icons/cal/white/10.png differ diff --git a/.config/awesome/lain/icons/cal/white/11.png b/.config/awesome/lain/icons/cal/white/11.png new file mode 100755 index 0000000..7af5e99 Binary files /dev/null and b/.config/awesome/lain/icons/cal/white/11.png differ diff --git a/.config/awesome/lain/icons/cal/white/12.png b/.config/awesome/lain/icons/cal/white/12.png new file mode 100755 index 0000000..b164f85 Binary files /dev/null and b/.config/awesome/lain/icons/cal/white/12.png differ diff --git a/.config/awesome/lain/icons/cal/white/13.png b/.config/awesome/lain/icons/cal/white/13.png new file mode 100755 index 0000000..fef74f3 Binary files /dev/null and b/.config/awesome/lain/icons/cal/white/13.png differ diff --git a/.config/awesome/lain/icons/cal/white/14.png b/.config/awesome/lain/icons/cal/white/14.png new file mode 100755 index 0000000..d747a6b Binary files /dev/null and b/.config/awesome/lain/icons/cal/white/14.png differ diff --git a/.config/awesome/lain/icons/cal/white/15.png b/.config/awesome/lain/icons/cal/white/15.png new file mode 100755 index 0000000..64418a6 Binary files /dev/null and b/.config/awesome/lain/icons/cal/white/15.png differ diff --git a/.config/awesome/lain/icons/cal/white/16.png b/.config/awesome/lain/icons/cal/white/16.png new file mode 100755 index 0000000..8b86700 Binary files /dev/null and b/.config/awesome/lain/icons/cal/white/16.png differ diff --git a/.config/awesome/lain/icons/cal/white/17.png b/.config/awesome/lain/icons/cal/white/17.png new file mode 100755 index 0000000..033b5ff Binary files /dev/null and b/.config/awesome/lain/icons/cal/white/17.png differ diff --git a/.config/awesome/lain/icons/cal/white/18.png b/.config/awesome/lain/icons/cal/white/18.png new file mode 100755 index 0000000..0cf1c24 Binary files /dev/null and b/.config/awesome/lain/icons/cal/white/18.png differ diff --git a/.config/awesome/lain/icons/cal/white/19.png b/.config/awesome/lain/icons/cal/white/19.png new file mode 100755 index 0000000..bfd3530 Binary files /dev/null and b/.config/awesome/lain/icons/cal/white/19.png differ diff --git a/.config/awesome/lain/icons/cal/white/2.png b/.config/awesome/lain/icons/cal/white/2.png new file mode 100755 index 0000000..e7f3fa4 Binary files /dev/null and b/.config/awesome/lain/icons/cal/white/2.png differ diff --git a/.config/awesome/lain/icons/cal/white/20.png b/.config/awesome/lain/icons/cal/white/20.png new file mode 100755 index 0000000..9a5a1fb Binary files /dev/null and b/.config/awesome/lain/icons/cal/white/20.png differ diff --git a/.config/awesome/lain/icons/cal/white/21.png b/.config/awesome/lain/icons/cal/white/21.png new file mode 100755 index 0000000..266ab9f Binary files /dev/null and b/.config/awesome/lain/icons/cal/white/21.png differ diff --git a/.config/awesome/lain/icons/cal/white/22.png b/.config/awesome/lain/icons/cal/white/22.png new file mode 100755 index 0000000..f486289 Binary files /dev/null and b/.config/awesome/lain/icons/cal/white/22.png differ diff --git a/.config/awesome/lain/icons/cal/white/23.png b/.config/awesome/lain/icons/cal/white/23.png new file mode 100755 index 0000000..244dceb Binary files /dev/null and b/.config/awesome/lain/icons/cal/white/23.png differ diff --git a/.config/awesome/lain/icons/cal/white/24.png b/.config/awesome/lain/icons/cal/white/24.png new file mode 100755 index 0000000..0ce1c75 Binary files /dev/null and b/.config/awesome/lain/icons/cal/white/24.png differ diff --git a/.config/awesome/lain/icons/cal/white/25.png b/.config/awesome/lain/icons/cal/white/25.png new file mode 100755 index 0000000..48d279c Binary files /dev/null and b/.config/awesome/lain/icons/cal/white/25.png differ diff --git a/.config/awesome/lain/icons/cal/white/26.png b/.config/awesome/lain/icons/cal/white/26.png new file mode 100755 index 0000000..7535855 Binary files /dev/null and b/.config/awesome/lain/icons/cal/white/26.png differ diff --git a/.config/awesome/lain/icons/cal/white/27.png b/.config/awesome/lain/icons/cal/white/27.png new file mode 100755 index 0000000..2aa9074 Binary files /dev/null and b/.config/awesome/lain/icons/cal/white/27.png differ diff --git a/.config/awesome/lain/icons/cal/white/28.png b/.config/awesome/lain/icons/cal/white/28.png new file mode 100755 index 0000000..0201976 Binary files /dev/null and b/.config/awesome/lain/icons/cal/white/28.png differ diff --git a/.config/awesome/lain/icons/cal/white/29.png b/.config/awesome/lain/icons/cal/white/29.png new file mode 100755 index 0000000..9305b9b Binary files /dev/null and b/.config/awesome/lain/icons/cal/white/29.png differ diff --git a/.config/awesome/lain/icons/cal/white/3.png b/.config/awesome/lain/icons/cal/white/3.png new file mode 100755 index 0000000..f1eb5de Binary files /dev/null and b/.config/awesome/lain/icons/cal/white/3.png differ diff --git a/.config/awesome/lain/icons/cal/white/30.png b/.config/awesome/lain/icons/cal/white/30.png new file mode 100755 index 0000000..1ba61aa Binary files /dev/null and b/.config/awesome/lain/icons/cal/white/30.png differ diff --git a/.config/awesome/lain/icons/cal/white/31.png b/.config/awesome/lain/icons/cal/white/31.png new file mode 100755 index 0000000..e9a873b Binary files /dev/null and b/.config/awesome/lain/icons/cal/white/31.png differ diff --git a/.config/awesome/lain/icons/cal/white/4.png b/.config/awesome/lain/icons/cal/white/4.png new file mode 100755 index 0000000..ee1ed6a Binary files /dev/null and b/.config/awesome/lain/icons/cal/white/4.png differ diff --git a/.config/awesome/lain/icons/cal/white/5.png b/.config/awesome/lain/icons/cal/white/5.png new file mode 100755 index 0000000..466aa71 Binary files /dev/null and b/.config/awesome/lain/icons/cal/white/5.png differ diff --git a/.config/awesome/lain/icons/cal/white/6.png b/.config/awesome/lain/icons/cal/white/6.png new file mode 100755 index 0000000..0a7bf4d Binary files /dev/null and b/.config/awesome/lain/icons/cal/white/6.png differ diff --git a/.config/awesome/lain/icons/cal/white/7.png b/.config/awesome/lain/icons/cal/white/7.png new file mode 100755 index 0000000..e971951 Binary files /dev/null and b/.config/awesome/lain/icons/cal/white/7.png differ diff --git a/.config/awesome/lain/icons/cal/white/8.png b/.config/awesome/lain/icons/cal/white/8.png new file mode 100755 index 0000000..cb03d0b Binary files /dev/null and b/.config/awesome/lain/icons/cal/white/8.png differ diff --git a/.config/awesome/lain/icons/cal/white/9.png b/.config/awesome/lain/icons/cal/white/9.png new file mode 100755 index 0000000..fca554a Binary files /dev/null and b/.config/awesome/lain/icons/cal/white/9.png differ diff --git a/.config/awesome/lain/icons/layout/default/cascade.png b/.config/awesome/lain/icons/layout/default/cascade.png new file mode 100755 index 0000000..292a057 Binary files /dev/null and b/.config/awesome/lain/icons/layout/default/cascade.png differ diff --git a/.config/awesome/lain/icons/layout/default/cascadetile.png b/.config/awesome/lain/icons/layout/default/cascadetile.png new file mode 100755 index 0000000..ba30f43 Binary files /dev/null and b/.config/awesome/lain/icons/layout/default/cascadetile.png differ diff --git a/.config/awesome/lain/icons/layout/default/cascadetilew.png b/.config/awesome/lain/icons/layout/default/cascadetilew.png new file mode 100755 index 0000000..d15eb70 Binary files /dev/null and b/.config/awesome/lain/icons/layout/default/cascadetilew.png differ diff --git a/.config/awesome/lain/icons/layout/default/cascadew.png b/.config/awesome/lain/icons/layout/default/cascadew.png new file mode 100755 index 0000000..da64bd6 Binary files /dev/null and b/.config/awesome/lain/icons/layout/default/cascadew.png differ diff --git a/.config/awesome/lain/icons/layout/default/centerfair.png b/.config/awesome/lain/icons/layout/default/centerfair.png new file mode 100755 index 0000000..188c243 Binary files /dev/null and b/.config/awesome/lain/icons/layout/default/centerfair.png differ diff --git a/.config/awesome/lain/icons/layout/default/centerfairw.png b/.config/awesome/lain/icons/layout/default/centerfairw.png new file mode 100755 index 0000000..ed4bcf5 Binary files /dev/null and b/.config/awesome/lain/icons/layout/default/centerfairw.png differ diff --git a/.config/awesome/lain/icons/layout/default/centerwork.png b/.config/awesome/lain/icons/layout/default/centerwork.png new file mode 100755 index 0000000..51e06bc Binary files /dev/null and b/.config/awesome/lain/icons/layout/default/centerwork.png differ diff --git a/.config/awesome/lain/icons/layout/default/centerworkh.png b/.config/awesome/lain/icons/layout/default/centerworkh.png new file mode 100755 index 0000000..c59092f Binary files /dev/null and b/.config/awesome/lain/icons/layout/default/centerworkh.png differ diff --git a/.config/awesome/lain/icons/layout/default/centerworkhw.png b/.config/awesome/lain/icons/layout/default/centerworkhw.png new file mode 100755 index 0000000..7820f8c Binary files /dev/null and b/.config/awesome/lain/icons/layout/default/centerworkhw.png differ diff --git a/.config/awesome/lain/icons/layout/default/centerworkw.png b/.config/awesome/lain/icons/layout/default/centerworkw.png new file mode 100755 index 0000000..85e6996 Binary files /dev/null and b/.config/awesome/lain/icons/layout/default/centerworkw.png differ diff --git a/.config/awesome/lain/icons/layout/default/termfair.png b/.config/awesome/lain/icons/layout/default/termfair.png new file mode 100755 index 0000000..06226c1 Binary files /dev/null and b/.config/awesome/lain/icons/layout/default/termfair.png differ diff --git a/.config/awesome/lain/icons/layout/default/termfairw.png b/.config/awesome/lain/icons/layout/default/termfairw.png new file mode 100755 index 0000000..0a8b576 Binary files /dev/null and b/.config/awesome/lain/icons/layout/default/termfairw.png differ diff --git a/.config/awesome/lain/icons/layout/zenburn/cascade.png b/.config/awesome/lain/icons/layout/zenburn/cascade.png new file mode 100755 index 0000000..fbe4fac Binary files /dev/null and b/.config/awesome/lain/icons/layout/zenburn/cascade.png differ diff --git a/.config/awesome/lain/icons/layout/zenburn/cascadetile.png b/.config/awesome/lain/icons/layout/zenburn/cascadetile.png new file mode 100755 index 0000000..2e03a80 Binary files /dev/null and b/.config/awesome/lain/icons/layout/zenburn/cascadetile.png differ diff --git a/.config/awesome/lain/icons/layout/zenburn/centerfair.png b/.config/awesome/lain/icons/layout/zenburn/centerfair.png new file mode 100755 index 0000000..75dc993 Binary files /dev/null and b/.config/awesome/lain/icons/layout/zenburn/centerfair.png differ diff --git a/.config/awesome/lain/icons/layout/zenburn/centerwork.png b/.config/awesome/lain/icons/layout/zenburn/centerwork.png new file mode 100755 index 0000000..af7a863 Binary files /dev/null and b/.config/awesome/lain/icons/layout/zenburn/centerwork.png differ diff --git a/.config/awesome/lain/icons/layout/zenburn/centerworkh.png b/.config/awesome/lain/icons/layout/zenburn/centerworkh.png new file mode 100755 index 0000000..88019b3 Binary files /dev/null and b/.config/awesome/lain/icons/layout/zenburn/centerworkh.png differ diff --git a/.config/awesome/lain/icons/layout/zenburn/termfair.png b/.config/awesome/lain/icons/layout/zenburn/termfair.png new file mode 100755 index 0000000..f7640b5 Binary files /dev/null and b/.config/awesome/lain/icons/layout/zenburn/termfair.png differ diff --git a/.config/awesome/lain/icons/mail.png b/.config/awesome/lain/icons/mail.png new file mode 100755 index 0000000..9c0c7a3 Binary files /dev/null and b/.config/awesome/lain/icons/mail.png differ diff --git a/.config/awesome/lain/icons/no_net.png b/.config/awesome/lain/icons/no_net.png new file mode 100755 index 0000000..3613372 Binary files /dev/null and b/.config/awesome/lain/icons/no_net.png differ diff --git a/.config/awesome/lain/icons/openweathermap/01d.png b/.config/awesome/lain/icons/openweathermap/01d.png new file mode 100755 index 0000000..569965e Binary files /dev/null and b/.config/awesome/lain/icons/openweathermap/01d.png differ diff --git a/.config/awesome/lain/icons/openweathermap/01n.png b/.config/awesome/lain/icons/openweathermap/01n.png new file mode 100755 index 0000000..ce5b135 Binary files /dev/null and b/.config/awesome/lain/icons/openweathermap/01n.png differ diff --git a/.config/awesome/lain/icons/openweathermap/02d.png b/.config/awesome/lain/icons/openweathermap/02d.png new file mode 100755 index 0000000..2ba9799 Binary files /dev/null and b/.config/awesome/lain/icons/openweathermap/02d.png differ diff --git a/.config/awesome/lain/icons/openweathermap/02n.png b/.config/awesome/lain/icons/openweathermap/02n.png new file mode 100755 index 0000000..12e4283 Binary files /dev/null and b/.config/awesome/lain/icons/openweathermap/02n.png differ diff --git a/.config/awesome/lain/icons/openweathermap/03d.png b/.config/awesome/lain/icons/openweathermap/03d.png new file mode 100755 index 0000000..1cf0e9d Binary files /dev/null and b/.config/awesome/lain/icons/openweathermap/03d.png differ diff --git a/.config/awesome/lain/icons/openweathermap/03n.png b/.config/awesome/lain/icons/openweathermap/03n.png new file mode 100755 index 0000000..89a42b8 Binary files /dev/null and b/.config/awesome/lain/icons/openweathermap/03n.png differ diff --git a/.config/awesome/lain/icons/openweathermap/04d.png b/.config/awesome/lain/icons/openweathermap/04d.png new file mode 100755 index 0000000..e7fb67f Binary files /dev/null and b/.config/awesome/lain/icons/openweathermap/04d.png differ diff --git a/.config/awesome/lain/icons/openweathermap/04n.png b/.config/awesome/lain/icons/openweathermap/04n.png new file mode 100755 index 0000000..e7fb67f Binary files /dev/null and b/.config/awesome/lain/icons/openweathermap/04n.png differ diff --git a/.config/awesome/lain/icons/openweathermap/09d.png b/.config/awesome/lain/icons/openweathermap/09d.png new file mode 100755 index 0000000..cfa066a Binary files /dev/null and b/.config/awesome/lain/icons/openweathermap/09d.png differ diff --git a/.config/awesome/lain/icons/openweathermap/09n.png b/.config/awesome/lain/icons/openweathermap/09n.png new file mode 100755 index 0000000..cfa066a Binary files /dev/null and b/.config/awesome/lain/icons/openweathermap/09n.png differ diff --git a/.config/awesome/lain/icons/openweathermap/10d.png b/.config/awesome/lain/icons/openweathermap/10d.png new file mode 100755 index 0000000..712d0c8 Binary files /dev/null and b/.config/awesome/lain/icons/openweathermap/10d.png differ diff --git a/.config/awesome/lain/icons/openweathermap/10n.png b/.config/awesome/lain/icons/openweathermap/10n.png new file mode 100755 index 0000000..712d0c8 Binary files /dev/null and b/.config/awesome/lain/icons/openweathermap/10n.png differ diff --git a/.config/awesome/lain/icons/openweathermap/11d.png b/.config/awesome/lain/icons/openweathermap/11d.png new file mode 100755 index 0000000..3b62f7c Binary files /dev/null and b/.config/awesome/lain/icons/openweathermap/11d.png differ diff --git a/.config/awesome/lain/icons/openweathermap/11n.png b/.config/awesome/lain/icons/openweathermap/11n.png new file mode 100755 index 0000000..3b62f7c Binary files /dev/null and b/.config/awesome/lain/icons/openweathermap/11n.png differ diff --git a/.config/awesome/lain/icons/openweathermap/13d.png b/.config/awesome/lain/icons/openweathermap/13d.png new file mode 100755 index 0000000..e265b01 Binary files /dev/null and b/.config/awesome/lain/icons/openweathermap/13d.png differ diff --git a/.config/awesome/lain/icons/openweathermap/13n.png b/.config/awesome/lain/icons/openweathermap/13n.png new file mode 100755 index 0000000..e265b01 Binary files /dev/null and b/.config/awesome/lain/icons/openweathermap/13n.png differ diff --git a/.config/awesome/lain/icons/openweathermap/50d.png b/.config/awesome/lain/icons/openweathermap/50d.png new file mode 100755 index 0000000..905ace3 Binary files /dev/null and b/.config/awesome/lain/icons/openweathermap/50d.png differ diff --git a/.config/awesome/lain/icons/openweathermap/50n.png b/.config/awesome/lain/icons/openweathermap/50n.png new file mode 100755 index 0000000..905ace3 Binary files /dev/null and b/.config/awesome/lain/icons/openweathermap/50n.png differ diff --git a/.config/awesome/lain/icons/openweathermap/README.md b/.config/awesome/lain/icons/openweathermap/README.md new file mode 100755 index 0000000..f908fbd --- /dev/null +++ b/.config/awesome/lain/icons/openweathermap/README.md @@ -0,0 +1,3 @@ +[Plain Weather Icons](http://merlinthered.deviantart.com/art/plain-weather-icons-157162192), created by [MerlinTheRed](http://merlinthered.deviantart.com/). + + diff --git a/.config/awesome/lain/icons/openweathermap/na.png b/.config/awesome/lain/icons/openweathermap/na.png new file mode 100755 index 0000000..1cc5132 Binary files /dev/null and b/.config/awesome/lain/icons/openweathermap/na.png differ diff --git a/.config/awesome/lain/icons/taskwarrior.png b/.config/awesome/lain/icons/taskwarrior.png new file mode 100755 index 0000000..c64fe86 Binary files /dev/null and b/.config/awesome/lain/icons/taskwarrior.png differ diff --git a/.config/awesome/lain/init.lua b/.config/awesome/lain/init.lua new file mode 100755 index 0000000..b59d5dd --- /dev/null +++ b/.config/awesome/lain/init.lua @@ -0,0 +1,15 @@ +--[[ + + Lain + Layouts, widgets and utilities for Awesome WM + + Licensed under GNU General Public License v2 + * (c) 2013, Luca CPZ + +--]] + +return { + layout = require("lain.layout"), + util = require("lain.util"), + widget = require("lain.widget") +} diff --git a/.config/awesome/lain/lain-scm-1.rockspec b/.config/awesome/lain/lain-scm-1.rockspec new file mode 100755 index 0000000..70b0f43 --- /dev/null +++ b/.config/awesome/lain/lain-scm-1.rockspec @@ -0,0 +1,22 @@ +package = "lain" +version = "scm-1" +source = { + url = "git+https://github.com/lcpz/lain.git", + tag = "master" +} +description = { + summary = "Layout, widgets and utilities for Awesome WM", + detailed = "Alternative layouts, asynchronous widgets and utility functions for Awesome WM. Non-Lua dependency: curl (for IMAP, MPD and weather widgets).", + homepage = "https://github.com/lcpz/lain", + license = "GPL2" +} +dependencies = { + "lua >= 5.3", + "dkjson >= 2.6-1" +} +supported_platforms = { "linux" } +build = { + type = "builtin", + modules = { lain = "init.lua" } +} + diff --git a/.config/awesome/lain/layout/cascade.lua b/.config/awesome/lain/layout/cascade.lua new file mode 100755 index 0000000..cbc3877 --- /dev/null +++ b/.config/awesome/lain/layout/cascade.lua @@ -0,0 +1,172 @@ +--[[ + + Licensed under GNU General Public License v2 + * (c) 2014, projektile + * (c) 2013, Luca CPZ + * (c) 2010-2012, Peter Hofmann + +--]] + +local floor = math.floor +local screen = screen + +local cascade = { + name = "cascade", + nmaster = 0, + offset_x = 32, + offset_y = 8, + tile = { + name = "cascadetile", + nmaster = 0, + ncol = 0, + mwfact = 0, + offset_x = 5, + offset_y = 32, + extra_padding = 0 + } +} + +local function do_cascade(p, tiling) + local t = p.tag or screen[p.screen].selected_tag + local wa = p.workarea + local cls = p.clients + + if #cls == 0 then return end + + if not tiling then + -- Cascade windows. + + local num_c + if cascade.nmaster > 0 then + num_c = cascade.nmaster + else + num_c = t.master_count + end + + -- Opening a new window will usually force all existing windows to + -- get resized. This wastes a lot of CPU time. So let's set a lower + -- bound to "how_many": This wastes a little screen space but you'll + -- get a much better user experience. + local how_many = (#cls >= num_c and #cls) or num_c + + local current_offset_x = cascade.offset_x * (how_many - 1) + local current_offset_y = cascade.offset_y * (how_many - 1) + + -- Iterate. + for i = 1,#cls,1 do + local c = cls[i] + local g = {} + + g.x = wa.x + (how_many - i) * cascade.offset_x + g.y = wa.y + (i - 1) * cascade.offset_y + g.width = wa.width - current_offset_x + g.height = wa.height - current_offset_y + + if g.width < 1 then g.width = 1 end + if g.height < 1 then g.height = 1 end + + p.geometries[c] = g + end + else + -- Layout with one fixed column meant for a master window. Its + -- width is calculated according to mwfact. Other clients are + -- cascaded or "tabbed" in a slave column on the right. + + -- (1) (2) (3) (4) + -- +----------+---+ +----------+---+ +----------+---+ +----------+---+ + -- | | | | | 3 | | | 4 | | +---+| + -- | | | -> | | | -> | +---++ -> | +---+|+ + -- | 1 | 2 | | 1 +---++ | 1 | 3 || | 1 +---+|+| + -- | | | | | 2 || | +---++| | +---+|+ | + -- | | | | | || | | 2 | | | | 2 |+ | + -- +----------+---+ +---------+---++ +--------+---+-+ +------+---+---+ + + local mwfact + if cascade.tile.mwfact > 0 then + mwfact = cascade.tile.mwfact + else + mwfact = t.master_width_factor + end + + -- Make slave windows overlap main window? Do this if ncol is 1. + local overlap_main + if cascade.tile.ncol > 0 then + overlap_main = cascade.tile.ncol + else + overlap_main = t.column_count + end + + -- Minimum space for slave windows? See cascade.tile.lua. + local num_c + if cascade.tile.nmaster > 0 then + num_c = cascade.tile.nmaster + else + num_c = t.master_count + end + + local how_many = (#cls - 1 >= num_c and (#cls - 1)) or num_c + + local current_offset_x = cascade.tile.offset_x * (how_many - 1) + local current_offset_y = cascade.tile.offset_y * (how_many - 1) + + if #cls <= 0 then return end + + -- Main column, fixed width and height. + local c = cls[1] + local g = {} + -- Rounding is necessary to prevent the rendered size of slavewid + -- from being 1 pixel off when the result is not an integer. + local mainwid = floor(wa.width * mwfact) + local slavewid = wa.width - mainwid + + if overlap_main == 1 then + g.width = wa.width + + -- The size of the main window may be reduced a little bit. + -- This allows you to see if there are any windows below the + -- main window. + -- This only makes sense, though, if the main window is + -- overlapping everything else. + g.width = g.width - cascade.tile.extra_padding + else + g.width = mainwid + end + + g.height = wa.height + g.x = wa.x + g.y = wa.y + + if g.width < 1 then g.width = 1 end + if g.height < 1 then g.height = 1 end + + p.geometries[c] = g + + -- Remaining clients stacked in slave column, new ones on top. + if #cls <= 1 then return end + for i = 2,#cls do + c = cls[i] + g = {} + + g.width = slavewid - current_offset_x + g.height = wa.height - current_offset_y + + g.x = wa.x + mainwid + (how_many - (i - 1)) * cascade.tile.offset_x + g.y = wa.y + (i - 2) * cascade.tile.offset_y + + if g.width < 1 then g.width = 1 end + if g.height < 1 then g.height = 1 end + + p.geometries[c] = g + end + end +end + +function cascade.tile.arrange(p) + return do_cascade(p, true) +end + +function cascade.arrange(p) + return do_cascade(p, false) +end + +return cascade diff --git a/.config/awesome/lain/layout/centerwork.lua b/.config/awesome/lain/layout/centerwork.lua new file mode 100755 index 0000000..c105676 --- /dev/null +++ b/.config/awesome/lain/layout/centerwork.lua @@ -0,0 +1,276 @@ +--[[ + + Licensed under GNU General Public License v2 + * (c) 2018, Eugene Pakhomov + * (c) 2016, Henrik Antonsson + * (c) 2015, Joerg Jaspert + * (c) 2014, projektile + * (c) 2013, Luca CPZ + * (c) 2010-2012, Peter Hofmann + +--]] + +local floor = math.floor +local max = math.max +local mouse = mouse +local mousegrabber = mousegrabber +local screen = screen + +local centerwork = { + name = "centerwork", + horizontal = { name = "centerworkh" } +} + +local function arrange(p, layout) + local t = p.tag or screen[p.screen].selected_tag + local wa = p.workarea + local cls = p.clients + + if #cls == 0 then return end + + local g = {} + + -- Main column, fixed width and height + local mwfact = t.master_width_factor + local mainhei = floor(wa.height * mwfact) + local mainwid = floor(wa.width * mwfact) + local slavewid = wa.width - mainwid + local slaveLwid = floor(slavewid / 2) + local slaveRwid = slavewid - slaveLwid + local slavehei = wa.height - mainhei + local slaveThei = floor(slavehei / 2) + local slaveBhei = slavehei - slaveThei + local nbrFirstSlaves = floor(#cls / 2) + local nbrSecondSlaves = floor((#cls - 1) / 2) + + local slaveFirstDim, slaveSecondDim = 0, 0 + + if layout.name == "centerwork" then -- vertical + if nbrFirstSlaves > 0 then slaveFirstDim = floor(wa.height / nbrFirstSlaves) end + if nbrSecondSlaves > 0 then slaveSecondDim = floor(wa.height / nbrSecondSlaves) end + + g.height = wa.height + g.width = mainwid + + g.x = wa.x + slaveLwid + g.y = wa.y + else -- horizontal + if nbrFirstSlaves > 0 then slaveFirstDim = floor(wa.width / nbrFirstSlaves) end + if nbrSecondSlaves > 0 then slaveSecondDim = floor(wa.width / nbrSecondSlaves) end + + g.height = mainhei + g.width = wa.width + + g.x = wa.x + g.y = wa.y + slaveThei + end + + g.width = max(g.width, 1) + g.height = max(g.height, 1) + + p.geometries[cls[1]] = g + + -- Auxiliary clients + if #cls <= 1 then return end + for i = 2, #cls do + g = {} + local idxChecker, dimToAssign + + local rowIndex = floor(i/2) + + if layout.name == "centerwork" then + if i % 2 == 0 then -- left slave + g.x = wa.x + g.y = wa.y + (rowIndex - 1) * slaveFirstDim + g.width = slaveLwid + + idxChecker, dimToAssign = nbrFirstSlaves, slaveFirstDim + else -- right slave + g.x = wa.x + slaveLwid + mainwid + g.y = wa.y + (rowIndex - 1) * slaveSecondDim + g.width = slaveRwid + + idxChecker, dimToAssign = nbrSecondSlaves, slaveSecondDim + end + + -- if last slave in row, use remaining space for it + if rowIndex == idxChecker then + g.height = wa.y + wa.height - g.y + else + g.height = dimToAssign + end + else + if i % 2 == 0 then -- top slave + g.x = wa.x + (rowIndex - 1) * slaveFirstDim + g.y = wa.y + g.height = slaveThei + + idxChecker, dimToAssign = nbrFirstSlaves, slaveFirstDim + else -- bottom slave + g.x = wa.x + (rowIndex - 1) * slaveSecondDim + g.y = wa.y + slaveThei + mainhei + g.height = slaveBhei + + idxChecker, dimToAssign = nbrSecondSlaves, slaveSecondDim + end + + -- if last slave in row, use remaining space for it + if rowIndex == idxChecker then + g.width = wa.x + wa.width - g.x + else + g.width = dimToAssign + end + end + + g.width = max(g.width, 1) + g.height = max(g.height, 1) + + p.geometries[cls[i]] = g + end +end + +local function mouse_resize_handler(c, _, _, _, orientation) + local wa = c.screen.workarea + local mwfact = c.screen.selected_tag.master_width_factor + local g = c:geometry() + local offset = 0 + local cursor = "cross" + + local corner_coords + + if orientation == 'vertical' then + if g.height + 15 >= wa.height then + offset = g.height * .5 + cursor = "sb_h_double_arrow" + elseif g.y + g.height + 15 <= wa.y + wa.height then + offset = g.height + end + corner_coords = { x = wa.x + wa.width * (1 - mwfact) / 2, y = g.y + offset } + else + if g.width + 15 >= wa.width then + offset = g.width * .5 + cursor = "sb_v_double_arrow" + elseif g.x + g.width + 15 <= wa.x + wa.width then + offset = g.width + end + corner_coords = { y = wa.y + wa.height * (1 - mwfact) / 2, x = g.x + offset } + end + + mouse.coords(corner_coords) + + local prev_coords = {} + + mousegrabber.run(function(m) + if not c.valid then return false end + for _, v in ipairs(m.buttons) do + if v then + prev_coords = { x = m.x, y = m.y } + local new_mwfact + if orientation == 'vertical' then + new_mwfact = 1 - (m.x - wa.x) / wa.width * 2 + else + new_mwfact = 1 - (m.y - wa.y) / wa.height * 2 + end + c.screen.selected_tag.master_width_factor = math.min(math.max(new_mwfact, 0.01), 0.99) + return true + end + end + return prev_coords.x == m.x and prev_coords.y == m.y + end, cursor) +end + +function centerwork.arrange(p) + return arrange(p, centerwork) +end + +function centerwork.horizontal.arrange(p) + return arrange(p, centerwork.horizontal) +end + +function centerwork.mouse_resize_handler(c, corner, x, y) + return mouse_resize_handler(c, corner, x, y, 'vertical') +end + +function centerwork.horizontal.mouse_resize_handler(c, corner, x, y) + return mouse_resize_handler(c, corner, x, y, 'horizontal') +end + + +--[[ +Make focus.byidx and swap.byidx behave more consistently with other layouts. +--]] + +local awful = require("awful") +local gears = require("gears") +local client = client + +local function compare_position(a, b) + if a.x == b.x then + return a.y < b.y + else + return a.x < b.x + end +end + +local function clients_by_position() + local this = client.focus + if this then + local sorted = {} + for _, c in ipairs(client.focus.first_tag:clients()) do + if not c.minimized then sorted[#sorted+1] = c end + end + table.sort(sorted, compare_position) + + local idx = 0 + for i, that in ipairs(sorted) do + if this.window == that.window then + idx = i + end + end + + if idx > 0 then + return { sorted = sorted, idx = idx } + end + end + return {} +end + +local function in_centerwork() + return client.focus and client.focus.first_tag.layout.name == "centerwork" +end + +centerwork.focus = {} + + +--[[ +Drop in replacements for awful.client.focus.byidx and awful.client.swap.byidx +that behaves consistently with other layouts. +--]] + +function centerwork.focus.byidx(i) + if in_centerwork() then + local cls = clients_by_position() + if cls.idx then + local target = cls.sorted[gears.math.cycle(#cls.sorted, cls.idx + i)] + awful.client.focus.byidx(0, target) + end + else + awful.client.focus.byidx(i) + end +end + +centerwork.swap = {} + +function centerwork.swap.byidx(i) + if in_centerwork() then + local cls = clients_by_position() + if cls.idx then + local target = cls.sorted[gears.math.cycle(#cls.sorted, cls.idx + i)] + client.focus:swap(target) + end + else + awful.client.swap.byidx(i) + end +end + +return centerwork diff --git a/.config/awesome/lain/layout/init.lua b/.config/awesome/lain/layout/init.lua new file mode 100755 index 0000000..6478b06 --- /dev/null +++ b/.config/awesome/lain/layout/init.lua @@ -0,0 +1,19 @@ +--[[ + + Lain + Layouts, widgets and utilities for Awesome WM + + Layouts section + + Licensed under GNU General Public License v2 + * (c) 2013, Luca CPZ + * (c) 2010-2012, Peter Hofmann + +--]] + +local wrequire = require("lain.helpers").wrequire +local setmetatable = setmetatable + +local layout = { _NAME = "lain.layout" } + +return setmetatable(layout, { __index = wrequire }) diff --git a/.config/awesome/lain/layout/termfair.lua b/.config/awesome/lain/layout/termfair.lua new file mode 100755 index 0000000..cf018ef --- /dev/null +++ b/.config/awesome/lain/layout/termfair.lua @@ -0,0 +1,282 @@ +--[[ + + Licensed under GNU General Public License v2 + * (c) 2014, projektile + * (c) 2013, Luca CPZ + * (c) 2010, Nicolas Estibals + * (c) 2010-2012, Peter Hofmann + +--]] + +local math = math +local screen = screen +local tonumber = tonumber + +local termfair = { name = "termfair" } +termfair.center = { name = "centerfair" } +termfair.stable = { name = "stablefair" } + +local function do_fair(p, orientation) + local t = p.tag or screen[p.screen].selected_tag + local wa = p.workarea + local cls = p.clients + + if #cls == 0 then return end + + -- How many vertical columns? Read from nmaster on the tag. + local num_x = tonumber(termfair.nmaster) or t.master_count + local ncol = tonumber(termfair.ncol) or t.column_count + if num_x <= 2 then num_x = 2 end + if ncol <= 1 then ncol = 1 end + local width = math.floor(wa.width/num_x) + + if orientation == "west" then + -- Layout with fixed number of vertical columns (read from nmaster). + -- New windows align from left to right. When a row is full, a new + -- one above it is created. Like this: + + -- (1) (2) (3) + -- +---+---+---+ +---+---+---+ +---+---+---+ + -- | | | | | | | | | | | | + -- | 1 | | | -> | 1 | 2 | | -> | 1 | 2 | 3 | -> + -- | | | | | | | | | | | | + -- +---+---+---+ +---+---+---+ +---+---+---+ + + -- (4) (5) (6) + -- +---+---+---+ +---+---+---+ +---+---+---+ + -- | 1 | | | | 1 | 2 | | | 1 | 2 | 3 | + -- +---+---+---+ -> +---+---+---+ -> +---+---+---+ + -- | 2 | 3 | 4 | | 3 | 4 | 5 | | 4 | 5 | 6 | + -- +---+---+---+ +---+---+---+ +---+---+---+ + + local num_y = math.max(math.ceil(#cls / num_x), ncol) + local height = math.floor(wa.height/num_y) + local cur_num_x = num_x + local at_x = 0 + local at_y = 0 + + local remaining_clients = #cls + + -- We start the first row. Left-align by limiting the number of + -- available slots. + if remaining_clients < num_x then + cur_num_x = remaining_clients + end + + -- Iterate in reversed order. + for i = #cls,1,-1 do + -- Get x and y position. + local c = cls[i] + local this_x = cur_num_x - at_x - 1 + local this_y = num_y - at_y - 1 + + -- Calculate geometry. + local g = {} + if this_x == (num_x - 1) then + g.width = wa.width - (num_x - 1)*width + else + g.width = width + end + + if this_y == (num_y - 1) then + g.height = wa.height - (num_y - 1)*height + else + g.height = height + end + + g.x = wa.x + this_x*width + g.y = wa.y + this_y*height + + if g.width < 1 then g.width = 1 end + if g.height < 1 then g.height = 1 end + + p.geometries[c] = g + + remaining_clients = remaining_clients - 1 + + -- Next grid position. + at_x = at_x + 1 + if at_x == num_x then + -- Row full, create a new one above it. + at_x = 0 + at_y = at_y + 1 + + -- We start a new row. Left-align. + if remaining_clients < num_x then + cur_num_x = remaining_clients + end + end + end + elseif orientation == "stable" then + -- Layout with fixed number of vertical columns (read from nmaster). + -- New windows align from left to right. When a row is full, a new + -- one below it is created. Like this: + + -- (1) (2) (3) + -- +---+---+---+ +---+---+---+ +---+---+---+ + -- | | | | | | | | | | | | + -- | 1 | | | -> | 1 | 2 | | -> | 1 | 2 | 3 | -> + -- | | | | | | | | | | | | + -- +---+---+---+ +---+---+---+ +---+---+---+ + + -- (4) (5) (6) + -- +---+---+---+ +---+---+---+ +---+---+---+ + -- | 1 | 2 | 3 | | 1 | 2 | 3 | | 1 | 2 | 3 | + -- +---+---+---+ +---+---+---+ +---+---+---+ + -- | 4 | | | | 4 | 5 | | | 4 | 5 | 6 | + -- +---+---+---+ -> +---+---+---+ -> +---+---+---+ + + local num_y = math.max(math.ceil(#cls / num_x), ncol) + local height = math.floor(wa.height/num_y) + + for i = #cls,1,-1 do + -- Get x and y position. + local c = cls[i] + local this_x = (i - 1) % num_x + local this_y = math.floor((i - this_x - 1) / num_x) + + -- Calculate geometry. + local g = {} + if this_x == (num_x - 1) then + g.width = wa.width - (num_x - 1)*width + else + g.width = width + end + + if this_y == (num_y - 1) then + g.height = wa.height - (num_y - 1)*height + else + g.height = height + end + + g.x = wa.x + this_x*width + g.y = wa.y + this_y*height + + if g.width < 1 then g.width = 1 end + if g.height < 1 then g.height = 1 end + + p.geometries[c] = g + end + elseif orientation == "center" then + -- Layout with fixed number of vertical columns (read from nmaster). + -- Cols are centerded until there is nmaster columns, then windows + -- are stacked in the slave columns, with at most ncol clients per + -- column if possible. + + -- with nmaster=3 and ncol=1 you'll have + -- (1) (2) (3) + -- +---+---+---+ +-+---+---+-+ +---+---+---+ + -- | | | | | | | | | | | | | + -- | | 1 | | -> | | 1 | 2 | | -> | 1 | 2 | 3 | -> + -- | | | | | | | | | | | | | + -- +---+---+---+ +-+---+---+-+ +---+---+---+ + + -- (4) (5) + -- +---+---+---+ +---+---+---+ + -- | | | 3 | | | 2 | 4 | + -- + 1 + 2 +---+ -> + 1 +---+---+ + -- | | | 4 | | | 3 | 5 | + -- +---+---+---+ +---+---+---+ + + if #cls < num_x then + -- Less clients than the number of columns, let's center it! + local offset_x = wa.x + (wa.width - #cls*width) / 2 + for i = 1, #cls do + local g = { y = wa.y } + g.width = width + g.height = wa.height + if g.width < 1 then g.width = 1 end + if g.height < 1 then g.height = 1 end + g.x = offset_x + (i - 1) * width + p.geometries[cls[i]] = g + end + else + -- More clients than the number of columns, let's arrange it! + -- Master client deserves a special treatement + local g = {} + g.width = wa.width - (num_x - 1)*width + g.height = wa.height + if g.width < 1 then g.width = 1 end + if g.height < 1 then g.height = 1 end + g.x = wa.x + g.y = wa.y + p.geometries[cls[1]] = g + + -- Treat the other clients + + -- Compute distribution of clients among columns + local num_y = {} + local remaining_clients = #cls-1 + local ncol_min = math.ceil(remaining_clients/(num_x-1)) + + if ncol >= ncol_min then + for i = (num_x-1), 1, -1 do + if (remaining_clients-i+1) < ncol then + num_y[i] = remaining_clients-i + 1 + else + num_y[i] = ncol + end + remaining_clients = remaining_clients - num_y[i] + end + else + local rem = remaining_clients % (num_x-1) + if rem == 0 then + for i = 1, num_x-1 do + num_y[i] = ncol_min + end + else + for i = 1, num_x-1 do + num_y[i] = ncol_min - 1 + end + for i = 0, rem-1 do + num_y[num_x-1-i] = num_y[num_x-1-i] + 1 + end + end + end + + -- Compute geometry of the other clients + local nclient = 2 -- we start with the 2nd client + local wx = g.x + g.width + for i = 1, (num_x-1) do + local height = math.floor(wa.height / num_y[i]) + local wy = wa.y + for _ = 0, (num_y[i]-2) do + g = {} + g.x = wx + g.y = wy + g.height = height + g.width = width + if g.width < 1 then g.width = 1 end + if g.height < 1 then g.height = 1 end + p.geometries[cls[nclient]] = g + nclient = nclient + 1 + wy = wy + height + end + g = {} + g.x = wx + g.y = wy + g.height = wa.height - (num_y[i] - 1)*height + g.width = width + if g.width < 1 then g.width = 1 end + if g.height < 1 then g.height = 1 end + p.geometries[cls[nclient]] = g + nclient = nclient + 1 + wx = wx + width + end + end + end +end + +function termfair.center.arrange(p) + return do_fair(p, "center") +end + +function termfair.stable.arrange(p) + return do_fair(p, "stable") +end + +function termfair.arrange(p) + return do_fair(p, "west") +end + +return termfair diff --git a/.config/awesome/lain/util/dkjson.lua b/.config/awesome/lain/util/dkjson.lua new file mode 100755 index 0000000..61cccb9 --- /dev/null +++ b/.config/awesome/lain/util/dkjson.lua @@ -0,0 +1,747 @@ +-- Module options: +local always_use_lpeg = false +local register_global_module_table = false +local global_module_name = 'json' + +--[==[ + +David Kolf's JSON module for Lua 5.1 - 5.4 + +Version 2.6 + + +For the documentation see the corresponding readme.txt or visit +. + +You can contact the author by sending an e-mail to 'david' at the +domain 'dkolf.de'. + + +Copyright (C) 2010-2021 David Heiko Kolf + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS +BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +--]==] + +-- global dependencies: +local pairs, type, tostring, tonumber, getmetatable, setmetatable = + pairs, type, tostring, tonumber, getmetatable, setmetatable +local error, require, pcall, select = error, require, pcall, select +local floor, huge = math.floor, math.huge +local strrep, gsub, strsub, strbyte, strchar, strfind, strlen, strformat = + string.rep, string.gsub, string.sub, string.byte, string.char, + string.find, string.len, string.format +local strmatch = string.match +local concat = table.concat + +local json = { version = "dkjson 2.6" } + +local jsonlpeg = {} + +if register_global_module_table then + if always_use_lpeg then + _G[global_module_name] = jsonlpeg + else + _G[global_module_name] = json + end +end + +_ENV = nil -- blocking globals in Lua 5.2 and later + +pcall (function() + -- Enable access to blocked metatables. + -- Don't worry, this module doesn't change anything in them. + local debmeta = require "debug".getmetatable + if debmeta then getmetatable = debmeta end +end) + +json.null = setmetatable ({}, { + __tojson = function () return "null" end +}) + +local function isarray (tbl) + local max, n, arraylen = 0, 0, 0 + for k,v in pairs (tbl) do + if k == 'n' and type(v) == 'number' then + arraylen = v + if v > max then + max = v + end + else + if type(k) ~= 'number' or k < 1 or floor(k) ~= k then + return false + end + if k > max then + max = k + end + n = n + 1 + end + end + if max > 10 and max > arraylen and max > n * 2 then + return false -- don't create an array with too many holes + end + return true, max +end + +local escapecodes = { + ["\""] = "\\\"", ["\\"] = "\\\\", ["\b"] = "\\b", ["\f"] = "\\f", + ["\n"] = "\\n", ["\r"] = "\\r", ["\t"] = "\\t" +} + +local function escapeutf8 (uchar) + local value = escapecodes[uchar] + if value then + return value + end + local a, b, c, d = strbyte (uchar, 1, 4) + a, b, c, d = a or 0, b or 0, c or 0, d or 0 + if a <= 0x7f then + value = a + elseif 0xc0 <= a and a <= 0xdf and b >= 0x80 then + value = (a - 0xc0) * 0x40 + b - 0x80 + elseif 0xe0 <= a and a <= 0xef and b >= 0x80 and c >= 0x80 then + value = ((a - 0xe0) * 0x40 + b - 0x80) * 0x40 + c - 0x80 + elseif 0xf0 <= a and a <= 0xf7 and b >= 0x80 and c >= 0x80 and d >= 0x80 then + value = (((a - 0xf0) * 0x40 + b - 0x80) * 0x40 + c - 0x80) * 0x40 + d - 0x80 + else + return "" + end + if value <= 0xffff then + return strformat ("\\u%.4x", value) + elseif value <= 0x10ffff then + -- encode as UTF-16 surrogate pair + value = value - 0x10000 + local highsur, lowsur = 0xD800 + floor (value/0x400), 0xDC00 + (value % 0x400) + return strformat ("\\u%.4x\\u%.4x", highsur, lowsur) + else + return "" + end +end + +local function fsub (str, pattern, repl) + -- gsub always builds a new string in a buffer, even when no match + -- exists. First using find should be more efficient when most strings + -- don't contain the pattern. + if strfind (str, pattern) then + return gsub (str, pattern, repl) + else + return str + end +end + +local function quotestring (value) + -- based on the regexp "escapable" in https://github.com/douglascrockford/JSON-js + value = fsub (value, "[%z\1-\31\"\\\127]", escapeutf8) + if strfind (value, "[\194\216\220\225\226\239]") then + value = fsub (value, "\194[\128-\159\173]", escapeutf8) + value = fsub (value, "\216[\128-\132]", escapeutf8) + value = fsub (value, "\220\143", escapeutf8) + value = fsub (value, "\225\158[\180\181]", escapeutf8) + value = fsub (value, "\226\128[\140-\143\168-\175]", escapeutf8) + value = fsub (value, "\226\129[\160-\175]", escapeutf8) + value = fsub (value, "\239\187\191", escapeutf8) + value = fsub (value, "\239\191[\176-\191]", escapeutf8) + end + return "\"" .. value .. "\"" +end +json.quotestring = quotestring + +local function replace(str, o, n) + local i, j = strfind (str, o, 1, true) + if i then + return strsub(str, 1, i-1) .. n .. strsub(str, j+1, -1) + else + return str + end +end + +-- locale independent num2str and str2num functions +local decpoint, numfilter + +local function updatedecpoint () + decpoint = strmatch(tostring(0.5), "([^05+])") + -- build a filter that can be used to remove group separators + numfilter = "[^0-9%-%+eE" .. gsub(decpoint, "[%^%$%(%)%%%.%[%]%*%+%-%?]", "%%%0") .. "]+" +end + +updatedecpoint() + +local function num2str (num) + return replace(fsub(tostring(num), numfilter, ""), decpoint, ".") +end + +local function str2num (str) + local num = tonumber(replace(str, ".", decpoint)) + if not num then + updatedecpoint() + num = tonumber(replace(str, ".", decpoint)) + end + return num +end + +local function addnewline2 (level, buffer, buflen) + buffer[buflen+1] = "\n" + buffer[buflen+2] = strrep (" ", level) + buflen = buflen + 2 + return buflen +end + +function json.addnewline (state) + if state.indent then + state.bufferlen = addnewline2 (state.level or 0, + state.buffer, state.bufferlen or #(state.buffer)) + end +end + +local encode2 -- forward declaration + +local function addpair (key, value, prev, indent, level, buffer, buflen, tables, globalorder, state) + local kt = type (key) + if kt ~= 'string' and kt ~= 'number' then + return nil, "type '" .. kt .. "' is not supported as a key by JSON." + end + if prev then + buflen = buflen + 1 + buffer[buflen] = "," + end + if indent then + buflen = addnewline2 (level, buffer, buflen) + end + buffer[buflen+1] = quotestring (key) + buffer[buflen+2] = ":" + return encode2 (value, indent, level, buffer, buflen + 2, tables, globalorder, state) +end + +local function appendcustom(res, buffer, state) + local buflen = state.bufferlen + if type (res) == 'string' then + buflen = buflen + 1 + buffer[buflen] = res + end + return buflen +end + +local function exception(reason, value, state, buffer, buflen, defaultmessage) + defaultmessage = defaultmessage or reason + local handler = state.exception + if not handler then + return nil, defaultmessage + else + state.bufferlen = buflen + local ret, msg = handler (reason, value, state, defaultmessage) + if not ret then return nil, msg or defaultmessage end + return appendcustom(ret, buffer, state) + end +end + +function json.encodeexception(_reason, _value, _state, defaultmessage) + return quotestring("<" .. defaultmessage .. ">") +end + +encode2 = function (value, indent, level, buffer, buflen, tables, globalorder, state) + local valtype = type (value) + local valmeta = getmetatable (value) + valmeta = type (valmeta) == 'table' and valmeta -- only tables + local valtojson = valmeta and valmeta.__tojson + if valtojson then + if tables[value] then + return exception('reference cycle', value, state, buffer, buflen) + end + tables[value] = true + state.bufferlen = buflen + local ret, msg = valtojson (value, state) + if not ret then return exception('custom encoder failed', value, state, buffer, buflen, msg) end + tables[value] = nil + buflen = appendcustom(ret, buffer, state) + elseif value == nil then + buflen = buflen + 1 + buffer[buflen] = "null" + elseif valtype == 'number' then + local s + if value ~= value or value >= huge or -value >= huge then + -- This is the behaviour of the original JSON implementation. + s = "null" + else + s = num2str (value) + end + buflen = buflen + 1 + buffer[buflen] = s + elseif valtype == 'boolean' then + buflen = buflen + 1 + buffer[buflen] = value and "true" or "false" + elseif valtype == 'string' then + buflen = buflen + 1 + buffer[buflen] = quotestring (value) + elseif valtype == 'table' then + if tables[value] then + return exception('reference cycle', value, state, buffer, buflen) + end + tables[value] = true + level = level + 1 + local isa, n = isarray (value) + if n == 0 and valmeta and valmeta.__jsontype == 'object' then + isa = false + end + local msg + if isa then -- JSON array + buflen = buflen + 1 + buffer[buflen] = "[" + for i = 1, n do + buflen, msg = encode2 (value[i], indent, level, buffer, buflen, tables, globalorder, state) + if not buflen then return nil, msg end + if i < n then + buflen = buflen + 1 + buffer[buflen] = "," + end + end + buflen = buflen + 1 + buffer[buflen] = "]" + else -- JSON object + local prev = false + buflen = buflen + 1 + buffer[buflen] = "{" + local order = valmeta and valmeta.__jsonorder or globalorder + if order then + local used = {} + n = #order + for i = 1, n do + local k = order[i] + local v = value[k] + if v ~= nil then + used[k] = true + buflen, _msg = addpair (k, v, prev, indent, level, buffer, buflen, tables, globalorder, state) + prev = true -- add a seperator before the next element + end + end + for k,v in pairs (value) do + if not used[k] then + buflen, msg = addpair (k, v, prev, indent, level, buffer, buflen, tables, globalorder, state) + if not buflen then return nil, msg end + prev = true -- add a seperator before the next element + end + end + else -- unordered + for k,v in pairs (value) do + buflen, msg = addpair (k, v, prev, indent, level, buffer, buflen, tables, globalorder, state) + if not buflen then return nil, msg end + prev = true -- add a seperator before the next element + end + end + if indent then + buflen = addnewline2 (level - 1, buffer, buflen) + end + buflen = buflen + 1 + buffer[buflen] = "}" + end + tables[value] = nil + else + return exception ('unsupported type', value, state, buffer, buflen, + "type '" .. valtype .. "' is not supported by JSON.") + end + return buflen +end + +function json.encode (value, state) + state = state or {} + local oldbuffer = state.buffer + local buffer = oldbuffer or {} + state.buffer = buffer + updatedecpoint() + local ret, msg = encode2 (value, state.indent, state.level or 0, + buffer, state.bufferlen or 0, state.tables or {}, state.keyorder, state) + if not ret then + error (msg, 2) + elseif oldbuffer == buffer then + state.bufferlen = ret + return true + else + state.bufferlen = nil + state.buffer = nil + return concat (buffer) + end +end + +local function loc (str, where) + local line, pos, linepos = 1, 1, 0 + while true do + pos = strfind (str, "\n", pos, true) + if pos and pos < where then + line = line + 1 + linepos = pos + pos = pos + 1 + else + break + end + end + return "line " .. line .. ", column " .. (where - linepos) +end + +local function unterminated (str, what, where) + return nil, strlen (str) + 1, "unterminated " .. what .. " at " .. loc (str, where) +end + +local function scanwhite (str, pos) + while true do + pos = strfind (str, "%S", pos) + if not pos then return nil end + local sub2 = strsub (str, pos, pos + 1) + if sub2 == "\239\187" and strsub (str, pos + 2, pos + 2) == "\191" then + -- UTF-8 Byte Order Mark + pos = pos + 3 + elseif sub2 == "//" then + pos = strfind (str, "[\n\r]", pos + 2) + if not pos then return nil end + elseif sub2 == "/*" then + pos = strfind (str, "*/", pos + 2) + if not pos then return nil end + pos = pos + 2 + else + return pos + end + end +end + +local escapechars = { + ["\""] = "\"", ["\\"] = "\\", ["/"] = "/", ["b"] = "\b", ["f"] = "\f", + ["n"] = "\n", ["r"] = "\r", ["t"] = "\t" +} + +local function unichar (value) + if value < 0 then + return nil + elseif value <= 0x007f then + return strchar (value) + elseif value <= 0x07ff then + return strchar (0xc0 + floor(value/0x40), + 0x80 + (floor(value) % 0x40)) + elseif value <= 0xffff then + return strchar (0xe0 + floor(value/0x1000), + 0x80 + (floor(value/0x40) % 0x40), + 0x80 + (floor(value) % 0x40)) + elseif value <= 0x10ffff then + return strchar (0xf0 + floor(value/0x40000), + 0x80 + (floor(value/0x1000) % 0x40), + 0x80 + (floor(value/0x40) % 0x40), + 0x80 + (floor(value) % 0x40)) + else + return nil + end +end + +local function scanstring (str, pos) + local lastpos = pos + 1 + local buffer, n = {}, 0 + while true do + local nextpos = strfind (str, "[\"\\]", lastpos) + if not nextpos then + return unterminated (str, "string", pos) + end + if nextpos > lastpos then + n = n + 1 + buffer[n] = strsub (str, lastpos, nextpos - 1) + end + if strsub (str, nextpos, nextpos) == "\"" then + lastpos = nextpos + 1 + break + else + local escchar = strsub (str, nextpos + 1, nextpos + 1) + local value + if escchar == "u" then + value = tonumber (strsub (str, nextpos + 2, nextpos + 5), 16) + if value then + local value2 + if 0xD800 <= value and value <= 0xDBff then + -- we have the high surrogate of UTF-16. Check if there is a + -- low surrogate escaped nearby to combine them. + if strsub (str, nextpos + 6, nextpos + 7) == "\\u" then + value2 = tonumber (strsub (str, nextpos + 8, nextpos + 11), 16) + if value2 and 0xDC00 <= value2 and value2 <= 0xDFFF then + value = (value - 0xD800) * 0x400 + (value2 - 0xDC00) + 0x10000 + else + value2 = nil -- in case it was out of range for a low surrogate + end + end + end + value = value and unichar (value) + if value then + if value2 then + lastpos = nextpos + 12 + else + lastpos = nextpos + 6 + end + end + end + end + if not value then + value = escapechars[escchar] or escchar + lastpos = nextpos + 2 + end + n = n + 1 + buffer[n] = value + end + end + if n == 1 then + return buffer[1], lastpos + elseif n > 1 then + return concat (buffer), lastpos + else + return "", lastpos + end +end + +local scanvalue -- forward declaration + +local function scantable (what, closechar, str, startpos, nullval, objectmeta, arraymeta) + local tbl, n = {}, 0 + local pos = startpos + 1 + if what == 'object' then + setmetatable (tbl, objectmeta) + else + setmetatable (tbl, arraymeta) + end + while true do + pos = scanwhite (str, pos) + if not pos then return unterminated (str, what, startpos) end + local char = strsub (str, pos, pos) + if char == closechar then + return tbl, pos + 1 + end + local val1, err + val1, pos, err = scanvalue (str, pos, nullval, objectmeta, arraymeta) + if err then return nil, pos, err end + pos = scanwhite (str, pos) + if not pos then return unterminated (str, what, startpos) end + char = strsub (str, pos, pos) + if char == ":" then + if val1 == nil then + return nil, pos, "cannot use nil as table index (at " .. loc (str, pos) .. ")" + end + pos = scanwhite (str, pos + 1) + if not pos then return unterminated (str, what, startpos) end + local val2 + val2, pos, err = scanvalue (str, pos, nullval, objectmeta, arraymeta) + if err then return nil, pos, err end + tbl[val1] = val2 + pos = scanwhite (str, pos) + if not pos then return unterminated (str, what, startpos) end + char = strsub (str, pos, pos) + else + n = n + 1 + tbl[n] = val1 + end + if char == "," then + pos = pos + 1 + end + end +end + +scanvalue = function (str, pos, nullval, objectmeta, arraymeta) + pos = pos or 1 + pos = scanwhite (str, pos) + if not pos then + return nil, strlen (str) + 1, "no valid JSON value (reached the end)" + end + local char = strsub (str, pos, pos) + if char == "{" then + return scantable ('object', "}", str, pos, nullval, objectmeta, arraymeta) + elseif char == "[" then + return scantable ('array', "]", str, pos, nullval, objectmeta, arraymeta) + elseif char == "\"" then + return scanstring (str, pos) + else + local pstart, pend = strfind (str, "^%-?[%d%.]+[eE]?[%+%-]?%d*", pos) + if pstart then + local number = str2num (strsub (str, pstart, pend)) + if number then + return number, pend + 1 + end + end + pstart, pend = strfind (str, "^%a%w*", pos) + if pstart then + local name = strsub (str, pstart, pend) + if name == "true" then + return true, pend + 1 + elseif name == "false" then + return false, pend + 1 + elseif name == "null" then + return nullval, pend + 1 + end + end + return nil, pos, "no valid JSON value at " .. loc (str, pos) + end +end + +local function optionalmetatables(...) + if select("#", ...) > 0 then + return ... + else + return {__jsontype = 'object'}, {__jsontype = 'array'} + end +end + +function json.decode (str, pos, nullval, ...) + local objectmeta, arraymeta = optionalmetatables(...) + return scanvalue (str, pos, nullval, objectmeta, arraymeta) +end + +function json.use_lpeg () + local g = require ("lpeg") + + if g.version() == "0.11" then + error "due to a bug in LPeg 0.11, it cannot be used for JSON matching" + end + + local pegmatch = g.match + local P, S, R = g.P, g.S, g.R + + local function ErrorCall (str, pos, msg, state) + if not state.msg then + state.msg = msg .. " at " .. loc (str, pos) + state.pos = pos + end + return false + end + + local function Err (msg) + return g.Cmt (g.Cc (msg) * g.Carg (2), ErrorCall) + end + + local function ErrorUnterminatedCall (str, pos, what, state) + return ErrorCall (str, pos - 1, "unterminated " .. what, state) + end + + local SingleLineComment = P"//" * (1 - S"\n\r")^0 + local MultiLineComment = P"/*" * (1 - P"*/")^0 * P"*/" + local Space = (S" \n\r\t" + P"\239\187\191" + SingleLineComment + MultiLineComment)^0 + + local function ErrUnterminated (what) + return g.Cmt (g.Cc (what) * g.Carg (2), ErrorUnterminatedCall) + end + + local PlainChar = 1 - S"\"\\\n\r" + local EscapeSequence = (P"\\" * g.C (S"\"\\/bfnrt" + Err "unsupported escape sequence")) / escapechars + local HexDigit = R("09", "af", "AF") + local function UTF16Surrogate (_match, _pos, high, low) + high, low = tonumber (high, 16), tonumber (low, 16) + if 0xD800 <= high and high <= 0xDBff and 0xDC00 <= low and low <= 0xDFFF then + return true, unichar ((high - 0xD800) * 0x400 + (low - 0xDC00) + 0x10000) + else + return false + end + end + local function UTF16BMP (hex) + return unichar (tonumber (hex, 16)) + end + local U16Sequence = (P"\\u" * g.C (HexDigit * HexDigit * HexDigit * HexDigit)) + local UnicodeEscape = g.Cmt (U16Sequence * U16Sequence, UTF16Surrogate) + U16Sequence/UTF16BMP + local Char = UnicodeEscape + EscapeSequence + PlainChar + local String = P"\"" * (g.Cs (Char ^ 0) * P"\"" + ErrUnterminated "string") + local Integer = P"-"^(-1) * (P"0" + (R"19" * R"09"^0)) + local Fractal = P"." * R"09"^0 + local Exponent = (S"eE") * (S"+-")^(-1) * R"09"^1 + local Number = (Integer * Fractal^(-1) * Exponent^(-1))/str2num + local Constant = P"true" * g.Cc (true) + P"false" * g.Cc (false) + P"null" * g.Carg (1) + local SimpleValue = Number + String + Constant + local ArrayContent, ObjectContent + + -- The functions parsearray and parseobject parse only a single value/pair + -- at a time and store them directly to avoid hitting the LPeg limits. + local function parsearray (str, pos, nullval, state) + local obj, cont + local start = pos + local npos + local t, nt = {}, 0 + repeat + obj, cont, npos = pegmatch (ArrayContent, str, pos, nullval, state) + if cont == 'end' then + return ErrorUnterminatedCall (str, start, "array", state) + end + pos = npos + if cont == 'cont' or cont == 'last' then + nt = nt + 1 + t[nt] = obj + end + until cont ~= 'cont' + return pos, setmetatable (t, state.arraymeta) + end + + local function parseobject (str, pos, nullval, state) + local obj, key, cont + local start = pos + local npos + local t = {} + repeat + key, obj, cont, npos = pegmatch (ObjectContent, str, pos, nullval, state) + if cont == 'end' then + return ErrorUnterminatedCall (str, start, "object", state) + end + pos = npos + if cont == 'cont' or cont == 'last' then + t[key] = obj + end + until cont ~= 'cont' + return pos, setmetatable (t, state.objectmeta) + end + + local Array = P"[" * g.Cmt (g.Carg(1) * g.Carg(2), parsearray) + local Object = P"{" * g.Cmt (g.Carg(1) * g.Carg(2), parseobject) + local Value = Space * (Array + Object + SimpleValue) + local ExpectedValue = Value + Space * Err "value expected" + local ExpectedKey = String + Err "key expected" + local End = P(-1) * g.Cc'end' + local ErrInvalid = Err "invalid JSON" + ArrayContent = (Value * Space * (P"," * g.Cc'cont' + P"]" * g.Cc'last'+ End + ErrInvalid) + g.Cc(nil) * (P"]" * g.Cc'empty' + End + ErrInvalid)) * g.Cp() + local Pair = g.Cg (Space * ExpectedKey * Space * (P":" + Err "colon expected") * ExpectedValue) + ObjectContent = (g.Cc(nil) * g.Cc(nil) * P"}" * g.Cc'empty' + End + (Pair * Space * (P"," * g.Cc'cont' + P"}" * g.Cc'last' + End + ErrInvalid) + ErrInvalid)) * g.Cp() + local DecodeValue = ExpectedValue * g.Cp () + + jsonlpeg.version = json.version + jsonlpeg.encode = json.encode + jsonlpeg.null = json.null + jsonlpeg.quotestring = json.quotestring + jsonlpeg.addnewline = json.addnewline + jsonlpeg.encodeexception = json.encodeexception + jsonlpeg.using_lpeg = true + + function jsonlpeg.decode (str, pos, nullval, ...) + local state = {} + state.objectmeta, state.arraymeta = optionalmetatables(...) + local obj, retpos = pegmatch (DecodeValue, str, pos, nullval, state) + if state.msg then + return nil, state.pos, state.msg + else + return obj, retpos + end + end + + -- cache result of this function: + json.use_lpeg = function () return jsonlpeg end + jsonlpeg.use_lpeg = json.use_lpeg + + return jsonlpeg +end + +if always_use_lpeg then + return json.use_lpeg() +end + +return json + diff --git a/.config/awesome/lain/util/init.lua b/.config/awesome/lain/util/init.lua new file mode 100755 index 0000000..5ae0523 --- /dev/null +++ b/.config/awesome/lain/util/init.lua @@ -0,0 +1,190 @@ +--[[ + + Lain + Layouts, widgets and utilities for Awesome WM + + Utilities section + + Licensed under GNU General Public License v2 + * (c) 2013, Luca CPZ + * (c) 2010-2012, Peter Hofmann + +--]] + +local awful = require("awful") +local sqrt = math.sqrt +local pairs = pairs +local client = client +local tonumber = tonumber +local wrequire = require("lain.helpers").wrequire +local setmetatable = setmetatable + +-- Lain utilities submodule +-- lain.util +local util = { _NAME = "lain.util" } + +-- Like awful.menu.clients, but only show clients of currently selected tags +function util.menu_clients_current_tags(menu, args) + -- List of currently selected tags. + local cls_tags = awful.screen.focused().selected_tags + + if cls_tags == nil then return nil end + + -- Final list of menu items. + local cls_t = {} + + -- For each selected tag get all clients of that tag and add them to + -- the menu. A click on a menu item will raise that client. + for i = 1,#cls_tags do + local t = cls_tags[i] + local cls = t:clients() + + for _, c in pairs(cls) do + cls_t[#cls_t + 1] = { awful.util.escape(c.name) or "", + function () + c.minimized = false + client.focus = c + c:raise() + end, + c.icon } + end + end + + -- No clients? Then quit. + if #cls_t <= 0 then return nil end + + -- menu may contain some predefined values, otherwise start with a + -- fresh menu. + if not menu then menu = {} end + + -- Set the list of items and show the menu. + menu.items = cls_t + local m = awful.menu(menu) + m:show(args) + + return m +end + +-- Magnify a client: set it to "float" and resize it. +function util.magnify_client(c, width_f, height_f) + if c and not c.floating then + util.magnified_client = c + util.mc(c, width_f, height_f) + else + util.magnified_client = nil + c.floating = false + end +end + +-- https://github.com/lcpz/lain/issues/195 +function util.mc(c, width_f, height_f) + c = c or util.magnified_client + if not c then return end + + c.floating = true + local s = awful.screen.focused() + local mg = s.workarea + local g = {} + local mwfact = width_f or s.selected_tag.master_width_factor or 0.5 + g.width = sqrt(mwfact) * mg.width + g.height = sqrt(height_f or mwfact) * mg.height + g.x = mg.x + (mg.width - g.width) / 2 + g.y = mg.y + (mg.height - g.height) / 2 + + if c then c:geometry(g) end -- if c is still a valid object +end + +-- Non-empty tag browsing +-- direction in {-1, 1} <-> {previous, next} non-empty tag +function util.tag_view_nonempty(direction,sc) + direction = direction or 1 + local s = sc or awful.screen.focused() + local tags = s.tags + local sel = s.selected_tag + + local i = sel.index + repeat + i = i + direction + + -- Wrap around when we reach one of the bounds + if i > #tags then + i = i - #tags + end + if i < 1 then + i = i + #tags + end + + local t = tags[i] + + -- Stop when we get back to where we started + if t == sel then + break + end + + -- If it's The One, view it. + if #t:clients() > 0 then + t:view_only() + return + end + until false +end + +-- {{{ Dynamic tagging + +-- Add a new tag +function util.add_tag(layout) + awful.prompt.run { + prompt = "New tag name: ", + textbox = awful.screen.focused().mypromptbox.widget, + exe_callback = function(name) + if not name or #name == 0 then return end + awful.tag.add(name, { screen = awful.screen.focused(), layout = layout or awful.layout.suit.tile }):view_only() + end + } +end + +-- Rename current tag +function util.rename_tag() + awful.prompt.run { + prompt = "Rename tag: ", + textbox = awful.screen.focused().mypromptbox.widget, + exe_callback = function(new_name) + if not new_name or #new_name == 0 then return end + local t = awful.screen.focused().selected_tag + if t then + t.name = new_name + end + end + } +end + +-- Move current tag +-- pos in {-1, 1} <-> {previous, next} tag position +function util.move_tag(pos) + local tag = awful.screen.focused().selected_tag + if tonumber(pos) <= -1 then + awful.tag.move(tag.index - 1, tag) + else + awful.tag.move(tag.index + 1, tag) + end +end + +-- Delete current tag +-- Any rule set on the tag shall be broken +function util.delete_tag() + local t = awful.screen.focused().selected_tag + if not t then return end + t:delete() +end + +-- }}} + +-- On the fly useless gaps change +function util.useless_gaps_resize(thatmuch, s, t) + local scr = s or awful.screen.focused() + local tag = t or scr.selected_tag + tag.gap = tag.gap + tonumber(thatmuch) + awful.layout.arrange(scr) +end + +return setmetatable(util, { __index = wrequire }) diff --git a/.config/awesome/lain/util/markup.lua b/.config/awesome/lain/util/markup.lua new file mode 100755 index 0000000..63f9486 --- /dev/null +++ b/.config/awesome/lain/util/markup.lua @@ -0,0 +1,66 @@ +--[[ + + Licensed under MIT License + * (c) 2013, Luca CPZ + * (c) 2009, Uli Schlachter + * (c) 2009, Majic + +--]] + +local format = string.format +local setmetatable = setmetatable + +-- Lain markup util submodule +-- lain.util.markup +local markup = { fg = {}, bg = {} } + +-- Convenience tags +function markup.bold(text) return format("%s", text) end +function markup.italic(text) return format("%s", text) end +function markup.strike(text) return format("%s", text) end +function markup.underline(text) return format("%s", text) end +function markup.monospace(text) return format("%s", text) end +function markup.big(text) return format("%s", text) end +function markup.small(text) return format("%s", text) end + +-- Set the font +function markup.font(font, text) + return format("%s", font, text) +end + +-- Set the foreground +function markup.fg.color(color, text) + return format("%s", color, text) +end + +-- Set the background +function markup.bg.color(color, text) + return format("%s", color, text) +end + +-- Set foreground and background +function markup.color(fg, bg, text) + return format("%s", fg, bg, text) +end + +-- Set font and foreground +function markup.fontfg(font, fg, text) + return format("%s", font, fg, text) +end + +-- Set font and background +function markup.fontbg(font, bg, text) + return format("%s", font, bg, text) +end + +-- Set font, foreground and background +function markup.fontcolor(font, fg, bg, text) + return format("%s", font, fg, bg, text) +end + +-- link markup.{fg,bg}(...) calls to markup.{fg,bg}.color(...) +setmetatable(markup.fg, { __call = function(_, ...) return markup.fg.color(...) end }) +setmetatable(markup.bg, { __call = function(_, ...) return markup.bg.color(...) end }) + +-- link markup(...) calls to markup.fg.color(...) +return setmetatable(markup, { __call = function(_, ...) return markup.fg.color(...) end }) diff --git a/.config/awesome/lain/util/menu_iterator.lua b/.config/awesome/lain/util/menu_iterator.lua new file mode 100755 index 0000000..d457473 --- /dev/null +++ b/.config/awesome/lain/util/menu_iterator.lua @@ -0,0 +1,144 @@ +--[[ + + Licensed under GNU General Public License v2 + * (c) 2017, Simon Désaulniers + * (c) 2017, Uli Schlachter + * (c) 2017, Jeferson Siqueira + +--]] + +-- Menu iterator with Naughty notifications +-- lain.util.menu_iterator + +local naughty = require("naughty") +local helpers = require("lain.helpers") +local atable = require("awful.util").table +local assert = assert +local pairs = pairs +local tconcat = table.concat +local unpack = unpack or table.unpack -- lua 5.1 retro-compatibility + +local state = { cid = nil } + +local function naughty_destroy_callback(reason) + local closed = naughty.notificationClosedReason + if reason == closed.expired or reason == closed.dismissedByUser then + local actions = state.index and state.menu[state.index - 1][2] + if actions then + for _,action in pairs(actions) do + -- don't try to call nil callbacks + if action then action() end + end + state.index = nil + end + end +end + +-- Iterates over a menu. +-- After the timeout, callbacks associated to the last visited choice are +-- executed. Inputs: +-- * menu: a list of {label, {callbacks}} pairs +-- * timeout: time to wait before confirming the menu selection +-- * icon: icon to display in the notification of the chosen label +local function iterate(menu, timeout, icon) + timeout = timeout or 4 -- default timeout for each menu entry + icon = icon or nil -- icon to display on the menu + + -- Build the list of choices + if not state.index then + state.menu = menu + state.index = 1 + end + + -- Select one and display the appropriate notification + local label + local next = state.menu[state.index] + state.index = state.index + 1 + + if not next then + label = "Cancel" + state.index = nil + else + label, _ = unpack(next) + end + + state.cid = naughty.notify({ + text = label, + icon = icon, + timeout = timeout, + screen = mouse.screen, + replaces_id = state.cid, + destroy = naughty_destroy_callback + }).id +end + +-- Generates a menu compatible with the first argument of `iterate` function and +-- suitable for the following cases: +-- * all possible choices individually (partition of singletons); +-- * all possible subsets of the set of choices (powerset). +-- +-- Inputs: +-- * args: an array containing the following members: +-- * choices: Array of choices (string) on which the menu will be +-- generated. +-- * name: Displayed name of the menu (in the form "name: choices"). +-- * selected_cb: Callback to execute for each selected choice. Takes +-- the choice as a string argument. Can be `nil` (no action +-- to execute). +-- * rejected_cb: Callback to execute for each rejected choice (possible +-- choices which are not selected). Takes the choice as a +-- string argument. Can be `nil` (no action to execute). +-- * extra_choices: An array of extra { choice_str, callback_fun } pairs to be +-- added to the menu. Each callback_fun can be `nil`. +-- * combination: The combination of choices to generate. Possible values: +-- "powerset" and "single" (default). +-- Output: +-- * m: menu to be iterated over. +local function menu(args) + local choices = assert(args.choices or args[1]) + local name = assert(args.name or args[2]) + local selected_cb = args.selected_cb + local rejected_cb = args.rejected_cb + local extra_choices = args.extra_choices or {} + + local ch_combinations = args.combination == "powerset" and helpers.powerset(choices) or helpers.trivial_partition_set(choices) + + for _, c in pairs(extra_choices) do + ch_combinations = atable.join(ch_combinations, {{c[1]}}) + end + + local m = {} -- the menu + + for _,c in pairs(ch_combinations) do + if #c > 0 then + local cbs = {} + + -- selected choices + for _,ch in pairs(c) do + if atable.hasitem(choices, ch) then + cbs[#cbs + 1] = selected_cb and function() selected_cb(ch) end or nil + end + end + + -- rejected choices + for _,ch in pairs(choices) do + if not atable.hasitem(c, ch) and atable.hasitem(choices, ch) then + cbs[#cbs + 1] = rejected_cb and function() rejected_cb(ch) end or nil + end + end + + -- add user extra choices (like the choice "None" for example) + for _,x in pairs(extra_choices) do + if x[1] == c[1] then + cbs[#cbs + 1] = x[2] + end + end + + m[#m + 1] = { name .. ": " .. tconcat(c, " + "), cbs } + end + end + + return m +end + +return { iterate = iterate, menu = menu } diff --git a/.config/awesome/lain/util/quake.lua b/.config/awesome/lain/util/quake.lua new file mode 100755 index 0000000..8bc68a7 --- /dev/null +++ b/.config/awesome/lain/util/quake.lua @@ -0,0 +1,179 @@ +--[[ + + Licensed under GNU General Public License v2 + * (c) 2016, Luca CPZ + * (c) 2015, unknown + +--]] + +local awful = require("awful") +local capi = { client = client } +local math = math +local string = string +local pairs = pairs +local screen = screen +local setmetatable = setmetatable + +-- Quake-like Dropdown application spawn +local quake = {} + +-- If you have a rule like "awful.client.setslave" for your terminals, +-- ensure you use an exception for QuakeDD. Otherwise, you may +-- run into problems with focus. + +function quake:display() + if self.followtag then self.screen = awful.screen.focused() end + + -- First, we locate the client + local client = nil + local i = 0 + for c in awful.client.iterate(function (c) + -- c.name may be changed! + return c.instance == self.name + end) + do + i = i + 1 + if i == 1 then + client = c + else + -- Additional matching clients, let's remove the sticky bit + -- which may persist between awesome restarts. We don't close + -- them as they may be valuable. They will just turn into + -- normal clients. + c.sticky = false + c.ontop = false + c.above = false + end + end + + if not client and not self.visible then return end + + if not client then + -- The client does not exist, we spawn it + local cmd = string.format("%s %s %s", self.app, + string.format(self.argname, self.name), self.extra) + awful.spawn(cmd, { tag = self.screen.selected_tag }) + return + end + + -- Set geometry + client.floating = true + client.border_width = self.border + client.size_hints_honor = false + local maximized = client.maximized + local fullscreen = client.fullscreen + client:geometry(self.geometry[self.screen.index] or self:compute_size()) + + -- Set not sticky and on top + client.sticky = false + client.ontop = true + client.above = true + client.skip_taskbar = true + + -- Additional user settings + if self.settings then self.settings(client) end + + -- Toggle display + if self.visible then + client.hidden = false + client.maximized = self.maximized + client.fullscreen = self.fullscreen + client:raise() + self.last_tag = self.screen.selected_tag + client:tags({self.screen.selected_tag}) + capi.client.focus = client + else + self.maximized = maximized + self.fullscreen = fullscreen + client.maximized = false + client.fullscreen = false + client.hidden = true + local ctags = client:tags() + for j, _ in pairs(ctags) do + ctags[j] = nil + end + client:tags(ctags) + end + + return client +end + +function quake:compute_size() + -- skip if we already have a geometry for this screen + if not self.geometry[self.screen.index] then + local geom + if not self.overlap then + geom = screen[self.screen.index].workarea + else + geom = screen[self.screen.index].geometry + end + local width, height = self.width, self.height + if width <= 1 then width = math.floor(geom.width * width) - 2 * self.border end + if height <= 1 then height = math.floor(geom.height * height) end + local x, y + if self.horiz == "left" then x = geom.x + elseif self.horiz == "right" then x = geom.width + geom.x - width + else x = geom.x + (geom.width - width)/2 end + if self.vert == "top" then y = geom.y + elseif self.vert == "bottom" then y = geom.height + geom.y - height + else y = geom.y + (geom.height - height)/2 end + self.geometry[self.screen.index] = { x = x, y = y, width = width, height = height } + end + return self.geometry[self.screen.index] +end + +function quake:toggle() + if self.followtag then self.screen = awful.screen.focused() end + local current_tag = self.screen.selected_tag + if current_tag and self.last_tag ~= current_tag and self.visible then + local c=self:display() + if c then + c:move_to_tag(current_tag) + end + else + self.visible = not self.visible + self:display() + end +end + +function quake.new(conf) + conf = conf or {} + + conf.app = conf.app or "xterm" -- application to spawn + conf.name = conf.name or "QuakeDD" -- window name + conf.argname = conf.argname or "-name %s" -- how to specify window name + conf.extra = conf.extra or "" -- extra arguments + conf.border = conf.border or 1 -- client border width + conf.visible = conf.visible or false -- initially not visible + conf.followtag = conf.followtag or false -- spawn on currently focused screen + conf.overlap = conf.overlap or false -- overlap wibox + conf.screen = conf.screen or awful.screen.focused() + conf.settings = conf.settings + + -- If width or height <= 1 this is a proportion of the workspace + conf.height = conf.height or 0.25 -- height + conf.width = conf.width or 1 -- width + conf.vert = conf.vert or "top" -- top, bottom or center + conf.horiz = conf.horiz or "left" -- left, right or center + conf.geometry = {} -- internal use + + conf.maximized = false + conf.fullscreen = false + + local dropdown = setmetatable(conf, { __index = quake }) + + capi.client.connect_signal("manage", function(c) + if c.instance == dropdown.name and c.screen == dropdown.screen then + dropdown:display() + end + end) + capi.client.connect_signal("unmanage", function(c) + if c.instance == dropdown.name and c.screen == dropdown.screen then + dropdown.visible = false + end + end) + + return dropdown +end + +return setmetatable(quake, { __call = function(_, ...) return quake.new(...) end }) diff --git a/.config/awesome/lain/util/separators.lua b/.config/awesome/lain/util/separators.lua new file mode 100755 index 0000000..04402bb --- /dev/null +++ b/.config/awesome/lain/util/separators.lua @@ -0,0 +1,118 @@ +--[[ + + Licensed under GNU General Public License v2 + * (c) 2015, Luca CPZ + * (c) 2015, plotnikovanton + +--]] + +local wibox = require("wibox") +local gears = require("gears") +local beautiful = require("beautiful") + +-- Lain Cairo separators util submodule +-- lain.util.separators +local separators = { height = beautiful.separators_height or 0, width = beautiful.separators_width or 9 } + +-- [[ Arrow + +-- Right +function separators.arrow_right(col1, col2) + local widget = wibox.widget.base.make_widget() + widget.col1 = col1 + widget.col2 = col2 + + widget.fit = function(_, _, _) + return separators.width, separators.height + end + + widget.update = function(_, _) + widget.col1 = col1 + widget.col2 = col2 + widget:emit_signal("widget::redraw_needed") + end + + widget.draw = function(_, _, cr, width, height) + if widget.col2 ~= "alpha" then + cr:set_source_rgba(gears.color.parse_color(widget.col2)) + cr:new_path() + cr:move_to(0, 0) + cr:line_to(width, height/2) + cr:line_to(width, 0) + cr:close_path() + cr:fill() + + cr:new_path() + cr:move_to(0, height) + cr:line_to(width, height/2) + cr:line_to(width, height) + cr:close_path() + cr:fill() + end + + if widget.col1 ~= "alpha" then + cr:set_source_rgba(gears.color.parse_color(widget.col1)) + cr:new_path() + cr:move_to(0, 0) + cr:line_to(width, height/2) + cr:line_to(0, height) + cr:close_path() + cr:fill() + end + end + + return widget +end + +-- Left +function separators.arrow_left(col1, col2) + local widget = wibox.widget.base.make_widget() + widget.col1 = col1 + widget.col2 = col2 + + widget.fit = function(_, _, _) + return separators.width, separators.height + end + + widget.update = function(c1, c2) + widget.col1 = c1 + widget.col2 = c2 + widget:emit_signal("widget::redraw_needed") + end + + widget.draw = function(_, _, cr, width, height) + if widget.col1 ~= "alpha" then + cr:set_source_rgba(gears.color.parse_color(widget.col1)) + cr:new_path() + cr:move_to(width, 0) + cr:line_to(0, height/2) + cr:line_to(0, 0) + cr:close_path() + cr:fill() + + cr:new_path() + cr:move_to(width, height) + cr:line_to(0, height/2) + cr:line_to(0, height) + cr:close_path() + cr:fill() + end + + if widget.col2 ~= "alpha" then + cr:new_path() + cr:move_to(width, 0) + cr:line_to(0, height/2) + cr:line_to(width, height) + cr:close_path() + + cr:set_source_rgba(gears.color.parse_color(widget.col2)) + cr:fill() + end + end + + return widget +end + +-- ]] + +return separators diff --git a/.config/awesome/lain/widget/alsa.lua b/.config/awesome/lain/widget/alsa.lua new file mode 100755 index 0000000..202dc98 --- /dev/null +++ b/.config/awesome/lain/widget/alsa.lua @@ -0,0 +1,54 @@ +--[[ + + Licensed under GNU General Public License v2 + * (c) 2013, Luca CPZ + * (c) 2010, Adrian C. + +--]] + +local helpers = require("lain.helpers") +local shell = require("awful.util").shell +local wibox = require("wibox") +local string = string + +-- ALSA volume +-- lain.widget.alsa + +local function factory(args) + args = args or {} + local alsa = { widget = args.widget or wibox.widget.textbox() } + local timeout = args.timeout or 5 + local settings = args.settings or function() end + + alsa.cmd = args.cmd or "amixer" + alsa.channel = args.channel or "Master" + alsa.togglechannel = args.togglechannel + + local format_cmd = string.format("%s get %s", alsa.cmd, alsa.channel) + + if alsa.togglechannel then + format_cmd = { shell, "-c", string.format("%s get %s; %s get %s", + alsa.cmd, alsa.channel, alsa.cmd, alsa.togglechannel) } + end + + alsa.last = {} + + function alsa.update() + helpers.async(format_cmd, function(mixer) + local l,s = string.match(mixer, "([%d]+)%%.*%[([%l]*)") + l = tonumber(l) + if alsa.last.level ~= l or alsa.last.status ~= s then + volume_now = { level = l, status = s } + widget = alsa.widget + settings() + alsa.last = volume_now + end + end) + end + + helpers.newtimer(string.format("alsa-%s-%s", alsa.cmd, alsa.channel), timeout, alsa.update) + + return alsa +end + +return factory diff --git a/.config/awesome/lain/widget/alsabar.lua b/.config/awesome/lain/widget/alsabar.lua new file mode 100755 index 0000000..8e8cd3a --- /dev/null +++ b/.config/awesome/lain/widget/alsabar.lua @@ -0,0 +1,166 @@ +--[[ + + Licensed under GNU General Public License v2 + * (c) 2013, Luca CPZ + * (c) 2013, Rman + +--]] + +local helpers = require("lain.helpers") +local awful = require("awful") +local naughty = require("naughty") +local wibox = require("wibox") +local math = math +local string = string +local type = type +local tonumber = tonumber + +-- ALSA volume bar +-- lain.widget.alsabar + +local function factory(args) + local alsabar = { + colors = { + background = "#000000", + mute = "#EB8F8F", + unmute = "#A4CE8A" + }, + + _current_level = 0, + _playback = "off" + } + + args = args or {} + + local timeout = args.timeout or 5 + local settings = args.settings or function() end + local width = args.width or 63 + local height = args.height or 1 + local margins = args.margins or 1 + local ticks = args.ticks or false + local ticks_size = args.ticks_size or 7 + local tick = args.tick or "|" + local tick_pre = args.tick_pre or "[" + local tick_post = args.tick_post or "]" + local tick_none = args.tick_none or " " + + alsabar.cmd = args.cmd or "amixer" + alsabar.channel = args.channel or "Master" + alsabar.togglechannel = args.togglechannel + alsabar.colors = args.colors or alsabar.colors + alsabar.followtag = args.followtag or false + alsabar.notification_preset = args.notification_preset + + if not alsabar.notification_preset then + alsabar.notification_preset = { font = "Monospace 10" } + end + + local format_cmd = string.format("%s get %s", alsabar.cmd, alsabar.channel) + + if alsabar.togglechannel then + format_cmd = { awful.util.shell, "-c", string.format("%s get %s; %s get %s", + alsabar.cmd, alsabar.channel, alsabar.cmd, alsabar.togglechannel) } + end + + alsabar.bar = wibox.widget { + color = alsabar.colors.unmute, + background_color = alsabar.colors.background, + forced_height = height, + forced_width = width, + margins = margins, + paddings = margins, + ticks = ticks, + ticks_size = ticks_size, + widget = wibox.widget.progressbar + } + + alsabar.tooltip = awful.tooltip({ objects = { alsabar.bar } }) + + function alsabar.update(callback) + helpers.async(format_cmd, function(mixer) + local vol, playback = string.match(mixer, "([%d]+)%%.*%[([%l]*)") + + if not vol or not playback then return end + + if vol ~= alsabar._current_level or playback ~= alsabar._playback then + alsabar._current_level = tonumber(vol) + alsabar.bar:set_value(alsabar._current_level / 100) + if alsabar._current_level == 0 or playback == "off" then + alsabar._playback = playback + alsabar.tooltip:set_text("[Muted]") + alsabar.bar.color = alsabar.colors.mute + else + alsabar._playback = "on" + alsabar.tooltip:set_text(string.format("%s: %s", alsabar.channel, vol)) + alsabar.bar.color = alsabar.colors.unmute + end + + volume_now = { + level = alsabar._current_level, + status = alsabar._playback + } + + settings() + + if type(callback) == "function" then callback() end + end + end) + end + + function alsabar.notify() + alsabar.update(function() + local preset = alsabar.notification_preset + + preset.title = string.format("%s - %s%%", alsabar.channel, alsabar._current_level) + + if alsabar._playback == "off" then + preset.title = preset.title .. " Muted" + end + + -- tot is the maximum number of ticks to display in the notification + local tot = alsabar.notification_preset.max_ticks + + if not tot then + local wib = awful.screen.focused().mywibox + -- if we can grab mywibox, tot is defined as its height if + -- horizontal, or width otherwise + if wib then + if wib.position == "left" or wib.position == "right" then + tot = wib.width + else + tot = wib.height + end + -- fallback: default horizontal wibox height + else + tot = 20 + end + end + + local int = math.modf((alsabar._current_level / 100) * tot) + preset.text = string.format( + "%s%s%s%s", + tick_pre, + string.rep(tick, int), + string.rep(tick_none, tot - int), + tick_post + ) + + if alsabar.followtag then preset.screen = awful.screen.focused() end + + if not alsabar.notification then + alsabar.notification = naughty.notify { + preset = preset, + destroy = function() alsabar.notification = nil end + } + else + naughty.replace_text(alsabar.notification, preset.title, preset.text) + end + end) + end + + helpers.newtimer(string.format("alsabar-%s-%s", alsabar.cmd, alsabar.channel), timeout, alsabar.update) + + return alsabar +end + +return factory diff --git a/.config/awesome/lain/widget/bat.lua b/.config/awesome/lain/widget/bat.lua new file mode 100755 index 0000000..260f4b9 --- /dev/null +++ b/.config/awesome/lain/widget/bat.lua @@ -0,0 +1,236 @@ +--[[ + + Licensed under GNU General Public License v2 + * (c) 2013, Luca CPZ + * (c) 2010-2012, Peter Hofmann + +--]] + +local helpers = require("lain.helpers") +local fs = require("gears.filesystem") +local naughty = require("naughty") +local wibox = require("wibox") +local math = math +local string = string +local ipairs = ipairs +local tonumber = tonumber + +-- Battery infos +-- lain.widget.bat + +local function factory(args) + local pspath = args.pspath or "/sys/class/power_supply/" + + if not fs.is_dir(pspath) then + naughty.notify { text = "lain.widget.bat: invalid power supply path", timeout = 0 } + return + end + + args = args or {} + + local bat = { widget = args.widget or wibox.widget.textbox() } + local timeout = args.timeout or 30 + local notify = args.notify or "on" + local full_notify = args.full_notify or notify + local n_perc = args.n_perc or { 5, 15 } + local batteries = args.batteries or (args.battery and {args.battery}) or {} + local ac = args.ac or "AC0" + local settings = args.settings or function() end + + function bat.get_batteries() + helpers.line_callback("ls -1 " .. pspath, function(line) + local bstr = string.match(line, "BAT%w+") + if bstr then + batteries[#batteries + 1] = bstr + else + ac = string.match(line, "A%w+") or ac + end + end) + end + + if #batteries == 0 then bat.get_batteries() end + + bat_notification_critical_preset = { + title = "Battery exhausted", + text = "Shutdown imminent", + timeout = 15, + fg = "#000000", + bg = "#FFFFFF" + } + + bat_notification_low_preset = { + title = "Battery low", + text = "Plug the cable!", + timeout = 15, + fg = "#202020", + bg = "#CDCDCD" + } + + bat_notification_charged_preset = { + title = "Battery full", + text = "You can unplug the cable", + timeout = 15, + fg = "#202020", + bg = "#CDCDCD" + } + + bat_now = { + status = "N/A", + ac_status = "N/A", + perc = "N/A", + time = "N/A", + watt = "N/A", + capacity = "N/A" + } + + bat_now.n_status = {} + bat_now.n_perc = {} + bat_now.n_capacity = {} + for i = 1, #batteries do + bat_now.n_status[i] = "N/A" + bat_now.n_perc[i] = 0 + bat_now.n_capacity[i] = 0 + end + + -- used to notify full charge only once before discharging + local fullnotification = false + + function bat.update() + -- luacheck: globals bat_now + local sum_rate_current = 0 + local sum_rate_voltage = 0 + local sum_rate_power = 0 + local sum_rate_energy = 0 + local sum_energy_now = 0 + local sum_energy_full = 0 + local sum_charge_full = 0 + local sum_charge_design = 0 + + for i, battery in ipairs(batteries) do + local bstr = pspath .. battery + local present = helpers.first_line(bstr .. "/present") + + if tonumber(present) == 1 then + -- current_now(I)[uA], voltage_now(U)[uV], power_now(P)[uW] + local rate_current = tonumber(helpers.first_line(bstr .. "/current_now")) + local rate_voltage = tonumber(helpers.first_line(bstr .. "/voltage_now")) + local rate_power = tonumber(helpers.first_line(bstr .. "/power_now")) + local charge_full = tonumber(helpers.first_line(bstr .. "/charge_full")) + local charge_design = tonumber(helpers.first_line(bstr .. "/charge_full_design")) + + -- energy_now(P)[uWh], charge_now(I)[uAh] + local energy_now = tonumber(helpers.first_line(bstr .. "/energy_now") or + helpers.first_line(bstr .. "/charge_now")) + + -- energy_full(P)[uWh], charge_full(I)[uAh] + local energy_full = tonumber(helpers.first_line(bstr .. "/energy_full") or + charge_full) + + local energy_percentage = tonumber(helpers.first_line(bstr .. "/capacity")) or + math.floor((energy_now / energy_full) * 100) + + bat_now.n_status[i] = helpers.first_line(bstr .. "/status") or "N/A" + bat_now.n_perc[i] = energy_percentage or bat_now.n_perc[i] + + if not charge_design or charge_design == 0 then + bat_now.n_capacity[i] = 0 + else + bat_now.n_capacity[i] = math.floor((charge_full / charge_design) * 100) + end + + sum_rate_current = sum_rate_current + (rate_current or 0) + sum_rate_voltage = sum_rate_voltage + (rate_voltage or 0) + sum_rate_power = sum_rate_power + (rate_power or 0) + sum_rate_energy = sum_rate_energy + (rate_power or (((rate_voltage or 0) * (rate_current or 0)) / 1e6)) + sum_energy_now = sum_energy_now + (energy_now or 0) + sum_energy_full = sum_energy_full + (energy_full or 0) + sum_charge_full = sum_charge_full + (charge_full or 0) + sum_charge_design = sum_charge_design + (charge_design or 0) + end + end + + bat_now.capacity = math.floor(math.min(100, (sum_charge_full / sum_charge_design) * 100)) + + -- When one of the battery is charging, others' status are either + -- "Full", "Unknown" or "Charging". When the laptop is not plugged in, + -- one or more of the batteries may be full, but only one battery + -- discharging suffices to set global status to "Discharging". + bat_now.status = bat_now.n_status[1] or "N/A" + for _,status in ipairs(bat_now.n_status) do + if status == "Discharging" or status == "Charging" then + bat_now.status = status + end + end + bat_now.ac_status = tonumber(helpers.first_line(string.format("%s%s/online", pspath, ac))) or "N/A" + + if bat_now.status ~= "N/A" then + if bat_now.status ~= "Full" and sum_rate_power == 0 and bat_now.ac_status == 1 then + bat_now.perc = math.floor(math.min(100, (sum_energy_now / sum_energy_full) * 100)) + bat_now.time = "00:00" + bat_now.watt = 0 + + -- update {perc,time,watt} iff battery not full and rate > 0 + elseif bat_now.status ~= "Full" then + local rate_time = 0 + -- Calculate time and watt if rates are greater then 0 + if (sum_rate_power > 0 or sum_rate_current > 0) then + local div = (sum_rate_power > 0 and sum_rate_power) or sum_rate_current + + if bat_now.status == "Charging" then + rate_time = (sum_energy_full - sum_energy_now) / div + else -- Discharging + rate_time = sum_energy_now / div + end + + if 0 < rate_time and rate_time < 0.01 then -- check for magnitude discrepancies (#199) + rate_time_magnitude = math.abs(math.floor(math.log10(rate_time))) + rate_time = rate_time * 10^(rate_time_magnitude - 2) + end + end + + local hours = math.floor(rate_time) + local minutes = math.floor((rate_time - hours) * 60) + bat_now.perc = math.floor(math.min(100, (sum_energy_now / sum_energy_full) * 100)) + bat_now.time = string.format("%02d:%02d", hours, minutes) + bat_now.watt = tonumber(string.format("%.2f", sum_rate_energy / 1e6)) + elseif bat_now.status == "Full" then + bat_now.perc = 100 + bat_now.time = "00:00" + bat_now.watt = 0 + end + end + + widget = bat.widget + settings() + + -- notifications for critical, low, and full levels + if notify == "on" then + if bat_now.status == "Discharging" then + if tonumber(bat_now.perc) <= n_perc[1] then + bat.id = naughty.notify({ + preset = bat_notification_critical_preset, + replaces_id = bat.id + }).id + elseif tonumber(bat_now.perc) <= n_perc[2] then + bat.id = naughty.notify({ + preset = bat_notification_low_preset, + replaces_id = bat.id + }).id + end + fullnotification = false + elseif bat_now.status == "Full" and full_notify == "on" and not fullnotification then + bat.id = naughty.notify({ + preset = bat_notification_charged_preset, + replaces_id = bat.id + }).id + fullnotification = true + end + end + end + + helpers.newtimer("batteries", timeout, bat.update) + + return bat +end + +return factory diff --git a/.config/awesome/lain/widget/cal.lua b/.config/awesome/lain/widget/cal.lua new file mode 100755 index 0000000..7543684 --- /dev/null +++ b/.config/awesome/lain/widget/cal.lua @@ -0,0 +1,190 @@ +--[[ + + Licensed under GNU General Public License v2 + * (c) 2018, Luca CPZ + +--]] + +local helpers = require("lain.helpers") +local markup = require("lain.util.markup") +local awful = require("awful") +local naughty = require("naughty") +local floor = math.floor +local os = os +local pairs = pairs +local string = string +local tconcat = table.concat +local type = type +local tonumber = tonumber +local tostring = tostring +local utf8 = utf8 + +-- Calendar notification +-- lain.widget.cal + +local function factory(args) + args = args or {} + local cal = { + attach_to = args.attach_to or {}, + week_start = args.week_start or 2, + three = args.three or false, + followtag = args.followtag or false, + week_number = args.week_number or "none", + week_number_format = args.week_number_format or args.week_number == "left" and "%3d | " or "| %-3d", + icons = args.icons or helpers.icons_dir .. "cal/white/", + notification_preset = args.notification_preset or { + font = "Monospace 10", fg = "#FFFFFF", bg = "#000000" + } + } + + function cal.get_week_number(m, st_day, x) + local date = os.date("*t", m) + + local week_step = (x ~= 0 and floor((x + st_day) / 7) - 1 or 0); + + local display_time = os.time { + year = date.year, month = date.month, day = date.day + 7 * week_step + } + + return string.format(cal.week_number_format, os.date("%V", display_time)) + end + + function cal.sum_week_days(x, y) + return (x + y) % 7 + end + + function cal.build(month, year) + local current_month, current_year = tonumber(os.date("%m")), tonumber(os.date("%Y")) + local is_current_month = (not month or not year) or (month == current_month and year == current_year) + local today = is_current_month and tonumber(os.date("%d")) -- otherwise nil and not highlighted + local t = os.time { year = year or current_year, month = month and month+1 or current_month+1, day = 0 } + local d = os.date("*t", t) + local mth_days, st_day, this_month = d.day, (d.wday-d.day-cal.week_start+1)%7, os.date("%B %Y", t) + local notifytable = { [1] = string.format("%s%s\n", string.rep(" ", floor((28 - this_month:len())/2)), markup.bold(this_month)) } + for x = 0,6 do notifytable[#notifytable+1] = os.date("%a", os.time { year=2006, month=1, day=x+cal.week_start }):sub(1, utf8.offset(1, 3)) .. " " end + notifytable[#notifytable] = string.format("%s\n%s", notifytable[#notifytable]:sub(1, -2), string.rep(" ", st_day*4)) + local strx + for x = 1,mth_days do + strx = x + if x == today then + if x < 10 then x = " " .. x end + strx = markup.bold(markup.color(cal.notification_preset.bg, cal.notification_preset.fg, x) .. " ") + end + strx = string.format("%s%s", string.rep(" ", 3 - tostring(x):len()), strx) + notifytable[#notifytable+1] = string.format("%-4s%s", strx, (x+st_day)%7==0 and x ~= mth_days and "\n" or "") + end + if string.len(cal.icons or "") > 0 and today then cal.icon = cal.icons .. today .. ".png" end + cal.month, cal.year = d.month, d.year + + if cal.week_number ~= "none" then + local m = os.time { year = year or current_year, month = month and month or current_month, day = 1 } + local head_prepend = string.rep(" ", tostring(string.format(cal.week_number_format, 0)):len()) + + if cal.week_number == "left" then + notifytable[1] = head_prepend .. notifytable[1] -- month-year row + notifytable[2] = head_prepend .. notifytable[2] -- weekdays row + notifytable[8] = notifytable[8]:gsub("\n", "\n" .. cal.get_week_number(m, st_day, 0)) -- first week of the month + + for x = 10,#notifytable do + if cal.sum_week_days(st_day, x) == 2 then + notifytable[x] = cal.get_week_number(m, st_day, x) .. notifytable[x] + end + end + elseif cal.week_number == "right" then + notifytable[8] = notifytable[8]:gsub("\n", head_prepend .. "\n") -- weekdays row + for x = 9,#notifytable do + if cal.sum_week_days(st_day, x) == 1 then + notifytable[x] = notifytable[x]:gsub("\n", cal.get_week_number(m, st_day, x - 7) .. "\n") + end + end + -- last week of the month + local end_days = cal.sum_week_days(st_day, mth_days) + if end_days ~= 0 then end_days = 7 - end_days end + notifytable[#notifytable] = notifytable[#notifytable] .. string.rep(" ", 4 * end_days) .. cal.get_week_number(m, st_day, mth_days + end_days) + end + end + + return notifytable + end + + function cal.getdate(month, year, offset) + if not month or not year then + month = tonumber(os.date("%m")) + year = tonumber(os.date("%Y")) + end + + month = month + offset + + while month > 12 do + month = month - 12 + year = year + 1 + end + + while month < 1 do + month = month + 12 + year = year - 1 + end + + return month, year + end + + function cal.hide() + if not cal.notification then return end + naughty.destroy(cal.notification) + cal.notification = nil + end + + function cal.show(seconds, month, year, scr) + local text = tconcat(cal.build(month, year)) + + if cal.three then + local current_month, current_year = cal.month, cal.year + local prev_month, prev_year = cal.getdate(cal.month, cal.year, -1) + local next_month, next_year = cal.getdate(cal.month, cal.year, 1) + text = string.format("%s\n\n%s\n\n%s", + tconcat(cal.build(prev_month, prev_year)), text, + tconcat(cal.build(next_month, next_year))) + cal.month, cal.year = current_month, current_year + end + + if cal.notification then + local title = cal.notification_preset.title or nil + naughty.replace_text(cal.notification, title, text) + return + end + + cal.notification = naughty.notify { + preset = cal.notification_preset, + screen = cal.followtag and awful.screen.focused() or scr or 1, + icon = cal.icon, + timeout = type(seconds) == "number" and seconds or cal.notification_preset.timeout or 5, + text = text + } + end + + function cal.hover_on() cal.show(0) end + function cal.move(offset) + offset = offset or 0 + cal.month, cal.year = cal.getdate(cal.month, cal.year, offset) + cal.show(0, cal.month, cal.year) + end + function cal.prev() cal.move(-1) end + function cal.next() cal.move( 1) end + + function cal.attach(widget) + widget:connect_signal("mouse::enter", cal.hover_on) + widget:connect_signal("mouse::leave", cal.hide) + widget:buttons(awful.util.table.join( + awful.button({}, 1, cal.prev), + awful.button({}, 3, cal.next), + awful.button({}, 2, cal.hover_on), + awful.button({}, 5, cal.prev), + awful.button({}, 4, cal.next))) + end + + for _, widget in pairs(cal.attach_to) do cal.attach(widget) end + + return cal +end + +return factory diff --git a/.config/awesome/lain/widget/contrib/init.lua b/.config/awesome/lain/widget/contrib/init.lua new file mode 100755 index 0000000..9e863a5 --- /dev/null +++ b/.config/awesome/lain/widget/contrib/init.lua @@ -0,0 +1,18 @@ +--[[ + + Lain + Layouts, widgets and utilities for Awesome WM + + Users contributed widgets section + + Licensed under GNU General Public License v2 + * (c) 2013, Luca CPZ + +--]] + +local wrequire = require("lain.helpers").wrequire +local setmetatable = setmetatable + +local widget = { _NAME = "lain.widget.contrib" } + +return setmetatable(widget, { __index = wrequire }) diff --git a/.config/awesome/lain/widget/contrib/moc.lua b/.config/awesome/lain/widget/contrib/moc.lua new file mode 100755 index 0000000..ad6452e --- /dev/null +++ b/.config/awesome/lain/widget/contrib/moc.lua @@ -0,0 +1,97 @@ +--[[ + + Licensed under GNU General Public License v2 + * (c) 2014, anticlockwise + +--]] + +local helpers = require("lain.helpers") +local shell = require("awful.util").shell +local focused = require("awful.screen").focused +local escape_f = require("awful.util").escape +local naughty = require("naughty") +local wibox = require("wibox") +local os = os +local string = string + +-- MOC audio player +-- lain.widget.contrib.moc + +local function factory(args) + args = args or {} + + local moc = { widget = args.widget or wibox.widget.textbox() } + local timeout = args.timeout or 2 + local music_dir = args.music_dir or os.getenv("HOME") .. "/Music" + local cover_pattern = args.cover_pattern or "*\\.(jpg|jpeg|png|gif)$" + local cover_size = args.cover_size or 100 + local default_art = args.default_art or "" + local followtag = args.followtag or false + local settings = args.settings or function() end + + moc_notification_preset = { title = "Now playing", timeout = 6 } + + helpers.set_map("current moc track", nil) + + function moc.update() + helpers.async("mocp -i", function(f) + moc_now = { + state = "N/A", + file = "N/A", + artist = "N/A", + title = "N/A", + album = "N/A", + elapsed = "N/A", + total = "N/A" + } + + for line in string.gmatch(f, "[^\n]+") do + for k, v in string.gmatch(line, "([%w]+):[%s](.*)$") do + if k == "State" then moc_now.state = v + elseif k == "File" then moc_now.file = v + elseif k == "Artist" then moc_now.artist = escape_f(v) + elseif k == "SongTitle" then moc_now.title = escape_f(v) + elseif k == "Album" then moc_now.album = escape_f(v) + elseif k == "CurrentTime" then moc_now.elapsed = escape_f(v) + elseif k == "TotalTime" then moc_now.total = escape_f(v) + end + end + end + + moc_notification_preset.text = string.format("%s (%s) - %s\n%s", moc_now.artist, + moc_now.album, moc_now.total, moc_now.title) + widget = moc.widget + settings() + + if moc_now.state == "PLAY" then + if moc_now.title ~= helpers.get_map("current moc track") then + helpers.set_map("current moc track", moc_now.title) + + if followtag then moc_notification_preset.screen = focused() end + + local common = { + preset = moc_notification_preset, + icon = default_art, + icon_size = cover_size, + replaces_id = moc.id, + } + + local path = string.format("%s/%s", music_dir, string.match(moc_now.file, ".*/")) + local cover = string.format("find '%s' -maxdepth 1 -type f | egrep -i -m1 '%s'", path, cover_pattern) + helpers.async({ shell, "-c", cover }, function(current_icon) + common.icon = current_icon:gsub("\n", "") + moc.id = naughty.notify(common).id + end) + end + elseif moc_now.state ~= "PAUSE" then + helpers.set_map("current moc track", nil) + end + end) + end + + moc.timer = helpers.newtimer("moc", timeout, moc.update, true, true) + + return moc +end + +return factory diff --git a/.config/awesome/lain/widget/contrib/redshift.lua b/.config/awesome/lain/widget/contrib/redshift.lua new file mode 100755 index 0000000..d91d941 --- /dev/null +++ b/.config/awesome/lain/widget/contrib/redshift.lua @@ -0,0 +1,54 @@ +--[[ + + Licensed under GNU General Public License v2 + * (c) 2017, Luca CPZ + * (c) 2014, blueluke + +--]] + +local async = require("lain.helpers").async +local awful = require("awful") +local execute = os.execute +local type = type + +-- Redshift +-- lain.widget.contrib.redshift +local redshift = { active = false, pid = nil } + +function redshift.start() + execute("pkill redshift") + awful.spawn.with_shell("redshift -x") -- clear adjustments + redshift.pid = awful.spawn.with_shell("redshift") + redshift.active = true + if type(redshift.update_fun) == "function" then + redshift.update_fun(redshift.active) + end +end + +function redshift.toggle() + async({ awful.util.shell, "-c", string.format("ps -p %d -o pid=", redshift.pid) }, function(f) + if f and #f > 0 then -- redshift is running + -- Sending -USR1 toggles redshift (See project website) + execute("pkill -USR1 redshift") + redshift.active = not redshift.active + else -- not started or killed, (re)start it + redshift.start() + end + redshift.update_fun(redshift.active) + end) +end + +-- Attach to a widget +-- Provides a button which toggles redshift on/off on click +-- @param widget: Widget to attach to. +-- @param fun: Function to be run each time redshift is toggled (optional). +-- Use it to update widget text or icons on status change. +function redshift.attach(widget, fun) + redshift.update_fun = fun or function() end + if not redshift.pid then redshift.start() end + if widget then + widget:buttons(awful.util.table.join(awful.button({}, 1, function () redshift.toggle() end))) + end +end + +return redshift diff --git a/.config/awesome/lain/widget/contrib/task.lua b/.config/awesome/lain/widget/contrib/task.lua new file mode 100755 index 0000000..2311996 --- /dev/null +++ b/.config/awesome/lain/widget/contrib/task.lua @@ -0,0 +1,92 @@ +--[[ + + Licensed under GNU General Public License v2 + * (c) 2013, Jan Xie + +--]] + +local helpers = require("lain.helpers") +local markup = require("lain.util").markup +local awful = require("awful") +local naughty = require("naughty") +local mouse = mouse + +-- Taskwarrior notification +-- lain.widget.contrib.task +local task = {} + +function task.hide() + if not task.notification then return end + naughty.destroy(task.notification) + task.notification = nil +end + +function task.show(scr) + task.notification_preset.screen = task.followtag and awful.screen.focused() or scr or 1 + + helpers.async({ awful.util.shell, "-c", task.show_cmd }, function(f) + local widget_focused = true + + if mouse.current_widgets then + widget_focused = false + for _,v in ipairs(mouse.current_widgets) do + if task.widget == v then + widget_focused = true + break + end + end + end + + if widget_focused then + task.hide() + task.notification = naughty.notify { + preset = task.notification_preset, + title = "task next", + text = markup.font(task.notification_preset.font, + awful.util.escape(f:gsub("\n*$", ""))) + } + end + end) +end + +function task.prompt() + awful.prompt.run { + prompt = task.prompt_text, + textbox = awful.screen.focused().mypromptbox.widget, + exe_callback = function(t) + helpers.async(t, function(f) + naughty.notify { + preset = task.notification_preset, + title = t, + text = markup.font(task.notification_preset.font, + awful.util.escape(f:gsub("\n*$", ""))) + } + end) + end, + history_path = awful.util.getdir("cache") .. "/history_task" + } +end + +function task.attach(widget, args) + args = args or {} + + task.show_cmd = args.show_cmd or "task next" + task.prompt_text = args.prompt_text or "Enter task command: " + task.followtag = args.followtag or false + task.notification_preset = args.notification_preset + task.widget = widget + + if not task.notification_preset then + task.notification_preset = { + font = "Monospace 10", + icon = helpers.icons_dir .. "/taskwarrior.png" + } + end + + if widget then + widget:connect_signal("mouse::enter", function () task.show() end) + widget:connect_signal("mouse::leave", function () task.hide() end) + end +end + +return task diff --git a/.config/awesome/lain/widget/contrib/tp_smapi.lua b/.config/awesome/lain/widget/contrib/tp_smapi.lua new file mode 100755 index 0000000..87c5e51 --- /dev/null +++ b/.config/awesome/lain/widget/contrib/tp_smapi.lua @@ -0,0 +1,147 @@ +--[[ + + Licensed under GNU General Public License v2 + * (c) 2018, Luca CPZ + * (c) 2013, Conor Heine + +--]] + +local helpers = require("lain.helpers") +local focused = require("awful.screen").focused +local naughty = require("naughty") +local wibox = require("wibox") +local string = string +local type = type + +-- ThinkPad battery infos and widget creator +-- http://www.thinkwiki.org/wiki/Tp_smapi +-- lain.widget.contrib.tp_smapi + +local function factory(apipath) + local tp_smapi = { + path = apipath or "/sys/devices/platform/smapi" + } + + function tp_smapi.get(batid, feature) + return helpers.first_line(string.format("%s/%s/%s", tp_smapi.path, batid or "BAT0", feature or "")) + end + + function tp_smapi.installed(batid) + return tp_smapi.get(batid, "installed") == "1" + end + + function tp_smapi.status(batid) + return tp_smapi.get(batid, "state") + end + + function tp_smapi.percentage(batid) + return tp_smapi.get(batid, "remaining_percent") + end + + -- either running or charging time + function tp_smapi.time(batid) + local status = tp_smapi.status(batid) + local mins_left = tp_smapi.get(batid, string.match(string.lower(status), "discharging") and "remaining_running_time" or "remaining_charging_time") + if not string.find(mins_left, "^%d+") then return "N/A" end + return string.format("%02d:%02d", math.floor(mins_left / 60), mins_left % 60) -- HH:mm + end + + function tp_smapi.hide() + if not tp_smapi.notification then return end + naughty.destroy(tp_smapi.notification) + tp_smapi.notification = nil + end + + function tp_smapi.show(batid, seconds, scr) + if not tp_smapi.installed(batid) then return end + + local mfgr = tp_smapi.get(batid, "manufacturer") or "no_mfgr" + local model = tp_smapi.get(batid, "model") or "no_model" + local chem = tp_smapi.get(batid, "chemistry") or "no_chem" + local status = tp_smapi.get(batid, "state") + local time = tp_smapi.time(batid) + local msg + + if status and status ~= "idle" then + msg = string.format("[%s] %s %s", status, time ~= "N/A" and time or "unknown remaining time", + string.lower(status):gsub(" ", ""):gsub("\n", "") == "charging" and " until charged" or " remaining") + else + msg = "On AC power" + end + + tp_smapi.hide() + tp_smapi.notification = naughty.notify { + title = string.format("%s: %s %s (%s)", batid, mfgr, model, chem), + text = msg, + timeout = type(seconds) == "number" and seconds or 0, + screen = scr or focused() + } + end + + function tp_smapi.create_widget(args) + args = args or {} + + local pspath = args.pspath or "/sys/class/power_supply/" + local batteries = args.batteries or (args.battery and {args.battery}) or {} + local timeout = args.timeout or 30 + local settings = args.settings or function() end + + if #batteries == 0 then + helpers.line_callback("ls -1 " .. pspath, function(line) + local bstr = string.match(line, "BAT%w+") + if bstr then batteries[#batteries + 1] = bstr end + end) + end + + local all_batteries_installed = true + + for _, battery in ipairs(batteries) do + if not tp_smapi.installed(battery) then + naughty.notify { + preset = naughty.config.critical, + title = "tp_smapi: error while creating widget", + text = string.format("battery %s is not installed", battery) + } + all_batteries_installed = false + break + end + end + + if not all_batteries_installed then return end + + tpbat = { + batteries = batteries, + widget = args.widget or wibox.widget.textbox() + } + + function tpbat.update() + tpbat_now = { + n_status = {}, + n_perc = {}, + n_time = {}, + status = "N/A" + } + + for i = 1, #batteries do + tpbat_now.n_status[i] = tp_smapi.status(batteries[i]) or "N/A" + tpbat_now.n_perc[i] = tp_smapi.percentage(batteries[i]) + tpbat_now.n_time[i] = tp_smapi.time(batteries[i]) or "N/A" + + if not tpbat_now.n_status[i]:lower():match("full") then + tpbat_now.status = tpbat_now.n_status[i] + end + end + + widget = tpbat.widget -- backwards compatibility + settings() + end + + helpers.newtimer("thinkpad-batteries", timeout, tpbat.update) + + return tpbat + end + + return tp_smapi +end + +return factory diff --git a/.config/awesome/lain/widget/cpu.lua b/.config/awesome/lain/widget/cpu.lua new file mode 100755 index 0000000..6c51115 --- /dev/null +++ b/.config/awesome/lain/widget/cpu.lua @@ -0,0 +1,75 @@ +--[[ + + Licensed under GNU General Public License v2 + * (c) 2013, Luca CPZ + * (c) 2010-2012, Peter Hofmann + +--]] + +local helpers = require("lain.helpers") +local wibox = require("wibox") +local math = math +local string = string + +-- CPU usage +-- lain.widget.cpu + +local function factory(args) + args = args or {} + + local cpu = { core = {}, widget = args.widget or wibox.widget.textbox() } + local timeout = args.timeout or 2 + local settings = args.settings or function() end + + function cpu.update() + -- Read the amount of time the CPUs have spent performing + -- different kinds of work. Read the first line of /proc/stat + -- which is the sum of all CPUs. + for index,time in pairs(helpers.lines_match("cpu","/proc/stat")) do + local coreid = index - 1 + local core = cpu.core[coreid] or + { last_active = 0 , last_total = 0, usage = 0 } + local at = 1 + local idle = 0 + local total = 0 + + for field in string.gmatch(time, "[%s]+([^%s]+)") do + -- 4 = idle, 5 = ioWait. Essentially, the CPUs have done + -- nothing during these times. + if at == 4 or at == 5 then + idle = idle + field + end + total = total + field + at = at + 1 + end + + local active = total - idle + + if core.last_active ~= active or core.last_total ~= total then + -- Read current data and calculate relative values. + local dactive = active - core.last_active + local dtotal = total - core.last_total + local usage = math.ceil(math.abs((dactive / dtotal) * 100)) + + core.last_active = active + core.last_total = total + core.usage = usage + + -- Save current data for the next run. + cpu.core[coreid] = core + end + end + + cpu_now = cpu.core + cpu_now.usage = cpu_now[0].usage + widget = cpu.widget + + settings() + end + + helpers.newtimer("cpu", timeout, cpu.update) + + return cpu +end + +return factory diff --git a/.config/awesome/lain/widget/fs.lua b/.config/awesome/lain/widget/fs.lua new file mode 100755 index 0000000..b3a2dad --- /dev/null +++ b/.config/awesome/lain/widget/fs.lua @@ -0,0 +1,156 @@ +--[[ + + Licensed under GNU General Public License v2 + * (c) 2018, Uli Schlacter + * (c) 2018, Otto Modinos + * (c) 2013, Luca CPZ + +--]] + +local helpers = require("lain.helpers") +local Gio = require("lgi").Gio +local focused = require("awful.screen").focused +local wibox = require("wibox") +local naughty = require("naughty") +local gears = require("gears") +local math = math +local string = string +local tconcat = table.concat +local type = type +local query_size = Gio.FILE_ATTRIBUTE_FILESYSTEM_SIZE +local query_free = Gio.FILE_ATTRIBUTE_FILESYSTEM_FREE +local query_used = Gio.FILE_ATTRIBUTE_FILESYSTEM_USED +local query = query_size .. "," .. query_free .. "," .. query_used + +-- File systems info +-- lain.widget.fs + +local function factory(args) + args = args or {} + + local fs = { + widget = args.widget or wibox.widget.textbox(), + units = { + [1] = "Kb", [2] = "Mb", [3] = "Gb", + [4] = "Tb", [5] = "Pb", [6] = "Eb", + [7] = "Zb", [8] = "Yb" + } + } + + function fs.hide() + if not fs.notification then return end + naughty.destroy(fs.notification) + fs.notification = nil + end + + function fs.show(seconds, scr) + fs.hide() + fs.update(function() + fs.notification_preset.screen = fs.followtag and focused() or scr or 1 + fs.notification = naughty.notify { + preset = fs.notification_preset, + timeout = type(seconds) == "number" and seconds or 5 + } + end) + end + + local timeout = args.timeout or 600 + local partition = args.partition + local threshold = args.threshold or 99 + local showpopup = args.showpopup or "on" + local settings = args.settings or function() end + + fs.followtag = args.followtag or false + fs.notification_preset = args.notification_preset + + if not fs.notification_preset then + fs.notification_preset = { + font = "Monospace 10", + fg = "#FFFFFF", + bg = "#000000" + } + end + + local function update_synced() + local pathlen = 10 + fs_now = {} + + local notifypaths = {} + for _, mount in ipairs(Gio.unix_mounts_get()) do + local path = Gio.unix_mount_get_mount_path(mount) + local root = Gio.File.new_for_path(path) + local info = root:query_filesystem_info(query) + + if info then + local size = info:get_attribute_uint64(query_size) + local used = info:get_attribute_uint64(query_used) + local free = info:get_attribute_uint64(query_free) + + if size > 0 then + local units = math.floor(math.log(size)/math.log(1024)) + + fs_now[path] = { + units = fs.units[units], + percentage = math.floor(100 * used / size), -- used percentage + size = size / math.pow(1024, units), + used = used / math.pow(1024, units), + free = free / math.pow(1024, units) + } + + if fs_now[path].percentage > 0 then -- don't notify unused file systems + notifypaths[#notifypaths+1] = path + + if #path > pathlen then + pathlen = #path + end + end + end + end + end + + widget = fs.widget + settings() + + if partition and fs_now[partition] and fs_now[partition].percentage >= threshold then + if not helpers.get_map(partition) then + naughty.notify { + preset = naughty.config.presets.critical, + title = "Warning", + text = string.format("%s is above %d%% (%d%%)", partition, threshold, fs_now[partition].percentage) + } + helpers.set_map(partition, true) + else + helpers.set_map(partition, false) + end + end + + local fmt = "%-" .. tostring(pathlen) .. "s %4s\t%6s\t%6s\n" + local notifytable = { [1] = string.format(fmt, "path", "used", "free", "size") } + fmt = "\n%-" .. tostring(pathlen) .. "s %3s%%\t%6.2f\t%6.2f %s" + for _, path in ipairs(notifypaths) do + notifytable[#notifytable+1] = string.format(fmt, path, fs_now[path].percentage, fs_now[path].free, fs_now[path].size, fs_now[path].units) + end + + fs.notification_preset.text = tconcat(notifytable) + end + + function fs.update(callback) + Gio.Async.start(gears.protected_call.call)(function() + update_synced() + if type(callback) == "function" and callback then + callback() + end + end) + end + + if showpopup == "on" then + fs.widget:connect_signal('mouse::enter', function () fs.show(0) end) + fs.widget:connect_signal('mouse::leave', function () fs.hide() end) + end + + helpers.newtimer(partition or "fs", timeout, fs.update) + + return fs +end + +return factory diff --git a/.config/awesome/lain/widget/imap.lua b/.config/awesome/lain/widget/imap.lua new file mode 100755 index 0000000..e3f7baa --- /dev/null +++ b/.config/awesome/lain/widget/imap.lua @@ -0,0 +1,94 @@ +--[[ + + Licensed under GNU General Public License v2 + * (c) 2013, Luca CPZ + +--]] + +local helpers = require("lain.helpers") +local naughty = require("naughty") +local wibox = require("wibox") +local awful = require("awful") +local string = string +local type = type +local tonumber = tonumber + +-- Mail IMAP check +-- lain.widget.imap + +local function factory(args) + args = args or {} + + local imap = { widget = args.widget or wibox.widget.textbox() } + local server = args.server + local mail = args.mail + local password = args.password + local port = args.port or 993 + local timeout = args.timeout or 60 + local pwdtimeout = args.pwdtimeout or 10 + local is_plain = args.is_plain or false + local followtag = args.followtag or false + local notify = args.notify or "on" + local settings = args.settings or function() end + + local head_command = "curl --connect-timeout 3 -fsm 3" + local request = "-X 'STATUS INBOX (MESSAGES RECENT UNSEEN)'" + + if not server or not mail or not password then return end + + mail_notification_preset = { + icon = helpers.icons_dir .. "mail.png", + position = "top_left" + } + + helpers.set_map(mail, 0) + + if not is_plain then + if type(password) == "string" or type(password) == "table" then + helpers.async(password, function(f) password = f:gsub("\n", "") end) + elseif type(password) == "function" then + imap.pwdtimer = helpers.newtimer(mail .. "-password", pwdtimeout, function() + local retrieved_password, try_again = password() + if not try_again then + imap.pwdtimer:stop() -- stop trying to retrieve + password = retrieved_password or "" -- failsafe + end + end, true, true) + end + end + + function imap.update() + -- do not update if the password has not been retrieved yet + if type(password) ~= "string" then return end + + local curl = string.format("%s --url imaps://%s:%s/INBOX -u %s:'%s' %s -k", + head_command, server, port, mail, password, request) + + helpers.async(curl, function(f) + imap_now = { ["MESSAGES"] = 0, ["RECENT"] = 0, ["UNSEEN"] = 0 } + + for s,d in f:gmatch("(%w+)%s+(%d+)") do imap_now[s] = tonumber(d) end + mailcount = imap_now["UNSEEN"] -- backwards compatibility + widget = imap.widget + + settings() + + if notify == "on" and mailcount and mailcount >= 1 and mailcount > helpers.get_map(mail) then + if followtag then mail_notification_preset.screen = awful.screen.focused() end + naughty.notify { + preset = mail_notification_preset, + text = string.format("%s has %d new message%s", mail, mailcount, mailcount == 1 and "" or "s") + } + end + + helpers.set_map(mail, imap_now["UNSEEN"]) + end) + + end + + imap.timer = helpers.newtimer(mail, timeout, imap.update, true, true) + + return imap +end + +return factory diff --git a/.config/awesome/lain/widget/init.lua b/.config/awesome/lain/widget/init.lua new file mode 100755 index 0000000..57b86bb --- /dev/null +++ b/.config/awesome/lain/widget/init.lua @@ -0,0 +1,19 @@ +--[[ + + Lain + Layouts, widgets and utilities for Awesome WM + + Widgets section + + Licensed under GNU General Public License v2 + * (c) 2013, Luca CPZ + * (c) 2010-2012, Peter Hofmann + +--]] + +local wrequire = require("lain.helpers").wrequire +local setmetatable = setmetatable + +local widget = { _NAME = "lain.widget" } + +return setmetatable(widget, { __index = wrequire }) diff --git a/.config/awesome/lain/widget/mem.lua b/.config/awesome/lain/widget/mem.lua new file mode 100755 index 0000000..0318494 --- /dev/null +++ b/.config/awesome/lain/widget/mem.lua @@ -0,0 +1,51 @@ +--[[ + + Licensed under GNU General Public License v2 + * (c) 2013, Luca CPZ + * (c) 2010-2012, Peter Hofmann + +--]] + +local helpers = require("lain.helpers") +local wibox = require("wibox") +local gmatch, lines, floor = string.gmatch, io.lines, math.floor + +-- Memory usage (ignoring caches) +-- lain.widget.mem + +local function factory(args) + args = args or {} + + local mem = { widget = args.widget or wibox.widget.textbox() } + local timeout = args.timeout or 2 + local settings = args.settings or function() end + + function mem.update() + mem_now = {} + for line in lines("/proc/meminfo") do + for k, v in gmatch(line, "([%a]+):[%s]+([%d]+).+") do + if k == "MemTotal" then mem_now.total = floor(v / 1024 + 0.5) + elseif k == "MemFree" then mem_now.free = floor(v / 1024 + 0.5) + elseif k == "Buffers" then mem_now.buf = floor(v / 1024 + 0.5) + elseif k == "Cached" then mem_now.cache = floor(v / 1024 + 0.5) + elseif k == "SwapTotal" then mem_now.swap = floor(v / 1024 + 0.5) + elseif k == "SwapFree" then mem_now.swapf = floor(v / 1024 + 0.5) + elseif k == "SReclaimable" then mem_now.srec = floor(v / 1024 + 0.5) + end + end + end + + mem_now.used = mem_now.total - mem_now.free - mem_now.buf - mem_now.cache - mem_now.srec + mem_now.swapused = mem_now.swap - mem_now.swapf + mem_now.perc = math.floor(mem_now.used / mem_now.total * 100) + + widget = mem.widget + settings() + end + + helpers.newtimer("mem", timeout, mem.update) + + return mem +end + +return factory diff --git a/.config/awesome/lain/widget/mpd.lua b/.config/awesome/lain/widget/mpd.lua new file mode 100755 index 0000000..55d3649 --- /dev/null +++ b/.config/awesome/lain/widget/mpd.lua @@ -0,0 +1,135 @@ +--[[ + + Licensed under GNU General Public License v2 + * (c) 2013, Luca CPZ + * (c) 2010, Adrian C. + +--]] + +local helpers = require("lain.helpers") +local shell = require("awful.util").shell +local escape_f = require("awful.util").escape +local focused = require("awful.screen").focused +local naughty = require("naughty") +local wibox = require("wibox") +local os = os +local string = string + +-- MPD infos +-- lain.widget.mpd + +local function factory(args) + args = args or {} + + local mpd = { widget = args.widget or wibox.widget.textbox() } + local timeout = args.timeout or 2 + local password = (args.password and #args.password > 0 and string.format("password %s\\n", args.password)) or "" + local host = args.host or os.getenv("MPD_HOST") or "127.0.0.1" + local port = args.port or os.getenv("MPD_PORT") or "6600" + local music_dir = args.music_dir or os.getenv("HOME") .. "/Music" + local cover_pattern = args.cover_pattern or "*\\.(jpg|jpeg|png|gif)$" + local cover_size = args.cover_size or 100 + local default_art = args.default_art + local notify = args.notify or "on" + local followtag = args.followtag or false + local settings = args.settings or function() end + + local mpdh = string.format("telnet://%s:%s", host, port) + local echo = string.format("printf \"%sstatus\\ncurrentsong\\nclose\\n\"", password) + local cmd = string.format("%s | curl --connect-timeout 1 -fsm 3 %s", echo, mpdh) + + mpd_notification_preset = { title = "Now playing", timeout = 6 } + + helpers.set_map("current mpd track", nil) + + function mpd.update() + helpers.async({ shell, "-c", cmd }, function(f) + mpd_now = { + random_mode = false, + single_mode = false, + repeat_mode = false, + consume_mode = false, + pls_pos = "N/A", + pls_len = "N/A", + state = "N/A", + file = "N/A", + name = "N/A", + artist = "N/A", + title = "N/A", + album = "N/A", + genre = "N/A", + track = "N/A", + date = "N/A", + time = "N/A", + elapsed = "N/A", + volume = "N/A" + } + + for line in string.gmatch(f, "[^\n]+") do + for k, v in string.gmatch(line, "([%w]+):[%s](.*)$") do + if k == "state" then mpd_now.state = v + elseif k == "file" then mpd_now.file = v + elseif k == "Name" then mpd_now.name = escape_f(v) + elseif k == "Artist" then mpd_now.artist = escape_f(v) + elseif k == "Title" then mpd_now.title = escape_f(v) + elseif k == "Album" then mpd_now.album = escape_f(v) + elseif k == "Genre" then mpd_now.genre = escape_f(v) + elseif k == "Track" then mpd_now.track = escape_f(v) + elseif k == "Date" then mpd_now.date = escape_f(v) + elseif k == "Time" then mpd_now.time = v + elseif k == "elapsed" then mpd_now.elapsed = string.match(v, "%d+") + elseif k == "song" then mpd_now.pls_pos = v + elseif k == "playlistlength" then mpd_now.pls_len = v + elseif k == "repeat" then mpd_now.repeat_mode = v ~= "0" + elseif k == "single" then mpd_now.single_mode = v ~= "0" + elseif k == "random" then mpd_now.random_mode = v ~= "0" + elseif k == "consume" then mpd_now.consume_mode = v ~= "0" + elseif k == "volume" then mpd_now.volume = v + end + end + end + + mpd_notification_preset.text = string.format("%s (%s) - %s\n%s", mpd_now.artist, + mpd_now.album, mpd_now.date, mpd_now.title) + widget = mpd.widget + settings() + + if mpd_now.state == "play" then + if notify == "on" and mpd_now.title ~= helpers.get_map("current mpd track") then + helpers.set_map("current mpd track", mpd_now.title) + + if followtag then mpd_notification_preset.screen = focused() end + + local common = { + preset = mpd_notification_preset, + icon = default_art, + icon_size = cover_size, + replaces_id = mpd.id + } + + if not string.match(mpd_now.file, "http.*://") then -- local file instead of http stream + local path = string.format("%s/%s", music_dir, string.match(mpd_now.file, ".*/")) + local cover = string.format("find '%s' -maxdepth 1 -type f | egrep -i -m1 '%s'", + path:gsub("'", "'\\''"), cover_pattern) + helpers.async({ shell, "-c", cover }, function(current_icon) + common.icon = current_icon:gsub("\n", "") + if #common.icon == 0 then common.icon = nil end + mpd.id = naughty.notify(common).id + end) + else + mpd.id = naughty.notify(common).id + end + + end + elseif mpd_now.state ~= "pause" then + helpers.set_map("current mpd track", nil) + end + end) + end + + mpd.timer = helpers.newtimer("mpd", timeout, mpd.update, true, true) + + return mpd +end + +return factory diff --git a/.config/awesome/lain/widget/net.lua b/.config/awesome/lain/widget/net.lua new file mode 100755 index 0000000..9b7b165 --- /dev/null +++ b/.config/awesome/lain/widget/net.lua @@ -0,0 +1,122 @@ +--[[ + + Licensed under GNU General Public License v2 + * (c) 2013, Luca CPZ + * (c) 2010-2012, Peter Hofmann + +--]] + +local helpers = require("lain.helpers") +local naughty = require("naughty") +local wibox = require("wibox") +local string = string + +-- Network infos +-- lain.widget.net + +local function factory(args) + args = args or {} + + local net = { widget = args.widget or wibox.widget.textbox(), devices = {} } + local timeout = args.timeout or 2 + local units = args.units or 1024 -- KB + local notify = args.notify or "on" + local wifi_state = args.wifi_state or "off" + local eth_state = args.eth_state or "off" + local screen = args.screen or 1 + local format = args.format or "%.1f" + local settings = args.settings or function() end + + -- Compatibility with old API where iface was a string corresponding to 1 interface + net.iface = (args.iface and (type(args.iface) == "string" and {args.iface}) or + (type(args.iface) == "table" and args.iface)) or {} + + function net.get_devices() + net.iface = {} -- reset at every call + helpers.line_callback("ip link", function(line) + net.iface[#net.iface + 1] = not string.match(line, "LOOPBACK") and string.match(line, "(%w+): <") or nil + end) + end + + if #net.iface == 0 then net.get_devices() end + + function net.update() + -- These are the totals over all specified interfaces + net_now = { + devices = {}, + -- Bytes since last iteration + sent = 0, + received = 0 + } + + for _, dev in ipairs(net.iface) do + local dev_now = {} + local dev_before = net.devices[dev] or { last_t = 0, last_r = 0 } + local now_t = tonumber(helpers.first_line(string.format("/sys/class/net/%s/statistics/tx_bytes", dev)) or 0) + local now_r = tonumber(helpers.first_line(string.format("/sys/class/net/%s/statistics/rx_bytes", dev)) or 0) + + dev_now.carrier = helpers.first_line(string.format("/sys/class/net/%s/carrier", dev)) or "0" + dev_now.state = helpers.first_line(string.format("/sys/class/net/%s/operstate", dev)) or "down" + + dev_now.sent = (now_t - dev_before.last_t) / timeout / units + dev_now.received = (now_r - dev_before.last_r) / timeout / units + + net_now.sent = net_now.sent + dev_now.sent + net_now.received = net_now.received + dev_now.received + + dev_now.sent = string.format(format, dev_now.sent) + dev_now.received = string.format(format, dev_now.received) + + dev_now.last_t = now_t + dev_now.last_r = now_r + + if wifi_state == "on" and helpers.first_line(string.format("/sys/class/net/%s/uevent", dev)) == "DEVTYPE=wlan" then + dev_now.wifi = true + if string.match(dev_now.carrier, "1") then + dev_now.signal = tonumber(string.match(helpers.lines_from("/proc/net/wireless")[3], "(%-%d+%.)")) or nil + end + else + dev_now.wifi = false + end + + if eth_state == "on" and helpers.first_line(string.format("/sys/class/net/%s/uevent", dev)) ~= "DEVTYPE=wlan" then + dev_now.ethernet = true + else + dev_now.ethernet = false + end + + net.devices[dev] = dev_now + + -- Notify only once when connection is lost + if string.match(dev_now.carrier, "0") and notify == "on" and helpers.get_map(dev) then + naughty.notify { + title = dev, + text = "No carrier", + icon = helpers.icons_dir .. "no_net.png", + screen = screen + } + helpers.set_map(dev, false) + elseif string.match(dev_now.carrier, "1") then + helpers.set_map(dev, true) + end + + net_now.carrier = dev_now.carrier + net_now.state = dev_now.state + net_now.devices[dev] = dev_now + -- net_now.sent and net_now.received will be + -- the totals across all specified devices + end + + net_now.sent = string.format(format, net_now.sent) + net_now.received = string.format(format, net_now.received) + + widget = net.widget + settings() + end + + helpers.newtimer("network", timeout, net.update) + + return net +end + +return factory diff --git a/.config/awesome/lain/widget/pulse.lua b/.config/awesome/lain/widget/pulse.lua new file mode 100755 index 0000000..69f4d70 --- /dev/null +++ b/.config/awesome/lain/widget/pulse.lua @@ -0,0 +1,58 @@ +--[[ + + Licensed under GNU General Public License v2 + * (c) 2016, Luca CPZ + +--]] + +local helpers = require("lain.helpers") +local shell = require("awful.util").shell +local wibox = require("wibox") +local string = string +local type = type + +-- PulseAudio volume +-- lain.widget.pulse + +local function factory(args) + args = args or {} + + local pulse = { widget = args.widget or wibox.widget.textbox(), device = "N/A" } + local timeout = args.timeout or 5 + local settings = args.settings or function() end + + pulse.devicetype = args.devicetype or "sink" + pulse.cmd = args.cmd or "pacmd list-" .. pulse.devicetype .. "s | sed -n -e '/*/,$!d' -e '/index/p' -e '/base volume/d' -e '/volume:/p' -e '/muted:/p' -e '/device\\.string/p'" + + function pulse.update() + helpers.async({ shell, "-c", type(pulse.cmd) == "string" and pulse.cmd or pulse.cmd() }, + function(s) + volume_now = { + index = string.match(s, "index: (%S+)") or "N/A", + device = string.match(s, "device.string = \"(%S+)\"") or "N/A", + muted = string.match(s, "muted: (%S+)") or "N/A" + } + + pulse.device = volume_now.index + + local ch = 1 + volume_now.channel = {} + for v in string.gmatch(s, ":.-(%d+)%%") do + volume_now.channel[ch] = v + ch = ch + 1 + end + + volume_now.left = volume_now.channel[1] or "N/A" + volume_now.right = volume_now.channel[2] or "N/A" + + widget = pulse.widget + settings() + end) + end + + helpers.newtimer("pulse", timeout, pulse.update) + + return pulse +end + +return factory diff --git a/.config/awesome/lain/widget/pulsebar.lua b/.config/awesome/lain/widget/pulsebar.lua new file mode 100755 index 0000000..19e73b9 --- /dev/null +++ b/.config/awesome/lain/widget/pulsebar.lua @@ -0,0 +1,175 @@ +--[[ + + Licensed under GNU General Public License v2 + * (c) 2013, Luca CPZ + * (c) 2013, Rman + +--]] + +local helpers = require("lain.helpers") +local awful = require("awful") +local naughty = require("naughty") +local wibox = require("wibox") +local math = math +local string = string +local type = type +local tonumber = tonumber + +-- PulseAudio volume bar +-- lain.widget.pulsebar + +local function factory(args) + local pulsebar = { + colors = { + background = "#000000", + mute_background = "#000000", + mute = "#EB8F8F", + unmute = "#A4CE8A" + }, + + _current_level = 0, + _mute = "no", + device = "N/A" + } + + args = args or {} + + local timeout = args.timeout or 5 + local settings = args.settings or function() end + local width = args.width or 63 + local height = args.height or 1 + local margins = args.margins or 1 + local paddings = args.paddings or 1 + local ticks = args.ticks or false + local ticks_size = args.ticks_size or 7 + local tick = args.tick or "|" + local tick_pre = args.tick_pre or "[" + local tick_post = args.tick_post or "]" + local tick_none = args.tick_none or " " + + pulsebar.colors = args.colors or pulsebar.colors + pulsebar.followtag = args.followtag or false + pulsebar.notification_preset = args.notification_preset + pulsebar.devicetype = args.devicetype or "sink" + pulsebar.cmd = args.cmd or "pacmd list-" .. pulsebar.devicetype .. "s | sed -n -e '/*/,$!d' -e '/index/p' -e '/base volume/d' -e '/volume:/p' -e '/muted:/p' -e '/device\\.string/p'" + + if not pulsebar.notification_preset then + pulsebar.notification_preset = { + font = "Monospace 10" + } + end + + pulsebar.bar = wibox.widget { + color = pulsebar.colors.unmute, + background_color = pulsebar.colors.background, + forced_height = height, + forced_width = width, + margins = margins, + paddings = paddings, + ticks = ticks, + ticks_size = ticks_size, + widget = wibox.widget.progressbar, + } + + pulsebar.tooltip = awful.tooltip({ objects = { pulsebar.bar } }) + + function pulsebar.update(callback) + helpers.async({ awful.util.shell, "-c", type(pulsebar.cmd) == "string" and pulsebar.cmd or pulsebar.cmd() }, + function(s) + volume_now = { + index = string.match(s, "index: (%S+)") or "N/A", + device = string.match(s, "device.string = \"(%S+)\"") or "N/A", + muted = string.match(s, "muted: (%S+)") or "N/A" + } + + pulsebar.device = volume_now.index + + local ch = 1 + volume_now.channel = {} + for v in string.gmatch(s, ":.-(%d+)%%") do + volume_now.channel[ch] = v + ch = ch + 1 + end + + volume_now.left = volume_now.channel[1] or "N/A" + volume_now.right = volume_now.channel[2] or "N/A" + + local volu = volume_now.left + local mute = volume_now.muted + + if volu:match("N/A") or mute:match("N/A") then return end + + if volu ~= pulsebar._current_level or mute ~= pulsebar._mute then + pulsebar._current_level = tonumber(volu) + pulsebar.bar:set_value(pulsebar._current_level / 100) + if pulsebar._current_level == 0 or mute == "yes" then + pulsebar._mute = mute + pulsebar.tooltip:set_text ("[muted]") + pulsebar.bar.color = pulsebar.colors.mute + pulsebar.bar.background_color = pulsebar.colors.mute_background + else + pulsebar._mute = "no" + pulsebar.tooltip:set_text(string.format("%s %s: %s", pulsebar.devicetype, pulsebar.device, volu)) + pulsebar.bar.color = pulsebar.colors.unmute + pulsebar.bar.background_color = pulsebar.colors.background + end + + settings() + + if type(callback) == "function" then callback() end + end + end) + end + + function pulsebar.notify() + pulsebar.update(function() + local preset = pulsebar.notification_preset + + preset.title = string.format("%s %s - %s%%", pulsebar.devicetype, pulsebar.device, pulsebar._current_level) + + if pulsebar._mute == "yes" then + preset.title = preset.title .. " muted" + end + + -- tot is the maximum number of ticks to display in the notification + -- fallback: default horizontal wibox height + local wib, tot = awful.screen.focused().mywibox, 20 + + -- if we can grab mywibox, tot is defined as its height if + -- horizontal, or width otherwise + if wib then + if wib.position == "left" or wib.position == "right" then + tot = wib.width + else + tot = wib.height + end + end + + local int = math.modf((pulsebar._current_level / 100) * tot) + preset.text = string.format( + "%s%s%s%s", + tick_pre, + string.rep(tick, int), + string.rep(tick_none, tot - int), + tick_post + ) + + if pulsebar.followtag then preset.screen = awful.screen.focused() end + + if not pulsebar.notification then + pulsebar.notification = naughty.notify { + preset = preset, + destroy = function() pulsebar.notification = nil end + } + else + naughty.replace_text(pulsebar.notification, preset.title, preset.text) + end + end) + end + + helpers.newtimer(string.format("pulsebar-%s-%s", pulsebar.devicetype, pulsebar.device), timeout, pulsebar.update) + + return pulsebar +end + +return factory diff --git a/.config/awesome/lain/widget/sysload.lua b/.config/awesome/lain/widget/sysload.lua new file mode 100755 index 0000000..7260524 --- /dev/null +++ b/.config/awesome/lain/widget/sysload.lua @@ -0,0 +1,39 @@ +--[[ + + Licensed under GNU General Public License v2 + * (c) 2013, Luca CPZ + * (c) 2010-2012, Peter Hofmann + +--]] + +local helpers = require("lain.helpers") +local wibox = require("wibox") +local open, match = io.open, string.match + +-- System load +-- lain.widget.sysload + +local function factory(args) + args = args or {} + + local sysload = { widget = args.widget or wibox.widget.textbox() } + local timeout = args.timeout or 2 + local settings = args.settings or function() end + + function sysload.update() + local f = open("/proc/loadavg") + local ret = f:read("*all") + f:close() + + load_1, load_5, load_15 = match(ret, "([^%s]+) ([^%s]+) ([^%s]+)") + + widget = sysload.widget + settings() + end + + helpers.newtimer("sysload", timeout, sysload.update) + + return sysload +end + +return factory diff --git a/.config/awesome/lain/widget/temp.lua b/.config/awesome/lain/widget/temp.lua new file mode 100755 index 0000000..99f8700 --- /dev/null +++ b/.config/awesome/lain/widget/temp.lua @@ -0,0 +1,50 @@ +--[[ + + Licensed under GNU General Public License v2 + * (c) 2013, Luca CPZ + +--]] + +local helpers = require("lain.helpers") +local wibox = require("wibox") +local tonumber = tonumber + +-- {thermal,core} temperature info +-- lain.widget.temp + +local function factory(args) + args = args or {} + + local temp = { widget = args.widget or wibox.widget.textbox() } + local timeout = args.timeout or 30 + local tempfile = args.tempfile or "/sys/devices/virtual/thermal/thermal_zone0/temp" + local format = args.format or "%.1f" + local settings = args.settings or function() end + + function temp.update() + helpers.async({"find", "/sys/devices", "-type", "f", "-name", "*temp*"}, function(f) + temp_now = {} + local temp_fl, temp_value + for t in f:gmatch("[^\n]+") do + temp_fl = helpers.first_line(t) + if temp_fl then + temp_value = tonumber(temp_fl) + temp_now[t] = temp_value and temp_value/1e3 or temp_fl + end + end + if temp_now[tempfile] then + coretemp_now = string.format(format, temp_now[tempfile]) + else + coretemp_now = "N/A" + end + widget = temp.widget + settings() + end) + end + + helpers.newtimer("thermal", timeout, temp.update) + + return temp +end + +return factory diff --git a/.config/awesome/lain/widget/weather.lua b/.config/awesome/lain/widget/weather.lua new file mode 100755 index 0000000..c683d42 --- /dev/null +++ b/.config/awesome/lain/widget/weather.lua @@ -0,0 +1,146 @@ +--[[ + + Licensed under GNU General Public License v2 + * (c) 2015, Luca CPZ + +--]] + +local helpers = require("lain.helpers") +local json = require("lain.util").dkjson +local focused = require("awful.screen").focused +local naughty = require("naughty") +local wibox = require("wibox") +local math = math +local os = os +local string = string +local type = type +local tonumber = tonumber + +-- OpenWeatherMap +-- current weather and X-days forecast +-- lain.widget.weather + +local function factory(args) + args = args or {} + + local weather = { widget = args.widget or wibox.widget.textbox() } + local APPID = args.APPID -- mandatory + local timeout = args.timeout or 60 * 15 -- 15 min + local current_call = args.current_call or "curl -s 'https://api.openweathermap.org/data/2.5/weather?id=%s&units=%s&lang=%s&APPID=%s'" + local forecast_call = args.forecast_call or "curl -s 'https://api.openweathermap.org/data/2.5/forecast?id=%s&units=%s&lang=%s&APPID=%s'" + local city_id = args.city_id or 0 -- placeholder + local units = args.units or "metric" + local lang = args.lang or "en" + local cnt = args.cnt or 5 + local icons_path = args.icons_path or helpers.icons_dir .. "openweathermap/" + local notification_preset = args.notification_preset or {} + local notification_text_fun = args.notification_text_fun or + function (wn) + local day = os.date("%a %d", wn["dt"]) + local temp = math.floor(wn["main"]["temp"]) + local desc = wn["weather"][1]["description"] + return string.format("%s: %s, %d ", day, desc, temp) + end + local weather_na_markup = args.weather_na_markup or " N/A " + local followtag = args.followtag or false + local showpopup = args.showpopup or "on" + local settings = args.settings or function() end + + weather.widget:set_markup(weather_na_markup) + weather.icon_path = icons_path .. "na.png" + weather.icon = wibox.widget.imagebox(weather.icon_path) + + function weather.show(seconds) + weather.hide() + + if followtag then + notification_preset.screen = focused() + end + + if not weather.notification_text then + weather.update() + weather.forecast_update() + end + + weather.notification = naughty.notify { + preset = notification_preset, + text = weather.notification_text, + icon = weather.icon_path, + timeout = type(seconds) == "number" and seconds or notification_preset.timeout + } + end + + function weather.hide() + if weather.notification then + naughty.destroy(weather.notification) + weather.notification = nil + end + end + + function weather.attach(obj) + obj:connect_signal("mouse::enter", function() + weather.show(0) + end) + obj:connect_signal("mouse::leave", function() + weather.hide() + end) + end + + function weather.forecast_update() + local cmd = string.format(forecast_call, city_id, units, lang, APPID) + helpers.async(cmd, function(f) + local err + weather_now, _, err = json.decode(f, 1, nil) + + if not err and type(weather_now) == "table" and tonumber(weather_now["cod"]) == 200 then + weather.notification_text = "" + for i = 1, weather_now["cnt"], weather_now["cnt"]//cnt do + weather.notification_text = weather.notification_text .. + notification_text_fun(weather_now["list"][i]) + if i < weather_now["cnt"] then + weather.notification_text = weather.notification_text .. "\n" + end + end + end + end) + end + + function weather.update() + local cmd = string.format(current_call, city_id, units, lang, APPID) + helpers.async(cmd, function(f) + local err + weather_now, _, err = json.decode(f, 1, nil) + + if not err and type(weather_now) == "table" and tonumber(weather_now["cod"]) == 200 then + local sunrise = tonumber(weather_now["sys"]["sunrise"]) + local sunset = tonumber(weather_now["sys"]["sunset"]) + local icon = weather_now["weather"][1]["icon"] + local loc_now = os.time() + + if sunrise <= loc_now and loc_now <= sunset then + icon = string.gsub(icon, "n", "d") + else + icon = string.gsub(icon, "d", "n") + end + + weather.icon_path = icons_path .. icon .. ".png" + widget = weather.widget + settings() + else + weather.icon_path = icons_path .. "na.png" + weather.widget:set_markup(weather_na_markup) + end + + weather.icon:set_image(weather.icon_path) + end) + end + + if showpopup == "on" then weather.attach(weather.widget) end + + weather.timer = helpers.newtimer("weather-" .. city_id, timeout, weather.update, false, true) + weather.timer_forecast = helpers.newtimer("weather_forecast-" .. city_id, timeout, weather.forecast_update, false, true) + + return weather +end + +return factory diff --git a/.config/awesome/lain/wiki/Home.md b/.config/awesome/lain/wiki/Home.md new file mode 100755 index 0000000..c31550f --- /dev/null +++ b/.config/awesome/lain/wiki/Home.md @@ -0,0 +1,44 @@ +Welcome to the Lain wiki! + +If you spot a typo or have a suggestion to improve these pages, please notify me opening an [issue](https://github.com/lcpz/lain/issues) format. Thank you. + +Dependencies +------------ + +Package | Requested by | Reasons of choice +--- | --- | --- +[curl](https://curl.haxx.se) | `imap`, `mpd`, and `weather` widgets | 1. faster and simpler to use than [LuaSocket](https://github.com/diegonehab/luasocket); 2. it's in the core of almost every distro; 3. can be called [asynchronously](https://awesomewm.org/doc/api/libraries/awful.spawn.html#easy_async) + +Installation +------------ + +### Arch Linux + +[AUR package](https://aur.archlinux.org/packages/lain-git/) + +### Other distributions + +```shell +git clone https://github.com/lcpz/lain.git ~/.config/awesome/lain +``` + +Also available via [LuaRocks](https://luarocks.org/modules/lcpz/lain): + +```shell +luarocks install lcpz/lain +``` + +Usage +-------- + +First, include it into your `rc.lua`: + +```lua +local lain = require("lain") +``` + +Then check out the submodules you want: + +- [Layouts](https://github.com/lcpz/lain/wiki/Layouts) +- [Widgets](https://github.com/lcpz/lain/wiki/Widgets) +- [Utilities](https://github.com/lcpz/lain/wiki/Utilities) diff --git a/.config/awesome/lain/wiki/Layouts.md b/.config/awesome/lain/wiki/Layouts.md new file mode 100755 index 0000000..0286d4b --- /dev/null +++ b/.config/awesome/lain/wiki/Layouts.md @@ -0,0 +1,255 @@ + + lain/layout + . + |-- termfair + |-- termfair.center + |-- cascade + |-- cascade.tile + |-- centerwork + |-- centerwork.horizontal + +Usage +===== + +As usual, specify your favourites in `awful.layout.layouts`, or set them on specific tags with [`awful.layout.set`](https://awesomewm.org/doc/api/libraries/awful.layout.html#set). + +```lua +awful.layout.set(lain.layout.termfair, tag) +``` + +How do layouts work? +==================== + +`termfair` +-------- + +This layout restricts the size of each window. Each window will have the +same width but is variable in height. Furthermore, windows are +left-aligned. The basic workflow is as follows (the number above the +screen is the number of open windows, the number in a cell is the fixed +number of a client): + + (1) (2) (3) + +---+---+---+ +---+---+---+ +---+---+---+ + | | | | | | | | | | | | + | 1 | | | -> | 2 | 1 | | -> | 3 | 2 | 1 | -> + | | | | | | | | | | | | + +---+---+---+ +---+---+---+ +---+---+---+ + + (4) (5) (6) + +---+---+---+ +---+---+---+ +---+---+---+ + | 4 | | | | 5 | 4 | | | 6 | 5 | 4 | + +---+---+---+ -> +---+---+---+ -> +---+---+---+ + | 3 | 2 | 1 | | 3 | 2 | 1 | | 3 | 2 | 1 | + +---+---+---+ +---+---+---+ +---+---+---+ + +The first client will be located in the left column. When opening +another window, this new window will be placed in the left column while +moving the first window into the middle column. Once a row is full, +another row above it will be created. + +Default number of columns and rows are respectively taken from `nmaster` +and `ncol` values in `awful.tag`, but you can set your own. + +For example, this sets `termfair` to 3 columns and at least 1 row: + +```lua +lain.layout.termfair.nmaster = 3 +lain.layout.termfair.ncol = 1 +``` + +`termfair.center` +---------- + +Similar to `termfair`, but with fixed number of vertical columns. Cols are centerded until there are `nmaster` columns, then windows are stacked as slaves, with possibly `ncol` clients per column at most. + + (1) (2) (3) + +---+---+---+ +-+---+---+-+ +---+---+---+ + | | | | | | | | | | | | | + | | 1 | | -> | | 1 | 2 | | -> | 1 | 2 | 3 | -> + | | | | | | | | | | | | | + +---+---+---+ +-+---+---+-+ +---+---+---+ + + (4) (5) + +---+---+---+ +---+---+---+ + | | | 3 | | | 2 | 4 | + + 1 + 2 +---+ -> + 1 +---+---+ + | | | 4 | | | 3 | 5 | + +---+---+---+ +---+---+---+ + +Like `termfair`, default number of columns and rows are respectively taken from `nmaster` +and `ncol` values in `awful.tag`, but you can set your own. + +For example, this sets `termfair.center` to 3 columns and at least 1 row: + +```lua +lain.layout.termfair.center.nmaster = 3 +lain.layout.termfair.center.ncol = 1 +``` + +`cascade` +------- + +Cascade all windows of a tag. + +You can control the offsets by setting these two variables: + +```lua +lain.layout.cascade.offset_x = 64 +lain.layout.cascade.offset_y = 16 +``` + +The following reserves space for 5 windows: + +```lua +lain.layout.cascade.nmaster = 5 +``` + +That is, no window will get resized upon the creation of a new window, +unless there's more than 5 windows. + +`cascade.tile` +----------- + +Similar to `awful.layout.suit.tile` layout, however, clients in the slave +column are cascaded instead of tiled. + +Left column size can be set, otherwise is controlled by `mwfact` of the +tag. Additional windows will be opened in another column on the right. +New windows are placed above old windows. + +Whether the slave column is placed on top of the master window or not is +controlled by the value of `ncol`. A value of 1 means "overlapping slave column" +and anything else means "don't overlap windows". + +Usage example: + +```lua +lain.layout.cascade.tile.offset_x = 2 +lain.layout.cascade.tile.offset_y = 32 +lain.layout.cascade.tile.extra_padding = 5 +lain.layout.cascade.tile.nmaster = 5 +lain.layout.cascade.tile.ncol = 2 +``` + +`extra_padding` reduces the size of the master window if "overlapping +slave column" is activated. This allows you to see if there are any +windows in your slave column. + +Setting `offset_x` to a very small value or even 0 is recommended to avoid wasting space. + +`centerwork` +---------- + +You start with one window, centered horizontally: + + +--------------------------+ + | +----------+ | + | | | | + | | | | + | | | | + | | MAIN | | + | | | | + | | | | + | | | | + | | | | + | +----------+ | + +--------------------------+ + +This is your main working window. You do most of the work right here. +Sometimes, you may want to open up additional windows. They're put on left and right, alternately. + + +--------------------------+ + | +---+ +----------+ +---+ | + | | | | | | | | + | | | | | | | | + | | | | | | | | + | +---+ | MAIN | +---+ | + | +---+ | | +---+ | + | | | | | | | | + | | | | | | | | + | | | | | | | | + | +---+ +----------+ +---+ | + +--------------------------+ + +*Please note:* If you use Awesome's default configuration, navigation in +this layout may be very confusing. How do you get from the main window +to satellite ones depends on the order in which the windows are opened. +Thus, use of `awful.client.focus.bydirection()` is suggested. +Here's an example: + +```lua +globalkeys = awful.util.table.join( + -- [...] + awful.key({ modkey }, "j", + function() + awful.client.focus.bydirection("down") + if client.focus then client.focus:raise() end + end), + awful.key({ modkey }, "k", + function() + awful.client.focus.bydirection("up") + if client.focus then client.focus:raise() end + end), + awful.key({ modkey }, "h", + function() + awful.client.focus.bydirection("left") + if client.focus then client.focus:raise() end + end), + awful.key({ modkey }, "l", + function() + awful.client.focus.bydirection("right") + if client.focus then client.focus:raise() end + end), + -- [...] +) +``` + +`centerwork.horizontal` +----------- + +Same as `centerwork`, except that the main +window expands horizontally, and the additional windows +are put ontop/below it. Useful if you have a screen turned 90°. + +Pre 4.0 `uselesstile` patches +============================= + +In branch 3.5, this module provided useless gaps layouts. Since useless gaps have been implemented in Awesome 4.0, those layouts have been removed. + +Following are a couple of `uselesstile` variants that were not part of lain. They are kept only for reference and are not supported. + +Xmonad-like +----------- + +If you want to have `awful.layout.suit.tile` behave like xmonad, with internal gaps two times wider than external ones, download [this](https://gist.github.com/lcpz/9e56dcfbe66bfe14967c) as `lain/layout/uselesstile`. + +Inverted master +--------------- + +Want to invert master window position? Use [this](https://gist.github.com/lcpz/c59dc59c9f99d98218eb) version. You can set `single_gap` with `width` and `height` in your `theme.lua`, in order to define the window geometry when there's only one client, otherwise it goes maximized. An example: + + theme.single_gap = { width = 600, height = 100 } + +What about layout icons? +======================== + +They are located in ``lain/icons/layout``. + +To use them, define new `layout_*` variables in your ``theme.lua``. For instance: + +```lua +theme.lain_icons = os.getenv("HOME") .. + "/.config/awesome/lain/icons/layout/default/" +theme.layout_termfair = theme.lain_icons .. "termfair.png" +theme.layout_centerfair = theme.lain_icons .. "centerfair.png" -- termfair.center +theme.layout_cascade = theme.lain_icons .. "cascade.png" +theme.layout_cascadetile = theme.lain_icons .. "cascadetile.png" -- cascade.tile +theme.layout_centerwork = theme.lain_icons .. "centerwork.png" +theme.layout_centerworkh = theme.lain_icons .. "centerworkh.png" -- centerwork.horizontal +``` + +Credit goes to [Nicolas Estibals](https://github.com/nestibal) for creating +layout icons for default theme. + +You can use them as a template for your custom versions. \ No newline at end of file diff --git a/.config/awesome/lain/wiki/Utilities.md b/.config/awesome/lain/wiki/Utilities.md new file mode 100755 index 0000000..af0ec28 --- /dev/null +++ b/.config/awesome/lain/wiki/Utilities.md @@ -0,0 +1,339 @@ +Quake +----- + +A Quake-like dropdown container for your favourite application. + +**Usage** + +Define it globally to have a single instance for all screens: + +```lua +local quake = lain.util.quake() +``` + +or define it in `connect_for_each_screen` to have one instance for each screen: + +```lua +awful.screen.connect_for_each_screen(function(s) + -- Quake application + s.quake = lain.util.quake() + -- [...] +``` + +**Keybinding example** + +If using a global instance: +```lua +awful.key({ modkey, }, "z", function () quake:toggle() end), +``` + +If using a per-screen instance: +```lua +awful.key({ modkey, }, "z", function () awful.screen.focused().quake:toggle() end), +``` + +**Input table** + +Variable | Meaning | Type | Default +--- | --- | --- | --- +`app` | client to spawn | string | "xterm" +`name` | client name | string | "QuakeDD" +`argname` | how to specify client name | string | "-name %s" +`extra` | extra `app` arguments | string | empty string +`border` | border width | integer | 1 +`visible` | initially visible | boolean | false +`followtag` | always spawn on currently focused screen | boolean | false +`overlap` | Overlap the wibox or not | boolean | false +`settings` | Additional settings to make on the client | function | `nil` +`screen` | screen where to spawn the client | integer | `awful.screen.focused()` +`height` | dropdown client height | float in [0,1] or exact pixels number | 0.25 +`width` | dropdown client width | float in [0,1] or exact pixels number | 1 +`vert` | vertical position | string, possible values: "top", "bottom", "center" | "top" +`horiz` | horizontal position | string, possible values: "left", "right", "center" | "left" + +`height` and `width` express a fraction of the workspace. + +`settings` is a function which takes the client as input, and can be used to customize its properties. For instance: + +```lua +-- set the client sticky +s.quake = lain.util.quake { settings = function(c) c.sticky = true end } +``` + +Read [here](https://awesomewm.org/doc/api/classes/client.html#Object_properties) for the complete list of properties. + +**Notes** + +* [Does not work](https://github.com/lcpz/lain/issues/358) with `gnome-terminal`, `konsole`, or any other terminal which is strictly designed for a Desktop Environment. Just pick a better terminal, [there's plenty](https://wiki.archlinux.org/index.php/List_of_applications#Terminal_emulators). +* Set `followtag = true` if [experiencing issues with multiple screens](https://github.com/lcpz/lain/issues/346). +* If you have a `awful.client.setslave` rule for your application, ensure you use an exception for `QuakeDD` (or your defined `name`). Otherwise, you may run into problems with focus. +* If you are using a VTE-based terminal like `termite`, be sure to set [`argname = "--name %s"`](https://github.com/lcpz/lain/issues/211). +* If you are using a terminal that does not always set its `class_id` to your specified `name`, such as Alacritty, then toggling will not work. You can solve this issue as explained [here](https://github.com/lcpz/lain/issues/536#issuecomment-1180155486). + +Separators +---------- + +Adds Cairo separators. + +```lua +local separators = lain.util.separators +``` + +A separator function `separators.separator` takes two color arguments, defined as strings. `"alpha"` argument is allowed. Example: + +```lua +arrl_dl = separators.arrow_left(beautiful.bg_focus, "alpha") +arrl_ld = separators.arrow_left("alpha", beautiful.bg_focus) +``` + +You can customize height and width by setting `separators_height` and `separators_width` in your `theme.lua`. Default values are 0 and 9, respectively. + +List of functions: + + +-- separators + | + |`-- arrow_right() Draw a right arrow. + `-- arrow_left() Draw a left arrow. + +Markup +------ + +Easier markup. + +```lua +local markup = lain.util.markup +``` + +List of functions: + + +-- markup + | + |`-- bold() Set bold. + |`-- italic() Set italicized text. + |`-- strike() Set strikethrough text. + |`-- underline() Set underlined text. + |`-- monospace() Set monospaced text. + |`-- big() Set bigger text. + |`-- small() Set smaller text. + |`-- font() Set the font of the text. + |`-- font() Set the font of the text. + |`-- color() Set background and foreground color. + |`-- fontfg() Set font and foreground color. + |`-- fontbg() Set font and background color. + `-- fontcolor() Set font, plus background and foreground colors. + | + |`--+ bg + | | + | `-- color() Set background color. + | + `--+ fg + | + `-- color() Set foreground color. + +they all take one argument, which is the text to markup, except the following: + +```lua +markup.font(font, text) +markup.color(fg, bg, text) +markup.fontfg(font, fg, text) +markup.fontbg(font, bg, text) +markup.fontcolor(font, fg, bg, text) +markup.fg.color(color, text) +markup.bg.color(color, text) +``` + +Dynamic tagging +--------------- + +That is: + +- add a new tag; +- rename current tag; +- move current tag; +- delete current tag. + +If you delete a tag, any rule set on it shall be broken, so be careful. + +Use it with key bindings like these: + +```lua +awful.key({ modkey, "Shift" }, "n", function () lain.util.add_tag(mylayout) end), +awful.key({ modkey, "Shift" }, "r", function () lain.util.rename_tag() end), +awful.key({ modkey, "Shift" }, "Left", function () lain.util.move_tag(1) end), -- move to next tag +awful.key({ modkey, "Shift" }, "Right", function () lain.util.move_tag(-1) end), -- move to previous tag +awful.key({ modkey, "Shift" }, "d", function () lain.util.delete_tag() end), +``` + +The argument in `lain.util.add_tag` represents the tag layout, and is optional: if not present, it will be defaulted to `awful.layout.suit.tile`. + +Useless gaps resize +--------------------- + +Changes `beautiful.useless_gaps` on the fly. + +```lua +lain.util.useless_gap_resize(thatmuch, s, t) +``` + +The argument `thatmuch` is the number of pixel to add to/substract from gaps (integer). + +The arguments `s` and `t` are the `awful.screen` and `awful.tag` in which you want to change the gap. They are optional. + +Following are example keybindings for changing client gaps on current screen and tag. + +Example 1: + +```lua +-- On the fly useless gaps change +awful.key({ altkey, "Control" }, "+", function () lain.util.useless_gaps_resize(1) end), +awful.key({ altkey, "Control" }, "-", function () lain.util.useless_gaps_resize(-1) end), +``` + +where `altkey = Mod1`. Example 2: + +```lua +mywidget:buttons(awful.util.table.join ( + awful.button({}, 4, function() lain.util.useless_gaps_resize(-1) end), + awful.button({}, 5, function() lain.util.useless_gaps_resize(1) end) + end) +)) +``` + +so when hovering the mouse over `mywidget`, you can adjust useless gaps size by scrolling with the mouse wheel. + +tag\_view\_nonempty +------------------- + +This function lets you jump to the next/previous non-empty tag. +It takes two arguments: + +* `direction`: `1` for next non-empty tag, `-1` for previous. +* `sc`: Screen which the taglist is in. Default is `mouse.screen` or `1`. This + argument is optional. + +You can use it with key bindings like these: + +```lua +-- Non-empty tag browsing +awful.key({ altkey }, "Left", function () lain.util.tag_view_nonempty(-1) end), +awful.key({ altkey }, "Right", function () lain.util.tag_view_nonempty(1) end), +``` + +where `altkey = "Mod1"`. + +magnify\_client +--------------- + +Set a client to floating and resize it in the same way the "magnifier" +layout does it. Place it on the "current" screen (derived from the mouse +position). This allows you to magnify any client you wish, regardless of +the currently used layout. Use it with a client keybinding like this: + +```lua +clientkeys = awful.util.table.join( + -- [...] + awful.key({ modkey, "Control" }, "m", lain.util.magnify_client), + -- [...] +) +``` + +If you want to "de-magnify" it, just retype the keybinding. + +If you want magnified client to respond to `incmwfact`, read [here](https://github.com/lcpz/lain/issues/195). + +menu\_clients\_current\_tags +---------------------------- + +Similar to `awful.menu.clients`, but this menu only shows the clients +of currently visible tags. Use it with a key binding like this: + +```lua +awful.key({ "Mod1" }, "Tab", function() + lain.util.menu_clients_current_tags({ width = 350 }, { keygrabber = true }) +end), +``` + +menu\_iterator +-------------- + +A generic menu utility which enables iteration over lists of possible +actions to execute. The perfect example is a menu for choosing what +configuration to apply to X with `xrandr`, as suggested on the [Awesome wiki page](https://awesomewm.org/recipes/xrandr). + +

+ +
An example Synergy menu, courtesy of sim590 +

+ +You can either manually create a menu by defining a table in this format: + +```lua +{ { "choice description 1", callbackFuction1 }, { "choice description 2", callbackFunction2 }, ... } +``` + +or use `lain.util.menu_iterator.menu`. Once you have your menu, use it with `lain.menu_iterator.iterate`. + +### Input tables + +**lain.menu_iterator.iterate** + +| Argument | Description | Type +|---|---| --- +| `menu` | the menu to iterate on | table +| `timeout` | time (in seconds) to wait on a choice before the choice is accepted | integer (default: 4) +| `icon` | path to the icon to display in `naughty.notify` window | string + +**lain.menu_iterator.menu** + +| Argument | Description | Type +|---|---| --- +`choices` | list of choices (e.g., `{ "choice1", "choice2", ... }`) | array of strings +`name` | name of the program related to this menu | string +`selected_cb` | callback to execute for each selected choice, it takes one choice (string) as argument; can be `nil` (no action to execute) | function +`rejected_cb` | callback to execute for all rejected choices (the remaining choices, once one is selected), it takes one choice (string) as argument; can be `nil` (no action to execute) | function +`extra_choices` | more choices to be added to the menu; unlike `choices`, these ones won't trigger `rejected_cb` | array of `{ choice, callback }` pairs, where `choice` is a string and `callback` is a function +`combination` | how choices have to be combined in the menu; possible values are: "single" (default), the set of possible choices will simply be the input set ; "powerset", the set of possible choices will be the [power set](https://en.wikipedia.org/wiki/Power_set) of the input set | string + +### Examples + +A simple example is: + +```lua +local mymenu_iterable = lain.util.menu_iterator.menu { + choices = {"My first choice", "My second choice"}, + name = "My awesome program", + selected_cb = function(choice) + -- do something with selected choice + end, + rejected_cb = function(choice) + -- do something with every rejected choice + end +} +``` + +The variable `mymenu_iterable` is a menu compatible with the function `lain.util.menu_iterator.iterate`, which will iterate over it and displays notification with `naughty.notify` every time it is called. You can use it like this: + +```lua +local confirm_timeout = 5 -- time to wait before confirming the menu selection +local my_notify_icon = "/path/to/icon" -- the icon to display in the notification +lain.util.menu_iterator.iterate(mymenu_iterable, confirm_timeout, my_notify_icon) +``` + +Once `confirm_timeout` has passed without anymore calls to `iterate`, the choice is made and the associated callbacks (both for selected and rejected choices) are spawned. + +A useful practice is to add a `Cancel` option as an extra choice for canceling a menu selection. Extending the above example: + +```lua +local mymenu_iterable = lain.util.menu_iterator.menu { + choices = {"My first choice", "My second choice"}, + name = "My awesome program", + selected_cb = function(choice) + -- do something with selected choice + end, + rejected_cb = function(choice) + -- do something with every rejected choice + end + -- nil means no action to do + extra_choices = { {"Cancel"}, nil } +} +``` diff --git a/.config/awesome/lain/wiki/Widgets.md b/.config/awesome/lain/wiki/Widgets.md new file mode 100755 index 0000000..1653ea2 --- /dev/null +++ b/.config/awesome/lain/wiki/Widgets.md @@ -0,0 +1,55 @@ +# Usage + +Every lain widget is a table. + +A lain widget is generated by a `function`. + +The `function` signature, input and output arguments can be found in the [related wiki entry](https://github.com/lcpz/lain/wiki/Widgets#index). + +Every lain widget contains a `wibox.widget`, which is updated by a timed function. To access the widget, use the field `widget`, to access the timed function, use the field `update`. Some lain widgets may also have an `icon` field, which is a `wibox.widget.imagebox`, and/or a `timer` field, which is the `gears.timer` on `update`. + +Every `function` may take either a table or a list of variables as input. + +If the input is a table, you must define a function variable called `settings` in it. There you will be able to define `widget` appearance. + +For instance, if `widget` is a textbox, to markup it call `widget:set_markup(...)` within `settings`. + +In the scope of `settings` you can use predefined arguments, which are specified in the wiki entries. + +Example of a lain widget: + +```lua +local cpu = lain.widget.cpu { + settings = function() + widget:set_markup("Cpu " .. cpu_now.usage) + end +} +-- to access the widget: cpu.widget +``` + +Given the asynchronous nature of these widgets, be sure to use a [defensive programming](https://github.com/lcpz/lain/issues/451#issuecomment-615450523) style when you write your configuration. You can find various examples of this in [awesome-copycats](https://github.com/lcpz/awesome-copycats). + +# Index + +- [alsa](https://github.com/lcpz/lain/wiki/alsa) +- [alsabar](https://github.com/lcpz/lain/wiki/alsabar) +- [bat](https://github.com/lcpz/lain/wiki/bat) +- [cal](https://github.com/lcpz/lain/wiki/cal) +- [cpu](https://github.com/lcpz/lain/wiki/cpu) +- [fs](https://github.com/lcpz/lain/wiki/fs) +- [imap](https://github.com/lcpz/lain/wiki/imap) +- [mem](https://github.com/lcpz/lain/wiki/mem) +- [mpd](https://github.com/lcpz/lain/wiki/mpd) +- [net](https://github.com/lcpz/lain/wiki/net) +- [pulse](https://github.com/lcpz/lain/wiki/pulse) +- [pulsebar](https://github.com/lcpz/lain/wiki/pulsebar) +- [sysload](https://github.com/lcpz/lain/wiki/sysload) +- [temp](https://github.com/lcpz/lain/wiki/temp) +- [weather](https://github.com/lcpz/lain/wiki/weather) + +## User contributions + +- [moc](https://github.com/lcpz/lain/wiki/moc) +- [redshift](https://github.com/lcpz/lain/wiki/redshift) +- [task](https://github.com/lcpz/lain/wiki/task) +- [tp_smapi](https://github.com/lcpz/lain/wiki/tp_smapi) diff --git a/.config/awesome/lain/wiki/_Footer.md b/.config/awesome/lain/wiki/_Footer.md new file mode 100755 index 0000000..b64f13b --- /dev/null +++ b/.config/awesome/lain/wiki/_Footer.md @@ -0,0 +1 @@ +[Home](https://github.com/lcpz/lain/wiki) • [Layouts](https://github.com/lcpz/lain/wiki/Layouts) • [Widgets](https://github.com/lcpz/lain/wiki/Widgets) • [Utilities](https://github.com/lcpz/lain/wiki/Utilities) diff --git a/.config/awesome/lain/wiki/_Sidebar.md b/.config/awesome/lain/wiki/_Sidebar.md new file mode 100755 index 0000000..0289783 --- /dev/null +++ b/.config/awesome/lain/wiki/_Sidebar.md @@ -0,0 +1,26 @@ +* [Home](https://github.com/lcpz/lain/wiki/Home) +* [Layouts](https://github.com/lcpz/lain/wiki/Layouts) + * [Usage](https://github.com/lcpz/lain/wiki/Layouts#Usage) + * [How do layouts work?](https://github.com/lcpz/lain/wiki/Layouts#how-do-layouts-work) + * [termfair](https://github.com/lcpz/lain/wiki/Layouts#termfair) + * [centerfair](https://github.com/lcpz/lain/wiki/Layouts#termfaircenter) + * [cascade](https://github.com/lcpz/lain/wiki/Layouts#cascade) + * [cascadetile](https://github.com/lcpz/lain/wiki/Layouts#cascadetile) + * [centerwork](https://github.com/lcpz/lain/wiki/Layouts#centerwork) + * [centerworkh](https://github.com/lcpz/lain/wiki/Layouts#centerworkhorizontal) + * [Pre 4.0 uselesstile patches](https://github.com/lcpz/lain/wiki/Layouts#pre-40-uselesstile-patches) + * [What about layout icons?](https://github.com/lcpz/lain/wiki/Layouts#what-about-layout-icons) +* [Widgets](https://github.com/lcpz/lain/wiki/Widgets) + * [Usage](https://github.com/lcpz/lain/wiki/Widgets#usage) + * [Index](https://github.com/lcpz/lain/wiki/Widgets#index) + * [Users contributed](https://github.com/lcpz/lain/wiki/Widgets#users-contributed) +* [Utilities](https://github.com/lcpz/lain/wiki/Utilities) + * [quake](https://github.com/lcpz/lain/wiki/Utilities#quake) + * [separators](https://github.com/lcpz/lain/wiki/Utilities#separators) + * [markup](https://github.com/lcpz/lain/wiki/Utilities#markup) + * [dynamic tagging](https://github.com/lcpz/lain/wiki/Utilities#dynamic-tagging) + * [useless_gaps_resize](https://github.com/lcpz/lain/wiki/Utilities#useless-gaps-resize) + * [tag_view_non_empty](https://github.com/lcpz/lain/wiki/Utilities#tag_view_nonempty) + * [magnify_client](https://github.com/lcpz/lain/wiki/Utilities#magnify_client) + * [menu_clients_current_tags](https://github.com/lcpz/lain/wiki/Utilities#menu_clients_current_tags) + * [menu_iterator](https://github.com/lcpz/lain/wiki/Utilities#menu_iterator) diff --git a/.config/awesome/lain/wiki/alsa.md b/.config/awesome/lain/wiki/alsa.md new file mode 100755 index 0000000..1418379 --- /dev/null +++ b/.config/awesome/lain/wiki/alsa.md @@ -0,0 +1,149 @@ +## Usage + +[Read here.](https://github.com/lcpz/lain/wiki/Widgets#usage) + +### Description + +Shows ALSA volume. + +```lua +local volume = lain.widget.alsa() +``` + +## Input table + +Variable | Meaning | Type | Default +--- | --- | --- | --- +`timeout` | Refresh timeout (in seconds) | integer | 5 +`cmd` | Alsa mixer command | string | "amixer" +`channel` | Mixer channel | string | "Master" +`togglechannel` | Toggle channel | string | `nil` +`settings` | User settings | function | empty function +`widget` | Widget to render | function | `wibox.widget.textbox` + +`cmd` is useful if you need to pass additional arguments to amixer. For instance, you may want to define `cmd = "amixer -c X"` in order to set amixer with card `X`. + +`settings` can use the following variables: + +Variable | Meaning | Type | Values +--- | --- | --- | --- +`volume_now.level` | Volume level | integer | 0-100 +`volume_now.status` | Device status | string | "on", "off" + +## Output table + +Variable | Meaning | Type +--- | --- | --- +`widget` | The widget | `wibox.widget.textbox` +`channel` | ALSA channel | string +`update` | Update `widget` | function + +## Toggle channel + +In case mute toggling can't be mapped to master channel (this happens, for instance, when you are using an HDMI output), define togglechannel as your S/PDIF device. You can get the device ID with `scontents` command. + +For instance, if card number is 1 and S/PDIF number is 3: + +```shell +$ amixer -c 1 scontents +Simple mixer control 'Master',0 + Capabilities: volume + Playback channels: Front Left - Front Right + Capture channels: Front Left - Front Right + Limits: 0 - 255 + Front Left: 255 [100%] + Front Right: 255 [100%] +Simple mixer control 'IEC958',0 + Capabilities: pswitch pswitch-joined + Playback channels: Mono + Mono: Playback [on] +Simple mixer control 'IEC958',1 + Capabilities: pswitch pswitch-joined + Playback channels: Mono + Mono: Playback [on] +Simple mixer control 'IEC958',2 + Capabilities: pswitch pswitch-joined + Playback channels: Mono + Mono: Playback [on] +Simple mixer control 'IEC958',3 + Capabilities: pswitch pswitch-joined + Playback channels: Mono + Mono: Playback [on] +``` + +you have to set `togglechannel = "IEC958,3"`. + +## Buttons + +If you want buttons, just add the following after your widget in `rc.lua`. + +```lua +volume.widget:buttons(awful.util.table.join( + awful.button({}, 1, function() -- left click + awful.spawn(string.format("%s -e alsamixer", terminal)) + end), + awful.button({}, 2, function() -- middle click + os.execute(string.format("%s set %s 100%%", volume.cmd, volume.channel)) + volume.update() + end), + awful.button({}, 3, function() -- right click + os.execute(string.format("%s set %s toggle", volume.cmd, volume.togglechannel or volume.channel)) + volume.update() + end), + awful.button({}, 4, function() -- scroll up + os.execute(string.format("%s set %s 1%%+", volume.cmd, volume.channel)) + volume.update() + end), + awful.button({}, 5, function() -- scroll down + os.execute(string.format("%s set %s 1%%-", volume.cmd, volume.channel)) + volume.update() + end) +)) +``` + +## Keybindings + +You can control the widget with keybindings like these: + +```lua +-- ALSA volume control +awful.key({ altkey }, "Up", + function () + os.execute(string.format("amixer set %s 1%%+", volume.channel)) + volume.update() + end), +awful.key({ altkey }, "Down", + function () + os.execute(string.format("amixer set %s 1%%-", volume.channel)) + volume.update() + end), +awful.key({ altkey }, "m", + function () + os.execute(string.format("amixer set %s toggle", volume.togglechannel or volume.channel)) + volume.update() + end), +awful.key({ altkey, "Control" }, "m", + function () + os.execute(string.format("amixer set %s 100%%", volume.channel)) + volume.update() + end), +awful.key({ altkey, "Control" }, "0", + function () + os.execute(string.format("amixer set %s 0%%", volume.channel)) + volume.update() + end), +``` + +where `altkey = "Mod1"`. + +### Muting with PulseAudio + +If you are using this widget in conjuction with PulseAudio, add the option `-D pulse` to the muting keybinding, like this: + +```lua +awful.key({ altkey }, "m", + function () + os.execute(string.format("amixer -D pulse set %s toggle", volume.togglechannel or volume.channel)) + volume.update() + end), +``` diff --git a/.config/awesome/lain/wiki/alsabar.md b/.config/awesome/lain/wiki/alsabar.md new file mode 100755 index 0000000..a986d8f --- /dev/null +++ b/.config/awesome/lain/wiki/alsabar.md @@ -0,0 +1,108 @@ +## Usage + +[Read here.](https://github.com/lcpz/lain/wiki/Widgets#usage) + +### Description + +Shows ALSA volume with a progressbar; provides tooltips and notifications. + +```lua +local volume = lain.widget.alsabar() +``` + +## Input table + +Variable | Meaning | Type | Default +--- | --- | --- | --- +`timeout` | Refresh timeout (in seconds) | integer | 5 +`settings` | User settings | function | empty function +`width` | Bar width | number | 63 +`height` | Bar height | number | 1 +`margins` | Bar margins | number | 1 +`paddings` | Bar paddings | number | 1 +`ticks` | Set bar ticks on | boolean | false +`ticks_size` | Ticks size | integer | 7 +`tick` | String for a notification tick | string | "|" +`tick_pre` | String for the left notification delimeter | string | "[" +`tick_post` | String for the right notification delimeter | string | "]" +`tick_none` | String for an empty notification tick | string | " " +`cmd` | ALSA mixer command | string | "amixer" +`channel` | Mixer channel | string | "Master" +`togglechannel` | Toggle channel | string | `nil` +`tick` | The character usef for ticks in the notification | string | "|" +`colors` | Bar colors | table | see [Default colors](https://github.com/lcpz/lain/wiki/alsabar#default-colors) +`notification_preset` | Notification preset | table | See [default `notification_preset`](https://github.com/lcpz/lain/wiki/alsabar#default-notification_preset) +`followtag` | Display the notification on currently focused screen | boolean | false + +`cmd` is useful if you need to pass additional arguments to `amixer`. For instance, you may want to define `cmd = "amixer -c X"` in order to set amixer with card `X`. + +In case mute toggling can't be mapped to master channel (this happens, for instance, when you are using an HDMI output), define `togglechannel` as your S/PDIF device. Read [`alsa`](https://github.com/lcpz/lain/wiki/alsa#toggle-channel) page to know how. + +To set the maximum number of ticks to display in the notification, define `max_ticks` (integer) in `notification_preset`. + +`settings` can use the following variables: + +Variable | Meaning | Type | Values +--- | --- | --- | --- +`volume_now.level` | Volume level | integer | 0-100 +`volume_now.status` | Device status | string | "on", "off" + +With multiple screens, the default behaviour is to show a visual notification pop-up window on the first screen. By setting `followtag` to `true` it will be shown on the currently focused tag screen. + +### Default colors + +Variable | Meaning | Type | Default +--- | --- | --- | --- +`background` | Bar backgrund color | string | "#000000" +`mute` | Bar mute color | string | "#EB8F8F" +`unmute` | Bar unmute color | string | "#A4CE8A" + +### Default `notification_preset` + +```lua +notification_preset = { + font = "Monospace 10" +} +``` + +## Output table + +Variable | Meaning | Type +--- | --- | --- +`bar` | The widget | `wibox.widget.progressbar` +`channel` | ALSA channel | string +`notify` | The notification | function +`update` | Update `bar` | function +`tooltip` | The tooltip | `awful.tooltip` + +## Buttons + +If you want buttons, just add the following after your widget in `rc.lua`. + +```lua +volume.bar:buttons(awful.util.table.join( + awful.button({}, 1, function() -- left click + awful.spawn(string.format("%s -e alsamixer", terminal)) + end), + awful.button({}, 2, function() -- middle click + os.execute(string.format("%s set %s 100%%", volume.cmd, volume.channel)) + volume.update() + end), + awful.button({}, 3, function() -- right click + os.execute(string.format("%s set %s toggle", volume.cmd, volume.togglechannel or volume.channel)) + volume.update() + end), + awful.button({}, 4, function() -- scroll up + os.execute(string.format("%s set %s 1%%+", volume.cmd, volume.channel)) + volume.update() + end), + awful.button({}, 5, function() -- scroll down + os.execute(string.format("%s set %s 1%%-", volume.cmd, volume.channel)) + volume.update() + end) +)) +``` + +## Keybindings + +Read [here](https://github.com/lcpz/lain/wiki/alsa#keybindings). If you want notifications, use `volume.notify()` instead of `volume.update()`. diff --git a/.config/awesome/lain/wiki/bat.md b/.config/awesome/lain/wiki/bat.md new file mode 100755 index 0000000..4af8cdc --- /dev/null +++ b/.config/awesome/lain/wiki/bat.md @@ -0,0 +1,103 @@ +## Usage + +[Read here.](https://github.com/lcpz/lain/wiki/Widgets#usage) + +### Description + +Shows the remaining time and percentage capacity of your laptop battery, as well +as the current wattage. Multiple batteries are supported. + +Displays a notification when battery is fully charged, low, or critical. + +```lua +local mybattery = lain.widget.bat() +``` + +## Input table + +Variable | Meaning | Type | Default +--- | --- | --- | --- +`timeout` | Refresh timeout (in seconds) | integer | 30 +`pspath` | Power supply directory path | string | "/sys/class/power_supply/" +`battery` | Single battery id | string | autodetected +`batteries` | Multiple batteries id table | table of strings | autodetected +`ac` | AC | string | autodetected +`notify` | Show notification popups | string | "on" +`full_notify` | Show a notification popup when the battery's fully charged | string | inherited value from `notify` +`n_perc` | Percentages assumed for critical and low battery levels | table of integers | `{5, 15}` +`settings` | User settings | function | empty function +`widget` | Widget to render | function | `wibox.widget.textbox` + +The widget will try to autodetect `battery`, `batteries` and `ac`. If something +goes wrong, you will have to define them manually. In that case, you only have +to define one between `battery` and `batteries`. If you have one battery, you +can either use `args.battery = "BAT*"` or `args.batteries = {"BAT*"}`, where `BAT*` +is the identifier of your battery in `pspath` (do not use it as a wildcard). +Of course, if you have multiple batteries, you need to use the latter option. + +To disable notifications, set `notify` to `"off"`. + +If you define `pspath`, **be sure** to not forget the final slash (/). + +`settings` can use the `bat_now` table, which contains the following strings: + +- `status`, general status ("N/A", "Discharging", "Charging", "Full"); +- `n_status[i]`, i-th battery status (like above); +- `ac_status`, AC-plug flag (0 if cable is unplugged, 1 if plugged, "N/A" otherwise); +- `perc`, total charge percentage (integer between 0 and 100 or "N/A"); +- `n_perc[i]`, i-th battery charge percentage (like above); +- `time`, time remaining until charge if charging, until discharge if discharging (HH:MM string or "N/A"); +- `watt`, battery watts (float with 2 decimals); +- `capacity`, remaining battery capacity in percent; +- `n_capacity[i]`, i-th battery remaining capacity (like above). + +and can modify the following three tables, which will be the preset for the naughty notifications: +* `bat_notification_charged_preset` (used if battery is fully charged and connected to AC) +* `bat_notification_low_preset` (used if battery charge level <= 15) +* `bat_notification_critical_preset` (used if battery charge level <= 5) + +Check [here](https://awesomewm.org/doc/api/libraries/naughty.html#notify) for +the list of variables they can contain. Default definitions: + +```lua +bat_notification_charged_preset = { + title = "Battery full", + text = "You can unplug the cable", + timeout = 15, + fg = "#202020", + bg = "#CDCDCD" + } + +``` + +```lua +bat_notification_low_preset = { + title = "Battery low", + text = "Plug the cable!", + timeout = 15, + fg = "#202020", + bg = "#CDCDCD" +} +``` +```lua +bat_notification_critical_preset = { + title = "Battery exhausted", + text = "Shutdown imminent", + timeout = 15, + fg = "#000000", + bg = "#FFFFFF" +} +``` + +## Output table + +Variable | Meaning | Type +--- | --- | --- +`widget` | The widget | `wibox.widget.textbox` +`update` | Update `widget` | function + +The `update` function can be used to refresh the widget before `timeout` expires. + +## Note + +Alternatively, you can try the [`upower` recipe](https://awesomewm.org/recipes/watch). diff --git a/.config/awesome/lain/wiki/cal.md b/.config/awesome/lain/wiki/cal.md new file mode 100755 index 0000000..5b6e358 --- /dev/null +++ b/.config/awesome/lain/wiki/cal.md @@ -0,0 +1,83 @@ +## Usage + +[Read here.](https://github.com/lcpz/lain/wiki/Widgets#usage) + +### Description + +Creates a calendar notification that can be attached to widgets. + +This is a simpler but [faster](https://github.com/awesomeWM/awesome/issues/1861) +alternative to [`awful.widget.calendar_popup`](https://awesomewm.org/doc/api/classes/awful.widget.calendar_popup.html), which emulates UNIX's `cal`. + +```lua +local mycal = lain.widget.cal() +``` + +## Input table + +Variable | Meaning | Type | Default +--- | --- | --- | --- +`attach_to` | List of widgets | table | empty table +`week_start` | First day of the week | integer | 2 (Monday) +`three` | Display three months spanning the date | boolean | false +`followtag` | Display the notification on currently focused screen | boolean | false +`week_number` | Display the week number | string ("none", "left" or "right") | "none" +`week_number_format` | Week number format | string | `"%3d \| "` for "left", `"\| %-3d"` for "right" +`icons` | Path to calendar icons | string | [icons/cal/white/](https://github.com/lcpz/lain/tree/master/icons/cal/white) +`notification_preset` | Notification preset | table | See [default `notification_preset`](https://github.com/lcpz/lain/wiki/cal#default-notification_preset) + +Set `attach_to` as the list of widgets to which you want to attach the calendar, like this: + +```lua +local mycal = lain.widget.cal { + attach_to = { mywidget1, mywidget2, ... }, + -- [...] +} +``` + +For every widget in `attach_to`: + +- Left click / scroll down: switch to previous month. +- Middle click show current month. +- Right click / scroll up: switch to next month. + +With multiple screens, the default behaviour is to show a visual notification pop-up window on the first screen. By setting `followtag` to `true` it will be shown on the currently focused tag screen. + +### Default `notification_preset` + +```lua +notification_preset = { + font = "Monospace 10", + fg = "#FFFFFF", + bg = "#000000" +} +``` + +## Output table + +Variable | Meaning | Type +--- | --- | --- +`attach` | Attach the calendar to an input widget | function +`show` | Show calendar | function +`hide` | Hide calendar | function + +`attach` takes as argument any widget you want to attach the calendar to, while +`show` takes as optional argument an integer to indicate the seconds to timeout. + +## Keybinding + +```lua +awful.key({ altkey }, "c", function () mycal.show(7) end) +``` + +Where `altkey = "Mod1"`. + +## Notes + +* Naughty notifications require `notification_preset.font` to be **monospaced**, in order to correctly display the output. +* If you want to [disable notification icon](https://github.com/lcpz/lain/pull/351), set `icons = ""` in the input table. +* If you want to localise the calendar, put `os.setlocale(os.getenv("LANG"))` in your `rc.lua`. +* If you want to get notifications [only with mouse clicks](https://github.com/lcpz/lain/issues/320) on a given widget, use this code: + ```lua + yourwidget:disconnect_signal("mouse::enter", mycal.hover_on) + ``` diff --git a/.config/awesome/lain/wiki/cpu.md b/.config/awesome/lain/wiki/cpu.md new file mode 100755 index 0000000..d3dd6e5 --- /dev/null +++ b/.config/awesome/lain/wiki/cpu.md @@ -0,0 +1,31 @@ +## Usage + +[Read here.](https://github.com/lcpz/lain/wiki/Widgets#usage) + +### Description + +Shows the current CPU usage, both in general and per core. + +```lua +local mycpu = lain.widget.cpu() +``` + +## Input table + +Variable | Meaning | Type | Default +--- | --- | --- | --- +`timeout` | Refresh timeout (in seconds) | integer | 2 +`settings` | User settings | function | empty function +`widget` | Widget to render | function | `wibox.widget.textbox` + +`settings` can use these strings: + +* `cpu_now.usage`, the general use percentage; +* `cpu_now[i].usage`, the i-th core use percentage, with `i` starting from 1. + +## Output table + +Variable | Meaning | Type +--- | --- | --- +`widget` | The widget | `wibox.widget.textbox` +`update` | Update `widget` | function \ No newline at end of file diff --git a/.config/awesome/lain/wiki/fs.md b/.config/awesome/lain/wiki/fs.md new file mode 100755 index 0000000..a8b82aa --- /dev/null +++ b/.config/awesome/lain/wiki/fs.md @@ -0,0 +1,83 @@ +## Usage + +[Read here.](https://github.com/lcpz/lain/wiki/Widgets#usage) + +### Description + +Shows file systems informations. + +If a partition is given in input, a notification will be displayed when it is almost full. + +```lua +local mypartition = lain.widget.fs() +``` + +## Input table + +Variable | Meaning | Type | Default +--- | --- | --- | --- +`timeout` | Refresh timeout (in seconds) | integer | 600 +`partition` | (Optional) Partition to watch: a notification will be displayed when full | string | `nil` +`threshold` | Percentage threshold at which the notification is triggered | integer | 99 +`notification_preset` | Notification preset | table | See [default `notification_preset`](https://github.com/lcpz/lain/wiki/fs#default-notification_preset) +`followtag` | Display the notification on currently focused screen | boolean | false +`showpopup` | Display popups with mouse hovering | string, possible values: "on", "off" | "on" +`settings` | User settings | function | empty function +`widget` | Widget to render | function | `wibox.widget.textbox` + +`settings` can use the table `fs_now`, which contains a string entry for each file system path available. For instance, root infos are located in the variable `fs_now["/"]`. Every entry in this table have the following variables: + +Variable | Meaning | Type +--- | --- | --- +`units` | (multiple of) units used | string ("Kb", "Mb", "Gb", and so on) +`percentage` | the used percentage | integer +`size` | size in `units` of the given fs | float +`used` | amount of space used in the given fs, expressed in `units` | float +`free` | amount of free space in the given fs, expressed in `units` | float + +Usage example: + +```lua +-- shows used (percentage) and remaining space in home partition +local fsroothome = lain.widget.fs({ + settings = function() + widget:set_text("/home: " .. fs_now["/home"].percentage .. "% (" .. + fs_now["/home"].free .. " " .. fs_now["/home"].units .. " left)") + end +}) +-- output example: "/home: 37% (239.4 Gb left)" +``` + +With multiple screens, the default behaviour is to show a visual notification pop-up window on the first screen. By setting `followtag` to `true` it will be shown on the currently focused tag screen. + +### Default `notification_preset` + +```lua +notification_preset = { + font = "Monospace 10", + fg = "#FFFFFF", + bg = "#000000" +} +``` + +## Output table + +Variable | Meaning | Type +--- | --- | --- +`widget` | The widget | `wibox.widget.textbox` +`show` | The notification | function + +You can display the notification with a key binding like this: + +```lua +awful.key({ altkey }, "h", function () mypartition.show(seconds, scr) end), +``` + +where ``altkey = "Mod1"`` and ``show`` arguments, both optionals, are: + +* `seconds`, notification time in seconds +* `scr`, screen which to display the notification in + +## Note + +Naughty notifications require `notification_preset.font` to be **monospaced**, in order to correctly display the output. diff --git a/.config/awesome/lain/wiki/imap.md b/.config/awesome/lain/wiki/imap.md new file mode 100755 index 0000000..5a17270 --- /dev/null +++ b/.config/awesome/lain/wiki/imap.md @@ -0,0 +1,116 @@ +## Usage + +[Read here.](https://github.com/lcpz/lain/wiki/Widgets#usage) + +### Description + +Shows mails count fetching over IMAP. + +```lua +local myimap = lain.widget.imap(args) +``` + +New mails are notified like this: + + +--------------------------------------------+ + | +---+ | + | |\ /| donald@disney.org has 3 new messages | + | +---+ | + +--------------------------------------------+ + +## Input table + +Required parameters are: + +Variable | Meaning | Type +--- | --- | --- +`server` | Mail server | string +`mail` | User mail | string +`password` | User password | string +`widget` | Widget to render | function | `wibox.widget.textbox` + +while the optional are: + +Variable | Meaning | Type | Default +--- | --- | --- | --- +`port` | IMAP port | integer | 993 +`timeout` | Refresh timeout (in seconds) | integer | 60 +`pwdtimeout` | Timeout for password retrieval function (see [here](https://github.com/lcpz/lain/wiki/imap#password-security)) | integer | 10 +`is_plain` | Define whether `password` is a plain password (true) or a command that retrieves it (false) | boolean | false +`followtag` | Notification behaviour | boolean | false +`notify` | Show notification popups | string | "on" +`settings` | User settings | function | empty function + +`settings` can use `imap_now` table, which contains the following non negative integers: + +- `["MESSAGES"]` +- `["RECENT"]` +- `["UNSEEN"]` + +example of fetch: `total = imap_now["MESSAGES"]`. For backwards compatibility, `settings` can also use `mailcount`, a pointer to `imap_now["UNSEEN"]`. + +Also, `settings` can modify `mail_notification_preset` table, which will be the preset for the naughty notifications. Check [here](https://awesomewm.org/apidoc/libraries/naughty.html#notify) for the list of variables it can contain. Default definition: + +```lua +mail_notification _preset = { + icon = "lain/icons/mail.png", + position = "top_left" +} +``` + +Note that `mailcount` and `imap_now` elements are equals to 0 either if there are no new mails or credentials are invalid, so make sure that your settings are correct. + +With multiple screens, the default behaviour is to show a visual notification pop-up window on the first screen. By setting `followtag` to `true` it will be shown on the currently focused tag screen. + +You can have multiple instances of this widget at the same time. + +## Password security + +The reason why `is_plain` is false by default is to discourage the habit of storing passwords in plain. + +In general, when `is_plain == false`, `password` can be either a string, a table or a function: the widget will execute it asynchronously in the first two cases. + +### Using plain passwords + +You can set your password in plain like this: + +```lua +myimapcheck = lain.widget.imap { + is_plain = true, + password = "mymailpassword", + -- [...] +} +``` + +and you will have the same security provided by `~/.netrc`. + +### Using a password manager + +I recommend to use [spm](https://notabug.org/kl3/spm) or [pass](https://www.passwordstore.org). In this case, `password` has to be a function. Example stub: + +```lua +myimapcheck = lain.widget.imap { + password = function() + -- do your retrieval + return retrieved_password, try_again + end, + -- [...] +} +``` + +Where `retrieved_password` is the password retrieved from the manager, and `try_again` supports [DBus Secret Service](https://specifications.freedesktop.org/secret-service). + +The process flow is that the first `password()` call spawns the unlock prompt, then the second call retrieves the password. [Here](https://gist.github.com/lcpz/1854fc4320f4701957cd5309c8eed4a6) is an example of `password` function. + +## Output table + +Variable | Meaning | Type +--- | --- | --- +`widget` | The widget | `wibox.widget.textbox` +`update` | Update `widget` | function +`timer` | The widget timer | [`gears.timer`](https://awesomewm.org/doc/api/classes/gears.timer.html) +`pwdtimer` | Password retrieval timer (available only if `password` is a function)| [`gears.timer`](https://awesomewm.org/doc/api/classes/gears.timer.html) + +The `update` function can be used to refresh the widget before `timeout` expires. + +You can use `timer` to start/stop the widget as you like. diff --git a/.config/awesome/lain/wiki/mem.md b/.config/awesome/lain/wiki/mem.md new file mode 100755 index 0000000..470908b --- /dev/null +++ b/.config/awesome/lain/wiki/mem.md @@ -0,0 +1,36 @@ +## Usage + +[Read here.](https://github.com/lcpz/lain/wiki/Widgets#usage) + +### Description + +Shows memory status in MiB, [like `top` and `free -h`](https://github.com/lcpz/lain/issues/271). + +```lua +local mymem = lain.widget.mem() +``` + +## Input table + +Variable | Meaning | Type | Default +--- | --- | --- | --- +`timeout` | Refresh timeout (in seconds) | integer | 2 +`settings` | User settings | function | empty function +`widget` | Widget to render | function | `wibox.widget.textbox` + +in `settings` you can use the following variables: + +Variable | Meaning | Type +--- | --- | --- +`mem_now.used` | Memory used (MiB) | string +`mem_now.swapused` | Swap memory used (MiB) | string +`mem_now.perc` | Memory percentage | int + +(See line 23-39 of [this file](https://github.com/lcpz/lain/blob/master/widget/mem.lua) for more potential variables.) + +## Output table + +Variable | Meaning | Type +--- | --- | --- +`widget` | The widget | `wibox.widget.textbox` +`update` | Update `widget` | function \ No newline at end of file diff --git a/.config/awesome/lain/wiki/moc.md b/.config/awesome/lain/wiki/moc.md new file mode 100755 index 0000000..6f68d4e --- /dev/null +++ b/.config/awesome/lain/wiki/moc.md @@ -0,0 +1,123 @@ +## Usage + +[Read here.](https://github.com/lcpz/lain/wiki/Widgets#usage) + +### Description + +A widget for showing the current song track's information from MOC (Music On Console). + +```lua +local mymoc = lain.widget.contrib.moc() +``` + +Now playing songs are notified like this: + + +--------------------------------------------------------+ + | +-------+ | + | |/^\_/^\| Now playing | + | |\ O O /| Cannibal Corpse (Hammer Smashed Face) - 1993 | + | | '.o.' | Hammer Smashed Face (Radio Disney Version) | + | +-------+ | + +--------------------------------------------------------+ + +## Input table + +Variable | Meaning | Type | Default +--- | --- | --- | --- +`timeout` | Refresh timeout (in seconds) | integer | 1 +`music_dir` | Music directory | string | "~/Music" +`cover_size` | Album art notification size (both height and width) | integer | 100 +`cover_pattern` | Pattern for the album art file | string | `*\\.(jpg|jpeg|png|gif)`* +`default_art` | Default art | string | "" +`followtag` | Display the notification on currently focused screen | boolean | false +`settings` | User settings | function | empty function +`widget` | Widget to render | function | `wibox.widget.textbox` + +\* In Lua, "\\\\" means "\" escaped. + +Default `cover_pattern` definition will made the widget set the first jpg, jpeg, png or gif file found in the directory as the album art. + +Pay attention to case sensitivity when defining `music_dir`. + +`settings` can use `moc_now` table, which contains the following string values: + +- state (possible values: "PLAY", "PAUSE", "STOP") +- file +- artist +- title +- album +- elapsed (Time elapsed for the current track) +- total (The current track's total time) + +and can modify `moc_notification_preset` table, which will be the preset for the naughty notifications. Check [here](https://awesomewm.org/apidoc/libraries/naughty.html#notify) for the list of variables it can contain. Default definition: + +```lua +moc_notification_preset = { + title = "Now playing", + timeout = 6, + text = string.format("%s (%s) - %s\n%s", moc_now.artist, + moc_now.album, moc_now.elapsed, moc_now.title) +} +``` + +With multiple screens, the default behaviour is to show a visual notification pop-up window on the first screen. By setting `followtag` to `true` it will be shown on the currently focused tag screen. + +## Output table + +Variable | Meaning | Type +--- | --- | --- +`widget` | The widget | `wibox.widget.textbox` +`update` | Update `widget` | function +`timer` | The widget timer | [`gears.timer`](https://awesomewm.org/doc/api/classes/gears.timer.html) + +The `update` function can be used to refresh the widget before `timeout` expires. + +You can use `timer` to start/stop the widget as you like. + +## Keybindings + +You can control the widget with key bindings like these: + +```lua +-- MOC control +awful.key({ altkey, "Control" }, "Up", + function () + os.execute("mocp -G") -- toggle + moc.update() + end), +awful.key({ altkey, "Control" }, "Down", + function () + os.execute("mocp -s") -- stop + moc.update() + end), +awful.key({ altkey, "Control" }, "Left", + function () + os.execute("mocp -r") -- previous + moc.update() + end), +awful.key({ altkey, "Control" }, "Right", + function () + os.execute("mocp -f") -- next + moc.update() + end), +``` + +where `altkey = "Mod1"`. + +If you don't use the widget for long periods and wish to spare CPU, you can toggle it with a keybinding like this: + +```lua +-- toggle MOC widget +awful.key({ altkey }, "0", + function () + local common = { text = "MOC widget ", position = "top_middle", timeout = 2 } + if moc.timer.started then + moc.timer:stop() + common.text = common.text .. markup.bold("OFF") + else + moc.timer:start() + common.text = common.text .. markup.bold("ON") + end + naughty.notify(common) + end), +``` diff --git a/.config/awesome/lain/wiki/mpd.md b/.config/awesome/lain/wiki/mpd.md new file mode 100755 index 0000000..9f614c0 --- /dev/null +++ b/.config/awesome/lain/wiki/mpd.md @@ -0,0 +1,182 @@ +## Usage + +[Read here.](https://github.com/lcpz/lain/wiki/Widgets#usage) + +### Description + +Shows MPD status. + +```lua +local mympd = lain.widget.mpd() +``` + +Now playing songs are notified like this: + + +--------------------------------------------------------+ + | +-------+ | + | |/^\_/^\| Now playing | + | |\ O O /| Cannibal Corpse (Hammer Smashed Face) - 1993 | + | | '.o.' | Hammer Smashed Face (Radio Disney Version) | + | +-------+ | + +--------------------------------------------------------+ + +**Note:** if MPD is turned off or not set correctly, the widget will constantly display "N/A" values. + +## Input table + +Variable | Meaning | Type | Default +--- | --- | --- | --- +`timeout` | Refresh timeout (in seconds) | integer | 2 +`password` | MPD password | string | "" +`host` | MPD server | string | "127.0.0.1" +`port` | MPD port | string | "6600" +`music_dir` | Music directory | string | "~/Music" +`cover_size` | Album art notification size (both height and width) | integer | 100 +`cover_pattern` | Pattern for the album art file | string | `*.(jpg\|jpeg\|png\|gif)$` +`default_art` | Default art | string | `nil` +`notify` | Show notification pop-ups | string | "on" +`followtag` | Notification behaviour | boolean | false +`settings` | User settings | function | empty function +`widget` | Widget to render | function | `wibox.widget.textbox` + +\* In Lua, "\\\\" means "\" escaped. + +The default `cover_pattern` definition will make the widget set the first JPG, JPEG, PNG or GIF file found in the directory as the album art. + +Pay attention to case sensitivity when defining `music_dir`. + +`settings` can use `mpd_now` table, which contains the following values: + +(**note:** the first four are boolean [flags](https://github.com/lcpz/lain/pull/205), the remaining are all strings) + +- random_mode +- single_mode +- repeat_mode +- consume_mode +- pls_pos (playlist position) +- pls_len (playlist length) +- state (possible values: "play", "pause", "stop") +- file +- artist +- title +- name +- album +- track +- genre +- date +- [time](https://github.com/lcpz/lain/pull/90) (length of current song, in seconds) +- [elapsed](https://github.com/lcpz/lain/pull/90) (elapsed time of current song, in seconds) +- volume + +And can modify `mpd_notification_preset` table, which will be the preset for the naughty notifications. Check [here](https://awesomewm.org/doc/api/libraries/naughty.html#notify) for the list of variables it can contain. Default definition: + +```lua +mpd_notification_preset = { + title = "Now playing", + timeout = 6, + text = string.format("%s (%s) - %s\n%s", mpd_now.artist, + mpd_now.album, mpd_now.date, mpd_now.title) +} +``` + +With multiple screens, the default behaviour is to show a visual notification pop-up window on the first screen. By setting `followtag` to `true` it will be shown on the currently focused tag screen. + +## Output table + +Variable | Meaning | Type +--- | --- | --- +`widget` | The textbox | `wibox.widget.textbox` +`update` | Update `widget` | function +`timer` | The widget timer | [`gears.timer`](https://awesomewm.org/doc/api/classes/gears.timer.html) + +The `update` function can be used to refresh the widget before `timeout` expires. + +You can use `timer` to start/stop the widget as you like. + +## Key bindings + +You can control the widget with key bindings like these: + +```lua +-- MPD control +awful.key({ altkey, "Control" }, "Up", + function () + awful.spawn.with_shell("mpc toggle || ncmpc toggle || pms toggle") + mympd.update() + end), +awful.key({ altkey, "Control" }, "Down", + function () + awful.spawn.with_shell("mpc stop || ncmpc stop || pms stop") + mympd.update() + end), +awful.key({ altkey, "Control" }, "Left", + function () + awful.spawn.with_shell("mpc prev || ncmpc prev || pms prev") + mympd.update() + end), +awful.key({ altkey, "Control" }, "Right", + function () + awful.spawn.with_shell("mpc next || ncmpc next || pms next") + mympd.update() + end), +``` + +Where `altkey = "Mod1"`. + +If you don't use the widget for long periods and wish to spare CPU, you can toggle it with a key binding like this: + +```lua +-- disable MPD widget +awful.key({ altkey }, "0", + function () + local common = { + text = "MPD widget ", + position = "top_middle", + timeout = 2 + } + if mympd.timer.started then + mympd.timer:stop() + common.text = common.text .. markup.bold("OFF") + else + mympd.timer:start() + common.text = common.text .. markup.bold("ON") + end + naughty.notify(common) + end), +``` + +## Notes + +### Cover not showing in notifications + +If the cover file is existent but not showed in notifications, [try](https://github.com/lcpz/lain/issues/393) setting `music_dir` to a symlink of your music folder, rather than to a physical path. This can be easily done through +```shell +ln -s /the/real_path_to_your_music/ /home/username/Music +``` +However, this only applies if the music is stored outside your user-specific folder, for instance in an external partition. + +### Always use `set_markup` + +In `settings`, if you use `widget:set_text`, [it will ignore Pango markup](https://github.com/lcpz/lain/issues/258), so be sure to always use `widget:set_markup`. + +### Volume fade in toggling MPD + +If you want a fade in/out in toggling MPD, you can put [this script](https://gist.github.com/lcpz/76e315bc27c6cdf7edd5021964b88df1) in your local `bin` directory: + +```shell +$ curl https://gist.githubusercontent.com/lcpz/76e315bc27c6cdf7edd5021964b88df1/raw/97f7ba586418a4e07637cfbc91d2974278dfa623/mpd-fade -o ~/bin/mpc-fade +$ chmod +x ~/bin/mpc-fade +``` + +Set your 1% decrease/increase commands [here](https://gist.github.com/lcpz/76e315bc27c6cdf7edd5021964b88df1#file-mpd-fade-L8-L9), then use a key binding like this: + +```lua +-- MPD toggle with volume fading +awful.key({ "Shift" }, "Pause", + function() + awful.spawn.easy_async("mpc-fade 20 4", -- mpc-fade + function(stdout, stderr, reason, exit_code) + mympd.update() + end) + end), +``` diff --git a/.config/awesome/lain/wiki/net.md b/.config/awesome/lain/wiki/net.md new file mode 100755 index 0000000..4d0d508 --- /dev/null +++ b/.config/awesome/lain/wiki/net.md @@ -0,0 +1,117 @@ +## Usage + +[Read here.](https://github.com/lcpz/lain/wiki/Widgets#usage) + +### Description + +Monitors network interfaces and shows current traffic. + +```lua +local mynet = lain.widget.net() +``` + +## Input table + +Variable | Meaning | Type | Default +--- | --- | --- | --- +`timeout` | Refresh timeout (in seconds) | integer | 2 +`iface` | Network device(s) | string (single interface) or table of strings (multiple interfaces) | autodetected +`units` | Units | integer | 1024 (kilobytes) +`notify` | Display "no carrier" notifications | string | "on" +`wifi_state` | Get Wi-Fi connection status | string | "off" +`eth_state` | Get Ethernet connection status | string | "off" +`screen` | Notifications screen | integer | 1 +`format` | String format for output | string | "%.1f" +`settings` | User settings | function | empty function + +`iface` can be a string or an table of the form `{ "eth0", "eth1", ... }` containing a list of the devices to collect data on. + +If more than one device is included, `net_now.sent` and `net_now.received` will contain cumulative values over all given devices. +Use `net_now.devices["eth0"]` to access `sent`, `received`, `state` or `carrier` per device. + +Possible alternative values for `units` are 1 (byte) or multiple of 1024: 1024^2 (MB), 1024^3 (GB), and so on. + +If `notify = "off"` is set, the widget won't display a notification when there's no carrier. + +`settings` can use the following `iface` related strings: + +- `net_now.carrier` ("0", "1"); +- `net_now.state` ("up", "down"); +- `net_now.sent` and `net_now.received` (numbers) will be the sum across all specified interfaces; +- `net_now.devices["interface"]` contains the previous attributes for each detected interface. + +If `wifi_state = "on"` is set, `settings` can use the following extra strings attached to `net_now.devices["wireless interface"]`: +- `wifi` (true, false) indicates if the interface is connected to a network; +- `signal` (number) is the connection signal strength in dBm; + +If `eth_state = "on"` is set, `settings` can use the following extra string: `net_now.devices["ethernet interface"].ethernet`, which is a boolean indicating if an Ethernet connection's active. + +For compatibility reasons, if multiple devices are given, `net_now.carrier` and `net_now.state` correspond to the last interface in the `iface` table and should not be relied upon (deprecated). + +## Output table + +Variable | Meaning | Type +--- | --- | --- +`widget` | The widget | `wibox.widget.textbox` +`update` | Update `widget` | function +`get_devices` | Update the `iface` table | function + +## Notes + +### Setting `iface` manually + +If the widget [spawns a "no carrier" notification and you are sure to have an active network device](https://github.com/lcpz/lain/issues/102), then autodetection is probably not working. This may due to [your user privileges](https://github.com/lcpz/lain/issues/102#issuecomment-246470526). In this case you can set `iface` manually. You can see which device is **UP,LOWER_UP** with the following command: + +```shell +ip link show +``` +## Usage examples +### Two widgets for upload/download rates from the same `iface` + +```lua +local mynetdown = wibox.widget.textbox() +local mynetup = lain.widget.net { + settings = function() + widget:set_markup(net_now.sent) + mynetdown:set_markup(net_now.received) + end +} +``` +### Wi-Fi/Ethernet connection and signal strength indicator +```lua +local wifi_icon = wibox.widget.imagebox() +local eth_icon = wibox.widget.imagebox() +local net = lain.widget.net { + notify = "off", + wifi_state = "on", + eth_state = "on", + settings = function() + local eth0 = net_now.devices.eth0 + if eth0 then + if eth0.ethernet then + eth_icon:set_image(ethernet_icon_filename) + else + eth_icon:set_image() + end + end + + local wlan0 = net_now.devices.wlan0 + if wlan0 then + if wlan0.wifi then + local signal = wlan0.signal + if signal < -83 then + wifi_icon:set_image(wifi_weak_filename) + elseif signal < -70 then + wifi_icon:set_image(wifi_mid_filename) + elseif signal < -53 then + wifi_icon:set_image(wifi_good_filename) + elseif signal >= -53 then + wifi_icon:set_image(wifi_great_filename) + end + else + wifi_icon:set_image() + end + end + end +} +``` \ No newline at end of file diff --git a/.config/awesome/lain/wiki/pulse.md b/.config/awesome/lain/wiki/pulse.md new file mode 100755 index 0000000..c0c4333 --- /dev/null +++ b/.config/awesome/lain/wiki/pulse.md @@ -0,0 +1,136 @@ +## Usage + +[Read here.](https://github.com/lcpz/lain/wiki/Widgets#usage) + +### Description + +Shows and controls PulseAudio volume. + +```lua +local volume = lain.widget.pulse() +``` + +## Input table + +Variable | Meaning | Type | Default +--- | --- | --- | --- +`timeout` | Refresh timeout (in seconds) | integer | 5 +`devicetype` | PulseAudio device type | string ("sink", "source") | "sink" +`cmd` | PulseAudio command | string or function | see [here](https://github.com/lcpz/lain/blob/master/widget/pulse.lua#L25) +`settings` | User settings | function | empty function +`widget` | Widget to render | function | `wibox.widget.textbox` + +`cmd` is a terminal command to catch infos from current default device. You can redefine it, being sure that the ouput is something like this: + +```shell +* index: 0 + volume: front-left: 18340 / 28% / -33.18 dB, front-right: 18340 / 28% / -33.18 dB + muted: no + device.string = "front:1" +``` + +If your devices change dynamically, you can define it as a function which returns a command string. + +If `sed` doesn't work, you can try with `grep`: + +```lua +cmd = "pacmd list-" .. pulse.devicetype .. "s | grep -e $(pactl info | grep -e 'ink' | cut -d' ' -f3) -e 'volume: front' -e 'muted'" +``` + +### `settings` variables + +`settings` can use the following variables: + +Variable | Meaning | Type | Values +--- | --- | --- | --- +`volume_now.device` | Device name | string | device name or "N/A" +`volume_now.index` | Device index | string | >= "0" +`volume_now.muted` | Device mute status | string | "yes", "no", "N/A" +`volume_now.channel` | Device channels | table of string integers | `volume_now.channel[i]`, where `i >= 1` +`volume_now.left` | Front left sink level or first source | string | "0"-"100" +`volume_now.right` | Front right sink level or second source | string | "0"-"100" + +`volume_now.channel` is a table of your PulseAudio devices. Fetch a channel level like this: `volume_now.channel[i]`, where `i >= 1`. + +`volume_now.{left,right}` are pointers for `volume_now.{channel[1], channel[2]}` (stereo). + +## Output table + +Variable | Meaning | Type +--- | --- | --- +`widget` | The widget | `wibox.widget.textbox` +`update` | Update `widget` | function + +## Buttons + +```lua +volume.widget:buttons(awful.util.table.join( + awful.button({}, 1, function() -- left click + awful.spawn("pavucontrol") + end), + awful.button({}, 2, function() -- middle click + os.execute(string.format("pactl set-sink-volume %s 100%%", volume.device)) + volume.update() + end), + awful.button({}, 3, function() -- right click + os.execute(string.format("pactl set-sink-mute %s toggle", volume.device)) + volume.update() + end), + awful.button({}, 4, function() -- scroll up + os.execute(string.format("pactl set-sink-volume %s +1%%", volume.device)) + volume.update() + end), + awful.button({}, 5, function() -- scroll down + os.execute(string.format("pactl set-sink-volume %s -1%%", volume.device)) + volume.update() + end) +)) +``` + +## Keybindings + +```lua +-- PulseAudio volume control +awful.key({ altkey }, "Up", + function () + os.execute(string.format("pactl set-sink-volume %s +1%%", volume.device)) + volume.update() + end), +awful.key({ altkey }, "Down", + function () + os.execute(string.format("pactl set-sink-volume %s -1%%", volume.device)) + volume.update() + end), +awful.key({ altkey }, "m", + function () + os.execute(string.format("pactl set-sink-mute %s toggle", volume.device)) + volume.update() + end), +awful.key({ altkey, "Control" }, "m", + function () + os.execute(string.format("pactl set-sink-volume %s 100%%", volume.device)) + volume.update() + end), +awful.key({ altkey, "Control" }, "0", + function () + os.execute(string.format("pactl set-sink-volume %s 0%%", volume.device)) + volume.update() + end), +``` + +where `altkey = "Mod1"`. + +## Example + +```lua +-- PulseAudio volume (based on multicolor theme) +local volume = lain.widget.pulse { + settings = function() + vlevel = volume_now.left .. "-" .. volume_now.right .. "% | " .. volume_now.device + if volume_now.muted == "yes" then + vlevel = vlevel .. " M" + end + widget:set_markup(lain.util.markup("#7493d2", vlevel)) + end +} +``` diff --git a/.config/awesome/lain/wiki/pulsebar.md b/.config/awesome/lain/wiki/pulsebar.md new file mode 100755 index 0000000..de3a475 --- /dev/null +++ b/.config/awesome/lain/wiki/pulsebar.md @@ -0,0 +1,98 @@ +## Usage + +[Read here.](https://github.com/lcpz/lain/wiki/Widgets#usage) + +### Description + +Shows PulseAudio volume with a progressbar; provides tooltips and notifications. + +```lua +local volume = lain.widget.pulsebar() +``` + +## Input table + +Variable | Meaning | Type | Default +--- | --- | --- | --- +`timeout` | Refresh timeout (in seconds) | integer | 5 +`settings` | User settings | function | empty function +`width` | Bar width | number | 63 +`height` | Bar height | number | 1 +`margins` | Bar margins | number | 1 +`paddings` | Bar paddings | number | 1 +`ticks` | Set bar ticks on | boolean | false +`ticks_size` | Ticks size | number | 7 +`tick` | String for a notification tick | string | "|" +`tick_pre` | String for the left notification delimeter | string | "[" +`tick_post` | String for the right notification delimeter | string | "]" +`tick_none` | String for an empty notification tick | string | " " +`scallback` | [PulseAudio sink callback](https://github.com/lcpz/lain/wiki/pulseaudio/) | function | `nil` +`sink` | Mixer sink | number | 0 +`colors` | Bar colors | table | see [Default colors](https://github.com/lcpz/lain/wiki/pulsebar#default-colors) +`notification_preset` | Notification preset | table | See [default `notification_preset`](https://github.com/lcpz/lain/wiki/pulsebar#default-notification_preset) +`followtag` | Display the notification on currently focused screen | boolean | false +`notification_preset` | Notification preset | table | See [default `notification_preset`](https://github.com/lcpz/lain/wiki/pulsebar#default-notification_preset) +`devicetype` | PulseAudio device type | string ("sink", "source") | "sink" +`cmd` | PulseAudio command | string or function | see [here](https://github.com/lcpz/lain/blob/master/widget/pulsebar.lua#L48) + +Read [pulse](https://github.com/lcpz/lain/wiki/pulse) page for `cmd` settings. + +`settings` can use [these variables](https://github.com/lcpz/lain/wiki/pulse#settings-variables). + +With multiple screens, the default behaviour is to show a visual notification pop-up window on the first screen. By setting `followtag` to `true` it will be shown on the currently focused tag screen. + +### Default colors + +Variable | Meaning | Type | Default +--- | --- | --- | --- +`background` | Bar backgrund color | string | "#000000" +`mute` | Bar mute color | string | "#EB8F8F" +`unmute` | Bar unmute color | string | "#A4CE8A" + +### Default `notification_preset` + +```lua +notification_preset = { + font = "Monospace 10" +} +``` + +## Output table + +Variable | Meaning | Type +--- | --- | --- +`bar` | The widget | `wibox.widget.progressbar` +`device` | PulseAudio device | string +`notify` | The notification | function +`update` | Update state | function +`tooltip` | The tooltip | `awful.tooltip` + +## Buttons + +```lua +volume.bar:buttons(awful.util.table.join( + awful.button({}, 1, function() -- left click + awful.spawn("pavucontrol") + end), + awful.button({}, 2, function() -- middle click + os.execute(string.format("pactl set-sink-volume %d 100%%", volume.device)) + volume.update() + end), + awful.button({}, 3, function() -- right click + os.execute(string.format("pactl set-sink-mute %d toggle", volume.device)) + volume.update() + end), + awful.button({}, 4, function() -- scroll up + os.execute(string.format("pactl set-sink-volume %d +1%%", volume.device)) + volume.update() + end), + awful.button({}, 5, function() -- scroll down + os.execute(string.format("pactl set-sink-volume %d -1%%", volume.device)) + volume.update() + end) +)) +``` + +## Keybindings + +Same as [here](https://github.com/lcpz/lain/wiki/pulse#keybindings). If you want notifications, use `volume.notify()` instead of `volume.update()`. diff --git a/.config/awesome/lain/wiki/redshift.md b/.config/awesome/lain/wiki/redshift.md new file mode 100755 index 0000000..ea6f637 --- /dev/null +++ b/.config/awesome/lain/wiki/redshift.md @@ -0,0 +1,103 @@ +### What is Redshift? # + +[**Project homepage**](http://jonls.dk/redshift/) + +>**Redshift** is an application that adjusts the computer display's color temperature based upon the Sun's apparent position in relation to the user's location on Earth. +> +>The program is free software, inspired by the proprietary f.lux, and can be used to reduce eye strain as well as insomnia and delayed sleep phase syndrome. +> +>The computer display's color temperature transitions evenly from night to daytime temperature to allow the user's eyes to slowly adapt. At night, the color temperature is low and is typically 3000–4000 K (default is 3500 K), preferably matching the room's lighting temperature. Typical color temperature during the daytime is 5500–6500 K (default is 5500 K). + +**Source:** [Wikipedia](https://en.wikipedia.org/wiki/Redshift_%28software%29) + +### Preparations + +**Redshift must be installed** on your system if you want to use this widget. + +Packages should be available for most distributions. Source code and build instructions can be found on Github [here](https://github.com/jonls/redshift). + +You also need a valid config file. Please see the [project homepage](http://jonls.dk/redshift/) for details. An example: [`~/.config/redshift.conf`](https://github.com/jonls/redshift/blob/master/redshift.conf.sample). + +You have to match the location settings to your personal situation: you can adjust the `lat` and `lon` variables using a [web service](https://encrypted.google.com/search?q=get+latitude+and+longitude). + +You might also want to modify the color temperatures to fit your preferences. + +### Using the widget + +This widget provides the following functions: + +| function | meaning | +| --- | --- | +| `redshift.toggle()` | Toggles Redshift adjustments on or off, and also restarts it if terminates. | +| `redshift.attach(widget, update_function)` | Attach to a widget. Click on the widget to toggle redshift on or off. `update_function` is a callback function which will be triggered each time Redshift changes its status. (See the examples below.) | + +### Usage examples + +#### Textbox status widget + +```lua +myredshift = wibox.widget.textbox() +lain.widget.contrib.redshift.attach( + myredshift, + function (active) + if active then + myredshift:set_text("RS on") + else + myredshift:set_text("RS off") + end + end +) +``` + +Then add `myredshift` to your wibox. + +#### Checkbox status widget + +```lua +local markup = lain.util.markup + +local myredshift = wibox.widget{ + checked = false, + check_color = "#EB8F8F", + border_color = "#EB8F8F", + border_width = 1, + shape = gears.shape.square, + widget = wibox.widget.checkbox +} + +local myredshift_text = wibox.widget{ + align = "center", + widget = wibox.widget.textbox, +} + +local myredshift_stack = wibox.widget{ + myredshift, + myredshift_text, + layout = wibox.layout.stack +} + +lain.widget.contrib.redshift.attach( + myredshift, + function (active) + if active then + -- rename 'beautiful' to 'theme' if using awesome-copycats + myredshift_text:set_markup(markup(beautiful.bg_normal, "R")) + else + -- rename 'beautiful' to 'theme' if using awesome-copycats + myredshift_text:set_markup(markup(beautiful.fg_normal, "R")) + end + myredshift.checked = active + end +) +``` + +Then add `myredshift_stack` to your wibox. + +#### Keybinding + +Add this to the keybindings in your `rc.lua`: + +```lua +-- Toggle Redshift with Mod+Shift+t +awful.key({ modkey, "Shift" }, "t", function () lain.widget.contrib.redshift.toggle() end), +``` diff --git a/.config/awesome/lain/wiki/sysload.md b/.config/awesome/lain/wiki/sysload.md new file mode 100755 index 0000000..5ed4c97 --- /dev/null +++ b/.config/awesome/lain/wiki/sysload.md @@ -0,0 +1,28 @@ +## Usage + +[Read here.](https://github.com/lcpz/lain/wiki/Widgets#usage) + +### Description + +Shows the current system load. + +```lua +mysysload = lain.widget.sysload() +``` + +## Input table + +Variable | Meaning | Type | Default +--- | --- | --- | --- +`timeout` | Refresh timeout (in seconds) | integer | 2 +`settings` | User settings | function | empty function +`widget` | Widget to render | function | `wibox.widget.textbox` + +`settings` can use strings `load_1`, `load_5` and `load_15`, which are the load averages over 1, 5, and 15 minutes. + +## Output table + +Variable | Meaning | Type +--- | --- | --- +`widget` | The widget | `wibox.widget.textbox` +`update` | Update `widget` | function \ No newline at end of file diff --git a/.config/awesome/lain/wiki/task.md b/.config/awesome/lain/wiki/task.md new file mode 100755 index 0000000..af53a6a --- /dev/null +++ b/.config/awesome/lain/wiki/task.md @@ -0,0 +1,51 @@ +## Usage + +[Read here.](https://github.com/lcpz/lain/wiki/Widgets#usage) + +### Description + +Attaches a [taskwarrior](http://taskwarrior.org) notifications to a widget, and lets you execute `task` commands from the promptbox. + +```lua +lain.widget.contrib.task.attach(widget, args) +``` + +`args` is an optional table which can contain: + +Variable | Meaning | Type | Default +--- | --- | --- | --- +`show_cmd` | Taskwarrior command to show in the popup | string | "task next" +`prompt_text` | Prompt text | string | "Enter task command: " +`followtag` | Display the notification on currently focused screen | boolean | false +`notification_preset` | Notification preset | table | See [default `notification_preset`](https://github.com/lcpz/lain/wiki/task#default-notification_preset) + +The tasks are shown in a notification popup when the mouse is moved over the attached `widget`, and the popup is hidden when the mouse is moved away. By default, the notification will show the output of `task next`. With `show_cmd`, the `task` popup command can be customized, for example if you want to [filter the tasks](https://taskwarrior.org/docs/filter.html) or show a [custom report](https://github.com/lcpz/lain/pull/213). + +With multiple screens, the default behaviour is to show a visual notification pop-up window on the first screen. By setting `followtag` to `true` it will be shown on the currently focused tag screen. + +You can call the notification with a keybinding like this: + +```lua +awful.key({ modkey, altkey }, "t", function () lain.widget.contrib.task.show(scr) end), +``` + +where ``altkey = "Mod1"`` and `scr` (optional) indicates the screen which you want the notification in. + +And you can prompt to input a `task` command with a keybinding like this: + +```lua +awful.key({ altkey }, "t", lain.widget.contrib.task.prompt), +``` + +### Default `notification_preset` + +```lua +notification_preset = { + font = "Monospace 10", + icon = helpers.icons_dir .. "/taskwarrior.png" +} +``` + +## Note + +* If your widget does not display `task next` output, try changing Taskwarrior verbose, for instance: `show_cmd = 'task rc.verbose:label'` or `show_cmd = 'task rc.verbose:nothing'`. \ No newline at end of file diff --git a/.config/awesome/lain/wiki/temp.md b/.config/awesome/lain/wiki/temp.md new file mode 100755 index 0000000..a4f8161 --- /dev/null +++ b/.config/awesome/lain/wiki/temp.md @@ -0,0 +1,37 @@ +## Usage + +[Read here.](https://github.com/lcpz/lain/wiki/Widgets#usage) + +### Description + +Shows the current CPU temperature. + +```lua +local mytemp = lain.widget.temp() +``` + +## Input table + +Variable | Meaning | Type | Default +--- | --- | --- | --- +`timeout` | Refresh timeout (in seconds) | integer | 30 +`tempfile` | Path of file which stores core temperature value | string | "/sys/devices/virtual/thermal/thermal_zone0/temp" +`settings` | User settings | function | empty function +`format` | String format for output | string | "%.1f" +`widget` | Widget to render | function | `wibox.widget.textbox` + +`settings` can use the string `coretemp_now`, which contains the info retrieved from `tempfile`, and the table `temp_now`, which contains an entry for each `*temp*` file in each directory in the following paths: + +```shell +/sys/class/devices/virtual/thermal/thermal_zone* +/sys/class/devices/platform/coretemp*/hwmon/hwon* +``` + +All values are expressed in Celsius (GNU/Linux standard). + +## Output table + +Variable | Meaning | Type +--- | --- | --- +`widget` | The widget | `wibox.widget.textbox` +`update` | Update `widget` | function diff --git a/.config/awesome/lain/wiki/tp_smapi.md b/.config/awesome/lain/wiki/tp_smapi.md new file mode 100755 index 0000000..3fa8adf --- /dev/null +++ b/.config/awesome/lain/wiki/tp_smapi.md @@ -0,0 +1,104 @@ +# Description + +[`tp_smapi`](http://www.thinkwiki.org/wiki/Tp_smapi) interface and widget creator. + +```lua +local tp_smapi = lain.widget.contrib.tp_smapi(apipath) +``` + +The argument `apipath` is an optional string which defines the API path. Its default value is `"/sys/devices/platform/smapi"`. + +# Functions + +## tp_smapi.get(batid, feature) + +Gets the `feature` of battery `batid`. Returns a string. The list of available features is available at [this page](https://www.thinkwiki.org/wiki/Tp_smapi#Battery_status_features). + +## tp_smapi.installed(batid) + +Checks if battery `batid` is installed. Returns a boolean. + +## tp_smapi.status(batid) + +Gets the status of battery `batid`. Returns a string ("charging", "discharging", or "full"). + +## tp_smapi.percentage(batid) + +Gets the percentage of battery `batid`. Returns a numeric string. + +## tp_smapi.time(batid) + +Gets the time of battery `batid`. Depending on the current status, it can be either running or charging time. Returns a string of the format `HH:MM`. + +## tp_smapi.hide() + +Removes any notification spawned by `tp_smapi.show`. + +## tp_smapi.show(batid, seconds, scr) + +Notifies the current information of battery `batid` for `seconds` seconds on screen `scr`. +The argument `scr` is optional, and if missing, the notification will be displayed on the currently focused screen. + +## tp_smapi.create_widget(args) + +Creates a [lain widget](https://github.com/lcpz/lain/wiki/Widgets#usage) of the available ThinkPad batteries. + +```lua +local tpbat = tp_smapi.create_widget() +``` + +### Input table + +Variable | Meaning | Type | Default +--- | --- | --- | --- +`widget` | The widget type to use | [`wibox.widget`](https://awesomewm.org/doc/api/classes/wibox.widget.html) | [`wibox.widget.textbox`](https://awesomewm.org/doc/api/classes/wibox.widget.textbox.html) +`timeout` | Refresh timeout (in seconds) | integer | 30 +`pspath` | Power supply directory path | string | "/sys/class/power_supply/" +`battery` | Single battery id | string | autodetected +`batteries` | Multiple batteries id table | table of strings | autodetected +`settings` | User settings | function | empty function +`widget` | Widget to render | function | `wibox.widget.textbox` + +The widget will try to autodetect `battery` and `batteries`. If something +goes wrong, you will have to define them manually. In that case, you only have +to define one between `battery` and `batteries`. If you have one battery, you +can either use `args.battery = "BAT*"` or `args.batteries = {"BAT*"}`, where `BAT*` +is the identifier of your battery in `pspath` (do not use it as a wildcard). +Of course, if you have multiple batteries, you need to use the latter option. + +If you define `pspath`, **be sure** to not forget the final slash (/). + +`settings` can use the `tpbat_now` table, which contains the following strings: + +- `status`, general status ("N/A", "discharging", "charging", "full"); +- `n_status[i]`, i-th battery status (like above); +- `n_perc[i]`, i-th battery charge percentage (like above); +- `n_time[i]`, i-th battery running or charging time (HH:MM string or "N/A"); + +`n_time[i]` is the running time of battery `i` when it is discharging, and the charging time otherwise. + +### Output table + +Variable | Meaning | Type +--- | --- | --- +`widget` | The widget | [`wibox.widget`](https://awesomewm.org/doc/api/classes/wibox.widget.html) | [textbox](https://awesomewm.org/doc/api/classes/wibox.widget.textbox.html) +`batteries` | Battery identifiers | Table of strings +`update` | Update `widget` | function +`timer` | The widget timer | [`gears.timer`](https://awesomewm.org/doc/api/classes/gears.timer.html) + +The `update` function can be used to refresh the widget before `timeout` expires. + +### Usage example + +```lua +local tp_smapi = lain.widget.contrib.tp_smapi() +local bat = tp_smapi.create_widget { + battery = "BAT0", + settings = function() + widget:set_markup(tpbat_now.n_perc[1] .. "%") + end +} + +bat.widget:connect_signal("mouse::enter", function () tp_smapi.show("BAT0") end) +bat.widget:connect_signal("mouse::leave", function () tp_smapi.hide() end) +``` diff --git a/.config/awesome/lain/wiki/watch.md b/.config/awesome/lain/wiki/watch.md new file mode 100755 index 0000000..ff18a5c --- /dev/null +++ b/.config/awesome/lain/wiki/watch.md @@ -0,0 +1,222 @@ +## Usage + +[Read here.](https://github.com/lcpz/lain/wiki/Widgets#usage) + +### Description + +Template for asynchronous watcher widgets. + +Executes an input command and makes the user feed a `wibox.widget` with the output. + +```lua +local mywatch = lain.widget.watch() +``` + +This has been implemented in Awesome 4.0 as [`awful.widget.watch`](https://awesomewm.org/doc/api/classes/awful.widget.watch.html). But while Awesome `watch` returns only the widget, Lain one returns a table including its timer and internal update function too. + +## Input table + +Variable | Meaning | Type | Default +--- | --- | --- | --- +`widget` | Widget to feed | `wibox.widget` | `wibox.widget.textbox` +`timeout` | Refresh timeout seconds | number | 5 +`cmd` | The command to execute | string **or** table | `nil` +`nostart` | Widget timer doesn't start immediately | boolean | false +`stoppable` | Widget timer is stoppable | boolean | false +`settings` | User settings | function | see [Default `settings` function](https://github.com/lcpz/lain/wiki/watch#default-settings-function) + +If your command needs a shell, you need to set `cmd` as an array of 3 strings, where the first contains the shell, the second contains `-c`, and the third contains the actual command. Example: + +```lua +cmd = { awful.util.shell, "-c", "myactualcommand" } +``` + +`settings` can use the string `output`, which is the output of `cmd`. + +### Default `settings` function + +```lua +settings = function() widget:set_text(output) end +``` +## Output table + +Variable | Meaning | Type +--- | --- | --- +`widget` | The widget | input widget type or `wibox.widget.textbox` +`update` | Update `widget` | function +`timer` | The widget timer | [`gears.timer`](https://awesomewm.org/doc/api/classes/gears.timer.html) or `nil` + +The `update` function can be used to refresh the widget before `timeout` expires. + +If `stoppable == true`, the widget will have an ad-hoc timer, which you can control though `timer` variable. + +## Use case examples + +### bitcoin + +```lua +-- Bitcoin to USD current price, using Coinbase V1 API +local bitcoin = lain.widget.watch({ + timeout = 43200, -- half day + stoppable = true, + cmd = "curl -m5 -s 'https://coinbase.com/api/v1/prices/buy'", + settings = function() + local btc, pos, err = require("lain.util").dkjson.decode(output, 1, nil) + local btc_price = (not err and btc and btc["subtotal"]["amount"]) or "N/A" + + -- customize here + widget:set_text(btc_price) + end +}) +``` + +### btrfs + +```lua +-- btrfs root df +local myrootfs = lain.widget.watch({ + timeout = 600, + cmd = "btrfs filesystem df -g /", + settings = function() + local total, used = string.match(output, "Data.-total=(%d+%.%d+)GiB.-used=(%d+%.%d+)GiB") + local percent_used = math.ceil((tonumber(used) / tonumber(total)) * 100) + + -- customize here + widget:set_text(" [/: " .. percent_used .. "%] ") + end +}) +``` + +### cmus + +```lua +-- cmus audio player +local cmus = lain.widget.watch({ + timeout = 2, + stoppable = true, + cmd = "cmus-remote -Q", + settings = function() + local cmus_now = { + state = "N/A", + artist = "N/A", + title = "N/A", + album = "N/A" + } + + for w in string.gmatch(output, "(.-)tag") do + a, b = w:match("(%w+) (.-)\n") + cmus_now[a] = b + end + + -- customize here + widget:set_text(cmus_now.artist .. " - " .. cmus_now.title) + end +}) +``` + +### maildir + +```lua +-- checks whether there are files in the "new" directories of a mail dirtree +local mailpath = "~/Mail" +local mymaildir = lain.widget.watch({ + timeout = 60, + stoppable = true, + cmd = { awful.util.shell, "-c", string.format("ls -1dr %s/*/new/*", mailpath) }, + settings = function() + local inbox_now = { digest = "" } + + for dir in output:gmatch(".-/(%w+)/new") do + inbox_now[dir] = 1 + for _ in output:gmatch(dir) do + inbox_now[dir] = inbox_now[dir] + 1 + end + if #inbox_now.digest > 0 then inbox_now.digest = inbox_now.digest .. ", " end + inbox_now.digest = inbox_now.digest .. string.format("%s (%d)", dir, inbox_now[dir]) + end + + -- customize here + widget:set_text("mail: " .. inbox_now.digest) + end +}) +``` + +### mpris + +```lua +-- infos from mpris clients such as spotify and VLC +-- based on https://github.com/acrisci/playerctl +local mpris = lain.widget.watch({ + cmd = "playerctl status && playerctl metadata", + timeout = 2, + stoppable = true, + settings = function() + local escape_f = require("awful.util").escape + local mpris_now = { + state = "N/A", + artist = "N/A", + title = "N/A", + art_url = "N/A", + album = "N/A", + album_artist = "N/A" + } + + mpris_now.state = string.match(output, "Playing") or + string.match(output, "Paused") or "N/A" + + for k, v in string.gmatch(output, "'[^:]+:([^']+)':[%s]<%[?'([^']+)'%]?>") + do + if k == "artUrl" then mpris_now.art_url = v + elseif k == "artist" then mpris_now.artist = escape_f(v) + elseif k == "title" then mpris_now.title = escape_f(v) + elseif k == "album" then mpris_now.album = escape_f(v) + elseif k == "albumArtist" then mpris_now.album_artist = escape_f(v) + end + end + + -- customize here + widget:set_text(mpris_now.artist .. " - " .. mpris_now.title) + end +}) +``` + +### upower + +```lua +-- battery infos from freedesktop upower +local mybattery = lain.widget.watch({ + timeout = 30, + cmd = { awful.util.shell, "-c", "upower -i /org/freedesktop/UPower/devices/battery_BAT | sed -n '/present/,/icon-name/p'" }, + settings = function() + local bat_now = { + present = "N/A", + state = "N/A", + warninglevel = "N/A", + energy = "N/A", + energyfull = "N/A", + energyrate = "N/A", + voltage = "N/A", + percentage = "N/A", + capacity = "N/A", + icon = "N/A" + } + + for k, v in string.gmatch(output, '([%a]+[%a|-]+):%s*([%a|%d]+[,|%a|%d]-)') do + if k == "present" then bat_now.present = v + elseif k == "state" then bat_now.state = v + elseif k == "warning-level" then bat_now.warninglevel = v + elseif k == "energy" then bat_now.energy = string.gsub(v, ",", ".") -- Wh + elseif k == "energy-full" then bat_now.energyfull = string.gsub(v, ",", ".") -- Wh + elseif k == "energy-rate" then bat_now.energyrate = string.gsub(v, ",", ".") -- W + elseif k == "voltage" then bat_now.voltage = string.gsub(v, ",", ".") -- V + elseif k == "percentage" then bat_now.percentage = tonumber(v) -- % + elseif k == "capacity" then bat_now.capacity = string.gsub(v, ",", ".") -- % + elseif k == "icon-name" then bat_now.icon = v + end + end + + -- customize here + widget:set_text("Bat: " .. bat_now.percentage .. " " .. bat_now.state) + end +}) +``` diff --git a/.config/awesome/lain/wiki/weather.md b/.config/awesome/lain/wiki/weather.md new file mode 100755 index 0000000..6052156 --- /dev/null +++ b/.config/awesome/lain/wiki/weather.md @@ -0,0 +1,133 @@ +## Usage + +[Read here.](https://github.com/lcpz/lain/wiki/Widgets#usage) + +### Description + +Provides current weather status widgets and X-days forecast pop-up notifications. + +Powered by OpenWeatherMap. Obtain a free API key [here](http://openweathermap.org/api) and set it as the `APPID` argument. + +By default, it uses [current](http://openweathermap.org/current) for current weather data and [forecast16](http://openweathermap.org/forecast16) for forecasts. + +```lua +local myweather = lain.widget.weather() +``` + +## Input table + +Variable | Meaning | Type | Default +--- | --- | --- | --- +`APPID` | API key | String | `nil` +`timeout` | Refresh timeout seconds for current weather status | number | 900 (15 min) +`current_call` | Command to fetch weather status data from the API | string | see `default_current_call` +`forecast_call` | Command to fetch forecast data from the API | string | see `default_forecast_call` +`city_id` | API city code | number | not set +`units` | Temperature units system | string | "metric" +`lang` | API data localization | string | "en" +`cnt` | Forecast days interval | integer | 5 +`icons_path` | Icons path | string | `lain/icons/openweathermap` +`notification_preset` | Preset for notifications | table | empty table +`notification_text_fun` | Function to format forecast notifications | function | see `notification_text_fun` below +`weather_na_markup` | Markup to be used when weather textbox is not available | text | " N/A " +`followtag` | Display the notification on currently focused screen | boolean | false +`showpopup` | Display popups with mouse hovering | string, possible values: "on", "off" | "on" +`settings` | User settings | function | empty function +`widget` | Widget to render | function | `wibox.widget.textbox` + +- ``default_current_call`` + + `"curl -s 'http://api.openweathermap.org/data/2.5/weather?id=%s&units=%s&lang=%s&APPID=%s'"` + + You can rewrite it using any fetcher solution you like, or you can modify it in order to fetch data by city name, instead of ID: just replace `id` with `q`: + + `"curl -s 'http://api.openweathermap.org/data/2.5/weather?q=%s&units=%s&lang=%s&APPID=%s'"` + + and set `city_id` with your city name, for instance `city_id = "London,UK"`. + +- ``default_forecast_call`` + + `"curl -s 'http://api.openweathermap.org/data/2.5/forecast/daily?id=%s&units=%s&lang=%s&APPID=%s'"` + + Like above. + +- ``city_id`` + + An integer that defines the OpenWeatherMap ID code of your city. + To obtain it go to [OpenWeatherMap](http://openweathermap.org/) and query for your city in the top search bar. The link will look like this: + + http://openweathermap.org/city/2643743 + + your `city_id` is the number at the end. + +- ``units`` + + - For temperature in Fahrenheit use `units = "imperial"` + - For temperature in Celsius use `units = "metric"` (Lain default) + - For temperature in Kelvin use `units = "standard"` (OpenWeatherMap default) + +- ``lang`` + + See *Multilingual Support* section [here](http://openweathermap.org/current). + +- ``icons_path`` + + You can set your own icons path if you don't wish to use `lain/icons/openweathermap`. Just be sure that your icons are PNGs and named exactly like [OpenWeatherMap ones](http://openweathermap.org/weather-conditions). + +- ``notification_preset`` + + Notifications preset table. See [here](https://awesomewm.org/doc/api/libraries/naughty.html#notify) for the details. + +- ``notification_text_fun`` + ```lua + function (wn) + local day = os.date("%a %d", wn["dt"]) + local temp = math.floor(wn["main"]["temp"]) + local desc = wn["weather"][1]["description"] + + return string.format("%s: %s, %d ", day, desc, temp) + end + ``` + +- ``followtag`` + + With multiple screens, the default behaviour is to show a visual notification pop-up window on the first screen. By setting `followtag` to `true` it will be shown on the currently focused tag screen. + +- ``settings`` + + In your `settings` function, you can use `widget` variable to refer to the textbox, and the dictionary `weather_now` to refer to data retrieved by `current_call`. The dictionary is built with [dkjson library](http://dkolf.de/src/dkjson-lua.fsl/home), and its structure is defined [here](http://openweathermap.org/weather-data). + For instance, you can retrieve current weather status and temperature in this way: + ```lua + descr = weather_now["weather"][1]["description"]:lower() + units = math.floor(weather_now["main"]["temp"]) + ``` + +## Output table + +Variable | Meaning | Type +--- | --- | --- +`widget` | The widget | `wibox.widget.textbox` +`icon` | The icon | `wibox.widget.imagebox` +`update` | Update `widget` | function +`timer` | The widget timer | [`gears.timer`](https://awesomewm.org/doc/api/classes/gears.timer.html) +`timer_forecast` | The forecast notification timer | [`gears.timer`](https://awesomewm.org/doc/api/classes/gears.timer.html) + +## Functions + +You can attach the forecast notification to any widget like this: + +```lua +myweather.attach(obj) +``` + +Hovering over ``obj`` will display the notification. + +## Key bindings + +You can create a key binding for the weather pop-up like this: + +```lua +awful.key( { "Mod1" }, "w", function () myweather.show(5) end ) +``` + +Where the ``show`` argument is an integer defining timeout seconds. diff --git a/.config/awesome/mytheme.lua b/.config/awesome/mytheme.lua new file mode 100755 index 0000000..89362af --- /dev/null +++ b/.config/awesome/mytheme.lua @@ -0,0 +1,399 @@ +--[ + + -- Powerarrow Awesome WM theme github.com/lcpz + +--]] + +local gears = require("gears") +local lain = require("lain") +local awful = require("awful") +local wibox = require("wibox") +local dpi = require("beautiful.xresources").apply_dpi + +local math, string, os = math, string, os +local my_table = awful.util.table or gears.table -- 4.{0,1} compatibility + +local theme = {} +theme.dir = os.getenv("HOME") .. "/.config/awesome/themes/powerarrow" +theme.wallpaper = theme.dir .. "/wall.png" +theme.font = "MonoLisa 9" +theme.fg_normal = "#FEFEFE" +theme.fg_focus = "#32D6FF" +theme.fg_urgent = "#C83F11" +theme.bg_normal = "#222222" +theme.bg_focus = "#1E2320" +theme.bg_urgent = "#3F3F3F" +theme.taglist_fg_focus = "#00CCFF" +theme.tasklist_bg_focus = "#222222" +theme.tasklist_fg_focus = "#00CCFF" +theme.border_width = dpi(2) +theme.border_normal = "#3F3F3F" +theme.border_focus = "#6F6F6F" +theme.border_marked = "#CC9393" +theme.titlebar_bg_focus = "#3F3F3F" +theme.titlebar_bg_normal = "#3F3F3F" +theme.titlebar_bg_focus = theme.bg_focus +theme.titlebar_bg_normal = theme.bg_normal +theme.titlebar_fg_focus = theme.fg_focus +theme.menu_height = dpi(16) +theme.menu_width = dpi(140) +theme.menu_submenu_icon = theme.dir .. "/icons/submenu.png" +theme.awesome_icon = theme.dir .. "/icons/awesome.png" +theme.taglist_squares_sel = theme.dir .. "/icons/square_sel.png" +theme.taglist_squares_unsel = theme.dir .. "/icons/square_unsel.png" +theme.layout_tile = theme.dir .. "/icons/tile.png" +theme.layout_tileleft = theme.dir .. "/icons/tileleft.png" +theme.layout_tilebottom = theme.dir .. "/icons/tilebottom.png" +theme.layout_tiletop = theme.dir .. "/icons/tiletop.png" +theme.layout_fairv = theme.dir .. "/icons/fairv.png" +theme.layout_fairh = theme.dir .. "/icons/fairh.png" +theme.layout_spiral = theme.dir .. "/icons/spiral.png" +theme.layout_dwindle = theme.dir .. "/icons/dwindle.png" +theme.layout_max = theme.dir .. "/icons/max.png" +theme.layout_fullscreen = theme.dir .. "/icons/fullscreen.png" +theme.layout_magnifier = theme.dir .. "/icons/magnifier.png" +theme.layout_floating = theme.dir .. "/icons/floating.png" +theme.widget_ac = theme.dir .. "/icons/ac.png" +theme.widget_battery = theme.dir .. "/icons/battery.png" +theme.widget_battery_low = theme.dir .. "/icons/battery_low.png" +theme.widget_battery_empty = theme.dir .. "/icons/battery_empty.png" +theme.widget_brightness = theme.dir .. "/icons/brightness.png" +theme.widget_mem = theme.dir .. "/icons/mem.png" +theme.widget_cpu = theme.dir .. "/icons/cpu.png" +theme.widget_temp = theme.dir .. "/icons/temp.png" +theme.widget_net = theme.dir .. "/icons/net.png" +theme.widget_hdd = theme.dir .. "/icons/hdd.png" +theme.widget_music = theme.dir .. "/icons/note.png" +theme.widget_music_on = theme.dir .. "/icons/note_on.png" +theme.widget_music_pause = theme.dir .. "/icons/pause.png" +theme.widget_music_stop = theme.dir .. "/icons/stop.png" +theme.widget_vol = theme.dir .. "/icons/vol.png" +theme.widget_vol_low = theme.dir .. "/icons/vol_low.png" +theme.widget_vol_no = theme.dir .. "/icons/vol_no.png" +theme.widget_vol_mute = theme.dir .. "/icons/vol_mute.png" +theme.widget_mail = theme.dir .. "/icons/mail.png" +theme.widget_mail_on = theme.dir .. "/icons/mail_on.png" +theme.widget_task = theme.dir .. "/icons/task.png" +theme.widget_scissors = theme.dir .. "/icons/scissors.png" +theme.tasklist_plain_task_name = true +theme.tasklist_disable_icon = true +theme.useless_gap = 0 +theme.titlebar_close_button_focus = theme.dir .. "/icons/titlebar/close_focus.png" +theme.titlebar_close_button_normal = theme.dir .. "/icons/titlebar/close_normal.png" +theme.titlebar_ontop_button_focus_active = theme.dir .. "/icons/titlebar/ontop_focus_active.png" +theme.titlebar_ontop_button_normal_active = theme.dir .. "/icons/titlebar/ontop_normal_active.png" +theme.titlebar_ontop_button_focus_inactive = theme.dir .. "/icons/titlebar/ontop_focus_inactive.png" +theme.titlebar_ontop_button_normal_inactive = theme.dir .. "/icons/titlebar/ontop_normal_inactive.png" +theme.titlebar_sticky_button_focus_active = theme.dir .. "/icons/titlebar/sticky_focus_active.png" +theme.titlebar_sticky_button_normal_active = theme.dir .. "/icons/titlebar/sticky_normal_active.png" +theme.titlebar_sticky_button_focus_inactive = theme.dir .. "/icons/titlebar/sticky_focus_inactive.png" +theme.titlebar_sticky_button_normal_inactive = theme.dir .. "/icons/titlebar/sticky_normal_inactive.png" +theme.titlebar_floating_button_focus_active = theme.dir .. "/icons/titlebar/floating_focus_active.png" +theme.titlebar_floating_button_normal_active = theme.dir .. "/icons/titlebar/floating_normal_active.png" +theme.titlebar_floating_button_focus_inactive = theme.dir .. "/icons/titlebar/floating_focus_inactive.png" +theme.titlebar_floating_button_normal_inactive = theme.dir .. "/icons/titlebar/floating_normal_inactive.png" +theme.titlebar_maximized_button_focus_active = theme.dir .. "/icons/titlebar/maximized_focus_active.png" +theme.titlebar_maximized_button_normal_active = theme.dir .. "/icons/titlebar/maximized_normal_active.png" +theme.titlebar_maximized_button_focus_inactive = theme.dir .. "/icons/titlebar/maximized_focus_inactive.png" +theme.titlebar_maximized_button_normal_inactive = theme.dir .. "/icons/titlebar/maximized_normal_inactive.png" + +local markup = lain.util.markup +local separators = lain.util.separators + +-- Binary clock +local binclock = require("themes.powerarrow.binclock"){ + height = dpi(32), + show_seconds = true, + color_active = theme.fg_normal, + color_inactive = theme.bg_focus +} + +-- Calendar +theme.cal = lain.widget.cal({ + --cal = "cal --color=always", + attach_to = { binclock.widget }, + notification_preset = { + font = "Terminus 10", + fg = theme.fg_normal, + bg = theme.bg_normal + } +}) + +-- Taskwarrior +local task = wibox.widget.imagebox(theme.widget_task) +lain.widget.contrib.task.attach(task, { + -- do not colorize output + show_cmd = "task | sed -r 's/\\x1B\\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g'" +}) +task:buttons(my_table.join(awful.button({}, 1, lain.widget.contrib.task.prompt))) + +-- Scissors (xsel copy and paste) +local scissors = wibox.widget.imagebox(theme.widget_scissors) +scissors:buttons(my_table.join(awful.button({}, 1, function() awful.spawn.with_shell("xsel | xsel -i -b") end))) + +-- Mail IMAP check +--[[ commented because it needs to be set before use +local mailicon = wibox.widget.imagebox(theme.widget_mail) +mailicon:buttons(my_table.join(awful.button({ }, 1, function () awful.spawn(mail) end))) +theme.mail = lain.widget.imap({ + timeout = 180, + server = "server", + mail = "mail", + password = "keyring get mail", + settings = function() + if mailcount > 0 then + widget:set_text(" " .. mailcount .. " ") + mailicon:set_image(theme.widget_mail_on) + else + widget:set_text("") + mailicon:set_image(theme.widget_mail) + end + end +}) +--]] + +-- ALSA volume +theme.volume = lain.widget.alsabar({ + --togglechannel = "IEC958,3", + notification_preset = { font = "Terminus 10", fg = theme.fg_normal }, +}) + +-- MPD +local musicplr = awful.util.terminal .. " -title Music -g 130x34-320+16 -e ncmpcpp" +local mpdicon = wibox.widget.imagebox(theme.widget_music) +mpdicon:buttons(my_table.join( + awful.button({ modkey }, 1, function () awful.spawn.with_shell(musicplr) end), + awful.button({ }, 1, function () + os.execute("mpc prev") + theme.mpd.update() + end), + awful.button({ }, 2, function () + os.execute("mpc toggle") + theme.mpd.update() + end), + awful.button({ }, 3, function () + os.execute("mpc next") + theme.mpd.update() + end))) +theme.mpd = lain.widget.mpd({ + settings = function() + if mpd_now.state == "play" then + artist = " " .. mpd_now.artist .. " " + title = mpd_now.title .. " " + mpdicon:set_image(theme.widget_music_on) + widget:set_markup(markup.font(theme.font, markup("#FF8466", artist) .. " " .. title)) + elseif mpd_now.state == "pause" then + widget:set_markup(markup.font(theme.font, " mpd paused ")) + mpdicon:set_image(theme.widget_music_pause) + else + widget:set_text("") + mpdicon:set_image(theme.widget_music) + end + end +}) + +-- MEM +local memicon = wibox.widget.imagebox(theme.widget_mem) +local mem = lain.widget.mem({ + settings = function() + widget:set_markup(markup.font(theme.font, " " .. mem_now.used .. "MB ")) + end +}) + +-- CPU +local cpuicon = wibox.widget.imagebox(theme.widget_cpu) +local cpu = lain.widget.cpu({ + settings = function() + widget:set_markup(markup.font(theme.font, " " .. cpu_now.usage .. "% ")) + end +}) + +--[[ Coretemp (lm_sensors, per core) +local tempwidget = awful.widget.watch({awful.util.shell, '-c', 'sensors | grep Core'}, 30, +function(widget, stdout) + local temps = "" + for line in stdout:gmatch("[^\r\n]+") do + temps = temps .. line:match("+(%d+).*°C") .. "° " -- in Celsius + end + widget:set_markup(markup.font(theme.font, " " .. temps)) +end) +--]] +-- Coretemp (lain, average) +local temp = lain.widget.temp({ + settings = function() + widget:set_markup(markup.font(theme.font, " " .. coretemp_now .. "°C ")) + end +}) +--]] +local tempicon = wibox.widget.imagebox(theme.widget_temp) + +-- / fs +local fsicon = wibox.widget.imagebox(theme.widget_hdd) +--[[ commented because it needs Gio/Glib >= 2.54 +theme.fs = lain.widget.fs({ + notification_preset = { fg = theme.fg_normal, bg = theme.bg_normal, font = "Terminus 10" }, + settings = function() + local fsp = string.format(" %3.2f %s ", fs_now["/"].free, fs_now["/"].units) + widget:set_markup(markup.font(theme.font, fsp)) + end +}) +--]] + +-- Battery +local baticon = wibox.widget.imagebox(theme.widget_battery) +local bat = lain.widget.bat({ + settings = function() + if bat_now.status and bat_now.status ~= "N/A" then + if bat_now.ac_status == 1 then + widget:set_markup(markup.font(theme.font, " AC ")) + baticon:set_image(theme.widget_ac) + return + elseif not bat_now.perc and tonumber(bat_now.perc) <= 5 then + baticon:set_image(theme.widget_battery_empty) + elseif not bat_now.perc and tonumber(bat_now.perc) <= 15 then + baticon:set_image(theme.widget_battery_low) + else + baticon:set_image(theme.widget_battery) + end + widget:set_markup(markup.font(theme.font, " " .. bat_now.perc .. "% ")) + else + widget:set_markup() + baticon:set_image(theme.widget_ac) + end + end +}) + +-- Net +local neticon = wibox.widget.imagebox(theme.widget_net) +local net = lain.widget.net({ + settings = function() + widget:set_markup(markup.fontfg(theme.font, "#FEFEFE", " " .. net_now.received .. " ↓↑ " .. net_now.sent .. " ")) + end +}) + +-- Brigtness +local brighticon = wibox.widget.imagebox(theme.widget_brightness) +-- If you use xbacklight, comment the line with "light -G" and uncomment the line bellow +-- local brightwidget = awful.widget.watch('xbacklight -get', 0.1, +local brightwidget = awful.widget.watch('light -G', 0.1, + function(widget, stdout, stderr, exitreason, exitcode) + local brightness_level = tonumber(string.format("%.0f", stdout)) + widget:set_markup(markup.font(theme.font, " " .. brightness_level .. "%")) +end) + +-- Separators +local arrow = separators.arrow_left + +function theme.powerline_rl(cr, width, height) + local arrow_depth, offset = height/2, 0 + + -- Avoid going out of the (potential) clip area + if arrow_depth < 0 then + width = width + 2*arrow_depth + offset = -arrow_depth + end + + cr:move_to(offset + arrow_depth , 0 ) + cr:line_to(offset + width , 0 ) + cr:line_to(offset + width - arrow_depth , height/2 ) + cr:line_to(offset + width , height ) + cr:line_to(offset + arrow_depth , height ) + cr:line_to(offset , height/2 ) + + cr:close_path() +end + +local function pl(widget, bgcolor, padding) + return wibox.container.background(wibox.container.margin(widget, dpi(16), dpi(16)), bgcolor, theme.powerline_rl) +end + +function theme.at_screen_connect(s) + -- Quake application + s.quake = lain.util.quake({ app = awful.util.terminal }) + + -- If wallpaper is a function, call it with the screen + local wallpaper = theme.wallpaper + if type(wallpaper) == "function" then + wallpaper = wallpaper(s) + end + gears.wallpaper.maximized(wallpaper, s, true) + + -- Tags + awful.tag(awful.util.tagnames, s, awful.layout.layouts[1]) + + -- Create a promptbox for each screen + s.mypromptbox = awful.widget.prompt() + -- Create an imagebox widget which will contains an icon indicating which layout we're using. + -- We need one layoutbox per screen. + s.mylayoutbox = awful.widget.layoutbox(s) + s.mylayoutbox:buttons(my_table.join( + awful.button({}, 1, function () awful.layout.inc( 1) end), + awful.button({}, 2, function () awful.layout.set( awful.layout.layouts[1] ) end), + awful.button({}, 3, function () awful.layout.inc(-1) end), + awful.button({}, 4, function () awful.layout.inc( 1) end), + awful.button({}, 5, function () awful.layout.inc(-1) end))) + -- Create a taglist widget + s.mytaglist = awful.widget.taglist(s, awful.widget.taglist.filter.all, awful.util.taglist_buttons) + + -- Create a tasklist widget + s.mytasklist = awful.widget.tasklist(s, awful.widget.tasklist.filter.currenttags, awful.util.tasklist_buttons) + + -- Create the wibox + s.mywibox = awful.wibar({ position = "top", screen = s, height = dpi(16), bg = theme.bg_normal, fg = theme.fg_normal }) + + -- Add widgets to the wibox + s.mywibox:setup { + layout = wibox.layout.align.horizontal, + { -- Left widgets + layout = wibox.layout.fixed.horizontal, + --spr, + s.mytaglist, + s.mypromptbox, + spr, + }, + s.mytasklist, -- Middle widget + { -- Right widgets + layout = wibox.layout.fixed.horizontal, + wibox.widget.systray(), + wibox.container.margin(scissors, dpi(4), dpi(8)), + --[[ using shapes + pl(wibox.widget { mpdicon, theme.mpd.widget, layout = wibox.layout.align.horizontal }, "#343434"), + pl(task, "#343434"), + --pl(wibox.widget { mailicon, mail and theme.mail.widget, layout = wibox.layout.align.horizontal }, "#343434"), + pl(wibox.widget { memicon, mem.widget, layout = wibox.layout.align.horizontal }, "#777E76"), + pl(wibox.widget { cpuicon, cpu.widget, layout = wibox.layout.align.horizontal }, "#4B696D"), + pl(wibox.widget { tempicon, temp.widget, layout = wibox.layout.align.horizontal }, "#4B3B51"), + --pl(wibox.widget { fsicon, theme.fs and theme.fs.widget, layout = wibox.layout.align.horizontal }, "#CB755B"), + pl(wibox.widget { baticon, bat.widget, layout = wibox.layout.align.horizontal }, "#8DAA9A"), + pl(wibox.widget { neticon, net.widget, layout = wibox.layout.align.horizontal }, "#C0C0A2"), + pl(binclock.widget, "#777E76"), + --]] + -- using separators + arrow(theme.bg_normal, "#343434"), + wibox.container.background(wibox.container.margin(wibox.widget { mailicon, theme.mail and theme.mail.widget, layout = wibox.layout.align.horizontal }, dpi(4), dpi(7)), "#343434"), + arrow("#343434", theme.bg_normal), + wibox.container.background(wibox.container.margin(wibox.widget { mpdicon, theme.mpd.widget, layout = wibox.layout.align.horizontal }, dpi(3), dpi(6)), theme.bg_focus), + arrow(theme.bg_normal, "#343434"), + wibox.container.background(wibox.container.margin(task, dpi(3), dpi(7)), "#343434"), + arrow("#343434", "#777E76"), + wibox.container.background(wibox.container.margin(wibox.widget { memicon, mem.widget, layout = wibox.layout.align.horizontal }, dpi(2), dpi(3)), "#777E76"), + arrow("#777E76", "#4B696D"), + wibox.container.background(wibox.container.margin(wibox.widget { cpuicon, cpu.widget, layout = wibox.layout.align.horizontal }, dpi(3), dpi(4)), "#4B696D"), + arrow("#4B696D", "#4B3B51"), + wibox.container.background(wibox.container.margin(wibox.widget { tempicon, temp.widget, layout = wibox.layout.align.horizontal }, dpi(4), dpi(4)), "#4B3B51"), + arrow("#4B3B51", "#CB755B"), + wibox.container.background(wibox.container.margin(wibox.widget { fsicon, theme.fs and theme.fs.widget, layout = wibox.layout.align.horizontal }, dpi(3), dpi(3)), "#CB755B"), + arrow("#CB755B", "#8DAA9A"), + wibox.container.background(wibox.container.margin(wibox.widget { baticon, bat.widget, layout = wibox.layout.align.horizontal }, dpi(3), dpi(3)), "#8DAA9A"), + arrow("#8DAA9A", "#C0C0A2"), + wibox.container.background(wibox.container.margin(wibox.widget { nil, neticon, net.widget, layout = wibox.layout.align.horizontal }, dpi(3), dpi(3)), "#C0C0A2"), + arrow("#C0C0A2", "#777E76"), + wibox.container.background(wibox.container.margin(binclock.widget, dpi(4), dpi(8)), "#777E76"), + arrow("#777E76", "alpha"), + --]] + s.mylayoutbox, + }, + } +end + +return theme diff --git a/.config/awesome/rc.lua b/.config/awesome/rc.lua new file mode 100755 index 0000000..4b0c91c --- /dev/null +++ b/.config/awesome/rc.lua @@ -0,0 +1,670 @@ +--[[ + + Awesome WM configuration template + github.com/lcpz + +--]] + +-- {{{ Required libraries + +-- If LuaRocks is installed, make sure that packages installed through it are +-- found (e.g. lgi). If LuaRocks is not installed, do nothing. +pcall(require, "luarocks.loader") + + +local gears = require("gears") +local awful = require("awful") + require("awful.autofocus") +local wibox = require("wibox") +local beautiful = require("beautiful") +local naughty = require("naughty") +local lain = require("lain") +--local menubar = require("menubar") +local hotkeys_popup = require("awful.hotkeys_popup") + require("awful.hotkeys_popup.keys") +local mytable = awful.util.table or gears.table -- 4.{0,1} compatibility +-- Load Debian menu entries +local debian = require("debian.menu") +local has_fdo, freedesktop = pcall(require, "freedesktop") +-- }}} +local bling = require("bling") +-- Scratchpad +local scratch = require("scratch") +-- {{{ Error handling + +-- Check if awesome encountered an error during startup and fell back to +-- another config (This code will only ever execute for the fallback config) +if awesome.startup_errors then + naughty.notify { + preset = naughty.config.presets.critical, + title = "Oops, there were errors during startup!", + text = awesome.startup_errors + } +end + +-- Handle runtime errors after startup +do + local in_error = false + + awesome.connect_signal("debug::error", function (err) + if in_error then return end + + in_error = true + + naughty.notify { + preset = naughty.config.presets.critical, + title = "Oops, an error happened!", + text = tostring(err) + } + + in_error = false + end) +end + +-- }}} + +-- {{{ Autostart windowless processes + +-- This function will run once every time Awesome is started +local function run_once(cmd_arr) + for _, cmd in ipairs(cmd_arr) do + awful.spawn.with_shell(string.format("pgrep -u $USER -fx '%s' > /dev/null || (%s)", cmd, cmd)) + end +end + +run_once({ "urxvtd", "unclutter -root", "/usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1 &", "sleep 1s && nitrogen --restore" , "sleep 1s && xautolock -time 20 -locker lock &" }) -- comma-separated entries +-- }}}-- Launch on startup +awful.spawn.with_shell("picom") +awful.spawn.with_shell("/usr/bin/gnome-screensaver") +awful.spawn.with_shell("killall pasystray && killall nm-applet && killall flameshot && killall blueman-applet && killall xautolock") +awful.spawn.with_shell("sleep 1s && pasystray &") +awful.spawn.with_shell("sleep 1s && nm-applet &") +awful.spawn.with_shell("sleep 1s && blueman-applet &") +awful.spawn.with_shell("sleep 1s && flameshot &") +awful.spawn.with_shell("sleep 1s && xfce4-power-manager") + +-- This function implements the XDG autostart specification +--[[ +awful.spawn.with_shell( + 'if (xrdb -query | grep -q "^awesome\\.started:\\s*true$"); then exit; fi;' .. + 'xrdb -merge <<< "awesome.started:true";' .. + -- list each of your autostart commands, followed by ; inside single quotes, followed by .. + 'dex --environment Awesome --autostart --search-paths "$XDG_CONFIG_DIRS/autostart:$XDG_CONFIG_HOME/autostart"' -- https://github.com/jceb/dex +) +--]] + +-- }}} + +-- {{{ Variable definitions + +local themes = { + "blackburn", -- 1 + "copland", -- 2 + "dremora", -- 3 + "holo", -- 4 + "multicolor", -- 5 + "powerarrow", -- 6 + "powerarrow-dark", -- 7 + "rainbow", -- 8 + "steamburn", -- 9 + "vertex" -- 10 +} + +local chosen_theme = themes[7] +local modkey = "Mod4" +local altkey = "Mod1" +local terminal = "alacritty" +local vi_focus = false -- vi-like client focus https://github.com/lcpz/awesome-copycats/issues/275 +local cycle_prev = true -- cycle with only the previously focused client or all https://github.com/lcpz/awesome-copycats/issues/274 +local editor = os.getenv("EDITOR") or "nvim" +local browser = "brave-browser" + +awful.util.terminal = terminal +awful.util.tagnames = { "1", "2", "3", "4", "5" , "6", "7", "8", "9"} +awful.layout.layouts = { + awful.layout.suit.tile, + awful.layout.suit.floating, + -- awful.layout.suit.tile.left, + -- awful.layout.suit.tile.bottom, + -- awful.layout.suit.tile.top, + awful.layout.suit.fair, + -- awful.layout.suit.fair.horizontal, + awful.layout.suit.spiral, + -- awful.layout.suit.spiral.dwindle, + awful.layout.suit.max, + -- awful.layout.suit.max.fullscreen, + awful.layout.suit.magnifier, + --awful.layout.suit.corner.nw, + --awful.layout.suit.corner.ne, + --awful.layout.suit.corner.sw, + --awful.layout.suit.corner.se, + --lain.layout.cascade, + --lain.layout.cascade.tile, + -- lain.layout.centerwork, + --lain.layout.centerwork.horizontal, + --lain.layout.termfair, + --lain.layout.termfair.center +} + +lain.layout.termfair.nmaster = 3 +lain.layout.termfair.ncol = 1 +lain.layout.termfair.center.nmaster = 3 +lain.layout.termfair.center.ncol = 1 +lain.layout.cascade.tile.offset_x = 2 +lain.layout.cascade.tile.offset_y = 32 +lain.layout.cascade.tile.extra_padding = 5 +lain.layout.cascade.tile.nmaster = 5 +lain.layout.cascade.tile.ncol = 2 + +awful.util.taglist_buttons = mytable.join( + awful.button({ }, 1, function(t) t:view_only() end), + awful.button({ modkey }, 1, function(t) + if client.focus then client.focus:move_to_tag(t) end + end), + awful.button({ }, 3, awful.tag.viewtoggle), + awful.button({ modkey }, 3, function(t) + if client.focus then client.focus:toggle_tag(t) end + end), + awful.button({ }, 4, function(t) awful.tag.viewnext(t.screen) end), + awful.button({ }, 5, function(t) awful.tag.viewprev(t.screen) end) +) + + + + +awful.util.tasklist_buttons = mytable.join( + awful.button({ }, 1, function(c) + if c == client.focus then + c.minimized = true + else + c:emit_signal("request::activate", "tasklist", { raise = true }) + end + end), + awful.button({ }, 3, function() + awful.menu.client_list({ theme = { width = 250 } }) + end), + awful.button({ }, 4, function() awful.client.focus.byidx(1) end), + awful.button({ }, 5, function() awful.client.focus.byidx(-1) end) +) + +beautiful.init(string.format("%s/.config/awesome/themes/%s/theme.lua", os.getenv("HOME"), chosen_theme)) +beautiful.systray_icon_spacing = 4 +-- }}} + +-- {{{ Menu + +-- Create a launcher widget and a main menu +local myawesomemenu = { + { "Hotkeys", function() hotkeys_popup.show_help(nil, awful.screen.focused()) end }, + { "Manual", string.format("%s -e man awesome", terminal) }, + { "Edit config", string.format("%s -e %s %s", terminal, editor, awesome.conffile) }, + { "Lock screen", function() awful.util.spawn("sh /home/sarthakj/.local/bin/lock") end}, + { "Shutdown", function() awful.util.spawn("sh shutdown now") end}, + { "Restart", awesome.restart }, + { "Quit", function() awesome.quit() end }, +} +local menu_awesome = { "awesome", myawesomemenu, beautiful.awesome_icon } +local menu_terminal = { "open terminal", terminal } +if has_fdo then + mymainmenu = freedesktop.menu.build({ + before = { menu_awesome }, + after = { menu_terminal } + }) +else + mymainmenu = awful.menu({ + items = { + menu_awesome, + { "Debian", debian.menu.Debian_menu.Debian }, + menu_terminal, + } + }) +end +-- Hide the menu when the mouse leaves it +-- awful.util.mymainmenu.wibox:connect_signal("mouse::leave", function() +-- if not awful.util.mymainmenu.active_child or +-- (awful.util.mymainmenu.wibox ~= mouse.current_wibox and +-- awful.util.mymainmenu.active_child.wibox ~= mouse.current_wibox) then +-- awful.util.mymainmenu:hide() +-- else +-- awful.util.mymainmenu.active_child.wibox:connect_signal("mouse::leave", +-- function() +-- if awful.util.mymainmenu.wibox ~= mouse.current_wibox then +-- awful.util.mymainmenu:hide() +-- end +-- end) +-- end +-- end) +-- +-- Set the Menubar terminal for applications that require it +--menubar.utils.terminal = terminal + +-- }}} + +-- {{{ Screen + +-- Re-set wallpaper when a screen's geometry changes (e.g. different resolution) +screen.connect_signal("property::geometry", function(s) + -- Wallpaper + if beautiful.wallpaper then + local wallpaper = beautiful.wallpaper + -- If wallpaper is a function, call it with the screen + if type(wallpaper) == "function" then + wallpaper = wallpaper(s) + end + gears.wallpaper.maximized(wallpaper, s, true) + end +end) + +-- No borders when rearranging only 1 non-floating or maximized client +screen.connect_signal("arrange", function (s) + local only_one = #s.tiled_clients == 1 + for _, c in pairs(s.clients) do + if only_one and not c.floating or c.maximized or c.fullscreen then + c.border_width = 0 + else + c.border_width = beautiful.border_width + end + end +end) + +-- Create a wibox for each screen and add it +awful.screen.connect_for_each_screen(function(s) beautiful.at_screen_connect(s) end) + +-- }}} +-- {{{ Mouse bindings +root.buttons(gears.table.join( + awful.button({ }, 3, function () mymainmenu:toggle() end), + awful.button({ }, 4, awful.tag.viewnext), + awful.button({ }, 5, awful.tag.viewprev) +)) +-- }}} + +-- {{{ Key bindings +globalkeys = gears.table.join( + + -- Show help text + awful.key({ modkey}, "s", hotkeys_popup.show_help, {description="show help", group="awesome"}), + -- View previous tag + awful.key({ modkey}, "Left",awful.tag.viewprev,{description = "view previous", group = "tag"}), + -- View Next tag + awful.key({ modkey}, "Right", awful.tag.viewnext,{description = "view next", group = "tag"}), + -- Go to previous tag + awful.key({ modkey}, "Escape", awful.tag.history.restore, {description = "go back", group = "tag"}), + + -- Focus Next clients + awful.key({ modkey}, "j", function () awful.client.focus.byidx( 1) end,{description = "focus next by index", group = "client"}), + -- Focus previous client + awful.key({ modkey}, "k", function () awful.client.focus.byidx(-1) end, {description = "focus previous by index", group = "client"} ), + + -- Show Main menu + awful.key({ modkey}, "w", function () mymainmenu:show() end, {description = "show main menu", group = "awesome"}), + + + -- Screen brightness + awful.key({ }, "XF86MonBrightnessDown", function () awful.util.spawn("brightnessctl --min-val=2 -q set 5%-") end), + awful.key({ }, "XF86MonBrightnessUp", function ()awful.util.spawn("brightnessctl -q set 5%+") end), + -- Volume controls + awful.key({}, "XF86AudioRaiseVolume", function() awful.util.spawn("amixer -D pulse sset Master 5%+") end), + awful.key({}, "XF86AudioLowerVolume", function() awful.util.spawn("amixer -D pulse sset Master 5%-") end), + awful.key({}, "XF86AudioMute", function() awful.util.spawn("amixer -D pulse sset Master toggle") end), + + -- Swap with next client + awful.key({ modkey, "Shift"}, "j", function () awful.client.swap.byidx( 1) end,{description = "swap with next client by index", group = "client"}), + + -- Swap with previous client + awful.key({ modkey, "Shift"}, "k", function () awful.client.swap.byidx( -1)end, {description = "swap with previous client by index", group = "client"}), + + -- Focus the next screen + awful.key({ modkey, "Control" }, "j", function () awful.screen.focus_relative( 1) end, {description = "focus the next screen", group = "screen"}), + -- Focus the previous screen + awful.key({ modkey, "Control" }, "k", function () awful.screen.focus_relative(-1) end, {description = "focus the previous screen", group = "screen"}), + -- Focus to urgent client + awful.key({ modkey,}, "u", awful.client.urgent.jumpto, {description = "jump to urgent client", group = "client"}), + -- Back to client + awful.key({ modkey}, "Tab", + function () awful.client.focus.history.previous() + if client.focus then + client.focus:raise() + end + end, + {description = "go back", group = "client"}), + + -- Standard program + awful.key({ modkey}, "Return", function () awful.spawn(terminal) end, + {description = "open a terminal", group = "launcher"}), + awful.key({ modkey, "Ctrl" }, "r", awesome.restart, + {description = "reload awesome", group = "awesome"}), + awful.key({ modkey, "Ctrl", "Shift" }, "e", awesome.quit, + {description = "quit awesome", group = "awesome"}), + + awful.key({ modkey}, "l", function () awful.tag.incmwfact( 0.05) end, + {description = "increase master width factor", group = "layout"}), + awful.key({ modkey}, "h", function () awful.tag.incmwfact(-0.05) end, + {description = "decrease master width factor", group = "layout"}), + awful.key({ modkey, "Shift" }, "h", function () awful.tag.incnmaster( 1, nil, true) end, + {description = "increase the number of master clients", group = "layout"}), + awful.key({ modkey, "Shift" }, "l", function () awful.tag.incnmaster(-1, nil, true) end, + {description = "decrease the number of master clients", group = "layout"}), + awful.key({ modkey, "Control" }, "h", function () awful.tag.incncol( 1, nil, true) end, + {description = "increase the number of columns", group = "layout"}), + awful.key({ modkey, "Control" }, "l", function () awful.tag.incncol(-1, nil, true) end, + {description = "decrease the number of columns", group = "layout"}), + awful.key({ modkey}, "space", function () awful.layout.inc( 1) end, + {description = "select next", group = "layout"}), + awful.key({ modkey, "Shift" }, "space", function () awful.layout.inc(-1) end, + {description = "select previous", group = "layout"}), + + + -- Scratchpad functionality + awful.key({modkey}, "t", function() scratch.toggle("alacritty --class scratch-term", {instance="scratch-term"}) end), + awful.key({modkey}, "r", function() scratch.toggle("alacritty --class scratch-fm -e ranger", {instance="scratch-fm"}) end), + awful.key({modkey}, "e", function() scratch.toggle("alacritty --class scratch-htop -e htop", {instance="scratch-htop"}) end), + awful.key({modkey}, "y", function() scratch.toggle("alacritty --class scratch-pulse -e pulsemixer", {instance="scratch-pulse"}) end), + awful.key({modkey}, "b", function() scratch.toggle("pcmanfm --class scratch-gtkfm", {instance="scratch-gtkfm"}) end), + + awful.key({modkey, "Mod1"}, "l", function() awful.util.spawn("sh /home/sarthakj/.local/bin/lock &") end), + awful.key({modkey, "Mod1"}, "k", function() awful.util.spawn("sh /home/sarthakj/.config/i3/bin/logout &") end), + + awful.key({ modkey, "Control" }, "n", + function () + local c = awful.client.restore() + -- Focus restored client + if c then + c:emit_signal( + "request::activate", "key.unminimize", {raise = true} + ) + end + end, + {description = "restore minimized", group = "client"}), + + -- Prompt + awful.key({ modkey }, "d", function () awful.spawn.with_shell("rofi -show drun -show-icons &>> /tmp/rofi.log") end, + {description = "run prompt", group = "launcher"}), + awful.key({ modkey, "Ctrl" }, "d", function () awful.spawn.with_shell("rofi -show combi -show-icons &>> /tmp/rofi.log") end, + {description = "run prompt", group = "launcher"}) + ) +clientkeys = gears.table.join( + awful.key({ modkey, Shift}, "f", + function (c) + c.fullscreen = not c.fullscreen + c:raise() + end, + {description = "toggle fullscreen", group = "client"}), + awful.key({ modkey, "Shift" }, "q", function (c) c:kill() end, + {description = "close", group = "client"}), + awful.key({ modkey, "Control" }, "space", awful.client.floating.toggle , + {description = "toggle floating", group = "client"}), + awful.key({ modkey, "Control" }, "Return", function (c) c:swap(awful.client.getmaster()) end, + {description = "move to master", group = "client"}), + awful.key({ modkey, }, "o", function (c) c:move_to_screen() end, + {description = "move to screen", group = "client"}), + awful.key({ modkey, }, "t", function (c) c.ontop = not c.ontop end, + {description = "toggle keep on top", group = "client"}), + awful.key({ modkey, }, "n", + function (c) + -- The client currently has the input focus, so it cannot be + -- minimized, since minimized clients can't have the focus. + c.minimized = true + end , + {description = "minimize", group = "client"}), + + awful.key({ modkey, "Control" }, "s", function (c) c.sticky = not c.sticky end, + {description="toggle sticky", group="client"}), + awful.key({ modkey, }, "m", + function (c) + c.maximized = not c.maximized + c:raise() + end , + {description = "(un)maximize", group = "client"}), + awful.key({ modkey, "Control" }, "m", + function (c) + c.maximized_vertical = not c.maximized_vertical + c:raise() + end , + {description = "(un)maximize vertically", group = "client"}), + awful.key({ modkey, "Shift" }, "m", + function (c) + c.maximized_horizontal = not c.maximized_horizontal + c:raise() + end , + {description = "(un)maximize horizontally", group = "client"}) +) + +-- Bind all key numbers to tags. +-- Be careful: we use keycodes to make it work on any keyboard layout. +-- This should map on the top row of your keyboard, usually 1 to 9. +for i = 1, 9 do + globalkeys = gears.table.join(globalkeys, + -- View tag only. + awful.key({ modkey }, "#" .. i + 9, + function () + local screen = awful.screen.focused() + local tag = screen.tags[i] + if tag then + tag:view_only() + end + end, + {description = "view tag #"..i, group = "tag"}), + -- Toggle tag display. + awful.key({ modkey, "Control" }, "#" .. i + 9, + function () + local screen = awful.screen.focused() + local tag = screen.tags[i] + if tag then + awful.tag.viewtoggle(tag) + end + end, + {description = "toggle tag #" .. i, group = "tag"}), + -- Move client to tag. + awful.key({ modkey, "Shift" }, "#" .. i + 9, + function () + if client.focus then + local tag = client.focus.screen.tags[i] + if tag then + client.focus:move_to_tag(tag) + end + end + end, + {description = "move focused client to tag #"..i, group = "tag"}), + -- Toggle tag on focused client. + awful.key({ modkey, "Control", "Shift" }, "#" .. i + 9, + function () + if client.focus then + local tag = client.focus.screen.tags[i] + if tag then + client.focus:toggle_tag(tag) + end + end + end, + {description = "toggle focused client on tag #" .. i, group = "tag"}) + ) +end + + +-- Mouse click events +clientbuttons = gears.table.join( + awful.button({ }, 1, function (c) + c:emit_signal("request::activate", "mouse_click", {raise = true}) + end), + awful.button({ modkey }, 1, function (c) + c:emit_signal("request::activate", "mouse_click", {raise = true}) + awful.mouse.client.move(c) + end), + awful.button({ modkey }, 3, function (c) + c:emit_signal("request::activate", "mouse_click", {raise = true}) + awful.mouse.client.resize(c) + end) +) + +-- Set keys +root.keys(globalkeys) +-- }}} + +-- Rules to apply to new clients (through the "manage" signal). +awful.rules.rules = { + -- All clients will match this rule. + { rule = { }, + properties = { border_width = beautiful.border_width, + focus = awful.client.focus.filter, + raise = true, + keys = clientkeys, + buttons = clientbuttons, + screen = awful.screen.preferred, + placement = awful.placement.no_overlap+awful.placement.no_offscreen + } + }, + + -- Floating clients. + { rule_any = { + instance = { + "DTA", -- Firefox addon DownThemAll. + "copyq", -- Includes session name in class. + "pinentry", + }, + class = { + "Arandr", + "Blueman-manager", + "Anydesk", + "Pavucontrol", + "Teams", + "Org.gnome.Characters", + "Shutter", + "Flameshot", + "Nitrogen", + "Marktext", + "Lxappearance", + "Gpick", + "Nautilus", + "Pavucontrol", + "Gnome-screenshot", + "Gnome-calculator", + "Geany", + "Kruler", + "MessageWin", -- kalarm. + "Sxiv", + "Tor Browser", -- Needs a fixed window size to avoid fingerprinting by screen size. + "Wpa_gui", + "veromix", + "Evince", + "xtightvncviewer"}, + + -- Note that the name property shown in xprop might be set slightly after creation of the client + -- and the name shown there might not match defined rules here. + name = { + "Event Tester", -- xev. + }, + role = { + "AlarmWindow", -- Thunderbird's calendar. + "ConfigManager", -- Thunderbird's about:config. + "pop-up", -- e.g. Google Chrome's (detached) Developer Tools. + } + }, properties = { floating = true, placement = awful.placement.centered }}, + + -- Add titlebars to dialogs + { rule_any = {type = { "dialog" } + }, properties = { titlebars_enabled = true, placement = awful.placement.centered } + }, + + { + rule_any = { + class = { "scratch-term", "scratch-pulse", "scratch-htop", "scratch-fm", "scratch-gtkfm" }, + instance = {"scratch-term", "scratch-pulse", "scratch-htop", "scratch-fm", "scratch-gtkfm"}, + }, + properties = { + skip_taskbar = true, + floating = true, + ontop = false, + minimized = true, + sticky = false, + width = 800, + height = 550, + }, + callback = function (c) + awful.placement.centered(c,{honor_padding = true, honor_workarea=true}) + gears.timer.delayed_call(function() + c.urgent = false + end) + end + }, + + -- Set Firefox to always map on the tag named "2" on screen 1. + -- { rule = { class = "Firefox" }, + -- properties = { screen = 1, tag = "2" } }, +} +-- }}} + +-- }}} + +-- {{{ Signals + +-- Signal function to execute when a new client appears. +client.connect_signal("manage", function (c) + -- Set the windows at the slave, + -- i.e. put it at the end of others instead of setting it master. + -- if not awesome.startup then awful.client.setslave(c) end + + if awesome.startup + and not c.size_hints.user_position + and not c.size_hints.program_position then + -- Prevent clients from being unreachable after screen count changes. + awful.placement.no_offscreen(c) + end +end) + +-- Add a titlebar if titlebars_enabled is set to true in the rules. +client.connect_signal("request::titlebars", function(c) + -- Custom + if beautiful.titlebar_fun then + beautiful.titlebar_fun(c) + return + end + + -- Default + -- buttons for the titlebar + local buttons = mytable.join( + awful.button({ }, 1, function() + c:emit_signal("request::activate", "titlebar", {raise = true}) + awful.mouse.client.move(c) + end), + awful.button({ }, 3, function() + c:emit_signal("request::activate", "titlebar", {raise = true}) + awful.mouse.client.resize(c) + end) + ) + + awful.titlebar(c, { size = 16 }) : setup { + { -- Left + awful.titlebar.widget.iconwidget(c), + buttons = buttons, + layout = wibox.layout.fixed.horizontal + }, + { -- Middle + { -- Title + align = "center", + widget = awful.titlebar.widget.titlewidget(c) + }, + buttons = buttons, + layout = wibox.layout.flex.horizontal + }, + { -- Right + awful.titlebar.widget.floatingbutton (c), + awful.titlebar.widget.maximizedbutton(c), + awful.titlebar.widget.stickybutton (c), + awful.titlebar.widget.ontopbutton (c), + awful.titlebar.widget.closebutton (c), + layout = wibox.layout.fixed.horizontal() + }, + layout = wibox.layout.align.horizontal + } +end) + +-- Enable sloppy focus, so that focus follows mouse. +client.connect_signal("mouse::enter", function(c) + c:emit_signal("request::activate", "mouse_enter", {raise = vi_focus}) +end) + +client.connect_signal("focus", function(c) c.border_color = beautiful.border_focus end) +client.connect_signal("unfocus", function(c) c.border_color = beautiful.border_normal end) + +-- -- + diff --git a/.config/awesome/rc.lua.template b/.config/awesome/rc.lua.template new file mode 100755 index 0000000..c7d6583 --- /dev/null +++ b/.config/awesome/rc.lua.template @@ -0,0 +1,814 @@ +--[[ + + Awesome WM configuration template + github.com/lcpz + +--]] + +-- {{{ Required libraries + +-- If LuaRocks is installed, make sure that packages installed through it are +-- found (e.g. lgi). If LuaRocks is not installed, do nothing. +pcall(require, "luarocks.loader") + +local gears = require("gears") +local awful = require("awful") + require("awful.autofocus") +local wibox = require("wibox") +local beautiful = require("beautiful") +local naughty = require("naughty") +local lain = require("lain") +--local menubar = require("menubar") +local freedesktop = require("freedesktop") +local hotkeys_popup = require("awful.hotkeys_popup") + require("awful.hotkeys_popup.keys") +local mytable = awful.util.table or gears.table -- 4.{0,1} compatibility + +-- }}} + +-- {{{ Error handling + +-- Check if awesome encountered an error during startup and fell back to +-- another config (This code will only ever execute for the fallback config) +if awesome.startup_errors then + naughty.notify { + preset = naughty.config.presets.critical, + title = "Oops, there were errors during startup!", + text = awesome.startup_errors + } +end + +-- Handle runtime errors after startup +do + local in_error = false + + awesome.connect_signal("debug::error", function (err) + if in_error then return end + + in_error = true + + naughty.notify { + preset = naughty.config.presets.critical, + title = "Oops, an error happened!", + text = tostring(err) + } + + in_error = false + end) +end + +-- }}} + +-- {{{ Autostart windowless processes + +-- This function will run once every time Awesome is started +local function run_once(cmd_arr) + for _, cmd in ipairs(cmd_arr) do + awful.spawn.with_shell(string.format("pgrep -u $USER -fx '%s' > /dev/null || (%s)", cmd, cmd)) + end +end + +run_once({ "urxvtd", "unclutter -root" }) -- comma-separated entries + +-- This function implements the XDG autostart specification +--[[ +awful.spawn.with_shell( + 'if (xrdb -query | grep -q "^awesome\\.started:\\s*true$"); then exit; fi;' .. + 'xrdb -merge <<< "awesome.started:true";' .. + -- list each of your autostart commands, followed by ; inside single quotes, followed by .. + 'dex --environment Awesome --autostart --search-paths "$XDG_CONFIG_DIRS/autostart:$XDG_CONFIG_HOME/autostart"' -- https://github.com/jceb/dex +) +--]] + +-- }}} + +-- {{{ Variable definitions + +local themes = { + "blackburn", -- 1 + "copland", -- 2 + "dremora", -- 3 + "holo", -- 4 + "multicolor", -- 5 + "powerarrow", -- 6 + "powerarrow-dark", -- 7 + "rainbow", -- 8 + "steamburn", -- 9 + "vertex" -- 10 +} + +local chosen_theme = themes[5] +local modkey = "Mod4" +local altkey = "Mod1" +local terminal = "urxvtc" +local vi_focus = false -- vi-like client focus https://github.com/lcpz/awesome-copycats/issues/275 +local cycle_prev = true -- cycle with only the previously focused client or all https://github.com/lcpz/awesome-copycats/issues/274 +local editor = os.getenv("EDITOR") or "nvim" +local browser = "librewolf" + +awful.util.terminal = terminal +awful.util.tagnames = { "1", "2", "3", "4", "5" } +awful.layout.layouts = { + awful.layout.suit.floating, + awful.layout.suit.tile, + awful.layout.suit.tile.left, + awful.layout.suit.tile.bottom, + awful.layout.suit.tile.top, + --awful.layout.suit.fair, + --awful.layout.suit.fair.horizontal, + --awful.layout.suit.spiral, + --awful.layout.suit.spiral.dwindle, + --awful.layout.suit.max, + --awful.layout.suit.max.fullscreen, + --awful.layout.suit.magnifier, + --awful.layout.suit.corner.nw, + --awful.layout.suit.corner.ne, + --awful.layout.suit.corner.sw, + --awful.layout.suit.corner.se, + --lain.layout.cascade, + --lain.layout.cascade.tile, + --lain.layout.centerwork, + --lain.layout.centerwork.horizontal, + --lain.layout.termfair, + --lain.layout.termfair.center +} + +lain.layout.termfair.nmaster = 3 +lain.layout.termfair.ncol = 1 +lain.layout.termfair.center.nmaster = 3 +lain.layout.termfair.center.ncol = 1 +lain.layout.cascade.tile.offset_x = 2 +lain.layout.cascade.tile.offset_y = 32 +lain.layout.cascade.tile.extra_padding = 5 +lain.layout.cascade.tile.nmaster = 5 +lain.layout.cascade.tile.ncol = 2 + +awful.util.taglist_buttons = mytable.join( + awful.button({ }, 1, function(t) t:view_only() end), + awful.button({ modkey }, 1, function(t) + if client.focus then client.focus:move_to_tag(t) end + end), + awful.button({ }, 3, awful.tag.viewtoggle), + awful.button({ modkey }, 3, function(t) + if client.focus then client.focus:toggle_tag(t) end + end), + awful.button({ }, 4, function(t) awful.tag.viewnext(t.screen) end), + awful.button({ }, 5, function(t) awful.tag.viewprev(t.screen) end) +) + +awful.util.tasklist_buttons = mytable.join( + awful.button({ }, 1, function(c) + if c == client.focus then + c.minimized = true + else + c:emit_signal("request::activate", "tasklist", { raise = true }) + end + end), + awful.button({ }, 3, function() + awful.menu.client_list({ theme = { width = 250 } }) + end), + awful.button({ }, 4, function() awful.client.focus.byidx(1) end), + awful.button({ }, 5, function() awful.client.focus.byidx(-1) end) +) + +beautiful.init(string.format("%s/.config/awesome/themes/%s/theme.lua", os.getenv("HOME"), chosen_theme)) + +-- }}} + +-- {{{ Menu + +-- Create a launcher widget and a main menu +local myawesomemenu = { + { "Hotkeys", function() hotkeys_popup.show_help(nil, awful.screen.focused()) end }, + { "Manual", string.format("%s -e man awesome", terminal) }, + { "Edit config", string.format("%s -e %s %s", terminal, editor, awesome.conffile) }, + { "Restart", awesome.restart }, + { "Quit", function() awesome.quit() end }, +} + +awful.util.mymainmenu = freedesktop.menu.build { + before = { + { "Awesome", myawesomemenu, beautiful.awesome_icon }, + -- other triads can be put here + }, + after = { + { "Open terminal", terminal }, + -- other triads can be put here + } +} + +-- Hide the menu when the mouse leaves it +--[[ +awful.util.mymainmenu.wibox:connect_signal("mouse::leave", function() + if not awful.util.mymainmenu.active_child or + (awful.util.mymainmenu.wibox ~= mouse.current_wibox and + awful.util.mymainmenu.active_child.wibox ~= mouse.current_wibox) then + awful.util.mymainmenu:hide() + else + awful.util.mymainmenu.active_child.wibox:connect_signal("mouse::leave", + function() + if awful.util.mymainmenu.wibox ~= mouse.current_wibox then + awful.util.mymainmenu:hide() + end + end) + end +end) +--]] + +-- Set the Menubar terminal for applications that require it +--menubar.utils.terminal = terminal + +-- }}} + +-- {{{ Screen + +-- Re-set wallpaper when a screen's geometry changes (e.g. different resolution) +screen.connect_signal("property::geometry", function(s) + -- Wallpaper + if beautiful.wallpaper then + local wallpaper = beautiful.wallpaper + -- If wallpaper is a function, call it with the screen + if type(wallpaper) == "function" then + wallpaper = wallpaper(s) + end + gears.wallpaper.maximized(wallpaper, s, true) + end +end) + +-- No borders when rearranging only 1 non-floating or maximized client +screen.connect_signal("arrange", function (s) + local only_one = #s.tiled_clients == 1 + for _, c in pairs(s.clients) do + if only_one and not c.floating or c.maximized or c.fullscreen then + c.border_width = 0 + else + c.border_width = beautiful.border_width + end + end +end) + +-- Create a wibox for each screen and add it +awful.screen.connect_for_each_screen(function(s) beautiful.at_screen_connect(s) end) + +-- }}} + +-- {{{ Mouse bindings + +root.buttons(mytable.join( + awful.button({ }, 3, function () awful.util.mymainmenu:toggle() end), + awful.button({ }, 4, awful.tag.viewnext), + awful.button({ }, 5, awful.tag.viewprev) +)) + +-- }}} + +-- {{{ Key bindings + +globalkeys = mytable.join( + -- Destroy all notifications + awful.key({ "Control", }, "space", function() naughty.destroy_all_notifications() end, + {description = "destroy all notifications", group = "hotkeys"}), + -- Take a screenshot + -- https://github.com/lcpz/dots/blob/master/bin/screenshot + awful.key({ altkey }, "p", function() os.execute("screenshot") end, + {description = "take a screenshot", group = "hotkeys"}), + + -- X screen locker + awful.key({ altkey, "Control" }, "l", function () os.execute(scrlocker) end, + {description = "lock screen", group = "hotkeys"}), + + -- Show help + awful.key({ modkey, }, "s", hotkeys_popup.show_help, + {description="show help", group="awesome"}), + + -- Tag browsing + awful.key({ modkey, }, "Left", awful.tag.viewprev, + {description = "view previous", group = "tag"}), + awful.key({ modkey, }, "Right", awful.tag.viewnext, + {description = "view next", group = "tag"}), + awful.key({ modkey, }, "Escape", awful.tag.history.restore, + {description = "go back", group = "tag"}), + + -- Non-empty tag browsing + awful.key({ altkey }, "Left", function () lain.util.tag_view_nonempty(-1) end, + {description = "view previous nonempty", group = "tag"}), + awful.key({ altkey }, "Right", function () lain.util.tag_view_nonempty(1) end, + {description = "view previous nonempty", group = "tag"}), + + -- Default client focus + awful.key({ altkey, }, "j", + function () + awful.client.focus.byidx( 1) + end, + {description = "focus next by index", group = "client"} + ), + awful.key({ altkey, }, "k", + function () + awful.client.focus.byidx(-1) + end, + {description = "focus previous by index", group = "client"} + ), + + -- By-direction client focus + awful.key({ modkey }, "j", + function() + awful.client.focus.global_bydirection("down") + if client.focus then client.focus:raise() end + end, + {description = "focus down", group = "client"}), + awful.key({ modkey }, "k", + function() + awful.client.focus.global_bydirection("up") + if client.focus then client.focus:raise() end + end, + {description = "focus up", group = "client"}), + awful.key({ modkey }, "h", + function() + awful.client.focus.global_bydirection("left") + if client.focus then client.focus:raise() end + end, + {description = "focus left", group = "client"}), + awful.key({ modkey }, "l", + function() + awful.client.focus.global_bydirection("right") + if client.focus then client.focus:raise() end + end, + {description = "focus right", group = "client"}), + + -- Menu + awful.key({ modkey, }, "w", function () awful.util.mymainmenu:show() end, + {description = "show main menu", group = "awesome"}), + + -- Layout manipulation + awful.key({ modkey, "Shift" }, "j", function () awful.client.swap.byidx( 1) end, + {description = "swap with next client by index", group = "client"}), + awful.key({ modkey, "Shift" }, "k", function () awful.client.swap.byidx( -1) end, + {description = "swap with previous client by index", group = "client"}), + awful.key({ modkey, "Control" }, "j", function () awful.screen.focus_relative( 1) end, + {description = "focus the next screen", group = "screen"}), + awful.key({ modkey, "Control" }, "k", function () awful.screen.focus_relative(-1) end, + {description = "focus the previous screen", group = "screen"}), + awful.key({ modkey, }, "u", awful.client.urgent.jumpto, + {description = "jump to urgent client", group = "client"}), + awful.key({ modkey, }, "Tab", + function () + if cycle_prev then + awful.client.focus.history.previous() + else + awful.client.focus.byidx(-1) + end + if client.focus then + client.focus:raise() + end + end, + {description = "cycle with previous/go back", group = "client"}), + + -- Show/hide wibox + awful.key({ modkey }, "b", function () + for s in screen do + s.mywibox.visible = not s.mywibox.visible + if s.mybottomwibox then + s.mybottomwibox.visible = not s.mybottomwibox.visible + end + end + end, + {description = "toggle wibox", group = "awesome"}), + + -- On-the-fly useless gaps change + awful.key({ altkey, "Control" }, "+", function () lain.util.useless_gaps_resize(1) end, + {description = "increment useless gaps", group = "tag"}), + awful.key({ altkey, "Control" }, "-", function () lain.util.useless_gaps_resize(-1) end, + {description = "decrement useless gaps", group = "tag"}), + + -- Dynamic tagging + awful.key({ modkey, "Shift" }, "n", function () lain.util.add_tag() end, + {description = "add new tag", group = "tag"}), + awful.key({ modkey, "Shift" }, "r", function () lain.util.rename_tag() end, + {description = "rename tag", group = "tag"}), + awful.key({ modkey, "Shift" }, "Left", function () lain.util.move_tag(-1) end, + {description = "move tag to the left", group = "tag"}), + awful.key({ modkey, "Shift" }, "Right", function () lain.util.move_tag(1) end, + {description = "move tag to the right", group = "tag"}), + awful.key({ modkey, "Shift" }, "d", function () lain.util.delete_tag() end, + {description = "delete tag", group = "tag"}), + + -- Standard program + awful.key({ modkey, }, "Return", function () awful.spawn(terminal) end, + {description = "open a terminal", group = "launcher"}), + awful.key({ modkey, "Control" }, "r", awesome.restart, + {description = "reload awesome", group = "awesome"}), + awful.key({ modkey, "Shift" }, "q", awesome.quit, + {description = "quit awesome", group = "awesome"}), + + awful.key({ modkey, altkey }, "l", function () awful.tag.incmwfact( 0.05) end, + {description = "increase master width factor", group = "layout"}), + awful.key({ modkey, altkey }, "h", function () awful.tag.incmwfact(-0.05) end, + {description = "decrease master width factor", group = "layout"}), + awful.key({ modkey, "Shift" }, "h", function () awful.tag.incnmaster( 1, nil, true) end, + {description = "increase the number of master clients", group = "layout"}), + awful.key({ modkey, "Shift" }, "l", function () awful.tag.incnmaster(-1, nil, true) end, + {description = "decrease the number of master clients", group = "layout"}), + awful.key({ modkey, "Control" }, "h", function () awful.tag.incncol( 1, nil, true) end, + {description = "increase the number of columns", group = "layout"}), + awful.key({ modkey, "Control" }, "l", function () awful.tag.incncol(-1, nil, true) end, + {description = "decrease the number of columns", group = "layout"}), + awful.key({ modkey, }, "space", function () awful.layout.inc( 1) end, + {description = "select next", group = "layout"}), + awful.key({ modkey, "Shift" }, "space", function () awful.layout.inc(-1) end, + {description = "select previous", group = "layout"}), + + awful.key({ modkey, "Control" }, "n", function () + local c = awful.client.restore() + -- Focus restored client + if c then + c:emit_signal("request::activate", "key.unminimize", {raise = true}) + end + end, {description = "restore minimized", group = "client"}), + + -- Dropdown application + awful.key({ modkey, }, "z", function () awful.screen.focused().quake:toggle() end, + {description = "dropdown application", group = "launcher"}), + + -- Widgets popups + awful.key({ altkey, }, "c", function () if beautiful.cal then beautiful.cal.show(7) end end, + {description = "show calendar", group = "widgets"}), + awful.key({ altkey, }, "h", function () if beautiful.fs then beautiful.fs.show(7) end end, + {description = "show filesystem", group = "widgets"}), + awful.key({ altkey, }, "w", function () if beautiful.weather then beautiful.weather.show(7) end end, + {description = "show weather", group = "widgets"}), + + -- Screen brightness + awful.key({ }, "XF86MonBrightnessUp", function () os.execute("xbacklight -inc 10") end, + {description = "+10%", group = "hotkeys"}), + awful.key({ }, "XF86MonBrightnessDown", function () os.execute("xbacklight -dec 10") end, + {description = "-10%", group = "hotkeys"}), + + -- ALSA volume control + awful.key({ altkey }, "Up", + function () + os.execute(string.format("amixer -q set %s 1%%+", beautiful.volume.channel)) + beautiful.volume.update() + end, + {description = "volume up", group = "hotkeys"}), + awful.key({ altkey }, "Down", + function () + os.execute(string.format("amixer -q set %s 1%%-", beautiful.volume.channel)) + beautiful.volume.update() + end, + {description = "volume down", group = "hotkeys"}), + awful.key({ altkey }, "m", + function () + os.execute(string.format("amixer -q set %s toggle", beautiful.volume.togglechannel or beautiful.volume.channel)) + beautiful.volume.update() + end, + {description = "toggle mute", group = "hotkeys"}), + awful.key({ altkey, "Control" }, "m", + function () + os.execute(string.format("amixer -q set %s 100%%", beautiful.volume.channel)) + beautiful.volume.update() + end, + {description = "volume 100%", group = "hotkeys"}), + awful.key({ altkey, "Control" }, "0", + function () + os.execute(string.format("amixer -q set %s 0%%", beautiful.volume.channel)) + beautiful.volume.update() + end, + {description = "volume 0%", group = "hotkeys"}), + + -- MPD control + awful.key({ altkey, "Control" }, "Up", + function () + os.execute("mpc toggle") + beautiful.mpd.update() + end, + {description = "mpc toggle", group = "widgets"}), + awful.key({ altkey, "Control" }, "Down", + function () + os.execute("mpc stop") + beautiful.mpd.update() + end, + {description = "mpc stop", group = "widgets"}), + awful.key({ altkey, "Control" }, "Left", + function () + os.execute("mpc prev") + beautiful.mpd.update() + end, + {description = "mpc prev", group = "widgets"}), + awful.key({ altkey, "Control" }, "Right", + function () + os.execute("mpc next") + beautiful.mpd.update() + end, + {description = "mpc next", group = "widgets"}), + awful.key({ altkey }, "0", + function () + local common = { text = "MPD widget ", position = "top_middle", timeout = 2 } + if beautiful.mpd.timer.started then + beautiful.mpd.timer:stop() + common.text = common.text .. lain.util.markup.bold("OFF") + else + beautiful.mpd.timer:start() + common.text = common.text .. lain.util.markup.bold("ON") + end + naughty.notify(common) + end, + {description = "mpc on/off", group = "widgets"}), + + -- Copy primary to clipboard (terminals to gtk) + awful.key({ modkey }, "c", function () awful.spawn.with_shell("xsel | xsel -i -b") end, + {description = "copy terminal to gtk", group = "hotkeys"}), + -- Copy clipboard to primary (gtk to terminals) + awful.key({ modkey }, "v", function () awful.spawn.with_shell("xsel -b | xsel") end, + {description = "copy gtk to terminal", group = "hotkeys"}), + + -- User programs + awful.key({ modkey }, "q", function () awful.spawn(browser) end, + {description = "run browser", group = "launcher"}), + + -- Default + --[[ Menubar + awful.key({ modkey }, "p", function() menubar.show() end, + {description = "show the menubar", group = "launcher"}), + --]] + --[[ dmenu + awful.key({ modkey }, "x", function () + os.execute(string.format("dmenu_run -i -fn 'Monospace' -nb '%s' -nf '%s' -sb '%s' -sf '%s'", + beautiful.bg_normal, beautiful.fg_normal, beautiful.bg_focus, beautiful.fg_focus)) + end, + {description = "show dmenu", group = "launcher"}), + --]] + -- alternatively use rofi, a dmenu-like application with more features + -- check https://github.com/DaveDavenport/rofi for more details + --[[ rofi + awful.key({ modkey }, "x", function () + os.execute(string.format("rofi -show %s -theme %s", + 'run', 'dmenu')) + end, + {description = "show rofi", group = "launcher"}), + --]] + -- Prompt + awful.key({ modkey }, "r", function () awful.screen.focused().mypromptbox:run() end, + {description = "run prompt", group = "launcher"}), + + awful.key({ modkey }, "x", + function () + awful.prompt.run { + prompt = "Run Lua code: ", + textbox = awful.screen.focused().mypromptbox.widget, + exe_callback = awful.util.eval, + history_path = awful.util.get_cache_dir() .. "/history_eval" + } + end, + {description = "lua execute prompt", group = "awesome"}) + --]] +) + +clientkeys = mytable.join( + awful.key({ altkey, "Shift" }, "m", lain.util.magnify_client, + {description = "magnify client", group = "client"}), + awful.key({ modkey, }, "f", + function (c) + c.fullscreen = not c.fullscreen + c:raise() + end, + {description = "toggle fullscreen", group = "client"}), + awful.key({ modkey, "Shift" }, "c", function (c) c:kill() end, + {description = "close", group = "client"}), + awful.key({ modkey, "Control" }, "space", awful.client.floating.toggle , + {description = "toggle floating", group = "client"}), + awful.key({ modkey, "Control" }, "Return", function (c) c:swap(awful.client.getmaster()) end, + {description = "move to master", group = "client"}), + awful.key({ modkey, }, "o", function (c) c:move_to_screen() end, + {description = "move to screen", group = "client"}), + awful.key({ modkey, }, "t", function (c) c.ontop = not c.ontop end, + {description = "toggle keep on top", group = "client"}), + awful.key({ modkey, }, "n", + function (c) + -- The client currently has the input focus, so it cannot be + -- minimized, since minimized clients can't have the focus. + c.minimized = true + end , + {description = "minimize", group = "client"}), + awful.key({ modkey, }, "m", + function (c) + c.maximized = not c.maximized + c:raise() + end , + {description = "(un)maximize", group = "client"}), + awful.key({ modkey, "Control" }, "m", + function (c) + c.maximized_vertical = not c.maximized_vertical + c:raise() + end , + {description = "(un)maximize vertically", group = "client"}), + awful.key({ modkey, "Shift" }, "m", + function (c) + c.maximized_horizontal = not c.maximized_horizontal + c:raise() + end , + {description = "(un)maximize horizontally", group = "client"}) +) + +-- Bind all key numbers to tags. +-- Be careful: we use keycodes to make it work on any keyboard layout. +-- This should map on the top row of your keyboard, usually 1 to 9. +for i = 1, 9 do + globalkeys = mytable.join(globalkeys, + -- View tag only. + awful.key({ modkey }, "#" .. i + 9, + function () + local screen = awful.screen.focused() + local tag = screen.tags[i] + if tag then + tag:view_only() + end + end, + {description = "view tag #"..i, group = "tag"}), + -- Toggle tag display. + awful.key({ modkey, "Control" }, "#" .. i + 9, + function () + local screen = awful.screen.focused() + local tag = screen.tags[i] + if tag then + awful.tag.viewtoggle(tag) + end + end, + {description = "toggle tag #" .. i, group = "tag"}), + -- Move client to tag. + awful.key({ modkey, "Shift" }, "#" .. i + 9, + function () + if client.focus then + local tag = client.focus.screen.tags[i] + if tag then + client.focus:move_to_tag(tag) + end + end + end, + {description = "move focused client to tag #"..i, group = "tag"}), + -- Toggle tag on focused client. + awful.key({ modkey, "Control", "Shift" }, "#" .. i + 9, + function () + if client.focus then + local tag = client.focus.screen.tags[i] + if tag then + client.focus:toggle_tag(tag) + end + end + end, + {description = "toggle focused client on tag #" .. i, group = "tag"}) + ) +end + +clientbuttons = mytable.join( + awful.button({ }, 1, function (c) + c:emit_signal("request::activate", "mouse_click", {raise = true}) + end), + awful.button({ modkey }, 1, function (c) + c:emit_signal("request::activate", "mouse_click", {raise = true}) + awful.mouse.client.move(c) + end), + awful.button({ modkey }, 3, function (c) + c:emit_signal("request::activate", "mouse_click", {raise = true}) + awful.mouse.client.resize(c) + end) +) + +-- Set keys +root.keys(globalkeys) + +-- }}} + +-- {{{ Rules + +-- Rules to apply to new clients (through the "manage" signal). +awful.rules.rules = { + -- All clients will match this rule. + { rule = { }, + properties = { border_width = beautiful.border_width, + border_color = beautiful.border_normal, + callback = awful.client.setslave, + focus = awful.client.focus.filter, + raise = true, + keys = clientkeys, + buttons = clientbuttons, + screen = awful.screen.preferred, + placement = awful.placement.no_overlap+awful.placement.no_offscreen, + size_hints_honor = false + } + }, + + -- Floating clients. + { rule_any = { + instance = { + "DTA", -- Firefox addon DownThemAll. + "copyq", -- Includes session name in class. + "pinentry", + }, + class = { + "Arandr", + "Blueman-manager", + "Gpick", + "Kruler", + "MessageWin", -- kalarm. + "Sxiv", + "Tor Browser", -- Needs a fixed window size to avoid fingerprinting by screen size. + "Wpa_gui", + "veromix", + "xtightvncviewer"}, + + -- Note that the name property shown in xprop might be set slightly after creation of the client + -- and the name shown there might not match defined rules here. + name = { + "Event Tester", -- xev. + }, + role = { + "AlarmWindow", -- Thunderbird's calendar. + "ConfigManager", -- Thunderbird's about:config. + "pop-up", -- e.g. Google Chrome's (detached) Developer Tools. + } + }, properties = { floating = true }}, + + -- Add titlebars to normal clients and dialogs + { rule_any = {type = { "normal", "dialog" } + }, properties = { titlebars_enabled = true } + }, + + -- Set Firefox to always map on the tag named "2" on screen 1. + -- { rule = { class = "Firefox" }, + -- properties = { screen = 1, tag = "2" } }, +} + +-- }}} + +-- {{{ Signals + +-- Signal function to execute when a new client appears. +client.connect_signal("manage", function (c) + -- Set the windows at the slave, + -- i.e. put it at the end of others instead of setting it master. + -- if not awesome.startup then awful.client.setslave(c) end + + if awesome.startup + and not c.size_hints.user_position + and not c.size_hints.program_position then + -- Prevent clients from being unreachable after screen count changes. + awful.placement.no_offscreen(c) + end +end) + +-- Add a titlebar if titlebars_enabled is set to true in the rules. +client.connect_signal("request::titlebars", function(c) + -- Custom + if beautiful.titlebar_fun then + beautiful.titlebar_fun(c) + return + end + + -- Default + -- buttons for the titlebar + local buttons = mytable.join( + awful.button({ }, 1, function() + c:emit_signal("request::activate", "titlebar", {raise = true}) + awful.mouse.client.move(c) + end), + awful.button({ }, 3, function() + c:emit_signal("request::activate", "titlebar", {raise = true}) + awful.mouse.client.resize(c) + end) + ) + + awful.titlebar(c, { size = 16 }) : setup { + { -- Left + awful.titlebar.widget.iconwidget(c), + buttons = buttons, + layout = wibox.layout.fixed.horizontal + }, + { -- Middle + { -- Title + align = "center", + widget = awful.titlebar.widget.titlewidget(c) + }, + buttons = buttons, + layout = wibox.layout.flex.horizontal + }, + { -- Right + awful.titlebar.widget.floatingbutton (c), + awful.titlebar.widget.maximizedbutton(c), + awful.titlebar.widget.stickybutton (c), + awful.titlebar.widget.ontopbutton (c), + awful.titlebar.widget.closebutton (c), + layout = wibox.layout.fixed.horizontal() + }, + layout = wibox.layout.align.horizontal + } +end) + +-- Enable sloppy focus, so that focus follows mouse. +client.connect_signal("mouse::enter", function(c) + c:emit_signal("request::activate", "mouse_enter", {raise = vi_focus}) +end) + +client.connect_signal("focus", function(c) c.border_color = beautiful.border_focus end) +client.connect_signal("unfocus", function(c) c.border_color = beautiful.border_normal end) + +-- }}} diff --git a/.config/awesome/rcc.lua b/.config/awesome/rcc.lua new file mode 100755 index 0000000..a67ef5f --- /dev/null +++ b/.config/awesome/rcc.lua @@ -0,0 +1,697 @@ +-- If LuaRocks is installed, make sure that packages installed through it are +-- found (e.g. lgi). If LuaRocks is not installed, do nothing. +pcall(require, "luarocks.loader") + +-- Standard awesome library +local gears = require("gears") +local awful = require("awful") +require("awful.autofocus") + +-- Widget and layout library +local wibox = require("wibox") + +-- Theme handling library +local beautiful = require("beautiful") + +-- Notification library +local naughty = require("naughty") +local menubar = require("menubar") +local hotkeys_popup = require("awful.hotkeys_popup") + +-- Enable hotkeys help widget for VIM and other apps +-- when client with a matching name is opened: +require("awful.hotkeys_popup.keys") + + +-- Lain widgets +local lain = require("lain") +local cpu = lain.widget.cpu { + settings = function() + widget:set_markup("Cpu " .. cpu_now.usage) + end +} +local volume = lain.widget.pulse { + settings = function() + vlevel = volume_now.left .. "-" .. volume_now.right .. "% | " .. volume_now.device + if volume_now.muted == "yes" then + vlevel = vlevel .. " M" + end + widget:set_markup(lain.util.markup("#7493d2", vlevel)) + end +} + +local mymem = lain.widget.mem() + +local fsroothome = lain.widget.fs({ + settings = function() + widget:set_text("/home: " .. fs_now["/home"].percentage .. "% (" .. + fs_now["/home"].free .. " " .. fs_now["/home"].units .. " left)") + end +}) + +-- Load Debian menu entries +local debian = require("debian.menu") +local has_fdo, freedesktop = pcall(require, "freedesktop") +local battery_widget = require("awesome-wm-widgets.battery-widget.battery") +local volume_widget = require('awesome-wm-widgets.volume-widget.volume') + + +-- {{{ Error handling +-- Check if awesome encountered an error during startup and fell back to +-- another config (This code will only ever execute for the fallback config) +if awesome.startup_errors then + naughty.notify({ preset = naughty.config.presets.critical, + title = "Oops, there were errors during startup!", + text = awesome.startup_errors }) +end +-- Handle runtime errors after startup +do + local in_error = false + awesome.connect_signal("debug::error", function (err) + -- Make sure we don't go into an endless error loop + if in_error then return end + in_error = true + + naughty.notify({ preset = naughty.config.presets.critical, + title = "Oops, an error happened!", + text = tostring(err) }) + in_error = false + end) +end +-- }}} + +-- {{{ Variable definitions +-- Themes define colours, icons, font and wallpapers. +beautiful.init(gears.filesystem.get_configuration_dir() .. "mytheme.lua") + +-- This is used later as the default terminal and editor to run. +terminal = "alacritty" +editor = "nvim" +editor_cmd = terminal .. " -e " .. editor + +modkey = "Mod4" + +-- Table of layouts to cover with awful.layout.inc, order matters. +awful.layout.layouts = { + awful.layout.suit.tile, + awful.layout.suit.floating, + awful.layout.suit.max, + awful.layout.suit.magnifier, + -- awful.layout.suit.corner.se, +} +-- }}} + +-- {{{ Menu +-- Create a launcher widget and a main menu +myawesomemenu = { + { "hotkeys", function() hotkeys_popup.show_help(nil, awful.screen.focused()) end }, + { "manual", terminal .. " -e man awesome" }, + { "edit config", editor_cmd .. " " .. awesome.conffile }, + { "restart", awesome.restart }, + { "quit", function() awesome.quit() end }, +} + +local menu_awesome = { "awesome", myawesomemenu, beautiful.awesome_icon } +local menu_terminal = { "open terminal", terminal } +if has_fdo then + mymainmenu = freedesktop.menu.build({ + before = { menu_awesome }, + after = { menu_terminal } + }) +else + mymainmenu = awful.menu({ + items = { + menu_awesome, + { "Debian", debian.menu.Debian_menu.Debian }, + menu_terminal, + } + }) +end + + +-- Menubar configuration +menubar.utils.terminal = terminal -- Set the terminal for applications that require it +-- }}} + +-- Keyboard map indicator and switcher +mykeyboardlayout = awful.widget.keyboardlayout() + +-- {{{ Wibar +-- Create a textclock widget +mytextclock = wibox.widget.textclock() + +-- Create a wibox for each screen and add it +local taglist_buttons = gears.table.join( + awful.button({ }, 1, function(t) t:view_only() end), + awful.button({ modkey }, 1, function(t) + if client.focus then + client.focus:move_to_tag(t) + end + end), + awful.button({ }, 3, awful.tag.viewtoggle), + awful.button({ modkey }, 3, function(t) + if client.focus then + client.focus:toggle_tag(t) + end + end), + awful.button({ }, 4, function(t) awful.tag.viewnext(t.screen) end), + awful.button({ }, 5, function(t) awful.tag.viewprev(t.screen) end) + ) + +local tasklist_buttons = gears.table.join( + awful.button({ }, 1, function (c) + if c == client.focus then + c.minimized = true + else + c:emit_signal( + "request::activate", + "tasklist", + {raise = true} + ) + end + end), + awful.button({ }, 3, function() + awful.menu.client_list({ theme = { width = 250 } }) + end), + awful.button({ }, 4, function () + awful.client.focus.byidx(1) + end), + awful.button({ }, 5, function () + awful.client.focus.byidx(-1) + end)) + +local function set_wallpaper(s) + -- Wallpaper + if beautiful.wallpaper then + local wallpaper = beautiful.wallpaper + -- If wallpaper is a function, call it with the screen + if type(wallpaper) == "function" then + wallpaper = wallpaper(s) + end + gears.wallpaper.maximized(wallpaper, s, true) + end +end + +local vert_sep = wibox.widget { + widget = wibox.widget.separator, + orientation = "vertical", + margin = 2, + forced_width = 2, + color = "#353535", +} + +-- Re-set wallpaper when a screen's geometry changes (e.g. different resolution) +screen.connect_signal("property::geometry", set_wallpaper) +textbox_separator = " . " +awful.screen.connect_for_each_screen(function(s) + -- Wallpaper + set_wallpaper(s) + + -- Each screen has its own tag table. + awful.tag({ "1", "2", "3", "4", "5", "6", "7", "8", "9" }, s, awful.layout.layouts[1]) + + -- Create a promptbox for each screen + s.mypromptbox = awful.widget.prompt() + -- Create an imagebox widget which will contain an icon indicating which layout we're using. + -- We need one layoutbox per screen. + s.mylayoutbox = awful.widget.layoutbox(s) + s.mylayoutbox:buttons(gears.table.join( + awful.button({ }, 1, function () awful.layout.inc( 1) end), + awful.button({ }, 3, function () awful.layout.inc(-1) end), + awful.button({ }, 4, function () awful.layout.inc( 1) end), + awful.button({ }, 5, function () awful.layout.inc(-1) end))) + -- Create a taglist widget + s.mytaglist = awful.widget.taglist { + screen = s, + filter = awful.widget.taglist.filter.all, + buttons = taglist_buttons + } + + -- Create a tasklist widget + s.mytasklist = awful.widget.tasklist { + screen = s, + filter = awful.widget.tasklist.filter.currenttags, + buttons = tasklist_buttons + } + + -- Create the wibox + s.mywibox = awful.wibar({ position = "top", screen = s }) + + -- Add widgets to the wibox + s.mywibox:setup { + layout = wibox.layout.align.horizontal, + { -- Left widgets + layout = wibox.layout.fixed.horizontal, + mylauncher, + s.mytaglist, + s.mypromptbox, + }, + s.mytasklist, -- Middle widget + { -- Right widgets + layout = wibox.layout.fixed.horizontal, + volume_widget{ + widget_type = 'hoizontal_bar' + }, + vert_sep, + battery_widget(), + vert_sep, + fsroothome, + vert_sep, + cpu, + vert_sep, + mykeyboardlayout, + vert_sep, + wibox.widget.systray( + ), + vert_sep, + mytextclock, + vert_sep, + s.mylayoutbox, + }, + } +end) +-- }}} + +-- {{{ Mouse bindings +root.buttons(gears.table.join( + awful.button({ }, 3, function () mymainmenu:toggle() end), + awful.button({ }, 4, awful.tag.viewnext), + awful.button({ }, 5, awful.tag.viewprev) +)) +-- }}} + +-- {{{ Key bindings +globalkeys = gears.table.join( + + -- Show help text + awful.key({ modkey, }, "s", hotkeys_popup.show_help, + {description="show help", group="awesome"}), + + -- View previous tag + awful.key({ modkey, }, "Left", awful.tag.viewprev, + {description = "view previous", group = "tag"}), + -- View Next tag + awful.key({ modkey, }, "Right", awful.tag.viewnext, + {description = "view next", group = "tag"}), + + -- Go to previous tag + awful.key({ modkey, }, "Escape", awful.tag.history.restore, + {description = "go back", group = "tag"}), + + -- Focus Next clients + awful.key({ modkey, }, "j", + function () + awful.client.focus.byidx( 1) + end, + {description = "focus next by index", group = "client"} + ), + + -- Focus previous client + awful.key({ modkey, }, "k", + function () + awful.client.focus.byidx(-1) + end, + {description = "focus previous by index", group = "client"} + ), + + -- Show Main menu + awful.key({ modkey, }, "w", function () mymainmenu:show() end, + {description = "show main menu", group = "awesome"}), + + +-- Screen brightness + + awful.key({ }, "XF86MonBrightnessDown", function () + awful.util.spawn("brightnessctl --min-val=2 -q set 5%-") end), + awful.key({ }, "XF86MonBrightnessUp", function () + awful.util.spawn("brightnessctl -q set 5%+") end), + +-- Volume + +awful.key({}, "XF86AudioRaiseVolume", function() awful.util.spawn("amixer -D pulse sset Master 5%+") end), +awful.key({}, "XF86AudioLowerVolume", function() awful.util.spawn("amixer -D pulse sset Master 5%-") end), +awful.key({}, "XF86AudioMute", function() awful.util.spawn("amixer -D pulse sset Master toggle") end), + + + + + -- Swap with next client + awful.key({ modkey, "Shift" }, "j", function () awful.client.swap.byidx( 1) end, + {description = "swap with next client by index", group = "client"}), + + + -- Swap with previous client + awful.key({ modkey, "Shift" }, "k", function () awful.client.swap.byidx( -1) end, + {description = "swap with previous client by index", group = "client"}), + + + -- Focus the next screen + awful.key({ modkey, "Control" }, "j", function () awful.screen.focus_relative( 1) end, + {description = "focus the next screen", group = "screen"}), + + -- Focus the previous screen + awful.key({ modkey, "Control" }, "k", function () awful.screen.focus_relative(-1) end, + {description = "focus the previous screen", group = "screen"}), + + -- Focus to urgent client + awful.key({ modkey,}, "u", awful.client.urgent.jumpto, + {description = "jump to urgent client", group = "client"}), + + -- Back to client + awful.key({ modkey, }, "Tab", + function () + awful.client.focus.history.previous() + if client.focus then + client.focus:raise() + end + end, + {description = "go back", group = "client"}), + + -- Standard program + awful.key({ modkey, }, "Return", function () awful.spawn(terminal) end, + {description = "open a terminal", group = "launcher"}), + awful.key({ modkey, "Shift" }, "r", awesome.restart, + {description = "reload awesome", group = "awesome"}), + awful.key({ modkey, "Shift" }, "e", awesome.quit, + {description = "quit awesome", group = "awesome"}), + + awful.key({ modkey, }, "l", function () awful.tag.incmwfact( 0.05) end, + {description = "increase master width factor", group = "layout"}), + awful.key({ modkey, }, "h", function () awful.tag.incmwfact(-0.05) end, + {description = "decrease master width factor", group = "layout"}), + awful.key({ modkey, "Shift" }, "h", function () awful.tag.incnmaster( 1, nil, true) end, + {description = "increase the number of master clients", group = "layout"}), + awful.key({ modkey, "Shift" }, "l", function () awful.tag.incnmaster(-1, nil, true) end, + {description = "decrease the number of master clients", group = "layout"}), + awful.key({ modkey, "Control" }, "h", function () awful.tag.incncol( 1, nil, true) end, + {description = "increase the number of columns", group = "layout"}), + awful.key({ modkey, "Control" }, "l", function () awful.tag.incncol(-1, nil, true) end, + {description = "decrease the number of columns", group = "layout"}), + awful.key({ modkey, }, "space", function () awful.layout.inc( 1) end, + {description = "select next", group = "layout"}), + awful.key({ modkey, "Shift" }, "space", function () awful.layout.inc(-1) end, + {description = "select previous", group = "layout"}), + + awful.key({ modkey, "Control" }, "n", + function () + local c = awful.client.restore() + -- Focus restored client + if c then + c:emit_signal( + "request::activate", "key.unminimize", {raise = true} + ) + end + end, + {description = "restore minimized", group = "client"}), + + -- Prompt + awful.key({ modkey }, "d", function () awful.spawn.with_shell("rofi -show combi -show-icons &>> /tmp/rofi.log") end, + {description = "run prompt", group = "launcher"}), + + awful.key({ modkey }, "x", + function () + awful.prompt.run { + prompt = "Run Lua code: ", + textbox = awful.screen.focused().mypromptbox.widget, + exe_callback = awful.util.eval, + history_path = awful.util.get_cache_dir() .. "/history_eval" + } + end, + {description = "lua execute prompt", group = "awesome"}), + -- Menubar + awful.key({ modkey }, "p", function() menubar.show() end, + {description = "show the menubar", group = "launcher"}) +) + +clientkeys = gears.table.join( + awful.key({ modkey, }, "f", + function (c) + c.fullscreen = not c.fullscreen + c:raise() + end, + {description = "toggle fullscreen", group = "client"}), + awful.key({ modkey, "Shift" }, "q", function (c) c:kill() end, + {description = "close", group = "client"}), + awful.key({ modkey, "Control" }, "space", awful.client.floating.toggle , + {description = "toggle floating", group = "client"}), + awful.key({ modkey, "Control" }, "Return", function (c) c:swap(awful.client.getmaster()) end, + {description = "move to master", group = "client"}), + awful.key({ modkey, }, "o", function (c) c:move_to_screen() end, + {description = "move to screen", group = "client"}), + awful.key({ modkey, }, "t", function (c) c.ontop = not c.ontop end, + {description = "toggle keep on top", group = "client"}), + awful.key({ modkey, }, "n", + function (c) + -- The client currently has the input focus, so it cannot be + -- minimized, since minimized clients can't have the focus. + c.minimized = true + end , + {description = "minimize", group = "client"}), + + awful.key({ modkey, "Control" }, "s", function (c) c.sticky = not c.sticky end, + {description="toggle sticky", group="client"}), + awful.key({ modkey, }, "m", + function (c) + c.maximized = not c.maximized + c:raise() + end , + {description = "(un)maximize", group = "client"}), + awful.key({ modkey, "Control" }, "m", + function (c) + c.maximized_vertical = not c.maximized_vertical + c:raise() + end , + {description = "(un)maximize vertically", group = "client"}), + awful.key({ modkey, "Shift" }, "m", + function (c) + c.maximized_horizontal = not c.maximized_horizontal + c:raise() + end , + {description = "(un)maximize horizontally", group = "client"}) +) + +-- Bind all key numbers to tags. +-- Be careful: we use keycodes to make it work on any keyboard layout. +-- This should map on the top row of your keyboard, usually 1 to 9. +for i = 1, 9 do + globalkeys = gears.table.join(globalkeys, + -- View tag only. + awful.key({ modkey }, "#" .. i + 9, + function () + local screen = awful.screen.focused() + local tag = screen.tags[i] + if tag then + tag:view_only() + end + end, + {description = "view tag #"..i, group = "tag"}), + -- Toggle tag display. + awful.key({ modkey, "Control" }, "#" .. i + 9, + function () + local screen = awful.screen.focused() + local tag = screen.tags[i] + if tag then + awful.tag.viewtoggle(tag) + end + end, + {description = "toggle tag #" .. i, group = "tag"}), + -- Move client to tag. + awful.key({ modkey, "Shift" }, "#" .. i + 9, + function () + if client.focus then + local tag = client.focus.screen.tags[i] + if tag then + client.focus:move_to_tag(tag) + end + end + end, + {description = "move focused client to tag #"..i, group = "tag"}), + -- Toggle tag on focused client. + awful.key({ modkey, "Control", "Shift" }, "#" .. i + 9, + function () + if client.focus then + local tag = client.focus.screen.tags[i] + if tag then + client.focus:toggle_tag(tag) + end + end + end, + {description = "toggle focused client on tag #" .. i, group = "tag"}) + ) +end + + +-- Mouse click events +clientbuttons = gears.table.join( + awful.button({ }, 1, function (c) + c:emit_signal("request::activate", "mouse_click", {raise = true}) + end), + awful.button({ modkey }, 1, function (c) + c:emit_signal("request::activate", "mouse_click", {raise = true}) + awful.mouse.client.move(c) + end), + awful.button({ modkey }, 3, function (c) + c:emit_signal("request::activate", "mouse_click", {raise = true}) + awful.mouse.client.resize(c) + end) +) + +-- Set keys +root.keys(globalkeys) +-- }}} + +-- Rules to apply to new clients (through the "manage" signal). +awful.rules.rules = { + -- All clients will match this rule. + { rule = { }, + properties = { border_width = beautiful.border_width, + border_color = "#ff0000", + focus = awful.client.focus.filter, + raise = true, + keys = clientkeys, + buttons = clientbuttons, + screen = awful.screen.preferred, + placement = awful.placement.no_overlap+awful.placement.no_offscreen + } + }, + + -- Floating clients. + { rule_any = { + instance = { + "DTA", -- Firefox addon DownThemAll. + "copyq", -- Includes session name in class. + "pinentry", + }, + class = { + "Arandr", + "Blueman-manager", + "Anydesk", + "Pavucontrol", + "Teams", + "Marktext", + "Gpick", + "Nautilus", + "Pavucontrol", + "Gnome-screenshot", + "Gnome-calculator", + "Kruler", + "MessageWin", -- kalarm. + "Sxiv", + "Tor Browser", -- Needs a fixed window size to avoid fingerprinting by screen size. + "Wpa_gui", + "veromix", + "xtightvncviewer"}, + + -- Note that the name property shown in xprop might be set slightly after creation of the client + -- and the name shown there might not match defined rules here. + name = { + "Event Tester", -- xev. + }, + role = { + "AlarmWindow", -- Thunderbird's calendar. + "ConfigManager", -- Thunderbird's about:config. + "pop-up", -- e.g. Google Chrome's (detached) Developer Tools. + } + }, properties = { floating = true, placement = awful.placement.centered }}, + + -- Add titlebars to dialogs + { rule_any = {type = { "dialog" } + }, properties = { titlebars_enabled = true, placement = awful.placement.centered } + }, + + -- Set Brave to always mapto on tag named 4 on primary screen + { + rule = {class = "Brave"}, + properties = {screen = 1, tag = "4"}, + } +, + -- Set Teams to always map on tag named 3 + { + rule = {class = "Teams"}, + properties = {tag = "3"}, + } + -- Set Firefox to always map on the tag named "2" on screen 1. + -- { rule = { class = "Firefox" }, + -- properties = { screen = 1, tag = "2" } }, +} +-- }}} + +-- {{{ Signals +-- Signal function to execute when a new client appears. +client.connect_signal("manage", function (c) + -- Set the windows at the slave, + -- i.e. put it at the end of others instead of setting it master. + -- if not awesome.startup then awful.client.setslave(c) end + + if awesome.startup + and not c.size_hints.user_position + and not c.size_hints.program_position then + -- Prevent clients from being unreachable after screen count changes. + awful.placement.no_offscreen(c) + end +end) + +-- Add a titlebar if titlebars_enabled is set to true in the rules. +client.connect_signal("request::titlebars", function(c) + -- buttons for the titlebar + local buttons = gears.table.join( + awful.button({ }, 1, function() + c:emit_signal("request::activate", "titlebar", {raise = true}) + awful.mouse.client.move(c) + end), + awful.button({ }, 3, function() + c:emit_signal("request::activate", "titlebar", {raise = true}) + awful.mouse.client.resize(c) + end) + ) + + awful.titlebar(c) : setup { + { -- Left + awful.titlebar.widget.iconwidget(c), + buttons = buttons, + layout = wibox.layout.fixed.horizontal + }, + { -- Middle + { -- Title + align = "center", + widget = awful.titlebar.widget.titlewidget(c) + }, + buttons = buttons, + layout = wibox.layout.flex.horizontal + }, + { -- Right + awful.titlebar.widget.floatingbutton (c), + awful.titlebar.widget.maximizedbutton(c), + awful.titlebar.widget.stickybutton (c), + awful.titlebar.widget.ontopbutton (c), + awful.titlebar.widget.closebutton (c), + layout = wibox.layout.fixed.horizontal() + }, + layout = wibox.layout.align.horizontal + } +end) + +-- Enable sloppy focus, so that focus follows mouse. +client.connect_signal("mouse::enter", function(c) + c:emit_signal("request::activate", "mouse_enter", {raise = false}) +end) + +client.connect_signal("focus", function(c) c.border_color = beautiful.border_focus end) +client.connect_signal("unfocus", function(c) c.border_color = beautiful.border_normal end) +-- }}} +-- +-- +-- +-- Launch on startup +awful.spawn.with_shell("picom -b") +awful.spawn.with_shell("unity-settings-daemon") +awful.spawn.with_shell("/usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1 &") +awful.spawn.with_shell("/usr/bin/gnome-screensaver") +awful.spawn.with_shell("gnome-power-manager &") +awful.spawn.with_shell("killall pasystray && killall nm-applet && killall xfce4-power-manager && killall flameshot && killall blueman-applet") +awful.spawn.with_shell("sleep 1s && pasystray &") +awful.spawn.with_shell("sleep 1s && nm-applet &") +awful.spawn.with_shell("sleep 1s && blueman-applet &") +awful.spawn.with_shell("sleep 1s && flameshot &") +awful.spawn.with_shell("sleep 1s && xfce4-power-manager") +awful.spawn.with_shell("feh --bg-scale ~/Pictures/Wallpapers/wallpaper.png") diff --git a/.config/awesome/scratch.lua b/.config/awesome/scratch.lua new file mode 100755 index 0000000..cddfa35 --- /dev/null +++ b/.config/awesome/scratch.lua @@ -0,0 +1,60 @@ +local client = client +local awful = require("awful") +local util = require("awful.util") + +local scratch = {} +local defaultRule = {instance = "scratch"} + +-- Turn on this scratch window client (add current tag to window's tags, +-- then set focus to the window) +local function turn_on(c) + local current_tag = awful.tag.selected(c.screen) + ctags = {current_tag} + for k,tag in pairs(c:tags()) do + if tag ~= current_tag then table.insert(ctags, tag) end + end + c:tags(ctags) + c:raise() + client.focus = c +end + +-- Turn off this scratch window client (remove current tag from window's tags) +local function turn_off(c) + local current_tag = awful.tag.selected(c.screen) + local ctags = {} + for k,tag in pairs(c:tags()) do + if tag ~= current_tag then table.insert(ctags, tag) end + end + c:tags(ctags) +end + +function scratch.raise(cmd, rule) + local rule = rule or defaultRule + local function matcher(c) return awful.rules.match(c, rule) end + + -- logic mostly copied form awful.client.run_or_raise, except we don't want + -- to change to or merge with scratchpad tag, just show the window + local clients = client.get() + local findex = util.table.hasitem(clients, client.focus) or 1 + local start = util.cycle(#clients, findex + 1) + + for c in awful.client.iterate(matcher, start) do + turn_on(c) + return + end + + -- client not found, spawn it + util.spawn(cmd) +end + +function scratch.toggle(cmd, rule, alwaysclose) + local rule = rule or defaultRule + + if client.focus and awful.rules.match(client.focus, rule) then + turn_off(client.focus) + else + scratch.raise(cmd, rule) + end +end + +return scratch diff --git a/.config/awesome/scratchpad.lua b/.config/awesome/scratchpad.lua new file mode 100755 index 0000000..cddfa35 --- /dev/null +++ b/.config/awesome/scratchpad.lua @@ -0,0 +1,60 @@ +local client = client +local awful = require("awful") +local util = require("awful.util") + +local scratch = {} +local defaultRule = {instance = "scratch"} + +-- Turn on this scratch window client (add current tag to window's tags, +-- then set focus to the window) +local function turn_on(c) + local current_tag = awful.tag.selected(c.screen) + ctags = {current_tag} + for k,tag in pairs(c:tags()) do + if tag ~= current_tag then table.insert(ctags, tag) end + end + c:tags(ctags) + c:raise() + client.focus = c +end + +-- Turn off this scratch window client (remove current tag from window's tags) +local function turn_off(c) + local current_tag = awful.tag.selected(c.screen) + local ctags = {} + for k,tag in pairs(c:tags()) do + if tag ~= current_tag then table.insert(ctags, tag) end + end + c:tags(ctags) +end + +function scratch.raise(cmd, rule) + local rule = rule or defaultRule + local function matcher(c) return awful.rules.match(c, rule) end + + -- logic mostly copied form awful.client.run_or_raise, except we don't want + -- to change to or merge with scratchpad tag, just show the window + local clients = client.get() + local findex = util.table.hasitem(clients, client.focus) or 1 + local start = util.cycle(#clients, findex + 1) + + for c in awful.client.iterate(matcher, start) do + turn_on(c) + return + end + + -- client not found, spawn it + util.spawn(cmd) +end + +function scratch.toggle(cmd, rule, alwaysclose) + local rule = rule or defaultRule + + if client.focus and awful.rules.match(client.focus, rule) then + turn_off(client.focus) + else + scratch.raise(cmd, rule) + end +end + +return scratch diff --git a/.config/awesome/themes/blackburn/icons/awesome.png b/.config/awesome/themes/blackburn/icons/awesome.png new file mode 100755 index 0000000..947a06d Binary files /dev/null and b/.config/awesome/themes/blackburn/icons/awesome.png differ diff --git a/.config/awesome/themes/blackburn/icons/dwindle.png b/.config/awesome/themes/blackburn/icons/dwindle.png new file mode 100755 index 0000000..2f4b4ac Binary files /dev/null and b/.config/awesome/themes/blackburn/icons/dwindle.png differ diff --git a/.config/awesome/themes/blackburn/icons/fairh.png b/.config/awesome/themes/blackburn/icons/fairh.png new file mode 100755 index 0000000..b0030e7 Binary files /dev/null and b/.config/awesome/themes/blackburn/icons/fairh.png differ diff --git a/.config/awesome/themes/blackburn/icons/fairv.png b/.config/awesome/themes/blackburn/icons/fairv.png new file mode 100755 index 0000000..2c0e157 Binary files /dev/null and b/.config/awesome/themes/blackburn/icons/fairv.png differ diff --git a/.config/awesome/themes/blackburn/icons/floating.png b/.config/awesome/themes/blackburn/icons/floating.png new file mode 100755 index 0000000..e0bdd4b Binary files /dev/null and b/.config/awesome/themes/blackburn/icons/floating.png differ diff --git a/.config/awesome/themes/blackburn/icons/magnifier.png b/.config/awesome/themes/blackburn/icons/magnifier.png new file mode 100755 index 0000000..3713108 Binary files /dev/null and b/.config/awesome/themes/blackburn/icons/magnifier.png differ diff --git a/.config/awesome/themes/blackburn/icons/max.png b/.config/awesome/themes/blackburn/icons/max.png new file mode 100755 index 0000000..8828d12 Binary files /dev/null and b/.config/awesome/themes/blackburn/icons/max.png differ diff --git a/.config/awesome/themes/blackburn/icons/spiral.png b/.config/awesome/themes/blackburn/icons/spiral.png new file mode 100755 index 0000000..54c2c5e Binary files /dev/null and b/.config/awesome/themes/blackburn/icons/spiral.png differ diff --git a/.config/awesome/themes/blackburn/icons/square_sel.png b/.config/awesome/themes/blackburn/icons/square_sel.png new file mode 100755 index 0000000..6938cca Binary files /dev/null and b/.config/awesome/themes/blackburn/icons/square_sel.png differ diff --git a/.config/awesome/themes/blackburn/icons/square_unsel.png b/.config/awesome/themes/blackburn/icons/square_unsel.png new file mode 100755 index 0000000..dd8064d Binary files /dev/null and b/.config/awesome/themes/blackburn/icons/square_unsel.png differ diff --git a/.config/awesome/themes/blackburn/icons/submenu.png b/.config/awesome/themes/blackburn/icons/submenu.png new file mode 100755 index 0000000..10ca014 Binary files /dev/null and b/.config/awesome/themes/blackburn/icons/submenu.png differ diff --git a/.config/awesome/themes/blackburn/icons/tile.png b/.config/awesome/themes/blackburn/icons/tile.png new file mode 100755 index 0000000..409141f Binary files /dev/null and b/.config/awesome/themes/blackburn/icons/tile.png differ diff --git a/.config/awesome/themes/blackburn/icons/tilebottom.png b/.config/awesome/themes/blackburn/icons/tilebottom.png new file mode 100755 index 0000000..de68e9c Binary files /dev/null and b/.config/awesome/themes/blackburn/icons/tilebottom.png differ diff --git a/.config/awesome/themes/blackburn/icons/tileleft.png b/.config/awesome/themes/blackburn/icons/tileleft.png new file mode 100755 index 0000000..c47e4ee Binary files /dev/null and b/.config/awesome/themes/blackburn/icons/tileleft.png differ diff --git a/.config/awesome/themes/blackburn/icons/tiletop.png b/.config/awesome/themes/blackburn/icons/tiletop.png new file mode 100755 index 0000000..c50abdf Binary files /dev/null and b/.config/awesome/themes/blackburn/icons/tiletop.png differ diff --git a/.config/awesome/themes/blackburn/icons/titlebar/close_focus.png b/.config/awesome/themes/blackburn/icons/titlebar/close_focus.png new file mode 100755 index 0000000..d0bc2e8 Binary files /dev/null and b/.config/awesome/themes/blackburn/icons/titlebar/close_focus.png differ diff --git a/.config/awesome/themes/blackburn/icons/titlebar/close_normal.png b/.config/awesome/themes/blackburn/icons/titlebar/close_normal.png new file mode 100755 index 0000000..f99db1a Binary files /dev/null and b/.config/awesome/themes/blackburn/icons/titlebar/close_normal.png differ diff --git a/.config/awesome/themes/blackburn/icons/titlebar/floating_focus_active.png b/.config/awesome/themes/blackburn/icons/titlebar/floating_focus_active.png new file mode 100755 index 0000000..1a0649f Binary files /dev/null and b/.config/awesome/themes/blackburn/icons/titlebar/floating_focus_active.png differ diff --git a/.config/awesome/themes/blackburn/icons/titlebar/floating_focus_inactive.png b/.config/awesome/themes/blackburn/icons/titlebar/floating_focus_inactive.png new file mode 100755 index 0000000..47f19f6 Binary files /dev/null and b/.config/awesome/themes/blackburn/icons/titlebar/floating_focus_inactive.png differ diff --git a/.config/awesome/themes/blackburn/icons/titlebar/floating_normal_active.png b/.config/awesome/themes/blackburn/icons/titlebar/floating_normal_active.png new file mode 100755 index 0000000..44b8dac Binary files /dev/null and b/.config/awesome/themes/blackburn/icons/titlebar/floating_normal_active.png differ diff --git a/.config/awesome/themes/blackburn/icons/titlebar/floating_normal_inactive.png b/.config/awesome/themes/blackburn/icons/titlebar/floating_normal_inactive.png new file mode 100755 index 0000000..98f7f1d Binary files /dev/null and b/.config/awesome/themes/blackburn/icons/titlebar/floating_normal_inactive.png differ diff --git a/.config/awesome/themes/blackburn/icons/titlebar/maximized_focus_active.png b/.config/awesome/themes/blackburn/icons/titlebar/maximized_focus_active.png new file mode 100755 index 0000000..eab9b37 Binary files /dev/null and b/.config/awesome/themes/blackburn/icons/titlebar/maximized_focus_active.png differ diff --git a/.config/awesome/themes/blackburn/icons/titlebar/maximized_focus_inactive.png b/.config/awesome/themes/blackburn/icons/titlebar/maximized_focus_inactive.png new file mode 100755 index 0000000..bce1d00 Binary files /dev/null and b/.config/awesome/themes/blackburn/icons/titlebar/maximized_focus_inactive.png differ diff --git a/.config/awesome/themes/blackburn/icons/titlebar/maximized_normal_active.png b/.config/awesome/themes/blackburn/icons/titlebar/maximized_normal_active.png new file mode 100755 index 0000000..4f03984 Binary files /dev/null and b/.config/awesome/themes/blackburn/icons/titlebar/maximized_normal_active.png differ diff --git a/.config/awesome/themes/blackburn/icons/titlebar/maximized_normal_inactive.png b/.config/awesome/themes/blackburn/icons/titlebar/maximized_normal_inactive.png new file mode 100755 index 0000000..2e56d32 Binary files /dev/null and b/.config/awesome/themes/blackburn/icons/titlebar/maximized_normal_inactive.png differ diff --git a/.config/awesome/themes/blackburn/icons/titlebar/ontop_focus_active.png b/.config/awesome/themes/blackburn/icons/titlebar/ontop_focus_active.png new file mode 100755 index 0000000..42a9770 Binary files /dev/null and b/.config/awesome/themes/blackburn/icons/titlebar/ontop_focus_active.png differ diff --git a/.config/awesome/themes/blackburn/icons/titlebar/ontop_focus_inactive.png b/.config/awesome/themes/blackburn/icons/titlebar/ontop_focus_inactive.png new file mode 100755 index 0000000..2f3a2be Binary files /dev/null and b/.config/awesome/themes/blackburn/icons/titlebar/ontop_focus_inactive.png differ diff --git a/.config/awesome/themes/blackburn/icons/titlebar/ontop_normal_active.png b/.config/awesome/themes/blackburn/icons/titlebar/ontop_normal_active.png new file mode 100755 index 0000000..499dfbf Binary files /dev/null and b/.config/awesome/themes/blackburn/icons/titlebar/ontop_normal_active.png differ diff --git a/.config/awesome/themes/blackburn/icons/titlebar/ontop_normal_inactive.png b/.config/awesome/themes/blackburn/icons/titlebar/ontop_normal_inactive.png new file mode 100755 index 0000000..a9a3206 Binary files /dev/null and b/.config/awesome/themes/blackburn/icons/titlebar/ontop_normal_inactive.png differ diff --git a/.config/awesome/themes/blackburn/icons/titlebar/sticky_focus_active.png b/.config/awesome/themes/blackburn/icons/titlebar/sticky_focus_active.png new file mode 100755 index 0000000..72864ac Binary files /dev/null and b/.config/awesome/themes/blackburn/icons/titlebar/sticky_focus_active.png differ diff --git a/.config/awesome/themes/blackburn/icons/titlebar/sticky_focus_inactive.png b/.config/awesome/themes/blackburn/icons/titlebar/sticky_focus_inactive.png new file mode 100755 index 0000000..5493d8e Binary files /dev/null and b/.config/awesome/themes/blackburn/icons/titlebar/sticky_focus_inactive.png differ diff --git a/.config/awesome/themes/blackburn/icons/titlebar/sticky_normal_active.png b/.config/awesome/themes/blackburn/icons/titlebar/sticky_normal_active.png new file mode 100755 index 0000000..a150154 Binary files /dev/null and b/.config/awesome/themes/blackburn/icons/titlebar/sticky_normal_active.png differ diff --git a/.config/awesome/themes/blackburn/icons/titlebar/sticky_normal_inactive.png b/.config/awesome/themes/blackburn/icons/titlebar/sticky_normal_inactive.png new file mode 100755 index 0000000..7e6c99b Binary files /dev/null and b/.config/awesome/themes/blackburn/icons/titlebar/sticky_normal_inactive.png differ diff --git a/.config/awesome/themes/blackburn/theme.lua b/.config/awesome/themes/blackburn/theme.lua new file mode 100755 index 0000000..15ef692 --- /dev/null +++ b/.config/awesome/themes/blackburn/theme.lua @@ -0,0 +1,278 @@ +--[[ + + Blackburn Awesome WM theme 3.0 + github.com/lcpz + +--]] + +local gears = require("gears") +local lain = require("lain") +local awful = require("awful") +local wibox = require("wibox") +local dpi = require("beautiful.xresources").apply_dpi + +local os = os +local my_table = awful.util.table or gears.table -- 4.{0,1} compatibility + +local theme = {} +theme.dir = os.getenv("HOME") .. "/.config/awesome/themes/blackburn" +theme.wallpaper = theme.dir .. "/wall.png" +theme.font = "Terminus 10.5" +theme.taglist_font = "Icons 10" +theme.fg_normal = "#D7D7D7" +theme.fg_focus = "#F6784F" +theme.bg_normal = "#060606" +theme.bg_focus = "#060606" +theme.fg_urgent = "#CC9393" +theme.bg_urgent = "#2A1F1E" +theme.border_width = dpi(1) +theme.border_normal = "#0E0E0E" +theme.border_focus = "#F79372" +theme.taglist_fg_focus = "#F6784F" +theme.taglist_bg_focus = "#060606" +theme.tasklist_fg_focus = "#F6784F" +theme.tasklist_bg_focus = "#060606" +theme.menu_height = dpi(16) +theme.menu_width = dpi(130) +theme.menu_submenu_icon = theme.dir .. "/icons/submenu.png" +theme.awesome_icon = theme.dir .."/icons/awesome.png" +theme.taglist_squares_sel = theme.dir .. "/icons/square_sel.png" +theme.taglist_squares_unsel = theme.dir .. "/icons/square_unsel.png" +theme.layout_tile = theme.dir .. "/icons/tile.png" +theme.layout_tileleft = theme.dir .. "/icons/tileleft.png" +theme.layout_tilebottom = theme.dir .. "/icons/tilebottom.png" +theme.layout_tiletop = theme.dir .. "/icons/tiletop.png" +theme.layout_fairv = theme.dir .. "/icons/fairv.png" +theme.layout_fairh = theme.dir .. "/icons/fairh.png" +theme.layout_spiral = theme.dir .. "/icons/spiral.png" +theme.layout_dwindle = theme.dir .. "/icons/dwindle.png" +theme.layout_max = theme.dir .. "/icons/max.png" +theme.layout_fullscreen = theme.dir .. "/icons/fullscreen.png" +theme.layout_magnifier = theme.dir .. "/icons/magnifier.png" +theme.layout_floating = theme.dir .. "/icons/floating.png" +theme.tasklist_plain_task_name = true +theme.tasklist_disable_icon = true +theme.useless_gap = 0 +theme.titlebar_close_button_focus = theme.dir .. "/icons/titlebar/close_focus.png" +theme.titlebar_close_button_normal = theme.dir .. "/icons/titlebar/close_normal.png" +theme.titlebar_ontop_button_focus_active = theme.dir .. "/icons/titlebar/ontop_focus_active.png" +theme.titlebar_ontop_button_normal_active = theme.dir .. "/icons/titlebar/ontop_normal_active.png" +theme.titlebar_ontop_button_focus_inactive = theme.dir .. "/icons/titlebar/ontop_focus_inactive.png" +theme.titlebar_ontop_button_normal_inactive = theme.dir .. "/icons/titlebar/ontop_normal_inactive.png" +theme.titlebar_sticky_button_focus_active = theme.dir .. "/icons/titlebar/sticky_focus_active.png" +theme.titlebar_sticky_button_normal_active = theme.dir .. "/icons/titlebar/sticky_normal_active.png" +theme.titlebar_sticky_button_focus_inactive = theme.dir .. "/icons/titlebar/sticky_focus_inactive.png" +theme.titlebar_sticky_button_normal_inactive = theme.dir .. "/icons/titlebar/sticky_normal_inactive.png" +theme.titlebar_floating_button_focus_active = theme.dir .. "/icons/titlebar/floating_focus_active.png" +theme.titlebar_floating_button_normal_active = theme.dir .. "/icons/titlebar/floating_normal_active.png" +theme.titlebar_floating_button_focus_inactive = theme.dir .. "/icons/titlebar/floating_focus_inactive.png" +theme.titlebar_floating_button_normal_inactive = theme.dir .. "/icons/titlebar/floating_normal_inactive.png" +theme.titlebar_maximized_button_focus_active = theme.dir .. "/icons/titlebar/maximized_focus_active.png" +theme.titlebar_maximized_button_normal_active = theme.dir .. "/icons/titlebar/maximized_normal_active.png" +theme.titlebar_maximized_button_focus_inactive = theme.dir .. "/icons/titlebar/maximized_focus_inactive.png" +theme.titlebar_maximized_button_normal_inactive = theme.dir .. "/icons/titlebar/maximized_normal_inactive.png" + +awful.util.tagnames = { "ƀ", "Ƅ", "Ɗ", "ƈ", "ƙ" } + +local markup = lain.util.markup +local separators = lain.util.separators +local gray = "#9E9C9A" + +-- Textclock +local mytextclock = wibox.widget.textclock(" %H:%M ") +mytextclock.font = theme.font + +-- Calendar +theme.cal = lain.widget.cal({ + attach_to = { mytextclock }, + notification_preset = { + font = "Terminus 11", + fg = theme.fg_normal, + bg = theme.bg_normal + } +}) + +-- Mail IMAP check +--[[ to be set before use +theme.mail = lain.widget.imap({ + timeout = 180, + server = "server", + mail = "mail", + password = "keyring get mail", + notification_preset = { fg = white } + settings = function() + mail = "" + count = "" + + if mailcount > 0 then + mail = "Mail " + count = mailcount .. " " + end + + widget:set_markup(markup.font(theme.font, markup(gray, mail) .. count)) + end +}) +--]] + +-- MPD +theme.mpd = lain.widget.mpd({ + settings = function() + mpd_notification_preset.fg = white + artist = mpd_now.artist .. " " + title = mpd_now.title .. " " + + if mpd_now.state == "pause" then + artist = "mpd " + title = "paused " + elseif mpd_now.state == "stop" then + artist = "" + title = "" + end + + widget:set_markup(markup.font(theme.font, markup(gray, artist) .. title .. " ")) + end +}) + +-- /home fs +--[[ commented because it needs Gio/Glib >= 2.54 +theme.fs = lain.widget.fs({ + notification_preset = { fg = white, bg = theme.bg_normal, font = "Terminus 10.5" }, + settings = function() + fs_header = "" + fs_p = "" + + if fs_now["/home"].percentage >= 90 then + fs_header = " Hdd " + fs_p = fs_now["/home"].percentage + end + + widget:set_markup(markup.font(theme.font, markup(gray, fs_header) .. fs_p)) + end +}) +--]] + +-- Battery +local bat = lain.widget.bat({ + settings = function() + bat_header = " Bat " + bat_p = bat_now.perc .. " " + widget:set_markup(markup.font(theme.font, markup(gray, bat_header) .. bat_p)) + end +}) + +-- ALSA volume +theme.volume = lain.widget.alsa({ + --togglechannel = "IEC958,3", + settings = function() + header = " Vol " + vlevel = volume_now.level + + if volume_now.status == "off" then + vlevel = vlevel .. "M " + else + vlevel = vlevel .. " " + end + + widget:set_markup(markup.font(theme.font, markup(gray, header) .. vlevel)) + end +}) + +-- Weather +--[[ to be set before use +theme.weather = lain.widget.weather({ + --APPID = + city_id = 2643743, -- placeholder (London) + settings = function() + units = math.floor(weather_now["main"]["temp"]) + widget:set_markup(" " .. units .. " ") + end +}) +--]] + +-- Separators +local first = wibox.widget.textbox(' ') +local arrl_pre = separators.arrow_right("alpha", "#1A1A1A") +local arrl_post = separators.arrow_right("#1A1A1A", "alpha") + +local barheight = dpi(18) +local barcolor = gears.color({ + type = "linear", + from = { barheight, 0 }, + to = { barheight, barheight }, + stops = { {0, theme.bg_focus }, {0.8, theme.border_normal}, {1, "#1A1A1A"} } +}) +theme.titlebar_bg = barcolor + +theme.titlebar_bg_focus = gears.color({ + type = "linear", + from = { barheight, 0 }, + to = { barheight, barheight }, + stops = { {0, theme.bg_normal}, {0.5, theme.border_normal}, {1, "#492417"} } +}) + +function theme.at_screen_connect(s) + -- Quake application + s.quake = lain.util.quake({ app = awful.util.terminal }) + + -- If wallpaper is a function, call it with the screen + local wallpaper = theme.wallpaper + if type(wallpaper) == "function" then + wallpaper = wallpaper(s) + end + gears.wallpaper.maximized(wallpaper, s, true) + + -- Tags + awful.tag(awful.util.tagnames, s, awful.layout.layouts[1]) + + -- Create a promptbox for each screen + s.mypromptbox = awful.widget.prompt() + -- Create an imagebox widget which will contains an icon indicating which layout we're using. + -- We need one layoutbox per screen. + s.mylayoutbox = awful.widget.layoutbox(s) + s.mylayoutbox:buttons(my_table.join( + awful.button({}, 1, function () awful.layout.inc( 1) end), + awful.button({}, 2, function () awful.layout.set( awful.layout.layouts[1] ) end), + awful.button({}, 3, function () awful.layout.inc(-1) end), + awful.button({}, 4, function () awful.layout.inc( 1) end), + awful.button({}, 5, function () awful.layout.inc(-1) end))) + + -- Create a taglist widget + s.mytaglist = awful.widget.taglist(s, awful.widget.taglist.filter.all, awful.util.taglist_buttons) + + -- Create a tasklist widget + s.mytasklist = awful.widget.tasklist(s, awful.widget.tasklist.filter.currenttags, awful.util.tasklist_buttons, { bg_normal = barcolor, bg_focus = barcolor }) + + -- Create the wibox + s.mywibox = awful.wibar({ position = "top", screen = s, height = dpi(18), bg = barcolor }) + + -- Add widgets to the wibox + s.mywibox:setup { + layout = wibox.layout.align.horizontal, + { -- Left widgets + layout = wibox.layout.fixed.horizontal, + first, + s.mytaglist, + arrl_pre, + s.mylayoutbox, + arrl_post, + s.mypromptbox, + first, + }, + s.mytasklist, -- Middle widget + { -- Right widgets + layout = wibox.layout.fixed.horizontal, + wibox.widget.systray(), + first, + theme.mpd.widget, + --theme.mail.widget, + --theme.weather.icon, + --theme.weather.widget, + --theme.fs.widget, + bat, + theme.volume.widget, + mytextclock, + }, + } +end + +return theme diff --git a/.config/awesome/themes/blackburn/wall.png b/.config/awesome/themes/blackburn/wall.png new file mode 100755 index 0000000..6774d91 Binary files /dev/null and b/.config/awesome/themes/blackburn/wall.png differ diff --git a/.config/awesome/themes/copland/icons/ac.png b/.config/awesome/themes/copland/icons/ac.png new file mode 100755 index 0000000..4b00cd1 Binary files /dev/null and b/.config/awesome/themes/copland/icons/ac.png differ diff --git a/.config/awesome/themes/copland/icons/awesome.png b/.config/awesome/themes/copland/icons/awesome.png new file mode 100755 index 0000000..b24e00d Binary files /dev/null and b/.config/awesome/themes/copland/icons/awesome.png differ diff --git a/.config/awesome/themes/copland/icons/bat.png b/.config/awesome/themes/copland/icons/bat.png new file mode 100755 index 0000000..4ea9b2b Binary files /dev/null and b/.config/awesome/themes/copland/icons/bat.png differ diff --git a/.config/awesome/themes/copland/icons/bat_low.png b/.config/awesome/themes/copland/icons/bat_low.png new file mode 100755 index 0000000..c198675 Binary files /dev/null and b/.config/awesome/themes/copland/icons/bat_low.png differ diff --git a/.config/awesome/themes/copland/icons/bat_no.png b/.config/awesome/themes/copland/icons/bat_no.png new file mode 100755 index 0000000..5cf536f Binary files /dev/null and b/.config/awesome/themes/copland/icons/bat_no.png differ diff --git a/.config/awesome/themes/copland/icons/centerfair.png b/.config/awesome/themes/copland/icons/centerfair.png new file mode 100755 index 0000000..185d5e1 Binary files /dev/null and b/.config/awesome/themes/copland/icons/centerfair.png differ diff --git a/.config/awesome/themes/copland/icons/centerwork.png b/.config/awesome/themes/copland/icons/centerwork.png new file mode 100755 index 0000000..49d5a11 Binary files /dev/null and b/.config/awesome/themes/copland/icons/centerwork.png differ diff --git a/.config/awesome/themes/copland/icons/disk.png b/.config/awesome/themes/copland/icons/disk.png new file mode 100755 index 0000000..3ccd728 Binary files /dev/null and b/.config/awesome/themes/copland/icons/disk.png differ diff --git a/.config/awesome/themes/copland/icons/dwindle.png b/.config/awesome/themes/copland/icons/dwindle.png new file mode 100755 index 0000000..55b61b0 Binary files /dev/null and b/.config/awesome/themes/copland/icons/dwindle.png differ diff --git a/.config/awesome/themes/copland/icons/fairh.png b/.config/awesome/themes/copland/icons/fairh.png new file mode 100755 index 0000000..848f5a8 Binary files /dev/null and b/.config/awesome/themes/copland/icons/fairh.png differ diff --git a/.config/awesome/themes/copland/icons/fairv.png b/.config/awesome/themes/copland/icons/fairv.png new file mode 100755 index 0000000..610eb7b Binary files /dev/null and b/.config/awesome/themes/copland/icons/fairv.png differ diff --git a/.config/awesome/themes/copland/icons/floating.png b/.config/awesome/themes/copland/icons/floating.png new file mode 100755 index 0000000..d8ce00a Binary files /dev/null and b/.config/awesome/themes/copland/icons/floating.png differ diff --git a/.config/awesome/themes/copland/icons/fullscreen.png b/.config/awesome/themes/copland/icons/fullscreen.png new file mode 100755 index 0000000..feb44d1 Binary files /dev/null and b/.config/awesome/themes/copland/icons/fullscreen.png differ diff --git a/.config/awesome/themes/copland/icons/magnifier.png b/.config/awesome/themes/copland/icons/magnifier.png new file mode 100755 index 0000000..49616bc Binary files /dev/null and b/.config/awesome/themes/copland/icons/magnifier.png differ diff --git a/.config/awesome/themes/copland/icons/max.png b/.config/awesome/themes/copland/icons/max.png new file mode 100755 index 0000000..3f4bdec Binary files /dev/null and b/.config/awesome/themes/copland/icons/max.png differ diff --git a/.config/awesome/themes/copland/icons/pause.png b/.config/awesome/themes/copland/icons/pause.png new file mode 100755 index 0000000..381e532 Binary files /dev/null and b/.config/awesome/themes/copland/icons/pause.png differ diff --git a/.config/awesome/themes/copland/icons/play.png b/.config/awesome/themes/copland/icons/play.png new file mode 100755 index 0000000..05ad253 Binary files /dev/null and b/.config/awesome/themes/copland/icons/play.png differ diff --git a/.config/awesome/themes/copland/icons/spiral.png b/.config/awesome/themes/copland/icons/spiral.png new file mode 100755 index 0000000..664afb4 Binary files /dev/null and b/.config/awesome/themes/copland/icons/spiral.png differ diff --git a/.config/awesome/themes/copland/icons/square_sel.png b/.config/awesome/themes/copland/icons/square_sel.png new file mode 100755 index 0000000..58b58f2 Binary files /dev/null and b/.config/awesome/themes/copland/icons/square_sel.png differ diff --git a/.config/awesome/themes/copland/icons/square_unsel.png b/.config/awesome/themes/copland/icons/square_unsel.png new file mode 100755 index 0000000..40411f4 Binary files /dev/null and b/.config/awesome/themes/copland/icons/square_unsel.png differ diff --git a/.config/awesome/themes/copland/icons/stop.png b/.config/awesome/themes/copland/icons/stop.png new file mode 100755 index 0000000..b01b75e Binary files /dev/null and b/.config/awesome/themes/copland/icons/stop.png differ diff --git a/.config/awesome/themes/copland/icons/submenu.png b/.config/awesome/themes/copland/icons/submenu.png new file mode 100755 index 0000000..10ed739 Binary files /dev/null and b/.config/awesome/themes/copland/icons/submenu.png differ diff --git a/.config/awesome/themes/copland/icons/termfair.png b/.config/awesome/themes/copland/icons/termfair.png new file mode 100755 index 0000000..9cfb636 Binary files /dev/null and b/.config/awesome/themes/copland/icons/termfair.png differ diff --git a/.config/awesome/themes/copland/icons/tile.png b/.config/awesome/themes/copland/icons/tile.png new file mode 100755 index 0000000..890e354 Binary files /dev/null and b/.config/awesome/themes/copland/icons/tile.png differ diff --git a/.config/awesome/themes/copland/icons/tilebottom.png b/.config/awesome/themes/copland/icons/tilebottom.png new file mode 100755 index 0000000..aac4302 Binary files /dev/null and b/.config/awesome/themes/copland/icons/tilebottom.png differ diff --git a/.config/awesome/themes/copland/icons/tileleft.png b/.config/awesome/themes/copland/icons/tileleft.png new file mode 100755 index 0000000..c87a32f Binary files /dev/null and b/.config/awesome/themes/copland/icons/tileleft.png differ diff --git a/.config/awesome/themes/copland/icons/tiletop.png b/.config/awesome/themes/copland/icons/tiletop.png new file mode 100755 index 0000000..89f7f8d Binary files /dev/null and b/.config/awesome/themes/copland/icons/tiletop.png differ diff --git a/.config/awesome/themes/copland/icons/titlebar/close_focus.png b/.config/awesome/themes/copland/icons/titlebar/close_focus.png new file mode 100755 index 0000000..c1fa3ad Binary files /dev/null and b/.config/awesome/themes/copland/icons/titlebar/close_focus.png differ diff --git a/.config/awesome/themes/copland/icons/titlebar/close_normal.png b/.config/awesome/themes/copland/icons/titlebar/close_normal.png new file mode 100755 index 0000000..77cd8eb Binary files /dev/null and b/.config/awesome/themes/copland/icons/titlebar/close_normal.png differ diff --git a/.config/awesome/themes/copland/icons/titlebar/floating_focus_active.png b/.config/awesome/themes/copland/icons/titlebar/floating_focus_active.png new file mode 100755 index 0000000..8fcf336 Binary files /dev/null and b/.config/awesome/themes/copland/icons/titlebar/floating_focus_active.png differ diff --git a/.config/awesome/themes/copland/icons/titlebar/floating_focus_inactive.png b/.config/awesome/themes/copland/icons/titlebar/floating_focus_inactive.png new file mode 100755 index 0000000..47f19f6 Binary files /dev/null and b/.config/awesome/themes/copland/icons/titlebar/floating_focus_inactive.png differ diff --git a/.config/awesome/themes/copland/icons/titlebar/floating_normal_active.png b/.config/awesome/themes/copland/icons/titlebar/floating_normal_active.png new file mode 100755 index 0000000..df17970 Binary files /dev/null and b/.config/awesome/themes/copland/icons/titlebar/floating_normal_active.png differ diff --git a/.config/awesome/themes/copland/icons/titlebar/floating_normal_inactive.png b/.config/awesome/themes/copland/icons/titlebar/floating_normal_inactive.png new file mode 100755 index 0000000..98f7f1d Binary files /dev/null and b/.config/awesome/themes/copland/icons/titlebar/floating_normal_inactive.png differ diff --git a/.config/awesome/themes/copland/icons/titlebar/maximized_focus_active.png b/.config/awesome/themes/copland/icons/titlebar/maximized_focus_active.png new file mode 100755 index 0000000..96e8937 Binary files /dev/null and b/.config/awesome/themes/copland/icons/titlebar/maximized_focus_active.png differ diff --git a/.config/awesome/themes/copland/icons/titlebar/maximized_focus_inactive.png b/.config/awesome/themes/copland/icons/titlebar/maximized_focus_inactive.png new file mode 100755 index 0000000..bce1d00 Binary files /dev/null and b/.config/awesome/themes/copland/icons/titlebar/maximized_focus_inactive.png differ diff --git a/.config/awesome/themes/copland/icons/titlebar/maximized_normal_active.png b/.config/awesome/themes/copland/icons/titlebar/maximized_normal_active.png new file mode 100755 index 0000000..6ce0b10 Binary files /dev/null and b/.config/awesome/themes/copland/icons/titlebar/maximized_normal_active.png differ diff --git a/.config/awesome/themes/copland/icons/titlebar/maximized_normal_inactive.png b/.config/awesome/themes/copland/icons/titlebar/maximized_normal_inactive.png new file mode 100755 index 0000000..2e56d32 Binary files /dev/null and b/.config/awesome/themes/copland/icons/titlebar/maximized_normal_inactive.png differ diff --git a/.config/awesome/themes/copland/icons/titlebar/ontop_focus_active.png b/.config/awesome/themes/copland/icons/titlebar/ontop_focus_active.png new file mode 100755 index 0000000..d206ea4 Binary files /dev/null and b/.config/awesome/themes/copland/icons/titlebar/ontop_focus_active.png differ diff --git a/.config/awesome/themes/copland/icons/titlebar/ontop_focus_inactive.png b/.config/awesome/themes/copland/icons/titlebar/ontop_focus_inactive.png new file mode 100755 index 0000000..2f3a2be Binary files /dev/null and b/.config/awesome/themes/copland/icons/titlebar/ontop_focus_inactive.png differ diff --git a/.config/awesome/themes/copland/icons/titlebar/ontop_normal_active.png b/.config/awesome/themes/copland/icons/titlebar/ontop_normal_active.png new file mode 100755 index 0000000..9a26d34 Binary files /dev/null and b/.config/awesome/themes/copland/icons/titlebar/ontop_normal_active.png differ diff --git a/.config/awesome/themes/copland/icons/titlebar/ontop_normal_inactive.png b/.config/awesome/themes/copland/icons/titlebar/ontop_normal_inactive.png new file mode 100755 index 0000000..a9a3206 Binary files /dev/null and b/.config/awesome/themes/copland/icons/titlebar/ontop_normal_inactive.png differ diff --git a/.config/awesome/themes/copland/icons/titlebar/sticky_focus_active.png b/.config/awesome/themes/copland/icons/titlebar/sticky_focus_active.png new file mode 100755 index 0000000..7e360db Binary files /dev/null and b/.config/awesome/themes/copland/icons/titlebar/sticky_focus_active.png differ diff --git a/.config/awesome/themes/copland/icons/titlebar/sticky_focus_inactive.png b/.config/awesome/themes/copland/icons/titlebar/sticky_focus_inactive.png new file mode 100755 index 0000000..5493d8e Binary files /dev/null and b/.config/awesome/themes/copland/icons/titlebar/sticky_focus_inactive.png differ diff --git a/.config/awesome/themes/copland/icons/titlebar/sticky_normal_active.png b/.config/awesome/themes/copland/icons/titlebar/sticky_normal_active.png new file mode 100755 index 0000000..a06138d Binary files /dev/null and b/.config/awesome/themes/copland/icons/titlebar/sticky_normal_active.png differ diff --git a/.config/awesome/themes/copland/icons/titlebar/sticky_normal_inactive.png b/.config/awesome/themes/copland/icons/titlebar/sticky_normal_inactive.png new file mode 100755 index 0000000..7e6c99b Binary files /dev/null and b/.config/awesome/themes/copland/icons/titlebar/sticky_normal_inactive.png differ diff --git a/.config/awesome/themes/copland/icons/vol.png b/.config/awesome/themes/copland/icons/vol.png new file mode 100755 index 0000000..847d575 Binary files /dev/null and b/.config/awesome/themes/copland/icons/vol.png differ diff --git a/.config/awesome/themes/copland/icons/vol_low.png b/.config/awesome/themes/copland/icons/vol_low.png new file mode 100755 index 0000000..54d653e Binary files /dev/null and b/.config/awesome/themes/copland/icons/vol_low.png differ diff --git a/.config/awesome/themes/copland/icons/vol_mute.png b/.config/awesome/themes/copland/icons/vol_mute.png new file mode 100755 index 0000000..361412d Binary files /dev/null and b/.config/awesome/themes/copland/icons/vol_mute.png differ diff --git a/.config/awesome/themes/copland/icons/vol_no.png b/.config/awesome/themes/copland/icons/vol_no.png new file mode 100755 index 0000000..06d1a97 Binary files /dev/null and b/.config/awesome/themes/copland/icons/vol_no.png differ diff --git a/.config/awesome/themes/copland/theme.lua b/.config/awesome/themes/copland/theme.lua new file mode 100755 index 0000000..56a25d6 --- /dev/null +++ b/.config/awesome/themes/copland/theme.lua @@ -0,0 +1,375 @@ +--[[ + + Copland Awesome WM theme 2.0 + github.com/lcpz + +--]] + +local gears = require("gears") +local lain = require("lain") +local awful = require("awful") +local wibox = require("wibox") +local dpi = require("beautiful.xresources").apply_dpi + +local awesome, client, os = awesome, client, os +local my_table = awful.util.table or gears.table -- 4.{0,1} compatibility + +local theme = {} +theme.dir = os.getenv("HOME") .. "/.config/awesome/themes/copland" +theme.wallpaper = theme.dir .. "/wall.png" +theme.font = "Terminus 10.5" +theme.fg_normal = "#BBBBBB" +theme.fg_focus = "#78A4FF" +theme.bg_normal = "#111111" +theme.bg_focus = "#111111" +theme.fg_urgent = "#000000" +theme.bg_urgent = "#FFFFFF" +theme.border_width = dpi(1) +theme.border_normal = "#141414" +theme.border_focus = "#93B6FF" +theme.taglist_fg_focus = "#FFFFFF" +theme.taglist_bg_focus = "#111111" +theme.taglist_bg_normal = "#111111" +theme.titlebar_bg_normal = "#191919" +theme.titlebar_bg_focus = "#262626" +theme.menu_height = dpi(16) +theme.menu_width = dpi(130) +theme.tasklist_disable_icon = true +theme.awesome_icon = theme.dir .."/icons/awesome.png" +theme.menu_submenu_icon = theme.dir .. "/icons/submenu.png" +theme.taglist_squares_sel = theme.dir .. "/icons/square_unsel.png" +theme.taglist_squares_unsel = theme.dir .. "/icons/square_unsel.png" +theme.vol = theme.dir .. "/icons/vol.png" +theme.vol_low = theme.dir .. "/icons/vol_low.png" +theme.vol_no = theme.dir .. "/icons/vol_no.png" +theme.vol_mute = theme.dir .. "/icons/vol_mute.png" +theme.disk = theme.dir .. "/icons/disk.png" +theme.ac = theme.dir .. "/icons/ac.png" +theme.bat = theme.dir .. "/icons/bat.png" +theme.bat_low = theme.dir .. "/icons/bat_low.png" +theme.bat_no = theme.dir .. "/icons/bat_no.png" +theme.play = theme.dir .. "/icons/play.png" +theme.pause = theme.dir .. "/icons/pause.png" +theme.stop = theme.dir .. "/icons/stop.png" +theme.layout_tile = theme.dir .. "/icons/tile.png" +theme.layout_tileleft = theme.dir .. "/icons/tileleft.png" +theme.layout_tilebottom = theme.dir .. "/icons/tilebottom.png" +theme.layout_tiletop = theme.dir .. "/icons/tiletop.png" +theme.layout_fairv = theme.dir .. "/icons/fairv.png" +theme.layout_fairh = theme.dir .. "/icons/fairh.png" +theme.layout_spiral = theme.dir .. "/icons/spiral.png" +theme.layout_dwindle = theme.dir .. "/icons/dwindle.png" +theme.layout_max = theme.dir .. "/icons/max.png" +theme.layout_fullscreen = theme.dir .. "/icons/fullscreen.png" +theme.layout_magnifier = theme.dir .. "/icons/magnifier.png" +theme.layout_floating = theme.dir .. "/icons/floating.png" +theme.useless_gap = 0 +theme.titlebar_close_button_focus = theme.dir .. "/icons/titlebar/close_focus.png" +theme.titlebar_close_button_normal = theme.dir .. "/icons/titlebar/close_normal.png" +theme.titlebar_ontop_button_focus_active = theme.dir .. "/icons/titlebar/ontop_focus_active.png" +theme.titlebar_ontop_button_normal_active = theme.dir .. "/icons/titlebar/ontop_normal_active.png" +theme.titlebar_ontop_button_focus_inactive = theme.dir .. "/icons/titlebar/ontop_focus_inactive.png" +theme.titlebar_ontop_button_normal_inactive = theme.dir .. "/icons/titlebar/ontop_normal_inactive.png" +theme.titlebar_sticky_button_focus_active = theme.dir .. "/icons/titlebar/sticky_focus_active.png" +theme.titlebar_sticky_button_normal_active = theme.dir .. "/icons/titlebar/sticky_normal_active.png" +theme.titlebar_sticky_button_focus_inactive = theme.dir .. "/icons/titlebar/sticky_focus_inactive.png" +theme.titlebar_sticky_button_normal_inactive = theme.dir .. "/icons/titlebar/sticky_normal_inactive.png" +theme.titlebar_floating_button_focus_active = theme.dir .. "/icons/titlebar/floating_focus_active.png" +theme.titlebar_floating_button_normal_active = theme.dir .. "/icons/titlebar/floating_normal_active.png" +theme.titlebar_floating_button_focus_inactive = theme.dir .. "/icons/titlebar/floating_focus_inactive.png" +theme.titlebar_floating_button_normal_inactive = theme.dir .. "/icons/titlebar/floating_normal_inactive.png" +theme.titlebar_maximized_button_focus_active = theme.dir .. "/icons/titlebar/maximized_focus_active.png" +theme.titlebar_maximized_button_normal_active = theme.dir .. "/icons/titlebar/maximized_normal_active.png" +theme.titlebar_maximized_button_focus_inactive = theme.dir .. "/icons/titlebar/maximized_focus_inactive.png" +theme.titlebar_maximized_button_normal_inactive = theme.dir .. "/icons/titlebar/maximized_normal_inactive.png" + +-- lain related +theme.layout_centerfair = theme.dir .. "/icons/centerfair.png" +theme.layout_termfair = theme.dir .. "/icons/termfair.png" +theme.layout_centerwork = theme.dir .. "/icons/centerwork.png" + +local markup = lain.util.markup +local blue = theme.fg_focus +local red = "#EB8F8F" +local green = "#8FEB8F" + +-- Textclock +--os.setlocale(os.getenv("LANG")) -- to localize the clock +local mytextclock = wibox.widget.textclock(" %H:%M ") +mytextclock.font = theme.font + +-- Calendar +theme.cal = lain.widget.cal({ + attach_to = { mytextclock }, + notification_preset = { + font = "Terminus 11", + fg = theme.fg_normal, + bg = theme.bg_normal + } +}) + +-- Mail IMAP check +--[[ to be set before use +theme.mail = lain.widget.imap({ + timeout = 180, + server = "server", + mail = "mail", + password = "keyring get mail", + settings = function() + mail = "" + count = "" + + if mailcount > 0 then + mail = " Mail " + count = mailcount .. " " + end + + widget:set_markup(markup(blue, mail) .. count) + end +}) +--]] + +-- MPD +local mpdicon = wibox.widget.imagebox() +theme.mpd = lain.widget.mpd({ + settings = function() + if mpd_now.state == "play" then + title = mpd_now.title + artist = " " .. mpd_now.artist .. markup("#777777", " | ") + mpdicon:set_image(theme.play) + elseif mpd_now.state == "pause" then + title = "mpd " + artist = "paused" .. markup("#777777", " | ") + mpdicon:set_image(theme.pause) + else + title = "" + artist = "" + mpdicon._private.image = nil + mpdicon:emit_signal("widget::redraw_needed") + mpdicon:emit_signal("widget::layout_changed") + end + + widget:set_markup(markup.font(theme.font, markup(blue, title) .. artist)) + end +}) + +-- Battery +local baticon = wibox.widget.imagebox(theme.bat) +local batbar = wibox.widget { + forced_height = dpi(1), + forced_width = dpi(59), + color = theme.fg_normal, + background_color = theme.bg_normal, + margins = 1, + paddings = 1, + ticks = true, + ticks_size = dpi(6), + widget = wibox.widget.progressbar, +} +local batupd = lain.widget.bat({ + settings = function() + if (not bat_now.status) or bat_now.status == "N/A" or type(bat_now.perc) ~= "number" then return end + + if bat_now.status == "Charging" then + baticon:set_image(theme.ac) + if bat_now.perc >= 98 then + batbar:set_color(green) + elseif bat_now.perc > 50 then + batbar:set_color(theme.fg_normal) + elseif bat_now.perc > 15 then + batbar:set_color(theme.fg_normal) + else + batbar:set_color(red) + end + else + if bat_now.perc >= 98 then + batbar:set_color(green) + elseif bat_now.perc > 50 then + batbar:set_color(theme.fg_normal) + baticon:set_image(theme.bat) + elseif bat_now.perc > 15 then + batbar:set_color(theme.fg_normal) + baticon:set_image(theme.bat_low) + else + batbar:set_color(red) + baticon:set_image(theme.bat_no) + end + end + batbar:set_value(bat_now.perc / 100) + end +}) +local batbg = wibox.container.background(batbar, "#474747", gears.shape.rectangle) +local batwidget = wibox.container.margin(batbg, dpi(2), dpi(7), dpi(4), dpi(4)) + +-- /home fs +--[[ commented because it needs Gio/Glib >= 2.54 +local fsicon = wibox.widget.imagebox(theme.disk) +local fsbar = wibox.widget { + forced_height = dpi(1), + forced_width = dpi(59), + color = theme.fg_normal, + background_color = theme.bg_normal, + margins = 1, + paddings = 1, + ticks = true, + ticks_size = dpi(6), + widget = wibox.widget.progressbar, +} +theme.fs = lain.widget.fs { + notification_preset = { fg = theme.fg_normal, bg = theme.bg_normal, font = "Terminus 10.5" }, + settings = function() + if fs_now["/home"].percentage < 90 then + fsbar:set_color(theme.fg_normal) + else + fsbar:set_color("#EB8F8F") + end + fsbar:set_value(fs_now["/home"].percentage / 100) + end +} +local fsbg = wibox.container.background(fsbar, "#474747", gears.shape.rectangle) +local fswidget = wibox.container.margin(fsbg, dpi(2), dpi(7), dpi(4), dpi(4)) +--]] + +-- ALSA volume bar +local volicon = wibox.widget.imagebox(theme.vol) +theme.volume = lain.widget.alsabar { + width = dpi(59), border_width = 0, ticks = true, ticks_size = dpi(6), + notification_preset = { font = theme.font }, + --togglechannel = "IEC958,3", + settings = function() + if volume_now.status == "off" then + volicon:set_image(theme.vol_mute) + elseif volume_now.level == 0 then + volicon:set_image(theme.vol_no) + elseif volume_now.level <= 50 then + volicon:set_image(theme.vol_low) + else + volicon:set_image(theme.vol) + end + end, + colors = { + background = theme.bg_normal, + mute = red, + unmute = theme.fg_normal + } +} +theme.volume.tooltip.wibox.fg = theme.fg_focus +theme.volume.bar:buttons(my_table.join ( + awful.button({}, 1, function() + awful.spawn(string.format("%s -e alsamixer", awful.util.terminal)) + end), + awful.button({}, 2, function() + os.execute(string.format("%s set %s 100%%", theme.volume.cmd, theme.volume.channel)) + theme.volume.update() + end), + awful.button({}, 3, function() + os.execute(string.format("%s set %s toggle", theme.volume.cmd, theme.volume.togglechannel or theme.volume.channel)) + theme.volume.update() + end), + awful.button({}, 4, function() + os.execute(string.format("%s set %s 1%%+", theme.volume.cmd, theme.volume.channel)) + theme.volume.update() + end), + awful.button({}, 5, function() + os.execute(string.format("%s set %s 1%%-", theme.volume.cmd, theme.volume.channel)) + theme.volume.update() + end) +)) +local volumebg = wibox.container.background(theme.volume.bar, "#474747", gears.shape.rectangle) +local volumewidget = wibox.container.margin(volumebg, dpi(2), dpi(7), dpi(4), dpi(4)) + +-- Weather +--[[ to be set before use +theme.weather = lain.widget.weather({ + --APPID = + city_id = 2643743, -- placeholder (London) +}) +--]] + +-- Separators +local first = wibox.widget.textbox(markup.font("Terminus 3", " ")) +local spr = wibox.widget.textbox(' ') +local small_spr = wibox.widget.textbox(markup.font("Terminus 4", " ")) +local bar_spr = wibox.widget.textbox(markup.font("Terminus 3", " ") .. markup.fontfg(theme.font, "#777777", "|") .. markup.font("Terminus 5", " ")) + +-- Eminent-like task filtering +local orig_filter = awful.widget.taglist.filter.all + +-- Taglist label functions +awful.widget.taglist.filter.all = function (t, args) + if t.selected or #t:clients() > 0 then + return orig_filter(t, args) + end +end + +function theme.at_screen_connect(s) + -- Quake application + s.quake = lain.util.quake({ app = awful.util.terminal }) + + -- If wallpaper is a function, call it with the screen + local wallpaper = theme.wallpaper + if type(wallpaper) == "function" then + wallpaper = wallpaper(s) + end + gears.wallpaper.maximized(wallpaper, s, true) + + -- Tags + awful.tag(awful.util.tagnames, s, awful.layout.layouts[1]) + + -- Create a promptbox for each screen + s.mypromptbox = awful.widget.prompt() + -- Create an imagebox widget which will contains an icon indicating which layout we're using. + -- We need one layoutbox per screen. + s.mylayoutbox = awful.widget.layoutbox(s) + s.mylayoutbox:buttons(my_table.join( + awful.button({}, 1, function () awful.layout.inc( 1) end), + awful.button({}, 2, function () awful.layout.set( awful.layout.layouts[1] ) end), + awful.button({}, 3, function () awful.layout.inc(-1) end), + awful.button({}, 4, function () awful.layout.inc( 1) end), + awful.button({}, 5, function () awful.layout.inc(-1) end))) + + -- Create a taglist widget + s.mytaglist = awful.widget.taglist(s, awful.widget.taglist.filter.all, awful.util.taglist_buttons) + + -- Create a tasklist widget + s.mytasklist = awful.widget.tasklist(s, awful.widget.tasklist.filter.currenttags, awful.util.tasklist_buttons) + + -- Create the wibox + s.mywibox = awful.wibar({ position = "top", screen = s, height = dpi(18), bg = theme.bg_normal, fg = theme.fg_normal }) + + -- Add widgets to the wibox + s.mywibox:setup { + layout = wibox.layout.align.horizontal, + { -- Left widgets + layout = wibox.layout.fixed.horizontal, + small_spr, + s.mylayoutbox, + first, + bar_spr, + s.mytaglist, + first, + s.mypromptbox, + }, + s.mytasklist, -- Middle widget + { -- Right widgets + layout = wibox.layout.fixed.horizontal, + wibox.widget.systray(), + small_spr, + --theme.mail.widget, + mpdicon, + theme.mpd.widget, + baticon, + batwidget, + bar_spr, + --fsicon, + --fswidget, + bar_spr, + volicon, + volumewidget, + bar_spr, + mytextclock, + }, + } +end + +return theme diff --git a/.config/awesome/themes/copland/wall.png b/.config/awesome/themes/copland/wall.png new file mode 100755 index 0000000..ea9e4cc Binary files /dev/null and b/.config/awesome/themes/copland/wall.png differ diff --git a/.config/awesome/themes/dremora/icons/awesome.png b/.config/awesome/themes/dremora/icons/awesome.png new file mode 100755 index 0000000..ffb105e Binary files /dev/null and b/.config/awesome/themes/dremora/icons/awesome.png differ diff --git a/.config/awesome/themes/dremora/icons/dwindle.png b/.config/awesome/themes/dremora/icons/dwindle.png new file mode 100755 index 0000000..04f3918 Binary files /dev/null and b/.config/awesome/themes/dremora/icons/dwindle.png differ diff --git a/.config/awesome/themes/dremora/icons/fairh.png b/.config/awesome/themes/dremora/icons/fairh.png new file mode 100755 index 0000000..0bb6dab Binary files /dev/null and b/.config/awesome/themes/dremora/icons/fairh.png differ diff --git a/.config/awesome/themes/dremora/icons/fairv.png b/.config/awesome/themes/dremora/icons/fairv.png new file mode 100755 index 0000000..aff6c26 Binary files /dev/null and b/.config/awesome/themes/dremora/icons/fairv.png differ diff --git a/.config/awesome/themes/dremora/icons/floating.png b/.config/awesome/themes/dremora/icons/floating.png new file mode 100755 index 0000000..5d021b1 Binary files /dev/null and b/.config/awesome/themes/dremora/icons/floating.png differ diff --git a/.config/awesome/themes/dremora/icons/magnifier.png b/.config/awesome/themes/dremora/icons/magnifier.png new file mode 100755 index 0000000..dd4dec3 Binary files /dev/null and b/.config/awesome/themes/dremora/icons/magnifier.png differ diff --git a/.config/awesome/themes/dremora/icons/max.png b/.config/awesome/themes/dremora/icons/max.png new file mode 100755 index 0000000..7334f8b Binary files /dev/null and b/.config/awesome/themes/dremora/icons/max.png differ diff --git a/.config/awesome/themes/dremora/icons/spiral.png b/.config/awesome/themes/dremora/icons/spiral.png new file mode 100755 index 0000000..31cbbd0 Binary files /dev/null and b/.config/awesome/themes/dremora/icons/spiral.png differ diff --git a/.config/awesome/themes/dremora/icons/square_sel.png b/.config/awesome/themes/dremora/icons/square_sel.png new file mode 100755 index 0000000..85cc605 Binary files /dev/null and b/.config/awesome/themes/dremora/icons/square_sel.png differ diff --git a/.config/awesome/themes/dremora/icons/square_unsel.png b/.config/awesome/themes/dremora/icons/square_unsel.png new file mode 100755 index 0000000..1c58e4b Binary files /dev/null and b/.config/awesome/themes/dremora/icons/square_unsel.png differ diff --git a/.config/awesome/themes/dremora/icons/submenu.png b/.config/awesome/themes/dremora/icons/submenu.png new file mode 100755 index 0000000..988ef9e Binary files /dev/null and b/.config/awesome/themes/dremora/icons/submenu.png differ diff --git a/.config/awesome/themes/dremora/icons/tile.png b/.config/awesome/themes/dremora/icons/tile.png new file mode 100755 index 0000000..72cbd6c Binary files /dev/null and b/.config/awesome/themes/dremora/icons/tile.png differ diff --git a/.config/awesome/themes/dremora/icons/tilebottom.png b/.config/awesome/themes/dremora/icons/tilebottom.png new file mode 100755 index 0000000..a927128 Binary files /dev/null and b/.config/awesome/themes/dremora/icons/tilebottom.png differ diff --git a/.config/awesome/themes/dremora/icons/tileleft.png b/.config/awesome/themes/dremora/icons/tileleft.png new file mode 100755 index 0000000..c54d1f5 Binary files /dev/null and b/.config/awesome/themes/dremora/icons/tileleft.png differ diff --git a/.config/awesome/themes/dremora/icons/tiletop.png b/.config/awesome/themes/dremora/icons/tiletop.png new file mode 100755 index 0000000..db74cf3 Binary files /dev/null and b/.config/awesome/themes/dremora/icons/tiletop.png differ diff --git a/.config/awesome/themes/dremora/icons/titlebar/close_focus.png b/.config/awesome/themes/dremora/icons/titlebar/close_focus.png new file mode 100755 index 0000000..221bca0 Binary files /dev/null and b/.config/awesome/themes/dremora/icons/titlebar/close_focus.png differ diff --git a/.config/awesome/themes/dremora/icons/titlebar/close_normal.png b/.config/awesome/themes/dremora/icons/titlebar/close_normal.png new file mode 100755 index 0000000..f923983 Binary files /dev/null and b/.config/awesome/themes/dremora/icons/titlebar/close_normal.png differ diff --git a/.config/awesome/themes/dremora/icons/titlebar/floating_focus_active.png b/.config/awesome/themes/dremora/icons/titlebar/floating_focus_active.png new file mode 100755 index 0000000..d83bd00 Binary files /dev/null and b/.config/awesome/themes/dremora/icons/titlebar/floating_focus_active.png differ diff --git a/.config/awesome/themes/dremora/icons/titlebar/floating_focus_inactive.png b/.config/awesome/themes/dremora/icons/titlebar/floating_focus_inactive.png new file mode 100755 index 0000000..47f19f6 Binary files /dev/null and b/.config/awesome/themes/dremora/icons/titlebar/floating_focus_inactive.png differ diff --git a/.config/awesome/themes/dremora/icons/titlebar/floating_normal_active.png b/.config/awesome/themes/dremora/icons/titlebar/floating_normal_active.png new file mode 100755 index 0000000..b788552 Binary files /dev/null and b/.config/awesome/themes/dremora/icons/titlebar/floating_normal_active.png differ diff --git a/.config/awesome/themes/dremora/icons/titlebar/floating_normal_inactive.png b/.config/awesome/themes/dremora/icons/titlebar/floating_normal_inactive.png new file mode 100755 index 0000000..4adc5e9 Binary files /dev/null and b/.config/awesome/themes/dremora/icons/titlebar/floating_normal_inactive.png differ diff --git a/.config/awesome/themes/dremora/icons/titlebar/maximized_focus_active.png b/.config/awesome/themes/dremora/icons/titlebar/maximized_focus_active.png new file mode 100755 index 0000000..2599cd5 Binary files /dev/null and b/.config/awesome/themes/dremora/icons/titlebar/maximized_focus_active.png differ diff --git a/.config/awesome/themes/dremora/icons/titlebar/maximized_focus_inactive.png b/.config/awesome/themes/dremora/icons/titlebar/maximized_focus_inactive.png new file mode 100755 index 0000000..bce1d00 Binary files /dev/null and b/.config/awesome/themes/dremora/icons/titlebar/maximized_focus_inactive.png differ diff --git a/.config/awesome/themes/dremora/icons/titlebar/maximized_normal_active.png b/.config/awesome/themes/dremora/icons/titlebar/maximized_normal_active.png new file mode 100755 index 0000000..a5b1d76 Binary files /dev/null and b/.config/awesome/themes/dremora/icons/titlebar/maximized_normal_active.png differ diff --git a/.config/awesome/themes/dremora/icons/titlebar/maximized_normal_inactive.png b/.config/awesome/themes/dremora/icons/titlebar/maximized_normal_inactive.png new file mode 100755 index 0000000..2e56d32 Binary files /dev/null and b/.config/awesome/themes/dremora/icons/titlebar/maximized_normal_inactive.png differ diff --git a/.config/awesome/themes/dremora/icons/titlebar/ontop_focus_active.png b/.config/awesome/themes/dremora/icons/titlebar/ontop_focus_active.png new file mode 100755 index 0000000..ade12fe Binary files /dev/null and b/.config/awesome/themes/dremora/icons/titlebar/ontop_focus_active.png differ diff --git a/.config/awesome/themes/dremora/icons/titlebar/ontop_focus_inactive.png b/.config/awesome/themes/dremora/icons/titlebar/ontop_focus_inactive.png new file mode 100755 index 0000000..2f3a2be Binary files /dev/null and b/.config/awesome/themes/dremora/icons/titlebar/ontop_focus_inactive.png differ diff --git a/.config/awesome/themes/dremora/icons/titlebar/ontop_normal_active.png b/.config/awesome/themes/dremora/icons/titlebar/ontop_normal_active.png new file mode 100755 index 0000000..02facc4 Binary files /dev/null and b/.config/awesome/themes/dremora/icons/titlebar/ontop_normal_active.png differ diff --git a/.config/awesome/themes/dremora/icons/titlebar/ontop_normal_inactive.png b/.config/awesome/themes/dremora/icons/titlebar/ontop_normal_inactive.png new file mode 100755 index 0000000..a9a3206 Binary files /dev/null and b/.config/awesome/themes/dremora/icons/titlebar/ontop_normal_inactive.png differ diff --git a/.config/awesome/themes/dremora/icons/titlebar/sticky_focus_active.png b/.config/awesome/themes/dremora/icons/titlebar/sticky_focus_active.png new file mode 100755 index 0000000..ebd45a1 Binary files /dev/null and b/.config/awesome/themes/dremora/icons/titlebar/sticky_focus_active.png differ diff --git a/.config/awesome/themes/dremora/icons/titlebar/sticky_focus_inactive.png b/.config/awesome/themes/dremora/icons/titlebar/sticky_focus_inactive.png new file mode 100755 index 0000000..5493d8e Binary files /dev/null and b/.config/awesome/themes/dremora/icons/titlebar/sticky_focus_inactive.png differ diff --git a/.config/awesome/themes/dremora/icons/titlebar/sticky_normal_active.png b/.config/awesome/themes/dremora/icons/titlebar/sticky_normal_active.png new file mode 100755 index 0000000..15f0bc4 Binary files /dev/null and b/.config/awesome/themes/dremora/icons/titlebar/sticky_normal_active.png differ diff --git a/.config/awesome/themes/dremora/icons/titlebar/sticky_normal_inactive.png b/.config/awesome/themes/dremora/icons/titlebar/sticky_normal_inactive.png new file mode 100755 index 0000000..7e6c99b Binary files /dev/null and b/.config/awesome/themes/dremora/icons/titlebar/sticky_normal_inactive.png differ diff --git a/.config/awesome/themes/dremora/theme.lua b/.config/awesome/themes/dremora/theme.lua new file mode 100755 index 0000000..5b84554 --- /dev/null +++ b/.config/awesome/themes/dremora/theme.lua @@ -0,0 +1,256 @@ +--[[ + + Dremora Awesome WM theme 2.0 + github.com/lcpz + +--]] + +local gears = require("gears") +local lain = require("lain") +local awful = require("awful") +local wibox = require("wibox") +local dpi = require("beautiful.xresources").apply_dpi + +local os = os +local my_table = awful.util.table or gears.table -- 4.{0,1} compatibility + +local theme = {} +theme.dir = os.getenv("HOME") .. "/.config/awesome/themes/dremora" +theme.wallpaper = theme.dir .. "/wall.png" +theme.font = "Terminus 10.5" +theme.taglist_font = "Icons 10" +theme.fg_normal = "#747474" +theme.fg_focus = "#DDDCFF" +theme.bg_normal = "#121212" +theme.bg_focus = "#121212" +theme.fg_urgent = "#CC9393" +theme.bg_urgent = "#2A1F1E" +theme.border_width = dpi(0) +theme.border_normal = "#121212" +theme.border_focus = "#292929" +theme.titlebar_bg_focus = "#292929" +theme.taglist_fg_focus = "#dddcff" +theme.taglist_bg_focus = "#121212" +theme.menu_height = dpi(16) +theme.menu_width = dpi(130) +theme.menu_submenu_icon = theme.dir .. "/icons/submenu.png" +theme.awesome_icon = theme.dir .."/icons/awesome.png" +theme.taglist_squares_sel = theme.dir .. "/icons/square_sel.png" +theme.taglist_squares_unsel = theme.dir .. "/icons/square_unsel.png" +theme.layout_tile = theme.dir .. "/icons/tile.png" +theme.layout_tileleft = theme.dir .. "/icons/tileleft.png" +theme.layout_tilebottom = theme.dir .. "/icons/tilebottom.png" +theme.layout_tiletop = theme.dir .. "/icons/tiletop.png" +theme.layout_fairv = theme.dir .. "/icons/fairv.png" +theme.layout_fairh = theme.dir .. "/icons/fairh.png" +theme.layout_spiral = theme.dir .. "/icons/spiral.png" +theme.layout_dwindle = theme.dir .. "/icons/dwindle.png" +theme.layout_max = theme.dir .. "/icons/max.png" +theme.layout_fullscreen = theme.dir .. "/icons/fullscreen.png" +theme.layout_magnifier = theme.dir .. "/icons/magnifier.png" +theme.layout_floating = theme.dir .. "/icons/floating.png" +theme.tasklist_plain_task_name = true +theme.tasklist_disable_icon = true +theme.useless_gap = dpi(10) +theme.titlebar_close_button_focus = theme.dir .. "/icons/titlebar/close_focus.png" +theme.titlebar_close_button_normal = theme.dir .. "/icons/titlebar/close_normal.png" +theme.titlebar_ontop_button_focus_active = theme.dir .. "/icons/titlebar/ontop_focus_active.png" +theme.titlebar_ontop_button_normal_active = theme.dir .. "/icons/titlebar/ontop_normal_active.png" +theme.titlebar_ontop_button_focus_inactive = theme.dir .. "/icons/titlebar/ontop_focus_inactive.png" +theme.titlebar_ontop_button_normal_inactive = theme.dir .. "/icons/titlebar/ontop_normal_inactive.png" +theme.titlebar_sticky_button_focus_active = theme.dir .. "/icons/titlebar/sticky_focus_active.png" +theme.titlebar_sticky_button_normal_active = theme.dir .. "/icons/titlebar/sticky_normal_active.png" +theme.titlebar_sticky_button_focus_inactive = theme.dir .. "/icons/titlebar/sticky_focus_inactive.png" +theme.titlebar_sticky_button_normal_inactive = theme.dir .. "/icons/titlebar/sticky_normal_inactive.png" +theme.titlebar_floating_button_focus_active = theme.dir .. "/icons/titlebar/floating_focus_active.png" +theme.titlebar_floating_button_normal_active = theme.dir .. "/icons/titlebar/floating_normal_active.png" +theme.titlebar_floating_button_focus_inactive = theme.dir .. "/icons/titlebar/floating_focus_inactive.png" +theme.titlebar_floating_button_normal_inactive = theme.dir .. "/icons/titlebar/floating_normal_inactive.png" +theme.titlebar_maximized_button_focus_active = theme.dir .. "/icons/titlebar/maximized_focus_active.png" +theme.titlebar_maximized_button_normal_active = theme.dir .. "/icons/titlebar/maximized_normal_active.png" +theme.titlebar_maximized_button_focus_inactive = theme.dir .. "/icons/titlebar/maximized_focus_inactive.png" +theme.titlebar_maximized_button_normal_inactive = theme.dir .. "/icons/titlebar/maximized_normal_inactive.png" + +awful.util.tagnames = { "ƀ", "Ƅ", "Ɗ", "ƈ", "ƙ" } + +local markup = lain.util.markup +local separators = lain.util.separators +local white = theme.fg_focus +local gray = "#858585" + +-- Textclock +local mytextclock = wibox.widget.textclock(markup(gray, " %a") +.. markup(white, " %d ") .. markup(gray, "%b ") .. markup(white, "%H:%M ")) +mytextclock.font = theme.font + +-- Calendar +theme.cal = lain.widget.cal({ + attach_to = { mytextclock }, + notification_preset = { + font = "Terminus 11", + fg = white, + bg = theme.bg_normal +}}) + +-- Mail IMAP check +--[[ to be set before use +theme.mail = lain.widget.imap({ + timeout = 180, + server = "server", + mail = "mail", + password = "keyring get mail", + notification_preset = { fg = white } + settings = function() + mail = "" + count = "" + + if mailcount > 0 then + mail = "Mail " + count = mailcount .. " " + end + + widget:set_markup(markup.font(theme.font, markup(gray, mail) .. markup(white, count))) + end +}) +--]] + +-- MPD +theme.mpd = lain.widget.mpd({ + settings = function() + mpd_notification_preset.fg = white + artist = mpd_now.artist .. " " + title = mpd_now.title .. " " + + if mpd_now.state == "pause" then + artist = "mpd " + title = "paused " + elseif mpd_now.state == "stop" then + artist = "" + title = "" + end + + widget:set_markup(markup.font(theme.font, markup(gray, artist) .. markup(white, title))) + end +}) + +-- /home fs +--[[ commented because it needs Gio/Glib >= 2.54 +theme.fs = lain.widget.fs({ + notification_preset = { fg = white, bg = theme.bg_normal, font = "Terminus 10.5" }, + settings = function() + fs_header = "" + fs_p = "" + + if fs_now["/home"].percentage >= 90 then + fs_header = " Hdd " + fs_p = fs_now["/home"].percentage + end + + widget:set_markup(markup.font(theme.font, markup(gray, fs_header) .. markup(white, fs_p))) + end +}) +--]] + +-- Battery +local bat = lain.widget.bat({ + settings = function() + bat_header = " Bat " + bat_p = bat_now.perc .. " " + widget:set_markup(markup.font(theme.font, markup(gray, bat_header) .. markup(white, bat_p))) + end +}) + +-- ALSA volume +theme.volume = lain.widget.alsa({ + --togglechannel = "IEC958,3", + settings = function() + header = " Vol " + vlevel = volume_now.level + + if volume_now.status == "off" then + vlevel = vlevel .. "M " + else + vlevel = vlevel .. " " + end + + widget:set_markup(markup.font(theme.font, markup(gray, header) .. markup(white, vlevel))) + end +}) + +-- Weather +--[[ to be set before use +theme.weather = lain.widget.weather({ + --APPID = + city_id = 2643743, -- placeholder (London) + notification_preset = { fg = white } +}) +--]] + +-- Separators +local first = wibox.widget.textbox(' ') +local arrl_pre = separators.arrow_right("alpha", "#1A1A1A") +local arrl_post = separators.arrow_right("#1A1A1A", "alpha") + +function theme.at_screen_connect(s) + -- Quake application + s.quake = lain.util.quake({ app = awful.util.terminal }) + + -- If wallpaper is a function, call it with the screen + local wallpaper = theme.wallpaper + if type(wallpaper) == "function" then + wallpaper = wallpaper(s) + end + gears.wallpaper.maximized(wallpaper, s, true) + + -- Tags + awful.tag(awful.util.tagnames, s, awful.layout.layouts[1]) + + -- Create a promptbox for each screen + s.mypromptbox = awful.widget.prompt() + -- Create an imagebox widget which will contains an icon indicating which layout we're using. + -- We need one layoutbox per screen. + s.mylayoutbox = awful.widget.layoutbox(s) + s.mylayoutbox:buttons(my_table.join( + awful.button({}, 1, function () awful.layout.inc( 1) end), + awful.button({}, 2, function () awful.layout.set( awful.layout.layouts[1] ) end), + awful.button({}, 3, function () awful.layout.inc(-1) end), + awful.button({}, 4, function () awful.layout.inc( 1) end), + awful.button({}, 5, function () awful.layout.inc(-1) end))) + -- Create a taglist widget + s.mytaglist = awful.widget.taglist(s, awful.widget.taglist.filter.all, awful.util.taglist_buttons) + + -- Create a tasklist widget + s.mytasklist = awful.widget.tasklist(s, awful.widget.tasklist.filter.currenttags, awful.util.tasklist_buttons) + + -- Create the wibox + s.mywibox = awful.wibar({ position = "top", screen = s, height = dpi(18), bg = theme.bg_normal, fg = theme.fg_normal }) + + -- Add widgets to the wibox + s.mywibox:setup { + layout = wibox.layout.align.horizontal, + { -- Left widgets + layout = wibox.layout.fixed.horizontal, + first, + s.mytaglist, + arrl_pre, + s.mylayoutbox, + arrl_post, + s.mypromptbox, + first, + }, + s.mytasklist, -- Middle widget + { -- Right widgets + layout = wibox.layout.fixed.horizontal, + wibox.widget.systray(), + first, + theme.mpd.widget, + --theme.mail.widget, + --theme.fs.widget, + bat.widget, + theme.volume.widget, + mytextclock, + }, + } +end + +return theme diff --git a/.config/awesome/themes/dremora/wall.png b/.config/awesome/themes/dremora/wall.png new file mode 100755 index 0000000..4501b60 Binary files /dev/null and b/.config/awesome/themes/dremora/wall.png differ diff --git a/.config/awesome/themes/holo/icons/awesome_icon.png b/.config/awesome/themes/holo/icons/awesome_icon.png new file mode 100755 index 0000000..ae13162 Binary files /dev/null and b/.config/awesome/themes/holo/icons/awesome_icon.png differ diff --git a/.config/awesome/themes/holo/icons/awesome_icon_white.png b/.config/awesome/themes/holo/icons/awesome_icon_white.png new file mode 100755 index 0000000..1b0de6e Binary files /dev/null and b/.config/awesome/themes/holo/icons/awesome_icon_white.png differ diff --git a/.config/awesome/themes/holo/icons/bar.png b/.config/awesome/themes/holo/icons/bar.png new file mode 100755 index 0000000..767885c Binary files /dev/null and b/.config/awesome/themes/holo/icons/bar.png differ diff --git a/.config/awesome/themes/holo/icons/bottom_bar.png b/.config/awesome/themes/holo/icons/bottom_bar.png new file mode 100755 index 0000000..076ad3b Binary files /dev/null and b/.config/awesome/themes/holo/icons/bottom_bar.png differ diff --git a/.config/awesome/themes/holo/icons/cal.png b/.config/awesome/themes/holo/icons/cal.png new file mode 100755 index 0000000..1b023ec Binary files /dev/null and b/.config/awesome/themes/holo/icons/cal.png differ diff --git a/.config/awesome/themes/holo/icons/clock.png b/.config/awesome/themes/holo/icons/clock.png new file mode 100755 index 0000000..6b2c4e5 Binary files /dev/null and b/.config/awesome/themes/holo/icons/clock.png differ diff --git a/.config/awesome/themes/holo/icons/cpu.png b/.config/awesome/themes/holo/icons/cpu.png new file mode 100755 index 0000000..1ce87eb Binary files /dev/null and b/.config/awesome/themes/holo/icons/cpu.png differ diff --git a/.config/awesome/themes/holo/icons/dwindle.png b/.config/awesome/themes/holo/icons/dwindle.png new file mode 100755 index 0000000..f68b484 Binary files /dev/null and b/.config/awesome/themes/holo/icons/dwindle.png differ diff --git a/.config/awesome/themes/holo/icons/fairh.png b/.config/awesome/themes/holo/icons/fairh.png new file mode 100755 index 0000000..c7e5e6d Binary files /dev/null and b/.config/awesome/themes/holo/icons/fairh.png differ diff --git a/.config/awesome/themes/holo/icons/fairv.png b/.config/awesome/themes/holo/icons/fairv.png new file mode 100755 index 0000000..d416b9d Binary files /dev/null and b/.config/awesome/themes/holo/icons/fairv.png differ diff --git a/.config/awesome/themes/holo/icons/floating.png b/.config/awesome/themes/holo/icons/floating.png new file mode 100755 index 0000000..b91cd07 Binary files /dev/null and b/.config/awesome/themes/holo/icons/floating.png differ diff --git a/.config/awesome/themes/holo/icons/magnifier.png b/.config/awesome/themes/holo/icons/magnifier.png new file mode 100755 index 0000000..e1f744e Binary files /dev/null and b/.config/awesome/themes/holo/icons/magnifier.png differ diff --git a/.config/awesome/themes/holo/icons/max.png b/.config/awesome/themes/holo/icons/max.png new file mode 100755 index 0000000..50d3994 Binary files /dev/null and b/.config/awesome/themes/holo/icons/max.png differ diff --git a/.config/awesome/themes/holo/icons/mpd.png b/.config/awesome/themes/holo/icons/mpd.png new file mode 100755 index 0000000..efa8ec3 Binary files /dev/null and b/.config/awesome/themes/holo/icons/mpd.png differ diff --git a/.config/awesome/themes/holo/icons/net_down.png b/.config/awesome/themes/holo/icons/net_down.png new file mode 100755 index 0000000..d5075a1 Binary files /dev/null and b/.config/awesome/themes/holo/icons/net_down.png differ diff --git a/.config/awesome/themes/holo/icons/net_up.png b/.config/awesome/themes/holo/icons/net_up.png new file mode 100755 index 0000000..66dfb54 Binary files /dev/null and b/.config/awesome/themes/holo/icons/net_up.png differ diff --git a/.config/awesome/themes/holo/icons/next.png b/.config/awesome/themes/holo/icons/next.png new file mode 100755 index 0000000..148ce90 Binary files /dev/null and b/.config/awesome/themes/holo/icons/next.png differ diff --git a/.config/awesome/themes/holo/icons/pause.png b/.config/awesome/themes/holo/icons/pause.png new file mode 100755 index 0000000..9e9bc3f Binary files /dev/null and b/.config/awesome/themes/holo/icons/pause.png differ diff --git a/.config/awesome/themes/holo/icons/play.png b/.config/awesome/themes/holo/icons/play.png new file mode 100755 index 0000000..1949983 Binary files /dev/null and b/.config/awesome/themes/holo/icons/play.png differ diff --git a/.config/awesome/themes/holo/icons/prev.png b/.config/awesome/themes/holo/icons/prev.png new file mode 100755 index 0000000..d913bba Binary files /dev/null and b/.config/awesome/themes/holo/icons/prev.png differ diff --git a/.config/awesome/themes/holo/icons/spiral.png b/.config/awesome/themes/holo/icons/spiral.png new file mode 100755 index 0000000..ebb7bb3 Binary files /dev/null and b/.config/awesome/themes/holo/icons/spiral.png differ diff --git a/.config/awesome/themes/holo/icons/spr_bottom_right.png b/.config/awesome/themes/holo/icons/spr_bottom_right.png new file mode 100755 index 0000000..d702f98 Binary files /dev/null and b/.config/awesome/themes/holo/icons/spr_bottom_right.png differ diff --git a/.config/awesome/themes/holo/icons/spr_left.png b/.config/awesome/themes/holo/icons/spr_left.png new file mode 100755 index 0000000..44822ed Binary files /dev/null and b/.config/awesome/themes/holo/icons/spr_left.png differ diff --git a/.config/awesome/themes/holo/icons/spr_right.png b/.config/awesome/themes/holo/icons/spr_right.png new file mode 100755 index 0000000..5cca795 Binary files /dev/null and b/.config/awesome/themes/holo/icons/spr_right.png differ diff --git a/.config/awesome/themes/holo/icons/spr_small.png b/.config/awesome/themes/holo/icons/spr_small.png new file mode 100755 index 0000000..16492a8 Binary files /dev/null and b/.config/awesome/themes/holo/icons/spr_small.png differ diff --git a/.config/awesome/themes/holo/icons/spr_very_small.png b/.config/awesome/themes/holo/icons/spr_very_small.png new file mode 100755 index 0000000..8b9a227 Binary files /dev/null and b/.config/awesome/themes/holo/icons/spr_very_small.png differ diff --git a/.config/awesome/themes/holo/icons/square_sel.png b/.config/awesome/themes/holo/icons/square_sel.png new file mode 100755 index 0000000..73fb845 Binary files /dev/null and b/.config/awesome/themes/holo/icons/square_sel.png differ diff --git a/.config/awesome/themes/holo/icons/square_unsel.png b/.config/awesome/themes/holo/icons/square_unsel.png new file mode 100755 index 0000000..07dd9f0 Binary files /dev/null and b/.config/awesome/themes/holo/icons/square_unsel.png differ diff --git a/.config/awesome/themes/holo/icons/stop.png b/.config/awesome/themes/holo/icons/stop.png new file mode 100755 index 0000000..bfc819c Binary files /dev/null and b/.config/awesome/themes/holo/icons/stop.png differ diff --git a/.config/awesome/themes/holo/icons/tile.png b/.config/awesome/themes/holo/icons/tile.png new file mode 100755 index 0000000..e2e52bb Binary files /dev/null and b/.config/awesome/themes/holo/icons/tile.png differ diff --git a/.config/awesome/themes/holo/icons/tilebottom.png b/.config/awesome/themes/holo/icons/tilebottom.png new file mode 100755 index 0000000..439f528 Binary files /dev/null and b/.config/awesome/themes/holo/icons/tilebottom.png differ diff --git a/.config/awesome/themes/holo/icons/tileleft.png b/.config/awesome/themes/holo/icons/tileleft.png new file mode 100755 index 0000000..827e0d1 Binary files /dev/null and b/.config/awesome/themes/holo/icons/tileleft.png differ diff --git a/.config/awesome/themes/holo/icons/tiletop.png b/.config/awesome/themes/holo/icons/tiletop.png new file mode 100755 index 0000000..7139846 Binary files /dev/null and b/.config/awesome/themes/holo/icons/tiletop.png differ diff --git a/.config/awesome/themes/holo/theme.lua b/.config/awesome/themes/holo/theme.lua new file mode 100755 index 0000000..75a7b48 --- /dev/null +++ b/.config/awesome/themes/holo/theme.lua @@ -0,0 +1,393 @@ +--[[ + + Holo Awesome WM theme 3.0 + github.com/lcpz + +--]] + +local gears = require("gears") +local lain = require("lain") +local awful = require("awful") +local wibox = require("wibox") +local dpi = require("beautiful.xresources").apply_dpi + +local string, os = string, os +local my_table = awful.util.table or gears.table -- 4.{0,1} compatibility + +local theme = {} +theme.default_dir = require("awful.util").get_themes_dir() .. "default" +theme.icon_dir = os.getenv("HOME") .. "/.config/awesome/themes/holo/icons" +theme.wallpaper = os.getenv("HOME") .. "/.config/awesome/themes/holo/wall.png" +theme.font = "Roboto Bold 10" +theme.taglist_font = "Roboto Condensed Regular 8" +theme.fg_normal = "#FFFFFF" +theme.fg_focus = "#0099CC" +theme.bg_focus = "#303030" +theme.bg_normal = "#242424" +theme.fg_urgent = "#CC9393" +theme.bg_urgent = "#006B8E" +theme.border_width = dpi(3) +theme.border_normal = "#252525" +theme.border_focus = "#0099CC" +theme.taglist_fg_focus = "#FFFFFF" +theme.tasklist_bg_normal = "#222222" +theme.tasklist_fg_focus = "#4CB7DB" +theme.menu_height = dpi(20) +theme.menu_width = dpi(160) +theme.menu_icon_size = dpi(32) +theme.awesome_icon = theme.icon_dir .. "/awesome_icon_white.png" +theme.awesome_icon_launcher = theme.icon_dir .. "/awesome_icon.png" +theme.taglist_squares_sel = theme.icon_dir .. "/square_sel.png" +theme.taglist_squares_unsel = theme.icon_dir .. "/square_unsel.png" +theme.spr_small = theme.icon_dir .. "/spr_small.png" +theme.spr_very_small = theme.icon_dir .. "/spr_very_small.png" +theme.spr_right = theme.icon_dir .. "/spr_right.png" +theme.spr_bottom_right = theme.icon_dir .. "/spr_bottom_right.png" +theme.spr_left = theme.icon_dir .. "/spr_left.png" +theme.bar = theme.icon_dir .. "/bar.png" +theme.bottom_bar = theme.icon_dir .. "/bottom_bar.png" +theme.mpdl = theme.icon_dir .. "/mpd.png" +theme.mpd_on = theme.icon_dir .. "/mpd_on.png" +theme.prev = theme.icon_dir .. "/prev.png" +theme.nex = theme.icon_dir .. "/next.png" +theme.stop = theme.icon_dir .. "/stop.png" +theme.pause = theme.icon_dir .. "/pause.png" +theme.play = theme.icon_dir .. "/play.png" +theme.clock = theme.icon_dir .. "/clock.png" +theme.calendar = theme.icon_dir .. "/cal.png" +theme.cpu = theme.icon_dir .. "/cpu.png" +theme.net_up = theme.icon_dir .. "/net_up.png" +theme.net_down = theme.icon_dir .. "/net_down.png" +theme.layout_tile = theme.icon_dir .. "/tile.png" +theme.layout_tileleft = theme.icon_dir .. "/tileleft.png" +theme.layout_tilebottom = theme.icon_dir .. "/tilebottom.png" +theme.layout_tiletop = theme.icon_dir .. "/tiletop.png" +theme.layout_fairv = theme.icon_dir .. "/fairv.png" +theme.layout_fairh = theme.icon_dir .. "/fairh.png" +theme.layout_spiral = theme.icon_dir .. "/spiral.png" +theme.layout_dwindle = theme.icon_dir .. "/dwindle.png" +theme.layout_max = theme.icon_dir .. "/max.png" +theme.layout_fullscreen = theme.icon_dir .. "/fullscreen.png" +theme.layout_magnifier = theme.icon_dir .. "/magnifier.png" +theme.layout_floating = theme.icon_dir .. "/floating.png" +theme.tasklist_plain_task_name = true +theme.tasklist_disable_icon = true +theme.useless_gap = dpi(4) +theme.titlebar_close_button_normal = theme.default_dir.."/titlebar/close_normal.png" +theme.titlebar_close_button_focus = theme.default_dir.."/titlebar/close_focus.png" +theme.titlebar_minimize_button_normal = theme.default_dir.."/titlebar/minimize_normal.png" +theme.titlebar_minimize_button_focus = theme.default_dir.."/titlebar/minimize_focus.png" +theme.titlebar_ontop_button_normal_inactive = theme.default_dir.."/titlebar/ontop_normal_inactive.png" +theme.titlebar_ontop_button_focus_inactive = theme.default_dir.."/titlebar/ontop_focus_inactive.png" +theme.titlebar_ontop_button_normal_active = theme.default_dir.."/titlebar/ontop_normal_active.png" +theme.titlebar_ontop_button_focus_active = theme.default_dir.."/titlebar/ontop_focus_active.png" +theme.titlebar_sticky_button_normal_inactive = theme.default_dir.."/titlebar/sticky_normal_inactive.png" +theme.titlebar_sticky_button_focus_inactive = theme.default_dir.."/titlebar/sticky_focus_inactive.png" +theme.titlebar_sticky_button_normal_active = theme.default_dir.."/titlebar/sticky_normal_active.png" +theme.titlebar_sticky_button_focus_active = theme.default_dir.."/titlebar/sticky_focus_active.png" +theme.titlebar_floating_button_normal_inactive = theme.default_dir.."/titlebar/floating_normal_inactive.png" +theme.titlebar_floating_button_focus_inactive = theme.default_dir.."/titlebar/floating_focus_inactive.png" +theme.titlebar_floating_button_normal_active = theme.default_dir.."/titlebar/floating_normal_active.png" +theme.titlebar_floating_button_focus_active = theme.default_dir.."/titlebar/floating_focus_active.png" +theme.titlebar_maximized_button_normal_inactive = theme.default_dir.."/titlebar/maximized_normal_inactive.png" +theme.titlebar_maximized_button_focus_inactive = theme.default_dir.."/titlebar/maximized_focus_inactive.png" +theme.titlebar_maximized_button_normal_active = theme.default_dir.."/titlebar/maximized_normal_active.png" +theme.titlebar_maximized_button_focus_active = theme.default_dir.."/titlebar/maximized_focus_active.png" + +theme.musicplr = string.format("%s -e ncmpcpp", awful.util.terminal) + +local markup = lain.util.markup +local blue = "#80CCE6" +local space3 = markup.font("Roboto 3", " ") + +-- Clock +local mytextclock = wibox.widget.textclock(markup("#FFFFFF", space3 .. "%H:%M " .. markup.font("Roboto 4", " "))) +mytextclock.font = theme.font +local clock_icon = wibox.widget.imagebox(theme.clock) +local clockbg = wibox.container.background(mytextclock, theme.bg_focus, gears.shape.rectangle) +local clockwidget = wibox.container.margin(clockbg, dpi(0), dpi(3), dpi(5), dpi(5)) + +-- Calendar +local mytextcalendar = wibox.widget.textclock(markup.fontfg(theme.font, "#FFFFFF", space3 .. "%d %b " .. markup.font("Roboto 5", " "))) +local calendar_icon = wibox.widget.imagebox(theme.calendar) +local calbg = wibox.container.background(mytextcalendar, theme.bg_focus, gears.shape.rectangle) +local calendarwidget = wibox.container.margin(calbg, dpi(0), dpi(0), dpi(5), dpi(5)) +theme.cal = lain.widget.cal({ + attach_to = { mytextclock, mytextcalendar }, + notification_preset = { + fg = "#FFFFFF", + bg = theme.bg_normal, + position = "bottom_right", + font = "Monospace 10" + } +}) + +-- Mail IMAP check +--[[ to be set before use +theme.mail = lain.widget.imap({ + timeout = 180, + server = "server", + mail = "mail", + password = "keyring get mail", + settings = function() + mail_notification_preset.fg = "#FFFFFF" + mail = "" + count = "" + + if mailcount > 0 then + mail = "Mail " + count = mailcount .. " " + end + + widget:set_markup(markup.font(theme.font, markup(blue, mail) .. markup("#FFFFFF", count))) + end +}) +--]] + +-- MPD +local mpd_icon = awful.widget.launcher({ image = theme.mpdl, command = theme.musicplr }) +local prev_icon = wibox.widget.imagebox(theme.prev) +local next_icon = wibox.widget.imagebox(theme.nex) +local stop_icon = wibox.widget.imagebox(theme.stop) +local pause_icon = wibox.widget.imagebox(theme.pause) +local play_pause_icon = wibox.widget.imagebox(theme.play) +theme.mpd = lain.widget.mpd({ + settings = function () + if mpd_now.state == "play" then + mpd_now.artist = mpd_now.artist:upper():gsub("&.-;", string.lower) + mpd_now.title = mpd_now.title:upper():gsub("&.-;", string.lower) + widget:set_markup(markup.font("Roboto 4", " ") + .. markup.font(theme.taglist_font, + " " .. mpd_now.artist + .. " - " .. + mpd_now.title .. " ") .. markup.font("Roboto 5", " ")) + play_pause_icon:set_image(theme.pause) + elseif mpd_now.state == "pause" then + widget:set_markup(markup.font("Roboto 4", " ") .. + markup.font(theme.taglist_font, " MPD PAUSED ") .. + markup.font("Roboto 5", " ")) + play_pause_icon:set_image(theme.play) + else + widget:set_markup("") + play_pause_icon:set_image(theme.play) + end + end +}) +local musicbg = wibox.container.background(theme.mpd.widget, theme.bg_focus, gears.shape.rectangle) +local musicwidget = wibox.container.margin(musicbg, dpi(0), dpi(0), dpi(5), dpi(5)) + +musicwidget:buttons(my_table.join(awful.button({ }, 1, +function () awful.spawn(theme.musicplr) end))) +prev_icon:buttons(my_table.join(awful.button({}, 1, +function () + os.execute("mpc prev") + theme.mpd.update() +end))) +next_icon:buttons(my_table.join(awful.button({}, 1, +function () + os.execute("mpc next") + theme.mpd.update() +end))) +stop_icon:buttons(my_table.join(awful.button({}, 1, +function () + play_pause_icon:set_image(theme.play) + os.execute("mpc stop") + theme.mpd.update() +end))) +play_pause_icon:buttons(my_table.join(awful.button({}, 1, +function () + os.execute("mpc toggle") + theme.mpd.update() +end))) + +-- Battery +local bat = lain.widget.bat({ + settings = function() + bat_header = " Bat " + bat_p = bat_now.perc .. " " + if bat_now.ac_status == 1 then + bat_p = bat_p .. "Plugged " + end + widget:set_markup(markup.font(theme.font, markup(blue, bat_header) .. bat_p)) + end +}) + +-- / fs +--[[ commented because it needs Gio/Glib >= 2.54 +theme.fs = lain.widget.fs({ + notification_preset = { bg = theme.bg_normal, font = "Monospace 9" }, +}) +--]] + +-- ALSA volume bar +theme.volume = lain.widget.alsabar({ + notification_preset = { font = "Monospace 9"}, + --togglechannel = "IEC958,3", + width = dpi(80), height = dpi(10), border_width = dpi(0), + colors = { + background = "#383838", + unmute = "#80CCE6", + mute = "#FF9F9F" + }, +}) +theme.volume.bar.paddings = dpi(0) +theme.volume.bar.margins = dpi(5) +local volumewidget = wibox.container.background(theme.volume.bar, theme.bg_focus, gears.shape.rectangle) +volumewidget = wibox.container.margin(volumewidget, dpi(0), dpi(0), dpi(5), dpi(5)) + +-- CPU +local cpu_icon = wibox.widget.imagebox(theme.cpu) +local cpu = lain.widget.cpu({ + settings = function() + widget:set_markup(space3 .. markup.font(theme.font, "CPU " .. cpu_now.usage + .. "% ") .. markup.font("Roboto 5", " ")) + end +}) +local cpubg = wibox.container.background(cpu.widget, theme.bg_focus, gears.shape.rectangle) +local cpuwidget = wibox.container.margin(cpubg, dpi(0), dpi(0), dpi(5), dpi(5)) + +-- Net +local netdown_icon = wibox.widget.imagebox(theme.net_down) +local netup_icon = wibox.widget.imagebox(theme.net_up) +local net = lain.widget.net({ + settings = function() + widget:set_markup(markup.font("Roboto 1", " ") .. markup.font(theme.font, net_now.received .. " - " + .. net_now.sent) .. markup.font("Roboto 2", " ")) + end +}) +local netbg = wibox.container.background(net.widget, theme.bg_focus, gears.shape.rectangle) +local networkwidget = wibox.container.margin(netbg, dpi(0), dpi(0), dpi(5), dpi(5)) + +-- Weather +--[[ to be set before use +theme.weather = lain.widget.weather({ + --APPID = + city_id = 2643743, -- placeholder (London) + notification_preset = { font = "Monospace 9", position = "bottom_right" }, +}) +--]] + +-- Launcher +local mylauncher = awful.widget.button({ image = theme.awesome_icon_launcher }) +mylauncher:connect_signal("button::press", function() awful.util.mymainmenu:toggle() end) + +-- Separators +local first = wibox.widget.textbox(' ') +local spr_small = wibox.widget.imagebox(theme.spr_small) +local spr_very_small = wibox.widget.imagebox(theme.spr_very_small) +local spr_right = wibox.widget.imagebox(theme.spr_right) +local spr_bottom_right = wibox.widget.imagebox(theme.spr_bottom_right) +local spr_left = wibox.widget.imagebox(theme.spr_left) +local bar = wibox.widget.imagebox(theme.bar) +local bottom_bar = wibox.widget.imagebox(theme.bottom_bar) + +local barcolor = gears.color({ + type = "linear", + from = { dpi(32), 0 }, + to = { dpi(32), dpi(32) }, + stops = { {0, theme.bg_focus}, {0.25, "#505050"}, {1, theme.bg_focus} } +}) + +function theme.at_screen_connect(s) + -- Quake application + s.quake = lain.util.quake({ app = awful.util.terminal }) + + -- If wallpaper is a function, call it with the screen + local wallpaper = theme.wallpaper + if type(wallpaper) == "function" then + wallpaper = wallpaper(s) + end + gears.wallpaper.maximized(wallpaper, s, true) + + -- Tags + awful.tag(awful.util.tagnames, s, awful.layout.layouts[1]) + + -- Create a promptbox for each screen + s.mypromptbox = awful.widget.prompt() + -- Create an imagebox widget which will contains an icon indicating which layout we're using. + -- We need one layoutbox per screen. + s.mylayoutbox = awful.widget.layoutbox(s) + s.mylayoutbox:buttons(my_table.join( + awful.button({}, 1, function () awful.layout.inc( 1) end), + awful.button({}, 2, function () awful.layout.set( awful.layout.layouts[1] ) end), + awful.button({}, 3, function () awful.layout.inc(-1) end), + awful.button({}, 4, function () awful.layout.inc( 1) end), + awful.button({}, 5, function () awful.layout.inc(-1) end))) + -- Create a taglist widget + s.mytaglist = awful.widget.taglist(s, awful.widget.taglist.filter.all, awful.util.taglist_buttons, { bg_focus = barcolor }) + + mytaglistcont = wibox.container.background(s.mytaglist, theme.bg_focus, gears.shape.rectangle) + s.mytag = wibox.container.margin(mytaglistcont, dpi(0), dpi(0), dpi(5), dpi(5)) + + -- Create a tasklist widget + s.mytasklist = awful.widget.tasklist(s, awful.widget.tasklist.filter.currenttags, awful.util.tasklist_buttons, { bg_focus = theme.bg_focus, shape = gears.shape.rectangle, shape_border_width = 5, shape_border_color = theme.tasklist_bg_normal, align = "center" }) + + -- Create the wibox + s.mywibox = awful.wibar({ position = "top", screen = s, height = dpi(32) }) + + -- Add widgets to the wibox + s.mywibox:setup { + layout = wibox.layout.align.horizontal, + { -- Left widgets + layout = wibox.layout.fixed.horizontal, + first, + s.mytag, + spr_small, + s.mylayoutbox, + spr_small, + s.mypromptbox, + }, + nil, -- Middle widget + { -- Right widgets + layout = wibox.layout.fixed.horizontal, + wibox.widget.systray(), + --theme.mail.widget, + --bat.widget, + spr_right, + musicwidget, + bar, + prev_icon, + next_icon, + stop_icon, + play_pause_icon, + bar, + mpd_icon, + bar, + spr_very_small, + volumewidget, + spr_left, + }, + } + + -- Create the bottom wibox + s.mybottomwibox = awful.wibar({ position = "bottom", screen = s, border_width = dpi(0), height = dpi(32) }) + s.borderwibox = awful.wibar({ position = "bottom", screen = s, height = dpi(1), bg = theme.fg_focus, x = dpi(0), y = dpi(33)}) + + -- Add widgets to the bottom wibox + s.mybottomwibox:setup { + layout = wibox.layout.align.horizontal, + { -- Left widgets + layout = wibox.layout.fixed.horizontal, + mylauncher, + }, + s.mytasklist, -- Middle widget + { -- Right widgets + layout = wibox.layout.fixed.horizontal, + spr_bottom_right, + netdown_icon, + networkwidget, + netup_icon, + bottom_bar, + cpu_icon, + cpuwidget, + bottom_bar, + calendar_icon, + calendarwidget, + bottom_bar, + clock_icon, + clockwidget, + }, + } +end + +return theme diff --git a/.config/awesome/themes/holo/wall.png b/.config/awesome/themes/holo/wall.png new file mode 100755 index 0000000..7ec8009 Binary files /dev/null and b/.config/awesome/themes/holo/wall.png differ diff --git a/.config/awesome/themes/multicolor/icons/ac.png b/.config/awesome/themes/multicolor/icons/ac.png new file mode 100755 index 0000000..272b832 Binary files /dev/null and b/.config/awesome/themes/multicolor/icons/ac.png differ diff --git a/.config/awesome/themes/multicolor/icons/bat.png b/.config/awesome/themes/multicolor/icons/bat.png new file mode 100755 index 0000000..bd63927 Binary files /dev/null and b/.config/awesome/themes/multicolor/icons/bat.png differ diff --git a/.config/awesome/themes/multicolor/icons/clock.png b/.config/awesome/themes/multicolor/icons/clock.png new file mode 100755 index 0000000..22aef71 Binary files /dev/null and b/.config/awesome/themes/multicolor/icons/clock.png differ diff --git a/.config/awesome/themes/multicolor/icons/cpu.png b/.config/awesome/themes/multicolor/icons/cpu.png new file mode 100755 index 0000000..e3794ca Binary files /dev/null and b/.config/awesome/themes/multicolor/icons/cpu.png differ diff --git a/.config/awesome/themes/multicolor/icons/dish.png b/.config/awesome/themes/multicolor/icons/dish.png new file mode 100755 index 0000000..c71499b Binary files /dev/null and b/.config/awesome/themes/multicolor/icons/dish.png differ diff --git a/.config/awesome/themes/multicolor/icons/dwindle.png b/.config/awesome/themes/multicolor/icons/dwindle.png new file mode 100755 index 0000000..94d8382 Binary files /dev/null and b/.config/awesome/themes/multicolor/icons/dwindle.png differ diff --git a/.config/awesome/themes/multicolor/icons/fairh.png b/.config/awesome/themes/multicolor/icons/fairh.png new file mode 100755 index 0000000..4468efc Binary files /dev/null and b/.config/awesome/themes/multicolor/icons/fairh.png differ diff --git a/.config/awesome/themes/multicolor/icons/fairv.png b/.config/awesome/themes/multicolor/icons/fairv.png new file mode 100755 index 0000000..7c8728e Binary files /dev/null and b/.config/awesome/themes/multicolor/icons/fairv.png differ diff --git a/.config/awesome/themes/multicolor/icons/floating.png b/.config/awesome/themes/multicolor/icons/floating.png new file mode 100755 index 0000000..7593a2a Binary files /dev/null and b/.config/awesome/themes/multicolor/icons/floating.png differ diff --git a/.config/awesome/themes/multicolor/icons/fs.png b/.config/awesome/themes/multicolor/icons/fs.png new file mode 100755 index 0000000..1c1b13e Binary files /dev/null and b/.config/awesome/themes/multicolor/icons/fs.png differ diff --git a/.config/awesome/themes/multicolor/icons/fullscreen.png b/.config/awesome/themes/multicolor/icons/fullscreen.png new file mode 100755 index 0000000..f63a69c Binary files /dev/null and b/.config/awesome/themes/multicolor/icons/fullscreen.png differ diff --git a/.config/awesome/themes/multicolor/icons/magnifier.png b/.config/awesome/themes/multicolor/icons/magnifier.png new file mode 100755 index 0000000..8819554 Binary files /dev/null and b/.config/awesome/themes/multicolor/icons/magnifier.png differ diff --git a/.config/awesome/themes/multicolor/icons/mail.png b/.config/awesome/themes/multicolor/icons/mail.png new file mode 100755 index 0000000..25021f5 Binary files /dev/null and b/.config/awesome/themes/multicolor/icons/mail.png differ diff --git a/.config/awesome/themes/multicolor/icons/max.png b/.config/awesome/themes/multicolor/icons/max.png new file mode 100755 index 0000000..4b6a8c3 Binary files /dev/null and b/.config/awesome/themes/multicolor/icons/max.png differ diff --git a/.config/awesome/themes/multicolor/icons/mem.png b/.config/awesome/themes/multicolor/icons/mem.png new file mode 100755 index 0000000..d04ee11 Binary files /dev/null and b/.config/awesome/themes/multicolor/icons/mem.png differ diff --git a/.config/awesome/themes/multicolor/icons/net_down.png b/.config/awesome/themes/multicolor/icons/net_down.png new file mode 100755 index 0000000..09433b1 Binary files /dev/null and b/.config/awesome/themes/multicolor/icons/net_down.png differ diff --git a/.config/awesome/themes/multicolor/icons/net_up.png b/.config/awesome/themes/multicolor/icons/net_up.png new file mode 100755 index 0000000..395d014 Binary files /dev/null and b/.config/awesome/themes/multicolor/icons/net_up.png differ diff --git a/.config/awesome/themes/multicolor/icons/note.png b/.config/awesome/themes/multicolor/icons/note.png new file mode 100755 index 0000000..2f41eb3 Binary files /dev/null and b/.config/awesome/themes/multicolor/icons/note.png differ diff --git a/.config/awesome/themes/multicolor/icons/note_on.png b/.config/awesome/themes/multicolor/icons/note_on.png new file mode 100755 index 0000000..264d2c8 Binary files /dev/null and b/.config/awesome/themes/multicolor/icons/note_on.png differ diff --git a/.config/awesome/themes/multicolor/icons/spiral.png b/.config/awesome/themes/multicolor/icons/spiral.png new file mode 100755 index 0000000..6a1ebf1 Binary files /dev/null and b/.config/awesome/themes/multicolor/icons/spiral.png differ diff --git a/.config/awesome/themes/multicolor/icons/spkr.png b/.config/awesome/themes/multicolor/icons/spkr.png new file mode 100755 index 0000000..80c20b0 Binary files /dev/null and b/.config/awesome/themes/multicolor/icons/spkr.png differ diff --git a/.config/awesome/themes/multicolor/icons/square_a.png b/.config/awesome/themes/multicolor/icons/square_a.png new file mode 100755 index 0000000..1774d95 Binary files /dev/null and b/.config/awesome/themes/multicolor/icons/square_a.png differ diff --git a/.config/awesome/themes/multicolor/icons/square_b.png b/.config/awesome/themes/multicolor/icons/square_b.png new file mode 100755 index 0000000..b47e9f3 Binary files /dev/null and b/.config/awesome/themes/multicolor/icons/square_b.png differ diff --git a/.config/awesome/themes/multicolor/icons/submenu.png b/.config/awesome/themes/multicolor/icons/submenu.png new file mode 100755 index 0000000..7c81cab Binary files /dev/null and b/.config/awesome/themes/multicolor/icons/submenu.png differ diff --git a/.config/awesome/themes/multicolor/icons/temp.png b/.config/awesome/themes/multicolor/icons/temp.png new file mode 100755 index 0000000..6c8f8bd Binary files /dev/null and b/.config/awesome/themes/multicolor/icons/temp.png differ diff --git a/.config/awesome/themes/multicolor/icons/tile.png b/.config/awesome/themes/multicolor/icons/tile.png new file mode 100755 index 0000000..64103d9 Binary files /dev/null and b/.config/awesome/themes/multicolor/icons/tile.png differ diff --git a/.config/awesome/themes/multicolor/icons/tilebottom.png b/.config/awesome/themes/multicolor/icons/tilebottom.png new file mode 100755 index 0000000..9363636 Binary files /dev/null and b/.config/awesome/themes/multicolor/icons/tilebottom.png differ diff --git a/.config/awesome/themes/multicolor/icons/tileleft.png b/.config/awesome/themes/multicolor/icons/tileleft.png new file mode 100755 index 0000000..9331898 Binary files /dev/null and b/.config/awesome/themes/multicolor/icons/tileleft.png differ diff --git a/.config/awesome/themes/multicolor/icons/tiletop.png b/.config/awesome/themes/multicolor/icons/tiletop.png new file mode 100755 index 0000000..1cef886 Binary files /dev/null and b/.config/awesome/themes/multicolor/icons/tiletop.png differ diff --git a/.config/awesome/themes/multicolor/icons/titlebar/close_focus.png b/.config/awesome/themes/multicolor/icons/titlebar/close_focus.png new file mode 100755 index 0000000..cd297db Binary files /dev/null and b/.config/awesome/themes/multicolor/icons/titlebar/close_focus.png differ diff --git a/.config/awesome/themes/multicolor/icons/titlebar/close_normal.png b/.config/awesome/themes/multicolor/icons/titlebar/close_normal.png new file mode 100755 index 0000000..5448ed8 Binary files /dev/null and b/.config/awesome/themes/multicolor/icons/titlebar/close_normal.png differ diff --git a/.config/awesome/themes/multicolor/icons/titlebar/floating_focus_active.png b/.config/awesome/themes/multicolor/icons/titlebar/floating_focus_active.png new file mode 100755 index 0000000..ae5a8e2 Binary files /dev/null and b/.config/awesome/themes/multicolor/icons/titlebar/floating_focus_active.png differ diff --git a/.config/awesome/themes/multicolor/icons/titlebar/floating_focus_inactive.png b/.config/awesome/themes/multicolor/icons/titlebar/floating_focus_inactive.png new file mode 100755 index 0000000..c54eb0c Binary files /dev/null and b/.config/awesome/themes/multicolor/icons/titlebar/floating_focus_inactive.png differ diff --git a/.config/awesome/themes/multicolor/icons/titlebar/floating_normal_active.png b/.config/awesome/themes/multicolor/icons/titlebar/floating_normal_active.png new file mode 100755 index 0000000..62342d1 Binary files /dev/null and b/.config/awesome/themes/multicolor/icons/titlebar/floating_normal_active.png differ diff --git a/.config/awesome/themes/multicolor/icons/titlebar/floating_normal_inactive.png b/.config/awesome/themes/multicolor/icons/titlebar/floating_normal_inactive.png new file mode 100755 index 0000000..e2bbdfa Binary files /dev/null and b/.config/awesome/themes/multicolor/icons/titlebar/floating_normal_inactive.png differ diff --git a/.config/awesome/themes/multicolor/icons/titlebar/maximized_focus_active.png b/.config/awesome/themes/multicolor/icons/titlebar/maximized_focus_active.png new file mode 100755 index 0000000..957298b Binary files /dev/null and b/.config/awesome/themes/multicolor/icons/titlebar/maximized_focus_active.png differ diff --git a/.config/awesome/themes/multicolor/icons/titlebar/maximized_focus_inactive.png b/.config/awesome/themes/multicolor/icons/titlebar/maximized_focus_inactive.png new file mode 100755 index 0000000..1187229 Binary files /dev/null and b/.config/awesome/themes/multicolor/icons/titlebar/maximized_focus_inactive.png differ diff --git a/.config/awesome/themes/multicolor/icons/titlebar/maximized_normal_active.png b/.config/awesome/themes/multicolor/icons/titlebar/maximized_normal_active.png new file mode 100755 index 0000000..a705f81 Binary files /dev/null and b/.config/awesome/themes/multicolor/icons/titlebar/maximized_normal_active.png differ diff --git a/.config/awesome/themes/multicolor/icons/titlebar/maximized_normal_inactive.png b/.config/awesome/themes/multicolor/icons/titlebar/maximized_normal_inactive.png new file mode 100755 index 0000000..4c1ab1f Binary files /dev/null and b/.config/awesome/themes/multicolor/icons/titlebar/maximized_normal_inactive.png differ diff --git a/.config/awesome/themes/multicolor/icons/titlebar/minimize_focus.png b/.config/awesome/themes/multicolor/icons/titlebar/minimize_focus.png new file mode 100755 index 0000000..bbe8cff Binary files /dev/null and b/.config/awesome/themes/multicolor/icons/titlebar/minimize_focus.png differ diff --git a/.config/awesome/themes/multicolor/icons/titlebar/minimize_normal.png b/.config/awesome/themes/multicolor/icons/titlebar/minimize_normal.png new file mode 100755 index 0000000..36621d0 Binary files /dev/null and b/.config/awesome/themes/multicolor/icons/titlebar/minimize_normal.png differ diff --git a/.config/awesome/themes/multicolor/icons/titlebar/ontop_focus_active.png b/.config/awesome/themes/multicolor/icons/titlebar/ontop_focus_active.png new file mode 100755 index 0000000..25a3080 Binary files /dev/null and b/.config/awesome/themes/multicolor/icons/titlebar/ontop_focus_active.png differ diff --git a/.config/awesome/themes/multicolor/icons/titlebar/ontop_focus_inactive.png b/.config/awesome/themes/multicolor/icons/titlebar/ontop_focus_inactive.png new file mode 100755 index 0000000..d3c077a Binary files /dev/null and b/.config/awesome/themes/multicolor/icons/titlebar/ontop_focus_inactive.png differ diff --git a/.config/awesome/themes/multicolor/icons/titlebar/ontop_normal_active.png b/.config/awesome/themes/multicolor/icons/titlebar/ontop_normal_active.png new file mode 100755 index 0000000..117a203 Binary files /dev/null and b/.config/awesome/themes/multicolor/icons/titlebar/ontop_normal_active.png differ diff --git a/.config/awesome/themes/multicolor/icons/titlebar/ontop_normal_inactive.png b/.config/awesome/themes/multicolor/icons/titlebar/ontop_normal_inactive.png new file mode 100755 index 0000000..d3a10c8 Binary files /dev/null and b/.config/awesome/themes/multicolor/icons/titlebar/ontop_normal_inactive.png differ diff --git a/.config/awesome/themes/multicolor/icons/titlebar/sticky_focus_active.png b/.config/awesome/themes/multicolor/icons/titlebar/sticky_focus_active.png new file mode 100755 index 0000000..147ce6a Binary files /dev/null and b/.config/awesome/themes/multicolor/icons/titlebar/sticky_focus_active.png differ diff --git a/.config/awesome/themes/multicolor/icons/titlebar/sticky_focus_inactive.png b/.config/awesome/themes/multicolor/icons/titlebar/sticky_focus_inactive.png new file mode 100755 index 0000000..396628a Binary files /dev/null and b/.config/awesome/themes/multicolor/icons/titlebar/sticky_focus_inactive.png differ diff --git a/.config/awesome/themes/multicolor/icons/titlebar/sticky_normal_active.png b/.config/awesome/themes/multicolor/icons/titlebar/sticky_normal_active.png new file mode 100755 index 0000000..bdb5595 Binary files /dev/null and b/.config/awesome/themes/multicolor/icons/titlebar/sticky_normal_active.png differ diff --git a/.config/awesome/themes/multicolor/icons/titlebar/sticky_normal_inactive.png b/.config/awesome/themes/multicolor/icons/titlebar/sticky_normal_inactive.png new file mode 100755 index 0000000..a96b9b1 Binary files /dev/null and b/.config/awesome/themes/multicolor/icons/titlebar/sticky_normal_inactive.png differ diff --git a/.config/awesome/themes/multicolor/theme.lua b/.config/awesome/themes/multicolor/theme.lua new file mode 100755 index 0000000..e7cbbce --- /dev/null +++ b/.config/awesome/themes/multicolor/theme.lua @@ -0,0 +1,350 @@ +--[[ + + Multicolor Awesome WM theme 2.0 + github.com/lcpz + +--]] + +local gears = require("gears") +local lain = require("lain") +local awful = require("awful") +local wibox = require("wibox") +local dpi = require("beautiful.xresources").apply_dpi + +local os = os +local my_table = awful.util.table or gears.table -- 4.{0,1} compatibility + +local theme = {} +theme.confdir = os.getenv("HOME") .. "/.config/awesome/themes/multicolor" +theme.wallpaper = theme.confdir .. "/wall.png" +theme.font = "Terminus 8" +theme.menu_bg_normal = "#000000" +theme.menu_bg_focus = "#000000" +theme.bg_normal = "#000000" +theme.bg_focus = "#000000" +theme.bg_urgent = "#000000" +theme.fg_normal = "#aaaaaa" +theme.fg_focus = "#ff8c00" +theme.fg_urgent = "#af1d18" +theme.fg_minimize = "#ffffff" +theme.border_width = dpi(1) +theme.border_normal = "#1c2022" +theme.border_focus = "#606060" +theme.border_marked = "#3ca4d8" +theme.menu_border_width = 0 +theme.menu_width = dpi(130) +theme.menu_submenu_icon = theme.confdir .. "/icons/submenu.png" +theme.menu_fg_normal = "#aaaaaa" +theme.menu_fg_focus = "#ff8c00" +theme.menu_bg_normal = "#050505dd" +theme.menu_bg_focus = "#050505dd" +theme.widget_temp = theme.confdir .. "/icons/temp.png" +theme.widget_uptime = theme.confdir .. "/icons/ac.png" +theme.widget_cpu = theme.confdir .. "/icons/cpu.png" +theme.widget_weather = theme.confdir .. "/icons/dish.png" +theme.widget_fs = theme.confdir .. "/icons/fs.png" +theme.widget_mem = theme.confdir .. "/icons/mem.png" +theme.widget_note = theme.confdir .. "/icons/note.png" +theme.widget_note_on = theme.confdir .. "/icons/note_on.png" +theme.widget_netdown = theme.confdir .. "/icons/net_down.png" +theme.widget_netup = theme.confdir .. "/icons/net_up.png" +theme.widget_mail = theme.confdir .. "/icons/mail.png" +theme.widget_batt = theme.confdir .. "/icons/bat.png" +theme.widget_clock = theme.confdir .. "/icons/clock.png" +theme.widget_vol = theme.confdir .. "/icons/spkr.png" +theme.taglist_squares_sel = theme.confdir .. "/icons/square_a.png" +theme.taglist_squares_unsel = theme.confdir .. "/icons/square_b.png" +theme.tasklist_plain_task_name = true +theme.tasklist_disable_icon = true +theme.useless_gap = 0 +theme.layout_tile = theme.confdir .. "/icons/tile.png" +theme.layout_tilegaps = theme.confdir .. "/icons/tilegaps.png" +theme.layout_tileleft = theme.confdir .. "/icons/tileleft.png" +theme.layout_tilebottom = theme.confdir .. "/icons/tilebottom.png" +theme.layout_tiletop = theme.confdir .. "/icons/tiletop.png" +theme.layout_fairv = theme.confdir .. "/icons/fairv.png" +theme.layout_fairh = theme.confdir .. "/icons/fairh.png" +theme.layout_spiral = theme.confdir .. "/icons/spiral.png" +theme.layout_dwindle = theme.confdir .. "/icons/dwindle.png" +theme.layout_max = theme.confdir .. "/icons/max.png" +theme.layout_fullscreen = theme.confdir .. "/icons/fullscreen.png" +theme.layout_magnifier = theme.confdir .. "/icons/magnifier.png" +theme.layout_floating = theme.confdir .. "/icons/floating.png" +theme.titlebar_close_button_normal = theme.confdir .. "/icons/titlebar/close_normal.png" +theme.titlebar_close_button_focus = theme.confdir .. "/icons/titlebar/close_focus.png" +theme.titlebar_minimize_button_normal = theme.confdir .. "/icons/titlebar/minimize_normal.png" +theme.titlebar_minimize_button_focus = theme.confdir .. "/icons/titlebar/minimize_focus.png" +theme.titlebar_ontop_button_normal_inactive = theme.confdir .. "/icons/titlebar/ontop_normal_inactive.png" +theme.titlebar_ontop_button_focus_inactive = theme.confdir .. "/icons/titlebar/ontop_focus_inactive.png" +theme.titlebar_ontop_button_normal_active = theme.confdir .. "/icons/titlebar/ontop_normal_active.png" +theme.titlebar_ontop_button_focus_active = theme.confdir .. "/icons/titlebar/ontop_focus_active.png" +theme.titlebar_sticky_button_normal_inactive = theme.confdir .. "/icons/titlebar/sticky_normal_inactive.png" +theme.titlebar_sticky_button_focus_inactive = theme.confdir .. "/icons/titlebar/sticky_focus_inactive.png" +theme.titlebar_sticky_button_normal_active = theme.confdir .. "/icons/titlebar/sticky_normal_active.png" +theme.titlebar_sticky_button_focus_active = theme.confdir .. "/icons/titlebar/sticky_focus_active.png" +theme.titlebar_floating_button_normal_inactive = theme.confdir .. "/icons/titlebar/floating_normal_inactive.png" +theme.titlebar_floating_button_focus_inactive = theme.confdir .. "/icons/titlebar/floating_focus_inactive.png" +theme.titlebar_floating_button_normal_active = theme.confdir .. "/icons/titlebar/floating_normal_active.png" +theme.titlebar_floating_button_focus_active = theme.confdir .. "/icons/titlebar/floating_focus_active.png" +theme.titlebar_maximized_button_normal_inactive = theme.confdir .. "/icons/titlebar/maximized_normal_inactive.png" +theme.titlebar_maximized_button_focus_inactive = theme.confdir .. "/icons/titlebar/maximized_focus_inactive.png" +theme.titlebar_maximized_button_normal_active = theme.confdir .. "/icons/titlebar/maximized_normal_active.png" +theme.titlebar_maximized_button_focus_active = theme.confdir .. "/icons/titlebar/maximized_focus_active.png" + +local markup = lain.util.markup + +-- Textclock +os.setlocale(os.getenv("LANG")) -- to localize the clock +local clockicon = wibox.widget.imagebox(theme.widget_clock) +local mytextclock = wibox.widget.textclock(markup("#7788af", "%A %d %B ") .. markup("#ab7367", ">") .. markup("#de5e1e", " %H:%M ")) +mytextclock.font = theme.font + +-- Calendar +theme.cal = lain.widget.cal({ + attach_to = { mytextclock }, + notification_preset = { + font = "Terminus 10", + fg = theme.fg_normal, + bg = theme.bg_normal + } +}) + +-- Weather +--[[ to be set before use +local weathericon = wibox.widget.imagebox(theme.widget_weather) +theme.weather = lain.widget.weather({ + city_id = 2643743, -- placeholder (London) + notification_preset = { font = "Terminus 10", fg = theme.fg_normal }, + weather_na_markup = markup.fontfg(theme.font, "#eca4c4", "N/A "), + settings = function() + descr = weather_now["weather"][1]["description"]:lower() + units = math.floor(weather_now["main"]["temp"]) + widget:set_markup(markup.fontfg(theme.font, "#eca4c4", descr .. " @ " .. units .. "°C ")) + end +}) +--]] + +-- / fs +--[[ commented because it needs Gio/Glib >= 2.54 +local fsicon = wibox.widget.imagebox(theme.widget_fs) +theme.fs = lain.widget.fs({ + notification_preset = { font = "Terminus 10", fg = theme.fg_normal }, + settings = function() + widget:set_markup(markup.fontfg(theme.font, "#80d9d8", string.format("%.1f", fs_now["/"].used) .. "% ")) + end +}) +--]] + +-- Mail IMAP check +--[[ to be set before use +local mailicon = wibox.widget.imagebox() +theme.mail = lain.widget.imap({ + timeout = 180, + server = "server", + mail = "mail", + password = "keyring get mail", + settings = function() + if mailcount > 0 then + mailicon:set_image(theme.widget_mail) + widget:set_markup(markup.fontfg(theme.font, "#cccccc", mailcount .. " ")) + else + widget:set_text("") + --mailicon:set_image() -- not working in 4.0 + mailicon._private.image = nil + mailicon:emit_signal("widget::redraw_needed") + mailicon:emit_signal("widget::layout_changed") + end + end +}) +--]] + +-- CPU +local cpuicon = wibox.widget.imagebox(theme.widget_cpu) +local cpu = lain.widget.cpu({ + settings = function() + widget:set_markup(markup.fontfg(theme.font, "#e33a6e", cpu_now.usage .. "% ")) + end +}) + +-- Coretemp +local tempicon = wibox.widget.imagebox(theme.widget_temp) +local temp = lain.widget.temp({ + settings = function() + widget:set_markup(markup.fontfg(theme.font, "#f1af5f", coretemp_now .. "°C ")) + end +}) + +-- Battery +local baticon = wibox.widget.imagebox(theme.widget_batt) +local bat = lain.widget.bat({ + settings = function() + local perc = bat_now.perc ~= "N/A" and bat_now.perc .. "%" or bat_now.perc + + if bat_now.ac_status == 1 then + perc = perc .. " plug" + end + + widget:set_markup(markup.fontfg(theme.font, theme.fg_normal, perc .. " ")) + end +}) + +-- ALSA volume +local volicon = wibox.widget.imagebox(theme.widget_vol) +theme.volume = lain.widget.alsa({ + settings = function() + if volume_now.status == "off" then + volume_now.level = volume_now.level .. "M" + end + + widget:set_markup(markup.fontfg(theme.font, "#7493d2", volume_now.level .. "% ")) + end +}) + +-- Net +local netdownicon = wibox.widget.imagebox(theme.widget_netdown) +local netdowninfo = wibox.widget.textbox() +local netupicon = wibox.widget.imagebox(theme.widget_netup) +local netupinfo = lain.widget.net({ + settings = function() + --[[ uncomment if using the weather widget + if iface ~= "network off" and + string.match(theme.weather.widget.text, "N/A") + then + theme.weather.update() + end + --]] + + widget:set_markup(markup.fontfg(theme.font, "#e54c62", net_now.sent .. " ")) + netdowninfo:set_markup(markup.fontfg(theme.font, "#87af5f", net_now.received .. " ")) + end +}) + +-- MEM +local memicon = wibox.widget.imagebox(theme.widget_mem) +local memory = lain.widget.mem({ + settings = function() + widget:set_markup(markup.fontfg(theme.font, "#e0da37", mem_now.used .. "M ")) + end +}) + +-- MPD +local mpdicon = wibox.widget.imagebox() +theme.mpd = lain.widget.mpd({ + settings = function() + mpd_notification_preset = { + text = string.format("%s [%s] - %s\n%s", mpd_now.artist, + mpd_now.album, mpd_now.date, mpd_now.title) + } + + if mpd_now.state == "play" then + artist = mpd_now.artist .. " > " + title = mpd_now.title .. " " + mpdicon:set_image(theme.widget_note_on) + elseif mpd_now.state == "pause" then + artist = "mpd " + title = "paused " + else + artist = "" + title = "" + --mpdicon:set_image() -- not working in 4.0 + mpdicon._private.image = nil + mpdicon:emit_signal("widget::redraw_needed") + mpdicon:emit_signal("widget::layout_changed") + end + widget:set_markup(markup.fontfg(theme.font, "#e54c62", artist) .. markup.fontfg(theme.font, "#b2b2b2", title)) + end +}) + +function theme.at_screen_connect(s) + -- Quake application + s.quake = lain.util.quake({ app = awful.util.terminal }) + + -- If wallpaper is a function, call it with the screen + local wallpaper = theme.wallpaper + if type(wallpaper) == "function" then + wallpaper = wallpaper(s) + end + gears.wallpaper.maximized(wallpaper, s, true) + + -- Tags + awful.tag(awful.util.tagnames, s, awful.layout.layouts[1]) + + -- Create a promptbox for each screen + s.mypromptbox = awful.widget.prompt() + -- Create an imagebox widget which will contains an icon indicating which layout we're using. + -- We need one layoutbox per screen. + s.mylayoutbox = awful.widget.layoutbox(s) + s.mylayoutbox:buttons(my_table.join( + awful.button({}, 1, function () awful.layout.inc( 1) end), + awful.button({}, 2, function () awful.layout.set( awful.layout.layouts[1] ) end), + awful.button({}, 3, function () awful.layout.inc(-1) end), + awful.button({}, 4, function () awful.layout.inc( 1) end), + awful.button({}, 5, function () awful.layout.inc(-1) end))) + -- Create a taglist widget + s.mytaglist = awful.widget.taglist(s, awful.widget.taglist.filter.all, awful.util.taglist_buttons) + + -- Create a tasklist widget + s.mytasklist = awful.widget.tasklist(s, awful.widget.tasklist.filter.currenttags, awful.util.tasklist_buttons) + + -- Create the wibox + s.mywibox = awful.wibar({ position = "top", screen = s, height = dpi(19), bg = theme.bg_normal, fg = theme.fg_normal }) + + -- Add widgets to the wibox + s.mywibox:setup { + layout = wibox.layout.align.horizontal, + { -- Left widgets + layout = wibox.layout.fixed.horizontal, + --s.mylayoutbox, + s.mytaglist, + s.mypromptbox, + mpdicon, + theme.mpd.widget, + }, + --s.mytasklist, -- Middle widget + nil, + { -- Right widgets + layout = wibox.layout.fixed.horizontal, + wibox.widget.systray(), + --mailicon, + --theme.mail.widget, + netdownicon, + netdowninfo, + netupicon, + netupinfo.widget, + volicon, + theme.volume.widget, + memicon, + memory.widget, + cpuicon, + cpu.widget, + --fsicon, + --theme.fs.widget, + --weathericon, + --theme.weather.widget, + tempicon, + temp.widget, + baticon, + bat.widget, + clockicon, + mytextclock, + }, + } + + -- Create the bottom wibox + s.mybottomwibox = awful.wibar({ position = "bottom", screen = s, border_width = 0, height = dpi(20), bg = theme.bg_normal, fg = theme.fg_normal }) + + -- Add widgets to the bottom wibox + s.mybottomwibox:setup { + layout = wibox.layout.align.horizontal, + { -- Left widgets + layout = wibox.layout.fixed.horizontal, + }, + s.mytasklist, -- Middle widget + { -- Right widgets + layout = wibox.layout.fixed.horizontal, + s.mylayoutbox, + }, + } +end + +return theme diff --git a/.config/awesome/themes/multicolor/wall.png b/.config/awesome/themes/multicolor/wall.png new file mode 100755 index 0000000..a3188d0 Binary files /dev/null and b/.config/awesome/themes/multicolor/wall.png differ diff --git a/.config/awesome/themes/powerarrow-dark/icons/ac.png b/.config/awesome/themes/powerarrow-dark/icons/ac.png new file mode 100755 index 0000000..96efcb4 Binary files /dev/null and b/.config/awesome/themes/powerarrow-dark/icons/ac.png differ diff --git a/.config/awesome/themes/powerarrow-dark/icons/battery.png b/.config/awesome/themes/powerarrow-dark/icons/battery.png new file mode 100755 index 0000000..8c85596 Binary files /dev/null and b/.config/awesome/themes/powerarrow-dark/icons/battery.png differ diff --git a/.config/awesome/themes/powerarrow-dark/icons/battery_empty.png b/.config/awesome/themes/powerarrow-dark/icons/battery_empty.png new file mode 100755 index 0000000..00821c9 Binary files /dev/null and b/.config/awesome/themes/powerarrow-dark/icons/battery_empty.png differ diff --git a/.config/awesome/themes/powerarrow-dark/icons/battery_low.png b/.config/awesome/themes/powerarrow-dark/icons/battery_low.png new file mode 100755 index 0000000..29f3fc5 Binary files /dev/null and b/.config/awesome/themes/powerarrow-dark/icons/battery_low.png differ diff --git a/.config/awesome/themes/powerarrow-dark/icons/centerfair.png b/.config/awesome/themes/powerarrow-dark/icons/centerfair.png new file mode 100755 index 0000000..c4f64b0 Binary files /dev/null and b/.config/awesome/themes/powerarrow-dark/icons/centerfair.png differ diff --git a/.config/awesome/themes/powerarrow-dark/icons/centerwork.png b/.config/awesome/themes/powerarrow-dark/icons/centerwork.png new file mode 100755 index 0000000..9071516 Binary files /dev/null and b/.config/awesome/themes/powerarrow-dark/icons/centerwork.png differ diff --git a/.config/awesome/themes/powerarrow-dark/icons/centerworkh.png b/.config/awesome/themes/powerarrow-dark/icons/centerworkh.png new file mode 100755 index 0000000..b1d1379 Binary files /dev/null and b/.config/awesome/themes/powerarrow-dark/icons/centerworkh.png differ diff --git a/.config/awesome/themes/powerarrow-dark/icons/cpu.png b/.config/awesome/themes/powerarrow-dark/icons/cpu.png new file mode 100755 index 0000000..35af1c3 Binary files /dev/null and b/.config/awesome/themes/powerarrow-dark/icons/cpu.png differ diff --git a/.config/awesome/themes/powerarrow-dark/icons/dwindle.png b/.config/awesome/themes/powerarrow-dark/icons/dwindle.png new file mode 100755 index 0000000..649ea99 Binary files /dev/null and b/.config/awesome/themes/powerarrow-dark/icons/dwindle.png differ diff --git a/.config/awesome/themes/powerarrow-dark/icons/fairh.png b/.config/awesome/themes/powerarrow-dark/icons/fairh.png new file mode 100755 index 0000000..62d3d99 Binary files /dev/null and b/.config/awesome/themes/powerarrow-dark/icons/fairh.png differ diff --git a/.config/awesome/themes/powerarrow-dark/icons/fairv.png b/.config/awesome/themes/powerarrow-dark/icons/fairv.png new file mode 100755 index 0000000..131dd0f Binary files /dev/null and b/.config/awesome/themes/powerarrow-dark/icons/fairv.png differ diff --git a/.config/awesome/themes/powerarrow-dark/icons/floating.png b/.config/awesome/themes/powerarrow-dark/icons/floating.png new file mode 100755 index 0000000..d25c47b Binary files /dev/null and b/.config/awesome/themes/powerarrow-dark/icons/floating.png differ diff --git a/.config/awesome/themes/powerarrow-dark/icons/hdd.png b/.config/awesome/themes/powerarrow-dark/icons/hdd.png new file mode 100755 index 0000000..0fb6833 Binary files /dev/null and b/.config/awesome/themes/powerarrow-dark/icons/hdd.png differ diff --git a/.config/awesome/themes/powerarrow-dark/icons/magnifier.png b/.config/awesome/themes/powerarrow-dark/icons/magnifier.png new file mode 100755 index 0000000..60d3e0d Binary files /dev/null and b/.config/awesome/themes/powerarrow-dark/icons/magnifier.png differ diff --git a/.config/awesome/themes/powerarrow-dark/icons/mail.png b/.config/awesome/themes/powerarrow-dark/icons/mail.png new file mode 100755 index 0000000..474e602 Binary files /dev/null and b/.config/awesome/themes/powerarrow-dark/icons/mail.png differ diff --git a/.config/awesome/themes/powerarrow-dark/icons/mail_on.png b/.config/awesome/themes/powerarrow-dark/icons/mail_on.png new file mode 100755 index 0000000..19106d7 Binary files /dev/null and b/.config/awesome/themes/powerarrow-dark/icons/mail_on.png differ diff --git a/.config/awesome/themes/powerarrow-dark/icons/max.png b/.config/awesome/themes/powerarrow-dark/icons/max.png new file mode 100755 index 0000000..5b0a5b7 Binary files /dev/null and b/.config/awesome/themes/powerarrow-dark/icons/max.png differ diff --git a/.config/awesome/themes/powerarrow-dark/icons/mem.png b/.config/awesome/themes/powerarrow-dark/icons/mem.png new file mode 100755 index 0000000..7860a1a Binary files /dev/null and b/.config/awesome/themes/powerarrow-dark/icons/mem.png differ diff --git a/.config/awesome/themes/powerarrow-dark/icons/net.png b/.config/awesome/themes/powerarrow-dark/icons/net.png new file mode 100755 index 0000000..bc42fdc Binary files /dev/null and b/.config/awesome/themes/powerarrow-dark/icons/net.png differ diff --git a/.config/awesome/themes/powerarrow-dark/icons/net_wired.png b/.config/awesome/themes/powerarrow-dark/icons/net_wired.png new file mode 100755 index 0000000..e8cc2bd Binary files /dev/null and b/.config/awesome/themes/powerarrow-dark/icons/net_wired.png differ diff --git a/.config/awesome/themes/powerarrow-dark/icons/note.png b/.config/awesome/themes/powerarrow-dark/icons/note.png new file mode 100755 index 0000000..baa29c3 Binary files /dev/null and b/.config/awesome/themes/powerarrow-dark/icons/note.png differ diff --git a/.config/awesome/themes/powerarrow-dark/icons/note_on.png b/.config/awesome/themes/powerarrow-dark/icons/note_on.png new file mode 100755 index 0000000..1a7ab94 Binary files /dev/null and b/.config/awesome/themes/powerarrow-dark/icons/note_on.png differ diff --git a/.config/awesome/themes/powerarrow-dark/icons/scissors.png b/.config/awesome/themes/powerarrow-dark/icons/scissors.png new file mode 100755 index 0000000..f8c700d Binary files /dev/null and b/.config/awesome/themes/powerarrow-dark/icons/scissors.png differ diff --git a/.config/awesome/themes/powerarrow-dark/icons/spiral.png b/.config/awesome/themes/powerarrow-dark/icons/spiral.png new file mode 100755 index 0000000..d9ee0f6 Binary files /dev/null and b/.config/awesome/themes/powerarrow-dark/icons/spiral.png differ diff --git a/.config/awesome/themes/powerarrow-dark/icons/square_sel.png b/.config/awesome/themes/powerarrow-dark/icons/square_sel.png new file mode 100755 index 0000000..1102a9f Binary files /dev/null and b/.config/awesome/themes/powerarrow-dark/icons/square_sel.png differ diff --git a/.config/awesome/themes/powerarrow-dark/icons/square_unsel.png b/.config/awesome/themes/powerarrow-dark/icons/square_unsel.png new file mode 100755 index 0000000..7386b85 Binary files /dev/null and b/.config/awesome/themes/powerarrow-dark/icons/square_unsel.png differ diff --git a/.config/awesome/themes/powerarrow-dark/icons/submenu.png b/.config/awesome/themes/powerarrow-dark/icons/submenu.png new file mode 100755 index 0000000..b55ebce Binary files /dev/null and b/.config/awesome/themes/powerarrow-dark/icons/submenu.png differ diff --git a/.config/awesome/themes/powerarrow-dark/icons/task.png b/.config/awesome/themes/powerarrow-dark/icons/task.png new file mode 100755 index 0000000..9701b68 Binary files /dev/null and b/.config/awesome/themes/powerarrow-dark/icons/task.png differ diff --git a/.config/awesome/themes/powerarrow-dark/icons/temp.png b/.config/awesome/themes/powerarrow-dark/icons/temp.png new file mode 100755 index 0000000..6793a9f Binary files /dev/null and b/.config/awesome/themes/powerarrow-dark/icons/temp.png differ diff --git a/.config/awesome/themes/powerarrow-dark/icons/termfair.png b/.config/awesome/themes/powerarrow-dark/icons/termfair.png new file mode 100755 index 0000000..3e06023 Binary files /dev/null and b/.config/awesome/themes/powerarrow-dark/icons/termfair.png differ diff --git a/.config/awesome/themes/powerarrow-dark/icons/tile.png b/.config/awesome/themes/powerarrow-dark/icons/tile.png new file mode 100755 index 0000000..922c05c Binary files /dev/null and b/.config/awesome/themes/powerarrow-dark/icons/tile.png differ diff --git a/.config/awesome/themes/powerarrow-dark/icons/tilebottom.png b/.config/awesome/themes/powerarrow-dark/icons/tilebottom.png new file mode 100755 index 0000000..6ec9cb8 Binary files /dev/null and b/.config/awesome/themes/powerarrow-dark/icons/tilebottom.png differ diff --git a/.config/awesome/themes/powerarrow-dark/icons/tileleft.png b/.config/awesome/themes/powerarrow-dark/icons/tileleft.png new file mode 100755 index 0000000..8e3d2d6 Binary files /dev/null and b/.config/awesome/themes/powerarrow-dark/icons/tileleft.png differ diff --git a/.config/awesome/themes/powerarrow-dark/icons/tiletop.png b/.config/awesome/themes/powerarrow-dark/icons/tiletop.png new file mode 100755 index 0000000..3da75a1 Binary files /dev/null and b/.config/awesome/themes/powerarrow-dark/icons/tiletop.png differ diff --git a/.config/awesome/themes/powerarrow-dark/icons/titlebar/close_focus.png b/.config/awesome/themes/powerarrow-dark/icons/titlebar/close_focus.png new file mode 100755 index 0000000..b2051b0 Binary files /dev/null and b/.config/awesome/themes/powerarrow-dark/icons/titlebar/close_focus.png differ diff --git a/.config/awesome/themes/powerarrow-dark/icons/titlebar/close_normal.png b/.config/awesome/themes/powerarrow-dark/icons/titlebar/close_normal.png new file mode 100755 index 0000000..da6028c Binary files /dev/null and b/.config/awesome/themes/powerarrow-dark/icons/titlebar/close_normal.png differ diff --git a/.config/awesome/themes/powerarrow-dark/icons/titlebar/floating_focus_active.png b/.config/awesome/themes/powerarrow-dark/icons/titlebar/floating_focus_active.png new file mode 100755 index 0000000..5fe84c0 Binary files /dev/null and b/.config/awesome/themes/powerarrow-dark/icons/titlebar/floating_focus_active.png differ diff --git a/.config/awesome/themes/powerarrow-dark/icons/titlebar/floating_focus_inactive.png b/.config/awesome/themes/powerarrow-dark/icons/titlebar/floating_focus_inactive.png new file mode 100755 index 0000000..47f19f6 Binary files /dev/null and b/.config/awesome/themes/powerarrow-dark/icons/titlebar/floating_focus_inactive.png differ diff --git a/.config/awesome/themes/powerarrow-dark/icons/titlebar/floating_normal_active.png b/.config/awesome/themes/powerarrow-dark/icons/titlebar/floating_normal_active.png new file mode 100755 index 0000000..576fa36 Binary files /dev/null and b/.config/awesome/themes/powerarrow-dark/icons/titlebar/floating_normal_active.png differ diff --git a/.config/awesome/themes/powerarrow-dark/icons/titlebar/floating_normal_inactive.png b/.config/awesome/themes/powerarrow-dark/icons/titlebar/floating_normal_inactive.png new file mode 100755 index 0000000..4adc5e9 Binary files /dev/null and b/.config/awesome/themes/powerarrow-dark/icons/titlebar/floating_normal_inactive.png differ diff --git a/.config/awesome/themes/powerarrow-dark/icons/titlebar/maximized_focus_active.png b/.config/awesome/themes/powerarrow-dark/icons/titlebar/maximized_focus_active.png new file mode 100755 index 0000000..7d9a11a Binary files /dev/null and b/.config/awesome/themes/powerarrow-dark/icons/titlebar/maximized_focus_active.png differ diff --git a/.config/awesome/themes/powerarrow-dark/icons/titlebar/maximized_focus_inactive.png b/.config/awesome/themes/powerarrow-dark/icons/titlebar/maximized_focus_inactive.png new file mode 100755 index 0000000..bce1d00 Binary files /dev/null and b/.config/awesome/themes/powerarrow-dark/icons/titlebar/maximized_focus_inactive.png differ diff --git a/.config/awesome/themes/powerarrow-dark/icons/titlebar/maximized_normal_active.png b/.config/awesome/themes/powerarrow-dark/icons/titlebar/maximized_normal_active.png new file mode 100755 index 0000000..9f24945 Binary files /dev/null and b/.config/awesome/themes/powerarrow-dark/icons/titlebar/maximized_normal_active.png differ diff --git a/.config/awesome/themes/powerarrow-dark/icons/titlebar/maximized_normal_inactive.png b/.config/awesome/themes/powerarrow-dark/icons/titlebar/maximized_normal_inactive.png new file mode 100755 index 0000000..2e56d32 Binary files /dev/null and b/.config/awesome/themes/powerarrow-dark/icons/titlebar/maximized_normal_inactive.png differ diff --git a/.config/awesome/themes/powerarrow-dark/icons/titlebar/ontop_focus_active.png b/.config/awesome/themes/powerarrow-dark/icons/titlebar/ontop_focus_active.png new file mode 100755 index 0000000..41a69e2 Binary files /dev/null and b/.config/awesome/themes/powerarrow-dark/icons/titlebar/ontop_focus_active.png differ diff --git a/.config/awesome/themes/powerarrow-dark/icons/titlebar/ontop_focus_inactive.png b/.config/awesome/themes/powerarrow-dark/icons/titlebar/ontop_focus_inactive.png new file mode 100755 index 0000000..2f3a2be Binary files /dev/null and b/.config/awesome/themes/powerarrow-dark/icons/titlebar/ontop_focus_inactive.png differ diff --git a/.config/awesome/themes/powerarrow-dark/icons/titlebar/ontop_normal_active.png b/.config/awesome/themes/powerarrow-dark/icons/titlebar/ontop_normal_active.png new file mode 100755 index 0000000..0f937b7 Binary files /dev/null and b/.config/awesome/themes/powerarrow-dark/icons/titlebar/ontop_normal_active.png differ diff --git a/.config/awesome/themes/powerarrow-dark/icons/titlebar/ontop_normal_inactive.png b/.config/awesome/themes/powerarrow-dark/icons/titlebar/ontop_normal_inactive.png new file mode 100755 index 0000000..a9a3206 Binary files /dev/null and b/.config/awesome/themes/powerarrow-dark/icons/titlebar/ontop_normal_inactive.png differ diff --git a/.config/awesome/themes/powerarrow-dark/icons/titlebar/sticky_focus_active.png b/.config/awesome/themes/powerarrow-dark/icons/titlebar/sticky_focus_active.png new file mode 100755 index 0000000..a9bc8a2 Binary files /dev/null and b/.config/awesome/themes/powerarrow-dark/icons/titlebar/sticky_focus_active.png differ diff --git a/.config/awesome/themes/powerarrow-dark/icons/titlebar/sticky_focus_inactive.png b/.config/awesome/themes/powerarrow-dark/icons/titlebar/sticky_focus_inactive.png new file mode 100755 index 0000000..5493d8e Binary files /dev/null and b/.config/awesome/themes/powerarrow-dark/icons/titlebar/sticky_focus_inactive.png differ diff --git a/.config/awesome/themes/powerarrow-dark/icons/titlebar/sticky_normal_active.png b/.config/awesome/themes/powerarrow-dark/icons/titlebar/sticky_normal_active.png new file mode 100755 index 0000000..1e150f5 Binary files /dev/null and b/.config/awesome/themes/powerarrow-dark/icons/titlebar/sticky_normal_active.png differ diff --git a/.config/awesome/themes/powerarrow-dark/icons/titlebar/sticky_normal_inactive.png b/.config/awesome/themes/powerarrow-dark/icons/titlebar/sticky_normal_inactive.png new file mode 100755 index 0000000..7e6c99b Binary files /dev/null and b/.config/awesome/themes/powerarrow-dark/icons/titlebar/sticky_normal_inactive.png differ diff --git a/.config/awesome/themes/powerarrow-dark/icons/vol.png b/.config/awesome/themes/powerarrow-dark/icons/vol.png new file mode 100755 index 0000000..bbf33d4 Binary files /dev/null and b/.config/awesome/themes/powerarrow-dark/icons/vol.png differ diff --git a/.config/awesome/themes/powerarrow-dark/icons/vol_low.png b/.config/awesome/themes/powerarrow-dark/icons/vol_low.png new file mode 100755 index 0000000..aa3ce4d Binary files /dev/null and b/.config/awesome/themes/powerarrow-dark/icons/vol_low.png differ diff --git a/.config/awesome/themes/powerarrow-dark/icons/vol_mute.png b/.config/awesome/themes/powerarrow-dark/icons/vol_mute.png new file mode 100755 index 0000000..e855fd2 Binary files /dev/null and b/.config/awesome/themes/powerarrow-dark/icons/vol_mute.png differ diff --git a/.config/awesome/themes/powerarrow-dark/icons/vol_no.png b/.config/awesome/themes/powerarrow-dark/icons/vol_no.png new file mode 100755 index 0000000..bbe917b Binary files /dev/null and b/.config/awesome/themes/powerarrow-dark/icons/vol_no.png differ diff --git a/.config/awesome/themes/powerarrow-dark/theme.lua b/.config/awesome/themes/powerarrow-dark/theme.lua new file mode 100755 index 0000000..10ce6be --- /dev/null +++ b/.config/awesome/themes/powerarrow-dark/theme.lua @@ -0,0 +1,350 @@ +--[[ + + Powerarrow Dark Awesome WM theme + github.com/lcpz + +--]] + +local gears = require("gears") +local lain = require("lain") +local awful = require("awful") +local wibox = require("wibox") +local dpi = require("beautiful.xresources").apply_dpi + +local os = os +local my_table = awful.util.table or gears.table -- 4.{0,1} compatibility + +local theme = {} +theme.dir = os.getenv("HOME") .. "/.config/awesome/themes/powerarrow-dark" +theme.wallpaper = theme.dir .. "/wall.png" +theme.font = "Ubuntu Mono 9" +theme.fg_normal = "#DDDDFF" +theme.fg_focus = "#ffffff" +theme.fg_urgent = "#CC9393" +theme.bg_normal = "#000000" +theme.bg_focus = "#005577" +theme.bg_urgent = "#1A1A1A" +theme.border_width = dpi(3) +theme.border_normal = "#3F3F3F" +theme.border_focus = "#005577" +theme.border_marked = "#CC9393" +theme.tasklist_bg_focus = "#005577" +theme.tasklist_fg_focus = theme.fg_normal +theme.titlebar_bg_focus = theme.bg_focus +theme.titlebar_bg_normal = theme.bg_normal +theme.titlebar_fg_focus = theme.fg_normal +theme.menu_height = dpi(16) +theme.menu_width = dpi(140) +theme.menu_submenu_icon = theme.dir .. "/icons/submenu.png" +theme.taglist_squares_sel = theme.dir .. "/icons/square_sel.png" +theme.taglist_squares_unsel = theme.dir .. "/icons/square_unsel.png" +theme.layout_tile = theme.dir .. "/icons/tile.png" +theme.layout_tileleft = theme.dir .. "/icons/tileleft.png" +theme.layout_tilebottom = theme.dir .. "/icons/tilebottom.png" +theme.layout_tiletop = theme.dir .. "/icons/tiletop.png" +theme.layout_fairv = theme.dir .. "/icons/fairv.png" +theme.layout_fairh = theme.dir .. "/icons/fairh.png" +theme.layout_spiral = theme.dir .. "/icons/spiral.png" +theme.layout_dwindle = theme.dir .. "/icons/dwindle.png" +theme.layout_max = theme.dir .. "/icons/max.png" +theme.layout_fullscreen = theme.dir .. "/icons/fullscreen.png" +theme.layout_magnifier = theme.dir .. "/icons/magnifier.png" +theme.layout_floating = theme.dir .. "/icons/floating.png" +theme.widget_ac = theme.dir .. "/icons/ac.png" +theme.widget_battery = theme.dir .. "/icons/battery.png" +theme.widget_battery_low = theme.dir .. "/icons/battery_low.png" +theme.widget_battery_empty = theme.dir .. "/icons/battery_empty.png" +theme.widget_mem = theme.dir .. "/icons/mem.png" +theme.widget_cpu = theme.dir .. "/icons/cpu.png" +theme.widget_temp = theme.dir .. "/icons/temp.png" +theme.widget_net = theme.dir .. "/icons/net.png" +theme.widget_hdd = theme.dir .. "/icons/hdd.png" +theme.widget_music = theme.dir .. "/icons/note.png" +theme.widget_music_on = theme.dir .. "/icons/note_on.png" +theme.widget_vol = theme.dir .. "/icons/vol.png" +theme.widget_vol_low = theme.dir .. "/icons/vol_low.png" +theme.widget_vol_no = theme.dir .. "/icons/vol_no.png" +theme.widget_vol_mute = theme.dir .. "/icons/vol_mute.png" +theme.widget_mail = theme.dir .. "/icons/mail.png" +theme.widget_mail_on = theme.dir .. "/icons/mail_on.png" +theme.tasklist_plain_task_name = false +theme.tasklist_disable_icon = false +theme.useless_gap = dpi(3) +theme.titlebar_close_button_focus = theme.dir .. "/icons/titlebar/close_focus.png" +theme.titlebar_close_button_normal = theme.dir .. "/icons/titlebar/close_normal.png" +theme.titlebar_ontop_button_focus_active = theme.dir .. "/icons/titlebar/ontop_focus_active.png" +theme.titlebar_ontop_button_normal_active = theme.dir .. "/icons/titlebar/ontop_normal_active.png" +theme.titlebar_ontop_button_focus_inactive = theme.dir .. "/icons/titlebar/ontop_focus_inactive.png" +theme.titlebar_ontop_button_normal_inactive = theme.dir .. "/icons/titlebar/ontop_normal_inactive.png" +theme.titlebar_sticky_button_focus_active = theme.dir .. "/icons/titlebar/sticky_focus_active.png" +theme.titlebar_sticky_button_normal_active = theme.dir .. "/icons/titlebar/sticky_normal_active.png" +theme.titlebar_sticky_button_focus_inactive = theme.dir .. "/icons/titlebar/sticky_focus_inactive.png" +theme.titlebar_sticky_button_normal_inactive = theme.dir .. "/icons/titlebar/sticky_normal_inactive.png" +theme.titlebar_floating_button_focus_active = theme.dir .. "/icons/titlebar/floating_focus_active.png" +theme.titlebar_floating_button_normal_active = theme.dir .. "/icons/titlebar/floating_normal_active.png" +theme.titlebar_floating_button_focus_inactive = theme.dir .. "/icons/titlebar/floating_focus_inactive.png" +theme.titlebar_floating_button_normal_inactive = theme.dir .. "/icons/titlebar/floating_normal_inactive.png" +theme.titlebar_maximized_button_focus_active = theme.dir .. "/icons/titlebar/maximized_focus_active.png" +theme.titlebar_maximized_button_normal_active = theme.dir .. "/icons/titlebar/maximized_normal_active.png" +theme.titlebar_maximized_button_focus_inactive = theme.dir .. "/icons/titlebar/maximized_focus_inactive.png" +theme.titlebar_maximized_button_normal_inactive = theme.dir .. "/icons/titlebar/maximized_normal_inactive.png" + +local markup = lain.util.markup +local separators = lain.util.separators + +local keyboardlayout = awful.widget.keyboardlayout:new() + +-- Textclock +local clockicon = wibox.widget.imagebox(theme.widget_clock) +local clock = awful.widget.watch( + "date +'%a %d %b %R'", 60, + function(widget, stdout) + widget:set_markup(" " .. markup.font(theme.font, stdout)) + end +) + +-- Calendar +theme.cal = lain.widget.cal({ + attach_to = { clock }, + notification_preset = { + font = "MonoLisa 10", + fg = theme.fg_normal, + bg = theme.bg_normal + } +}) + +-- Mail IMAP check +local mailicon = wibox.widget.imagebox(theme.widget_mail) +--[[ commented because it needs to be set before use +mailicon:buttons(my_table.join(awful.button({ }, 1, function () awful.spawn(mail) end))) +theme.mail = lain.widget.imap({ + timeout = 180, + server = "server", + mail = "mail", + password = "keyring get mail", + settings = function() + if mailcount > 0 then + widget:set_markup(markup.font(theme.font, " " .. mailcount .. " ")) + mailicon:set_image(theme.widget_mail_on) + else + widget:set_text("") + mailicon:set_image(theme.widget_mail) + end + end +}) +--]] + +-- MPD +local musicplr = awful.util.terminal .. " -title Music -e ncmpcpp" +local mpdicon = wibox.widget.imagebox(theme.widget_music) +mpdicon:buttons(my_table.join( + awful.button({ "Mod4" }, 1, function () awful.spawn(musicplr) end), + awful.button({ }, 1, function () + os.execute("mpc prev") + theme.mpd.update() + end), + awful.button({ }, 2, function () + os.execute("mpc toggle") + theme.mpd.update() + end), + awful.button({ }, 3, function () + os.execute("mpc next") + theme.mpd.update() + end))) +theme.mpd = lain.widget.mpd({ + settings = function() + if mpd_now.state == "play" then + artist = " " .. mpd_now.artist .. " " + title = mpd_now.title .. " " + mpdicon:set_image(theme.widget_music_on) + elseif mpd_now.state == "pause" then + artist = " mpd " + title = "paused " + else + artist = "" + title = "" + mpdicon:set_image(theme.widget_music) + end + + widget:set_markup(markup.font(theme.font, markup("#EA6F81", artist) .. title)) + end +}) + +-- MEM +local memicon = wibox.widget.imagebox(theme.widget_mem) +local mem = lain.widget.mem({ + settings = function() + widget:set_markup(markup.font(theme.font, " " .. mem_now.used .. "MB ")) + end +}) + +-- CPU +local cpuicon = wibox.widget.imagebox(theme.widget_cpu) +local cpu = lain.widget.cpu({ + settings = function() + widget:set_markup(markup.font(theme.font, " " .. cpu_now.usage .. "% ")) + end +}) + +-- Coretemp +local tempicon = wibox.widget.imagebox(theme.widget_temp) +local temp = lain.widget.temp({ + settings = function() + widget:set_markup(markup.font(theme.font, " " .. coretemp_now .. "°C ")) + end +}) + +-- / fs +local fsicon = wibox.widget.imagebox(theme.widget_hdd) +--[[ commented because it needs Gio/Glib >= 2.54 +theme.fs = lain.widget.fs({ + notification_preset = { fg = theme.fg_normal, bg = theme.bg_normal, font = "Terminus 10" }, + settings = function() + widget:set_markup(markup.font(theme.font, " " .. fs_now["/"].percentage .. "% ")) + end +}) +--]] + +-- Battery +local baticon = wibox.widget.imagebox(theme.widget_battery) +local bat = lain.widget.bat({ + settings = function() + if bat_now.status and bat_now.status ~= "N/A" then + if bat_now.ac_status == 1 then + baticon:set_image(theme.widget_ac) + elseif not bat_now.perc and tonumber(bat_now.perc) <= 5 then + baticon:set_image(theme.widget_battery_empty) + elseif not bat_now.perc and tonumber(bat_now.perc) <= 15 then + baticon:set_image(theme.widget_battery_low) + else + baticon:set_image(theme.widget_battery) + end + widget:set_markup(markup.font(theme.font, " " .. bat_now.perc .. "% ")) + else + widget:set_markup(markup.font(theme.font, " AC ")) + baticon:set_image(theme.widget_ac) + end + end +}) + +-- ALSA volume +--[[ +local volicon = wibox.widget.imagebox(theme.widget_vol) +theme.volume = lain.widget.pulse({ + settings = function() + if volume_now.status == "off" then + volicon:set_image(theme.widget_vol_mute) + elseif tonumber(volume_now.level) == 0 then + volicon:set_image(theme.widget_vol_no) + elseif tonumber(volume_now.level) <= 50 then + volicon:set_image(theme.widget_vol_low) + else + volicon:set_image(theme.widget_vol) + end + + widget:set_markup(markup.font(theme.font, " " .. volume_now.level .. "% ")) + end +}) +theme.volume.widget:buttons(awful.util.table.join( + awful.button({}, 4, function () + --awful.util.spawn("amixer set Master 1%+") + awful.util.spawn("pactl -- set-sink-volume \"$DEFAULT_SINK\" -1%") + theme.volume.update() + end), + awful.button({}, 5, function () + --awful.util.spawn("amixer set Master 1%-") + awful.util.spawn("pactl -- set-sink-volume \"$DEFAULT_SINK\" +1%") + theme.volume.update() + end), + awful.button({}, 1, function () + awful.util.spawn("amixer -q -D pulse sset Master toggle") + theme.volume.update() + end), + awful.button({}, 3, function () + awful.util.spawn("pavucontrol") + end) + + +)) +--]] +-- Net +local neticon = wibox.widget.imagebox(theme.widget_net) +local net = lain.widget.net({ + settings = function() + widget:set_markup(markup.font(theme.font, + markup("#7AC82E", " " .. string.format("%02.1f", net_now.received)) + .. " " .. + markup("#46A8C3", " " .. string.format("%02.1f", net_now.sent) .. " "))) + end +}) + +-- Separators +local spr = wibox.widget.textbox(' ') +local arrl_dl = separators.arrow_left(theme.bg_focus, "alpha") +local arrl_ld = separators.arrow_left("alpha", theme.bg_focus) + +function theme.at_screen_connect(s) + -- Quake application + s.quake = lain.util.quake({ app = awful.util.terminal }) + + -- If wallpaper is a function, call it with the screen + local wallpaper = theme.wallpaper + if type(wallpaper) == "function" then + wallpaper = wallpaper(s) + end + gears.wallpaper.maximized(wallpaper, s, true) + + -- Tags + awful.tag(awful.util.tagnames, s, awful.layout.layouts[1]) + + -- Create a promptbox for each screen + s.mypromptbox = awful.widget.prompt() + -- Create an imagebox widget which will contains an icon indicating which layout we're using. + -- We need one layoutbox per screen. + s.mylayoutbox = awful.widget.layoutbox(s) + s.mylayoutbox:buttons(my_table.join( + awful.button({}, 1, function () awful.layout.inc( 1) end), + awful.button({}, 2, function () awful.layout.set( awful.layout.layouts[1] ) end), + awful.button({}, 3, function () awful.layout.inc(-1) end), + awful.button({}, 4, function () awful.layout.inc( 1) end), + awful.button({}, 5, function () awful.layout.inc(-1) end))) + -- Create a taglist widget + s.mytaglist = awful.widget.taglist(s, awful.widget.taglist.filter.all, awful.util.taglist_buttons) + + + + -- Create a tasklist widget + s.mytasklist = awful.widget.tasklist(s, awful.widget.tasklist.filter.currenttags, awful.util.tasklist_buttons) + + -- Create the wibox + s.mywibox = awful.wibar({ position = "top", screen = s, height = dpi(18), bg = theme.bg_normal, fg = theme.fg_normal }) + + -- Add widgets to the wibox + s.mywibox:setup { + layout = wibox.layout.align.horizontal, + { -- Left widgets + layout = wibox.layout.fixed.horizontal, + --spr, + s.mytaglist, + spr, + s.mypromptbox, + spr, + }, + s.mytasklist, -- Middle widget + { -- Right widgets + layout = wibox.layout.fixed.horizontal, + baticon, + bat.widget, + spr, + wibox.widget.systray(), + keyboardlayout, + spr, + clock, + spr, + wibox.container.background(s.mylayoutbox, theme.bg_focus), + + }, + } +end + +return theme diff --git a/.config/awesome/themes/powerarrow-dark/wall.png b/.config/awesome/themes/powerarrow-dark/wall.png new file mode 100755 index 0000000..9d1118b Binary files /dev/null and b/.config/awesome/themes/powerarrow-dark/wall.png differ diff --git a/.config/awesome/themes/powerarrow/binclock.lua b/.config/awesome/themes/powerarrow/binclock.lua new file mode 100755 index 0000000..68668ea --- /dev/null +++ b/.config/awesome/themes/powerarrow/binclock.lua @@ -0,0 +1,96 @@ +--[[ + + Licensed under GNU General Public License v2 + * (c) 2017, Luca CPZ + * (c) 2013, romockee + +--]] + +local gears = require("gears") +local wibox = require("wibox") +local dpi = require("beautiful.xresources").apply_dpi +local date = os.date +local ipairs = ipairs +local math = math +local select = select +local string = string + +local binclock = {} + +function binclock.dec2bin(num, bits) + local bits, t = bits or select(2, math.frexp(num)), {} + for b = bits, 1, -1 do + t[b] = math.fmod(num, 2) + num = (num - t[b]) / 2 + end + return t +end + +function binclock.paintdot(cr, val, shift) + local height = 0 + for _, bit in ipairs(binclock.dec2bin(val, 4)) do + if bit >= 1 then + cr:set_source(gears.color(binclock.color_active)) + else + cr:set_source(gears.color(binclock.color_inactive)) + end + cr:rectangle(shift, height, binclock.dotsize, binclock.dotsize) + cr:fill() + height = height + binclock.dotsize + binclock.step + end +end + +local function factory(args) + local args = args or {} + + binclock.width = args.width or dpi(42) + binclock.height = args.height or dpi(18) + binclock.show_seconds = args.show_seconds or false + binclock.color_active = args.color_active or "#CCCCCC" + binclock.color_inactive = args.color_inactive or "#444444" + binclock.dotsize = math.floor(binclock.height / 5) + binclock.step = math.floor(binclock.dotsize / 3) + + binclock.widget = wibox.widget { + fit = function(self, context, width, height) + return binclock.width, binclock.height + end, + draw = function(self, context, cr, width, height) + local t = date("*t") + + local hour = string.format("%02d", t.hour) + local min = string.format("%02d", t.min) + local sec = string.format("%02d", t.sec) + + local col_count = 4 + if binclock.show_seconds then + col_count = 6 + end + local step = math.floor((binclock.width - col_count * binclock.dotsize) / 8) + + binclock.paintdot(cr, string.sub(hour, 1, 1), step, 2) + binclock.paintdot(cr, string.sub(hour, 2, 2), binclock.dotsize + 2 * step) + + binclock.paintdot(cr, string.sub(min, 1, 1), binclock.dotsize * 2 + 4 * step) + binclock.paintdot(cr, string.sub(min, 2, 2), binclock.dotsize * 3 + 5 * step) + + if binclock.show_seconds then + binclock.paintdot(cr, string.sub(sec, 1, 1), binclock.dotsize * 4 + 7 * step) + binclock.paintdot(cr, string.sub(sec, 2, 2), binclock.dotsize * 5 + 8 * step) + end + end, + layout = wibox.widget.base.make_widget + } + + binclock.timer = gears.timer { + autostart = true, + timeout = binclock.show_seconds and 1 or 60, + callback = function() + binclock.widget:emit_signal("widget::redraw_needed") + end + } + + return binclock +end + +return factory diff --git a/.config/awesome/themes/powerarrow/icons/ac.png b/.config/awesome/themes/powerarrow/icons/ac.png new file mode 100755 index 0000000..453af4e Binary files /dev/null and b/.config/awesome/themes/powerarrow/icons/ac.png differ diff --git a/.config/awesome/themes/powerarrow/icons/awesome.png b/.config/awesome/themes/powerarrow/icons/awesome.png new file mode 100755 index 0000000..4cabb6c Binary files /dev/null and b/.config/awesome/themes/powerarrow/icons/awesome.png differ diff --git a/.config/awesome/themes/powerarrow/icons/battery.png b/.config/awesome/themes/powerarrow/icons/battery.png new file mode 100755 index 0000000..7dd78a5 Binary files /dev/null and b/.config/awesome/themes/powerarrow/icons/battery.png differ diff --git a/.config/awesome/themes/powerarrow/icons/battery_empty.png b/.config/awesome/themes/powerarrow/icons/battery_empty.png new file mode 100755 index 0000000..763aa93 Binary files /dev/null and b/.config/awesome/themes/powerarrow/icons/battery_empty.png differ diff --git a/.config/awesome/themes/powerarrow/icons/battery_low.png b/.config/awesome/themes/powerarrow/icons/battery_low.png new file mode 100755 index 0000000..626222f Binary files /dev/null and b/.config/awesome/themes/powerarrow/icons/battery_low.png differ diff --git a/.config/awesome/themes/powerarrow/icons/brightness.png b/.config/awesome/themes/powerarrow/icons/brightness.png new file mode 100755 index 0000000..030d524 Binary files /dev/null and b/.config/awesome/themes/powerarrow/icons/brightness.png differ diff --git a/.config/awesome/themes/powerarrow/icons/cpu.png b/.config/awesome/themes/powerarrow/icons/cpu.png new file mode 100755 index 0000000..c28a787 Binary files /dev/null and b/.config/awesome/themes/powerarrow/icons/cpu.png differ diff --git a/.config/awesome/themes/powerarrow/icons/floating.png b/.config/awesome/themes/powerarrow/icons/floating.png new file mode 100755 index 0000000..079fea4 Binary files /dev/null and b/.config/awesome/themes/powerarrow/icons/floating.png differ diff --git a/.config/awesome/themes/powerarrow/icons/fwd.png b/.config/awesome/themes/powerarrow/icons/fwd.png new file mode 100755 index 0000000..e9b875e Binary files /dev/null and b/.config/awesome/themes/powerarrow/icons/fwd.png differ diff --git a/.config/awesome/themes/powerarrow/icons/hdd.png b/.config/awesome/themes/powerarrow/icons/hdd.png new file mode 100755 index 0000000..8922eaa Binary files /dev/null and b/.config/awesome/themes/powerarrow/icons/hdd.png differ diff --git a/.config/awesome/themes/powerarrow/icons/mail.png b/.config/awesome/themes/powerarrow/icons/mail.png new file mode 100755 index 0000000..be656ed Binary files /dev/null and b/.config/awesome/themes/powerarrow/icons/mail.png differ diff --git a/.config/awesome/themes/powerarrow/icons/mail_on.png b/.config/awesome/themes/powerarrow/icons/mail_on.png new file mode 100755 index 0000000..ce8984f Binary files /dev/null and b/.config/awesome/themes/powerarrow/icons/mail_on.png differ diff --git a/.config/awesome/themes/powerarrow/icons/mem.png b/.config/awesome/themes/powerarrow/icons/mem.png new file mode 100755 index 0000000..ee6d480 Binary files /dev/null and b/.config/awesome/themes/powerarrow/icons/mem.png differ diff --git a/.config/awesome/themes/powerarrow/icons/net.png b/.config/awesome/themes/powerarrow/icons/net.png new file mode 100755 index 0000000..769bfec Binary files /dev/null and b/.config/awesome/themes/powerarrow/icons/net.png differ diff --git a/.config/awesome/themes/powerarrow/icons/next.png b/.config/awesome/themes/powerarrow/icons/next.png new file mode 100755 index 0000000..9a62593 Binary files /dev/null and b/.config/awesome/themes/powerarrow/icons/next.png differ diff --git a/.config/awesome/themes/powerarrow/icons/note.png b/.config/awesome/themes/powerarrow/icons/note.png new file mode 100755 index 0000000..19866aa Binary files /dev/null and b/.config/awesome/themes/powerarrow/icons/note.png differ diff --git a/.config/awesome/themes/powerarrow/icons/note_on.png b/.config/awesome/themes/powerarrow/icons/note_on.png new file mode 100755 index 0000000..aae5ca3 Binary files /dev/null and b/.config/awesome/themes/powerarrow/icons/note_on.png differ diff --git a/.config/awesome/themes/powerarrow/icons/pacman.png b/.config/awesome/themes/powerarrow/icons/pacman.png new file mode 100755 index 0000000..575144a Binary files /dev/null and b/.config/awesome/themes/powerarrow/icons/pacman.png differ diff --git a/.config/awesome/themes/powerarrow/icons/pause.png b/.config/awesome/themes/powerarrow/icons/pause.png new file mode 100755 index 0000000..d4546e6 Binary files /dev/null and b/.config/awesome/themes/powerarrow/icons/pause.png differ diff --git a/.config/awesome/themes/powerarrow/icons/phones.png b/.config/awesome/themes/powerarrow/icons/phones.png new file mode 100755 index 0000000..bec0e57 Binary files /dev/null and b/.config/awesome/themes/powerarrow/icons/phones.png differ diff --git a/.config/awesome/themes/powerarrow/icons/play.png b/.config/awesome/themes/powerarrow/icons/play.png new file mode 100755 index 0000000..b228f74 Binary files /dev/null and b/.config/awesome/themes/powerarrow/icons/play.png differ diff --git a/.config/awesome/themes/powerarrow/icons/prev.png b/.config/awesome/themes/powerarrow/icons/prev.png new file mode 100755 index 0000000..4c4ca40 Binary files /dev/null and b/.config/awesome/themes/powerarrow/icons/prev.png differ diff --git a/.config/awesome/themes/powerarrow/icons/rwd.png b/.config/awesome/themes/powerarrow/icons/rwd.png new file mode 100755 index 0000000..ac3d6f4 Binary files /dev/null and b/.config/awesome/themes/powerarrow/icons/rwd.png differ diff --git a/.config/awesome/themes/powerarrow/icons/scissors.png b/.config/awesome/themes/powerarrow/icons/scissors.png new file mode 100755 index 0000000..30f867d Binary files /dev/null and b/.config/awesome/themes/powerarrow/icons/scissors.png differ diff --git a/.config/awesome/themes/powerarrow/icons/square_sel.png b/.config/awesome/themes/powerarrow/icons/square_sel.png new file mode 100755 index 0000000..874a3a5 Binary files /dev/null and b/.config/awesome/themes/powerarrow/icons/square_sel.png differ diff --git a/.config/awesome/themes/powerarrow/icons/square_unsel.png b/.config/awesome/themes/powerarrow/icons/square_unsel.png new file mode 100755 index 0000000..979642f Binary files /dev/null and b/.config/awesome/themes/powerarrow/icons/square_unsel.png differ diff --git a/.config/awesome/themes/powerarrow/icons/stop.png b/.config/awesome/themes/powerarrow/icons/stop.png new file mode 100755 index 0000000..207915b Binary files /dev/null and b/.config/awesome/themes/powerarrow/icons/stop.png differ diff --git a/.config/awesome/themes/powerarrow/icons/submenu.png b/.config/awesome/themes/powerarrow/icons/submenu.png new file mode 100755 index 0000000..e9a6b7c Binary files /dev/null and b/.config/awesome/themes/powerarrow/icons/submenu.png differ diff --git a/.config/awesome/themes/powerarrow/icons/task.png b/.config/awesome/themes/powerarrow/icons/task.png new file mode 100755 index 0000000..962b51a Binary files /dev/null and b/.config/awesome/themes/powerarrow/icons/task.png differ diff --git a/.config/awesome/themes/powerarrow/icons/temp.png b/.config/awesome/themes/powerarrow/icons/temp.png new file mode 100755 index 0000000..7952de8 Binary files /dev/null and b/.config/awesome/themes/powerarrow/icons/temp.png differ diff --git a/.config/awesome/themes/powerarrow/icons/tile.png b/.config/awesome/themes/powerarrow/icons/tile.png new file mode 100755 index 0000000..01fd1b5 Binary files /dev/null and b/.config/awesome/themes/powerarrow/icons/tile.png differ diff --git a/.config/awesome/themes/powerarrow/icons/tilebottom.png b/.config/awesome/themes/powerarrow/icons/tilebottom.png new file mode 100755 index 0000000..bff1f42 Binary files /dev/null and b/.config/awesome/themes/powerarrow/icons/tilebottom.png differ diff --git a/.config/awesome/themes/powerarrow/icons/tileleft.png b/.config/awesome/themes/powerarrow/icons/tileleft.png new file mode 100755 index 0000000..205140a Binary files /dev/null and b/.config/awesome/themes/powerarrow/icons/tileleft.png differ diff --git a/.config/awesome/themes/powerarrow/icons/tiletop.png b/.config/awesome/themes/powerarrow/icons/tiletop.png new file mode 100755 index 0000000..148cb9b Binary files /dev/null and b/.config/awesome/themes/powerarrow/icons/tiletop.png differ diff --git a/.config/awesome/themes/powerarrow/icons/titlebar/close_focus.png b/.config/awesome/themes/powerarrow/icons/titlebar/close_focus.png new file mode 100755 index 0000000..cccbadc Binary files /dev/null and b/.config/awesome/themes/powerarrow/icons/titlebar/close_focus.png differ diff --git a/.config/awesome/themes/powerarrow/icons/titlebar/close_normal.png b/.config/awesome/themes/powerarrow/icons/titlebar/close_normal.png new file mode 100755 index 0000000..cb0c3fa Binary files /dev/null and b/.config/awesome/themes/powerarrow/icons/titlebar/close_normal.png differ diff --git a/.config/awesome/themes/powerarrow/icons/titlebar/floating_focus_active.png b/.config/awesome/themes/powerarrow/icons/titlebar/floating_focus_active.png new file mode 100755 index 0000000..77ea127 Binary files /dev/null and b/.config/awesome/themes/powerarrow/icons/titlebar/floating_focus_active.png differ diff --git a/.config/awesome/themes/powerarrow/icons/titlebar/floating_focus_inactive.png b/.config/awesome/themes/powerarrow/icons/titlebar/floating_focus_inactive.png new file mode 100755 index 0000000..d254a73 Binary files /dev/null and b/.config/awesome/themes/powerarrow/icons/titlebar/floating_focus_inactive.png differ diff --git a/.config/awesome/themes/powerarrow/icons/titlebar/floating_normal_active.png b/.config/awesome/themes/powerarrow/icons/titlebar/floating_normal_active.png new file mode 100755 index 0000000..c5ce3de Binary files /dev/null and b/.config/awesome/themes/powerarrow/icons/titlebar/floating_normal_active.png differ diff --git a/.config/awesome/themes/powerarrow/icons/titlebar/floating_normal_inactive.png b/.config/awesome/themes/powerarrow/icons/titlebar/floating_normal_inactive.png new file mode 100755 index 0000000..850b602 Binary files /dev/null and b/.config/awesome/themes/powerarrow/icons/titlebar/floating_normal_inactive.png differ diff --git a/.config/awesome/themes/powerarrow/icons/titlebar/maximized_focus_active.png b/.config/awesome/themes/powerarrow/icons/titlebar/maximized_focus_active.png new file mode 100755 index 0000000..9fc0483 Binary files /dev/null and b/.config/awesome/themes/powerarrow/icons/titlebar/maximized_focus_active.png differ diff --git a/.config/awesome/themes/powerarrow/icons/titlebar/maximized_focus_inactive.png b/.config/awesome/themes/powerarrow/icons/titlebar/maximized_focus_inactive.png new file mode 100755 index 0000000..f684470 Binary files /dev/null and b/.config/awesome/themes/powerarrow/icons/titlebar/maximized_focus_inactive.png differ diff --git a/.config/awesome/themes/powerarrow/icons/titlebar/maximized_normal_active.png b/.config/awesome/themes/powerarrow/icons/titlebar/maximized_normal_active.png new file mode 100755 index 0000000..4aa4196 Binary files /dev/null and b/.config/awesome/themes/powerarrow/icons/titlebar/maximized_normal_active.png differ diff --git a/.config/awesome/themes/powerarrow/icons/titlebar/maximized_normal_inactive.png b/.config/awesome/themes/powerarrow/icons/titlebar/maximized_normal_inactive.png new file mode 100755 index 0000000..bfe01a3 Binary files /dev/null and b/.config/awesome/themes/powerarrow/icons/titlebar/maximized_normal_inactive.png differ diff --git a/.config/awesome/themes/powerarrow/icons/titlebar/ontop_focus_active.png b/.config/awesome/themes/powerarrow/icons/titlebar/ontop_focus_active.png new file mode 100755 index 0000000..86e61b7 Binary files /dev/null and b/.config/awesome/themes/powerarrow/icons/titlebar/ontop_focus_active.png differ diff --git a/.config/awesome/themes/powerarrow/icons/titlebar/ontop_focus_inactive.png b/.config/awesome/themes/powerarrow/icons/titlebar/ontop_focus_inactive.png new file mode 100755 index 0000000..286d439 Binary files /dev/null and b/.config/awesome/themes/powerarrow/icons/titlebar/ontop_focus_inactive.png differ diff --git a/.config/awesome/themes/powerarrow/icons/titlebar/ontop_normal_active.png b/.config/awesome/themes/powerarrow/icons/titlebar/ontop_normal_active.png new file mode 100755 index 0000000..fcee772 Binary files /dev/null and b/.config/awesome/themes/powerarrow/icons/titlebar/ontop_normal_active.png differ diff --git a/.config/awesome/themes/powerarrow/icons/titlebar/ontop_normal_inactive.png b/.config/awesome/themes/powerarrow/icons/titlebar/ontop_normal_inactive.png new file mode 100755 index 0000000..a628626 Binary files /dev/null and b/.config/awesome/themes/powerarrow/icons/titlebar/ontop_normal_inactive.png differ diff --git a/.config/awesome/themes/powerarrow/icons/titlebar/sticky_focus_active.png b/.config/awesome/themes/powerarrow/icons/titlebar/sticky_focus_active.png new file mode 100755 index 0000000..5af45c1 Binary files /dev/null and b/.config/awesome/themes/powerarrow/icons/titlebar/sticky_focus_active.png differ diff --git a/.config/awesome/themes/powerarrow/icons/titlebar/sticky_focus_inactive.png b/.config/awesome/themes/powerarrow/icons/titlebar/sticky_focus_inactive.png new file mode 100755 index 0000000..22d7453 Binary files /dev/null and b/.config/awesome/themes/powerarrow/icons/titlebar/sticky_focus_inactive.png differ diff --git a/.config/awesome/themes/powerarrow/icons/titlebar/sticky_normal_active.png b/.config/awesome/themes/powerarrow/icons/titlebar/sticky_normal_active.png new file mode 100755 index 0000000..aad079e Binary files /dev/null and b/.config/awesome/themes/powerarrow/icons/titlebar/sticky_normal_active.png differ diff --git a/.config/awesome/themes/powerarrow/icons/titlebar/sticky_normal_inactive.png b/.config/awesome/themes/powerarrow/icons/titlebar/sticky_normal_inactive.png new file mode 100755 index 0000000..5f3e655 Binary files /dev/null and b/.config/awesome/themes/powerarrow/icons/titlebar/sticky_normal_inactive.png differ diff --git a/.config/awesome/themes/powerarrow/theme.lua b/.config/awesome/themes/powerarrow/theme.lua new file mode 100755 index 0000000..984c9a8 --- /dev/null +++ b/.config/awesome/themes/powerarrow/theme.lua @@ -0,0 +1,400 @@ +--[[ + + Powerarrow Awesome WM theme + github.com/lcpz + +--]] + +local gears = require("gears") +local lain = require("lain") +local awful = require("awful") +local wibox = require("wibox") +local dpi = require("beautiful.xresources").apply_dpi + +local math, string, os = math, string, os +local my_table = awful.util.table or gears.table -- 4.{0,1} compatibility + +local theme = {} +theme.dir = os.getenv("HOME") .. "/.config/awesome/themes/powerarrow" +theme.wallpaper = theme.dir .. "/wall.png" +theme.font = "Terminus 9" +theme.fg_normal = "#FEFEFE" +theme.fg_focus = "#32D6FF" +theme.fg_urgent = "#C83F11" +theme.bg_normal = "#222222" +theme.bg_focus = "#1E2320" +theme.bg_urgent = "#3F3F3F" +theme.taglist_fg_focus = "#00CCFF" +theme.tasklist_bg_focus = "#222222" +theme.tasklist_fg_focus = "#00CCFF" +theme.border_width = dpi(2) +theme.border_normal = "#3F3F3F" +theme.border_focus = "#6F6F6F" +theme.border_marked = "#CC9393" +theme.titlebar_bg_focus = "#3F3F3F" +theme.titlebar_bg_normal = "#3F3F3F" +theme.titlebar_bg_focus = theme.bg_focus +theme.titlebar_bg_normal = theme.bg_normal +theme.titlebar_fg_focus = theme.fg_focus +theme.menu_height = dpi(16) +theme.menu_width = dpi(140) +theme.menu_submenu_icon = theme.dir .. "/icons/submenu.png" +theme.awesome_icon = theme.dir .. "/icons/awesome.png" +theme.taglist_squares_sel = theme.dir .. "/icons/square_sel.png" +theme.taglist_squares_unsel = theme.dir .. "/icons/square_unsel.png" +theme.layout_tile = theme.dir .. "/icons/tile.png" +theme.layout_tileleft = theme.dir .. "/icons/tileleft.png" +theme.layout_tilebottom = theme.dir .. "/icons/tilebottom.png" +theme.layout_tiletop = theme.dir .. "/icons/tiletop.png" +theme.layout_fairv = theme.dir .. "/icons/fairv.png" +theme.layout_fairh = theme.dir .. "/icons/fairh.png" +theme.layout_spiral = theme.dir .. "/icons/spiral.png" +theme.layout_dwindle = theme.dir .. "/icons/dwindle.png" +theme.layout_max = theme.dir .. "/icons/max.png" +theme.layout_fullscreen = theme.dir .. "/icons/fullscreen.png" +theme.layout_magnifier = theme.dir .. "/icons/magnifier.png" +theme.layout_floating = theme.dir .. "/icons/floating.png" +theme.widget_ac = theme.dir .. "/icons/ac.png" +theme.widget_battery = theme.dir .. "/icons/battery.png" +theme.widget_battery_low = theme.dir .. "/icons/battery_low.png" +theme.widget_battery_empty = theme.dir .. "/icons/battery_empty.png" +theme.widget_brightness = theme.dir .. "/icons/brightness.png" +theme.widget_mem = theme.dir .. "/icons/mem.png" +theme.widget_cpu = theme.dir .. "/icons/cpu.png" +theme.widget_temp = theme.dir .. "/icons/temp.png" +theme.widget_net = theme.dir .. "/icons/net.png" +theme.widget_hdd = theme.dir .. "/icons/hdd.png" +theme.widget_music = theme.dir .. "/icons/note.png" +theme.widget_music_on = theme.dir .. "/icons/note_on.png" +theme.widget_music_pause = theme.dir .. "/icons/pause.png" +theme.widget_music_stop = theme.dir .. "/icons/stop.png" +theme.widget_vol = theme.dir .. "/icons/vol.png" +theme.widget_vol_low = theme.dir .. "/icons/vol_low.png" +theme.widget_vol_no = theme.dir .. "/icons/vol_no.png" +theme.widget_vol_mute = theme.dir .. "/icons/vol_mute.png" +theme.widget_mail = theme.dir .. "/icons/mail.png" +theme.widget_mail_on = theme.dir .. "/icons/mail_on.png" +theme.widget_task = theme.dir .. "/icons/task.png" +theme.widget_scissors = theme.dir .. "/icons/scissors.png" +theme.tasklist_plain_task_name = true +theme.tasklist_disable_icon = true +theme.useless_gap = 0 +theme.titlebar_close_button_focus = theme.dir .. "/icons/titlebar/close_focus.png" +theme.titlebar_close_button_normal = theme.dir .. "/icons/titlebar/close_normal.png" +theme.titlebar_ontop_button_focus_active = theme.dir .. "/icons/titlebar/ontop_focus_active.png" +theme.titlebar_ontop_button_normal_active = theme.dir .. "/icons/titlebar/ontop_normal_active.png" +theme.titlebar_ontop_button_focus_inactive = theme.dir .. "/icons/titlebar/ontop_focus_inactive.png" +theme.titlebar_ontop_button_normal_inactive = theme.dir .. "/icons/titlebar/ontop_normal_inactive.png" +theme.titlebar_sticky_button_focus_active = theme.dir .. "/icons/titlebar/sticky_focus_active.png" +theme.titlebar_sticky_button_normal_active = theme.dir .. "/icons/titlebar/sticky_normal_active.png" +theme.titlebar_sticky_button_focus_inactive = theme.dir .. "/icons/titlebar/sticky_focus_inactive.png" +theme.titlebar_sticky_button_normal_inactive = theme.dir .. "/icons/titlebar/sticky_normal_inactive.png" +theme.titlebar_floating_button_focus_active = theme.dir .. "/icons/titlebar/floating_focus_active.png" +theme.titlebar_floating_button_normal_active = theme.dir .. "/icons/titlebar/floating_normal_active.png" +theme.titlebar_floating_button_focus_inactive = theme.dir .. "/icons/titlebar/floating_focus_inactive.png" +theme.titlebar_floating_button_normal_inactive = theme.dir .. "/icons/titlebar/floating_normal_inactive.png" +theme.titlebar_maximized_button_focus_active = theme.dir .. "/icons/titlebar/maximized_focus_active.png" +theme.titlebar_maximized_button_normal_active = theme.dir .. "/icons/titlebar/maximized_normal_active.png" +theme.titlebar_maximized_button_focus_inactive = theme.dir .. "/icons/titlebar/maximized_focus_inactive.png" +theme.titlebar_maximized_button_normal_inactive = theme.dir .. "/icons/titlebar/maximized_normal_inactive.png" + +local markup = lain.util.markup +local separators = lain.util.separators + +-- Binary clock +local binclock = require("themes.powerarrow.binclock"){ + height = dpi(32), + show_seconds = true, + color_active = theme.fg_normal, + color_inactive = theme.bg_focus +} + +-- Calendar +theme.cal = lain.widget.cal({ + --cal = "cal --color=always", + attach_to = { binclock.widget }, + notification_preset = { + font = "Terminus 10", + fg = theme.fg_normal, + bg = theme.bg_normal + } +}) + +-- Taskwarrior +local task = wibox.widget.imagebox(theme.widget_task) +lain.widget.contrib.task.attach(task, { + -- do not colorize output + show_cmd = "task | sed -r 's/\\x1B\\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g'" +}) +task:buttons(my_table.join(awful.button({}, 1, lain.widget.contrib.task.prompt))) + +-- Scissors (xsel copy and paste) +local scissors = wibox.widget.imagebox(theme.widget_scissors) +scissors:buttons(my_table.join(awful.button({}, 1, function() awful.spawn.with_shell("xsel | xsel -i -b") end))) + +-- Mail IMAP check +--[[ commented because it needs to be set before use +local mailicon = wibox.widget.imagebox(theme.widget_mail) +mailicon:buttons(my_table.join(awful.button({ }, 1, function () awful.spawn(mail) end))) +theme.mail = lain.widget.imap({ + timeout = 180, + server = "server", + mail = "mail", + password = "keyring get mail", + settings = function() + if mailcount > 0 then + widget:set_text(" " .. mailcount .. " ") + mailicon:set_image(theme.widget_mail_on) + else + widget:set_text("") + mailicon:set_image(theme.widget_mail) + end + end +}) +--]] + +-- ALSA volume +theme.volume = lain.widget.alsabar({ + --togglechannel = "IEC958,3", + notification_preset = { font = "Terminus 10", fg = theme.fg_normal }, +}) + +-- MPD +local musicplr = awful.util.terminal .. " -title Music -g 130x34-320+16 -e ncmpcpp" +local mpdicon = wibox.widget.imagebox(theme.widget_music) +mpdicon:buttons(my_table.join( + awful.button({ modkey }, 1, function () awful.spawn.with_shell(musicplr) end), + awful.button({ }, 1, function () + os.execute("mpc prev") + theme.mpd.update() + end), + awful.button({ }, 2, function () + os.execute("mpc toggle") + theme.mpd.update() + end), + awful.button({ }, 3, function () + os.execute("mpc next") + theme.mpd.update() + end))) +theme.mpd = lain.widget.mpd({ + settings = function() + if mpd_now.state == "play" then + artist = " " .. mpd_now.artist .. " " + title = mpd_now.title .. " " + mpdicon:set_image(theme.widget_music_on) + widget:set_markup(markup.font(theme.font, markup("#FF8466", artist) .. " " .. title)) + elseif mpd_now.state == "pause" then + widget:set_markup(markup.font(theme.font, " mpd paused ")) + mpdicon:set_image(theme.widget_music_pause) + else + widget:set_text("") + mpdicon:set_image(theme.widget_music) + end + end +}) + +-- MEM +local memicon = wibox.widget.imagebox(theme.widget_mem) +local mem = lain.widget.mem({ + settings = function() + widget:set_markup(markup.font(theme.font, " " .. mem_now.used .. "MB ")) + end +}) + +-- CPU +local cpuicon = wibox.widget.imagebox(theme.widget_cpu) +local cpu = lain.widget.cpu({ + settings = function() + widget:set_markup(markup.font(theme.font, " " .. cpu_now.usage .. "% ")) + end +}) + +--[[ Coretemp (lm_sensors, per core) +local tempwidget = awful.widget.watch({awful.util.shell, '-c', 'sensors | grep Core'}, 30, +function(widget, stdout) + local temps = "" + for line in stdout:gmatch("[^\r\n]+") do + temps = temps .. line:match("+(%d+).*°C") .. "° " -- in Celsius + end + widget:set_markup(markup.font(theme.font, " " .. temps)) +end) +--]] +-- Coretemp (lain, average) +local temp = lain.widget.temp({ + settings = function() + widget:set_markup(markup.font(theme.font, " " .. coretemp_now .. "°C ")) + end +}) +--]] +local tempicon = wibox.widget.imagebox(theme.widget_temp) + +-- / fs +local fsicon = wibox.widget.imagebox(theme.widget_hdd) +--[[ commented because it needs Gio/Glib >= 2.54 +theme.fs = lain.widget.fs({ + notification_preset = { fg = theme.fg_normal, bg = theme.bg_normal, font = "Terminus 10" }, + settings = function() + local fsp = string.format(" %3.2f %s ", fs_now["/"].free, fs_now["/"].units) + widget:set_markup(markup.font(theme.font, fsp)) + end +}) +--]] + +-- Battery +local baticon = wibox.widget.imagebox(theme.widget_battery) +local bat = lain.widget.bat({ + settings = function() + if bat_now.status and bat_now.status ~= "N/A" then + if bat_now.ac_status == 1 then + widget:set_markup(markup.font(theme.font, " AC ")) + baticon:set_image(theme.widget_ac) + return + elseif not bat_now.perc and tonumber(bat_now.perc) <= 5 then + baticon:set_image(theme.widget_battery_empty) + elseif not bat_now.perc and tonumber(bat_now.perc) <= 15 then + baticon:set_image(theme.widget_battery_low) + else + baticon:set_image(theme.widget_battery) + end + widget:set_markup(markup.font(theme.font, " " .. bat_now.perc .. "% ")) + else + widget:set_markup() + baticon:set_image(theme.widget_ac) + end + end +}) + +-- Net +local neticon = wibox.widget.imagebox(theme.widget_net) +local net = lain.widget.net({ + settings = function() + widget:set_markup(markup.fontfg(theme.font, "#FEFEFE", " " .. net_now.received .. " ↓↑ " .. net_now.sent .. " ")) + end +}) + +-- Brigtness +local brighticon = wibox.widget.imagebox(theme.widget_brightness) +-- If you use xbacklight, comment the line with "light -G" and uncomment the line bellow +-- local brightwidget = awful.widget.watch('xbacklight -get', 0.1, +local brightwidget = awful.widget.watch('light -G', 0.1, + function(widget, stdout, stderr, exitreason, exitcode) + local brightness_level = tonumber(string.format("%.0f", stdout)) + widget:set_markup(markup.font(theme.font, " " .. brightness_level .. "%")) +end) + +-- Separators +local arrow = separators.arrow_left + +function theme.powerline_rl(cr, width, height) + local arrow_depth, offset = height/2, 0 + + -- Avoid going out of the (potential) clip area + if arrow_depth < 0 then + width = width + 2*arrow_depth + offset = -arrow_depth + end + + cr:move_to(offset + arrow_depth , 0 ) + cr:line_to(offset + width , 0 ) + cr:line_to(offset + width - arrow_depth , height/2 ) + cr:line_to(offset + width , height ) + cr:line_to(offset + arrow_depth , height ) + cr:line_to(offset , height/2 ) + + cr:close_path() +end + +local function pl(widget, bgcolor, padding) + return wibox.container.background(wibox.container.margin(widget, dpi(16), dpi(16)), bgcolor, theme.powerline_rl) +end + +function theme.at_screen_connect(s) + -- Quake application + s.quake = lain.util.quake({ app = awful.util.terminal }) + + -- If wallpaper is a function, call it with the screen + local wallpaper = theme.wallpaper + if type(wallpaper) == "function" then + wallpaper = wallpaper(s) + end + gears.wallpaper.maximized(wallpaper, s, true) + + -- Tags + awful.tag(awful.util.tagnames, s, awful.layout.layouts[1]) + + -- Create a promptbox for each screen + s.mypromptbox = awful.widget.prompt() + -- Create an imagebox widget which will contains an icon indicating which layout we're using. + -- We need one layoutbox per screen. + s.mylayoutbox = awful.widget.layoutbox(s) + s.mylayoutbox:buttons(my_table.join( + awful.button({}, 1, function () awful.layout.inc( 1) end), + awful.button({}, 2, function () awful.layout.set( awful.layout.layouts[1] ) end), + awful.button({}, 3, function () awful.layout.inc(-1) end), + awful.button({}, 4, function () awful.layout.inc( 1) end), + awful.button({}, 5, function () awful.layout.inc(-1) end))) + -- Create a taglist widget + s.mytaglist = awful.widget.taglist(s, awful.widget.taglist.filter.all, awful.util.taglist_buttons) + + -- Create a tasklist widget + s.mytasklist = awful.widget.tasklist(s, awful.widget.tasklist.filter.currenttags, awful.util.tasklist_buttons) + + -- Create the wibox + s.mywibox = awful.wibar({ position = "top", screen = s, height = dpi(16), bg = theme.bg_normal, fg = theme.fg_normal }) + + -- Add widgets to the wibox + s.mywibox:setup { + layout = wibox.layout.align.horizontal, + { -- Left widgets + layout = wibox.layout.fixed.horizontal, + --spr, + s.mytaglist, + s.mypromptbox, + spr, + }, + s.mytasklist, -- Middle widget + { -- Right widgets + layout = wibox.layout.fixed.horizontal, + wibox.widget.systray(), + wibox.container.margin(scissors, dpi(4), dpi(8)), + --[[ using shapes + pl(wibox.widget { mpdicon, theme.mpd.widget, layout = wibox.layout.align.horizontal }, "#343434"), + pl(task, "#343434"), + --pl(wibox.widget { mailicon, mail and theme.mail.widget, layout = wibox.layout.align.horizontal }, "#343434"), + pl(wibox.widget { memicon, mem.widget, layout = wibox.layout.align.horizontal }, "#777E76"), + pl(wibox.widget { cpuicon, cpu.widget, layout = wibox.layout.align.horizontal }, "#4B696D"), + pl(wibox.widget { tempicon, temp.widget, layout = wibox.layout.align.horizontal }, "#4B3B51"), + --pl(wibox.widget { fsicon, theme.fs and theme.fs.widget, layout = wibox.layout.align.horizontal }, "#CB755B"), + pl(wibox.widget { baticon, bat.widget, layout = wibox.layout.align.horizontal }, "#8DAA9A"), + pl(wibox.widget { neticon, net.widget, layout = wibox.layout.align.horizontal }, "#C0C0A2"), + pl(binclock.widget, "#777E76"), + --]] + -- using separators + arrow(theme.bg_normal, "#343434"), + wibox.container.background(wibox.container.margin(wibox.widget { mailicon, theme.mail and theme.mail.widget, layout = wibox.layout.align.horizontal }, dpi(4), dpi(7)), "#343434"), + arrow("#343434", theme.bg_normal), + wibox.container.background(wibox.container.margin(wibox.widget { mpdicon, theme.mpd.widget, layout = wibox.layout.align.horizontal }, dpi(3), dpi(6)), theme.bg_focus), + arrow(theme.bg_normal, "#343434"), + wibox.container.background(wibox.container.margin(task, dpi(3), dpi(7)), "#343434"), + arrow("#343434", "#777E76"), + wibox.container.background(wibox.container.margin(wibox.widget { memicon, mem.widget, layout = wibox.layout.align.horizontal }, dpi(2), dpi(3)), "#777E76"), + arrow("#777E76", "#4B696D"), + wibox.container.background(wibox.container.margin(wibox.widget { cpuicon, cpu.widget, layout = wibox.layout.align.horizontal }, dpi(3), dpi(4)), "#4B696D"), + arrow("#4B696D", "#4B3B51"), + wibox.container.background(wibox.container.margin(wibox.widget { tempicon, temp.widget, layout = wibox.layout.align.horizontal }, dpi(4), dpi(4)), "#4B3B51"), + arrow("#4B3B51", "#CB755B"), + wibox.container.background(wibox.container.margin(wibox.widget { fsicon, theme.fs and theme.fs.widget, layout = wibox.layout.align.horizontal }, dpi(3), dpi(3)), "#CB755B"), + arrow("#CB755B", "#8DAA9A"), + wibox.container.background(wibox.container.margin(wibox.widget { baticon, bat.widget, layout = wibox.layout.align.horizontal }, dpi(3), dpi(3)), "#8DAA9A"), + arrow("#8DAA9A", "#C0C0A2"), + wibox.container.background(wibox.container.margin(wibox.widget { nil, neticon, net.widget, layout = wibox.layout.align.horizontal }, dpi(3), dpi(3)), "#C0C0A2"), + arrow("#C0C0A2", "#777E76"), + wibox.container.background(wibox.container.margin(binclock.widget, dpi(4), dpi(8)), "#777E76"), + arrow("#777E76", "alpha"), + --]] + s.mylayoutbox, + }, + } +end + +return theme diff --git a/.config/awesome/themes/powerarrow/wall.png b/.config/awesome/themes/powerarrow/wall.png new file mode 100755 index 0000000..0989db9 Binary files /dev/null and b/.config/awesome/themes/powerarrow/wall.png differ diff --git a/.config/awesome/themes/rainbow/icons/awesome.png b/.config/awesome/themes/rainbow/icons/awesome.png new file mode 100755 index 0000000..d99fd37 Binary files /dev/null and b/.config/awesome/themes/rainbow/icons/awesome.png differ diff --git a/.config/awesome/themes/rainbow/icons/square_sel.png b/.config/awesome/themes/rainbow/icons/square_sel.png new file mode 100755 index 0000000..532719f Binary files /dev/null and b/.config/awesome/themes/rainbow/icons/square_sel.png differ diff --git a/.config/awesome/themes/rainbow/icons/square_unsel.png b/.config/awesome/themes/rainbow/icons/square_unsel.png new file mode 100755 index 0000000..72dea5b Binary files /dev/null and b/.config/awesome/themes/rainbow/icons/square_unsel.png differ diff --git a/.config/awesome/themes/rainbow/icons/submenu.png b/.config/awesome/themes/rainbow/icons/submenu.png new file mode 100755 index 0000000..26ab82a Binary files /dev/null and b/.config/awesome/themes/rainbow/icons/submenu.png differ diff --git a/.config/awesome/themes/rainbow/theme.lua b/.config/awesome/themes/rainbow/theme.lua new file mode 100755 index 0000000..7837b93 --- /dev/null +++ b/.config/awesome/themes/rainbow/theme.lua @@ -0,0 +1,279 @@ +--[[ + + Rainbow Awesome WM theme 2.0 + github.com/lcpz + +--]] + +local gears = require("gears") +local lain = require("lain") +local awful = require("awful") +local wibox = require("wibox") +local dpi = require("beautiful.xresources").apply_dpi + +local os = os +local my_table = awful.util.table or gears.table -- 4.{0,1} compatibility + +local theme = {} +theme.default_dir = require("awful.util").get_themes_dir() .. "default" +theme.dir = os.getenv("HOME") .. "/.config/awesome/themes/rainbow" +theme.wallpaper = theme.dir .. "/wall.png" +theme.font = "Terminus 10.5" +theme.fg_normal = "#9E9E9E" +theme.fg_focus = "#EBEBFF" +theme.bg_normal = "#242424" +theme.bg_focus = "#242424" +theme.fg_urgent = "#000000" +theme.bg_urgent = "#FFFFFF" +theme.border_width = dpi(1) +theme.border_normal = "#242424" +theme.border_focus = "#EBEBFF" +theme.taglist_fg_focus = "#EDEFFF" +theme.taglist_bg_focus = "#242424" +theme.menu_height = dpi(16) +theme.menu_width = dpi(140) +theme.ocol = "" +theme.tasklist_sticky = theme.ocol .. "[S]" +theme.tasklist_ontop = theme.ocol .. "[T]" +theme.tasklist_floating = theme.ocol .. "[F]" +theme.tasklist_maximized_horizontal = theme.ocol .. "[M] " +theme.tasklist_maximized_vertical = "" +theme.tasklist_disable_icon = true +theme.awesome_icon = theme.dir .."/icons/awesome.png" +theme.menu_submenu_icon = theme.dir .."/icons/submenu.png" +theme.taglist_squares_sel = theme.dir .. "/icons/square_sel.png" +theme.taglist_squares_unsel = theme.dir .. "/icons/square_unsel.png" +theme.useless_gap = dpi(8) +theme.layout_txt_tile = "[t]" +theme.layout_txt_tileleft = "[l]" +theme.layout_txt_tilebottom = "[b]" +theme.layout_txt_tiletop = "[tt]" +theme.layout_txt_fairv = "[fv]" +theme.layout_txt_fairh = "[fh]" +theme.layout_txt_spiral = "[s]" +theme.layout_txt_dwindle = "[d]" +theme.layout_txt_max = "[m]" +theme.layout_txt_fullscreen = "[F]" +theme.layout_txt_magnifier = "[M]" +theme.layout_txt_floating = "[*]" +theme.titlebar_close_button_normal = theme.default_dir.."/titlebar/close_normal.png" +theme.titlebar_close_button_focus = theme.default_dir.."/titlebar/close_focus.png" +theme.titlebar_minimize_button_normal = theme.default_dir.."/titlebar/minimize_normal.png" +theme.titlebar_minimize_button_focus = theme.default_dir.."/titlebar/minimize_focus.png" +theme.titlebar_ontop_button_normal_inactive = theme.default_dir.."/titlebar/ontop_normal_inactive.png" +theme.titlebar_ontop_button_focus_inactive = theme.default_dir.."/titlebar/ontop_focus_inactive.png" +theme.titlebar_ontop_button_normal_active = theme.default_dir.."/titlebar/ontop_normal_active.png" +theme.titlebar_ontop_button_focus_active = theme.default_dir.."/titlebar/ontop_focus_active.png" +theme.titlebar_sticky_button_normal_inactive = theme.default_dir.."/titlebar/sticky_normal_inactive.png" +theme.titlebar_sticky_button_focus_inactive = theme.default_dir.."/titlebar/sticky_focus_inactive.png" +theme.titlebar_sticky_button_normal_active = theme.default_dir.."/titlebar/sticky_normal_active.png" +theme.titlebar_sticky_button_focus_active = theme.default_dir.."/titlebar/sticky_focus_active.png" +theme.titlebar_floating_button_normal_inactive = theme.default_dir.."/titlebar/floating_normal_inactive.png" +theme.titlebar_floating_button_focus_inactive = theme.default_dir.."/titlebar/floating_focus_inactive.png" +theme.titlebar_floating_button_normal_active = theme.default_dir.."/titlebar/floating_normal_active.png" +theme.titlebar_floating_button_focus_active = theme.default_dir.."/titlebar/floating_focus_active.png" +theme.titlebar_maximized_button_normal_inactive = theme.default_dir.."/titlebar/maximized_normal_inactive.png" +theme.titlebar_maximized_button_focus_inactive = theme.default_dir.."/titlebar/maximized_focus_inactive.png" +theme.titlebar_maximized_button_normal_active = theme.default_dir.."/titlebar/maximized_normal_active.png" +theme.titlebar_maximized_button_focus_active = theme.default_dir.."/titlebar/maximized_focus_active.png" + +-- lain related +theme.layout_txt_cascade = "[cascade]" +theme.layout_txt_cascadetile = "[cascadetile]" +theme.layout_txt_centerwork = "[centerwork]" +theme.layout_txt_termfair = "[termfair]" +theme.layout_txt_centerfair = "[centerfair]" + +local markup = lain.util.markup +local white = theme.fg_focus +local gray = theme.fg_normal + +-- Textclock +local mytextclock = wibox.widget.textclock(markup(white, " %H:%M ")) +mytextclock.font = theme.font + +-- Calendar +theme.cal = lain.widget.cal({ + attach_to = { mytextclock }, + notification_preset = { + font = "Terminus 11", + fg = white, + bg = theme.bg_normal + } +}) + +-- Mail IMAP check +--[[ commented because it needs to be set before use +theme.mail = lain.widget.imap({ + timeout = 180, + server = "server", + mail = "mail", + password = "keyring get mail", + settings = function() + mail_notification_preset.fg = white + + mail = "" + count = "" + + if mailcount > 0 then + mail = "Mail " + count = mailcount .. " " + end + + widget:set_markup(markup.font(theme.font, markup(gray, mail) .. markup(white, count))) + end +}) +--]] + +-- MPD +theme.mpd = lain.widget.mpd({ + settings = function() + mpd_notification_preset.fg = white + + artist = mpd_now.artist .. " " + title = mpd_now.title .. " " + + if mpd_now.state == "pause" then + artist = "mpd " + title = "paused " + elseif mpd_now.state == "stop" then + artist = "" + title = "" + end + + widget:set_markup(markup.font(theme.font, markup(gray, artist) .. markup(white, title))) + end +}) + +-- /home fs +--[[ commented because it needs Gio/Glib >= 2.54 +theme.fs = lain.widget.fs({ + notification_preset = { fg = white, bg = theme.bg_normal, font = "Terminus 10.5" }, + settings = function() + local fs_header, fs_p = "", "" + + if fs_now["/home"].percentage >= 90 then + fs_header = " Hdd " + fs_p = fs_now["/home"].percentage + end + + widget:set_markup(markup.font(theme.font, markup(gray, fs_header) .. markup(white, fs_p))) + end +}) +--]] + +-- ALSA volume bar +theme.volume = lain.widget.alsabar({ + ticks = true, width = dpi(67), + notification_preset = { font = theme.font } +}) +theme.volume.tooltip.wibox.fg = theme.fg_focus +theme.volume.tooltip.wibox.font = theme.font +theme.volume.bar:buttons(my_table.join ( + awful.button({}, 1, function() + awful.spawn(string.format("%s -e alsamixer", terminal)) + end), + awful.button({}, 2, function() + os.execute(string.format("%s set %s 100%%", theme.volume.cmd, theme.volume.channel)) + theme.volume.update() + end), + awful.button({}, 3, function() + os.execute(string.format("%s set %s toggle", theme.volume.cmd, theme.volume.togglechannel or theme.volume.channel)) + theme.volume.update() + end), + awful.button({}, 4, function() + os.execute(string.format("%s set %s 1%%+", theme.volume.cmd, theme.volume.channel)) + theme.volume.update() + end), + awful.button({}, 5, function() + os.execute(string.format("%s set %s 1%%-", theme.volume.cmd, theme.volume.channel)) + theme.volume.update() + end) +)) +local volumebg = wibox.container.background(theme.volume.bar, "#585858", gears.shape.rectangle) +local volumewidget = wibox.container.margin(volumebg, dpi(7), dpi(7), dpi(5), dpi(5)) + +-- Weather +--[[ to be set before use +theme.weather = lain.widget.weather({ + --APPID = + city_id = 2643743, -- placeholder (London) + notification_preset = { font = theme.font, fg = white } +}) +--]] + +-- Separators +local first = wibox.widget.textbox(markup.font("Terminus 4", " ")) +local spr = wibox.widget.textbox(' ') + +local function update_txt_layoutbox(s) + -- Writes a string representation of the current layout in a textbox widget + local txt_l = theme["layout_txt_" .. awful.layout.getname(awful.layout.get(s))] or "" + s.mytxtlayoutbox:set_text(txt_l) +end + +function theme.at_screen_connect(s) + -- Quake application + s.quake = lain.util.quake({ app = awful.util.terminal }) + + -- If wallpaper is a function, call it with the screen + local wallpaper = theme.wallpaper + if type(wallpaper) == "function" then + wallpaper = wallpaper(s) + end + gears.wallpaper.maximized(wallpaper, s, true) + + -- Tags + awful.tag(awful.util.tagnames, s, awful.layout.layouts[1]) + + -- Create a promptbox for each screen + s.mypromptbox = awful.widget.prompt() + + -- Textual layoutbox + s.mytxtlayoutbox = wibox.widget.textbox(theme["layout_txt_" .. awful.layout.getname(awful.layout.get(s))]) + awful.tag.attached_connect_signal(s, "property::selected", function () update_txt_layoutbox(s) end) + awful.tag.attached_connect_signal(s, "property::layout", function () update_txt_layoutbox(s) end) + s.mytxtlayoutbox:buttons(my_table.join( + awful.button({}, 1, function() awful.layout.inc(1) end), + awful.button({}, 2, function () awful.layout.set( awful.layout.layouts[1] ) end), + awful.button({}, 3, function() awful.layout.inc(-1) end), + awful.button({}, 4, function() awful.layout.inc(1) end), + awful.button({}, 5, function() awful.layout.inc(-1) end))) + + -- Create a taglist widget + s.mytaglist = awful.widget.taglist(s, awful.widget.taglist.filter.all, awful.util.taglist_buttons) + + -- Create a tasklist widget + s.mytasklist = awful.widget.tasklist(s, awful.widget.tasklist.filter.currenttags, awful.util.tasklist_buttons) + + -- Create the wibox + s.mywibox = awful.wibar({ position = "top", screen = s, height = dpi(18), bg = theme.bg_normal, fg = theme.fg_normal }) + + -- Add widgets to the wibox + s.mywibox:setup { + layout = wibox.layout.align.horizontal, + { -- Left widgets + layout = wibox.layout.fixed.horizontal, + first, + s.mytaglist, + spr, + s.mytxtlayoutbox, + --spr, + s.mypromptbox, + spr, + }, + s.mytasklist, -- Middle widget + { -- Right widgets + layout = wibox.layout.fixed.horizontal, + wibox.widget.systray(), + spr, + theme.mpd.widget, + --theme.mail.widget, + --theme.fs.widget, + volumewidget, + mytextclock, + }, + } +end + +return theme diff --git a/.config/awesome/themes/rainbow/wall.png b/.config/awesome/themes/rainbow/wall.png new file mode 100755 index 0000000..6bed238 Binary files /dev/null and b/.config/awesome/themes/rainbow/wall.png differ diff --git a/.config/awesome/themes/steamburn/icons/awesome.png b/.config/awesome/themes/steamburn/icons/awesome.png new file mode 100755 index 0000000..0306bdf Binary files /dev/null and b/.config/awesome/themes/steamburn/icons/awesome.png differ diff --git a/.config/awesome/themes/steamburn/icons/square_sel.png b/.config/awesome/themes/steamburn/icons/square_sel.png new file mode 100755 index 0000000..2bcabb8 Binary files /dev/null and b/.config/awesome/themes/steamburn/icons/square_sel.png differ diff --git a/.config/awesome/themes/steamburn/icons/square_unsel.png b/.config/awesome/themes/steamburn/icons/square_unsel.png new file mode 100755 index 0000000..14c4fe4 Binary files /dev/null and b/.config/awesome/themes/steamburn/icons/square_unsel.png differ diff --git a/.config/awesome/themes/steamburn/icons/submenu.png b/.config/awesome/themes/steamburn/icons/submenu.png new file mode 100755 index 0000000..12b97c6 Binary files /dev/null and b/.config/awesome/themes/steamburn/icons/submenu.png differ diff --git a/.config/awesome/themes/steamburn/theme.lua b/.config/awesome/themes/steamburn/theme.lua new file mode 100755 index 0000000..a6631a3 --- /dev/null +++ b/.config/awesome/themes/steamburn/theme.lua @@ -0,0 +1,278 @@ +--[[ + + Steamburn Awesome WM theme 3.0 + github.com/lcpz + +--]] + +local gears = require("gears") +local lain = require("lain") +local awful = require("awful") +local wibox = require("wibox") +local dpi = require("beautiful.xresources").apply_dpi + +local os = os +local my_table = awful.util.table or gears.table -- 4.{0,1} compatibility + +local theme = {} +theme.zenburn_dir = require("awful.util").get_themes_dir() .. "zenburn" +theme.dir = os.getenv("HOME") .. "/.config/awesome/themes/steamburn" +theme.wallpaper = theme.dir .. "/wall.png" +theme.font = "Terminus 10.5" +theme.fg_normal = "#e2ccb0" +theme.fg_focus = "#d88166" +theme.fg_urgent = "#CC9393" +theme.bg_normal = "#140c0b" +theme.bg_focus = "#140c0b" +theme.bg_urgent = "#2a1f1e" +theme.border_width = dpi(1) +theme.border_normal = "#302627" +theme.border_focus = "#c2745b" +theme.border_marked = "#CC9393" +theme.taglist_fg_focus = "#d88166" +theme.tasklist_bg_focus = "#140c0b" +theme.tasklist_fg_focus = "#d88166" +theme.taglist_squares_sel = theme.dir .. "/icons/square_sel.png" +theme.taglist_squares_unsel = theme.dir .. "/icons/square_unsel.png" +theme.menu_height = dpi(16) +theme.menu_width = dpi(140) +theme.awesome_icon = theme.dir .."/icons/awesome.png" +theme.menu_submenu_icon = theme.dir .. "/icons/submenu.png" +theme.layout_txt_tile = "[t]" +theme.layout_txt_tileleft = "[l]" +theme.layout_txt_tilebottom = "[b]" +theme.layout_txt_tiletop = "[tt]" +theme.layout_txt_fairv = "[fv]" +theme.layout_txt_fairh = "[fh]" +theme.layout_txt_spiral = "[s]" +theme.layout_txt_dwindle = "[d]" +theme.layout_txt_max = "[m]" +theme.layout_txt_fullscreen = "[F]" +theme.layout_txt_magnifier = "[M]" +theme.layout_txt_floating = "[|]" +theme.tasklist_plain_task_name = true +theme.tasklist_disable_icon = true +theme.useless_gap = dpi(0) +theme.titlebar_close_button_normal = theme.zenburn_dir.."/titlebar/close_normal.png" +theme.titlebar_close_button_focus = theme.zenburn_dir.."/titlebar/close_focus.png" +theme.titlebar_minimize_button_normal = theme.zenburn_dir.."/titlebar/minimize_normal.png" +theme.titlebar_minimize_button_focus = theme.zenburn_dir.."/titlebar/minimize_focus.png" +theme.titlebar_ontop_button_normal_inactive = theme.zenburn_dir.."/titlebar/ontop_normal_inactive.png" +theme.titlebar_ontop_button_focus_inactive = theme.zenburn_dir.."/titlebar/ontop_focus_inactive.png" +theme.titlebar_ontop_button_normal_active = theme.zenburn_dir.."/titlebar/ontop_normal_active.png" +theme.titlebar_ontop_button_focus_active = theme.zenburn_dir.."/titlebar/ontop_focus_active.png" +theme.titlebar_sticky_button_normal_inactive = theme.zenburn_dir.."/titlebar/sticky_normal_inactive.png" +theme.titlebar_sticky_button_focus_inactive = theme.zenburn_dir.."/titlebar/sticky_focus_inactive.png" +theme.titlebar_sticky_button_normal_active = theme.zenburn_dir.."/titlebar/sticky_normal_active.png" +theme.titlebar_sticky_button_focus_active = theme.zenburn_dir.."/titlebar/sticky_focus_active.png" +theme.titlebar_floating_button_normal_inactive = theme.zenburn_dir.."/titlebar/floating_normal_inactive.png" +theme.titlebar_floating_button_focus_inactive = theme.zenburn_dir.."/titlebar/floating_focus_inactive.png" +theme.titlebar_floating_button_normal_active = theme.zenburn_dir.."/titlebar/floating_normal_active.png" +theme.titlebar_floating_button_focus_active = theme.zenburn_dir.."/titlebar/floating_focus_active.png" +theme.titlebar_maximized_button_normal_inactive = theme.zenburn_dir.."/titlebar/maximized_normal_inactive.png" +theme.titlebar_maximized_button_focus_inactive = theme.zenburn_dir.."/titlebar/maximized_focus_inactive.png" +theme.titlebar_maximized_button_normal_active = theme.zenburn_dir.."/titlebar/maximized_normal_active.png" +theme.titlebar_maximized_button_focus_active = theme.zenburn_dir.."/titlebar/maximized_focus_active.png" + +-- lain related +theme.layout_txt_termfair = "[termfair]" +theme.layout_txt_centerfair = "[centerfair]" + +local markup = lain.util.markup +local gray = "#94928F" + +-- Textclock +local mytextclock = wibox.widget.textclock(" %H:%M ") +mytextclock.font = theme.font + +-- Calendar +theme.cal = lain.widget.cal({ + attach_to = { mytextclock }, + notification_preset = { + font = "Terminus 11", + fg = theme.fg_normal, + bg = theme.bg_normal + } +}) + +-- Mail IMAP check +--[[ to be set before use +theme.mail = lain.widget.imap({ + timeout = 180, + server = "server", + mail = "mail", + password = "keyring get mail", + settings = function() + mail = "" + count = "" + + if mailcount > 0 then + mail = "Mail " + count = mailcount .. " " + end + + widget:set_markup(markup(gray, mail) .. count) + end +}) +--]] + +-- MPD +theme.mpd = lain.widget.mpd({ + settings = function() + artist = mpd_now.artist .. " " + title = mpd_now.title .. " " + + if mpd_now.state == "pause" then + artist = "mpd " + title = "paused " + elseif mpd_now.state == "stop" then + artist = "" + title = "" + end + + widget:set_markup(markup.font(theme.font, markup(gray, artist) .. title)) + end +}) + +-- CPU +local cpu = lain.widget.sysload({ + settings = function() + widget:set_markup(markup.font(theme.font, markup(gray, " Cpu ") .. load_1 .. " ")) + end +}) + +-- MEM +local mem = lain.widget.mem({ + settings = function() + widget:set_markup(markup.font(theme.font, markup(gray, " Mem ") .. mem_now.used .. " ")) + end +}) + +-- /home fs +--[[ commented because it needs Gio/Glib >= 2.54 +theme.fs = lain.widget.fs({ + partition = "/home", + notification_preset = { fg = theme.fg_normal, bg = theme.bg_normal, font = "Terminus 10.5" }, +}) +--]] + +-- Battery +local bat = lain.widget.bat({ + settings = function() + local perc = bat_now.perc + if bat_now.ac_status == 1 then perc = perc .. " Plug" end + widget:set_markup(markup.font(theme.font, markup(gray, " Bat ") .. perc .. " ")) + end +}) + +-- Net checker +local net = lain.widget.net({ + settings = function() + if net_now.state == "up" then net_state = "On" + else net_state = "Off" end + widget:set_markup(markup.font(theme.font, markup(gray, " Net ") .. net_state .. " ")) + end +}) + +-- ALSA volume +theme.volume = lain.widget.alsa({ + settings = function() + header = " Vol " + vlevel = volume_now.level + + if volume_now.status == "off" then + vlevel = vlevel .. "M " + else + vlevel = vlevel .. " " + end + + widget:set_markup(markup.font(theme.font, markup(gray, header) .. vlevel)) + end +}) + +-- Weather +--[[ to be set before use +theme.weather = lain.widget.weather({ + --APPID = + city_id = 2643743, -- placeholder (London) +}) +--]] + +-- Separators +local first = wibox.widget.textbox(markup.font("Terminus 4", " ")) +local spr = wibox.widget.textbox(' ') + +local function update_txt_layoutbox(s) + -- Writes a string representation of the current layout in a textbox widget + local txt_l = theme["layout_txt_" .. awful.layout.getname(awful.layout.get(s))] or "" + s.mytxtlayoutbox:set_text(txt_l) +end + +function theme.at_screen_connect(s) + -- Quake application + s.quake = lain.util.quake({ app = awful.util.terminal }) + + -- If wallpaper is a function, call it with the screen + local wallpaper = theme.wallpaper + if type(wallpaper) == "function" then + wallpaper = wallpaper(s) + end + gears.wallpaper.maximized(wallpaper, s, true) + + -- Tags + awful.tag(awful.util.tagnames, s, awful.layout.layouts[1]) + + -- Create a promptbox for each screen + s.mypromptbox = awful.widget.prompt() + + -- Textual layoutbox + s.mytxtlayoutbox = wibox.widget.textbox(theme["layout_txt_" .. awful.layout.getname(awful.layout.get(s))]) + awful.tag.attached_connect_signal(s, "property::selected", function () update_txt_layoutbox(s) end) + awful.tag.attached_connect_signal(s, "property::layout", function () update_txt_layoutbox(s) end) + s.mytxtlayoutbox:buttons(my_table.join( + awful.button({}, 1, function() awful.layout.inc(1) end), + awful.button({}, 2, function () awful.layout.set( awful.layout.layouts[1] ) end), + awful.button({}, 3, function() awful.layout.inc(-1) end), + awful.button({}, 4, function() awful.layout.inc(1) end), + awful.button({}, 5, function() awful.layout.inc(-1) end))) + + -- Create a taglist widget + s.mytaglist = awful.widget.taglist(s, awful.widget.taglist.filter.all, awful.util.taglist_buttons) + + -- Create a tasklist widget + s.mytasklist = awful.widget.tasklist(s, awful.widget.tasklist.filter.currenttags, awful.util.tasklist_buttons) + + -- Create the wibox + s.mywibox = awful.wibar({ position = "top", screen = s, height = dpi(18) }) + + -- Add widgets to the wibox + s.mywibox:setup { + layout = wibox.layout.align.horizontal, + { -- Left widgets + layout = wibox.layout.fixed.horizontal, + first, + s.mytaglist, + spr, + s.mytxtlayoutbox, + --spr, + s.mypromptbox, + spr, + }, + s.mytasklist, -- Middle widget + { -- Right widgets + layout = wibox.layout.fixed.horizontal, + wibox.widget.systray(), + spr, + theme.mpd.widget, + --theme.mail.widget, + cpu.widget, + mem.widget, + bat.widget, + net.widget, + theme.volume.widget, + mytextclock + }, + } +end + +return theme diff --git a/.config/awesome/themes/steamburn/wall.png b/.config/awesome/themes/steamburn/wall.png new file mode 100755 index 0000000..57359d1 Binary files /dev/null and b/.config/awesome/themes/steamburn/wall.png differ diff --git a/.config/awesome/themes/vertex/icons/awesome.png b/.config/awesome/themes/vertex/icons/awesome.png new file mode 100755 index 0000000..cbded64 Binary files /dev/null and b/.config/awesome/themes/vertex/icons/awesome.png differ diff --git a/.config/awesome/themes/vertex/icons/bat-000-charging.png b/.config/awesome/themes/vertex/icons/bat-000-charging.png new file mode 100755 index 0000000..cc2abdd Binary files /dev/null and b/.config/awesome/themes/vertex/icons/bat-000-charging.png differ diff --git a/.config/awesome/themes/vertex/icons/bat-000.png b/.config/awesome/themes/vertex/icons/bat-000.png new file mode 100755 index 0000000..550d8f0 Binary files /dev/null and b/.config/awesome/themes/vertex/icons/bat-000.png differ diff --git a/.config/awesome/themes/vertex/icons/bat-020-charging.png b/.config/awesome/themes/vertex/icons/bat-020-charging.png new file mode 100755 index 0000000..bd5e788 Binary files /dev/null and b/.config/awesome/themes/vertex/icons/bat-020-charging.png differ diff --git a/.config/awesome/themes/vertex/icons/bat-020.png b/.config/awesome/themes/vertex/icons/bat-020.png new file mode 100755 index 0000000..c8525eb Binary files /dev/null and b/.config/awesome/themes/vertex/icons/bat-020.png differ diff --git a/.config/awesome/themes/vertex/icons/bat-040-charging.png b/.config/awesome/themes/vertex/icons/bat-040-charging.png new file mode 100755 index 0000000..5d20c11 Binary files /dev/null and b/.config/awesome/themes/vertex/icons/bat-040-charging.png differ diff --git a/.config/awesome/themes/vertex/icons/bat-040.png b/.config/awesome/themes/vertex/icons/bat-040.png new file mode 100755 index 0000000..ad378bf Binary files /dev/null and b/.config/awesome/themes/vertex/icons/bat-040.png differ diff --git a/.config/awesome/themes/vertex/icons/bat-060-charging.png b/.config/awesome/themes/vertex/icons/bat-060-charging.png new file mode 100755 index 0000000..ea7c293 Binary files /dev/null and b/.config/awesome/themes/vertex/icons/bat-060-charging.png differ diff --git a/.config/awesome/themes/vertex/icons/bat-060.png b/.config/awesome/themes/vertex/icons/bat-060.png new file mode 100755 index 0000000..5883885 Binary files /dev/null and b/.config/awesome/themes/vertex/icons/bat-060.png differ diff --git a/.config/awesome/themes/vertex/icons/bat-080-charging.png b/.config/awesome/themes/vertex/icons/bat-080-charging.png new file mode 100755 index 0000000..b633044 Binary files /dev/null and b/.config/awesome/themes/vertex/icons/bat-080-charging.png differ diff --git a/.config/awesome/themes/vertex/icons/bat-080.png b/.config/awesome/themes/vertex/icons/bat-080.png new file mode 100755 index 0000000..d3fb971 Binary files /dev/null and b/.config/awesome/themes/vertex/icons/bat-080.png differ diff --git a/.config/awesome/themes/vertex/icons/bat-100-charging.png b/.config/awesome/themes/vertex/icons/bat-100-charging.png new file mode 100755 index 0000000..f2d7419 Binary files /dev/null and b/.config/awesome/themes/vertex/icons/bat-100-charging.png differ diff --git a/.config/awesome/themes/vertex/icons/bat-100.png b/.config/awesome/themes/vertex/icons/bat-100.png new file mode 100755 index 0000000..5852e69 Binary files /dev/null and b/.config/awesome/themes/vertex/icons/bat-100.png differ diff --git a/.config/awesome/themes/vertex/icons/bat-charged.png b/.config/awesome/themes/vertex/icons/bat-charged.png new file mode 100755 index 0000000..bb6b657 Binary files /dev/null and b/.config/awesome/themes/vertex/icons/bat-charged.png differ diff --git a/.config/awesome/themes/vertex/icons/ethernet-connected.png b/.config/awesome/themes/vertex/icons/ethernet-connected.png new file mode 100755 index 0000000..6894931 Binary files /dev/null and b/.config/awesome/themes/vertex/icons/ethernet-connected.png differ diff --git a/.config/awesome/themes/vertex/icons/ethernet-disconnected.png b/.config/awesome/themes/vertex/icons/ethernet-disconnected.png new file mode 100755 index 0000000..cfd73bb Binary files /dev/null and b/.config/awesome/themes/vertex/icons/ethernet-disconnected.png differ diff --git a/.config/awesome/themes/vertex/icons/panel.png b/.config/awesome/themes/vertex/icons/panel.png new file mode 100755 index 0000000..2f429e5 Binary files /dev/null and b/.config/awesome/themes/vertex/icons/panel.png differ diff --git a/.config/awesome/themes/vertex/icons/volume-high.png b/.config/awesome/themes/vertex/icons/volume-high.png new file mode 100755 index 0000000..8fc8279 Binary files /dev/null and b/.config/awesome/themes/vertex/icons/volume-high.png differ diff --git a/.config/awesome/themes/vertex/icons/volume-low.png b/.config/awesome/themes/vertex/icons/volume-low.png new file mode 100755 index 0000000..7a0682f Binary files /dev/null and b/.config/awesome/themes/vertex/icons/volume-low.png differ diff --git a/.config/awesome/themes/vertex/icons/volume-medium.png b/.config/awesome/themes/vertex/icons/volume-medium.png new file mode 100755 index 0000000..2b5c888 Binary files /dev/null and b/.config/awesome/themes/vertex/icons/volume-medium.png differ diff --git a/.config/awesome/themes/vertex/icons/volume-muted-blocked.png b/.config/awesome/themes/vertex/icons/volume-muted-blocked.png new file mode 100755 index 0000000..6dea15b Binary files /dev/null and b/.config/awesome/themes/vertex/icons/volume-muted-blocked.png differ diff --git a/.config/awesome/themes/vertex/icons/volume-muted.png b/.config/awesome/themes/vertex/icons/volume-muted.png new file mode 100755 index 0000000..7d08ac9 Binary files /dev/null and b/.config/awesome/themes/vertex/icons/volume-muted.png differ diff --git a/.config/awesome/themes/vertex/icons/volume-off.png b/.config/awesome/themes/vertex/icons/volume-off.png new file mode 100755 index 0000000..8a6d8c5 Binary files /dev/null and b/.config/awesome/themes/vertex/icons/volume-off.png differ diff --git a/.config/awesome/themes/vertex/icons/wireless-disconnected.png b/.config/awesome/themes/vertex/icons/wireless-disconnected.png new file mode 100755 index 0000000..f98d8b4 Binary files /dev/null and b/.config/awesome/themes/vertex/icons/wireless-disconnected.png differ diff --git a/.config/awesome/themes/vertex/icons/wireless-full.png b/.config/awesome/themes/vertex/icons/wireless-full.png new file mode 100755 index 0000000..3f83dec Binary files /dev/null and b/.config/awesome/themes/vertex/icons/wireless-full.png differ diff --git a/.config/awesome/themes/vertex/icons/wireless-high.png b/.config/awesome/themes/vertex/icons/wireless-high.png new file mode 100755 index 0000000..b3622ec Binary files /dev/null and b/.config/awesome/themes/vertex/icons/wireless-high.png differ diff --git a/.config/awesome/themes/vertex/icons/wireless-low.png b/.config/awesome/themes/vertex/icons/wireless-low.png new file mode 100755 index 0000000..3f1e740 Binary files /dev/null and b/.config/awesome/themes/vertex/icons/wireless-low.png differ diff --git a/.config/awesome/themes/vertex/icons/wireless-medium.png b/.config/awesome/themes/vertex/icons/wireless-medium.png new file mode 100755 index 0000000..6bd0ec5 Binary files /dev/null and b/.config/awesome/themes/vertex/icons/wireless-medium.png differ diff --git a/.config/awesome/themes/vertex/icons/wireless-none.png b/.config/awesome/themes/vertex/icons/wireless-none.png new file mode 100755 index 0000000..e47b478 Binary files /dev/null and b/.config/awesome/themes/vertex/icons/wireless-none.png differ diff --git a/.config/awesome/themes/vertex/theme.lua b/.config/awesome/themes/vertex/theme.lua new file mode 100755 index 0000000..14190bd --- /dev/null +++ b/.config/awesome/themes/vertex/theme.lua @@ -0,0 +1,470 @@ +--[[ + + Vertex Awesome WM theme + github.com/lcpz + +--]] + +local gears = require("gears") +local lain = require("lain") +local awful = require("awful") +local wibox = require("wibox") +local dpi = require("beautiful.xresources").apply_dpi + +local math, string, tag, tonumber, type, os = math, string, tag, tonumber, type, os +local my_table = awful.util.table or gears.table -- 4.{0,1} compatibility + +local theme = {} +theme.default_dir = require("awful.util").get_themes_dir() .. "default" +theme.icon_dir = os.getenv("HOME") .. "/.config/awesome/themes/vertex/icons" +theme.wallpaper = os.getenv("HOME") .. "/.config/awesome/themes/vertex/wall.png" +theme.font = "Roboto Bold 10" +theme.taglist_font = "FontAwesome 17" +theme.fg_normal = "#FFFFFF" +theme.fg_focus = "#6A95EB" +theme.bg_focus = "#303030" +theme.bg_focus2 = "#3762B8" +theme.bg_normal = "#242424" +theme.fg_urgent = "#CC9393" +theme.bg_urgent = "#006B8E" +theme.border_width = dpi(4) +theme.border_normal = "#252525" +theme.border_focus = "#7CA2EE" +theme.tooltip_border_color = theme.fg_focus +theme.tooltip_border_width = theme.border_width +theme.menu_height = dpi(24) +theme.menu_width = dpi(140) +theme.awesome_icon = theme.icon_dir .. "/awesome.png" +theme.taglist_squares_sel = gears.surface.load_from_shape(dpi(3), dpi(30), gears.shape.rectangle, theme.fg_focus) +theme.taglist_squares_unsel = gears.surface.load_from_shape(dpi(3), dpi(30), gears.shape.rectangle, theme.bg_focus2) +theme.panelbg = theme.icon_dir .. "/panel.png" +theme.bat000charging = theme.icon_dir .. "/bat-000-charging.png" +theme.bat000 = theme.icon_dir .. "/bat-000.png" +theme.bat020charging = theme.icon_dir .. "/bat-020-charging.png" +theme.bat020 = theme.icon_dir .. "/bat-020.png" +theme.bat040charging = theme.icon_dir .. "/bat-040-charging.png" +theme.bat040 = theme.icon_dir .. "/bat-040.png" +theme.bat060charging = theme.icon_dir .. "/bat-060-charging.png" +theme.bat060 = theme.icon_dir .. "/bat-060.png" +theme.bat080charging = theme.icon_dir .. "/bat-080-charging.png" +theme.bat080 = theme.icon_dir .. "/bat-080.png" +theme.bat100charging = theme.icon_dir .. "/bat-100-charging.png" +theme.bat100 = theme.icon_dir .. "/bat-100.png" +theme.batcharged = theme.icon_dir .. "/bat-charged.png" +theme.ethon = theme.icon_dir .. "/ethernet-connected.png" +theme.ethoff = theme.icon_dir .. "/ethernet-disconnected.png" +theme.volhigh = theme.icon_dir .. "/volume-high.png" +theme.vollow = theme.icon_dir .. "/volume-low.png" +theme.volmed = theme.icon_dir .. "/volume-medium.png" +theme.volmutedblocked = theme.icon_dir .. "/volume-muted-blocked.png" +theme.volmuted = theme.icon_dir .. "/volume-muted.png" +theme.voloff = theme.icon_dir .. "/volume-off.png" +theme.wifidisc = theme.icon_dir .. "/wireless-disconnected.png" +theme.wififull = theme.icon_dir .. "/wireless-full.png" +theme.wifihigh = theme.icon_dir .. "/wireless-high.png" +theme.wifilow = theme.icon_dir .. "/wireless-low.png" +theme.wifimed = theme.icon_dir .. "/wireless-medium.png" +theme.wifinone = theme.icon_dir .. "/wireless-none.png" +theme.layout_fairh = theme.default_dir.."/layouts/fairhw.png" +theme.layout_fairv = theme.default_dir.."/layouts/fairvw.png" +theme.layout_floating = theme.default_dir.."/layouts/floatingw.png" +theme.layout_magnifier = theme.default_dir.."/layouts/magnifierw.png" +theme.layout_max = theme.default_dir.."/layouts/maxw.png" +theme.layout_fullscreen = theme.default_dir.."/layouts/fullscreenw.png" +theme.layout_tilebottom = theme.default_dir.."/layouts/tilebottomw.png" +theme.layout_tileleft = theme.default_dir.."/layouts/tileleftw.png" +theme.layout_tile = theme.default_dir.."/layouts/tilew.png" +theme.layout_tiletop = theme.default_dir.."/layouts/tiletopw.png" +theme.layout_spiral = theme.default_dir.."/layouts/spiralw.png" +theme.layout_dwindle = theme.default_dir.."/layouts/dwindlew.png" +theme.layout_cornernw = theme.default_dir.."/layouts/cornernww.png" +theme.layout_cornerne = theme.default_dir.."/layouts/cornernew.png" +theme.layout_cornersw = theme.default_dir.."/layouts/cornersww.png" +theme.layout_cornerse = theme.default_dir.."/layouts/cornersew.png" +theme.tasklist_plain_task_name = true +theme.tasklist_disable_icon = true +theme.useless_gap = dpi(10) +theme.titlebar_close_button_normal = theme.default_dir.."/titlebar/close_normal.png" +theme.titlebar_close_button_focus = theme.default_dir.."/titlebar/close_focus.png" +theme.titlebar_minimize_button_normal = theme.default_dir.."/titlebar/minimize_normal.png" +theme.titlebar_minimize_button_focus = theme.default_dir.."/titlebar/minimize_focus.png" +theme.titlebar_ontop_button_normal_inactive = theme.default_dir.."/titlebar/ontop_normal_inactive.png" +theme.titlebar_ontop_button_focus_inactive = theme.default_dir.."/titlebar/ontop_focus_inactive.png" +theme.titlebar_ontop_button_normal_active = theme.default_dir.."/titlebar/ontop_normal_active.png" +theme.titlebar_ontop_button_focus_active = theme.default_dir.."/titlebar/ontop_focus_active.png" +theme.titlebar_sticky_button_normal_inactive = theme.default_dir.."/titlebar/sticky_normal_inactive.png" +theme.titlebar_sticky_button_focus_inactive = theme.default_dir.."/titlebar/sticky_focus_inactive.png" +theme.titlebar_sticky_button_normal_active = theme.default_dir.."/titlebar/sticky_normal_active.png" +theme.titlebar_sticky_button_focus_active = theme.default_dir.."/titlebar/sticky_focus_active.png" +theme.titlebar_floating_button_normal_inactive = theme.default_dir.."/titlebar/floating_normal_inactive.png" +theme.titlebar_floating_button_focus_inactive = theme.default_dir.."/titlebar/floating_focus_inactive.png" +theme.titlebar_floating_button_normal_active = theme.default_dir.."/titlebar/floating_normal_active.png" +theme.titlebar_floating_button_focus_active = theme.default_dir.."/titlebar/floating_focus_active.png" +theme.titlebar_maximized_button_normal_inactive = theme.default_dir.."/titlebar/maximized_normal_inactive.png" +theme.titlebar_maximized_button_focus_inactive = theme.default_dir.."/titlebar/maximized_focus_inactive.png" +theme.titlebar_maximized_button_normal_active = theme.default_dir.."/titlebar/maximized_normal_active.png" +theme.titlebar_maximized_button_focus_active = theme.default_dir.."/titlebar/maximized_focus_active.png" + +-- http://fontawesome.io/cheatsheet +awful.util.tagnames = { "", "", "", "", "", "", "", "" } + +local markup = lain.util.markup + +-- Clock +--os.setlocale(os.getenv("LANG")) -- to localize the clock +local mytextclock = wibox.widget.textclock(markup("#FFFFFF", "%a %d %b, %H:%M")) +mytextclock.font = theme.font +theme.cal = lain.widget.cal({ + attach_to = { mytextclock }, + notification_preset = { + fg = "#FFFFFF", + bg = theme.bg_normal, + position = "top_middle", + font = "Monospace 10" + } +}) + +-- Battery +local baticon = wibox.widget.imagebox(theme.bat000) +local battooltip = awful.tooltip({ + objects = { baticon }, + margin_leftright = dpi(15), + margin_topbottom = dpi(12) +}) +battooltip.wibox.fg = theme.fg_normal +battooltip.textbox.font = theme.font +battooltip.timeout = 0 +battooltip:set_shape(function(cr, width, height) + gears.shape.infobubble(cr, width, height, corner_radius, arrow_size, width - dpi(35)) +end) +local bat = lain.widget.bat({ + settings = function() + local index, perc = "bat", tonumber(bat_now.perc) or 0 + + if perc <= 7 then + index = index .. "000" + elseif perc <= 20 then + index = index .. "020" + elseif perc <= 40 then + index = index .. "040" + elseif perc <= 60 then + index = index .. "060" + elseif perc <= 80 then + index = index .. "080" + elseif perc <= 100 then + index = index .. "100" + end + + if bat_now.ac_status == 1 then + index = index .. "charging" + end + + baticon:set_image(theme[index]) + battooltip:set_markup(string.format("\n%s%%, %s", perc, bat_now.time)) + end +}) + +-- MPD +theme.mpd = lain.widget.mpd({ + music_dir = "/mnt/storage/Downloads/Music", + settings = function() + if mpd_now.state == "play" then + title = mpd_now.title + artist = " " .. mpd_now.artist .. " " + elseif mpd_now.state == "pause" then + title = "mpd " + artist = "paused " + else + title = "" + artist = "" + end + + widget:set_markup(markup.font(theme.font, title .. markup(theme.fg_focus, artist))) + end +}) + +-- ALSA volume +local volicon = wibox.widget.imagebox() +theme.volume = lain.widget.alsabar({ + --togglechannel = "IEC958,3", + notification_preset = { font = "Monospace 12", fg = theme.fg_normal }, + settings = function() + local index, perc = "", tonumber(volume_now.level) or 0 + + if volume_now.status == "off" then + index = "volmutedblocked" + else + if perc <= 5 then + index = "volmuted" + elseif perc <= 25 then + index = "vollow" + elseif perc <= 75 then + index = "volmed" + else + index = "volhigh" + end + end + + volicon:set_image(theme[index]) + end +}) +volicon:buttons(my_table.join ( + awful.button({}, 1, function() + awful.spawn(string.format("%s -e alsamixer", awful.util.terminal)) + end), + awful.button({}, 2, function() + os.execute(string.format("%s set %s 100%%", theme.volume.cmd, theme.volume.channel)) + theme.volume.notify() + end), + awful.button({}, 3, function() + os.execute(string.format("%s set %s toggle", theme.volume.cmd, theme.volume.togglechannel or theme.volume.channel)) + theme.volume.notify() + end), + awful.button({}, 4, function() + os.execute(string.format("%s set %s 1%%+", theme.volume.cmd, theme.volume.channel)) + theme.volume.notify() + end), + awful.button({}, 5, function() + os.execute(string.format("%s set %s 1%%-", theme.volume.cmd, theme.volume.channel)) + theme.volume.notify() + end) +)) + +-- Wifi carrier and signal strength +local wificon = wibox.widget.imagebox(theme.wifidisc) +local wifitooltip = awful.tooltip({ + objects = { wificon }, + margin_leftright = dpi(15), + margin_topbottom = dpi(15) +}) +wifitooltip.wibox.fg = theme.fg_normal +wifitooltip.textbox.font = theme.font +wifitooltip.timeout = 0 +wifitooltip:set_shape(function(cr, width, height) + gears.shape.infobubble(cr, width, height, corner_radius, arrow_size, width - dpi(120)) +end) +local mywifisig = awful.widget.watch( + { awful.util.shell, "-c", "awk 'NR==3 {printf(\"%d-%.0f\\n\",$2, $3*10/7)}' /proc/net/wireless; iw dev wlan0 link" }, + 2, + function(widget, stdout) + local carrier, perc = stdout:match("(%d)-(%d+)") + local tiptext = stdout:gsub("(%d)-(%d+)", ""):gsub("%s+$", "") + perc = tonumber(perc) + + if carrier == "1" or not perc then + wificon:set_image(theme.wifidisc) + wifitooltip:set_markup("No carrier") + else + if perc <= 5 then + wificon:set_image(theme.wifinone) + elseif perc <= 25 then + wificon:set_image(theme.wifilow) + elseif perc <= 50 then + wificon:set_image(theme.wifimed) + elseif perc <= 75 then + wificon:set_image(theme.wifihigh) + else + wificon:set_image(theme.wififull) + end + wifitooltip:set_markup(tiptext) + end + end +) +wificon:connect_signal("button::press", function() awful.spawn(string.format("%s -e wavemon", awful.util.terminal)) end) + +-- Weather +--[[ to be set before use +theme.weather = lain.widget.weather({ + city_id = 2643743, -- placeholder (London) + notification_preset = { font = "Monospace 10" }, + settings = function() + units = math.floor(weather_now["main"]["temp"]) + widget:set_markup(" " .. markup.font(theme.font, units .. "°C") .. " ") + end +}) +--]] + +-- Launcher +local mylauncher = awful.widget.button({image = theme.awesome_icon}) +mylauncher:connect_signal("button::press", function() awful.util.mymainmenu:toggle() end) + +-- Separators +local space = wibox.widget.textbox(" ") +local rspace1 = wibox.widget.textbox() +local rspace0 = wibox.widget.textbox() +local rspace2 = wibox.widget.textbox() +local rspace3 = wibox.widget.textbox() +local tspace1 = wibox.widget.textbox() +tspace1.forced_width = dpi(18) +rspace1.forced_width = dpi(16) +rspace0.forced_width = dpi(18) +rspace2.forced_width = dpi(19) +rspace3.forced_width = dpi(21) + +local lspace1 = wibox.widget.textbox() +local lspace2 = wibox.widget.textbox() +local lspace3 = wibox.widget.textbox() +lspace1.forced_height = dpi(18) +lspace2.forced_height = dpi(10) +lspace3.forced_height = dpi(16) + +local barcolor = gears.color({ + type = "linear", + from = { 0, dpi(46) }, + to = { dpi(46), dpi(46) }, + stops = { {0, theme.bg_focus}, {0.9, theme.bg_focus2} } +}) + +local barcolor2 = gears.color({ + type = "linear", + from = { 0, dpi(46) }, + to = { dpi(46), dpi(46) }, + stops = { {0, "#323232"}, {1, theme.bg_normal} } +}) + +local dockshape = function(cr, width, height) + gears.shape.partially_rounded_rect(cr, width, height, false, true, true, false, 6) +end + +function theme.vertical_wibox(s) + -- Create the vertical wibox + s.dockheight = (35 * s.workarea.height)/100 + + s.myleftwibox = wibox({ screen = s, x=0, y=s.workarea.height/2 - s.dockheight/2, width = dpi(6), height = s.dockheight, fg = theme.fg_normal, bg = barcolor2, ontop = true, visible = true, type = "dock" }) + + if s.index > 1 and s.myleftwibox.y == 0 then + s.myleftwibox.y = screen[1].myleftwibox.y + end + + -- Add widgets to the vertical wibox + s.myleftwibox:setup { + layout = wibox.layout.align.vertical, + { + layout = wibox.layout.fixed.vertical, + lspace1, + s.mytaglist, + lspace2, + s.layoutb, + wibox.container.margin(mylauncher, dpi(5), dpi(8), dpi(13), dpi(0)), + }, + } + + -- Add toggling functionalities + s.docktimer = gears.timer{ timeout = 2 } + s.docktimer:connect_signal("timeout", function() + local s = awful.screen.focused() + s.myleftwibox.width = dpi(9) + s.layoutb.visible = false + mylauncher.visible = false + if s.docktimer.started then + s.docktimer:stop() + end + end) + tag.connect_signal("property::selected", function(t) + local s = t.screen or awful.screen.focused() + s.myleftwibox.width = dpi(38) + s.layoutb.visible = true + mylauncher.visible = true + gears.surface.apply_shape_bounding(s.myleftwibox, dockshape) + if not s.docktimer.started then + s.docktimer:start() + end + end) + + s.myleftwibox:connect_signal("mouse::leave", function() + local s = awful.screen.focused() + s.myleftwibox.width = dpi(9) + s.layoutb.visible = false + mylauncher.visible = false + end) + + s.myleftwibox:connect_signal("mouse::enter", function() + local s = awful.screen.focused() + s.myleftwibox.width = dpi(38) + s.layoutb.visible = true + mylauncher.visible = true + gears.surface.apply_shape_bounding(s.myleftwibox, dockshape) + end) +end + + +function theme.at_screen_connect(s) + -- Quake application + s.quake = lain.util.quake({ app = awful.util.terminal, border = theme.border_width }) + + -- If wallpaper is a function, call it with the screen + local wallpaper = theme.wallpaper + if type(wallpaper) == "function" then + wallpaper = wallpaper(s) + end + gears.wallpaper.maximized(wallpaper, s, true) + + -- Tags + awful.tag(awful.util.tagnames, s, awful.layout.layouts[1]) + + -- Create a promptbox for each screen + s.mypromptbox = awful.widget.prompt() + s.mypromptbox.bg = "#00000000" + + -- Create an imagebox widget which will contains an icon indicating which layout we're using. + -- We need one layoutbox per screen. + s.mylayoutbox = awful.widget.layoutbox(s) + s.mylayoutbox:buttons(my_table.join( + awful.button({}, 1, function () awful.layout.inc( 1) end), + awful.button({}, 2, function () awful.layout.set( awful.layout.layouts[1] ) end), + awful.button({}, 3, function () awful.layout.inc(-1) end), + awful.button({}, 4, function () awful.layout.inc( 1) end), + awful.button({}, 5, function () awful.layout.inc(-1) end))) + s.layoutb = wibox.container.margin(s.mylayoutbox, dpi(8), dpi(11), dpi(3), dpi(3)) + + -- Create a taglist widget + s.mytaglist = awful.widget.taglist(s, awful.widget.taglist.filter.all, awful.util.taglist_buttons, { + font = theme.taglist_font, + shape = gears.shape.rectangle, + spacing = dpi(10), + square_unsel = theme.square_unsel, + bg_focus = barcolor + }, nil, wibox.layout.fixed.vertical()) + + -- Create a tasklist widget + s.mytasklist = awful.widget.tasklist(s, awful.widget.tasklist.filter.focused, awful.util.tasklist_buttons, { bg_focus = "#00000000" }) + + -- Create the wibox + s.mywibox = awful.wibar({ position = "top", screen = s, height = dpi(25), bg = gears.color.create_png_pattern(theme.panelbg) }) + + -- Add widgets to the wibox + s.mywibox:setup { + layout = wibox.layout.align.horizontal, + expand = "none", + { -- Left widgets + layout = wibox.layout.fixed.horizontal, + s.mypromptbox, + tspace1, + s.mytasklist, + }, + { -- Middle widgets + layout = wibox.layout.flex.horizontal, + max_widget_size = 1500, + mytextclock + }, + { -- Right widgets + layout = wibox.layout.fixed.horizontal, + wibox.widget { nil, nil, theme.mpd.widget, layout = wibox.layout.align.horizontal }, + rspace0, + --theme.weather.icon, + --theme.weather.widget, + rspace1, + wificon, + rspace0, + volicon, + rspace2, + baticon, + rspace3, + wibox.widget.systray(), + }, + } + + gears.timer.delayed_call(theme.vertical_wibox, s) +end + +return theme diff --git a/.config/awesome/themes/vertex/wall.png b/.config/awesome/themes/vertex/wall.png new file mode 100755 index 0000000..863b1bf Binary files /dev/null and b/.config/awesome/themes/vertex/wall.png differ diff --git a/.config/awesome/widgets/mic.lua b/.config/awesome/widgets/mic.lua new file mode 100755 index 0000000..cddb105 --- /dev/null +++ b/.config/awesome/widgets/mic.lua @@ -0,0 +1,168 @@ +--[[ + + Licensed under GNU General Public License v2 + * (c) 2021, bzgec + + +# Microphone state widget/watcher + +This widget can be used to display the current microphone status. + +## Requirements + +- `amixer` - this command is used to get and toggle microphone state + +## Usage + +- Download [mic.lua](https://awesomewm.org/recipes/mic.lua) file and put it into awesome's + folder (like `~/.config/awesome/widgets/mic.lua`) + +- Add widget to `theme.lua`: + +```lua +local widgets = { + mic = require("widgets/mic"), +} +theme.mic = widgets.mic({ + timeout = 10, + settings = function(self) + if self.state == "muted" then + self.widget:set_image(theme.widget_micMuted) + else + self.widget:set_image(theme.widget_micUnmuted) + end + end +}) +local widget_mic = wibox.widget { theme.mic.widget, layout = wibox.layout.align.horizontal } +``` + +- Create a shortcut to toggle microphone state (add to `rc.lua`): + +```lua +-- Toggle microphone state +awful.key({ modkey, "Shift" }, "m", + function () + beautiful.mic:toggle() + end, + {description = "Toggle microphone (amixer)", group = "Hotkeys"} +), +``` + +- You can also add a command to mute the microphone state on boot. Add this to your `rc.lua`: + +```lua +-- Mute microphone on boot +beautiful.mic:mute() +``` + +--]] + + +local awful = require("awful") +local naughty = require("naughty") +local gears = require("gears") +local wibox = require("wibox") + +local function factory(args) + local args = args or {} + + local mic = { + widget = args.widget or wibox.widget.imagebox(), + settings = args.settings or function(self) end, + timeout = args.timeout or 10, + timer = gears.timer, + state = "", + } + + function mic:mute() + awful.spawn.easy_async({"amixer", "set", "Capture", "nocap"}, + function() + self:update() + end + ) + end + + function mic:unmute() + awful.spawn.easy_async({"amixer", "set", "Capture", "cap"}, + function() + self:update() + end + ) + end + + function mic:toggle() + awful.spawn.easy_async({"amixer", "set", "Capture", "toggle"}, + function() + self:update() + end + ) + end + + function mic:pressed(button) + if button == 1 then + self:toggle() + end + end + + function mic:update() + -- Check that timer has started + if self.timer.started then + self.timer:emit_signal("timeout") + end + end + + -- Read `amixer get Capture` command and try to `grep` all "[on]" lines. + -- - If there are lines with "[on]" then assume microphone is "unmuted". + -- - If there are NO lines with "[on]" then assume microphone is "muted". + mic, mic.timer = awful.widget.watch( + {"bash", "-c", "amixer get Capture | grep '\\[on\\]'"}, + mic.timeout, + function(self, stdout, stderr, exitreason, exitcode) + local current_micState = "error" + + if exitcode == 1 then + -- Exit code 1 - no line selected + current_micState = "muted" + elseif exitcode == 0 then + -- Exit code 0 - a line is selected + current_micState = "unmuted" + else + -- Other exit code (2) - error occurred + current_micState = "error" + end + + -- Compare new and old state + if current_micState ~= self.state then + if current_micState == "muted" then + naughty.notify({preset=naughty.config.presets.normal, + title="mic widget info", + text='muted'}) + elseif current_micState == "unmuted" then + naughty.notify({preset=naughty.config.presets.normal, + title="mic widget info", + text='unmuted'}) + else + naughty.notify({preset=naughty.config.presets.critical, + title="mic widget error", + text='Error on "amixer get Capture | grep \'\\[on\\]\'"'}) + end + + -- Store new microphone state + self.state = current_micState + end + + -- Call user/theme defined function + self:settings() + end, + mic -- base_widget (passed in callback function as first parameter) + ) + + -- add mouse click + mic.widget:connect_signal("button::press", function(c, _, _, button) + mic:pressed(button) + end) + + return mic +end + +return factory diff --git a/.config/geany/colorschemes/bespin.conf b/.config/geany/colorschemes/bespin.conf new file mode 100755 index 0000000..bf4aaba --- /dev/null +++ b/.config/geany/colorschemes/bespin.conf @@ -0,0 +1,121 @@ +# +# This file was generated from a textmate theme named Bespin +# with tm2gtksw2 tool. (Alexandre da Silva) + +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Library General Public +# License as published by the Free Software Foundation; either +# version 2 of the License, or (at your option) any later version. + +# This library 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 +# Library General Public License for more details. + +# You should have received a copy of the GNU Library General Public +# License along with this library; if not, write to the +# Free Software Foundation, Inc., 59 Temple Place - Suite 330, +# Boston, MA 02111-1307, USA. +# +# Ported to Geany by Matthew Brush +# + +[theme_info] +name=Bespin +description=A port of the Bespin theme. +# incremented automatically, do not change manually +version=1225 +author=Alexandre da Silva (tm2gtksw2) +url=https://github.com/gmate/gmate/blob/master/styles/Bespin.xml +# list of each compatible Geany release version +compat=1.22;1.23;1.23.1;1.24 + +[named_styles] + +default=#baae9e;#28211c;false;false +error=#f8f8f8;#4a2947 + +# Editor styles +#------------------------------------------------------------------------------- + +selection=#baae9e;#4c4a49;true;true +current_line=#000;#2e2723;true +brace_good=#00f;#2e2723;true;false +brace_bad=#df4545;#2e2723;true;false +margin_line_number=#baae9e;#2e2723 +margin_folding=#baae9e;#2e2723 +fold_symbol_highlight=#2e2723 +indent_guide=#40342c +white_space=#40342c;#fff;true;false +caret=#a7a7a7;#000;false +marker_line=#000;#ff0; +marker_search=#000;#0000f0; +marker_mark=#000;#b8f4b8; +call_tips=#c0c0c0;#fff;false;false + +# Programming languages +#------------------------------------------------------------------------------- + +comment=#666;;;true +comment_doc=comment +comment_line=comment +comment_line_doc=comment_doc +comment_doc_keyword=comment_doc,bold +comment_doc_keyword_error=comment_doc,italic + +number=#cf6a4c +number_1=number +number_2=number_1 + +type=#9b859d;;true +class=type +function=#937121 +parameter=function + +keyword=#5ea6ea;;true +keyword_1=keyword +keyword_2=type +keyword_3=keyword_1 +keyword_4=keyword_1 + +identifier=default +identifier_1=identifier +identifier_2=identifier_1 +identifier_3=identifier_1 +identifier_4=identifier_1 + +string=#54be0d +string_1=string +string_2=string_1 +string_3=default +string_4=default +string_eol=string_1,italic +character=string_1 +backticks=string_2 +here_doc=string_2 + +scalar=string_2 +label=default,bold +preprocessor=#cf6a4c +regex=#e9c062 +operator=#5ea6ea +decorator=string_1,bold +other=#ddf2a4 + +# Markup-type languages +#------------------------------------------------------------------------------- + +tag=#ac885b +tag_unknown=#ac885b +tag_end=#ac885b +attribute=#937121 +attribute_unknown=#937121 +value=string_1 +entity=default + +# Diff +#------------------------------------------------------------------------------- + +line_added=#f8f8f8;#253b22 +line_removed=#f8f8f8;#420e09 +line_changed=#f8f8f8;#4a410d diff --git a/.config/geany/colorschemes/black.conf b/.config/geany/colorschemes/black.conf new file mode 100755 index 0000000..11e1762 --- /dev/null +++ b/.config/geany/colorschemes/black.conf @@ -0,0 +1,125 @@ +# +# Copyright 2013 Paul Lenton (EckoZero) +# +# 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, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, +# MA 02110-1301, USA. +# +# This is a remix of vibrant-ink, originally by Jason Wilson +# +# Thanks Jason! My remix is licensed under the exact same terms as +# Jason's original (GNU GPLv2) +# + + +[theme_info] +name=Black Scheme +description=Black background, other colours +# incremented automatically, do not change manually +version=1237 +author=Paul Lenton +# list of each compatible Geany release version +compat=1.22;1.23;1.23.1;1.24 + + +[named_styles] + +default=#fff;#000;false;false +error=#ff80c0;#000;false;false + +# Editor styles +#------------------------------------------------------------------------------- + +selection=#f00;#404040;false;true +current_line=#8dc63f;#330;true;false +brace_good=#ff0;#000;true;false +brace_bad=#c5360f;#000;true;false +margin_line_number=#b2aeab;#404040;false;false +margin_folding=#222;#111;false;false +fold_symbol_highlight=#fff +indent_guide=#066;;false;false +caret=#fff;#066;false;false +marker_line=#ff208c;#80d4b2;false;false +marker_search=#ff0;#f00;false;false +marker_mark=#810000;#000;false;false +call_tips=#ccc;#fff;false;false +white_space=#ccc;;true + +# Programming languages +#------------------------------------------------------------------------------- + + +comment=#f00 +comment_doc=#f00;#070707;false;false +comment_line=comment +comment_line_doc=comment_doc +comment_doc_keyword=comment_doc,bold +comment_doc_keyword_error=comment_doc,italic + +number=#28a8b4 +number_1=number +number_2=number_1 + +type=#fff;;true;false +class=type +function=default +parameter=function + +keyword=#f39;;true;false +keyword_1=keyword +keyword_2=#6f0;;true;false +keyword_3=keyword_1 +keyword_4=keyword_1 + +identifier=default +identifier_1=identifier +identifier_2=identifier_1 +identifier_3=identifier_1 +identifier_4=identifier_1 + +string=#8dc63f +string_1=string +string_2=string_1 +string_3=default +string_4=default +string_eol=#8dc63f;#000;false;false +character=string_1 +backticks=string_2 +here_doc=string_2 + +scalar=string_2 +label=default,bold +preprocessor=#fff +regex=number_1 +operator=#fc0 +decorator=string_1,bold +other=default + +# Markup-type languages +#------------------------------------------------------------------------------- + +tag=#6f0;#000;false;false +tag_unknown=#ccc;#000;false;false +tag_end=#fff;#000;false;false +attribute=#bd96bd;#000;false;false +attribute_unknown=#fff;#000;false;false +value=#6f0;#000;false;false +entity=#fff;#000;false;false + +# Diff +#------------------------------------------------------------------------------- + +line_added=#00f5ff;#000;false;false +line_removed=#ff0;#000;false;false +line_changed=#399;#000;false;false diff --git a/.config/geany/colorschemes/darcula.conf b/.config/geany/colorschemes/darcula.conf new file mode 100755 index 0000000..8abc90a --- /dev/null +++ b/.config/geany/colorschemes/darcula.conf @@ -0,0 +1,149 @@ +# +# Copyright 2015 Jiri Techet +# +# 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, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, +# MA 02110-1301, USA. +# +# Ported from the IntelliJ Darcula theme by Jiri Techet +# + +[theme_info] +name=Darcula +description=A soft dark theme based on the IntelliJ Darcula theme. +# incremented automatically, do not change manually +version=1 +author=Jiri Techet +url=https://github.com/codebrainz/geany-themes +# list of each compatible Geany release version +compat=1.22;1.23;1.23.1;1.24 + +[named_colors] +fg=#b6c3cf +bg=#3b3b3b + +caret_grey=#c6c6c6 +margin_fg_grey=#989898 +comment_grey=#919191 +fold_fg_grey=#888 +whitespace_grey=#505050 +calltip_fg_grey=#555 +calltip_bg_grey=#ddd +fold_bg_grey=#4c4c4c +current_line_grey=#434343 +margin_bg_grey=#424446 + +type_violet=#a88ab6 +keyword_blue=#9196bf +number_blue=#7aa6c4 +selection_blue=#2f5692 +brace_bg_green=#4d6360 +diff_added_green=#558266 +docstring_green=#73a46a +string_green=#b2ca78 +alert_yellow=#ffef4c +tag_yellow=#edc881 +keyword_orange=#d58a4a +error_red=#c85550 +diff_removed_red=#a0665b + +[named_styles] + +default=fg;bg;false;false +error=error_red;;;true + +# Editor styles +#------------------------------------------------------------------------------- + +selection=;selection_blue;;true +current_line=;current_line_grey;true +brace_good=alert_yellow;brace_bg_green;true +brace_bad=error_red;current_line_grey;true +margin_line_number=margin_fg_grey;margin_bg_grey +margin_folding=fold_fg_grey;fold_bg_grey +fold_symbol_highlight=fold_bg_grey +indent_guide=whitespace_grey +caret=caret_grey +marker_line=margin_bg_grey;alert_yellow +marker_search=;alert_yellow +marker_mark=margin_bg_grey;alert_yellow +call_tips=calltip_fg_grey;calltip_bg_grey;true;true +white_space=whitespace_grey;;true + +# Programming languages +#------------------------------------------------------------------------------- + +comment=comment_grey +comment_doc=docstring_green +comment_line=comment +comment_line_doc=comment_doc +comment_doc_keyword=comment_doc,bold +comment_doc_keyword_error=comment_doc,italic + +number=number_blue +number_1=number +number_2=number_1 + +type=type_violet +class=type +function=tag_yellow +parameter=function + +keyword=keyword_orange +keyword_1=keyword +keyword_2=keyword_blue +keyword_3=keyword_1 +keyword_4=keyword_1 + +identifier=default +identifier_1=identifier +identifier_2=identifier_1 +identifier_3=identifier_1 +identifier_4=identifier_1 + +string=string_green +string_1=string +string_2=string_1 +string_3=default +string_4=default +string_eol=string_1,italic +character=string_1 +backticks=string_2 +here_doc=string_2 + +scalar=string_2 +label=default,bold +preprocessor=tag_yellow +regex=number_1 +operator=default +decorator=tag_yellow +other=default + +# Markup-type languages +#------------------------------------------------------------------------------- + +tag=tag_yellow +tag_unknown=tag +tag_end=tag +attribute=keyword_orange +attribute_unknown=attribute +value=string_green +entity=number_blue + +# Diff +#------------------------------------------------------------------------------- + +line_added=diff_added_green +line_removed=diff_removed_red +line_changed=preprocessor diff --git a/.config/geany/colorschemes/dark-colors.conf b/.config/geany/colorschemes/dark-colors.conf new file mode 100755 index 0000000..41ed78e --- /dev/null +++ b/.config/geany/colorschemes/dark-colors.conf @@ -0,0 +1,136 @@ +# +# Copyright (C) 2016 - Yannis Kontochristopoulos +# +# Dark Colors is a theme inspired by Tinge: +# Copyright (C) 2008 - Harsh J +# See: http://www.harshj.com/2008/01/27/tinge-theme-for-gedit/ +# +# 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, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, +# MA 02110-1301, USA. +# + +[theme_info] +name=Dark Colors +description=A dark theme utilising warm colors +# incremented automatically, do not change manually +version=1225 + +[named_colors] +text=#e6e6e6 +soft_text=#a69996 +softer_text=#4c4645 +background=#0c0807 +selection_brown=#422e21 +marker_search_turquoise=#286659 +current_line_red=#281816 +black=#000 +white=#fff +light_blue=#5191cc +soft_blue=#596f80 +red=#b31111 +yellow=#b3a123 +orange=#e66917 +orange2=#ff9400 +green=#00df13 +purple=#b6f + +[named_styles] +default=text;background;false;false +error=green;background;false;false + +# Editor styles +#------------------------------------------------------------------------------- + +selection=background;selection_brown;false;true +current_line=background;current_line_red;true;false +brace_good=light_blue;background;true;false +brace_bad=white;background;true;false +margin_line_number=soft_text;#2b2826;false;false +margin_folding=#574a22;#141312;false;false +fold_symbol_highlight=soft_text +indent_guide=softer_text +caret=white;white;false +marker_line=soft_text;yellow +marker_search=marker_search_turquoise;marker_search_turquoise;false;false +marker_mark=red;background;false;false +call_tips=#c0c0c0;white;false;false +white_space=softer_text;;true + +# Programming languages +#------------------------------------------------------------------------------- + +comment=soft_blue +comment_doc=soft_blue;background;false;false +comment_line=comment +comment_line_doc=comment_doc +comment_doc_keyword=comment_doc,bold +comment_doc_keyword_error=comment_doc,italic + +number=green +number_1=number +number_2=number_1 + +type=purple;;true;false +class=type +function=type +parameter=function + +keyword=orange;;true;false +keyword_1=keyword +keyword_2=yellow;;true;false +keyword_3=keyword_1 +keyword_4=keyword_1 + +identifier=default +identifier_1=identifier +identifier_2=identifier_1 +identifier_3=identifier_1 +identifier_4=identifier_1 + +string=red +string_1=string +string_2=string_1 +string_3=string_1 +string_4=string_1 +string_eol=text;background;false;false +character=string_1 +backticks=string_2 +here_doc=string_2 + +scalar=string_2 +label=default,bold +preprocessor=text +regex=number_1 +operator=orange2 +decorator=string_1,bold +other=default + +# Markup-type languages +#------------------------------------------------------------------------------- + +tag=yellow;background;false;false +tag_unknown=green;background;false;false +tag_end=text;background;false;false +attribute=orange;background;false;false +attribute_unknown=green;background;false;false +value=text;background;false;false +entity=text;background;false;false + +# Diff +#------------------------------------------------------------------------------- + +line_added=green;background;false;false +line_removed=red;background;false;false +line_changed=light_blue;background;false;false diff --git a/.config/geany/colorschemes/dark-fruit-salad.conf b/.config/geany/colorschemes/dark-fruit-salad.conf new file mode 100755 index 0000000..01cfd24 --- /dev/null +++ b/.config/geany/colorschemes/dark-fruit-salad.conf @@ -0,0 +1,121 @@ +# +# Copyright 2011 John Gabriele +# +# 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, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, +# MA 02110-1301, USA. +# +# Ported from old theme by Matthew Brush +# Note: was part of `set_geany_colors` utility +# + +[theme_info] +name=Dark Fruit Salad +description=Low contrast theme ported from the set_geany_colors utility +# incremented automatically, do not change manually +version=1226 +author=John Gabriele +url=https://github.com/codebrainz/geany-themes +# list of each compatible Geany release version +compat=1.22;1.23;1.23.1;1.24 + +[named_styles] + +default=#f0f0f0;#5f5f5f;false;false +error=#ebbf71;#e1e17a + +# Editor styles +#------------------------------------------------------------------------------- + +selection=#000;#202020;false;true +current_line=#000;#565656;true +brace_good=#f0f0f0;#587941;false;false +brace_bad=#f00;#fff;false;false +margin_line_number=#5f5f5f;#f0f0f0 +margin_folding=#d69cd6;#202020 +fold_symbol_highlight=#202020 +indent_guide=#d69cd6 +caret=#000;#000;false +marker_line=#000;#ff0 +marker_search=#000;#0000f0 +marker_mark=#000;#b8f4b8 +call_tips=#c0c0c0;#fff;false;false +white_space=#a7a7a7;;true + +# Programming languages +#------------------------------------------------------------------------------- + +comment=#a3d97d +comment_doc=#99e4de;;true +comment_line=comment +comment_line_doc=comment_doc +comment_doc_keyword=comment_doc,bold +comment_doc_keyword_error=comment_doc,italic + +number=#ff939c +number_1=number +number_2=number_1 + +type=#e1e17a;;true +class=type +function=#92bde8;;true +parameter=function + +keyword=#92bde8;;true +keyword_1=keyword +keyword_2=#d69cd6;;true +keyword_3=keyword_1 +keyword_4=keyword_1 + +identifier=#f0f0f0 +identifier_1=identifier +identifier_2=#99e4de;;true +identifier_3=#ff939c;;true +identifier_4=identifier_1 + +string=#ebbf71 +string_1=string +string_2=#e1e17a +string_3=default +string_4=default +string_eol=string_1,italic +character=#e1e17a;;true +backticks=string_2 +here_doc=string_2 + +scalar=string_2 +label=default,bold +preprocessor=#ff939c +regex=number_1 +operator=default +decorator=string_1,bold +other=default + +# Markup-type languages +#------------------------------------------------------------------------------- + +tag=keyword +tag_unknown=tag,bold +tag_end=tag,bold +attribute=#99e4de +attribute_unknown=attribute,bold +value=string_1 +entity=default + +# Diff +#------------------------------------------------------------------------------- + +line_added=#8ae234 +line_removed=#e1e17a +line_changed=preprocessor diff --git a/.config/geany/colorschemes/dark.conf b/.config/geany/colorschemes/dark.conf new file mode 100755 index 0000000..541c535 --- /dev/null +++ b/.config/geany/colorschemes/dark.conf @@ -0,0 +1,120 @@ +# +# Copyright 2011 Duncan Lock +# +# 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, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, +# MA 02110-1301, USA. +# +# Ported from old theme by Matthew Brush +# + +[theme_info] +name=Dark +description=Dark syntax colouring theme +# incremented automatically, do not change manually +version=1225 +author=Duncan Lock +url=http://code.google.com/p/geany-dark-scheme/ +# list of each compatible Geany release version +compat=1.22;1.23;1.23.1;1.24 + +[named_styles] + +default=#fff;#1e1e1e;false;false +error=#f00;#1e1e1e;false;false + +# Editor styles +#------------------------------------------------------------------------------- + +selection=#fff;#333964;false;true +current_line=#000;#2f2f2f;true;false +brace_good=#fff;#50aa15;true;false +brace_bad=#fff;#aa1515;true;false +margin_line_number=#000;#d0d0d0;false;false +margin_folding=#000;#dfdfdf;false;false +fold_symbol_highlight=#fff +indent_guide=#393939;#1e1e1e;false;false +caret=#fff;#000;true;false +marker_line=#000;#ff0;false;false +marker_search=#000;#b8f4b8;false;false +marker_mark=#000;#b8f4b8; +call_tips=#c0c0c0;#fff;false;false +white_space=#424242;;true + +# Programming languages +#------------------------------------------------------------------------------- + +comment=#747474;#1e1e1e;false;false +comment_doc=comment +comment_line=comment +comment_line_doc=comment_doc +comment_doc_keyword=comment_doc,bold +comment_doc_keyword_error=comment_doc,italic + +number=#aaff57;#1e1e1e;false;false +number_1=number +number_2=number_1 + +type=#2e8b57;;true +class=type +function=default +parameter=function + +keyword=#ffcb4f;#1e1e1e;true;false +keyword_1=keyword +keyword_2=#aaff57;#1e1e1e;false;true +keyword_3=keyword_1 +keyword_4=keyword_1 + +identifier=#fff;#1e1e1e;false;false +identifier_1=identifier +identifier_2=identifier_1 +identifier_3=identifier_1 +identifier_4=identifier_1 + +string=#aaff57;#1e1e1e;false;false +string_1=string +string_2=#a18651;#1e1e1e;false;false +string_3=default +string_4=default +string_eol=string_1,italic +character=string_1 +backticks=string_2 +here_doc=string_2 + +scalar=string_2 +label=default,bold +preprocessor=#5abefd;#1e1e1e;false;false +regex=number_1 +operator=#98bac5;#1e1e1e;true;false +decorator=#808000;#1e1e1e;false;false +other=#fff;#1e1e1e;false;false + +# Markup-type languages +#------------------------------------------------------------------------------- + +tag=#7392cf;#1e1e1e;false;false +tag_unknown=#fff;#8c0101;true;false +tag_end=#7392cf;#1e1e1e;true;false +attribute=#cda0d5;#1e1e1e;false;false +attribute_unknown=#fff;#8c0101;false;false +value=#4575b6;#1e1e1e;false;false +entity=#ffa95c;#2c2821;false;false + +# Diff +#------------------------------------------------------------------------------- + +line_added=#008b8b +line_removed=#6a5acd +line_changed=preprocessor diff --git a/.config/geany/colorschemes/delt-dark.conf b/.config/geany/colorschemes/delt-dark.conf new file mode 100755 index 0000000..3e6bcd7 --- /dev/null +++ b/.config/geany/colorschemes/delt-dark.conf @@ -0,0 +1,106 @@ +# +# Copyright Éric "delt" Tremblay +# +# Ported from a previous theme i made for kate/kwrite. +# Licensed under GPL version 2, same as geany itself. +# + +[theme_info] +name=Delt Dark +description=A dark-blueish theme, good for many programming languages +# incremented automatically, do not change manually +version=1 +author=Éric Tremblay +url=https://github.com/geany/geany-themes/ +# list of each compatible Geany release version +compat=1.22;1.23;1.23.1;1.24 + +[named_styles] + +default=#c1c1c1;#010a15;false;false +error=#fff;#f00 + +# Editor styles +#------------------------------------------------------------------------------- + +selection=#000;#424d71;false;true +current_line=#fff;#121d30;true +brace_good=#fff;#848;true;false +brace_bad=#fff;#f00;true;false +margin_line_number=#55a;#000 +margin_folding=#338;#113 +fold_symbol_highlight=#113 +indent_guide=#121d20 +caret=#fbff00;#fbff00;false +marker_line=#000;#ff0 +marker_search=#000;#0000f0 +marker_mark=#000;#b8f4b8 +call_tips=#c0c0c0;#fff;false;false +white_space=#111a25;;true + +# Programming languages +#------------------------------------------------------------------------------- + +comment=#638aff;;false;false +comment_doc=comment +comment_line=comment +comment_line_doc=comment_doc +comment_doc_keyword=comment_doc,bold +comment_doc_keyword_error=comment_doc,italic + +number=#ff54ff;;false;false +number_1=number +number_2=number_1 + +type=#75ffd6;;true;false +class=#00ff5c;;false;false +function=default +parameter=default + +keyword=#fff;;true;false +keyword_1=#fff;;true;false; +keyword_2=#0ff;;true;false; +keyword_3=#0f0 +keyword_4=keyword_1 + +identifier=#fff +identifier_1=default +identifier_2=#f0f +identifier_3=#ff0 +identifier_4=#f00 + +string=#d04eff;;true;false +string_1=string +string_2=string_1 +string_3=default +string_4=default +string_eol=string_1,italic +character=string_1 +backticks=string_2 +here_doc=string_2 + +scalar=string_2 +label=default,bold +preprocessor=#00ff5c;;true;false +regex=number_1 +operator=#b0c1ff;;true;false +decorator=string_1,bold +other=default + +# Markup-type languages +#------------------------------------------------------------------------------- + +tag=#fff;;true;false +tag_unknown=#ff4 +tag_end=#ff0;;true;false +attribute=#0ff;;false;false +attribute_unknown=attribute +value=string_1 +entity=default + +# Diff +#------------------------------------------------------------------------------- + +line_added=#008b8b +line_removed=#6a5acd +line_changed=preprocessor diff --git a/.config/geany/colorschemes/earthsong.conf b/.config/geany/colorschemes/earthsong.conf new file mode 100755 index 0000000..bd9df24 --- /dev/null +++ b/.config/geany/colorschemes/earthsong.conf @@ -0,0 +1,120 @@ +# +# MIT License +# +# Copyright (c) 2019-2020 Daniel Plakhotich +# +# Permission is hereby granted, free of charge, to any person obtaining a copy of +# this software and associated documentation files (the "Software"), to deal in +# the Software without restriction, including without limitation the rights to +# use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +# the Software, and to permit persons to whom the Software is furnished to do so, +# subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +# +# Colour schemes by Dayle Rees: +# https://github.com/daylerees/colour-schemes + +[theme_info] +name=Earthsong +description=Warm theme based on the scheme of the same name by Dayle Rees. +version=1.1 +author=Daniel Plakhotich +url= + +[named_styles] + +default=#ccb69f;#26221f;false;false +error=#ffffff;#ff0000 + +# Editor styles +#------------------------------------------------------------------------------- + +selection=#ffffff;#c47958;true;true +current_line=#000000;#45403b;true +brace_good=#26221f;#ccb69f;false;false +brace_bad=#ff0000;#ffffff;false;false +margin_line_number=#756d63;#26221f +margin_folding=#756d63;#302828 +fold_symbol_highlight=#333333 +indent_guide=#574f45 +caret=#f8f8f0;#000000;false +marker_line=#ccb69f;#605000 +marker_search=#000000;#00ff00 +marker_mark=#ccb69f;#506000 +call_tips=#26221f;#ccb69f;true;true +white_space=#574f45;#ffffff;true;false + +# Programming languages +#------------------------------------------------------------------------------- + +comment=#756d63 +comment_doc=comment +comment_line=comment +comment_line_doc=comment_doc +comment_doc_keyword=comment_doc,bold +comment_doc_keyword_error=comment_doc + +number=#eeb437 +number_1=number +number_2=number_1 + +type=#d2734a +class=type +function=#5c9c61 +parameter=function + +keyword=type +keyword_1=keyword +keyword_2=keyword_1 +keyword_3=keyword_1 +keyword_4=keyword_1 + +identifier=default +identifier_1=identifier +identifier_2=identifier_1 +identifier_3=identifier_1 +identifier_4=identifier_1 + +string=#dbab44 +string_1=string +string_2=string_1 +string_3=default +string_4=default +string_eol=string,italic +character=string_1 +backticks=string_2 +here_doc=string_2 + +label=default,bold +preprocessor=keyword +regex=number_1 +operator=default +decorator=default +other=operator + +# Markup-type languages +#------------------------------------------------------------------------------- + +tag=#8fc45a +tag_unknown=tag,bold +tag_end=tag,bold +attribute=type +attribute_unknown=attribute +value=string_1 +entity=default + +# Diff +#------------------------------------------------------------------------------- + +line_added=#9fd92c +line_removed=#00a1be +line_changed=#ddd26f diff --git a/.config/geany/colorschemes/epsilon.conf b/.config/geany/colorschemes/epsilon.conf new file mode 100755 index 0000000..f408d44 --- /dev/null +++ b/.config/geany/colorschemes/epsilon.conf @@ -0,0 +1,117 @@ +# +# Copyright (c) 2016 Adrien Jacquet +# +# 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 3 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 . +# + +[theme_info] +name=Epsilon +description=A simple light theme for Geany. +# incremented automatically, do not change manually +version=1 +author=N3mesis98 +url=https://github.com/geany/geany-themes/pull/7 +# list of each compatible Geany release version +compat=1.32 + +[named_styles] +default=#2e3436;#fff;false;false +error=#2e3436;#ef2929 + +# Editor styles +#------------------------------------------------------------------------------- + +selection=;#add8e6;;true +brace_good=#52a800;;true +brace_bad=#f00;;true +margin_line_number=#2e3436;#e1e1e1 +margin_folding=#2e3436;#d3d7cf +fold_symbol_highlight=#d3d7cf +indent_guide=#babdb6 +caret=#000;#000;false +marker_line=;#000 +marker_search=;#000;true;true +marker_mark=;#000 +call_tips=#ededed;#fff +white_space=#babdb6;;true +current_line=; + +# Programming languages +#------------------------------------------------------------------------------- + +comment=#a52a2a +comment_doc=comment +comment_line=comment +comment_line_doc=comment_doc +comment_doc_keyword=comment_doc,bold +comment_doc_keyword_error=comment_doc_keyword,italic + +number=#52a800 +number_1=number +number_2=number_1 + +type=#399 +class=type +function=default +parameter=default + +keyword=#204a87;;true +keyword_1=keyword +keyword_2=#204a87 +keyword_3=keyword_2 +keyword_4=keyword_2 + +identifier=default +identifier_1=identifier +identifier_2=identifier_1 +identifier_3=identifier_1 +identifier_4=identifier_1 + +string=#ff7800 +string_1=string +string_2=string +string_3=string +string_4=string +string_eol=string +character=string +backticks=string +here_doc=string +verbatim=string + +scalar=string_2 +label=default,bold +preprocessor=type +regex=number_1 +operator=#a6832b +decorator=number_1,bold +other=default +extra=default + +# Markup-type languages +#------------------------------------------------------------------------------- + +tag=#204a87;;true +tag_unknown=tag +tag_end=tag +attribute=keyword +attribute_unknown=attribute,italic +value=string_1 +entity=preprocessor + +# Diff +#------------------------------------------------------------------------------- + +line_added=#4e9a06 +line_removed=#dc0000 +line_changed=#ffa700 diff --git a/.config/geany/colorschemes/fluffy.conf b/.config/geany/colorschemes/fluffy.conf new file mode 100755 index 0000000..56417c0 --- /dev/null +++ b/.config/geany/colorschemes/fluffy.conf @@ -0,0 +1,128 @@ +# +# No explicit license available but part of the `gedit-themes` +# project: +# https://github.com/mig/gedit-themes/blob/master/fluffy.xml +# +# Indicated author and assumed copyright holder is: +# Osmo Salomaa +# +# Ported to Geany by Matthew Brush +# + +[theme_info] +name=Fluffy +description=A soft and downy color scheme. +# incremented automatically, do not change manually +version=1226 +author=Osmo Salomaa +url=https://github.com/mig/gedit-themes/blob/master/fluffy.xml +# list of each compatible Geany release version +compat=1.22;1.23;1.23.1;1.24 + +[named_colors] +almost_black=#111 +blue=#06f +cyan=#02b5d1 +dark_grey=#babdb6 +green=#00bb87 +highlight_blue=#abf5ff +highlight_green=#c1ff9d +highlight_yellow=#fce94f +indigo=#b76fff +light_grey=#eeeeec +magenta=#ff6fff +medium_grey=#d3d7cf +red=#ff405a +very_dark_grey=#888a85 +very_light_grey=#fafaf8 +white=#fff + +[named_styles] + +default=almost_black;white;false;false +error=red;;true + +# Editor styles +#------------------------------------------------------------------------------- + +selection=;highlight_yellow;;true +current_line=;very_light_grey;true +brace_good=;highlight_green +brace_bad=red +margin_line_number=;dark_grey +margin_folding=;medium_grey +fold_symbol_highlight=white +indent_guide=medium_grey +caret=almost_black +marker_line=;highlight_yellow +marker_search=;blue +marker_mark=;highlight_green +call_tips=#c0c0c0 +white_space=medium_grey;;true + +# Generic programming languages +#------------------------------------------------------------------------------- + +comment=blue +comment_doc=comment +comment_line=comment +comment_line_doc=comment_doc +comment_doc_keyword=comment_doc,bold +comment_doc_keyword_error=comment_doc,italic + +number=magenta +number_1=number +number_2=number_1 + +type=green;;true +class=type +function=indigo +parameter=function + +keyword=red;;true +keyword_1=keyword +keyword_2=indigo;;true +keyword_3=keyword_1 +keyword_4=keyword_1 + +identifier=default +identifier_1=identifier +identifier_2=identifier_1 +identifier_3=identifier_1 +identifier_4=identifier_1 + +string=magenta +string_1=string +string_2=string_1 +string_3=default +string_4=default +string_eol=string_1,italic +character=string_1 +backticks=string_2 +here_doc=string_2 + +scalar=string_2 +label=default,bold +preprocessor=green +regex=number_1 +operator=default +decorator=red;;true +other=default + +# Markup-type languages +#------------------------------------------------------------------------------- + +tag=green +tag_unknown=tag +tag_end=tag +attribute=red +attribute_unknown=red +value=magenta +entity=default + +# Diff +#------------------------------------------------------------------------------- + +line_added=green +line_removed=red +line_changed=cyan diff --git a/.config/geany/colorschemes/gedit.conf b/.config/geany/colorschemes/gedit.conf new file mode 100755 index 0000000..fb0aabe --- /dev/null +++ b/.config/geany/colorschemes/gedit.conf @@ -0,0 +1,120 @@ +# +# Copyright 2006-2007 GtkSourceView team +# +# GtkSourceView is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# GtkSourceView 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 +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# +# Ported to Geany by Matthew Brush +# + +[theme_info] +name=Gedit +description=A port of Gedit's default theme. +# incremented automatically, do not change manually +version=1225 +author=Yevgen Muntyan +url=http://git.gnome.org/browse/gtksourceview/tree/data/styles/classic.xml +# list of each compatible Geany release version +compat=1.22;1.23;1.23.1;1.24 + +[named_styles] + +default=#000;#fff;false;false +error=#000;#f00;true;false + +# Editor styles +#------------------------------------------------------------------------------- + +selection=#fff;#86abd9;true;true +current_line=#000;#edeceb;true +brace_good=#fff;#bebebe;true;false +brace_bad=#fff;#f00;true;false +margin_line_number=current_line,bold +margin_folding=margin_line_number +fold_symbol_highlight=#fff +indent_guide=#bbbebb +caret=#000;#000;false +marker_line=#000;#ff0 +marker_search=marker_line +marker_mark=#000;#6c8ea2 +call_tips=#bbbebb;#fff;false;false +white_space=call_tips,bold + +# Programming languages +#------------------------------------------------------------------------------- + +comment=#00f +comment_doc=comment +comment_line=comment +comment_line_doc=comment_doc +comment_doc_keyword=comment_doc,bold +comment_doc_keyword_error=comment_doc,italic + +number=#f0f +number_1=number +number_2=#a52a2a;;true + +type=#2e8b57;;true +class=number +function=default +parameter=function + +keyword=number_2 +keyword_1=keyword +keyword_2=keyword_1 +keyword_3=keyword_1 +keyword_4=keyword_1 + +identifier=default +identifier_1=identifier +identifier_2=identifier_1 +identifier_3=identifier_1 +identifier_4=#008a8c + +string=number +string_1=string +string_2=string_1 +string_3=;;true;false +string_4=;;false;true +string_eol=string_1,italic +character=string_1 +backticks=#a020f0 +here_doc=string_2 + +scalar=identifier_4 +label=default,bold +preprocessor=backticks +regex=identifier_4 +operator=default +decorator=string_1,bold +other=default +extra=keyword + +# Markup-type languages +#------------------------------------------------------------------------------- + +tag=identifier_4 +tag_unknown=tag,bold +tag_end=tag,bold +attribute=#6a5acd +attribute_unknown=attribute,bold +value=string_1 +entity=default + +# Diff +#------------------------------------------------------------------------------- + +line_added=#008b8b +line_removed=attribute +line_changed=preprocessor diff --git a/.config/geany/colorschemes/github.conf b/.config/geany/colorschemes/github.conf new file mode 100755 index 0000000..dd792c1 --- /dev/null +++ b/.config/geany/colorschemes/github.conf @@ -0,0 +1,122 @@ +# +# Copyright 2009 Felipe Mesquita +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Library General Public +# License as published by the Free Software Foundation; either +# version 2 of the License, or (at your option) any later version. +# +# This library 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 +# Library General Public License for more details. +# +# You should have received a copy of the GNU Library General Public +# License along with this library; if not, write to the +# Free Software Foundation, Inc., 59 Temple Place - Suite 330, +# Boston, MA 02111-1307, USA. +# +# Ported to Geany by Matthew Brush +# +# Note: This one is my favourite! -Matt (geany-themes maintainer) +# + +[theme_info] +name=GitHub +description=Similar to GitHub.com's highlighting colors. +# incremented automatically, do not change manually +version=1227 +author=Felipe Mesquita +url=https://github.com/mig/gedit-themes/blob/master/github.xml +# list of each compatible Geany release version +compat=1.22;1.23;1.23.1;1.24 + +[named_styles] + +default=#000;#f8f8ff;false;false +error=#f00;#bfbfbf;false;italic + +# Editor styles +#------------------------------------------------------------------------------- + +selection=;#f0ec0f;false;true +current_line=#000;#b7deee;true +brace_good=#000;#32b953;bold +brace_bad=#000;#ee5959 +margin_line_number=#7f7f7f;#ececec +margin_folding=#7f7f7f;#d9d7d7 +fold_symbol_highlight=#ececec +indent_guide=#c0c0c0;#fff;true;false +caret=#000;#c0c0c0;false;false +marker_line=#7f7f7f;#ececec +marker_search=;#c0c0c0 +marker_mark=#7f7f7f;#ececec +call_tips=default +white_space=#c0c0c0;#fff;true;false + +# Generic programming languages +#------------------------------------------------------------------------------- + +comment=#998 +comment_doc=#998 +comment_line=comment +comment_line_doc=comment_doc +comment_doc_keyword=comment_doc,bold +comment_doc_keyword_error=comment_doc,italic + +number=#099 +number_1=number +number_2=number_1 + +type=#458;;true +class=type +function=#900 +parameter=function + +keyword=#0086b3;;true +keyword_1=keyword +keyword_2=#aa2c8c;;true +keyword_3=keyword_1 +keyword_4=keyword_1 + +identifier=default +identifier_1=identifier +identifier_2=identifier_1 +identifier_3=identifier_1 +identifier_4=identifier_1 + +string=#d14 +string_1=string +string_2=string_1 +string_3=default +string_4=default +string_eol=string_1,italic +character=string_1 +backticks=string_2 +here_doc=string_2 + +scalar=string_2 +label=default,bold +preprocessor=#0f8787 +regex=number_1 +operator=default +decorator=string_1,bold +other=default + +# Markup-type languages +#------------------------------------------------------------------------------- + +tag=type +tag_unknown=tag,bold +tag_end=tag,bold +attribute=keyword_1 +attribute_unknown=attribute,bold +value=string_1 +entity=default + +# Diff +#------------------------------------------------------------------------------- + +line_added=#000;#dfd +line_removed=#000;#fdd +line_changed=#000;#ffc diff --git a/.config/geany/colorschemes/himbeere.conf b/.config/geany/colorschemes/himbeere.conf new file mode 100755 index 0000000..f1927f5 --- /dev/null +++ b/.config/geany/colorschemes/himbeere.conf @@ -0,0 +1,135 @@ +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Library General Public +# License as published by the Free Software Foundation; either +# version 2 of the License, or (at your option) any later version. +# +# This library 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 +# Library General Public License for more details. +# +# You should have received a copy of the GNU Library General Public +# License along with this library; if not, write to the +# Free Software Foundation, Inc., 59 Temple Place - Suite 330, +# Boston, MA 02111-1307, USA. +# + +[theme_info] +name=Himbeere +description=A dark theme with raspberry colors. +# incremented automatically, do not change manually +version=1226 +author=commenthol +url=https://github.com/codebrainz/geany-themes +# list of each compatible Geany release version +compat=1.22;1.23;1.23.1;1.24 + +[named_colors] +base0=#ccc +base1=#1a1c1e +base2=#3f3f3f +base3=#808080 +base4=#303030 +berry=#e12d66 +cyan=#25d0f0 +bluegrey=#747e9e +orange=#ff8000 +lime=#65ff00 +grey=#777 +red=#f00 +redbg=#751212 +green=#859900 +blue=#268bd2 + +[named_styles] +default=base0;base1 +error=red + + +# Editor styles +#------------------------------------------------------------------------------- +selection=;#083840;;true +current_line=;#000;true +brace_good=cyan;berry;true +brace_bad=red;;true +margin_line_number=base3;base4 +margin_folding=base3;#212121 +fold_symbol_highlight=base2 +indent_guide=base2;;true +caret=cyan +marker_line=#fff;#00f; +marker_search=#fff;#d791a8; +marker_mark=; +call_tips=base0;base1 +white_space=base2;;true + + +# Programming languages +#------------------------------------------------------------------------------- + +comment=grey +comment_doc=comment +comment_line=comment +comment_line_doc=comment_doc +comment_doc_keyword=comment_doc,bold +comment_doc_keyword_error=comment_doc,italic + +number=orange +number_1=number +number_2=number_1 + +type=berry;;true +class=cyan +function=berry +parameter=function + +keyword=berry;;true +keyword_1=keyword +keyword_2=cyan;;true +keyword_3=bluegrey +keyword_4=keyword_3 + +identifier=default +identifier_1=identifier +identifier_2=identifier_1 +identifier_3=identifier_1 +identifier_4=identifier_1 + +string=lime +string_1=string +string_2=string_1 +string_3=default +string_4=default +string_eol=red +character=string_1 +backticks=string_2 +here_doc=string_2 + +scalar=string_2 +label=keyword,bold +preprocessor=cyan +regex=number_1 +operator=bluegrey +decorator=string_1,bold +other=cyan + + +# Markup-type languages +#------------------------------------------------------------------------------- + +tag=berry +tag_unknown=tag,bold +tag_end=tag,bold +attribute=cyan +attribute_unknown=attribute,bold +value=string_1 +entity=default + + +# Diff +#------------------------------------------------------------------------------- + +line_added=green +line_removed=red +line_changed=blue diff --git a/.config/geany/colorschemes/inkpot.conf b/.config/geany/colorschemes/inkpot.conf new file mode 100755 index 0000000..7cd21ee --- /dev/null +++ b/.config/geany/colorschemes/inkpot.conf @@ -0,0 +1,118 @@ +# +# Copyright 2012 Campbell Barton +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Library General Public +# License as published by the Free Software Foundation; either +# version 2 of the License, or (at your option) any later version. +# +# This library 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 +# Library General Public License for more details. +# +# You should have received a copy of the GNU Library General Public +# License along with this library; if not, write to the +# Free Software Foundation, Inc., 59 Temple Place - Suite 330, +# Boston, MA 02111-1307, USA. +# + +[theme_info] +name=InkPot +description=Based on the vim theme of the same name. +# incremented automatically, do not change manually +version=1226 +author=Campbell Barton +url=https://github.com/codebrainz/geany-themes +# list of each compatible Geany release version +compat=1.22;1.23;1.23.1;1.24 + +[named_styles] + +default=#cfbfad;#1e1e27;false;false +error=#1e1e1e;#f00;false;false + +# Editor styles +#------------------------------------------------------------------------------- + +selection=;#4e4e8f;false;true +current_line=#000;#2d2d32;true +brace_good=#cfbfad;#4e4e8f +brace_bad=#cfbfad;#f00 +margin_line_number=#8b8bcd;#2e2e2e +margin_folding=#000;#3e3e3e;false;false +fold_symbol_highlight=#6e6e6e +indent_guide=#3b3b4d;;true;false +caret=#8b8bff;#fff;false;false +marker_line=#000;#ff0;false;false +marker_search=#000;#b8f4b8;false;false +marker_mark=#000;#b8f4b8; +call_tips=default +white_space=indent_guide + +# Generic programming languages +#------------------------------------------------------------------------------- + +comment=#cd8b00 +comment_doc=#737dd5 +comment_line=comment +comment_line_doc=comment_doc +comment_doc_keyword=#4e5ab3;;true +comment_doc_keyword_error=comment_doc + +number=#f0ad6d +number_1=number +number_2=number_1 + +type=#ff8bff;;true +class=#ff8bff +function=#ff8bff +parameter=function + +keyword=#808bed +keyword_1=keyword +keyword_2=#afc2ff;;true +keyword_3=keyword_1 +keyword_4=keyword_1 + +identifier=default +identifier_1=identifier +identifier_2=identifier_1 +identifier_3=identifier_1 +identifier_4=identifier_1 + +string=#ffcd8b;#404040 +string_1=string +string_2=string_1 +string_3=default +string_4=default +string_eol=string_1 +character=string +backticks=string_2 +here_doc=string_2 + +scalar=string_2 +label=#e76000;;bold +preprocessor=#409090 +regex=number_1 +operator=#eee8d5 +decorator=#e76000;;true +other=#808bed + +# Markup-type languages +#------------------------------------------------------------------------------- + +tag=type +tag_unknown=tag,bold +tag_end=tag,bold +attribute=#ff8bff +attribute_unknown=attribute,bold +value=string_1 +entity=default + +# Diff +#------------------------------------------------------------------------------- + +line_added=#0a0 +line_removed=#f00 +line_changed=#e7b937 diff --git a/.config/geany/colorschemes/kugel.conf b/.config/geany/colorschemes/kugel.conf new file mode 100755 index 0000000..60c1191 --- /dev/null +++ b/.config/geany/colorschemes/kugel.conf @@ -0,0 +1,132 @@ +# +# Copyright 2011 Thomas Martitz +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +# COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF +# THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH +# DAMAGE. +# + +[theme_info] +name=Kugel +description=A dark, but not too dark with focus to be comfortable to the eyes. +# incremented automatically, do not change manually +version=1226 +author=Thomas Martitz +url=https://github.com/codebrainz/geany-themes +# list of each compatible Geany release version +compat=1.22;1.23;1.23.1;1.24 + +[named_styles] + +default=#ececec;#2d3335;false;false +error=#f00;;true;false + +# Editor styles +#------------------------------------------------------------------------------- + +selection=#fff;#333964;false;true +current_line=#000;#282d2e;true;false +brace_good=#fff;#50aa15;true;false +brace_bad=#fff;#aa1515;true;false +margin_line_number=#ececec +margin_folding=#888a85;#3a4145 +fold_symbol_highlight=#fff +indent_guide=#606c70 +caret=#ddd;#000;false +marker_line=#000;#ff0; +marker_search=#000;#0000f0; +marker_mark=#000;#b8f4b8; +call_tips=#555753;#eeeeec +white_space=#606c70;#fff;true;false + +# Programming languages +#------------------------------------------------------------------------------- + +comment=#888a85 +comment_doc=#3f5fbf +comment_line=comment +comment_line_doc=comment_doc +comment_doc_keyword=comment_doc,bold +comment_doc_keyword_error=comment_doc_keyword,italic + +number=#06a7a7 +number_1=number +number_2=number_1 + +type=#1e90ff +class=type +function=default +parameter=#bbf647 + +keyword=#729fcf +keyword_1=keyword +keyword_2=type +keyword_3=keyword_1 +keyword_4=keyword_1 + +identifier=default +identifier_1=identifier +identifier_2=identifier_1 +identifier_3=identifier_1 +identifier_4=identifier_1 + +string=#dd4040 +string_1=string +string_2=string_1 +string_3=default +string_4=default +string_eol=#000;#e0c0e0 +character=#8ae234 +backticks=#30ff00 +# here_doc ??? +here_doc=#ff84cd + +scalar=#bcf360 +# label ??? +label=default,bold +preprocessor=#acac00 +regex=#aaff57 +operator=#fcaf3e +decorator=preprocessor +other=default +extra=#404080 + +# Markup-type languages +#------------------------------------------------------------------------------- + +tag=type +tag_unknown=tag,italic +tag_end=tag +attribute=keyword +attribute_unknown=attribute,italic +value=string_1 +entity=preprocessor + +# Diff +#------------------------------------------------------------------------------- + +line_added=#34b034 +line_removed=#ff2727 +line_changed=#7f007f diff --git a/.config/geany/colorschemes/mc.conf b/.config/geany/colorschemes/mc.conf new file mode 100755 index 0000000..aee0ab3 --- /dev/null +++ b/.config/geany/colorschemes/mc.conf @@ -0,0 +1,117 @@ +# +# Copyright 2012 Henrik Pauli +# +# 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, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, +# MA 02110-1301, USA. +# + +[theme_info] +name=Ralesk's MC +description=Midnight Commander-like scheme +# incremented automatically, do not change manually +version=1225 +author=Henrik Pauli +url=http://share.drangolin.net/mc.conf +# list of each compatible Geany release version +compat=1.22;1.23;1.23.1;1.24 + +[named_styles] + +default=#c0c0c0;#114;false;false +error=#fff;#f00 + +# Editor styles +#------------------------------------------------------------------------------- + +selection=#000;#369;true;true +current_line=#000;#12126d;false +brace_good=#c0c0c0;#369;true;false +brace_bad=#fff;#f00;true;false +margin_line_number=#114;#393 +margin_folding=#f4d432;#7f3f00 +fold_symbol_highlight=#7f3f00 +indent_guide=#242490 +caret=#c3f;#000;true +marker_line=#000;#ff0 +marker_search=#000;#0000f0 +marker_mark=#000;#b8f4b8 +call_tips=#c0c0c0;#fff;false;false +white_space=#3636a3;#fff;true;false + +# Programming languages +#------------------------------------------------------------------------------- + +comment=#960;;;true +comment_doc=#c60;;;true +comment_line=comment +comment_line_doc=comment_doc +comment_doc_keyword=comment_doc,bold +comment_doc_keyword_error=comment_doc,italic + +number=#3fcfcf +number_1=number +number_2=number_1 + +type=#fff;;true +class=type +function=#d3d7cf +parameter=#f99 + +keyword=#f4d432;;true +keyword_1=keyword +keyword_2=#9f0200;;true +keyword_3=keyword_1 +keyword_4=keyword_1 + +identifier=default +identifier_1=#0f0 +identifier_2=#fff +identifier_3=#0ff +identifier_4=#7f0000 + +string=#3a3 +string_1=string +string_2=string_1 +string_3=default +string_4=default +string_eol=#000;#e0c0e0 +character=#5c5 +backticks=#fff;#000 +here_doc=string_2 + +label=default,bold +preprocessor=#808000 +regex=#2f7f7f +operator=#ff0 +decorator=string_1,bold +other=#404080 + +# Markup-type languages +#------------------------------------------------------------------------------- + +tag=type +tag_unknown=tag,bold +tag_end=tag,bold +attribute=keyword_1 +attribute_unknown=attribute,bold +value=string_1 +entity=default + +# Diff +#------------------------------------------------------------------------------- + +line_added=#008b8b +line_removed=#6a5acd +line_changed=preprocessor diff --git a/.config/geany/colorschemes/metallic-bottle.conf b/.config/geany/colorschemes/metallic-bottle.conf new file mode 100755 index 0000000..f77a735 --- /dev/null +++ b/.config/geany/colorschemes/metallic-bottle.conf @@ -0,0 +1,115 @@ +### +# Copyright 2013 Tomasz Wyderka +## +# 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, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, +# MA 02110-1301, USA. +# + +[theme_info] +name=Metallic Bottle +description=Bright color scheme matching GTK "Radiance" theme. +version=1.22.0 +author=Tomasz Wyderka +url=http://www.cofoh.com/mettalic_bottle + +[named_styles] + +default=#000;#fbfaf9;false;false +error=#fff;#843121;false;true + +# Editor styles +#------------------------------------------------------------------------------- + +selection=#000;#c48c65;false;true +current_line=#000;#fff;true +brace_good=#757c75;;true;false +brace_bad=#843121;;true;false +margin_line_number=#000;#dfd7cf +margin_folding=#000;#f6f4f2 +fold_symbol_highlight=#fff +indent_guide=#3d291c +caret=#843121 +marker_line=#000;#1d1613 +marker_search=#000;#843121 +marker_mark=#000;#757c75 +call_tips=#a1654b;#fff;false;false +white_space=#a1654b;#fff;true;false + +# Programming languages +#------------------------------------------------------------------------------- + +comment=#757c75;;false;true +comment_doc=#4b4a3a;;false;true +comment_line=comment +comment_line_doc=comment_doc +comment_doc_keyword=comment_doc,bold +comment_doc_keyword_error=comment_doc,italic + +number=#644129 +number_1=number +number_2=number_1 + +type=#843121;;true +class=type +function=#843121 +parameter=function + +keyword=#1d1613;;true +keyword_1=keyword +keyword_2=#3d291c;;true;true +keyword_3=keyword_1 +keyword_4=keyword_1 + +identifier=default +identifier_1=identifier +identifier_2=identifier_1 +identifier_3=identifier_1 +identifier_4=identifier_1 + +string=#4b4a3a +string_1=string +string_2=string_1 +string_3=default +string_4=default +string_eol=#000;#e0c0e0 +character=string_1 +backticks=string_2 +here_doc=string_2 + +scalar=string_2 +label=default,bold +preprocessor=#c48c65 +regex=number_1 +operator=#d0c096 +decorator=string_1,bold +other=#c48c65 + +# Markup-type languages +#------------------------------------------------------------------------------- + +tag=type +tag_unknown=tag,bold +tag_end=tag,bold +attribute=keyword_1 +attribute_unknown=attribute,bold +value=string_1 +entity=default + +# Diff +#------------------------------------------------------------------------------- + +line_added=#c48c65 +line_removed=#843121 +line_changed=#fbfaf9 diff --git a/.config/geany/colorschemes/monokai.conf b/.config/geany/colorschemes/monokai.conf new file mode 100755 index 0000000..4e07208 --- /dev/null +++ b/.config/geany/colorschemes/monokai.conf @@ -0,0 +1,131 @@ +# No explicit license available +# +# Indicated author and assumed copyright holder is: +# Wimer Hazenberg +# +# Ported to Geany and tweaked by Thanh Tran +# + +[theme_info] +name=Monokai +description=It's warm, colorful and pleasing to the eyes +# incremented automatically, do not change manually +version=16 +author=Wimer Hazenberg +url=http://www.monokai.nl/blog/2006/07/15/textmate-color-theme/ +# list of each compatible Geany release version +compat=1.22;1.23;1.23.1;1.24 + +[named_colors] +black=#000 +almost_black=#272822 +lighter_black=#2d2e2b +yellow=#ff0 +light_yellow=#e6db74 +very_dark_yellow=#49483e +bright_orange=#fd971f +dark_orange=#75715e +bright_green=#a6e22e +light_green=#b8f4b8 +dark_blue=#086aa7 +light_purple=#ae81ff +hot_pink=#f92672 +light_cyan=#66d9ef +red=#f00 +green=#0f0 +white=#fff +almost_white=#f8f8f2 +grey=#d0d0d0 +mid_grey=#888 +lighter_grey=#dfdfdf +dark_grey=#3b3a32 + +[named_styles] +default=almost_white;almost_black;false;false +error=red;very_dark_yellow;false;true + +# Editor styles +#------------------------------------------------------------------------------- + +selection=;very_dark_yellow;false;true +current_line=;lighter_black;true +brace_good=bright_orange;very_dark_yellow;true +brace_bad=error +margin_line_number=mid_grey;almost_black +margin_folding=mid_grey;dark_grey +fold_symbol_highlight=white +indent_guide=dark_grey +caret=white;;false +marker_line=yellow;very_dark_yellow +marker_search=black;dark_blue +marker_mark=light_green;lighter_black +call_tips=dark_grey;white;false;false +white_space=dark_grey;;true + +# Generic programming languages +#------------------------------------------------------------------------------- + +comment=dark_orange +comment_doc=comment +comment_line=comment +comment_line_doc=comment_doc +comment_doc_keyword=comment,bold +comment_doc_keyword_error=comment,italic + +number=light_purple +number_1=number +number_2=number_1 + +type=bright_green +class=type +function=type +parameter=bright_orange; + +keyword=hot_pink +keyword_1=keyword +keyword_2=light_cyan +keyword_3=keyword_1 +keyword_4=keyword_2 + +identifier=default +identifier_1=identifier +identifier_2=identifier_1 +identifier_3=identifier_1 +identifier_4=identifier_1 + +string=light_yellow +string_1=string +string_2=string_1 +string_3=default +string_4=default +string_eol=string_1,italic +character=string_1 +backticks=string_2 +here_doc=string_2 + +scalar=string_2 +label=default,bold +preprocessor=light_green +regex=number_1 +operator=default +decorator=string_1,bold +other=default +extra=keyword; + +# Markup-type languages +#------------------------------------------------------------------------------- + +tag=keyword +tag_unknown=tag,bold +tag_end=tag,bold +attribute=type +attribute_unknown=attribute,bold +value=number +entity=number + +# Diff +#------------------------------------------------------------------------------- + +line_added=green +line_removed=red +line_changed=preprocessor diff --git a/.config/geany/colorschemes/notepad-plus-plus.conf b/.config/geany/colorschemes/notepad-plus-plus.conf new file mode 100755 index 0000000..9e9fcc1 --- /dev/null +++ b/.config/geany/colorschemes/notepad-plus-plus.conf @@ -0,0 +1,122 @@ +# +# Copyright 2013 Paul +# +# 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, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, +# MA 02110-1301, USA. +# +# Note: Notepad++ port + +[theme_info] +name=Notepad-plus-plus +description=Default theme port from Notepad++ +version=122 +author=Paul +url= +# list of each compatible Geany release version +compat=1.22;1.23;1.23.1;1.24 + + +[named_styles] + +default=#000080;#fefcf5 +error=#f00;#bfbfbf + +# Editor styles +#------------------------------------------------------------------------------- + +selection=;#c0c0c0;false;true +current_line=#e8e8ff;#e8e8ff;true;true +brace_good=#f00;;true +brace_bad=#f00 +margin_line_number=#808080;#e4e4e4 +margin_folding=#808080;#f3f3f3 +fold_symbol_highlight=#fff +indent_guide=#c0c0c0;#fff;true;true +caret=#8000ff;#fefcf5 + +marker_line=#7f7f7f;#ececec +marker_search=;#0f0 +marker_mark=#7f7f7f;#ececec + +call_tips=default +white_space=#c0c0c0;#fff;true;false + +# Generic programming languages +#------------------------------------------------------------------------------- + +comment=#008000 +comment_doc=comment +comment_line=comment +comment_line_doc=comment_doc +comment_doc_keyword=comment_doc,bold +comment_doc_keyword_error=comment_doc,italic + +number=#ff8000 +number_1=number +number_2=#f00 + +type=#00f;#fff +class=type +function=#900 +parameter=function + +keyword=#00f;#fefcf5;true +keyword_1=keyword +keyword_2=#aa2c8c;;true +keyword_3=keyword_1 +keyword_4=keyword_1 + +identifier=default +identifier_1=identifier +identifier_2=identifier_1 +identifier_3=identifier_1 +identifier_4=identifier_1 + +string=#808080;#fefcf5 +string_1=string +string_2=string_1 +string_3=default +string_4=default +string_eol=string_1,italic +character=string_1 +backticks=string_2 +here_doc=string_2 + +scalar=string_2 +label=default,bold +preprocessor=#000080;#fefcf5 +regex=number_1 +operator=#8000ff;#fefcf5 +decorator=string_1,bold +other=default + + +# Markup-type languages +#------------------------------------------------------------------------------- + +tag=type +tag_unknown=tag,bold +tag_end=tag,bold +attribute=#f00 +attribute_unknown=attribute,bold +value=#8000ff;#fff +entity=default + +# Diff +#------------------------------------------------------------------------------- + +line_added=#3de737 +line_removed=#e74837 +line_changed=#e7b937 diff --git a/.config/geany/colorschemes/oblivion2.conf b/.config/geany/colorschemes/oblivion2.conf new file mode 100755 index 0000000..4fa4f9c --- /dev/null +++ b/.config/geany/colorschemes/oblivion2.conf @@ -0,0 +1,120 @@ +# +# Copyright Bernhard Posselt +# +# 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, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, +# MA 02110-1301, USA. +# +# Ported from old theme by Matthew Brush +# + +[theme_info] +name=Oblivion 2 +description=Based on the Gedit color scheme Oblivion and the Dark Color Scheme with rearranged colors. +# incremented automatically, do not change manually +version=1225 +author=Bernhard Posselt +url=http://download.geany.org/contrib/oblivion2.tar.gz +# list of each compatible Geany release version +compat=1.22;1.23;1.23.1;1.24 + +[named_styles] + +default=#fff;#2e3436;false;false +error=#fff;#f00 + +# Editor styles +#------------------------------------------------------------------------------- + +selection=#000;#a52a2a;false;true +current_line=#000;#292929;true;false +brace_good=#fff;#4e9a06;true;false +brace_bad=#fff;#a52a2a;true;false +margin_line_number=#eee;#000;false;false +margin_folding=#888a85;#000;false;false +fold_symbol_highlight=#000 +indent_guide=#474545;#2e3436;false;false +caret=#fff;#000;false;false +marker_line=#000;#ff0;false;false +marker_search=#000;#b8f4b8;false;false +marker_mark=#000;#b8f4b8; +call_tips=#c0c0c0;#fff;false;false +white_space=#506369;;true + +# Programming languages +#------------------------------------------------------------------------------- + +comment=#888a85;#2e3436;false;false +comment_doc=comment +comment_line=comment +comment_line_doc=comment_doc +comment_doc_keyword=comment_doc,bold +comment_doc_keyword_error=comment_doc,italic + +number=#ef2929;#2e3436;false;false +number_1=number +number_2=number_1 + +type=#729fcf;#2e3436;true;false +class=type +function=default +parameter=function + +keyword=#8ae234;#2e3436;true;false +keyword_1=keyword +keyword_2=#729fcf;#2e3436;true;false +keyword_3=keyword_1 +keyword_4=keyword_1 + +identifier=default +identifier_1=identifier +identifier_2=identifier_1 +identifier_3=identifier_1 +identifier_4=identifier_1 + +string=#edd400;#2e3436;false;false +string_1=string +string_2=string_1 +string_3=default +string_4=default +string_eol=#fff;#ad7fa8;false;false +character=#a18651;#2e3436;false;false +backticks=string_2 +here_doc=string_2 + +scalar=string_2 +label=default,bold +preprocessor=#ad7fa8;#2e3436;true;false +regex=#4e9a06;#2e3436;false;false +operator=#ad7fa8;#2e3436;true;false +decorator=#729fcf;#2e3436;false;false +other=default + +# Markup-type languages +#------------------------------------------------------------------------------- + +tag=#729fcf;#2e3436;true;false +tag_unknown=#fff;#8c0101;true;false +tag_end=#7392cf;#2e3436;true;false +attribute=#fff;#2e3436;true;false +attribute_unknown=#fff;#8c0101;false;false +value=#4575b6;#2e3436;false;false +entity=#ad7fa8;#2e3436;false;false + +# Diff +#------------------------------------------------------------------------------- + +line_added=#729fcf;#2e3436;true;false +line_removed=#8ae234;#2e3436;true;false +line_changed=#fff;#fff;true;false diff --git a/.config/geany/colorschemes/pygments.conf b/.config/geany/colorschemes/pygments.conf new file mode 100755 index 0000000..225e5f3 --- /dev/null +++ b/.config/geany/colorschemes/pygments.conf @@ -0,0 +1,131 @@ +# +# Copyright (c) 2006-2012 by the respective authors. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# +# Ported to Geany by Nicolas Holvoët +# + +[theme_info] +name=Pygments +description=Default Pygments theme for Geany +# incremented automatically, do not change manually +version=1226 +author=Pocoo +url=http://pygments.org +# list of each compatible Geany release version +compat=1.22;1.23;1.23.1;1.24 + +[named_styles] + +default=#161616;#f8f8f8;false;false +error=#f00;#bfbfbf + +# Editor styles +#------------------------------------------------------------------------------- + +selection=#2e3436;#cacaca;false;true +current_line=#2e3436;#e7e7e7;true +brace_good=#9433ad;#dcd4e0;true +brace_bad=#ddd;#e0754a;true +margin_line_number=#3a4346;#d6d6d6 +margin_folding=#747474;#e1e1e1 +fold_symbol_highlight=#d6d6d6 +indent_guide=#b5b5b5 +caret=#000;#000;false +marker_line=#2e3436;#729fcf +marker_search=#2e3436;#fcaf3e +marker_mark=#565656;#d4d4d4 +call_tips=default +white_space=#b5b5b5;;true + +# Programming languages +#------------------------------------------------------------------------------- + +comment=#408080;;;true +comment_doc=#3465a4;;;true +comment_line=comment +comment_line_doc=comment_doc +comment_doc_keyword=comment_doc,bold +comment_doc_keyword_error=comment_doc_keyword,italic + +number=#666 +number_1=number +number_2=number_1 + +type=#0032ff;;true +class=type +function=#0026bc +parameter=function + +keyword=#008000;;true +keyword_1=keyword +keyword_2=#008000 +keyword_3=keyword_1 +keyword_4=keyword_1 + +identifier=default +identifier_1=identifier +identifier_2=identifier_1 +identifier_3=identifier_1 +identifier_4=identifier_1 + +string=#ba2121;;false;false +string_1=string +string_2=string_1 +string_3=default +string_4=default +string_eol=string_1,italic +character=string_1 +backticks=string_2 +here_doc=string_2 +verbatim=string + +scalar=string_2 +label=default,bold +preprocessor=#af7100 +regex=number_1 +operator=default +decorator=#a2f +other=default +extra=#204a87 + +# Markup-type languages +#------------------------------------------------------------------------------- + +tag=#008000;;true +tag_unknown=tag +tag_end=tag +attribute=#0032ff;;true +attribute_unknown=attribute,italic +value=string_1 +entity=preprocessor + +# Diff +#------------------------------------------------------------------------------- + +line_added=#256a1b +line_removed=#a40000 +line_changed=#ce5c00 diff --git a/.config/geany/colorschemes/railcasts2.conf b/.config/geany/colorschemes/railcasts2.conf new file mode 100755 index 0000000..b17cbb2 --- /dev/null +++ b/.config/geany/colorschemes/railcasts2.conf @@ -0,0 +1,110 @@ +# +# No explicit license or copyright info available but part of the +# `gedit-themes` project: +# https://github.com/mig/gedit-themes/blob/master/railscasts2.xml +# +# Ported to Geany by Matthew Brush +# + +[theme_info] +name=Railcasts 2 +description=A port of railscasts2 from gedit-themes. +# incremented automatically, do not change manually +version=1225 +author=Unknown Author +url=https://github.com/mig/gedit-themes/blob/master/railscasts2.xml +# list of each compatible Geany release version +compat=1.22;1.23;1.23.1;1.24 + +[named_styles] + +default=#e6e1dc;#2b2b2b;false;false +error=#fff;#900 + +# Editor styles +#------------------------------------------------------------------------------- + +selection=#000;#676b65;false;true +current_line=#000;#545752;true +brace_good=#966dbe;;true +brace_bad=#2b2b2b;#da4939;true +margin_line_number=#2b2b2b;#c0c0ff +margin_folding=#000;#dfdfdf +fold_symbol_highlight=#fff +indent_guide=#c0c0c0 +caret=#000;#000;false +marker_line=#000;#ff0; +marker_search=#000;#0000f0; +marker_mark=#000;#b8f4b8; +call_tips=#c0c0c0;#fff;false;false +white_space=#565656;;true + +# Generic programming languages +#------------------------------------------------------------------------------- + +comment=#bc9458;;;true +comment_doc=comment +comment_line=comment +comment_line_doc=comment_doc +comment_doc_keyword=comment_doc,bold +comment_doc_keyword_error=comment_doc,italic + +number=#a5c261 +number_1=number +number_2=number_1 + +type=#da4939;;true +class=type +function=#ffc66d +parameter=function + +keyword=#cc7833;;true +keyword_1=keyword +keyword_2=#6d9cbe;;true +keyword_3=keyword_1 +keyword_4=keyword_1 + +identifier=default +identifier_1=identifier +identifier_2=identifier_1 +identifier_3=identifier_1 +identifier_4=identifier_1 + +string=#a5c261 +string_1=string +string_2=string_1 +string_3=default +string_4=default +string_eol=string_1,italic +character=string_1 +backticks=string_2 +here_doc=string_2 + +scalar=string_2 +label=default,bold +preprocessor=#e6e1dc +regex=number_1 +operator=default +decorator=string_1,bold +other=default + +# Markup-type languages +#------------------------------------------------------------------------------- + +tag=type +tag_unknown=tag,bold +tag_end=tag,bold +attribute=keyword_1 +attribute_unknown=attribute,bold +value=string_1 +entity=default + +# Diff +#------------------------------------------------------------------------------- + +line_added=#e6e1dc;#144212 +line_removed=#e6e1dc;#600 +line_changed=default + +# Make style changes in colorscheme .conf file, make style mapping +# changes below. diff --git a/.config/geany/colorschemes/retro.conf b/.config/geany/colorschemes/retro.conf new file mode 100755 index 0000000..75a1628 --- /dev/null +++ b/.config/geany/colorschemes/retro.conf @@ -0,0 +1,116 @@ +# +# Copyright 2011 Matthew Brush +# +# 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, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, +# MA 02110-1301, USA. +# + +[theme_info] +name=Retro +description=Inspired by old green screen terminals. +# incremented automatically, do not change manually +version=6 +author=Matthew Brush +url= +# list of each compatible Geany release version +compat=1.22;1.23;1.23.1;1.24 + +[named_styles] + +default=#008500;#000;false;false +error=#c00 + +selection=#000;#0c0;true;true +current_line=;;false +brace_good=default +brace_bad=default,bold +margin_line_number=default +margin_folding=default +fold_symbol_highlight=#000 +indent_guide=default +caret=#0c0;#000;true;true +marker_line=default,italic +marker_search=;#000 +marker_mark=#0c0;#000 +fold_symbol_highlight=#000 +call_tips=#000;#0c0;true;true +white_space=#104e10;;true + +# Programming languages +#------------------------------------------------------------------------------- + +comment=#67e667 +comment_doc=comment +comment_line=comment +comment_line_doc=comment_doc +comment_doc_keyword=comment_doc,bold +comment_doc_keyword_error=comment_doc,italic + +number=#39e639 +number_1=number +number_2=number_1 + +type=#0c0;;true +class=type +function=default +parameter=function + +keyword=#008500;;true +keyword_1=keyword +keyword_2=keyword_1 +keyword_3=keyword_1 +keyword_4=keyword_1 + +identifier=default +identifier_1=identifier +identifier_2=identifier_1 +identifier_3=identifier_1 +identifier_4=identifier_1 + +string=#269926;;true +string_1=string +string_2=string_1 +string_3=default +string_4=default +string_eol=string_1,italic +character=string_1 +backticks=string_2 +here_doc=string_2 + +scalar=string_2 +label=default,bold +preprocessor=default +regex=number_1 +operator=default +decorator=string_1,bold +other=default + +# Markup-type languages +#------------------------------------------------------------------------------- + +tag=#0c0 +tag_unknown=tag,bold +tag_end=tag,bold +attribute=#0c0;;true +attribute_unknown=attribute,bold +value=string_1 +entity=default + +# Diff +#------------------------------------------------------------------------------- + +line_added=#0c0 +line_removed=#c00 +line_changed=#00c diff --git a/.config/geany/colorschemes/sleepy-pastel.conf b/.config/geany/colorschemes/sleepy-pastel.conf new file mode 100755 index 0000000..1d2b85a --- /dev/null +++ b/.config/geany/colorschemes/sleepy-pastel.conf @@ -0,0 +1,102 @@ +# +# Public Domain +# +# Inspired by the tango theme: https://github.com/codebrainz/geany-themes/blob/master/colorschemes/tango-dark.conf +# + +[theme_info] +name=Sleepy Pastel +description=Dark theme inspired by Tango +version=1.0.0 +author=randomekek on github +url=https://github.com/codebrainz/geany-themes/blob/master/sleepy-pastel.conf + +[named_styles] + +default=#dfdee0;#2e3436;false;false +error=#fff;#f00 + +# Editor styles +#------------------------------------------------------------------------------- + +selection=#000;#626d71;false;true +current_line=#000;#363f41;true +brace_good=#cb956d;#4c5153;false;false +brace_bad=#d7616d;#4c5153;true;false +margin_line_number=#b2cba3;#4c5153 +margin_folding=#b2cba3;#4c5153 +fold_symbol_highlight=#4c5153 +indent_guide=#666 +caret=#ddd;#000;false +marker_line=#000;#49473f +marker_search=#000;#f0f0f0 +marker_mark=#000;#49473f +call_tips=#b2cba3;#4c5153;true;true +white_space=#666;;true + +# Programming languages +#------------------------------------------------------------------------------- + +comment=#888a85;#2e3436;false;false +comment_doc=comment +comment_line=comment +comment_line_doc=comment_doc +comment_doc_keyword=comment_doc,bold +comment_doc_keyword_error=comment_doc,italic + +number=#8ae234;#2e3436;false;false +number_1=number +number_2=number_1 + +type=#eeeeec;#2e3436;false;false +class=type +function=default +parameter=function + +keyword=#729fcf;#2e3436;false;false +keyword_1=keyword +keyword_2=keyword_1 +keyword_3=keyword_1 +keyword_4=keyword_1 + +identifier=default +identifier_1=identifier +identifier_2=identifier_1 +identifier_3=identifier_1 +identifier_4=identifier_1 + +string=#93cf55;#2e3436;false;false +string_1=string +string_2=string_1 +string_3=default +string_4=default +string_eol=string_1,italic +character=string_1 +backtick=string_2 +here_doc=string_2 + +scalar=string_2 +label=default,bold +preprocessor=#5db895;#2e3436;false;false +regex=number_1 +operator=#cb956d;#2e3436;false;false +decorator=string_1,bold +other=default + +# Markup-type languages +#------------------------------------------------------------------------------- + +tag=#729fcf;#2e3436;false;false +tag_unknown=tag +tag_end=tag,bold +attribute=#729fcf;#2e3436;false;false +attribute_unknown=attribute +value=string_1 +entity=default + +# Diff +#------------------------------------------------------------------------------- + +line_added=#79c580 +line_removed=#dc8383 +line_changed=#c0afd3 diff --git a/.config/geany/colorschemes/slushpoppies.conf b/.config/geany/colorschemes/slushpoppies.conf new file mode 100755 index 0000000..fd73a32 --- /dev/null +++ b/.config/geany/colorschemes/slushpoppies.conf @@ -0,0 +1,120 @@ +# +# Copyright 2006-2007 Will Farrington +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Library General Public +# License as published by the Free Software Foundation; either +# version 2 of the License, or (at your option) any later version. +# +# This library 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 +# Library General Public License for more details. +# +# You should have received a copy of the GNU Library General Public +# License along with this library; if not, write to the +# Free Software Foundation, Inc., 59 Temple Place - Suite 330, +# Boston, MA 02111-1307, USA. +# +# Ported to Geany by Matthew Brush +# + +[theme_info] +name=Slush and Poppies +description=A port of Slush and Poppies from gedit-themes. +# incremented automatically, do not change manually +version=1225 +author=Will Farrington +url=https://github.com/mig/gedit-themes/blob/master/slush_and_poppies.xml +# list of each compatible Geany release version +compat=1.22;1.23;1.23.1;1.24 + +[named_styles] + +default=#000;#f8f8ff;false;false +error=#f8f8ff;#800000 + +# Editor styles +#------------------------------------------------------------------------------- + +selection=#000;#c0c0c0;false;true +current_line=#000;#d9d9d9;true +brace_good=;#4f94cd +brace_bad=;#002f29;true +margin_line_number=#000;#d0d0d0 +margin_folding=#000;#dfdfdf +fold_symbol_highlight=#fff +indent_guide=#c0c0c0 +caret=#000;#000;false +marker_line=#000;#ff0 +marker_search=#000;#0000f0 +marker_mark=#000;#b8f4b8 +call_tips=#c0c0c0;#fff;false;false +white_space=#c0c0c0;#fff;true;false + +# Programming languages +#------------------------------------------------------------------------------- + +comment=#406040 +comment_doc=comment +comment_line=comment +comment_line_doc=comment_doc +comment_doc_keyword=comment_doc,bold +comment_doc_keyword_error=comment_doc,italic + +number=#2060a0 +number_1=number +number_2=number_1 + +type=#800000;;true +class=type +function=default +parameter=function + +keyword=#0080a0;;true +keyword_1=keyword +keyword_2=keyword_1 +keyword_3=keyword_1 +keyword_4=keyword_1 + +identifier=default +identifier_1=identifier +identifier_2=identifier_1 +identifier_3=identifier_1 +identifier_4=identifier_1 + +string=#c03030 +string_1=string +string_2=string_1 +string_3=default +string_4=default +string_eol=string_1,italic +character=string_1 +backticks=string_2 +here_doc=string_2 + +scalar=string_2 +label=default,bold +preprocessor=#800000 +regex=number_1 +operator=default +decorator=string_1,bold +other=default + +# Markup-type languages +#------------------------------------------------------------------------------- + +tag=#0080a0 +tag_unknown=tag +tag_end=tag +attribute=#8000c0 +attribute_unknown=attribute +value=string_1 +entity=default + +# Diff +#------------------------------------------------------------------------------- + +line_added=#008b8b +line_removed=#6a5acd +line_changed=preprocessor diff --git a/.config/geany/colorschemes/solarized-dark.conf b/.config/geany/colorschemes/solarized-dark.conf new file mode 100755 index 0000000..27e21ee --- /dev/null +++ b/.config/geany/colorschemes/solarized-dark.conf @@ -0,0 +1,147 @@ +# +# Copyright 2011 Ethan Schoonover +# +# Permission is hereby granted, free of charge, to any person obtaining +# a copy of this software and associated documentation files (the +# "Software"), to deal in the Software without restriction, including +# without limitation the rights to use, copy, modify, merge, publish, +# distribute, sublicense, and/or sell copies of the Software, and to +# permit persons to whom the Software is furnished to do so, subject to +# the following conditions: +# +# The above copyright notice and this permission notice shall be +# included in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +# +# Ported to Geany by Joshua Hoff and +# Matthew Brush +# + +[theme_info] +name=Solarized (dark) +description=Dark Solarized theme for Geany +# incremented automatically, do not change manually +version=1225 +author=Ethan Schoonover +url=http://ethanschoonover.com/solarized +# list of each compatible Geany release version +compat=1.22;1.23;1.23.1;1.24 + +[named_colors] +# See: http://ethanschoonover.com/solarized#the-values +base03=#002b36 +base02=#073642 +base01=#586e75 +base00=#657b83 +base0=#839496 +base1=#93a1a1 +base2=#eee8d5 +base3=#fdf6e3 +yellow=#b58900 +orange=#cb4b16 +red=#dc322f +magenta=#d33682 +violet=#6c71c4 +blue=#268bd2 +cyan=#2aa198 +green=#859900 + +[named_styles] + +default=base0;base03 +error=red + + +# Editor styles +#------------------------------------------------------------------------------- +selection=;#0f4d5c;;true +current_line=;base02;true +brace_good=base1;;true +brace_bad=red;;true +margin_line_number=base00;base03 +margin_folding=base00;base02 +fold_symbol_highlight=base02 +indent_guide=base01 +caret=base3 +marker_line=; +marker_search=;base2 +marker_mark=; +call_tips=base0;base03 +white_space=indent_guide + + +# Programming languages +#------------------------------------------------------------------------------- + +comment=base01 +comment_doc=comment +comment_line=comment +comment_line_doc=comment_doc +comment_doc_keyword=comment_doc,bold +comment_doc_keyword_error=comment_doc,italic + +number=cyan +number_1=number +number_2=number_1 + +type=yellow;;true +class=type +function=blue +parameter=function + +keyword=green;;true +keyword_1=keyword +keyword_2=blue;;true +keyword_3=keyword_1 +keyword_4=keyword_1 + +identifier=default +identifier_1=identifier +identifier_2=identifier_1 +identifier_3=identifier_1 +identifier_4=identifier_1 + +string=magenta +string_1=string +string_2=string_1 +string_3=default +string_4=default +string_eol=red +character=string_1 +backticks=string_2 +here_doc=string_2 + +scalar=string_2 +label=default,bold +preprocessor=orange +regex=violet +operator=default +decorator=string_1,bold +other=default + + +# Markup-type languages +#------------------------------------------------------------------------------- + +tag=type +tag_unknown=tag,bold +tag_end=tag,bold +attribute=keyword_1 +attribute_unknown=attribute,bold +value=string_1 +entity=default + + +# Diff +#------------------------------------------------------------------------------- + +line_added=green +line_removed=red +line_changed=blue diff --git a/.config/geany/colorschemes/solarized-light.conf b/.config/geany/colorschemes/solarized-light.conf new file mode 100755 index 0000000..c3b2123 --- /dev/null +++ b/.config/geany/colorschemes/solarized-light.conf @@ -0,0 +1,147 @@ +# +# Copyright 2011 Ethan Schoonover +# +# Permission is hereby granted, free of charge, to any person obtaining +# a copy of this software and associated documentation files (the +# "Software"), to deal in the Software without restriction, including +# without limitation the rights to use, copy, modify, merge, publish, +# distribute, sublicense, and/or sell copies of the Software, and to +# permit persons to whom the Software is furnished to do so, subject to +# the following conditions: +# +# The above copyright notice and this permission notice shall be +# included in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +# +# Ported to Geany by Joshua Hoff and +# Matthew Brush +# + +[theme_info] +name=Solarized (light) +description=Light Solarized theme for Geany +# incremented automatically, do not change manually +version=1225 +author=Ethan Schoonover +url=http://ethanschoonover.com/solarized +# list of each compatible Geany release version +compat=1.22;1.23;1.23.1;1.24 + +[named_colors] +# See: http://ethanschoonover.com/solarized#the-values +base03=#002b36 +base02=#073642 +base01=#586e75 +base00=#657b83 +base0=#839496 +base1=#93a1a1 +base2=#eee8d5 +base3=#fdf6e3 +yellow=#b58900 +orange=#cb4b16 +red=#dc322f +magenta=#d33682 +violet=#6c71c4 +blue=#268bd2 +cyan=#2aa198 +green=#859900 + +[named_styles] + +default=base00;base3 +error=red + + +# Editor styles +#------------------------------------------------------------------------------- +selection=;#dbd4be;;true +current_line=;base2;true +brace_good=base01;;true +brace_bad=red;;true +margin_line_number=base0;base3 +margin_folding=base0;base2 +fold_symbol_highlight=base2 +indent_guide=base1 +caret=base03 +marker_line=; +marker_search=; +marker_mark=; +call_tips=base00;base3 +white_space=indent_guide + + +# Programming languages +#------------------------------------------------------------------------------- + +comment=base1 +comment_doc=comment +comment_line=comment +comment_line_doc=comment_doc +comment_doc_keyword=comment_doc,bold +comment_doc_keyword_error=comment_doc,italic + +number=cyan +number_1=number +number_2=number_1 + +type=yellow;;true +class=type +function=blue +parameter=function + +keyword=green;;true +keyword_1=keyword +keyword_2=blue;;true +keyword_3=keyword_1 +keyword_4=keyword_1 + +identifier=default +identifier_1=identifier +identifier_2=identifier_1 +identifier_3=identifier_1 +identifier_4=identifier_1 + +string=magenta +string_1=string +string_2=string_1 +string_3=default +string_4=default +string_eol=red +character=string_1 +backticks=string_2 +here_doc=string_2 + +scalar=string_2 +label=default,bold +preprocessor=orange +regex=violet +operator=default +decorator=string_1,bold +other=default + + +# Markup-type languages +#------------------------------------------------------------------------------- + +tag=type +tag_unknown=tag,bold +tag_end=tag,bold +attribute=keyword_1 +attribute_unknown=attribute,bold +value=string_1 +entity=default + + +# Diff +#------------------------------------------------------------------------------- + +line_added=green +line_removed=red +line_changed=blue diff --git a/.config/geany/colorschemes/spyder-dark.conf b/.config/geany/colorschemes/spyder-dark.conf new file mode 100755 index 0000000..4552b9c --- /dev/null +++ b/.config/geany/colorschemes/spyder-dark.conf @@ -0,0 +1,118 @@ +# +# Copyright 2013 Paul Thompson +# +# 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, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, +# MA 02110-1301, USA. +# + +[theme_info] +name=Spyder Dark +description= A colorscheme inspired by Xubuntu 12.04, and the Spyder IDE. +# incremented automatically, do not change manually +version=0 +author=Paul Thompson +url=https://github.com/Redoubts/SpyderDark +# list of each compatible Geany release version +compat=1.22;1.23;1.23.1;1.24 + +[named_styles] + +default=#fff;#131926;false;false +error=#a52a2a;#131926;true;true + +# Editor styles +#------------------------------------------------------------------------------- + +selection=#000;#a52a2a;false;true +current_line=#000;#2b2b43;true;false +brace_good=#fff;#4e9a06;true;false +brace_bad=#fff;#a52a2a;true;false +margin_line_number=#eee;#282828;false;false +margin_folding=#888a85;#282828;false;false +fold_symbol_highlight=#000 +indent_guide=#474545;#131926;false;false +caret=#fff;#000;false;false +marker_line=#000;#ff0;false;false +marker_search=#000;#b8f4b8;false;false +marker_mark=#000;#b8f4b8; +call_tips=#c0c0c0;#fff;false;false +white_space=#506369;;true + +# Programming languages +#------------------------------------------------------------------------------- + +comment=#7f7f7f;#131926;false;false +comment_doc=#11a642;#131926;false;true +comment_line=comment +comment_line_doc=comment_doc +comment_doc_keyword=comment_doc,bold +comment_doc_keyword_error=comment_doc,italic + +number=#c80000;#131926;false;false +number_1=number +number_2=number_1 + +type=#fff;#131926;true;false +class=#be5f00;#131926;true;true +function=type +parameter=#ffa500;#131926;true;false + +keyword=#8ae234;#0f0;true;false +keyword_1=#558eff;#131926;true;false +keyword_2=#a0a;#131926;true;false +keyword_3=keyword_1 +keyword_4=keyword_1 + +identifier=default +identifier_1=identifier +identifier_2=identifier_1 +identifier_3=identifier_1 +identifier_4=identifier_1 + +string=#11a642;#131926;false;false +string_1=string +string_2=string_1 +string_3=default +string_4=default +string_eol=#fff;#ad7fa8;false;false +character=string +backticks=string_2 +here_doc=string_2 + +scalar=string_2 +label=default,bold +preprocessor=#ad7fa8;#131926;true;false +regex=#4e9a06;#131926;false;false +operator=#fff;#131926;false;false +decorator=#be5f00;#131926;false;false +other=default + +# Markup-type languages +#------------------------------------------------------------------------------- + +tag=#729fcf;#131926;true;false +tag_unknown=#fff;#8c0101;true;false +tag_end=#7392cf;#131926;true;false +attribute=#be5f00;#131926;false;false +attribute_unknown=#fff;#8c0101;false;false +value=#fff;#131926;false;false +entity=#ad7fa8;#131926;false;false + +# Diff +#------------------------------------------------------------------------------- + +line_removed=#729fcf;#131926;true;false +line_added=#8ae234;#131926;true;false +line_changed=#000;#fff;true;false diff --git a/.config/geany/colorschemes/steampunk.conf b/.config/geany/colorschemes/steampunk.conf new file mode 100755 index 0000000..e3370cd --- /dev/null +++ b/.config/geany/colorschemes/steampunk.conf @@ -0,0 +1,123 @@ +# +# Copyright 2013 Baptiste Darthenay +# +# 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, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, +# MA 02110-1301, USA. +# +# +# Best folding style with this theme, in filedefs/filetypes.common: +# folding_style=2,2 +# + +[theme_info] +name=Steampunk +description=A dark brown and shiny brass theme for the 19th century developer. +version=3 +author=Baptiste Darthenay +url=https://github.com/batisteo/geany-themes/blob/master/steampunk.conf +# list of each compatible Geany release version +compat=1.22;1.23;1.23.1;1.24 + +[named_styles] + +default=#fea;#252016;false;false +error=#faecbd;#a22 + +# Editor styles +#------------------------------------------------------------------------------- + +selection=#000;#605339;false;true +current_line=#000;#342d1f;true +brace_good=#8ab634;#514630;true +brace_bad=#ce5c00;#484333;true +margin_line_number=#caa223 +margin_folding=#651;#362a1d +fold_symbol_highlight=#b79024;#252016 +indent_guide=#b79024 +caret=#d3d7cf;#000 +marker_line=#c4a000;#edd400 +marker_search=#000;#0000f0 +marker_mark=#8c5200;#cf7900 +call_tips=#ccc;#fff;false +white_space=#650;;true + +# Programming languages +#------------------------------------------------------------------------------- + +comment=#786442 +comment_doc=comment +comment_line=comment +comment_line_doc=comment_doc +comment_doc_keyword=comment_doc,bold +comment_doc_keyword_error=comment_doc,italic + +number=#fce94f +number_1=number +number_2=number_1 + +type=#cf7900;;true +class=type +function=#cf7900 +parameter=function + +keyword=#cc9d22;;true +keyword_1=keyword +keyword_2=#729f9c +keyword_3=keyword_1 +keyword_4=keyword_1 + +identifier=default +identifier_1=identifier +identifier_2=identifier_1 +identifier_3=identifier_1 +identifier_4=identifier_1 + +string=#ebc95d +string_1=string +string_2=comment,italic +string_3=default +string_4=default +string_eol=string_1,italic +character=string_1 +backticks=string_2 +here_doc=string_2 +verbatim=string + +scalar=string_2 +label=default,bold +preprocessor=#729f9c +regex=number_1 +operator=#fa5;;true +decorator=#978;;;true +other=default +extra=#359 + +# Markup-type languages +#------------------------------------------------------------------------------- + +tag=#729f9c +tag_unknown=tag +tag_end=tag,bold +attribute=#729f9c +attribute_unknown=attribute +value=string_1 +entity=default + +# Diff +#------------------------------------------------------------------------------- + +line_added=#595 +line_removed=#a66 +line_changed=preprocessor diff --git a/.config/geany/colorschemes/tango-dark.conf b/.config/geany/colorschemes/tango-dark.conf new file mode 100755 index 0000000..dacc329 --- /dev/null +++ b/.config/geany/colorschemes/tango-dark.conf @@ -0,0 +1,113 @@ +# +# Copyright Barry van Oudtshoorn +# +# No explicit license or copyright info available but available on +# the Geany `Extras` page: +# http://www.geany.org/Download/Extras +# Which links to: +# http://www.barryvan.com.au/2009/01/geany-ide-tango-dark-colour-scheme/ +# Which in turn links to a repository at: +# https://github.com/barryvan/Geany-Tango-Dark +# +# Ported to Geany by Matthew Brush +# + +[theme_info] +name=Tango +description=Loosely based on the Dark theme, but Tangofied. +# incremented automatically, do not change manually +version=1226 +author=Barry van Oudtshoorn +url=https://github.com/codebrainz/geany-themes/blob/master/tango-dark.conf +# list of each compatible Geany release version +compat=1.22;1.23;1.23.1;1.24 + +[named_styles] + +default=#eeeeec;#2e3436;false;false +error=#fff;#f00 + +# Editor styles +#------------------------------------------------------------------------------- + +selection=#000;#626d71;false;true +current_line=#000;#475458;true +brace_good=#fff;#647175;true;false +brace_bad=#eea1a8;#647175;true;false +margin_line_number=#000;#d0d0d0 +margin_folding=#000;#dfdfdf +fold_symbol_highlight=#fff +indent_guide=#c0c0c0 +caret=#fbff00;#fbff00;false +marker_line=#000;#ff0 +marker_search=#000;#0000f0 +marker_mark=#000;#b8f4b8 +call_tips=#c0c0c0;#fff;false;false +white_space=#505050;;true + +# Programming languages +#------------------------------------------------------------------------------- + +comment=#888a85;#2e3436;false;false +comment_doc=comment +comment_line=comment +comment_line_doc=comment_doc +comment_doc_keyword=comment_doc,bold +comment_doc_keyword_error=comment_doc,italic + +number=#8ae234;#2e3436;false;false +number_1=number +number_2=number_1 + +type=#eeeeec;#2e3436;false;false +class=type +function=default +parameter=function + +keyword=#729fcf;#2e3436;true;false +keyword_1=keyword +keyword_2=keyword_1 +keyword_3=keyword_1 +keyword_4=keyword_1 + +identifier=default +identifier_1=identifier +identifier_2=identifier_1 +identifier_3=identifier_1 +identifier_4=identifier_1 + +string=#8ae234;#2e3436;true;false +string_1=string +string_2=string_1 +string_3=default +string_4=default +string_eol=string_1,italic +character=string_1 +backticks=string_2 +here_doc=string_2 + +scalar=string_2 +label=default,bold +preprocessor=#007f7f;#2e3436;true;false +regex=number_1 +operator=default +decorator=string_1,bold +other=default + +# Markup-type languages +#------------------------------------------------------------------------------- + +tag=#729fcf;#2e3436;false;false +tag_unknown=tag +tag_end=tag,bold +attribute=#729fcf;#2e3436;false;false +attribute_unknown=attribute +value=string_1 +entity=default + +# Diff +#------------------------------------------------------------------------------- + +line_added=#008b8b +line_removed=#6a5acd +line_changed=preprocessor diff --git a/.config/geany/colorschemes/tango-light.conf b/.config/geany/colorschemes/tango-light.conf new file mode 100755 index 0000000..c581fec --- /dev/null +++ b/.config/geany/colorschemes/tango-light.conf @@ -0,0 +1,120 @@ +# +# Copyright 2011 Colomban Wendling +# +# 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, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, +# MA 02110-1301, USA. +# + +[theme_info] +name=Tango Light +description=A light theme using Tango colors. +# incremented automatically, do not change manually +version=1225 +author=Colomban Wendling +url=https://github.com/codebrainz/geany-themes/blob/master/tango-light.conf +# list of each compatible Geany release version +compat=1.22;1.23;1.23.1;1.24 + +[named_styles] + +default=#2e3436;#eeeeec;false;false +error=#2e3436;#ef2929 + +# Editor styles +#------------------------------------------------------------------------------- + +selection=#2e3436;#babdb6;false;true +current_line=#2e3436;#d3d7cf;true +brace_good=#5c3566;;true +brace_bad=#2e3436;#ef2929;true +margin_line_number=#2e3436;#babdb6 +margin_folding=#2e3436;#d3d7cf +fold_symbol_highlight=#d3d7cf +indent_guide=#babdb6 +caret=#000;#000;false +marker_line=#2e3436;#729fcf +marker_search=#2e3436;#fcaf3e +marker_mark=#2e3436;#8ae234 +call_tips=#555753;#eeeeec +white_space=#babdb6;;true + +# Programming languages +#------------------------------------------------------------------------------- + +comment=#c00;;;true +comment_doc=#3465a4;;;true +comment_line=comment +comment_line_doc=comment_doc +comment_doc_keyword=comment_doc,bold +comment_doc_keyword_error=comment_doc_keyword,italic + +number=#4e9a06 +number_1=number +number_2=number_1 + +type=#4e9a06;;true +class=type +function=default +parameter=function + +keyword=#204a87;;true +keyword_1=keyword +keyword_2=#a40000;;true +keyword_3=keyword_1 +keyword_4=keyword_1 + +identifier=default +identifier_1=identifier +identifier_2=identifier_1 +identifier_3=identifier_1 +identifier_4=identifier_1 + +string=#ce5c00;;false;false +string_1=string +string_2=string_1 +string_3=default +string_4=default +string_eol=string_1,italic +character=string_1 +backticks=string_2 +here_doc=string_2 +verbatim=string + +scalar=string_2 +label=default,bold +preprocessor=#75507b +regex=number_1 +operator=default +decorator=string_1,bold +other=default +extra=#204a87 + +# Markup-type languages +#------------------------------------------------------------------------------- + +tag=#204a87;;true +tag_unknown=tag +tag_end=tag +attribute=#4e9a06;;true +attribute_unknown=attribute,italic +value=string_1 +entity=preprocessor + +# Diff +#------------------------------------------------------------------------------- + +line_added=#4e9a06 +line_removed=#a40000 +line_changed=#ce5c00 diff --git a/.config/geany/colorschemes/tinge.conf b/.config/geany/colorschemes/tinge.conf new file mode 100755 index 0000000..540e1c6 --- /dev/null +++ b/.config/geany/colorschemes/tinge.conf @@ -0,0 +1,128 @@ +# +# Copyright (C) 2008 - Harsh J +# See: http://www.harshj.com/2008/01/27/tinge-theme-for-gedit/ +# +# Tinge is a theme inspired by Monokai and improved upon Darkmate: +# Copyright (C) 2006-2008 GtkSourceView team +# Original author: Luigi Maselli +# See: http://www.monokai.nl/blog/2006/07/15/textmate-color-theme/ +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Library General Public +# License as published by the Free Software Foundation; either +# version 2 of the License, or (at your option) any later version. +# +# This library 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 +# Library General Public License for more details. +# +# You should have received a copy of the GNU Library General Public +# License along with this library; if not, write to the +# Free Software Foundation, Inc., 59 Temple Place - Suite 330, +# Boston, MA 02111-1307, USA. +# +# Ported to Geany by Matthew Brush +# + +[theme_info] +name=Tinge +description=A tinge more tanginess +# incremented automatically, do not change manually +version=1225 +author=Harsh J +# alt url: +# http://www.harshj.com/2008/01/27/tinge-theme-for-gedit/ +url=https://github.com/mig/gedit-themes/blob/master/Tinge.xml +# list of each compatible Geany release version +compat=1.22;1.23;1.23.1;1.24 + +[named_styles] + +default=#eee;#232323;false;false +error=;#ff2f6a;true + +# Editor styles +#------------------------------------------------------------------------------- + +selection=#000;#555753;false;true +current_line=#000;#6f6f6f;true +brace_good=#b6f;#232323;true;false +brace_bad=#eee;#232323;true;false +margin_line_number=#bbb;#555753 +margin_folding=#000;#dfdfdf +fold_symbol_highlight=#fff +indent_guide=#3d3d3d +white_space=#3d3d3d;#fff;true;false +caret=#009cff;#000;false +marker_line=#bbb;#555753 +marker_search=#bbb;#555753 +marker_mark=#bbb;#555753 +call_tips=#c0c0c0;#fff;false;false + +# Programming languages +#------------------------------------------------------------------------------- + +comment=#b6f +comment_doc=comment +comment_line=comment +comment_line_doc=comment_doc +comment_doc_keyword=comment_doc,bold +comment_doc_keyword_error=comment_doc,italic + +number=#ff2f6a +number_1=number +number_2=number_1 + +type=#009cff;;true +class=type +function=#9e91ff +parameter=function + +keyword=#f90;;true +keyword_1=keyword +keyword_2=#00c900;;true +keyword_3=keyword_1 +keyword_4=keyword_1 + +identifier=default +identifier_1=identifier +identifier_2=identifier_1 +identifier_3=identifier_1 +identifier_4=identifier_1 + +string=#ff3a35 +string_1=string +string_2=string_1 +string_3=default +string_4=default +string_eol=string_1,italic +character=#f90 +backticks=string_2 +here_doc=string_2 + +scalar=string_2 +label=default,bold +preprocessor=#009cff;;true +regex=#adb2ff +operator=default +decorator=#009cff +other=default + +# Markup-type languages +#------------------------------------------------------------------------------- + +tag=#f90 +tag_unknown=#f90 +tag_end=#f90 +attribute=#9e91ff +attribute_unknown=#9e91ff +value=string_1 +entity=default + +# Diff +#------------------------------------------------------------------------------- + +line_added=#ff3a35 +line_removed=#ff79d9 +line_changed=#f90 diff --git a/.config/geany/colorschemes/ubuntu.conf b/.config/geany/colorschemes/ubuntu.conf new file mode 100755 index 0000000..832f5fb --- /dev/null +++ b/.config/geany/colorschemes/ubuntu.conf @@ -0,0 +1,116 @@ +# +# Copyright 2013 James Brierley +# +# 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, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, +# MA 02110-1301, USA. +# + +[theme_info] +name=Ubuntu +description=A theme for Ubuntu fanboys and fangirls. +version=1 +author=James Brierley +url= +# list of each compatible Geany release version +compat=1.22;1.23;1.23.1;1.24 + +[named_styles] + +default=#000;#fff;false;false +error=#fff;#f00 + +# Editor styles +#------------------------------------------------------------------------------- + +selection=#000;#c0c0c0;false;true +current_line=#000;#f0f0f0;true +brace_good=#333;#fff;true;false +brace_bad=#fff;#333;true;false +margin_line_number=#000;#d0d0d0 +margin_folding=#000;#dfdfdf +fold_symbol_highlight=#fff +indent_guide=#c0c0c0 +caret=#000;#000;false +marker_line=#000;#ff0 +marker_search=#000;#0000f0 +marker_mark=#000;#b8f4b8 +call_tips=#c0c0c0;#fff;false;false +white_space=#c0c0c0;#fff;true;false + +# Programming languages +#------------------------------------------------------------------------------- + +comment=#808080 +comment_doc=#595959 +comment_line=comment +comment_line_doc=comment_doc +comment_doc_keyword=comment_doc,bold +comment_doc_keyword_error=comment_doc,italic + +number=#dd4814 +number_1=number +number_2=number_1 + +type=#5e2750;;true +class=type +function=#000080 +parameter=function + +keyword=#2c001e;;true +keyword_1=keyword +keyword_2=#9f0200;;true +keyword_3=keyword_1 +keyword_4=keyword_1 + +identifier=#151515 +identifier_1=identifier +identifier_2=identifier_1 +identifier_3=identifier_1 +identifier_4=identifier_1 + +string=#dd4814 +string_1=string +string_2=string_1 +string_3=default +string_4=default +string_eol=#000;#e0c0e0 +character=string_1 +backticks=string_2 +here_doc=string_2 + +label=default,bold +preprocessor=comment_doc,bold +regex=number_1 +operator=#5e2750 +decorator=string_1,bold +other=#404080 + +# Markup-type languages +#------------------------------------------------------------------------------- + +tag=type +tag_unknown=tag,bold +tag_end=tag,bold +attribute=keyword_1 +attribute_unknown=attribute,bold +value=string_1 +entity=default + +# Diff +#------------------------------------------------------------------------------- + +line_added=#008b8b +line_removed=#6a5acd +line_changed=preprocessor diff --git a/.config/geany/colorschemes/vibrant-ink.conf b/.config/geany/colorschemes/vibrant-ink.conf new file mode 100755 index 0000000..71c5fd2 --- /dev/null +++ b/.config/geany/colorschemes/vibrant-ink.conf @@ -0,0 +1,123 @@ +# +# Copyright Jason Wilson +# +# 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, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, +# MA 02110-1301, USA. +# +# License linked from Google Projects page: +# http://dev.perl.org/licenses/ +# +# Ported to Geany by Matthew Brush +# + +[theme_info] +name=Vibrant +description=Vibrant Ink Theme for Geany +# incremented automatically, do not change manually +version=1225 +author=Jason Wilson +url=http://code.google.com/p/geany-vibrant-ink-theme +# list of each compatible Geany release version +compat=1.22;1.23;1.23.1;1.24 + +[named_styles] + +default=#fff;#000;false;false +error=#ff80c0;#000;false;false + +# Editor styles +#------------------------------------------------------------------------------- + +selection=#8000ff;#404040;false;true +current_line=#0080c0;#330;true;false +brace_good=#9c9;#000;true;false +brace_bad=#cf3;#000;true;false +margin_line_number=#e4e4e4;#404040;false;false +margin_folding=#222;#111;false;false +fold_symbol_highlight=#fff +indent_guide=#c0c0c0;;false;false +caret=#fff;#112435;false;false +marker_line=#0ff;#80d4b2;false;false +marker_search=#ff0;#f00;false;false +marker_mark=#c00000;#000;false;false +call_tips=#c0c0c0;#fff;false;false +white_space=#424242;;true + +# Programming languages +#------------------------------------------------------------------------------- + +comment=#93c +comment_doc=#772cb7;#070707;false;false +comment_line=comment +comment_line_doc=comment_doc +comment_doc_keyword=comment_doc,bold +comment_doc_keyword_error=comment_doc,italic + +number=#cf3 +number_1=number +number_2=number_1 + +type=#fff;;true;false +class=type +function=default +parameter=function + +keyword=#f60;;true;false +keyword_1=keyword +keyword_2=#dde93d;;true;false +keyword_3=keyword_1 +keyword_4=keyword_1 + +identifier=default +identifier_1=identifier +identifier_2=identifier_1 +identifier_3=identifier_1 +identifier_4=identifier_1 + +string=#6f0 +string_1=string +string_2=string_1 +string_3=default +string_4=default +string_eol=#ccc;#000;false;false +character=string_1 +backticks=string_2 +here_doc=string_2 + +scalar=string_2 +label=default,bold +preprocessor=#edf8f9 +regex=number_1 +operator=#fc0 +decorator=string_1,bold +other=default + +# Markup-type languages +#------------------------------------------------------------------------------- + +tag=#f60;#000;false;false +tag_unknown=#fff;#000;false;false +tag_end=#fff;#000;false;false +attribute=#9c9;#000;false;false +attribute_unknown=#fff;#000;false;false +value=#f60;#000;false;false +entity=#fff;#000;false;false + +# Diff +#------------------------------------------------------------------------------- + +line_added=#399;#000;false;false +line_removed=#808040;#000;false;false +line_changed=#9c9;#000;false;false diff --git a/.config/geany/colorschemes/zenburn.conf b/.config/geany/colorschemes/zenburn.conf new file mode 100755 index 0000000..9f7cb9c --- /dev/null +++ b/.config/geany/colorschemes/zenburn.conf @@ -0,0 +1,107 @@ +# +# No explicit license or copyright info available but part of the +# `gedit-themes` project: +# https://github.com/mig/gedit-themes/blob/master/zenburn.xml +# +# Ported to Geany by Matthew Brush +# + +[theme_info] +name=Zenburn +description=A port of Zenburn from gedit-themes. +# incremented automatically, do not change manually +version=1226 +author=Unknown Author +url=https://github.com/mig/gedit-themes/blob/master/zenburn.xml +# list of each compatible Geany release version +compat=1.22;1.23;1.23.1;1.24 + +[named_styles] + +default=#dcdccc;#3f3f3f;false;false +error=#e37170;#332323 + +# Editor styles +#------------------------------------------------------------------------------- + +selection=#000;#7d7d7d;false;true +current_line=#000;#636363;true +brace_good=#dcdccc;#7d7d7d;true;false +brace_bad=#e37170;#7d7d7d;true;false +margin_line_number=#7f8f8f;#464646 +margin_folding=#7f8f8f;#4c4c4c +fold_symbol_highlight=#464646 +indent_guide=#666 +caret=#fff;;false +marker_line=#000;#ff0 +marker_search=#000;#0000f0 +marker_mark=#000;#b8f4b8 +call_tips=#c0c0c0;#fff;false;false +white_space=#666;#fff;true;false + +# Programming languages +#------------------------------------------------------------------------------- + +comment=#7f9f7f +comment_doc=comment +comment_line=comment +comment_line_doc=comment_doc +comment_doc_keyword=comment_doc,bold +comment_doc_keyword_error=comment_doc,italic + +number=#8cd0d3 +number_1=number +number_2=number_1 + +type=#dfdfbf;;true +class=type +function=#efef8f +parameter=#efdcbc + +keyword=#f0dfaf;;true +keyword_1=keyword +keyword_2=keyword_1 +keyword_3=keyword_1 +keyword_4=keyword_1 + +identifier=default +identifier_1=identifier +identifier_2=identifier_1 +identifier_3=identifier_1 +identifier_4=identifier_1 + +string=#cc9393 +string_1=string +string_2=string_1 +string_3=default +string_4=default +string_eol=string_1,italic +character=string_1 +backticks=string_2 +here_doc=string_2 + +scalar=string_2 +label=default,bold +preprocessor=#ffcfaf +regex=number_1 +operator=default +decorator=string_1,bold +other=default + +# Markup-type languages +#------------------------------------------------------------------------------- + +tag=#f0dfaf +tag_unknown=tag +tag_end=tag +attribute=#dfdfbf +attribute_unknown=attribute +value=string_1 +entity=default + +# Diff +#------------------------------------------------------------------------------- + +line_added=#7f9f7f;;true +line_removed=#cc9393;;true +line_changed=preprocessor diff --git a/.config/geany/filedefs/filetypes.README b/.config/geany/filedefs/filetypes.README new file mode 100755 index 0000000..fe58ed1 --- /dev/null +++ b/.config/geany/filedefs/filetypes.README @@ -0,0 +1,2 @@ +Copy files from /usr/share/geany/filedefs to this directory to overwrite them. To use the defaults, just delete the file in this directory. +For more information read the documentation (in /usr/share/doc/geany/html/index.html or visit https://www.geany.org/). \ No newline at end of file diff --git a/.config/geany/geany.conf b/.config/geany/geany.conf new file mode 100755 index 0000000..f791e9b --- /dev/null +++ b/.config/geany/geany.conf @@ -0,0 +1,224 @@ +[geany] +default_open_path= +cmdline_new_files=true +notebook_double_click_hides_widgets=false +tab_close_switch_to_mru=false +tab_pos_sidebar=0 +sidebar_pos=0 +symbols_sort_mode=0 +msgwin_orientation=0 +highlighting_invert_all=false +pref_main_search_use_current_word=true +check_detect_indent=false +detect_indent_width=false +use_tab_to_indent=true +pref_editor_tab_width=8 +indent_mode=2 +indent_type=0 +virtualspace=1 +autocomplete_doc_words=false +completion_drops_rest_of_word=false +autocompletion_max_entries=30 +autocompletion_update_freq=250 +color_scheme=monokai.conf +scroll_lines_around_cursor=0 +mru_length=10 +disk_check_timeout=30 +show_editor_scrollbars=true +brace_match_ltgt=false +use_gtk_word_boundaries=true +complete_snippets_whilst_editing=false +indent_hard_tab_width=8 +editor_ime_interaction=0 +use_atomic_file_saving=false +gio_unsafe_save_backup=false +use_gio_unsafe_file_saving=true +keep_edit_history_on_reload=true +show_keep_edit_history_on_reload_msg=false +reload_clean_doc_on_file_change=false +save_config_on_file_change=true +extract_filetype_regex=-\\*-\\s*([^\\s]+)\\s*-\\*- +allow_always_save=false +find_selection_type=0 +replace_and_find_by_default=true +show_symbol_list_expanders=true +compiler_tab_autoscroll=true +statusbar_template=line: %l / %L col: %c sel: %s %w %t %mmode: %M encoding: %e filetype: %f scope: %S +new_document_after_close=false +msgwin_status_visible=true +msgwin_compiler_visible=true +msgwin_messages_visible=true +msgwin_scribble_visible=true +documents_show_paths=true +sidebar_page=2 +pref_main_load_session=true +pref_main_project_session=true +pref_main_project_file_in_basedir=false +pref_main_save_winpos=true +pref_main_save_wingeom=true +pref_main_confirm_exit=false +pref_main_suppress_status_messages=false +switch_msgwin_pages=false +beep_on_errors=true +auto_focus=false +sidebar_symbol_visible=false +sidebar_openfiles_visible=false +editor_font=Cascadia Code PL 10 +tagbar_font=Sans 9 +msgwin_font=Comic Mono 10 +show_notebook_tabs=true +show_tab_cross=true +tab_order_ltr=true +tab_order_beside=false +tab_pos_editor=2 +tab_pos_msgwin=2 +use_native_windows_dialogs=false +show_indent_guide=true +show_white_space=true +show_line_endings=false +show_markers_margin=true +show_linenumber_margin=true +long_line_enabled=true +long_line_type=0 +long_line_column=80 +long_line_color=#C2EBC2 +symbolcompletion_max_height=10 +symbolcompletion_min_chars=4 +use_folding=true +unfold_all_children=false +use_indicators=true +line_wrapping=true +auto_close_xml_tags=true +complete_snippets=true +auto_complete_symbols=true +pref_editor_disable_dnd=false +pref_editor_smart_home_key=true +pref_editor_newline_strip=false +line_break_column=80 +auto_continue_multiline=true +comment_toggle_mark= +scroll_stop_at_last_line=true +autoclose_chars=0 +pref_editor_default_new_encoding=UTF-8 +pref_editor_default_open_encoding=none +default_eol_character=2 +pref_editor_new_line=true +pref_editor_ensure_convert_line_endings=false +pref_editor_replace_tabs=false +pref_editor_trail_space=false +pref_toolbar_show=false +pref_toolbar_append_to_menu=false +pref_toolbar_use_gtk_default_style=true +pref_toolbar_use_gtk_default_icon=true +pref_toolbar_icon_style=0 +pref_toolbar_icon_size=0 +pref_template_developer=Sarthak Jain +pref_template_company= +pref_template_mail=jsarthak@IGN-BLR-LP-0320 +pref_template_initial=SJ +pref_template_version=1.0 +pref_template_year=%Y +pref_template_date=%Y-%m-%d +pref_template_datetime=%d.%m.%Y %H:%M:%S %Z +context_action_cmd= +sidebar_visible=false +statusbar_visible=true +msgwindow_visible=true +fullscreen=false +color_picker_palette= +scribble_text=Type here what you want, use it as a notice/scratch board +scribble_pos=57 +treeview_position=271 +msgwindow_position=1079 +geometry=1883;108;1182;876;0; +custom_date_format= + +[build-menu] +number_ft_menu_items=0 +number_non_ft_menu_items=0 +number_exec_menu_items=0 + +[search] +pref_search_hide_find_dialog=false +pref_search_always_wrap=false +pref_search_current_file_dir=true +find_all_expanded=false +replace_all_expanded=false +position_find_x=2122 +position_find_y=446 +position_replace_x=-1 +position_replace_y=-1 +position_fif_x=-1 +position_fif_y=-1 +fif_regexp=false +fif_case_sensitive=true +fif_match_whole_word=false +fif_invert_results=false +fif_recursive=false +fif_extra_options= +fif_use_extra_options=false +fif_files= +fif_files_mode=0 +find_regexp=false +find_regexp_multiline=false +find_case_sensitive=false +find_escape_sequences=false +find_match_whole_word=false +find_match_word_start=false +find_close_dialog=true +replace_regexp=false +replace_regexp_multiline=false +replace_case_sensitive=false +replace_escape_sequences=false +replace_match_whole_word=false +replace_match_word_start=false +replace_search_backwards=false +replace_close_dialog=true + +[plugins] +load_plugins=true +custom_plugin_path= +active_plugins=/usr/lib/x86_64-linux-gnu/geany/export.so;/usr/lib/x86_64-linux-gnu/geany/filebrowser.so;/usr/lib/x86_64-linux-gnu/geany/splitwindow.so; + +[VTE] +send_cmd_prefix= +send_selection_unsafe=false +load_vte=true +font=Comic Mono 10 +scroll_on_key=true +scroll_on_out=true +enable_bash_keys=true +ignore_menu_bar_accel=false +follow_path=false +run_in_vte=false +skip_run_script=false +cursor_blinks=true +scrollback_lines=500 +shell=/bin/bash +colour_fore=#FFFFFF +colour_back=#000000 +last_dir=/home/sarthakj + +[tools] +terminal_cmd=x-terminal-emulator -e "/bin/sh %c" +browser_cmd=sensible-browser +grep_cmd=grep + +[printing] +print_cmd=lpr '%f' +use_gtk_printing=true +print_line_numbers=true +print_page_numbers=true +print_page_header=true +page_header_basename=false +page_header_datefmt=%c + +[project] +session_file= +project_file_path=/home/jsarthak/projects + +[files] +recent_files=/home/sarthakj/git-repos/v4l2loopback/utils/Makefile;/home/sarthakj/ti-processor-sdk-linux-rt-j7-evm-08_02_00_01/Makefile;/home/sarthakj/ti-processor-sdk-linux-rt-j7-evm-08_02_00_01/v4l2loopback/Makefile;/home/sarthakj/ti-processor-sdk-linux-rt-j7-evm-08_02_00_01/board-support/linux-rt-5.10.100+gitAUTOINC+204ec708dc-g204ec708dc/samples/rpmsg/Makefile;/home/sarthakj/ti-processor-sdk-linux-rt-j7-evm-08_02_00_01/v4l2loopback/Makefile.manual;/home/sarthakj/Workspace/TDA4_J7/ref/CodeRepo/Milstone_50_percent_code/src/main_baremetal.c;/home/sarthakj/Downloads/0001-ENGR00257661-pcie-imx-pcie-ep-rc-validation.patch;/home/sarthakj/Downloads/IT6664_hdmi2_tx(1).patch;/home/sarthakj/Downloads/Makefile.patch;/home/sarthakj/edid; +recent_projects= +current_page=0 +FILE_NAME_0=116;Make;0;EUTF-8;1;1;1;%2Fhome%2Fsarthakj%2Fgit-repos%2Fv4l2loopback%2Futils%2FMakefile;0;8 diff --git a/.config/geany/keybindings.conf b/.config/geany/keybindings.conf new file mode 100755 index 0000000..e69de29 diff --git a/.config/geany/plugins/filebrowser/filebrowser.conf b/.config/geany/plugins/filebrowser/filebrowser.conf new file mode 100755 index 0000000..65f2520 --- /dev/null +++ b/.config/geany/plugins/filebrowser/filebrowser.conf @@ -0,0 +1,7 @@ +[filebrowser] +open_command=nautilus "%d" +show_hidden_files=false +hide_object_files=true +hidden_file_extensions=.o .obj .so .dll .a .lib .pyc +fb_follow_path=false +fb_set_project_base_path=false diff --git a/.config/geany/templates/templates.README b/.config/geany/templates/templates.README new file mode 100755 index 0000000..3d25d1a --- /dev/null +++ b/.config/geany/templates/templates.README @@ -0,0 +1,2 @@ +There are several template files in this directory. For these templates you can use wildcards. +For more information read the documentation (in /usr/share/doc/geany/html/index.html or visit https://www.geany.org/). \ No newline at end of file diff --git a/.config/kitty/kitty-themes/.all-contributorsrc b/.config/kitty/kitty-themes/.all-contributorsrc new file mode 100755 index 0000000..c990c95 --- /dev/null +++ b/.config/kitty/kitty-themes/.all-contributorsrc @@ -0,0 +1,111 @@ +{ + "files": [ + "README.md" + ], + "badgeTemplate": "[![All Contributors](https://img.shields.io/badge/all_contributors-<%= contributors.length %>-green.svg?style=for-the-badge)](#contributors)", + "contributorTemplate": "\"><%= contributor.name %>
<%= contributions %>", + "imageSize": 100, + "commit": false, + "contributors": [ + { + "login": "scopatz", + "name": "Anthony Scopatz", + "avatar_url": "https://avatars2.githubusercontent.com/u/320553?v=4", + "profile": "http://www.scopatz.com", + "contributions": [ + "doc" + ] + }, + { + "login": "orangecoloured", + "name": "RCKT", + "avatar_url": "https://avatars3.githubusercontent.com/u/3314891?v=4", + "profile": "https://rckt.cc", + "contributions": [ + "theme" + ] + }, + { + "login": "varmanishant", + "name": "varmanishant", + "avatar_url": "https://avatars1.githubusercontent.com/u/4084912?v=4", + "profile": "https://github.com/varmanishant", + "contributions": [ + "theme" + ] + }, + { + "login": "rlerdorf", + "name": "Rasmus Lerdorf", + "avatar_url": "https://avatars3.githubusercontent.com/u/54641?v=4", + "profile": "https://github.com/rlerdorf", + "contributions": [ + "bug", + "ideas" + ] + }, + { + "login": "Luflosi", + "name": "Luflosi", + "avatar_url": "https://avatars1.githubusercontent.com/u/15217907?v=4", + "profile": "https://github.com/Luflosi", + "contributions": [ + "fix", + "question", + "doc" + ] + }, + { + "login": "connorholyday", + "name": "Connor Holyday", + "avatar_url": "https://avatars1.githubusercontent.com/u/4559119?v=4", + "profile": "https://holyday.me", + "contributions": [ + "fix" + ] + }, + { + "login": "BlueDrink9", + "name": "BlueDrink9", + "avatar_url": "https://avatars3.githubusercontent.com/u/26474254?v=4", + "profile": "https://github.com/BlueDrink9", + "contributions": [ + "bug" + ] + }, + { + "login": "brujoand", + "name": "Anders Brujordet", + "avatar_url": "https://avatars1.githubusercontent.com/u/124421?v=4", + "profile": "https://github.com/brujoand", + "contributions": [ + "theme" + ] + }, + { + "login": "rjshrjndrn", + "name": "Rajesh Rajendran", + "avatar_url": "https://avatars3.githubusercontent.com/u/2563385?v=4", + "profile": "http://www.hackouts.com", + "contributions": [ + "fix" + ] + } + ], + "types": { + "theme": { + "symbol": "😻", + "description": "New theme added to the collection" + }, + "fix": { + "symbol": "🛠️", + "description": "Fixed a theme" + } + }, + "contributorsPerLine": 7, + "projectName": "kitty-themes", + "projectOwner": "dexpota", + "repoType": "github", + "repoHost": "https://github.com", + "commitConvention": "none" +} diff --git a/.config/kitty/kitty-themes/LICENSE b/.config/kitty/kitty-themes/LICENSE new file mode 100755 index 0000000..e600086 --- /dev/null +++ b/.config/kitty/kitty-themes/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + 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 3 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 . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff --git a/.config/kitty/kitty-themes/README.rst b/.config/kitty/kitty-themes/README.rst new file mode 100755 index 0000000..ba156d3 --- /dev/null +++ b/.config/kitty/kitty-themes/README.rst @@ -0,0 +1,31 @@ +Themes for the kitty terminal +=============================== + +This is a collection of themes for the `kitty terminal emulator +`_. + +.. image:: screenshot.png + +The themes were initially imported from `dexpota/kitty-themes +`_. + +Using the themes +-------------------- + +The easiest way to use these themes is to run the `kitty +themes kitten `_:: + + kitty +kitten themes + +Contributing new themes +-------------------------- + +To contribute a new theme, use `template.conf `_ as +a base and modify it for your theme. Submit a `pull request +`_ +with your new theme. + +License +------------- +The overall license of this repository is the GPLv3, however, individual theme +files can have their own licenses, as specified in the theme file itself. diff --git a/.config/kitty/kitty-themes/gen-metadata.py b/.config/kitty/kitty-themes/gen-metadata.py new file mode 100755 index 0000000..3bac98e --- /dev/null +++ b/.config/kitty/kitty-themes/gen-metadata.py @@ -0,0 +1,34 @@ +#! kitty +launch +# vim:fileencoding=utf-8 +# License: GPLv3 Copyright: 2021, Kovid Goyal + +import glob +import json +import os +from operator import itemgetter + +from kittens.themes.collection import parse_theme + + +def main(): + themes = [] + seen = {} + for theme in glob.glob('themes/*.conf'): + name = os.path.basename(theme) + with open(theme) as f: + text = f.read() + td = parse_theme(name, text) + td['file'] = theme + if td['name'] in seen: + raise SystemExit( + f'The theme {td["name"]} is defined multiple times') + seen[td['name']] = theme + themes.append(td) + + themes.sort(key=itemgetter('name')) + with open('themes.json', 'w') as f: + json.dump(themes, f, indent=4, sort_keys=True) + + +if __name__ == '__main__': + main() diff --git a/.config/kitty/kitty-themes/screenshot.png b/.config/kitty/kitty-themes/screenshot.png new file mode 100755 index 0000000..4ad4db6 Binary files /dev/null and b/.config/kitty/kitty-themes/screenshot.png differ diff --git a/.config/kitty/kitty-themes/template.conf b/.config/kitty/kitty-themes/template.conf new file mode 100755 index 0000000..4c736e7 --- /dev/null +++ b/.config/kitty/kitty-themes/template.conf @@ -0,0 +1,106 @@ +# vim:ft=kitty +#: This is a template that can be used to create new kitty themes. +#: Theme files should start with a metadata block consisting of +#: lines beginning with ##. All metadata fields are optional. + +## name: The name of the theme (if not present, derived from filename) +## author: The name of the theme author +## license: The license information +## upstream: A URL pointing to the location of this file upstream for auto-updates +## blurb: A description of this theme. This must be the +## last item in the metadata and can continue over multiple lines. + +#: All the settings below are colors, which you can choose to modify, or use the +#: defaults. You can also add non-color based settings if needed but note that +#: these will not work with using kitty @ set-colors with this theme. For a +#: reference on what these settings do see https://sw.kovidgoyal.net/kitty/conf/ + +#: The basic colors + +# foreground #dddddd +# background #000000 +# selection_foreground #000000 +# selection_background #fffacd + + +#: Cursor colors + +# cursor #cccccc +# cursor_text_color #111111 + + +#: URL underline color when hovering with mouse + +# url_color #0087bd + + +#: kitty window border colors and terminal bell colors + +# active_border_color #00ff00 +# inactive_border_color #cccccc +# bell_border_color #ff5a00 +# visual_bell_color none + + +#: OS Window titlebar colors + +# wayland_titlebar_color system +# macos_titlebar_color system + + +#: Tab bar colors + +# active_tab_foreground #000 +# active_tab_background #eee +# inactive_tab_foreground #444 +# inactive_tab_background #999 +# tab_bar_background none +# tab_bar_margin_color none + + +#: Colors for marks (marked text in the terminal) + +# mark1_foreground black +# mark1_background #98d3cb +# mark2_foreground black +# mark2_background #f2dcd3 +# mark3_foreground black +# mark3_background #f274bc + + +#: The basic 16 colors + +#: black +# color0 #000000 +# color8 #767676 + +#: red +# color1 #cc0403 +# color9 #f2201f + +#: green +# color2 #19cb00 +# color10 #23fd00 + +#: yellow +# color3 #cecb00 +# color11 #fffd00 + +#: blue +# color4 #0d73cc +# color12 #1a8fff + +#: magenta +# color5 #cb1ed1 +# color13 #fd28ff + +#: cyan +# color6 #0dcdcd +# color14 #14ffff + +#: white +# color7 #dddddd +# color15 #ffffff + + +#: You can set the remaining 240 colors as color16 to color255. diff --git a/.config/kitty/kitty-themes/themes.json b/.config/kitty/kitty-themes/themes.json new file mode 100755 index 0000000..10855d9 --- /dev/null +++ b/.config/kitty/kitty-themes/themes.json @@ -0,0 +1,1742 @@ +[ + { + "file": "themes/1984_dark.conf", + "is_dark": true, + "name": "1984 Dark", + "num_settings": 23 + }, + { + "file": "themes/1984_light.conf", + "name": "1984 Light", + "num_settings": 23 + }, + { + "file": "themes/1984_orwellian.conf", + "is_dark": true, + "name": "1984 Orwellian", + "num_settings": 23 + }, + { + "file": "themes/3024_Day.conf", + "name": "3024 Day", + "num_settings": 21 + }, + { + "file": "themes/3024_Night.conf", + "is_dark": true, + "name": "3024 Night", + "num_settings": 21 + }, + { + "file": "themes/AdventureTime.conf", + "is_dark": true, + "name": "Adventure Time", + "num_settings": 21 + }, + { + "file": "themes/Afterglow.conf", + "is_dark": true, + "name": "Afterglow", + "num_settings": 21 + }, + { + "file": "themes/AlienBlood.conf", + "is_dark": true, + "name": "Alien Blood", + "num_settings": 21 + }, + { + "file": "themes/Alucard.conf", + "is_dark": true, + "name": "Alucard", + "num_settings": 21 + }, + { + "file": "themes/Apprentice.conf", + "is_dark": true, + "name": "Apprentice", + "num_settings": 22 + }, + { + "author": "Detective Pikachu", + "blurb": "A simple vibrant dark theme Kitty terminal.", + "file": "themes/Aquarium_Dark.conf", + "is_dark": true, + "license": "MIT", + "name": "Aquarium Dark", + "num_settings": 22, + "upstream": "https://github.com/FrenzyExists/aquarium-vim/raw/develop/extras/kitty_aquarium_dark.conf" + }, + { + "author": "ragdoll2iguess", + "blurb": "A simple vibrant dark theme Kitty terminal. Old BG -> #E6E6F1 #E1E3F2", + "file": "themes/Aquarium_Light.conf", + "license": "MIT", + "name": "Aquarium Light", + "num_settings": 21, + "upstream": "https://github.com/FrenzyExists/aquarium-vim/raw/develop/extras/kitty_aquarium_light.conf" + }, + { + "file": "themes/Argonaut.conf", + "is_dark": true, + "name": "Argonaut", + "num_settings": 21 + }, + { + "file": "themes/Arthur.conf", + "is_dark": true, + "name": "Arthur", + "num_settings": 21 + }, + { + "file": "themes/AtelierSulphurpool.conf", + "is_dark": true, + "name": "Atelier Sulphurpool", + "num_settings": 21 + }, + { + "file": "themes/Atom.conf", + "is_dark": true, + "name": "Atom", + "num_settings": 21 + }, + { + "file": "themes/AtomOneLight.conf", + "name": "Atom One Light", + "num_settings": 21 + }, + { + "file": "themes/ayu.conf", + "is_dark": true, + "name": "Ayu", + "num_settings": 21 + }, + { + "file": "themes/ayu_light.conf", + "name": "Ayu Light", + "num_settings": 21 + }, + { + "file": "themes/ayu_mirage.conf", + "is_dark": true, + "name": "Ayu Mirage", + "num_settings": 21 + }, + { + "file": "themes/Batman.conf", + "is_dark": true, + "name": "Batman", + "num_settings": 21 + }, + { + "file": "themes/Belafonte_Day.conf", + "name": "Belafonte Day", + "num_settings": 21 + }, + { + "file": "themes/Belafonte_Night.conf", + "is_dark": true, + "name": "Belafonte Night", + "num_settings": 21 + }, + { + "file": "themes/BirdsOfParadise.conf", + "is_dark": true, + "name": "Birds Of Paradise", + "num_settings": 21 + }, + { + "file": "themes/BlackMetal.conf", + "is_dark": true, + "name": "Black Metal", + "num_settings": 25 + }, + { + "file": "themes/Blazer.conf", + "is_dark": true, + "name": "Blazer", + "num_settings": 21 + }, + { + "file": "themes/Borland.conf", + "name": "Borland", + "num_settings": 21 + }, + { + "author": "b3yc0d3 ", + "blurb": "Breath2 Theme for Kitty Terminal", + "file": "themes/breath2.conf", + "is_dark": true, + "license": "MIT", + "name": "Breath2", + "num_settings": 24, + "upstream": "https://raw.githubusercontent.com/b3yc0d3/my-kitty-themes/main/themes/breath2.conf" + }, + { + "file": "themes/Bright_Lights.conf", + "is_dark": true, + "name": "Bright Lights", + "num_settings": 21 + }, + { + "file": "themes/Broadcast.conf", + "is_dark": true, + "name": "Broadcast", + "num_settings": 21 + }, + { + "file": "themes/Brogrammer.conf", + "is_dark": true, + "name": "Brogrammer", + "num_settings": 21 + }, + { + "file": "themes/C64.conf", + "name": "C64", + "num_settings": 21 + }, + { + "author": "Microsoft", + "blurb": "The default theme of Microsoft's terminals, including Windows Terminal and cmd.", + "file": "themes/Campbell.conf", + "is_dark": true, + "name": "Campbell", + "num_settings": 20 + }, + { + "author": "Pocco81 (https://github.com/Pocco81)", + "blurb": "Soothing pastel theme for the high-spirited!", + "file": "themes/catppuccin.conf", + "is_dark": true, + "license": "MIT", + "name": "Catppuccin", + "num_settings": 39, + "upstream": "https://raw.githubusercontent.com/catppuccin/kitty/main/catppuccin.conf" + }, + { + "file": "themes/Chalk.conf", + "is_dark": true, + "name": "Chalk", + "num_settings": 21 + }, + { + "file": "themes/Chalkboard.conf", + "is_dark": true, + "name": "Chalkboard", + "num_settings": 21 + }, + { + "file": "themes/ChallengerDeep.conf", + "is_dark": true, + "name": "Challenger Deep", + "num_settings": 25 + }, + { + "file": "themes/Ciapre.conf", + "is_dark": true, + "name": "Ciapre", + "num_settings": 21 + }, + { + "file": "themes/CLRS.conf", + "name": "Clrs", + "num_settings": 21 + }, + { + "file": "themes/Cobalt_Neon.conf", + "is_dark": true, + "name": "Cobalt Neon", + "num_settings": 21 + }, + { + "file": "themes/Cobalt2.conf", + "is_dark": true, + "name": "Cobalt2", + "num_settings": 21 + }, + { + "file": "themes/Corvine.conf", + "is_dark": true, + "name": "Corvine", + "num_settings": 18 + }, + { + "file": "themes/CrayonPonyFish.conf", + "is_dark": true, + "name": "Crayon Pony Fish", + "num_settings": 21 + }, + { + "file": "themes/DarkOneNuanced.conf", + "is_dark": true, + "name": "Dark One Nuanced", + "num_settings": 26 + }, + { + "file": "themes/Dark_Pastel.conf", + "is_dark": true, + "name": "Dark Pastel", + "num_settings": 21 + }, + { + "author": "apathyrecharge", + "blurb": "Dark trans-pride colour inspired theme", + "file": "themes/dark_pride.conf", + "is_dark": true, + "license": "GPLv3", + "name": "Dark Pride", + "num_settings": 21 + }, + { + "file": "themes/Darkside.conf", + "is_dark": true, + "name": "Darkside", + "num_settings": 21 + }, + { + "author": "Kovid Goyal", + "blurb": "This theme uses all default settings from kitty. Use it to easily restore defaults.", + "file": "themes/default.conf", + "is_dark": true, + "license": "GPLv3", + "name": "Default", + "num_settings": 0 + }, + { + "file": "themes/Desert.conf", + "is_dark": true, + "name": "Desert", + "num_settings": 21 + }, + { + "file": "themes/DesertNight.conf", + "is_dark": true, + "name": "Desert Night", + "num_settings": 19 + }, + { + "author": "Alan Welsh", + "blurb": "A theme for those with red-green colorblindness. Titlebar, tab, and bell colors are left at their defaults.", + "file": "themes/deuters_delight.conf", + "is_dark": true, + "license": "CC BY 4.0", + "name": "Deuters' Delight", + "num_settings": 31, + "upstream": "https://github.com/Pound-Hash/colorblind_themes.git" + }, + { + "file": "themes/DimmedMonokai.conf", + "is_dark": true, + "name": "Dimmed Monokai", + "num_settings": 21 + }, + { + "author": "Henrik Lissner ", + "blurb": "Inspired by Atom's One Dark color scheme.", + "file": "themes/Doom_One.conf", + "is_dark": true, + "license": "MIT", + "name": "Doom One", + "num_settings": 28 + }, + { + "author": "Henrik Lissner ", + "blurb": "Doom Emacs flagship theme based on atom One Light", + "file": "themes/Doom_One_Light.conf", + "license": "MIT", + "name": "Doom One Light", + "num_settings": 28 + }, + { + "author": "Henrik Lissner ", + "blurb": "A version of Doom One Emacs theme that uses more vibrant colors.", + "file": "themes/Doom_Vibrant.conf", + "is_dark": true, + "license": "MIT", + "name": "Doom Vibrant", + "num_settings": 28 + }, + { + "file": "themes/DotGov.conf", + "is_dark": true, + "name": "Dot Gov", + "num_settings": 21 + }, + { + "author": "Keegan Carruthers-Smith", + "file": "themes/Dracula.conf", + "is_dark": true, + "license": "MIT", + "name": "Dracula", + "num_settings": 29, + "upstream": "https://raw.githubusercontent.com/dracula/kitty/master/dracula.conf" + }, + { + "file": "themes/Dumbledore.conf", + "is_dark": true, + "name": "Dumbledore", + "num_settings": 21 + }, + { + "file": "themes/Duotone_Dark.conf", + "is_dark": true, + "name": "Duotone Dark", + "num_settings": 21 + }, + { + "file": "themes/Earthsong.conf", + "is_dark": true, + "name": "Earthsong", + "num_settings": 21 + }, + { + "file": "themes/Elemental.conf", + "is_dark": true, + "name": "Elemental", + "num_settings": 21 + }, + { + "file": "themes/ENCOM.conf", + "is_dark": true, + "name": "Encom", + "num_settings": 21 + }, + { + "file": "themes/Espresso.conf", + "is_dark": true, + "name": "Espresso", + "num_settings": 25 + }, + { + "file": "themes/Espresso_Libre.conf", + "is_dark": true, + "name": "Espresso Libre", + "num_settings": 21 + }, + { + "blurb": "Dark (hard) theme based on https://github.com/sainnhe/everforest for Vim.", + "file": "themes/everforest_dark_hard.conf", + "is_dark": true, + "license": "MIT", + "name": "Everforest Dark Hard", + "num_settings": 41, + "upstream": "https://github.com/ewal/kitty-everforest/blob/master/themes/everforest_dark_hard.conf" + }, + { + "blurb": "Dark (medium) theme based on https://github.com/sainnhe/everforest for Vim.", + "file": "themes/everforest_dark_medium.conf", + "is_dark": true, + "license": "MIT", + "name": "Everforest Dark Medium", + "num_settings": 41, + "upstream": "https://github.com/ewal/kitty-everforest/blob/master/themes/everforest_dark_medium.conf" + }, + { + "blurb": "Dark (soft) theme based on https://github.com/sainnhe/everforest for Vim.", + "file": "themes/everforest_dark_soft.conf", + "is_dark": true, + "license": "MIT", + "name": "Everforest Dark Soft", + "num_settings": 41, + "upstream": "https://github.com/ewal/kitty-everforest/blob/master/themes/everforest_dark_soft.conf" + }, + { + "blurb": "Light (hard) theme based on https://github.com/sainnhe/everforest for Vim.", + "file": "themes/everforest_light_hard.conf", + "license": "MIT", + "name": "Everforest Light Hard", + "num_settings": 41, + "upstream": "https://github.com/ewal/kitty-everforest/blob/master/themes/everforest_light_hard.conf" + }, + { + "blurb": "Light (medium) theme based on https://github.com/sainnhe/everforest for Vim.", + "file": "themes/everforest_light_medium.conf", + "license": "MIT", + "name": "Everforest Light Medium", + "num_settings": 41, + "upstream": "https://github.com/ewal/kitty-everforest/blob/master/themes/everforest_light_medium.conf" + }, + { + "blurb": "Light (soft) theme based on https://github.com/sainnhe/everforest for Vim.", + "file": "themes/everforest_light_soft.conf", + "license": "MIT", + "name": "Everforest Light Soft", + "num_settings": 41, + "upstream": "https://github.com/ewal/kitty-everforest/blob/master/themes/everforest_light_soft.conf" + }, + { + "file": "themes/Falcon.conf", + "is_dark": true, + "name": "Falcon", + "num_settings": 21 + }, + { + "file": "themes/Farin.conf", + "is_dark": true, + "name": "Farin", + "num_settings": 21 + }, + { + "file": "themes/Fideloper.conf", + "is_dark": true, + "name": "Fideloper", + "num_settings": 21 + }, + { + "file": "themes/FishTank.conf", + "is_dark": true, + "name": "Fish Tank", + "num_settings": 21 + }, + { + "file": "themes/Flat.conf", + "is_dark": true, + "name": "Flat", + "num_settings": 21 + }, + { + "file": "themes/Flatland.conf", + "is_dark": true, + "name": "Flatland", + "num_settings": 21 + }, + { + "file": "themes/Floraverse.conf", + "is_dark": true, + "name": "Floraverse", + "num_settings": 21 + }, + { + "file": "themes/ForestNight.conf", + "is_dark": true, + "name": "Forest Night", + "num_settings": 18 + }, + { + "file": "themes/FrontEndDelight.conf", + "is_dark": true, + "name": "Front End Delight", + "num_settings": 21 + }, + { + "file": "themes/FunForrest.conf", + "is_dark": true, + "name": "Fun Forrest", + "num_settings": 21 + }, + { + "file": "themes/Galaxy.conf", + "is_dark": true, + "name": "Galaxy", + "num_settings": 21 + }, + { + "file": "themes/Github.conf", + "name": "Github", + "num_settings": 21 + }, + { + "file": "themes/Glacier.conf", + "is_dark": true, + "name": "Glacier", + "num_settings": 21 + }, + { + "file": "themes/GoaBase.conf", + "is_dark": true, + "name": "Goa Base", + "num_settings": 21 + }, + { + "file": "themes/Grape.conf", + "is_dark": true, + "name": "Grape", + "num_settings": 21 + }, + { + "file": "themes/Grass.conf", + "name": "Grass", + "num_settings": 21 + }, + { + "author": "Pavel Pertsev", + "file": "themes/gruvbox-dark.conf", + "is_dark": true, + "license": "MIT/X11", + "name": "Gruvbox Dark", + "num_settings": 23, + "upstream": "https://raw.githubusercontent.com/gruvbox-community/gruvbox-contrib/master/kitty/gruvbox-dark.conf" + }, + { + "author": "Pavel Pertsev", + "file": "themes/gruvbox-dark-hard.conf", + "is_dark": true, + "license": "MIT/X11", + "name": "Gruvbox Dark Hard", + "num_settings": 23, + "upstream": "https://raw.githubusercontent.com/gruvbox-community/gruvbox-contrib/master/kitty/gruvbox-dark-hard.conf" + }, + { + "author": "Pavel Pertsev", + "file": "themes/gruvbox-dark-soft.conf", + "is_dark": true, + "license": "MIT/X11", + "name": "Gruvbox Dark Soft", + "num_settings": 23, + "upstream": "https://raw.githubusercontent.com/gruvbox-community/gruvbox-contrib/master/kitty/gruvbox-dark-soft.conf" + }, + { + "author": "Pavel Pertsev", + "file": "themes/gruvbox-light.conf", + "license": "MIT/X11", + "name": "Gruvbox Light", + "num_settings": 23, + "upstream": "https://raw.githubusercontent.com/gruvbox-community/gruvbox-contrib/master/kitty/gruvbox-light.conf" + }, + { + "author": "Pavel Pertsev", + "file": "themes/gruvbox-light-hard.conf", + "license": "MIT/X11", + "name": "Gruvbox Light Hard", + "num_settings": 23, + "upstream": "https://raw.githubusercontent.com/gruvbox-community/gruvbox-contrib/master/kitty/gruvbox-light-hard.conf" + }, + { + "author": "Pavel Pertsev", + "file": "themes/gruvbox-light-soft.conf", + "license": "MIT/X11", + "name": "Gruvbox Light Soft", + "num_settings": 23, + "upstream": "https://raw.githubusercontent.com/gruvbox-community/gruvbox-contrib/master/kitty/gruvbox-light-soft.conf" + }, + { + "file": "themes/GruvboxMaterialDarkHard.conf", + "is_dark": true, + "name": "Gruvbox Material Dark Hard", + "num_settings": 26 + }, + { + "file": "themes/GruvboxMaterialDarkMedium.conf", + "is_dark": true, + "name": "Gruvbox Material Dark Medium", + "num_settings": 26 + }, + { + "file": "themes/GruvboxMaterialDarkSoft.conf", + "is_dark": true, + "name": "Gruvbox Material Dark Soft", + "num_settings": 26 + }, + { + "file": "themes/GruvboxMaterialLightHard.conf", + "name": "Gruvbox Material Light Hard", + "num_settings": 26 + }, + { + "file": "themes/GruvboxMaterialLightMedium.conf", + "name": "Gruvbox Material Light Medium", + "num_settings": 26 + }, + { + "file": "themes/GruvboxMaterialLightSoft.conf", + "name": "Gruvbox Material Light Soft", + "num_settings": 26 + }, + { + "author": "Mert18", + "file": "themes/HachikoRed.conf", + "is_dark": true, + "name": "Hachiko", + "num_settings": 33 + }, + { + "file": "themes/Hardcore.conf", + "is_dark": true, + "name": "Hardcore", + "num_settings": 21 + }, + { + "file": "themes/Harper.conf", + "is_dark": true, + "name": "Harper", + "num_settings": 21 + }, + { + "file": "themes/Highway.conf", + "is_dark": true, + "name": "Highway", + "num_settings": 21 + }, + { + "file": "themes/Hipster_Green.conf", + "is_dark": true, + "name": "Hipster Green", + "num_settings": 21 + }, + { + "file": "themes/Homebrew.conf", + "is_dark": true, + "name": "Homebrew", + "num_settings": 21 + }, + { + "file": "themes/Hurtado.conf", + "is_dark": true, + "name": "Hurtado", + "num_settings": 21 + }, + { + "file": "themes/Hybrid.conf", + "is_dark": true, + "name": "Hybrid", + "num_settings": 21 + }, + { + "file": "themes/IC_Green_PPL.conf", + "is_dark": true, + "name": "Ic Green Ppl", + "num_settings": 21 + }, + { + "file": "themes/IC_Orange_PPL.conf", + "is_dark": true, + "name": "Ic Orange Ppl", + "num_settings": 21 + }, + { + "file": "themes/idleToes.conf", + "is_dark": true, + "name": "Idle Toes", + "num_settings": 21 + }, + { + "file": "themes/IR_Black.conf", + "is_dark": true, + "name": "Ir Black", + "num_settings": 21 + }, + { + "file": "themes/Jackie_Brown.conf", + "is_dark": true, + "name": "Jackie Brown", + "num_settings": 21 + }, + { + "file": "themes/Japanesque.conf", + "is_dark": true, + "name": "Japanesque", + "num_settings": 21 + }, + { + "file": "themes/Jellybeans.conf", + "is_dark": true, + "name": "Jellybeans", + "num_settings": 21 + }, + { + "file": "themes/JetBrains_Darcula.conf", + "is_dark": true, + "name": "Jet Brains Darcula", + "num_settings": 21 + }, + { + "author": "Ogden Webb", + "blurb": "Kaolin meets polar lights.", + "file": "themes/Kaolin_Aurora.conf", + "is_dark": true, + "license": "GNU GPLv3", + "name": "Kaolin Aurora", + "num_settings": 28 + }, + { + "author": "Ogden Webb", + "blurb": "Light Kaolin theme with soft colors", + "file": "themes/Kaolin_Breeze.conf", + "license": "GNU GPLv3", + "name": "Kaolin Breeze", + "num_settings": 28 + }, + { + "author": "Ogden Webb", + "blurb": "Dark jade theme inspired by Sierra.vim.", + "file": "themes/Kaolin_Dark.conf", + "is_dark": true, + "license": "GNU GPLv3", + "name": "Kaolin Dark", + "num_settings": 28 + }, + { + "author": "Ogden Webb", + "blurb": "Theme based on one of the Sebastian Andaur arts", + "file": "themes/Kaolin_Galaxy.conf", + "is_dark": true, + "license": "GNU GPLv3", + "name": "Kaolin Galaxy", + "num_settings": 28 + }, + { + "author": "Ogden Webb", + "blurb": "Light variant of the original Kaolin Dark theme.", + "file": "themes/Kaolin_Light.conf", + "license": "GNU GPLv3", + "name": "Kaolin Light", + "num_settings": 28 + }, + { + "author": "Ogden Webb", + "blurb": "Dark blue Kaolin theme", + "file": "themes/Kaolin_Ocean.conf", + "is_dark": true, + "license": "GNU GPLv3", + "name": "Kaolin Ocean", + "num_settings": 28 + }, + { + "author": "Ogden Webb", + "blurb": "Dark theme where terrestrial sphere imbues the spirit", + "file": "themes/Kaolin_Temple.conf", + "is_dark": true, + "license": "GNU GPLv3", + "name": "Kaolin Temple", + "num_settings": 28 + }, + { + "file": "themes/Kibble.conf", + "is_dark": true, + "name": "Kibble", + "num_settings": 21 + }, + { + "file": "themes/Later_This_Evening.conf", + "is_dark": true, + "name": "Later This Evening", + "num_settings": 21 + }, + { + "file": "themes/Lavandula.conf", + "is_dark": true, + "name": "Lavandula", + "num_settings": 21 + }, + { + "file": "themes/LiquidCarbon.conf", + "is_dark": true, + "name": "Liquid Carbon", + "num_settings": 21 + }, + { + "file": "themes/LiquidCarbonTransparent.conf", + "is_dark": true, + "name": "Liquid Carbon Transparent", + "num_settings": 21 + }, + { + "file": "themes/LiquidCarbonTransparentInverse.conf", + "is_dark": true, + "name": "Liquid Carbon Transparent Inverse", + "num_settings": 21 + }, + { + "file": "themes/Man_Page.conf", + "name": "Man Page", + "num_settings": 21 + }, + { + "file": "themes/Material.conf", + "name": "Material", + "num_settings": 21 + }, + { + "file": "themes/MaterialDark.conf", + "is_dark": true, + "name": "Material Dark", + "num_settings": 21 + }, + { + "file": "themes/Mathias.conf", + "is_dark": true, + "name": "Mathias", + "num_settings": 21 + }, + { + "author": "Gulajava Ministudio", + "blurb": "Mayukai Theme is dark and yellow bluish mirage theme with bright colors for easy readibility syntax. This theme is inspired from mixed color swatch in Ayu Theme, Material Theme, Monokai, Andromeda, and Gruvbox Darktooth Original Colors.", + "file": "themes/mayukai.conf", + "is_dark": true, + "license": "MIT", + "name": "Mayukai", + "num_settings": 18, + "upstream": "https://github.com/elianiva/mayukai-terminal-themes/blob/master/kitty.conf" + }, + { + "file": "themes/Medallion.conf", + "is_dark": true, + "name": "Medallion", + "num_settings": 21 + }, + { + "file": "themes/Misterioso.conf", + "is_dark": true, + "name": "Misterioso", + "num_settings": 21 + }, + { + "author": "Protesilaos Stavrou", + "blurb": "Highly accessible themes made for GNU Emacs, conforming with the highest standard for colour contrast between background and foreground values (WCAG AAA)", + "file": "themes/Modus_Operandi.conf", + "license": "GNU GPLv3", + "name": "Modus Operandi", + "num_settings": 28 + }, + { + "author": "Protesilaos Stavrou", + "blurb": "Highly accessible themes made for GNU Emacs, version with less contrast", + "file": "themes/Modus_Operandi_Faint.conf", + "license": "GNU GPLv3", + "name": "Modus Operandi Faint", + "num_settings": 28 + }, + { + "author": "Protesilaos Stavrou", + "blurb": "Highly accessible themes made for GNU Emacs, conforming with the highest standard for colour contrast between background and foreground values (WCAG AAA)", + "file": "themes/Modus_Vivendi.conf", + "is_dark": true, + "license": "GNU GPLv3", + "name": "Modus Vivendi", + "num_settings": 28 + }, + { + "author": "Protesilaos Stavrou", + "blurb": "Highly accessible themes made for GNU Emacs, version with less contrast", + "file": "themes/Modus_Vivendi_Faint.conf", + "is_dark": true, + "license": "GNU GPLv3", + "name": "Modus Vivendi Faint", + "num_settings": 28 + }, + { + "file": "themes/Molokai.conf", + "is_dark": true, + "name": "Molokai", + "num_settings": 21 + }, + { + "file": "themes/MonaLisa.conf", + "is_dark": true, + "name": "Mona Lisa", + "num_settings": 21 + }, + { + "file": "themes/Monokai.conf", + "is_dark": true, + "name": "Monokai", + "num_settings": 28 + }, + { + "file": "themes/Monokai_Classic.conf", + "is_dark": true, + "name": "Monokai Classic", + "num_settings": 22 + }, + { + "file": "themes/Monokai_Pro.conf", + "is_dark": true, + "name": "Monokai Pro", + "num_settings": 22 + }, + { + "file": "themes/Monokai_Pro_(Filter_Machine).conf", + "is_dark": true, + "name": "Monokai Pro (filter Machine)", + "num_settings": 22 + }, + { + "file": "themes/Monokai_Pro_(Filter_Octagon).conf", + "is_dark": true, + "name": "Monokai Pro (filter Octagon)", + "num_settings": 22 + }, + { + "file": "themes/Monokai_Pro_(Filter_Ristretto).conf", + "is_dark": true, + "name": "Monokai Pro (filter Ristretto)", + "num_settings": 22 + }, + { + "file": "themes/Monokai_Pro_(Filter_Spectrum).conf", + "is_dark": true, + "name": "Monokai Pro (filter Spectrum)", + "num_settings": 22 + }, + { + "file": "themes/Monokai_Soda.conf", + "is_dark": true, + "name": "Monokai Soda", + "num_settings": 21 + }, + { + "file": "themes/N0tch2k.conf", + "is_dark": true, + "name": "N0tch2k", + "num_settings": 21 + }, + { + "file": "themes/Neopolitan.conf", + "is_dark": true, + "name": "Neopolitan", + "num_settings": 21 + }, + { + "file": "themes/Neutron.conf", + "is_dark": true, + "name": "Neutron", + "num_settings": 21 + }, + { + "file": "themes/NightLion_v1.conf", + "is_dark": true, + "name": "Night Lion V1", + "num_settings": 21 + }, + { + "file": "themes/NightLion_v2.conf", + "is_dark": true, + "name": "Night Lion V2", + "num_settings": 21 + }, + { + "file": "themes/nightfly.conf", + "is_dark": true, + "license": "MIT", + "name": "Nightfly", + "num_settings": 21, + "upstream": "https://github.com/bluz71/vim-nightfly-guicolors/blob/master/terminal_themes/kitty-theme.conf" + }, + { + "author": "Connor Holyday", + "blurb": "An arctic, north-bluish clean and elegant Kitty theme.", + "file": "themes/Nord.conf", + "is_dark": true, + "license": "MIT", + "name": "Nord", + "num_settings": 22, + "upstream": "https://raw.githubusercontent.com/connorholyday/nord-kitty/master/nord.conf" + }, + { + "file": "themes/Nova.conf", + "is_dark": true, + "name": "Nova", + "num_settings": 21 + }, + { + "file": "themes/Novel.conf", + "name": "Novel", + "num_settings": 21 + }, + { + "file": "themes/Obsidian.conf", + "is_dark": true, + "name": "Obsidian", + "num_settings": 21 + }, + { + "file": "themes/Ocean.conf", + "name": "Ocean", + "num_settings": 21 + }, + { + "file": "themes/OceanicMaterial.conf", + "is_dark": true, + "name": "Oceanic Material", + "num_settings": 21 + }, + { + "file": "themes/Ollie.conf", + "is_dark": true, + "name": "Ollie", + "num_settings": 21 + }, + { + "file": "themes/OneDark.conf", + "is_dark": true, + "name": "One Dark", + "num_settings": 22 + }, + { + "file": "themes/OneHalf.conf", + "is_dark": true, + "name": "One Half", + "num_settings": 21 + }, + { + "file": "themes/OneHalfLight.conf", + "name": "One Half Light", + "num_settings": 22 + }, + { + "author": "Nikyle Nguyen", + "blurb": "Dark color scheme inspired by Google's Material Design", + "file": "themes/PaperColor_dark.conf", + "is_dark": true, + "license": "[MIT License](https://opensource.org/licenses/MIT)", + "name": "PaperColor Dark", + "num_settings": 20 + }, + { + "author": "Nikyle Nguyen", + "blurb": "Light color scheme inspired by Google's Material Design", + "file": "themes/PaperColor_light.conf", + "license": "[MIT License](https://opensource.org/licenses/MIT)", + "name": "PaperColor Light", + "num_settings": 20 + }, + { + "file": "themes/Parasio_Dark.conf", + "is_dark": true, + "name": "Parasio Dark", + "num_settings": 21 + }, + { + "file": "themes/PaulMillr.conf", + "is_dark": true, + "name": "Paul Millr", + "num_settings": 21 + }, + { + "file": "themes/PencilDark.conf", + "is_dark": true, + "name": "Pencil Dark", + "num_settings": 21 + }, + { + "file": "themes/PencilLight.conf", + "name": "Pencil Light", + "num_settings": 21 + }, + { + "file": "themes/Piatto_Light.conf", + "name": "Piatto Light", + "num_settings": 21 + }, + { + "file": "themes/Pnevma.conf", + "is_dark": true, + "name": "Pnevma", + "num_settings": 21 + }, + { + "file": "themes/Pro.conf", + "is_dark": true, + "name": "Pro", + "num_settings": 21 + }, + { + "file": "themes/Red_Alert.conf", + "name": "Red Alert", + "num_settings": 21 + }, + { + "file": "themes/Red_Sands.conf", + "name": "Red Sands", + "num_settings": 21 + }, + { + "file": "themes/Relaxed_Afterglow.conf", + "is_dark": true, + "name": "Relaxed Afterglow", + "num_settings": 21 + }, + { + "file": "themes/Renault_Style.conf", + "is_dark": true, + "name": "Renault Style", + "num_settings": 21 + }, + { + "file": "themes/Renault_Style_Light.conf", + "is_dark": true, + "name": "Renault Style Light", + "num_settings": 21 + }, + { + "file": "themes/Rippedcasts.conf", + "is_dark": true, + "name": "Rippedcasts", + "num_settings": 21 + }, + { + "author": "mvllow", + "blurb": "All natural pine, faux fur and a bit of soho vibes for the classy minimalist", + "file": "themes/rose-pine.conf", + "is_dark": true, + "license": "MIT", + "name": "Ros\u00e9 Pine", + "num_settings": 27, + "upstream": "https://github.com/rose-pine/kitty/blob/main/dist/rose-pine.conf" + }, + { + "author": "mvllow", + "blurb": "All natural pine, faux fur and a bit of soho vibes for the classy minimalist", + "file": "themes/rose-pine-dawn.conf", + "license": "MIT", + "name": "Ros\u00e9 Pine Dawn", + "num_settings": 27, + "upstream": "https://github.com/rose-pine/kitty/blob/main/dist/rose-pine-dawn.conf" + }, + { + "author": "mvllow", + "blurb": "All natural pine, faux fur and a bit of soho vibes for the classy minimalist", + "file": "themes/rose-pine-moon.conf", + "is_dark": true, + "license": "MIT", + "name": "Ros\u00e9 Pine Moon", + "num_settings": 27, + "upstream": "https://github.com/rose-pine/kitty/blob/main/dist/rose-pine-moon.conf" + }, + { + "file": "themes/Royal.conf", + "is_dark": true, + "name": "Royal", + "num_settings": 21 + }, + { + "author": "PandaCatPlayz", + "blurb": "A custom kitty dark theme loosely using the Endesga 32 palette", + "file": "themes/Sakura_Night.conf", + "is_dark": true, + "license": "MIT", + "name": "Sakura Night", + "num_settings": 21, + "upstream": "https://pandacatplayz.github.io/kitty-themes/Sakura_Night.conf" + }, + { + "file": "themes/SeaShells.conf", + "is_dark": true, + "name": "Sea Shells", + "num_settings": 21 + }, + { + "file": "themes/Seafoam_Pastel.conf", + "is_dark": true, + "name": "Seafoam Pastel", + "num_settings": 21 + }, + { + "file": "themes/Seti.conf", + "is_dark": true, + "name": "Seti", + "num_settings": 21 + }, + { + "file": "themes/Shaman.conf", + "is_dark": true, + "name": "Shaman", + "num_settings": 21 + }, + { + "file": "themes/Sierra.conf", + "is_dark": true, + "name": "Sierra", + "num_settings": 21 + }, + { + "file": "themes/Slate.conf", + "is_dark": true, + "name": "Slate", + "num_settings": 21 + }, + { + "file": "themes/Smyck.conf", + "is_dark": true, + "name": "Smyck", + "num_settings": 21 + }, + { + "file": "themes/snazzy.conf", + "is_dark": true, + "name": "Snazzy", + "num_settings": 23 + }, + { + "file": "themes/SnowDark.conf", + "is_dark": true, + "name": "Snow Dark", + "num_settings": 22 + }, + { + "file": "themes/SnowLight.conf", + "name": "Snow Light", + "num_settings": 22 + }, + { + "file": "themes/SoftServer.conf", + "is_dark": true, + "name": "Soft Server", + "num_settings": 21 + }, + { + "file": "themes/Solarized_Darcula.conf", + "is_dark": true, + "name": "Solarized Darcula", + "num_settings": 21 + }, + { + "author": "Ethan Schoonover", + "blurb": "Precision colors for machines and people", + "file": "themes/Solarized_Dark.conf", + "is_dark": true, + "license": "MIT", + "name": "Solarized Dark", + "num_settings": 21 + }, + { + "file": "themes/Solarized_Dark_-_Patched.conf", + "is_dark": true, + "name": "Solarized Dark - Patched", + "num_settings": 21 + }, + { + "file": "themes/Solarized_Dark_Higher_Contrast.conf", + "is_dark": true, + "name": "Solarized Dark Higher Contrast", + "num_settings": 21 + }, + { + "author": "Ethan Schoonover", + "blurb": "Precision colors for machines and people", + "file": "themes/Solarized_Light.conf", + "license": "MIT", + "name": "Solarized Light", + "num_settings": 28 + }, + { + "file": "themes/Solarized8_Dark.conf", + "is_dark": true, + "name": "Solarized8 Dark", + "num_settings": 21 + }, + { + "file": "themes/Source_Code_X.conf", + "is_dark": true, + "name": "Source Code X", + "num_settings": 21 + }, + { + "file": "themes/Sourcerer.conf", + "is_dark": true, + "name": "Sourcerer", + "num_settings": 21 + }, + { + "file": "themes/SpaceGray.conf", + "is_dark": true, + "name": "Space Gray", + "num_settings": 21 + }, + { + "file": "themes/SpaceGray_Eighties.conf", + "is_dark": true, + "name": "Space Gray Eighties", + "num_settings": 21 + }, + { + "file": "themes/SpaceGray_Eighties_Dull.conf", + "is_dark": true, + "name": "Space Gray Eighties Dull", + "num_settings": 21 + }, + { + "file": "themes/Spacedust.conf", + "is_dark": true, + "name": "Spacedust", + "num_settings": 21 + }, + { + "file": "themes/Spacemacs.conf", + "is_dark": true, + "name": "Spacemacs", + "num_settings": 20 + }, + { + "file": "themes/Spiderman.conf", + "is_dark": true, + "name": "Spiderman", + "num_settings": 21 + }, + { + "file": "themes/Spring.conf", + "name": "Spring", + "num_settings": 21 + }, + { + "file": "themes/Square.conf", + "is_dark": true, + "name": "Square", + "num_settings": 21 + }, + { + "file": "themes/Srcery.conf", + "is_dark": true, + "name": "Srcery", + "num_settings": 21 + }, + { + "file": "themes/Substrata.conf", + "is_dark": true, + "name": "Substrata", + "num_settings": 21 + }, + { + "file": "themes/Sundried.conf", + "is_dark": true, + "name": "Sundried", + "num_settings": 21 + }, + { + "file": "themes/Symfonic.conf", + "is_dark": true, + "name": "Symfonic", + "num_settings": 21 + }, + { + "file": "themes/Tango_Dark.conf", + "is_dark": true, + "name": "Tango Dark", + "num_settings": 21 + }, + { + "file": "themes/Tango_Light.conf", + "name": "Tango Light", + "num_settings": 21 + }, + { + "file": "themes/Teerb.conf", + "is_dark": true, + "name": "Teerb", + "num_settings": 21 + }, + { + "file": "themes/Thayer_Bright.conf", + "is_dark": true, + "name": "Thayer Bright", + "num_settings": 21 + }, + { + "file": "themes/The_Hulk.conf", + "is_dark": true, + "name": "The Hulk", + "num_settings": 21 + }, + { + "author": "Folke Lemaitre", + "file": "themes/tokyo_night_night.conf", + "is_dark": true, + "license": "MIT", + "name": "Tokyo Night", + "num_settings": 28, + "upstream": "https://github.com/folke/tokyonight.nvim/raw/main/extras/kitty_tokyonight_night.conf" + }, + { + "author": "Folke Lemaitre", + "file": "themes/tokyo_night_day.conf", + "license": "MIT", + "name": "Tokyo Night Day", + "num_settings": 28, + "upstream": "https://github.com/folke/tokyonight.nvim/raw/main/extras/kitty_tokyonight_day.conf" + }, + { + "author": "Folke Lemaitre", + "file": "themes/tokyo_night_storm.conf", + "is_dark": true, + "license": "MIT", + "name": "Tokyo Night Storm", + "num_settings": 28, + "upstream": "https://github.com/folke/tokyonight.nvim/raw/main/extras/kitty_tokyonight_storm.conf" + }, + { + "file": "themes/Tomorrow.conf", + "name": "Tomorrow", + "num_settings": 21 + }, + { + "file": "themes/Tomorrow_Night.conf", + "is_dark": true, + "name": "Tomorrow Night", + "num_settings": 21 + }, + { + "file": "themes/Tomorrow_Night_Blue.conf", + "is_dark": true, + "name": "Tomorrow Night Blue", + "num_settings": 21 + }, + { + "file": "themes/Tomorrow_Night_Bright.conf", + "is_dark": true, + "name": "Tomorrow Night Bright", + "num_settings": 21 + }, + { + "file": "themes/Tomorrow_Night_Eighties.conf", + "is_dark": true, + "name": "Tomorrow Night Eighties", + "num_settings": 21 + }, + { + "file": "themes/ToyChest.conf", + "is_dark": true, + "name": "Toy Chest", + "num_settings": 21 + }, + { + "file": "themes/Treehouse.conf", + "is_dark": true, + "name": "Treehouse", + "num_settings": 21 + }, + { + "file": "themes/Twilight.conf", + "is_dark": true, + "name": "Twilight", + "num_settings": 21 + }, + { + "file": "themes/Ubuntu.conf", + "is_dark": true, + "name": "Ubuntu", + "num_settings": 21 + }, + { + "file": "themes/Urple.conf", + "is_dark": true, + "name": "Urple", + "num_settings": 21 + }, + { + "file": "themes/Vaughn.conf", + "is_dark": true, + "name": "Vaughn", + "num_settings": 21 + }, + { + "file": "themes/VibrantInk.conf", + "is_dark": true, + "name": "Vibrant Ink", + "num_settings": 21 + }, + { + "file": "themes/WarmNeon.conf", + "is_dark": true, + "name": "Warm Neon", + "num_settings": 21 + }, + { + "file": "themes/Wez.conf", + "is_dark": true, + "name": "Wez", + "num_settings": 21 + }, + { + "file": "themes/WildCherry.conf", + "is_dark": true, + "name": "Wild Cherry", + "num_settings": 21 + }, + { + "author": "erin", + "blurb": "A variant of Wryan for a certain special Lain", + "file": "themes/wizzy-bright.conf", + "is_dark": true, + "license": "MIT", + "name": "Wizzy Bright", + "num_settings": 26, + "upstream": "https://github.com/erincerys/kitty-themes/blob/master/themes/wizzy-bright.conf" + }, + { + "author": "erin", + "blurb": "A variant of Wryan for a certain special Lain", + "file": "themes/wizzy-muted.conf", + "is_dark": true, + "license": "MIT", + "name": "Wizzy Muted", + "num_settings": 26, + "upstream": "https://github.com/erincerys/kitty-themes/blob/master/themes/wizzy-muted.conf" + }, + { + "file": "themes/Wombat.conf", + "is_dark": true, + "name": "Wombat", + "num_settings": 21 + }, + { + "file": "themes/Wryan.conf", + "is_dark": true, + "name": "Wryan", + "num_settings": 21 + }, + { + "file": "themes/xcodedark.conf", + "is_dark": true, + "name": "Xcodedark", + "num_settings": 21 + }, + { + "author": "Ya-suke", + "blurb": "A dracula inspired colorscheme for kitty.", + "file": "themes/YsDark.conf", + "is_dark": true, + "license": "MIT", + "name": "YsDark", + "num_settings": 29 + }, + { + "file": "themes/Zenburn.conf", + "is_dark": true, + "name": "Zenburn", + "num_settings": 21 + }, + { + "author": "\u98df\u7121\u9b5a ", + "blurb": "Theme for Kitty inspired by https://citylights.xyz/", + "file": "themes/citylights.conf", + "is_dark": true, + "license": "MIT", + "name": "citylights", + "num_settings": 37, + "upstream": "https://raw.githubusercontent.com/liuyinz/dotfile/master/common/kitty/citylights.conf" + }, + { + "author": "Michael Chris Lopez", + "blurb": "A zenbones variant inspired by Spaceduck.", + "file": "themes/duckbones.conf", + "is_dark": true, + "license": "MIT", + "name": "duckbones", + "num_settings": 26, + "upstream": "https://github.com/mcchrish/zenbones.nvim/raw/main/extras/kitty/duckbones.conf" + }, + { + "author": "Snuggle \u00b7 https://github.com/Snuggle", + "blurb": "A theme inspired by the popular fairyfloss colour theme", + "file": "themes/fairyfloss.conf", + "license": "MIT", + "name": "fairyfloss", + "num_settings": 22, + "upstream": "https://github.com/Snuggle/kitty-themes" + }, + { + "author": "Michael Chris Lopez", + "blurb": "A zenbones variant inspired by Kanagawa.", + "file": "themes/kanagawabones.conf", + "is_dark": true, + "license": "MIT", + "name": "kanagawabones", + "num_settings": 26, + "upstream": "https://github.com/mcchrish/zenbones.nvim/raw/main/extras/kitty/kanagawabones.conf" + }, + { + "author": "Ramon Saraiva", + "blurb": "A port of moonlight vscode extension for kitty terminal", + "file": "themes/moonlight.conf", + "is_dark": true, + "license": "MIT License", + "name": "moonlight", + "num_settings": 29, + "upstream": "https://raw.githubusercontent.com/ramonsaraiva/kitty-moonlight/main/moonlight.conf" + }, + { + "author": "Michael Chris Lopez", + "blurb": "A zenbones variant inspired by neovim.io.", + "file": "themes/neobones_dark.conf", + "is_dark": true, + "license": "MIT", + "name": "neobones_dark", + "num_settings": 26, + "upstream": "https://github.com/mcchrish/zenbones.nvim/raw/main/extras/kitty/neobones_dark.conf" + }, + { + "author": "Michael Chris Lopez", + "blurb": "A zenbones variant inspired by neovim.io.", + "file": "themes/neobones_light.conf", + "license": "MIT", + "name": "neobones_light", + "num_settings": 26, + "upstream": "https://github.com/mcchrish/zenbones.nvim/raw/main/extras/kitty/neobones_light.conf" + }, + { + "author": "Michael Chris Lopez", + "blurb": "A zenbones variant inspired by Seoul256.", + "file": "themes/seoulbones_dark.conf", + "is_dark": true, + "license": "MIT", + "name": "seoulbones_dark", + "num_settings": 26, + "upstream": "https://github.com/mcchrish/zenbones.nvim/raw/main/extras/kitty/seoulbones_dark.conf" + }, + { + "author": "Michael Chris Lopez", + "blurb": "A zenbones variant inspired by Seoul256.", + "file": "themes/seoulbones_light.conf", + "license": "MIT", + "name": "seoulbones_light", + "num_settings": 26, + "upstream": "https://github.com/mcchrish/zenbones.nvim/raw/main/extras/kitty/seoulbones_light.conf" + }, + { + "author": "Michael Chris Lopez", + "blurb": "A zenbones variant inspired by vim.org.", + "file": "themes/vimbones.conf", + "license": "MIT", + "name": "vimbones", + "num_settings": 26, + "upstream": "https://github.com/mcchrish/zenbones.nvim/raw/main/extras/kitty/vimbones.conf" + }, + { + "author": "Michael Chris Lopez", + "blurb": "A contrast-based colorscheme.", + "file": "themes/zenbones_dark.conf", + "is_dark": true, + "license": "MIT", + "name": "zenbones_dark", + "num_settings": 26, + "upstream": "https://github.com/mcchrish/zenbones.nvim/raw/main/extras/kitty/zenbones_dark.conf" + }, + { + "author": "Michael Chris Lopez", + "blurb": "A contrast-based colorscheme.", + "file": "themes/zenbones_light.conf", + "license": "MIT", + "name": "zenbones_light", + "num_settings": 26, + "upstream": "https://github.com/mcchrish/zenbones.nvim/raw/main/extras/kitty/zenbones_light.conf" + }, + { + "author": "Michael Chris Lopez", + "blurb": "A zenbones variant inspired by Zenburn.", + "file": "themes/zenburned.conf", + "is_dark": true, + "license": "MIT", + "name": "zenburned", + "num_settings": 26, + "upstream": "https://github.com/mcchrish/zenbones.nvim/raw/main/extras/kitty/zenburned.conf" + }, + { + "author": "Michael Chris Lopez", + "blurb": "A zenbones variant with zero hue and saturation.", + "file": "themes/zenwritten_dark.conf", + "is_dark": true, + "license": "MIT", + "name": "zenwritten_dark", + "num_settings": 26, + "upstream": "https://github.com/mcchrish/zenbones.nvim/raw/main/extras/kitty/zenwritten_dark.conf" + }, + { + "author": "Michael Chris Lopez", + "blurb": "A zenbones variant with zero hue and saturation.", + "file": "themes/zenwritten_light.conf", + "license": "MIT", + "name": "zenwritten_light", + "num_settings": 26, + "upstream": "https://github.com/mcchrish/zenbones.nvim/raw/main/extras/kitty/zenwritten_light.conf" + } +] \ No newline at end of file diff --git a/.config/kitty/kitty-themes/themes/1984_dark.conf b/.config/kitty/kitty-themes/themes/1984_dark.conf new file mode 100755 index 0000000..f0fca77 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/1984_dark.conf @@ -0,0 +1,29 @@ +# 1984 theme by Bertie Blackman, https://github.com/covertbert/iterm2-1984/ + +foreground #ffffff +background #0d0f31 +selection_foreground #000000 +selection_background #00d5eb +color0 #000000 +color1 #ff16b0 +color2 #b3f361 +color3 #ffea16 +color4 #46bdff +color5 #f806fa +color6 #59e1e3 +color7 #feffff +color8 #000000 +color9 #ff16b0 +color10 #b3f361 +color11 #ffea16 +color12 #46bdff +color13 #f806fa +color14 #6be4e6 +color15 #feffff + +# URL styles +url_color #f806fa +url_style single + +# Cursor styles +cursor #59e1e3 diff --git a/.config/kitty/kitty-themes/themes/1984_light.conf b/.config/kitty/kitty-themes/themes/1984_light.conf new file mode 100755 index 0000000..f85d075 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/1984_light.conf @@ -0,0 +1,29 @@ +# 1984 light theme by Bertie Blackman, https://github.com/covertbert/iterm2-1984/ + +foreground #19152c +background #e4e5f5 +selection_foreground #19152c +selection_background #ff16b0 +color0 #000000 +color1 #ff16b0 +color2 #00af4f +color3 #ff8d01 +color4 #0098fd +color5 #f806fa +color6 #00b2be +color7 #feffff +color8 #000000 +color9 #ff16b0 +color10 #00af4f +color11 #ff8d01 +color12 #0098fd +color13 #f806fa +color14 #00b2be +color15 #feffff + +# URL styles +url_color #ff16b0 +url_style single + +# Cursor styles +cursor #00b2be diff --git a/.config/kitty/kitty-themes/themes/1984_orwellian.conf b/.config/kitty/kitty-themes/themes/1984_orwellian.conf new file mode 100755 index 0000000..121fdc3 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/1984_orwellian.conf @@ -0,0 +1,29 @@ +# 1984 orwellian theme by Bertie Blackman, https://github.com/covertbert/iterm2-1984/ + +foreground #f1f1f1 +background #2e2923 +selection_foreground #000000 +selection_background #3fc4ce +color0 #000000 +color1 #e74946 +color2 #4cb605 +color3 #fcd395 +color4 #356fe4 +color5 #fcbe95 +color6 #3fc4ce +color7 #f1f1f1 +color8 #000000 +color9 #e74946 +color10 #4cb605 +color11 #fcd395 +color12 #356fe4 +color13 #fcbe95 +color14 #3fc4ce +color15 #f1f1f1 + +# URL styles +url_color #e74946 +url_style single + +# Cursor styles +cursor #3fc4ce diff --git a/.config/kitty/kitty-themes/themes/3024_Day.conf b/.config/kitty/kitty-themes/themes/3024_Day.conf new file mode 100755 index 0000000..747996a --- /dev/null +++ b/.config/kitty/kitty-themes/themes/3024_Day.conf @@ -0,0 +1,21 @@ +background #f7f7f7 +foreground #494542 +cursor #494542 +selection_background #a4a1a1 +color0 #090200 +color8 #5b5754 +color1 #da2c20 +color9 #e8bacf +color2 #00a152 +color10 #3a3332 +color3 #fcec02 +color11 #494542 +color4 #00a0e4 +color12 #7f7c7b +color5 #a06994 +color13 #d6d4d3 +color6 #b5e4f4 +color14 #ccab53 +color7 #a4a1a1 +color15 #f7f7f7 +selection_foreground #f7f7f7 diff --git a/.config/kitty/kitty-themes/themes/3024_Night.conf b/.config/kitty/kitty-themes/themes/3024_Night.conf new file mode 100755 index 0000000..2543819 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/3024_Night.conf @@ -0,0 +1,21 @@ +background #090200 +foreground #a4a1a1 +cursor #a4a1a1 +selection_background #494542 +color0 #090200 +color8 #5b5754 +color1 #da2c20 +color9 #e8bacf +color2 #00a152 +color10 #3a3332 +color3 #fcec02 +color11 #494542 +color4 #00a0e4 +color12 #7f7c7b +color5 #a06994 +color13 #d6d4d3 +color6 #b5e4f4 +color14 #ccab53 +color7 #a4a1a1 +color15 #f7f7f7 +selection_foreground #090200 diff --git a/.config/kitty/kitty-themes/themes/AdventureTime.conf b/.config/kitty/kitty-themes/themes/AdventureTime.conf new file mode 100755 index 0000000..e523a1a --- /dev/null +++ b/.config/kitty/kitty-themes/themes/AdventureTime.conf @@ -0,0 +1,21 @@ +background #1e1c44 +foreground #f8dbc0 +cursor #eebf37 +selection_background #6f6a4e +color0 #050404 +color8 #4e7bbf +color1 #bc0013 +color9 #fc5e59 +color2 #49b117 +color10 #9dff6e +color3 #e6741d +color11 #efc11a +color4 #0f49c6 +color12 #1896c6 +color5 #665992 +color13 #9a5952 +color6 #6fa497 +color14 #c8f9f3 +color7 #f8dbc0 +color15 #f5f4fb +selection_foreground #1e1c44 diff --git a/.config/kitty/kitty-themes/themes/Afterglow.conf b/.config/kitty/kitty-themes/themes/Afterglow.conf new file mode 100755 index 0000000..3162be7 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Afterglow.conf @@ -0,0 +1,21 @@ +background #202020 +foreground #d0d0d0 +cursor #d0d0d0 +selection_background #eecb8b +color0 #151515 +color8 #505050 +color1 #ac4142 +color9 #ac4142 +color2 #7e8d50 +color10 #7e8d50 +color3 #e5b566 +color11 #e5b566 +color4 #6c99ba +color12 #6c99ba +color5 #9e4e85 +color13 #9e4e85 +color6 #7dd5cf +color14 #7dd5cf +color7 #d0d0d0 +color15 #f5f5f5 +selection_foreground #232323 diff --git a/.config/kitty/kitty-themes/themes/AlienBlood.conf b/.config/kitty/kitty-themes/themes/AlienBlood.conf new file mode 100755 index 0000000..453ea80 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/AlienBlood.conf @@ -0,0 +1,21 @@ +background #0f160f +foreground #637d75 +cursor #73f990 +selection_background #1d4025 +color0 #112615 +color8 #3c4711 +color1 #7f2b26 +color9 #df8008 +color2 #2f7e25 +color10 #18e000 +color3 #707f23 +color11 #bde000 +color4 #2f697f +color12 #00a9df +color5 #47577e +color13 #0058df +color6 #317f76 +color14 #00dfc3 +color7 #647d75 +color15 #73f990 +selection_foreground #0f160f diff --git a/.config/kitty/kitty-themes/themes/Alucard.conf b/.config/kitty/kitty-themes/themes/Alucard.conf new file mode 100755 index 0000000..43665fe --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Alucard.conf @@ -0,0 +1,21 @@ +background #222330 +foreground #cef3ff +cursor #ffffff +selection_background #44475a +color0 #000000 +color8 #545454 +color1 #ff5555 +color9 #ff5454 +color2 #fa0074 +color10 #50fa7b +color3 #7f0a1f +color11 #f0fa8b +color4 #3282ff +color12 #1200f8 +color5 #1b3cff +color13 #ff78c5 +color6 #0037fc +color14 #8ae9fc +color7 #bbbbbb +color15 #ffffff +selection_foreground #222330 diff --git a/.config/kitty/kitty-themes/themes/Apprentice.conf b/.config/kitty/kitty-themes/themes/Apprentice.conf new file mode 100755 index 0000000..c8c0583 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Apprentice.conf @@ -0,0 +1,26 @@ +# Apprentice by Romain Lafourcade, https://github.com/romainl +# This work is licensed under the terms of the MIT license. +# For a copy, see https://opensource.org/licenses/MIT. + +cursor #c7c7c7 +cursor_text_color #feffff +selection_foreground #3e3e3e +selection_background #c1ddff +foreground #c8c8c8 +background #323232 +color0 #252525 +color8 #555555 +color1 #be7472 +color9 #ff9900 +color2 #709772 +color10 #97bb98 +color3 #989772 +color11 #fefdbc +color4 #7199bc +color12 #9fbdde +color5 #727399 +color13 #989abc +color6 #719899 +color14 #6fbbbc +color7 #7f7f7f +color15 #feffff diff --git a/.config/kitty/kitty-themes/themes/Aquarium_Dark.conf b/.config/kitty/kitty-themes/themes/Aquarium_Dark.conf new file mode 100755 index 0000000..b9d3616 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Aquarium_Dark.conf @@ -0,0 +1,48 @@ +# vim:ft=kitty + +## name: Aquarium Dark +## license: MIT +## author: Detective Pikachu +## upstream: https://github.com/FrenzyExists/aquarium-vim/raw/develop/extras/kitty_aquarium_dark.conf +## blurb: A simple vibrant dark theme Kitty terminal. + +foreground #C6D0E9 +background #20202A +selection_foreground #2E3440 +selection_background #A8B6D0 +url_color #cddbf9 + +# black +color0 #3b3b4d +color8 #1b1b23 + +# red +color1 #ebb9b9 +color9 #d95e59 + +# green +color2 #caf6bb +color10 #8fc587 + +# yellow +color3 #E6DFB8 +color11 #ffcf85 + +# blue +color4 #cddbf9 +color12 #4a83c3 + +# magenta +color5 #f6bbe7 +color13 #bf83b5 + +# cyan +color6 #b8dceb +color14 #4eb3cd + +# white +color7 #c8cedc +color15 #abb2c2 + +# Cursor +cursor #b8dceb diff --git a/.config/kitty/kitty-themes/themes/Aquarium_Light.conf b/.config/kitty/kitty-themes/themes/Aquarium_Light.conf new file mode 100755 index 0000000..66c5efd --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Aquarium_Light.conf @@ -0,0 +1,46 @@ +# vim:ft=kitty + +## name: Aquarium Light +## license: MIT +## author: ragdoll2iguess +## upstream: https://github.com/FrenzyExists/aquarium-vim/raw/develop/extras/kitty_aquarium_light.conf +## blurb: A simple vibrant dark theme Kitty terminal. +## Old BG -> #E6E6F1 #E1E3F2 + +foreground #708190 +background #E6E6F1 +selection_foreground #9CA6B9 +selection_background #3D4059 +url_color #7170C2 + +# white +color0 #D5D4E0 +color8 #CCCBD9 + +# red +color1 #C34864 +color9 #B7435E + +# green +color2 #7D9685 +color10 #7E8F80 + +# yellow +color3 #DE956F +color11 #D88B72 + +# blue +color4 #6A8CBC +color12 #6E7EBF + +# magenta +color5 #8787BF +color13 #7170C2 + +# cyan +color6 #829FB0 +color14 #728A9A + +# black +color7 #313449 +color15 #414560 diff --git a/.config/kitty/kitty-themes/themes/Argonaut.conf b/.config/kitty/kitty-themes/themes/Argonaut.conf new file mode 100755 index 0000000..058186e --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Argonaut.conf @@ -0,0 +1,21 @@ +background #0d0f18 +foreground #fffaf3 +cursor #ff0017 +selection_background #002a3a +color0 #222222 +color8 #444444 +color1 #ff000f +color9 #ff273f +color2 #8ce00a +color10 #abe05a +color3 #ffb900 +color11 #ffd141 +color4 #008df8 +color12 #0092ff +color5 #6c43a5 +color13 #9a5feb +color6 #00d7eb +color14 #67ffef +color7 #ffffff +color15 #ffffff +selection_foreground #0d0f18 diff --git a/.config/kitty/kitty-themes/themes/Arthur.conf b/.config/kitty/kitty-themes/themes/Arthur.conf new file mode 100755 index 0000000..d3fb520 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Arthur.conf @@ -0,0 +1,21 @@ +background #1c1c1c +foreground #ddeedd +cursor #e2bbef +selection_background #4d4d4d +color0 #3d352a +color8 #554444 +color1 #cd5c5c +color9 #cc5533 +color2 #86af80 +color10 #88aa22 +color3 #e8ae5b +color11 #ffa75d +color4 #6495ed +color12 #87ceeb +color5 #deb887 +color13 #996600 +color6 #b0c4de +color14 #b0c4de +color7 #bbaa99 +color15 #ddccbb +selection_foreground #1c1c1c diff --git a/.config/kitty/kitty-themes/themes/AtelierSulphurpool.conf b/.config/kitty/kitty-themes/themes/AtelierSulphurpool.conf new file mode 100755 index 0000000..05674b0 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/AtelierSulphurpool.conf @@ -0,0 +1,21 @@ +background #202745 +foreground #969cb3 +cursor #969cb3 +selection_background #5e6686 +color0 #202745 +color8 #6a7394 +color1 #c84821 +color9 #c76a28 +color2 #ab9639 +color10 #283256 +color3 #c08a2f +color11 #5e6686 +color4 #3d8ed0 +color12 #898ea3 +color5 #6678cc +color13 #dee1f0 +color6 #21a1c8 +color14 #9c6279 +color7 #969cb3 +color15 #f4f7ff +selection_foreground #202745 diff --git a/.config/kitty/kitty-themes/themes/Atom.conf b/.config/kitty/kitty-themes/themes/Atom.conf new file mode 100755 index 0000000..091c683 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Atom.conf @@ -0,0 +1,21 @@ +background #161718 +foreground #c4c8c5 +cursor #d0d0d0 +selection_background #444444 +color0 #000000 +color8 #000000 +color1 #fc5ef0 +color9 #fc5ef0 +color2 #86c38a +color10 #94f936 +color3 #ffd6b1 +color11 #f5ffa7 +color4 #85befd +color12 #95cbfe +color5 #b9b5fc +color13 #b9b5fc +color6 #85befd +color14 #85befd +color7 #dfdfdf +color15 #dfdfdf +selection_foreground #161718 diff --git a/.config/kitty/kitty-themes/themes/AtomOneLight.conf b/.config/kitty/kitty-themes/themes/AtomOneLight.conf new file mode 100755 index 0000000..a3ab41f --- /dev/null +++ b/.config/kitty/kitty-themes/themes/AtomOneLight.conf @@ -0,0 +1,21 @@ +background #f8f8f8 +foreground #2a2b33 +cursor #bbbbbb +selection_background #e5e5e6 +color0 #000000 +color8 #000000 +color1 #de3d35 +color9 #de3d35 +color2 #3e953a +color10 #3e953a +color3 #d2b67b +color11 #d2b67b +color4 #2f5af3 +color12 #2f5af3 +color5 #950095 +color13 #a00095 +color6 #3e953a +color14 #3e953a +color7 #bbbbbb +color15 #ffffff +selection_foreground #2a2b33 diff --git a/.config/kitty/kitty-themes/themes/Batman.conf b/.config/kitty/kitty-themes/themes/Batman.conf new file mode 100755 index 0000000..aef20e8 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Batman.conf @@ -0,0 +1,21 @@ +background #1b1d1e +foreground #6e6e6e +cursor #fcee0b +selection_background #4d4f4c +color0 #1b1d1e +color8 #505354 +color1 #e6db43 +color9 #fff68d +color2 #c8be46 +color10 #fff27c +color3 #f3fd21 +color11 #feed6c +color4 #737074 +color12 #909495 +color5 #737271 +color13 #9a999d +color6 #615f5e +color14 #a2a2a5 +color7 #c5c5be +color15 #dadad5 +selection_foreground #1b1d1e diff --git a/.config/kitty/kitty-themes/themes/Belafonte_Day.conf b/.config/kitty/kitty-themes/themes/Belafonte_Day.conf new file mode 100755 index 0000000..56a8796 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Belafonte_Day.conf @@ -0,0 +1,21 @@ +background #d4ccb9 +foreground #45363b +cursor #45363b +selection_background #958b83 +color0 #20111a +color8 #5e5252 +color1 #bd100d +color9 #bd100d +color2 #858062 +color10 #858062 +color3 #e9a448 +color11 #e9a448 +color4 #416978 +color12 #416978 +color5 #96522b +color13 #96522b +color6 #98999c +color14 #98999c +color7 #958b83 +color15 #d4ccb9 +selection_foreground #d4ccb9 diff --git a/.config/kitty/kitty-themes/themes/Belafonte_Night.conf b/.config/kitty/kitty-themes/themes/Belafonte_Night.conf new file mode 100755 index 0000000..fc51e9c --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Belafonte_Night.conf @@ -0,0 +1,21 @@ +background #20111a +foreground #958b83 +cursor #958b83 +selection_background #45363b +color0 #20111a +color8 #5e5252 +color1 #bd100d +color9 #bd100d +color2 #858062 +color10 #858062 +color3 #e9a448 +color11 #e9a448 +color4 #416978 +color12 #416978 +color5 #96522b +color13 #96522b +color6 #98999c +color14 #98999c +color7 #958b83 +color15 #d4ccb9 +selection_foreground #20111a diff --git a/.config/kitty/kitty-themes/themes/BirdsOfParadise.conf b/.config/kitty/kitty-themes/themes/BirdsOfParadise.conf new file mode 100755 index 0000000..df38e80 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/BirdsOfParadise.conf @@ -0,0 +1,21 @@ +background #2a1e1d +foreground #dfdab7 +cursor #573d25 +selection_background #563c27 +color0 #573d25 +color8 #9a6b49 +color1 #be2d26 +color9 #e84526 +color2 #6ba08a +color10 #94d7ba +color3 #e99c29 +color11 #d0d04f +color4 #5a86ac +color12 #b8d3ed +color5 #ab80a6 +color13 #d09dca +color6 #74a5ac +color14 #92ced6 +color7 #dfdab7 +color15 #fff9d4 +selection_foreground #2a1e1d diff --git a/.config/kitty/kitty-themes/themes/BlackMetal.conf b/.config/kitty/kitty-themes/themes/BlackMetal.conf new file mode 100755 index 0000000..4593f6e --- /dev/null +++ b/.config/kitty/kitty-themes/themes/BlackMetal.conf @@ -0,0 +1,32 @@ +# BlackMetal by metalelf0, https://github.com/metalelf0 +# This schemes are available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT). + +selection_foreground #000000 +selection_background #ffffff + +foreground #ffffff +background #000000 + +color0 #000000 +color1 #5f8787 +color2 #dd9999 +color3 #a06666 +color4 #888888 +color5 #999999 +color6 #aaaaaa +color7 #c1c1c1 +color8 #333333 +color9 #5f8787 +color10 #dd9999 +color11 #a06666 +color12 #888888 +color13 #999999 +color14 #aaaaaa +color15 #c1c1c1 + +active_tab_foreground #ffffff +active_tab_background #000000 +inactive_tab_foreground #666666 +inactive_tab_background #000000 + +active_border_color #ffffff diff --git a/.config/kitty/kitty-themes/themes/Blazer.conf b/.config/kitty/kitty-themes/themes/Blazer.conf new file mode 100755 index 0000000..f1dd601 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Blazer.conf @@ -0,0 +1,21 @@ +background #0d1925 +foreground #d9e5f1 +cursor #d9e5f1 +color0 #000000 +color8 #252525 +color1 #b87979 +color9 #dabdbd +color2 #79b879 +color10 #bddabd +color3 #b8b879 +color11 #dadabd +color4 #7979b8 +color12 #bdbdda +color5 #b879b8 +color13 #dabdda +color6 #79b8b8 +color14 #bddada +color7 #d9d9d9 +color15 #ffffff +selection_foreground #0d1925 +selection_background #d9e6f2 diff --git a/.config/kitty/kitty-themes/themes/Borland.conf b/.config/kitty/kitty-themes/themes/Borland.conf new file mode 100755 index 0000000..c27cc83 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Borland.conf @@ -0,0 +1,21 @@ +background #0000a3 +foreground #ffff4d +cursor #ffa460 +selection_background #a3a3a3 +color0 #4e4e4e +color8 #7c7c7c +color1 #ff6b60 +color9 #ffb6b0 +color2 #a7ff60 +color10 #ceffab +color3 #ffffb6 +color11 #ffffcb +color4 #96cafd +color12 #b5dcfe +color5 #ff73fd +color13 #ff9cfe +color6 #c6c4fd +color14 #dfdffe +color7 #eeeeee +color15 #ffffff +selection_foreground #0000a3 diff --git a/.config/kitty/kitty-themes/themes/Bright_Lights.conf b/.config/kitty/kitty-themes/themes/Bright_Lights.conf new file mode 100755 index 0000000..9b365f4 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Bright_Lights.conf @@ -0,0 +1,21 @@ +background #191919 +foreground #b2c8d6 +cursor #f34a00 +selection_background #b2c8d6 +color0 #191919 +color8 #191919 +color1 #ff355b +color9 #ff355b +color2 #b6e875 +color10 #b6e875 +color3 #ffc150 +color11 #ffc150 +color4 #75d3ff +color12 #75d4ff +color5 #b975e6 +color13 #b975e6 +color6 #6cbeb5 +color14 #6cbeb5 +color7 #c1c8d6 +color15 #c1c8d6 +selection_foreground #191919 diff --git a/.config/kitty/kitty-themes/themes/Broadcast.conf b/.config/kitty/kitty-themes/themes/Broadcast.conf new file mode 100755 index 0000000..7844942 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Broadcast.conf @@ -0,0 +1,21 @@ +background #2b2b2b +foreground #e5e1db +cursor #ffffff +selection_background #5a637e +color0 #000000 +color8 #323232 +color1 #da4839 +color9 #ff7b6a +color2 #509f50 +color10 #83d082 +color3 #ffd249 +color11 #ffff7b +color4 #6d9cbd +color12 #9fcef0 +color5 #cfcfff +color13 #ffffff +color6 #6d9cbd +color14 #a0cef0 +color7 #ffffff +color15 #ffffff +selection_foreground #2b2b2b diff --git a/.config/kitty/kitty-themes/themes/Brogrammer.conf b/.config/kitty/kitty-themes/themes/Brogrammer.conf new file mode 100755 index 0000000..41cc37b --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Brogrammer.conf @@ -0,0 +1,21 @@ +background #131313 +foreground #d6dae4 +cursor #b9b9b9 +selection_background #1f1f1f +color0 #1f1f1f +color8 #d6dae4 +color1 #f71118 +color9 #de342e +color2 #2cc55d +color10 #1dd260 +color3 #ecb90f +color11 #f2bd09 +color4 #2a84d2 +color12 #0f80d5 +color5 #4e59b7 +color13 #524fb9 +color6 #0f80d5 +color14 #0f7cda +color7 #d6dae4 +color15 #ffffff +selection_foreground #131313 diff --git a/.config/kitty/kitty-themes/themes/C64.conf b/.config/kitty/kitty-themes/themes/C64.conf new file mode 100755 index 0000000..70978d5 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/C64.conf @@ -0,0 +1,21 @@ +background #40318d +foreground #7869c4 +cursor #7869c4 +selection_background #7869c4 +color0 #090300 +color8 #000000 +color1 #883932 +color9 #883932 +color2 #55a049 +color10 #55a049 +color3 #bfce72 +color11 #bfce72 +color4 #40318d +color12 #40318d +color5 #8b3f96 +color13 #8a3e95 +color6 #67b6bd +color14 #67b6bd +color7 #ffffff +color15 #f7f7f7 +selection_foreground #40318d diff --git a/.config/kitty/kitty-themes/themes/CLRS.conf b/.config/kitty/kitty-themes/themes/CLRS.conf new file mode 100755 index 0000000..ddcb324 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/CLRS.conf @@ -0,0 +1,21 @@ +background #ffffff +foreground #262626 +cursor #6fd2fc +selection_background #6fd2fc +color0 #000000 +color8 #545753 +color1 #f72729 +color9 #fb0416 +color2 #32895c +color10 #2cc631 +color3 #f96f1c +color11 #fcd627 +color4 #125ccf +color12 #156ffe +color5 #9f00bc +color13 #e800b0 +color6 #32c2c0 +color14 #39d5ce +color7 #b2b2b2 +color15 #ededec +selection_foreground #ffffff diff --git a/.config/kitty/kitty-themes/themes/Campbell.conf b/.config/kitty/kitty-themes/themes/Campbell.conf new file mode 100755 index 0000000..9f33178 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Campbell.conf @@ -0,0 +1,46 @@ +# vim:ft=kitty + +## name: Campbell +## author: Microsoft +## blurb: The default theme of Microsoft's terminals, including Windows Terminal and cmd. + +# The basic colors +foreground #cccccc +background #0c0c0c +selection_background #ffffff + +# Cursor colors +cursor #ffffff + +# The basic 16 colors +# black +color0 #0c0c0c +color8 #767676 + +# red +color1 #c50f1f +color9 #e74856 + +# green +color2 #13a10e +color10 #16c60c + +# yellow +color3 #f19c00 +color11 #f9f1a5 + +# blue +color4 #0037da +color12 #3b78ff + +# magenta +color5 #881798 +color13 #b4009e + +# cyan +color6 #3a96dd +color14 #61d6d6 + +# white +color7 #cccccc +color15 #f2f2f2 diff --git a/.config/kitty/kitty-themes/themes/Chalk.conf b/.config/kitty/kitty-themes/themes/Chalk.conf new file mode 100755 index 0000000..7051698 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Chalk.conf @@ -0,0 +1,21 @@ +background #2b2c2e +foreground #d2d8d9 +cursor #708183 +selection_background #e3e8ed +color0 #7c8a8f +color8 #888888 +color1 #b23a51 +color9 #f24840 +color2 #789a69 +color10 #80c46f +color3 #b9ab4a +color11 #ffeb62 +color4 #2a7fac +color12 #4095ff +color5 #bc4f5a +color13 #fb5175 +color6 #44a799 +color14 #52ccbd +color7 #d2d8d9 +color15 #d2d8d9 +selection_foreground #2b2c2e diff --git a/.config/kitty/kitty-themes/themes/Chalkboard.conf b/.config/kitty/kitty-themes/themes/Chalkboard.conf new file mode 100755 index 0000000..f0b7350 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Chalkboard.conf @@ -0,0 +1,21 @@ +background #29262f +foreground #d9e6f2 +cursor #d9e6f2 +selection_background #073642 +color0 #000000 +color8 #323232 +color1 #c37372 +color9 #dbaaaa +color2 #72c373 +color10 #aadbaa +color3 #c2c372 +color11 #dadbaa +color4 #7372c3 +color12 #aaaadb +color5 #c372c2 +color13 #dbaada +color6 #72c2c3 +color14 #aadadb +color7 #d9d9d9 +color15 #ffffff +selection_foreground #29262f diff --git a/.config/kitty/kitty-themes/themes/ChallengerDeep.conf b/.config/kitty/kitty-themes/themes/ChallengerDeep.conf new file mode 100755 index 0000000..d468816 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/ChallengerDeep.conf @@ -0,0 +1,35 @@ +foreground #cbe3e7 +background #1e1c31 +selection_foreground #1e1c31 +selection_background #aaffe4 + +active_tab_background #565575 +inactive_tab_background #565575 +active_tab_foreground #95ffa4 +inactive_tab_foreground #cbe3e7 + +active_border_color #fbfcfc + +color0 #565575 +color8 #100e23 + +color1 #ff8080 +color9 #ff5458 + +color2 #95ffa4 +color10 #62d196 + +color3 #ffe9aa +color11 #ffb378 + +color4 #91ddff +color12 #65b2ff + +color5 #c991e1 +color13 #906cff + +color6 #aaffe4 +color14 #63f2f1 + +color7 #cbe3e7 +color15 #a6b3cc diff --git a/.config/kitty/kitty-themes/themes/Ciapre.conf b/.config/kitty/kitty-themes/themes/Ciapre.conf new file mode 100755 index 0000000..2b496fb --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Ciapre.conf @@ -0,0 +1,21 @@ +background #181c27 +foreground #ada37a +cursor #91805a +selection_background #172539 +color0 #181818 +color8 #555555 +color1 #800009 +color9 #ab3834 +color2 #48513b +color10 #a6a65d +color3 #cc8a3e +color11 #dcde7b +color4 #566d8c +color12 #2f97c6 +color5 #724c7c +color13 #d33060 +color6 #5b4f4a +color14 #f3dab1 +color7 #ada37e +color15 #f3f3f3 +selection_foreground #181c27 diff --git a/.config/kitty/kitty-themes/themes/Cobalt2.conf b/.config/kitty/kitty-themes/themes/Cobalt2.conf new file mode 100755 index 0000000..3ffcbe2 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Cobalt2.conf @@ -0,0 +1,21 @@ +background #122637 +foreground #ffffff +cursor #f0cb09 +selection_background #18344f +color0 #000000 +color8 #545454 +color1 #ff0000 +color9 #f40d17 +color2 #37dd21 +color10 #3bcf1d +color3 #fee409 +color11 #ecc809 +color4 #1460d2 +color12 #5555ff +color5 #ff005d +color13 #ff55ff +color6 #00bbbb +color14 #6ae3f9 +color7 #bbbbbb +color15 #ffffff +selection_foreground #122637 diff --git a/.config/kitty/kitty-themes/themes/Cobalt_Neon.conf b/.config/kitty/kitty-themes/themes/Cobalt_Neon.conf new file mode 100755 index 0000000..02a66e5 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Cobalt_Neon.conf @@ -0,0 +1,21 @@ +background #142838 +foreground #8ff586 +cursor #c4206f +selection_background #084fb0 +color0 #142630 +color8 #fff688 +color1 #ff2320 +color9 #d4312e +color2 #3aa5ff +color10 #8ff586 +color3 #e9e75c +color11 #e9f06d +color4 #8ff586 +color12 #3c7dd2 +color5 #781aa0 +color13 #8230a7 +color6 #8ff586 +color14 #6cbc67 +color7 #ba45b1 +color15 #8ff586 +selection_foreground #142838 diff --git a/.config/kitty/kitty-themes/themes/Corvine.conf b/.config/kitty/kitty-themes/themes/Corvine.conf new file mode 100755 index 0000000..73c398e --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Corvine.conf @@ -0,0 +1,23 @@ +# Corvine by arzg, https://github.com/arzg/vim-corvine +# This work is licensed under the ISC License. +# For a copy, see https://github.com/arzg/vim-corvine/raw/master/LICENSE + +foreground #c6c6c6 +background #262626 + +color0 #3a3a3a +color1 #d78787 +color2 #87af5f +color3 #d7d7af +color4 #87afd7 +color5 #afafd7 +color6 #87d7d7 +color7 #c6c6c6 +color8 #626262 +color9 #ffafaf +color10 #afd787 +color11 #d7d787 +color12 #87d7ff +color13 #d7afd7 +color14 #5fd7d7 +color15 #eeeeee diff --git a/.config/kitty/kitty-themes/themes/CrayonPonyFish.conf b/.config/kitty/kitty-themes/themes/CrayonPonyFish.conf new file mode 100755 index 0000000..068fab3 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/CrayonPonyFish.conf @@ -0,0 +1,21 @@ +background #140607 +foreground #685259 +cursor #685259 +selection_background #2a1a1c +color0 #2a1a1c +color8 #3c2a2e +color1 #90002a +color9 #c5245c +color2 #579523 +color10 #8dff56 +color3 #aa301b +color11 #c7371d +color4 #8b87af +color12 #cfc9ff +color5 #682e50 +color13 #fb6cb9 +color6 #e8a766 +color14 #ffceae +color7 #685259 +color15 #af949d +selection_foreground #140607 diff --git a/.config/kitty/kitty-themes/themes/DarkOneNuanced.conf b/.config/kitty/kitty-themes/themes/DarkOneNuanced.conf new file mode 100755 index 0000000..922b607 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/DarkOneNuanced.conf @@ -0,0 +1,63 @@ +# Dark One Nuanced by ariasuni, https://store.kde.org/p/1225908 +# Imported from KDE .colorscheme format by thematdev, https://thematdev.org +# For migrating your schemes from Konsole format see +# https://git.thematdev.org/thematdev/konsole-scheme-migration + + +# importing Background +background #282c34 +# importing BackgroundFaint +# importing BackgroundIntense +# importing Color0 +color0 #3f4451 +# importing Color0Faint +color16 #282c34 +# importing Color0Intense +color8 #4f5666 +# importing Color1 +color1 #e06c75 +# importing Color1Faint +color17 #c25d66 +# importing Color1Intense +color9 #ff7b86 +# importing Color2 +color2 #98c379 +# importing Color2Faint +color18 #82a566 +# importing Color2Intense +color10 #b1e18b +# importing Color3 +color3 #d19a66 +# importing Color3Faint +color19 #b38257 +# importing Color3Intense +color11 #efb074 +# importing Color4 +color4 #61afef +# importing Color4Faint +color20 #5499d1 +# importing Color4Intense +color12 #67cdff +# importing Color5 +color5 #c678dd +# importing Color5Faint +color21 #a966bd +# importing Color5Intense +color13 #e48bff +# importing Color6 +color6 #56b6c2 +# importing Color6Faint +color22 #44919a +# importing Color6Intense +color14 #63d4e0 +# importing Color7 +color7 #e6e6e6 +# importing Color7Faint +color23 #c8c8c8 +# importing Color7Intense +color15 #ffffff +# importing Foreground +foreground #abb2bf +# importing ForegroundFaint +# importing ForegroundIntense +# importing General diff --git a/.config/kitty/kitty-themes/themes/Dark_Pastel.conf b/.config/kitty/kitty-themes/themes/Dark_Pastel.conf new file mode 100755 index 0000000..15083f7 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Dark_Pastel.conf @@ -0,0 +1,21 @@ +background #000000 +foreground #ffffff +cursor #bbbbbb +selection_background #b5d5ff +color0 #000000 +color8 #545454 +color1 #ff5555 +color9 #ff5555 +color2 #55ff55 +color10 #55ff55 +color3 #ffff55 +color11 #ffff55 +color4 #5555ff +color12 #5555ff +color5 #ff55ff +color13 #ff55ff +color6 #55ffff +color14 #55ffff +color7 #bbbbbb +color15 #ffffff +selection_foreground #000000 diff --git a/.config/kitty/kitty-themes/themes/Darkside.conf b/.config/kitty/kitty-themes/themes/Darkside.conf new file mode 100755 index 0000000..10238d1 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Darkside.conf @@ -0,0 +1,21 @@ +background #212324 +foreground #b9b9b9 +cursor #bbbbbb +selection_background #2f3333 +color0 #000000 +color8 #000000 +color1 #e8331c +color9 #df5a4f +color2 #68c156 +color10 #76b768 +color3 #f1d32b +color11 #eed64a +color4 #1c98e8 +color12 #387bd2 +color5 #8e69c8 +color13 #957bbd +color6 #1c98e8 +color14 #3d96e2 +color7 #b9b9b9 +color15 #b9b9b9 +selection_foreground #212324 diff --git a/.config/kitty/kitty-themes/themes/Desert.conf b/.config/kitty/kitty-themes/themes/Desert.conf new file mode 100755 index 0000000..5491a97 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Desert.conf @@ -0,0 +1,21 @@ +background #333333 +foreground #ffffff +cursor #00ff00 +selection_background #b5d5ff +color0 #4d4d4d +color8 #545454 +color1 #ff2b2b +color9 #ff5555 +color2 #98fb98 +color10 #55ff55 +color3 #f0e68c +color11 #ffff55 +color4 #cd853f +color12 #87ceff +color5 #ffdead +color13 #ff55ff +color6 #ffa0a0 +color14 #ffd700 +color7 #f5deb3 +color15 #ffffff +selection_foreground #333333 diff --git a/.config/kitty/kitty-themes/themes/DesertNight.conf b/.config/kitty/kitty-themes/themes/DesertNight.conf new file mode 100755 index 0000000..f9ece8f --- /dev/null +++ b/.config/kitty/kitty-themes/themes/DesertNight.conf @@ -0,0 +1,22 @@ +# DesertNight by sainnhe +# License: MIT && Anti-996 + +macos_titlebar_color #24221c +foreground #d4b07b +background #24221c +color0 #473f31 +color8 #473f31 +color1 #e56b55 +color9 #e56b55 +color2 #99b05f +color10 #99b05f +color3 #e18245 +color11 #e5a440 +color4 #949fb4 +color12 #949fb4 +color5 #d261a5 +color13 #d261a5 +color6 #bfab36 +color14 #bfab36 +color7 #87765d +color15 #87765d diff --git a/.config/kitty/kitty-themes/themes/DimmedMonokai.conf b/.config/kitty/kitty-themes/themes/DimmedMonokai.conf new file mode 100755 index 0000000..9dccd88 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/DimmedMonokai.conf @@ -0,0 +1,21 @@ +background #1e1e1e +foreground #b8bcb9 +cursor #eee +selection_background #efcc00 +color0 #3a3c43 +color8 #888987 +color1 #be3e48 +color9 #fb001e +color2 #869a3a +color10 #0e712e +color3 #c4a535 +color11 #c37033 +color4 #4e76a1 +color12 #176ce3 +color5 #855b8d +color13 #fb0067 +color6 #568ea3 +color14 #2d6f6c +color7 #b8bcb9 +color15 #fcffb8 +selection_foreground #1e1e1e diff --git a/.config/kitty/kitty-themes/themes/Doom_One.conf b/.config/kitty/kitty-themes/themes/Doom_One.conf new file mode 100755 index 0000000..8c845bb --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Doom_One.conf @@ -0,0 +1,59 @@ +# vim:ft=kitty + +## name: Doom One +## author: Henrik Lissner +## license: MIT +## blurb: Inspired by Atom's One Dark color scheme. + +# The basic colors +foreground #bbc2cf +background #282c34 +selection_foreground #bbc2cf +selection_background #3f444a + +# Cursor colors +cursor #bbc2cf +cursor_text_color #282c34 + +# kitty window border colors +active_border_color #46D9FF +inactive_border_color #3f444a + +# Tab bar colors +active_tab_foreground #282c34 +active_tab_background #DFDFDF +inactive_tab_foreground #3f444a +inactive_tab_background #5B6268 + +# The basic 16 colors +# black +color0 #2a2e38 +color8 #3f444a + +# red +color1 #ff6c6b +color9 #ff6655 + +# green +color2 #98be65 +color10 #99bb66 + +# yellow +color3 #ECBE7B +color11 #ECBE7B + +# blue +color4 #51afef +color12 #51afef + +# magenta +color5 #c678dd +color13 #c678dd + +# cyan +color6 #46D9FF +color14 #46D9FF + +# white +color7 #DFDFDF +color15 #bbc2cf diff --git a/.config/kitty/kitty-themes/themes/Doom_One_Light.conf b/.config/kitty/kitty-themes/themes/Doom_One_Light.conf new file mode 100755 index 0000000..3e0273b --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Doom_One_Light.conf @@ -0,0 +1,59 @@ +# vim:ft=kitty + +## name: Doom One Light +## author: Henrik Lissner +## license: MIT +## blurb: Doom Emacs flagship theme based on atom One Light + +# The basic colors +foreground #383a42 +background #fafafa +selection_foreground #383a42 +selection_background #dfdfdf + +# Cursor colors +cursor #383a42 +cursor_text_color #fafafa + +# kitty window border colors +active_border_color #0184bc +inactive_border_color #c6c7c7 + +# Tab bar colors +active_tab_foreground #fafafa +active_tab_background #383a42 +inactive_tab_foreground #f0f0f0 +inactive_tab_background #c6c7c7 + +# The basic 16 colors +# black +color0 #383a42 +color8 #c6c7c7 + +# red +color1 #e45649 +color9 #e45649 + +# green +color2 #50a14f +color10 #50a14f + +# yellow +color3 #986801 +color11 #986801 + +# blue +color4 #4078f2 +color12 #4078f2 + +# magenta +color5 #a626a4 +color13 #b751b6 + +# cyan +color6 #005478 +color14 #0184bc + +# white +color7 #f0f0f0 +color15 #383a42 diff --git a/.config/kitty/kitty-themes/themes/Doom_Vibrant.conf b/.config/kitty/kitty-themes/themes/Doom_Vibrant.conf new file mode 100755 index 0000000..5057b8a --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Doom_Vibrant.conf @@ -0,0 +1,59 @@ +# vim:ft=kitty + +## name: Doom Vibrant +## author: Henrik Lissner +## license: MIT +## blurb: A version of Doom One Emacs theme that uses more vibrant colors. + +# The basic colors +foreground #bbc2cf +background #242730 +selection_foreground #bbc2cf +selection_background #6A8FBF + +# Cursor colors +cursor #bbc2cf +cursor_text_color #242730 + +# kitty window border colors +active_border_color #46D9FF +inactive_border_color #484854 + +# Tab bar colors +active_tab_foreground #242730 +active_tab_background #DFDFDF +inactive_tab_foreground #484854 +inactive_tab_background #5D656B + +# The basic 16 colors +# black +color0 #2a2e38 +color8 #484854 + +# red +color1 #ff665c +color9 #ff665c + +# green +color2 #7bc275 +color10 #99bb66 + +# yellow +color3 #fcce7b +color11 #ecbe7b + +# blue +color4 #51afef +color12 #51afef + +# magenta +color5 #C57BDB +color13 #c678dd + +# cyan +color6 #5cEfFF +color14 #46D9FF + +# white +color7 #DFDFDF +color15 #bbc2cf diff --git a/.config/kitty/kitty-themes/themes/DotGov.conf b/.config/kitty/kitty-themes/themes/DotGov.conf new file mode 100755 index 0000000..345cef9 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/DotGov.conf @@ -0,0 +1,21 @@ +background #252b35 +foreground #eaeaea +cursor #d9002f +selection_background #194080 +color0 #181818 +color8 #181818 +color1 #bf081d +color9 #bf081d +color2 #3d9751 +color10 #3d9751 +color3 #f6bb33 +color11 #f6bb33 +color4 #16b1df +color12 #16b1df +color5 #772fb0 +color13 #772fb0 +color6 #8bd1ed +color14 #8bd1ed +color7 #ffffff +color15 #ffffff +selection_foreground #252b35 diff --git a/.config/kitty/kitty-themes/themes/Dracula.conf b/.config/kitty/kitty-themes/themes/Dracula.conf new file mode 100755 index 0000000..627ba40 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Dracula.conf @@ -0,0 +1,35 @@ +# vim:ft=kitty +## name: Dracula +## author: Keegan Carruthers-Smith +## license: MIT +## upstream: https://raw.githubusercontent.com/dracula/kitty/master/dracula.conf + +foreground #f8f8f2 +background #282a36 +selection_foreground #ffffff +selection_background #44475a +url_color #8be9fd +color0 #21222c +color8 #6272a4 +color1 #ff5555 +color9 #ff6e6e +color2 #50fa7b +color10 #69ff94 +color3 #f1fa8c +color11 #ffffa5 +color4 #bd93f9 +color12 #d6acff +color5 #ff79c6 +color13 #ff92df +color6 #8be9fd +color14 #a4ffff +color7 #f8f8f2 +color15 #ffffff +cursor #f8f8f2 +cursor_text_color background +active_tab_foreground #282a36 +active_tab_background #f8f8f2 +inactive_tab_foreground #282a36 +inactive_tab_background #6272a4 +mark1_foreground #282a36 +mark1_background #ff5555 diff --git a/.config/kitty/kitty-themes/themes/Dumbledore.conf b/.config/kitty/kitty-themes/themes/Dumbledore.conf new file mode 100755 index 0000000..c1ef032 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Dumbledore.conf @@ -0,0 +1,21 @@ +background #422553 +foreground #c4c8c5 +cursor #c4c8c5 +selection_background #008aff +color0 #2b283d +color8 #413e53 +color1 #ae0000 +color9 #d3a624 +color2 #3e7c54 +color10 #aaaaaa +color3 #f0c75e +color11 #716254 +color4 #415baf +color12 #946a2c +color5 #9445ae +color13 #b294ba +color6 #008aff +color14 #25de50 +color7 #850000 +color15 #c9c9c9 +selection_foreground #422553 diff --git a/.config/kitty/kitty-themes/themes/Duotone_Dark.conf b/.config/kitty/kitty-themes/themes/Duotone_Dark.conf new file mode 100755 index 0000000..4867604 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Duotone_Dark.conf @@ -0,0 +1,21 @@ +background #1f1c27 +foreground #b6a0ff +cursor #ff9738 +selection_background #353146 +color0 #1f1c27 +color8 #353146 +color1 #d8393d +color9 #d8393d +color2 #2dcc72 +color10 #2dcc72 +color3 #d8b76e +color11 #d8b76e +color4 #ffc183 +color12 #ffc183 +color5 #dd8d40 +color13 #dd8d40 +color6 #2388ff +color14 #2388ff +color7 #b6a0ff +color15 #e9e4ff +selection_foreground #1f1c27 diff --git a/.config/kitty/kitty-themes/themes/ENCOM.conf b/.config/kitty/kitty-themes/themes/ENCOM.conf new file mode 100755 index 0000000..7afc7ae --- /dev/null +++ b/.config/kitty/kitty-themes/themes/ENCOM.conf @@ -0,0 +1,21 @@ +background #000000 +foreground #00a595 +cursor #bbbbbb +selection_background #00a48c +color0 #000000 +color8 #545454 +color1 #9f0000 +color9 #ff0000 +color2 #008b00 +color10 #00ee00 +color3 #ffcf00 +color11 #ffff00 +color4 #0081ff +color12 #0000ff +color5 #bc00ca +color13 #ff00ff +color6 #008b8b +color14 #00cdcd +color7 #bbbbbb +color15 #ffffff +selection_foreground #000000 diff --git a/.config/kitty/kitty-themes/themes/Earthsong.conf b/.config/kitty/kitty-themes/themes/Earthsong.conf new file mode 100755 index 0000000..50f0da8 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Earthsong.conf @@ -0,0 +1,21 @@ +background #282420 +foreground #e5c6a8 +cursor #f6f6ec +selection_background #111417 +color0 #111417 +color8 #665e54 +color1 #c84134 +color9 #ff6459 +color2 #84c44b +color10 #97e035 +color3 #f4ae2e +color11 #dfd561 +color4 #1397b9 +color12 #5ed9ff +color5 #d0623c +color13 #ff9168 +color6 #4f9452 +color14 #83ef88 +color7 #e5c5a9 +color15 #f6f6ec +selection_foreground #282420 diff --git a/.config/kitty/kitty-themes/themes/Elemental.conf b/.config/kitty/kitty-themes/themes/Elemental.conf new file mode 100755 index 0000000..e24a3d3 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Elemental.conf @@ -0,0 +1,21 @@ +background #21211c +foreground #807973 +cursor #facb7f +selection_background #403729 +color0 #3c3b30 +color8 #545444 +color1 #97280f +color9 #df502a +color2 #479942 +color10 #60e06f +color3 #7f7110 +color11 #d69827 +color4 #497f7d +color12 #78d8d8 +color5 #7e4e2e +color13 #cd7c53 +color6 #387f58 +color14 #58d598 +color7 #807974 +color15 #fff1e8 +selection_foreground #21211c diff --git a/.config/kitty/kitty-themes/themes/Espresso.conf b/.config/kitty/kitty-themes/themes/Espresso.conf new file mode 100755 index 0000000..373c178 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Espresso.conf @@ -0,0 +1,27 @@ +# Theme ported from the Mac Terminal application. + +background #323232 +foreground #ffffff +cursor #d6d6d6 +selection_background #5b5b5b +selection_foreground #323232 +color0 #353535 +color8 #535353 +color1 #d25252 +color9 #f00c0c +color2 #a4c161 +color10 #c1df74 +color3 #ffc56d +color11 #e1e48a +color4 #6c99ba +color12 #8ab6d9 +color5 #d096d9 +color13 #efb5f7 +color6 #bdd6ff +color14 #dbf4ff +color7 #ededec +color15 #ffffff +active_tab_foreground #ffffff +active_tab_background #535353 +inactive_tab_foreground #ffffff +inactive_tab_background #353535 diff --git a/.config/kitty/kitty-themes/themes/Espresso_Libre.conf b/.config/kitty/kitty-themes/themes/Espresso_Libre.conf new file mode 100755 index 0000000..fa042b2 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Espresso_Libre.conf @@ -0,0 +1,21 @@ +background #2a211c +foreground #b8a898 +cursor #ffffff +selection_background #c3dcff +color0 #000000 +color8 #545753 +color1 #cc0000 +color9 #ef2828 +color2 #1a921c +color10 #9aff87 +color3 #efe43a +color11 #fffa5c +color4 #0066ff +color12 #43a8ed +color5 #c5656b +color13 #ff8089 +color6 #05989a +color14 #34e2e2 +color7 #d3d7cf +color15 #ededec +selection_foreground #2a211c diff --git a/.config/kitty/kitty-themes/themes/Falcon.conf b/.config/kitty/kitty-themes/themes/Falcon.conf new file mode 100755 index 0000000..42f60ab --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Falcon.conf @@ -0,0 +1,51 @@ +# Drop these into your kitty.conf + +# The cursor color +cursor #ffe8c0 + +# The foreground color +foreground #b4b4b9 + +# The background color +background #020221 + +# The foreground for selections +selection_foreground #36363a + +# The background for selections +selection_background #ddcfbf + +# The 16 terminal colors. There are 8 basic colors, each color has a dull and +# bright version. + +# black +color0 #000004 +color8 #020221 + +# red +color1 #ff3600 +color9 #ff8e78 + +# green +color2 #718e3f +color10 #b1bf75 + +# yellow +color3 #ffc552 +color11 #ffd392 + +# blue (purple and blue!) +color4 #635196 +color12 #99a4bc + +# magenta (orange) +color5 #ff761a +color13 #ffb07b + +# cyan +color6 #34bfa4 +color14 #8bccbf + +# white +color7 #b4b4b9 +color15 #f8f8ff diff --git a/.config/kitty/kitty-themes/themes/Farin.conf b/.config/kitty/kitty-themes/themes/Farin.conf new file mode 100755 index 0000000..b8ead10 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Farin.conf @@ -0,0 +1,26 @@ +# Farin Colorscheme for Kitty +# Based on https://github.com/mlopes/dotfiles/blob/xps2018/.Xdefaults#L113 +# # By https://github.com/mlopes + +selection_foreground #1e1e1e +selection_background #aaaaaa +url_color #657b83 + +background #1e1e1e +foreground #aaaaaa +color0 #444444 +color8 #666666 +color1 #ff1155 +color9 #ff4488 +color2 #11ff55 +color10 #44ff88 +color3 #ffbb33 +color11 #ffdd66 +color4 #1155ff +color12 #4488ff +color5 #ed53c9 +color13 #dd66ff +color6 #00ffbb +color14 #66ffdd +color7 #cccccc +color15 #ffffff diff --git a/.config/kitty/kitty-themes/themes/Fideloper.conf b/.config/kitty/kitty-themes/themes/Fideloper.conf new file mode 100755 index 0000000..7e099fc --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Fideloper.conf @@ -0,0 +1,21 @@ +background #282f32 +foreground #dad9df +cursor #d35f5a +selection_background #eeb7ab +color0 #282f32 +color8 #092027 +color1 #ca1d2c +color9 #d35f5a +color2 #edb7ab +color10 #d35f5a +color3 #b7aa9a +color11 #a86571 +color4 #2e78c1 +color12 #7c84c4 +color5 #c0226e +color13 #5b5db2 +color6 #309185 +color14 #81908f +color7 #e9e2cd +color15 #fcf4de +selection_foreground #282f32 diff --git a/.config/kitty/kitty-themes/themes/FishTank.conf b/.config/kitty/kitty-themes/themes/FishTank.conf new file mode 100755 index 0000000..dce32a4 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/FishTank.conf @@ -0,0 +1,21 @@ +background #222436 +foreground #eceffd +cursor #fdcd5e +selection_background #fcf6e8 +color0 #03063c +color8 #6c5a30 +color1 #c60049 +color9 #d94a8a +color2 #abf157 +color10 #daffa8 +color3 #fdcd5e +color11 #fee6a8 +color4 #525fb8 +color12 #b1bdf9 +color5 #976f81 +color13 #fda4cc +color6 #968662 +color14 #a4bc86 +color7 #eceffc +color15 #f6ffec +selection_foreground #222436 diff --git a/.config/kitty/kitty-themes/themes/Flat.conf b/.config/kitty/kitty-themes/themes/Flat.conf new file mode 100755 index 0000000..036e563 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Flat.conf @@ -0,0 +1,21 @@ +background #002240 +foreground #2bc45d +cursor #e5bd0c +selection_background #782b9c +color0 #212c3e +color8 #202b3b +color1 #a72320 +color9 #d3302e +color2 #32a448 +color10 #2c9440 +color3 #e58d11 +color11 #e5bd0c +color4 #3066ab +color12 #3b7cd2 +color5 #7819a0 +color13 #822fa7 +color6 #2b9270 +color14 #35b286 +color7 #afb6b9 +color15 #e6ecec +selection_foreground #002240 diff --git a/.config/kitty/kitty-themes/themes/Flatland.conf b/.config/kitty/kitty-themes/themes/Flatland.conf new file mode 100755 index 0000000..637b72d --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Flatland.conf @@ -0,0 +1,21 @@ +background #1c1e20 +foreground #b8daee +cursor #708183 +selection_background #2a2a24 +color0 #1c1d19 +color8 #1c1d19 +color1 #f18238 +color9 #d12a24 +color2 #9ed264 +color10 #a7d32c +color3 #f3ef6d +color11 #ff8948 +color4 #4f96be +color12 #61b8d0 +color5 #695abb +color13 #695abb +color6 #d53864 +color14 #d53864 +color7 #fefffe +color15 #fefffe +selection_foreground #1c1e20 diff --git a/.config/kitty/kitty-themes/themes/Floraverse.conf b/.config/kitty/kitty-themes/themes/Floraverse.conf new file mode 100755 index 0000000..6e6a06c --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Floraverse.conf @@ -0,0 +1,21 @@ +background #0e0c15 +foreground #dbd0b9 +cursor #bbbbbb +selection_background #f3e0b8 +color0 #08002e +color8 #331d4c +color1 #64002c +color9 #cf2062 +color2 #5d731a +color10 #b3ce58 +color3 #cd751c +color11 #fac357 +color4 #1d6da1 +color12 #40a4cf +color5 #b7077e +color13 #f02aae +color6 #42a38c +color14 #62caa8 +color7 #f3e0b8 +color15 #fff5db +selection_foreground #0e0c15 diff --git a/.config/kitty/kitty-themes/themes/ForestNight.conf b/.config/kitty/kitty-themes/themes/ForestNight.conf new file mode 100755 index 0000000..4a882db --- /dev/null +++ b/.config/kitty/kitty-themes/themes/ForestNight.conf @@ -0,0 +1,18 @@ +foreground #ffebc3 +background #3c4c55 +color0 #7f8f9f +color8 #7f8f9f +color1 #fd8489 +color9 #fd8489 +color2 #a9dd9d +color10 #a9dd9d +color3 #f0aa8a +color11 #eed094 +color4 #bdd0e5 +color12 #bdd0e5 +color5 #daccf0 +color13 #daccf0 +color6 #a9dd9d +color14 #a9dd9d +color7 #ffebc3 +color15 #ffebc3 diff --git a/.config/kitty/kitty-themes/themes/FrontEndDelight.conf b/.config/kitty/kitty-themes/themes/FrontEndDelight.conf new file mode 100755 index 0000000..ccbf0d4 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/FrontEndDelight.conf @@ -0,0 +1,21 @@ +background #1b1b1d +foreground #acacac +cursor #cccccc +selection_background #e96153 +color0 #242426 +color8 #5eac6c +color1 #f8501a +color9 #f64319 +color2 #565746 +color10 #74eb4c +color3 #f9761d +color11 #fcc224 +color4 #2c70b7 +color12 #3393c9 +color5 #f02d4e +color13 #e75e4e +color6 #3ba0a5 +color14 #4ebce5 +color7 #acacac +color15 #8b735a +selection_foreground #1b1b1d diff --git a/.config/kitty/kitty-themes/themes/FunForrest.conf b/.config/kitty/kitty-themes/themes/FunForrest.conf new file mode 100755 index 0000000..df8f4ee --- /dev/null +++ b/.config/kitty/kitty-themes/themes/FunForrest.conf @@ -0,0 +1,21 @@ +background #241200 +foreground #ddc165 +cursor #e5591c +selection_background #e5591c +color0 #000000 +color8 #7e6954 +color1 #d5252b +color9 #e4591b +color2 #909b00 +color10 #bfc659 +color3 #bd8a13 +color11 #ffca1b +color4 #4698a2 +color12 #7cc9ce +color5 #8c4231 +color13 #d16349 +color6 #d98112 +color14 #e6a96b +color7 #ddc165 +color15 #ffe9a3 +selection_foreground #241200 diff --git a/.config/kitty/kitty-themes/themes/Galaxy.conf b/.config/kitty/kitty-themes/themes/Galaxy.conf new file mode 100755 index 0000000..fab36a7 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Galaxy.conf @@ -0,0 +1,21 @@ +background #1c2836 +foreground #ffffff +cursor #bbbbbb +selection_background #b4d5ff +color0 #000000 +color8 #545454 +color1 #f9555f +color9 #fa8b8e +color2 #20af89 +color10 #34bb99 +color3 #fdf029 +color11 #ffff55 +color4 #589cf5 +color12 #589cf5 +color5 #934d95 +color13 #e75598 +color6 #1e9ee6 +color14 #3978bb +color7 #bbbbbb +color15 #ffffff +selection_foreground #1c2836 diff --git a/.config/kitty/kitty-themes/themes/Github.conf b/.config/kitty/kitty-themes/themes/Github.conf new file mode 100755 index 0000000..22122d7 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Github.conf @@ -0,0 +1,21 @@ +background #f4f4f4 +foreground #3e3e3e +cursor #3f3f3f +selection_background #a9c1e2 +color0 #3e3e3e +color8 #666666 +color1 #970b16 +color9 #de0000 +color2 #07962a +color10 #87d5a2 +color3 #f7edc7 +color11 #f0cf06 +color4 #003e8a +color12 #2e6cba +color5 #e94691 +color13 #ffa29f +color6 #89d1ec +color14 #1cfafe +color7 #ffffff +color15 #ffffff +selection_foreground #f4f4f4 diff --git a/.config/kitty/kitty-themes/themes/Glacier.conf b/.config/kitty/kitty-themes/themes/Glacier.conf new file mode 100755 index 0000000..08de697 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Glacier.conf @@ -0,0 +1,21 @@ +background #0c1115 +foreground #ffffff +cursor #6c6c6c +selection_background #bd2523 +color0 #2e343c +color8 #404a55 +color1 #bd0f2f +color9 #bd0f2f +color2 #35a770 +color10 #49e998 +color3 #fb9435 +color11 #fddf6e +color4 #1f5872 +color12 #2a8bc1 +color5 #bd2523 +color13 #ea4727 +color6 #778397 +color14 #a0b6d3 +color7 #ffffff +color15 #ffffff +selection_foreground #0c1115 diff --git a/.config/kitty/kitty-themes/themes/GoaBase.conf b/.config/kitty/kitty-themes/themes/GoaBase.conf new file mode 100755 index 0000000..fcc6741 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/GoaBase.conf @@ -0,0 +1,21 @@ +background #2f0033 +foreground #f6ed00 +cursor #1a6500 +selection_background #100a24 +color0 #880041 +color8 #411a6d +color1 #f78000 +color9 #f800e1 +color2 #249000 +color10 #5743ff +color3 #f40000 +color11 #ea00d7 +color4 #000482 +color12 #b90003 +color5 #f43bff +color13 #9a5952 +color6 #3affff +color14 #c8f9f3 +color7 #000000 +color15 #f5f4fb +selection_foreground #2f0033 diff --git a/.config/kitty/kitty-themes/themes/Grape.conf b/.config/kitty/kitty-themes/themes/Grape.conf new file mode 100755 index 0000000..38b8a18 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Grape.conf @@ -0,0 +1,21 @@ +background #161423 +foreground #9e9ea0 +cursor #a188f7 +selection_background #483d70 +color0 #2d283e +color8 #58506a +color1 #ec2160 +color9 #f0719a +color2 #1fa91b +color10 #52a95d +color3 #8ddc1f +color11 #b2dc87 +color4 #487cf4 +color12 #a9bbeb +color5 #8c35c8 +color13 #ac81c1 +color6 #3added +color14 #9ce3ea +color7 #9e9ea0 +color15 #a188f7 +selection_foreground #161423 diff --git a/.config/kitty/kitty-themes/themes/Grass.conf b/.config/kitty/kitty-themes/themes/Grass.conf new file mode 100755 index 0000000..ef9c321 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Grass.conf @@ -0,0 +1,23 @@ +# Theme ported from the Mac Terminal application. + +background #12773d +foreground #fff0a4 +cursor #8b2800 +selection_background #b64825 +color0 #000000 +color8 #545454 +color1 #ba0000 +color9 #ba0000 +color2 #00ba00 +color10 #00ba00 +color3 #e6af00 +color11 #e6af00 +color4 #0000a3 +color12 #0000ba +color5 #950062 +color13 #ff54ff +color6 #00baba +color14 #54ffff +color7 #bababa +color15 #ffffff +selection_foreground #12773d diff --git a/.config/kitty/kitty-themes/themes/GruvboxMaterialDarkHard.conf b/.config/kitty/kitty-themes/themes/GruvboxMaterialDarkHard.conf new file mode 100755 index 0000000..7285bf5 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/GruvboxMaterialDarkHard.conf @@ -0,0 +1,47 @@ +# GruvboxMaterial theme by sainnhe +# License: [MIT License](https://opensource.org/licenses/MIT). + +background #1d2021 +foreground #dfbf8e + +selection_background #dfbf8e +selection_foreground #1d2021 + +active_tab_background #1d2021 +active_tab_foreground #dfbf8e +active_tab_font_style bold-italic +inactive_tab_background #1d2021 +inactive_tab_foreground #a89984 +inactive_tab_font_style normal + +# Black +color0 #665c54 +color8 #928374 + +# Red +color1 #ea6962 +color9 #ea6962 + +# Green +color2 #a9b665 +color10 #a9b665 + +# Yellow +color3 #e78a4e +color11 #e3a84e + +# Blue +color4 #7daea3 +color12 #7daea3 + +# Magenta +color5 #d3869b +color13 #d3869b + +# Cyan +color6 #89b482 +color14 #89b482 + +# White +color7 #dfbf8e +color15 #dfbf8e diff --git a/.config/kitty/kitty-themes/themes/GruvboxMaterialDarkMedium.conf b/.config/kitty/kitty-themes/themes/GruvboxMaterialDarkMedium.conf new file mode 100755 index 0000000..8bd1656 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/GruvboxMaterialDarkMedium.conf @@ -0,0 +1,47 @@ +# GruvboxMaterial theme by sainnhe +# License: [MIT License](https://opensource.org/licenses/MIT). + +background #282828 +foreground #dfbf8e + +selection_background #dfbf8e +selection_foreground #282828 + +active_tab_background #282828 +active_tab_foreground #dfbf8e +active_tab_font_style bold-italic +inactive_tab_background #282828 +inactive_tab_foreground #a89984 +inactive_tab_font_style normal + +# Black +color0 #665c54 +color8 #928374 + +# Red +color1 #ea6962 +color9 #ea6962 + +# Green +color2 #a9b665 +color10 #a9b665 + +# Yellow +color3 #e78a4e +color11 #e3a84e + +# Blue +color4 #7daea3 +color12 #7daea3 + +# Magenta +color5 #d3869b +color13 #d3869b + +# Cyan +color6 #89b482 +color14 #89b482 + +# White +color7 #dfbf8e +color15 #dfbf8e diff --git a/.config/kitty/kitty-themes/themes/GruvboxMaterialDarkSoft.conf b/.config/kitty/kitty-themes/themes/GruvboxMaterialDarkSoft.conf new file mode 100755 index 0000000..8951f34 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/GruvboxMaterialDarkSoft.conf @@ -0,0 +1,47 @@ +# GruvboxMaterial theme by sainnhe +# License: [MIT License](https://opensource.org/licenses/MIT). + +background #32302f +foreground #dfbf8e + +selection_background #dfbf8e +selection_foreground #32302f + +active_tab_background #32302f +active_tab_foreground #dfbf8e +active_tab_font_style bold-italic +inactive_tab_background #32302f +inactive_tab_foreground #a89984 +inactive_tab_font_style normal + +# Black +color0 #665c54 +color8 #928374 + +# Red +color1 #ea6962 +color9 #ea6962 + +# Green +color2 #a9b665 +color10 #a9b665 + +# Yellow +color3 #e78a4e +color11 #e3a84e + +# Blue +color4 #7daea3 +color12 #7daea3 + +# Magenta +color5 #d3869b +color13 #d3869b + +# Cyan +color6 #89b482 +color14 #89b482 + +# White +color7 #dfbf8e +color15 #dfbf8e diff --git a/.config/kitty/kitty-themes/themes/GruvboxMaterialLightHard.conf b/.config/kitty/kitty-themes/themes/GruvboxMaterialLightHard.conf new file mode 100755 index 0000000..b963628 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/GruvboxMaterialLightHard.conf @@ -0,0 +1,47 @@ +# GruvboxMaterial theme by sainnhe +# License: [MIT License](https://opensource.org/licenses/MIT). + +background #f9f5d7 +foreground #764e37 + +selection_background #764e37 +selection_foreground #f9f5d7 + +active_tab_background #f9f5d7 +active_tab_foreground #764e37 +active_tab_font_style bold-italic +inactive_tab_background #f9f5d7 +inactive_tab_foreground #7c6f64 +inactive_tab_font_style normal + +# Black +color0 #bdae93 +color8 #928374 + +# Red +color1 #c74545 +color9 #c74545 + +# Green +color2 #6c782e +color10 #6c782e + +# Yellow +color3 #c55b03 +color11 #b47109 + +# Blue +color4 #47747e +color12 #47747e + +# Magenta +color5 #945e80 +color13 #945e80 + +# Cyan +color6 #4c7a5d +color14 #4c7a5d + +# White +color7 #764e37 +color15 #764e37 diff --git a/.config/kitty/kitty-themes/themes/GruvboxMaterialLightMedium.conf b/.config/kitty/kitty-themes/themes/GruvboxMaterialLightMedium.conf new file mode 100755 index 0000000..47176f4 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/GruvboxMaterialLightMedium.conf @@ -0,0 +1,47 @@ +# GruvboxMaterial theme by sainnhe +# License: [MIT License](https://opensource.org/licenses/MIT). + +background #fbf1c7 +foreground #764e37 + +selection_background #764e37 +selection_foreground #fbf1c7 + +active_tab_background #fbf1c7 +active_tab_foreground #764e37 +active_tab_font_style bold-italic +inactive_tab_background #fbf1c7 +inactive_tab_foreground #7c6f64 +inactive_tab_font_style normal + +# Black +color0 #bdae93 +color8 #928374 + +# Red +color1 #c74545 +color9 #c74545 + +# Green +color2 #6c782e +color10 #6c782e + +# Yellow +color3 #c55b03 +color11 #b47109 + +# Blue +color4 #47747e +color12 #47747e + +# Magenta +color5 #945e80 +color13 #945e80 + +# Cyan +color6 #4c7a5d +color14 #4c7a5d + +# White +color7 #764e37 +color15 #764e37 diff --git a/.config/kitty/kitty-themes/themes/GruvboxMaterialLightSoft.conf b/.config/kitty/kitty-themes/themes/GruvboxMaterialLightSoft.conf new file mode 100755 index 0000000..59bbb84 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/GruvboxMaterialLightSoft.conf @@ -0,0 +1,47 @@ +# GruvboxMaterial theme by sainnhe +# License: [MIT License](https://opensource.org/licenses/MIT). + +background #f2e5bc +foreground #764e37 + +selection_background #764e37 +selection_foreground #f2e5bc + +active_tab_background #f2e5bc +active_tab_foreground #764e37 +active_tab_font_style bold-italic +inactive_tab_background #f2e5bc +inactive_tab_foreground #7c6f64 +inactive_tab_font_style normal + +# Black +color0 #bdae93 +color8 #928374 + +# Red +color1 #c74545 +color9 #c74545 + +# Green +color2 #6c782e +color10 #6c782e + +# Yellow +color3 #c55b03 +color11 #b47109 + +# Blue +color4 #47747e +color12 #47747e + +# Magenta +color5 #945e80 +color13 #945e80 + +# Cyan +color6 #4c7a5d +color14 #4c7a5d + +# White +color7 #764e37 +color15 #764e37 diff --git a/.config/kitty/kitty-themes/themes/HachikoRed.conf b/.config/kitty/kitty-themes/themes/HachikoRed.conf new file mode 100755 index 0000000..0123f29 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/HachikoRed.conf @@ -0,0 +1,46 @@ +## name: Hachiko +## author: Mert18 + +# Cursor colors +cursor #FF7979 +cursor_text_color #111111 + +# Color Schemes +active_tab_foreground #FFFAFA +active_tab_background #B1003C +active_tab_font_style bold +inactive_tab_foreground #B1003C +inactive_tab_background #FFFAFA +tab_bar_margin_color none + +mark1_foreground #FFFAFA +mark1_background #870300 + +active_border_color #FFFAFA +inactive_border_color #870300 +bell_border_color #870300 +visual_bell_color none + +selection_foreground #FFFAFA +selection_background #870300 + +url_color #FF7979 + +color0 #181818 +color8 #333333 +color1 #960042 +color9 #870300 +color2 #FF0000 +color10 #690000 +color3 #FF5D05 +color11 #6F2700 +color4 #FF2044 +color5 #FFEDCF +color12 #333333 +color13 #FFFFB5 +color6 #6F0027 +color14 #F50056 +color7 #FFDAF1 +color15 #FFE6DA +#white + diff --git a/.config/kitty/kitty-themes/themes/Hardcore.conf b/.config/kitty/kitty-themes/themes/Hardcore.conf new file mode 100755 index 0000000..9af78ea --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Hardcore.conf @@ -0,0 +1,21 @@ +background #121212 +foreground #a0a0a0 +cursor #bbbbbb +selection_background #453a39 +color0 #1b1d1e +color8 #505354 +color1 #f92672 +color9 #ff669d +color2 #a6e22e +color10 #beed5f +color3 #fd971f +color11 #e6db74 +color4 #66d9ef +color12 #66d9ef +color5 #9e6ffe +color13 #9e6ffe +color6 #5e7175 +color14 #a3babf +color7 #ccccc6 +color15 #f8f8f2 +selection_foreground #121212 diff --git a/.config/kitty/kitty-themes/themes/Harper.conf b/.config/kitty/kitty-themes/themes/Harper.conf new file mode 100755 index 0000000..2579aac --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Harper.conf @@ -0,0 +1,21 @@ +background #000000 +foreground #a7a39c +cursor #a7a39c +selection_background #5a5753 +color0 #000000 +color8 #716d69 +color1 #f7b63e +color9 #f7b63e +color2 #7fb5e1 +color10 #7fb5e1 +color3 #d6da24 +color11 #d6da24 +color4 #489d48 +color12 #489d48 +color5 #b295c5 +color13 #b295c5 +color6 #f4bed6 +color14 #f4bed6 +color7 #a7a39c +color15 #fefbe9 +selection_foreground #000000 diff --git a/.config/kitty/kitty-themes/themes/Highway.conf b/.config/kitty/kitty-themes/themes/Highway.conf new file mode 100755 index 0000000..f0dfa4d --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Highway.conf @@ -0,0 +1,21 @@ +background #212224 +foreground #ededed +cursor #dfd9b8 +selection_background #384563 +color0 #000000 +color8 #5c4f49 +color1 #cf0d17 +color9 #ef7d17 +color2 #128033 +color10 #b1d130 +color3 #ffca3d +color11 #fff11f +color4 #006ab3 +color12 #4fc2fd +color5 #6a2674 +color13 #de0070 +color6 #384563 +color14 #5c4f49 +color7 #ededed +color15 #fefffe +selection_foreground #212224 diff --git a/.config/kitty/kitty-themes/themes/Hipster_Green.conf b/.config/kitty/kitty-themes/themes/Hipster_Green.conf new file mode 100755 index 0000000..26adfe7 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Hipster_Green.conf @@ -0,0 +1,21 @@ +background #0f0a05 +foreground #84c137 +cursor #23ff18 +selection_background #083905 +color0 #000000 +color8 #666666 +color1 #b6204a +color9 #e50000 +color2 #00a600 +color10 #86a83e +color3 #bebe00 +color11 #e5e500 +color4 #246db2 +color12 #0000ff +color5 #b200b2 +color13 #e500e5 +color6 #00a6b2 +color14 #00e5e5 +color7 #bfbfbf +color15 #e5e5e5 +selection_foreground #0f0a05 diff --git a/.config/kitty/kitty-themes/themes/Homebrew.conf b/.config/kitty/kitty-themes/themes/Homebrew.conf new file mode 100755 index 0000000..d96bb72 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Homebrew.conf @@ -0,0 +1,23 @@ +# Theme ported from the Mac Terminal application. + +background #000000 +foreground #00ff00 +cursor #23ff18 +selection_background #083905 +color0 #000000 +color8 #666666 +color1 #990000 +color9 #e50000 +color2 #00a600 +color10 #00d900 +color3 #999900 +color11 #e5e500 +color4 #0000b2 +color12 #0000ff +color5 #b200b2 +color13 #e500e5 +color6 #00a6b2 +color14 #00e5e5 +color7 #bebebe +color15 #e5e5e5 +selection_foreground #000000 diff --git a/.config/kitty/kitty-themes/themes/Hurtado.conf b/.config/kitty/kitty-themes/themes/Hurtado.conf new file mode 100755 index 0000000..1ca0421 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Hurtado.conf @@ -0,0 +1,21 @@ +background #000000 +foreground #dadbda +cursor #bbbbbb +selection_background #b4d5ff +color0 #575757 +color8 #252525 +color1 #ff1b00 +color9 #d41c00 +color2 #a5df55 +color10 #a5df55 +color3 #fbe74a +color11 #fbe749 +color4 #486387 +color12 #89bdff +color5 #fc5ef0 +color13 #bf00c0 +color6 #85e9fe +color14 #85e9fe +color7 #cbcbcb +color15 #dbdbdb +selection_foreground #000000 diff --git a/.config/kitty/kitty-themes/themes/Hybrid.conf b/.config/kitty/kitty-themes/themes/Hybrid.conf new file mode 100755 index 0000000..8f9dc50 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Hybrid.conf @@ -0,0 +1,21 @@ +background #161718 +foreground #b7bcb9 +cursor #b7bcb9 +selection_background #1e1f22 +color0 #2a2e33 +color8 #1d1e21 +color1 #b74d50 +color9 #8c2d32 +color2 #b3be5a +color10 #788331 +color3 #e3b55e +color11 #e5894f +color4 #6d90b0 +color12 #4b6b88 +color5 #a07eab +color13 #6e4f79 +color6 #7fbeb3 +color14 #4d7b73 +color7 #b5b8b6 +color15 #5a6169 +selection_foreground #161718 diff --git a/.config/kitty/kitty-themes/themes/IC_Green_PPL.conf b/.config/kitty/kitty-themes/themes/IC_Green_PPL.conf new file mode 100755 index 0000000..35587dd --- /dev/null +++ b/.config/kitty/kitty-themes/themes/IC_Green_PPL.conf @@ -0,0 +1,21 @@ +background #3a3c3e +foreground #d9eed2 +cursor #41ff58 +selection_background #2a9b34 +color0 #1e1e1e +color8 #03260f +color1 #fb0029 +color9 #a6ff3e +color2 #329b24 +color10 #9fff6d +color3 #649a25 +color11 #d1ff6d +color4 #149b45 +color12 #72ffb5 +color5 #53b82b +color13 #50ff3d +color6 #2bb767 +color14 #22ff71 +color7 #dffeee +color15 #daeed0 +selection_foreground #3a3c3e diff --git a/.config/kitty/kitty-themes/themes/IC_Orange_PPL.conf b/.config/kitty/kitty-themes/themes/IC_Orange_PPL.conf new file mode 100755 index 0000000..b8dead8 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/IC_Orange_PPL.conf @@ -0,0 +1,21 @@ +background #262626 +foreground #ffcb83 +cursor #fb521c +selection_background #c03f1f +color0 #000000 +color8 #6a4e29 +color1 #c03900 +color9 #ff8b67 +color2 #a3a900 +color10 #f6ff3f +color3 #caae00 +color11 #ffe36e +color4 #bd6c00 +color12 #ffbd54 +color5 #fb5d00 +color13 #fc874f +color6 #f79400 +color14 #c59752 +color7 #ffc88a +color15 #f9f9fe +selection_foreground #262626 diff --git a/.config/kitty/kitty-themes/themes/IR_Black.conf b/.config/kitty/kitty-themes/themes/IR_Black.conf new file mode 100755 index 0000000..5b8709b --- /dev/null +++ b/.config/kitty/kitty-themes/themes/IR_Black.conf @@ -0,0 +1,21 @@ +background #000000 +foreground #f1f1f1 +cursor #7f7f7f +selection_background #b4d5ff +color0 #4f4f4f +color8 #7b7b7b +color1 #fa6c5f +color9 #fcb6af +color2 #a8fe60 +color10 #ceffab +color3 #fffeb6 +color11 #fffecc +color4 #96cafd +color12 #b5dcfe +color5 #fa72fc +color13 #fb9bfe +color6 #c6c4fd +color14 #dfdffd +color7 #eeedee +color15 #fefffe +selection_foreground #000000 diff --git a/.config/kitty/kitty-themes/themes/Jackie_Brown.conf b/.config/kitty/kitty-themes/themes/Jackie_Brown.conf new file mode 100755 index 0000000..08a72e4 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Jackie_Brown.conf @@ -0,0 +1,21 @@ +background #2c1c15 +foreground #ffcc2f +cursor #23ff18 +selection_background #ae8c20 +color0 #2c1d16 +color8 #666666 +color1 #ef5734 +color9 #e50000 +color2 #2baf2b +color10 #86a83e +color3 #bdbe00 +color11 #e5e500 +color4 #246db2 +color12 #0000ff +color5 #cf5ec0 +color13 #e500e5 +color6 #00acee +color14 #00e5e5 +color7 #bfbfbf +color15 #e5e5e5 +selection_foreground #2c1c15 diff --git a/.config/kitty/kitty-themes/themes/Japanesque.conf b/.config/kitty/kitty-themes/themes/Japanesque.conf new file mode 100755 index 0000000..c045273 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Japanesque.conf @@ -0,0 +1,21 @@ +background #1d1d1d +foreground #f7f6ec +cursor #eccf4f +selection_background #165776 +color0 #343835 +color8 #585a58 +color1 #ce3e60 +color9 #d18ea6 +color2 #7bb75b +color10 #767e2b +color3 #e8b32a +color11 #77592e +color4 #4c99d3 +color12 #135879 +color5 #a57fc4 +color13 #5f4190 +color6 #389aac +color14 #76bbca +color7 #f9faf6 +color15 #b1b5ae +selection_foreground #1d1d1d diff --git a/.config/kitty/kitty-themes/themes/Jellybeans.conf b/.config/kitty/kitty-themes/themes/Jellybeans.conf new file mode 100755 index 0000000..bac5fb7 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Jellybeans.conf @@ -0,0 +1,21 @@ +background #111111 +foreground #dedede +cursor #ffa460 +selection_background #464d91 +color0 #919191 +color8 #bdbdbd +color1 #e17373 +color9 #ffa0a0 +color2 #94b978 +color10 #bddeab +color3 #ffb97b +color11 #ffdba0 +color4 #96bddb +color12 #b1d7f6 +color5 #e1c0fa +color13 #fbdaff +color6 #00988e +color14 #19b2a7 +color7 #dedede +color15 #ffffff +selection_foreground #111111 diff --git a/.config/kitty/kitty-themes/themes/JetBrains_Darcula.conf b/.config/kitty/kitty-themes/themes/JetBrains_Darcula.conf new file mode 100755 index 0000000..64ac146 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/JetBrains_Darcula.conf @@ -0,0 +1,21 @@ +background #202020 +foreground #adadad +cursor #ffffff +selection_background #1a3272 +color0 #000000 +color8 #545454 +color1 #fa5355 +color9 #fb7172 +color2 #126e00 +color10 #67ff4f +color3 #c2c300 +color11 #ffff00 +color4 #4581eb +color12 #6d9df1 +color5 #fa54ff +color13 #fb82ff +color6 #33c2c1 +color14 #60d3d1 +color7 #adadad +color15 #eeeeee +selection_foreground #202020 diff --git a/.config/kitty/kitty-themes/themes/Kaolin_Aurora.conf b/.config/kitty/kitty-themes/themes/Kaolin_Aurora.conf new file mode 100755 index 0000000..8604d89 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Kaolin_Aurora.conf @@ -0,0 +1,59 @@ +# vim:ft=kitty + +## name: Kaolin Aurora +## author: Ogden Webb +## license: GNU GPLv3 +## blurb: Kaolin meets polar lights. + + +# The basic colors +foreground #e6e6e8 +background #14191e +selection_foreground #14191e +selection_background #e6e6e8 + +# Cursor colors +cursor #e6e6e8 +cursor_text_color #14191e + +# kitty window border colors +active_border_color #49bdb0 +inactive_border_color #454459 + +# Tab bar colors +active_tab_background #e6e6e8 +active_tab_foreground #14191e +inactive_tab_background #454459 +inactive_tab_foreground #14191e + +# black +color0 #14191e +color8 #454459 + +# red +color1 #e55c7a +color9 #cd5c60 + +# green +color2 #31E183 +color10 #7CF083 + +# yellow +color3 #f5c791 +color11 #dbac66 + +# blue +color4 #4ca6e8 +color12 #91b9c7 + +# magenta +color5 #9d81ba +color13 #6E6884 + +# cyan +color6 #49bdb0 +color14 #0D9C94 + +# white +color7 #e6e6e8 +color15 #f2f2f2 diff --git a/.config/kitty/kitty-themes/themes/Kaolin_Breeze.conf b/.config/kitty/kitty-themes/themes/Kaolin_Breeze.conf new file mode 100755 index 0000000..a1cea32 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Kaolin_Breeze.conf @@ -0,0 +1,59 @@ +# vim:ft=kitty + +## name: Kaolin Breeze +## author: Ogden Webb +## license: GNU GPLv3 +## blurb: Light Kaolin theme with soft colors + + +# The basic colors +foreground #383e3f +background #EBE8E4 +selection_foreground #EBE8E4 +selection_background #383e3f + +# Cursor colors +cursor #383e3f +cursor_text_color #EBE8E4 + +# kitty window border colors +active_border_color #48a9a9 +inactive_border_color #7D8468 + +# Tab bar colors +active_tab_background #383e3f +active_tab_foreground #EBE8E4 +inactive_tab_background #7D8468 +inactive_tab_foreground #EBE8E4 + +# black +color0 #383e3f +color8 #7D8468 + +# red +color1 #cd5c60 +color9 #ef6787 + +# green +color2 #39855f +color10 #3e594e + +# yellow +color3 #b87e3c +color11 #d1832e + +# blue +color4 #2683b5 +color12 #4F9CB8 + +# magenta +color5 #845A84 +color13 #605DB3 + +# cyan +color6 #48a9a9 +color14 #008b8b + +# white +color7 #C9C2BD +color15 #60696b diff --git a/.config/kitty/kitty-themes/themes/Kaolin_Dark.conf b/.config/kitty/kitty-themes/themes/Kaolin_Dark.conf new file mode 100755 index 0000000..5de905c --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Kaolin_Dark.conf @@ -0,0 +1,59 @@ +# vim:ft=kitty + +## name: Kaolin Dark +## author: Ogden Webb +## license: GNU GPLv3 +## blurb: Dark jade theme inspired by Sierra.vim. + + +# The basic colors +foreground #E4E4E8 +background #18181B +selection_foreground #18181B +selection_background #E4E4E8 + +# Cursor colors +cursor #E4E4E8 +cursor_text_color #ffffff + +# kitty window border colors +active_border_color #4D9391 +inactive_border_color #4B5254 + +# Tab bar colors +active_tab_background #E4E4E8 +active_tab_foreground #18181B +inactive_tab_background #879193 +inactive_tab_foreground #18181B + +# black +color0 #4B5254 +color8 #879193 + +# red +color1 #CD5C60 +color9 #E36D5B + +# green +color2 #6FB593 +color10 #72CCBA + +# yellow +color3 #DBAC66 +color11 #F2C866 + +# blue +color4 #91B9C7 +color12 #97B8DE + +# magenta +color5 #845A84 +color13 #8C629C + +# cyan +color6 #4D9391 +color14 #5096AB + +# white +color7 #E4E4E8 +color15 #EFEFF1 diff --git a/.config/kitty/kitty-themes/themes/Kaolin_Galaxy.conf b/.config/kitty/kitty-themes/themes/Kaolin_Galaxy.conf new file mode 100755 index 0000000..4c91c8f --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Kaolin_Galaxy.conf @@ -0,0 +1,59 @@ +# vim:ft=kitty + +## name: Kaolin Galaxy +## author: Ogden Webb +## license: GNU GPLv3 +## blurb: Theme based on one of the Sebastian Andaur arts + + +# The basic colors +foreground #e6e6e8 +background #212026 +selection_foreground #212026 +selection_background #e6e6e8 + +# Cursor colors +cursor #e6e6e8 +cursor_text_color #212026 + +# kitty window border colors +active_border_color #6bd9db +inactive_border_color #615B75 + +# Tab bar colors +active_tab_background #e6e6e8 +active_tab_foreground #212026 +inactive_tab_background #615B75 +inactive_tab_foreground #212026 + +# black +color0 #212026 +color8 #615B75 + +# red +color1 #ef6787 +color9 #D6224D + +# green +color2 #49bdb0 +color10 #6dd797 + +# yellow +color3 #eed891 +color11 #f5c791 + +# blue +color4 #41b0f3 +color12 #2a57cc + +# magenta +color5 #cea2ca +color13 #9d81ba + +# cyan +color6 #6bd9db +color14 #0bc9cf + +# white +color7 #e6e6e8 +color15 #f2f2f2 diff --git a/.config/kitty/kitty-themes/themes/Kaolin_Light.conf b/.config/kitty/kitty-themes/themes/Kaolin_Light.conf new file mode 100755 index 0000000..11fb13f --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Kaolin_Light.conf @@ -0,0 +1,59 @@ +# vim:ft=kitty + +## name: Kaolin Light +## author: Ogden Webb +## license: GNU GPLv3 +## blurb: Light variant of the original Kaolin Dark theme. + + +# The basic colors +foreground #353b3c +background #EDEEEB +selection_foreground #EDEEEB +selection_background #353b3c + +# Cursor colors +cursor #353b3c +cursor_text_color #EDEEEB + +# kitty window border colors +active_border_color #6facb3 +inactive_border_color #353b3c + +# Tab bar colors +active_tab_background #353b3c +active_tab_foreground #EDEEEB +inactive_tab_background #4b5254 +inactive_tab_foreground #EDEEEB + +# black +color0 #353b3c +color8 #4b5254 + +# red +color1 #e84c58 +color9 #e84c58 + +# green +color2 #13665F +color10 #317A56 + +# yellow +color3 #E36B3F +color11 #C5882C + +# blue +color4 #3B84CC +color12 #4C7A90 + +# magenta +color5 #a9779c +color13 #6D46E3 + +# cyan +color6 #6facb3 +color14 #008b8b + +# white +color7 #C8CCC3 +color15 #f5f6f5 diff --git a/.config/kitty/kitty-themes/themes/Kaolin_Ocean.conf b/.config/kitty/kitty-themes/themes/Kaolin_Ocean.conf new file mode 100755 index 0000000..707076f --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Kaolin_Ocean.conf @@ -0,0 +1,59 @@ +# vim:ft=kitty + +## name: Kaolin Ocean +## author: Ogden Webb +## license: GNU GPLv3 +## blurb: Dark blue Kaolin theme + + +# The basic colors +foreground #e6e6e8 +background #14141e +selection_foreground #14141e +selection_background #e6e6e8 + +# Cursor colors +cursor #e6e6e8 +cursor_text_color #14141e + +# kitty window border colors +active_border_color #6bd9db +inactive_border_color #545c5e + +# Tab bar colors +active_tab_background #e6e6e8 +active_tab_foreground #14141e +inactive_tab_background #545c5e +inactive_tab_foreground #14141e + +# black +color0 #14141e +color8 #545c5e + +# red +color1 #e84c58 +color9 #e84c58 + +# green +color2 #35BF88 +color10 #7CF083 + +# yellow +color3 #dbac66 +color11 #eed891 + +# blue +color4 #4ca6e8 +color12 #53859d + +# magenta +color5 #c79af4 +color13 #cea2ca + +# cyan +color6 #6bd9db +color14 #4d9391 + +# white +color7 #e6e6e8 +color15 #bebec4 diff --git a/.config/kitty/kitty-themes/themes/Kaolin_Temple.conf b/.config/kitty/kitty-themes/themes/Kaolin_Temple.conf new file mode 100755 index 0000000..c9cbb65 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Kaolin_Temple.conf @@ -0,0 +1,59 @@ +# vim:ft=kitty + +## name: Kaolin Temple +## author: Ogden Webb +## license: GNU GPLv3 +## blurb: Dark theme where terrestrial sphere imbues the spirit + + +# The basic colors +foreground #EEDCC1 +background #2B2B2F +selection_foreground #2B2B2F +selection_background #EEDCC1 + +# Cursor colors +cursor #EEDCC1 +cursor_text_color #2B2B2F + +# kitty window border colors +active_border_color #49bdb0 +inactive_border_color #697375 + +# Tab bar colors +active_tab_background #EEDCC1 +active_tab_foreground #2B2B2F +inactive_tab_background #697375 +inactive_tab_foreground #2B2B2F + +# black +color0 #2B2B2F +color8 #697375 + +# red +color1 #ef6787 +color9 #BA667D + +# green +color2 #47ba99 +color10 #74B09A + +# yellow +color3 #eed891 +color11 #f5c791 + +# blue +color4 #4EB8CA +color12 #91b9c7 + +# magenta +color5 #fbaed2 +color13 #c791aa + +# cyan +color6 #49bdb0 +color14 #4FA8A3 + +# white +color7 #EEDCC1 +color15 #bebec4 diff --git a/.config/kitty/kitty-themes/themes/Kibble.conf b/.config/kitty/kitty-themes/themes/Kibble.conf new file mode 100755 index 0000000..3b13105 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Kibble.conf @@ -0,0 +1,21 @@ +background #0e100a +foreground #f7f7f7 +cursor #9fda9c +selection_background #9ba686 +color0 #4d4d4d +color8 #5a5a5a +color1 #c70031 +color9 #f01578 +color2 #29cf13 +color10 #6ce05c +color3 #d8e30e +color11 #f3f79e +color4 #3449d1 +color12 #97a4f7 +color5 #8400ff +color13 #c495f0 +color6 #0798ab +color14 #68f2e0 +color7 #e2d1e3 +color15 #ffffff +selection_foreground #0e100a diff --git a/.config/kitty/kitty-themes/themes/Later_This_Evening.conf b/.config/kitty/kitty-themes/themes/Later_This_Evening.conf new file mode 100755 index 0000000..1354788 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Later_This_Evening.conf @@ -0,0 +1,21 @@ +background #212121 +foreground #949494 +cursor #424242 +selection_background #424242 +color0 #2b2b2b +color8 #444747 +color1 #d35a5f +color9 #d3222e +color2 #afba66 +color10 #aabb39 +color3 #e5d289 +color11 #e4bd39 +color4 #a0b9d5 +color12 #6599d5 +color5 #bf92d5 +color13 #aa52d5 +color6 #91beb6 +color14 #5fbfad +color7 #3b3c3c +color15 #c0c2c2 +selection_foreground #212121 diff --git a/.config/kitty/kitty-themes/themes/Lavandula.conf b/.config/kitty/kitty-themes/themes/Lavandula.conf new file mode 100755 index 0000000..14aa7aa --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Lavandula.conf @@ -0,0 +1,21 @@ +background #050014 +foreground #736d7c +cursor #8b91fa +selection_background #36323b +color0 #230045 +color8 #362c45 +color1 #7c1525 +color9 #df5066 +color2 #337e6f +color10 #52e0c4 +color3 #7f6f49 +color11 #e0c286 +color4 #4f4a7f +color12 #8e86df +color5 #593f7e +color13 #a675df +color6 #57767f +color14 #9ad3df +color7 #736d7c +color15 #8b91fa +selection_foreground #050014 diff --git a/.config/kitty/kitty-themes/themes/LiquidCarbon.conf b/.config/kitty/kitty-themes/themes/LiquidCarbon.conf new file mode 100755 index 0000000..2f3a994 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/LiquidCarbon.conf @@ -0,0 +1,21 @@ +background #2f2f2f +foreground #afc2c2 +cursor #ffffff +selection_background #7cbeff +color0 #000000 +color8 #000000 +color1 #ff2f2f +color9 #ff2f2f +color2 #549a6f +color10 #549a6f +color3 #ccac00 +color11 #ccac00 +color4 #0099cc +color12 #0099cc +color5 #cc68c8 +color13 #cc68c8 +color6 #79c4cc +color14 #79c4cc +color7 #bccccc +color15 #bccccc +selection_foreground #2f2f2f diff --git a/.config/kitty/kitty-themes/themes/LiquidCarbonTransparent.conf b/.config/kitty/kitty-themes/themes/LiquidCarbonTransparent.conf new file mode 100755 index 0000000..41e5f89 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/LiquidCarbonTransparent.conf @@ -0,0 +1,21 @@ +background #000000 +foreground #afc2c2 +cursor #ffffff +selection_background #7cbeff +color0 #000000 +color8 #000000 +color1 #ff2f2f +color9 #ff2f2f +color2 #549a6f +color10 #549a6f +color3 #ccac00 +color11 #ccac00 +color4 #0099cc +color12 #0099cc +color5 #cc68c8 +color13 #cc68c8 +color6 #79c4cc +color14 #79c4cc +color7 #bccccc +color15 #bccccc +selection_foreground #000000 diff --git a/.config/kitty/kitty-themes/themes/LiquidCarbonTransparentInverse.conf b/.config/kitty/kitty-themes/themes/LiquidCarbonTransparentInverse.conf new file mode 100755 index 0000000..d584624 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/LiquidCarbonTransparentInverse.conf @@ -0,0 +1,21 @@ +background #000000 +foreground #afc2c2 +cursor #ffffff +selection_background #7cbeff +color0 #bbcbcc +color8 #ffffff +color1 #ff2f2f +color9 #ff2f2f +color2 #549a6f +color10 #549a6f +color3 #ccac00 +color11 #ccac00 +color4 #0099cc +color12 #0099cc +color5 #cc68c8 +color13 #cc68c8 +color6 #79c4cc +color14 #79c4cc +color7 #000000 +color15 #000000 +selection_foreground #000000 diff --git a/.config/kitty/kitty-themes/themes/Man_Page.conf b/.config/kitty/kitty-themes/themes/Man_Page.conf new file mode 100755 index 0000000..7c8aa38 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Man_Page.conf @@ -0,0 +1,23 @@ +# Theme ported from the Mac Terminal application. + +background #fef49c +foreground #000000 +cursor #7f7f7f +selection_background #a4c9cd +color0 #000000 +color8 #666666 +color1 #cc0000 +color9 #e50000 +color2 #00a600 +color10 #00d900 +color3 #999900 +color11 #e5e500 +color4 #0000b2 +color12 #0000ff +color5 #b200b2 +color13 #e500e5 +color6 #00a6b2 +color14 #00e5e5 +color7 #cccccc +color15 #e5e5e5 +selection_foreground #fef49c diff --git a/.config/kitty/kitty-themes/themes/Material.conf b/.config/kitty/kitty-themes/themes/Material.conf new file mode 100755 index 0000000..ba38846 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Material.conf @@ -0,0 +1,21 @@ +background #eaeaea +foreground #222221 +cursor #16aec9 +selection_background #c1c1c1 +color0 #212121 +color8 #424242 +color1 #b7141e +color9 #e83a3f +color2 #457b23 +color10 #7aba39 +color3 #f5971d +color11 #fee92e +color4 #134eb2 +color12 #53a4f3 +color5 #550087 +color13 #a94dbb +color6 #0e707c +color14 #26bad1 +color7 #eeeeee +color15 #d8d8d8 +selection_foreground #eaeaea diff --git a/.config/kitty/kitty-themes/themes/MaterialDark.conf b/.config/kitty/kitty-themes/themes/MaterialDark.conf new file mode 100755 index 0000000..e599021 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/MaterialDark.conf @@ -0,0 +1,21 @@ +background #222221 +foreground #e4e4e4 +cursor #16aec9 +selection_background #dedede +color0 #212121 +color8 #424242 +color1 #b7141e +color9 #e83a3f +color2 #457b23 +color10 #7aba39 +color3 #f5971d +color11 #fee92e +color4 #134eb2 +color12 #53a4f3 +color5 #550087 +color13 #a94dbb +color6 #0e707c +color14 #26bad1 +color7 #eeeeee +color15 #d8d8d8 +selection_foreground #222221 diff --git a/.config/kitty/kitty-themes/themes/Mathias.conf b/.config/kitty/kitty-themes/themes/Mathias.conf new file mode 100755 index 0000000..cd1ab14 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Mathias.conf @@ -0,0 +1,21 @@ +background #000000 +foreground #bbbbbb +cursor #bbbbbb +selection_background #545454 +color0 #000000 +color8 #545454 +color1 #e52222 +color9 #ff5555 +color2 #a6e32d +color10 #55ff55 +color3 #fc951e +color11 #ffff55 +color4 #c48dff +color12 #5555ff +color5 #fa2573 +color13 #ff55ff +color6 #67d9f0 +color14 #55ffff +color7 #f2f2f2 +color15 #ffffff +selection_foreground #000000 diff --git a/.config/kitty/kitty-themes/themes/Medallion.conf b/.config/kitty/kitty-themes/themes/Medallion.conf new file mode 100755 index 0000000..0ad8805 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Medallion.conf @@ -0,0 +1,21 @@ +background #1d1808 +foreground #cac296 +cursor #d3b92f +selection_background #616cab +color0 #000000 +color8 #5e5118 +color1 #b54c00 +color9 #ff9148 +color2 #7c8a16 +color10 #b1c93a +color3 #d2bd25 +color11 #ffe449 +color4 #606baf +color12 #abb8ff +color5 #8b5990 +color13 #fe9fff +color6 #906b25 +color14 #ffbb51 +color7 #c9c199 +color15 #fed597 +selection_foreground #1d1808 diff --git a/.config/kitty/kitty-themes/themes/Misterioso.conf b/.config/kitty/kitty-themes/themes/Misterioso.conf new file mode 100755 index 0000000..1960f9b --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Misterioso.conf @@ -0,0 +1,21 @@ +background #2d3743 +foreground #e1e1e0 +cursor #000000 +selection_background #2d37ff +color0 #000000 +color8 #545454 +color1 #ff4141 +color9 #ff3241 +color2 #74ae68 +color10 #74cc68 +color3 #ffac28 +color11 #ffb928 +color4 #338e86 +color12 #23d6d6 +color5 #9413e5 +color13 #ff37ff +color6 #23d6d6 +color14 #00ece1 +color7 #e1e1df +color15 #ffffff +selection_foreground #2d3743 diff --git a/.config/kitty/kitty-themes/themes/Modus_Operandi.conf b/.config/kitty/kitty-themes/themes/Modus_Operandi.conf new file mode 100755 index 0000000..9197c8a --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Modus_Operandi.conf @@ -0,0 +1,60 @@ +# vim:ft=kitty + +## name: Modus Operandi +## author: Protesilaos Stavrou +## license: GNU GPLv3 +## blurb: Highly accessible themes made for GNU Emacs, conforming with the highest +## standard for colour contrast between background and foreground values (WCAG AAA) + +# The basic colors +foreground #000000 +background #ffffff +selection_foreground #000000 +selection_background #bcbcbc + +# Cursor colors +cursor #000000 +cursor_text_color #ffffff + +# kitty window border colors +active_border_color #5317ac +inactive_border_color #595959 + +# Tab bar colors +active_tab_foreground #ffffff +active_tab_background #000000 +inactive_tab_foreground #bfbfbf +inactive_tab_background #595959 + +# The basic 16 colors +# black +color0 #000000 +color8 #595959 + +# red +color1 #a60000 +color9 #972500 + +# green +color2 #005e00 +color10 #315b00 + +# yellow +color3 #813e00 +color11 #70480f + +# blue +color4 #0031a9 +color12 #2544bb + +# magenta +color5 #721045 +color13 #5317ac + +# cyan +color6 #00538b +color14 #005a5f + +# white +color7 #bfbfbf +color15 #ffffff diff --git a/.config/kitty/kitty-themes/themes/Modus_Operandi_Faint.conf b/.config/kitty/kitty-themes/themes/Modus_Operandi_Faint.conf new file mode 100755 index 0000000..47f365e --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Modus_Operandi_Faint.conf @@ -0,0 +1,59 @@ +# vim:ft=kitty + +## name: Modus Operandi Faint +## author: Protesilaos Stavrou +## license: GNU GPLv3 +## blurb: Highly accessible themes made for GNU Emacs, version with less contrast + +# The basic colors +foreground #101010 +background #fafafa +selection_foreground #101010 +selection_background #bcbcbc + +# Cursor colors +cursor #101010 +cursor_text_color #fafafa + +# kitty window border colors +active_border_color #5317ac +inactive_border_color #595959 + +# Tab bar colors +active_tab_background #fafafa +active_tab_foreground #101010 +inactive_tab_background #595959 +inactive_tab_foreground #fafafa + +# The basic 16 colors +# black +color0 #101010 +color8 #595959 + +# red +color1 #7f1010 +color9 #702f00 + +# green +color2 #104410 +color10 #30440f + +# yellow +color3 #5f4400 +color11 #5d3026 + +# blue +color4 #003497 +color12 #0f3d8c + +# magenta +color5 #752f50 +color13 #7b206f + +# cyan +color6 #005077 +color14 #354f6f + +# white +color7 #bfbfbf +color15 #fafafa diff --git a/.config/kitty/kitty-themes/themes/Modus_Vivendi.conf b/.config/kitty/kitty-themes/themes/Modus_Vivendi.conf new file mode 100755 index 0000000..5a9e9a0 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Modus_Vivendi.conf @@ -0,0 +1,60 @@ +# vim:ft=kitty + +## name: Modus Vivendi +## author: Protesilaos Stavrou +## license: GNU GPLv3 +## blurb: Highly accessible themes made for GNU Emacs, conforming with the highest +## standard for colour contrast between background and foreground values (WCAG AAA) + +# The basic colors +foreground #ffffff +background #000000 +selection_foreground #ffffff +selection_background #3c3c3c + +# Cursor colors +cursor #ffffff +cursor_text_color #000000 + +# kitty window border colors +active_border_color #00d3d0 +inactive_border_color #595959 + +# Tab bar colors +active_tab_foreground #000000 +active_tab_background #ffffff +inactive_tab_foreground #595959 +inactive_tab_background #bfbfbf + +# The basic 16 colors +# black +color0 #000000 +color8 #595959 + +# red +color1 #ff8059 +color9 #ef8b50 + +# green +color2 #44bc44 +color10 #70b900 + +# yellow +color3 #d0bc00 +color11 #c0c530 + +# blue +color4 #2fafff +color12 #79a8ff + +# magenta +color5 #feacd0 +color13 #b6a0ff + +# cyan +color6 #00d3d0 +color14 #6ae4b9 + +# white +color7 #bfbfbf +color15 #ffffff diff --git a/.config/kitty/kitty-themes/themes/Modus_Vivendi_Faint.conf b/.config/kitty/kitty-themes/themes/Modus_Vivendi_Faint.conf new file mode 100755 index 0000000..2f5d068 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Modus_Vivendi_Faint.conf @@ -0,0 +1,59 @@ +# vim:ft=kitty + +## name: Modus Vivendi Faint +## author: Protesilaos Stavrou +## license: GNU GPLv3 +## blurb: Highly accessible themes made for GNU Emacs, version with less contrast + +# The basic colors +foreground #fafafa +background #101010 +selection_foreground #fafafa +selection_background #3c3c3c + +# Cursor colors +cursor #fafafa +cursor_text_color #101010 + +# kitty window border colors +active_border_color #90c4ed +inactive_border_color #595959 + +# Tab bar colors +active_tab_background #fafafa +active_tab_foreground #101010 +inactive_tab_background #595959 +inactive_tab_foreground #fafafa + +# The basic 16 colors +# black +color0 #101010 +color8 #595959 + +# red +color1 #ffa0a0 +color9 #f5aa80 + +# green +color2 #78bf78 +color10 #99b56f + +# yellow +color3 #d2b580 +color11 #cabf77 + +# blue +color4 #82b0ec +color12 #a0acef + +# magenta +color5 #e0b2d6 +color13 #ef9fe4 + +# cyan +color6 #90c4ed +color14 #a0bfdf + +# white +color7 #bfbfbf +color15 #fafafa diff --git a/.config/kitty/kitty-themes/themes/Molokai.conf b/.config/kitty/kitty-themes/themes/Molokai.conf new file mode 100755 index 0000000..cd35d1f --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Molokai.conf @@ -0,0 +1,21 @@ +background #121212 +foreground #bbbbbb +cursor #bbbbbb +selection_background #b4d5ff +color0 #121212 +color8 #545454 +color1 #fa2573 +color9 #f5669c +color2 #97e123 +color10 #b0e05e +color3 #dfd460 +color11 #fef26c +color4 #0f7fcf +color12 #00afff +color5 #8700ff +color13 #af87ff +color6 #42a7cf +color14 #50cdfe +color7 #bbbbbb +color15 #ffffff +selection_foreground #121212 diff --git a/.config/kitty/kitty-themes/themes/MonaLisa.conf b/.config/kitty/kitty-themes/themes/MonaLisa.conf new file mode 100755 index 0000000..3b1602d --- /dev/null +++ b/.config/kitty/kitty-themes/themes/MonaLisa.conf @@ -0,0 +1,21 @@ +background #110b0d +foreground #f6d56a +cursor #c36c32 +selection_background #f6d56a +color0 #341a0d +color8 #874227 +color1 #9b281b +color9 #ff4230 +color2 #626132 +color10 #b3b163 +color3 #c26e27 +color11 #ff9565 +color4 #515b5c +color12 #9eb2b3 +color5 #9b1d29 +color13 #ff5b6a +color6 #588056 +color14 #89cc8e +color7 #f6d75c +color15 #ffe597 +selection_foreground #110b0d diff --git a/.config/kitty/kitty-themes/themes/Monokai.conf b/.config/kitty/kitty-themes/themes/Monokai.conf new file mode 100755 index 0000000..660c0cc --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Monokai.conf @@ -0,0 +1,41 @@ +# Monokai + +background #272822 +foreground #f8f8f2 +cursor #f8f8f2 +selection_background #f8f8f2 +selection_foreground #272822 +active_tab_background #75715e +active_tab_foreground #272822 +active_border_color #75715e +inactive_tab_background #272822 +inactive_tab_foreground #75715e +inactive_border_color #75715e +url_color #f8f8f2 + +# 16 Color Space + +# black +color0 #272822 +color8 #75715e +# red +color1 #f92672 +color9 #f92672 +# green +color2 #a6e22e +color10 #a6e22e +# yellow +color3 #e6db74 +color11 #e6db74 +# blue +color4 #66d9ef +color12 #66d9ef +# magenta +color5 #fd971f +color13 #fd971f +# cyan +color6 #ae81ff +color14 #ae81ff +# white +color7 #f8f8f2 +color15 #f8f8f2 diff --git a/.config/kitty/kitty-themes/themes/Monokai_Classic.conf b/.config/kitty/kitty-themes/themes/Monokai_Classic.conf new file mode 100755 index 0000000..9c74f40 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Monokai_Classic.conf @@ -0,0 +1,47 @@ +background #3b3c35 +foreground #fdfff1 + +cursor #fdfff1 +cursor_text_color #000000 +selection_foreground #3b3c35 +selection_background #fdfff1 + +# dull black +color0 #3b3c35 +# light black +color8 #6e7066 + +# dull red +color1 #f82570 +# light red +color9 #f82570 + +# dull green +color2 #a6e12d +# light green +color10 #a6e12d + +# yellow +color3 #e4db73 +# light yellow +color11 #e4db73 + +# blue +color4 #fc961f +# light blue +color12 #fc961f + +# magenta +color5 #ae81ff +# light magenta +color13 #ae81ff + +# cyan +color6 #66d9ee +# light cyan +color14 #66d9ee + +# dull white +color7 #fdfff1 +# bright white +color15 #fdfff1 diff --git a/.config/kitty/kitty-themes/themes/Monokai_Pro.conf b/.config/kitty/kitty-themes/themes/Monokai_Pro.conf new file mode 100755 index 0000000..f5a2e8c --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Monokai_Pro.conf @@ -0,0 +1,47 @@ +background #403e41 +foreground #fcfcfa + +cursor #fcfcfa +cursor_text_color #000000 +selection_foreground #403e41 +selection_background #fcfcfa + +# dull black +color0 #403e41 +# light black +color8 #727072 + +# dull red +color1 #ff6188 +# light red +color9 #ff6188 + +# dull green +color2 #a9dc76 +# light green +color10 #a9dc76 + +# yellow +color3 #ffd866 +# light yellow +color11 #ffd866 + +# blue +color4 #fc9867 +# light blue +color12 #fc9867 + +# magenta +color5 #ab9df2 +# light magenta +color13 #ab9df2 + +# cyan +color6 #78dce8 +# light cyan +color14 #78dce8 + +# dull white +color7 #fcfcfa +# bright white +color15 #fcfcfa diff --git a/.config/kitty/kitty-themes/themes/Monokai_Pro_(Filter_Machine).conf b/.config/kitty/kitty-themes/themes/Monokai_Pro_(Filter_Machine).conf new file mode 100755 index 0000000..b46e1d3 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Monokai_Pro_(Filter_Machine).conf @@ -0,0 +1,47 @@ +background #3a4449 +foreground #f2fffc + +cursor #f2fffc +cursor_text_color #000000 +selection_foreground #3a4449 +selection_background #f2fffc + +# dull black +color0 #3a4449 +# light black +color8 #6b7678 + +# dull red +color1 #ff6d7e +# light red +color9 #ff6d7e + +# dull green +color2 #a2e57b +# light green +color10 #a2e57b + +# yellow +color3 #ffed72 +# light yellow +color11 #ffed72 + +# blue +color4 #ffb270 +# light blue +color12 #ffb270 + +# magenta +color5 #baa0f8 +# light magenta +color13 #baa0f8 + +# cyan +color6 #7cd5f1 +# light cyan +color14 #7cd5f1 + +# dull white +color7 #f2fffc +# bright white +color15 #f2fffc diff --git a/.config/kitty/kitty-themes/themes/Monokai_Pro_(Filter_Octagon).conf b/.config/kitty/kitty-themes/themes/Monokai_Pro_(Filter_Octagon).conf new file mode 100755 index 0000000..3aee34a --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Monokai_Pro_(Filter_Octagon).conf @@ -0,0 +1,47 @@ +background #3a3d4b +foreground #eaf2f1 + +cursor #eaf2f1 +cursor_text_color #000000 +selection_foreground #3a3d4b +selection_background #eaf2f1 + +# dull black +color0 #3a3d4b +# light black +color8 #696d77 + +# dull red +color1 #ff657a +# light red +color9 #ff657a + +# dull green +color2 #bad761 +# light green +color10 #bad761 + +# yellow +color3 #ffd76d +# light yellow +color11 #ffd76d + +# blue +color4 #ff9b5e +# light blue +color12 #ff9b5e + +# magenta +color5 #c39ac9 +# light magenta +color13 #c39ac9 + +# cyan +color6 #9cd1bb +# light cyan +color14 #9cd1bb + +# dull white +color7 #eaf2f1 +# bright white +color15 #eaf2f1 diff --git a/.config/kitty/kitty-themes/themes/Monokai_Pro_(Filter_Ristretto).conf b/.config/kitty/kitty-themes/themes/Monokai_Pro_(Filter_Ristretto).conf new file mode 100755 index 0000000..599b0e1 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Monokai_Pro_(Filter_Ristretto).conf @@ -0,0 +1,47 @@ +background #403838 +foreground #fff1f3 + +cursor #fff1f3 +cursor_text_color #000000 +selection_foreground #403838 +selection_background #fff1f3 + +# dull black +color0 #403838 +# light black +color8 #72696a + +# dull red +color1 #fd6883 +# light red +color9 #fd6883 + +# dull green +color2 #adda78 +# light green +color10 #adda78 + +# yellow +color3 #f9cc6c +# light yellow +color11 #f9cc6c + +# blue +color4 #f38d70 +# light blue +color12 #f38d70 + +# magenta +color5 #a8a9eb +# light magenta +color13 #a8a9eb + +# cyan +color6 #85dacc +# light cyan +color14 #85dacc + +# dull white +color7 #fff1f3 +# bright white +color15 #fff1f3 diff --git a/.config/kitty/kitty-themes/themes/Monokai_Pro_(Filter_Spectrum).conf b/.config/kitty/kitty-themes/themes/Monokai_Pro_(Filter_Spectrum).conf new file mode 100755 index 0000000..5617a6d --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Monokai_Pro_(Filter_Spectrum).conf @@ -0,0 +1,47 @@ +background #363537 +foreground #f7f1ff + +cursor #f7f1ff +cursor_text_color #000000 +selection_foreground #363537 +selection_background #f7f1ff + +# dull black +color0 #363537 +# light black +color8 #69676c + +# dull red +color1 #fc618d +# light red +color9 #fc618d + +# dull green +color2 #7bd88f +# light green +color10 #7bd88f + +# yellow +color3 #fce566 +# light yellow +color11 #fce566 + +# blue +color4 #fd9353 +# light blue +color12 #fd9353 + +# magenta +color5 #948ae3 +# light magenta +color13 #948ae3 + +# cyan +color6 #5ad4e6 +# light cyan +color14 #5ad4e6 + +# dull white +color7 #f7f1ff +# bright white +color15 #f7f1ff diff --git a/.config/kitty/kitty-themes/themes/Monokai_Soda.conf b/.config/kitty/kitty-themes/themes/Monokai_Soda.conf new file mode 100755 index 0000000..eb7a24d --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Monokai_Soda.conf @@ -0,0 +1,21 @@ +background #191919 +foreground #c4c4b5 +cursor #f6f6ec +selection_background #343434 +color0 #191919 +color8 #615e4b +color1 #f3005f +color9 #f3005f +color2 #97e023 +color10 #97e023 +color3 #fa8419 +color11 #dfd561 +color4 #9c64fe +color12 #9c64fe +color5 #f3005f +color13 #f3005f +color6 #57d1ea +color14 #57d1ea +color7 #c4c4b5 +color15 #f6f6ee +selection_foreground #191919 diff --git a/.config/kitty/kitty-themes/themes/N0tch2k.conf b/.config/kitty/kitty-themes/themes/N0tch2k.conf new file mode 100755 index 0000000..3e2bb6c --- /dev/null +++ b/.config/kitty/kitty-themes/themes/N0tch2k.conf @@ -0,0 +1,21 @@ +background #222222 +foreground #a0a0a0 +cursor #a99075 +selection_background #4d4d4d +color0 #383838 +color8 #474747 +color1 #a95551 +color9 #a97775 +color2 #666666 +color10 #8c8c8c +color3 #a98051 +color11 #a99175 +color4 #657d3e +color12 #98bd5e +color5 #767676 +color13 #a3a3a3 +color6 #c9c9c9 +color14 #dcdcdc +color7 #d0b8a3 +color15 #d8c8bb +selection_foreground #222222 diff --git a/.config/kitty/kitty-themes/themes/Neopolitan.conf b/.config/kitty/kitty-themes/themes/Neopolitan.conf new file mode 100755 index 0000000..2c6ffce --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Neopolitan.conf @@ -0,0 +1,21 @@ +background #271f19 +foreground #ffffff +cursor #ffffff +selection_background #253b76 +color0 #000000 +color8 #000000 +color1 #800000 +color9 #800000 +color2 #61ce3c +color10 #61ce3c +color3 #fbde2d +color11 #fbde2d +color4 #253b76 +color12 #253b76 +color5 #ff0080 +color13 #ff0080 +color6 #8da6ce +color14 #8da6ce +color7 #f8f8f8 +color15 #f8f8f8 +selection_foreground #271f19 diff --git a/.config/kitty/kitty-themes/themes/Neutron.conf b/.config/kitty/kitty-themes/themes/Neutron.conf new file mode 100755 index 0000000..9f2fe4d --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Neutron.conf @@ -0,0 +1,21 @@ +background #1b1d22 +foreground #e6e8ee +cursor #f6f6ec +selection_background #2e353d +color0 #22252b +color8 #22252b +color1 #b53f36 +color9 #b53f36 +color2 #5ab977 +color10 #5ab977 +color3 #ddb566 +color11 #ddb566 +color4 #6a7b92 +color12 #6a7b92 +color5 #a3799d +color13 #a3799d +color6 #3f93a8 +color14 #3f93a8 +color7 #e6e8ee +color15 #ebedf2 +selection_foreground #1b1d22 diff --git a/.config/kitty/kitty-themes/themes/NightLion_v1.conf b/.config/kitty/kitty-themes/themes/NightLion_v1.conf new file mode 100755 index 0000000..1021c46 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/NightLion_v1.conf @@ -0,0 +1,21 @@ +background #000000 +foreground #bbbbbb +cursor #bbbbbb +selection_background #b4d5ff +color0 #4c4c4c +color8 #545454 +color1 #bb0000 +color9 #ff5555 +color2 #5ede8f +color10 #55ff55 +color3 #f2f067 +color11 #ffff55 +color4 #266ad7 +color12 #5555ff +color5 #bb00bb +color13 #ff55ff +color6 #00d9df +color14 #55ffff +color7 #bbbbbb +color15 #ffffff +selection_foreground #000000 diff --git a/.config/kitty/kitty-themes/themes/NightLion_v2.conf b/.config/kitty/kitty-themes/themes/NightLion_v2.conf new file mode 100755 index 0000000..aed7f8d --- /dev/null +++ b/.config/kitty/kitty-themes/themes/NightLion_v2.conf @@ -0,0 +1,21 @@ +background #171717 +foreground #bbbbbb +cursor #bbbbbb +selection_background #b4d5ff +color0 #4c4c4c +color8 #545454 +color1 #bb0000 +color9 #ff5555 +color2 #03f622 +color10 #7df61c +color3 #f2f067 +color11 #ffff55 +color4 #63d0f0 +color12 #62cae7 +color5 #ce6fda +color13 #ff9af5 +color6 #00d9df +color14 #00ccd7 +color7 #bbbbbb +color15 #ffffff +selection_foreground #171717 diff --git a/.config/kitty/kitty-themes/themes/Nord.conf b/.config/kitty/kitty-themes/themes/Nord.conf new file mode 100755 index 0000000..f48ac3d --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Nord.conf @@ -0,0 +1,50 @@ +# vim:ft=kitty +## name: Nord +## author: Connor Holyday +## license: MIT +## upstream: https://raw.githubusercontent.com/connorholyday/nord-kitty/master/nord.conf +## blurb: An arctic, north-bluish clean and elegant Kitty theme. + +# Nord Colorscheme for Kitty +# Based on: +# - https://gist.github.com/marcusramberg/64010234c95a93d953e8c79fdaf94192 +# - https://github.com/arcticicestudio/nord-hyper + +foreground #D8DEE9 +background #2E3440 +selection_foreground #000000 +selection_background #FFFACD +url_color #0087BD +cursor #81A1C1 + +# black +color0 #3B4252 +color8 #4C566A + +# red +color1 #BF616A +color9 #BF616A + +# green +color2 #A3BE8C +color10 #A3BE8C + +# yellow +color3 #EBCB8B +color11 #EBCB8B + +# blue +color4 #81A1C1 +color12 #81A1C1 + +# magenta +color5 #B48EAD +color13 #B48EAD + +# cyan +color6 #88C0D0 +color14 #8FBCBB + +# white +color7 #E5E9F0 +color15 #ECEFF4 diff --git a/.config/kitty/kitty-themes/themes/Nova.conf b/.config/kitty/kitty-themes/themes/Nova.conf new file mode 100755 index 0000000..c3f2da1 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Nova.conf @@ -0,0 +1,21 @@ +background #3c4c54 +foreground #8798a3 +cursor #7fc1c9 +color0 #8799a4 +color8 #c4d3dc +color1 #efc08d +color9 #ef8358 +color2 #a6cb91 +color10 #a8ce93 +color3 #d7d690 +color11 #e5e77f +color4 #83afe4 +color12 #69c8ff +color5 #d460da +color13 #d18ec2 +color6 #7fc1b6 +color14 #00e59f +color7 #c4d3dc +color15 #e6eef3 +selection_foreground #3c4c54 +selection_background #7fc1ca diff --git a/.config/kitty/kitty-themes/themes/Novel.conf b/.config/kitty/kitty-themes/themes/Novel.conf new file mode 100755 index 0000000..03220e3 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Novel.conf @@ -0,0 +1,23 @@ +# Theme ported from the Mac Terminal application. + +background #dfdbc3 +foreground #3b2322 +cursor #73635a +selection_background #a4a390 +color0 #000000 +color8 #7f7f7f +color1 #cc0000 +color9 #cc0000 +color2 #009600 +color10 #009600 +color3 #d06b00 +color11 #d06b00 +color4 #0000cc +color12 #0000cc +color5 #cc00cc +color13 #cc00cc +color6 #0087cc +color14 #0086cb +color7 #cccccc +color15 #ffffff +selection_foreground #dfdbc3 diff --git a/.config/kitty/kitty-themes/themes/Obsidian.conf b/.config/kitty/kitty-themes/themes/Obsidian.conf new file mode 100755 index 0000000..7265d44 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Obsidian.conf @@ -0,0 +1,21 @@ +background #273032 +foreground #cccccc +cursor #c0cad0 +selection_background #3d4b4e +color0 #000000 +color8 #545454 +color1 #a50001 +color9 #ff0003 +color2 #00bb00 +color10 #92c763 +color3 #fecc22 +color11 #fef773 +color4 #399bda +color12 #a0d6ff +color5 #bb00bb +color13 #ff55ff +color6 #00bbbb +color14 #55ffff +color7 #bbbbbb +color15 #ffffff +selection_foreground #273032 diff --git a/.config/kitty/kitty-themes/themes/Ocean.conf b/.config/kitty/kitty-themes/themes/Ocean.conf new file mode 100755 index 0000000..ad6205a --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Ocean.conf @@ -0,0 +1,23 @@ +# Theme ported from the Mac Terminal application. + +background #214fbc +foreground #ffffff +cursor #7f7f7f +selection_background #216dff +color0 #000000 +color8 #666666 +color1 #990000 +color9 #e50000 +color2 #00a600 +color10 #00d900 +color3 #999900 +color11 #e5e500 +color4 #0000b2 +color12 #0000ff +color5 #b200b2 +color13 #e500e5 +color6 #00a6b2 +color14 #00e5e5 +color7 #bebebe +color15 #e5e5e5 +selection_foreground #214fbc diff --git a/.config/kitty/kitty-themes/themes/OceanicMaterial.conf b/.config/kitty/kitty-themes/themes/OceanicMaterial.conf new file mode 100755 index 0000000..9403518 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/OceanicMaterial.conf @@ -0,0 +1,21 @@ +background #1c262b +foreground #c1c8d6 +cursor #b2b8c3 +selection_background #6dc1b8 +color0 #000000 +color8 #767676 +color1 #ee2a29 +color9 #dc5b60 +color2 #3fa33f +color10 #70be71 +color3 #fee92e +color11 #fef063 +color4 #1d80ef +color12 #53a4f3 +color5 #8800a0 +color13 #a94dbb +color6 #16aec9 +color14 #42c6d9 +color7 #a4a4a4 +color15 #fffefe +selection_foreground #1c262b diff --git a/.config/kitty/kitty-themes/themes/Ollie.conf b/.config/kitty/kitty-themes/themes/Ollie.conf new file mode 100755 index 0000000..66eecf5 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Ollie.conf @@ -0,0 +1,21 @@ +background #212024 +foreground #8a8dae +cursor #5b6da7 +selection_background #1e3965 +color0 #000000 +color8 #5a3625 +color1 #ab2e30 +color9 #ff3d48 +color2 #31ab60 +color10 #3bff99 +color3 #ab4200 +color11 #ff5e1e +color4 #2c56ab +color12 #4487ff +color5 #af8427 +color13 #ffc21c +color6 #1fa5ab +color14 #1efaff +color7 #8a8dab +color15 #5b6da7 +selection_foreground #212024 diff --git a/.config/kitty/kitty-themes/themes/OneDark.conf b/.config/kitty/kitty-themes/themes/OneDark.conf new file mode 100755 index 0000000..2cdbb2f --- /dev/null +++ b/.config/kitty/kitty-themes/themes/OneDark.conf @@ -0,0 +1,32 @@ +# One Dark by Giuseppe Cesarano, https://github.com/GiuseppeCesarano +# This work is licensed under the terms of the GPL-2.0 license. +# For a copy, see https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html. + +# Colors + +foreground #979eab +background #282c34 + +color0 #282c34 +color1 #e06c75 +color2 #98c379 +color3 #e5c07b +color4 #61afef +color5 #be5046 +color6 #56b6c2 +color7 #979eab +color8 #393e48 +color9 #d19a66 +color10 #56b6c2 +color11 #e5c07b +color12 #61afef +color13 #be5046 +color14 #56b6c2 +color15 #abb2bf + +# Tab Bar + +active_tab_foreground #282c34 +active_tab_background #979eab +inactive_tab_foreground #abb2bf +inactive_tab_background #282c34 diff --git a/.config/kitty/kitty-themes/themes/OneHalf.conf b/.config/kitty/kitty-themes/themes/OneHalf.conf new file mode 100755 index 0000000..505fe13 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/OneHalf.conf @@ -0,0 +1,41 @@ +# Onehalf Colorscheme for Kitty +# Based on https://github.com/sonph/onehalf +# By https://github.com/dbinary + +foreground #dcdfe4 +background #282c34 +selection_foreground #000000 +selection_background #FFFACD +url_color #0087BD + +# black +color0 #282c34 +color8 #282c36 + +# red +color1 #e06c75 +color9 #e06c75 + +# green +color2 #98c379 +color10 #98c379 + +# yellow +color3 #e5c07b +color11 #e5c07b + +# blue +color4 #61afef +color12 #61afef + +# magenta +color5 #c678dd +color13 #c678dd + +# cyan +color6 #56b6c2 +color14 #56b6c2 + +# white +color7 #dcdfe4 +color15 #dcdfe4 diff --git a/.config/kitty/kitty-themes/themes/OneHalfLight.conf b/.config/kitty/kitty-themes/themes/OneHalfLight.conf new file mode 100755 index 0000000..156b6bf --- /dev/null +++ b/.config/kitty/kitty-themes/themes/OneHalfLight.conf @@ -0,0 +1,43 @@ +# Onehalf Light Colorscheme for Kitty +# Based on https://github.com/sonph/onehalf +# By https://github.com/dbinary + +macos_titlebar_color #FAFAFA + +foreground #383A42 +background #FAFAFA +selection_foreground #383A42 +selection_background #BFCEFF +url_color #F0F0F0 + +# black +color0 #383A42 +color8 #383A42 + +# red +color1 #E45649 +color9 #E45649 + +# green +color2 #40A14F +color10 #40A14F + +# yellow +color3 #C18401 +color11 #C18401 + +# blue +color4 #0184BC +color12 #0184BC + +# magenta +color5 #A626A4 +color13 #A626A4 + +# cyan +color6 #0997B3 +color14 #0997B3 + +# white +color7 #FAFAFA +color15 #FAFAFA diff --git a/.config/kitty/kitty-themes/themes/PaperColor_dark.conf b/.config/kitty/kitty-themes/themes/PaperColor_dark.conf new file mode 100755 index 0000000..4c6e8c1 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/PaperColor_dark.conf @@ -0,0 +1,44 @@ +# vim:ft=kitty + +## name: PaperColor Dark +## author: Nikyle Nguyen +## license: [MIT License](https://opensource.org/licenses/MIT) +## blurb: Dark color scheme inspired by Google's Material Design + +# special +foreground #d0d0d0 +background #1c1c1c +cursor #d0d0d0 +cursor_text_color background + +# black +color0 #1c1c1c +color8 #585858 + +# red +color1 #af005f +color9 #5faf5f + +# green +color2 #5faf00 +color10 #afd700 + +# yellow +color3 #d7af5f +color11 #af87d7 + +# blue +color4 #5fafd7 +color12 #ffaf00 + +# magenta +color5 #808080 +color13 #ff5faf + +# cyan +color6 #d7875f +color14 #00afaf + +# white +color7 #d0d0d0 +color15 #5f8787 diff --git a/.config/kitty/kitty-themes/themes/PaperColor_light.conf b/.config/kitty/kitty-themes/themes/PaperColor_light.conf new file mode 100755 index 0000000..233971d --- /dev/null +++ b/.config/kitty/kitty-themes/themes/PaperColor_light.conf @@ -0,0 +1,44 @@ +# vim:ft=kitty + +## name: PaperColor Light +## author: Nikyle Nguyen +## license: [MIT License](https://opensource.org/licenses/MIT) +## blurb: Light color scheme inspired by Google's Material Design + +# special +foreground #444444 +background #eeeeee +cursor #444444 +cursor_text_color background + +# black +color0 #eeeeee +color8 #bcbcbc + +# red +color1 #af0000 +color9 #d70000 + +# green +color2 #008700 +color10 #d70087 + +# yellow +color3 #5f8700 +color11 #8700af + +# blue +color4 #0087af +color12 #d75f00 + +# magenta +color5 #878787 +color13 #d75f00 + +# cyan +color6 #005f87 +color14 #005faf + +# white +color7 #444444 +color15 #005f87 diff --git a/.config/kitty/kitty-themes/themes/Parasio_Dark.conf b/.config/kitty/kitty-themes/themes/Parasio_Dark.conf new file mode 100755 index 0000000..4cc1e8d --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Parasio_Dark.conf @@ -0,0 +1,21 @@ +background #2f1d2e +foreground #a39d9b +cursor #a39d9b +selection_background #4f414c +color0 #2f1d2e +color8 #776d70 +color1 #ef6154 +color9 #ef6154 +color2 #48b685 +color10 #48b685 +color3 #fec418 +color11 #fec418 +color4 #05b6ef +color12 #05b6ef +color5 #805ba3 +color13 #805ba3 +color6 #5bc4be +color14 #5bc4be +color7 #a39d9b +color15 #e6e9da +selection_foreground #2f1d2e diff --git a/.config/kitty/kitty-themes/themes/PaulMillr.conf b/.config/kitty/kitty-themes/themes/PaulMillr.conf new file mode 100755 index 0000000..72cc95c --- /dev/null +++ b/.config/kitty/kitty-themes/themes/PaulMillr.conf @@ -0,0 +1,21 @@ +background #000000 +foreground #f1f1f1 +cursor #4c4c4c +selection_background #414141 +color0 #2a2a2a +color8 #666666 +color1 #ff0000 +color9 #ff007f +color2 #78ff0e +color10 #66ff66 +color3 #e6be00 +color11 #f3d64d +color4 #396ad6 +color12 #7099ec +color5 #b348bd +color13 #da66e5 +color6 #66ccff +color14 #79def1 +color7 #bababa +color15 #ffffff +selection_foreground #000000 diff --git a/.config/kitty/kitty-themes/themes/PencilDark.conf b/.config/kitty/kitty-themes/themes/PencilDark.conf new file mode 100755 index 0000000..3926f6c --- /dev/null +++ b/.config/kitty/kitty-themes/themes/PencilDark.conf @@ -0,0 +1,21 @@ +background #202020 +foreground #f0f0f0 +cursor #20bafb +selection_background #b6d6fc +color0 #202020 +color8 #414141 +color1 #c30670 +color9 #fb0079 +color2 #10a778 +color10 #5ed6ae +color3 #a79c14 +color11 #f3e42f +color4 #008ec4 +color12 #20bafb +color5 #523b78 +color13 #6854de +color6 #20a4b9 +color14 #4fb8cc +color7 #d9d9d9 +color15 #f0f0f0 +selection_foreground #202020 diff --git a/.config/kitty/kitty-themes/themes/PencilLight.conf b/.config/kitty/kitty-themes/themes/PencilLight.conf new file mode 100755 index 0000000..4311c70 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/PencilLight.conf @@ -0,0 +1,21 @@ +background #f0f0f0 +foreground #414141 +cursor #20bafb +selection_background #b6d6fc +color0 #202020 +color8 #414141 +color1 #c30670 +color9 #fb0079 +color2 #10a778 +color10 #5ed6ae +color3 #a79c14 +color11 #f3e42f +color4 #008ec4 +color12 #20bafb +color5 #523b78 +color13 #6854de +color6 #20a4b9 +color14 #4fb8cc +color7 #d9d9d9 +color15 #f0f0f0 +selection_foreground #f0f0f0 diff --git a/.config/kitty/kitty-themes/themes/Piatto_Light.conf b/.config/kitty/kitty-themes/themes/Piatto_Light.conf new file mode 100755 index 0000000..401fe91 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Piatto_Light.conf @@ -0,0 +1,21 @@ +background #ffffff +foreground #414141 +cursor #5e76c7 +selection_background #6f6a4e +color0 #414141 +color8 #3e3e3e +color1 #b23670 +color9 #da3365 +color2 #66781d +color10 #829428 +color3 #cc6e33 +color11 #cc6e33 +color4 #3b5ea7 +color12 #3b5ea7 +color5 #a353b2 +color13 #a353b2 +color6 #66781d +color14 #829428 +color7 #ffffff +color15 #f1f1f1 +selection_foreground #ffffff diff --git a/.config/kitty/kitty-themes/themes/Pnevma.conf b/.config/kitty/kitty-themes/themes/Pnevma.conf new file mode 100755 index 0000000..1dda097 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Pnevma.conf @@ -0,0 +1,21 @@ +background #1c1c1c +foreground #d0d0d0 +cursor #e3c8ae +selection_background #4d4d4d +color0 #2f2e2d +color8 #4a4845 +color1 #a36666 +color9 #d78787 +color2 #90a57d +color10 #afbea2 +color3 #d7af87 +color11 #e4c9af +color4 #7fa5bd +color12 #a1bdce +color5 #c79ec4 +color13 #d7beda +color6 #8adbb4 +color14 #b1e7dd +color7 #d0d0d0 +color15 #efefef +selection_foreground #1c1c1c diff --git a/.config/kitty/kitty-themes/themes/Pro.conf b/.config/kitty/kitty-themes/themes/Pro.conf new file mode 100755 index 0000000..6ffc047 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Pro.conf @@ -0,0 +1,23 @@ +# Theme ported from the Mac Terminal application. + +background #000000 +foreground #f2f2f2 +cursor #4d4d4d +selection_background #414141 +color0 #000000 +color8 #666666 +color1 #990000 +color9 #e50000 +color2 #00a600 +color10 #00d900 +color3 #999900 +color11 #e5e500 +color4 #1f08db +color12 #0000ff +color5 #b200b2 +color13 #e500e5 +color6 #00a6b2 +color14 #00e5e5 +color7 #bfbfbf +color15 #e5e5e5 +selection_foreground #000000 diff --git a/.config/kitty/kitty-themes/themes/Red_Alert.conf b/.config/kitty/kitty-themes/themes/Red_Alert.conf new file mode 100755 index 0000000..020429a --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Red_Alert.conf @@ -0,0 +1,21 @@ +background #762423 +foreground #ffffff +cursor #ffffff +selection_background #073642 +color0 #000000 +color8 #262626 +color1 #d52e4d +color9 #e02453 +color2 #71be6b +color10 #aff08b +color3 #beb86b +color11 #dfddb7 +color4 #479bed +color12 #65a9f0 +color5 #e878d6 +color13 #ddb7df +color6 #6bbeb8 +color14 #b7dfdd +color7 #d6d6d6 +color15 #ffffff +selection_foreground #762423 diff --git a/.config/kitty/kitty-themes/themes/Red_Sands.conf b/.config/kitty/kitty-themes/themes/Red_Sands.conf new file mode 100755 index 0000000..a491f3d --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Red_Sands.conf @@ -0,0 +1,23 @@ +# Theme ported from the Mac Terminal application. + +background #79241d +foreground #d6c8a7 +cursor #ffffff +selection_background #a4a390 +color0 #000000 +color8 #545454 +color1 #ff3e00 +color9 #ba0000 +color2 #00ba00 +color10 #00ba00 +color3 #e6af00 +color11 #e6af00 +color4 #0071ff +color12 #0071ae +color5 #ba00ba +color13 #ff54ff +color6 #00baba +color14 #54ffff +color7 #bababa +color15 #ffffff +selection_foreground #79241d diff --git a/.config/kitty/kitty-themes/themes/Relaxed_Afterglow.conf b/.config/kitty/kitty-themes/themes/Relaxed_Afterglow.conf new file mode 100755 index 0000000..5988777 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Relaxed_Afterglow.conf @@ -0,0 +1,25 @@ +# Relaxed Afterglow by Michael Kühnel , https://github.com/Relaxed-Theme/relaxed-terminal-themes +# This work is licensed under the terms of the MIT license. +# For a copy, see https://opensource.org/licenses/MIT. + +background #353a44 +foreground #d9d9d9 +cursor #d9d9d9 +selection_foreground #d8d8d8 +selection_background #6a7984 +color0 #151515 +color1 #bc5653 +color2 #909d63 +color3 #ebc17a +color4 #6a8799 +color5 #b06698 +color6 #c9dfff +color7 #d9d9d9 +color8 #636363 +color9 #bc5653 +color10 #a0ac77 +color11 #ebc17a +color12 #7eaac7 +color13 #b06698 +color14 #acbbd0 +color15 #f7f7f7 diff --git a/.config/kitty/kitty-themes/themes/Renault_Style.conf b/.config/kitty/kitty-themes/themes/Renault_Style.conf new file mode 100755 index 0000000..856818d --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Renault_Style.conf @@ -0,0 +1,22 @@ +background #3a3a3a +foreground #e9cb7b +cursor #7f7f7f +selection_background #958553 + +color0 #000000 +color1 #990000 +color2 #00A600 +color3 #999900 +color4 #0000B2 +color5 #B200B2 +color6 #00A6B2 +color7 #BFBFBF +color8 #666666 +color9 #E50000 +color10 #00d800 +color11 #E5E500 +color12 #0000FF +color13 #E500E5 +color14 #00e5e5 +color15 #E5E5E5 +selection_foreground #3a3a3a diff --git a/.config/kitty/kitty-themes/themes/Renault_Style_Light.conf b/.config/kitty/kitty-themes/themes/Renault_Style_Light.conf new file mode 100755 index 0000000..e08cd6a --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Renault_Style_Light.conf @@ -0,0 +1,21 @@ +background #3a3a3a +foreground #e9cb7b +cursor #7f7f7f +selection_background #958553 +color0 #000000 +color8 #323232 +color1 #da4839 +color9 #ff7b6a +color2 #509f50 +color10 #83d082 +color3 #ffd249 +color11 #ffff7b +color4 #46657d +color12 #9fcef0 +color5 #cfcfff +color13 #ffffff +color6 #87c1f1 +color14 #a4d4f8 +color7 #ffffff +color15 #ffffff +selection_foreground #3a3a3a diff --git a/.config/kitty/kitty-themes/themes/Rippedcasts.conf b/.config/kitty/kitty-themes/themes/Rippedcasts.conf new file mode 100755 index 0000000..20e9872 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Rippedcasts.conf @@ -0,0 +1,21 @@ +background #2b2b2b +foreground #ffffff +cursor #7f7f7f +selection_background #5a637e +color0 #000000 +color8 #666666 +color1 #ccae95 +color9 #edcbac +color2 #a7ff60 +color10 #bced68 +color3 #beba1f +color11 #e5e500 +color4 #74a4af +color12 #86bdc8 +color5 #ff73fd +color13 #e500e5 +color6 #5a637e +color14 #8b9bc4 +color7 #bebebe +color15 #e5e5e5 +selection_foreground #2b2b2b diff --git a/.config/kitty/kitty-themes/themes/Royal.conf b/.config/kitty/kitty-themes/themes/Royal.conf new file mode 100755 index 0000000..0ebd236 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Royal.conf @@ -0,0 +1,21 @@ +background #100814 +foreground #504868 +cursor #514965 +selection_background #1e1d2a +color0 #241f2a +color8 #312d3c +color1 #90274b +color9 #d4346c +color2 #23801c +color10 #2cd845 +color3 #b49d27 +color11 #fde83a +color4 #6480af +color12 #8fb9f9 +color5 #664d96 +color13 #a479e2 +color6 #8aaabd +color14 #abd3eb +color7 #514965 +color15 #9d8bbd +selection_foreground #100814 diff --git a/.config/kitty/kitty-themes/themes/Sakura_Night.conf b/.config/kitty/kitty-themes/themes/Sakura_Night.conf new file mode 100755 index 0000000..3df6bcf --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Sakura_Night.conf @@ -0,0 +1,45 @@ +# vim:ft=kitty + +## name: Sakura Night +## license: MIT +## author: PandaCatPlayz +## upstream: https://pandacatplayz.github.io/kitty-themes/Sakura_Night.conf +## blurb: A custom kitty dark theme loosely using the Endesga 32 palette + +background #181425 +foreground #F06292 +cursor #F06292 +selection_background #F06292 + +#: black +color0 #181425 +color8 #262b44 + +#: red +color1 #e43b44 +color9 #ff0044 + +#: green +color2 #3e8948 +color10 #63c74d + +#: yellow +color3 #feae34 +color11 #fee761 + +#: blue +color4 #124e89 +color12 #0099db + +#: magenta +color5 #b55088 +color13 #F06292 + +#: cyan +color6 #008080 +color14 #66b2b2 + +#: white +color7 #c0cbdc +color15 #ffffff +selection_foreground #f7f7f7 diff --git a/.config/kitty/kitty-themes/themes/SeaShells.conf b/.config/kitty/kitty-themes/themes/SeaShells.conf new file mode 100755 index 0000000..60a2968 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/SeaShells.conf @@ -0,0 +1,21 @@ +background #08131a +foreground #deb88d +cursor #fba02f +selection_background #1e4862 +color0 #17384c +color8 #424b52 +color1 #d05023 +color9 #d38677 +color2 #027b9b +color10 #618c98 +color3 #fba02f +color11 #fdd29e +color4 #1d4850 +color12 #1abcdd +color5 #68d3f0 +color13 #bbe3ee +color6 #50a3b5 +color14 #86abb3 +color7 #deb88d +color15 #fee3cd +selection_foreground #08131a diff --git a/.config/kitty/kitty-themes/themes/Seafoam_Pastel.conf b/.config/kitty/kitty-themes/themes/Seafoam_Pastel.conf new file mode 100755 index 0000000..c3e95a7 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Seafoam_Pastel.conf @@ -0,0 +1,21 @@ +background #243335 +foreground #d3e6d3 +cursor #576379 +selection_background #ffffff +color0 #747474 +color8 #8a8a8a +color1 #825d4c +color9 #cf9279 +color2 #718b62 +color10 #98d9aa +color3 #aca06d +color11 #fae69c +color4 #4c7b82 +color12 #79c3cf +color5 #8a7166 +color13 #d6b2a0 +color6 #719494 +color14 #acdfdf +color7 #dfdfdf +color15 #dfdfdf +selection_foreground #243335 diff --git a/.config/kitty/kitty-themes/themes/Seti.conf b/.config/kitty/kitty-themes/themes/Seti.conf new file mode 100755 index 0000000..69c4105 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Seti.conf @@ -0,0 +1,21 @@ +background #111213 +foreground #cacecd +cursor #e2be21 +selection_background #303233 +color0 #323232 +color8 #323232 +color1 #c22832 +color9 #c22832 +color2 #8ec43d +color10 #8ec43d +color3 #e0c64f +color11 #e0c64f +color4 #43a5d5 +color12 #43a5d5 +color5 #8b57b5 +color13 #8b57b5 +color6 #8ec43d +color14 #8ec43d +color7 #eeeeee +color15 #ffffff +selection_foreground #111213 diff --git a/.config/kitty/kitty-themes/themes/Shaman.conf b/.config/kitty/kitty-themes/themes/Shaman.conf new file mode 100755 index 0000000..a316711 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Shaman.conf @@ -0,0 +1,21 @@ +background #001014 +foreground #405555 +cursor #49fcd5 +selection_background #415554 +color0 #012026 +color8 #374350 +color1 #b12f2c +color9 #ff4242 +color2 #00a940 +color10 #2aea5e +color3 #5d8aa9 +color11 #8dd3fd +color4 #449985 +color12 #61d4b9 +color5 #00599c +color13 #1298ff +color6 #5c7e19 +color14 #98cf28 +color7 #405554 +color15 #58fad6 +selection_foreground #001014 diff --git a/.config/kitty/kitty-themes/themes/Sierra.conf b/.config/kitty/kitty-themes/themes/Sierra.conf new file mode 100755 index 0000000..505961b --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Sierra.conf @@ -0,0 +1,28 @@ +# Sierra Colorscheme for Kitty +# Based on https://www.reddit.com/r/unixporn/comments/dgx7gk/bspwm_nostalgic_days/ + +# cursorColor: #cacbb9 +selection_background #1c1a14 +selection_background #cacbb9 +foreground #cacbb9 +background #1c1a14 +url_color #0e0e04 + +macos_titlebar_color #515a45 + +color0 #0e0e04 +color1 #515a45 +color2 #68694f +color3 #7f7f60 +color4 #989876 +color5 #897c5b +color6 #a18e60 +color7 #bb7774 +color8 #a85e5d +color9 #475a2e +color10 #676938 +color11 #7f7f41 +color12 #98984e +color13 #897645 +color14 #a17140 +color15 #c9cbac diff --git a/.config/kitty/kitty-themes/themes/Slate.conf b/.config/kitty/kitty-themes/themes/Slate.conf new file mode 100755 index 0000000..650e4ab --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Slate.conf @@ -0,0 +1,21 @@ +background #212121 +foreground #34b0d2 +cursor #87d2c3 +selection_background #0f3754 +color0 #212121 +color8 #ffffff +color1 #e1a7bf +color9 #ffccd8 +color2 #80d778 +color10 #bdffa8 +color3 #c4c9bf +color11 #d0cbc9 +color4 #254a49 +color12 #79afd2 +color5 #a380d3 +color13 #c4a7d8 +color6 #14ab9c +color14 #8bdee0 +color7 #02c4e0 +color15 #e0e0e0 +selection_foreground #212121 diff --git a/.config/kitty/kitty-themes/themes/Smyck.conf b/.config/kitty/kitty-themes/themes/Smyck.conf new file mode 100755 index 0000000..3c97251 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Smyck.conf @@ -0,0 +1,21 @@ +background #1b1b1b +foreground #f7f7f7 +cursor #bbbbbb +selection_background #207383 +color0 #000000 +color8 #7a7a7a +color1 #b74131 +color9 #d6837b +color2 #7da900 +color10 #c4f036 +color3 #c4a400 +color11 #fee14d +color4 #62a3c4 +color12 #8dcff0 +color5 #b98acc +color13 #f799ff +color6 #207383 +color14 #69d9cf +color7 #a0a0a0 +color15 #f7f7f7 +selection_foreground #1b1b1b diff --git a/.config/kitty/kitty-themes/themes/SnowDark.conf b/.config/kitty/kitty-themes/themes/SnowDark.conf new file mode 100755 index 0000000..baa1d03 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/SnowDark.conf @@ -0,0 +1,31 @@ +# Kitty snow colors - dark +# Just copy the contents into your kitty config file + +# Michael Chris Lopez (http://github.com/mcchrish) + +background #2c2d30 +foreground #afb7c0 +selection_background #afb7c0 +selection_foreground #2c2d30 +url_color #ab916d +cursor #cbd2d9 + +# normal +color0 #2c2d30 +color1 #be868c +color2 #7f9d77 +color3 #ab916d +color4 #759abd +color5 #a88cb3 +color6 #5da19f +color7 #afb7c0 + +# bright +color8 #363a3e +color9 #be868c +color10 #7f9d77 +color11 #ab916d +color12 #759abd +color13 #a88cb3 +color14 #5da19f +color15 #cbd2d9 diff --git a/.config/kitty/kitty-themes/themes/SnowLight.conf b/.config/kitty/kitty-themes/themes/SnowLight.conf new file mode 100755 index 0000000..66db184 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/SnowLight.conf @@ -0,0 +1,31 @@ +# Kitty snow colors - light +# Just copy the contents into your kitty config file + +# Michael Chris Lopez (http://github.com/mcchrish) + +background #fbffff +foreground #535c65 +selection_background #6d7782 +selection_foreground #fbffff +url_color #906c33 +cursor #434951 + +# normal +color0 #fbffff +color1 #ae5865 +color2 #4d7f43 +color3 #906c33 +color4 #2b7ab2 +color5 #8f63a2 +color6 #008483 +color7 #535c65 + +# bright +color8 #6d7782 +color9 #ae5865 +color10 #4d7f43 +color11 #906c33 +color12 #2b7ab2 +color13 #8f63a2 +color14 #008483 +color15 #434951 \ No newline at end of file diff --git a/.config/kitty/kitty-themes/themes/SoftServer.conf b/.config/kitty/kitty-themes/themes/SoftServer.conf new file mode 100755 index 0000000..e7eb5fe --- /dev/null +++ b/.config/kitty/kitty-themes/themes/SoftServer.conf @@ -0,0 +1,21 @@ +background #242626 +foreground #99a3a2 +cursor #d1dfde +selection_background #7f8786 +color0 #000000 +color8 #666c6b +color1 #a16869 +color9 #dc5b5f +color2 #99a569 +color10 #bfde54 +color3 #a29069 +color11 #deb35f +color4 #6a8fa3 +color12 #62b1df +color5 #6971a3 +color13 #5f6ede +color6 #6ba48f +color14 #64e39c +color7 #99a3a2 +color15 #d1dfde +selection_foreground #242626 diff --git a/.config/kitty/kitty-themes/themes/Solarized8_Dark.conf b/.config/kitty/kitty-themes/themes/Solarized8_Dark.conf new file mode 100755 index 0000000..11f0e55 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Solarized8_Dark.conf @@ -0,0 +1,23 @@ +background #002b36 +foreground #93a1a1 +cursor #93a1a1 +selection_background #93a1a1 + +color0 #073642 +color1 #dc322f +color2 #859900 +color3 #b58900 +color4 #268bd2 +color5 #d33682 +color6 #2aa198 +color7 #eee8d5 +color8 #002b36 +color9 #cb4b16 +color10 #586e75 +color11 #657b83 +color12 #839496 +color13 #6c71c4 +color14 #93a1a1 +color15 #fdf6e3 + +selection_foreground #002b36 diff --git a/.config/kitty/kitty-themes/themes/Solarized_Darcula.conf b/.config/kitty/kitty-themes/themes/Solarized_Darcula.conf new file mode 100755 index 0000000..0a845d4 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Solarized_Darcula.conf @@ -0,0 +1,21 @@ +background #3d3f41 +foreground #d2d8d9 +cursor #708183 +selection_background #214283 +color0 #25292a +color8 #25292a +color1 #f24840 +color9 #f24840 +color2 #629655 +color10 #629655 +color3 #b68800 +color11 #b68800 +color4 #2074c7 +color12 #2074c7 +color5 #797fd4 +color13 #797fd4 +color6 #15968d +color14 #15968d +color7 #d2d8d9 +color15 #d2d8d9 +selection_foreground #3d3f41 diff --git a/.config/kitty/kitty-themes/themes/Solarized_Dark.conf b/.config/kitty/kitty-themes/themes/Solarized_Dark.conf new file mode 100755 index 0000000..0bddb75 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Solarized_Dark.conf @@ -0,0 +1,28 @@ +# vim:ft=kitty + +## name: Solarized Dark +## author: Ethan Schoonover +## license: MIT +## blurb: Precision colors for machines and people + +background #002b36 +foreground #839496 +cursor #708183 +selection_background #073642 +color0 #002731 +color8 #001e26 +color1 #d01b24 +color9 #bd3612 +color2 #728905 +color10 #465a61 +color3 #a57705 +color11 #52676f +color4 #2075c7 +color12 #708183 +color5 #c61b6e +color13 #5856b9 +color6 #259185 +color14 #81908f +color7 #e9e2cb +color15 #fcf4dc +selection_foreground #93a1a1 diff --git a/.config/kitty/kitty-themes/themes/Solarized_Dark_-_Patched.conf b/.config/kitty/kitty-themes/themes/Solarized_Dark_-_Patched.conf new file mode 100755 index 0000000..37c3597 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Solarized_Dark_-_Patched.conf @@ -0,0 +1,21 @@ +background #001e26 +foreground #708183 +cursor #708183 +selection_background #002731 +color0 #002731 +color8 #465a61 +color1 #d01b24 +color9 #bd3612 +color2 #728905 +color10 #465a61 +color3 #a57705 +color11 #52676f +color4 #2075c7 +color12 #708183 +color5 #c61b6e +color13 #5856b9 +color6 #259185 +color14 #81908f +color7 #e9e2cb +color15 #fcf4dc +selection_foreground #001e26 diff --git a/.config/kitty/kitty-themes/themes/Solarized_Dark_Higher_Contrast.conf b/.config/kitty/kitty-themes/themes/Solarized_Dark_Higher_Contrast.conf new file mode 100755 index 0000000..8477ea1 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Solarized_Dark_Higher_Contrast.conf @@ -0,0 +1,21 @@ +background #001e26 +foreground #9bc1c2 +cursor #f34a00 +selection_background #003747 +color0 #002731 +color8 #006388 +color1 #d01b24 +color9 #f4153b +color2 #6bbe6c +color10 #50ee84 +color3 #a57705 +color11 #b17e28 +color4 #2075c7 +color12 #178dc7 +color5 #c61b6e +color13 #e14d8e +color6 #259185 +color14 #00b29e +color7 #e9e2cb +color15 #fcf4dc +selection_foreground #001e26 diff --git a/.config/kitty/kitty-themes/themes/Solarized_Light.conf b/.config/kitty/kitty-themes/themes/Solarized_Light.conf new file mode 100755 index 0000000..b1f6332 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Solarized_Light.conf @@ -0,0 +1,59 @@ +# vim:ft=kitty + +## name: Solarized Light +## author: Ethan Schoonover +## license: MIT +## blurb: Precision colors for machines and people + +# The basic colors +foreground #657b83 +background #fdf6e3 +selection_foreground #586e75 +selection_background #eee8d5 + +# Cursor colors +cursor #657b83 +cursor_text_color #fdf6e3 + +# kitty window border colors +active_border_color #cb4b16 +inactive_border_color #93a1a1 + +# Tab bar colors +active_tab_background #fdf6e3 +active_tab_foreground #657b83 +inactive_tab_background #93a1a1 +inactive_tab_foreground #fdf6e3 + +# The basic 16 colors +# black +color0 #073642 +color8 #93a1a1 + +# red +color1 #dc322f +color9 #cb4b16 + +# green +color2 #859900 +color10 #586e75 + +# yellow +color3 #b58900 +color11 #657b83 + +# blue +color4 #268bd2 +color12 #839496 + +# magenta +color5 #d33682 +color13 #6c71c4 + +# cyan +color6 #2aa198 +color14 #93a1a1 + +# white +color7 #eee8d5 +color15 #fdf6e3 diff --git a/.config/kitty/kitty-themes/themes/Source_Code_X.conf b/.config/kitty/kitty-themes/themes/Source_Code_X.conf new file mode 100755 index 0000000..d3aefa3 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Source_Code_X.conf @@ -0,0 +1,21 @@ +foreground #000000 +background #1f1f24 +cursor #7F7F7F +color0 #4e596b +color8 #91a0b1 +color1 #fb695d +color7 #BFBFBF +color9 #fb695d +color2 #74b391 +color10 #aef37c +color3 #fc8e3e +color11 #fc8e3e +color4 #9586f4 +color12 #53a4fb +color5 #fb5ea3 +color13 #fb5ea3 +color6 #79c8b6 +color14 #83d2c0 +color15 #91a0b1 +selection_foreground #1f1f24 +selection_background #000000 diff --git a/.config/kitty/kitty-themes/themes/Sourcerer.conf b/.config/kitty/kitty-themes/themes/Sourcerer.conf new file mode 100755 index 0000000..1c025c4 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Sourcerer.conf @@ -0,0 +1,40 @@ +# Drop these into your kitty.conf + +# ██████ ██████ ██ ██ ██████ █████ █████ ██████ █████ ██████ +# ██░░░░ ██░░░░██░██ ░██░░██░░████░░░██ ██░░░██░░██░░████░░░██░░██░░██ +# ░░█████ ░██ ░██░██ ░██ ░██ ░░░██ ░░ ░███████ ░██ ░░░███████ ░██ ░░ +# ░░░░░██░██ ░██░██ ░██ ░██ ░██ ██░██░░░░ ░██ ░██░░░░ ░██ +# ██████ ░░██████ ░░██████░███ ░░█████ ░░██████░███ ░░██████░███ +# ░░░░░░ ░░░░░░ ░░░░░░ ░░░ ░░░░░ ░░░░░░ ░░░ ░░░░░░ ░░░ +# r e a d c o d e l i k e a w i z a r d +# +# sourcerer by xero harrison (http://sourcerer.xero.nu) +# ├─ based on sorcerer by Jeet Sukumaran (http://jeetworks.org) +# └─ based on mustang by Henrique C. Alves (hcarvalhoalves@gmail.com) + +# █▓▒░ scorcerer colors +foreground #c2c2b0 +background #222222 +cursor #c2c2b0 +selection_background #c2c2b0 +selection_foreground #222222 + +color0 #111111 +color1 #aa4450 +color2 #719611 +color3 #ff9800 +color4 #6688aa +color5 #8f6f8f +color6 #528b8b +color7 #d3d3d3 +color8 #181818 +color9 #ff6a6a +color10 #b1d631 +color11 #87875f +color12 #90b0d1 +color13 #8181a6 +color14 #87ceeb +color15 #c1cdc1 +# colorIT #719611 +# colorBD #d3d3d3 +# colorUL #528b8b diff --git a/.config/kitty/kitty-themes/themes/SpaceGray.conf b/.config/kitty/kitty-themes/themes/SpaceGray.conf new file mode 100755 index 0000000..ba9afeb --- /dev/null +++ b/.config/kitty/kitty-themes/themes/SpaceGray.conf @@ -0,0 +1,21 @@ +background #20232c +foreground #b2b8c2 +cursor #b2b8c2 +selection_background #15171e +color0 #000000 +color8 #000000 +color1 #af4b57 +color9 #af4b57 +color2 #87b279 +color10 #87b279 +color3 #e5c078 +color11 #e5c078 +color4 #7c8fa3 +color12 #7c8fa3 +color5 #a37996 +color13 #a37996 +color6 #84a6a4 +color14 #84a6a4 +color7 #b2b8c2 +color15 #fffefe +selection_foreground #20232c diff --git a/.config/kitty/kitty-themes/themes/SpaceGray_Eighties.conf b/.config/kitty/kitty-themes/themes/SpaceGray_Eighties.conf new file mode 100755 index 0000000..8249a17 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/SpaceGray_Eighties.conf @@ -0,0 +1,21 @@ +background #212121 +foreground #bdb9ae +cursor #bbbbbb +selection_background #262e35 +color0 #15171c +color8 #545454 +color1 #ec5f67 +color9 #ff6973 +color2 #80a763 +color10 #93d393 +color3 #fdc253 +color11 #ffd156 +color4 #5485c0 +color12 #4d83d0 +color5 #bf83c0 +color13 #ff55ff +color6 #57c2c0 +color14 #83e8e4 +color7 #eeece7 +color15 #ffffff +selection_foreground #212121 diff --git a/.config/kitty/kitty-themes/themes/SpaceGray_Eighties_Dull.conf b/.config/kitty/kitty-themes/themes/SpaceGray_Eighties_Dull.conf new file mode 100755 index 0000000..eabf184 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/SpaceGray_Eighties_Dull.conf @@ -0,0 +1,21 @@ +background #212121 +foreground #c8c5bc +cursor #bbbbbb +selection_background #262e36 +color0 #15171c +color8 #545454 +color1 #b14956 +color9 #ec5f67 +color2 #91b377 +color10 #88e985 +color3 #c6725a +color11 #fdc253 +color4 #7b8fa4 +color12 #5485c0 +color5 #a5779e +color13 #bf83c0 +color6 #7fcccb +color14 #58c2c0 +color7 #b2b8c2 +color15 #ffffff +selection_foreground #212121 diff --git a/.config/kitty/kitty-themes/themes/Spacedust.conf b/.config/kitty/kitty-themes/themes/Spacedust.conf new file mode 100755 index 0000000..08b93c4 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Spacedust.conf @@ -0,0 +1,21 @@ +background #0a1e24 +foreground #ecefc1 +cursor #708183 +selection_background #0a385c +color0 #6e5246 +color8 #674c31 +color1 #e35a00 +color9 #ff8a39 +color2 #5cab96 +color10 #adcab8 +color3 #e3cd7b +color11 #ffc777 +color4 #0e548b +color12 #67a0cd +color5 #e35a00 +color13 #ff8a39 +color6 #06afc7 +color14 #83a6b3 +color7 #f0f1ce +color15 #fefff0 +selection_foreground #0a1e24 diff --git a/.config/kitty/kitty-themes/themes/Spacemacs.conf b/.config/kitty/kitty-themes/themes/Spacemacs.conf new file mode 100755 index 0000000..15e9c5f --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Spacemacs.conf @@ -0,0 +1,20 @@ +foreground #bfbfbf +background #282a2e +selection_background #5c4c79 +url_color #29a1ae +color0 #292b2d +color8 #68717b +color1 #ce527a +color9 #ce527a +color2 #2d9474 +color10 #84d82f +color3 #bfa325 +color11 #edad0d +color4 #4e97d6 +color12 #4c91cc +color5 #bb6dc3 +color13 #bb6dc3 +color6 #299ba2 +color14 #299ba2 +color7 #e4e4e4 +color15 #f2f2f2 diff --git a/.config/kitty/kitty-themes/themes/Spiderman.conf b/.config/kitty/kitty-themes/themes/Spiderman.conf new file mode 100755 index 0000000..a72bbca --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Spiderman.conf @@ -0,0 +1,21 @@ +background #1b1d1e +foreground #e2e2e2 +cursor #2b3fff +selection_background #070e4f +color0 #1b1d1e +color8 #505354 +color1 #e60712 +color9 #ff0325 +color2 #e22828 +color10 #ff3238 +color3 #e24655 +color11 #fe3935 +color4 #2b3fff +color12 #1d4fff +color5 #2435db +color13 #737bff +color6 #3255ff +color14 #6083ff +color7 #fffef6 +color15 #fefff9 +selection_foreground #1b1d1e diff --git a/.config/kitty/kitty-themes/themes/Spring.conf b/.config/kitty/kitty-themes/themes/Spring.conf new file mode 100755 index 0000000..4df6d1c --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Spring.conf @@ -0,0 +1,21 @@ +background #ffffff +foreground #4d4d4c +cursor #4d4d4c +selection_background #d6d6d6 +color0 #000000 +color8 #000000 +color1 #ff4c83 +color9 #ff0021 +color2 #1f8c3a +color10 #1fc231 +color3 #1fc95a +color11 #d4b706 +color4 #1cd2ee +color12 #15a9fd +color5 #8959a8 +color13 #8959a8 +color6 #3e999f +color14 #3e999f +color7 #fffefe +color15 #fffefe +selection_foreground #ffffff diff --git a/.config/kitty/kitty-themes/themes/Square.conf b/.config/kitty/kitty-themes/themes/Square.conf new file mode 100755 index 0000000..e5457a5 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Square.conf @@ -0,0 +1,21 @@ +background #1a1a1a +foreground #acacab +cursor #fbfacc +selection_background #4d4d4d +color0 #050505 +color8 #141414 +color1 #e9897c +color9 #f99286 +color2 #b6377d +color10 #c3f786 +color3 #ecebbe +color11 #fcfbcc +color4 #a9cdeb +color12 #b6defb +color5 #75507b +color13 #ad7fa8 +color6 #c9caec +color14 #d7d9fc +color7 #f2f2f2 +color15 #e2e2e2 +selection_foreground #1a1a1a diff --git a/.config/kitty/kitty-themes/themes/Srcery.conf b/.config/kitty/kitty-themes/themes/Srcery.conf new file mode 100755 index 0000000..0357a50 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Srcery.conf @@ -0,0 +1,44 @@ +### srcery_kitty.conf +### https://github.com/srcery-colors/srcery-terminal/ + +## Special Colors + +foreground #FCE8C3 +background #1C1B19 +cursor #FBB829 +selection_foreground #1C1B19 +selection_background #FCE8C3 + +## Main Colors + +# Black +color0 #1C1B19 +color8 #918175 + +# Red +color1 #EF2F27 +color9 #F75341 + +# Green +color2 #519F50 +color10 #98BC37 + +# Yellow +color3 #FBB829 +color11 #FED06E + +# Blue +color4 #2C78BF +color12 #68A8E4 + +# Magenta +color5 #E02C6D +color13 #FF5C8F + +# Cyan +color6 #0AAEB3 +color14 #2BE4D0 + +# White +color7 #BAA67F +color15 #FCE8C3 diff --git a/.config/kitty/kitty-themes/themes/Substrata.conf b/.config/kitty/kitty-themes/themes/Substrata.conf new file mode 100755 index 0000000..90c61d5 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Substrata.conf @@ -0,0 +1,26 @@ +# Substrata Theme +# Licence: [ISC License](https://opensource.org/licenses/ISC) + +foreground #b5b4c9 +background #191c25 + +selection_foreground #191c25 +selection_background #b5b4c9 +url_color #fe9f7c + +color0 #2e313d +color8 #5b5f71 +color1 #cf8164 +color9 #fe9f7c +color2 #76a065 +color10 #92c47e +color3 #ab924c +color11 #d2b45f +color4 #8296b0 +color12 #a0b9d8 +color5 #a18daf +color13 #c6aed7 +color6 #659ea2 +color14 #7dc2c7 +color7 #b5b4c9 +color15 #f0ecfe diff --git a/.config/kitty/kitty-themes/themes/Sundried.conf b/.config/kitty/kitty-themes/themes/Sundried.conf new file mode 100755 index 0000000..d5ff99d --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Sundried.conf @@ -0,0 +1,21 @@ +background #1a1818 +foreground #c8c8c8 +cursor #fffefe +selection_background #302b2a +color0 #302b2a +color8 #4d4d47 +color1 #a6463d +color9 #aa000c +color2 #577644 +color10 #128c20 +color3 #9c5f2a +color11 #fc6a20 +color4 #485a98 +color12 #7898f7 +color5 #854551 +color13 #fc89a0 +color6 #9c814e +color14 #fad384 +color7 #c8c8c8 +color15 #fffefe +selection_foreground #1a1818 diff --git a/.config/kitty/kitty-themes/themes/Symfonic.conf b/.config/kitty/kitty-themes/themes/Symfonic.conf new file mode 100755 index 0000000..9b5e0d3 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Symfonic.conf @@ -0,0 +1,21 @@ +background #000000 +foreground #ffffff +cursor #dc322f +selection_background #073642 +color0 #000000 +color8 #1b1d21 +color1 #dc322f +color9 #dc322f +color2 #56db3a +color10 #56db3a +color3 #ff8400 +color11 #ff8400 +color4 #0084d4 +color12 #0084d4 +color5 #b729d9 +color13 #b729d9 +color6 #ccccff +color14 #ccccff +color7 #ffffff +color15 #ffffff +selection_foreground #000000 diff --git a/.config/kitty/kitty-themes/themes/Tango_Dark.conf b/.config/kitty/kitty-themes/themes/Tango_Dark.conf new file mode 100755 index 0000000..6a4673a --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Tango_Dark.conf @@ -0,0 +1,21 @@ +background #000000 +foreground #ffffff +cursor #ffffff +selection_background #b4d5ff +color0 #000000 +color8 #545753 +color1 #cc0000 +color9 #ef2828 +color2 #4e9a05 +color10 #8ae234 +color3 #c4a000 +color11 #fce94e +color4 #3464a4 +color12 #719ecf +color5 #74507a +color13 #ad7ea7 +color6 #05989a +color14 #34e2e2 +color7 #d3d7cf +color15 #ededec +selection_foreground #000000 diff --git a/.config/kitty/kitty-themes/themes/Tango_Light.conf b/.config/kitty/kitty-themes/themes/Tango_Light.conf new file mode 100755 index 0000000..07f82bf --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Tango_Light.conf @@ -0,0 +1,21 @@ +background #ffffff +foreground #000000 +cursor #000000 +selection_background #b4d5ff +color0 #000000 +color8 #545753 +color1 #cc0000 +color9 #ef2828 +color2 #4e9a05 +color10 #8ae234 +color3 #c4a000 +color11 #fce94e +color4 #3464a4 +color12 #719ecf +color5 #74507a +color13 #ad7ea7 +color6 #05989a +color14 #34e2e2 +color7 #d3d7cf +color15 #ededec +selection_foreground #ffffff diff --git a/.config/kitty/kitty-themes/themes/Teerb.conf b/.config/kitty/kitty-themes/themes/Teerb.conf new file mode 100755 index 0000000..9e9cab7 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Teerb.conf @@ -0,0 +1,21 @@ +background #262626 +foreground #d0d0d0 +cursor #e3c8ae +selection_background #4d4d4d +color0 #1c1c1c +color8 #1c1c1c +color1 #d68686 +color9 #d68686 +color2 #aed686 +color10 #aed686 +color3 #d7af87 +color11 #e4c9af +color4 #86aed6 +color12 #86aed6 +color5 #d6aed6 +color13 #d6aed6 +color6 #8adbb4 +color14 #b1e7dd +color7 #d0d0d0 +color15 #efefef +selection_foreground #262626 diff --git a/.config/kitty/kitty-themes/themes/Thayer_Bright.conf b/.config/kitty/kitty-themes/themes/Thayer_Bright.conf new file mode 100755 index 0000000..b74bc60 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Thayer_Bright.conf @@ -0,0 +1,21 @@ +background #1b1d1e +foreground #f8f8f8 +cursor #fc971e +selection_background #4d4d4d +color0 #1b1d1e +color8 #505354 +color1 #f92672 +color9 #ff5995 +color2 #4df740 +color10 #b6e354 +color3 #f3fd21 +color11 #feed6c +color4 #2656d6 +color12 #3f78ff +color5 #8c54fe +color13 #9e6ffe +color6 #37c8b4 +color14 #23ced4 +color7 #ccccc6 +color15 #f8f8f2 +selection_foreground #1b1d1e diff --git a/.config/kitty/kitty-themes/themes/The_Hulk.conf b/.config/kitty/kitty-themes/themes/The_Hulk.conf new file mode 100755 index 0000000..81bd962 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/The_Hulk.conf @@ -0,0 +1,21 @@ +background #1b1d1e +foreground #b4b4b4 +cursor #15b61a +selection_background #4d4f4c +color0 #1b1d1e +color8 #505354 +color1 #259d1a +color9 #8dff2a +color2 #13ce2f +color10 #48ff76 +color3 #62e456 +color11 #3afe15 +color4 #2424f4 +color12 #4f6a95 +color5 #641e73 +color13 #72579d +color6 #378ca9 +color14 #3f85a5 +color7 #d8d8d0 +color15 #e5e5e0 +selection_foreground #1b1d1e diff --git a/.config/kitty/kitty-themes/themes/Tomorrow.conf b/.config/kitty/kitty-themes/themes/Tomorrow.conf new file mode 100755 index 0000000..23a8dfc --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Tomorrow.conf @@ -0,0 +1,21 @@ +background #ffffff +foreground #4c4c4c +cursor #4c4c4c +selection_background #d6d6d6 +color0 #000000 +color8 #000000 +color1 #c82828 +color9 #c82828 +color2 #708b00 +color10 #708b00 +color3 #e9b600 +color11 #e9b600 +color4 #4170ae +color12 #4170ae +color5 #8958a7 +color13 #8958a7 +color6 #3d999f +color14 #3d999f +color7 #fffefe +color15 #fffefe +selection_foreground #ffffff diff --git a/.config/kitty/kitty-themes/themes/Tomorrow_Night.conf b/.config/kitty/kitty-themes/themes/Tomorrow_Night.conf new file mode 100755 index 0000000..0bf3cf7 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Tomorrow_Night.conf @@ -0,0 +1,21 @@ +background #1d1f21 +foreground #c4c8c5 +cursor #c4c8c5 +selection_background #363a41 +color0 #000000 +color8 #000000 +color1 #cc6666 +color9 #cc6666 +color2 #b5bd68 +color10 #b5bd68 +color3 #f0c574 +color11 #f0c574 +color4 #80a1bd +color12 #80a1bd +color5 #b294ba +color13 #b294ba +color6 #8abdb6 +color14 #8abdb6 +color7 #fffefe +color15 #fffefe +selection_foreground #1d1f21 diff --git a/.config/kitty/kitty-themes/themes/Tomorrow_Night_Blue.conf b/.config/kitty/kitty-themes/themes/Tomorrow_Night_Blue.conf new file mode 100755 index 0000000..b32cbfd --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Tomorrow_Night_Blue.conf @@ -0,0 +1,21 @@ +background #002450 +foreground #fffefe +cursor #fffefe +selection_background #003e8e +color0 #000000 +color8 #000000 +color1 #ff9ca3 +color9 #ff9ca3 +color2 #d0f0a8 +color10 #d0f0a8 +color3 #ffedac +color11 #ffedac +color4 #badaff +color12 #badaff +color5 #ebbaff +color13 #ebbaff +color6 #99ffff +color14 #99ffff +color7 #fffefe +color15 #fffefe +selection_foreground #002450 diff --git a/.config/kitty/kitty-themes/themes/Tomorrow_Night_Bright.conf b/.config/kitty/kitty-themes/themes/Tomorrow_Night_Bright.conf new file mode 100755 index 0000000..346f3dc --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Tomorrow_Night_Bright.conf @@ -0,0 +1,21 @@ +background #000000 +foreground #e9e9e9 +cursor #e9e9e9 +selection_background #424242 +color0 #000000 +color8 #000000 +color1 #d44d53 +color9 #d44d53 +color2 #b9c949 +color10 #b9c949 +color3 #e6c446 +color11 #e6c446 +color4 #79a6da +color12 #79a6da +color5 #c396d7 +color13 #c396d7 +color6 #70c0b1 +color14 #70c0b1 +color7 #fffefe +color15 #fffefe +selection_foreground #000000 diff --git a/.config/kitty/kitty-themes/themes/Tomorrow_Night_Eighties.conf b/.config/kitty/kitty-themes/themes/Tomorrow_Night_Eighties.conf new file mode 100755 index 0000000..404efc7 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Tomorrow_Night_Eighties.conf @@ -0,0 +1,21 @@ +background #2c2c2c +foreground #cccccc +cursor #cccccc +selection_background #505050 +color0 #000000 +color8 #000000 +color1 #f17779 +color9 #f17779 +color2 #99cc99 +color10 #99cc99 +color3 #ffcc66 +color11 #ffcc66 +color4 #6699cc +color12 #6699cc +color5 #cc99cc +color13 #cc99cc +color6 #66cccc +color14 #66cccc +color7 #fffefe +color15 #fffefe +selection_foreground #2c2c2c diff --git a/.config/kitty/kitty-themes/themes/ToyChest.conf b/.config/kitty/kitty-themes/themes/ToyChest.conf new file mode 100755 index 0000000..040cb8d --- /dev/null +++ b/.config/kitty/kitty-themes/themes/ToyChest.conf @@ -0,0 +1,21 @@ +background #23364a +foreground #30cf7b +cursor #d4d4d4 +selection_background #5f207a +color0 #2c3f57 +color8 #326889 +color1 #be2d26 +color9 #dd5943 +color2 #199171 +color10 #30cf7b +color3 #da8e26 +color11 #e7d74b +color4 #325d96 +color12 #33a5d9 +color5 #8a5ddb +color13 #ad6bdc +color6 #35a08f +color14 #41c3ad +color7 #23d082 +color15 #d4d4d4 +selection_foreground #23364a diff --git a/.config/kitty/kitty-themes/themes/Treehouse.conf b/.config/kitty/kitty-themes/themes/Treehouse.conf new file mode 100755 index 0000000..940751e --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Treehouse.conf @@ -0,0 +1,21 @@ +background #191919 +foreground #776b53 +cursor #fac814 +selection_background #776b53 +color0 #321200 +color8 #423625 +color1 #b1270e +color9 #ed5c20 +color2 #44a900 +color10 #55f237 +color3 #a9810b +color11 #f1b731 +color4 #578499 +color12 #85cfec +color5 #96363c +color13 #e04b5a +color6 #b2591d +color14 #f07c14 +color7 #776b53 +color15 #ffc800 +selection_foreground #191919 diff --git a/.config/kitty/kitty-themes/themes/Twilight.conf b/.config/kitty/kitty-themes/themes/Twilight.conf new file mode 100755 index 0000000..452a4d2 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Twilight.conf @@ -0,0 +1,21 @@ +background #141414 +foreground #feffd3 +cursor #ffffff +selection_background #303030 +color0 #141414 +color8 #262626 +color1 #c06c43 +color9 #dd7c4c +color2 #afb979 +color10 #cbd88c +color3 #c2a86c +color11 #e1c47d +color4 #444649 +color12 #5a5d61 +color5 #b4be7b +color13 #d0db8e +color6 #778284 +color14 #8a989a +color7 #feffd3 +color15 #feffd3 +selection_foreground #141414 diff --git a/.config/kitty/kitty-themes/themes/Ubuntu.conf b/.config/kitty/kitty-themes/themes/Ubuntu.conf new file mode 100755 index 0000000..96e9d09 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Ubuntu.conf @@ -0,0 +1,21 @@ +background #300a24 +foreground #eeeeec +cursor #bbbbbb +selection_background #b4d5ff +color0 #2e3436 +color8 #555753 +color1 #cc0000 +color9 #ef2929 +color2 #4e9a06 +color10 #8ae234 +color3 #c4a000 +color11 #fce94f +color4 #3465a4 +color12 #729fcf +color5 #75507b +color13 #ad7fa8 +color6 #06989a +color14 #34e2e2 +color7 #d3d7cf +color15 #eeeeec +selection_foreground #300a24 diff --git a/.config/kitty/kitty-themes/themes/Urple.conf b/.config/kitty/kitty-themes/themes/Urple.conf new file mode 100755 index 0000000..a29dcad --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Urple.conf @@ -0,0 +1,21 @@ +background #1b1b23 +foreground #86799a +cursor #a062ea +selection_background #a062ea +color0 #000000 +color8 #5c3125 +color1 #af425b +color9 #ff6387 +color2 #37a315 +color10 #28e51f +color3 #ac5b41 +color11 #f08061 +color4 #554d9a +color12 #8579ed +color5 #6c3ba1 +color13 #a05dee +color6 #808080 +color14 #eaeaea +color7 #87799c +color15 #bfa3ff +selection_foreground #1b1b23 diff --git a/.config/kitty/kitty-themes/themes/Vaughn.conf b/.config/kitty/kitty-themes/themes/Vaughn.conf new file mode 100755 index 0000000..26d1885 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Vaughn.conf @@ -0,0 +1,21 @@ +background #25234e +foreground #dcdccc +cursor #ff5555 +selection_background #b5d5ff +color0 #24234f +color8 #709080 +color1 #705050 +color9 #dca3a3 +color2 #60b48a +color10 #60b48a +color3 #dfaf8f +color11 #f0dfaf +color4 #5454ff +color12 #5454ff +color5 #f08cc3 +color13 #ec93d3 +color6 #8cd0d3 +color14 #93e0e3 +color7 #709080 +color15 #ffffff +selection_foreground #25234e diff --git a/.config/kitty/kitty-themes/themes/VibrantInk.conf b/.config/kitty/kitty-themes/themes/VibrantInk.conf new file mode 100755 index 0000000..5fbd281 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/VibrantInk.conf @@ -0,0 +1,21 @@ +background #000000 +foreground #ffffff +cursor #ffffff +selection_background #b4d5ff +color0 #868686 +color8 #545454 +color1 #ff6600 +color9 #ff0000 +color2 #ccff04 +color10 #00ff00 +color3 #ffcc00 +color11 #ffff00 +color4 #44b3cc +color12 #0000ff +color5 #9933cc +color13 #ff00ff +color6 #44b3cc +color14 #00ffff +color7 #f4f4f4 +color15 #e5e5e5 +selection_foreground #000000 diff --git a/.config/kitty/kitty-themes/themes/WarmNeon.conf b/.config/kitty/kitty-themes/themes/WarmNeon.conf new file mode 100755 index 0000000..3256f5d --- /dev/null +++ b/.config/kitty/kitty-themes/themes/WarmNeon.conf @@ -0,0 +1,21 @@ +background #3f3f3f +foreground #afdab6 +cursor #2fff24 +selection_background #b0ad21 +color0 #000000 +color8 #fdfcfc +color1 #e24345 +color9 #e86f71 +color2 #38b139 +color10 #9bc08f +color3 #dae145 +color11 #ddd979 +color4 #4260c5 +color12 #7a90d5 +color5 #f81ffb +color13 #f674b9 +color6 #29bad3 +color14 #5ed1e4 +color7 #d0b8a3 +color15 #d8c8bb +selection_foreground #3f3f3f diff --git a/.config/kitty/kitty-themes/themes/Wez.conf b/.config/kitty/kitty-themes/themes/Wez.conf new file mode 100755 index 0000000..11706ab --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Wez.conf @@ -0,0 +1,21 @@ +background #000000 +foreground #b3b3b3 +cursor #52ad70 +selection_background #4c52f8 +color0 #000000 +color8 #555555 +color1 #cc5555 +color9 #ff5555 +color2 #55cc55 +color10 #55ff55 +color3 #cdcd55 +color11 #ffff55 +color4 #5455cb +color12 #5555ff +color5 #cc55cc +color13 #ff55ff +color6 #7acaca +color14 #55ffff +color7 #cccccc +color15 #ffffff +selection_foreground #000000 diff --git a/.config/kitty/kitty-themes/themes/WildCherry.conf b/.config/kitty/kitty-themes/themes/WildCherry.conf new file mode 100755 index 0000000..a4bfa47 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/WildCherry.conf @@ -0,0 +1,21 @@ +background #1f1626 +foreground #d9faff +cursor #dd00ff +selection_background #002731 +color0 #000506 +color8 #009cc9 +color1 #d94085 +color9 #da6bab +color2 #2ab250 +color10 #f4dba5 +color3 #ffd06e +color11 #eac066 +color4 #873bdb +color12 #2f8bb9 +color5 #ececec +color13 #ae636b +color6 #c1b8b6 +color14 #ff919d +color7 #fff8dd +color15 #e4838d +selection_foreground #1f1626 diff --git a/.config/kitty/kitty-themes/themes/Wombat.conf b/.config/kitty/kitty-themes/themes/Wombat.conf new file mode 100755 index 0000000..d4616fc --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Wombat.conf @@ -0,0 +1,21 @@ +background #171717 +foreground #ded9ce +cursor #bbbbbb +selection_background #453a39 +color0 #000000 +color8 #313131 +color1 #ff605a +color9 #f58b7f +color2 #b1e869 +color10 #dcf88f +color3 #ead89c +color11 #eee5b2 +color4 #5da9f6 +color12 #a5c7ff +color5 #e86aff +color13 #ddaaff +color6 #82fff6 +color14 #b6fff9 +color7 #ded9ce +color15 #fefffe +selection_foreground #171717 diff --git a/.config/kitty/kitty-themes/themes/Wryan.conf b/.config/kitty/kitty-themes/themes/Wryan.conf new file mode 100755 index 0000000..73d758d --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Wryan.conf @@ -0,0 +1,21 @@ +background #101010 +foreground #999993 +cursor #9d9eca +selection_background #4d4d4d +color0 #333333 +color8 #3d3d3d +color1 #8c4665 +color9 #bf4d80 +color2 #287373 +color10 #53a6a6 +color3 #7c7c99 +color11 #9e9ecb +color4 #395573 +color12 #477ab3 +color5 #5e468c +color13 #7e62b3 +color6 #31658c +color14 #6096bf +color7 #899ca1 +color15 #c0c0c0 +selection_foreground #101010 diff --git a/.config/kitty/kitty-themes/themes/YsDark.conf b/.config/kitty/kitty-themes/themes/YsDark.conf new file mode 100755 index 0000000..1dd10d6 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/YsDark.conf @@ -0,0 +1,61 @@ +# vim:ft=kitty + +## name: YsDark +## author: Ya-suke +## license: MIT +## blurb: A dracula inspired colorscheme for kitty. + +# basic colors +foreground #bbc5ff +background #1B1E35 +selection_foreground #ffffff +selection_background #44475a + +# Cursor colors +cursor #bbc5ff +cursor_text_color background + +# URL +url_color #8be9fd + +# Colors for marks +mark1_foreground #1B1E35 +mark1_background #f07178 + +# Tab bar colors +active_tab_foreground #1B1E35 +active_tab_background #bbc5ff +inactive_tab_foreground #1B1E35 +inactive_tab_background #6272a4 + +# black +color0 #101010 +color8 #434758 + +# red +color1 #f07178 +color9 #ff8b92 + +# green +color2 #c3e88d +color10 #ddffa7 + +# yellow +color3 #ffcb6b +color11 #ffe585 + +# blue +color4 #82aaff +color12 #9cc4ff + +# magenta +color5 #e1acff +color13 #c792ea + +# cyan +color6 #89ddff +color14 #a3f7ff + +# white +color7 #d0d0d0 +color15 #ffffff diff --git a/.config/kitty/kitty-themes/themes/Zenburn.conf b/.config/kitty/kitty-themes/themes/Zenburn.conf new file mode 100755 index 0000000..032b99b --- /dev/null +++ b/.config/kitty/kitty-themes/themes/Zenburn.conf @@ -0,0 +1,25 @@ +# Zenburn by jnurmine, https://github.com/jnurmine/Zenburn +# This work is licensed under the terms of the GNU GPL license. +# For a copy, see http://www.gnu.org/licenses/gpl.html. + +background #3f3f3f +foreground #dcdccc +cursor #73635a +selection_background #21322f +color0 #4d4d4d +color8 #709080 +color1 #705050 +color9 #dca3a3 +color2 #60b48a +color10 #c3bf9f +color3 #f0deae +color11 #dfcf9f +color4 #506070 +color12 #94bff3 +color5 #dc8cc3 +color13 #ec93d3 +color6 #8cd0d3 +color14 #93e0e3 +color7 #dcdccc +color15 #ffffff +selection_foreground #3f3f3f diff --git a/.config/kitty/kitty-themes/themes/ayu.conf b/.config/kitty/kitty-themes/themes/ayu.conf new file mode 100755 index 0000000..8030263 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/ayu.conf @@ -0,0 +1,21 @@ +background #0e1419 +foreground #e5e1cf +cursor #f19618 +selection_background #243340 +color0 #000000 +color8 #323232 +color1 #ff3333 +color9 #ff6565 +color2 #b8cc52 +color10 #e9fe83 +color3 #e6c446 +color11 #fff778 +color4 #36a3d9 +color12 #68d4ff +color5 #f07078 +color13 #ffa3aa +color6 #95e5cb +color14 #c7fffc +color7 #ffffff +color15 #ffffff +selection_foreground #0e1419 diff --git a/.config/kitty/kitty-themes/themes/ayu_light.conf b/.config/kitty/kitty-themes/themes/ayu_light.conf new file mode 100755 index 0000000..35c532c --- /dev/null +++ b/.config/kitty/kitty-themes/themes/ayu_light.conf @@ -0,0 +1,21 @@ +background #fafafa +foreground #5b6673 +cursor #ff6900 +selection_background #f0ede4 +color0 #000000 +color8 #323232 +color1 #ff3333 +color9 #ff6565 +color2 #86b200 +color10 #b8e532 +color3 #f19618 +color11 #ffc849 +color4 #41a6d9 +color12 #73d7ff +color5 #f07078 +color13 #ffa3aa +color6 #4cbe99 +color14 #7ff0cb +color7 #ffffff +color15 #ffffff +selection_foreground #fafafa diff --git a/.config/kitty/kitty-themes/themes/ayu_mirage.conf b/.config/kitty/kitty-themes/themes/ayu_mirage.conf new file mode 100755 index 0000000..19d2e40 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/ayu_mirage.conf @@ -0,0 +1,21 @@ +background #212733 +foreground #d9d7ce +cursor #ffcc66 +selection_background #343f4c +color0 #191e2a +color8 #686868 +color1 #ed8274 +color9 #f28779 +color2 #a6cc70 +color10 #bae67e +color3 #fad07b +color11 #ffd580 +color4 #6dcbfa +color12 #73d0ff +color5 #cfbafa +color13 #d4bfff +color6 #90e1c6 +color14 #95e6cb +color7 #c7c7c7 +color15 #ffffff +selection_foreground #212733 diff --git a/.config/kitty/kitty-themes/themes/breath2.conf b/.config/kitty/kitty-themes/themes/breath2.conf new file mode 100755 index 0000000..d3a8aa0 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/breath2.conf @@ -0,0 +1,53 @@ +## name: Breath2 +## author: b3yc0d3 +## license: MIT +## upstream: https://raw.githubusercontent.com/b3yc0d3/my-kitty-themes/main/themes/breath2.conf +## blurb: Breath2 Theme for Kitty Terminal + +#: The basic colors +foreground #17a88b +background #1e2229 +selection_foreground #1e2229 +selection_background #00bc96 + +#: Cursor +cursor #00bc96 +cursor_text_color #1e2229 + +#: URL underline color when hovering with mouse +url_color #17a88b +url_style straight + +#: The basic 16 colors + +#: black +color0 #0d0f11 +color8 #2e3439 + +#: red +color1 #c0392b +color9 #783228 + +#: green +color2 #55a649 +color10 #32642c + +#: yellow +color3 #fdbc4b +color11 #b65619 + +#: blue +color4 #3daee9 +color12 #1b668f + +#: magenta +color5 #8e44ad +color13 #614a73 + +#: cyan +color6 #16a085 +color14 #186c60 + +#: white +color7 #ffffff +color15 #63686d diff --git a/.config/kitty/kitty-themes/themes/catppuccin.conf b/.config/kitty/kitty-themes/themes/catppuccin.conf new file mode 100755 index 0000000..8a7d92b --- /dev/null +++ b/.config/kitty/kitty-themes/themes/catppuccin.conf @@ -0,0 +1,79 @@ +# vim:ft=kitty + +## name: Catppuccin +## author: Pocco81 (https://github.com/Pocco81) +## license: MIT +## upstream: https://raw.githubusercontent.com/catppuccin/kitty/main/catppuccin.conf +## blurb: Soothing pastel theme for the high-spirited! + +# The basic colors +foreground #D9E0EE +background #1E1E2E +selection_foreground #D9E0EE +selection_background #575268 + +# Cursor colors +cursor #F5E0DC +cursor_text_color #1E1E2E + +# URL underline color when hovering with mouse +url_color #F5E0DC + +# kitty window border colors +active_border_color #C9CBFF +inactive_border_color #575268 +bell_border_color #FAE3B0 + +# OS Window titlebar colors +wayland_titlebar_color system +macos_titlebar_color system + +#: Tab bar colors +active_tab_foreground #F5C2E7 +active_tab_background #575268 +inactive_tab_foreground #D9E0EE +inactive_tab_background #1E1E2E +tab_bar_background #161320 + +# Colors for marks (marked text in the terminal) + +mark1_foreground #1E1E2E +mark1_background #96CDFB +mark2_foreground #1E1E2E +mark2_background #F5C2E7 +mark3_foreground #1E1E2E +mark3_background #B5E8E0 + +#: The 16 terminal colors + +#: black +color0 #6E6C7E +color8 #988BA2 + +#: red +color1 #F28FAD +color9 #F28FAD + +#: green +color2 #ABE9B3 +color10 #ABE9B3 + +#: yellow +color3 #FAE3B0 +color11 #FAE3B0 + +#: blue +color4 #96CDFB +color12 #96CDFB + +#: magenta +color5 #F5C2E7 +color13 #F5C2E7 + +#: cyan +color6 #89DCEB +color14 #89DCEB + +#: white +color7 #D9E0EE +color15 #D9E0EE diff --git a/.config/kitty/kitty-themes/themes/citylights.conf b/.config/kitty/kitty-themes/themes/citylights.conf new file mode 100755 index 0000000..572c643 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/citylights.conf @@ -0,0 +1,75 @@ +# vim:ft=kitty +## name: citylights +## author: 食無魚 +## license: MIT +## upstream: https://raw.githubusercontent.com/liuyinz/dotfile/master/common/kitty/citylights.conf +## blurb: Theme for Kitty inspired by https://citylights.xyz/ + +# The basic colors +foreground #a0b3c5 +background #1d252c +selection_foreground #1d252c +selection_background #a0b3c5 + +# Cursor colors +cursor #a0b3c5 +cursor_text_color #1d252c + +# URL +url_color #5ec4ff + +# kitty window border colors +active_border_color #a0b3c5 +inactive_border_color #62686e + +# OS Window titlebar colors +wayland_titlebar_color #1d252c +macos_titlebar_color #1d252c + +# Tab bar colors +active_tab_foreground #1d252c +active_tab_background #a0b3c5 +inactive_tab_foreground #a0b3c5 +inactive_tab_background #1d252c + +# Colors for marks (marked text in the terminal) + +mark1_foreground #1d252c +mark1_background #8bd49c +mark2_foreground #1d252c +mark2_background #ebbf83 +mark3_foreground #1d252c +mark3_background #d95468 + +# The basic 16 colors +# black +color0 #1d252c +color8 #566c7d + +# red +color1 #d95468 +color9 #d95468 + +# green +color2 #8bd49c +color10 #8bd49c + +# yellow +color3 #ebbf83 +color11 #ebbf83 + +# blue +color4 #5ec4ff +color12 #5ec4ff + +# magenta +color5 #c06ece +color13 #c06ece + +# cyan +color6 #008b94 +color14 #70e1e8 + +# white +color7 #a0b3c5 +color15 #a0b3c5 diff --git a/.config/kitty/kitty-themes/themes/dark_pride.conf b/.config/kitty/kitty-themes/themes/dark_pride.conf new file mode 100755 index 0000000..754e2fb --- /dev/null +++ b/.config/kitty/kitty-themes/themes/dark_pride.conf @@ -0,0 +1,26 @@ +## name: Dark Pride +## author: apathyrecharge +## license: GPLv3 +## blurb: Dark trans-pride colour inspired theme + +background #0d0d1b +foreground #ccccce +selection_background #002a3a +selection_foreground #0d0f18 +cursor #ff0017 +color0 #282828 +color1 #ca1444 +color2 #789aba +color3 #b3879f +color4 #94469b +color5 #cb6fa1 +color6 #fb6e93 +color7 #cf98c1 +color8 #98218e +color9 #cb515d +color10 #5a87b1 +color11 #9c61ab +color12 #9a77b1 +color13 #f2a297 +color14 #f4436f +color15 #ebdbb2 diff --git a/.config/kitty/kitty-themes/themes/default.conf b/.config/kitty/kitty-themes/themes/default.conf new file mode 100755 index 0000000..6056824 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/default.conf @@ -0,0 +1,8 @@ +# vim:ft=kitty +# The default theme, uses all default settings from kitty + +## name: Default +## author: Kovid Goyal +## license: GPLv3 +## blurb: This theme uses all default settings from kitty. +## Use it to easily restore defaults. diff --git a/.config/kitty/kitty-themes/themes/deuters_delight.conf b/.config/kitty/kitty-themes/themes/deuters_delight.conf new file mode 100755 index 0000000..4302871 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/deuters_delight.conf @@ -0,0 +1,82 @@ +## name: Deuters' Delight +## author: Alan Welsh +## license: CC BY 4.0 +## upstream: https://github.com/Pound-Hash/colorblind_themes.git +## blurb: A theme for those with red-green colorblindness. Titlebar, tab, and bell colors are left at their defaults. + + + +### Foreground & background ### + +foreground #D9D9D9 +background #1A1A1A +selection_foreground #000000 +selection_background #D9D9D9 + + + +### Cursor ### + +cursor #D9D9D9 +cursor_text_color #000000 + + + +### Base 16 colors ### + +#: black +color0 #1A1A1A +color8 #1A1A1A + +#: red +color1 #D19594 +color9 #D19594 + +#: green +color2 #70C270 +color10 #70C270 + +#: blue +color4 #BEBEF4 +color12 #BEBEF4 + +#: yellow +color3 #D9D9A6 +color11 #D9D9A6 + +#: magenta +color5 #BEBEF4 +color13 #BEBEF4 + +#: cyan +color6 #70C270 +color14 #70C270 + +#: white +color7 #D9D9D9 +color15 #D9D9D9 + + + +### URLs ### + +url_color #D9D9D9 + + + +### Marks ### + +mark1_foreground #000000 +mark1_background #CCCCCC +mark2_foreground #000000 +mark2_background #CCCCCC +mark3_foreground #000000 +mark3_background #CCCCCC + + + +### Window borders ### + +active_border_color #7A7A52 +inactive_border_color #005151 + diff --git a/.config/kitty/kitty-themes/themes/duckbones.conf b/.config/kitty/kitty-themes/themes/duckbones.conf new file mode 100755 index 0000000..04f8ec5 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/duckbones.conf @@ -0,0 +1,49 @@ +# This file is auto-generated by shipwright.nvim +# vim:ft=kitty +## name: duckbones +## author: Michael Chris Lopez +## license: MIT +## upstream: https://github.com/mcchrish/zenbones.nvim/raw/main/extras/kitty/duckbones.conf +## blurb: A zenbones variant inspired by Spaceduck. +foreground #EBEFC0 +background #0E101A +selection_foreground #EBEFC0 +selection_background #37382D +# Cursor colors +cursor #EDF2C2 +cursor_text_color #0E101A +# URL underline color when hovering with mouse +# kitty window border colors +# OS Window titlebar colors +# Tab bar colors +active_tab_foreground #EBEFC0 +active_tab_background #4D3191 +inactive_tab_foreground #EBEFC0 +inactive_tab_background #232738 +# Colors for marks (marked text in the terminal) +# The basic 16 colors +# black +color0 #0E101A +color8 #2B2F46 +# red +color1 #E03600 +color9 #FF4821 +# green +color2 #5DCD97 +color10 #58DB9E +# yellow +color3 #E39500 +color11 #F6A100 +# blue +color4 #00A3CB +color12 #00B4E0 +# magenta +color5 #795CCC +color13 #B3A1E6 +# cyan +color6 #00A3CB +color14 #00B4E0 +# white +color7 #EBEFC0 +color15 #B3B692 +# You can set the remaining 240 colors as color16 to color255. diff --git a/.config/kitty/kitty-themes/themes/everforest_dark_hard.conf b/.config/kitty/kitty-themes/themes/everforest_dark_hard.conf new file mode 100755 index 0000000..18f3c5a --- /dev/null +++ b/.config/kitty/kitty-themes/themes/everforest_dark_hard.conf @@ -0,0 +1,68 @@ +## name: Everforest Dark Hard +## license: MIT +## upstream: https://github.com/ewal/kitty-everforest/blob/master/themes/everforest_dark_hard.conf +## blurb: Dark (hard) theme based on https://github.com/sainnhe/everforest for Vim. + +foreground #d3c6aa +background #2b3339 +selection_foreground #9da9a0 +selection_background #503946 + +cursor #d3c6aa +cursor_text_color #323c41 + +url_color #7fbbb3 + +active_border_color #a7c080 +inactive_border_color #53605c +bell_border_color #e69875 +visual_bell_color none + +wayland_titlebar_color system +macos_titlebar_color system + +active_tab_background #2b3339 +active_tab_foreground #d3c6aa +inactive_tab_background #3a454a +inactive_tab_foreground #9da9a0 +tab_bar_background #323c41 +tab_bar_margin_color none + +mark1_foreground #2b3339 +mark1_background #7fbbb3 +mark2_foreground #2b3339 +mark2_background #d3c6aa +mark3_foreground #2b3339 +mark3_background #d699b6 + +#: black +color0 #2b3339 +color8 #7a8478 + +#: red +color1 #e67e80 +color9 #e66868 + +#: green +color2 #a7c080 +color10 #8da101 + +#: yellow +color3 #dbbc7f +color11 #dfa000 + +#: blue +color4 #7fbbb3 +color12 #3a94c5 + +#: magenta +color5 #d699b6 +color13 #df69ba + +#: cyan +color6 #83c092 +color14 #35a77c + +#: white +color7 #d3c6aa +color15 #5c6a72 diff --git a/.config/kitty/kitty-themes/themes/everforest_dark_medium.conf b/.config/kitty/kitty-themes/themes/everforest_dark_medium.conf new file mode 100755 index 0000000..da3cbbd --- /dev/null +++ b/.config/kitty/kitty-themes/themes/everforest_dark_medium.conf @@ -0,0 +1,68 @@ +## name: Everforest Dark Medium +## license: MIT +## upstream: https://github.com/ewal/kitty-everforest/blob/master/themes/everforest_dark_medium.conf +## blurb: Dark (medium) theme based on https://github.com/sainnhe/everforest for Vim. + +foreground #d3c6aa +background #2f383e +selection_foreground #9da9a0 +selection_background #573e4c + +cursor #d3c6aa +cursor_text_color #374247 + +url_color #7fbbb3 + +active_border_color #a7c080 +inactive_border_color #596763 +bell_border_color #e69875 +visual_bell_color none + +wayland_titlebar_color system +macos_titlebar_color system + +active_tab_background #2f383e +active_tab_foreground #d3c6aa +inactive_tab_background #404c51 +inactive_tab_foreground #9da9a0 +tab_bar_background #374247 +tab_bar_margin_color none + +mark1_foreground #2f383e +mark1_background #7fbbb3 +mark2_foreground #2f383e +mark2_background #d3c6aa +mark3_foreground #2f383e +mark3_background #d699b6 + +#: black +color0 #2f383e +color8 #7a8478 + +#: red +color1 #e67e80 +color9 #e66868 + +#: green +color2 #a7c080 +color10 #8da101 + +#: yellow +color3 #dbbc7f +color11 #dfa000 + +#: blue +color4 #7fbbb3 +color12 #3a94c5 + +#: magenta +color5 #d699b6 +color13 #df69ba + +#: cyan +color6 #83c092 +color14 #35a77c + +#: white +color7 #d3c6aa +color15 #5c6a72 diff --git a/.config/kitty/kitty-themes/themes/everforest_dark_soft.conf b/.config/kitty/kitty-themes/themes/everforest_dark_soft.conf new file mode 100755 index 0000000..ced0567 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/everforest_dark_soft.conf @@ -0,0 +1,68 @@ +## name: Everforest Dark Soft +## license: MIT +## upstream: https://github.com/ewal/kitty-everforest/blob/master/themes/everforest_dark_soft.conf +## blurb: Dark (soft) theme based on https://github.com/sainnhe/everforest for Vim. + +foreground #d3c6aa +background #323d43 +selection_foreground #9da9a0 +selection_background #5d4251 + +cursor #d3c6aa +cursor_text_color #3c474d + +url_color #7fbbb3 + +active_border_color #a7c080 +inactive_border_color #5f6d67 +bell_border_color #e69875 +visual_bell_color none + +wayland_titlebar_color system +macos_titlebar_color system + +active_tab_background #323d43 +active_tab_foreground #d3c6aa +inactive_tab_background #465258 +inactive_tab_foreground #859289 +tab_bar_background #3c474d +tab_bar_margin_color none + +mark1_foreground #323d43 +mark1_background #7fbbb3 +mark2_foreground #323d43 +mark2_background #d3c6aa +mark3_foreground #323d43 +mark3_background #d699b6 + +#: black +color0 #323d43 +color8 #7a8478 + +#: red +color1 #e67e80 +color9 #e66868 + +#: green +color2 #a7c080 +color10 #8da101 + +#: yellow +color3 #dbbc7f +color11 #dfa000 + +#: blue +color4 #7fbbb3 +color12 #3a94c5 + +#: magenta +color5 #d699b6 +color13 #df69ba + +#: cyan +color6 #83c092 +color14 #35a77c + +#: white +color7 #d3c6aa +color15 #5c6a72 diff --git a/.config/kitty/kitty-themes/themes/everforest_light_hard.conf b/.config/kitty/kitty-themes/themes/everforest_light_hard.conf new file mode 100755 index 0000000..8d9402a --- /dev/null +++ b/.config/kitty/kitty-themes/themes/everforest_light_hard.conf @@ -0,0 +1,68 @@ +## name: Everforest Light Hard +## license: MIT +## upstream: https://github.com/ewal/kitty-everforest/blob/master/themes/everforest_light_hard.conf +## blurb: Light (hard) theme based on https://github.com/sainnhe/everforest for Vim. + +foreground #5c6a72 +background #fff9e8 +selection_foreground #829181 +selection_background #edf0cd + +cursor #5c6a72 +cursor_text_color #f7f4e0 + +url_color #3a94c5 + +active_border_color #8da101 +inactive_border_color #bec5b2 +bell_border_color #f57d26 +visual_bell_color none + +wayland_titlebar_color system +macos_titlebar_color system + +active_tab_background #fff9e8 +active_tab_foreground #5c6a72 +inactive_tab_background #f0eed9 +inactive_tab_foreground #939f91 +tab_bar_background #f7f4e0 +tab_bar_margin_color none + +mark1_foreground #fff9e8 +mark1_background #3a94c5 +mark2_foreground #fff9e8 +mark2_background #d3c6aa +mark3_foreground #fff9e8 +mark3_background #df69ba + +#: black +color0 #d3c6aa +color8 #a6b0a0 + +#: red +color1 #e66868 +color9 #e67e80 + +#: green +color2 #8da101 +color10 #a7c080 + +#: yellow +color3 #dfa000 +color11 #dbbc7f + +#: blue +color4 #3a94c5 +color12 #7fbbb3 + +#: magenta +color5 #df69ba +color13 #d699b6 + +#: cyan +color6 #35a77c +color14 #83c092 + +#: white +color7 #5c6a72 +color15 #d3c6aa diff --git a/.config/kitty/kitty-themes/themes/everforest_light_medium.conf b/.config/kitty/kitty-themes/themes/everforest_light_medium.conf new file mode 100755 index 0000000..bc5ba96 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/everforest_light_medium.conf @@ -0,0 +1,68 @@ +## name: Everforest Light Medium +## license: MIT +## upstream: https://github.com/ewal/kitty-everforest/blob/master/themes/everforest_light_medium.conf +## blurb: Light (medium) theme based on https://github.com/sainnhe/everforest for Vim. + +foreground #5c6a72 +background #fdf6e3 +selection_foreground #829181 +selection_background #eaedc8 + +cursor #5c6a72 +cursor_text_color #f3efda + +url_color #3a94c5 + +active_border_color #8da101 +inactive_border_color #bdc3af +bell_border_color #f57d26 +visual_bell_color none + +wayland_titlebar_color system +macos_titlebar_color system + +active_tab_background #fdf6e3 +active_tab_foreground #5c6a72 +inactive_tab_background #fdf6e3 +inactive_tab_foreground #939f91 +tab_bar_background #fdf6e3 +tab_bar_margin_color none + +mark1_foreground #fdf6e3 +mark1_background #3a94c5 +mark2_foreground #fdf6e3 +mark2_background #d3c6aa +mark3_foreground #fdf6e3 +mark3_background #df69ba + +#: black +color0 #d3c6aa +color8 #a6b0a0 + +#: red +color1 #e66868 +color9 #e67e80 + +#: green +color2 #8da101 +color10 #a7c080 + +#: yellow +color3 #dfa000 +color11 #dbbc7f + +#: blue +color4 #3a94c5 +color12 #7fbbb3 + +#: magenta +color5 #df69ba +color13 #d699b6 + +#: cyan +color6 #35a77c +color14 #83c092 + +#: white +color7 #5c6a72 +color15 #d3c6aa diff --git a/.config/kitty/kitty-themes/themes/everforest_light_soft.conf b/.config/kitty/kitty-themes/themes/everforest_light_soft.conf new file mode 100755 index 0000000..e373b6c --- /dev/null +++ b/.config/kitty/kitty-themes/themes/everforest_light_soft.conf @@ -0,0 +1,68 @@ +## name: Everforest Light Soft +## license: MIT +## upstream: https://github.com/ewal/kitty-everforest/blob/master/themes/everforest_light_soft.conf +## blurb: Light (soft) theme based on https://github.com/sainnhe/everforest for Vim. + +foreground #5c6a72 +background #f8f0dc +selection_foreground #829181 +selection_background #e6e9c4 + +cursor #5c6a72 +cursor_text_color #efead4 + +url_color #3a94c5 + +active_border_color #8da101 +inactive_border_color #b9c0ab +bell_border_color #f57d26 +visual_bell_color none + +wayland_titlebar_color system +macos_titlebar_color system + +active_tab_background #f8f0dc +active_tab_foreground #5c6a72 +inactive_tab_background #e9e5cf +inactive_tab_foreground #939f91 +tab_bar_background #efead4 +tab_bar_margin_color none + +mark1_foreground #f8f0dc +mark1_background #3a94c5 +mark2_foreground #f8f0dc +mark2_background #d3c6aa +mark3_foreground #f8f0dc +mark3_background #df69ba + +#: black +color0 #d3c6aa +color8 #a6b0a0 + +#: red +color1 #e66868 +color9 #e67e80 + +#: green +color2 #8da101 +color10 #a7c080 + +#: yellow +color3 #dfa000 +color11 #dbbc7f + +#: blue +color4 #3a94c5 +color12 #7fbbb3 + +#: magenta +color5 #df69ba +color13 #d699b6 + +#: cyan +color6 #35a77c +color14 #83c092 + +#: white +color7 #5c6a72 +color15 #d3c6aa diff --git a/.config/kitty/kitty-themes/themes/fairyfloss.conf b/.config/kitty/kitty-themes/themes/fairyfloss.conf new file mode 100755 index 0000000..509c757 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/fairyfloss.conf @@ -0,0 +1,100 @@ +## name: fairyfloss +## author: Snuggle · https://github.com/Snuggle +## license: MIT +## upstream: https://github.com/Snuggle/kitty-themes +## blurb: A theme inspired by the popular fairyfloss colour theme + +#: All the settings below are colors, which you can choose to modify, or use the +#: defaults. You can also add non-color based settings if needed but note that +#: these will not work with using kitty @ set-colors with this theme. For a +#: reference on what these settings do see https://sw.kovidgoyal.net/kitty/conf/ + +#: The basic colors + +foreground #f8f8f0 +background #5a5475 +selection_foreground #ad5877 +selection_background #ffb8d1 + + +#: Cursor colors + +cursor #ffb8d1 +# cursor_text_color #111111 + + +#: URL underline color when hovering with mouse + +url_color #ad5877 + + +#: kitty window border colors and terminal bell colors + +# active_border_color #00ff00 +# inactive_border_color #cccccc +# bell_border_color #ff5a00 +# visual_bell_color none + + +#: OS Window titlebar colors + +# wayland_titlebar_color system +# macos_titlebar_color system + + +#: Tab bar colors + +# active_tab_foreground #000 +# active_tab_background #eee +# inactive_tab_foreground #444 +# inactive_tab_background #999 +# tab_bar_background none +# tab_bar_margin_color none + + +#: Colors for marks (marked text in the terminal) + +# mark1_foreground black +# mark1_background #98d3cb +# mark2_foreground black +# mark2_background #f2dcd3 +# mark3_foreground black +# mark3_background #f274bc + + +#: The basic 16 colors + +#: black +color0 #464258 +color8 #c19fd8 + +#: red +color1 #ff857f +color9 #f44747 + +#: green +color2 #ad5877 +color10 #ffb8d1 + +#: yellow +color3 #e6c000 +color11 #ffea00 + +#: blue +color4 #6c71c4 +color12 #6796e6 + +#: magenta +color5 #b267e6 +color13 #c5a3ff + +#: cyan +color6 #afecad +color14 #b2ffdd + +#: white +color7 #cccccc +color15 #f8f8f0 + + +#: You can set the remaining 240 colors as color16 to color255. diff --git a/.config/kitty/kitty-themes/themes/gruvbox-dark-hard.conf b/.config/kitty/kitty-themes/themes/gruvbox-dark-hard.conf new file mode 100755 index 0000000..649473f --- /dev/null +++ b/.config/kitty/kitty-themes/themes/gruvbox-dark-hard.conf @@ -0,0 +1,33 @@ +## name: Gruvbox Dark Hard +## author: Pavel Pertsev +## license: MIT/X11 +## upstream: https://raw.githubusercontent.com/gruvbox-community/gruvbox-contrib/master/kitty/gruvbox-dark-hard.conf + + +selection_foreground #ebdbb2 +selection_background #d65d0e + +background #1d2021 +foreground #ebdbb2 + +color0 #3c3836 +color1 #cc241d +color2 #98971a +color3 #d79921 +color4 #458588 +color5 #b16286 +color6 #689d6a +color7 #a89984 +color8 #928374 +color9 #fb4934 +color10 #b8bb26 +color11 #fabd2f +color12 #83a598 +color13 #d3869b +color14 #8ec07c +color15 #fbf1c7 + +cursor #bdae93 +cursor_text_color #665c54 + +url_color #458588 diff --git a/.config/kitty/kitty-themes/themes/gruvbox-dark-soft.conf b/.config/kitty/kitty-themes/themes/gruvbox-dark-soft.conf new file mode 100755 index 0000000..54e6ea5 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/gruvbox-dark-soft.conf @@ -0,0 +1,33 @@ +## name: Gruvbox Dark Soft +## author: Pavel Pertsev +## license: MIT/X11 +## upstream: https://raw.githubusercontent.com/gruvbox-community/gruvbox-contrib/master/kitty/gruvbox-dark-soft.conf + + +selection_foreground #ebdbb2 +selection_background #d65d0e + +background #32302f +foreground #ebdbb2 + +color0 #3c3836 +color1 #cc241d +color2 #98971a +color3 #d79921 +color4 #458588 +color5 #b16286 +color6 #689d6a +color7 #a89984 +color8 #928374 +color9 #fb4934 +color10 #b8bb26 +color11 #fabd2f +color12 #83a598 +color13 #d3869b +color14 #8ec07c +color15 #fbf1c7 + +cursor #bdae93 +cursor_text_color #665c54 + +url_color #458588 diff --git a/.config/kitty/kitty-themes/themes/gruvbox-dark.conf b/.config/kitty/kitty-themes/themes/gruvbox-dark.conf new file mode 100755 index 0000000..b93d4a8 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/gruvbox-dark.conf @@ -0,0 +1,32 @@ +## name: Gruvbox Dark +## author: Pavel Pertsev +## license: MIT/X11 +## upstream: https://raw.githubusercontent.com/gruvbox-community/gruvbox-contrib/master/kitty/gruvbox-dark.conf + +selection_foreground #ebdbb2 +selection_background #d65d0e + +background #282828 +foreground #ebdbb2 + +color0 #3c3836 +color1 #cc241d +color2 #98971a +color3 #d79921 +color4 #458588 +color5 #b16286 +color6 #689d6a +color7 #a89984 +color8 #928374 +color9 #fb4934 +color10 #b8bb26 +color11 #fabd2f +color12 #83a598 +color13 #d3869b +color14 #8ec07c +color15 #fbf1c7 + +cursor #bdae93 +cursor_text_color #665c54 + +url_color #458588 diff --git a/.config/kitty/kitty-themes/themes/gruvbox-light-hard.conf b/.config/kitty/kitty-themes/themes/gruvbox-light-hard.conf new file mode 100755 index 0000000..cd81199 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/gruvbox-light-hard.conf @@ -0,0 +1,32 @@ +## name: Gruvbox Light Hard +## author: Pavel Pertsev +## license: MIT/X11 +## upstream: https://raw.githubusercontent.com/gruvbox-community/gruvbox-contrib/master/kitty/gruvbox-light-hard.conf + +selection_foreground #3c3836 +selection_background #d65d0e + +background #f9f5d7 +foreground #3c3836 + +color0 #ebdbb2 +color1 #cc241d +color2 #98971a +color3 #d79921 +color4 #458588 +color5 #b16286 +color6 #689d6a +color7 #7c6f64 +color8 #928374 +color9 #9d0006 +color10 #79740e +color11 #b57614 +color12 #076678 +color13 #8f3f71 +color14 #427b58 +color15 #282828 + +cursor #665c54 +cursor_text_color #bdae93 + +url_color #458588 diff --git a/.config/kitty/kitty-themes/themes/gruvbox-light-soft.conf b/.config/kitty/kitty-themes/themes/gruvbox-light-soft.conf new file mode 100755 index 0000000..60f1838 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/gruvbox-light-soft.conf @@ -0,0 +1,32 @@ +## name: Gruvbox Light Soft +## author: Pavel Pertsev +## license: MIT/X11 +## upstream: https://raw.githubusercontent.com/gruvbox-community/gruvbox-contrib/master/kitty/gruvbox-light-soft.conf + +selection_foreground #3c3836 +selection_background #d65d0e + +background #f2e5bc +foreground #3c3836 + +color0 #ebdbb2 +color1 #cc241d +color2 #98971a +color3 #d79921 +color4 #458588 +color5 #b16286 +color6 #689d6a +color7 #7c6f64 +color8 #928374 +color9 #9d0006 +color10 #79740e +color11 #b57614 +color12 #076678 +color13 #8f3f71 +color14 #427b58 +color15 #282828 + +cursor #665c54 +cursor_text_color #bdae93 + +url_color #458588 diff --git a/.config/kitty/kitty-themes/themes/gruvbox-light.conf b/.config/kitty/kitty-themes/themes/gruvbox-light.conf new file mode 100755 index 0000000..716499a --- /dev/null +++ b/.config/kitty/kitty-themes/themes/gruvbox-light.conf @@ -0,0 +1,33 @@ +## name: Gruvbox Light +## author: Pavel Pertsev +## license: MIT/X11 +## upstream: https://raw.githubusercontent.com/gruvbox-community/gruvbox-contrib/master/kitty/gruvbox-light.conf + + +selection_foreground #3c3836 +selection_background #d65d0e + +background #fbf1c7 +foreground #3c3836 + +color0 #ebdbb2 +color1 #cc241d +color2 #98971a +color3 #d79921 +color4 #458588 +color5 #b16286 +color6 #689d6a +color7 #7c6f64 +color8 #928374 +color9 #9d0006 +color10 #79740e +color11 #b57614 +color12 #076678 +color13 #8f3f71 +color14 #427b58 +color15 #282828 + +cursor #665c54 +cursor_text_color #bdae93 + +url_color #458588 diff --git a/.config/kitty/kitty-themes/themes/idleToes.conf b/.config/kitty/kitty-themes/themes/idleToes.conf new file mode 100755 index 0000000..941d4b2 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/idleToes.conf @@ -0,0 +1,21 @@ +background #323232 +foreground #ffffff +cursor #d6d6d6 +selection_background #5b5b5b +color0 #323232 +color8 #535353 +color1 #d25252 +color9 #f07070 +color2 #7fe173 +color10 #9dff90 +color3 #ffc66d +color11 #ffe48b +color4 #4098ff +color12 #5eb7f7 +color5 #f57fff +color13 #ff9dff +color6 #bed6ff +color14 #dcf4ff +color7 #eeeeec +color15 #ffffff +selection_foreground #323232 diff --git a/.config/kitty/kitty-themes/themes/kanagawabones.conf b/.config/kitty/kitty-themes/themes/kanagawabones.conf new file mode 100755 index 0000000..43eb940 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/kanagawabones.conf @@ -0,0 +1,49 @@ +# This file is auto-generated by shipwright.nvim +# vim:ft=kitty +## name: kanagawabones +## author: Michael Chris Lopez +## license: MIT +## upstream: https://github.com/mcchrish/zenbones.nvim/raw/main/extras/kitty/kanagawabones.conf +## blurb: A zenbones variant inspired by Kanagawa. +foreground #DDD8BB +background #1F1F28 +selection_foreground #DDD8BB +selection_background #49473E +# Cursor colors +cursor #E6E0C2 +cursor_text_color #1F1F28 +# URL underline color when hovering with mouse +# kitty window border colors +# OS Window titlebar colors +# Tab bar colors +active_tab_foreground #DDD8BB +active_tab_background #614A82 +inactive_tab_foreground #DDD8BB +inactive_tab_background #363644 +# Colors for marks (marked text in the terminal) +# The basic 16 colors +# black +color0 #1F1F28 +color8 #3C3C51 +# red +color1 #E46A78 +color9 #EC818C +# green +color2 #98BC6D +color10 #9EC967 +# yellow +color3 #E5C283 +color11 #F1C982 +# blue +color4 #7EB3C9 +color12 #7BC2DF +# magenta +color5 #957FB8 +color13 #A98FD2 +# cyan +color6 #7EB3C9 +color14 #7BC2DF +# white +color7 #DDD8BB +color15 #A8A48D +# You can set the remaining 240 colors as color16 to color255. diff --git a/.config/kitty/kitty-themes/themes/mayukai.conf b/.config/kitty/kitty-themes/themes/mayukai.conf new file mode 100755 index 0000000..760b929 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/mayukai.conf @@ -0,0 +1,31 @@ +## name: Mayukai +## author: Gulajava Ministudio +## license: MIT +## upstream: https://github.com/elianiva/mayukai-terminal-themes/blob/master/kitty.conf +## blurb: Mayukai Theme is dark and yellow bluish mirage theme with +## bright colors for easy readibility syntax. +## This theme is inspired from mixed color swatch in Ayu Theme, +## Material Theme, Monokai, Andromeda, and Gruvbox Darktooth Original Colors. + +#: The basic colors + +background #1b1c24 +foreground #cbccc6 + +color0 #191e2a +color1 #ed8274 +color2 #a6cc70 +color3 #fad07b +color4 #95e6cb +color5 #cfbafa +color6 #95e6cb +color7 #c7c7c7 + +color8 #686868 +color9 #f28779 +color10 #bae67e +color11 #ffd580 +color12 #95e6cb +color13 #d4bfff +color14 #95e6cb +color15 #ffffff \ No newline at end of file diff --git a/.config/kitty/kitty-themes/themes/moonlight.conf b/.config/kitty/kitty-themes/themes/moonlight.conf new file mode 100755 index 0000000..86798bf --- /dev/null +++ b/.config/kitty/kitty-themes/themes/moonlight.conf @@ -0,0 +1,41 @@ +# vim:ft=kitty + +## name: moonlight +## author: Ramon Saraiva +## license: MIT License +## upstream: https://raw.githubusercontent.com/ramonsaraiva/kitty-moonlight/main/moonlight.conf +## blurb: A port of moonlight vscode extension for kitty terminal + +foreground #e4f3fa +background #212337 +selection_foreground #e4f3fa +selection_background #403c64 + +cursor #5cb4fc +cursor_text_color #111111 + +url_color #80cbc4 + +active_tab_foreground #e4f3fa +active_tab_background #403c64 +inactive_tab_foreground #e4f3fa +inactive_tab_background #212337 +tab_bar_background none +tab_bar_margin_color none + +color0 #000000 +color8 #767676 +color1 #ff757f +color9 #f78b92 +color2 #2df4c0 +color10 #4ff0c6 +color3 #ffc777 +color11 #fcce8b +color4 #04d1f9 +color12 #2ddbfc +color5 #ecb2f0 +color13 #ebc5ed +color6 #b994f1 +color14 #bf9ef0 +color7 #eeffff +color15 #edf7f7 diff --git a/.config/kitty/kitty-themes/themes/neobones_dark.conf b/.config/kitty/kitty-themes/themes/neobones_dark.conf new file mode 100755 index 0000000..5d7a2fb --- /dev/null +++ b/.config/kitty/kitty-themes/themes/neobones_dark.conf @@ -0,0 +1,49 @@ +# This file is auto-generated by shipwright.nvim +# vim:ft=kitty +## name: neobones_dark +## author: Michael Chris Lopez +## license: MIT +## upstream: https://github.com/mcchrish/zenbones.nvim/raw/main/extras/kitty/neobones_dark.conf +## blurb: A zenbones variant inspired by neovim.io. +foreground #C6D5CF +background #0F191F +selection_foreground #C6D5CF +selection_background #3A3E3D +# Cursor colors +cursor #CEDDD7 +cursor_text_color #0F191F +# URL underline color when hovering with mouse +# kitty window border colors +# OS Window titlebar colors +# Tab bar colors +active_tab_foreground #C6D5CF +active_tab_background #62415B +inactive_tab_foreground #C6D5CF +inactive_tab_background #20303A +# Colors for marks (marked text in the terminal) +# The basic 16 colors +# black +color0 #0F191F +color8 #263945 +# red +color1 #DE6E7C +color9 #E8838F +# green +color2 #90FF6B +color10 #A0FF85 +# yellow +color3 #B77E64 +color11 #D68C67 +# blue +color4 #8190D4 +color12 #92A0E2 +# magenta +color5 #B279A7 +color13 #CF86C1 +# cyan +color6 #66A5AD +color14 #65B8C1 +# white +color7 #C6D5CF +color15 #98A39E +# You can set the remaining 240 colors as color16 to color255. diff --git a/.config/kitty/kitty-themes/themes/neobones_light.conf b/.config/kitty/kitty-themes/themes/neobones_light.conf new file mode 100755 index 0000000..6183ecb --- /dev/null +++ b/.config/kitty/kitty-themes/themes/neobones_light.conf @@ -0,0 +1,49 @@ +# This file is auto-generated by shipwright.nvim +# vim:ft=kitty +## name: neobones_light +## author: Michael Chris Lopez +## license: MIT +## upstream: https://github.com/mcchrish/zenbones.nvim/raw/main/extras/kitty/neobones_light.conf +## blurb: A zenbones variant inspired by neovim.io. +foreground #202E18 +background #E5EDE6 +selection_foreground #202E18 +selection_background #ADE48C +# Cursor colors +cursor #202E18 +cursor_text_color #E5EDE6 +# URL underline color when hovering with mouse +# kitty window border colors +# OS Window titlebar colors +# Tab bar colors +active_tab_foreground #202E18 +active_tab_background #DCB5D4 +inactive_tab_foreground #202E18 +inactive_tab_background #C2CFC4 +# Colors for marks (marked text in the terminal) +# The basic 16 colors +# black +color0 #E5EDE6 +color8 #B3C6B6 +# red +color1 #A8334C +color9 #94253E +# green +color2 #567A30 +color10 #3F5A22 +# yellow +color3 #944927 +color11 #803D1C +# blue +color4 #286486 +color12 #1D5573 +# magenta +color5 #88507D +color13 #7B3B70 +# cyan +color6 #3B8992 +color14 #2B747C +# white +color7 #202E18 +color15 #415934 +# You can set the remaining 240 colors as color16 to color255. diff --git a/.config/kitty/kitty-themes/themes/nightfly.conf b/.config/kitty/kitty-themes/themes/nightfly.conf new file mode 100755 index 0000000..31872ec --- /dev/null +++ b/.config/kitty/kitty-themes/themes/nightfly.conf @@ -0,0 +1,25 @@ +## name: Nightfly +## license: MIT +## upstream: https://github.com/bluz71/vim-nightfly-guicolors/blob/master/terminal_themes/kitty-theme.conf + +background #011627 +foreground #acb4c2 +cursor #9ca1aa +selection_foreground #080808 +selection_background #b2ceee +color0 #9ca1aa +color1 #fc514e +color2 #a1cd5e +color3 #e3d18a +color4 #82aaff +color5 #c792ea +color6 #7fdbca +color7 #a1aab8 +color8 #7c8f8f +color9 #ff5874 +color10 #21c7a8 +color11 #ecc48d +color12 #82aaff +color13 #ae81ff +color14 #7fdbca +color15 #d6deeb diff --git a/.config/kitty/kitty-themes/themes/rose-pine-dawn.conf b/.config/kitty/kitty-themes/themes/rose-pine-dawn.conf new file mode 100755 index 0000000..74773ad --- /dev/null +++ b/.config/kitty/kitty-themes/themes/rose-pine-dawn.conf @@ -0,0 +1,53 @@ +## name: Rosé Pine Dawn +## author: mvllow +## license: MIT +## upstream: https://github.com/rose-pine/kitty/blob/main/dist/rose-pine-dawn.conf +## blurb: All natural pine, faux fur and a bit of soho vibes for the classy minimalist + +foreground #575279 +background #faf4ed +selection_foreground #575279 +selection_background #dfdad9 + +cursor #cecacd +cursor_text_color #575279 + +url_color #907aa9 + +active_tab_foreground #575279 +active_tab_background #f2e9e1 +inactive_tab_foreground #9893a5 +inactive_tab_background #faf4ed + +# black +color0 #f2e9e1 +color8 #9893a5 + +# red +color1 #b4637a +color9 #b4637a + +# green +color2 #286983 +color10 #286983 + +# yellow +color3 #ea9d34 +color11 #ea9d34 + +# blue +color4 #56949f +color12 #56949f + +# magenta +color5 #907aa9 +color13 #907aa9 + +# cyan +color6 #d7827e +color14 #d7827e + +# white +color7 #575279 +color15 #575279 + diff --git a/.config/kitty/kitty-themes/themes/rose-pine-moon.conf b/.config/kitty/kitty-themes/themes/rose-pine-moon.conf new file mode 100755 index 0000000..b27902e --- /dev/null +++ b/.config/kitty/kitty-themes/themes/rose-pine-moon.conf @@ -0,0 +1,53 @@ +## name: Rosé Pine Moon +## author: mvllow +## license: MIT +## upstream: https://github.com/rose-pine/kitty/blob/main/dist/rose-pine-moon.conf +## blurb: All natural pine, faux fur and a bit of soho vibes for the classy minimalist + +foreground #e0def4 +background #232136 +selection_foreground #e0def4 +selection_background #44415a + +cursor #56526e +cursor_text_color #e0def4 + +url_color #c4a7e7 + +active_tab_foreground #e0def4 +active_tab_background #393552 +inactive_tab_foreground #6e6a86 +inactive_tab_background #232136 + +# black +color0 #393552 +color8 #6e6a86 + +# red +color1 #eb6f92 +color9 #eb6f92 + +# green +color2 #3e8fb0 +color10 #3e8fb0 + +# yellow +color3 #f6c177 +color11 #f6c177 + +# blue +color4 #9ccfd8 +color12 #9ccfd8 + +# magenta +color5 #c4a7e7 +color13 #c4a7e7 + +# cyan +color6 #ea9a97 +color14 #ea9a97 + +# white +color7 #e0def4 +color15 #e0def4 + diff --git a/.config/kitty/kitty-themes/themes/rose-pine.conf b/.config/kitty/kitty-themes/themes/rose-pine.conf new file mode 100755 index 0000000..fca9531 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/rose-pine.conf @@ -0,0 +1,53 @@ +## name: Rosé Pine +## author: mvllow +## license: MIT +## upstream: https://github.com/rose-pine/kitty/blob/main/dist/rose-pine.conf +## blurb: All natural pine, faux fur and a bit of soho vibes for the classy minimalist + +foreground #e0def4 +background #191724 +selection_foreground #e0def4 +selection_background #403d52 + +cursor #524f67 +cursor_text_color #e0def4 + +url_color #c4a7e7 + +active_tab_foreground #e0def4 +active_tab_background #26233a +inactive_tab_foreground #6e6a86 +inactive_tab_background #191724 + +# black +color0 #26233a +color8 #6e6a86 + +# red +color1 #eb6f92 +color9 #eb6f92 + +# green +color2 #31748f +color10 #31748f + +# yellow +color3 #f6c177 +color11 #f6c177 + +# blue +color4 #9ccfd8 +color12 #9ccfd8 + +# magenta +color5 #c4a7e7 +color13 #c4a7e7 + +# cyan +color6 #ebbcba +color14 #ebbcba + +# white +color7 #e0def4 +color15 #e0def4 + diff --git a/.config/kitty/kitty-themes/themes/seoulbones_dark.conf b/.config/kitty/kitty-themes/themes/seoulbones_dark.conf new file mode 100755 index 0000000..a86ac5b --- /dev/null +++ b/.config/kitty/kitty-themes/themes/seoulbones_dark.conf @@ -0,0 +1,49 @@ +# This file is auto-generated by shipwright.nvim +# vim:ft=kitty +## name: seoulbones_dark +## author: Michael Chris Lopez +## license: MIT +## upstream: https://github.com/mcchrish/zenbones.nvim/raw/main/extras/kitty/seoulbones_dark.conf +## blurb: A zenbones variant inspired by Seoul256. +foreground #DDDDDD +background #4B4B4B +selection_foreground #DDDDDD +selection_background #777777 +# Cursor colors +cursor #E2E2E2 +cursor_text_color #4B4B4B +# URL underline color when hovering with mouse +# kitty window border colors +# OS Window titlebar colors +# Tab bar colors +active_tab_foreground #DDDDDD +active_tab_background #8283AD +inactive_tab_foreground #DDDDDD +inactive_tab_background #5E5E5E +# Colors for marks (marked text in the terminal) +# The basic 16 colors +# black +color0 #4B4B4B +color8 #6C6465 +# red +color1 #E388A3 +color9 #EB99B1 +# green +color2 #98BD99 +color10 #8FCD92 +# yellow +color3 #FFDF9B +color11 #FFE5B3 +# blue +color4 #97BDDE +color12 #A2C8E9 +# magenta +color5 #A5A6C5 +color13 #B2B3DA +# cyan +color6 #6FBDBE +color14 #6BCACB +# white +color7 #DDDDDD +color15 #A8A8A8 +# You can set the remaining 240 colors as color16 to color255. diff --git a/.config/kitty/kitty-themes/themes/seoulbones_light.conf b/.config/kitty/kitty-themes/themes/seoulbones_light.conf new file mode 100755 index 0000000..895fc48 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/seoulbones_light.conf @@ -0,0 +1,49 @@ +# This file is auto-generated by shipwright.nvim +# vim:ft=kitty +## name: seoulbones_light +## author: Michael Chris Lopez +## license: MIT +## upstream: https://github.com/mcchrish/zenbones.nvim/raw/main/extras/kitty/seoulbones_light.conf +## blurb: A zenbones variant inspired by Seoul256. +foreground #555555 +background #E2E2E2 +selection_foreground #555555 +selection_background #CCCCCC +# Cursor colors +cursor #555555 +cursor_text_color #E2E2E2 +# URL underline color when hovering with mouse +# kitty window border colors +# OS Window titlebar colors +# Tab bar colors +active_tab_foreground #555555 +active_tab_background #CBB1CA +inactive_tab_foreground #555555 +inactive_tab_background #C4C4C4 +# Colors for marks (marked text in the terminal) +# The basic 16 colors +# black +color0 #E2E2E2 +color8 #BFBABB +# red +color1 #DC5284 +color9 #BE3C6D +# green +color2 #628562 +color10 #487249 +# yellow +color3 #C48562 +color11 #A76B48 +# blue +color4 #0084A3 +color12 #006F89 +# magenta +color5 #896788 +color13 #7F4C7E +# cyan +color6 #008586 +color14 #006F70 +# white +color7 #555555 +color15 #777777 +# You can set the remaining 240 colors as color16 to color255. diff --git a/.config/kitty/kitty-themes/themes/snazzy.conf b/.config/kitty/kitty-themes/themes/snazzy.conf new file mode 100755 index 0000000..2ed5ff5 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/snazzy.conf @@ -0,0 +1,46 @@ +# snazzy by Connor Holyday (holyday.me) +# This work is licensed under the terms of the MIT license. +# For a copy, see https://opensource.org/licenses/MIT. + +# Snazzy Colorscheme for Kitty +# Based on https://github.com/sindresorhus/hyper-snazzy + +foreground #eff0eb +background #282a36 +selection_foreground #000000 +selection_background #FFFACD +url_color #0087BD +cursor #97979B +cursor_text_color #282A36 + +# black +color0 #282a36 +color8 #686868 + +# red +color1 #FF5C57 +color9 #FF5C57 + +# green +color2 #5AF78E +color10 #5AF78E + +# yellow +color3 #F3F99D +color11 #F3F99D + +# blue +color4 #57C7FF +color12 #57C7FF + +# magenta +color5 #FF6AC1 +color13 #FF6AC1 + +# cyan +color6 #9AEDFE +color14 #9AEDFE + +# white +color7 #F1F1F0 +color15 #EFF0EB diff --git a/.config/kitty/kitty-themes/themes/tokyo_night_day.conf b/.config/kitty/kitty-themes/themes/tokyo_night_day.conf new file mode 100755 index 0000000..e7cda73 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/tokyo_night_day.conf @@ -0,0 +1,44 @@ +# vim:ft=kitty + +## name: Tokyo Night Day +## license: MIT +## author: Folke Lemaitre +## upstream: https://github.com/folke/tokyonight.nvim/raw/main/extras/kitty_tokyonight_day.conf + +background #e1e2e7 +foreground #3760bf +selection_background #99a7df +selection_foreground #3760bf +url_color #387068 +cursor #3760bf + +# Tabs +active_tab_background #2e7de9 +active_tab_foreground #d4d6e4 +inactive_tab_background #c4c8da +inactive_tab_foreground #8990b3 +#tab_bar_background #e9e9ed + +# normal +color0 #e9e9ed +color1 #f52a65 +color2 #587539 +color3 #8c6c3e +color4 #2e7de9 +color5 #9854f1 +color6 #007197 +color7 #6172b0 + +# bright +color8 #a1a6c5 +color9 #f52a65 +color10 #587539 +color11 #8c6c3e +color12 #2e7de9 +color13 #9854f1 +color14 #007197 +color15 #3760bf + +# extended colors +color16 #b15c00 +color17 #c64343 diff --git a/.config/kitty/kitty-themes/themes/tokyo_night_night.conf b/.config/kitty/kitty-themes/themes/tokyo_night_night.conf new file mode 100755 index 0000000..7ff8ff1 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/tokyo_night_night.conf @@ -0,0 +1,45 @@ +# vim:ft=kitty + +## name: Tokyo Night +## license: MIT +## author: Folke Lemaitre +## upstream: https://github.com/folke/tokyonight.nvim/raw/main/extras/kitty_tokyonight_night.conf + + +background #1a1b26 +foreground #c0caf5 +selection_background #33467C +selection_foreground #c0caf5 +url_color #73daca +cursor #c0caf5 + +# Tabs +active_tab_background #7aa2f7 +active_tab_foreground #1f2335 +inactive_tab_background #292e42 +inactive_tab_foreground #545c7e +#tab_bar_background #15161E + +# normal +color0 #15161E +color1 #f7768e +color2 #9ece6a +color3 #e0af68 +color4 #7aa2f7 +color5 #bb9af7 +color6 #7dcfff +color7 #a9b1d6 + +# bright +color8 #414868 +color9 #f7768e +color10 #9ece6a +color11 #e0af68 +color12 #7aa2f7 +color13 #bb9af7 +color14 #7dcfff +color15 #c0caf5 + +# extended colors +color16 #ff9e64 +color17 #db4b4b diff --git a/.config/kitty/kitty-themes/themes/tokyo_night_storm.conf b/.config/kitty/kitty-themes/themes/tokyo_night_storm.conf new file mode 100755 index 0000000..5ff2646 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/tokyo_night_storm.conf @@ -0,0 +1,44 @@ +# vim:ft=kitty + +## name: Tokyo Night Storm +## license: MIT +## author: Folke Lemaitre +## upstream: https://github.com/folke/tokyonight.nvim/raw/main/extras/kitty_tokyonight_storm.conf + +background #24283b +foreground #c0caf5 +selection_background #364A82 +selection_foreground #c0caf5 +url_color #73daca +cursor #c0caf5 + +# Tabs +active_tab_background #7aa2f7 +active_tab_foreground #1f2335 +inactive_tab_background #292e42 +inactive_tab_foreground #545c7e +#tab_bar_background #1D202F + +# normal +color0 #1D202F +color1 #f7768e +color2 #9ece6a +color3 #e0af68 +color4 #7aa2f7 +color5 #bb9af7 +color6 #7dcfff +color7 #a9b1d6 + +# bright +color8 #414868 +color9 #f7768e +color10 #9ece6a +color11 #e0af68 +color12 #7aa2f7 +color13 #bb9af7 +color14 #7dcfff +color15 #c0caf5 + +# extended colors +color16 #ff9e64 +color17 #db4b4b diff --git a/.config/kitty/kitty-themes/themes/vimbones.conf b/.config/kitty/kitty-themes/themes/vimbones.conf new file mode 100755 index 0000000..c5e8c77 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/vimbones.conf @@ -0,0 +1,49 @@ +# This file is auto-generated by shipwright.nvim +# vim:ft=kitty +## name: vimbones +## author: Michael Chris Lopez +## license: MIT +## upstream: https://github.com/mcchrish/zenbones.nvim/raw/main/extras/kitty/vimbones.conf +## blurb: A zenbones variant inspired by vim.org. +foreground #353535 +background #F0F0CA +selection_foreground #353535 +selection_background #D7D7D7 +# Cursor colors +cursor #353535 +cursor_text_color #F0F0CA +# URL underline color when hovering with mouse +# kitty window border colors +# OS Window titlebar colors +# Tab bar colors +active_tab_foreground #353535 +active_tab_background #DEB9D6 +inactive_tab_foreground #353535 +inactive_tab_background #D1D1B0 +# Colors for marks (marked text in the terminal) +# The basic 16 colors +# black +color0 #F0F0CA +color8 #C6C6A3 +# red +color1 #A8334C +color9 #94253E +# green +color2 #4F6C31 +color10 #3F5A22 +# yellow +color3 #944927 +color11 #803D1C +# blue +color4 #286486 +color12 #1D5573 +# magenta +color5 #88507D +color13 #7B3B70 +# cyan +color6 #3B8992 +color14 #2B747C +# white +color7 #353535 +color15 #5C5C5C +# You can set the remaining 240 colors as color16 to color255. diff --git a/.config/kitty/kitty-themes/themes/wizzy-bright.conf b/.config/kitty/kitty-themes/themes/wizzy-bright.conf new file mode 100755 index 0000000..b804606 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/wizzy-bright.conf @@ -0,0 +1,57 @@ +# vim:ft=kitty + +## name: Wizzy Bright +## license: MIT +## author: erin +## upstream: https://github.com/erincerys/kitty-themes/blob/master/themes/wizzy-bright.conf +## blurb: A variant of Wryan for a certain special Lain + +background #100814 +selection_background #4d4d4d +cursor #9d9eca + +# a nearly imperceptible purple +foreground #b2b8c4 +# alternate, deeper shades of purple +#foreground #8a8dae +#foreground #9b9ebf +url_color #75c8c8 +selection_foreground #101010 + +# black +color0 #666666 +color8 #6f6f6f + +# red +color1 #bf7998 +color9 #cf7fb3 + +# green +color2 #5ba6a6 +color10 #75c8c8 + +# yellow +color3 #8d8daa +color11 #afafdc + +# blue +color4 #6c88a6 +color12 #7aade6 + +# magenta +color5 #8f79bf +color13 #af95e6 + +# cyan +color6 #6498bf +color14 #82b8df + +# white +color7 #abbec5 +color15 #bccfd4 + +# tab bar +active_tab_foreground #322a69 +active_tab_background #afafdc +inactive_tab_foreground #322a36 +inactive_tab_background #8d8daa \ No newline at end of file diff --git a/.config/kitty/kitty-themes/themes/wizzy-muted.conf b/.config/kitty/kitty-themes/themes/wizzy-muted.conf new file mode 100755 index 0000000..b6b1b85 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/wizzy-muted.conf @@ -0,0 +1,57 @@ +# vim:ft=kitty + +## name: Wizzy Muted +## license: MIT +## author: erin +## upstream: https://github.com/erincerys/kitty-themes/blob/master/themes/wizzy-muted.conf +## blurb: A variant of Wryan for a certain special Lain + +background #100814 +selection_background #4d4d4d +cursor #9d9eca + +# a nearly imperceptible purple +foreground #b2b8c4 +# alternate, deeper shades of purple +#foreground #8a8dae +#foreground #9b9ebf +url_color #64b7b7 +selection_foreground #101010 + +# black +color0 #444444 +color8 #4e4e4e + +# red +color1 #9d5776 +color9 #cf5e91 + +# green +color2 #398484 +color10 #64b7b7 + +# yellow +color3 #6b6b88 +color11 #8d8dba + +# blue +color4 #4a6684 +color12 #588bc4 + +# magenta +color5 #6f579d +color13 #8f73c4 + +# cyan +color6 #42769d +color14 #71a7cf + +# white +color7 #9aadb2 +color15 #d1d1d1 + +# tab bar +active_tab_foreground #100847 +active_tab_background #8d8dba +inactive_tab_foreground #100814 +inactive_tab_background #6b6b88 \ No newline at end of file diff --git a/.config/kitty/kitty-themes/themes/xcodedark.conf b/.config/kitty/kitty-themes/themes/xcodedark.conf new file mode 100755 index 0000000..bff5544 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/xcodedark.conf @@ -0,0 +1,49 @@ +# xcodedark by arzg, https://github.com/arzg/vim-colors-xcode +# This work is licensed under the terms of the MIT license. +# For a copy, see https://opensource.org/licenses/MIT. + +background #292a30 +foreground #dfdfe0 + +cursor #53606e + +selection_foreground #53606e +selection_background #393b44 + +color0 #292a30 +color8 #53606e + +# red +color1 #ff8170 +# pink +color9 #ff7ab2 + +# teal +color2 #78c2b3 +# lighy teal +color10 #acf2e4 + +# yellow +color3 #ffa14f +# light yellow +color11 #d9c97c + +# blue +color4 #4eb0cc +# light blue +color12 #6bdfff + +# purple +color5 #b281eb +# light purple +color13 #dabaff + +# green +color6 #84b360 +# light green +color14 #b0e687 + +# light gray +color7 #a3b1bf +# dark gray +color15 #53606e diff --git a/.config/kitty/kitty-themes/themes/zenbones_dark.conf b/.config/kitty/kitty-themes/themes/zenbones_dark.conf new file mode 100755 index 0000000..98c4649 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/zenbones_dark.conf @@ -0,0 +1,49 @@ +# This file is auto-generated by shipwright.nvim +# vim:ft=kitty +## name: zenbones_dark +## author: Michael Chris Lopez +## license: MIT +## upstream: https://github.com/mcchrish/zenbones.nvim/raw/main/extras/kitty/zenbones_dark.conf +## blurb: A contrast-based colorscheme. +foreground #B4BDC3 +background #1C1917 +selection_foreground #B4BDC3 +selection_background #3D4042 +# Cursor colors +cursor #C4CACF +cursor_text_color #1C1917 +# URL underline color when hovering with mouse +# kitty window border colors +# OS Window titlebar colors +# Tab bar colors +active_tab_foreground #B4BDC3 +active_tab_background #65435E +inactive_tab_foreground #B4BDC3 +inactive_tab_background #352F2D +# Colors for marks (marked text in the terminal) +# The basic 16 colors +# black +color0 #1C1917 +color8 #403833 +# red +color1 #DE6E7C +color9 #E8838F +# green +color2 #819B69 +color10 #8BAE68 +# yellow +color3 #B77E64 +color11 #D68C67 +# blue +color4 #6099C0 +color12 #61ABDA +# magenta +color5 #B279A7 +color13 #CF86C1 +# cyan +color6 #66A5AD +color14 #65B8C1 +# white +color7 #B4BDC3 +color15 #888F94 +# You can set the remaining 240 colors as color16 to color255. diff --git a/.config/kitty/kitty-themes/themes/zenbones_light.conf b/.config/kitty/kitty-themes/themes/zenbones_light.conf new file mode 100755 index 0000000..7fd88c2 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/zenbones_light.conf @@ -0,0 +1,49 @@ +# This file is auto-generated by shipwright.nvim +# vim:ft=kitty +## name: zenbones_light +## author: Michael Chris Lopez +## license: MIT +## upstream: https://github.com/mcchrish/zenbones.nvim/raw/main/extras/kitty/zenbones_light.conf +## blurb: A contrast-based colorscheme. +foreground #2C363C +background #F0EDEC +selection_foreground #2C363C +selection_background #CBD9E3 +# Cursor colors +cursor #2C363C +cursor_text_color #F0EDEC +# URL underline color when hovering with mouse +# kitty window border colors +# OS Window titlebar colors +# Tab bar colors +active_tab_foreground #2C363C +active_tab_background #DEB9D6 +inactive_tab_foreground #2C363C +inactive_tab_background #D6CDC9 +# Colors for marks (marked text in the terminal) +# The basic 16 colors +# black +color0 #F0EDEC +color8 #CFC1BA +# red +color1 #A8334C +color9 #94253E +# green +color2 #4F6C31 +color10 #3F5A22 +# yellow +color3 #944927 +color11 #803D1C +# blue +color4 #286486 +color12 #1D5573 +# magenta +color5 #88507D +color13 #7B3B70 +# cyan +color6 #3B8992 +color14 #2B747C +# white +color7 #2C363C +color15 #4F5E68 +# You can set the remaining 240 colors as color16 to color255. diff --git a/.config/kitty/kitty-themes/themes/zenburned.conf b/.config/kitty/kitty-themes/themes/zenburned.conf new file mode 100755 index 0000000..248a995 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/zenburned.conf @@ -0,0 +1,49 @@ +# This file is auto-generated by shipwright.nvim +# vim:ft=kitty +## name: zenburned +## author: Michael Chris Lopez +## license: MIT +## upstream: https://github.com/mcchrish/zenbones.nvim/raw/main/extras/kitty/zenburned.conf +## blurb: A zenbones variant inspired by Zenburn. +foreground #F0E4CF +background #404040 +selection_foreground #F0E4CF +selection_background #746956 +# Cursor colors +cursor #F3EADB +cursor_text_color #404040 +# URL underline color when hovering with mouse +# kitty window border colors +# OS Window titlebar colors +# Tab bar colors +active_tab_foreground #F0E4CF +active_tab_background #9C6992 +inactive_tab_foreground #F0E4CF +inactive_tab_background #555555 +# Colors for marks (marked text in the terminal) +# The basic 16 colors +# black +color0 #404040 +color8 #625A5B +# red +color1 #E3716E +color9 #EC8685 +# green +color2 #819B69 +color10 #8BAE68 +# yellow +color3 #B77E64 +color11 #D68C67 +# blue +color4 #6099C0 +color12 #61ABDA +# magenta +color5 #B279A7 +color13 #CF86C1 +# cyan +color6 #66A5AD +color14 #65B8C1 +# white +color7 #F0E4CF +color15 #C0AB86 +# You can set the remaining 240 colors as color16 to color255. diff --git a/.config/kitty/kitty-themes/themes/zenwritten_dark.conf b/.config/kitty/kitty-themes/themes/zenwritten_dark.conf new file mode 100755 index 0000000..97a7b68 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/zenwritten_dark.conf @@ -0,0 +1,49 @@ +# This file is auto-generated by shipwright.nvim +# vim:ft=kitty +## name: zenwritten_dark +## author: Michael Chris Lopez +## license: MIT +## upstream: https://github.com/mcchrish/zenbones.nvim/raw/main/extras/kitty/zenwritten_dark.conf +## blurb: A zenbones variant with zero hue and saturation. +foreground #BBBBBB +background #191919 +selection_foreground #BBBBBB +selection_background #404040 +# Cursor colors +cursor #C9C9C9 +cursor_text_color #191919 +# URL underline color when hovering with mouse +# kitty window border colors +# OS Window titlebar colors +# Tab bar colors +active_tab_foreground #BBBBBB +active_tab_background #65435E +inactive_tab_foreground #BBBBBB +inactive_tab_background #303030 +# Colors for marks (marked text in the terminal) +# The basic 16 colors +# black +color0 #191919 +color8 #3D3839 +# red +color1 #DE6E7C +color9 #E8838F +# green +color2 #819B69 +color10 #8BAE68 +# yellow +color3 #B77E64 +color11 #D68C67 +# blue +color4 #6099C0 +color12 #61ABDA +# magenta +color5 #B279A7 +color13 #CF86C1 +# cyan +color6 #66A5AD +color14 #65B8C1 +# white +color7 #BBBBBB +color15 #8E8E8E +# You can set the remaining 240 colors as color16 to color255. diff --git a/.config/kitty/kitty-themes/themes/zenwritten_light.conf b/.config/kitty/kitty-themes/themes/zenwritten_light.conf new file mode 100755 index 0000000..cb10be0 --- /dev/null +++ b/.config/kitty/kitty-themes/themes/zenwritten_light.conf @@ -0,0 +1,49 @@ +# This file is auto-generated by shipwright.nvim +# vim:ft=kitty +## name: zenwritten_light +## author: Michael Chris Lopez +## license: MIT +## upstream: https://github.com/mcchrish/zenbones.nvim/raw/main/extras/kitty/zenwritten_light.conf +## blurb: A zenbones variant with zero hue and saturation. +foreground #353535 +background #EEEEEE +selection_foreground #353535 +selection_background #D7D7D7 +# Cursor colors +cursor #353535 +cursor_text_color #EEEEEE +# URL underline color when hovering with mouse +# kitty window border colors +# OS Window titlebar colors +# Tab bar colors +active_tab_foreground #353535 +active_tab_background #DEB9D6 +inactive_tab_foreground #353535 +inactive_tab_background #CFCFCF +# Colors for marks (marked text in the terminal) +# The basic 16 colors +# black +color0 #EEEEEE +color8 #C6C3C3 +# red +color1 #A8334C +color9 #94253E +# green +color2 #4F6C31 +color10 #3F5A22 +# yellow +color3 #944927 +color11 #803D1C +# blue +color4 #286486 +color12 #1D5573 +# magenta +color5 #88507D +color13 #7B3B70 +# cyan +color6 #3B8992 +color14 #2B747C +# white +color7 #353535 +color15 #5C5C5C +# You can set the remaining 240 colors as color16 to color255. diff --git a/.config/kitty/kitty.conf b/.config/kitty/kitty.conf new file mode 100755 index 0000000..36788d3 --- /dev/null +++ b/.config/kitty/kitty.conf @@ -0,0 +1,14 @@ +font_family Sauce Code Pro Nerd Font +bold_font auto +italic_font auto +font_size 10 + + +linux_display_server x11 +cursor_shape block +tab_bar_edge top +tab_bar_style powerline +tab_activity_symbol 🔻 +padding 4 + +include theme.conf diff --git a/.config/kitty/theme.conf b/.config/kitty/theme.conf new file mode 100755 index 0000000..8c845bb --- /dev/null +++ b/.config/kitty/theme.conf @@ -0,0 +1,59 @@ +# vim:ft=kitty + +## name: Doom One +## author: Henrik Lissner +## license: MIT +## blurb: Inspired by Atom's One Dark color scheme. + +# The basic colors +foreground #bbc2cf +background #282c34 +selection_foreground #bbc2cf +selection_background #3f444a + +# Cursor colors +cursor #bbc2cf +cursor_text_color #282c34 + +# kitty window border colors +active_border_color #46D9FF +inactive_border_color #3f444a + +# Tab bar colors +active_tab_foreground #282c34 +active_tab_background #DFDFDF +inactive_tab_foreground #3f444a +inactive_tab_background #5B6268 + +# The basic 16 colors +# black +color0 #2a2e38 +color8 #3f444a + +# red +color1 #ff6c6b +color9 #ff6655 + +# green +color2 #98be65 +color10 #99bb66 + +# yellow +color3 #ECBE7B +color11 #ECBE7B + +# blue +color4 #51afef +color12 #51afef + +# magenta +color5 #c678dd +color13 #c678dd + +# cyan +color6 #46D9FF +color14 #46D9FF + +# white +color7 #DFDFDF +color15 #bbc2cf diff --git a/nvim/.config/nvim/init.lua b/.config/nvim/init.lua similarity index 100% rename from nvim/.config/nvim/init.lua rename to .config/nvim/init.lua diff --git a/nvim/.config/nvim/lua/chadrc.lua b/.config/nvim/lua/chadrc.lua similarity index 100% rename from nvim/.config/nvim/lua/chadrc.lua rename to .config/nvim/lua/chadrc.lua diff --git a/nvim/.config/nvim/lua/config.lua b/.config/nvim/lua/config.lua similarity index 100% rename from nvim/.config/nvim/lua/config.lua rename to .config/nvim/lua/config.lua diff --git a/nvim/.config/nvim/lua/kickstart/health.lua b/.config/nvim/lua/kickstart/health.lua similarity index 100% rename from nvim/.config/nvim/lua/kickstart/health.lua rename to .config/nvim/lua/kickstart/health.lua diff --git a/nvim/.config/nvim/lua/kickstart/plugins/_init.lua b/.config/nvim/lua/kickstart/plugins/_init.lua similarity index 100% rename from nvim/.config/nvim/lua/kickstart/plugins/_init.lua rename to .config/nvim/lua/kickstart/plugins/_init.lua diff --git a/nvim/.config/nvim/lua/kickstart/plugins/auto-session.lua b/.config/nvim/lua/kickstart/plugins/auto-session.lua similarity index 100% rename from nvim/.config/nvim/lua/kickstart/plugins/auto-session.lua rename to .config/nvim/lua/kickstart/plugins/auto-session.lua diff --git a/nvim/.config/nvim/lua/kickstart/plugins/autopairs.lua b/.config/nvim/lua/kickstart/plugins/autopairs.lua similarity index 100% rename from nvim/.config/nvim/lua/kickstart/plugins/autopairs.lua rename to .config/nvim/lua/kickstart/plugins/autopairs.lua diff --git a/nvim/.config/nvim/lua/kickstart/plugins/barbar.lua b/.config/nvim/lua/kickstart/plugins/barbar.lua similarity index 100% rename from nvim/.config/nvim/lua/kickstart/plugins/barbar.lua rename to .config/nvim/lua/kickstart/plugins/barbar.lua diff --git a/nvim/.config/nvim/lua/kickstart/plugins/blink.lua b/.config/nvim/lua/kickstart/plugins/blink.lua similarity index 100% rename from nvim/.config/nvim/lua/kickstart/plugins/blink.lua rename to .config/nvim/lua/kickstart/plugins/blink.lua diff --git a/nvim/.config/nvim/lua/kickstart/plugins/cmp.lua b/.config/nvim/lua/kickstart/plugins/cmp.lua similarity index 100% rename from nvim/.config/nvim/lua/kickstart/plugins/cmp.lua rename to .config/nvim/lua/kickstart/plugins/cmp.lua diff --git a/nvim/.config/nvim/lua/kickstart/plugins/colorizer.lua b/.config/nvim/lua/kickstart/plugins/colorizer.lua similarity index 100% rename from nvim/.config/nvim/lua/kickstart/plugins/colorizer.lua rename to .config/nvim/lua/kickstart/plugins/colorizer.lua diff --git a/nvim/.config/nvim/lua/kickstart/plugins/colorscheme.lua b/.config/nvim/lua/kickstart/plugins/colorscheme.lua similarity index 100% rename from nvim/.config/nvim/lua/kickstart/plugins/colorscheme.lua rename to .config/nvim/lua/kickstart/plugins/colorscheme.lua diff --git a/nvim/.config/nvim/lua/kickstart/plugins/comment.lua b/.config/nvim/lua/kickstart/plugins/comment.lua similarity index 100% rename from nvim/.config/nvim/lua/kickstart/plugins/comment.lua rename to .config/nvim/lua/kickstart/plugins/comment.lua diff --git a/nvim/.config/nvim/lua/kickstart/plugins/conform.lua b/.config/nvim/lua/kickstart/plugins/conform.lua similarity index 100% rename from nvim/.config/nvim/lua/kickstart/plugins/conform.lua rename to .config/nvim/lua/kickstart/plugins/conform.lua diff --git a/nvim/.config/nvim/lua/kickstart/plugins/copilot_chat.lua b/.config/nvim/lua/kickstart/plugins/copilot_chat.lua similarity index 100% rename from nvim/.config/nvim/lua/kickstart/plugins/copilot_chat.lua rename to .config/nvim/lua/kickstart/plugins/copilot_chat.lua diff --git a/nvim/.config/nvim/lua/kickstart/plugins/cursorline.lua b/.config/nvim/lua/kickstart/plugins/cursorline.lua similarity index 100% rename from nvim/.config/nvim/lua/kickstart/plugins/cursorline.lua rename to .config/nvim/lua/kickstart/plugins/cursorline.lua diff --git a/nvim/.config/nvim/lua/kickstart/plugins/debug.lua b/.config/nvim/lua/kickstart/plugins/debug.lua similarity index 100% rename from nvim/.config/nvim/lua/kickstart/plugins/debug.lua rename to .config/nvim/lua/kickstart/plugins/debug.lua diff --git a/nvim/.config/nvim/lua/kickstart/plugins/flash.lua b/.config/nvim/lua/kickstart/plugins/flash.lua similarity index 100% rename from nvim/.config/nvim/lua/kickstart/plugins/flash.lua rename to .config/nvim/lua/kickstart/plugins/flash.lua diff --git a/nvim/.config/nvim/lua/kickstart/plugins/fzf-lua.lua b/.config/nvim/lua/kickstart/plugins/fzf-lua.lua similarity index 100% rename from nvim/.config/nvim/lua/kickstart/plugins/fzf-lua.lua rename to .config/nvim/lua/kickstart/plugins/fzf-lua.lua diff --git a/nvim/.config/nvim/lua/kickstart/plugins/gitsigns.lua b/.config/nvim/lua/kickstart/plugins/gitsigns.lua similarity index 100% rename from nvim/.config/nvim/lua/kickstart/plugins/gitsigns.lua rename to .config/nvim/lua/kickstart/plugins/gitsigns.lua diff --git a/nvim/.config/nvim/lua/kickstart/plugins/harpoon.lua b/.config/nvim/lua/kickstart/plugins/harpoon.lua similarity index 100% rename from nvim/.config/nvim/lua/kickstart/plugins/harpoon.lua rename to .config/nvim/lua/kickstart/plugins/harpoon.lua diff --git a/nvim/.config/nvim/lua/kickstart/plugins/indent_line.lua b/.config/nvim/lua/kickstart/plugins/indent_line.lua similarity index 100% rename from nvim/.config/nvim/lua/kickstart/plugins/indent_line.lua rename to .config/nvim/lua/kickstart/plugins/indent_line.lua diff --git a/nvim/.config/nvim/lua/kickstart/plugins/lint.lua b/.config/nvim/lua/kickstart/plugins/lint.lua similarity index 100% rename from nvim/.config/nvim/lua/kickstart/plugins/lint.lua rename to .config/nvim/lua/kickstart/plugins/lint.lua diff --git a/nvim/.config/nvim/lua/kickstart/plugins/lspconfig.lua b/.config/nvim/lua/kickstart/plugins/lspconfig.lua similarity index 100% rename from nvim/.config/nvim/lua/kickstart/plugins/lspconfig.lua rename to .config/nvim/lua/kickstart/plugins/lspconfig.lua diff --git a/nvim/.config/nvim/lua/kickstart/plugins/lualine.lua b/.config/nvim/lua/kickstart/plugins/lualine.lua similarity index 100% rename from nvim/.config/nvim/lua/kickstart/plugins/lualine.lua rename to .config/nvim/lua/kickstart/plugins/lualine.lua diff --git a/nvim/.config/nvim/lua/kickstart/plugins/mini.lua b/.config/nvim/lua/kickstart/plugins/mini.lua similarity index 100% rename from nvim/.config/nvim/lua/kickstart/plugins/mini.lua rename to .config/nvim/lua/kickstart/plugins/mini.lua diff --git a/nvim/.config/nvim/lua/kickstart/plugins/neo-tree.lua b/.config/nvim/lua/kickstart/plugins/neo-tree.lua similarity index 100% rename from nvim/.config/nvim/lua/kickstart/plugins/neo-tree.lua rename to .config/nvim/lua/kickstart/plugins/neo-tree.lua diff --git a/nvim/.config/nvim/lua/kickstart/plugins/noice.lua b/.config/nvim/lua/kickstart/plugins/noice.lua similarity index 100% rename from nvim/.config/nvim/lua/kickstart/plugins/noice.lua rename to .config/nvim/lua/kickstart/plugins/noice.lua diff --git a/nvim/.config/nvim/lua/kickstart/plugins/notify.lua b/.config/nvim/lua/kickstart/plugins/notify.lua similarity index 100% rename from nvim/.config/nvim/lua/kickstart/plugins/notify.lua rename to .config/nvim/lua/kickstart/plugins/notify.lua diff --git a/nvim/.config/nvim/lua/kickstart/plugins/nv.lua b/.config/nvim/lua/kickstart/plugins/nv.lua similarity index 100% rename from nvim/.config/nvim/lua/kickstart/plugins/nv.lua rename to .config/nvim/lua/kickstart/plugins/nv.lua diff --git a/nvim/.config/nvim/lua/kickstart/plugins/nvterm.lua b/.config/nvim/lua/kickstart/plugins/nvterm.lua similarity index 100% rename from nvim/.config/nvim/lua/kickstart/plugins/nvterm.lua rename to .config/nvim/lua/kickstart/plugins/nvterm.lua diff --git a/nvim/.config/nvim/lua/kickstart/plugins/oil.lua b/.config/nvim/lua/kickstart/plugins/oil.lua similarity index 100% rename from nvim/.config/nvim/lua/kickstart/plugins/oil.lua rename to .config/nvim/lua/kickstart/plugins/oil.lua diff --git a/nvim/.config/nvim/lua/kickstart/plugins/other.lua b/.config/nvim/lua/kickstart/plugins/other.lua similarity index 100% rename from nvim/.config/nvim/lua/kickstart/plugins/other.lua rename to .config/nvim/lua/kickstart/plugins/other.lua diff --git a/nvim/.config/nvim/lua/kickstart/plugins/surround.lua b/.config/nvim/lua/kickstart/plugins/surround.lua similarity index 100% rename from nvim/.config/nvim/lua/kickstart/plugins/surround.lua rename to .config/nvim/lua/kickstart/plugins/surround.lua diff --git a/nvim/.config/nvim/lua/kickstart/plugins/tabline.lua b/.config/nvim/lua/kickstart/plugins/tabline.lua similarity index 100% rename from nvim/.config/nvim/lua/kickstart/plugins/tabline.lua rename to .config/nvim/lua/kickstart/plugins/tabline.lua diff --git a/nvim/.config/nvim/lua/kickstart/plugins/telescope.lua b/.config/nvim/lua/kickstart/plugins/telescope.lua similarity index 100% rename from nvim/.config/nvim/lua/kickstart/plugins/telescope.lua rename to .config/nvim/lua/kickstart/plugins/telescope.lua diff --git a/nvim/.config/nvim/lua/kickstart/plugins/todo-comment.lua b/.config/nvim/lua/kickstart/plugins/todo-comment.lua similarity index 100% rename from nvim/.config/nvim/lua/kickstart/plugins/todo-comment.lua rename to .config/nvim/lua/kickstart/plugins/todo-comment.lua diff --git a/nvim/.config/nvim/lua/kickstart/plugins/transparent.lua b/.config/nvim/lua/kickstart/plugins/transparent.lua similarity index 100% rename from nvim/.config/nvim/lua/kickstart/plugins/transparent.lua rename to .config/nvim/lua/kickstart/plugins/transparent.lua diff --git a/nvim/.config/nvim/lua/kickstart/plugins/treesitter.lua b/.config/nvim/lua/kickstart/plugins/treesitter.lua similarity index 100% rename from nvim/.config/nvim/lua/kickstart/plugins/treesitter.lua rename to .config/nvim/lua/kickstart/plugins/treesitter.lua diff --git a/nvim/.config/nvim/lua/kickstart/plugins/trouble.lua b/.config/nvim/lua/kickstart/plugins/trouble.lua similarity index 100% rename from nvim/.config/nvim/lua/kickstart/plugins/trouble.lua rename to .config/nvim/lua/kickstart/plugins/trouble.lua diff --git a/nvim/.config/nvim/lua/kickstart/plugins/undotree.lua b/.config/nvim/lua/kickstart/plugins/undotree.lua similarity index 100% rename from nvim/.config/nvim/lua/kickstart/plugins/undotree.lua rename to .config/nvim/lua/kickstart/plugins/undotree.lua diff --git a/nvim/.config/nvim/lua/kickstart/plugins/which-key.lua b/.config/nvim/lua/kickstart/plugins/which-key.lua similarity index 100% rename from nvim/.config/nvim/lua/kickstart/plugins/which-key.lua rename to .config/nvim/lua/kickstart/plugins/which-key.lua diff --git a/nvim/.config/nvim/lua/mapping.lua b/.config/nvim/lua/mapping.lua similarity index 100% rename from nvim/.config/nvim/lua/mapping.lua rename to .config/nvim/lua/mapping.lua diff --git a/nvim/.config/nvim/lua/utils.lua b/.config/nvim/lua/utils.lua similarity index 100% rename from nvim/.config/nvim/lua/utils.lua rename to .config/nvim/lua/utils.lua diff --git a/.config/picom/picom.conf b/.config/picom/picom.conf new file mode 100755 index 0000000..770b943 --- /dev/null +++ b/.config/picom/picom.conf @@ -0,0 +1,413 @@ +################################# +# 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 = 1; + +# 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.0 + +# Specify a list of conditions of windows that should never be considered focused. +# focus-exclude = [] +focus-exclude = [ "class_g = 'Cairo-clock'" ]; + +# Use fixed inactive dim value, instead of adjusting according to window opacity. +# inactive-dim-fixed = 1.0 + +# Specify a list of opacity rules, in the format `PERCENT:PATTERN`, +# like `50:name *= "Firefox"`. picom-trans is recommended over this. +# Note we don't make any guarantee about possible conflicts with other +# programs that set '_NET_WM_WINDOW_OPACITY' on frame or client windows. +# example: +# opacity-rule = [ "80:class_g = 'URxvt'" ]; +# +# opacity-rule = [] + + +################################# +# Corners # +################################# + +# Sets the radius of rounded window corners. When > 0, the compositor will +# round the corners of windows. Does not interact well with +# `transparent-clipping`. +corner-radius = 2 + +# 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 = +# blur-size = 12 +# +# blur-deviation = false +# +# blur-strength = 5 + +# Blur background of semi-transparent / ARGB windows. +# Bad in performance, with driver-dependent behavior. +# The name of the switch may change without prior notifications. +# +# blur-background = false + +# Blur background of windows when the window frame is not opaque. +# Implies: +# blur-background +# Bad in performance, with driver-dependent behavior. The name may change. +# +# blur-background-frame = false + + +# Use fixed blur strength rather than adjusting according to window opacity. +# blur-background-fixed = false + + +# Specify the blur convolution kernel, with the following format: +# example: +# blur-kern = "5,5,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1"; +# +# blur-kern = "" +blur-kern = "3x3box"; + + +# Exclude conditions for background blur. +# blur-background-exclude = [] +blur-background-exclude = [ + "window_type = 'dock'", + "window_type = 'desktop'", + "_GTK_FRAME_EXTENTS@:c" +]; + +################################# +# General Settings # +################################# + +# Daemonize process. Fork to background after initialization. Causes issues with certain (badly-written) drivers. +# daemon = false + +# Specify the backend to use: `xrender`, `glx`, or `xr_glx_hybrid`. +# `xrender` is the default one. +# +# backend = "glx" +backend = "xrender"; + +# Enable/disable VSync. +# vsync = false +vsync = true; + +# Enable remote control via D-Bus. See the *D-BUS API* section below for more details. +# dbus = false + +# Try to detect WM windows (a non-override-redirect window with no +# child that has 'WM_STATE') and mark them as active. +# +# mark-wmwin-focused = false +mark-wmwin-focused = true; + +# Mark override-redirect windows that doesn't have a child window with 'WM_STATE' focused. +# mark-ovredir-focused = false +mark-ovredir-focused = true; + +# Try to detect windows with rounded corners and don't consider them +# shaped windows. The accuracy is not very high, unfortunately. +# +# detect-rounded-corners = false +detect-rounded-corners = true; + +# Detect '_NET_WM_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 = 1; focus = true; full-shadow = false; }; + dock = { shadow = false; clip-shadow-above = true; } + dnd = { shadow = false; } + popup_menu = { opacity = 1; } + dropdown_menu = { opacity = 1; } +}; diff --git a/.config/polybar/battery.sh b/.config/polybar/battery.sh new file mode 100755 index 0000000..6b74460 --- /dev/null +++ b/.config/polybar/battery.sh @@ -0,0 +1,61 @@ +#!/bin/sh + +PATH_AC="/sys/class/power_supply/AC" +PATH_BATTERY_0="/sys/class/power_supply/BAT0" +PATH_BATTERY_1="/sys/class/power_supply/BAT1" + +ac=0 +battery_level_0=0 +battery_level_1=0 +battery_max_0=0 +battery_max_1=0 + +if [ -f "$PATH_AC/online" ]; then + ac=$(cat "$PATH_AC/online") +fi + +if [ -f "$PATH_BATTERY_0/energy_now" ]; then + battery_level_0=$(cat "$PATH_BATTERY_0/energy_now") +fi + +if [ -f "$PATH_BATTERY_0/energy_full" ]; then + battery_max_0=$(cat "$PATH_BATTERY_0/energy_full") +fi + +if [ -f "$PATH_BATTERY_1/energy_now" ]; then + battery_level_1=$(cat "$PATH_BATTERY_1/energy_now") +fi + +if [ -f "$PATH_BATTERY_1/energy_full" ]; then + battery_max_1=$(cat "$PATH_BATTERY_1/energy_full") +fi + +battery_level=$(("$battery_level_0 + $battery_level_1")) +battery_max=$(("$battery_max_0 + $battery_max_1")) + +battery_percent=$(("$battery_level * 100")) +battery_percent=$(("$battery_percent / $battery_max")) + +if [ "$ac" -eq 1 ]; then + icon="#1" + + if [ "$battery_percent" -gt 97 ]; then + echo "$icon" + else + echo "$icon $battery_percent %" + fi + else + if [ "$battery_percent" -gt 85 ]; then + icon="#21" + elif [ "$battery_percent" -gt 60 ]; then + icon="#22" + elif [ "$battery_percent" -gt 35 ]; then + icon="#23" + elif [ "$battery_percent" -gt 10 ]; then + icon="#24" + else + icon="#25" + fi + + echo "$icon $battery_percent %" +fi diff --git a/.config/polybar/caffine.sh b/.config/polybar/caffine.sh new file mode 100755 index 0000000..5f28c6b --- /dev/null +++ b/.config/polybar/caffine.sh @@ -0,0 +1,13 @@ +#!/bin/env bash + +status=`xfconf-query -c xfce4-power-manager -p /xfce4-power-manager/presentation-mode -v` +if [ $status == 'false' ]; +then + polybar-msg hook caffeine 2 + xfconf-query -c xfce4-power-manager -p /xfce4-power-manager/presentation-mode -T && \ + notify-send --icon=gtk Test 'Caffeine Enabled!' + else + polybar-msg hook caffeine 1 + xfconf-query -c xfce4-power-manager -p /xfce4-power-manager/presentation-mode -T && \ + notify-send --icon=gtk Test 'Caffeine Disabled!' +fi diff --git a/.config/polybar/colors.ini b/.config/polybar/colors.ini new file mode 100755 index 0000000..ecf5120 --- /dev/null +++ b/.config/polybar/colors.ini @@ -0,0 +1,13 @@ +[colors] +bg = #c0020202 +fg = #f9f5d7 +gray = #bdae93 +red = #fb4934 +green = #b8bb26 +yellow = #fabd2f +blue = #83a598 +magenta = #d3869b +cyan = #8ec07c +black=#000000 +white=#ffffff +orange = #fe8019 diff --git a/.config/polybar/config b/.config/polybar/config new file mode 100755 index 0000000..924a748 --- /dev/null +++ b/.config/polybar/config @@ -0,0 +1,582 @@ +;[colors] +;background = #282a36 +; foreground = #ECBDF6 +;foreground = #f8f8f2 + +; Define fallback values used by all module formats +;format-foreground = #FF0000 +;format-background = #00FF00 +;format-underline = +;format-overline = +;format-spacing = +;format-padding = +;format-margin = +;format-offset = + +[colors] +; Nord theme ============ +background = #282c34 +foreground = #abb2bf +alert = #bd2c40 +volume-min = #a3be8c +volume-med = #ebcb8b +volume-max = #bf616a +; ======================= +blue = #005577 +pink = #ff79c6 +green = #50fa7b +cyan = #8be9fd +purple = #bd93f9 +red = #ff5555 +yellow = #f1fa8c +orange = #ffb86c + + +; Gotham theme ========== +; background = #0a0f14 +; foreground = #99d1ce +; alert = #d26937 +; volume-min = #2aa889 +; volume-med = #edb443 +; volume-max = #c23127 +; ======================= + +; INTRCPTR theme ============ +;background = ${xrdb:color0:#222} +;background = #aa000000 +;background-alt = #444 +;foreground = ${xrdb:color7:#222} +;foreground = #fff +;foreground-alt = #555 +;primary = #ffb52a +;secondary = #e60053 +;alert = #bd2c40 + + + + +[global/wm] +margin-bottom = 0 + +[section/base] +monitor = ${env:MONITOR:eDP1} +width = 100% +height = 16 +radius = 0 +fixed-center = true +background = ${colors.background} +foreground = ${colors.foreground} +line-size = 2 +border-size = 0 +border-color = #00 +padding-left = 2 +padding-right = 2 +padding-top = 4 +font-0 = MonoLisa:pixelsize=9;0 +font-1 = FontAwesome:style=Regular:pixelsize=9 +cursor-click = pointer +cursor-scroll = ns-resize +separator = "." +separator-padding = 1 +separator-foreground = ${colors.foreground} + +[bar/main] +inherit = section/base + +tray-position = right +tray-detached = false +tray-maxsize = 20 +tray-background = ${colors.background} +tray-offset-x = 0 +tray-offset-y = 0 +tray-padding = 4 +tray-scale = 1.0 +;tray-position = right +;tray-maxsize = 14 +;tray-offset-y = 0 +;tray-padding = 6 +;tray-scale = 1.0 +;tray-background = ${colors.background} +modules-left = i3 xwindow +modules-center = +modules-right = mpd memory wireless-network pulseaudio pulseaudio-microphone battery date + + +[bar/secondary] +inherit = section/base +modules-left = i3 xwindow +modules-center = +modules-right = pulseaudio pulseaudio-microphone battery date + +[module/i3] +type = internal/i3 +pin-workspaces = true +show-urgent = true +strip-wsnumbers = true +index-sort = true +enable-click = true +enable-scroll = false +wrapping-scroll = false +reverse-scroll = false +; fuzzy-match = true +; ws-icon-0 = 1; +; ws-icon-1 = 2; +; ws-icon-2 = 3; +; ws-icon-3 = 4; +; ws-icon-4 = 5; +; ws-icon-default =  +; label-focused = %index% +label-focused-foreground = ${colors.foreground} +label-focused-background = ${colors.blue} +;label-focused-underline = ${colors.green} + +label-focused-padding = 0 +label-unfocused-padding = 0 + + + + +[module/backlight] +;https://github.com/jaagr/polybar/wiki/Module:-backlight + +type = internal/backlight + +; Use the following command to list available cards: +; $ ls -1 /sys/class/backlight/ +card = intel_backlight + +; Available tags: +;