mirror of
https://github.com/elkowar/dots-of-war.git
synced 2024-12-25 21:52: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"
|
||||
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]
|
||||
(box :orientation "v"
|
||||
:valign "end"
|
||||
:space-evenly true
|
||||
:spacing "5"
|
||||
(box :class "metric" :orientation "v"
|
||||
;(button :onclick "eww -c /home/leon/.config/eww-bar open --toggle music_popup --screen ${screen}" )
|
||||
""
|
||||
(music-button))
|
||||
|
||||
(metric :icon "" :font-size 1 (music-button))
|
||||
|
||||
(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)}%")
|
||||
(box :class "metric" :orientation "v"
|
||||
(label :class "metric-icon":text "")
|
||||
"${round(EWW_RAM.used_mem_perc, 0)}%")
|
||||
(box :class "metric" :orientation "v"
|
||||
(label :class "metric-icon" :text "")
|
||||
"${round(EWW_CPU.avg, 0)}%")
|
||||
(box :class "metric"
|
||||
(date))))
|
||||
|
||||
(metric :icon "" "${round(EWW_RAM.used_mem_perc, 0)}%")
|
||||
|
||||
(metric :icon "" "${round(EWW_CPU.avg, 0)}%")
|
||||
|
||||
(box :class "metric" (date))))
|
||||
|
||||
(defwidget music-button []
|
||||
(button :onclick "playerctl play-pause"
|
||||
|
@ -53,23 +60,23 @@
|
|||
:orientation "v"
|
||||
:space-evenly false
|
||||
:valign "fill"
|
||||
|
||||
:vexpand false
|
||||
(scale :orientation "h"
|
||||
:min 0
|
||||
:max 100
|
||||
:onchange "pamixer --set-volume $(echo {} | sed 's/\\..*//g')"
|
||||
:value volume)
|
||||
(box :orientation "v"
|
||||
:valign "fill"
|
||||
:vexpand true
|
||||
(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"
|
||||
:text audio_sink))
|
||||
(button :onclick "pavucontrol &"
|
||||
:onscroll "if [ '{}' == 'up' ]; then pamixer -i 5; else pamixer -d 5; fi"
|
||||
"${volume}%"))))
|
||||
(eventbox :onscroll "notify-send test {}; if [ '{}' == 'up' ]; then pamixer -i 5; else pamixer -d 5; fi"
|
||||
:vexpand true
|
||||
:valign "fill"
|
||||
(box :orientation "v"
|
||||
:valign "fill"
|
||||
:vexpand true
|
||||
(button :onclick "./audio.sh toggle"
|
||||
(label :style "font-size: 1.2em; font-family: DejaVuSansMono Nerd Font Mono"
|
||||
:text audio_sink))
|
||||
(button :onclick "pavucontrol &"
|
||||
"${volume}%")))))
|
||||
|
||||
|
||||
|
||||
|
@ -91,7 +98,7 @@
|
|||
:initial `{"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")
|
||||
|
@ -106,10 +113,6 @@
|
|||
(defvar workspaces_1_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
|
||||
:monitor 1
|
||||
|
|
|
@ -3,7 +3,8 @@
|
|||
nvim aniseed.nvim
|
||||
utils dots.utils
|
||||
wk which-key
|
||||
treesitter-selection nvim-treesitter.incremental_selection}
|
||||
treesitter-selection nvim-treesitter.incremental_selection
|
||||
lspactions lspactions}
|
||||
require-macros [macros]})
|
||||
|
||||
; undo autopairs fuckup
|
||||
|
@ -31,6 +32,7 @@
|
|||
(vim.lsp.buf.formatting)
|
||||
(vim.cmd "Neoformat")))
|
||||
|
||||
|
||||
(wk.setup {})
|
||||
(wk.register
|
||||
{"c" {:name "+comment out"}
|
||||
|
@ -71,14 +73,14 @@
|
|||
"A" (cmd "Lspsaga show_cursor_diagnostics" "Cursor diagnostics")
|
||||
"a" (cmd "Lspsaga show_line_diagnostics" "Line diagnostics")
|
||||
"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_workspace_diagnostics" "Show diagnostics")
|
||||
"t" [vim.lsp.buf.type_definition "Go to type-definition"]
|
||||
;"t" [vim.lsp.buf.declaration "Go to declaration"]
|
||||
"g" [vim.lsp.buf.definition "Go to definition"]
|
||||
"t" (cmd "Trouble lsp_type_definitions" "Go to type-definition")
|
||||
"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"]
|
||||
"," (cmd "RustRunnables" "Run rust stuff")}
|
||||
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
(use
|
||||
; sort me pls
|
||||
|
||||
:github/copilot.vim {:opt true :cmd ["Copilot"]}
|
||||
|
||||
|
||||
; sorted from here!
|
||||
|
@ -41,8 +42,8 @@
|
|||
:norcalli/nvim.lua {}
|
||||
:lifepillar/vim-gruvbox8 (cfg "dots.plugins.gruvbox8")
|
||||
:kyazdani42/nvim-web-devicons {}
|
||||
|
||||
:folke/which-key.nvim {}
|
||||
|
||||
:Famiu/feline.nvim (cfg "dots.plugins.feline")
|
||||
:akinsho/nvim-bufferline.lua (cfg "dots.plugins.bufferline")
|
||||
|
||||
|
@ -117,11 +118,12 @@
|
|||
:ray-x/lsp_signature.nvim {:events [:BufEnter]}
|
||||
:weilbith/nvim-code-action-menu {}
|
||||
|
||||
:elkowar/trouble.nvim {:config #(require "dots.plugins.trouble")
|
||||
:cmd ["Trouble" "TroubleClose" "TroubleRefresh" "TroubleToggle"]}
|
||||
;: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"]}
|
||||
|
||||
;"/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")
|
||||
;:cmd ["Trouble" "TroubleClose" "TroubleRefresh" "TroubleToggle"]}
|
||||
|
||||
|
|
|
@ -5,19 +5,19 @@
|
|||
require {saga lspsaga}})
|
||||
|
||||
|
||||
(saga.init_lsp_saga
|
||||
{:border_style "single" ; single double round plus
|
||||
:code_action_prompt {:enable true
|
||||
:sign false
|
||||
:virtual_text false}
|
||||
:code_action_keys {:quit "<esc>" :exec "<CR>"}
|
||||
:rename_action_keys {:quit "<esc>" :exec "<CR>"}
|
||||
:finder_action_keys {:quit "<esc>"
|
||||
:open "<CR>"
|
||||
:vsplit "v"
|
||||
:split "b"
|
||||
:scroll_up "<C-u>"
|
||||
:scroll_down "<C-d>"}})
|
||||
;(saga.init_lsp_saga
|
||||
;{:border_style "single" ; single double round plus
|
||||
;:code_action_prompt {:enable true
|
||||
;:sign false
|
||||
;:virtual_text false}
|
||||
;:code_action_keys {:quit "<esc>" :exec "<CR>"}
|
||||
;:rename_action_keys {:quit "<esc>" :exec "<CR>"}
|
||||
;:finder_action_keys {:quit "<esc>"
|
||||
;:open "<CR>"
|
||||
;:vsplit "v"
|
||||
;:split "b"
|
||||
;:scroll_up "<C-u>"
|
||||
;:scroll_down "<C-d>"}})
|
||||
|
||||
|
||||
(utils.highlight ["LspFloatWinBorder"
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
:auto_preview true
|
||||
:auto_close true
|
||||
:auto_open false
|
||||
:auto_jump ["lsp_definitions" "lsp_workspace_diagnostics"]
|
||||
:auto_jump ["lsp_definitions" "lsp_workspace_diagnostics" "lsp_type_definitions"]
|
||||
:indent_lines false
|
||||
:action_keys
|
||||
{:jump "o"
|
||||
|
|
Loading…
Reference in a new issue