├── config-s4vi
├── awesome
│ ├── ui
│ │ ├── notifs
│ │ │ └── notif-center
│ │ │ │ ├── dont-disturb
│ │ │ │ ├── disturb_status
│ │ │ │ └── init.lua
│ │ │ │ ├── build-notifbox
│ │ │ │ ├── notifbox-scroller.lua
│ │ │ │ ├── notifbox-geometry.lua
│ │ │ │ ├── empty-notifbox.lua
│ │ │ │ ├── init.lua
│ │ │ │ ├── notifbox-ui-elements.lua
│ │ │ │ └── notifbox-builder.lua
│ │ │ │ ├── init.lua
│ │ │ │ └── clear-all
│ │ │ │ └── init.lua
│ │ ├── lockscreen
│ │ │ ├── lib
│ │ │ │ └── liblua_pam.so
│ │ │ └── init.lua
│ │ ├── init.lua
│ │ ├── dashboard
│ │ │ ├── date.lua
│ │ │ ├── profile.lua
│ │ │ ├── time.lua
│ │ │ ├── weather.lua
│ │ │ ├── mediakeys.lua
│ │ │ └── todo.lua
│ │ ├── decorations
│ │ │ ├── init.lua
│ │ │ └── titlebar.lua
│ │ └── widgets
│ │ │ ├── button.lua
│ │ │ ├── analog_clock.lua
│ │ │ └── pacman_taglist.lua
│ ├── module
│ │ ├── bling
│ │ │ ├── CODEOWNERS
│ │ │ ├── signal
│ │ │ │ ├── init.lua
│ │ │ │ └── playerctl
│ │ │ │ │ └── init.lua
│ │ │ ├── icons
│ │ │ │ └── layouts
│ │ │ │ │ ├── deck.png
│ │ │ │ │ ├── mstab.png
│ │ │ │ │ ├── centered.png
│ │ │ │ │ ├── vertical.png
│ │ │ │ │ ├── equalarea.png
│ │ │ │ │ └── horizontal.png
│ │ │ ├── images
│ │ │ │ ├── bling_banner.png
│ │ │ │ └── bling_banner-2x.png
│ │ │ ├── helpers
│ │ │ │ ├── init.lua
│ │ │ │ ├── shape.lua
│ │ │ │ ├── time.lua
│ │ │ │ ├── filesystem.lua
│ │ │ │ ├── client.lua
│ │ │ │ └── icon_theme.lua
│ │ │ ├── widget
│ │ │ │ ├── init.lua
│ │ │ │ ├── tabbed_misc
│ │ │ │ │ ├── init.lua
│ │ │ │ │ ├── custom_tasklist.lua
│ │ │ │ │ └── titlebar_indicator.lua
│ │ │ │ └── tabbar
│ │ │ │ │ ├── boxes.lua
│ │ │ │ │ ├── default.lua
│ │ │ │ │ └── pure.lua
│ │ │ ├── init.lua
│ │ │ ├── module
│ │ │ │ ├── init.lua
│ │ │ │ ├── flash_focus.lua
│ │ │ │ ├── tiled_wallpaper.lua
│ │ │ │ └── window_swallowing.lua
│ │ │ ├── .editorconfig
│ │ │ ├── AUTHORS.md
│ │ │ ├── layout
│ │ │ │ ├── deck.lua
│ │ │ │ ├── init.lua
│ │ │ │ ├── vertical.lua
│ │ │ │ ├── horizontal.lua
│ │ │ │ ├── equalarea.lua
│ │ │ │ └── centered.lua
│ │ │ ├── LICENSE
│ │ │ ├── README.md
│ │ │ └── bling-dev-1.rockspec
│ │ ├── layout-machi
│ │ │ ├── icon.png
│ │ │ ├── nested_layout_screenshot.png
│ │ │ ├── LICENSE
│ │ │ ├── init.lua
│ │ │ └── rc.patch
│ │ ├── rubato
│ │ │ ├── images
│ │ │ │ ├── beautiful.gif
│ │ │ │ ├── slope_graph.png
│ │ │ │ ├── triangleish.png
│ │ │ │ ├── normal_graph.png
│ │ │ │ ├── connected_graph.png
│ │ │ │ ├── quadratic_easing.gif
│ │ │ │ ├── trapezoid_easing.gif
│ │ │ │ ├── disconnected_graph.png
│ │ │ │ └── forwards_forwards_graph.png
│ │ │ ├── .editorconfig
│ │ │ ├── init.lua
│ │ │ ├── rubato-1.1-1.rockspec
│ │ │ ├── subscribable.lua
│ │ │ ├── LICENSE
│ │ │ └── easing.lua
│ │ ├── savefloats.lua
│ │ └── better-resize.lua
│ ├── theme
│ │ ├── assets
│ │ │ ├── bg.png
│ │ │ ├── pfp.png
│ │ │ ├── no_music.png
│ │ │ └── icons
│ │ │ │ ├── awesome.png
│ │ │ │ ├── taglist
│ │ │ │ ├── dot.png
│ │ │ │ ├── ghost.png
│ │ │ │ ├── pacman.png
│ │ │ │ ├── pacman.svg
│ │ │ │ ├── dot.svg
│ │ │ │ └── ghost.svg
│ │ │ │ ├── volume.svg
│ │ │ │ └── brightness.svg
│ │ ├── rofi.rasi
│ │ └── picom.conf
│ ├── signal
│ │ ├── init.lua
│ │ ├── playerctl.lua
│ │ ├── cpu.lua
│ │ ├── network.lua
│ │ ├── ram.lua
│ │ ├── disk.lua
│ │ ├── brightness.lua
│ │ ├── uptime.lua
│ │ ├── todo.lua
│ │ ├── volume.lua
│ │ ├── battery.lua
│ │ └── weather.lua
│ ├── configuration
│ │ ├── autostart
│ │ ├── menu.lua
│ │ ├── init.lua
│ │ └── extras.lua
│ └── rc.lua
├── mpd
│ ├── database
│ └── mpd.conf
├── .profile
├── nvim
│ ├── examples
│ │ ├── chadrc.lua
│ │ └── init.lua
│ ├── lua
│ │ ├── plugins
│ │ │ ├── configs
│ │ │ │ ├── treesitter.lua
│ │ │ │ ├── lspkind_icons.lua
│ │ │ │ ├── lspconfig.lua
│ │ │ │ ├── nvimtree.lua
│ │ │ │ ├── telescope.lua
│ │ │ │ ├── cmp.lua
│ │ │ │ ├── alpha.lua
│ │ │ │ ├── icons.lua
│ │ │ │ └── bufferline.lua
│ │ │ └── packerInit.lua
│ │ ├── core
│ │ │ ├── autocmds.lua
│ │ │ └── options.lua
│ │ └── colors
│ │ │ ├── init.lua
│ │ │ └── highlights.lua
│ └── init.lua
├── wfuzz
│ └── wfuzz.ini
├── .Xresources
├── alacritty
│ ├── night
│ │ └── colors.yml
│ └── alacritty.yml
├── kitty
│ ├── color.ini
│ └── kitty.conf
├── starship
│ └── starship.toml
└── ncmpcpp
│ └── config
├── files
└── iconmoon.zip
├── README.md
└── autoAwesome
/config-s4vi/awesome/ui/notifs/notif-center/dont-disturb/disturb_status:
--------------------------------------------------------------------------------
1 | false
2 |
--------------------------------------------------------------------------------
/config-s4vi/awesome/module/bling/CODEOWNERS:
--------------------------------------------------------------------------------
1 | /module/* @Nooo37
2 | /widget/* @JavaCafe01
3 |
--------------------------------------------------------------------------------
/files/iconmoon.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yorkox0/autoAwesome/HEAD/files/iconmoon.zip
--------------------------------------------------------------------------------
/config-s4vi/mpd/database:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yorkox0/autoAwesome/HEAD/config-s4vi/mpd/database
--------------------------------------------------------------------------------
/config-s4vi/awesome/module/bling/signal/init.lua:
--------------------------------------------------------------------------------
1 | return {
2 | playerctl = require(... .. ".playerctl"),
3 | }
4 |
--------------------------------------------------------------------------------
/config-s4vi/awesome/theme/assets/bg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yorkox0/autoAwesome/HEAD/config-s4vi/awesome/theme/assets/bg.png
--------------------------------------------------------------------------------
/config-s4vi/awesome/theme/assets/pfp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yorkox0/autoAwesome/HEAD/config-s4vi/awesome/theme/assets/pfp.png
--------------------------------------------------------------------------------
/config-s4vi/awesome/theme/assets/no_music.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yorkox0/autoAwesome/HEAD/config-s4vi/awesome/theme/assets/no_music.png
--------------------------------------------------------------------------------
/config-s4vi/awesome/module/layout-machi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yorkox0/autoAwesome/HEAD/config-s4vi/awesome/module/layout-machi/icon.png
--------------------------------------------------------------------------------
/config-s4vi/awesome/theme/assets/icons/awesome.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yorkox0/autoAwesome/HEAD/config-s4vi/awesome/theme/assets/icons/awesome.png
--------------------------------------------------------------------------------
/config-s4vi/awesome/ui/lockscreen/lib/liblua_pam.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yorkox0/autoAwesome/HEAD/config-s4vi/awesome/ui/lockscreen/lib/liblua_pam.so
--------------------------------------------------------------------------------
/config-s4vi/awesome/module/rubato/images/beautiful.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yorkox0/autoAwesome/HEAD/config-s4vi/awesome/module/rubato/images/beautiful.gif
--------------------------------------------------------------------------------
/config-s4vi/awesome/theme/assets/icons/taglist/dot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yorkox0/autoAwesome/HEAD/config-s4vi/awesome/theme/assets/icons/taglist/dot.png
--------------------------------------------------------------------------------
/config-s4vi/awesome/module/bling/icons/layouts/deck.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yorkox0/autoAwesome/HEAD/config-s4vi/awesome/module/bling/icons/layouts/deck.png
--------------------------------------------------------------------------------
/config-s4vi/awesome/module/bling/icons/layouts/mstab.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yorkox0/autoAwesome/HEAD/config-s4vi/awesome/module/bling/icons/layouts/mstab.png
--------------------------------------------------------------------------------
/config-s4vi/awesome/module/bling/images/bling_banner.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yorkox0/autoAwesome/HEAD/config-s4vi/awesome/module/bling/images/bling_banner.png
--------------------------------------------------------------------------------
/config-s4vi/awesome/module/rubato/images/slope_graph.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yorkox0/autoAwesome/HEAD/config-s4vi/awesome/module/rubato/images/slope_graph.png
--------------------------------------------------------------------------------
/config-s4vi/awesome/module/rubato/images/triangleish.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yorkox0/autoAwesome/HEAD/config-s4vi/awesome/module/rubato/images/triangleish.png
--------------------------------------------------------------------------------
/config-s4vi/awesome/theme/assets/icons/taglist/ghost.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yorkox0/autoAwesome/HEAD/config-s4vi/awesome/theme/assets/icons/taglist/ghost.png
--------------------------------------------------------------------------------
/config-s4vi/awesome/module/bling/icons/layouts/centered.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yorkox0/autoAwesome/HEAD/config-s4vi/awesome/module/bling/icons/layouts/centered.png
--------------------------------------------------------------------------------
/config-s4vi/awesome/module/bling/icons/layouts/vertical.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yorkox0/autoAwesome/HEAD/config-s4vi/awesome/module/bling/icons/layouts/vertical.png
--------------------------------------------------------------------------------
/config-s4vi/awesome/module/bling/images/bling_banner-2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yorkox0/autoAwesome/HEAD/config-s4vi/awesome/module/bling/images/bling_banner-2x.png
--------------------------------------------------------------------------------
/config-s4vi/awesome/module/rubato/images/normal_graph.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yorkox0/autoAwesome/HEAD/config-s4vi/awesome/module/rubato/images/normal_graph.png
--------------------------------------------------------------------------------
/config-s4vi/awesome/theme/assets/icons/taglist/pacman.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yorkox0/autoAwesome/HEAD/config-s4vi/awesome/theme/assets/icons/taglist/pacman.png
--------------------------------------------------------------------------------
/config-s4vi/awesome/module/bling/icons/layouts/equalarea.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yorkox0/autoAwesome/HEAD/config-s4vi/awesome/module/bling/icons/layouts/equalarea.png
--------------------------------------------------------------------------------
/config-s4vi/awesome/module/bling/icons/layouts/horizontal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yorkox0/autoAwesome/HEAD/config-s4vi/awesome/module/bling/icons/layouts/horizontal.png
--------------------------------------------------------------------------------
/config-s4vi/awesome/module/rubato/images/connected_graph.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yorkox0/autoAwesome/HEAD/config-s4vi/awesome/module/rubato/images/connected_graph.png
--------------------------------------------------------------------------------
/config-s4vi/awesome/module/rubato/images/quadratic_easing.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yorkox0/autoAwesome/HEAD/config-s4vi/awesome/module/rubato/images/quadratic_easing.gif
--------------------------------------------------------------------------------
/config-s4vi/awesome/module/rubato/images/trapezoid_easing.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yorkox0/autoAwesome/HEAD/config-s4vi/awesome/module/rubato/images/trapezoid_easing.gif
--------------------------------------------------------------------------------
/config-s4vi/awesome/module/rubato/images/disconnected_graph.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yorkox0/autoAwesome/HEAD/config-s4vi/awesome/module/rubato/images/disconnected_graph.png
--------------------------------------------------------------------------------
/config-s4vi/awesome/module/layout-machi/nested_layout_screenshot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yorkox0/autoAwesome/HEAD/config-s4vi/awesome/module/layout-machi/nested_layout_screenshot.png
--------------------------------------------------------------------------------
/config-s4vi/awesome/module/rubato/images/forwards_forwards_graph.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yorkox0/autoAwesome/HEAD/config-s4vi/awesome/module/rubato/images/forwards_forwards_graph.png
--------------------------------------------------------------------------------
/config-s4vi/awesome/ui/init.lua:
--------------------------------------------------------------------------------
1 | local lock_screen = require("ui.lockscreen")
2 | lock_screen.init()
3 |
4 | require("ui.bar")
5 | require("ui.dashboard")
6 | require("ui.decorations")
7 | require("ui.notifs")
8 | require("ui.tooltip")
9 |
--------------------------------------------------------------------------------
/config-s4vi/.profile:
--------------------------------------------------------------------------------
1 | # path
2 | export PATH="$HOME/.local/bin:$PATH"
3 | export PATH="$HOME/.cargo/bin:$PATH"
4 |
5 | #env
6 | export TODO_PATH="$HOME/.todo"
7 | export VISUAL=nvim;
8 | export EDITOR=nvim;
9 | export SUDO_PROMPT="passwd: "
10 |
--------------------------------------------------------------------------------
/config-s4vi/awesome/module/rubato/.editorconfig:
--------------------------------------------------------------------------------
1 | root = true
2 |
3 | [*.lua]
4 | charset = utf-8
5 | intent_style = tab
6 | indent_size = 4
7 | trim_trailing_whitespace = true
8 | max_line_length = 120
9 |
10 | [*.md]
11 | trim_trailing_whitespace = false
12 |
--------------------------------------------------------------------------------
/config-s4vi/awesome/module/bling/helpers/init.lua:
--------------------------------------------------------------------------------
1 | return {
2 | client = require(... .. ".client"),
3 | color = require(... .. ".color"),
4 | filesystem = require(... .. ".filesystem"),
5 | shape = require(... .. ".shape"),
6 | time = require(... .. ".time"),
7 | }
8 |
--------------------------------------------------------------------------------
/config-s4vi/awesome/theme/assets/icons/taglist/pacman.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/config-s4vi/nvim/examples/chadrc.lua:
--------------------------------------------------------------------------------
1 | -- Just an example, supposed to be placed in /lua/custom/
2 |
3 | local M = {}
4 |
5 | -- make sure you maintain the structure of `core/default_config.lua` here,
6 | -- example of changing theme:
7 |
8 | M.ui = {
9 | theme = "gruvchad",
10 | }
11 |
12 | return M
13 |
--------------------------------------------------------------------------------
/config-s4vi/awesome/signal/init.lua:
--------------------------------------------------------------------------------
1 | require("signal.battery")
2 | require("signal.brightness")
3 | require("signal.volume")
4 | require("signal.cpu")
5 | require("signal.ram")
6 | require("signal.todo")
7 | require("signal.weather")
8 | require("signal.playerctl")
9 | require("signal.network")
10 | require("signal.uptime")
--------------------------------------------------------------------------------
/config-s4vi/awesome/module/bling/widget/init.lua:
--------------------------------------------------------------------------------
1 | return {
2 | tag_preview = require(... .. ".tag_preview"),
3 | task_preview = require(... .. ".task_preview"),
4 | window_switcher = require(... .. ".window_switcher"),
5 | tabbed_misc = require(... .. ".tabbed_misc"),
6 | app_launcher = require(... .. ".app_launcher"),
7 | }
8 |
--------------------------------------------------------------------------------
/config-s4vi/awesome/module/bling/widget/tabbed_misc/init.lua:
--------------------------------------------------------------------------------
1 | return {
2 | titlebar_indicator = require(
3 | tostring(...):match(".*bling")
4 | .. ".widget.tabbed_misc.titlebar_indicator"
5 | ),
6 | custom_tasklist = require(
7 | tostring(...):match(".*bling") .. ".widget.tabbed_misc.custom_tasklist"
8 | ),
9 | }
10 |
--------------------------------------------------------------------------------
/config-s4vi/awesome/module/bling/init.lua:
--------------------------------------------------------------------------------
1 | --[[
2 | Bling
3 | Layouts, widgets and utilities for Awesome WM
4 | --]]
5 | return {
6 | layout = require(... .. ".layout"),
7 | module = require(... .. ".module"),
8 | helpers = require(... .. ".helpers"),
9 | signal = require(... .. ".signal"),
10 | widget = require(... .. ".widget"),
11 | }
12 |
--------------------------------------------------------------------------------
/config-s4vi/awesome/module/bling/module/init.lua:
--------------------------------------------------------------------------------
1 | return {
2 | window_swallowing = require(... .. ".window_swallowing"),
3 | tiled_wallpaper = require(... .. ".tiled_wallpaper"),
4 | wallpaper = require(... .. ".wallpaper"),
5 | flash_focus = require(... .. ".flash_focus"),
6 | tabbed = require(... .. ".tabbed"),
7 | scratchpad = require(... .. ".scratchpad"),
8 | }
9 |
--------------------------------------------------------------------------------
/config-s4vi/wfuzz/wfuzz.ini:
--------------------------------------------------------------------------------
1 | [plugins]
2 | bing_apikey =
3 | shodan_apikey =
4 |
5 | [kbase]
6 | discovery.blacklist = .svg-.css-.js-.jpg-.gif-.png-.jpeg-.mov-.avi-.flv-.ico
7 |
8 | [connection]
9 | concurrent = 10
10 | conn_delay = 90
11 | req_delay = 90
12 | retries = 3
13 | user-agent = Wfuzz/3.1.0
14 |
15 | [general]
16 | default_printer = raw
17 | cancel_on_plugin_except = 0
18 | concurrent_plugins = 3
19 | lookup_dirs = .
20 | encode_space = 1
21 |
22 |
--------------------------------------------------------------------------------
/config-s4vi/awesome/module/bling/.editorconfig:
--------------------------------------------------------------------------------
1 | root = true
2 |
3 | [*]
4 | charset = utf-8
5 | end_of_line = lf
6 | indent_size = 4
7 | indent_style = tab
8 | trim_trailing_whitespace = true
9 |
10 | [*.lua]
11 | indent_size = 4
12 | indent_style = space
13 | max_line_length = 80
14 |
15 | [*.yml]
16 | indent_size = 2
17 | indent_style = space
18 |
19 | [*.{html,css}]
20 | indent_size = 2
21 | indent_style = space
22 |
23 | [*.md]
24 | trim_trailing_whitespace = false
25 |
--------------------------------------------------------------------------------
/config-s4vi/awesome/configuration/autostart:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | start() {
4 | if ! pgrep -f $1 ;
5 | then
6 | $@&
7 | fi
8 | }
9 |
10 | # music
11 | start mpd
12 | start mpDris2 # add playerctl support to mpd
13 |
14 | # compositor
15 | start picom -b --experimental-backends --dbus --config $HOME/.config/awesome/theme/picom.conf
16 |
17 | # auth
18 | start /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
19 |
20 | # load X colors
21 | start xrdb $HOME/.Xresources
22 |
--------------------------------------------------------------------------------
/config-s4vi/awesome/module/bling/AUTHORS.md:
--------------------------------------------------------------------------------
1 | The following developers have contributed major code to bling:
2 |
3 | * [Nooo37](https://github.com/Nooo37)
4 | * [JavaCafe01](https://github.com/JavaCafe01)
5 | * [Grumph](https://github.com/Grumph)
6 | * [Bysmutheye](https://github.com/Bysmutheye)
7 | * [HumblePresent](https://github.com/HumblePresent)
8 | * [Kasper24](https://github.com/Kasper24)
9 | * [undefinedDarkness](https://github.com/undefinedDarkness)
10 | * [eylles](https://github.com/eylles)
11 |
--------------------------------------------------------------------------------
/config-s4vi/awesome/module/rubato/init.lua:
--------------------------------------------------------------------------------
1 | RUBATO_DEF_RATE = 30
2 | RUBATO_OVERRIDE_DT = true
3 | RUBATO_DIR = (...):match("(.-)[^%.]+$").."rubato."
4 |
5 | return {
6 | --Overarching functions to set defaults
7 | set_def_rate = function(rate) RUBATO_DEF_RATE = rate end,
8 | set_override_dt = function(value) RUBATO_OVERRIDE_DT = value end,
9 |
10 | --Modules
11 | timed = require(RUBATO_DIR.."timed"),
12 | easing = require(RUBATO_DIR.."easing"),
13 | subscribable = require(RUBATO_DIR.."subscribable"),
14 | }
15 |
--------------------------------------------------------------------------------
/config-s4vi/nvim/examples/init.lua:
--------------------------------------------------------------------------------
1 | -- Please check NvChad docs if you're totally new to nvchad + dont know lua!!
2 | -- This is an example init file in /lua/custom/
3 | -- this init.lua can load stuffs etc too so treat it like your ~/.config/nvim/
4 |
5 | -- MAPPINGS
6 | local map = require("core.utils").map
7 |
8 | map("n", "cc", ":Telescope ")
9 | map("n", "q", ":q ")
10 |
11 | -- NOTE: the 4th argument in the map function is be a table i.e options but its most likely un-needed so dont worry about it
12 |
--------------------------------------------------------------------------------
/config-s4vi/awesome/signal/playerctl.lua:
--------------------------------------------------------------------------------
1 | -- Notification handling library
2 | local naughty = require("naughty")
3 |
4 | -- Playerctl
5 | local playerctl = require("module.bling").signal.playerctl.lib()
6 |
7 | playerctl:connect_signal("metadata", function(_, title, artist, album_path, album, new, player_name)
8 | if new == true then
9 | naughty.notify ({
10 | app_name = 'Music',
11 | title = title,
12 | text = artist,
13 | image = album_path
14 | })
15 | end
16 | end)
17 |
--------------------------------------------------------------------------------
/config-s4vi/awesome/ui/lockscreen/init.lua:
--------------------------------------------------------------------------------
1 | local awful = require("awful")
2 | local gfs = require('gears.filesystem')
3 |
4 | local lock_screen = {}
5 |
6 | local config_dir = gfs.get_configuration_dir()
7 | package.cpath = package.cpath .. ";" .. config_dir .. "ui/lockscreen/lib/?.so;"
8 |
9 | lock_screen.init = function()
10 | local pam = require("liblua_pam")
11 | lock_screen.authenticate = function(password)
12 | return pam.auth_current_user(password)
13 | -- return password == "awesome"
14 | end
15 | require("ui.lockscreen.lockscreen")
16 | end
17 |
18 | return lock_screen
19 |
--------------------------------------------------------------------------------
/config-s4vi/nvim/lua/plugins/configs/treesitter.lua:
--------------------------------------------------------------------------------
1 | local present, ts_config = pcall(require, "nvim-treesitter.configs")
2 |
3 | if not present then
4 | return
5 | end
6 |
7 | local default = {
8 | ensure_installed = {
9 | "lua",
10 | "vim",
11 | },
12 | highlight = {
13 | enable = true,
14 | use_languagetree = true,
15 | },
16 | }
17 |
18 | local M = {}
19 | M.setup = function(override_flag)
20 | if override_flag then
21 | default = require("core.utils").tbl_override_req("nvim_treesitter", default)
22 | end
23 | ts_config.setup(default)
24 | end
25 |
26 | return M
27 |
--------------------------------------------------------------------------------
/config-s4vi/awesome/module/layout-machi/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright 2019 Xinhao Yuan
2 |
3 | Licensed under the Apache License, Version 2.0 (the "License");
4 | you may not use this file except in compliance with the License.
5 | You may obtain a copy of the License at
6 |
7 | http://www.apache.org/licenses/LICENSE-2.0
8 |
9 | Unless required by applicable law or agreed to in writing, software
10 | distributed under the License is distributed on an "AS IS" BASIS,
11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | See the License for the specific language governing permissions and
13 | limitations under the License.
14 |
--------------------------------------------------------------------------------
/config-s4vi/awesome/signal/cpu.lua:
--------------------------------------------------------------------------------
1 | -- Provides:
2 | -- signal::cpu
3 | -- used percentage (integer)
4 | local awful = require("awful")
5 |
6 | local update_interval = 5
7 | local cpu_idle_script = [[
8 | sh -c "
9 | vmstat 1 2 | tail -1 | awk '{printf \"%d\", $15}'
10 | "]]
11 |
12 | -- Periodically get cpu info
13 | awful.widget.watch(cpu_idle_script, update_interval, function(widget, stdout)
14 | -- local cpu_idle = stdout:match('+(.*)%.%d...(.*)%(')
15 | local cpu_idle = stdout
16 | cpu_idle = string.gsub(cpu_idle, '^%s*(.-)%s*$', '%1')
17 | awesome.emit_signal("signal::cpu", 100 - tonumber(cpu_idle))
18 | end)
19 |
--------------------------------------------------------------------------------
/config-s4vi/nvim/lua/plugins/configs/lspkind_icons.lua:
--------------------------------------------------------------------------------
1 | local icons = {
2 | Text = "",
3 | Method = "",
4 | Function = "",
5 | Constructor = "",
6 | Field = "ﰠ",
7 | Variable = "",
8 | Class = "ﴯ",
9 | Interface = "",
10 | Module = "",
11 | Property = "ﰠ",
12 | Unit = "塞",
13 | Value = "",
14 | Enum = "",
15 | Keyword = "",
16 | Snippet = "",
17 | Color = "",
18 | File = "",
19 | Reference = "",
20 | Folder = "",
21 | EnumMember = "",
22 | Constant = "",
23 | Struct = "פּ",
24 | Event = "",
25 | Operator = "",
26 | TypeParameter = "",
27 | }
28 |
29 | return icons
30 |
--------------------------------------------------------------------------------
/config-s4vi/.Xresources:
--------------------------------------------------------------------------------
1 | ! special
2 | *.foreground: #d9d7d6
3 | *.background: #061115
4 | *.cursorColor: #d9d7d6
5 |
6 | ! black
7 | *.color0: #1c252c
8 | *.color8: #484e5b
9 |
10 | ! red
11 | *.color1: #df5b61
12 | *.color9: #f16269
13 |
14 | ! green
15 | *.color2: #78b892
16 | *.color10: #8cd7aa
17 |
18 | ! yellow
19 | *.color3: #de8f78
20 | *.color11: #e9967e
21 |
22 | ! blue
23 | *.color4: #6791c9
24 | *.color12: #79aaeb
25 |
26 | ! magenta
27 | *.color5: #bc83e3
28 | *.color13: #c488ec
29 |
30 | ! cyan
31 | *.color6: #67afc1
32 | *.color14: #7acfe4
33 |
34 | ! white
35 | *.color7: #d9d7d6
36 | *.color15: #e5e5e5
37 |
--------------------------------------------------------------------------------
/config-s4vi/alacritty/night/colors.yml:
--------------------------------------------------------------------------------
1 | # Aesthetic Color
2 | # Created by https://github.com/rxyhn
3 |
4 | colors:
5 | primary:
6 | background: '#061115'
7 | foreground: '#D9D7D6'
8 | cursor:
9 | text: CellForeground
10 | cursor: '#D9D7D6'
11 | bright:
12 | black: '#1C252C'
13 | red: '#DF5B61'
14 | green: '#78B892'
15 | yellow: '#DE8F78'
16 | blue: '#6791C9'
17 | magenta: '#BC83E3'
18 | cyan: '#67AFC1'
19 | white: '#D9D7D6'
20 | normal:
21 | black: '#1C252C'
22 | red: '#DF5B61'
23 | green: '#78B892'
24 | yellow: '#DE8F78'
25 | blue: '#6791C9'
26 | magenta: '#BC83E3'
27 | cyan: '#67AFC1'
28 | white: '#D9D7D6'
29 |
--------------------------------------------------------------------------------
/config-s4vi/awesome/module/bling/helpers/shape.lua:
--------------------------------------------------------------------------------
1 | local gears = require("gears")
2 |
3 | shape = {}
4 |
5 | -- Create rounded rectangle shape (in one line)
6 |
7 | function shape.rrect(radius)
8 | return function(cr, width, height)
9 | gears.shape.rounded_rect(cr, width, height, radius)
10 | end
11 | end
12 |
13 | -- Create partially rounded rect
14 |
15 | function shape.prrect(radius, tl, tr, br, bl)
16 | return function(cr, width, height)
17 | gears.shape.partially_rounded_rect(
18 | cr,
19 | width,
20 | height,
21 | tl,
22 | tr,
23 | br,
24 | bl,
25 | radius
26 | )
27 | end
28 | end
29 |
30 | return shape
31 |
--------------------------------------------------------------------------------
/config-s4vi/awesome/signal/network.lua:
--------------------------------------------------------------------------------
1 | -- Provides:
2 | -- signal::network
3 | -- status (boolean)
4 | -- ssid (string)
5 | local awful = require("awful")
6 | local naughty = require("naughty")
7 |
8 | local update_interval = 5
9 | local network_script = [[
10 | bash -c "
11 | iwgetid -r
12 | "]]
13 |
14 | -- Periodically get cpu info
15 | awful.widget.watch(network_script, update_interval, function(_, stdout)
16 | -- local network = stdout:match('+(.*)%.%d...(.*)%(')
17 | local net_ssid = stdout
18 | local net_status = true
19 |
20 | if net_ssid == "" then
21 | net_status = false
22 | end
23 |
24 | net_ssid = string.gsub(net_ssid, '^%s*(.-)%s*$', '%1')
25 | awesome.emit_signal("signal::network", net_status, net_ssid)
26 | end)
27 |
28 |
--------------------------------------------------------------------------------
/config-s4vi/kitty/color.ini:
--------------------------------------------------------------------------------
1 | cursor_shape Underline
2 | cursor_underline_thickness 1
3 | window_padding_width 20
4 |
5 | # Special
6 | foreground #a9b1d6
7 | background #1a1b26
8 |
9 | # Black
10 | color0 #414868
11 | color8 #414868
12 |
13 | # Red
14 | color1 #f7768e
15 | color9 #f7768e
16 |
17 | # Green
18 | color2 #73daca
19 | color10 #73daca
20 |
21 | # Yellow
22 | color3 #e0af68
23 | color11 #e0af68
24 |
25 | # Blue
26 | color4 #7aa2f7
27 | color12 #7aa2f7
28 |
29 | # Magenta
30 | color5 #bb9af7
31 | color13 #bb9af7
32 |
33 | # Cyan
34 | color6 #7dcfff
35 | color14 #7dcfff
36 |
37 | # White
38 | color7 #c0caf5
39 | color15 #c0caf5
40 |
41 | # Cursor
42 | cursor #c0caf5
43 | cursor_text_color #1a1b26
44 |
45 | # Selection highlight
46 | selection_foreground #7aa2f7
47 | selection_background #28344a
--------------------------------------------------------------------------------
/config-s4vi/awesome/ui/notifs/notif-center/build-notifbox/notifbox-scroller.lua:
--------------------------------------------------------------------------------
1 | local awful = require('awful')
2 | local gears = require('gears')
3 |
4 | local add_button_event = function(widget)
5 |
6 | widget:buttons(
7 | gears.table.join(
8 | awful.button(
9 | {},
10 | 4,
11 | nil,
12 | function()
13 | if #widget.children == 1 then
14 | return
15 | end
16 | widget:insert(1, widget.children[#widget.children])
17 | widget:remove(#widget.children)
18 | end
19 | ),
20 | awful.button(
21 | {},
22 | 5,
23 | nil,
24 | function()
25 | if #widget.children == 1 then
26 | return
27 | end
28 | widget:insert(#widget.children + 1, widget.children[1])
29 | widget:remove(1)
30 | end
31 | )
32 | )
33 | )
34 |
35 | end
36 |
37 | return add_button_event
--------------------------------------------------------------------------------
/config-s4vi/awesome/module/rubato/rubato-1.1-1.rockspec:
--------------------------------------------------------------------------------
1 | package = "rubato"
2 | version = "1.1-1"
3 | source = {
4 | url = "git+https://github.com/andOrlando/rubato.git"
5 | }
6 | description = {
7 | detailed = [[
8 | Create smooth animations based off of a slope curve for near perfect interruptions. Similar to awestore, but solely dedicated to interpolation. Also has a cool name. Check out the README on github for more informaiton. Has (basically) complete compatibility with awestore.
9 |
10 | Requires either gears or to be ran from awesomeWM
11 | ]],
12 | homepage = "https://github.com/andOrlando/rubato",
13 | license = "MIT"
14 | }
15 | dependencies = {
16 | "gears"
17 | }
18 | build = {
19 | type = "builtin",
20 | modules = {
21 | easing = "easing.lua",
22 | timed = "timed.lua",
23 | subscribable = "subscribable.lua"
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/config-s4vi/nvim/init.lua:
--------------------------------------------------------------------------------
1 | local present, impatient = pcall(require, "impatient")
2 |
3 | if present then
4 | impatient.enable_profile()
5 | end
6 |
7 | local core_modules = {
8 | "core.options",
9 | "core.autocmds",
10 | "core.mappings",
11 | }
12 |
13 | for _, module in ipairs(core_modules) do
14 | local ok, err = pcall(require, module)
15 | if not ok then
16 | error("Error loading " .. module .. "\n\n" .. err)
17 | end
18 | end
19 |
20 | -- non plugin mappings
21 | require("core.mappings").misc()
22 |
23 | -- check if custom init.lua file exists
24 | if vim.fn.filereadable(vim.fn.stdpath "config" .. "/lua/custom/init.lua") == 1 then
25 | -- try to call custom init, if not successful, show error
26 | local ok, err = pcall(require, "custom")
27 | if not ok then
28 | vim.notify("Error loading custom/init.lua\n\n" .. err)
29 | end
30 | return
31 | end
32 |
--------------------------------------------------------------------------------
/config-s4vi/awesome/module/bling/helpers/time.lua:
--------------------------------------------------------------------------------
1 | local time = {}
2 |
3 | --- Parse a time string to seconds (from midnight)
4 | --
5 | -- @string time The time (`HH:MM:SS`)
6 | -- @treturn int The number of seconds since 00:00:00
7 | function time.hhmmss_to_seconds(time)
8 | hour_sec = tonumber(string.sub(time, 1, 2)) * 3600
9 | min_sec = tonumber(string.sub(time, 4, 5)) * 60
10 | get_sec = tonumber(string.sub(time, 7, 8))
11 | return (hour_sec + min_sec + get_sec)
12 | end
13 |
14 | --- Get time difference in seconds.
15 | --
16 | -- @tparam string base The time to compare from (`HH:MM:SS`).
17 | -- @tparam string base The time to compare to (`HH:MM:SS`).
18 | -- @treturn int Number of seconds between the two times.
19 | function time.time_diff(base, compare)
20 | local diff = time.hhmmss_to_seconds(base) - time.hhmmss_to_seconds(compare)
21 | return diff
22 | end
23 |
24 | return time
25 |
--------------------------------------------------------------------------------
/config-s4vi/awesome/signal/ram.lua:
--------------------------------------------------------------------------------
1 | -- Provides:
2 | -- signal::ram
3 | -- used (integer - mega bytes)
4 | -- total (integer - mega bytes)
5 | local awful = require("awful")
6 |
7 | local update_interval = 20
8 | -- Returns the used amount of ram in percentage
9 | -- TODO output of free is affected by system language. The following command
10 | -- works for any language:
11 | -- free -m | sed -n '2p' | awk '{printf "%d available out of %d\n", $7, $2}'
12 | local ram_script = [[
13 | sh -c "
14 | free -m | grep 'Mem:' | awk '{printf \"%d@@%d@\", $7, $2}'
15 | "]]
16 |
17 | -- Periodically get ram info
18 | awful.widget.watch(ram_script, update_interval, function(widget, stdout)
19 | local available = stdout:match('(.*)@@')
20 | local total = stdout:match('@@(.*)@')
21 | local used = tonumber(total) - tonumber(available)
22 | awesome.emit_signal("signal::ram", used, tonumber(total))
23 | end)
24 |
--------------------------------------------------------------------------------
/config-s4vi/awesome/signal/disk.lua:
--------------------------------------------------------------------------------
1 | -- Provides:
2 | -- signal::disk
3 | -- used (integer - mega bytes)
4 | -- total (integer - mega bytes)
5 | local awful = require("awful")
6 | local helpers = require("helpers")
7 |
8 | local update_interval = 180 -- every 3 minutes
9 |
10 | -- Use /dev/sdxY according to your setup
11 | local disk_script = [[
12 | bash -c "
13 | df -kH -B 1MB /dev/sda7 | tail -1 | awk '{printf \"%d@%d\", $4, $3}'
14 | "
15 | ]]
16 |
17 | -- Periodically get disk space info
18 | awful.widget.watch(disk_script, update_interval, function(_, stdout)
19 | -- Get `available` and `used` instead of `used` and `total`,
20 | -- since the total size reported by the `df` command includes
21 | -- the 5% storage reserved for `root`, which is misleading.
22 | local available = tonumber(stdout:match('^(.*)@')) / 1000
23 | local used = tonumber(stdout:match('@(.*)$')) / 1000
24 | awesome.emit_signal("signal::disk", used, used + available)
25 | end)
26 |
--------------------------------------------------------------------------------
/config-s4vi/awesome/ui/dashboard/date.lua:
--------------------------------------------------------------------------------
1 | -- Standard awesome library
2 | local awful = require("awful")
3 |
4 | -- Theme handling library
5 | local beautiful = require("beautiful")
6 | local dpi = beautiful.xresources.apply_dpi
7 |
8 | -- Widget library
9 | local wibox = require("wibox")
10 |
11 | -- Helpers
12 | local helpers = require("helpers")
13 |
14 |
15 | -- Date
16 | ---------
17 |
18 | local date_day = wibox.widget{
19 | font = beautiful.font_name .. "medium 8",
20 | format = helpers.colorize_text("%A", beautiful.xforeground .. "c6"),
21 | valign = "center",
22 | widget = wibox.widget.textclock
23 | }
24 |
25 | local date_month = wibox.widget{
26 | font = beautiful.font_name .. "medium 11",
27 | format = "%d %B",
28 | valign = "center",
29 | widget = wibox.widget.textclock
30 | }
31 |
32 | local date = wibox.widget{
33 | date_day,
34 | nil,
35 | date_month,
36 | expand = "none",
37 | widget = wibox.layout.align.vertical
38 | }
39 |
40 | return date
41 |
--------------------------------------------------------------------------------
/config-s4vi/awesome/ui/dashboard/profile.lua:
--------------------------------------------------------------------------------
1 | -- Standard awesome library
2 | local awful = require("awful")
3 |
4 | -- Theme handling library
5 | local beautiful = require("beautiful")
6 | local dpi = beautiful.xresources.apply_dpi
7 |
8 | -- Widget library
9 | local wibox = require("wibox")
10 |
11 | -- Helpers
12 | local helpers = require("helpers")
13 |
14 |
15 | -- Profile
16 | ------------
17 |
18 | local profile_pic_img = wibox.widget{
19 | image = beautiful.pfp,
20 | halign = "center",
21 | valign = "center",
22 | widget = wibox.widget.imagebox
23 | }
24 |
25 | local profile_pic_container = wibox.widget{
26 | shape = helpers.rrect(5),
27 | forced_height = dpi(120),
28 | forced_width = dpi(120),
29 | widget = wibox.container.background
30 | }
31 |
32 | local profile = wibox.widget{
33 | {
34 | profile_pic_img,
35 | widget = profile_pic_container
36 | },
37 | margins = dpi(10),
38 | widget = wibox.container.margin
39 | }
40 |
41 | return profile
42 |
--------------------------------------------------------------------------------
/config-s4vi/awesome/ui/dashboard/time.lua:
--------------------------------------------------------------------------------
1 | -- Standard awesome library
2 | local awful = require("awful")
3 |
4 | -- Theme handling library
5 | local beautiful = require("beautiful")
6 | local dpi = beautiful.xresources.apply_dpi
7 |
8 | -- Widget library
9 | local wibox = require("wibox")
10 |
11 | -- Helpers
12 | local helpers = require("helpers")
13 |
14 |
15 | -- Time
16 | ---------
17 |
18 | local time_hour = wibox.widget{
19 | font = beautiful.font_name .. "bold 48",
20 | format = helpers.colorize_text("%H", "#cfcdcc"),
21 | align = "center",
22 | valign = "center",
23 | widget = wibox.widget.textclock
24 | }
25 |
26 | local time_min = wibox.widget{
27 | font = beautiful.font_name .. "bold 48",
28 | format = "%M",
29 | align = "center",
30 | valign = "center",
31 | widget = wibox.widget.textclock
32 | }
33 |
34 | local time = wibox.widget{
35 | time_hour,
36 | time_min,
37 | spacing = dpi(25),
38 | widget = wibox.layout.fixed.horizontal
39 | }
40 |
41 | return time
42 |
--------------------------------------------------------------------------------
/config-s4vi/kitty/kitty.conf:
--------------------------------------------------------------------------------
1 | enable_audio_bell no
2 |
3 | include color.ini
4 |
5 | font_family HackNerdFont
6 | font_size 13
7 |
8 | disable_ligatures never
9 |
10 | url_color #61afef
11 |
12 | url_style curly
13 |
14 | map ctrl+left neighboring_window left
15 | map ctrl+right neighboring_window right
16 | map ctrl+up neighboring_window up
17 | map ctrl+down neighboring_window down
18 |
19 | map f1 copy_to_buffer a
20 | map f2 paste_from_buffer a
21 | map f3 copy_to_buffer b
22 | map f4 paste_from_buffer b
23 |
24 | cursor_shape beam
25 | cursor_beam_thickness 1.8
26 |
27 | mouse_hide_wait 3.0
28 | detect_urls yes
29 |
30 | repaint_delay 10
31 | input_delay 3
32 | sync_to_monitor yes
33 |
34 | map ctrl+shift+z toggle_layout stack
35 | tab_bar_style powerline
36 |
37 | inactive_tab_background #e06c75
38 | inactive_tab_foreground #000000
39 | active_tab_background #98c379
40 | tar_bar_margin_color black
41 |
42 | map ctrl+shift+enter new_window_with_cwd
43 | map ctrl+shift+t new_tab_with_cwd
44 |
45 | background_opacity 0.95
46 |
47 | shell zsh
48 |
--------------------------------------------------------------------------------
/config-s4vi/awesome/module/rubato/subscribable.lua:
--------------------------------------------------------------------------------
1 | -- Kidna copying awesotre's stores on a surface level for added compatibility
2 | local function subscribable(args)
3 | local obj = args or {}
4 | local subscribed = {}
5 |
6 | -- Subscrubes a function to the object so that it's called when `fire` is
7 | -- Calls subscribe_callback if it exists as well
8 | function obj:subscribe(func)
9 | local id = tostring(func):gsub("function: ", "")
10 | subscribed[id] = func
11 |
12 | if self.subscribe_callback then self.subscribe_callback(func) end
13 | end
14 |
15 | -- Unsubscribes a function and calls unsubscribe_callback if it exists
16 | function obj:unsubscribe(func)
17 | if not func then
18 | subscribed = {}
19 | else
20 | local id = tostring(func):gsub("function: ", "")
21 | subscribed[id] = nil
22 | end
23 |
24 | if self.unsubscribe_callback then self.unsubscribe_callback(func) end
25 | end
26 |
27 | function obj:fire(...) for _, func in pairs(subscribed) do func(...) end end
28 |
29 | return obj
30 | end
31 |
32 | return subscribable
33 |
--------------------------------------------------------------------------------
/config-s4vi/awesome/module/layout-machi/init.lua:
--------------------------------------------------------------------------------
1 | local engine = require(... .. ".engine")
2 | local layout = require(... .. ".layout")
3 | local editor = require(... .. ".editor")
4 | local switcher = require(... .. ".switcher")
5 | local default_editor = editor.default_editor
6 | local default_layout = layout.create{ name_func = default_name }
7 | local gcolor = require("gears.color")
8 | local beautiful = require("beautiful")
9 |
10 | local icon_raw
11 | local source = debug.getinfo(1, "S").source
12 | if source:sub(1, 1) == "@" then
13 | icon_raw = source:match("^@(.-)[^/]+$") .. "icon.png"
14 | end
15 |
16 | local function get_icon()
17 | if icon_raw ~= nil then
18 | return gcolor.recolor_image(icon_raw, beautiful.fg_normal)
19 | else
20 | return nil
21 | end
22 | end
23 |
24 | return {
25 | engine = engine,
26 | layout = layout,
27 | editor = editor,
28 | switcher = switcher,
29 | default_editor = default_editor,
30 | default_layout = default_layout,
31 | icon_raw = icon_raw,
32 | get_icon = get_icon,
33 | }
34 |
--------------------------------------------------------------------------------
/config-s4vi/awesome/ui/notifs/notif-center/build-notifbox/notifbox-geometry.lua:
--------------------------------------------------------------------------------
1 | local wibox = require('wibox')
2 | local awful = require('awful')
3 | local naughty = require('naughty')
4 |
5 | local find_widget_in_wibox = function(wb, widget)
6 | local function find_widget_in_hierarchy(h, widget)
7 | if h:get_widget() == widget then
8 | return h
9 | end
10 | local result
11 |
12 | for _, ch in ipairs(h:get_children()) do
13 | result = result or find_widget_in_hierarchy(ch, widget)
14 | end
15 | return result
16 | end
17 | local h = wb._drawable._widget_hierarchy
18 | return h and find_widget_in_hierarchy(h, widget)
19 | end
20 |
21 |
22 | local focused = awful.screen.focused()
23 | local h = find_widget_in_wibox(focused.top_panel, focused.music)
24 | local x, y, width, height = h:get_matrix_to_device():transform_rectangle(0, 0, h:get_size())
25 | -- local geo = focused.mywibox:geometry()
26 | -- x, y = x + geo.x, y + geo.y
27 | -- print(string.format("The widget is inside of the rectangle (%d, %d, %d, %d) on the screen", x, y, width, height)
28 |
29 |
30 | naughty.notification({message=tostring(height)})
--------------------------------------------------------------------------------
/config-s4vi/awesome/module/bling/layout/deck.lua:
--------------------------------------------------------------------------------
1 | local mylayout = {}
2 |
3 | mylayout.name = "deck"
4 |
5 | function mylayout.arrange(p)
6 | local area = p.workarea
7 | local t = p.tag or screen[p.screen].selected_tag
8 | local client_count = #p.clients
9 |
10 | if client_count == 1 then
11 | local c = p.clients[1]
12 | local g = {
13 | x = area.x,
14 | y = area.y,
15 | width = area.width,
16 | height = area.height,
17 | }
18 | p.geometries[c] = g
19 | return
20 | end
21 |
22 | local xoffset = area.width * 0.1 / (client_count - 1)
23 | local yoffset = area.height * 0.1 / (client_count - 1)
24 |
25 | for idx = 1, client_count do
26 | local c = p.clients[idx]
27 | local g = {
28 | x = area.x + (idx - 1) * xoffset,
29 | y = area.y + (idx - 1) * yoffset,
30 | width = area.width - (xoffset * (client_count - 1)),
31 | height = area.height - (yoffset * (client_count - 1)),
32 | }
33 | p.geometries[c] = g
34 | end
35 | end
36 |
37 | return mylayout
38 |
--------------------------------------------------------------------------------
/config-s4vi/nvim/lua/core/autocmds.lua:
--------------------------------------------------------------------------------
1 | local settings=require("core.utils").load_config().options.nvChad
2 | -- uncomment this if you want to open nvim with a dir
3 | -- vim.cmd [[ autocmd BufEnter * if &buftype != "terminal" | lcd %:p:h | endif ]]
4 |
5 | -- Use relative & absolute line numbers in 'n' & 'i' modes respectively
6 | -- vim.cmd[[ au InsertEnter * set norelativenumber ]]
7 | -- vim.cmd[[ au InsertLeave * set relativenumber ]]
8 |
9 | -- Don't show any numbers inside terminals
10 | if not settings.terminal_numbers then
11 | vim.cmd [[ au TermOpen term://* setlocal nonumber norelativenumber | setfiletype terminal ]]
12 | end
13 |
14 | -- Don't show status line on certain windows
15 | vim.cmd [[ autocmd BufEnter,BufRead,BufWinEnter,FileType,WinEnter * lua require("core.utils").hide_statusline() ]]
16 |
17 | -- Open a file from its last left off position
18 | -- vim.cmd [[ au BufReadPost * if expand('%:p') !~# '\m/\.git/' && line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif ]]
19 | -- File extension specific tabbing
20 | -- vim.cmd [[ autocmd Filetype python setlocal expandtab tabstop=4 shiftwidth=4 softtabstop=4 ]]
21 |
--------------------------------------------------------------------------------
/config-s4vi/mpd/mpd.conf:
--------------------------------------------------------------------------------
1 | music_directory "~/Music"
2 | playlist_directory "~/.config/mpd/playlists"
3 | db_file "~/.config/mpd/database"
4 | log_file "~/.config/mpd/log"
5 | bind_to_address "127.0.0.1"
6 |
7 | audio_output {
8 | type "alsa"
9 | name "ALSA [Bit-perfect]"
10 | device "hw:1,0"
11 | auto_channels "no"
12 | auto_format "no"
13 | auto_resample "no"
14 | dop "yes"
15 | mixer_type "none"
16 | replay_gain_handler "none"
17 | buffer_time "100000"
18 | }
19 |
20 | audio_output {
21 | type "pulse"
22 | name "PulseAudio"
23 | buffer_time "100000"
24 | }
25 |
26 | audio_output {
27 | type "fifo"
28 | name "Visualizer"
29 | format "44100:16:2"
30 | path "/tmp/mpd.fifo"
31 | }
32 |
33 | audio_output {
34 | type "httpd"
35 | name "lossless"
36 | encoder "flac"
37 | port "8000"
38 | max_client "8"
39 | mixer_type "software"
40 | format "44100:16:2"
41 | }
42 |
--------------------------------------------------------------------------------
/config-s4vi/awesome/module/bling/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2021 BlingCorp
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/config-s4vi/awesome/module/rubato/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2021 andOrlando
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/config-s4vi/nvim/lua/plugins/packerInit.lua:
--------------------------------------------------------------------------------
1 | vim.cmd "packadd packer.nvim"
2 |
3 | local present, packer = pcall(require, "packer")
4 |
5 | if not present then
6 | local packer_path = vim.fn.stdpath "data" .. "/site/pack/packer/opt/packer.nvim"
7 |
8 | print "Cloning packer.."
9 | -- remove the dir before cloning
10 | vim.fn.delete(packer_path, "rf")
11 | vim.fn.system {
12 | "git",
13 | "clone",
14 | "https://github.com/wbthomason/packer.nvim",
15 | "--depth",
16 | "20",
17 | packer_path,
18 | }
19 |
20 | vim.cmd "packadd packer.nvim"
21 | present, packer = pcall(require, "packer")
22 |
23 | if present then
24 | print "Packer cloned successfully."
25 | else
26 | error("Couldn't clone packer !\nPacker path: " .. packer_path .. "\n" .. packer)
27 | end
28 | end
29 |
30 | packer.init {
31 | display = {
32 | open_fn = function()
33 | return require("packer.util").float { border = "single" }
34 | end,
35 | prompt_border = "single",
36 | },
37 | git = {
38 | clone_timeout = 6000, -- seconds
39 | },
40 | auto_clean = true,
41 | compile_on_sync = true,
42 | }
43 |
44 | return packer
45 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | ## autoAwesome es una herrmanienta que permite instalar de forma semi-automática el entorno de trabajo awesome con la config personalizada de s4vitar.
2 |
3 | ## La utilidad consta de 5 funciones distintas:
4 | - Instalar Dependencias.
5 | - Instalar Awesome.
6 | - Instalar temas de Awesome.
7 | - Instalar Rofi, Kitty, Powermenu...
8 |
9 | # Instalación
10 |
11 | **1)** Clonar el repositorio:
12 | ```
13 | git clone https://github.com/yorkox0/autoAwesome
14 | cd autoAwesome
15 | ```
16 | ### Todo en uno:
17 |
18 | ```
19 | git clone https://github.com/yorkox0/autoAwesome; cd autoAwesome; bash autoAwesome.sh
20 | ```
21 |
22 | **2)** Ejecutamos el archivo 'autoAwesome.sh':
23 | ```bash
24 | bash autoAwesome.sh
25 |
26 | # bash autoAwesome.sh -r (para ejecutar como root) (Aun no implementado)
27 | ```
28 | **3)** ¿Qué hace el script?
29 |
30 | **4)** Disfruta.
31 | ## Vista general
32 | 
33 | 
34 |
35 | ## Configuración manual:
36 | - https://youtu.be/fshLf6u8B-w
37 |
38 | ## Créditos
39 | - Autor de los dotfiles: Rxyhn! https://github.com/rxyhn
40 | - Autores del script: Bleyom y Yorkox.
41 | - Inspirado en s4vitar ❤️.
42 |
--------------------------------------------------------------------------------
/config-s4vi/awesome/ui/notifs/notif-center/init.lua:
--------------------------------------------------------------------------------
1 | local wibox = require('wibox')
2 | local beautiful = require('beautiful')
3 | local dpi = require('beautiful').xresources.apply_dpi
4 |
5 | -- Notification Center
6 | -------------------------
7 |
8 |
9 | -- header
10 | local notif_header = wibox.widget {
11 | text = 'Notification Center',
12 | font = beautiful.font_name .. 'Bold 14',
13 | align = 'left',
14 | valign = 'center',
15 | widget = wibox.widget.textbox
16 | }
17 |
18 | -- build notif-center
19 | local notif_center = function(s)
20 |
21 | s.dont_disturb = require('ui.notifs.notif-center.dont-disturb')
22 | s.clear_all = require('ui.notifs.notif-center.clear-all')
23 | s.notifbox_layout = require('ui.notifs.notif-center.build-notifbox').notifbox_layout
24 |
25 | return wibox.widget {
26 | expand = 'none',
27 | layout = wibox.layout.fixed.vertical,
28 | spacing = dpi(10),
29 | {
30 | expand = 'none',
31 | layout = wibox.layout.align.horizontal,
32 | notif_header,
33 | nil,
34 | {
35 | layout = wibox.layout.fixed.horizontal,
36 | spacing = dpi(5),
37 | s.dont_disturb,
38 | s.clear_all
39 | },
40 | },
41 | s.notifbox_layout
42 | }
43 | end
44 |
45 | return notif_center
--------------------------------------------------------------------------------
/config-s4vi/awesome/module/bling/README.md:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | All documentation, instructions, and previews are [here](https://blingcorp.github.io/bling/).
7 |
8 | ## Features
9 |
10 | - Layouts
11 | - mstab (master-slave tab layout)
12 | - centered
13 | - vertical
14 | - horizontal
15 | - equalarea
16 | - Modules
17 | - Flash Focus
18 | - Tabbed container
19 | - Tiled Wallpaper
20 | - Wallpaper Easy Setup
21 | - Window Swallowing
22 | - Scratchpad
23 | - Signals
24 | - Playerctl
25 | - Widgets
26 | - Tag Preview
27 | - Task Preview
28 |
29 | All naming credit goes to [JavaCafe01](https://github.com/JavaCafe01).
30 |
31 | ### Dependencies
32 |
33 | In order to use the `tabbed` modules `pick` function, you need to install `xwininfo`.
34 |
35 | ## Contributing
36 |
37 | Contributions are welcome 💛
38 |
39 | 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.
40 |
41 | When adding a layout/module/signal/widget, please add theme variables for customization and add the according documentation under `docs`.
42 |
--------------------------------------------------------------------------------
/config-s4vi/awesome/module/bling/module/flash_focus.lua:
--------------------------------------------------------------------------------
1 | local gears = require("gears")
2 | local beautiful = require("beautiful")
3 |
4 | local op = beautiful.flash_focus_start_opacity or 0.6
5 | local stp = beautiful.flash_focus_step or 0.01
6 |
7 | local flashfocus = function(c)
8 | if c and #c.screen.clients > 1 then
9 | c.opacity = op
10 | local q = op
11 | local g = gears.timer({
12 | timeout = stp,
13 | call_now = false,
14 | autostart = true,
15 | })
16 |
17 | g:connect_signal("timeout", function()
18 | if not c.valid then
19 | return
20 | end
21 | if q >= 1 then
22 | c.opacity = 1
23 | g:stop()
24 | else
25 | c.opacity = q
26 | q = q + stp
27 | end
28 | end)
29 | end
30 |
31 | -- Bring the focused client to the top
32 | if c then
33 | c:raise()
34 | end
35 | end
36 |
37 | local enable = function()
38 | client.connect_signal("focus", flashfocus)
39 | end
40 | local disable = function()
41 | client.disconnect_signal("focus", flashfocus)
42 | end
43 |
44 | return { enable = enable, disable = disable, flashfocus = flashfocus }
45 |
--------------------------------------------------------------------------------
/config-s4vi/awesome/ui/decorations/init.lua:
--------------------------------------------------------------------------------
1 | -- Standard awesome library
2 | local gears = require("gears")
3 |
4 | -- Theme handling library
5 | local beautiful = require("beautiful")
6 |
7 | -- Helpers
8 | local helpers = require("helpers")
9 |
10 | -- Apply rounded corners to clients if needed
11 | if beautiful.border_radius and beautiful.border_radius > 0 then
12 | client.connect_signal("manage", function (c, startup)
13 | if not c.fullscreen and not c.maximized then
14 | c.shape = helpers.rrect(beautiful.border_radius)
15 | end
16 | end)
17 |
18 | -- Fullscreen and maximized clients should not have rounded corners
19 | local function no_round_corners (c)
20 | if c.fullscreen or c.maximized then
21 | c.shape = gears.shape.rectangle
22 | else
23 | c.shape = helpers.rrect(beautiful.border_radius)
24 | end
25 | end
26 |
27 | client.connect_signal("property::fullscreen", no_round_corners)
28 | client.connect_signal("property::maximized", no_round_corners)
29 |
30 | beautiful.snap_shape = helpers.rrect(beautiful.border_radius * 2)
31 | else
32 | beautiful.snap_shape = gears.shape.rectangle
33 | end
34 |
35 | require("ui.decorations.titlebar")
36 | require("ui.decorations.music")
37 |
--------------------------------------------------------------------------------
/config-s4vi/awesome/signal/brightness.lua:
--------------------------------------------------------------------------------
1 | -- Provides:
2 | -- signal::brightness
3 | -- percentage (integer)
4 | local awful = require("awful")
5 |
6 | -- Subscribe to backlight changes
7 | -- Requires inotify-tools
8 | local brightness_subscribe_script = [[
9 | bash -c "
10 | while (inotifywait -e modify /sys/class/backlight/?*/brightness -qq) do echo; done
11 | "]]
12 |
13 | local brightness_script = [[
14 | sh -c "
15 | brightnessctl i | grep -oP '\(\K[^%\)]+'
16 | "]]
17 |
18 | local emit_brightness_info = function()
19 | awful.spawn.with_line_callback(brightness_script, {
20 | stdout = function(line)
21 | percentage = math.floor(tonumber(line))
22 | awesome.emit_signal("signal::brightness", percentage)
23 | end
24 | })
25 | end
26 |
27 | -- Run once to initialize widgets
28 | emit_brightness_info()
29 |
30 | -- Kill old inotifywait process
31 | awful.spawn.easy_async_with_shell("ps x | grep \"inotifywait -e modify /sys/class/backlight\" | grep -v grep | awk '{print $1}' | xargs kill", function ()
32 | -- Update brightness status with each line printed
33 | awful.spawn.with_line_callback(brightness_subscribe_script, {
34 | stdout = function(_)
35 | emit_brightness_info()
36 | end
37 | })
38 | end)
39 |
--------------------------------------------------------------------------------
/config-s4vi/awesome/module/bling/layout/init.lua:
--------------------------------------------------------------------------------
1 | local beautiful = require("beautiful")
2 | local gears = require("gears")
3 |
4 | local M = {}
5 | local relative_lua_path = tostring(...)
6 |
7 | local function get_layout_icon_path(name)
8 | local relative_icon_path = relative_lua_path
9 | :match("^.*bling"):gsub("%.", "/")
10 | .. "/icons/layouts/" .. name .. ".png"
11 |
12 | for p in package.path:gmatch('([^;]+)') do
13 | p = p:gsub("?.*", "")
14 | local absolute_icon_path = p .. relative_icon_path
15 | if gears.filesystem.file_readable(absolute_icon_path) then
16 | return absolute_icon_path
17 | end
18 | end
19 | end
20 |
21 | local function get_icon(icon_raw)
22 | if icon_raw ~= nil then
23 | return gears.color.recolor_image(icon_raw, beautiful.fg_normal)
24 | else
25 | return nil
26 | end
27 | end
28 |
29 | local layouts = {
30 | "mstab",
31 | "vertical",
32 | "horizontal",
33 | "centered",
34 | "equalarea",
35 | "deck"
36 | }
37 |
38 | for _, layout_name in ipairs(layouts) do
39 | local icon_raw = get_layout_icon_path(layout_name)
40 | beautiful["layout_" .. layout_name] = get_icon(icon_raw)
41 | M[layout_name] = require(... .. "." .. layout_name)
42 | end
43 |
44 | return M
45 |
--------------------------------------------------------------------------------
/config-s4vi/awesome/ui/widgets/button.lua:
--------------------------------------------------------------------------------
1 | local wibox = require('wibox')
2 | local beautiful = require('beautiful')
3 |
4 | local create_click_events = function(widget)
5 |
6 | local container = wibox.widget {
7 | widget,
8 | widget = wibox.container.background
9 | }
10 |
11 | -- Old and new widget
12 | local old_cursor, old_wibox
13 |
14 | -- Mouse hovers on the widget
15 | container:connect_signal(
16 | 'mouse::enter',
17 | function()
18 | container.bg = beautiful.xcolor8
19 | -- Hm, no idea how to get the wibox from this signal's arguments...
20 | local w = mouse.current_wibox
21 | if w then
22 | old_cursor, old_wibox = w.cursor, w
23 | w.cursor = 'hand1'
24 | end
25 | end
26 | )
27 |
28 | -- Mouse leaves the widget
29 | container:connect_signal(
30 | 'mouse::leave',
31 | function()
32 | container.bg = beautiful.transparent
33 | if old_wibox then
34 | old_wibox.cursor = old_cursor
35 | old_wibox = nil
36 | end
37 | end
38 | )
39 |
40 | -- Mouse pressed the widget
41 | container:connect_signal(
42 | 'button::press',
43 | function()
44 | container.bg = beautiful.xcolor4
45 | end
46 | )
47 |
48 | -- Mouse releases the widget
49 | container:connect_signal(
50 | 'button::release',
51 | function()
52 | container.bg = beautiful.xcolor8
53 | end
54 | )
55 |
56 | return container
57 | end
58 |
59 | return create_click_events
60 |
--------------------------------------------------------------------------------
/config-s4vi/awesome/module/bling/widget/tabbed_misc/custom_tasklist.lua:
--------------------------------------------------------------------------------
1 | local wibox = require("wibox")
2 | local awful = require("awful")
3 | local gears = require("gears")
4 | local beautiful = require("beautiful")
5 | local dpi = require("beautiful.xresources").apply_dpi
6 |
7 | local function tabobj_support(self, c, index, clients)
8 | -- Self is the background widget in this context
9 | if not c.bling_tabbed and #c.bling_tabbed.clients > 1 then
10 | return
11 | end
12 |
13 | local group = c.bling_tabbed
14 |
15 | -- TODO: Allow customization here
16 | local layout_v = wibox.widget {
17 | vertical_spacing = dpi(2),
18 | horizontal_spacing = dpi(2),
19 | layout = wibox.layout.grid.horizontal,
20 | forced_num_rows = 2,
21 | forced_num_cols = 2,
22 | homogeneous = true
23 | }
24 |
25 | local wrapper = wibox.widget({
26 | layout_v,
27 | id = "click_role",
28 | widget = wibox.container.margin,
29 | margins = dpi(5),
30 | })
31 |
32 | -- To get the ball rolling.
33 | for idx, c in ipairs(group.clients) do
34 | if not (c and c.icon) then goto skip end
35 |
36 | -- Add to the last layout
37 | layout_v:add(wibox.widget {
38 | {
39 | widget = awful.widget.clienticon,
40 | client = c
41 | },
42 | widget = wibox.container.constraint,
43 | width = dpi(24),
44 | height = dpi(24)
45 | })
46 | ::skip::
47 | end
48 | self.widget = wrapper
49 | end
50 |
51 | return tabobj_support
52 |
--------------------------------------------------------------------------------
/config-s4vi/awesome/ui/notifs/notif-center/clear-all/init.lua:
--------------------------------------------------------------------------------
1 | local awful = require('awful')
2 | local wibox = require('wibox')
3 | local gears = require('gears')
4 | local beautiful = require('beautiful')
5 |
6 | local dpi = beautiful.xresources.apply_dpi
7 | local button_container = require('ui.widgets.button')
8 |
9 | local notifbox_core = require('ui.notifs.notif-center.build-notifbox')
10 | local reset_notifbox_layout = notifbox_core.reset_notifbox_layout
11 |
12 | local clear_all_icon = wibox.widget {
13 | {
14 | markup = "",
15 | font = beautiful.icon_font_name .. "Round 16",
16 | align = "center",
17 | valign = "center",
18 | widget = wibox.widget.textbox
19 | },
20 | layout = wibox.layout.fixed.horizontal
21 | }
22 |
23 | local clear_all_button = wibox.widget {
24 | {
25 | clear_all_icon,
26 | margins = dpi(7),
27 | widget = wibox.container.margin
28 | },
29 | widget = button_container
30 | }
31 |
32 | clear_all_button:buttons(
33 | gears.table.join(
34 | awful.button(
35 | {},
36 | 1,
37 | nil,
38 | function()
39 | reset_notifbox_layout()
40 | end
41 | )
42 | )
43 | )
44 |
45 | local clear_all_button_wrapped = wibox.widget {
46 | nil,
47 | {
48 | clear_all_button,
49 | bg = beautiful.xcolor0,
50 | shape = gears.shape.circle,
51 | widget = wibox.container.background
52 | },
53 | nil,
54 | expand = 'none',
55 | layout = wibox.layout.align.vertical
56 | }
57 |
58 | return clear_all_button_wrapped
--------------------------------------------------------------------------------
/config-s4vi/awesome/ui/notifs/notif-center/build-notifbox/empty-notifbox.lua:
--------------------------------------------------------------------------------
1 | local wibox = require('wibox')
2 | local gears = require('gears')
3 |
4 | local beautiful = require('beautiful')
5 | local dpi = require('beautiful').xresources.apply_dpi
6 |
7 | local empty_notifbox = wibox.widget {
8 | {
9 | layout = wibox.layout.fixed.vertical,
10 | spacing = dpi(20),
11 | {
12 | expand = 'none',
13 | layout = wibox.layout.align.horizontal,
14 | nil,
15 | {
16 | image = gears.color.recolor_image(beautiful.notification_bell_icon, beautiful.xcolor4),
17 | resize = true,
18 | forced_height = dpi(90),
19 | forced_width = dpi(90),
20 | widget = wibox.widget.imagebox,
21 | },
22 | nil
23 | },
24 | {
25 | text = "No Notifications? :(",
26 | font = beautiful.font_name .. 'medium 12',
27 | align = 'center',
28 | valign = 'center',
29 | widget = wibox.widget.textbox
30 | },
31 | },
32 | margins = dpi(20),
33 | widget = wibox.container.margin
34 |
35 | }
36 |
37 |
38 | local separator_for_empty_msg = wibox.widget
39 | {
40 | orientation = 'vertical',
41 | opacity = 0.0,
42 | widget = wibox.widget.separator
43 | }
44 |
45 | -- Make empty_notifbox center
46 | local centered_empty_notifbox = wibox.widget {
47 | expand = 'none',
48 | layout = wibox.layout.align.vertical,
49 | separator_for_empty_msg,
50 | empty_notifbox,
51 | separator_for_empty_msg
52 | }
53 |
54 | return centered_empty_notifbox
55 |
56 |
--------------------------------------------------------------------------------
/config-s4vi/starship/starship.toml:
--------------------------------------------------------------------------------
1 | add_newline = true
2 |
3 | format = """
4 | ($username)[@](bold white)($hostname)
5 | ($directory)
6 | """
7 |
8 | right_format = """$all"""
9 |
10 |
11 | [username]
12 | disabled = false
13 | show_always = true
14 | style_user = "bold white"
15 | format = "[$user]($style)"
16 |
17 | [hostname]
18 | disabled = false
19 | ssh_only = false
20 | style = "bold white"
21 | format = "[$hostname]($style)"
22 |
23 | [directory]
24 | disabled = false
25 | truncation_length = 1
26 | home_symbol = "~"
27 | format = "[$path](bold cyan)[/](bold green) "
28 |
29 | [character]
30 | success_symbol = ""
31 | error_symbol = "[](bold red)"
32 |
33 | [git_branch]
34 | symbol = " "
35 | style = "bold blue"
36 |
37 | [git_commit]
38 | commit_hash_length = 4
39 | tag_symbol = "🔖 "
40 |
41 | [git_state]
42 | format = '[\($state( $progress_current of $progress_total)\)]($style) '
43 | cherry_pick = "[🍒 PICKING](bold red)"
44 |
45 | [git_metrics]
46 | added_style = "bold blue"
47 | format = '[+$added]($added_style)/[-$deleted]($deleted_style) '
48 |
49 | [git_status]
50 | format = '([\[$all_status$ahead_behind\]]($style) )'
51 | style = "bold cyan"
52 | conflicted = "= "
53 | ahead = "⇡ ${count} "
54 | behind = "⇣ ${count} "
55 | diverged = "⇕ "
56 | up_to_date = ""
57 | untracked = "? "
58 | stashed = "$ "
59 | modified = "! "
60 | staged = '[++\($count\)](green)'
61 | renamed = "» "
62 | deleted = " "
63 |
64 | [cmd_duration]
65 | disabled = true
66 |
--------------------------------------------------------------------------------
/config-s4vi/awesome/signal/uptime.lua:
--------------------------------------------------------------------------------
1 | -- Provides:
2 | -- signal::uptime
3 | -- up (string)
4 | local awful = require("awful")
5 | local naughty = require("naughty")
6 |
7 | -- Uptime Script from https://github.com/niraj998
8 | local uptime_script = [[
9 | sh -c "
10 | cmd=$(uptime)
11 |
12 | hr=$( echo $cmd | cut -d \":\" -f3 | awk '{print $NF}')
13 | mt=$( echo $cmd | cut -d \":\" -f4 | cut -c1-2 )
14 | day=$(echo $cmd | grep day)
15 |
16 | if [ -z \"$day\" ]; then
17 | hour=$(uptime -p | grep hour)
18 | if [ -z \"$hour\" ]; then
19 | uptime -p | awk '{print $2 \"m\"}'
20 | else
21 | if [ \"$mt\" -lt \"10\"]; then
22 | mt=$( echo $cmd | cut -d \":\" -f4 | cut -c2 )
23 | echo \"${hr}h ${mt}m\"
24 | else
25 | echo \"${hr}h ${mt}m\"
26 | fi
27 | fi
28 | else
29 | day=$(echo $day | cut -d \" \" -f3)
30 | if [ \"$mt\" -lt \"10\" ]; then
31 | mt=$( echo $cmd | cut -d \":\" -f4 | cut -c2 )
32 | echo \"${day}d ${hr}h ${mt}m\"
33 | else
34 | echo \"${day}d ${hr}h ${mt}m\"
35 | fi
36 | fi
37 | "]]
38 |
39 | local update_interval = 60
40 |
41 | -- Periodically get uptime info
42 | awful.widget.watch(uptime_script, update_interval, function(_, stdout)
43 | local uptime_value = stdout
44 |
45 | uptime_value = string.gsub(uptime_value, '^%s*(.-)%s*$', '%1')
46 | awesome.emit_signal("signal::uptime", uptime_value)
47 | end)
48 |
49 |
--------------------------------------------------------------------------------
/config-s4vi/alacritty/alacritty.yml:
--------------------------------------------------------------------------------
1 | ## Import files (Colors,Etc)
2 | import:
3 | - ~/.config/alacritty/night/colors.yml
4 |
5 | ## Set environment variables
6 | env:
7 | TERM: xterm-256color
8 |
9 | ## Terminal window settings
10 | window:
11 | opacity: 1.0
12 | padding:
13 | x: 25
14 | y: 25
15 |
16 | ## Font
17 | font:
18 | normal:
19 | family: Iosevka Nerd Font Mono
20 | style: Regular
21 |
22 | bold:
23 | family: Iosevka Nerd Font Mono
24 | style: Bold
25 |
26 | italic:
27 | family: Iosevka Nerd Font Mono
28 | style: Italic
29 |
30 | bold_italic:
31 | family: Iosevka Nerd Font Mono
32 | style: Bold Italic
33 |
34 | size: 10
35 |
36 | offset:
37 | x: 0
38 | y: 0
39 |
40 | glyph_offset:
41 | x: 0
42 | y: 0
43 |
44 | # Class
45 | class:
46 | instance: Alacritty
47 | general: Alacritty
48 |
49 | # Scrolling
50 | scrolling:
51 | history: 10000
52 | multiplier: 3
53 |
54 | # Visual
55 | visual_bell:
56 | animation: EaseOutExpo
57 | duration: 0.5
58 | color: "#ffffff"
59 |
60 | # Selection
61 | selection:
62 | semantic_escape_chars: ",│`|:\"' ()[]{}<>\t"
63 | save_to_clipboard: true
64 |
65 | # Cursor
66 | cursor:
67 | style: 'Underline'
68 |
69 | # Shell
70 | shell:
71 | program: /usr/bin/zsh
72 |
73 | # Mouse
74 | mouse:
75 | double_click: { threshold: 300 }
76 | triple_click: { threshold: 300 }
77 | hide_when_typing: true
78 |
79 | # Global Configuration
80 | live_config_reload: true
81 | draw_bold_text_with_bright_colors: true
82 |
--------------------------------------------------------------------------------
/config-s4vi/awesome/signal/todo.lua:
--------------------------------------------------------------------------------
1 | -- Provides:
2 | -- signal::todo
3 | -- total (integer)
4 | -- done (integer)
5 | -- undone (integer)
6 | local awful = require("awful")
7 |
8 | local todo_file_path = os.getenv("TODO_PATH")
9 |
10 | -- Subscribe to todo changes
11 | -- Requires inotify-tools
12 | local todo_subscribe_script = [[
13 | bash -c "
14 | while (inotifywait -e modify "]] .. todo_file_path .. [[" -qq) do echo; done
15 | "]]
16 |
17 | local todo_script = [[
18 | bash -c "
19 | todo_done=$(todo raw done | wc -l)
20 | todo_undone=$(todo raw todo | wc -l)
21 |
22 | echo "$todo_done"@@"$todo_undone"
23 | "]]
24 |
25 | local emit_todo_info = function()
26 | awful.spawn.with_line_callback(todo_script, {
27 | stdout = function(line)
28 | local done = tonumber(line:match('(.*)@@'))
29 | local undone = tonumber(line:match('@@(.*)'))
30 | local total = undone + done
31 | awesome.emit_signal("signal::todo", total, done, undone)
32 | end
33 | })
34 | end
35 |
36 | -- Run once to initialize widgets
37 | emit_todo_info()
38 |
39 | -- Kill old inotifywait process
40 | awful.spawn.easy_async_with_shell("ps x | grep \"inotifywait -e modify " .. todo_file_path .. "\" | grep -v grep | awk '{print $1}' | xargs kill", function ()
41 | -- Update todo status with each line printed
42 | awful.spawn.with_line_callback(todo_subscribe_script, {
43 | stdout = function(_)
44 | emit_todo_info()
45 | end
46 | })
47 | end)
48 |
49 |
--------------------------------------------------------------------------------
/config-s4vi/awesome/module/bling/signal/playerctl/init.lua:
--------------------------------------------------------------------------------
1 | local awful = require("awful")
2 | local gtimer = require("gears.timer")
3 | local beautiful = require("beautiful")
4 | local naughty = require("naughty")
5 |
6 | -- Use CLI backend as default as it is supported on most if not all systems
7 | local backend_config = beautiful.playerctl_backend or "playerctl_cli"
8 | local backends = {
9 | playerctl_cli = require(... .. ".playerctl_cli"),
10 | playerctl_lib = require(... .. ".playerctl_lib"),
11 | }
12 |
13 | local backend = nil
14 |
15 | local function enable_wrapper(args)
16 | local open = naughty.action { name = "Open" }
17 |
18 | open:connect_signal("invoked", function()
19 | awful.spawn("xdg-open https://blingcorp.github.io/bling/#/signals/pctl")
20 | end)
21 |
22 | gtimer.delayed_call(function()
23 | naughty.notify({
24 | title = "Bling Error",
25 | text = "Global signals are deprecated! Please take a look at the playerctl documentation.",
26 | app_name = "Bling Error",
27 | app_icon = "system-error",
28 | actions = { open }
29 | })
30 | end)
31 |
32 | backend_config = (args and args.backend) or backend_config
33 | backend = backends[backend_config](args)
34 | return backend
35 | end
36 |
37 | local function disable_wrapper()
38 | backend:disable()
39 | end
40 |
41 | return {
42 | lib = backends.playerctl_lib,
43 | cli = backends.playerctl_cli,
44 | enable = enable_wrapper,
45 | disable = disable_wrapper
46 | }
--------------------------------------------------------------------------------
/config-s4vi/nvim/lua/colors/init.lua:
--------------------------------------------------------------------------------
1 | local colors = require("core.utils").load_config().ui.colors
2 | local override = require("core.utils").load_config().ui.hl_override
3 |
4 | local M = {}
5 |
6 | -- if theme given, load given theme if given, otherwise nvchad_theme
7 | M.init = function(theme)
8 | if not theme then
9 | theme = require("core.utils").load_config().ui.theme
10 | end
11 |
12 | -- set the global theme, used at various places like theme switcher, highlights
13 | vim.g.nvchad_theme = theme
14 |
15 | local present, base16 = pcall(require, "base16")
16 |
17 | if present then
18 | -- first load the base16 theme
19 | local ok, array = pcall(base16.themes, theme)
20 |
21 | if ok then
22 | base16(array, true)
23 | -- unload to force reload
24 | package.loaded["colors.highlights" or false] = nil
25 | -- then load the highlights
26 | require "colors.highlights"
27 | else
28 | pcall(vim.cmd, "colo " .. theme)
29 | end
30 | else
31 | pcall(vim.cmd, "colo " .. theme)
32 | end
33 |
34 | if #override ~= 0 then
35 | package.loaded[override] = nil
36 | require(override)
37 | end
38 | end
39 |
40 | -- returns a table of colors for given or current theme
41 | M.get = function(theme)
42 | if #colors ~= 0 then
43 | return require(colors)
44 | else
45 | if not theme then
46 | theme = vim.g.nvchad_theme
47 | end
48 | return require("hl_themes." .. theme)
49 | end
50 | end
51 |
52 | return M
53 |
--------------------------------------------------------------------------------
/config-s4vi/awesome/theme/assets/icons/taglist/dot.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
46 |
--------------------------------------------------------------------------------
/config-s4vi/awesome/module/savefloats.lua:
--------------------------------------------------------------------------------
1 | local awful = require("awful")
2 |
3 | local function rel(screen, win)
4 | return {
5 | x = (win.x - screen.x) / screen.width,
6 | y = (win.y - screen.y) / screen.height,
7 | width = win.width / screen.width,
8 | aspect = win.height / win.width
9 | }
10 | end
11 |
12 | local function unrel(s, rel)
13 | return rel and {
14 | x = s.x + s.width * rel.x,
15 | y = s.y + s.height * rel.y,
16 | width = s.width * rel.width,
17 | height = rel.aspect * s.width * rel.width
18 | }
19 | end
20 |
21 | local stored = {}
22 |
23 | local function forget(c) stored[c] = nil end
24 |
25 | local floating = awful.layout.suit.floating
26 |
27 | function remember(c)
28 | if floating == awful.layout.get(c.screen) or c.floating then
29 | stored[c.window] = rel(c.screen.geometry, c:geometry())
30 | end
31 | end
32 |
33 | function restore(c)
34 | local s = stored[c.window]
35 | if s then
36 | c:geometry(unrel(c.screen.geometry, stored[c.window]))
37 | return true
38 | else
39 | return false
40 | end
41 | end
42 |
43 | client.connect_signal("manage", remember)
44 | client.connect_signal("property::geometry", remember)
45 | client.connect_signal("unmanage", forget)
46 |
47 | tag.connect_signal("property::layout", function(t)
48 | if floating == awful.layout.get(t.screen) then
49 | for _, c in ipairs(t:clients()) do
50 | c:geometry(unrel(t.screen.geometry, stored[c.window]))
51 | end
52 | end
53 | end)
54 |
55 | return restore
56 |
--------------------------------------------------------------------------------
/config-s4vi/awesome/module/rubato/easing.lua:
--------------------------------------------------------------------------------
1 | --- Linear easing (in quotes).
2 | local linear = {
3 | F = 0.5,
4 | easing = function(t) return t end
5 | }
6 |
7 | --- Sublinear (?) easing.
8 | local zero = {
9 | F = 1,
10 | easing = function() return 1 end
11 | }
12 |
13 | --- Quadratic easing.
14 | local quadratic = {
15 | F = 1/3,
16 | easing = function(t) return t * t end
17 | }
18 |
19 | --bouncy constants
20 | local b_cs = {
21 | c1 = 6 * math.pi - 3 * math.sqrt(3) * math.log(2),
22 | c2 = math.sqrt(3) * math.pi,
23 | c3 = 6 * math.sqrt(3) * math.log(2),
24 | c4 = 6 * math.pi - 6147 * math.sqrt(3) * math.log(2),
25 | c5 = 46 * math.pi / 6
26 | }
27 |
28 | -- Okay look. It works. It's not terribly slow because computers can do math
29 | -- quick. The other one decidedly does not work (thanks sagemath, I trusted
30 | -- you...) so this will have to do. I may try to fix it up at some point, I may
31 | -- just leave it be and laugh to myself whenever I see this. As they say, if
32 | -- As they say, if you want something fixed that badly, make a pull request lol
33 | local bouncy = {
34 | F = (20*math.sqrt(3)*math.pi-30*math.log(2)-6147) /
35 | (10*(2*math.sqrt(3)*math.pi-6147*math.log(2))),
36 | easing = function(t) return
37 | (4096*math.pi*math.pow(2, 10*t-10)*math.cos(20/3*math.pi*t-43/6*math.pi)
38 | +6144*math.pow(2, 10*t-10)*math.log(2)*math.sin(20/3*math.pi*t-43/6*math.pi)
39 | +2*math.sqrt(3)*math.pi-3*math.log(2)) /
40 | (2*math.pi*math.sqrt(3)-6147*math.log(2))
41 | end
42 | }
43 |
44 | return {
45 | linear = linear,
46 | zero = zero,
47 | quadratic = quadratic,
48 | bouncy = bouncy
49 | }
50 |
--------------------------------------------------------------------------------
/config-s4vi/awesome/rc.lua:
--------------------------------------------------------------------------------
1 | --[[
2 | _____ __ _ __ _____ _____ _____ _______ _____
3 | | | | | | ___| ___| | | ___|
4 | | - | | | | ___|___ | | | | | | ___|
5 | |__|__|_______|_____|_____|_____|__|_|__|_____|
6 | ~ AestheticArch ~
7 | rxyhn
8 | --]]
9 | pcall(require, "luarocks.loader")
10 |
11 | -- Standard awesome library
12 | local gfs = require("gears.filesystem")
13 | local awful = require("awful")
14 |
15 | -- Theme handling library
16 | local beautiful = require("beautiful")
17 | dpi = beautiful.xresources.apply_dpi
18 | beautiful.init(gfs.get_configuration_dir() .. "theme/theme.lua")
19 |
20 | -- Default Applications
21 | terminal = "kitty"
22 | editor = terminal .. " -e " .. os.getenv("EDITOR")
23 | vscode = "code"
24 | browser = "firefox"
25 | launcher = "rofi -show drun -theme " .. os.getenv("HOME") .. "/.config/awesome/theme/rofi.rasi"
26 | file_manager = "nautilus"
27 | music_client = terminal .. " --class music -e ncmpcpp"
28 |
29 | -- Weather API
30 | openweathermap_key = "" -- API Key
31 | openweathermap_city_id = "" -- City ID
32 | weather_units = "metric" -- Unit
33 |
34 | -- Global Vars
35 | screen_width = awful.screen.focused().geometry.width
36 | screen_height = awful.screen.focused().geometry.height
37 |
38 | -- Autostart
39 | awful.spawn.with_shell(gfs.get_configuration_dir() .. "configuration/autostart")
40 |
41 | -- Import Configuration
42 | require("configuration")
43 |
44 | -- Import Daemons and Widgets
45 | require("signal")
46 | require("ui")
47 |
48 | -- Garbage Collector Settings
49 | collectgarbage("setpause", 110)
50 | collectgarbage("setstepmul", 1000)
51 |
52 |
--------------------------------------------------------------------------------
/config-s4vi/awesome/module/bling/layout/vertical.lua:
--------------------------------------------------------------------------------
1 | local math = math
2 |
3 | local mylayout = {}
4 |
5 | mylayout.name = "vertical"
6 |
7 | function mylayout.arrange(p)
8 | local area = p.workarea
9 | local t = p.tag or screen[p.screen].selected_tag
10 | local mwfact = t.master_width_factor
11 | local nmaster = math.min(t.master_count, #p.clients)
12 | local nslaves = #p.clients - nmaster
13 |
14 | local master_area_width = area.width * mwfact
15 | local slave_area_width = area.width - master_area_width
16 |
17 | -- Special case: no slaves
18 | if nslaves == 0 then
19 | master_area_width = area.width
20 | slave_area_width = 0
21 | end
22 |
23 | -- Special case: no masters
24 | if nmaster == 0 then
25 | master_area_width = 0
26 | slave_area_width = area.width
27 | end
28 |
29 | -- iterate through masters
30 | for idx = 1, nmaster do
31 | local c = p.clients[idx]
32 | local g = {
33 | x = area.x,
34 | y = area.y + (idx - 1) * (area.height / nmaster),
35 | width = master_area_width,
36 | height = area.height / nmaster,
37 | }
38 | p.geometries[c] = g
39 | end
40 |
41 | -- itearte through slaves
42 | for idx = 1, nslaves do
43 | local c = p.clients[idx + nmaster]
44 | local g = {
45 | x = area.x
46 | + master_area_width
47 | + (idx - 1) * (slave_area_width / nslaves),
48 | y = area.y,
49 | width = slave_area_width / nslaves,
50 | height = area.height,
51 | }
52 | p.geometries[c] = g
53 | end
54 | end
55 |
56 | return mylayout
57 |
--------------------------------------------------------------------------------
/config-s4vi/awesome/module/bling/layout/horizontal.lua:
--------------------------------------------------------------------------------
1 | local math = math
2 |
3 | local mylayout = {}
4 |
5 | mylayout.name = "horizontal"
6 |
7 | function mylayout.arrange(p)
8 | local area = p.workarea
9 | local t = p.tag or screen[p.screen].selected_tag
10 | local mwfact = t.master_width_factor
11 | local nmaster = math.min(t.master_count, #p.clients)
12 | local nslaves = #p.clients - nmaster
13 |
14 | local master_area_height = area.height * mwfact
15 | local slave_area_height = area.height - master_area_height
16 |
17 | -- Special case: no slaves
18 | if nslaves == 0 then
19 | master_area_height = area.height
20 | slave_area_height = 0
21 | end
22 |
23 | -- Special case: no masters
24 | if nmaster == 0 then
25 | master_area_height = 0
26 | slave_area_height = area.height
27 | end
28 |
29 | -- itearte through masters
30 | for idx = 1, nmaster do
31 | local c = p.clients[idx]
32 | local g = {
33 | x = area.x + (idx - 1) * (area.width / nmaster),
34 | y = area.y,
35 | width = area.width / nmaster,
36 | height = master_area_height,
37 | }
38 | p.geometries[c] = g
39 | end
40 |
41 | -- iterate through slaves
42 | for idx = 1, nslaves do
43 | local c = p.clients[idx + nmaster]
44 | local g = {
45 | x = area.x,
46 | y = area.y
47 | + master_area_height
48 | + (idx - 1) * (slave_area_height / nslaves),
49 | width = area.width,
50 | height = slave_area_height / nslaves,
51 | }
52 | p.geometries[c] = g
53 | end
54 | end
55 |
56 | return mylayout
57 |
--------------------------------------------------------------------------------
/config-s4vi/nvim/lua/plugins/configs/lspconfig.lua:
--------------------------------------------------------------------------------
1 | local M = {}
2 | require("plugins.configs.others").lsp_handlers()
3 |
4 | function M.on_attach(client, bufnr)
5 | local function buf_set_option(...)
6 | vim.api.nvim_buf_set_option(bufnr, ...)
7 | end
8 |
9 | client.resolved_capabilities.document_formatting = false
10 | client.resolved_capabilities.document_range_formatting = false
11 | -- Enable completion triggered by
12 | buf_set_option("omnifunc", "v:lua.vim.lsp.omnifunc")
13 |
14 | require("core.mappings").lspconfig()
15 | end
16 |
17 | local capabilities = vim.lsp.protocol.make_client_capabilities()
18 | capabilities.textDocument.completion.completionItem.documentationFormat = { "markdown", "plaintext" }
19 | capabilities.textDocument.completion.completionItem.snippetSupport = true
20 | capabilities.textDocument.completion.completionItem.preselectSupport = true
21 | capabilities.textDocument.completion.completionItem.insertReplaceSupport = true
22 | capabilities.textDocument.completion.completionItem.labelDetailsSupport = true
23 | capabilities.textDocument.completion.completionItem.deprecatedSupport = true
24 | capabilities.textDocument.completion.completionItem.commitCharactersSupport = true
25 | capabilities.textDocument.completion.completionItem.tagSupport = { valueSet = { 1 } }
26 | capabilities.textDocument.completion.completionItem.resolveSupport = {
27 | properties = {
28 | "documentation",
29 | "detail",
30 | "additionalTextEdits",
31 | },
32 | }
33 |
34 | -- requires a file containing user's lspconfigs
35 | local addlsp_confs = require("core.utils").load_config().plugins.options.lspconfig.setup_lspconf
36 |
37 | if #addlsp_confs ~= 0 then
38 | require(addlsp_confs).setup_lsp(M.on_attach, capabilities)
39 | end
40 |
41 | return M
42 |
--------------------------------------------------------------------------------
/config-s4vi/awesome/theme/rofi.rasi:
--------------------------------------------------------------------------------
1 | configuration {
2 | modi: "drun";
3 | display-drun: "Apps";
4 | drun-display-format: "{name}";
5 | font: "Iosevka 8";
6 | show-icons: true;
7 | icon-theme: "Papirus";
8 | }
9 |
10 | @theme "/dev/null"
11 |
12 | * {
13 | bg: #061115;
14 | fg: #d9d7d6;
15 | accent: #1c252c;
16 | darkerAccent: #162026;
17 | active: #484e5b;
18 | rad: 12px;
19 |
20 | background-color: @bg;
21 | text-color: @fg;
22 | }
23 |
24 | window {
25 | transparency: "real";
26 | height: 94%;
27 | width: 22%;
28 | location: west;
29 | x-offset: 7%;
30 | y-offset: 0%;
31 | border-radius: @rad;
32 | }
33 |
34 | inputbar {
35 | children: [ textbox, entry ];
36 | expand: false;
37 | margin: 20px 20px 0 20px;
38 | border-radius: @rad;
39 | background-color: @darkerAccent;
40 | }
41 |
42 | textbox {
43 | str: "";
44 | expand: false;
45 | padding: 0 1% 0;
46 | horizontal-align: 0.5;
47 | vertical-align: 0.5;
48 | border-radius: @rad;
49 | background-color: @accent;
50 | text-color: @bg;
51 | font: "Material Icons 17";
52 | }
53 |
54 | entry{
55 | expand: true;
56 | padding: 2%;
57 | placeholder: "Search";
58 | border-radius: @rad;
59 | background-color: @darkerAccent;
60 | }
61 |
62 | listview {
63 | columns: 2;
64 | lines: 2;
65 | cycle: false;
66 | margin: 20px;
67 | }
68 |
69 | element {
70 | orientation: vertical;
71 | padding: 1em;
72 | }
73 |
74 | element-text, element-icon {
75 | padding: 0.2em;
76 | horizontal-align: 0.5;
77 | background-color: inherit;
78 | }
79 |
80 | element-icon { size: 48px; }
81 | listview, element, element selected, element-text, element-icon { cursor: pointer; }
82 |
83 | element selected {
84 | background-color: @darkerAccent;
85 | text-color: @fg;
86 | border-radius: @rad;
87 | }
88 |
--------------------------------------------------------------------------------
/config-s4vi/awesome/configuration/menu.lua:
--------------------------------------------------------------------------------
1 | -- Standard Awesome Library
2 | local awful = require("awful")
3 | local hotkeys_popup = require("awful.hotkeys_popup")
4 | local beautiful = require("beautiful")
5 |
6 | -- Helpers
7 | local helpers = require("helpers")
8 |
9 | -- Create a launcher widget and a main menu
10 | awful.screen.connect_for_each_screen(function(s)
11 |
12 | -- Submenu
13 | awesomemenu = {
14 | {"Hotkeys", function() hotkeys_popup.show_help(nil, awful.screen.focused()) end},
15 | {"Manual", terminal .. " -e man awesome"},
16 | {"Edit Config", editor .. " " .. awesome.conffile},
17 | {"Restart", awesome.restart},
18 | {"Quit", function() awesome.quit() end}
19 | }
20 |
21 | -- Powermenu
22 | powermenu = {
23 | {"Power OFF", function() awful.spawn.with_shell("systemctl poweroff") end},
24 | {"Reboot", function() awful.spawn.with_shell("systemctl reboot") end},
25 | {"Suspend", function()
26 | lock_screen_show()
27 | awful.spawn.with_shell("systemctl suspend")
28 | end},
29 | {"Lock Screen", function() lock_screen_show() end}
30 | }
31 |
32 | -- Mainmenu
33 | mymainmenu = awful.menu({
34 | items = {
35 | {"Terminal", function() awful.spawn.with_shell(terminal) end},
36 | {"Code Editor", function() awful.spawn.with_shell(vscode) end},
37 | {"File Manager", function() awful.spawn.with_shell(file_manager) end},
38 | {"Web Browser", function() awful.spawn.with_shell(browser) end},
39 | {"Music", function() awful.spawn.with_shell(music_client) end},
40 | {"AwesomeWM", awesomemenu, beautiful.awesome_logo},
41 | {"Power Menu", powermenu}
42 | }
43 | })
44 |
45 | mymainmenu.wibox.shape = helpers.rrect(beautiful.border_radius)
46 |
47 | end)
48 |
49 |
--------------------------------------------------------------------------------
/config-s4vi/awesome/theme/assets/icons/taglist/ghost.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
46 |
--------------------------------------------------------------------------------
/config-s4vi/awesome/module/bling/module/tiled_wallpaper.lua:
--------------------------------------------------------------------------------
1 | --[[
2 | This module makes use of cairo surfaces
3 | For documentation take a look at the C docs:
4 | https://www.cairographics.org/
5 | They can be applied to lua by changing the naming conventions
6 | and adjusting for the missing namespaces (and classes)
7 | for example:
8 | cairo_rectangle(cr, 1, 1, 1, 1) in C would be written as
9 | cr:rectangle(1, 1, 1, 1) in lua
10 | and
11 | cairo_fill(cr) in C would be written as
12 | cr:fill() in lua
13 | --]]
14 |
15 | local cairo = require("lgi").cairo
16 | local gears = require("gears")
17 |
18 | function create_tiled_wallpaper(str, s, args_table)
19 | -- user input
20 | args_table = args_table or {}
21 | local fg = args_table.fg or "#ff0000"
22 | local bg = args_table.bg or "#00ffff"
23 | local offset_x = args_table.offset_x
24 | local offset_y = args_table.offset_y
25 | local font = args_table.font or "Hack"
26 | local font_size = tonumber(args_table.font_size) or 16
27 | local zickzack_bool = args_table.zickzack or false
28 | local padding = args_table.padding or 100
29 |
30 | -- create cairo image wallpaper
31 | local img = cairo.ImageSurface(cairo.Format.RGB24, padding, padding)
32 | cr = cairo.Context(img)
33 |
34 | cr:set_source(gears.color(bg))
35 | cr:paint()
36 |
37 | cr:set_source(gears.color(fg))
38 |
39 | cr:set_font_size(font_size)
40 | cr:select_font_face(font)
41 |
42 | if zickzack_bool then
43 | cr:set_source(gears.color(fg))
44 | cr:move_to(padding / 2 + font_size, padding / 2 + font_size)
45 | cr:show_text(str)
46 | end
47 |
48 | cr:set_source(gears.color(fg))
49 | cr:move_to(font_size, font_size)
50 | cr:show_text(str)
51 |
52 | -- tile cairo image
53 | gears.wallpaper.tiled(img, s, { x = offset_x, y = offset_y })
54 | end
55 |
56 | return create_tiled_wallpaper
57 |
--------------------------------------------------------------------------------
/config-s4vi/awesome/module/layout-machi/rc.patch:
--------------------------------------------------------------------------------
1 | --- /usr/etc/xdg/awesome/rc.lua 2019-10-02 22:20:36.000000000 -0400
2 | +++ rc.lua 2019-10-06 12:13:41.090197230 -0400
3 | @@ -17,6 +17,7 @@
4 | -- Enable hotkeys help widget for VIM and other apps
5 | -- when client with a matching name is opened:
6 | require("awful.hotkeys_popup.keys")
7 | +local machi = require("layout-machi")
8 |
9 | -- {{{ Error handling
10 | -- Check if awesome encountered an error during startup and fell back to
11 | @@ -34,6 +35,8 @@
12 | -- Themes define colours, icons, font and wallpapers.
13 | beautiful.init(gears.filesystem.get_themes_dir() .. "default/theme.lua")
14 |
15 | +beautiful.layout_machi = machi.get_icon()
16 | +
17 | -- This is used later as the default terminal and editor to run.
18 | terminal = "xterm"
19 | editor = os.getenv("EDITOR") or "nano"
20 | @@ -48,6 +51,7 @@
21 |
22 | -- Table of layouts to cover with awful.layout.inc, order matters.
23 | awful.layout.layouts = {
24 | + machi.default_layout,
25 | awful.layout.suit.floating,
26 | awful.layout.suit.tile,
27 | awful.layout.suit.tile.left,
28 | @@ -262,6 +266,10 @@
29 | awful.key({ modkey, "Shift" }, "q", awesome.quit,
30 | {description = "quit awesome", group = "awesome"}),
31 |
32 | + awful.key({ modkey, }, ".", function () machi.default_editor.start_interactive() end,
33 | + {description = "edit the current layout if it is a machi layout", group = "layout"}),
34 | + awful.key({ modkey, }, "/", function () machi.switcher.start(client.focus) end,
35 | + {description = "switch between windows for a machi layout", group = "layout"}),
36 | awful.key({ modkey, }, "l", function () awful.tag.incmwfact( 0.05) end,
37 | {description = "increase master width factor", group = "layout"}),
38 | awful.key({ modkey, }, "h", function () awful.tag.incmwfact(-0.05) end,
39 |
--------------------------------------------------------------------------------
/config-s4vi/awesome/ui/dashboard/weather.lua:
--------------------------------------------------------------------------------
1 | -- Standard awesome library
2 | local gears = require("gears")
3 | local awful = require("awful")
4 |
5 | -- Theme handling library
6 | local beautiful = require("beautiful")
7 | local dpi = beautiful.xresources.apply_dpi
8 |
9 | -- Widget library
10 | local wibox = require("wibox")
11 |
12 | -- Helpers
13 | local helpers = require("helpers")
14 |
15 |
16 | -- Weather
17 | ------------
18 |
19 | local weather_text = wibox.widget{
20 | font = beautiful.font_name .. "medium 8",
21 | markup = helpers.colorize_text("Weather unavailable", beautiful.dashboard_box_fg),
22 | valign = "center",
23 | widget = wibox.widget.textbox
24 | }
25 |
26 | local weather_temp = wibox.widget{
27 | font = beautiful.font_name .. "medium 11",
28 | markup = "999°C",
29 | valign = "center",
30 | widget = wibox.widget.textbox
31 | }
32 |
33 | local weather_icon = wibox.widget{
34 | font = "icomoon 36",
35 | markup = helpers.colorize_text("", beautiful.xcolor2),
36 | align = "right",
37 | valign = "bottom",
38 | widget = wibox.widget.textbox
39 | }
40 |
41 | local weather = wibox.widget{
42 | {
43 | weather_text,
44 | weather_temp,
45 | spacing = dpi(3),
46 | layout = wibox.layout.fixed.vertical
47 | },
48 | nil,
49 | weather_icon,
50 | expand = "none",
51 | layout = wibox.layout.align.vertical
52 | }
53 |
54 | awesome.connect_signal("signal::weather", function(temperature, description, icon_widget)
55 | local weather_temp_symbol
56 | if weather_units == "metric" then
57 | weather_temp_symbol = "°C"
58 | elseif weather_units == "imperial" then
59 | weather_temp_symbol = "°F"
60 | end
61 |
62 | weather_icon.markup = icon_widget
63 | weather_text.markup = helpers.colorize_text(description, beautiful.dashboard_box_fg)
64 | weather_temp.markup = temperature .. weather_temp_symbol
65 | end)
66 |
67 | return weather
68 |
--------------------------------------------------------------------------------
/config-s4vi/ncmpcpp/config:
--------------------------------------------------------------------------------
1 | # DIRECTORY
2 | # ---
3 | ncmpcpp_directory = ~/.config/ncmpcpp
4 | lyrics_directory = ~/.config/ncmpcpp/lyrics
5 | mpd_music_dir = ~/Music
6 |
7 | # GENERAL
8 | # ---
9 | external_editor = nvim
10 | message_delay_time = 1
11 | playlist_disable_highlight_delay = 2
12 | autocenter_mode = "yes"
13 | centered_cursor = "yes"
14 | ignore_leading_the = "yes"
15 | allow_for_physical_item_deletion = "no"
16 | connected_message_on_startup = "yes"
17 | cyclic_scrolling = "yes"
18 | mouse_support = "yes"
19 | mouse_list_scroll_whole_page = "yes"
20 | lines_scrolled = "1"
21 | playlist_shorten_total_times = "yes"
22 | playlist_display_mode = "columns"
23 | browser_display_mode = "columns"
24 | search_engine_display_mode = "columns"
25 | playlist_editor_display_mode = "columns"
26 | user_interface = "classic"
27 | follow_now_playing_lyrics = "yes"
28 | display_bitrate = "no"
29 | startup_screen = "playlist"
30 |
31 | # VISUALIZER
32 | # ---
33 | visualizer_data_source = "/tmp/mpd.fifo"
34 | visualizer_output_name = "Visualizer"
35 | visualizer_in_stereo = "no"
36 | visualizer_sync_interval = "30"
37 | visualizer_type = "ellipse"
38 | visualizer_fps = "60"
39 | visualizer_look = ●▮
40 | visualizer_color = "33,39,63,75,81,99,117,153,189"
41 |
42 | # PROGRESS BAR
43 | # ---
44 | progressbar_look = " "
45 | progressbar_color = "black"
46 | progressbar_elapsed_color = "yellow"
47 |
48 | # COLORS
49 | # ---
50 | main_window_color = "blue"
51 | color1 = "white"
52 | color2 = "blue"
53 |
54 | # UI VISIBILITY
55 | # ---
56 | header_visibility = "no"
57 | statusbar_visibility = "no"
58 | titles_visibility = "no"
59 |
60 | # UI APPEARANCE
61 | # ---
62 | now_playing_prefix = "$b$8$7 "
63 | now_playing_suffix = " $/b$8"
64 | current_item_prefix = "$b$7$/b$3 "
65 | current_item_suffix = " $8"
66 | song_status_format= "$7%t"
67 | song_list_format = "$8%a - %t$R %l"
68 | song_columns_list_format = "(53)[white]{tr} (45)[blue]{a}"
69 | song_library_format = {{%a - %t} (%b)}|{%f}
70 | song_window_title_format = "Music"
71 |
--------------------------------------------------------------------------------
/config-s4vi/nvim/lua/plugins/configs/nvimtree.lua:
--------------------------------------------------------------------------------
1 | -- globals must be set prior to requiring nvim-tree to function
2 | local g = vim.g
3 |
4 | g.nvim_tree_add_trailing = 0 -- append a trailing slash to folder names
5 | g.nvim_tree_git_hl = 0
6 | g.nvim_tree_highlight_opened_files = 0
7 | g.nvim_tree_indent_markers = 1
8 | g.nvim_tree_root_folder_modifier = table.concat { ":t:gs?$?/..", string.rep(" ", 1000), "?:gs?^??" }
9 |
10 | g.nvim_tree_show_icons = {
11 | folders = 1,
12 | files = 1,
13 | git = 1,
14 | }
15 |
16 | g.nvim_tree_icons = {
17 | default = "",
18 | symlink = "",
19 | git = {
20 | deleted = "",
21 | ignored = "◌",
22 | renamed = "➜",
23 | staged = "✓",
24 | unmerged = "",
25 | unstaged = "✗",
26 | untracked = "★",
27 | },
28 | folder = {
29 | default = "",
30 | empty = "",
31 | empty_open = "",
32 | open = "",
33 | symlink = "",
34 | symlink_open = "",
35 | },
36 | }
37 |
38 | local present, nvimtree = pcall(require, "nvim-tree")
39 |
40 | if not present then
41 | return
42 | end
43 |
44 | local default = {
45 | filters = {
46 | dotfiles = false,
47 | },
48 | disable_netrw = true,
49 | hijack_netrw = true,
50 | ignore_ft_on_setup = { "dashboard" },
51 | auto_close = false,
52 | open_on_tab = false,
53 | hijack_cursor = true,
54 | hijack_unnamed_buffer_when_opening = false,
55 | update_cwd = true,
56 | update_focused_file = {
57 | enable = true,
58 | update_cwd = false,
59 | },
60 | view = {
61 | allow_resize = true,
62 | side = "left",
63 | width = 25,
64 | hide_root_folder = true,
65 | },
66 | git = {
67 | enable = false,
68 | ignore = false,
69 | },
70 | actions = {
71 | open_file = {
72 | resize_window = true,
73 | },
74 | },
75 | }
76 |
77 | local M = {}
78 |
79 | M.setup = function(override_flag)
80 | if override_flag then
81 | default = require("core.utils").tbl_override_req("nvim_tree", default)
82 | end
83 | nvimtree.setup(default)
84 | end
85 |
86 | return M
87 |
--------------------------------------------------------------------------------
/config-s4vi/awesome/signal/volume.lua:
--------------------------------------------------------------------------------
1 | -- Provides:
2 | -- signal::volume
3 | -- percentage (integer)
4 | -- muted (boolean)
5 | local awful = require("awful")
6 |
7 | local volume_old = -1
8 | local muted_old = -1
9 | local function emit_volume_info()
10 | -- Get volume info of the currently active sink
11 | -- The currently active sink has a star `*` in front of its index
12 | -- In the output of `pacmd list-sinks`, lines +7 and +11 after "* index:"
13 | -- contain the volume level and muted state respectively
14 | -- This is why we are using `awk` to print them.
15 | awful.spawn.easy_async_with_shell(
16 | "pacmd list-sinks | awk '/\\* index: /{nr[NR+7];nr[NR+11]}; NR in nr'",
17 | function(stdout)
18 | local volume = stdout:match('(%d+)%% /')
19 | local muted = stdout:match('muted:(%s+)[yes]')
20 | local muted_int = muted and 1 or 0
21 | local volume_int = tonumber(volume)
22 | -- Only send signal if there was a change
23 | -- We need this since we use `pactl subscribe` to detect
24 | -- volume events. These are not only triggered when the
25 | -- user adjusts the volume through a keybind, but also
26 | -- through `pavucontrol` or even without user intervention,
27 | -- when a media file starts playing.
28 | if volume_int ~= volume_old or muted_int ~= muted_old then
29 | awesome.emit_signal("signal::volume", volume_int, muted)
30 | volume_old = volume_int
31 | muted_old = muted_int
32 | end
33 | end)
34 | end
35 |
36 | -- Run once to initialize widgets
37 | emit_volume_info()
38 |
39 | -- Sleeps until pactl detects an event (volume up/down/toggle mute)
40 | local volume_script = [[
41 | bash -c "
42 | LANG=C pactl subscribe 2> /dev/null | grep --line-buffered \"Event 'change' on sink #\"
43 | "]]
44 |
45 |
46 | -- Kill old pactl subscribe processes
47 | awful.spawn.easy_async({
48 | "pkill", "--full", "--uid", os.getenv("USER"), "^pactl subscribe"
49 | }, function ()
50 | -- Run emit_volume_info() with each line printed
51 | awful.spawn.with_line_callback(volume_script, {
52 | stdout = function(line) emit_volume_info() end
53 | })
54 | end)
55 |
56 |
57 |
--------------------------------------------------------------------------------
/config-s4vi/awesome/module/bling/helpers/filesystem.lua:
--------------------------------------------------------------------------------
1 | local Gio = require("lgi").Gio
2 | local awful = require("awful")
3 | local string = string
4 |
5 | local _filesystem = {}
6 |
7 | --- Get a list of files from a given directory.
8 | -- @string path The directory to search.
9 | -- @tparam[opt] table exts Specific extensions to limit the search to. eg:`{ "jpg", "png" }`
10 | -- If ommited, all files are considered.
11 | -- @bool[opt=false] recursive List files from subdirectories
12 | -- @staticfct bling.helpers.filesystem.get_random_file_from_dir
13 | function _filesystem.list_directory_files(path, exts, recursive)
14 | recursive = recursive or false
15 | local files, valid_exts = {}, {}
16 |
17 | -- Transforms { "jpg", ... } into { [jpg] = #, ... }
18 | if exts then
19 | for i, j in ipairs(exts) do
20 | valid_exts[j:lower()] = i
21 | end
22 | end
23 |
24 | -- Build a table of files from the path with the required extensions
25 | local file_list = Gio.File.new_for_path(path):enumerate_children(
26 | "standard::*",
27 | 0
28 | )
29 | if file_list then
30 | for file in function()
31 | return file_list:next_file()
32 | end do
33 | local file_type = file:get_file_type()
34 | if file_type == "REGULAR" then
35 | local file_name = file:get_display_name()
36 | if
37 | not exts
38 | or valid_exts[file_name:lower():match(".+%.(.*)$") or ""]
39 | then
40 | table.insert(files, file_name)
41 | end
42 | elseif recursive and file_type == "DIRECTORY" then
43 | local file_name = file:get_display_name()
44 | files = gears.table.join(
45 | files,
46 | list_directory_files(file_name, exts, recursive)
47 | )
48 | end
49 | end
50 | end
51 |
52 | return files
53 | end
54 |
55 | function _filesystem.save_image_async_curl(url, filepath, callback)
56 | awful.spawn.with_line_callback(string.format("curl -L -s %s -o %s", url, filepath),
57 | {
58 | exit=callback
59 | })
60 | end
61 |
62 | return _filesystem
63 |
--------------------------------------------------------------------------------
/config-s4vi/nvim/lua/core/options.lua:
--------------------------------------------------------------------------------
1 | local opt = vim.opt
2 | local g = vim.g
3 |
4 | local options = require("core.utils").load_config().options
5 |
6 | opt.title = true
7 | opt.clipboard = options.clipboard
8 | opt.cmdheight = options.cmdheight
9 | opt.cul = true -- cursor line
10 |
11 | -- Indentline
12 | opt.expandtab = options.expandtab
13 | opt.shiftwidth = options.shiftwidth
14 | opt.smartindent = options.smartindent
15 |
16 | -- disable tilde on end of buffer: https://github.com/neovim/neovim/pull/8546#issuecomment-643643758
17 | opt.fillchars = options.fillchars
18 |
19 | opt.hidden = options.hidden
20 | opt.ignorecase = options.ignorecase
21 | opt.smartcase = options.smartcase
22 | opt.mouse = options.mouse
23 |
24 | -- Numbers
25 | opt.number = options.number
26 | opt.numberwidth = options.numberwidth
27 | opt.relativenumber = options.relativenumber
28 | opt.ruler = options.ruler
29 |
30 | -- disable nvim intro
31 | opt.shortmess:append "sI"
32 |
33 | opt.signcolumn = "yes"
34 | opt.splitbelow = true
35 | opt.splitright = true
36 | opt.tabstop = options.tabstop
37 | opt.termguicolors = true
38 | opt.timeoutlen = options.timeoutlen
39 | opt.undofile = options.undofile
40 |
41 | -- interval for writing swap file to disk, also used by gitsigns
42 | opt.updatetime = options.updatetime
43 |
44 | -- go to previous/next line with h,l,left arrow and right arrow
45 | -- when cursor reaches end/beginning of line
46 | opt.whichwrap:append "<>[]hl"
47 |
48 | g.mapleader = options.mapleader
49 |
50 | -- disable some builtin vim plugins
51 | local disabled_built_ins = {
52 | "2html_plugin",
53 | "getscript",
54 | "getscriptPlugin",
55 | "gzip",
56 | "logipat",
57 | "netrw",
58 | "netrwPlugin",
59 | "netrwSettings",
60 | "netrwFileHandlers",
61 | "matchit",
62 | "tar",
63 | "tarPlugin",
64 | "rrhelper",
65 | "spellfile_plugin",
66 | "vimball",
67 | "vimballPlugin",
68 | "zip",
69 | "zipPlugin",
70 | }
71 |
72 | for _, plugin in pairs(disabled_built_ins) do
73 | g["loaded_" .. plugin] = 1
74 | end
75 |
76 | --Defer loading shada until after startup_
77 | vim.opt.shadafile = "NONE"
78 | vim.schedule(function()
79 | vim.opt.shadafile = require("core.utils").load_config().options.shadafile
80 | vim.cmd [[ silent! rsh ]]
81 | end)
82 |
--------------------------------------------------------------------------------
/config-s4vi/awesome/signal/battery.lua:
--------------------------------------------------------------------------------
1 | -- Provides:
2 | -- signal::battery
3 | -- percentage (integer)
4 | -- signal::charger
5 | -- plugged (boolean)
6 |
7 | local awful = require("awful")
8 |
9 | local update_interval = 30
10 |
11 | -- Subscribe to power supply status changes with acpi_listen
12 | local charger_script = [[
13 | sh -c '
14 | acpi_listen | grep --line-buffered ac_adapter
15 | '
16 | ]]
17 |
18 | -- First get battery file path
19 | -- If there are multiple, only get the first one
20 | -- TODO support multiple batteries
21 | awful.spawn.easy_async_with_shell("sh -c 'out=\"$(find /sys/class/power_supply/BAT?/capacity)\" && (echo \"$out\" | head -1) || false' ", function (battery_file, _, __, exit_code)
22 | -- No battery file found
23 | if not (exit_code == 0) then
24 | return
25 | end
26 | -- Periodically get battery info
27 | awful.widget.watch("cat "..battery_file, update_interval, function(_, stdout)
28 | -- awful.widget.watch("check-battery", update_interval, function(_, stdout)
29 | awesome.emit_signal("signal::battery", tonumber(stdout))
30 | end)
31 | end)
32 |
33 | -- First get charger file path
34 | awful.spawn.easy_async_with_shell("sh -c 'out=\"$(find /sys/class/power_supply/*/online)\" && (echo \"$out\" | head -1) || false' ", function (charger_file, _, __, exit_code)
35 | -- No charger file found
36 | if not (exit_code == 0) then
37 | return
38 | end
39 | -- Then initialize function that emits charger info
40 | local emit_charger_info = function()
41 | awful.spawn.easy_async_with_shell("cat "..charger_file, function (out)
42 | local status = tonumber(out) == 1
43 | awesome.emit_signal("signal::charger", status)
44 | end)
45 | end
46 |
47 | -- Run once to initialize widgets
48 | emit_charger_info()
49 |
50 | -- Kill old acpi_listen process
51 | awful.spawn.easy_async_with_shell("ps x | grep \"acpi_listen\" | grep -v grep | awk '{print $1}' | xargs kill", function ()
52 | -- Update charger status with each line printed
53 | awful.spawn.with_line_callback(charger_script, {
54 | stdout = function(_)
55 | emit_charger_info()
56 | end
57 | })
58 | end)
59 | end)
60 |
--------------------------------------------------------------------------------
/config-s4vi/awesome/module/bling/widget/tabbar/boxes.lua:
--------------------------------------------------------------------------------
1 | local awful = require("awful")
2 | local gears = require("gears")
3 | local wibox = require("wibox")
4 |
5 | local beautiful = require("beautiful")
6 |
7 | local bg_normal = beautiful.tabbar_bg_normal or beautiful.bg_normal or "#ffffff"
8 | local fg_normal = beautiful.tabbar_fg_normal or beautiful.fg_normal or "#000000"
9 | local bg_focus = beautiful.tabbar_bg_focus or beautiful.bg_focus or "#000000"
10 | local fg_focus = beautiful.tabbar_fg_focus or beautiful.fg_focus or "#ffffff"
11 | local bg_focus_inactive = beautiful.tabbar_bg_focus_inactive or bg_focus
12 | local fg_focus_inactive = beautiful.tabbar_fg_focus_inactive or fg_focus
13 | local bg_normal_inactive = beautiful.tabbar_bg_normal_inactive or bg_normal
14 | local fg_normal_inactive = beautiful.tabbar_fg_normal_inactive or fg_normal
15 | local font = beautiful.tabbar_font or beautiful.font or "Hack 15"
16 | local size = beautiful.tabbar_size or 40
17 | local position = beautiful.tabbar_position or "bottom"
18 |
19 | local function create(c, focused_bool, buttons, inactive_bool)
20 | local bg_temp = inactive_bool and bg_normal_inactive or bg_normal
21 | local fg_temp = inactive_bool and fg_normal_inactive or fg_normal
22 | if focused_bool then
23 | bg_temp = inactive_bool and bg_focus_inactive or bg_focus
24 | fg_temp = inactive_bool and fg_focus_inactive or fg_focus
25 | end
26 | local wid_temp = wibox.widget({
27 | {
28 | {
29 | awful.widget.clienticon(c),
30 | left = 10,
31 | right = 10,
32 | bottom = 10,
33 | top = 10,
34 | widget = wibox.container.margin(),
35 | },
36 | widget = wibox.container.place(),
37 | },
38 | buttons = buttons,
39 | bg = bg_temp,
40 | widget = wibox.container.background(),
41 | })
42 | return wid_temp
43 | end
44 |
45 | local layout = wibox.layout.fixed.horizontal
46 | if position == "left" or position == "right" then
47 | layout = wibox.layout.fixed.vertical
48 | end
49 |
50 | return {
51 | layout = layout,
52 | create = create,
53 | position = position,
54 | size = size,
55 | bg_normal = bg_normal,
56 | bg_focus = bg_normal,
57 | }
58 |
--------------------------------------------------------------------------------
/config-s4vi/awesome/ui/notifs/notif-center/build-notifbox/init.lua:
--------------------------------------------------------------------------------
1 | local wibox = require('wibox')
2 | local awful = require('awful')
3 | local gears = require('gears')
4 | local naughty = require('naughty')
5 | local beautiful = require('beautiful')
6 | local dpi = beautiful.xresources.apply_dpi
7 |
8 | local empty_notifbox = require('ui.notifs.notif-center.build-notifbox.empty-notifbox')
9 | local notifbox_scroller = require('ui.notifs.notif-center.build-notifbox.notifbox-scroller')
10 |
11 | local notif_core = {}
12 |
13 | notif_core.remove_notifbox_empty = true
14 |
15 | notif_core.notifbox_layout = wibox.widget {
16 | layout = wibox.layout.fixed.vertical,
17 | spacing = dpi(7),
18 | empty_notifbox
19 | }
20 |
21 | notifbox_scroller(notif_core.notifbox_layout)
22 |
23 | notif_core.reset_notifbox_layout = function()
24 | notif_core.notifbox_layout:reset()
25 | notif_core.notifbox_layout:insert(1, empty_notifbox)
26 | notif_core.remove_notifbox_empty = true
27 | end
28 |
29 | local notifbox_add = function(n, notif_icon, notifbox_color)
30 | if #notif_core.notifbox_layout.children == 1 and notif_core.remove_notifbox_empty then
31 | notif_core.notifbox_layout:reset(notif_core.notifbox_layout)
32 | notif_core.remove_notifbox_empty = false
33 | end
34 |
35 | local notifbox_box = require('ui.notifs.notif-center.build-notifbox.notifbox-builder')
36 | notif_core.notifbox_layout:insert(
37 | 1,
38 | notifbox_box(
39 | n,
40 | notif_icon,
41 | n.title,
42 | n.message,
43 | n.app_name,
44 | notifbox_color
45 | )
46 | )
47 | end
48 |
49 | local notifbox_add_expired = function(n, notif_icon, notifbox_color)
50 | n:connect_signal(
51 | 'destroyed',
52 | function(self, reason, keep_visble)
53 | if reason == 1 then
54 | notifbox_add(n, notif_icon, notifbox_color)
55 | end
56 | end
57 | )
58 | end
59 |
60 | naughty.connect_signal(
61 | 'request::display',
62 | function(n)
63 | local notifbox_color = beautiful.xcolor0
64 | if n.urgency == 'critical' then
65 | notifbox_color = n.bg .. '66'
66 | end
67 |
68 | local notif_icon = n.icon or n.app_icon
69 | if not notif_icon then
70 | notif_icon = gears.color.recolor_image(beautiful.notification_icon, beautiful.xcolor4)
71 | end
72 |
73 | notifbox_add_expired(n, notif_icon, notifbox_color)
74 | end
75 | )
76 |
77 | return notif_core
78 |
--------------------------------------------------------------------------------
/config-s4vi/awesome/theme/assets/icons/volume.svg:
--------------------------------------------------------------------------------
1 |
2 |
58 |
--------------------------------------------------------------------------------
/config-s4vi/nvim/lua/plugins/configs/telescope.lua:
--------------------------------------------------------------------------------
1 | local present, telescope = pcall(require, "telescope")
2 |
3 | if not present then
4 | return
5 | end
6 |
7 | local default = {
8 | defaults = {
9 | vimgrep_arguments = {
10 | "rg",
11 | "--color=never",
12 | "--no-heading",
13 | "--with-filename",
14 | "--line-number",
15 | "--column",
16 | "--smart-case",
17 | },
18 | prompt_prefix = " ",
19 | selection_caret = " ",
20 | entry_prefix = " ",
21 | initial_mode = "insert",
22 | selection_strategy = "reset",
23 | sorting_strategy = "ascending",
24 | layout_strategy = "horizontal",
25 | layout_config = {
26 | horizontal = {
27 | prompt_position = "top",
28 | preview_width = 0.55,
29 | results_width = 0.8,
30 | },
31 | vertical = {
32 | mirror = false,
33 | },
34 | width = 0.87,
35 | height = 0.80,
36 | preview_cutoff = 120,
37 | },
38 | file_sorter = require("telescope.sorters").get_fuzzy_file,
39 | file_ignore_patterns = { "node_modules" },
40 | generic_sorter = require("telescope.sorters").get_generic_fuzzy_sorter,
41 | path_display = { "truncate" },
42 | winblend = 0,
43 | border = {},
44 | borderchars = { "─", "│", "─", "│", "╭", "╮", "╯", "╰" },
45 | color_devicons = true,
46 | use_less = true,
47 | set_env = { ["COLORTERM"] = "truecolor" }, -- default = nil,
48 | file_previewer = require("telescope.previewers").vim_buffer_cat.new,
49 | grep_previewer = require("telescope.previewers").vim_buffer_vimgrep.new,
50 | qflist_previewer = require("telescope.previewers").vim_buffer_qflist.new,
51 | -- Developer configurations: Not meant for general override
52 | buffer_previewer_maker = require("telescope.previewers").buffer_previewer_maker,
53 | },
54 | }
55 |
56 | local M = {}
57 | M.setup = function(override_flag)
58 | if override_flag then
59 | default = require("core.utils").tbl_override_req("telescope", default)
60 | end
61 |
62 | telescope.setup(default)
63 |
64 | local extensions = { "themes", "terms" }
65 |
66 | pcall(function()
67 | for _, ext in ipairs(extensions) do
68 | telescope.load_extension(ext)
69 | end
70 | end)
71 | end
72 |
73 | return M
74 |
--------------------------------------------------------------------------------
/config-s4vi/awesome/theme/assets/icons/brightness.svg:
--------------------------------------------------------------------------------
1 |
2 |
58 |
--------------------------------------------------------------------------------
/config-s4vi/awesome/module/bling/widget/tabbar/default.lua:
--------------------------------------------------------------------------------
1 | local gears = require("gears")
2 | local wibox = require("wibox")
3 |
4 | local beautiful = require("beautiful")
5 |
6 | local bg_normal = beautiful.tabbar_bg_normal or beautiful.bg_normal or "#ffffff"
7 | local fg_normal = beautiful.tabbar_fg_normal or beautiful.fg_normal or "#000000"
8 | local bg_focus = beautiful.tabbar_bg_focus or beautiful.bg_focus or "#000000"
9 | local fg_focus = beautiful.tabbar_fg_focus or beautiful.fg_focus or "#ffffff"
10 | local bg_focus_inactive = beautiful.tabbar_bg_focus_inactive or bg_focus
11 | local fg_focus_inactive = beautiful.tabbar_fg_focus_inactive or fg_focus
12 | local bg_normal_inactive = beautiful.tabbar_bg_normal_inactive or bg_normal
13 | local fg_normal_inactive = beautiful.tabbar_fg_normal_inactive or fg_normal
14 | local font = beautiful.tabbar_font or beautiful.font or "Hack 15"
15 | local size = beautiful.tabbar_size or 20
16 | local position = beautiful.tabbar_position or "top"
17 |
18 | local function create(c, focused_bool, buttons, inactive_bool)
19 | local flexlist = wibox.layout.flex.horizontal()
20 | local title_temp = c.name or c.class or "-"
21 | local bg_temp = inactive_bool and bg_normal_inactive or bg_normal
22 | local fg_temp = inactive_bool and fg_normal_inactive or fg_normal
23 | if focused_bool then
24 | bg_temp = inactive_bool and bg_focus_inactive or bg_focus
25 | fg_temp = inactive_bool and fg_focus_inactive or fg_focus
26 | end
27 | local text_temp = wibox.widget.textbox()
28 | text_temp.align = "center"
29 | text_temp.valign = "center"
30 | text_temp.font = font
31 | text_temp.markup = ""
34 | .. title_temp
35 | .. ""
36 | c:connect_signal("property::name", function(_)
37 | local title_temp = c.name or c.class or "-"
38 | text_temp.markup = ""
41 | .. title_temp
42 | .. ""
43 | end)
44 | local wid_temp = wibox.widget({
45 | text_temp,
46 | buttons = buttons,
47 | bg = bg_temp,
48 | widget = wibox.container.background(),
49 | })
50 | return wid_temp
51 | end
52 |
53 | return {
54 | layout = wibox.layout.flex.horizontal,
55 | create = create,
56 | position = position,
57 | size = size,
58 | bg_normal = bg_normal,
59 | bg_focus = bg_focus,
60 | }
61 |
--------------------------------------------------------------------------------
/config-s4vi/nvim/lua/plugins/configs/cmp.lua:
--------------------------------------------------------------------------------
1 | local present, cmp = pcall(require, "cmp")
2 |
3 | if not present then
4 | return
5 | end
6 |
7 | vim.opt.completeopt = "menuone,noselect"
8 |
9 | local default = {
10 | snippet = {
11 | expand = function(args)
12 | require("luasnip").lsp_expand(args.body)
13 | end,
14 | },
15 | formatting = {
16 | format = function(entry, vim_item)
17 | local icons = require "plugins.configs.lspkind_icons"
18 | vim_item.kind = string.format("%s %s", icons[vim_item.kind], vim_item.kind)
19 |
20 | vim_item.menu = ({
21 | nvim_lsp = "[LSP]",
22 | nvim_lua = "[Lua]",
23 | buffer = "[BUF]",
24 | })[entry.source.name]
25 |
26 | return vim_item
27 | end,
28 | },
29 | mapping = {
30 | [""] = cmp.mapping.select_prev_item(),
31 | [""] = cmp.mapping.select_next_item(),
32 | [""] = cmp.mapping.scroll_docs(-4),
33 | [""] = cmp.mapping.scroll_docs(4),
34 | [""] = cmp.mapping.complete(),
35 | [""] = cmp.mapping.close(),
36 | [""] = cmp.mapping.confirm {
37 | behavior = cmp.ConfirmBehavior.Replace,
38 | select = true,
39 | },
40 | [""] = cmp.mapping(function(fallback)
41 | if cmp.visible() then
42 | cmp.select_next_item()
43 | elseif require("luasnip").expand_or_jumpable() then
44 | vim.fn.feedkeys(vim.api.nvim_replace_termcodes("luasnip-expand-or-jump", true, true, true), "")
45 | else
46 | fallback()
47 | end
48 | end, { "i", "s" }),
49 | [""] = cmp.mapping(function(fallback)
50 | if cmp.visible() then
51 | cmp.select_prev_item()
52 | elseif require("luasnip").jumpable(-1) then
53 | vim.fn.feedkeys(vim.api.nvim_replace_termcodes("luasnip-jump-prev", true, true, true), "")
54 | else
55 | fallback()
56 | end
57 | end, { "i", "s" }),
58 | },
59 | sources = {
60 | { name = "nvim_lsp" },
61 | { name = "luasnip" },
62 | { name = "buffer" },
63 | { name = "nvim_lua" },
64 | { name = "path" },
65 | },
66 | }
67 |
68 | local M = {}
69 | M.setup = function(override_flag)
70 | if override_flag then
71 | default = require("core.utils").tbl_override_req("nvim_cmp", default)
72 | end
73 | cmp.setup(default)
74 | end
75 |
76 | return M
77 |
--------------------------------------------------------------------------------
/config-s4vi/awesome/configuration/init.lua:
--------------------------------------------------------------------------------
1 | -- Standard awesome library
2 | local awful = require("awful")
3 | local gears = require("gears")
4 | local gfs = gears.filesystem
5 | local wibox = require("wibox")
6 |
7 | -- Theme handling library
8 | local beautiful = require("beautiful")
9 |
10 | -- Helpers
11 | local helpers = require("helpers")
12 |
13 | -- Bling Module
14 | local bling = require("module.bling")
15 |
16 | -- Layout Machi
17 | local machi = require("module.layout-machi")
18 | beautiful.layout_machi = machi.get_icon()
19 |
20 | -- This is to slave windows' positions in floating layout
21 | require("module.savefloats")
22 |
23 | -- Better mouse resizing on tiled
24 | require("module.better-resize")
25 |
26 |
27 | -- Desktop
28 | -------------
29 |
30 | -- Custom Layouts
31 | local mstab = bling.layout.mstab
32 | local centered = bling.layout.centered
33 | local horizontal = bling.layout.horizontal
34 | local equal = bling.layout.equalarea
35 | local deck = bling.layout.deck
36 |
37 | machi.editor.nested_layouts = {
38 | ["0"] = deck,
39 | ["1"] = awful.layout.suit.spiral,
40 | ["2"] = awful.layout.suit.fair,
41 | ["3"] = awful.layout.suit.fair.horizontal
42 | }
43 |
44 | -- Set the layouts
45 | tag.connect_signal("request::default_layouts", function()
46 | awful.layout.append_default_layouts({
47 | awful.layout.suit.tile, awful.layout.suit.floating, centered, mstab,
48 | horizontal, machi.default_layout, equal, deck
49 | })
50 | end)
51 |
52 | -- Screen Padding and Tags
53 | screen.connect_signal("request::desktop_decoration", function(s)
54 | -- Screen padding
55 | screen[s].padding = {left = dpi(40), right = dpi(15), top = dpi(15), bottom = dpi(15)}
56 | -- Each screen has its own tag table.
57 | awful.tag({"1", "2", "3", "4", "5"}, s, awful.layout.layouts[1])
58 | end)
59 |
60 | -- Wallpapers
61 | -- set wallpapers
62 | awful.screen.connect_for_each_screen(function(s)
63 | -- gears.wallpaper.maximized(beautiful.wallpaper, s, false, nil)
64 | gears.wallpaper.set(beautiful.xcolor8)
65 | end)
66 |
67 | -- Set Tile Wallpaper
68 | -- bling.module.tiled_wallpaper("", s, {
69 | -- fg = beautiful.lighter_bg,
70 | -- bg = beautiful.xbackground,
71 | -- offset_y = 6,
72 | -- offset_x = 18,
73 | -- font = "Iosevka",
74 | -- font_size = 17,
75 | -- padding = 70,
76 | -- zickzack = true
77 | -- })
78 |
79 |
80 | -- Stuff
81 | -----------
82 |
83 | require("configuration.keys")
84 | require("configuration.ruled")
85 | require("configuration.extras")
86 | require("configuration.menu")
87 |
--------------------------------------------------------------------------------
/config-s4vi/nvim/lua/plugins/configs/alpha.lua:
--------------------------------------------------------------------------------
1 | local present, alpha = pcall(require, "alpha")
2 |
3 | if not present then
4 | return
5 | end
6 |
7 | local function button(sc, txt, keybind)
8 | local sc_ = sc:gsub("%s", ""):gsub("SPC", "")
9 |
10 | local opts = {
11 | position = "center",
12 | text = txt,
13 | shortcut = sc,
14 | cursor = 5,
15 | width = 36,
16 | align_shortcut = "right",
17 | hl = "AlphaButtons",
18 | }
19 |
20 | if keybind then
21 | opts.keymap = { "n", sc_, keybind, { noremap = true, silent = true } }
22 | end
23 |
24 | return {
25 | type = "button",
26 | val = txt,
27 | on_press = function()
28 | local key = vim.api.nvim_replace_termcodes(sc_, true, false, true)
29 | vim.api.nvim_feedkeys(key, "normal", false)
30 | end,
31 | opts = opts,
32 | }
33 | end
34 |
35 | local default = {}
36 |
37 | default.ascii = {
38 | " ⣴⣶⣤⡤⠦⣤⣀⣤⠆ ⣈⣭⣿⣶⣿⣦⣼⣆ ",
39 | " ⠉⠻⢿⣿⠿⣿⣿⣶⣦⠤⠄⡠⢾⣿⣿⡿⠋⠉⠉⠻⣿⣿⡛⣦ ",
40 | " ⠈⢿⣿⣟⠦ ⣾⣿⣿⣷ ⠻⠿⢿⣿⣧⣄ ",
41 | " ⣸⣿⣿⢧ ⢻⠻⣿⣿⣷⣄⣀⠄⠢⣀⡀⠈⠙⠿⠄ ",
42 | " ⢠⣿⣿⣿⠈ ⣻⣿⣿⣿⣿⣿⣿⣿⣛⣳⣤⣀⣀ ",
43 | " ⢠⣧⣶⣥⡤⢄ ⣸⣿⣿⠘ ⢀⣴⣿⣿⡿⠛⣿⣿⣧⠈⢿⠿⠟⠛⠻⠿⠄ ",
44 | " ⣰⣿⣿⠛⠻⣿⣿⡦⢹⣿⣷ ⢊⣿⣿⡏ ⢸⣿⣿⡇ ⢀⣠⣄⣾⠄ ",
45 | " ⣠⣿⠿⠛ ⢀⣿⣿⣷⠘⢿⣿⣦⡀ ⢸⢿⣿⣿⣄ ⣸⣿⣿⡇⣪⣿⡿⠿⣿⣷⡄ ",
46 | " ⠙⠃ ⣼⣿⡟ ⠈⠻⣿⣿⣦⣌⡇⠻⣿⣿⣷⣿⣿⣿ ⣿⣿⡇ ⠛⠻⢷⣄ ",
47 | " ⢻⣿⣿⣄ ⠈⠻⣿⣿⣿⣷⣿⣿⣿⣿⣿⡟ ⠫⢿⣿⡆ ",
48 | " ⠻⣿⣿⣿⣿⣶⣶⣾⣿⣿⣿⣿⣿⣿⣿⣿⡟⢀⣀⣤⣾⡿⠃ ",
49 | }
50 |
51 | default.header = {
52 | type = "text",
53 | val = default.ascii,
54 | opts = {
55 | position = "center",
56 | hl = "AlphaHeader",
57 | },
58 | }
59 |
60 | default.buttons = {
61 | type = "group",
62 | val = {
63 | button("SPC f f", " Find File ", ":Telescope find_files"),
64 | button("SPC f o", " Recent File ", ":Telescope oldfiles"),
65 | button("SPC f w", " Find Word ", ":Telescope live_grep"),
66 | button("SPC b m", " Bookmarks ", ":Telescope marks"),
67 | button("SPC t h", " Themes ", ":Telescope themes"),
68 | button("SPC e s", " Settings", ":e $MYVIMRC | :cd %:p:h "),
69 | },
70 | opts = {
71 | spacing = 1,
72 | },
73 | }
74 |
75 | local M = {}
76 |
77 | M.setup = function(override_flag)
78 | if override_flag then
79 | default = require("core.utils").tbl_override_req("alpha", default)
80 | end
81 | alpha.setup {
82 | layout = {
83 | { type = "padding", val = 9 },
84 | default.header,
85 | { type = "padding", val = 2 },
86 | default.buttons,
87 | },
88 | opts = {},
89 | }
90 | end
91 |
92 | return M
93 |
--------------------------------------------------------------------------------
/config-s4vi/awesome/module/bling/layout/equalarea.lua:
--------------------------------------------------------------------------------
1 | local math = math
2 | local screen = screen
3 | local mylayout = {}
4 | mylayout.name = "equalarea"
5 |
6 | local function divide(p, g, low, high, cls, mwfact, mcount)
7 | if low == high then
8 | p.geometries[cls[low]] = g
9 | else
10 | local masters = math.max(0, math.min(mcount, high) - low + 1)
11 | local numblock = high - low + 1
12 | local slaves = numblock - masters
13 | local smalldiv
14 | if numblock > 5 and (numblock % 5) == 0 then
15 | smalldiv = math.floor(numblock / 5)
16 | else
17 | if (numblock % 3) == 0 then
18 | smalldiv = math.floor(numblock / 3)
19 | else
20 | smalldiv = math.floor(numblock / 2)
21 | end
22 | end
23 | local bigdiv = numblock - smalldiv
24 | local smallmasters = math.min(masters, smalldiv)
25 | local bigmasters = masters - smallmasters
26 | local smallg = {}
27 | local bigg = {}
28 | smallg.x = g.x
29 | smallg.y = g.y
30 | if g.width > (g.height * 1.3) then
31 | smallg.height = g.height
32 | bigg.height = g.height
33 | bigg.width = math.floor(
34 | g.width
35 | * (bigmasters * (mwfact - 1) + bigdiv)
36 | / (slaves + mwfact * masters)
37 | )
38 | smallg.width = g.width - bigg.width
39 | bigg.y = g.y
40 | bigg.x = g.x + smallg.width
41 | else
42 | smallg.width = g.width
43 | bigg.width = g.width
44 | bigg.height = math.floor(
45 | g.height
46 | * (bigmasters * (mwfact - 1) + bigdiv)
47 | / (slaves + mwfact * masters)
48 | )
49 | smallg.height = g.height - bigg.height
50 | bigg.x = g.x
51 | bigg.y = g.y + smallg.height
52 | end
53 | divide(p, smallg, low, high - bigdiv, cls, mwfact, mcount)
54 | divide(p, bigg, low + smalldiv, high, cls, mwfact, mcount)
55 | end
56 | return
57 | end
58 |
59 | function mylayout.arrange(p)
60 | local t = p.tag or screen[p.screen].selected_tag
61 | local wa = p.workarea
62 | local cls = p.clients
63 |
64 | if #cls == 0 then
65 | return
66 | end
67 | local mwfact = t.master_width_factor * 2
68 | local mcount = t.master_count
69 | local g = {}
70 | g.height = wa.height
71 | g.width = wa.width
72 | g.x = wa.x
73 | g.y = wa.y
74 | divide(p, g, 1, #cls, cls, mwfact, mcount)
75 | end
76 |
77 | return mylayout
78 |
--------------------------------------------------------------------------------
/config-s4vi/awesome/ui/widgets/analog_clock.lua:
--------------------------------------------------------------------------------
1 | -- Standard awesome library
2 | local gears = require("gears")
3 | local wibox = require("wibox")
4 | local math = require("math")
5 |
6 | -- Theme handling library
7 | local beautiful = require("beautiful")
8 |
9 | -- C libraries
10 | local cairo = require("lgi").cairo
11 |
12 | -- Analog clock
13 | ------------------
14 | -- Stolen from No37
15 |
16 | local function create_minute_pointer(minute)
17 | local img = cairo.ImageSurface(cairo.Format.ARGB32, 1000, 1000)
18 | local cr = cairo.Context(img)
19 | local angle = (minute / 60) * 2 * math.pi
20 | cr:translate(500, 500)
21 | cr:rotate(angle)
22 | cr:translate(-500, -500)
23 | cr:set_source(gears.color(beautiful.xforeground))
24 | cr:rectangle(485, 100, 30, 420)
25 | cr:fill()
26 | return img
27 | end
28 |
29 | local function create_hour_pointer(hour)
30 | local img = cairo.ImageSurface(cairo.Format.ARGB32, 1000, 1000)
31 | local cr = cairo.Context(img)
32 | local angle = ((hour % 12) / 12) * 2 * math.pi
33 | cr:translate(500, 500)
34 | cr:rotate(angle)
35 | cr:translate(-500, -500)
36 | cr:set_source(gears.color(beautiful.xcolor4))
37 | cr:rectangle(480, 200, 40, 320)
38 | cr:fill()
39 | return img
40 | end
41 |
42 | local minute_pointer = create_minute_pointer(37)
43 | local hour_pointer = create_hour_pointer(17)
44 |
45 | local minute_pointer_img = wibox.widget.imagebox()
46 | local hour_pointer_img = wibox.widget.imagebox()
47 |
48 | local analog_clock = wibox.widget {
49 | { -- circle
50 | wibox.widget.textbox(""),
51 | shape = function(cr, width, height) gears.shape.circle(cr, width, height, height / 2) end,
52 | shape_border_width = 4,
53 | shape_border_color = beautiful.xcolor8,
54 | bg = "alpha",
55 | widget = wibox.container.background
56 | },
57 | minute_pointer_img,
58 | hour_pointer_img,
59 | layout = wibox.layout.stack
60 | }
61 |
62 | local minute = 0
63 | local hour = 0
64 |
65 | gears.timer {
66 | timeout = 30,
67 | call_now = true,
68 | autostart = true,
69 | callback = function()
70 | minute = os.date("%M")
71 | hour = os.date("%H")
72 | minute_pointer = create_minute_pointer(minute)
73 | hour_pointer = create_hour_pointer(hour + (minute / 60))
74 | minute_pointer_img.image = minute_pointer
75 | hour_pointer_img.image = hour_pointer
76 | end
77 | }
78 |
79 | return analog_clock
80 |
--------------------------------------------------------------------------------
/config-s4vi/awesome/module/bling/layout/centered.lua:
--------------------------------------------------------------------------------
1 | local awful = require("awful")
2 | local math = math
3 |
4 | local mylayout = {}
5 |
6 | mylayout.name = "centered"
7 |
8 | function mylayout.arrange(p)
9 | local area = p.workarea
10 | local t = p.tag or screen[p.screen].selected_tag
11 | local nmaster = math.min(t.master_count, #p.clients)
12 | local nslaves = #p.clients - nmaster
13 |
14 | local master_area_width = area.width * t.master_width_factor
15 | if t.master_count == 0 then master_area_width = 0 end
16 | local slave_width = 0.5 * (area.width - master_area_width)
17 | local master_area_x = area.x + slave_width
18 |
19 |
20 | -- Special case: few slaves -> make masters take more space - unless requested otherwise!
21 | if nslaves < 2 and t.master_fill_policy ~= "master_width_factor" then
22 | master_area_x = area.x
23 |
24 | if nslaves == 1 then
25 | slave_width = area.width - master_area_width
26 | else
27 | master_area_width = area.width
28 | end
29 | end
30 |
31 |
32 | -- iterate through masters
33 | for idx = 1, nmaster do
34 | local c = p.clients[idx]
35 | local g
36 | g = {
37 | x = master_area_x,
38 | y = area.y + (nmaster - idx) * (area.height / nmaster),
39 | width = master_area_width,
40 | height = area.height / nmaster,
41 | }
42 | p.geometries[c] = g
43 | end
44 |
45 |
46 | -- iterate through slaves
47 | local number_of_left_sided_slaves = math.floor(nslaves / 2)
48 | local number_of_right_sided_slaves = nslaves - number_of_left_sided_slaves
49 | local left_iterator = 0
50 | local right_iterator = 0
51 |
52 | for idx = 1, nslaves do
53 | local c = p.clients[idx + nmaster]
54 | local g
55 | if idx % 2 == 0 then
56 | g = {
57 | x = area.x,
58 | y = area.y
59 | + left_iterator
60 | * (area.height / number_of_left_sided_slaves),
61 | width = slave_width,
62 | height = area.height / number_of_left_sided_slaves,
63 | }
64 | left_iterator = left_iterator + 1
65 | else
66 | g = {
67 | x = master_area_x + master_area_width,
68 | y = area.y
69 | + right_iterator
70 | * (area.height / number_of_right_sided_slaves),
71 | width = slave_width,
72 | height = area.height / number_of_right_sided_slaves,
73 | }
74 | right_iterator = right_iterator + 1
75 | end
76 | p.geometries[c] = g
77 | end
78 | end
79 |
80 | return mylayout
81 |
--------------------------------------------------------------------------------
/config-s4vi/awesome/ui/dashboard/mediakeys.lua:
--------------------------------------------------------------------------------
1 | -- Standard awesome library
2 | local gears = require("gears")
3 | local awful = require("awful")
4 |
5 | -- Theme handling library
6 | local beautiful = require("beautiful")
7 | local dpi = beautiful.xresources.apply_dpi
8 |
9 | -- Widget library
10 | local wibox = require("wibox")
11 |
12 | -- Helpers
13 | local helpers = require("helpers")
14 |
15 |
16 | -- Media Keys
17 | ---------------
18 |
19 | --playerctl
20 | local playerctl = require("module.bling").signal.playerctl.lib()
21 |
22 | -- Helpers
23 | local create_media_button = function(symbol, color, command, playpause)
24 |
25 | local icon = wibox.widget{
26 | markup = helpers.colorize_text(symbol, color),
27 | font = beautiful.icon_font_name .. "16",
28 | align = "center",
29 | valign = "center",
30 | widget = wibox.widget.textbox()
31 | }
32 |
33 | playerctl:connect_signal("playback_status", function(_, playing, __)
34 | if playpause then
35 | if playing then
36 | icon:set_markup_silently(helpers.colorize_text("", color))
37 | else
38 | icon:set_markup_silently(helpers.colorize_text("", color))
39 | end
40 | end
41 | end)
42 |
43 | icon:buttons(gears.table.join(awful.button({}, 1, function() command() end)))
44 |
45 | icon:connect_signal("mouse::enter", function()
46 | icon.markup = helpers.colorize_text(icon.text, beautiful.xcolor15)
47 | end)
48 |
49 | icon:connect_signal("mouse::leave", function()
50 | icon.markup = helpers.colorize_text(icon.text, color)
51 | end)
52 |
53 | return icon
54 | end
55 |
56 | -- Widget
57 | local media_play_command = function() playerctl:play_pause() end
58 | local media_prev_command = function() playerctl:previous() end
59 | local media_next_command = function() playerctl:next() end
60 |
61 | local media_play = create_media_button("", beautiful.xforeground, media_play_command, true)
62 | local media_prev = create_media_button("", beautiful.xforeground, media_prev_command, false)
63 | local media_next = create_media_button("", beautiful.xforeground, media_next_command, false)
64 |
65 | local media = wibox.widget{
66 | {
67 | {
68 | {
69 | media_prev,
70 | media_play,
71 | media_next,
72 | expand = "none",
73 | layout = wibox.layout.align.vertical
74 | },
75 | margins = dpi(9),
76 | widget = wibox.container.margin
77 | },
78 | bg = beautiful.dashboard_box_bg,
79 | shape = helpers.rrect(5),
80 | forced_width = dpi(40),
81 | forced_height = dpi(120),
82 | widget = wibox.container.background
83 | },
84 | margins = dpi(10),
85 | widget = wibox.container.margin
86 | }
87 |
88 | return media
89 |
--------------------------------------------------------------------------------
/config-s4vi/awesome/theme/picom.conf:
--------------------------------------------------------------------------------
1 | #========================= Corners =========================#
2 | corner-radius = 12;
3 | rounded-corners-exclude = [
4 | # "!window_type = 'normal'",
5 | # "class_g ?= 'rofi'",
6 | ];
7 |
8 | round-borders = 1;
9 | round-borders-exclude = [
10 | #"class_g = 'TelegramDesktop'",
11 | ];
12 |
13 | #========================= Shadows =========================#
14 | shadow = true;
15 | shadow-radius = 14;
16 | shadow-opacity = 0.50;
17 | shadow-offset-x = -14;
18 | shadow-offset-y = -14;
19 |
20 | shadow-exclude = [
21 | "class_g = 'slop'",
22 | "window_type = 'menu'",
23 | "window_type = 'desktop'",
24 | "class_g = 'Firefox' && window_type *= 'utility'",
25 | "_GTK_FRAME_EXTENTS@:c"
26 | ];
27 |
28 | #========================= Fading =========================#
29 | fading = true;
30 | fade-in-step = 0.03;
31 | fade-out-step = 0.03;
32 | fade-delta = 5;
33 |
34 | no-fading-openclose = false
35 | no-fading-destroyed-argb = true
36 |
37 | fade-exclude = [
38 | "class_g = 'slop'" # maim
39 | ]
40 |
41 | #========================= Opacity =========================#
42 | inactive-opacity = 1;
43 | frame-opacity = 1;
44 | inactive-opacity-override = false;
45 | active-opacity = 1.0;
46 | inactive-dim = 0.0;
47 |
48 | focus-exclude = [
49 | "class_g = 'Cairo-clock'",
50 | "class_g ?= 'rofi'",
51 | "class_g ?= 'slop'"
52 | ];
53 |
54 | opacity-rule = [
55 | "85:class_g = 'splash'"
56 | ];
57 |
58 | #========================= Blurring =========================#
59 | blur: {
60 | method = "dual_kawase";
61 | strength = 5.0;
62 | deviation = 1.0;
63 | kernel = "11x11gaussian";
64 | }
65 |
66 | blur-background = false;
67 | blur-background-frame = true;
68 | blur-background-fixed = true;
69 |
70 | blur-background-exclude = [
71 | "class_g = 'slop'",
72 | "class_g = 'Firefox' && argb",
73 | "_GTK_FRAME_EXTENTS@:c"
74 | ];
75 |
76 | #========================= General Settings =========================#
77 | backend = "glx";
78 | vsync = true;
79 | daemon = false;
80 | dbus = false;
81 | mark-wmwin-focused = true;
82 | mark-ovredir-focused = true;
83 | detect-rounded-corners = true;
84 | detect-client-opacity = true;
85 | detect-client-leader = true;
86 | detect-transient = true;
87 | glx-no-stencil = true;
88 | use-damage = true;
89 | resize-damage = 1;
90 | transparent-clipping = false;
91 |
92 | wintypes:
93 | {
94 | tooltip = { fade = true; shadow = false; focus = true; };
95 | menu = { full-shadow = true;};
96 | popup_menu = { full-shadow = true;};
97 | utility = {full-shadow = true;};
98 | toolbar = {full-shadow = true;};
99 | normal = {full-shadow = true;};
100 | notification = {full-shadow = true;};
101 | dialog = {full-shadow = true};
102 | dock = {full-shadow = true;};
103 | dropdown_menu = { full-shadow = true;};
104 | };
105 |
--------------------------------------------------------------------------------
/config-s4vi/awesome/module/bling/bling-dev-1.rockspec:
--------------------------------------------------------------------------------
1 | package = "bling"
2 | version = "dev-1"
3 |
4 | source = {
5 | url = "git://github.com/BlingCorp/bling",
6 | branch = "master",
7 | }
8 |
9 | description = {
10 | summary = "Utilities for the AwesomeWM",
11 | detailed = [[
12 | This module extends the Awesome window manager with alternative layouts,
13 | flash focus, tabbing, a simple tiling wallpaper generator, a declarative
14 | wallpaper setter, window swallowing and a playerctl signal.
15 | ]],
16 | homepage = "https://github.com/BlingCorp/bling",
17 | license = "MIT",
18 | }
19 |
20 | dependencies = {
21 | "lua >= 5.1",
22 | }
23 |
24 | build = {
25 | type = "builtin",
26 | modules = {
27 | ["bling"] = "init.lua",
28 | ["bling.helpers"] = "helpers/init.lua",
29 | ["bling.helpers.client"] = "helpers/client.lua",
30 | ["bling.helpers.color"] = "helpers/color.lua",
31 | ["bling.helpers.filesystem"] = "helpers/filesystem.lua",
32 | ["bling.helpers.shape"] = "helpers/shape.lua",
33 | ["bling.helpers.time"] = "helpers/time.lua",
34 | ["bling.layout"] = "layout/init.lua",
35 | ["bling.layout.centered"] = "layout/centered.lua",
36 | ["bling.layout.deck"] = "layout/deck.lua",
37 | ["bling.layout.equalarea"] = "layout/equalarea.lua",
38 | ["bling.layout.horizontal"] = "layout/horizontal.lua",
39 | ["bling.layout.mstab"] = "layout/mstab.lua",
40 | ["bling.layout.vertical"] = "layout/vertical.lua",
41 | ["bling.module"] = "module/init.lua",
42 | ["bling.module.flash_focus"] = "module/flash_focus.lua",
43 | ["bling.module.scratchpad"] = "module/scratchpad.lua",
44 | ["bling.module.tabbed"] = "module/tabbed.lua",
45 | ["bling.module.tiled_wallpaper"] = "module/tiled_wallpaper.lua",
46 | ["bling.module.wallpaper"] = "module/wallpaper.lua",
47 | ["bling.module.window_swallowing"] = "module/window_swallowing.lua",
48 | ["bling.signal"] = "signal/init.lua",
49 | ["bling.signal.playerctl"] = "signal/playerctl/init.lua",
50 | ["bling.signal.playerctl.playerctl_cli"] = "signal/playerctl/playerctl_cli.lua",
51 | ["bling.signal.playerctl.playerctl_lib"] = "signal/playerctl/playerctl_lib.lua",
52 | ["bling.widget"] = "widget/init.lua",
53 | ["bling.widget.tabbar.boxes"] = "widget/tabbar/boxes.lua",
54 | ["bling.widget.tabbar.default"] = "widget/tabbar/default.lua",
55 | ["bling.widget.tabbar.modern"] = "widget/tabbar/modern.lua",
56 | ["bling.widget.tabbed_misc"] = "widget/tabbed_misc/init.lua",
57 | ["bling.widget.tabbed_misc.custom_tasklist"] = "widget/tabbed_misc/custom_tasklist.lua",
58 | ["bling.widget.tabbed_misc.titlebar_indicator"] = "widget/tabbed_misc/titlebar_indicator.lua",
59 | ["bling.widget.tag_preview"] = "widget/tag_preview.lua",
60 | ["bling.widget.task_preview"] = "widget/task_preview.lua",
61 | ["bling.widget.window_switcher"] = "widget/window_switcher.lua",
62 | },
63 | }
64 |
--------------------------------------------------------------------------------
/config-s4vi/awesome/ui/notifs/notif-center/dont-disturb/init.lua:
--------------------------------------------------------------------------------
1 | local awful = require('awful')
2 | local naughty = require('naughty')
3 | local wibox = require('wibox')
4 | local gears = require('gears')
5 | local beautiful = require('beautiful')
6 |
7 | local dpi = beautiful.xresources.apply_dpi
8 | local button_container = require('ui.widgets.button')
9 |
10 | local config_dir = gears.filesystem.get_configuration_dir()
11 | local widget_dir = config_dir .. 'ui/notifs/notif-center/dont-disturb/'
12 |
13 | _G.dont_disturb = false
14 |
15 | local dont_disturb_icon = wibox.widget {
16 | {
17 | id = 'icon',
18 | markup = "",
19 | font = beautiful.icon_font_name .. "Round 16",
20 | align = "center",
21 | valign = "center",
22 | widget = wibox.widget.textbox
23 | },
24 | layout = wibox.layout.fixed.horizontal
25 | }
26 |
27 | local function update_icon()
28 |
29 | local widget_icon_name = nil
30 | local dd_icon = dont_disturb_icon.icon
31 |
32 | if dont_disturb then
33 | widget_icon_name = 'toggled-on'
34 | dd_icon:set_markup_silently("")
35 | else
36 | widget_icon_name = 'toggled-off'
37 | dd_icon:set_markup_silently("")
38 | end
39 | end
40 |
41 | local check_disturb_status = function()
42 |
43 | awful.spawn.easy_async_with_shell(
44 | 'cat ' .. widget_dir .. 'disturb_status',
45 | function(stdout)
46 |
47 | local status = stdout
48 |
49 | if status:match('true') then
50 | dont_disturb = true
51 | elseif status:match('false') then
52 | dont_disturb = false
53 | else
54 | dont_disturb = false
55 | awful.spawn.with_shell('echo "false" > ' .. widget_dir .. 'disturb_status')
56 | end
57 |
58 | update_icon()
59 | end
60 | )
61 | end
62 |
63 | check_disturb_status()
64 |
65 | local toggle_disturb = function()
66 | if dont_disturb then
67 | dont_disturb = false
68 | else
69 | dont_disturb = true
70 | end
71 | awful.spawn.with_shell('echo "' .. tostring(dont_disturb) .. '" > ' .. widget_dir .. 'disturb_status')
72 | update_icon()
73 | end
74 |
75 | local dont_disturb_button = wibox.widget {
76 | {
77 | dont_disturb_icon,
78 | margins = dpi(7),
79 | widget = wibox.container.margin
80 | },
81 | widget = button_container
82 | }
83 |
84 | dont_disturb_button:buttons(
85 | gears.table.join(
86 | awful.button(
87 | {},
88 | 1,
89 | nil,
90 | function()
91 | toggle_disturb()
92 | end
93 | )
94 | )
95 | )
96 |
97 | local dont_disturb_wrapped = wibox.widget {
98 | nil,
99 | {
100 | dont_disturb_button,
101 | bg = beautiful.xcolor0,
102 | shape = gears.shape.circle,
103 | widget = wibox.container.background
104 | },
105 | nil,
106 | expand = 'none',
107 | layout = wibox.layout.align.vertical
108 | }
109 |
110 | -- Create a notification sound
111 | naughty.connect_signal(
112 | 'request::display',
113 | function(n)
114 | if not dont_disturb then
115 | awful.spawn.with_shell('canberra-gtk-play -i message')
116 | end
117 | end
118 | )
119 |
120 | return dont_disturb_wrapped
--------------------------------------------------------------------------------
/config-s4vi/awesome/configuration/extras.lua:
--------------------------------------------------------------------------------
1 | -- Standard awesome library
2 | local awful = require("awful")
3 | require("awful.autofocus")
4 | local gears = require("gears")
5 | local gfs = gears.filesystem
6 | local naughty = require("naughty")
7 | local wibox = require("wibox")
8 |
9 | -- Theme handling library
10 | local beautiful = require("beautiful")
11 |
12 |
13 | -- Check if awesome encountered an error during startup and fell back to
14 | -- another config (This code will only ever execute for the fallback config)
15 | naughty.connect_signal("request::display_error", function(message, startup)
16 | naughty.notification {
17 | urgency = "critical",
18 | title = "Oops, an error happened" ..
19 | (startup and " during startup!" or "!"),
20 | message = message
21 | }
22 | end)
23 |
24 | client.connect_signal("request::manage", function(c)
25 | -- Add missing icon to client
26 | if not c.icon then
27 | local icon = gears.surface(beautiful.awesome_logo)
28 | c.icon = icon._native
29 | icon:finish()
30 | end
31 |
32 | -- Set the windows at the slave,
33 | if awesome.startup and not c.size_hints.user_position and
34 | not c.size_hints.program_position then
35 | -- Prevent clients from being unreachable after screen count changes.
36 | awful.placement.no_offscreen(c)
37 | end
38 | end)
39 |
40 | -- Enable sloppy focus, so that focus follows mouse.
41 | client.connect_signal("mouse::enter", function(c)
42 | c:emit_signal("request::activate", "mouse_enter", {raise = false})
43 | end)
44 |
45 | client.connect_signal("focus",
46 | function(c) c.border_color = beautiful.border_focus end)
47 |
48 | client.connect_signal("unfocus",
49 | function(c) c.border_color = beautiful.border_normal end)
50 |
51 |
52 | -- Hide all windows when a splash is shown
53 | awesome.connect_signal("widgets::splash::visibility", function(vis)
54 | local t = screen.primary.selected_tag
55 | if vis then
56 | for idx, c in ipairs(t:clients()) do c.hidden = true end
57 | else
58 | for idx, c in ipairs(t:clients()) do c.hidden = false end
59 | end
60 | end)
61 |
62 |
63 | --Bling
64 | ----------
65 |
66 | local bling = require("module.bling")
67 |
68 | bling.module.flash_focus.enable()
69 |
70 | -- Tag Preview
71 | bling.widget.tag_preview.enable {
72 | show_client_content = false,
73 | placement_fn = function(c)
74 | awful.placement.top_left(c, {
75 | margins = {
76 | top = 99,
77 | left = beautiful.wibar_width + 55
78 | }
79 | })
80 | end,
81 | scale = 0.15,
82 | honor_padding = true,
83 | honor_workarea = false,
84 | background_widget = wibox.widget {
85 | -- image = beautiful.wallpaper,
86 | -- horizontal_fit_policy = "fit",
87 | -- vertical_fit_policy = "fit",
88 | -- widget = wibox.widget.imagebox
89 | bg = beautiful.wibar_bg,
90 | widget = wibox.container.bg
91 | }
92 | }
93 |
94 | require('ui.widgets.window_switcher').enable()
95 |
96 |
97 |
--------------------------------------------------------------------------------
/config-s4vi/awesome/ui/dashboard/todo.lua:
--------------------------------------------------------------------------------
1 | -- Standard awesome library
2 | local awful = require("awful")
3 |
4 | -- Theme handling library
5 | local beautiful = require("beautiful")
6 | local dpi = beautiful.xresources.apply_dpi
7 |
8 | -- Widget library
9 | local wibox = require("wibox")
10 |
11 | -- Helpers
12 | local helpers = require("helpers")
13 |
14 |
15 | -- Todo
16 | ---------
17 |
18 | local todo_text = wibox.widget{
19 | font = beautiful.font_name .. "medium 8",
20 | markup = helpers.colorize_text("Todo", beautiful.dashboard_box_fg),
21 | valign = "center",
22 | widget = wibox.widget.textbox
23 | }
24 |
25 | local todo_badge = wibox.widget{
26 | font = beautiful.font_name .. "medium 8",
27 | markup = helpers.colorize_text("0", beautiful.xcolor1),
28 | valign = "center",
29 | widget = wibox.widget.textbox
30 | }
31 |
32 | local todo_stat = wibox.widget{
33 | colors = {beautiful.xcolor8},
34 | bg = "#1C252C",
35 | value = 5,
36 | min_value = 0,
37 | max_value = 8,
38 | thickness = dpi(8),
39 | rounded_edge = true,
40 | start_angle = math.pi * 3 / 2,
41 | widget = wibox.container.arcchart
42 | }
43 |
44 | local todo_done = wibox.widget{
45 | font = beautiful.font_name .. "bold 14",
46 | markup = "0",
47 | valign = "bottom",
48 | widget = wibox.widget.textbox
49 | }
50 |
51 | local todo_total = wibox.widget{
52 | font = beautiful.font_name .. "bold 8",
53 | markup = helpers.colorize_text("/0", beautiful.xcolor8),
54 | valign = "bottom",
55 | widget = wibox.widget.textbox
56 | }
57 |
58 | local todo = wibox.widget{
59 | {
60 | todo_text,
61 | nil,
62 | todo_badge,
63 | expand = "none",
64 | layout = wibox.layout.align.horizontal
65 | },
66 | {
67 | {
68 | {
69 | todo_stat,
70 | reflection = {horizontal = true},
71 | widget = wibox.container.mirror
72 | },
73 | {
74 | nil,
75 | {
76 | nil,
77 | {
78 | todo_done,
79 | todo_total,
80 | spacing = dpi(1),
81 | layout = wibox.layout.fixed.horizontal
82 | },
83 | expand = "none",
84 | layout = wibox.layout.align.vertical
85 | },
86 | expand = "none",
87 | layout = wibox.layout.align.horizontal
88 | },
89 | layout = wibox.layout.stack
90 | },
91 | margins = dpi(10),
92 | widget = wibox.container.margin
93 | },
94 | layout = wibox.layout.fixed.vertical
95 | }
96 |
97 | awesome.connect_signal("signal::todo", function(total, done, undone)
98 | todo_badge.markup = helpers.colorize_text("-" .. undone, beautiful.xcolor1)
99 |
100 | todo_total.markup = helpers.colorize_text("/" .. total, beautiful.xcolor8)
101 |
102 | if total == 0 then
103 | todo_badge.visible = false
104 | total = 1
105 | else
106 | todo_badge.visible = true
107 | end
108 |
109 | todo_done.markup = done
110 | todo_stat.max_value = total
111 | todo_stat.value = done
112 | end)
113 |
114 | return todo
115 |
--------------------------------------------------------------------------------
/config-s4vi/awesome/module/bling/widget/tabbar/pure.lua:
--------------------------------------------------------------------------------
1 | local awful = require("awful")
2 | local gears = require("gears")
3 | local wibox = require("wibox")
4 | local gcolor = require("gears.color")
5 | local beautiful = require("beautiful")
6 |
7 | local bg_normal = beautiful.tabbar_bg_normal or beautiful.bg_normal or "#ffffff"
8 | local fg_normal = beautiful.tabbar_fg_normal or beautiful.fg_normal or "#000000"
9 | local bg_focus = beautiful.tabbar_bg_focus or beautiful.bg_focus or "#000000"
10 | local fg_focus = beautiful.tabbar_fg_focus or beautiful.fg_focus or "#ffffff"
11 | local bg_focus_inactive = beautiful.tabbar_bg_focus_inactive or bg_focus
12 | local fg_focus_inactive = beautiful.tabbar_fg_focus_inactive or fg_focus
13 | local bg_normal_inactive = beautiful.tabbar_bg_normal_inactive or bg_normal
14 | local fg_normal_inactive = beautiful.tabbar_fg_normal_inactive or fg_normal
15 | local font = beautiful.tabbar_font or beautiful.font or "Hack 15"
16 | local size = beautiful.tabbar_size or 20
17 | local position = beautiful.tabbar_position or "top"
18 |
19 | local function create(c, focused_bool, buttons, inactive_bool)
20 | local bg_temp = inactive_bool and bg_normal_inactive or bg_normal
21 | local fg_temp = inactive_bool and fg_normal_inactive or fg_normal
22 | if focused_bool then
23 | bg_temp = inactive_bool and bg_focus_inactive or bg_focus
24 | fg_temp = inactive_bool and fg_focus_inactive or fg_focus
25 | end
26 |
27 | local wid_temp = wibox.widget({
28 | {
29 | { -- Left
30 | wibox.widget.base.make_widget(
31 | awful.titlebar.widget.iconwidget(c)
32 | ),
33 | buttons = buttons,
34 | layout = wibox.layout.fixed.horizontal,
35 | },
36 | { -- Title
37 | wibox.widget.base.make_widget(
38 | awful.titlebar.widget.titlewidget(c)
39 | ),
40 | buttons = buttons,
41 | widget = wibox.container.place,
42 | },
43 | { -- Right
44 | focused_bool and wibox.widget.base.make_widget(
45 | awful.titlebar.widget.floatingbutton(c)
46 | ) or nil,
47 | focused_bool and wibox.widget.base.make_widget(
48 | awful.titlebar.widget.stickybutton(c)
49 | ) or nil,
50 | focused_bool and wibox.widget.base.make_widget(
51 | awful.titlebar.widget.ontopbutton(c)
52 | ) or nil,
53 | focused_bool and wibox.widget.base.make_widget(
54 | awful.titlebar.widget.maximizedbutton(c)
55 | ) or nil,
56 | focused_bool and wibox.widget.base.make_widget(
57 | awful.titlebar.widget.minimizebutton(c)
58 | ) or nil,
59 | focused_bool and wibox.widget.base.make_widget(
60 | awful.titlebar.widget.closebutton(c)
61 | ) or nil,
62 | layout = wibox.layout.fixed.horizontal,
63 | },
64 | layout = wibox.layout.align.horizontal,
65 | },
66 | bg = bg_temp,
67 | fg = fg_temp,
68 | widget = wibox.container.background,
69 | })
70 |
71 | return wid_temp
72 | end
73 |
74 | return {
75 | layout = wibox.layout.flex.horizontal,
76 | create = create,
77 | position = position,
78 | size = size,
79 | bg_normal = bg_normal,
80 | bg_focus = bg_focus,
81 | }
82 |
--------------------------------------------------------------------------------
/config-s4vi/awesome/ui/notifs/notif-center/build-notifbox/notifbox-ui-elements.lua:
--------------------------------------------------------------------------------
1 | local wibox = require('wibox')
2 | local beautiful = require('beautiful')
3 | local naughty = require('naughty')
4 | local gears = require('gears')
5 |
6 | local dpi = beautiful.xresources.apply_dpi
7 | local helpers = require('helpers')
8 |
9 | local button_container = require('ui.widgets.button')
10 |
11 | local ui_notif_builder = {}
12 |
13 | -- Notification icon container
14 | ui_notif_builder.notifbox_icon = function(ico_image)
15 | local noti_icon = wibox.widget {
16 | {
17 | id = 'icon',
18 | resize = true,
19 | forced_height = dpi(25),
20 | forced_width = dpi(25),
21 | widget = wibox.widget.imagebox
22 | },
23 | layout = wibox.layout.fixed.horizontal
24 | }
25 | noti_icon.icon:set_image(ico_image)
26 | return noti_icon
27 | end
28 |
29 | -- Notification title container
30 | ui_notif_builder.notifbox_title = function(title)
31 | return wibox.widget {
32 | markup = title,
33 | font = beautiful.font_name .. 'Bold 12',
34 | align = 'left',
35 | valign = 'center',
36 | widget = wibox.widget.textbox
37 | }
38 | end
39 |
40 | -- Notification message container
41 | ui_notif_builder.notifbox_message = function(msg)
42 | return wibox.widget {
43 | markup = msg,
44 | font = beautiful.font_name .. 'medium 10',
45 | align = 'left',
46 | valign = 'center',
47 | widget = wibox.widget.textbox
48 | }
49 | end
50 |
51 | -- Notification app name container
52 | ui_notif_builder.notifbox_appname = function(app)
53 | return wibox.widget {
54 | markup = app,
55 | font = beautiful.font_name .. 'Bold 12',
56 | align = 'left',
57 | valign = 'center',
58 | widget = wibox.widget.textbox
59 | }
60 | end
61 |
62 | -- Notification actions container
63 | ui_notif_builder.notifbox_actions = function(n)
64 | actions_template = wibox.widget {
65 | notification = n,
66 | base_layout = wibox.widget {
67 | spacing = dpi(0),
68 | layout = wibox.layout.flex.horizontal
69 | },
70 | widget_template = {
71 | {
72 | {
73 | {
74 | {
75 | id = 'text_role',
76 | font = beautiful.font_name .. 'medium 10',
77 | widget = wibox.widget.textbox
78 | },
79 | widget = wibox.container.place
80 | },
81 | widget = button_container
82 | },
83 | bg = beautiful.lighter_bg,
84 | shape = gears.shape.rounded_rect,
85 | forced_height = dpi(30),
86 | widget = wibox.container.background
87 | },
88 | margins = dpi(4),
89 | widget = wibox.container.margin
90 | },
91 | style = { underline_normal = false, underline_selected = true },
92 | widget = naughty.list.actions,
93 | }
94 |
95 | return actions_template
96 | end
97 |
98 |
99 | -- Notification dismiss button
100 | ui_notif_builder.notifbox_dismiss = function()
101 |
102 | local dismiss_icon = wibox.widget {
103 | {
104 | id = 'dismiss_icon',
105 | markup = helpers.colorize_text("", beautiful.xcolor1),
106 | font = beautiful.icon_font_name .. "Round 10",
107 | align = "center",
108 | valign = "center",
109 | widget = wibox.widget.textbox
110 | },
111 | layout = wibox.layout.fixed.horizontal
112 | }
113 |
114 | local dismiss_button = wibox.widget {
115 | {
116 | dismiss_icon,
117 | margins = dpi(5),
118 | widget = wibox.container.margin
119 | },
120 | widget = button_container
121 | }
122 |
123 | local notifbox_dismiss = wibox.widget {
124 | dismiss_button,
125 | visible = false,
126 | bg = beautiful.lighter_bg,
127 | shape = gears.shape.circle,
128 | widget = wibox.container.background
129 | }
130 |
131 | return notifbox_dismiss
132 | end
133 |
134 |
135 | return ui_notif_builder
--------------------------------------------------------------------------------
/config-s4vi/awesome/ui/widgets/pacman_taglist.lua:
--------------------------------------------------------------------------------
1 | local awful = require("awful")
2 | local gears = require("gears")
3 | local gfs = gears.filesystem
4 | local wibox = require("wibox")
5 | local beautiful = require("beautiful")
6 | local xresources = require("beautiful.xresources")
7 | local dpi = xresources.apply_dpi
8 | local helpers = require("helpers")
9 |
10 | local get_taglist = function(s)
11 | -- Taglist buttons
12 | local taglist_buttons = gears.table.join(
13 | awful.button({}, 1,
14 | function(t) t:view_only() end),
15 | awful.button({modkey}, 1, function(t)
16 | if client.focus then client.focus:move_to_tag(t) end
17 | end), awful.button({}, 3, awful.tag.viewtoggle),
18 | awful.button({modkey}, 3, function(t)
19 | if client.focus then client.focus:toggle_tag(t) end
20 | end), awful.button({}, 4, function(t)
21 | awful.tag.viewnext(t.screen)
22 | end), awful.button({}, 5, function(t)
23 | awful.tag.viewprev(t.screen)
24 | end))
25 |
26 | -- The actual png icons
27 | -- I do have the svgs, but inkscape does a better job of scaling
28 | local ghost = gears.surface.load_uncached(
29 | gfs.get_configuration_dir() .. "theme/assets/icons/taglist/ghost.png")
30 | local ghost_icon = gears.color.recolor_image(ghost, beautiful.xcolor6)
31 | local dot = gears.surface.load_uncached(
32 | gfs.get_configuration_dir() .. "theme/assets/icons/taglist/dot.png")
33 | local dot_icon = gears.color.recolor_image(dot, beautiful.xcolor8)
34 | local pacman = gears.surface.load_uncached(
35 | gfs.get_configuration_dir() .. "theme/assets/icons/taglist/pacman.png")
36 | local pacman_icon = gears.color.recolor_image(pacman, beautiful.xcolor3)
37 |
38 | -- Function to update the tags
39 | local update_tags = function(self, c3)
40 | local imgbox = self:get_children_by_id('icon_role')[1]
41 | if c3.selected then
42 | imgbox.image = pacman_icon
43 | elseif #c3:clients() == 0 then
44 | imgbox.image = dot_icon
45 | else
46 | imgbox.image = ghost_icon
47 | end
48 | end
49 |
50 | local pac_taglist = awful.widget.taglist {
51 | screen = s,
52 | filter = awful.widget.taglist.filter.all,
53 | style = {
54 | shape = helpers.rrect(beautiful.border_radius)
55 | },
56 | layout = {spacing = 0, layout = wibox.layout.fixed.vertical},
57 | widget_template = {
58 | {
59 | {id = 'icon_role', widget = wibox.widget.imagebox},
60 | id = 'margin_role',
61 | margins = dpi(10),
62 | widget = wibox.container.margin
63 | },
64 | id = 'background_role',
65 | widget = wibox.container.background,
66 | create_callback = function(self, c3, index, objects)
67 | update_tags(self, c3)
68 | self:connect_signal('mouse::enter', function()
69 | if #c3:clients() > 0 then
70 | awesome.emit_signal("bling::tag_preview::update", c3)
71 | awesome.emit_signal("bling::tag_preview::visibility", s,
72 | true)
73 | end
74 | end)
75 | self:connect_signal('mouse::leave', function()
76 | awesome.emit_signal("bling::tag_preview::visibility", s,
77 | false)
78 | end)
79 | end,
80 | update_callback = function(self, c3, index, objects)
81 | update_tags(self, c3)
82 | end
83 | },
84 | buttons = taglist_buttons
85 | }
86 |
87 | return pac_taglist
88 | end
89 |
90 | return get_taglist
91 |
--------------------------------------------------------------------------------
/config-s4vi/awesome/module/bling/widget/tabbed_misc/titlebar_indicator.lua:
--------------------------------------------------------------------------------
1 | local wibox = require("wibox")
2 | local awful = require("awful")
3 | local gears = require("gears")
4 | local beautiful = require("beautiful")
5 | local dpi = require("beautiful.xresources").apply_dpi
6 | local tabbed_module = require(
7 | tostring(...):match(".*bling") .. ".module.tabbed"
8 | )
9 |
10 | -- Just check if a table contains a value.
11 | local function tbl_contains(tbl, item)
12 | for _, v in ipairs(tbl) do
13 | if v == item then
14 | return true
15 | end
16 | end
17 | return false
18 | end
19 |
20 | -- Needs to be run, every time a new titlbear is created
21 | return function(c, opts)
22 | -- Args & Fallback -- Widget templates are in their original loactions
23 | opts = gears.table.crush({
24 | layout_spacing = dpi(4),
25 | icon_size = dpi(20),
26 | icon_margin = dpi(4),
27 | bg_color_focus = "#ff0000",
28 | bg_color = "#00000000",
29 | fg_color = "#fafafa",
30 | fg_color_focus = "#e0e0e0",
31 | icon_shape = function(cr, w, h)
32 | gears.shape.rounded_rect(cr, w, h, 0)
33 | end,
34 | layout = wibox.layout.fixed.horizontal,
35 | }, gears.table.join(
36 | opts,
37 | beautiful.bling_tabbed_misc_titlebar_indicator
38 | ))
39 |
40 | -- Container to store icons
41 | local tabbed_icons = wibox.widget({
42 | layout = opts.layout,
43 | spacing = opts.layout_spacing,
44 | })
45 |
46 | awesome.connect_signal("bling::tabbed::client_removed", function(_, removed_c)
47 | -- Remove from list
48 | for idx, icon in ipairs(tabbed_icons.children) do
49 | if icon._client == removed_c then
50 | tabbed_icons:remove(idx)
51 | end
52 | end
53 |
54 | -- Empty list
55 | if removed_c == c then
56 | tabbed_icons:reset()
57 | end
58 | end)
59 |
60 | local function recreate(group)
61 | if tbl_contains(group.clients, c) then
62 | tabbed_icons:reset()
63 | local focused = group.clients[group.focused_idx]
64 |
65 | -- Autohide?
66 | if #group.clients == 1 then
67 | return
68 | end
69 |
70 | for idx, client in ipairs(group.clients) do
71 | local widget = wibox.widget(
72 | opts.widget_template or {
73 | {
74 | {
75 | {
76 | id = "icon_role",
77 | forced_width = opts.icon_size,
78 | forced_height = opts.icon_size,
79 | widget = awful.widget.clienticon,
80 | },
81 | margins = opts.icon_margin,
82 | widget = wibox.container.margin,
83 | },
84 | shape = opts.icon_shape,
85 | id = "bg_role",
86 | widget = wibox.container.background,
87 | },
88 | halign = "center",
89 | valign = "center",
90 | widget = wibox.container.place,
91 | })
92 |
93 | widget._client = client
94 |
95 | -- No creation call back since this would be called on creation & every time the widget updated.
96 | if opts.widget_template and opts.widget_template.update_callback then
97 | opts.widget_template.update_callback(widget, client, group)
98 | end
99 |
100 | -- Add icons & etc
101 | for _, w in ipairs(widget:get_children_by_id("icon_role")) do
102 | -- TODO: Allow fallback icon?
103 | w.image = client.icon
104 | w.client = client
105 | end
106 |
107 | for _, w in ipairs(widget:get_children_by_id("bg_role")) do
108 | w:add_button(awful.button({}, 1, function()
109 | tabbed_module.switch_to(group, idx)
110 | end))
111 | if client == focused then
112 | w.bg = opts.bg_color_focus
113 | w.fg = opts.fg_color_focus
114 | else
115 | w.bg = opts.bg_color
116 | w.fg = opts.fg_color
117 | end
118 | end
119 |
120 | for _, w in ipairs(widget:get_children_by_id("text_role")) do
121 | w.text = client.name
122 | end
123 |
124 | tabbed_icons:add(widget)
125 | end
126 | end
127 | end
128 |
129 | awesome.connect_signal("bling::tabbed::client_added", recreate)
130 | awesome.connect_signal("bling::tabbed::changed_focus", recreate)
131 |
132 | return tabbed_icons
133 | end
134 |
--------------------------------------------------------------------------------
/config-s4vi/awesome/module/bling/helpers/client.lua:
--------------------------------------------------------------------------------
1 | local awful = require("awful")
2 | local gears = require("gears")
3 |
4 | local _client = {}
5 |
6 | --- Turn off passed client
7 | -- Remove current tag from window's tags
8 | --
9 | -- @param c A client
10 | function _client.turn_off(c, current_tag)
11 | if current_tag == nil then
12 | current_tag = c.screen.selected_tag
13 | end
14 | local ctags = {}
15 | for k, tag in pairs(c:tags()) do
16 | if tag ~= current_tag then
17 | table.insert(ctags, tag)
18 | end
19 | end
20 | c:tags(ctags)
21 | c.sticky = false
22 | end
23 |
24 | --- Turn on passed client (add current tag to window's tags)
25 | --
26 | -- @param c A client
27 | function _client.turn_on(c)
28 | local current_tag = c.screen.selected_tag
29 | ctags = { current_tag }
30 | for k, tag in pairs(c:tags()) do
31 | if tag ~= current_tag then
32 | table.insert(ctags, tag)
33 | end
34 | end
35 | c:tags(ctags)
36 | c:raise()
37 | client.focus = c
38 | end
39 |
40 | --- Sync two clients
41 | --
42 | -- @param to_c The client to which to write all properties
43 | -- @param from_c The client from which to read all properties
44 | function _client.sync(to_c, from_c)
45 | if not from_c or not to_c then
46 | return
47 | end
48 | if not from_c.valid or not to_c.valid then
49 | return
50 | end
51 | if from_c.modal then
52 | return
53 | end
54 | to_c.floating = from_c.floating
55 | to_c.maximized = from_c.maximized
56 | to_c.above = from_c.above
57 | to_c.below = from_c.below
58 | to_c:geometry(from_c:geometry())
59 | -- TODO: Should also copy over the position in a tiling layout
60 | end
61 |
62 | --- Checks whether the passed client is a childprocess of a given process ID
63 | --
64 | -- @param c A client
65 | -- @param pid The process ID
66 | -- @return True if the passed client is a childprocess of the given PID otherwise false
67 | function _client.is_child_of(c, pid)
68 | -- io.popen is normally discouraged. Should probably be changed
69 | if not c or not c.valid then
70 | return false
71 | end
72 | if tostring(c.pid) == tostring(pid) then
73 | return true
74 | end
75 | local pid_cmd = [[pstree -T -p -a -s ]]
76 | .. tostring(c.pid)
77 | .. [[ | sed '2q;d' | grep -o '[0-9]*$' | tr -d '\n']]
78 | local handle = io.popen(pid_cmd)
79 | local parent_pid = handle:read("*a")
80 | handle:close()
81 | return tostring(parent_pid) == tostring(pid)
82 | or tostring(parent_pid) == tostring(c.pid)
83 | end
84 |
85 | --- Finds all clients that satisfy the passed rule
86 | --
87 | -- @param rule The rule to be searched for
88 | -- @retrun A list of clients that match the given rule
89 | function _client.find(rule)
90 | local function matcher(c)
91 | return awful.rules.match(c, rule)
92 | end
93 | local clients = client.get()
94 | local findex = gears.table.hasitem(clients, client.focus) or 1
95 | local start = gears.math.cycle(#clients, findex + 1)
96 |
97 | local matches = {}
98 | for c in awful.client.iterate(matcher, start) do
99 | matches[#matches + 1] = c
100 | end
101 |
102 | return matches
103 | end
104 |
105 | --- Gets the next client by direction from the focused one
106 | --
107 | -- @param direction it the direction as a string ("up", "down", "left" or "right")
108 | -- @retrun the client in the given direction starting at the currently focused one, nil otherwise
109 | function _client.get_by_direction(direction)
110 | local sel = client.focus
111 | if not sel then
112 | return nil
113 | end
114 | local cltbl = sel.screen:get_clients()
115 | local geomtbl = {}
116 | for i, cl in ipairs(cltbl) do
117 | geomtbl[i] = cl:geometry()
118 | end
119 | local target = gears.geometry.rectangle.get_in_direction(
120 | direction,
121 | geomtbl,
122 | sel:geometry()
123 | )
124 | return cltbl[target]
125 | end
126 |
127 | return _client
128 |
--------------------------------------------------------------------------------
/config-s4vi/nvim/lua/plugins/configs/icons.lua:
--------------------------------------------------------------------------------
1 | local present, icons = pcall(require, "nvim-web-devicons")
2 | if not present then
3 | return
4 | end
5 |
6 | local default = {
7 | colors = require("colors").get(),
8 | }
9 |
10 | default = {
11 | override = {
12 | c = {
13 | icon = "",
14 | color = default.colors.blue,
15 | name = "c",
16 | },
17 | css = {
18 | icon = "",
19 | color = default.colors.blue,
20 | name = "css",
21 | },
22 | deb = {
23 | icon = "",
24 | color = default.colors.cyan,
25 | name = "deb",
26 | },
27 | Dockerfile = {
28 | icon = "",
29 | color = default.colors.cyan,
30 | name = "Dockerfile",
31 | },
32 | html = {
33 | icon = "",
34 | color = default.colors.baby_pink,
35 | name = "html",
36 | },
37 | jpeg = {
38 | icon = "",
39 | color = default.colors.dark_purple,
40 | name = "jpeg",
41 | },
42 | jpg = {
43 | icon = "",
44 | color = default.colors.dark_purple,
45 | name = "jpg",
46 | },
47 | js = {
48 | icon = "",
49 | color = default.colors.sun,
50 | name = "js",
51 | },
52 | kt = {
53 | icon = "",
54 | color = default.colors.orange,
55 | name = "kt",
56 | },
57 | lock = {
58 | icon = "",
59 | color = default.colors.red,
60 | name = "lock",
61 | },
62 | lua = {
63 | icon = "",
64 | color = default.colors.blue,
65 | name = "lua",
66 | },
67 | mp3 = {
68 | icon = "",
69 | color = default.colors.white,
70 | name = "mp3",
71 | },
72 | mp4 = {
73 | icon = "",
74 | color = default.colors.white,
75 | name = "mp4",
76 | },
77 | out = {
78 | icon = "",
79 | color = default.colors.white,
80 | name = "out",
81 | },
82 | png = {
83 | icon = "",
84 | color = default.colors.dark_purple,
85 | name = "png",
86 | },
87 | py = {
88 | icon = "",
89 | color = default.colors.cyan,
90 | name = "py",
91 | },
92 | ["robots.txt"] = {
93 | icon = "ﮧ",
94 | color = default.colors.red,
95 | name = "robots",
96 | },
97 | toml = {
98 | icon = "",
99 | color = default.colors.blue,
100 | name = "toml",
101 | },
102 | ts = {
103 | icon = "ﯤ",
104 | color = default.colors.teal,
105 | name = "ts",
106 | },
107 | ttf = {
108 | icon = "",
109 | color = default.colors.white,
110 | name = "TrueTypeFont",
111 | },
112 | rb = {
113 | icon = "",
114 | color = default.colors.pink,
115 | name = "rb",
116 | },
117 | rpm = {
118 | icon = "",
119 | color = default.colors.orange,
120 | name = "rpm",
121 | },
122 | vue = {
123 | icon = "﵂",
124 | color = default.colors.vibrant_green,
125 | name = "vue",
126 | },
127 | woff = {
128 | icon = "",
129 | color = default.colors.white,
130 | name = "WebOpenFontFormat",
131 | },
132 | woff2 = {
133 | icon = "",
134 | color = default.colors.white,
135 | name = "WebOpenFontFormat2",
136 | },
137 | xz = {
138 | icon = "",
139 | color = default.colors.sun,
140 | name = "xz",
141 | },
142 | zip = {
143 | icon = "",
144 | color = default.colors.sun,
145 | name = "zip",
146 | },
147 | },
148 | }
149 |
150 | local M = {}
151 | M.setup = function(override_flag)
152 | if override_flag then
153 | default = require("core.utils").tbl_override_req("nvim_web_devicons", default)
154 | end
155 | icons.setup(default)
156 | end
157 |
158 | return M
159 |
--------------------------------------------------------------------------------
/config-s4vi/awesome/module/bling/helpers/icon_theme.lua:
--------------------------------------------------------------------------------
1 | local Gio = require("lgi").Gio
2 | local Gtk = require("lgi").Gtk
3 | local gobject = require("gears.object")
4 | local gtable = require("gears.table")
5 | local helpers = require("helpers")
6 | local setmetatable = setmetatable
7 | local ipairs = ipairs
8 |
9 | local icon_theme = { mt = {} }
10 |
11 | function icon_theme:get_client_icon_path(client)
12 | local function find_icon(class)
13 | if self._private.client_icon_cache[class] ~= nil then
14 | return self._private.client_icon_cache[class]
15 | end
16 |
17 | for _, app in ipairs(Gio.AppInfo.get_all()) do
18 | local id = Gio.AppInfo.get_id(app)
19 | if id:match(helpers.misc.case_insensitive_pattern(class)) then
20 | self._private.client_icon_cache[class] = self:get_gicon_path(Gio.AppInfo.get_icon(app))
21 | return self._private.client_icon_cache[class]
22 | end
23 | end
24 |
25 | return nil
26 | end
27 |
28 | local class = client.class
29 | if class == "jetbrains-studio" then
30 | class = "android-studio"
31 | end
32 |
33 | local icon = self:get_icon_path("gnome-window-manager")
34 |
35 | if class ~= nil then
36 | class = class:gsub("[%-]", "%%%0")
37 | icon = find_icon(class) or icon
38 |
39 | class = client.class
40 | class = class:gsub("[%-]", "")
41 | icon = find_icon(class) or icon
42 |
43 | class = client.class
44 | class = class:gsub("[%-]", ".")
45 | icon = find_icon(class) or icon
46 |
47 | class = client.class
48 | class = class:match("(.-)-") or class
49 | class = class:match("(.-)%.") or class
50 | class = class:match("(.-)%s+") or class
51 | class = class:gsub("[%-]", "%%%0")
52 | icon = find_icon(class) or icon
53 | end
54 |
55 | return icon
56 | end
57 |
58 | function icon_theme:choose_icon(icons_names)
59 | local icon_info = Gtk.IconTheme.choose_icon(self.gtk_theme, icons_names, self.icon_size, 0);
60 | if icon_info then
61 | local icon_path = Gtk.IconInfo.get_filename(icon_info)
62 | if icon_path then
63 | return icon_path
64 | end
65 | end
66 |
67 | return ""
68 | end
69 |
70 |
71 | function icon_theme:get_gicon_path(gicon)
72 | if gicon == nil then
73 | return ""
74 | end
75 |
76 | if self._private.icon_cache[gicon] ~= nil then
77 | return self._private.icon_cache[gicon]
78 | end
79 |
80 | local icon_info = Gtk.IconTheme.lookup_by_gicon(self.gtk_theme, gicon, self.icon_size, 0);
81 | if icon_info then
82 | local icon_path = Gtk.IconInfo.get_filename(icon_info)
83 | if icon_path then
84 | self._private.icon_cache[gicon] = icon_path
85 | return icon_path
86 | end
87 | end
88 |
89 | return ""
90 | end
91 |
92 | function icon_theme:get_icon_path(icon_name)
93 | if self._private.icon_cache[icon_name] ~= nil then
94 | return self._private.icon_cache[icon_name]
95 | end
96 |
97 | local icon_info = Gtk.IconTheme.lookup_icon(self.gtk_theme, icon_name, self.icon_size, 0);
98 | if icon_info then
99 | local icon_path = Gtk.IconInfo.get_filename(icon_info)
100 | if icon_path then
101 | self._private.icon_cache[icon_name] = icon_path
102 | return icon_path
103 | end
104 | end
105 |
106 | return ""
107 | end
108 |
109 | local function new(theme_name, icon_size)
110 | local ret = gobject{}
111 | gtable.crush(ret, icon_theme, true)
112 |
113 | ret._private = {}
114 | ret._private.client_icon_cache = {}
115 | ret._private.icon_cache = {}
116 |
117 | ret.name = theme_name or nil
118 | ret.icon_size = icon_size or 48
119 |
120 | if theme_name then
121 | ret.gtk_theme = Gtk.IconTheme.new()
122 | Gtk.IconTheme.set_custom_theme(ret.gtk_theme, theme_name);
123 | else
124 | ret.gtk_theme = Gtk.IconTheme.get_default()
125 | end
126 |
127 | return ret
128 | end
129 |
130 | function icon_theme.mt:__call(...)
131 | return new(...)
132 | end
133 |
134 | return setmetatable(icon_theme, icon_theme.mt)
135 |
--------------------------------------------------------------------------------
/config-s4vi/awesome/signal/weather.lua:
--------------------------------------------------------------------------------
1 | -- Provides:
2 | -- signal::weather
3 | -- temperature (integer)
4 | -- description (string)
5 | -- icon_code (string)
6 | local awful = require("awful")
7 | local beautiful = require("beautiful")
8 | local helpers = require("helpers")
9 |
10 | -- Configuration
11 | local key = openweathermap_key
12 | local city_id = openweathermap_city_id
13 | local units = weather_units
14 | -- Don't update too often, because your requests might get blocked for 24 hours
15 | local update_interval = 1200
16 | local temp_file = "/tmp/awesomewm-signal-weather-"..city_id.."-"..units
17 |
18 | local sun_icon = ""
19 | local moon_icon = ""
20 | local dcloud_icon = ""
21 | local ncloud_icon = ""
22 | local cloud_icon = ""
23 | local rain_icon = ""
24 | local storm_icon = ""
25 | local snow_icon = ""
26 | local mist_icon = ""
27 | local whatever_icon = ""
28 |
29 | local weather_icons = {
30 | ["01d"] = { icon = sun_icon, color = beautiful.xcolor3 },
31 | ["01n"] = { icon = moon_icon, color = beautiful.xcolor4 },
32 | ["02d"] = { icon = dcloud_icon, color = beautiful.xcolor3 },
33 | ["02n"] = { icon = ncloud_icon, color = beautiful.xcolor6 },
34 | ["03d"] = { icon = cloud_icon, color = beautiful.xforeground },
35 | ["03n"] = { icon = cloud_icon, color = beautiful.xforeground },
36 | ["04d"] = { icon = cloud_icon, color = beautiful.xforeground },
37 | ["04n"] = { icon = cloud_icon, color = beautiful.xforeground },
38 | ["09d"] = { icon = rain_icon, color = beautiful.xcolor4 },
39 | ["09n"] = { icon = rain_icon, color = beautiful.xcolor4 },
40 | ["10d"] = { icon = rain_icon, color = beautiful.xcolor4 },
41 | ["10n"] = { icon = rain_icon, color = beautiful.xcolor4 },
42 | ["11d"] = { icon = storm_icon, color = beautiful.xforeground },
43 | ["11n"] = { icon = storm_icon, color = beautiful.xforeground },
44 | ["13d"] = { icon = snow_icon, color = beautiful.xcolor6 },
45 | ["13n"] = { icon = snow_icon, color = beautiful.xcolor6 },
46 | ["40d"] = { icon = mist_icon, color = beautiful.xcolor5 },
47 | ["40n"] = { icon = mist_icon, color = beautiful.xcolor5 },
48 | ["50d"] = { icon = mist_icon, color = beautiful.xcolor5 },
49 | ["50n"] = { icon = mist_icon, color = beautiful.xcolor5 },
50 | ["_"] = { icon = whatever_icon, color = beautiful.xcolor2 },
51 | }
52 |
53 | local weather_details_script = [[
54 | bash -c '
55 | KEY="]]..key..[["
56 | CITY="]]..city_id..[["
57 | UNITS="]]..units..[["
58 |
59 | weather=$(curl -sf "http://api.openweathermap.org/data/2.5/weather?APPID=$KEY&id=$CITY&units=$UNITS")
60 |
61 | if [ ! -z "$weather" ]; then
62 | weather_temp=$(echo "$weather" | jq ".main.temp" | cut -d "." -f 1)
63 | weather_icon=$(echo "$weather" | jq -r ".weather[].icon" | head -1)
64 | weather_description=$(echo "$weather" | jq -r ".weather[].description" | head -1)
65 |
66 | echo "$weather_icon" "$weather_description"@@"$weather_temp"
67 | else
68 | echo "..."
69 | fi
70 | ']]
71 |
72 | helpers.remote_watch(weather_details_script, update_interval, temp_file, function(stdout)
73 | local icon_code = string.sub(stdout, 1, 3)
74 | local weather_details = string.sub(stdout, 5)
75 | weather_details = string.gsub(weather_details, '^%s*(.-)%s*$', '%1')
76 | -- Replace "-0" with "0" degrees
77 | weather_details = string.gsub(weather_details, '%-0', '0')
78 | -- Capitalize first letter of the description
79 | weather_details = weather_details:sub(1,1):upper()..weather_details:sub(2)
80 | local description = weather_details:match('(.*)@@')
81 | local temperature = weather_details:match('@@(.*)')
82 | local icon
83 | local color
84 | local weather_icon
85 |
86 | if icon_code == "..." then
87 | -- Remove temp_file to force an update the next time
88 | awful.spawn.with_shell("rm "..temp_file)
89 | icon = weather_icons['_'].icon
90 | color = weather_icons['_'].color
91 | weather_icon = helpers.colorize_text(icon, color)
92 | awesome.emit_signal("signal::weather", 999, "Weather unavailable", weather_icon)
93 | else
94 | icon = weather_icons[icon_code].icon
95 | color = weather_icons[icon_code].color
96 | weather_icon = helpers.colorize_text(icon, color)
97 | awesome.emit_signal("signal::weather", tonumber(temperature), description, weather_icon)
98 | end
99 | end)
100 |
101 |
--------------------------------------------------------------------------------
/config-s4vi/nvim/lua/plugins/configs/bufferline.lua:
--------------------------------------------------------------------------------
1 | local present, bufferline = pcall(require, "bufferline")
2 | if not present then
3 | return
4 | end
5 |
6 | local default = {
7 | colors = require("colors").get(),
8 | }
9 | default = {
10 | options = {
11 | offsets = { { filetype = "NvimTree", text = "", padding = 1 } },
12 | buffer_close_icon = "",
13 | modified_icon = "",
14 | close_icon = "",
15 | show_close_icon = true,
16 | left_trunc_marker = "",
17 | right_trunc_marker = "",
18 | max_name_length = 14,
19 | max_prefix_length = 13,
20 | tab_size = 20,
21 | show_tab_indicators = true,
22 | enforce_regular_tabs = false,
23 | view = "multiwindow",
24 | show_buffer_close_icons = true,
25 | separator_style = "thin",
26 | always_show_bufferline = true,
27 | diagnostics = false,
28 | custom_filter = function(buf_number)
29 | -- Func to filter out our managed/persistent split terms
30 | local present_type, type = pcall(function()
31 | return vim.api.nvim_buf_get_var(buf_number, "term_type")
32 | end)
33 |
34 | if present_type then
35 | if type == "vert" then
36 | return false
37 | elseif type == "hori" then
38 | return false
39 | end
40 | return true
41 | end
42 |
43 | return true
44 | end,
45 | },
46 |
47 | highlights = {
48 | background = {
49 | guifg = default.colors.grey_fg,
50 | guibg = default.colors.black2,
51 | },
52 |
53 | -- buffers
54 | buffer_selected = {
55 | guifg = default.colors.white,
56 | guibg = default.colors.black,
57 | gui = "bold",
58 | },
59 | buffer_visible = {
60 | guifg = default.colors.light_grey,
61 | guibg = default.colors.black2,
62 | },
63 |
64 | -- for diagnostics = "nvim_lsp"
65 | error = {
66 | guifg = default.colors.light_grey,
67 | guibg = default.colors.black2,
68 | },
69 | error_diagnostic = {
70 | guifg = default.colors.light_grey,
71 | guibg = default.colors.black2,
72 | },
73 |
74 | -- close buttons
75 | close_button = {
76 | guifg = default.colors.light_grey,
77 | guibg = default.colors.black2,
78 | },
79 | close_button_visible = {
80 | guifg = default.colors.light_grey,
81 | guibg = default.colors.black2,
82 | },
83 | close_button_selected = {
84 | guifg = default.colors.red,
85 | guibg = default.colors.black,
86 | },
87 | fill = {
88 | guifg = default.colors.grey_fg,
89 | guibg = default.colors.black2,
90 | },
91 | indicator_selected = {
92 | guifg = default.colors.black,
93 | guibg = default.colors.black,
94 | },
95 |
96 | -- modified
97 | modified = {
98 | guifg = default.colors.red,
99 | guibg = default.colors.black2,
100 | },
101 | modified_visible = {
102 | guifg = default.colors.red,
103 | guibg = default.colors.black2,
104 | },
105 | modified_selected = {
106 | guifg = default.colors.green,
107 | guibg = default.colors.black,
108 | },
109 |
110 | -- separators
111 | separator = {
112 | guifg = default.colors.black2,
113 | guibg = default.colors.black2,
114 | },
115 | separator_visible = {
116 | guifg = default.colors.black2,
117 | guibg = default.colors.black2,
118 | },
119 | separator_selected = {
120 | guifg = default.colors.black2,
121 | guibg = default.colors.black2,
122 | },
123 |
124 | -- tabs
125 | tab = {
126 | guifg = default.colors.light_grey,
127 | guibg = default.colors.one_bg3,
128 | },
129 | tab_selected = {
130 | guifg = default.colors.black2,
131 | guibg = default.colors.nord_blue,
132 | },
133 | tab_close = {
134 | guifg = default.colors.red,
135 | guibg = default.colors.black,
136 | },
137 | },
138 | }
139 |
140 | local M = {}
141 | M.setup = function(override_flag)
142 | if override_flag then
143 | default = require("core.utils").tbl_override_req("bufferline", default)
144 | end
145 | bufferline.setup(default)
146 | end
147 |
148 | return M
149 |
--------------------------------------------------------------------------------
/config-s4vi/awesome/module/bling/module/window_swallowing.lua:
--------------------------------------------------------------------------------
1 | local awful = require("awful")
2 | local gears = require("gears")
3 | local beautiful = require("beautiful")
4 |
5 | local helpers = require(tostring(...):match(".*bling") .. ".helpers")
6 |
7 | -- It might actually swallow too much, that's why there is a filter option by classname
8 | -- without the don't-swallow-list it would also swallow for example
9 | -- file pickers or new firefox windows spawned by an already existing one
10 |
11 | local window_swallowing_activated = false
12 |
13 | -- you might want to add or remove applications here
14 | local parent_filter_list = beautiful.parent_filter_list
15 | or beautiful.dont_swallow_classname_list
16 | or { "firefox", "Gimp", "Google-chrome" }
17 | local child_filter_list = beautiful.child_filter_list
18 | or beautiful.dont_swallow_classname_list or { }
19 |
20 | -- for boolean values the or chain way to set the values breaks with 2 vars
21 | -- and always defaults to true so i had to do this to se the right value...
22 | local swallowing_filter = true
23 | local filter_vars = { beautiful.swallowing_filter, beautiful.dont_swallow_filter_activated }
24 | for _, var in pairs(filter_vars) do
25 | swallowing_filter = var
26 | end
27 |
28 | -- check if element exist in table
29 | -- returns true if it is
30 | local function is_in_table(element, table)
31 | local res = false
32 | for _, value in pairs(table) do
33 | if element:match(value) then
34 | res = true
35 | break
36 | end
37 | end
38 | return res
39 | end
40 |
41 | -- if the swallowing filter is active checks the child and parent classes
42 | -- against their filters
43 | local function check_swallow(parent, child)
44 | local res = true
45 | if swallowing_filter then
46 | local prnt = not is_in_table(parent, parent_filter_list)
47 | local chld = not is_in_table(child, child_filter_list)
48 | res = ( prnt and chld )
49 | end
50 | return res
51 | end
52 |
53 | -- async function to get the parent's pid
54 | -- recieves a child process pid and a callback function
55 | -- parent_pid in format "init(1)---ancestorA(pidA)---ancestorB(pidB)...---process(pid)"
56 | function get_parent_pid(child_ppid, callback)
57 | local ppid_cmd = string.format("pstree -A -p -s %s", child_ppid)
58 | awful.spawn.easy_async(ppid_cmd, function(stdout, stderr, reason, exit_code)
59 | -- primitive error checking
60 | if stderr and stderr ~= "" then
61 | callback(stderr)
62 | return
63 | end
64 | local ppid = stdout
65 | callback(nil, ppid)
66 | end)
67 | end
68 |
69 |
70 | -- the function that will be connected to / disconnected from the spawn client signal
71 | local function manage_clientspawn(c)
72 | -- get the last focused window to check if it is a parent window
73 | local parent_client = awful.client.focus.history.get(c.screen, 1)
74 | if not parent_client then
75 | return
76 | elseif parent_client.type == "dialog" or parent_client.type == "splash" then
77 | return
78 | end
79 |
80 | get_parent_pid(c.pid, function(err, ppid)
81 | if err then
82 | return
83 | end
84 | parent_pid = ppid
85 | if
86 | -- will search for "(parent_client.pid)" inside the parent_pid string
87 | ( tostring(parent_pid):find("("..tostring(parent_client.pid)..")") )
88 | and check_swallow(parent_client.class, c.class)
89 | then
90 | c:connect_signal("unmanage", function()
91 | if parent_client then
92 | helpers.client.turn_on(parent_client)
93 | helpers.client.sync(parent_client, c)
94 | end
95 | end)
96 |
97 | helpers.client.sync(c, parent_client)
98 | helpers.client.turn_off(parent_client)
99 | end
100 | end)
101 | end
102 |
103 | -- without the following functions that module would be autoloaded by require("bling")
104 | -- a toggle window swallowing hotkey is also possible that way
105 |
106 | local function start()
107 | client.connect_signal("manage", manage_clientspawn)
108 | window_swallowing_activated = true
109 | end
110 |
111 | local function stop()
112 | client.disconnect_signal("manage", manage_clientspawn)
113 | window_swallowing_activated = false
114 | end
115 |
116 | local function toggle()
117 | if window_swallowing_activated then
118 | stop()
119 | else
120 | start()
121 | end
122 | end
123 |
124 | return {
125 | start = start,
126 | stop = stop,
127 | toggle = toggle,
128 | }
129 |
--------------------------------------------------------------------------------
/config-s4vi/awesome/module/better-resize.lua:
--------------------------------------------------------------------------------
1 | local capi = {
2 | client = client,
3 | mouse = mouse,
4 | screen = screen,
5 | mousegrabber = mousegrabber
6 | }
7 | local awful = require("awful")
8 |
9 | local function mouse_resize_handler(m, c)
10 | awful.client.incwfact(0, c) -- needed to fix normalization at start
11 | local start = m(capi.mouse.coords())
12 | local x, y = start.x, start.y
13 | local wa = m(c.screen.workarea)
14 | local idx = awful.client.idx(c)
15 | local c_above, c_below
16 | local idx_above, idx_below
17 | local wfact_above, wfact_below
18 | local jump_to = {x = x, y = y}
19 | local move_mwfact = false
20 |
21 | do
22 | local g = m(c:geometry())
23 |
24 | local v_border = 0.2 * g.height
25 |
26 | if idx.idx > 1 and y >= g.y and y <= g.y + v_border then
27 | -- we are near the top edge of the window
28 | c_above = awful.client.next(-1, c)
29 | c_below = c
30 | jump_to.y = g.y
31 | idx_above = idx.idx - 1
32 | idx_below = idx.idx
33 | elseif idx.idx < (idx.num) and y >= g.y + g.height - v_border then
34 | -- we are near the bottom edge of the window
35 | c_above = c
36 | c_below = awful.client.next(1, c)
37 | idx_above = idx.idx
38 | idx_below = idx.idx + 1
39 | jump_to.y = g.y + g.height
40 | end
41 |
42 | local mw_split = wa.x + wa.width *
43 | c.screen.selected_tag.master_width_factor
44 |
45 | if math.abs(mw_split - x) > wa.width / 6 then
46 | move_mwfact = false
47 | else
48 | move_mwfact = true
49 | jump_to.x = mw_split
50 | end
51 | end
52 |
53 | if idx_above then
54 | local t = c.screen.selected_tag
55 | local data = t.windowfact or {}
56 | local colfact = data[idx.col] or {}
57 | wfact_above = colfact[idx_above] or 1
58 | wfact_below = colfact[idx_below] or 1
59 | end
60 |
61 | if idx_above and move_mwfact then
62 | cursor = "cross"
63 | elseif idx_above then
64 | cursor = m({y = "sb_v_double_arrow", x = "sb_h_double_arrow"}).y
65 | elseif move_mwfact then
66 | cursor = m({y = "sb_v_double_arrow", x = "sb_h_double_arrow"}).x
67 | else
68 | return false
69 | end
70 |
71 | capi.mouse.coords(m(jump_to))
72 |
73 | capi.mousegrabber.run(function(_mouse)
74 | if not c.valid then return false end
75 |
76 | local pressed = false
77 | for _, v in ipairs(_mouse.buttons) do
78 | if v then
79 | pressed = true
80 | break
81 | end
82 | end
83 |
84 | _mouse = m(_mouse)
85 |
86 | if pressed then
87 | if move_mwfact then
88 | c.screen.selected_tag.master_width_factor =
89 | math.min(math.max((_mouse.x - wa.x) / wa.width, 0.01), 0.99)
90 | end
91 |
92 | if idx_above then
93 | local factor_delta = (_mouse.y - jump_to.y) / wa.height
94 |
95 | if factor_delta < 0 then
96 | factor_delta = math.max(factor_delta, -(wfact_above - 0.05))
97 | else
98 | factor_delta = math.min(factor_delta, wfact_below - 0.05)
99 | end
100 |
101 | local t = c.screen.selected_tag
102 | local data = t.windowfact or {}
103 | local colfact = data[idx.col] or {}
104 | colfact[idx_above] = wfact_above + factor_delta
105 | colfact[idx_below] = wfact_below - factor_delta
106 | awful.client.incwfact(0, c_above) -- just in case
107 | end
108 | return true
109 | else
110 | return false
111 | end
112 | end, cursor)
113 |
114 | return true
115 | end
116 |
117 | awful.layout.suit.tile.mouse_resize_handler =
118 | function(c) return mouse_resize_handler(function(x) return x end, c) end
119 | awful.layout.suit.tile.bottom.mouse_resize_handler =
120 | function(c)
121 | return mouse_resize_handler(function(q)
122 | return {x = q.y, y = q.x, width = q.height, height = q.width}
123 | end, c)
124 | end
125 |
126 | -- local old_coords = mouse.coords
127 |
128 | -- mouse.coords = function(...)
129 | -- if select(1, ...) and not(select(1, ...).blah) then
130 | -- print("set mouse!!!")
131 | -- print(debug.traceback())
132 |
133 | -- end
134 | -- return old_coords(...)
135 | -- end
136 |
--------------------------------------------------------------------------------
/autoAwesome:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | green="\e[0;32m\033[1m"
4 | end="\033[0m\e[0m"
5 | red="\e[0;31m\033[1m"
6 | blue="\e[0;34m\033[1m"
7 | yellow="\e[0;33m\033[1m"
8 |
9 | function banner(){
10 |
11 | clear
12 |
13 | echo -e "${red}"
14 |
15 | echo " █████╗ ██╗ ██╗████████╗ ██████╗ █████╗ ██╗ ██╗███████╗███████╗ ██████╗ ███╗ ███╗███████╗"
16 | echo "██╔══██╗██║ ██║╚══██╔══╝██╔═══██╗██╔══██╗██║ ██║██╔════╝██╔════╝██╔═══██╗████╗ ████║██╔════╝"
17 | echo "███████║██║ ██║ ██║ ██║ ██║███████║██║ █╗ ██║█████╗ ███████╗██║ ██║██╔████╔██║█████╗ "
18 | echo "██╔══██║██║ ██║ ██║ ██║ ██║██╔══██║██║███╗██║██╔══╝ ╚════██║██║ ██║██║╚██╔╝██║██╔══╝ "
19 | echo "██║ ██║╚██████╔╝ ██║ ╚██████╔╝██║ ██║╚███╔███╔╝███████╗███████║╚██████╔╝██║ ╚═╝ ██║███████╗"
20 | echo "╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝ ╚══╝╚══╝ ╚══════╝╚══════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝"
21 |
22 | }
23 |
24 |
25 | function dependencias(){
26 |
27 | echo -e "${red}[!] ${yellow}Instalando Dependencias..."
28 | echo -e "${end}"
29 |
30 | sudo pacman -S git --noconfirm
31 |
32 | git clone https://aur.archlinux.org/paru-bin.git
33 | chmod 777 paru-bin
34 | cd paru-bin || exit
35 | makepkg -si --noconfirm
36 | cd ..
37 | rm -rf paru-bin/
38 |
39 | paru -S picom-ibhagwan-git todo-bin alacritty rofi todo-bin acpi acpid \
40 | wireless_tools jq inotify-tools polkit-gnome xdotool xclip maim \
41 | brightnessctl alsa-utils alsa-tools pulseaudio lm_sensors \
42 | mpd mpc mpdris2 ncmpcpp playerctl zsh-autosuggestions zsh-syntax-highlighting --needed --noconfirm
43 |
44 | mkdir /home/$USER/.todo/
45 |
46 | systemctl --user enable mpd.service
47 | systemctl --user start mpd.service
48 | sudo systemctl enable acpid.service
49 | sudo systemctl start acpid.service
50 |
51 | echo -e "${green}[!] ${blue}Dependencias Instaladas."
52 | clear
53 | echo -e "${end}"
54 |
55 | }
56 |
57 | function build(){
58 |
59 | echo -e "${red}[!] ${yellow}Instalando Awesome..."
60 | echo -e "${end}"
61 |
62 | paru -S awesome-git --needed --noconfirm
63 |
64 | echo -e "${green}[!] ${blue}Awesome Instalado."
65 | clear
66 | echo -e "${end}"
67 | }
68 |
69 | function awesome(){
70 |
71 | echo -e "${red}[!] ${yellow}Instalando witgets de Awesome..."
72 | echo -e "${end}"
73 |
74 | paru -S ttf-material-design-icons nerd-fonts-complete --needed --noconfirm
75 |
76 | unzip files/icoonmon.zip .; sudo mv ./*.ttf /usr/share/fonts
77 |
78 | echo -e "${green}[!] ${blue}Los temas de widgets se han instalado."
79 | clear
80 | echo -e "${end}"
81 | }
82 |
83 | function themes(){
84 |
85 | echo -e "${red}[!] ${yellow}Instalando temas de Awesome..."
86 | echo -e "${end}"
87 | cp config-s4vi/.Xresources $HOME
88 | cp config-s4vi/.profile $HOME
89 | cp -r config-s4vi/* "$HOME"/.config
90 |
91 | echo -e "${green}[!] ${blue}Temas Instalados."
92 | clear
93 | echo -e "${end}"
94 | }
95 |
96 | function tools(){
97 |
98 | echo -e "${red}[!] ${yellow}Instalando funciones extra..."
99 | echo -e "${end}"
100 |
101 |
102 | echo -e "${green}[!] ${blue}Functiones extra Instaladas."
103 | clear
104 | echo -e "${end}"
105 |
106 | echo -e "${green} [!] ʕ•́ᴥ•̀ʔ Entorno instalado!!"
107 |
108 | }
109 |
110 |
111 | function menu(){
112 |
113 | banner
114 |
115 | echo -e "${blue}"
116 | sleep 0.25
117 | echo
118 | echo "1 -> Instalar dependencias"
119 | sleep 0.25
120 | echo
121 | echo "2 -> Instalar Awesome"
122 | sleep 0.25
123 | echo
124 | echo "3 -> Instalar widgets de Awesome"
125 | sleep 0.25
126 | echo
127 | echo "4 -> Instalar tema de Awesome"
128 | sleep 0.25
129 | echo
130 | echo "5 -> Instalar elementos adicionales: rofi, caja, firefox..."
131 | sleep 0.25
132 | echo
133 | echo "6 -> Instalar todo"
134 | sleep 0.25
135 | echo
136 | echo "7 -> Salir"
137 | sleep 0.25
138 | echo -e "${end}"
139 | echo
140 | read -rp "--> " comando
141 |
142 | if [ "$comando" == "1" ]; then
143 | dependencias
144 | fi
145 |
146 | if [ "$comando" == "2" ]; then
147 | build
148 | fi
149 |
150 | if [ "$comando" == "3" ]; then
151 | awesome
152 | fi
153 |
154 | if [ "$comando" == "4" ]; then
155 | themes
156 | fi
157 |
158 | if [ "$comando" == "5" ]; then
159 | tools
160 | fi
161 |
162 | if [ "$comando" == "6" ]; then
163 | dependencias
164 | build
165 | awesome
166 | themes
167 | tools
168 | fi
169 | }
170 |
171 | if [[ "$1" == "-p" ]];then
172 | echo "[!] Cuando sale la academia, Y la Silla!?!?"
173 | exit 0
174 | fi
175 |
176 | if [ "$(id -u)" == "0" ]; then
177 | echo -e "\n${red}[!] No hay que ser root para ejecutar la herramienta${end}"
178 | echo
179 | exit 1
180 | else
181 | menu
182 | fi
183 |
184 |
--------------------------------------------------------------------------------
/config-s4vi/awesome/ui/decorations/titlebar.lua:
--------------------------------------------------------------------------------
1 | local awful = require("awful")
2 | local gears = require("gears")
3 | local wibox = require("wibox")
4 | local beautiful = require("beautiful")
5 | local xresources = require("beautiful.xresources")
6 | local dpi = xresources.apply_dpi
7 | local bling = require("module.bling")
8 | local helpers = require("helpers")
9 |
10 |
11 | -- Helpers
12 | -------------
13 |
14 | local function create_title_button(c, color_focus, color_unfocus, shp)
15 | local tb = wibox.widget {
16 | forced_width = dpi(20),
17 | forced_height = dpi(20),
18 | bg = color_focus .. 90,
19 | shape = shp,
20 | border_color = beautiful.border_color,
21 | widget = wibox.container.background
22 | }
23 |
24 | local function update()
25 | if client.focus == c then
26 | tb.bg = color_focus
27 | else
28 | tb.bg = color_unfocus
29 | end
30 | end
31 | update()
32 |
33 | c:connect_signal("focus", update)
34 | c:connect_signal("unfocus", update)
35 |
36 | tb:connect_signal("mouse::enter", function() tb.bg = color_focus .. 55 end)
37 | tb:connect_signal("mouse::leave", function() tb.bg = color_focus end)
38 |
39 | tb.visible = true
40 | return tb
41 | end
42 |
43 | local wrap_widget = function(w)
44 | return {
45 | w,
46 | top = dpi(20),
47 | widget = wibox.container.margin
48 | }
49 | end
50 |
51 | -- Add a titlebar if titlebars_enabled is set to true in the rules.
52 | client.connect_signal("request::titlebars", function(c)
53 |
54 |
55 | -- Buttons for the titlebar
56 | ------------------------------
57 |
58 | local buttons = gears.table.join(awful.button({}, 1, function()
59 | c:emit_signal("request::activate", "titlebar", {raise = true})
60 | if c.maximized == true then c.maximized = false end
61 | awful.mouse.client.move(c)
62 | end), awful.button({}, 3, function()
63 | c:emit_signal("request::activate", "titlebar", {raise = true})
64 | awful.mouse.client.resize(c)
65 | end))
66 | local borderbuttons = gears.table.join( awful.button({}, 3, function()
67 | c:emit_signal("request::activate", "titlebar", {raise = true})
68 | awful.mouse.client.resize(c)
69 | end), awful.button({}, 1, function()
70 | c:emit_signal("request::activate", "titlebar", {raise = true})
71 | awful.mouse.client.resize(c)
72 | end))
73 |
74 |
75 | -- Titlebars shapes
76 | ----------------------
77 |
78 | local ci = function(width, height)
79 | return function(cr) gears.shape.circle(cr, width, height) end
80 | end
81 |
82 |
83 | -- Create titlebars buttons
84 | ------------------------------
85 |
86 | local close = create_title_button(c, beautiful.xcolor1, beautiful.titlebar_unfocused, ci(dpi(11), dpi(11)))
87 | close:connect_signal("button::press", function() c:kill() end)
88 |
89 | local float = create_title_button(c, beautiful.xcolor4, beautiful.titlebar_unfocused, ci(dpi(11), dpi(11)))
90 | float:connect_signal("button::press", function() awful.client.floating.toggle(c) end)
91 |
92 | local max = create_title_button(c, beautiful.xcolor5, beautiful.titlebar_unfocused, ci(dpi(11), dpi(11)))
93 | max:connect_signal("button::press", function() c.maximized = not c.maximized end)
94 |
95 |
96 | -- Titlebars setup
97 | --------------------
98 |
99 | awful.titlebar(c, {
100 | position = "top",
101 | size = beautiful.titlebar_size
102 | }):setup{
103 | { -- left
104 | wrap_widget({
105 | close,
106 | left = dpi(25),
107 | widget = wibox.container.margin
108 | }),
109 | wrap_widget(float),
110 | wrap_widget(max),
111 | buttons = buttons,
112 | layout = wibox.layout.fixed.horizontal,
113 | },
114 | { -- middle
115 | awful.titlebar.widget.titlewidget(c),
116 | layout = wibox.layout.fixed.horizontal
117 | },
118 | { -- right
119 | layout = wibox.layout.fixed.horizontal
120 | },
121 | bg = beautiful.darker_bg,
122 | shape = helpers.prrect(beautiful.border_radius, true, true, false, false),
123 | widget = wibox.container.background
124 | }
125 |
126 | awful.titlebar(c, {
127 | position = "bottom",
128 | size = dpi(24)
129 | }):setup{
130 | bg = beautiful.darker_bg,
131 | shape = helpers.prrect(beautiful.border_radius, false, false, true, true),
132 | widget = wibox.container.background
133 | }
134 | end)
135 |
136 |
--------------------------------------------------------------------------------
/config-s4vi/nvim/lua/colors/highlights.lua:
--------------------------------------------------------------------------------
1 | local cmd = vim.cmd
2 |
3 | local colors = require("colors").get()
4 | local ui = require("core.utils").load_config().ui
5 |
6 | local black = colors.black
7 | local black2 = colors.black2
8 | local blue = colors.blue
9 | local darker_black = colors.darker_black
10 | local folder_bg = colors.folder_bg
11 | local green = colors.green
12 | local grey = colors.grey
13 | local grey_fg = colors.grey_fg
14 | local light_grey = colors.light_grey
15 | local line = colors.line
16 | local nord_blue = colors.nord_blue
17 | local one_bg = colors.one_bg
18 | local one_bg2 = colors.one_bg2
19 | local pmenu_bg = colors.pmenu_bg
20 | local purple = colors.purple
21 | local red = colors.red
22 | local white = colors.white
23 | local yellow = colors.yellow
24 | local orange = colors.orange
25 | local one_bg3 = colors.one_bg3
26 |
27 | -- functions for setting highlights
28 | local fg = require("core.utils").fg
29 | local fg_bg = require("core.utils").fg_bg
30 | local bg = require("core.utils").bg
31 |
32 | -- Comments
33 | if ui.italic_comments then
34 | fg("Comment", grey_fg .. " gui=italic")
35 | else
36 | fg("Comment", grey_fg)
37 | end
38 |
39 | -- Disable cursor line
40 | cmd "hi clear CursorLine"
41 | -- Line number
42 | fg("cursorlinenr", white)
43 |
44 | -- same it bg, so it doesn't appear
45 | fg("EndOfBuffer", black)
46 |
47 | -- For floating windows
48 | fg("FloatBorder", blue)
49 | bg("NormalFloat", darker_black)
50 |
51 | -- Pmenu
52 | bg("Pmenu", one_bg)
53 | bg("PmenuSbar", one_bg2)
54 | bg("PmenuSel", pmenu_bg)
55 | bg("PmenuThumb", nord_blue)
56 | fg("CmpItemAbbr", white)
57 | fg("CmpItemAbbrMatch", white)
58 | fg("CmpItemKind", white)
59 | fg("CmpItemMenu", white)
60 |
61 | -- misc
62 |
63 | -- inactive statuslines as thin lines
64 | fg("StatusLineNC", one_bg3 .. " gui=underline")
65 |
66 | fg("LineNr", grey)
67 | fg("NvimInternalError", red)
68 | fg("VertSplit", one_bg2)
69 |
70 | if ui.transparency then
71 | bg("Normal", "NONE")
72 | bg("Folded", "NONE")
73 | fg("Folded", "NONE")
74 | fg("Comment", grey)
75 | end
76 |
77 | -- [[ Plugin Highlights
78 |
79 | -- Dashboard
80 | fg("AlphaHeader", grey_fg)
81 | fg("AlphaButtons", light_grey)
82 |
83 | -- Git signs
84 | fg_bg("DiffAdd", blue, "NONE")
85 | fg_bg("DiffChange", grey_fg, "NONE")
86 | fg_bg("DiffChangeDelete", red, "NONE")
87 | fg_bg("DiffModified", red, "NONE")
88 | fg_bg("DiffDelete", red, "NONE")
89 |
90 | -- Indent blankline plugin
91 | fg("IndentBlanklineChar", line)
92 | fg("IndentBlanklineSpaceChar", line)
93 |
94 | -- Lsp diagnostics
95 |
96 | fg("DiagnosticHint", purple)
97 | fg("DiagnosticError", red)
98 | fg("DiagnosticWarn", yellow)
99 | fg("DiagnosticInformation", green)
100 |
101 | -- NvimTree
102 | fg("NvimTreeEmptyFolderName", folder_bg)
103 | fg("NvimTreeEndOfBuffer", darker_black)
104 | fg("NvimTreeFolderIcon", folder_bg)
105 | fg("NvimTreeFolderName", folder_bg)
106 | fg("NvimTreeGitDirty", red)
107 | fg("NvimTreeIndentMarker", one_bg2)
108 | bg("NvimTreeNormal", darker_black)
109 | bg("NvimTreeNormalNC", darker_black)
110 | fg("NvimTreeOpenedFolderName", folder_bg)
111 | fg("NvimTreeRootFolder", red .. " gui=underline") -- enable underline for root folder in nvim tree
112 | fg_bg("NvimTreeStatuslineNc", darker_black, darker_black)
113 | fg_bg("NvimTreeVertSplit", darker_black, darker_black)
114 | fg_bg("NvimTreeWindowPicker", red, black2)
115 |
116 | -- Telescope
117 | fg_bg("TelescopeBorder", darker_black, darker_black)
118 | fg_bg("TelescopePromptBorder", black2, black2)
119 |
120 | fg_bg("TelescopePromptNormal", white, black2)
121 | fg_bg("TelescopePromptPrefix", red, black2)
122 |
123 | bg("TelescopeNormal", darker_black)
124 |
125 | fg_bg("TelescopePreviewTitle", black, green)
126 | fg_bg("TelescopePromptTitle", black, red)
127 | fg_bg("TelescopeResultsTitle", darker_black, darker_black)
128 |
129 | bg("TelescopeSelection", black2)
130 |
131 | -- keybinds cheatsheet
132 |
133 | fg_bg("CheatsheetBorder", black, black)
134 | bg("CheatsheetSectionContent", black)
135 | fg("CheatsheetHeading", white)
136 |
137 | local section_title_colors = {
138 | white,
139 | blue,
140 | red,
141 | green,
142 | yellow,
143 | purple,
144 | orange,
145 | }
146 | for i, color in ipairs(section_title_colors) do
147 | vim.cmd("highlight CheatsheetTitle" .. i .. " guibg = " .. color .. " guifg=" .. black)
148 | end
149 |
150 | -- Disable some highlight in nvim tree if transparency enabled
151 | if ui.transparency then
152 | bg("NormalFloat", "NONE")
153 | bg("NvimTreeNormal", "NONE")
154 | bg("NvimTreeNormalNC", "NONE")
155 | bg("NvimTreeStatusLineNC", "NONE")
156 | fg_bg("NvimTreeVertSplit", grey, "NONE")
157 |
158 | -- telescope
159 | bg("TelescopeBorder", "NONE")
160 | bg("TelescopePrompt", "NONE")
161 | bg("TelescopeResults", "NONE")
162 | bg("TelescopePromptBorder", "NONE")
163 | bg("TelescopePromptNormal", "NONE")
164 | bg("TelescopeNormal", "NONE")
165 | bg("TelescopePromptPrefix", "NONE")
166 | fg("TelescopeBorder", one_bg)
167 | fg_bg("TelescopeResultsTitle", black, blue)
168 | end
169 |
--------------------------------------------------------------------------------
/config-s4vi/awesome/ui/notifs/notif-center/build-notifbox/notifbox-builder.lua:
--------------------------------------------------------------------------------
1 | local wibox = require('wibox')
2 | local awful = require('awful')
3 | local gears = require('gears')
4 | local beautiful = require('beautiful')
5 |
6 | local dpi = beautiful.xresources.apply_dpi
7 |
8 | local builder = require('ui.notifs.notif-center.build-notifbox.notifbox-ui-elements')
9 | local notifbox_core = require('ui.notifs.notif-center.build-notifbox')
10 |
11 | local notifbox_layout = notifbox_core.notifbox_layout
12 | local remove_notifbox_empty = notifbox_core.remove_notifbox_empty
13 | local reset_notifbox_layout = notifbox_core.reset_notifbox_layout
14 |
15 | local return_date_time = function(format)
16 | return os.date(format)
17 | end
18 |
19 | local parse_to_seconds = function(time)
20 | local hourInSec = tonumber(string.sub(time, 1, 2)) * 3600
21 | local minInSec = tonumber(string.sub(time, 4, 5)) * 60
22 | local getSec = tonumber(string.sub(time, 7, 8))
23 | return (hourInSec + minInSec + getSec)
24 | end
25 |
26 | notifbox_box = function(notif, icon, title, message, app, bgcolor)
27 |
28 | local time_of_pop = return_date_time('%H:%M:%S')
29 | local exact_time = return_date_time('%I:%M %p')
30 | local exact_date_time = return_date_time('%b %d, %I:%M %p')
31 |
32 | local notifbox_timepop = wibox.widget {
33 | id = 'time_pop',
34 | markup = nil,
35 | font = beautiful.font_name .. 'medium 10',
36 | align = 'left',
37 | valign = 'center',
38 | visible = true,
39 | widget = wibox.widget.textbox
40 | }
41 |
42 | local notifbox_dismiss = builder.notifbox_dismiss()
43 |
44 | local time_of_popup = gears.timer {
45 | timeout = 60,
46 | call_now = true,
47 | autostart = true,
48 | callback = function()
49 |
50 | local time_difference = nil
51 |
52 | time_difference = parse_to_seconds(return_date_time('%H:%M:%S')) - parse_to_seconds(time_of_pop)
53 | time_difference = tonumber(time_difference)
54 |
55 | if time_difference < 60 then
56 | notifbox_timepop:set_markup('now')
57 |
58 | elseif time_difference >= 60 and time_difference < 3600 then
59 | local time_in_minutes = math.floor(time_difference / 60)
60 | notifbox_timepop:set_markup(time_in_minutes .. 'm ago')
61 |
62 | elseif time_difference >= 3600 and time_difference < 86400 then
63 | notifbox_timepop:set_markup(exact_time)
64 |
65 | elseif time_difference >= 86400 then
66 | notifbox_timepop:set_markup(exact_date_time)
67 | return false
68 |
69 | end
70 |
71 | collectgarbage('collect')
72 | end
73 | }
74 |
75 | local notifbox_template = wibox.widget {
76 | id = 'notifbox_template',
77 | expand = 'none',
78 | {
79 | {
80 | layout = wibox.layout.fixed.vertical,
81 | spacing = dpi(5),
82 | {
83 | expand = 'none',
84 | layout = wibox.layout.align.horizontal,
85 | {
86 | layout = wibox.layout.fixed.horizontal,
87 | spacing = dpi(5),
88 | builder.notifbox_icon(icon),
89 | builder.notifbox_appname(app),
90 | },
91 | nil,
92 | {
93 | notifbox_timepop,
94 | notifbox_dismiss,
95 | layout = wibox.layout.fixed.horizontal
96 | }
97 | },
98 | {
99 | layout = wibox.layout.fixed.vertical,
100 | spacing = dpi(5),
101 | {
102 | builder.notifbox_title(title),
103 | builder.notifbox_message(message),
104 | layout = wibox.layout.fixed.vertical
105 | },
106 | builder.notifbox_actions(notif),
107 | },
108 |
109 | },
110 | margins = dpi(10),
111 | widget = wibox.container.margin
112 | },
113 | bg = bgcolor,
114 | shape = function(cr, width, height)
115 | gears.shape.partially_rounded_rect(cr, width, height, true, true, true, true, beautiful.notif_center_box_radius)
116 | end,
117 | widget = wibox.container.background,
118 | }
119 |
120 | -- Put the generated template to a container
121 | local notifbox = wibox.widget {
122 | notifbox_template,
123 | shape = function(cr, width, height)
124 | gears.shape.partially_rounded_rect(cr, width, height, true, true, true, true, beautiful.notif_center_box_radius)
125 | end,
126 | widget = wibox.container.background
127 | }
128 |
129 | -- Delete notification box
130 | local notifbox_delete = function()
131 | notifbox_layout:remove_widgets(notifbox, true)
132 | end
133 |
134 | -- Delete notifbox on LMB
135 | notifbox_dismiss:buttons(
136 | awful.util.table.join(
137 | awful.button(
138 | {},
139 | 1,
140 | function()
141 | if #notifbox_layout.children == 1 then
142 | reset_notifbox_layout()
143 | else
144 | notifbox_delete()
145 | end
146 | collectgarbage('collect')
147 | end
148 | )
149 | )
150 | )
151 |
152 | -- Add hover, and mouse leave events
153 | notifbox_template:connect_signal(
154 | 'mouse::enter',
155 | function()
156 | notifbox.bg = beautiful.xcolor8
157 | notifbox_timepop.visible = false
158 | notifbox_dismiss.visible = true
159 | end
160 | )
161 |
162 | notifbox_template:connect_signal(
163 | 'mouse::leave',
164 | function()
165 | notifbox.bg = beautiful.tranparent
166 | notifbox_timepop.visible = true
167 | notifbox_dismiss.visible = false
168 | end
169 | )
170 |
171 | collectgarbage('collect')
172 |
173 | return notifbox
174 | end
175 |
176 |
177 | return notifbox_box
--------------------------------------------------------------------------------