diff --git a/bash/.bashrc b/bash/.bashrc index 1a957ae..91a816a 100644 --- a/bash/.bashrc +++ b/bash/.bashrc @@ -5,12 +5,9 @@ # Add ~/bin and ~/bin/scripts to my path export PATH=$PATH:$HOME/bin/:$HOME/bin/scripts/:$HOME/.cargo/bin -NEOVIDE_COMMAND="env WINIT_UNIX_BACKEND=x11 neovide --multigrid" - # Set editor to neovim. -alias neovide=$NEOVIDE_COMMAND -alias edit=$NEOVIDE_COMMAND -export EDITOR="$NEOVIDE_COMMAND --nofork" +alias edit=nvim +export EDITOR="nvim" # 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 gs="git status" 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!!! export SDKMAN_DIR="$HOME/.sdkman" diff --git a/eww/_variables.yuck b/eww/_variables.yuck new file mode 100644 index 0000000..63993c5 --- /dev/null +++ b/eww/_variables.yuck @@ -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) diff --git a/eww/bar.yuck b/eww/bar.yuck new file mode 100644 index 0000000..0513cf3 --- /dev/null +++ b/eww/bar.yuck @@ -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) +) diff --git a/eww/eww.scss b/eww/eww.scss new file mode 100644 index 0000000..7fb6397 --- /dev/null +++ b/eww/eww.scss @@ -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; + } + } + } + } + +} + diff --git a/eww/eww.yuck b/eww/eww.yuck new file mode 100644 index 0000000..0d6ebda --- /dev/null +++ b/eww/eww.yuck @@ -0,0 +1,4 @@ +(include "_variables.yuck") +(include "bar.yuck") +(include "volume.yuck") + diff --git a/eww/volume.yuck b/eww/volume.yuck new file mode 100644 index 0000000..b6c1e45 --- /dev/null +++ b/eww/volume.yuck @@ -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) +) diff --git a/kitty/INSTALL.md b/kitty/INSTALL.md deleted file mode 100644 index 324bd11..0000000 --- a/kitty/INSTALL.md +++ /dev/null @@ -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`. diff --git a/kitty/dracula.conf b/kitty/dracula.conf deleted file mode 100644 index 8bee635..0000000 --- a/kitty/dracula.conf +++ /dev/null @@ -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 diff --git a/kitty/kitty.conf b/kitty/kitty.conf index 51c6572..92ccf3f 100644 --- a/kitty/kitty.conf +++ b/kitty/kitty.conf @@ -1,8 +1,3 @@ -font_family "Roboto Mono Nerd Font" -bold_font auto -italic_font auto -bold_italic_font auto +font_family Fira Code background_opacity 0.8 - -include dracula.conf diff --git a/nvim/init.lua b/nvim/init.lua index 6abfd8d..f848183 100644 --- a/nvim/init.lua +++ b/nvim/init.lua @@ -17,6 +17,8 @@ vim.opt.tabstop = 4 vim.opt.smartindent = true vim.opt.modeline = true +vim.opt.spell = true + vim.opt.undofile = true vim.g.mapleader = ' ' @@ -40,9 +42,4 @@ vim.cmd('colorscheme carbonfox') require('kalle.config') -- TODO: --- - Terminal panel at the bottem that can be hidden / shown with a hotkey (ts [Leader Toggle Shell]?) [https://github.com/akinsho/toggleterm.nvim] --- - Spell checker --- - Debugger integration (gdb?, java?/kotlin?, rust?, etc) --- - https://github.com/SmiteshP/nvim-navic --- - https://github.com/simrat39/symbols-outline.nvim --- - More...? +-- - Debugger integration (gdb?, java?/kotlin?, rust?, etc) - nvim-dap and friends diff --git a/nvim/lua/kalle/config/keybinds.lua b/nvim/lua/kalle/config/keybinds.lua index b9068c1..a6f6289 100644 --- a/nvim/lua/kalle/config/keybinds.lua +++ b/nvim/lua/kalle/config/keybinds.lua @@ -46,4 +46,7 @@ Keybind.g({ { 'n', 'cr', 'Telescope lsp_references', {noremap = true, desc = 'References' } }, -- [ space + c] { 'n', 'cd', 'Telescope lsp_definitions', {noremap = true, desc = 'Definitions' } }, + + { 'n', '', 'lua require("FTerm").toggle()', {noremap = true, desc = 'Terminal' } }, + { 't', '', 'lua require("FTerm").toggle()', {noremap = true, desc = 'Terminal' } }, }) diff --git a/nvim/lua/kalle/config/plugin-config/cmp.lua b/nvim/lua/kalle/config/plugin-config/cmp.lua index 3edf987..faf7bfb 100644 --- a/nvim/lua/kalle/config/plugin-config/cmp.lua +++ b/nvim/lua/kalle/config/plugin-config/cmp.lua @@ -66,15 +66,16 @@ cmp.setup.cmdline('/', { } }) --- Use cmdline & path source for ':' (if you enabled `native_menu`, this won't work anymore). -cmp.setup.cmdline(':', { - mapping = cmp.mapping.preset.cmdline(), - sources = cmp.config.sources({ - { name = 'path' } - }, { - { name = 'cmdline' } - }) -}) +-- TODO: This doesn't seem to work with Noice. Maybe it starts to work with a new release. +-- -- Use cmdline & path source for ':' (if you enabled `native_menu`, this won't work anymore). +-- cmp.setup.cmdline(':', { +-- mapping = cmp.mapping.preset.cmdline(), +-- sources = cmp.config.sources({ +-- { name = 'path' } +-- }, { +-- { name = 'cmdline' } +-- }) +-- }) -- The nvim-cmp almost supports LSP's capabilities so You should advertise it to LSP servers.. local capabilities = vim.lsp.protocol.make_client_capabilities() diff --git a/nvim/lua/kalle/config/plugin-config/init.lua b/nvim/lua/kalle/config/plugin-config/init.lua index b414bba..488f6db 100644 --- a/nvim/lua/kalle/config/plugin-config/init.lua +++ b/nvim/lua/kalle/config/plugin-config/init.lua @@ -12,10 +12,51 @@ require('Comment').setup() require('illuminate').configure() require("telescope").load_extension("ui-select") require("todo-comments").setup {} +require'FTerm'.setup {} require('gitsigns').setup { 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" }, + }, + }, + }, +}) diff --git a/nvim/lua/kalle/plugins.lua b/nvim/lua/kalle/plugins.lua index be62645..4254ded 100644 --- a/nvim/lua/kalle/plugins.lua +++ b/nvim/lua/kalle/plugins.lua @@ -16,6 +16,18 @@ return require('packer').startup({function(use) use('wbthomason/packer.nvim') use('EdenEast/nightfox.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('RRethy/vim-illuminate') @@ -25,7 +37,6 @@ return require('packer').startup({function(use) run = function() require('nvim-treesitter.install').update({ with_sync = true }) end, } - use('antoinemadec/FixCursorHold.nvim') use { 'kosayoda/nvim-lightbulb', requires = 'antoinemadec/FixCursorHold.nvim', diff --git a/nvim/plugin/packer_compiled.lua b/nvim/plugin/packer_compiled.lua index 7296b14..af5b91b 100644 --- a/nvim/plugin/packer_compiled.lua +++ b/nvim/plugin/packer_compiled.lua @@ -79,6 +79,11 @@ _G.packer_plugins = { path = "/home/kalle/.local/share/nvim/site/pack/packer/start/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"] = { loaded = true, 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", 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"] = { loaded = true, 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", 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"] = { loaded = true, path = "/home/kalle/.local/share/nvim/site/pack/packer/start/nvim-tree.lua", @@ -258,6 +278,11 @@ _G.packer_plugins = { loaded = true, path = "/home/kalle/.local/share/nvim/site/pack/packer/start/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" } } diff --git a/nvim/spell/en.utf-8.add b/nvim/spell/en.utf-8.add index b7ac026..479351d 100644 --- a/nvim/spell/en.utf-8.add +++ b/nvim/spell/en.utf-8.add @@ -11,3 +11,47 @@ carbonfox lua github 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 diff --git a/nvim/spell/en.utf-8.add.spl b/nvim/spell/en.utf-8.add.spl index 1594770..c1bf086 100644 Binary files a/nvim/spell/en.utf-8.add.spl and b/nvim/spell/en.utf-8.add.spl differ