mirror of
https://github.com/elkowar/dots-of-war.git
synced 2024-12-26 14:12:23 +00:00
Fix some vim stuff
This commit is contained in:
parent
e559fd39f7
commit
eb6337b988
5 changed files with 62 additions and 55 deletions
|
@ -22,27 +22,34 @@
|
||||||
:class "time"
|
:class "time"
|
||||||
hour min sec))
|
hour min sec))
|
||||||
|
|
||||||
|
|
||||||
|
(defwidget metric [icon ?font-size]
|
||||||
|
(box :class "metric"
|
||||||
|
:orientation "v"
|
||||||
|
(label :class "metric-icon"
|
||||||
|
:style {font-size != "" ? "font-size: ${font-size}rem;" : ""}
|
||||||
|
:text icon)
|
||||||
|
(children)))
|
||||||
|
|
||||||
(defwidget bottom [screen]
|
(defwidget bottom [screen]
|
||||||
(box :orientation "v"
|
(box :orientation "v"
|
||||||
:valign "end"
|
:valign "end"
|
||||||
:space-evenly true
|
:space-evenly true
|
||||||
:spacing "5"
|
:spacing "5"
|
||||||
(box :class "metric" :orientation "v"
|
|
||||||
;(button :onclick "eww -c /home/leon/.config/eww-bar open --toggle music_popup --screen ${screen}" )
|
(metric :icon "" :font-size 1 (music-button))
|
||||||
""
|
|
||||||
(music-button))
|
|
||||||
(volume)
|
(volume)
|
||||||
(box :class "metric" :orientation "v"
|
|
||||||
(label :class "metric-icon" :style "font-size: 0.8rem;" :text "")
|
(metric :icon ""
|
||||||
|
:font-size 0.8
|
||||||
"${round((1 - (EWW_DISK["/"].free / EWW_DISK["/"].total)) * 100, 0)}%")
|
"${round((1 - (EWW_DISK["/"].free / EWW_DISK["/"].total)) * 100, 0)}%")
|
||||||
(box :class "metric" :orientation "v"
|
|
||||||
(label :class "metric-icon":text "")
|
(metric :icon "" "${round(EWW_RAM.used_mem_perc, 0)}%")
|
||||||
"${round(EWW_RAM.used_mem_perc, 0)}%")
|
|
||||||
(box :class "metric" :orientation "v"
|
(metric :icon "" "${round(EWW_CPU.avg, 0)}%")
|
||||||
(label :class "metric-icon" :text "")
|
|
||||||
"${round(EWW_CPU.avg, 0)}%")
|
(box :class "metric" (date))))
|
||||||
(box :class "metric"
|
|
||||||
(date))))
|
|
||||||
|
|
||||||
(defwidget music-button []
|
(defwidget music-button []
|
||||||
(button :onclick "playerctl play-pause"
|
(button :onclick "playerctl play-pause"
|
||||||
|
@ -53,23 +60,23 @@
|
||||||
:orientation "v"
|
:orientation "v"
|
||||||
:space-evenly false
|
:space-evenly false
|
||||||
:valign "fill"
|
:valign "fill"
|
||||||
|
|
||||||
:vexpand false
|
:vexpand false
|
||||||
(scale :orientation "h"
|
(scale :orientation "h"
|
||||||
:min 0
|
:min 0
|
||||||
:max 100
|
:max 100
|
||||||
:onchange "pamixer --set-volume $(echo {} | sed 's/\\..*//g')"
|
:onchange "pamixer --set-volume $(echo {} | sed 's/\\..*//g')"
|
||||||
:value volume)
|
:value volume)
|
||||||
|
(eventbox :onscroll "notify-send test {}; if [ '{}' == 'up' ]; then pamixer -i 5; else pamixer -d 5; fi"
|
||||||
|
:vexpand true
|
||||||
|
:valign "fill"
|
||||||
(box :orientation "v"
|
(box :orientation "v"
|
||||||
:valign "fill"
|
:valign "fill"
|
||||||
:vexpand true
|
:vexpand true
|
||||||
(button :onclick "./audio.sh toggle"
|
(button :onclick "./audio.sh toggle"
|
||||||
:onscroll "notify-send test {}; if [ '{}' == 'up' ]; then pamixer -i 5; else pamixer -d 5; fi"
|
|
||||||
(label :style "font-size: 1.2em; font-family: DejaVuSansMono Nerd Font Mono"
|
(label :style "font-size: 1.2em; font-family: DejaVuSansMono Nerd Font Mono"
|
||||||
:text audio_sink))
|
:text audio_sink))
|
||||||
(button :onclick "pavucontrol &"
|
(button :onclick "pavucontrol &"
|
||||||
:onscroll "if [ '{}' == 'up' ]; then pamixer -i 5; else pamixer -d 5; fi"
|
"${volume}%")))))
|
||||||
"${volume}%"))))
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -91,7 +98,7 @@
|
||||||
:initial `{"status": ""}`
|
:initial `{"status": ""}`
|
||||||
`
|
`
|
||||||
playerctl metadata --format '{ "status": "{{status}}", "artist": "{{artist}}", "title": "{{title}}"}' || echo '{"status": ""}';
|
playerctl metadata --format '{ "status": "{{status}}", "artist": "{{artist}}", "title": "{{title}}"}' || echo '{"status": ""}';
|
||||||
playerctl --follow metadata --format '{ "status": "{{status}}", "artist": "{{artist}}", "title": "{{title}}"}'
|
# playerctl --follow metadata --format '{ "status": "{{status}}", "artist": "{{artist}}", "title": "{{title}}"}'
|
||||||
`)
|
`)
|
||||||
|
|
||||||
(defpoll hour :interval "1s" "date +%H")
|
(defpoll hour :interval "1s" "date +%H")
|
||||||
|
@ -106,10 +113,6 @@
|
||||||
(defvar workspaces_1_yuck "")
|
(defvar workspaces_1_yuck "")
|
||||||
(defvar workspaces_2_yuck "")
|
(defvar workspaces_2_yuck "")
|
||||||
|
|
||||||
; these are not needed because updates are done via update-workspaces.sh triggered from xmonad
|
|
||||||
;(deflisten workspaces_0_yuck "./workspaces.sh 0")
|
|
||||||
;(deflisten workspaces_1_yuck "./workspaces.sh 1")
|
|
||||||
;(deflisten workspaces_2_yuck "./workspaces.sh 2")
|
|
||||||
|
|
||||||
(defwindow bar_1
|
(defwindow bar_1
|
||||||
:monitor 1
|
:monitor 1
|
||||||
|
|
|
@ -3,7 +3,8 @@
|
||||||
nvim aniseed.nvim
|
nvim aniseed.nvim
|
||||||
utils dots.utils
|
utils dots.utils
|
||||||
wk which-key
|
wk which-key
|
||||||
treesitter-selection nvim-treesitter.incremental_selection}
|
treesitter-selection nvim-treesitter.incremental_selection
|
||||||
|
lspactions lspactions}
|
||||||
require-macros [macros]})
|
require-macros [macros]})
|
||||||
|
|
||||||
; undo autopairs fuckup
|
; undo autopairs fuckup
|
||||||
|
@ -31,6 +32,7 @@
|
||||||
(vim.lsp.buf.formatting)
|
(vim.lsp.buf.formatting)
|
||||||
(vim.cmd "Neoformat")))
|
(vim.cmd "Neoformat")))
|
||||||
|
|
||||||
|
|
||||||
(wk.setup {})
|
(wk.setup {})
|
||||||
(wk.register
|
(wk.register
|
||||||
{"c" {:name "+comment out"}
|
{"c" {:name "+comment out"}
|
||||||
|
@ -71,14 +73,14 @@
|
||||||
"A" (cmd "Lspsaga show_cursor_diagnostics" "Cursor diagnostics")
|
"A" (cmd "Lspsaga show_cursor_diagnostics" "Cursor diagnostics")
|
||||||
"a" (cmd "Lspsaga show_line_diagnostics" "Line diagnostics")
|
"a" (cmd "Lspsaga show_line_diagnostics" "Line diagnostics")
|
||||||
"h" (cmd "RustToggleInlayHints" "Toggle inlay hints")
|
"h" (cmd "RustToggleInlayHints" "Toggle inlay hints")
|
||||||
"r" [vim.lsp.buf.references "Show references"] ; trouble broken?
|
"r" (cmd "Trouble lsp_references" "Show references")
|
||||||
;"r" (cmd "Trouble lsp_references" "Show references")
|
|
||||||
"E" (cmd "Trouble lsp_document_diagnostics" "List diagnostics")
|
"E" (cmd "Trouble lsp_document_diagnostics" "List diagnostics")
|
||||||
"e" (cmd "Trouble lsp_workspace_diagnostics" "Show diagnostics")
|
"e" (cmd "Trouble lsp_workspace_diagnostics" "Show diagnostics")
|
||||||
"t" [vim.lsp.buf.type_definition "Go to type-definition"]
|
"t" (cmd "Trouble lsp_type_definitions" "Go to type-definition")
|
||||||
;"t" [vim.lsp.buf.declaration "Go to declaration"]
|
|
||||||
"g" [vim.lsp.buf.definition "Go to definition"]
|
|
||||||
"i" (cmd "Trouble lsp_implementations" "Show implementation")
|
"i" (cmd "Trouble lsp_implementations" "Show implementation")
|
||||||
|
"g" (cmd "Trouble lsp_definitions" "Go to definition")
|
||||||
|
;"g" [vim.lsp.buf.definition "Go to definition"]
|
||||||
|
;"t" [vim.lsp.buf.declaration "Go to declaration"]
|
||||||
"f" [format "format file"]
|
"f" [format "format file"]
|
||||||
"," (cmd "RustRunnables" "Run rust stuff")}
|
"," (cmd "RustRunnables" "Run rust stuff")}
|
||||||
|
|
||||||
|
|
|
@ -32,6 +32,7 @@
|
||||||
(use
|
(use
|
||||||
; sort me pls
|
; sort me pls
|
||||||
|
|
||||||
|
:github/copilot.vim {:opt true :cmd ["Copilot"]}
|
||||||
|
|
||||||
|
|
||||||
; sorted from here!
|
; sorted from here!
|
||||||
|
@ -41,8 +42,8 @@
|
||||||
:norcalli/nvim.lua {}
|
:norcalli/nvim.lua {}
|
||||||
:lifepillar/vim-gruvbox8 (cfg "dots.plugins.gruvbox8")
|
:lifepillar/vim-gruvbox8 (cfg "dots.plugins.gruvbox8")
|
||||||
:kyazdani42/nvim-web-devicons {}
|
:kyazdani42/nvim-web-devicons {}
|
||||||
|
|
||||||
:folke/which-key.nvim {}
|
:folke/which-key.nvim {}
|
||||||
|
|
||||||
:Famiu/feline.nvim (cfg "dots.plugins.feline")
|
:Famiu/feline.nvim (cfg "dots.plugins.feline")
|
||||||
:akinsho/nvim-bufferline.lua (cfg "dots.plugins.bufferline")
|
:akinsho/nvim-bufferline.lua (cfg "dots.plugins.bufferline")
|
||||||
|
|
||||||
|
@ -117,11 +118,12 @@
|
||||||
:ray-x/lsp_signature.nvim {:events [:BufEnter]}
|
:ray-x/lsp_signature.nvim {:events [:BufEnter]}
|
||||||
:weilbith/nvim-code-action-menu {}
|
:weilbith/nvim-code-action-menu {}
|
||||||
|
|
||||||
:elkowar/trouble.nvim {:config #(require "dots.plugins.trouble")
|
;:elkowar/trouble.nvim {:config #(require "dots.plugins.trouble")
|
||||||
|
;:cmd ["Trouble" "TroubleClose" "TroubleRefresh" "TroubleToggle"]
|
||||||
|
|
||||||
|
"/home/leon/coding/prs/trouble.nvim" {:opt false :config #(require "dots.plugins.trouble")
|
||||||
:cmd ["Trouble" "TroubleClose" "TroubleRefresh" "TroubleToggle"]}
|
:cmd ["Trouble" "TroubleClose" "TroubleRefresh" "TroubleToggle"]}
|
||||||
|
|
||||||
;"/home/leon/coding/prs/trouble.nvim" {:opt false :config #(require "dots.plugins.trouble")
|
|
||||||
;:cmd ["Trouble" "TroubleClose" "TroubleRefresh" "TroubleToggle"]}
|
|
||||||
;:folke/lsp-trouble.nvim {:opt false :config #(require "dots.plugins.trouble")
|
;:folke/lsp-trouble.nvim {:opt false :config #(require "dots.plugins.trouble")
|
||||||
;:cmd ["Trouble" "TroubleClose" "TroubleRefresh" "TroubleToggle"]}
|
;:cmd ["Trouble" "TroubleClose" "TroubleRefresh" "TroubleToggle"]}
|
||||||
|
|
||||||
|
|
|
@ -5,19 +5,19 @@
|
||||||
require {saga lspsaga}})
|
require {saga lspsaga}})
|
||||||
|
|
||||||
|
|
||||||
(saga.init_lsp_saga
|
;(saga.init_lsp_saga
|
||||||
{:border_style "single" ; single double round plus
|
;{:border_style "single" ; single double round plus
|
||||||
:code_action_prompt {:enable true
|
;:code_action_prompt {:enable true
|
||||||
:sign false
|
;:sign false
|
||||||
:virtual_text false}
|
;:virtual_text false}
|
||||||
:code_action_keys {:quit "<esc>" :exec "<CR>"}
|
;:code_action_keys {:quit "<esc>" :exec "<CR>"}
|
||||||
:rename_action_keys {:quit "<esc>" :exec "<CR>"}
|
;:rename_action_keys {:quit "<esc>" :exec "<CR>"}
|
||||||
:finder_action_keys {:quit "<esc>"
|
;:finder_action_keys {:quit "<esc>"
|
||||||
:open "<CR>"
|
;:open "<CR>"
|
||||||
:vsplit "v"
|
;:vsplit "v"
|
||||||
:split "b"
|
;:split "b"
|
||||||
:scroll_up "<C-u>"
|
;:scroll_up "<C-u>"
|
||||||
:scroll_down "<C-d>"}})
|
;:scroll_down "<C-d>"}})
|
||||||
|
|
||||||
|
|
||||||
(utils.highlight ["LspFloatWinBorder"
|
(utils.highlight ["LspFloatWinBorder"
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
:auto_preview true
|
:auto_preview true
|
||||||
:auto_close true
|
:auto_close true
|
||||||
:auto_open false
|
:auto_open false
|
||||||
:auto_jump ["lsp_definitions" "lsp_workspace_diagnostics"]
|
:auto_jump ["lsp_definitions" "lsp_workspace_diagnostics" "lsp_type_definitions"]
|
||||||
:indent_lines false
|
:indent_lines false
|
||||||
:action_keys
|
:action_keys
|
||||||
{:jump "o"
|
{:jump "o"
|
||||||
|
|
Loading…
Reference in a new issue