Various items

- [X11] Bring .xinitrc under version control
- [awesome] Clean up autorun script
- [awesome] Clean up config
- [neovim] Clean up config, minor changes
This commit is contained in:
Adam Cooper 2023-10-01 13:22:26 -04:00
parent 23a1c1447d
commit a3fa29cde3
7 changed files with 46 additions and 31 deletions

14
X11/.xinitrc Normal file
View File

@ -0,0 +1,14 @@
#!/bin/sh
[[ -f ~/.Xresources ]] && xrdb -merge -I"$HOME" ~/.Xresources
xbindkeys
# From the xinitrc default
if [ -d /etc/X11/xinit/xinitrc.d ] ; then
for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do
[ -x "$f" ] && . "$f"
done
unset f
fi
exec startxfce4

View File

@ -7,14 +7,16 @@ run() {
fi
}
# Currently not working
run "alacritty --title bottom -e btm --battery"
run "cbatticon"
run "blueman-applet"
run "nm-applet --no-agent"
run "nextcloud --background"
run "pasystray"
run "keepassxc"
run "alacritty msg create-window --title bottom -e btm --battery || alacritty --title bottom -e btm --battery"
run "wmctrl -r bottom -t 1"
run "alacrity msg create-window || alacritty"
run "xscreensaver -no-splash"
run "sleep 4"
run "wmctrl -r bottom -t 1"
run "keepassxc"

View File

@ -13,10 +13,7 @@ local beautiful = require("beautiful")
-- Notification library
local naughty = require("naughty")
local menubar = require("menubar")
-- local weather_widget = require("awesome-wm-widgets.weather-widget.weather")
local cpu_widget = require("awesome-wm-widgets.cpu-widget.cpu-widget")
local lain = require("lain")
-- local weather_widget = lain.widget.weather()
local ram_widget = require("awesome-wm-widgets.ram-widget.ram-widget")
local hotkeys_popup = require("awful.hotkeys_popup")
-- Enable hotkeys help widget for VIM and other apps
@ -226,20 +223,6 @@ awful.screen.connect_for_each_screen(function(s)
s.mytasklist, -- Middle widget
{ -- Right widgets
layout = wibox.layout.fixed.horizontal,
-- mykeyboardlayout,
-- weather_widget(
-- {
-- api_key = "f6497dd133dd22b541abc8bbe8360f3b",
-- APPID = "f6497dd133dd22b541abc8bbe8360f3b",
-- coordinates = {40.689, -73.983},
-- city_id = 5110302,
-- }
-- ),
lain.widget.weather({
APPID = "f6497dd133dd22b541abc8bbe8360f3b",
city_id = 5110302,
units = "imperial",
}).icon,
cpu_widget(),
ram_widget({
widget_height = 48,

View File

@ -25,14 +25,28 @@ vim.opt.cursorline = true
vim.opt.foldmethod = "indent"
vim.opt.foldlevel = 99
-- Terminal colors
vim.opt.termguicolors = true
-- Cursor line context
vim.opt.scrolloff = 5
-- netrw
vim.g.netrw_winsize = 25
vim.g.netrw_liststyle = 3 -- tree style listing
-- Escape exits terminal mode
vim.api.nvim_set_keymap("t", "<Esc", "<c-\\><c-n>", { noremap = true })
-- Sane vim split naviagation (via Gaslight blog)
vim.api.nvim_set_keymap("n", "<c-j>", "<c-w>j", { noremap = true })
vim.api.nvim_set_keymap("n", "<c-k>", "<c-w>k", { noremap = true })
vim.api.nvim_set_keymap("n", "<c-h>", "<c-w>h", { noremap = true })
vim.api.nvim_set_keymap("n", "<c-l>", "<c-w>l", { noremap = true })
-- Disable filetype detection
-- vim.opt.filetype = "off"
vim.api.nvim_set_keymap("t", "<c-j>", "<c-\\><c-n><c-w>j", { noremap = true })
vim.api.nvim_set_keymap("t", "<c-k>", "<c-\\><c-n><c-w>k", { noremap = true })
vim.api.nvim_set_keymap("t", "<c-h>", "<c-\\><c-n><c-w>h", { noremap = true })
vim.api.nvim_set_keymap("t", "<c-l>", "<c-\\><c-n><c-w>l", { noremap = true })
-- vim-plug
vim.cmd([[
@ -42,6 +56,11 @@ vim.cmd([[
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
endif
function! Cond(cond, ...)
let opts = get(a:000, 0, {})
return a:cond ? extend(opts, { 'on': [], 'for: [] })
endfunction
call plug#begin('~/.config/nvim/plugged')
Plug 'williamboman/mason.nvim'
Plug 'williamboman/mason-lspconfig.nvim'
@ -71,16 +90,11 @@ require('mason').setup()
require('mason-lspconfig').setup()
require('lualine').setup {
{
options = { theme = 'dracula' }
},
{
options = { theme = 'dracula' },
tabline = {
lualine_a = { 'buffers' },
lualine_z = { 'tabs' }
}
}
}
local builtin = require('telescope.builtin')
vim.keymap.set('n', '<leader>ff', builtin.find_files, {})

View File

@ -8,6 +8,7 @@ import XMonad.Util.Ungrab
import XMonad.Config.Xfce
main :: IO ()
-- main :: XConfig l
main = xmonad
. ewmh
=<< statusBar "xmobar" myXmobarPP toggleStrutsKey myConfig

View File

@ -158,3 +158,4 @@ rga-fzf() {
echo "opening $file" &&
xdg-open "$file"
}

View File

@ -1,2 +1,2 @@
alias exi='exa --icons --group -al'
alias exi='eza --icons --group -al'
alias qb='QT_SCALE_FACTOR=1.5 /usr/bin/qutebrowser &'