Major updates which account for customization, new nvim versions, polybar, starship

This commit is contained in:
pfm 2023-01-20 09:51:20 -06:00
parent a556b95829
commit b7c113644e
13 changed files with 487 additions and 137 deletions

View file

@ -191,60 +191,60 @@ font:
# Nightfox Alacritty Colors # Nightfox Alacritty Colors
# Style: terafox # Style: terafox
# Upstream: https://github.com/edeneast/nightfox.nvim/raw/main/extra/terafox/nightfox_alacritty.yml # Upstream: https://github.com/edeneast/nightfox.nvim/raw/main/extra/terafox/nightfox_alacritty.yml
colors: #colors:
primary:
background: '0x152528'
foreground: '0xe6eaea'
normal:
black: '0x2f3239'
red: '0xe85c51'
green: '0x7aa4a1'
yellow: '0xfda47f'
blue: '0x5a93aa'
magenta: '0xad5c7c'
cyan: '0xa1cdd8'
white: '0xebebeb'
bright:
black: '0x4e5157'
red: '0xeb746b'
green: '0x8eb2af'
yellow: '0xfdb292'
blue: '0x73a3b7'
magenta: '0xb97490'
cyan: '0xafd4de'
white: '0xeeeeee'
indexed_colors:
- { index: 16, color: '0xff8349' }
- { index: 17, color: '0xcb7985' }
# Gruvbox Material Hard Dark
# colors:
# primary: # primary:
# background: '0x1d2021' # background: '0x152528'
# foreground: '0xd4be98' # foreground: '0xe6eaea'
# #
# normal: # normal:
# black: '0x32302f' # black: '0x2f3239'
# red: '0xea6962' # red: '0xe85c51'
# green: '0xa9b665' # green: '0x7aa4a1'
# yellow: '0xd8a657' # yellow: '0xfda47f'
# blue: '0x7daea3' # blue: '0x5a93aa'
# magenta: '0xd3869b' # magenta: '0xad5c7c'
# cyan: '0x89b482' # cyan: '0xa1cdd8'
# white: '0xd4be98' # white: '0xebebeb'
# #
# bright: # bright:
# black: '0x32302f' # black: '0x4e5157'
# red: '0xea6962' # red: '0xeb746b'
# green: '0xa9b665' # green: '0x8eb2af'
# yellow: '0xd8a657' # yellow: '0xfdb292'
# blue: '0x7daea3' # blue: '0x73a3b7'
# magenta: '0xd3869b' # magenta: '0xb97490'
# cyan: '0x89b482' # cyan: '0xafd4de'
# white: '0xd4be98' # white: '0xeeeeee'
#
# indexed_colors:
# - { index: 16, color: '0xff8349' }
# - { index: 17, color: '0xcb7985' }
# Gruvbox Material Hard Dark
colors:
primary:
background: '0x1d2021'
foreground: '0xd4be98'
normal:
black: '0x32302f'
red: '0xea6962'
green: '0xa9b665'
yellow: '0xd8a657'
blue: '0x7daea3'
magenta: '0xd3869b'
cyan: '0x89b482'
white: '0xd4be98'
bright:
black: '0x32302f'
red: '0xea6962'
green: '0xa9b665'
yellow: '0xd8a657'
blue: '0x7daea3'
magenta: '0xd3869b'
cyan: '0x89b482'
white: '0xd4be98'
cursor: cursor:
text: CellBackground text: CellBackground

View file

@ -1,9 +1,4 @@
# This file has been auto-generated by i3-config-wizard(1). # vim: filetype=i3config
# It will not be overwritten, so edit it as you like.
#
# Should you change your keyboard layout some time, delete
# this file and re-run i3-config-wizard(1).
#
# i3 config file (v4) # i3 config file (v4)
# #
@ -15,13 +10,6 @@ set $mod Mod4
# is used in the bar {} block below. # is used in the bar {} block below.
font pango:Iosevka Term 11 font pango:Iosevka Term 11
# This font is widely installed, provides lots of unicode glyphs, right-to-left
# text rendering and scalability on retina/hidpi displays (thanks to pango).
#font pango:DejaVu Sans Mono 8
# The combination of xss-lock, nm-applet and pactl is a popular choice, so
# they are included here as an example. Modify as you see fit.
# Set the desktop background # Set the desktop background
exec --no-startup-id feh --bg-scale /home/pfm/images/backgrounds/nasa_carina_nircam.jpg exec --no-startup-id feh --bg-scale /home/pfm/images/backgrounds/nasa_carina_nircam.jpg
@ -49,14 +37,9 @@ bindsym $mod+Return exec alacritty
# kill focused window # kill focused window
bindsym $mod+Shift+q kill bindsym $mod+Shift+q kill
# start dmenu (a program launcher) # rofi - omnibar which can run new applications or show an open window and more
bindsym $mod+d exec --no-startup-id "rofi -show run" bindsym $mod+d exec --no-startup-id "rofi -show run"
bindsym $mod+p exec --no-startup-id "rofi -show window" bindsym $mod+p exec --no-startup-id "rofi -show window"
# A more modern dmenu replacement is rofi:
# bindcode $mod+40 exec "rofi -modi drun,run -show drun"
# There also is i3-dmenu-desktop which only displays applications shipping a
# .desktop file. It is a wrapper around dmenu, so you need that installed.
# bindcode $mod+40 exec --no-startup-id i3-dmenu-desktop
# change focus # change focus
bindsym $mod+j focus left bindsym $mod+j focus left
@ -64,24 +47,12 @@ bindsym $mod+k focus down
bindsym $mod+l focus up bindsym $mod+l focus up
bindsym $mod+semicolon focus right bindsym $mod+semicolon focus right
# alternatively, you can use the cursor keys:
bindsym $mod+Left focus left
bindsym $mod+Down focus down
bindsym $mod+Up focus up
bindsym $mod+Right focus right
# move focused window # move focused window
bindsym $mod+Shift+j move left bindsym $mod+Shift+j move left
bindsym $mod+Shift+k move down bindsym $mod+Shift+k move down
bindsym $mod+Shift+l move up bindsym $mod+Shift+l move up
bindsym $mod+Shift+semicolon move right bindsym $mod+Shift+semicolon move right
# alternatively, you can use the cursor keys:
bindsym $mod+Shift+Left move left
bindsym $mod+Shift+Down move down
bindsym $mod+Shift+Up move up
bindsym $mod+Shift+Right move right
# split in horizontal orientation # split in horizontal orientation
bindsym $mod+h split h bindsym $mod+h split h
@ -92,7 +63,6 @@ bindsym $mod+v split v
bindsym $mod+f fullscreen toggle bindsym $mod+f fullscreen toggle
# change container layout (stacked, tabbed, toggle split) # change container layout (stacked, tabbed, toggle split)
#bindsym $mod+s layout stacking
bindsym $mod+w layout tabbed bindsym $mod+w layout tabbed
#bindsym $mod+e layout toggle split #bindsym $mod+e layout toggle split
@ -105,6 +75,28 @@ bindsym $mod+space focus mode_toggle
# focus the parent container # focus the parent container
bindsym $mod+a focus parent bindsym $mod+a focus parent
bindsym $mod+s exec --no-startup-id "/home/pfm/bin/,ss-region"
bindsym $mod+Shift+s exec --no-startup-id "/home/pfm/bin/,ss-screen"
bindsym $mod+Control+s exec --no-startup-id "/home/pfm/bin/,ss-window"
# the default for workspaces should be tabbed
workspace_layout tabbed
# The indicator color is used for indicating where a new window will be opened.
# class | border | background | text | indicator | child_border
#client.focused #bdae93 #3c3836 #fbf1c7 #665c54 #665c54
client.focused #d65d0e #3c3836 #fbf1c7 #665c54 #665c54
client.focused_inactive #282828 #1d2021 #928374 #282828 #282828
client.unfocused #282828 #1d2021 #928374 #282828 #282828
title_align center
for_window [class=".*"] title_format "<b>%title</b>"
for_window [all] title_window_icon off
for_window [class="(?i)firefox"] border pixel 1
for_window [class="(?i)discord"] border pixel 1
#for_window [all] title_window_icon on
#for_window [all] title_window_icon padding 8px
# focus the child container # focus the child container
#bindsym $mod+d focus child #bindsym $mod+d focus child
@ -134,16 +126,16 @@ bindsym $mod+9 workspace number $ws9
bindsym $mod+0 workspace number $ws10 bindsym $mod+0 workspace number $ws10
# move focused container to workspace # move focused container to workspace
bindsym $mod+Shift+1 move container to workspace number $ws1 bindsym $mod+Shift+1 move container to workspace number 1
bindsym $mod+Shift+2 move container to workspace number $ws2 bindsym $mod+Shift+2 move container to workspace number 2
bindsym $mod+Shift+3 move container to workspace number $ws3 bindsym $mod+Shift+3 move container to workspace number 3
bindsym $mod+Shift+4 move container to workspace number $ws4 bindsym $mod+Shift+4 move container to workspace number 4
bindsym $mod+Shift+5 move container to workspace number $ws5 bindsym $mod+Shift+5 move container to workspace number 5
bindsym $mod+Shift+6 move container to workspace number $ws6 bindsym $mod+Shift+6 move container to workspace number 6
bindsym $mod+Shift+7 move container to workspace number $ws7 bindsym $mod+Shift+7 move container to workspace number 7
bindsym $mod+Shift+8 move container to workspace number $ws8 bindsym $mod+Shift+8 move container to workspace number 8
bindsym $mod+Shift+9 move container to workspace number $ws9 bindsym $mod+Shift+9 move container to workspace number 9
bindsym $mod+Shift+0 move container to workspace number $ws10 bindsym $mod+Shift+0 move container to workspace number 10
# reload the configuration file # reload the configuration file
bindsym $mod+Shift+c reload bindsym $mod+Shift+c reload
@ -179,8 +171,10 @@ mode "resize" {
bindsym $mod+r mode "resize" bindsym $mod+r mode "resize"
# Start i3bar to display a workspace bar (plus the system information i3status # Polybar
# finds out, if available) exec_always --no-startup-id $HOME/.config/polybar/launch.sh
bar {
status_command i3status # Backup plan -- use i3bar
} #bar {
#status_command i3status
#}

View file

@ -2,10 +2,11 @@ require('packer_init')
require('general') require('general')
require('colorscheme') require('colorscheme')
require('keymap') require('keymap')
require('plugins/floaterm')
require('plugins/cmp')
require('plugins/lsp') require('plugins/lsp')
require('plugins/scala') require('plugins/scala')
require('plugins/cmp') require('plugins/bufferline')
require('plugins/lualine') require('plugins/lualine')
require('plugins/telescope') require('plugins/telescope')
require('plugins/floaterm')
require('plugins/treesitter') require('plugins/treesitter')

View file

@ -1,9 +1,17 @@
-- I use dark terminals and schemes, so use a dark background. -- I use dark terminals and schemes, so use a dark background.
vim.opt.background = 'dark' vim.opt.background = 'dark'
--vim.opt.background = 'light'
-- Settings for gruvbox-material -- Settings for gruvbox-material
vim.g.gruvbox_material_palette = 'mix' --
--vim.g.gruvbox_material_palette = 'mix'
vim.g.gruvbox_material_palette = 'material'
--vim.g.gruvbox_material_palette = 'original'
--
vim.g.gruvbox_material_background = 'hard' vim.g.gruvbox_material_background = 'hard'
--vim.g.gruvbox_material_background = 'medium'
--vim.g.gruvbox_material_background = 'soft'
--
vim.g.gruvbox_material_enable_bold = 1 vim.g.gruvbox_material_enable_bold = 1
-- Settings for material -- Settings for material
@ -37,4 +45,4 @@ require('nightfox').setup({
}) })
-- Set the color scheme -- Set the color scheme
vim.cmd 'colorscheme terafox' vim.cmd 'colorscheme gruvbox-material'

View file

@ -36,6 +36,9 @@ map('n', '<leader>bd', ':bd<CR>')
-- Close the quickfix window -- Close the quickfix window
map('n', '<leader>cq', ':ccl<CR>') map('n', '<leader>cq', ':ccl<CR>')
-- Create a vertical split
map('n', '<leader>v', ':vsplit<CR>')
-- These appear broken with latest neovim, and nvim-cmp has -- These appear broken with latest neovim, and nvim-cmp has
-- settings that work in any case. Keep as a reminder for a -- settings that work in any case. Keep as a reminder for a
-- few weeks just in case. -- few weeks just in case.

View file

@ -3,7 +3,7 @@ local fn = vim.fn
local install_path = fn.stdpath('data') .. '/site/pack/packer/start/packer.nvim' local install_path = fn.stdpath('data') .. '/site/pack/packer/start/packer.nvim'
if fn.empty(fn.glob(install_path)) > 0 then if fn.empty(fn.glob(install_path)) > 0 then
packer_bootstrap = fn.system({ local _ = fn.system({
'git', 'git',
'clone', 'clone',
'--depth', '--depth',
@ -15,7 +15,7 @@ if fn.empty(fn.glob(install_path)) > 0 then
end end
-- Use a protected call so we don't error out on first use -- Use a protected call so we don't error out on first use
local status_ok, packer = pcall(require, 'packer') local status_ok, _ = pcall(require, 'packer')
if not status_ok then if not status_ok then
return return
end end
@ -97,13 +97,9 @@ return require('packer').startup(function(use)
} }
-- bufferline - shows a bar at the top with open buffers -- bufferline - shows a bar at the top with open buffers
-- using packer.nvim
use { use {
'akinsho/bufferline.nvim', 'akinsho/bufferline.nvim',
requires = 'kyazdani42/nvim-web-devicons', requires = 'kyazdani42/nvim-web-devicons'
config = function()
require('bufferline').setup()
end
} }
-- Floating terminal -- Floating terminal
@ -137,9 +133,6 @@ return require('packer').startup(function(use)
end end
} }
-- Improve startup time by replacing default filetype autocmds
use 'nathom/filetype.nvim'
-- Special highlighting and tracking for certain notable words -- Special highlighting and tracking for certain notable words
use { use {
'folke/todo-comments.nvim', 'folke/todo-comments.nvim',
@ -155,13 +148,10 @@ return require('packer').startup(function(use)
-- PlantUML syntax -- PlantUML syntax
use 'aklt/plantuml-syntax' use 'aklt/plantuml-syntax'
-- Conjure: Supports all Lisps that I work with.
use {
'Olical/conjure',
ft = { 'rkt', 'racket' }
}
-- Terraform -- Terraform
use 'hashivim/vim-terraform' use 'hashivim/vim-terraform'
-- i3 configuration syntax
use 'mboughaba/i3config.vim'
end) end)

View file

@ -0,0 +1,25 @@
require('bufferline').setup {
options = {
mode = 'buffers',
indicator = {
style = 'none'
},
diagnostics = 'nvim_lsp',
-- offsets appear to be broken
--offsets = {
-- filetype = 'NvimTree',
-- text = 'File Explorer',
-- highlight = 'Directory',
-- text_align = 'center',
-- separator = true
--},
color_icons = true,
show_buffer_icons = true,
show_buffer_close_icons = false,
separator_style = 'slant',
always_show_bufferline = true,
hover = {
enabled = false
},
},
}

View file

@ -32,12 +32,12 @@ cmp.setup{
end, end,
}, },
} }
-- Setup conjure, only for supported files -- Setup conjure, only for supported files
cmp.setup.filetype('racket', { --cmp.setup.filetype('racket', {
sources = { -- sources = {
{ name = 'conjure' }, -- { name = 'conjure' },
{ name = 'luasnip' }, -- { name = 'luasnip' },
{ name = 'path' }, -- { name = 'path' },
{ name = 'buffer', option = { keyword_length = 5 }, }, -- { name = 'buffer', option = { keyword_length = 5 }, },
} -- }
}) --})

View file

@ -3,9 +3,9 @@ local function metals_status_for_lualine()
end end
require('lualine').setup { require('lualine').setup {
--options = { options = {
-- theme = 'material' theme = 'gruvbox-material'
--}, },
sections = { sections = {
lualine_c = { lualine_c = {
'filename', 'filename',

192
.config/polybar/config.ini Normal file
View file

@ -0,0 +1,192 @@
[colors]
background = #1d2021
background-alt = #504945
foreground = #ebdbb2
foreground-alt = #555
primary = #fabd2f
secondary = #e60053
alert = #fb4934
[bar/pfm]
monitor = HDMI-0
bottom = true
width = 100%
height = 32
;offset-x = 1%
;offset-y = 1%
;radius = 6.0
radius = 0.0
fixed-center = false
background = ${colors.background}
foreground = ${colors.foreground}
line-size = 3
line-color = #f00
;border-size = 4
border-size = 0
border-color = #000000
padding-left = 4
padding-right = 4
module-margin-left = 1
module-margin-right = 3
font-0 = Iosevka Nerd Font Mono:pixelsize=11;1
font-1 = unifont:fontformat=truetype:size=11:antialias=false;0
font-2 = fixed:pixelsize=11;1
modules-left = i3
modules-center =
modules-right = eth pulseaudio filesystem memory cpu date
tray-position = center
tray-padding = 2
override-redirect = false
cursor-click = pointer
cursor-scroll = ns-resize
[module/xwindow]
type = internal/xwindow
label = %title:0:30:...%
[module/filesystem]
type = internal/fs
interval = 25
mount-0 = /
label-mounted = %{F#83a598}DISK%{F-}: %percentage_used%%
label-mounted-underline = #d79921
label-unmounted = %mountpoint% not mounted
label-unmounted-foreground = ${colors.foreground}
[module/i3]
type = internal/i3
format = <label-state> <label-mode>
index-sort = true
wrapping-scroll = false
; Only show workspaces on the same output as the bar
;pin-workspaces = true
label-mode-padding = 2
label-mode-foreground = #000
label-mode-background = ${colors.primary}
; focused = Active workspace on focused monitor
label-focused = %index%
label-focused-background = ${colors.background-alt}
label-focused-underline= ${colors.primary}
label-focused-padding = 2
; unfocused = Inactive workspace on any monitor
label-unfocused = %index%
label-unfocused-padding = 2
; visible = Active workspace on unfocused monitor
label-visible = %index%
label-visible-background = ${self.label-focused-background}
label-visible-underline = ${self.label-focused-underline}
label-visible-padding = ${self.label-focused-padding}
; urgent = Workspace with urgency hint set
label-urgent = %index%
label-urgent-background = ${colors.alert}
label-urgent-padding = 2
; Separator in between workspaces
label-separator = |
[module/cpu]
type = internal/cpu
interval = 3
format-prefix = "CPU "
format-prefix-foreground = ${colors.foreground}
format-underline = #d65d0e
label = %percentage:2%%
[module/memory]
type = internal/memory
interval = 3
format-prefix = "MEM "
format-prefix-foreground = ${colors.foreground}
format-underline = #458588
label = %percentage_used%%
[module/eth]
type = internal/network
interface = enp7s0
interval = 5.0
format-connected-underline = #98971a
;format-connected-prefix = "🗲 "
format-connected-prefix-foreground = ${colors.foreground}
label-connected = %ifname% %local_ip%
format-disconnected =
;format-disconnected = <label-disconnected>
;format-disconnected-underline = ${self.format-connected-underline}
;label-disconnected = %ifname% disconnected
;label-disconnected-foreground = ${colors.foreground-alt}
[module/date]
type = internal/date
interval = 5
date = " %Y-%m-%d%"
date-alt = " %Y-%m-%d"
time = %I:%M
time-alt = %I:%M:%S
format-prefix = ""
format-prefix-foreground = ${colors.foreground}
format-underline = #d3869b
label = %date% %time%
[module/pulseaudio]
type = internal/pulseaudio
format-volume = <label-volume> <bar-volume>
label-volume = VOL %percentage%%
label-volume-foreground = ${root.foreground}
label-muted = 🔇 muted
label-muted-foreground = #666
bar-volume-width = 10
bar-volume-foreground-0 = #55aa55
bar-volume-foreground-1 = #55aa55
bar-volume-foreground-2 = #55aa55
bar-volume-foreground-3 = #55aa55
bar-volume-foreground-4 = #55aa55
bar-volume-foreground-5 = #f5a70a
bar-volume-foreground-6 = #ff5555
bar-volume-gradient = false
bar-volume-indicator = |
bar-volume-indicator-font = 3
bar-volume-fill =
bar-volume-fill-font = 3
bar-volume-empty =
bar-volume-empty-font = 3
bar-volume-empty-foreground = ${colors.foreground}
[settings]
screenchange-reload = true
;compositing-background = xor
;compositing-background = screen
;compositing-foreground = source
;compositing-border = over
;pseudo-transparency = false
[global/wm]
margin-top = 5
margin-bottom = 5
; vim:ft=dosini

6
.config/polybar/launch.sh Executable file
View file

@ -0,0 +1,6 @@
#!/usr/bin/env bash
killall -q polybar
echo "---" >> /home/pfm/log/pfm/polybar.log
polybar pfm >> /home/pfm/log/pfm/polybar.log 2>&1 & disown

119
.config/starship.toml Normal file
View file

@ -0,0 +1,119 @@
# Get editor completions based on the config schema
"$schema" = 'https://starship.rs/config-schema.json'
# Inserts a blank line between shell prompts
add_newline = true
[character]
success_symbol = "[➜](bold #b5bd68)"
[time]
disabled = false
format = '[\[ $time \]]($style) '
style = "bold #b5bd68"
[directory]
read_only = " "
style = "bold white"
[git_branch]
symbol = " "
style = "bold #b294bb"
[rust]
symbol = " "
[lua]
symbol = " "
[nix_shell]
symbol = " "
[nodejs]
symbol = " "
[package]
symbol = " "
[python]
symbol = " "
[aws]
symbol = " "
disabled = true
[buf]
symbol = " "
disabled = true
[c]
symbol = " "
disabled = true
[conda]
symbol = " "
disabled = true
[dart]
symbol = " "
disabled = true
[docker_context]
symbol = " "
disabled = true
[elixir]
symbol = " "
disabled = true
[elm]
symbol = " "
disabled = true
[golang]
symbol = " "
disabled = true
[haskell]
symbol = " "
disabled = true
[hg_branch]
symbol = " "
disabled = true
[java]
symbol = " "
disabled = true
[julia]
symbol = " "
disabled = true
[memory_usage]
symbol = " "
disabled = true
[meson]
symbol = "喝 "
disabled = true
[nim]
symbol = " "
disabled = true
[rlang]
symbol = "ﳒ "
disabled = true
[ruby]
symbol = " "
disabled = true
[scala]
symbol = " "
disabled = true
[spack]
symbol = "🅢 "
disabled = true

12
.zshrc
View file

@ -1,5 +1,9 @@
eval "$(starship init zsh)" eval "$(starship init zsh)"
export HISTFILE="$HOME/.zsh_history"
export HISTSIZE=1000
export SAVEHIST=5000
# ============================================================================= # =============================================================================
# Personalized Logging for Shell Setup # Personalized Logging for Shell Setup
# ============================================================================= # =============================================================================
@ -109,6 +113,14 @@ if command -v sbt > /dev/null 2>&1; then
export SBT_OPTS="-XX:+UseG1GC -Xmx2048m" export SBT_OPTS="-XX:+UseG1GC -Xmx2048m"
fi fi
# =============================================================================
# Git Command Completion
# =============================================================================
zstyle ':completion:*:*:git:*' script ~/.zsh/git-completion.bash
fpath=(~/.zsh $fpath)
autoload -Uz compinit && compinit
# ============================================================================= # =============================================================================
# Enable Command Syntax Highlighting # Enable Command Syntax Highlighting