Compare commits

..

No commits in common. "7f291a988ba18f659f7422624dea98de63e86f72" and "6a9892b0e90eb9c629961d947b9df328aa2460b6" have entirely different histories.

11 changed files with 387 additions and 123 deletions

View File

@ -1,2 +1,2 @@
5 */2 * * * apt-get update
5 */2 * * * /usr/bin/pacman -Syuw --noconfirm
*/30 * * * * /usr/bin/updatedb

View File

@ -1,2 +1,2 @@
*/5 * * * * XDG_RUNTIME_DIR=/run/user/$(id -u) /home/grfreire/.scripts/bin/check_battery
*/20 * * * * /usr/bin/newsboat -x reload
0 */2 * * * $HOME/.config/code/update-extensions.sh

View File

@ -1,11 +1,10 @@
function setTheme(theme)
if theme == 'bamboo' then
require('bamboo').setup({});
require('bamboo').load();
elseif theme == 'sonokai' then
vim.cmd 'colorscheme sonokai';
vim.opt.termguicolors = false;
end
function SetColor(color)
color = color or "oxocarbon"
vim.cmd.colorscheme(color)
-- Transparent background
-- vim.api.nvim_set_hl(0, "Normal", { bg = "none" })
-- vim.api.nvim_set_hl(0, "NormalFloat", { bg = "none" })
end
setTheme('sonokai')
SetColor()

View File

@ -1,25 +1,60 @@
require("mason").setup()
require("mason-lspconfig").setup({})
local lsp = require("lsp-zero")
local cmp = require('cmp')
lsp.preset("recommended")
cmp.setup({
sources = {
{ name = 'nvim_lsp' },
},
snippet = {
expand = function(args)
-- You need Neovim v0.10 to use vim.snippet
vim.snippet.expand(args.body)
end,
},
mapping = cmp.mapping.preset.insert({}),
require("mason").setup({})
require("mason-lspconfig").setup({
ensure_installed = {'lua_ls', 'clangd', 'eslint', 'tsserver'},
handlers = { lsp.default_setup }
})
vim.api.nvim_create_autocmd('LspAttach', {
desc = 'LSP actions',
callback = function(event)
local opts = { buffer = event.buf }
-- Fix Undefined global 'vim'
lsp.configure('lua_ls', {
settings = {
Lua = {
diagnostics = {
globals = { 'vim' }
}
}
}
})
local cmp = require('cmp')
local cmp_select = {behavior = cmp.SelectBehavior.Select}
local cmp_mappings = lsp.defaults.cmp_mappings({
['<C-p>'] = cmp.mapping.select_prev_item(cmp_select),
['<C-n>'] = cmp.mapping.select_next_item(cmp_select),
['<CR>'] = cmp.mapping.confirm({ select = true }),
["<C-Space>"] = cmp.mapping.complete(),
})
-- disable completion with tab
-- this helps with copilot setup
cmp_mappings['<Tab>'] = nil
cmp_mappings['<S-Tab>'] = nil
cmp.setup({
mapping = cmp_mappings
})
lsp.set_preferences({
suggest_lsp_servers = false,
sign_icons = {
error = 'E',
warn = 'W',
hint = 'H',
info = 'I'
}
})
lsp.on_attach(function(client, bufnr)
local opts = {buffer = bufnr, remap = false}
if client.name == "eslint" then
vim.cmd.LspStop('eslint')
return
end
vim.keymap.set("n", "gd", vim.lsp.buf.definition, opts)
vim.keymap.set("n", "K", vim.lsp.buf.hover, opts)
@ -31,5 +66,10 @@ vim.api.nvim_create_autocmd('LspAttach', {
vim.keymap.set("n", "<leader>vrr", vim.lsp.buf.references, opts)
vim.keymap.set("n", "<leader>vrn", vim.lsp.buf.rename, opts)
vim.keymap.set("i", "<C-h>", vim.lsp.buf.signature_help, opts)
end,
end)
lsp.setup()
vim.diagnostic.config({
virtual_text = true,
})

View File

@ -16,8 +16,14 @@ return require('packer').startup(function(use)
requires = { { 'nvim-lua/plenary.nvim' } }
}
use { 'ribru17/bamboo.nvim' }
use { 'sainnhe/sonokai' }
use({
"nyoom-engineering/oxocarbon.nvim",
as = "oxocarbon",
config = function ()
vim.opt.background = "dark"
vim.cmd('colorscheme oxocarbon')
end
})
-- Tree-sitter - AST capabilities for neovim
use('nvim-treesitter/nvim-treesitter', { run = ':TSUpdate' })

View File

@ -1,11 +1,207 @@
#################################
# Animations #
#################################
# requires https://github.com/jonaburg/picom
# (These are also the default values)
transition-length = 120
transition-pow-x = 0.1
transition-pow-y = 0.1
transition-pow-w = 0.1
transition-pow-h = 0.1
size-transition = true
#################################
# Corners #
#################################
# requires: https://github.com/sdhand/compton or https://github.com/jonaburg/picom
corner-radius = 8.0;
rounded-corners-exclude = [
"class_g = 'Dunst'",
"! name~=''",
#"window_type = 'normal'",
];
round-borders = 1;
round-borders-exclude = [
];
#################################
# Fading #
#################################
# Fade windows in/out when opening/closing and when opacity changes,
# unless no-fading-openclose is used.
# fading = false
fading = true;
# Opacity change between steps while fading in. (0.01 - 1.0, defaults to 0.028)
# fade-in-step = 0.028
fade-in-step = 0.3;
# Opacity change between steps while fading out. (0.01 - 1.0, defaults to 0.03)
# fade-out-step = 0.03
fade-out-step = 0.3;
# The time between steps in fade step, in milliseconds. (> 0, defaults to 10)
# fade-delta = 10
# Specify a list of conditions of windows that should not be faded.
# don't need this, we disable fading for all normal windows with wintypes: {}
fade-exclude = [
"class_g = 'slop'", # maim
"! name~=''",
]
# Do not fade on window open/close.
# no-fading-openclose = false
# Do not fade destroyed ARGB windows with WM frame. Workaround of bugs in Openbox, Fluxbox, etc.
# no-fading-destroyed-argb = false
#################################
# Transparency / Opacity #
#################################
# Specify a list of opacity rules, in the format `PERCENT:PATTERN`,
# like `50:name *= "Firefox"`. picom-trans is recommended over this.
# Note we don't make any guarantee about possible conflicts with other
# programs that set '_NET_WM_WINDOW_OPACITY' on frame or client windows.
# example:
# opacity-rule = [ "80:class_g = 'URxvt'" ];
#
# opacity-rule = []
opacity-rule = [
];
#################################
# Background-Blurring #
#################################
blur: {
# requires: https://github.com/ibhagwan/picom
method = "kawase";
strength = 3;
}
# Exclude conditions for background blur.
blur-background-exclude = [
#"window_type = 'dock'",
#"window_type = 'desktop'",
#"class_g = 'URxvt'",
#
# prevents picom from blurring the background
# when taking selection screenshot with `main`
# https://github.com/naelstrof/maim/issues/130
"class_g = 'slop'",
"class_g = 'Gromit-mpx'",
"_GTK_FRAME_EXTENTS@:c",
"! name~=''",
];
#################################
# General Settings #
#################################
experimental-backends = true;
backend = "glx";
vsync = true;
unredir-if-possible = false;
# Enable/disable VSync.
vsync = true
detect-rounded-corners = false;
# Try to detect windows with rounded corners and don't consider them
# shaped windows. The accuracy is not very high, unfortunately.
detect-rounded-corners = true;
# Detect '_NET_WM_OPACITY' on client windows, useful for window managers
# not passing '_NET_WM_OPACITY' of client windows to frame windows.
#
# detect-client-opacity = false
detect-client-opacity = true;
glx-no-stencil = true;
# Specify refresh rate of the screen. If not specified or 0, picom will
# try detecting this with X RandR extension.
#
# refresh-rate = 60
refresh-rate = 0
# GLX backend: Avoid using stencil buffer, useful if you don't have a stencil buffer.
# Might cause incorrect opacity when rendering transparent content (but never
# practically happened) and may not work with blur-background.
# My tests show a 15% performance boost. Recommended.
#
glx-no-stencil = true
# GLX backend: Avoid rebinding pixmap on window damage.
# Probably could improve performance on rapid window content changes,
# but is known to break things on some drivers (LLVMpipe, xf86-video-intel, etc.).
# Recommended if it works.
#
# glx-no-rebind-pixmap = false
# Set the log level. Possible values are:
# "trace", "debug", "info", "warn", "error"
# in increasing level of importance. Case doesn't matter.
# If using the "TRACE" log level, it's better to log into a file
# using *--log-file*, since it can generate a huge stream of logs.
#
# log-level = "debug"
log-level = "info";
# Set the log file.
# If *--log-file* is never specified, logs will be written to stderr.
# Otherwise, logs will to written to the given file, though some of the early
# logs might still be written to the stderr.
# When setting this option from the config file, it is recommended to use an absolute path.
#
# log-file = '/path/to/your/log/file'
# Show all X errors (for debugging)
# show-all-xerrors = false
# Write process ID to a file.
# write-pid-path = '/path/to/your/log/file'
# Window type settings
#
# 'WINDOW_TYPE' is one of the 15 window types defined in EWMH standard:
# "unknown", "desktop", "dock", "toolbar", "menu", "utility",
# "splash", "dialog", "normal", "dropdown_menu", "popup_menu",
# "tooltip", "notification", "combo", and "dnd".
#
# Following per window-type options are available: ::
#
# fade, shadow:::
# Controls window-type-specific shadow and fade settings.
#
# opacity:::
# Controls default opacity of the window type.
#
# focus:::
# Controls whether the window of this type is to be always considered focused.
# (By default, all window types except "normal" and "dialog" has this on.)
#
# full-shadow:::
# Controls whether shadow is drawn under the parts of the window that you
# normally won't be able to see. Useful when the window has parts of it
# transparent, and you want shadows in those areas.
#
# redir-ignore:::
# Controls whether this type of windows should cause screen to become
# redirected again after been unredirected. If you have unredir-if-possible
# set, and doesn't want certain window to cause unnecessary screen redirection,
# you can set this to `true`.
#
wintypes:
{
normal = { fade = false; shadow = false; }
tooltip = { fade = true; shadow = true; opacity = 0.75; focus = true; full-shadow = false; };
dock = { shadow = false; }
dnd = { shadow = false; }
popup_menu = { opacity = 0.95; }
dropdown_menu = { opacity = 0.95; }
};
log-level = "warn";

View File

@ -7,7 +7,7 @@ lxpolkit &
/usr/bin/numlockx
# Start compositor
(sleep 1 && picom) &
(sleep 1 && picom --experimental-backends) &
# Start notification server
dunst &
@ -36,12 +36,6 @@ autoxsetwacom
# Run hotkey deamon
sxhkd &
# Make sure I always have a display active
~/.scripts/bin/display-restore loop &
# Run audio effects
easyeffects --gapplication-service &
# Run xidlehook
xidlehook \
`# Don't lock when there's a fullscreen application` \

View File

@ -153,8 +153,8 @@ extension_defaults = widget_defaults.copy()
def generate_bar(left=[], right=[]):
bg_color = colors["background"]
fg_color = colors["text"]
current_bg_color = colors["background"]
current_fg_color = colors["text"]
widgets = []
@ -164,7 +164,23 @@ def generate_bar(left=[], right=[]):
padding=0,
size_percent=100,
linewidth=width,
foreground=bg_color,
foreground=current_bg_color,
)
)
def create_arrow(bg=current_bg_color, fg=current_fg_color):
widgets.append(
widget.Sep(
padding=0,
size_percent=100,
linewidth=10,
background=fg,
foreground=bg,
)
)
widgets.append(
widget.TextBox(
text="", background=bg, foreground=fg, padding=-8, fontsize=60
)
)
@ -173,19 +189,38 @@ def generate_bar(left=[], right=[]):
for w in left:
widgets.append(w)
create_sep()
bg_color = colors["accent_color_dark"]
fg_color = colors["text"]
create_sep(5)
create_sep(4)
is_even = True
is_first_widget = True
for g in right:
if is_even:
current_bg_color = colors["accent_color_dark"]
is_even = False
else:
current_bg_color = colors["accent_color_light"]
is_even = True
if is_first_widget:
create_arrow(colors["background"], colors["accent_color_dark"])
is_first_widget = False
else:
create_arrow(
colors["accent_color_dark"]
if is_even
else colors["accent_color_light"],
colors["accent_color_light"]
if is_even
else colors["accent_color_dark"],
)
for w in g:
w.background = bg_color
w.foreground = fg_color
w.background = current_bg_color
w.foreground = current_fg_color
widgets.append(w)
create_sep(15)
create_sep()
return widgets
@ -269,7 +304,6 @@ def main_bar():
text="",
fontsize=22,
mouse_callbacks={"Button1": lambda: qtile.spawn(POWER_MENU)},
padding=10
),
],
],

View File

@ -9,8 +9,11 @@ super + w
super + f
pcmanfm --no-desktop -n
super + o ; {m}
{thunderbird}
super + b
bitwarden-desktop
super + o ; {m, w, c}
{thunderbird, libreoffice --writer, libreoffice --calc}
super + equal
boomer
@ -18,6 +21,9 @@ super + equal
super + r
rofi -icon-theme 'Paper' -show-icons -show drun
super + p
~/.scripts/bin/firefox-quick-keywords
super + shift + c
rofi -modi "clipboard:greenclip print" -show clipboard -run-command '{cmd}'
@ -27,6 +33,3 @@ super + alt + c
super + shift + e
~/.scripts/bin/clip-moji
ctrl + alt + t
~/.scripts/bin/restart-touchpad --notify

View File

@ -1,4 +1,4 @@
set selection-clipboard primary
set selection-clipboard clipboard
set statusbar-h-padding 0
set statusbar-v-padding 0
set page-padding 1

View File

@ -1,9 +1 @@
AddKeysToAgent yes
Host github.com
IdentityFile ~/.ssh/github
PreferredAuthentications publickey
Host *sr.ht
IdentityFile ~/.ssh/srht
PreferredAuthentications publickey