This commit is contained in:
elkowar 2021-05-09 17:43:05 +02:00
parent 47a5426235
commit bb5a09d16a
No known key found for this signature in database
GPG key ID: E321AD71B1D1F27F
7 changed files with 175 additions and 159 deletions

View file

@ -9,53 +9,60 @@
<progress value="{{volume}}" orientation="v" halign="start" flipped="true"/> <progress value="{{volume}}" orientation="v" halign="start" flipped="true"/>
</def> </def>
<def name="test"> <def name="test">
<box class="{{some_var}}" space-evenly="false" spacing="10"> <box class="{{some_var}}" space-evenly="false" spacing="10">
testing {{shit}} bruh <box space-evenly="false" orientation="v">
testing {{shit}} bruh
is shit true? {{shit == true}} is shit true? {{shit == true}}
is shit "shit"? {{shit == "shit"}} is shit "shit"? {{shit == "shit"}}
true and false 🤔 true and false 🤔
{{ true && false }} {{ true && false }}
fancy ass math {{ 12 + 5 * 12 * 4 }} fancy ass math {{ 12 + 5 * 12 * 4 }}
bruh &quot; &lt; fuck &gt; bruh &quot; &lt; fuck &gt;
" "
<literal content="{{lmao}}"/> <literal content="{{lmao}}"/>
<label text="&lt; &gt; bruh &quot;"/> <label text="&lt; &gt; bruh &quot;"/>
{{bruh.hi}} HEHE {{bruh.ho}} {{bruh.hi}} HEHE {{bruh.ho}}
Watch this: Watch this:
{{bruh.list[bruh.myIndex]}} {{bruh.list[bruh.myIndex]}}
<if-else cond="{{shit == 'yea'}}"> <if-else cond="{{shit == 'yea'}}">
<box>hi</box> <box>hi</box>
<box>ho</box> <box>ho</box>
</if-else>
</if-else> thingy: {{"lmao" =~ ".ma."}}
thingy: {{"lmao" =~ "^ma.$"}}
</box>
{{EWW_RAM}} {{EWW_DISK}} {{EWW_BATTERY}} {{EWW_CPU]}} {{EWW_NET}}
{{EWW_CORES}}
<scale value="50" orientation="v" min="0" max="100" flipped="true" /> <scale value="50" orientation="v" min="0" max="100" flipped="true" />
<button onclick="pgrep 'eww' &amp;&amp; echo '' || echo ''">Test bug</button> <button onclick="pgrep 'eww' &amp;&amp; echo '' || echo ''" cursor="wait">Test bug</button>
<button onclick="notify-send 'ree' 'this is {{shit}}'">click me</button> <button
<calendar show-heading="false" show-day-names="false" day="2" onclick="notify-send 'asdf' '{}'" /> onclick="notify-send 'ree' 'this is {{shit}}'"
onmiddleclick="notify-send 'ree' 'MITTE'"
onrightclick="notify-send 'ree' 'RECHTS'"
>
click me
</button>
<calendar show-heading="false" show-day-names="false" day="2" onclick="notify-send 'asdf' '{}'" />
notify-send 'ree' 'this is {{shit}}' notify-send 'ree' 'this is {{shit}}'
<multiple text="{{shit}}" /> <multiple text="{{shit}}" />
<!--<literal content="{{code}}"/>--> <!--<literal content="{{code}}"/>-->
@ -72,93 +79,93 @@
<box>{{text}}</box> <box>{{text}}</box>
<label onscroll="notify-send '{{shit}}' {}" text="reeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee" limit-width="5" wrap="true" /> <label onscroll="notify-send '{{shit}}' {}" text="reeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee" limit-width="5" wrap="true" />
<!--<input onchange="eww update code='{}'" />--> <!--<input onchange="eww update code='{}'" />-->
{{date}} {{date}}
{{date-tail}} {{date-tail}}
</box> </box>
</def> </def>
<def name="volume_popup"> <def name="volume_popup">
<box orientation="v" space-evenly="true"> <box orientation="v" space-evenly="true">
<scale flipped="true" orientation="v" value="{{volume}}" min="0" max="100" onchange="amixer sset 'Master' {}%" /> <scale flipped="true" orientation="v" value="{{volume}}" min="0" max="100" onchange="amixer sset 'Master' {}%" />
</box> </box>
</def> </def>
<def name="music"> <def name="music">
<box class="hi ho" orientation="h" valign="start" space-evenly="false" hexpand="true"> <box class="hi ho" orientation="h" valign="start" space-evenly="false" hexpand="true">
<image visible="{{song-image-visible}}" path="{{song-image}}" width="150" height="150" /> <image visible="{{song-image-visible}}" path="{{song-image}}" width="150" height="150" />
<box orientation="v" halign="fill" space-evenly="false" vexpand="true" hexpand="true"> <box orientation="v" halign="fill" space-evenly="false" vexpand="true" hexpand="true">
<box class="data" vexpand="true"> <box class="data" vexpand="true">
<box orientation="v" halign="start"> <box orientation="v" halign="start">
<label class="songname" halign="start" limit-width="30" text="{{song-name}}" /> <label class="songname" halign="start" limit-width="30" text="{{song-name}}" />
<box space-evenly="false" halign="start"> <box space-evenly="false" halign="start">
<label class="key" text="Album: " /> <label class="key" text="Album: " />
<label halign="start" limit-width="30" text="{{song-album}}" /> <label halign="start" limit-width="30" text="{{song-album}}" />
</box> </box>
<box space-evenly="false" halign="start"> <box space-evenly="false" halign="start">
<label class="key" text="By: " /> <label class="key" text="By: " />
<label halign="start" limit-width="30" text="{{song-artist}}" /> <label halign="start" limit-width="30" text="{{song-artist}}" />
</box>
</box> </box>
</box> </box>
</box> <box class="buttons" hexpand="true">
<box class="buttons" hexpand="true"> <button onclick="playerctl previous"></button>
<button onclick="playerctl previous"></button> <button onclick="playerctl play-pause">{{song-playpause}}</button>
<button onclick="playerctl play-pause">{{song-playpause}}</button> <button onclick="playerctl next"></button>
<button onclick="playerctl next"></button> </box>
</box> </box>
</box> </box>
</box> </def>
</def>
</definitions> </definitions>
<variables> <variables>
<script-var name="volume"> <script-var name="volume">
amixer sget 'Master' | grep 'Front Left:' | sed 's/.*\[\(.*\)%\].*/\1/g'; amixer sget 'Master' | grep 'Front Left:' | sed 's/.*\[\(.*\)%\].*/\1/g';
LANG=C pactl subscribe | grep --line-buffered sink | while read -r _; do LANG=C pactl subscribe | grep --line-buffered sink | while read -r _; do
amixer sget 'Master' | grep 'Front Left:' | sed 's/.*\[\(.*\)%\].*/\1/g' amixer sget 'Master' | grep 'Front Left:' | sed 's/.*\[\(.*\)%\].*/\1/g'
done done
</script-var> </script-var>
<var name="shit"> <var name="shit">
true true
</var> </var>
<var name="some_var"></var> <var name="some_var"></var>
<var name="code"></var> <var name="code"></var>
<var name="song-image"></var> <var name="song-image"></var>
<var name="song-image-visible">true</var> <var name="song-image-visible">true</var>
<var name="song-name"></var> <var name="song-name"></var>
<var name="song-album"></var> <var name="song-album"></var>
<var name="song-artist"></var> <var name="song-artist"></var>
<var name="song-show-progress">false</var> <var name="song-show-progress">false</var>
<var name="song-playpause"></var> <var name="song-playpause"></var>
<!--<script-var name="date" interval="1s">--> <!--<script-var name="date" interval="1s">-->
<!--date--> <!--date-->
<!--</script-var>--> <!--</script-var>-->
<script-var name="date-tail"> <script-var name="date-tail">
while true; do while true; do
sleep 1; sleep 1;
notify-send 'hi' 'ho' notify-send 'hi' 'ho'
date date
done done
</script-var> </script-var>
<script-var name="date" interval="1s"> <script-var name="date" interval="1s">
date date
</script-var> </script-var>
<script-var interval="100ms" name="lmao"> <script-var interval="100ms" name="lmao">
cat ~/fuck cat ~/fuck
</script-var> </script-var>
<var name="bruh"> <var name="bruh">
{"hi": "ho"} {"hi": "ho"}
</var> </var>
@ -166,48 +173,48 @@
<!--<script-var name="xyz">--> <!--<script-var name="xyz">-->
<!--tail -F /home/leon/test | while read -r _; do notify-send "Hi"; done--> <!--tail -F /home/leon/test | while read -r _; do notify-send "Hi"; done-->
<!--</script-var>--> <!--</script-var>-->
<!--<script-var name="foo">--> <!--<script-var name="foo">-->
<!--tail -F /home/leon/test--> <!--tail -F /home/leon/test-->
<!--</script-var>--> <!--</script-var>-->
</variables> </variables>
<windows> <windows>
<window screen="0" name="px" stacking="fg" focusable="false"> <window screen="0" name="px" stacking="fg" focusable="false">
<geometry anchor="center left" width="10px" height="100%" x="1px" y="0px"/> <geometry anchor="center" width="10px" height="100%" x="1px" y="0px"/>
<widget> <widget>
<pxbar/> <pxbar/>
</widget> </widget>
</window> </window>
<window screen="0" name="mw" stacking="fg" focusable="false"> <window screen="0" name="mw" stacking="fg" focusable="false">
<!--<window screen="2" name="mw" stacking="fg" focusable="false">--> <!--<window screen="2" name="mw" stacking="fg" focusable="false">-->
<geometry anchor="top center" width="20%" height="20%" x="50px" y="50px"/> <geometry anchor="center" width="20%" height="20%" x="50px" y="50px"/>
<reserve side="left" distance="80px"/> <reserve side="left" distance="80px"/>
<widget> <widget>
<test ree="test" /> <test ree="test" />
</widget> </widget>
</window> </window>
<window screen="0" name="mw2" stacking="fg"> <window screen="0" name="mw2" stacking="fg">
<geometry anchor="bottom right"/> <geometry anchor="bottom right"/>
<widget> <widget>
<foo/> <foo/>
<!--<test ree="test" />--> <!--<test ree="test" />-->
</widget> </widget>
</window> </window>
<window screen="0" name="volume_popup"> <window screen="0" name="volume_popup">
<geometry /> <geometry />
<widget> <widget>
<volume_popup /> <volume_popup />
</widget> </widget>
</window> </window>
<window screen="0" name="music"> <window screen="0" name="music">
<widget> <widget>
<music /> <music />
</widget> </widget>
</window> </window>
</windows> </windows>
</eww> </eww>

View file

@ -59,8 +59,6 @@
(se shell "bash") (se shell "bash")
(se background "dark") (se background "dark")
(vim.cmd "colorscheme gruvbox")
(vim-let &t_ut "") (vim-let &t_ut "")
(vim.cmd "autocmd! BufReadPost *.hs :set shiftwidth=2") (vim.cmd "autocmd! BufReadPost *.hs :set shiftwidth=2")
@ -90,6 +88,9 @@
(utils.highlight-add :NormalFloat {:bg colors.dark0_hard}) (utils.highlight-add :NormalFloat {:bg colors.dark0_hard})
(utils.highlight-add :SignColumn {:bg colors.dark0}) (utils.highlight-add :SignColumn {:bg colors.dark0})
(utils.highlight ["StatusLine" "GalaxyLineInfo" "GalaxySpace" ] {:bg colors.dark1 :fg colors.light0})
(vim.cmd "highlight link Function GruvboxGreen") (vim.cmd "highlight link Function GruvboxGreen")

View file

@ -50,8 +50,8 @@
"t" (cmd "Lspsaga signature_help" "Show signature help") "t" (cmd "Lspsaga signature_help" "Show signature help")
"n" (cmd "Lspsaga rename" "Rename") "n" (cmd "Lspsaga rename" "Rename")
"v" (cmd "Lspsaga code_action" "Apply codeaction") "v" (cmd "Lspsaga code_action" "Apply codeaction")
"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" [#(trouble.open "lsp_references") "Show references"] "r" [#(trouble.open "lsp_references") "Show references"]
"E" [#(trouble.open "lsp_document_diagnostics") "List diagnostics"] "E" [#(trouble.open "lsp_document_diagnostics") "List diagnostics"]

View file

@ -44,13 +44,14 @@
:each-pair :each-pair
(fn [args ...] (fn [args ...]
(let [[l# r# d#] args] (let [[l# r# d#] args]
`(let [data# ,d#] `(let [a# (require "aniseed.core")
(for [i# 1 (a.count data#) 2] data# ,d#]
(for [i# 1 (a#.count data#) 2]
(let [,l# (. data# i#) (let [,l# (. data# i#)
,r# (. data# (+ i# 1))] ,r# (. data# (+ i# 1))]
,...))))) ,...)))))
:use-macro :packer-use
(fn [...] (fn [...]
(let [a (require "aniseed.core") (let [a (require "aniseed.core")
fennel (require "aniseed.fennel") fennel (require "aniseed.fennel")
@ -62,7 +63,7 @@
(a.assoc block 1 name) (a.assoc block 1 name)
(when (. block :mod) (when (. block :mod)
(a.assoc block :config `#((. (require "utils") :safe-require) ,(. block :mod)))) (a.assoc block :config `#((. (require "utils") :safe-require) ,(. block :mod))))
(a.assoc block :mod nil) (a.assoc block :mod)
(table.insert use-statements block))) (table.insert use-statements block)))
(let [use-sym (gensym)] (let [use-sym (gensym)]

View file

@ -2,7 +2,10 @@
{require {} {require {}
require-macros [macros]}) require-macros [macros]})
(use-macro (packer-use
:gruvbox-community/gruvbox {:opt false
:config #(vim.cmd "colorscheme gruvbox")}
:nvim-telescope/telescope.nvim {:mod "plugins.telescope" :nvim-telescope/telescope.nvim {:mod "plugins.telescope"
:cmd ["Telescope"] :cmd ["Telescope"]
:requires [:nvim-lua/popup.nvim :nvim-lua/plenary.nvim]} :requires [:nvim-lua/popup.nvim :nvim-lua/plenary.nvim]}
@ -27,7 +30,8 @@
; general purpose lua wrappers for nvim stuff ; general purpose lua wrappers for nvim stuff
:norcalli/nvim.lua {} :norcalli/nvim.lua {}
:glepnir/galaxyline.nvim {:mod "plugins.galaxyline"} :glepnir/galaxyline.nvim {:mod "plugins.galaxyline"
:after "gruvbox"}
:akinsho/nvim-bufferline.lua {:mod "plugins.bufferline"} :akinsho/nvim-bufferline.lua {:mod "plugins.bufferline"}
:sindrets/diffview.nvim {:mod "plugins.diffview"} :sindrets/diffview.nvim {:mod "plugins.diffview"}
@ -38,7 +42,6 @@
:lewis6991/gitsigns.nvim {:mod "plugins.gitsigns"} :lewis6991/gitsigns.nvim {:mod "plugins.gitsigns"}
:gruvbox-community/gruvbox {}
:tpope/vim-fugitive {} :tpope/vim-fugitive {}
:preservim/nerdcommenter {} :preservim/nerdcommenter {}

View file

@ -13,6 +13,8 @@
require-macros [macros]}) require-macros [macros]})
(def- bar-bg-col colors.dark1)
(local modes (local modes
{:n {:text "NORMAL" :colors {:bg colors.neutral_aqua :fg colors.dark0}} {:n {:text "NORMAL" :colors {:bg colors.neutral_aqua :fg colors.dark0}}
:i {:text "INSERT" :colors {:bg colors.neutral_yellow :fg colors.dark0}} :i {:text "INSERT" :colors {:bg colors.neutral_yellow :fg colors.dark0}}
@ -54,16 +56,16 @@
(.. " " modedata.text " "))) (.. " " modedata.text " ")))
(utils.highlight "StatusLine" {:bg colors.dark1 :fg colors.light0 })
(set galaxyline.short_line_list ["dbui" "diff" "peekaboo" "undotree" "vista" "vista_markdown"]) (set galaxyline.short_line_list ["dbui" "diff" "peekaboo" "undotree" "vista" "vista_markdown"])
(set galaxyline.section.left (set galaxyline.section.left
[{:ViMode {:provider vim-mode-provider}} [{:ViMode {:provider vim-mode-provider}}
{:FileName {:provider get-current-file-name {:FileName {:provider get-current-file-name
:highlight [colors.light4 colors.dark1]}} :highlight [colors.light4 bar-bg-col]}}
{:Space {:provider (fn [] "") {:Space {:provider (fn [] "")
:highlight [colors.light0 colors.dark1]}}]) :highlight [colors.light0 bar-bg-col]}}])
(fn make-lsp-diagnostic-provider [kind] (fn make-lsp-diagnostic-provider [kind]
(fn [] (fn []
@ -76,9 +78,9 @@
(set galaxyline.section.right (set galaxyline.section.right
[{:GitBranch {:provider git-branch-provider [{:GitBranch {:provider git-branch-provider
:highlight [colors.light4 colors.dark1]}} :highlight [colors.light4 bar-bg-col]}}
{:FileType {:provider (fn [] nvim.bo.filetype) {:FileType {:provider (fn [] nvim.bo.filetype)
:highlight [colors.neutral_aqua colors.dark1]}} :highlight [colors.neutral_aqua bar-bg-col]}}
{:DiagnosticInfo {:provider (make-lsp-diagnostic-provider "Info") {:DiagnosticInfo {:provider (make-lsp-diagnostic-provider "Info")
:highlight [colors.dark1 colors.neutral_blue]}} :highlight [colors.dark1 colors.neutral_blue]}}
@ -94,7 +96,7 @@
(do (do
(fn add-segment-defaults [data] (fn add-segment-defaults [data]
(a.merge {:highlight [colors.light0 colors.dark1] (a.merge {:highlight [colors.light0 bar-bg-col]
:separator " " :separator " "
:separator_highlight "StatusLine"} :separator_highlight "StatusLine"}
data)) data))
@ -106,3 +108,5 @@
(set galaxyline.section.left (map-gl-section add-segment-defaults galaxyline.section.left)) (set galaxyline.section.left (map-gl-section add-segment-defaults galaxyline.section.left))
(set galaxyline.section.right (map-gl-section add-segment-defaults galaxyline.section.right))) (set galaxyline.section.right (map-gl-section add-segment-defaults galaxyline.section.right)))

View file

@ -16,8 +16,8 @@
:scope_decremental "gsk"}} :scope_decremental "gsk"}}
; Might fuck with gitsigns ; Might fuck with gitsigns
:rainbow {:enable true ;:rainbow {:enable true
:extended_mode true} ;:extended_mode true}
:context_commentstring {:enable true}}) :context_commentstring {:enable true}})
;:indent {:enable true} ;:indent {:enable true}