Start work on eww. Switch back to kitty as terminal. Drop Neovide, because it doesn't work with Noice. Add Noice to neovim. And more that I forgot.

arch
kalle 2022-10-16 22:41:38 +02:00
parent 6b70e64f84
commit e664956065
17 changed files with 440 additions and 105 deletions

View File

@ -5,12 +5,9 @@
# Add ~/bin and ~/bin/scripts to my path # Add ~/bin and ~/bin/scripts to my path
export PATH=$PATH:$HOME/bin/:$HOME/bin/scripts/:$HOME/.cargo/bin export PATH=$PATH:$HOME/bin/:$HOME/bin/scripts/:$HOME/.cargo/bin
NEOVIDE_COMMAND="env WINIT_UNIX_BACKEND=x11 neovide --multigrid"
# Set editor to neovim. # Set editor to neovim.
alias neovide=$NEOVIDE_COMMAND alias edit=nvim
alias edit=$NEOVIDE_COMMAND export EDITOR="nvim"
export EDITOR="$NEOVIDE_COMMAND --nofork"
# Prompt stuff # Prompt stuff
# #
@ -133,6 +130,8 @@ alias gg="git log --graph --abbrev-commit --decorate --format=format:'%C(bold bl
alias gca="git add -A; git commit -a --amend --no-edit" alias gca="git add -A; git commit -a --amend --no-edit"
alias gs="git status" alias gs="git status"
alias proj="cd-projects" alias proj="cd-projects"
# Use the kitty kitten for ssh so sessions can be cached and remote editing/session cloning is possible.
alias ssh="kitty +kitten ssh"
#THIS MUST BE AT THE END OF THE FILE FOR SDKMAN TO WORK!!! #THIS MUST BE AT THE END OF THE FILE FOR SDKMAN TO WORK!!!
export SDKMAN_DIR="$HOME/.sdkman" export SDKMAN_DIR="$HOME/.sdkman"

11
eww/_variables.yuck Normal file
View File

@ -0,0 +1,11 @@
(defpoll time :interval "10s" "date '+%H:%M'")
(defpoll year :interval "10h" "date '+%Y'")
(defpoll date :interval "30m" "date '+%m-%d'")
(defpoll media-player_art-url :interval "10s" "playerctl metadata mpris:artUrl")
(defpoll media-player_status :interval "10s" "playerctl status")
(defpoll media-player_title :interval "10s" "playerctl metadata xesam:title | ellipse -n 30")
(defpoll media-player_artist :interval "10s" "playerctl metadata xesam:artist")
; TODO: Change this to a script that gets polled every x seconds. Or even a script in the window manager to update this variable when changing workspace.
(defvar workspace 1)

130
eww/bar.yuck Normal file
View File

@ -0,0 +1,130 @@
(defwidget user-icon []
(eventbox :class "user-icon"
(box :class "img"
:height 50
:width 50)
)
)
(defwidget notifications []
(eventbox :class "notifications"
""
)
)
(defwidget audio []
(eventbox :class "audio"
:onclick "eww open --toggle audio"
"墳"
))
(defwidget clipboard []
(eventbox :class "clipboard"
""
)
)
(defwidget top []
(box :class "top"
:space-evenly "false"
:valign "start"
:orientation "v"
(user-icon) ; TODO: User Icon - Opens misc menu
(notifications) ; TODO: notifications - Opens notification menu
(audio) ; TODO: Audio - Opens audio menu (music controls and volume)
(clipboard); TODO: Clipboard - Opens clipboard menu (clipboard history click to make current)
)
)
(defwidget workspace []
(box :class "workspace"
:orientation "v"
:halign "center"
:space-evenly "true"
(box :class {workspace == 1 ? "single-selected" : "single"}
:width 25
:height 25)
(box :class {workspace == 2 ? "single-selected" : "single"}
:width 25
:height 25)
(box :class {workspace == 3 ? "single-selected" : "single"}
:width 25
:height 25)
(box :class {workspace == 4 ? "single-selected" : "single"}
:width 25
:height 25)
(box :class {workspace == 5 ? "single-selected" : "single"}
:width 25
:height 25)
(box :class {workspace == 6 ? "single-selected" : "single"}
:width 25
:height 25)
(box :class {workspace == 7 ? "single-selected" : "single"}
:width 25
:height 25)
(box :class {workspace == 8 ? "single-selected" : "single"}
:width 25
:height 25)
(box :class {workspace == 9 ? "single-selected" : "single"}
:width 25
:height 25)
(box :class {workspace == 10 ? "single-selected" : "single"}
:width 25
:height 25)
)
)
(defwidget center []
(box :class "top"
:space-evenly "false"
:valign "center"
:orientation "v"
(workspace) ; TODO: Workspace indicator - Highlight current workspace (Click to go to?)
)
)
(defwidget time []
(eventbox :class "time"
time
)
)
(defwidget date []
(eventbox :class "date"
(box :orientation "v"
year
date
)
)
)
(defwidget bottom []
(box :class "top"
:space-evenly "false"
:valign "end"
:orientation "v"
(time) ; TODO: Time - Open timer/stopwatch menu?
(date) ; TODO: Year month day - Open calendar/upcomming events list (source these from some daemon?)
)
)
(defwidget bar []
(box :class "bar"
:orientation "v"
(top)
(center)
(bottom)
)
)
(defwindow bar
:monitor 2
:geometry (geometry :x "0px"
:y "0px"
:width "50px"
:height "100%"
:anchor "top left")
:stacking "fg"
:exclusive true
(bar)
)

78
eww/eww.scss Normal file
View File

@ -0,0 +1,78 @@
$clr-primary: #883333;
$clr-background: rgba(0, 0, 0, 0.75);
.bar {
background-color: $clr-background;
.user-icon {
// &:hover {
// background-color: rgba(#888888, 0.2);
// }
.img {
background-image: url("file:///home/kalle/Pictures/Wallpapers/Boat.jpg");
background-size: cover;
border-radius: 100%;
margin: 5px;
}
}
.notifications, .audio, .clipboard {
font-size: 30px;
margin: 5px;
&:hover {
color: $clr-primary;
// background-color: rgba(#888888, 0.2);
}
}
.workspace {
.single, .single-selected {
margin: 5px;
border-radius: 100%;
border: 2px solid white;
}
.single-selected {
border-color: $clr-primary;
}
}
}
.audio {
background-color: $clr-background;
.audio-title {
font-size: 30px;
}
.media-player {
background-size: cover;
margin: 10px;
border-radius: 15px;
border: 2px solid black;
padding: 10px 20px 10px 20px;
.title {
font-size: 25px;
}
.artist {
font-size: 14px;
color: #aaaaaa;
}
.buttons {
.previous, .pause, .next {
background-color: rgba(0, 0, 0, 0.5);
border-radius: 25px;
label {
margin: 10px;
font-size: 20px;
}
}
}
}
}

4
eww/eww.yuck Normal file
View File

@ -0,0 +1,4 @@
(include "_variables.yuck")
(include "bar.yuck")
(include "volume.yuck")

72
eww/volume.yuck Normal file
View File

@ -0,0 +1,72 @@
(defwidget media-player []
(box :class "media-player"
:orientation "v"
:height 200
:style "background-image: radial-gradient(
circle farthest-side at left,
rgba(0, 0, 0, 0.9) 40%,
rgba(0, 0, 0, 0.2) 70%),
url('${media-player_art-url}');"
(box :orientation "v"
(box :class "title"
:halign "start"
media-player_title
)
(box :class "artist"
:halign "start"
media-player_artist
)
)
(box :class "buttons"
:valign "end"
:orientation "h"
:space-evenly true
:spacing 50
(eventbox :class "previous"
:width 40
:onclick "playerctl previous"
"玲"
)
(eventbox :class "pause"
:width 40
:onclick "playerctl play-pause"
${media-player_status == "Playing" ? "" : "契"}
)
(eventbox :class "next"
:width 40
:onclick "playerctl next"
"怜"
)
)
)
)
(defwidget audio-title []
(box :class "audio-title"
:valign "start"
"Audio"
)
)
(defwidget audio-window []
(box :class "audio"
:orientation "v"
:space-evenly false
; (audio-title)
(media-player)
)
)
(defwindow audio
:monitor 2
:geometry (geometry :x "50px"
:y "0px"
:width "500px"
:height "100%"
:anchor "top left")
:stacking "fg"
:exclusive true
(audio-window)
)

View File

@ -1,14 +0,0 @@
### [kitty](https://sw.kovidgoyal.net/kitty/)
#### Install
Download using the [GitHub .zip download](https://github.com/dracula/kitty/archive/master.zip) option
```
$ cp dracula.conf diff.conf ~/.config/kitty/
$ echo "include dracula.conf" >> ~/.config/kitty/kitty.conf
```
Then reload kitty for the config to take affect.
Alternatively copy paste `dracula.conf` directly into `kitty.conf`.

View File

@ -1,62 +0,0 @@
# https://draculatheme.com/kitty
#
# Installation instructions:
#
# cp dracula.conf ~/.config/kitty/
# echo "include dracula.conf" >> ~/.config/kitty/kitty.conf
#
# Then reload kitty for the config to take affect.
# Alternatively copy paste below directly into kitty.conf
foreground #f8f8f2
background #282a36
selection_foreground #ffffff
selection_background #44475a
url_color #8be9fd
# black
color0 #21222c
color8 #6272a4
# red
color1 #ff5555
color9 #ff6e6e
# green
color2 #50fa7b
color10 #69ff94
# yellow
color3 #f1fa8c
color11 #ffffa5
# blue
color4 #bd93f9
color12 #d6acff
# magenta
color5 #ff79c6
color13 #ff92df
# cyan
color6 #8be9fd
color14 #a4ffff
# white
color7 #f8f8f2
color15 #ffffff
# Cursor colors
cursor #f8f8f2
cursor_text_color background
# Tab bar colors
active_tab_foreground #282a36
active_tab_background #f8f8f2
inactive_tab_foreground #282a36
inactive_tab_background #6272a4
# Marks
mark1_foreground #282a36
mark1_background #ff5555

View File

@ -1,8 +1,3 @@
font_family "Roboto Mono Nerd Font" font_family Fira Code
bold_font auto
italic_font auto
bold_italic_font auto
background_opacity 0.8 background_opacity 0.8
include dracula.conf

View File

@ -17,6 +17,8 @@ vim.opt.tabstop = 4
vim.opt.smartindent = true vim.opt.smartindent = true
vim.opt.modeline = true vim.opt.modeline = true
vim.opt.spell = true
vim.opt.undofile = true vim.opt.undofile = true
vim.g.mapleader = ' ' vim.g.mapleader = ' '
@ -40,9 +42,4 @@ vim.cmd('colorscheme carbonfox')
require('kalle.config') require('kalle.config')
-- TODO: -- TODO:
-- - Terminal panel at the bottem that can be hidden / shown with a hotkey (<Leader>ts [Leader Toggle Shell]?) [https://github.com/akinsho/toggleterm.nvim] -- - Debugger integration (gdb?, java?/kotlin?, rust?, etc) - nvim-dap and friends
-- - Spell checker
-- - Debugger integration (gdb?, java?/kotlin?, rust?, etc)
-- - https://github.com/SmiteshP/nvim-navic
-- - https://github.com/simrat39/symbols-outline.nvim
-- - More...?

View File

@ -46,4 +46,7 @@ Keybind.g({
{ 'n', '<Leader>cr', '<Cmd>Telescope lsp_references<CR>', {noremap = true, desc = 'References' } }, { 'n', '<Leader>cr', '<Cmd>Telescope lsp_references<CR>', {noremap = true, desc = 'References' } },
-- [ space + c] -- [ space + c]
{ 'n', '<Leader>cd', '<Cmd>Telescope lsp_definitions<CR>', {noremap = true, desc = 'Definitions' } }, { 'n', '<Leader>cd', '<Cmd>Telescope lsp_definitions<CR>', {noremap = true, desc = 'Definitions' } },
{ 'n', '<A-t>', '<CMD>lua require("FTerm").toggle()<CR>', {noremap = true, desc = 'Terminal' } },
{ 't', '<A-t>', '<C-\\><C-n><CMD>lua require("FTerm").toggle()<CR>', {noremap = true, desc = 'Terminal' } },
}) })

View File

@ -66,15 +66,16 @@ cmp.setup.cmdline('/', {
} }
}) })
-- Use cmdline & path source for ':' (if you enabled `native_menu`, this won't work anymore). -- TODO: This doesn't seem to work with Noice. Maybe it starts to work with a new release.
cmp.setup.cmdline(':', { -- -- Use cmdline & path source for ':' (if you enabled `native_menu`, this won't work anymore).
mapping = cmp.mapping.preset.cmdline(), -- cmp.setup.cmdline(':', {
sources = cmp.config.sources({ -- mapping = cmp.mapping.preset.cmdline(),
{ name = 'path' } -- sources = cmp.config.sources({
}, { -- { name = 'path' }
{ name = 'cmdline' } -- }, {
}) -- { name = 'cmdline' }
}) -- })
-- })
-- The nvim-cmp almost supports LSP's capabilities so You should advertise it to LSP servers.. -- The nvim-cmp almost supports LSP's capabilities so You should advertise it to LSP servers..
local capabilities = vim.lsp.protocol.make_client_capabilities() local capabilities = vim.lsp.protocol.make_client_capabilities()

View File

@ -12,10 +12,51 @@ require('Comment').setup()
require('illuminate').configure() require('illuminate').configure()
require("telescope").load_extension("ui-select") require("telescope").load_extension("ui-select")
require("todo-comments").setup {} require("todo-comments").setup {}
require'FTerm'.setup {}
require('gitsigns').setup { require('gitsigns').setup {
current_line_blame = true, current_line_blame = true,
} }
-- TODO: Move this to a better place.
require("noice").setup({
routes = {
{
filter = {
event = "cmdline",
find = "^%s*[/?]",
},
view = "cmdline",
},
},
views = {
cmdline_popup = {
position = {
row = 5,
col = "50%",
},
size = {
width = 60,
height = "auto",
},
},
popupmenu = {
relative = "editor",
position = {
row = 8,
col = "50%",
},
size = {
width = 60,
height = 10,
},
border = {
style = "rounded",
padding = { 0, 1 },
},
win_options = {
winhighlight = { Normal = "Normal", FloatBorder = "DiagnosticInfo" },
},
},
},
})

View File

@ -16,6 +16,18 @@ return require('packer').startup({function(use)
use('wbthomason/packer.nvim') use('wbthomason/packer.nvim')
use('EdenEast/nightfox.nvim') use('EdenEast/nightfox.nvim')
use('folke/which-key.nvim') use('folke/which-key.nvim')
use('numToStr/FTerm.nvim')
use({
"folke/noice.nvim",
commit = "312ac20daeae1ba73c300671bbf8d405419a33ef", -- FIX: This is only here because the next commit breaks something...
requires = {
-- if you lazy-load any plugin below, make sure to add proper `module="..."` entries
"MunifTanjim/nui.nvim",
"rcarriga/nvim-notify",
}
})
use('elkowar/yuck.vim')
use('numToStr/Comment.nvim') use('numToStr/Comment.nvim')
use('RRethy/vim-illuminate') use('RRethy/vim-illuminate')
@ -25,7 +37,6 @@ return require('packer').startup({function(use)
run = function() require('nvim-treesitter.install').update({ with_sync = true }) end, run = function() require('nvim-treesitter.install').update({ with_sync = true }) end,
} }
use('antoinemadec/FixCursorHold.nvim')
use { use {
'kosayoda/nvim-lightbulb', 'kosayoda/nvim-lightbulb',
requires = 'antoinemadec/FixCursorHold.nvim', requires = 'antoinemadec/FixCursorHold.nvim',

View File

@ -79,6 +79,11 @@ _G.packer_plugins = {
path = "/home/kalle/.local/share/nvim/site/pack/packer/start/Comment.nvim", path = "/home/kalle/.local/share/nvim/site/pack/packer/start/Comment.nvim",
url = "https://github.com/numToStr/Comment.nvim" url = "https://github.com/numToStr/Comment.nvim"
}, },
["FTerm.nvim"] = {
loaded = true,
path = "/home/kalle/.local/share/nvim/site/pack/packer/start/FTerm.nvim",
url = "https://github.com/numToStr/FTerm.nvim"
},
["FixCursorHold.nvim"] = { ["FixCursorHold.nvim"] = {
loaded = true, loaded = true,
path = "/home/kalle/.local/share/nvim/site/pack/packer/start/FixCursorHold.nvim", path = "/home/kalle/.local/share/nvim/site/pack/packer/start/FixCursorHold.nvim",
@ -164,6 +169,16 @@ _G.packer_plugins = {
path = "/home/kalle/.local/share/nvim/site/pack/packer/start/nightfox.nvim", path = "/home/kalle/.local/share/nvim/site/pack/packer/start/nightfox.nvim",
url = "https://github.com/EdenEast/nightfox.nvim" url = "https://github.com/EdenEast/nightfox.nvim"
}, },
["noice.nvim"] = {
loaded = true,
path = "/home/kalle/.local/share/nvim/site/pack/packer/start/noice.nvim",
url = "https://github.com/folke/noice.nvim"
},
["nui.nvim"] = {
loaded = true,
path = "/home/kalle/.local/share/nvim/site/pack/packer/start/nui.nvim",
url = "https://github.com/MunifTanjim/nui.nvim"
},
["nvim-cmp"] = { ["nvim-cmp"] = {
loaded = true, loaded = true,
path = "/home/kalle/.local/share/nvim/site/pack/packer/start/nvim-cmp", path = "/home/kalle/.local/share/nvim/site/pack/packer/start/nvim-cmp",
@ -194,6 +209,11 @@ _G.packer_plugins = {
path = "/home/kalle/.local/share/nvim/site/pack/packer/start/nvim-lspconfig", path = "/home/kalle/.local/share/nvim/site/pack/packer/start/nvim-lspconfig",
url = "https://github.com/neovim/nvim-lspconfig" url = "https://github.com/neovim/nvim-lspconfig"
}, },
["nvim-notify"] = {
loaded = true,
path = "/home/kalle/.local/share/nvim/site/pack/packer/start/nvim-notify",
url = "https://github.com/rcarriga/nvim-notify"
},
["nvim-tree.lua"] = { ["nvim-tree.lua"] = {
loaded = true, loaded = true,
path = "/home/kalle/.local/share/nvim/site/pack/packer/start/nvim-tree.lua", path = "/home/kalle/.local/share/nvim/site/pack/packer/start/nvim-tree.lua",
@ -258,6 +278,11 @@ _G.packer_plugins = {
loaded = true, loaded = true,
path = "/home/kalle/.local/share/nvim/site/pack/packer/start/which-key.nvim", path = "/home/kalle/.local/share/nvim/site/pack/packer/start/which-key.nvim",
url = "https://github.com/folke/which-key.nvim" url = "https://github.com/folke/which-key.nvim"
},
["yuck.vim"] = {
loaded = true,
path = "/home/kalle/.local/share/nvim/site/pack/packer/start/yuck.vim",
url = "https://github.com/elkowar/yuck.vim"
} }
} }

View File

@ -11,3 +11,47 @@ carbonfox
lua lua
github github
nvim nvim
treesitter
FixCursorHold
lightbulb
antoinemadec
kosayoda
kyazdani42
devicons
lspconfig
williamboman
simrat39
chentoast
neovim
mfussenegger
rcarriga
theHamsta
dap
ui
jayp0521
MunifTanjim
noice
folke
numToStr
EdenEast
wbthomason
nui
RRethy
hrsh7th
cmp
cmdline
vsnip
lsp
bufdelete
famiu
TimUntersberger
lewis6991
neogit
gitsigns
lualine
bufferline
akinsho
v2
todo
nightfox
FTerm

Binary file not shown.