Compare commits
46 Commits
Roxy
...
432302b864
| Author | SHA1 | Date | |
|---|---|---|---|
| 432302b864 | |||
| de3bb40df2 | |||
| 000830caed | |||
| 3aa1861c6a | |||
| b51146e89a | |||
| 2ff1e26bfc | |||
| edec89fa13 | |||
| 90cd90fb35 | |||
| dcd06c2e53 | |||
| 20342cbbf3 | |||
| d601f4a703 | |||
| 1cdff89015 | |||
| 18060e3f2f | |||
| 3fca923992 | |||
| 0011b447a4 | |||
| 6295565fe0 | |||
| a258f26998 | |||
| 89ba502d3a | |||
| 8d62ce6b97 | |||
| 905e4c353b | |||
| fbca524a1d | |||
| 065d79b7f6 | |||
| 12a5591b36 | |||
| 8d8405b546 | |||
| b89efc6902 | |||
| aa084074cf | |||
| d99fd8f391 | |||
| af5601eb09 | |||
| 95956a5605 | |||
| d464dfb7ba | |||
| 0f0217e291 | |||
| ad369f8dd6 | |||
| 418a40fcfa | |||
| ed0c04380f | |||
| dbdfd1d029 | |||
| 676f660247 | |||
| 73a530cbe3 | |||
| a6b3c2a6ab | |||
| dbc1e357a5 | |||
| fe6b2fb149 | |||
| eae68984ce | |||
| c53ddf4160 | |||
| 3347042cde | |||
| c4124fa7b9 | |||
| 651ef40449 | |||
| 33443bf9cb |
@@ -46,6 +46,6 @@
|
|||||||
},
|
},
|
||||||
"version": "0.3.5",
|
"version": "0.3.5",
|
||||||
"emoteCacheDays": 7,
|
"emoteCacheDays": 7,
|
||||||
"emoteCacheDate": "2020-09-09T20:57:49.233Z",
|
"emoteCacheDate": "2020-10-24T10:21:17.385Z",
|
||||||
"bdcustomcss": "I2FwcC1tb3VudCAuY2hhdC0zYlJ4eHUgLm1lc3NhZ2VzV3JhcHBlci0zbFpEZlkgW2NsYXNzKj10aW1lc3RhbXBdLAojYXBwLW1vdW50IC5jaGF0LTNiUnh4dSAubWVzc2FnZXNXcmFwcGVyLTNsWkRmWSAubWVzc2FnZUNvbnRlbnQtMnFXV3hDLAojYXBwLW1vdW50IC5zaWRlYmFyLTJLOHBGaCAuY29udGFpbmVyLVBOa2ltYyAuY29udGFpbmVyRGVmYXVsdC0xWm5BRHEgLndyYXBwZXItMXVjalRkOm5vdCgubW9kZU11dGVkLTNvc3k3aik6bm90KC5tb2RlVW5yZWFkLTF6cEZkQSk6bm90KC5tb2RlU2VsZWN0ZWQtMXpBcEpfKSAuY29udGVudC0zYXRfQVUgLm5hbWUtM19Ec21nLAojYXBwLW1vdW50IC5zaWRlYmFyLTJLOHBGaCAuY29udGFpbmVyLVBOa2ltYyAuY29udGFpbmVyRGVmYXVsdC0xWm5BRHEgLndyYXBwZXItMXVjalRkOm5vdCgubW9kZU11dGVkLTNvc3k3aik6bm90KC5tb2RlVW5yZWFkLTF6cEZkQSk6bm90KC5tb2RlU2VsZWN0ZWQtMXpBcEpfKSAuY29udGVudC0zYXRfQVUgc3ZnLAojYXBwLW1vdW50IC5zaWRlYmFyLTJLOHBGaCAuY2hhbm5lbC0yUUQ5X08gewogICAgY29sb3I6ICM5M2ExYTEgIWltcG9ydGFudDsKfQoKI2FwcC1tb3VudCA6OnNlbGVjdGlvbiwKI2FwcC1tb3VudCAuY2hhdC0zYlJ4eHUgLm1lbnRpb24sCiNhcHAtbW91bnQgLm1lbWJlcnMtMTk5OHBCIC5tZW1iZXItMy1ZWFVlLnNlbGVjdGVkLWFYaFFSNiAucm9sZUNvbG9yLXJ6MnZNMCwKI2FwcC1tb3VudCAubWVtYmVycy0xOTk4cEIgLm1lbWJlci0zLVlYVWUgLmJvdFRhZy0yV1BKNzQsCiNhcHAtbW91bnQgLnNpZGViYXItMks4cEZoIC5jb250YWluZXItUE5raW1jIC5jb250YWluZXJEZWZhdWx0LTFabkFEcS5zZWxlY3RlZC0zN2pfaVUgLmNvbnRlbnQtM2F0X0FVIC5uYW1lLTNfRHNtZywKI2FwcC1tb3VudCAuc2lkZWJhci0ySzhwRmggLmNvbnRhaW5lci1QTmtpbWMgLmNvbnRhaW5lckRlZmF1bHQtMVpuQURxLnNlbGVjdGVkLTM3al9pVSAuY29udGVudC0zYXRfQVUgc3ZnLAojYXBwLW1vdW50IC50b29sdGlwQmxhY2stUFBHNDd6LCAjYXBwLW1vdW50IC50b29sdGlwQnJhbmQtZzAzTno4LCAjYXBwLW1vdW50IC50b29sdGlwUmVkLTgtOU5lUCwKI2FwcC1tb3VudCAuYnViYmxlLTN3ZTJkaSwgI2FwcC1tb3VudCAuc2lkZWJhci0ySzhwRmggLmNvbnRhaW5lci1QTmtpbWMgLmNvbnRhaW5lckRlZmF1bHQtMVpuQURxIC53cmFwcGVyLTF1Y2pUZDpub3QoLm1vZGVNdXRlZC0zb3N5N2opLm1vZGVVbnJlYWQtMXpwRmRBIC5jb250ZW50LTNhdF9BVSAubmFtZS0zX0RzbWcsCiNhcHAtbW91bnQgLnNpZGViYXItMks4cEZoIC5jb250YWluZXItUE5raW1jIC5jb250YWluZXJEZWZhdWx0LTFabkFEcSAud3JhcHBlci0xdWNqVGQ6bm90KC5tb2RlTXV0ZWQtM29zeTdqKS5tb2RlVW5yZWFkLTF6cEZkQSAuY29udGVudC0zYXRfQVUgc3ZnIHsKICAgIGNvbG9yOiAjMDAyYjM2ICFpbXBvcnRhbnQ7CiAgICB0ZXh0LXNoYWRvdzogbm9uZSAhaW1wb3J0YW50Owp9CgojYXBwLW1vdW50IC5zaWRlYmFyLTJLOHBGaCAuY29udGFpbmVyLVBOa2ltYyAuY29udGFpbmVyRGVmYXVsdC0xWm5BRHEgLndyYXBwZXItMXVjalRkOm5vdCgubW9kZU11dGVkLTNvc3k3aikubW9kZVVucmVhZC0xenBGZEEgLmNvbnRlbnQtM2F0X0FVIHsKICAgIGJhY2tncm91bmQ6ICMyNjhiZDIgIWltcG9ydGFudDsKfQoKI2FwcC1tb3VudCAuc2lkZWJhci0ySzhwRmggLmNoYW5uZWwtMlFEOV9PLnNlbGVjdGVkLWFYaFFSNiB7CiAgICBiYWNrZ3JvdW5kOiBsaW5lYXItZ3JhZGllbnQodmFyKC0tQkctZ3JhZGllbnQtZGlyZWN0aW9uKSwgcmdiYSh2YXIoLS1CRy1ncmFkaWVudC1vbmUpLCAxKSAyMCUsIHJnYmEodmFyKC0tQkctZ3JhZGllbnQtdHdvKSwgMSkpOwogICAgY29sb3I6ICMwMDJiMzYgIWltcG9ydGFudDsKICAgIHRleHQtc2hhZG93OiBub25lICFpbXBvcnRhbnQ7Cgp9"
|
"bdcustomcss": "I2FwcC1tb3VudCAuY2hhdC0zYlJ4eHUgLm1lc3NhZ2VzV3JhcHBlci0zbFpEZlkgW2NsYXNzKj10aW1lc3RhbXBdLAojYXBwLW1vdW50IC5jaGF0LTNiUnh4dSAubWVzc2FnZXNXcmFwcGVyLTNsWkRmWSAubWVzc2FnZUNvbnRlbnQtMnFXV3hDLAojYXBwLW1vdW50IC5zaWRlYmFyLTJLOHBGaCAuY29udGFpbmVyLVBOa2ltYyAuY29udGFpbmVyRGVmYXVsdC0xWm5BRHEgLndyYXBwZXItMXVjalRkOm5vdCgubW9kZU11dGVkLTNvc3k3aik6bm90KC5tb2RlVW5yZWFkLTF6cEZkQSk6bm90KC5tb2RlU2VsZWN0ZWQtMXpBcEpfKSAuY29udGVudC0zYXRfQVUgLm5hbWUtM19Ec21nLAojYXBwLW1vdW50IC5zaWRlYmFyLTJLOHBGaCAuY29udGFpbmVyLVBOa2ltYyAuY29udGFpbmVyRGVmYXVsdC0xWm5BRHEgLndyYXBwZXItMXVjalRkOm5vdCgubW9kZU11dGVkLTNvc3k3aik6bm90KC5tb2RlVW5yZWFkLTF6cEZkQSk6bm90KC5tb2RlU2VsZWN0ZWQtMXpBcEpfKSAuY29udGVudC0zYXRfQVUgc3ZnLAojYXBwLW1vdW50IC5zaWRlYmFyLTJLOHBGaCAuY2hhbm5lbC0yUUQ5X08gewogICAgY29sb3I6ICM5M2ExYTEgIWltcG9ydGFudDsKfQoKI2FwcC1tb3VudCA6OnNlbGVjdGlvbiwKI2FwcC1tb3VudCAuY2hhdC0zYlJ4eHUgLm1lbnRpb24sCiNhcHAtbW91bnQgLm1lbWJlcnMtMTk5OHBCIC5tZW1iZXItMy1ZWFVlLnNlbGVjdGVkLWFYaFFSNiAucm9sZUNvbG9yLXJ6MnZNMCwKI2FwcC1tb3VudCAubWVtYmVycy0xOTk4cEIgLm1lbWJlci0zLVlYVWUgLmJvdFRhZy0yV1BKNzQsCiNhcHAtbW91bnQgLnNpZGViYXItMks4cEZoIC5jb250YWluZXItUE5raW1jIC5jb250YWluZXJEZWZhdWx0LTFabkFEcS5zZWxlY3RlZC0zN2pfaVUgLmNvbnRlbnQtM2F0X0FVIC5uYW1lLTNfRHNtZywKI2FwcC1tb3VudCAuc2lkZWJhci0ySzhwRmggLmNvbnRhaW5lci1QTmtpbWMgLmNvbnRhaW5lckRlZmF1bHQtMVpuQURxLnNlbGVjdGVkLTM3al9pVSAuY29udGVudC0zYXRfQVUgc3ZnLAojYXBwLW1vdW50IC50b29sdGlwQmxhY2stUFBHNDd6LCAjYXBwLW1vdW50IC50b29sdGlwQnJhbmQtZzAzTno4LCAjYXBwLW1vdW50IC50b29sdGlwUmVkLTgtOU5lUCwKI2FwcC1tb3VudCAuYnViYmxlLTN3ZTJkaSwgI2FwcC1tb3VudCAuc2lkZWJhci0ySzhwRmggLmNvbnRhaW5lci1QTmtpbWMgLmNvbnRhaW5lckRlZmF1bHQtMVpuQURxIC53cmFwcGVyLTF1Y2pUZDpub3QoLm1vZGVNdXRlZC0zb3N5N2opLm1vZGVVbnJlYWQtMXpwRmRBIC5jb250ZW50LTNhdF9BVSAubmFtZS0zX0RzbWcsCiNhcHAtbW91bnQgLnNpZGViYXItMks4cEZoIC5jb250YWluZXItUE5raW1jIC5jb250YWluZXJEZWZhdWx0LTFabkFEcSAud3JhcHBlci0xdWNqVGQ6bm90KC5tb2RlTXV0ZWQtM29zeTdqKS5tb2RlVW5yZWFkLTF6cEZkQSAuY29udGVudC0zYXRfQVUgc3ZnIHsKICAgIGNvbG9yOiAjMDAyYjM2ICFpbXBvcnRhbnQ7CiAgICB0ZXh0LXNoYWRvdzogbm9uZSAhaW1wb3J0YW50Owp9CgojYXBwLW1vdW50IC5zaWRlYmFyLTJLOHBGaCAuY29udGFpbmVyLVBOa2ltYyAuY29udGFpbmVyRGVmYXVsdC0xWm5BRHEgLndyYXBwZXItMXVjalRkOm5vdCgubW9kZU11dGVkLTNvc3k3aikubW9kZVVucmVhZC0xenBGZEEgLmNvbnRlbnQtM2F0X0FVIHsKICAgIGJhY2tncm91bmQ6ICMyNjhiZDIgIWltcG9ydGFudDsKfQoKI2FwcC1tb3VudCAuc2lkZWJhci0ySzhwRmggLmNoYW5uZWwtMlFEOV9PLnNlbGVjdGVkLWFYaFFSNiB7CiAgICBiYWNrZ3JvdW5kOiBsaW5lYXItZ3JhZGllbnQodmFyKC0tQkctZ3JhZGllbnQtZGlyZWN0aW9uKSwgcmdiYSh2YXIoLS1CRy1ncmFkaWVudC1vbmUpLCAxKSAyMCUsIHJnYmEodmFyKC0tQkctZ3JhZGllbnQtdHdvKSwgMSkpOwogICAgY29sb3I6ICMwMDJiMzYgIWltcG9ydGFudDsKICAgIHRleHQtc2hhZG93OiBub25lICFpbXBvcnRhbnQ7Cgp9"
|
||||||
}
|
}
|
||||||
3
.config/chrome-flags.conf
Normal file
3
.config/chrome-flags.conf
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
--enable-features=VaapiVideoDecoder,VaapiVideoEncoder,WebUIDarkMode
|
||||||
|
--ozone-platform=wayland
|
||||||
|
--force-dark-mode
|
||||||
3
.config/electron-flags.conf
Normal file
3
.config/electron-flags.conf
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
--enable-features=VaapiVideoDecoder
|
||||||
|
--ozone-platform=wayland
|
||||||
|
--in-process-gpu
|
||||||
@@ -1 +1,2 @@
|
|||||||
XDG_CURRENT_DESKTOP=sway
|
export XDG_CURRENT_DESKTOP=sway
|
||||||
|
export XDG_SESSION_TYPE=wayland
|
||||||
|
|||||||
2
.config/kitty/bell.sh
Executable file
2
.config/kitty/bell.sh
Executable file
@@ -0,0 +1,2 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
find ~/.config/kitty/bells -type f | shuf -n 1 | mpv --audio-display=no --playlist=-
|
||||||
BIN
.config/kitty/bells/loli.mp3
Normal file
BIN
.config/kitty/bells/loli.mp3
Normal file
Binary file not shown.
1084
.config/kitty/kitty-scratch.conf
Normal file
1084
.config/kitty/kitty-scratch.conf
Normal file
File diff suppressed because it is too large
Load Diff
@@ -282,7 +282,8 @@ font_family DejaVuSansMono
|
|||||||
#: windows in the tab and the window is not the currently focused
|
#: windows in the tab and the window is not the currently focused
|
||||||
#: window
|
#: window
|
||||||
|
|
||||||
# command_on_bell none
|
# command_on_bell mpv --audio-display=no ~/loli.mp3
|
||||||
|
# command_on_bell ~/.config/kitty/bell.sh
|
||||||
|
|
||||||
#: Program to run when a bell occurs.
|
#: Program to run when a bell occurs.
|
||||||
|
|
||||||
@@ -490,7 +491,7 @@ color15 #fdf6e3
|
|||||||
|
|
||||||
#: The foreground and background colors
|
#: The foreground and background colors
|
||||||
|
|
||||||
background_opacity 0.8
|
background_opacity 1.0
|
||||||
|
|
||||||
#: The opacity of the background. A number between 0 and 1, where 1 is
|
#: The opacity of the background. A number between 0 and 1, where 1 is
|
||||||
#: opaque and 0 is fully transparent. This will only work if
|
#: opaque and 0 is fully transparent. This will only work if
|
||||||
@@ -508,7 +509,7 @@ background_opacity 0.8
|
|||||||
#: change transparency of windows set dynamic_background_opacity to
|
#: change transparency of windows set dynamic_background_opacity to
|
||||||
#: yes (this is off by default as it has a performance cost)
|
#: yes (this is off by default as it has a performance cost)
|
||||||
|
|
||||||
# dynamic_background_opacity no
|
dynamic_background_opacity yes
|
||||||
|
|
||||||
#: Allow changing of the background_opacity dynamically, using either
|
#: Allow changing of the background_opacity dynamically, using either
|
||||||
#: keyboard shortcuts (increase_background_opacity and
|
#: keyboard shortcuts (increase_background_opacity and
|
||||||
@@ -1034,6 +1035,8 @@ shell /bin/zsh
|
|||||||
# map kitty_mod+a>1 set_background_opacity 1
|
# map kitty_mod+a>1 set_background_opacity 1
|
||||||
# map kitty_mod+a>d set_background_opacity default
|
# map kitty_mod+a>d set_background_opacity default
|
||||||
# map kitty_mod+delete clear_terminal reset active
|
# map kitty_mod+delete clear_terminal reset active
|
||||||
|
map kitty_mod+a>o set_background_opacity 1.0
|
||||||
|
map kitty_mod+a>t set_background_opacity 0.8
|
||||||
|
|
||||||
#: You can create shortcuts to clear/reset the terminal. For example::
|
#: You can create shortcuts to clear/reset the terminal. For example::
|
||||||
|
|
||||||
|
|||||||
18
.config/mako/config
Normal file
18
.config/mako/config
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
anchor=top-left
|
||||||
|
background-color=#002b36ff
|
||||||
|
border-color=#859900ff
|
||||||
|
border-size=1
|
||||||
|
font=DejaVu Sans Mono 10
|
||||||
|
icon-location=left
|
||||||
|
margin=6
|
||||||
|
max-visible=-1
|
||||||
|
output=eDP-1
|
||||||
|
progress-color=source #859900ff
|
||||||
|
text-color=#93a1a1
|
||||||
|
text-alignment=left
|
||||||
|
width=400
|
||||||
|
|
||||||
|
[app-name="Spotify"]
|
||||||
|
anchor=top-right
|
||||||
|
icon-location=right
|
||||||
|
text-alignment=center
|
||||||
@@ -6,3 +6,9 @@ S screenshot-to-file /tmp/mpv-screenshot.png ; run sh -c "cat /tmp/mpv-screensho
|
|||||||
|
|
||||||
x add sub-delay -0.04
|
x add sub-delay -0.04
|
||||||
X add sub-delay +0.04
|
X add sub-delay +0.04
|
||||||
|
|
||||||
|
# increase subtitle font size
|
||||||
|
ALT+k add sub-scale +0.1
|
||||||
|
|
||||||
|
# decrease subtitle font size
|
||||||
|
ALT+j add sub-scale -0.1
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
profile=gpu-hq
|
profile=gpu-hq
|
||||||
#gpu-api=vulkan
|
#gpu-api=vulkan
|
||||||
|
#gpu-context=waylandvk
|
||||||
gpu-context=wayland
|
gpu-context=wayland
|
||||||
hwdec=none
|
hwdec=none
|
||||||
|
|
||||||
@@ -33,3 +34,9 @@ ytdl-format=bestvideo[height<=?1080]+bestaudio/best
|
|||||||
#ytdl-raw-options="rm-cache-dir=:yes-playlist="
|
#ytdl-raw-options="rm-cache-dir=:yes-playlist="
|
||||||
|
|
||||||
osd-fractions=yes
|
osd-fractions=yes
|
||||||
|
|
||||||
|
[downmix]
|
||||||
|
profile-desc="downmixing profile"
|
||||||
|
profile-cond=p["audio-params/channel-count"] > 2
|
||||||
|
ad-lavc-downmix=no
|
||||||
|
af=lavfi="pan=stereo|FL=0.5*FC+0.707*FL+0.707*BL+0.5*LFE|FR=0.5*FC+0.707*FR+0.707*BR+0.5*LFE"
|
||||||
|
|||||||
2
.config/mpv/script-opts/uosc.conf
Normal file
2
.config/mpv/script-opts/uosc.conf
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
timeline_size_max_fullscreen=40
|
||||||
|
top_bar_controls=no
|
||||||
35
.config/mpv/scripts/japan7.lua
Normal file
35
.config/mpv/scripts/japan7.lua
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
local settings = {
|
||||||
|
username = "japan7",
|
||||||
|
password = "nihongo",
|
||||||
|
projo_host = "https://lalafin.rhiobet.sh/api/public/file/folder/2d327726f84b208b97cac531dce0872abd0d2eb13728a7cc0c256e1c33d745a0"
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
local opts = require 'mp.options'
|
||||||
|
opts.read_options(settings, "japan7")
|
||||||
|
|
||||||
|
|
||||||
|
local function is_projo(path)
|
||||||
|
return path:match("^https://projection")
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
function on_load()
|
||||||
|
local path = mp.get_property("path")
|
||||||
|
local match = path:gsub("^https://fubuki.aidoru.agency", "https://"..settings.username..":"..settings.password.."@fubuki.aidoru.agency")
|
||||||
|
match = match:gsub("^https://korone.aidoru.agency", "https://"..settings.username..":"..settings.password.."@korone.aidoru.agency")
|
||||||
|
match = match:gsub("^https://yuyuko.butaishoujo.moe", "https://"..settings.username..":"..settings.password.."@yuyuko.butaishoujo.moe")
|
||||||
|
match = match:gsub("^https://projo.yuru.moe", "https://"..settings.username..":"..settings.password.."@projo.yuru.moe")
|
||||||
|
match = match:gsub("^https://projection", settings.projo_host)
|
||||||
|
if match ~= path then
|
||||||
|
if is_projo(path) then
|
||||||
|
local stream = match:gsub("^(.+)/.-$", "%1/stream")
|
||||||
|
mp.set_property("ordered-chapters-files", stream)
|
||||||
|
end
|
||||||
|
mp.set_property("stream-open-filename", match)
|
||||||
|
local ass = match:gsub("...$", "ass")
|
||||||
|
mp.commandv("sub-add", ass)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
mp.register_event('start-file', on_load)
|
||||||
4
.config/nvim/.gitignore
vendored
Normal file
4
.config/nvim/.gitignore
vendored
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
lua/**
|
||||||
|
plugin/packer_compiled.lua
|
||||||
|
|
||||||
|
**.spl
|
||||||
8
.config/nvim/.luarc.json
Normal file
8
.config/nvim/.luarc.json
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://raw.githubusercontent.com/sumneko/vscode-lua/master/setting/schema.json",
|
||||||
|
"Lua.diagnostics.globals": [
|
||||||
|
"vim",
|
||||||
|
"use",
|
||||||
|
"packer_bootstrap"
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -1,59 +0,0 @@
|
|||||||
{
|
|
||||||
"explorer.keyMappings": {
|
|
||||||
"k": "nodePrev",
|
|
||||||
"j": "nodeNext",
|
|
||||||
|
|
||||||
"*": "toggleSelection",
|
|
||||||
"<tab>": "actionMenu",
|
|
||||||
|
|
||||||
"<Left>": "collapse",
|
|
||||||
"<Right>": "expand",
|
|
||||||
"J": ["toggleSelection", "normal:j"],
|
|
||||||
"K": ["toggleSelection", "normal:k"],
|
|
||||||
"gl": "expandRecursive",
|
|
||||||
"gh": "collapseRecursive",
|
|
||||||
"o": "expandOrCollapse",
|
|
||||||
"<cr>": "open",
|
|
||||||
"e": "open",
|
|
||||||
"E": "openInVsplit",
|
|
||||||
"t": "openInTab",
|
|
||||||
"<bs>": "gotoParent",
|
|
||||||
|
|
||||||
"y": "copyFilepath",
|
|
||||||
"Y": "copyFilename",
|
|
||||||
"c": "copyFile",
|
|
||||||
"x": "cutFile",
|
|
||||||
"p": "pasteFile",
|
|
||||||
"d": "delete",
|
|
||||||
"D": "deleteForever",
|
|
||||||
|
|
||||||
"a": "addFile",
|
|
||||||
"A": "addDirectory",
|
|
||||||
"r": "rename",
|
|
||||||
|
|
||||||
".": "toggleHidden",
|
|
||||||
"R": "refresh",
|
|
||||||
|
|
||||||
"?": "help",
|
|
||||||
"q": "quit",
|
|
||||||
"X": "systemExecute",
|
|
||||||
"gd": "listDrive",
|
|
||||||
|
|
||||||
"f": "search",
|
|
||||||
"F": "searchRecursive",
|
|
||||||
|
|
||||||
"gf": "gotoSource:file",
|
|
||||||
"gb": "gotoSource:buffer",
|
|
||||||
|
|
||||||
"[[": "sourcePrev",
|
|
||||||
"]]": "sourceNext",
|
|
||||||
|
|
||||||
"[d": "diagnosticPrev",
|
|
||||||
"]d": "diagnosticNext",
|
|
||||||
|
|
||||||
"[c": "gitPrev",
|
|
||||||
"]c": "gitNext",
|
|
||||||
"<<": "gitStage",
|
|
||||||
">>": "gitUnstage"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
3
.config/nvim/fnl/init.fnl
Normal file
3
.config/nvim/fnl/init.fnl
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
(require :plugins)
|
||||||
|
|
||||||
|
(require :settings.general)
|
||||||
15
.config/nvim/fnl/macros.fnl
Normal file
15
.config/nvim/fnl/macros.fnl
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
(fn setup [module args]
|
||||||
|
`((. (require ,module) :setup) ,args))
|
||||||
|
|
||||||
|
(fn packer [config ...]
|
||||||
|
"syntactic sugar over packer's startup function."
|
||||||
|
(local packer `(require :packer))
|
||||||
|
`((. ,packer :startup)
|
||||||
|
{1 (lambda [(unquote (sym :use))]
|
||||||
|
(use :wbthomason/packer.nvim)
|
||||||
|
(do ,...)
|
||||||
|
(if (= true _G.packer_bootstrap)
|
||||||
|
((. ,packer :sync))))
|
||||||
|
:config ,config}))
|
||||||
|
|
||||||
|
{: setup : packer}
|
||||||
112
.config/nvim/fnl/plugins.fnl
Normal file
112
.config/nvim/fnl/plugins.fnl
Normal file
@@ -0,0 +1,112 @@
|
|||||||
|
(import-macros {: packer-setup : use!} :hibiscus.packer)
|
||||||
|
(import-macros {: packer : setup} :macros)
|
||||||
|
|
||||||
|
(packer-setup)
|
||||||
|
|
||||||
|
(packer
|
||||||
|
{:display {:open_fn (. (require :packer.util) :float)}}
|
||||||
|
|
||||||
|
|
||||||
|
(use! :lewis6991/impatient.nvim)
|
||||||
|
(use! :udayvir-singh/tangerine.nvim)
|
||||||
|
(use! :udayvir-singh/hibiscus.nvim)
|
||||||
|
|
||||||
|
(use! "~/.config/nvim/themes/solarized.nvim"
|
||||||
|
:module :settings.solarized)
|
||||||
|
|
||||||
|
(use! :nvim-treesitter/nvim-treesitter
|
||||||
|
:run (fn [] ((. (require :nvim-treesitter.install) :update) {:with_sync true}))
|
||||||
|
:module :settings.treesitter)
|
||||||
|
|
||||||
|
(use! :feline-nvim/feline.nvim
|
||||||
|
:requires [:kyazdani42/nvim-web-devicons
|
||||||
|
"~/.config/nvim/themes/solarized.nvim"]
|
||||||
|
:after [:solarized.nvim]
|
||||||
|
:module :settings.feline)
|
||||||
|
|
||||||
|
(use! :s1n7ax/nvim-window-picker
|
||||||
|
:module :settings.window-picker)
|
||||||
|
|
||||||
|
(use! :nvim-neo-tree/neo-tree.nvim
|
||||||
|
:branch "v2.x"
|
||||||
|
:requires [:nvim-lua/plenary.nvim
|
||||||
|
:nvim-telescope/telescope.nvim
|
||||||
|
:kyazdani42/nvim-web-devicons
|
||||||
|
:MunifTanjim/nui.nvim
|
||||||
|
:s1n7ax/nvim-window-picker
|
||||||
|
:edluffy/hologram.nvim]
|
||||||
|
:after [:nvim-window-picker
|
||||||
|
:hologram.nvim]
|
||||||
|
:module :settings.neo-tree)
|
||||||
|
|
||||||
|
(use! :mrjones2014/smart-splits.nvim
|
||||||
|
:module :settings.smart-splits)
|
||||||
|
|
||||||
|
(use! :famiu/bufdelete.nvim
|
||||||
|
:module :bufdelete)
|
||||||
|
|
||||||
|
(use! :akinsho/bufferline.nvim
|
||||||
|
:tag "v2.*"
|
||||||
|
:requires [:kyazdani42/nvim-web-devicons
|
||||||
|
:famiu/bufdelete.nvim
|
||||||
|
"~/.config/nvim/themes/solarized.nvim"]
|
||||||
|
:after [:bufdelete.nvim
|
||||||
|
:solarized.nvim]
|
||||||
|
:module :settings.bufferline)
|
||||||
|
|
||||||
|
(use! :windwp/nvim-autopairs
|
||||||
|
:module :settings.autopairs)
|
||||||
|
|
||||||
|
(use! :lewis6991/gitsigns.nvim
|
||||||
|
:module :settings.gitsigns)
|
||||||
|
|
||||||
|
(use! :declancm/cinnamon.nvim
|
||||||
|
:module :settings.cinnamon)
|
||||||
|
|
||||||
|
(use! :stevearc/aerial.nvim
|
||||||
|
:module :settings.aerial)
|
||||||
|
|
||||||
|
(use! :nmac427/guess-indent.nvim
|
||||||
|
:module :settings.guess-indent)
|
||||||
|
|
||||||
|
(use! :nvim-telescope/telescope.nvim
|
||||||
|
:requires [:nvim-lua/plenary.nvim
|
||||||
|
:s1n7ax/nvim-window-picker]
|
||||||
|
:after [:nvim-window-picker]
|
||||||
|
:module :settings.telescope)
|
||||||
|
|
||||||
|
(use! :sindrets/diffview.nvim
|
||||||
|
:requires [:nvim-lua/plenary.nvim]
|
||||||
|
:module :settings.diffview)
|
||||||
|
|
||||||
|
(use! :neovim/nvim-lspconfig
|
||||||
|
:requires [:williamboman/mason-lspconfig.nvim
|
||||||
|
:williamboman/mason.nvim
|
||||||
|
:hrsh7th/cmp-omni
|
||||||
|
:hrsh7th/cmp-nvim-lsp
|
||||||
|
:onsails/lspkind.nvim
|
||||||
|
:hrsh7th/nvim-cmp
|
||||||
|
:saadparwaiz1/cmp_luasnip
|
||||||
|
:rafamadriz/friendly-snippets
|
||||||
|
:L3MON4D3/LuaSnip]
|
||||||
|
:module :settings.lspconfig)
|
||||||
|
|
||||||
|
(use! :jose-elias-alvarez/null-ls.nvim
|
||||||
|
:module :settings.null-ls)
|
||||||
|
|
||||||
|
(use! :lervag/vimtex
|
||||||
|
:module :settings.vimtex)
|
||||||
|
|
||||||
|
(use! :edluffy/hologram.nvim
|
||||||
|
:module :settings.hologram)
|
||||||
|
|
||||||
|
(use! :lambdalisue/suda.vim)
|
||||||
|
|
||||||
|
(use! :folke/noice.nvim
|
||||||
|
:event :VimEnter
|
||||||
|
:requires [:MunifTanjim/nui.nvim]
|
||||||
|
:module :settings.noice)
|
||||||
|
|
||||||
|
(use! :glacambre/firenvim
|
||||||
|
:run (fn [] ((. vim.fn :firenvim#install) 0))
|
||||||
|
:module :settings.firenvim))
|
||||||
18
.config/nvim/fnl/settings/aerial.fnl
Normal file
18
.config/nvim/fnl/settings/aerial.fnl
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
(import-macros {: map!} :hibiscus.vim)
|
||||||
|
(import-macros {: setup} :macros)
|
||||||
|
|
||||||
|
(if (= vim.g.started_by_firenvim nil)
|
||||||
|
(setup :aerial
|
||||||
|
{:backends [:lsp :treesitter]
|
||||||
|
:layout {:width 30
|
||||||
|
:placement "edge"}
|
||||||
|
:attach_mode "global"
|
||||||
|
:close_automatic_events [:unsupported]
|
||||||
|
:open_automatic true
|
||||||
|
:ignore {:filetypes [""
|
||||||
|
"neo-tree"
|
||||||
|
"aerial"
|
||||||
|
"packer"
|
||||||
|
"qf"
|
||||||
|
"help"
|
||||||
|
"DiffviewFileHistory"]}}))
|
||||||
3
.config/nvim/fnl/settings/autopairs.fnl
Normal file
3
.config/nvim/fnl/settings/autopairs.fnl
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
(import-macros {: setup} :macros)
|
||||||
|
|
||||||
|
(setup :nvim-autopairs)
|
||||||
20
.config/nvim/fnl/settings/bufferline.fnl
Normal file
20
.config/nvim/fnl/settings/bufferline.fnl
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
(import-macros {: map!} :hibiscus.vim)
|
||||||
|
(import-macros {: setup} :macros)
|
||||||
|
|
||||||
|
(local colors (require :solarized.colors))
|
||||||
|
|
||||||
|
(if (= vim.g.started_by_firenvim nil)
|
||||||
|
(setup :bufferline
|
||||||
|
{:options {:close_command "Bdelete %d"
|
||||||
|
:right_mouse_command "Bdelete %d"
|
||||||
|
:offsets [{:filetype "neo-tree" :text "File Explorer" :padding 1}
|
||||||
|
{:filetype "aerial" :text "Outline" :padding 1}]
|
||||||
|
:enforce_regular_tabs true
|
||||||
|
:separator_style "slant"}
|
||||||
|
:highlights {:separator {:fg colors.bg_alt}
|
||||||
|
:separator_visible {:fg colors.bg_alt}
|
||||||
|
:separator_selected {:fg colors.bg_alt}}}))
|
||||||
|
|
||||||
|
(map! [n] :<S-Right> ":bnext<CR>")
|
||||||
|
(map! [n] :<S-Left> ":bprevious<CR>")
|
||||||
|
(map! [n] :q ":Bwipeout<CR>")
|
||||||
3
.config/nvim/fnl/settings/cinnamon.fnl
Normal file
3
.config/nvim/fnl/settings/cinnamon.fnl
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
(import-macros {: setup} :macros)
|
||||||
|
|
||||||
|
(setup :cinnamon)
|
||||||
10
.config/nvim/fnl/settings/diffview.fnl
Normal file
10
.config/nvim/fnl/settings/diffview.fnl
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
(import-macros {: map!} :hibiscus.vim)
|
||||||
|
(import-macros {: setup} :macros)
|
||||||
|
|
||||||
|
(setup :diffview
|
||||||
|
{:keymaps {:view {:q ":tabc<CR>"}
|
||||||
|
:file_panel {:q ":tabc<CR>"}
|
||||||
|
:file_history_panel {:q ":tabc<CR>"}}})
|
||||||
|
|
||||||
|
(map! [n] :r ":DiffviewOpen<CR>")
|
||||||
|
(map! [n] :R ":DiffviewFileHistory %<CR>")
|
||||||
33
.config/nvim/fnl/settings/feline.fnl
Normal file
33
.config/nvim/fnl/settings/feline.fnl
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
(import-macros {: setup} :macros)
|
||||||
|
|
||||||
|
(local colors (require :solarized.colors))
|
||||||
|
|
||||||
|
(local theme
|
||||||
|
{:fg colors.fg
|
||||||
|
:bg colors.bg_alt
|
||||||
|
:black colors.black
|
||||||
|
:skyblue colors.paleblue
|
||||||
|
:cyan colors.cyan
|
||||||
|
:green colors.green
|
||||||
|
:oceanblue colors.blue
|
||||||
|
:magenta colors.magenta
|
||||||
|
:orange colors.orange
|
||||||
|
:red colors.red
|
||||||
|
:violet colors.purple
|
||||||
|
:white colors.white
|
||||||
|
:yellow colors.yellow})
|
||||||
|
|
||||||
|
(if (= vim.g.started_by_firenvim nil)
|
||||||
|
(setup :feline
|
||||||
|
{:theme theme
|
||||||
|
:force_inactive {:filetypes ["^neo\\-tree$"
|
||||||
|
"^aerial$"
|
||||||
|
"^packer$"
|
||||||
|
"^startify$"
|
||||||
|
"^fugitive$"
|
||||||
|
"^fugitiveblame$"
|
||||||
|
"^qf$"
|
||||||
|
"^help$"
|
||||||
|
"^DiffviewFileHistory"]
|
||||||
|
:buftypes ["^terminal$"]
|
||||||
|
:bufnames ["neo\\-.*"]}}))
|
||||||
9
.config/nvim/fnl/settings/firenvim.fnl
Normal file
9
.config/nvim/fnl/settings/firenvim.fnl
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
(import-macros {: g!} :hibiscus.vim)
|
||||||
|
|
||||||
|
(g! :firenvim_config {:globalSettings {:alt "all"}
|
||||||
|
:localSettings {:.* {:cmdline "neovim"
|
||||||
|
:content "text"
|
||||||
|
:priority 0
|
||||||
|
:selector "textarea"
|
||||||
|
:takeover "always"}
|
||||||
|
:https://zimbra.inria.fr/ {:selector "body[id=tinymce]"}}})
|
||||||
16
.config/nvim/fnl/settings/general.fnl
Normal file
16
.config/nvim/fnl/settings/general.fnl
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
(import-macros {: g! : set!} :hibiscus.vim)
|
||||||
|
|
||||||
|
(g! :maplocalleader ",")
|
||||||
|
|
||||||
|
(set! :clipboard "unnamedplus")
|
||||||
|
(set! :expandtab true)
|
||||||
|
(set! :fileencoding "utf-8")
|
||||||
|
(set! :ignorecase true)
|
||||||
|
(set! :mouse "a")
|
||||||
|
(set! :showmode false)
|
||||||
|
(set! :number true)
|
||||||
|
(set! :shiftwidth 2)
|
||||||
|
(set! :signcolumn "yes")
|
||||||
|
(set! :smartcase true)
|
||||||
|
(set! :spelllang "en")
|
||||||
|
(set! :tabstop 2)
|
||||||
3
.config/nvim/fnl/settings/gitsigns.fnl
Normal file
3
.config/nvim/fnl/settings/gitsigns.fnl
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
(import-macros {: setup} :macros)
|
||||||
|
|
||||||
|
(setup :gitsigns)
|
||||||
3
.config/nvim/fnl/settings/guess-indent.fnl
Normal file
3
.config/nvim/fnl/settings/guess-indent.fnl
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
(import-macros {: setup} :macros)
|
||||||
|
|
||||||
|
(setup :guess-indent)
|
||||||
4
.config/nvim/fnl/settings/hologram.fnl
Normal file
4
.config/nvim/fnl/settings/hologram.fnl
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
(import-macros {: setup} :macros)
|
||||||
|
|
||||||
|
(setup :hologram
|
||||||
|
{:auto_display false})
|
||||||
87
.config/nvim/fnl/settings/lsp/ltex.fnl
Normal file
87
.config/nvim/fnl/settings/lsp/ltex.fnl
Normal file
@@ -0,0 +1,87 @@
|
|||||||
|
(import-macros {: exec : map!} :hibiscus.vim)
|
||||||
|
|
||||||
|
(local M {})
|
||||||
|
|
||||||
|
(local files
|
||||||
|
{:dictionary (.. (vim.fn.stdpath "config") "/spell/en.utf-8.add")
|
||||||
|
:disabledRules (.. (vim.fn.stdpath "config") "/spell/disable.txt")
|
||||||
|
:hiddenFalsePositives (.. (vim.fn.stdpath "config") "/spell/false.txt")})
|
||||||
|
|
||||||
|
(fn file_exists [file]
|
||||||
|
(let [f (io.open file "rb")]
|
||||||
|
(if f
|
||||||
|
(do (f:close) true)
|
||||||
|
false)))
|
||||||
|
|
||||||
|
(fn lines_from [file]
|
||||||
|
(if (file_exists file)
|
||||||
|
(icollect [line (io.lines file)] line)
|
||||||
|
[]))
|
||||||
|
|
||||||
|
(fn get_client_by_name [name]
|
||||||
|
(let [buf_clients (vim.lsp.buf_get_clients)]
|
||||||
|
(var found_client nil)
|
||||||
|
(each [_ client (ipairs buf_clients) :until found_client]
|
||||||
|
(match client.name name (set found_client client)))
|
||||||
|
found_client))
|
||||||
|
|
||||||
|
(fn update_config [lang configtype]
|
||||||
|
(let [client (get_client_by_name "ltex")]
|
||||||
|
(if (and client (. client.config.settings.ltex configtype))
|
||||||
|
(do (tset client.config.settings.ltex configtype {lang (lines_from (. files configtype))})
|
||||||
|
(client.notify "workspace/didChangeConfiguration" client.config.settings))
|
||||||
|
(vim.notify "Error when reading dictionary config, check it"))))
|
||||||
|
|
||||||
|
(fn add_to_file [configtype lang file value]
|
||||||
|
(let [dict (lines_from file)]
|
||||||
|
(var found_existing false)
|
||||||
|
(each [_ v (ipairs dict) :until found_existing]
|
||||||
|
(if (= v value) (set found_existing true)))
|
||||||
|
(if (not found_existing)
|
||||||
|
(let [file (io.open file "a+")]
|
||||||
|
(if file
|
||||||
|
(do (file:write (.. value "\n"))
|
||||||
|
(file:close)
|
||||||
|
(update_config lang configtype))
|
||||||
|
(vim.notify (string.format "Failed insert %s" value)))))))
|
||||||
|
|
||||||
|
(fn do_command [arg configtype]
|
||||||
|
(each [lang words (pairs arg)]
|
||||||
|
(each [_ word (ipairs words)]
|
||||||
|
(add_to_file configtype lang (. files configtype) word))))
|
||||||
|
|
||||||
|
(tset vim.lsp.commands "_ltex.addToDictionary"
|
||||||
|
(fn [command _] (do_command (. command.arguments 1 :words) :dictionary)))
|
||||||
|
(tset vim.lsp.commands "_ltex.disableRules"
|
||||||
|
(fn [command _] (do_command (. command.arguments 1 :ruleIds) :disabledRules)))
|
||||||
|
(tset vim.lsp.commands "_ltex.hideFalsePositives"
|
||||||
|
(fn [command _] (do_command (. command.arguments 1 :falsePositives) :hiddenFalsePositives)))
|
||||||
|
|
||||||
|
(fn post_attach []
|
||||||
|
(exec [[:setlocal "spell"] [:setlocal "nospell"]])
|
||||||
|
(update_config "en-US" "dictionary")
|
||||||
|
(update_config "en-US" "disabledRules")
|
||||||
|
(update_config "en-US" "hiddenFalsePositives")
|
||||||
|
(map! [n :buffer :verbose] :zug (fn [] (exec [[:normal! "zug"]])
|
||||||
|
(update_config "en-US" "dictionary")
|
||||||
|
nil)
|
||||||
|
"Remove word from spellfile and update ltex")
|
||||||
|
(map! [n :buffer :verbose] :zg (fn [] (exec [[:normal! "zg"]])
|
||||||
|
(update_config "en-US" "dictionary")
|
||||||
|
nil)
|
||||||
|
"Add word to spellfile and update ltex")
|
||||||
|
nil)
|
||||||
|
|
||||||
|
(fn M.setup [opts]
|
||||||
|
((. (require :lspconfig) :ltex :setup)
|
||||||
|
{:on_attach (fn [client] (opts.on_attach client)
|
||||||
|
(post_attach)
|
||||||
|
nil)
|
||||||
|
:capabilities opts.capabilities
|
||||||
|
:flags opts.flags
|
||||||
|
:settings {:ltex {:dictionary []
|
||||||
|
:disabledRules []
|
||||||
|
:hiddenFalsePositives []}
|
||||||
|
:additionalRules {:enablePickyRules true}}}))
|
||||||
|
|
||||||
|
M
|
||||||
80
.config/nvim/fnl/settings/lspconfig.fnl
Normal file
80
.config/nvim/fnl/settings/lspconfig.fnl
Normal file
@@ -0,0 +1,80 @@
|
|||||||
|
(import-macros {: map!} :hibiscus.vim)
|
||||||
|
(import-macros {: setup} :macros)
|
||||||
|
|
||||||
|
(local servers
|
||||||
|
[:eslint
|
||||||
|
:gopls
|
||||||
|
:ltex
|
||||||
|
:pyright
|
||||||
|
:sumneko_lua
|
||||||
|
:tsserver])
|
||||||
|
|
||||||
|
; Mappings.
|
||||||
|
(map! [n :noremap] "<space>e" vim.diagnostic.open_float)
|
||||||
|
(map! [n :noremap] "[d" vim.diagnostic.goto_prev)
|
||||||
|
(map! [n :noremap] "]d" vim.diagnostic.goto_next)
|
||||||
|
(map! [n :noremap] "<space>q" vim.diagnostic.setloclist)
|
||||||
|
|
||||||
|
(fn on_attach [_ bufnr]
|
||||||
|
(map! [n :noremap :buffer] :gD vim.lsp.buf.declaration)
|
||||||
|
(map! [n :noremap :buffer] :gd vim.lsp.buf.definition)
|
||||||
|
(map! [n :noremap :buffer] :K vim.lsp.buf.hover)
|
||||||
|
(map! [n :noremap :buffer] :gi vim.lsp.buf.implementation)
|
||||||
|
(map! [n :noremap :buffer] :<C-k> vim.lsp.buf.signature_help)
|
||||||
|
(map! [n :noremap :buffer] :<space>wa vim.lsp.buf.add_workspace_folder)
|
||||||
|
(map! [n :noremap :buffer] :<space>wr vim.lsp.buf.remove_workspace_folder)
|
||||||
|
(map! [n :noremap :buffer] :<space>wl (fn [] (print (vim.inspect (vim.lsp.buf.list_workspace_folders)))))
|
||||||
|
(map! [n :noremap :buffer] :<space>D vim.lsp.buf.type_definition)
|
||||||
|
(map! [n :noremap :buffer] :<space>rn vim.lsp.buf.rename)
|
||||||
|
(map! [n :noremap :buffer] :<space>ca vim.lsp.buf.code_action)
|
||||||
|
(map! [n :noremap :buffer] :gr vim.lsp.buf.references)
|
||||||
|
(map! [n :noremap :buffer] :<space>f vim.lsp.buf.formatting))
|
||||||
|
|
||||||
|
(local capabilities ((. (require :cmp_nvim_lsp) :default_capabilities) (vim.lsp.protocol.make_client_capabilities)))
|
||||||
|
|
||||||
|
(setup :mason)
|
||||||
|
(setup :mason-lspconfig
|
||||||
|
{:ensure_installed servers})
|
||||||
|
|
||||||
|
(each [_ lsp (pairs servers)]
|
||||||
|
(local lsp_opts
|
||||||
|
{:on_attach on_attach
|
||||||
|
:capabilities capabilities
|
||||||
|
:flags {:debounce_text_changes 150}})
|
||||||
|
(local (status config) (pcall require (.. "settings.lsp." lsp)))
|
||||||
|
(if status
|
||||||
|
(config.setup lsp_opts)
|
||||||
|
((. (require :lspconfig) lsp :setup) lsp_opts)))
|
||||||
|
|
||||||
|
; LuaSnip setup
|
||||||
|
(local luasnip (require :luasnip))
|
||||||
|
((. (require :luasnip.loaders.from_vscode) :lazy_load))
|
||||||
|
|
||||||
|
; nvim-cmp setup
|
||||||
|
(local lspkind (require :lspkind))
|
||||||
|
(local cmp (require :cmp))
|
||||||
|
(cmp.setup
|
||||||
|
{:snippet {:expand (fn [args] (luasnip.lsp_expand args.body))}
|
||||||
|
:mapping (cmp.mapping.preset.insert
|
||||||
|
{:<C-d> (cmp.mapping.scroll_docs -4)
|
||||||
|
:<C-f> (cmp.mapping.scroll_docs 4)
|
||||||
|
:<C-Space> (cmp.mapping.complete)
|
||||||
|
:<CR> (cmp.mapping.confirm {:behavior cmp.ConfirmBehavior.Replace
|
||||||
|
:select true})
|
||||||
|
:<Tab> (cmp.mapping
|
||||||
|
(fn [fallback] (if (cmp.visible)
|
||||||
|
(cmp.select_next_item)
|
||||||
|
(luasnip.expand_or_jumpable)
|
||||||
|
(luasnip.expand_or_jump)
|
||||||
|
(fallback)))
|
||||||
|
[:i :s])
|
||||||
|
:<S-Tab> (cmp.mapping
|
||||||
|
(fn [fallback] (if (cmp.visible)
|
||||||
|
(cmp.select_prev_item)
|
||||||
|
(luasnip.jumpable -1)
|
||||||
|
(luasnip.jump -1)
|
||||||
|
(fallback)))
|
||||||
|
[:i :s])})
|
||||||
|
:sources [{:name "luasnip"}
|
||||||
|
{:name "nvim_lsp"}]
|
||||||
|
:formatting {:format (lspkind.cmp_format {:mode "symbol_text"})}})
|
||||||
78
.config/nvim/fnl/settings/neo-tree.fnl
Normal file
78
.config/nvim/fnl/settings/neo-tree.fnl
Normal file
@@ -0,0 +1,78 @@
|
|||||||
|
(import-macros {: g! : exec : map! : augroup!} :hibiscus.vim)
|
||||||
|
(import-macros {: setup} :macros)
|
||||||
|
|
||||||
|
(g! :neo_tree_remove_legacy_commands 1)
|
||||||
|
|
||||||
|
(setup :neo-tree
|
||||||
|
{:close_if_last_window true
|
||||||
|
:window {:width 30
|
||||||
|
:mappings {:<cr> "open_with_window_picker"
|
||||||
|
:S "split_with_window_picker"
|
||||||
|
:s "vsplit_with_window_picker"}}
|
||||||
|
:filesystem {:filtered_items {:visible true}
|
||||||
|
:follow_current_file true
|
||||||
|
:window {:mappings {:/ "noop"
|
||||||
|
:g/ "fuzzy_finder"
|
||||||
|
:f "noop"
|
||||||
|
:ff (fn [] (exec [[:Telescope "find_files"]]))
|
||||||
|
:fg (fn [] (exec [[:Telescope "live_grep"]]))
|
||||||
|
:<CR> "custom_open"
|
||||||
|
:e "open"
|
||||||
|
:<S-Right> (fn [])
|
||||||
|
:<S-Left> (fn [])}}
|
||||||
|
:commands {:custom_open (fn [state]
|
||||||
|
(let [node (state.tree:get_node)
|
||||||
|
path (node:get_id)
|
||||||
|
quoted_path (.. "'" (.. path "'"))]
|
||||||
|
(match (path:match "^.+%.(.+)$")
|
||||||
|
"png" (let [bufnr (vim.api.nvim_create_buf false true)
|
||||||
|
image (: (require :hologram.image) :new path {})
|
||||||
|
max_width (- vim.o.columns 4)
|
||||||
|
max_height (- vim.o.lines 2)
|
||||||
|
tmp_width (math.min image.cols max_width)
|
||||||
|
tmp_height (* image.rows (/ tmp_width image.cols))
|
||||||
|
height (math.min tmp_height max_height)
|
||||||
|
width (* image.cols (/ height image.rows))
|
||||||
|
winnr (vim.api.nvim_open_win bufnr true {:relative "editor"
|
||||||
|
:width (math.ceil width)
|
||||||
|
:height (+ (math.ceil height) 1)
|
||||||
|
:row 0
|
||||||
|
:col 2})]
|
||||||
|
(exec [[:setlocal "nonumber"]])
|
||||||
|
(vim.api.nvim_buf_attach bufnr false {:on_detach (fn [_ bufnr]
|
||||||
|
(image:delete bufnr {:free true}))})
|
||||||
|
(image:display 1 0 bufnr {}))
|
||||||
|
_ (do
|
||||||
|
(exec [[:silent
|
||||||
|
"!file -bL --mime" quoted_path
|
||||||
|
"| grep -qv '^text\\|^inode\\|^application/json'"]])
|
||||||
|
(if (= vim.v.shell_error 1)
|
||||||
|
((. (require :neo-tree.sources.filesystem.commands) :open_with_window_picker) state)
|
||||||
|
(exec [[:silent
|
||||||
|
"!xdg-open" quoted_path
|
||||||
|
"&"]]))))))}}
|
||||||
|
:renderers {:directory [[:indent]
|
||||||
|
[:icon]
|
||||||
|
[:current_filter]
|
||||||
|
[:name]
|
||||||
|
[:clipboard]
|
||||||
|
{1 :diagnostics :errors_only true}]
|
||||||
|
:file [[:indent]
|
||||||
|
[:icon]
|
||||||
|
{1 :name :use_git_status_colors true :zindex 10}
|
||||||
|
[:clipboard]
|
||||||
|
[:bufnr]
|
||||||
|
[:modified]
|
||||||
|
[:diagnostics]
|
||||||
|
[:git_status]]}})
|
||||||
|
|
||||||
|
(map! [n] :f ":Neotree focus<CR>")
|
||||||
|
(map! [n] :F (fn [] (exec [[:Neotree "toggle"] [:Neotree "toggle" "action=show"]])))
|
||||||
|
|
||||||
|
(augroup! :neo-tree [[FileType] [qf] "set nobuflisted|call feedkeys(\"F\")"])
|
||||||
|
|
||||||
|
; Startup
|
||||||
|
(if (= vim.g.started_by_firenvim nil)
|
||||||
|
(if (or (= (vim.fn.expand "%") "") (not= (vim.fn.isdirectory (vim.fn.expand "%")) 0))
|
||||||
|
((. (require :neo-tree.command) :execute) {:action "focus" :dir (vim.fn.getcwd)})
|
||||||
|
((. (require :neo-tree.command) :execute) {:action "show" :dir (vim.fn.getcwd)})))
|
||||||
3
.config/nvim/fnl/settings/noice.fnl
Normal file
3
.config/nvim/fnl/settings/noice.fnl
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
(import-macros {: setup} :macros)
|
||||||
|
|
||||||
|
(setup :noice)
|
||||||
4
.config/nvim/fnl/settings/null-ls.fnl
Normal file
4
.config/nvim/fnl/settings/null-ls.fnl
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
(import-macros {: setup} :macros)
|
||||||
|
|
||||||
|
(setup :null-ls
|
||||||
|
{:sources [(. (require :null-ls) :builtins :diagnostics :flake8)]})
|
||||||
12
.config/nvim/fnl/settings/smart-splits.fnl
Normal file
12
.config/nvim/fnl/settings/smart-splits.fnl
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
(import-macros {: map!} :hibiscus.vim)
|
||||||
|
|
||||||
|
(local smart-splits (require :smart-splits))
|
||||||
|
|
||||||
|
(map! [n] :<C-Left> smart-splits.move_cursor_left)
|
||||||
|
(map! [n] :<C-Down> smart-splits.move_cursor_down)
|
||||||
|
(map! [n] :<C-Up> smart-splits.move_cursor_up)
|
||||||
|
(map! [n] :<C-Right> smart-splits.move_cursor_right)
|
||||||
|
(map! [n] :<C-S-Up> smart-splits.resize_up)
|
||||||
|
(map! [n] :<C-S-Down> smart-splits.resize_down)
|
||||||
|
(map! [n] :<C-S-Left> smart-splits.resize_left)
|
||||||
|
(map! [n] :<C-S-Right> smart-splits.resize_right)
|
||||||
11
.config/nvim/fnl/settings/solarized.fnl
Normal file
11
.config/nvim/fnl/settings/solarized.fnl
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
(import-macros {: g!} :hibiscus.vim)
|
||||||
|
|
||||||
|
(g! :solarized_italic_comments true)
|
||||||
|
(g! :solarized_italic_keywords true)
|
||||||
|
(g! :solarized_italic_functions true)
|
||||||
|
(g! :solarized_italic_variables false)
|
||||||
|
(g! :solarized_contrast true)
|
||||||
|
(g! :solarized_borders false)
|
||||||
|
(g! :solarized_disable_background false)
|
||||||
|
|
||||||
|
((. (require :solarized) :set))
|
||||||
19
.config/nvim/fnl/settings/telescope.fnl
Normal file
19
.config/nvim/fnl/settings/telescope.fnl
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
(import-macros {: setup} :macros)
|
||||||
|
|
||||||
|
(local actions (require :telescope.actions))
|
||||||
|
|
||||||
|
(setup :telescope
|
||||||
|
{:defaults {:mappings {:n {:S actions.file_split
|
||||||
|
:s actions.file_vsplit}}
|
||||||
|
:get_selection_window (. (require :window-picker) :pick_window)}
|
||||||
|
:pickers {:find_files {:find_command [:fd "--type" "f"
|
||||||
|
"--strip-cwd-prefix"
|
||||||
|
"--hidden"]}
|
||||||
|
:live_grep {:vimgrep_arguments ["rg"
|
||||||
|
"--color=never"
|
||||||
|
"--no-heading"
|
||||||
|
"--with-filename"
|
||||||
|
"--line-number"
|
||||||
|
"--column"
|
||||||
|
"--smart-case"
|
||||||
|
"--hidden"]}}})
|
||||||
19
.config/nvim/fnl/settings/treesitter.fnl
Normal file
19
.config/nvim/fnl/settings/treesitter.fnl
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
(import-macros {: setup} :macros)
|
||||||
|
|
||||||
|
(setup :nvim-treesitter.configs
|
||||||
|
{:ensure_installed
|
||||||
|
[:c
|
||||||
|
:fennel
|
||||||
|
:java
|
||||||
|
:javascript
|
||||||
|
:lua
|
||||||
|
:python
|
||||||
|
:rust
|
||||||
|
:typescript]
|
||||||
|
:sync_install false
|
||||||
|
:ignore_install []
|
||||||
|
:highlight {:enable true
|
||||||
|
:disable []
|
||||||
|
:additional_vim_regex_highlighting false}})
|
||||||
|
|
||||||
|
((. (require :nvim-treesitter.install) :setup_auto_install))
|
||||||
4
.config/nvim/fnl/settings/vimtex.fnl
Normal file
4
.config/nvim/fnl/settings/vimtex.fnl
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
(import-macros {: g!} :hibiscus.vim)
|
||||||
|
|
||||||
|
(g! :vimtex_view_method "zathura")
|
||||||
|
(g! :vimtex_syntax_enabled 0)
|
||||||
7
.config/nvim/fnl/settings/window-picker.fnl
Normal file
7
.config/nvim/fnl/settings/window-picker.fnl
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
(import-macros {: setup} :macros)
|
||||||
|
|
||||||
|
(setup :window-picker
|
||||||
|
{:autoselect_one true
|
||||||
|
:selection_chars "ABCDEFGHIJKLMNOP"
|
||||||
|
:filter_rules {:bo {:filetype [:NvimTree :neo-tree :notify :aerial]
|
||||||
|
:buftype [:terminal]}}})
|
||||||
@@ -1,148 +0,0 @@
|
|||||||
tnoremap <Esc> <C-\><C-n>
|
|
||||||
|
|
||||||
set termguicolors
|
|
||||||
"set colorcolumn=88
|
|
||||||
set background=dark
|
|
||||||
match Error /\%>88c/
|
|
||||||
|
|
||||||
highlight Pmenu ctermbg=gray guibg=gray
|
|
||||||
|
|
||||||
" if hidden is not set, TextEdit might fail.
|
|
||||||
set hidden
|
|
||||||
|
|
||||||
" Some servers have issues with backup files, see #649
|
|
||||||
set nobackup
|
|
||||||
set nowritebackup
|
|
||||||
|
|
||||||
" Better display for messages
|
|
||||||
set cmdheight=2
|
|
||||||
|
|
||||||
" You will have bad experience for diagnostic messages when it's default 4000.
|
|
||||||
set updatetime=300
|
|
||||||
|
|
||||||
" don't give |ins-completion-menu| messages.
|
|
||||||
set shortmess+=c
|
|
||||||
|
|
||||||
" always show signcolumns
|
|
||||||
set signcolumn=yes
|
|
||||||
|
|
||||||
" Use tab for trigger completion with characters ahead and navigate.
|
|
||||||
" Use command ':verbose imap <tab>' to make sure tab is not mapped by other plugin.
|
|
||||||
inoremap <silent><expr> <TAB>
|
|
||||||
\ pumvisible() ? "\<C-n>" :
|
|
||||||
\ <SID>check_back_space() ? "\<TAB>" :
|
|
||||||
\ coc#refresh()
|
|
||||||
inoremap <expr><S-TAB> pumvisible() ? "\<C-p>" : "\<C-h>"
|
|
||||||
|
|
||||||
function! s:check_back_space() abort
|
|
||||||
let col = col('.') - 1
|
|
||||||
return !col || getline('.')[col - 1] =~# '\s'
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
" Use <c-space> to trigger completion.
|
|
||||||
inoremap <silent><expr> <c-space> coc#refresh()
|
|
||||||
|
|
||||||
" Use <cr> to confirm completion, `<C-g>u` means break undo chain at current position.
|
|
||||||
" Coc only does snippet and additional edit on confirm.
|
|
||||||
inoremap <expr> <cr> pumvisible() ? "\<C-y>" : "\<C-g>u\<CR>"
|
|
||||||
" Or use `complete_info` if your vim support it, like:
|
|
||||||
" inoremap <expr> <cr> complete_info()["selected"] != "-1" ? "\<C-y>" : "\<C-g>u\<CR>"
|
|
||||||
|
|
||||||
" Use `[g` and `]g` to navigate diagnostics
|
|
||||||
nmap <silent> [g <Plug>(coc-diagnostic-prev)
|
|
||||||
nmap <silent> ]g <Plug>(coc-diagnostic-next)
|
|
||||||
|
|
||||||
" Remap keys for gotos
|
|
||||||
nmap <silent> gd <Plug>(coc-definition)
|
|
||||||
nmap <silent> gy <Plug>(coc-type-definition)
|
|
||||||
nmap <silent> gi <Plug>(coc-implementation)
|
|
||||||
nmap <silent> gr <Plug>(coc-references)
|
|
||||||
|
|
||||||
" Use K to show documentation in preview window
|
|
||||||
nnoremap <silent> K :call <SID>show_documentation()<CR>
|
|
||||||
|
|
||||||
function! s:show_documentation()
|
|
||||||
if (index(['vim','help'], &filetype) >= 0)
|
|
||||||
execute 'h '.expand('<cword>')
|
|
||||||
else
|
|
||||||
call CocAction('doHover')
|
|
||||||
endif
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
" Highlight symbol under cursor on CursorHold
|
|
||||||
autocmd CursorHold * silent call CocActionAsync('highlight')
|
|
||||||
|
|
||||||
" Remap for rename current word
|
|
||||||
nmap <leader>rn <Plug>(coc-rename)
|
|
||||||
|
|
||||||
augroup mygroup
|
|
||||||
autocmd!
|
|
||||||
" Setup formatexpr specified filetype(s).
|
|
||||||
autocmd FileType typescript,json setl formatexpr=CocAction('formatSelected')
|
|
||||||
" Update signature help on jump placeholder
|
|
||||||
autocmd User CocJumpPlaceholder call CocActionAsync('showSignatureHelp')
|
|
||||||
augroup end
|
|
||||||
|
|
||||||
" Remap for do codeAction of selected region, ex: `<leader>aap` for current paragraph
|
|
||||||
xmap <leader>a <Plug>(coc-codeaction-selected)
|
|
||||||
nmap <leader>a <Plug>(coc-codeaction-selected)
|
|
||||||
|
|
||||||
" Remap for do codeAction of current line
|
|
||||||
nmap <leader>ac <Plug>(coc-codeaction)
|
|
||||||
" Fix autofix problem of current line
|
|
||||||
nmap <leader>qf <Plug>(coc-fix-current)
|
|
||||||
|
|
||||||
" Create mappings for function text object, requires document symbols feature of
|
|
||||||
" languageserver.
|
|
||||||
xmap if <Plug>(coc-funcobj-i)
|
|
||||||
xmap af <Plug>(coc-funcobj-a)
|
|
||||||
omap if <Plug>(coc-funcobj-i)
|
|
||||||
omap af <Plug>(coc-funcobj-a)
|
|
||||||
|
|
||||||
" Use <TAB> for select selections ranges, needs server support, like: coc-tsserver,
|
|
||||||
" coc-python
|
|
||||||
nmap <silent> <TAB> <Plug>(coc-range-select)
|
|
||||||
xmap <silent> <TAB> <Plug>(coc-range-select)
|
|
||||||
|
|
||||||
" Use `:Format` to format current buffer
|
|
||||||
command! -nargs=0 Format :call CocAction('format')
|
|
||||||
|
|
||||||
" Use `:Fold` to fold current buffer
|
|
||||||
command! -nargs=? Fold :call CocAction('fold', <f-args>)
|
|
||||||
|
|
||||||
" use `:OR` for organize import of current buffer
|
|
||||||
command! -nargs=0 OR :call CocAction('runCommand', 'editor.action.organizeImport')
|
|
||||||
|
|
||||||
" Add status line support, for integration with other plugin, checkout `:h coc-status`
|
|
||||||
set statusline^=%{coc#status()}%{get(b:,'coc_current_function','')}
|
|
||||||
|
|
||||||
" Using CocList
|
|
||||||
" Show all diagnostics
|
|
||||||
nnoremap <silent> <space>a :<C-u>CocList diagnostics<cr>
|
|
||||||
" Manage extensions
|
|
||||||
nnoremap <silent> <space>e :<C-u>CocList extensions<cr>
|
|
||||||
" Show commands
|
|
||||||
nnoremap <silent> <space>c :<C-u>CocList commands<cr>
|
|
||||||
" Find symbol of current document
|
|
||||||
nnoremap <silent> <space>o :<C-u>CocList outline<cr>
|
|
||||||
" Search workspace symbols
|
|
||||||
nnoremap <silent> <space>s :<C-u>CocList -I symbols<cr>
|
|
||||||
" Do default action for next item.
|
|
||||||
nnoremap <silent> <space>j :<C-u>CocNext<CR>
|
|
||||||
" Do default action for previous item.
|
|
||||||
nnoremap <silent> <space>k :<C-u>CocPrev<CR>
|
|
||||||
" Resume latest coc list
|
|
||||||
nnoremap <silent> <space>p :<C-u>CocListResume<CR>
|
|
||||||
|
|
||||||
" coc-explorer
|
|
||||||
nmap <leader>e :CocCommand explorer<CR>
|
|
||||||
|
|
||||||
call plug#begin()
|
|
||||||
Plug 'rbgrouleff/bclose.vim'
|
|
||||||
Plug 'francoiscabrol/ranger.vim'
|
|
||||||
Plug 'neoclide/coc.nvim', {'branch': 'release'}
|
|
||||||
Plug 'lervag/vimtex'
|
|
||||||
Plug 'iCyMind/NeoSolarized'
|
|
||||||
call plug#end()
|
|
||||||
|
|
||||||
colorscheme NeoSolarized
|
|
||||||
36
.config/nvim/plugin/bootstrap.lua
Normal file
36
.config/nvim/plugin/bootstrap.lua
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
local install_path = vim.fn.stdpath('data')..'/site/pack/packer/start/'
|
||||||
|
|
||||||
|
local function bootstrap(repo)
|
||||||
|
local url = 'https://github.com/' .. repo
|
||||||
|
local name = repo:gsub('.*/', '')
|
||||||
|
local path = install_path .. name
|
||||||
|
local bootstrapped = false
|
||||||
|
if vim.fn.empty(vim.fn.glob(path)) > 0 then
|
||||||
|
vim.fn.system({'git', 'clone', '--depth', '1', url, path})
|
||||||
|
vim.cmd('packadd ' .. name)
|
||||||
|
bootstrapped = true
|
||||||
|
end
|
||||||
|
return bootstrapped
|
||||||
|
end
|
||||||
|
|
||||||
|
bootstrap('lewis6991/impatient.nvim')
|
||||||
|
require('impatient')
|
||||||
|
|
||||||
|
local tangerine_bootstrapped = bootstrap('udayvir-singh/tangerine.nvim')
|
||||||
|
bootstrap('udayvir-singh/hibiscus.nvim')
|
||||||
|
|
||||||
|
if tangerine_bootstrapped then
|
||||||
|
require('tangerine').setup({
|
||||||
|
compiler = {
|
||||||
|
hooks = {'oninit'}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
require('init')
|
||||||
|
else
|
||||||
|
require('tangerine').setup({})
|
||||||
|
local diagnostics = require('tangerine.vim.hooks').run()
|
||||||
|
require('init')
|
||||||
|
if #diagnostics > 0 then
|
||||||
|
require('packer').sync()
|
||||||
|
end
|
||||||
|
end
|
||||||
1
.config/nvim/spell/.gitignore
vendored
Normal file
1
.config/nvim/spell/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
false.txt
|
||||||
1
.config/nvim/spell/disable.txt
Normal file
1
.config/nvim/spell/disable.txt
Normal file
@@ -0,0 +1 @@
|
|||||||
|
PASSIVE_VOICE
|
||||||
23
.config/nvim/spell/en.utf-8.add
Normal file
23
.config/nvim/spell/en.utf-8.add
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
Read-Eval-Print-Loop
|
||||||
|
Flexowriter
|
||||||
|
Teitelman
|
||||||
|
Interlisp
|
||||||
|
JOHNNIAC
|
||||||
|
REPLs
|
||||||
|
Mathematica
|
||||||
|
GPLs
|
||||||
|
Plasil
|
||||||
|
Monto
|
||||||
|
Keidel
|
||||||
|
Meinte
|
||||||
|
Asf
|
||||||
|
Sdf
|
||||||
|
ToolBus
|
||||||
|
projectional
|
||||||
|
QL
|
||||||
|
DSLs
|
||||||
|
Coulon
|
||||||
|
JADEL
|
||||||
|
microservicization
|
||||||
|
ISEC
|
||||||
|
Jeanjean
|
||||||
1
.config/nvim/themes/solarized.nvim
Submodule
1
.config/nvim/themes/solarized.nvim
Submodule
Submodule .config/nvim/themes/solarized.nvim added at e14555132d
@@ -446,6 +446,7 @@ map yp yank path
|
|||||||
map yd yank dir
|
map yd yank dir
|
||||||
map yn yank name
|
map yn yank name
|
||||||
map y. yank name_without_extension
|
map y. yank name_without_extension
|
||||||
|
map <C-d> shell dragon-drop -a -x %p
|
||||||
|
|
||||||
# Filesystem Operations
|
# Filesystem Operations
|
||||||
map = chmod
|
map = chmod
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
|
|
||||||
background: #00000000;
|
background: #00000000;
|
||||||
background-color: @background;
|
background-color: @background;
|
||||||
background-opaque: #002b36cc;
|
background-opaque: #002b36ff;
|
||||||
foreground: #93a1a1;
|
foreground: #93a1a1;
|
||||||
border-color: @foreground;
|
border-color: @foreground;
|
||||||
spacing: 2;
|
spacing: 2;
|
||||||
|
|||||||
164
.config/rofi/topleft.rasi
Normal file
164
.config/rofi/topleft.rasi
Normal file
@@ -0,0 +1,164 @@
|
|||||||
|
* {
|
||||||
|
active-background: #20ABE0;
|
||||||
|
active-foreground: @foreground;
|
||||||
|
normal-background: @background;
|
||||||
|
normal-foreground: @foreground;
|
||||||
|
urgent-background: #288AB2;
|
||||||
|
urgent-foreground: @foreground;
|
||||||
|
|
||||||
|
alternate-active-background: @background;
|
||||||
|
alternate-active-foreground: @foreground;
|
||||||
|
alternate-normal-background: @background;
|
||||||
|
alternate-normal-foreground: @foreground;
|
||||||
|
alternate-urgent-background: @background;
|
||||||
|
alternate-urgent-foreground: @foreground;
|
||||||
|
|
||||||
|
selected-active-background: #288AB2;
|
||||||
|
selected-active-foreground: @foreground;
|
||||||
|
selected-normal-background: #859900cc;
|
||||||
|
selected-normal-foreground: #002b36;
|
||||||
|
selected-urgent-background: #4BB0CF;
|
||||||
|
selected-urgent-foreground: @foreground;
|
||||||
|
|
||||||
|
background: #00000000;
|
||||||
|
background-color: @background;
|
||||||
|
background-opaque: #002b36ff;
|
||||||
|
foreground: #93a1a1;
|
||||||
|
border-color: @foreground;
|
||||||
|
spacing: 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
#window {
|
||||||
|
background-color: @background-opaque;
|
||||||
|
border: 0px;
|
||||||
|
padding: 0ch 0.5ch 0ch 0.5ch;
|
||||||
|
}
|
||||||
|
|
||||||
|
#mainbox {
|
||||||
|
border: 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#message {
|
||||||
|
border: 2px 0px 0px;
|
||||||
|
border-color: @border-color;
|
||||||
|
padding: 1px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#textbox {
|
||||||
|
text-color: @foreground;
|
||||||
|
}
|
||||||
|
|
||||||
|
inputbar {
|
||||||
|
children: [ prompt,textbox-prompt-colon,entry,case-indicator ];
|
||||||
|
}
|
||||||
|
|
||||||
|
textbox-prompt-colon {
|
||||||
|
expand: false;
|
||||||
|
str: ":";
|
||||||
|
margin: 0px 0.3em 0em 0em;
|
||||||
|
text-color: @normal-foreground;
|
||||||
|
}
|
||||||
|
|
||||||
|
#listview {
|
||||||
|
fixed-height: 0;
|
||||||
|
border: 1px 0px 0px;
|
||||||
|
border-color: @border-color;
|
||||||
|
spacing: 3px;
|
||||||
|
scrollbar: true;
|
||||||
|
padding: 9px 0px 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#element {
|
||||||
|
border: 0;
|
||||||
|
padding: 3px 3px 3px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#element.normal.normal {
|
||||||
|
background-color: @normal-background;
|
||||||
|
text-color: @normal-foreground;
|
||||||
|
}
|
||||||
|
|
||||||
|
#element.normal.urgent {
|
||||||
|
background-color: @urgent-background;
|
||||||
|
text-color: @urgent-foreground;
|
||||||
|
}
|
||||||
|
|
||||||
|
#element.normal.active {
|
||||||
|
background-color: @active-background;
|
||||||
|
text-color: @active-foreground;
|
||||||
|
}
|
||||||
|
|
||||||
|
#element.selected.normal {
|
||||||
|
background-color: @selected-normal-background;
|
||||||
|
text-color: @selected-normal-foreground;
|
||||||
|
border: 0px;
|
||||||
|
border-color: @foreground;
|
||||||
|
}
|
||||||
|
|
||||||
|
#element.selected.urgent {
|
||||||
|
background-color: @selected-urgent-background;
|
||||||
|
text-color: @selected-urgent-foreground;
|
||||||
|
}
|
||||||
|
|
||||||
|
#element.selected.active {
|
||||||
|
background-color: @selected-active-background;
|
||||||
|
text-color: @selected-active-foreground;
|
||||||
|
}
|
||||||
|
|
||||||
|
#element.alternate.normal {
|
||||||
|
background-color: @alternate-normal-background;
|
||||||
|
text-color: @alternate-normal-foreground;
|
||||||
|
}
|
||||||
|
|
||||||
|
#element.alternate.urgent {
|
||||||
|
background-color: @alternate-urgent-background;
|
||||||
|
text-color: @alternate-urgent-foreground;
|
||||||
|
}
|
||||||
|
|
||||||
|
#element.alternate.active {
|
||||||
|
background-color: @alternate-active-background;
|
||||||
|
text-color: @alternate-active-foreground;
|
||||||
|
}
|
||||||
|
|
||||||
|
#scrollbar {
|
||||||
|
width: 4px;
|
||||||
|
border: 0;
|
||||||
|
handle-width: 8px;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#sidebar {
|
||||||
|
border: 2px 0px 0px;
|
||||||
|
border-color: @border-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
#button.selected {
|
||||||
|
background-color: @selected-normal-background;
|
||||||
|
text-color: @selected-normal-foreground;
|
||||||
|
}
|
||||||
|
|
||||||
|
#inputbar {
|
||||||
|
spacing: 0;
|
||||||
|
text-color: @normal-foreground;
|
||||||
|
padding: 1px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#case-indicator {
|
||||||
|
spacing: 0;
|
||||||
|
text-color: @normal-foreground;
|
||||||
|
}
|
||||||
|
|
||||||
|
#entry {
|
||||||
|
spacing: 0;
|
||||||
|
text-color: @normal-foreground;
|
||||||
|
}
|
||||||
|
|
||||||
|
#prompt {
|
||||||
|
spacing: 0;
|
||||||
|
text-color: @normal-foreground;
|
||||||
|
}
|
||||||
|
|
||||||
|
element-text {
|
||||||
|
text-color: inherit;
|
||||||
|
}
|
||||||
31
.config/spicetify/config-xpui.ini
Normal file
31
.config/spicetify/config-xpui.ini
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
[AdditionalOptions]
|
||||||
|
extensions =
|
||||||
|
custom_apps =
|
||||||
|
sidebar_config = 1
|
||||||
|
home_config = 1
|
||||||
|
|
||||||
|
[Patch]
|
||||||
|
|
||||||
|
[Setting]
|
||||||
|
prefs_path = /home/rhiobet/.config/spotify/prefs
|
||||||
|
overwrite_assets = 0
|
||||||
|
check_spicetify_upgrade = 0
|
||||||
|
spotify_path = /opt/spotify
|
||||||
|
current_theme = SpicetifyDefault
|
||||||
|
color_scheme =
|
||||||
|
inject_css = 1
|
||||||
|
replace_colors = 1
|
||||||
|
spotify_launch_flags =
|
||||||
|
|
||||||
|
[Preprocesses]
|
||||||
|
disable_sentry = 1
|
||||||
|
disable_ui_logging = 1
|
||||||
|
remove_rtl_rule = 1
|
||||||
|
expose_apis = 1
|
||||||
|
disable_upgrade_check = 1
|
||||||
|
|
||||||
|
; DO NOT CHANGE!
|
||||||
|
[Backup]
|
||||||
|
version =
|
||||||
|
with =
|
||||||
|
|
||||||
@@ -1,12 +1,13 @@
|
|||||||
[Setting]
|
[Setting]
|
||||||
spotify_path = /opt/spotify
|
spotify_path = /opt/spotify
|
||||||
prefs_path = /home/rhiobet/.config/spotify/prefs
|
prefs_path = /home/rhiobet/.config/spotify/prefs
|
||||||
current_theme = SolarizedDarkGreen
|
current_theme = SolarizedDarkGreen
|
||||||
color_scheme =
|
color_scheme =
|
||||||
inject_css = 1
|
inject_css = 1
|
||||||
replace_colors = 1
|
replace_colors = 1
|
||||||
overwrite_assets = 0
|
overwrite_assets = 0
|
||||||
spotify_launch_flags =
|
spotify_launch_flags =
|
||||||
|
check_spicetify_upgrade = 0
|
||||||
|
|
||||||
[Preprocesses]
|
[Preprocesses]
|
||||||
remove_rtl_rule = 1
|
remove_rtl_rule = 1
|
||||||
@@ -34,5 +35,5 @@ custom_apps =
|
|||||||
|
|
||||||
; DO NOT CHANGE!
|
; DO NOT CHANGE!
|
||||||
[Backup]
|
[Backup]
|
||||||
version = 1.1.10.546.ge08ef575
|
version = 1.1.56.595.g2d2da0de
|
||||||
|
|
||||||
|
|||||||
@@ -29,9 +29,12 @@ set $srclocker swaylock -c 222222 -u -i eDP-1:~/wallpapers/radiance.png\
|
|||||||
# Default wallpaper (more resolutions are available in /usr/share/backgrounds/sway/)
|
# Default wallpaper (more resolutions are available in /usr/share/backgrounds/sway/)
|
||||||
# output * bg /usr/share/backgrounds/sway/Sway_Wallpaper_Blue_1920x1080.png fill
|
# output * bg /usr/share/backgrounds/sway/Sway_Wallpaper_Blue_1920x1080.png fill
|
||||||
output * pos 1920 0 res 1920 1080
|
output * pos 1920 0 res 1920 1080
|
||||||
|
#output eDP-1 pos 0 300 res 3840 2160 scale 1
|
||||||
output eDP-1 pos 0 300 res 3840 2160
|
output eDP-1 pos 0 300 res 3840 2160
|
||||||
output "Goldstar Company Ltd M2080D 0x00000101" pos 1920 0 res 1920 1080
|
output "Goldstar Company Ltd M2080D 0x00000101" pos 1920 0 res 1920 1080
|
||||||
|
#output "Dell Inc. DELL U2717D JXRPT83GAHKS" pos 3840 0 res 2560 1440
|
||||||
output "Dell Inc. DELL U2717D JXRPT83GAHKS" pos 1920 0 res 2560 1440
|
output "Dell Inc. DELL U2717D JXRPT83GAHKS" pos 1920 0 res 2560 1440
|
||||||
|
#output "Dell Inc. DELL U2717D JXRPT83GAHKS" pos 1920 0 res 1920 1080
|
||||||
output HDMI-A-3 pos 1920 0 res 1920 1080
|
output HDMI-A-3 pos 1920 0 res 1920 1080
|
||||||
output * bg ~/wallpapers/filianore-u.jpg fill
|
output * bg ~/wallpapers/filianore-u.jpg fill
|
||||||
focus output eDP-1
|
focus output eDP-1
|
||||||
@@ -125,6 +128,7 @@ input "1739:0:Synaptics_TM3276-031" {
|
|||||||
bindsym Print exec slurp -d | grim -g - - | wl-copy -t image/png
|
bindsym Print exec slurp -d | grim -g - - | wl-copy -t image/png
|
||||||
bindsym Ctrl+Print exec swaymsg -t get_tree | jq -r 'recurse(.nodes[], .floating_nodes[]) | select(.focused and .pid).rect | "\(.x),\(.y) \(.width)x\(.height)"' | grim -g - - | wl-copy -t image/png
|
bindsym Ctrl+Print exec swaymsg -t get_tree | jq -r 'recurse(.nodes[], .floating_nodes[]) | select(.focused and .pid).rect | "\(.x),\(.y) \(.width)x\(.height)"' | grim -g - - | wl-copy -t image/png
|
||||||
bindsym Shift+Print exec grim -o $(swaymsg -t get_outputs | jq -r '.[] | select(.focused) | .name') - | wl-copy -t image/png
|
bindsym Shift+Print exec grim -o $(swaymsg -t get_outputs | jq -r '.[] | select(.focused) | .name') - | wl-copy -t image/png
|
||||||
|
#bindsym Shift+Print exec grim -o $(swaymsg -t get_outputs | jq -r '.[] | select(.focused) | .name') - > /home/rhiobet/screenshots/$(date +%s).png
|
||||||
|
|
||||||
#
|
#
|
||||||
# Moving around:
|
# Moving around:
|
||||||
@@ -254,22 +258,27 @@ bar {
|
|||||||
# When the status_command prints a new line to stdout, swaybar updates.
|
# When the status_command prints a new line to stdout, swaybar updates.
|
||||||
# The default just shows the current date and time.
|
# The default just shows the current date and time.
|
||||||
#status_command while ~/.config/sway/status.sh; do sleep 1; done
|
#status_command while ~/.config/sway/status.sh; do sleep 1; done
|
||||||
status_command i3status-rs ~/.config/sway/status.toml
|
# status_command i3status-rs ~/.config/sway/status.toml
|
||||||
|
swaybar_command waybar
|
||||||
status_padding 0
|
status_padding 0
|
||||||
|
|
||||||
colors {
|
colors {
|
||||||
statusline #ffffff
|
statusline #ffffff
|
||||||
background #002b36cc
|
background #002b36ff
|
||||||
inactive_workspace #002b36cc #002b36cc #93a1a1
|
inactive_workspace #002b36ff #002b36ff #93a1a1
|
||||||
active_workspace #859900cc #859900cc #002b36
|
active_workspace #859900ff #859900ff #002b36
|
||||||
focused_workspace #859900cc #859900cc #002b36
|
focused_workspace #859900ff #859900ff #002b36
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
hide_edge_borders both
|
hide_edge_borders both
|
||||||
default_border none
|
default_border none
|
||||||
gaps inner 6
|
gaps inner 6
|
||||||
#smart_gaps on
|
|
||||||
|
client.focused #859900ff #859900ff #002b36
|
||||||
|
client.focused_inactive #859900ff #859900ff #002b36
|
||||||
|
client.unfocused #002b36ff #002b36ff #93a1a1
|
||||||
|
titlebar_padding 5 1
|
||||||
|
|
||||||
include /etc/sway/config.d/*
|
include /etc/sway/config.d/*
|
||||||
|
|
||||||
@@ -277,16 +286,26 @@ include /etc/sway/config.d/*
|
|||||||
assign [class="discord"] workspace 3
|
assign [class="discord"] workspace 3
|
||||||
assign [class="Spotify"] workspace 3
|
assign [class="Spotify"] workspace 3
|
||||||
for_window [class="Spotify"] opacity 0.8
|
for_window [class="Spotify"] opacity 0.8
|
||||||
|
for_window [app_id="boop-gtk"] floating enable
|
||||||
|
|
||||||
#exec redshift -O 4500 -m wayland
|
#exec redshift -O 4500 -m wayland
|
||||||
exec nm-applet --indicator
|
exec wlanthy -i pass
|
||||||
|
|
||||||
# exec ~/.local/start-jack.sh
|
# exec ~/.local/start-jack.sh
|
||||||
|
|
||||||
exec ~/.config/sway/workspace-rename.sh
|
exec ~/.config/sway/workspace_rename.py > ~/.cache/workspace_rename.log 2> ~/.cache/workspace_rename_error.log
|
||||||
|
|
||||||
for_window [class="Tor Browser"] floating enable
|
for_window [class="Tor Browser"] floating enable
|
||||||
|
|
||||||
|
for_window [app_id="kitty-scratch"] {
|
||||||
|
border pixel 1
|
||||||
|
}
|
||||||
|
|
||||||
|
for_window [app_id="kitty-scratch|pavucontrol|org.keepassxc.KeePassXC"] {
|
||||||
|
move to scratchpad
|
||||||
|
scratchpad show
|
||||||
|
}
|
||||||
|
|
||||||
workspace 1 output eDP-1
|
workspace 1 output eDP-1
|
||||||
exec $term
|
exec $term
|
||||||
|
|
||||||
|
|||||||
@@ -1,43 +1,52 @@
|
|||||||
|
[icons]
|
||||||
icons = "awesome"
|
icons = "awesome"
|
||||||
|
|
||||||
[theme]
|
[theme]
|
||||||
name = "solarized-dark"
|
theme = "solarized-dark"
|
||||||
[theme.overrides]
|
[theme.overrides]
|
||||||
idle_bg = "#002b36cc"
|
idle_bg = "#002b36ff"
|
||||||
info_bg = "#268bd2cc"
|
info_bg = "#268bd2ff"
|
||||||
good_bg = "#859900cc"
|
good_bg = "#859900ff"
|
||||||
warning_bg = "#b58900cc"
|
warning_bg = "#b58900ff"
|
||||||
critical_bg = "#dc322fcc"
|
critical_bg = "#dc322fff"
|
||||||
alternating_tint_bg = "#00000000"
|
alternating_tint_bg = "#00000000"
|
||||||
separator = ""
|
separator = "<span font='15'>\ue0b2</span>"
|
||||||
|
#separator = ""
|
||||||
|
|
||||||
[[block]]
|
#[[block]]
|
||||||
block = "focused_window"
|
#block = "focused_window"
|
||||||
max_width = 100
|
#max_width = 100
|
||||||
|
|
||||||
[[block]]
|
[[block]]
|
||||||
block = "music"
|
block = "music"
|
||||||
player = "spotify"
|
player = "spotify"
|
||||||
buttons = ["play", "next"]
|
format = "$prev $play $next|"
|
||||||
on_collapsed_click = "spotify"
|
|
||||||
max_width = 21
|
|
||||||
marquee = true
|
|
||||||
|
|
||||||
[[block]]
|
[[block]]
|
||||||
block = "sound"
|
block = "sound"
|
||||||
driver = "alsa"
|
driver = "auto"
|
||||||
#device = "hw:0"
|
show_volume_when_muted = true
|
||||||
|
headphones_indicator = true
|
||||||
step_width = 3
|
step_width = 3
|
||||||
|
[[block.click]]
|
||||||
|
button = "left"
|
||||||
|
cmd = "pavucontrol"
|
||||||
|
|
||||||
[[block]]
|
[[block]]
|
||||||
block = "memory"
|
block = "memory"
|
||||||
display_type = "memory"
|
display_type = "memory"
|
||||||
format_mem = "{Mum}MB"
|
format_mem = "$mem_used.eng(3,B,M)"
|
||||||
clickable = false
|
clickable = false
|
||||||
|
[[block.click]]
|
||||||
|
button = "left"
|
||||||
|
cmd = "kitty --class kitty-scratch -c ~/.config/kitty/kitty-scratch.conf btop"
|
||||||
|
|
||||||
[[block]]
|
[[block]]
|
||||||
block = "cpu"
|
block = "cpu"
|
||||||
interval = 1
|
interval = 1
|
||||||
|
[[block.click]]
|
||||||
|
button = "left"
|
||||||
|
cmd = "kitty --class kitty-scratch -c ~/.config/kitty/kitty-scratch.conf btop"
|
||||||
|
|
||||||
#[[block]]
|
#[[block]]
|
||||||
#block = "sound"
|
#block = "sound"
|
||||||
@@ -46,6 +55,26 @@ interval = 1
|
|||||||
block = "battery"
|
block = "battery"
|
||||||
interval = 10
|
interval = 10
|
||||||
|
|
||||||
|
[[block]]
|
||||||
|
block = "pacman"
|
||||||
|
interval = 600
|
||||||
|
format = "$both updates available"
|
||||||
|
format_singular = "$both update available"
|
||||||
|
format_up_to_date = "up to date"
|
||||||
|
hide_when_uptodate = true
|
||||||
|
critical_updates_regex = "(^(linux-|sway|wl)|pipewire)"
|
||||||
|
aur_command = "yay -Qua"
|
||||||
|
[[block.click]]
|
||||||
|
button = "left"
|
||||||
|
cmd = "kitty --class kitty-scratch -c ~/.config/kitty/kitty-scratch.conf zsh -i -c update"
|
||||||
|
|
||||||
|
[[block]]
|
||||||
|
block = "net"
|
||||||
|
format = "$device{| $ssid}"
|
||||||
|
[[block.click]]
|
||||||
|
button = "left"
|
||||||
|
cmd = "kitty --class kitty-scratch -c ~/.config/kitty/kitty-scratch.conf nmtui"
|
||||||
|
|
||||||
[[block]]
|
[[block]]
|
||||||
block = "time"
|
block = "time"
|
||||||
interval = 60
|
interval = 60
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ swaymsg -t subscribe -m '[ "window" ]' | while read -r event ; do
|
|||||||
|
|
||||||
if [ "$app_name" = "kitty" ] ; then
|
if [ "$app_name" = "kitty" ] ; then
|
||||||
app_name=""
|
app_name=""
|
||||||
elif [ "$app_name" = "chromium" ] || [ "$app_name" = "Chromium" ]; then
|
elif [[ "$app_name" == *"chrom"* ]] || [[ "$app_name" == *"Chrom"* ]]; then
|
||||||
case "$(jq -r '.container.name' <<< $event)" in
|
case "$(jq -r '.container.name' <<< $event)" in
|
||||||
*YouTube*)
|
*YouTube*)
|
||||||
app_name=""
|
app_name=""
|
||||||
|
|||||||
61
.config/sway/workspace_rename.py
Executable file
61
.config/sway/workspace_rename.py
Executable file
@@ -0,0 +1,61 @@
|
|||||||
|
#!/bin/python3
|
||||||
|
|
||||||
|
import asyncio
|
||||||
|
|
||||||
|
from i3ipc import Event
|
||||||
|
from i3ipc.aio import Connection
|
||||||
|
|
||||||
|
|
||||||
|
async def main():
|
||||||
|
sway = await Connection().connect()
|
||||||
|
|
||||||
|
@sway.on(Event.WINDOW_NEW)
|
||||||
|
@sway.on(Event.WINDOW_CLOSE)
|
||||||
|
@sway.on(Event.WINDOW_MOVE)
|
||||||
|
@sway.on(Event.WINDOW_TITLE)
|
||||||
|
async def on_window_change(sway, _):
|
||||||
|
for w in (await sway.get_tree()).workspaces():
|
||||||
|
new_name = f'{w.num}:'
|
||||||
|
|
||||||
|
first_descendant = True
|
||||||
|
for d in w.descendants():
|
||||||
|
app_name = d.app_id
|
||||||
|
if not app_name:
|
||||||
|
app_name = d.window_instance
|
||||||
|
|
||||||
|
if app_name:
|
||||||
|
if not first_descendant:
|
||||||
|
new_name += ' '
|
||||||
|
first_descendant = False
|
||||||
|
|
||||||
|
if 'kitty' in app_name:
|
||||||
|
if 'vim' in d.name:
|
||||||
|
new_name += '<span font=\'12\' rise=\'-2500\'>\ue6c5</span>'
|
||||||
|
else:
|
||||||
|
new_name += ''
|
||||||
|
elif app_name in ['Chromium', 'google-chrome', 'google-chrome-unstable']:
|
||||||
|
if 'YouTube' in d.name:
|
||||||
|
new_name += ''
|
||||||
|
else:
|
||||||
|
new_name += ''
|
||||||
|
elif app_name == 'Navigator':
|
||||||
|
new_name += ''
|
||||||
|
elif app_name == 'discord':
|
||||||
|
new_name += ''
|
||||||
|
elif app_name == 'spotify':
|
||||||
|
new_name += '<span font=\'11\' rise=\'-400\'></span>'
|
||||||
|
elif app_name in ['GEMOC Studio', 'code-oss']:
|
||||||
|
new_name += ''
|
||||||
|
elif 'okular' in app_name or 'zathura' in app_name:
|
||||||
|
new_name += '<span font=\'FontAwesome 5 Free Solid\'></span>'
|
||||||
|
elif app_name == 'pavucontrol':
|
||||||
|
new_name += ''
|
||||||
|
else:
|
||||||
|
new_name += app_name
|
||||||
|
|
||||||
|
await sway.command(f'rename workspace "{w.name}" to "{new_name}"')
|
||||||
|
|
||||||
|
|
||||||
|
await sway.main()
|
||||||
|
|
||||||
|
asyncio.run(main())
|
||||||
74
.config/waybar/config
Normal file
74
.config/waybar/config
Normal file
@@ -0,0 +1,74 @@
|
|||||||
|
[{
|
||||||
|
"spacing": 4, // Gaps between modules (4px)
|
||||||
|
"modules-left": ["sway/workspaces"],
|
||||||
|
"modules-right": ["pulseaudio", "memory", "cpu", "battery", "network", "custom/pacman", "clock", "tray"],
|
||||||
|
"memory": {
|
||||||
|
"format": "\uf538 {used:0.1f}GiB",
|
||||||
|
"on-click": "kitty --class kitty-scratch -c ~/.config/kitty/kitty-scratch.conf btop"
|
||||||
|
},
|
||||||
|
"tray": {
|
||||||
|
"spacing": 10
|
||||||
|
},
|
||||||
|
"clock": {
|
||||||
|
"tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>",
|
||||||
|
"format": "\uf017 {:%A %d/%m/%Y %H:%M}"
|
||||||
|
},
|
||||||
|
"cpu": {
|
||||||
|
"format": "\uf2db {usage}%",
|
||||||
|
"tooltip": false,
|
||||||
|
"on-click": "kitty --class kitty-scratch -c ~/.config/kitty/kitty-scratch.conf btop"
|
||||||
|
},
|
||||||
|
"battery": {
|
||||||
|
"states": {
|
||||||
|
// "good": 95,
|
||||||
|
"warning": 30,
|
||||||
|
"critical": 15
|
||||||
|
},
|
||||||
|
"format": "{icon} {capacity}%",
|
||||||
|
"format-charging": " {capacity}%",
|
||||||
|
"format-plugged": " {capacity}%",
|
||||||
|
"format-alt": "{icon} {time}",
|
||||||
|
"format-icons": ["", "", "", "", ""]
|
||||||
|
},
|
||||||
|
"network": {
|
||||||
|
// "interface": "wlp2*", // (Optional) To force the use of this interface
|
||||||
|
"format-wifi": "\uf1eb {essid}",
|
||||||
|
"format-ethernet": "\uf6ff {ifname}",
|
||||||
|
"tooltip-format": "\f6ff {ifname} via {gwaddr}",
|
||||||
|
"format-linked": "\uf6ff {ifname} (No IP)",
|
||||||
|
"format-disconnected": "\uf071 Disconnected",
|
||||||
|
"on-click": "kitty --class kitty-scratch -c ~/.config/kitty/kitty-scratch.conf nmtui"
|
||||||
|
},
|
||||||
|
"pulseaudio": {
|
||||||
|
// "scroll-step": 1, // %, can be a float
|
||||||
|
"format": "{icon} {volume}% {format_source}",
|
||||||
|
"format-bluetooth": "{icon} {volume}% {format_source}",
|
||||||
|
"format-bluetooth-muted": "{icon} {format_source}",
|
||||||
|
"format-muted": " {format_source}",
|
||||||
|
"format-source": " {volume}%",
|
||||||
|
"format-source-muted": "",
|
||||||
|
"format-icons": {
|
||||||
|
"headphone": "",
|
||||||
|
"hands-free": "",
|
||||||
|
"headset": "",
|
||||||
|
"phone": "",
|
||||||
|
"portable": "",
|
||||||
|
"car": "",
|
||||||
|
"default": ["", "", ""]
|
||||||
|
},
|
||||||
|
"on-click": "pavucontrol"
|
||||||
|
},
|
||||||
|
"custom/pacman": {
|
||||||
|
"format": "{icon} {}",
|
||||||
|
"return-type": "json",
|
||||||
|
"escape": true,
|
||||||
|
"format-icons": {
|
||||||
|
"uptodate": "\uf00c",
|
||||||
|
"available": "\uf019"
|
||||||
|
},
|
||||||
|
"interval": 600,
|
||||||
|
"exec": "$HOME/.config/waybar/pacman.py '(?:^(?:linux-|sway|wl)|pipewire)' 2> /dev/null",
|
||||||
|
"on-click": "kitty --class kitty-scratch -c ~/.config/kitty/kitty-scratch.conf zsh -i -c update"
|
||||||
|
}
|
||||||
|
}]
|
||||||
|
|
||||||
128
.config/waybar/mediaplayer.py
Executable file
128
.config/waybar/mediaplayer.py
Executable file
@@ -0,0 +1,128 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
import argparse
|
||||||
|
import logging
|
||||||
|
import sys
|
||||||
|
import signal
|
||||||
|
import gi
|
||||||
|
import json
|
||||||
|
gi.require_version('Playerctl', '2.0')
|
||||||
|
from gi.repository import Playerctl, GLib
|
||||||
|
|
||||||
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
|
def write_output(text, player):
|
||||||
|
logger.info('Writing output')
|
||||||
|
|
||||||
|
output = {'text': text,
|
||||||
|
'class': 'custom-' + player.props.player_name,
|
||||||
|
'alt': player.props.player_name}
|
||||||
|
|
||||||
|
sys.stdout.write(json.dumps(output) + '\n')
|
||||||
|
sys.stdout.flush()
|
||||||
|
|
||||||
|
|
||||||
|
def on_play(player, status, manager):
|
||||||
|
logger.info('Received new playback status')
|
||||||
|
on_metadata(player, player.props.metadata, manager)
|
||||||
|
|
||||||
|
|
||||||
|
def on_metadata(player, metadata, manager):
|
||||||
|
logger.info('Received new metadata')
|
||||||
|
track_info = ''
|
||||||
|
|
||||||
|
if player.props.player_name == 'spotify' and \
|
||||||
|
'mpris:trackid' in metadata.keys() and \
|
||||||
|
':ad:' in player.props.metadata['mpris:trackid']:
|
||||||
|
track_info = 'AD PLAYING'
|
||||||
|
elif player.get_artist() != '' and player.get_title() != '':
|
||||||
|
track_info = '{artist} - {title}'.format(artist=player.get_artist(),
|
||||||
|
title=player.get_title())
|
||||||
|
else:
|
||||||
|
track_info = player.get_title()
|
||||||
|
|
||||||
|
if player.props.status != 'Playing' and track_info:
|
||||||
|
track_info = ' ' + track_info
|
||||||
|
write_output(track_info, player)
|
||||||
|
|
||||||
|
|
||||||
|
def on_player_appeared(manager, player, selected_player=None):
|
||||||
|
if player is not None and (selected_player is None or player.name == selected_player):
|
||||||
|
init_player(manager, player)
|
||||||
|
else:
|
||||||
|
logger.debug("New player appeared, but it's not the selected player, skipping")
|
||||||
|
|
||||||
|
|
||||||
|
def on_player_vanished(manager, player):
|
||||||
|
logger.info('Player has vanished')
|
||||||
|
sys.stdout.write('\n')
|
||||||
|
sys.stdout.flush()
|
||||||
|
|
||||||
|
|
||||||
|
def init_player(manager, name):
|
||||||
|
logger.debug('Initialize player: {player}'.format(player=name.name))
|
||||||
|
player = Playerctl.Player.new_from_name(name)
|
||||||
|
player.connect('playback-status', on_play, manager)
|
||||||
|
player.connect('metadata', on_metadata, manager)
|
||||||
|
manager.manage_player(player)
|
||||||
|
on_metadata(player, player.props.metadata, manager)
|
||||||
|
|
||||||
|
|
||||||
|
def signal_handler(sig, frame):
|
||||||
|
logger.debug('Received signal to stop, exiting')
|
||||||
|
sys.stdout.write('\n')
|
||||||
|
sys.stdout.flush()
|
||||||
|
# loop.quit()
|
||||||
|
sys.exit(0)
|
||||||
|
|
||||||
|
|
||||||
|
def parse_arguments():
|
||||||
|
parser = argparse.ArgumentParser()
|
||||||
|
|
||||||
|
# Increase verbosity with every occurrence of -v
|
||||||
|
parser.add_argument('-v', '--verbose', action='count', default=0)
|
||||||
|
|
||||||
|
# Define for which player we're listening
|
||||||
|
parser.add_argument('--player')
|
||||||
|
|
||||||
|
return parser.parse_args()
|
||||||
|
|
||||||
|
|
||||||
|
def main():
|
||||||
|
arguments = parse_arguments()
|
||||||
|
|
||||||
|
# Initialize logging
|
||||||
|
logging.basicConfig(stream=sys.stderr, level=logging.DEBUG,
|
||||||
|
format='%(name)s %(levelname)s %(message)s')
|
||||||
|
|
||||||
|
# Logging is set by default to WARN and higher.
|
||||||
|
# With every occurrence of -v it's lowered by one
|
||||||
|
logger.setLevel(max((3 - arguments.verbose) * 10, 0))
|
||||||
|
|
||||||
|
# Log the sent command line arguments
|
||||||
|
logger.debug('Arguments received {}'.format(vars(arguments)))
|
||||||
|
|
||||||
|
manager = Playerctl.PlayerManager()
|
||||||
|
loop = GLib.MainLoop()
|
||||||
|
|
||||||
|
manager.connect('name-appeared', lambda *args: on_player_appeared(*args, arguments.player))
|
||||||
|
manager.connect('player-vanished', on_player_vanished)
|
||||||
|
|
||||||
|
signal.signal(signal.SIGINT, signal_handler)
|
||||||
|
signal.signal(signal.SIGTERM, signal_handler)
|
||||||
|
signal.signal(signal.SIGPIPE, signal.SIG_DFL)
|
||||||
|
|
||||||
|
for player in manager.props.player_names:
|
||||||
|
if arguments.player is not None and arguments.player != player.name:
|
||||||
|
logger.debug('{player} is not the filtered player, skipping it'
|
||||||
|
.format(player=player.name)
|
||||||
|
)
|
||||||
|
continue
|
||||||
|
|
||||||
|
init_player(manager, player)
|
||||||
|
|
||||||
|
loop.run()
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
main()
|
||||||
80
.config/waybar/pacman.py
Executable file
80
.config/waybar/pacman.py
Executable file
@@ -0,0 +1,80 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
|
import json
|
||||||
|
import os
|
||||||
|
import re
|
||||||
|
import subprocess
|
||||||
|
import sys
|
||||||
|
|
||||||
|
|
||||||
|
PACMAN_DB = '/var/lib/pacman/'
|
||||||
|
PACMAN_UPDATES_DB = f'/tmp/checkup-db-{os.getlogin()}/'
|
||||||
|
|
||||||
|
|
||||||
|
def write_output(packages, important_regex):
|
||||||
|
n_packages = packages.count('\n')
|
||||||
|
if n_packages == 0:
|
||||||
|
output_text = 'Up to date'
|
||||||
|
output_class = 'good'
|
||||||
|
output_alt = 'uptodate'
|
||||||
|
else:
|
||||||
|
if n_packages == 1:
|
||||||
|
output_text = '1 update available'
|
||||||
|
else:
|
||||||
|
output_text = f'{n_packages} updates available'
|
||||||
|
output_class = 'info'
|
||||||
|
output_alt = 'available'
|
||||||
|
|
||||||
|
if important_regex and re.search(important_regex, packages,
|
||||||
|
flags=re.MULTILINE):
|
||||||
|
output_class = 'important'
|
||||||
|
|
||||||
|
output = {'text': output_text,
|
||||||
|
'class': output_class,
|
||||||
|
'alt': output_alt}
|
||||||
|
|
||||||
|
sys.stdout.write(json.dumps(output) + '\n')
|
||||||
|
sys.stdout.flush()
|
||||||
|
|
||||||
|
|
||||||
|
def generate_and_update_database():
|
||||||
|
if not os.path.isdir(PACMAN_UPDATES_DB):
|
||||||
|
os.mkdir(PACMAN_UPDATES_DB)
|
||||||
|
os.symlink(os.path.join(PACMAN_DB, 'local'),
|
||||||
|
os.path.join(PACMAN_UPDATES_DB, 'local'))
|
||||||
|
|
||||||
|
subprocess.run(['fakeroot',
|
||||||
|
'--',
|
||||||
|
'pacman',
|
||||||
|
'-Sy',
|
||||||
|
'--dbpath',
|
||||||
|
PACMAN_UPDATES_DB,
|
||||||
|
'--logfile',
|
||||||
|
'/dev/null'],
|
||||||
|
env={'LC_ALL': 'C'},
|
||||||
|
stdout=subprocess.DEVNULL,
|
||||||
|
stderr=subprocess.STDOUT)
|
||||||
|
|
||||||
|
|
||||||
|
def check_updates(important_regex):
|
||||||
|
p = subprocess.run(['yay',
|
||||||
|
'-Qu',
|
||||||
|
'--devel',
|
||||||
|
'--dbpath',
|
||||||
|
PACMAN_UPDATES_DB],
|
||||||
|
capture_output=True)
|
||||||
|
packages = p.stdout.decode('utf-8')
|
||||||
|
|
||||||
|
write_output(packages, important_regex)
|
||||||
|
|
||||||
|
|
||||||
|
def main(important_regex=None):
|
||||||
|
generate_and_update_database()
|
||||||
|
check_updates(important_regex)
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
if len(sys.argv) > 1:
|
||||||
|
main(sys.argv[1])
|
||||||
|
else:
|
||||||
|
main()
|
||||||
162
.config/waybar/style.css
Normal file
162
.config/waybar/style.css
Normal file
@@ -0,0 +1,162 @@
|
|||||||
|
* {
|
||||||
|
font-family: DejaVu Sans Mono, devicons, "Font Awesome 6 Free";
|
||||||
|
font-size: 13px;
|
||||||
|
}
|
||||||
|
|
||||||
|
window#waybar {
|
||||||
|
background-color: #002b36;
|
||||||
|
color: #93a1a1;
|
||||||
|
transition-property: background-color;
|
||||||
|
transition-duration: .5s;
|
||||||
|
}
|
||||||
|
|
||||||
|
window#waybar.hidden {
|
||||||
|
opacity: 0.2;
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button {
|
||||||
|
padding: 0px;
|
||||||
|
background-color: transparent;
|
||||||
|
/* Use box-shadow instead of border so the text isn't offset */
|
||||||
|
box-shadow: inset 0 -3px transparent;
|
||||||
|
/* Avoid rounded borders under each workspace name */
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* https://github.com/Alexays/Waybar/wiki/FAQ#the-workspace-buttons-have-a-strange-hover-effect */
|
||||||
|
#workspaces button:hover {
|
||||||
|
background-color: #268bd2;
|
||||||
|
color: #002b36;
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button.visible {
|
||||||
|
background-color: #859900;
|
||||||
|
color: #002b36;
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button.focused {
|
||||||
|
background-color: #859900;
|
||||||
|
color: #002b36;
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button.urgent {
|
||||||
|
background-color: #d30102;
|
||||||
|
color: #002b36;
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button,
|
||||||
|
#clock,
|
||||||
|
#battery,
|
||||||
|
#cpu,
|
||||||
|
#memory,
|
||||||
|
#network,
|
||||||
|
#pulseaudio,
|
||||||
|
#tray,
|
||||||
|
#custom-pacman {
|
||||||
|
border-left: 10px solid transparent;
|
||||||
|
border-right: 10px solid transparent;
|
||||||
|
border-radius: 25px / 25px;
|
||||||
|
background-clip: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button:first-child {
|
||||||
|
border-top-left-radius: 0;
|
||||||
|
border-bottom-left-radius: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#window,
|
||||||
|
#workspaces {
|
||||||
|
margin: 0 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* If workspaces is the leftmost module, omit left margin */
|
||||||
|
.modules-left > widget:first-child > #workspaces {
|
||||||
|
margin-left: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* If workspaces is the rightmost module, omit right margin */
|
||||||
|
.modules-right > widget:last-child > #workspaces {
|
||||||
|
margin-right: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#clock {
|
||||||
|
}
|
||||||
|
|
||||||
|
#battery {
|
||||||
|
}
|
||||||
|
|
||||||
|
#battery.charging, #battery.plugged {
|
||||||
|
background-color: #268bd2;
|
||||||
|
color: #002b36;
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes blink {
|
||||||
|
to {
|
||||||
|
background-color: #ffffff;
|
||||||
|
color: #000000;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#battery.critical:not(.charging) {
|
||||||
|
background-color: #d30102;
|
||||||
|
color: #002b36;
|
||||||
|
animation-name: blink;
|
||||||
|
animation-duration: 0.5s;
|
||||||
|
animation-timing-function: linear;
|
||||||
|
animation-iteration-count: infinite;
|
||||||
|
animation-direction: alternate;
|
||||||
|
}
|
||||||
|
|
||||||
|
label:focus {
|
||||||
|
background-color: #000000;
|
||||||
|
}
|
||||||
|
|
||||||
|
#cpu {
|
||||||
|
}
|
||||||
|
|
||||||
|
#memory {
|
||||||
|
}
|
||||||
|
|
||||||
|
#network {
|
||||||
|
}
|
||||||
|
|
||||||
|
#network.disconnected {
|
||||||
|
background-color: #d30102;
|
||||||
|
color: #002b36;
|
||||||
|
}
|
||||||
|
|
||||||
|
#pulseaudio {
|
||||||
|
}
|
||||||
|
|
||||||
|
#pulseaudio.muted {
|
||||||
|
background-color: #b58900;
|
||||||
|
color: #002b36;
|
||||||
|
}
|
||||||
|
|
||||||
|
#custom-pacman.good {
|
||||||
|
background-color: #859900;
|
||||||
|
color: #002b36;
|
||||||
|
}
|
||||||
|
|
||||||
|
#custom-pacman.info {
|
||||||
|
background-color: #268bd2;
|
||||||
|
color: #002b36;
|
||||||
|
}
|
||||||
|
|
||||||
|
#custom-pacman.important {
|
||||||
|
background-color: #d30102;
|
||||||
|
color: #002b36;
|
||||||
|
}
|
||||||
|
|
||||||
|
#tray {
|
||||||
|
}
|
||||||
|
|
||||||
|
#tray > .passive {
|
||||||
|
-gtk-icon-effect: dim;
|
||||||
|
}
|
||||||
|
|
||||||
|
#tray > .needs-attention {
|
||||||
|
-gtk-icon-effect: highlight;
|
||||||
|
background-color: #d30102;
|
||||||
|
}
|
||||||
|
|
||||||
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
[submodule ".config/nvim/solarized.nvim"]
|
||||||
|
path = .config/nvim/themes/solarized.nvim
|
||||||
|
url = ssh://git@git.rhiobet.sh:42424/rhiobet/solarized.nvim.git
|
||||||
3
.zshenv
3
.zshenv
@@ -1,6 +1,7 @@
|
|||||||
export JAVA_HOME=/usr/lib/jvm/$(archlinux-java get)
|
export JAVA_HOME=/usr/lib/jvm/$(archlinux-java get)
|
||||||
export GDK_BACKEND=x11
|
#export GDK_BACKEND=x11
|
||||||
export EDITOR=nvim
|
export EDITOR=nvim
|
||||||
|
|
||||||
export XDG_CURRENT_DESKTOP=sway
|
export XDG_CURRENT_DESKTOP=sway
|
||||||
export XDG_SESSION_TYPE=wayland
|
export XDG_SESSION_TYPE=wayland
|
||||||
|
#export VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/intel_icd.x86_64.json:/usr/share/vulkan/icd.d/radeon_icd.x86_64.json
|
||||||
|
|||||||
7
.zshrc
7
.zshrc
@@ -13,12 +13,14 @@ compinit
|
|||||||
|
|
||||||
export ZSH=/usr/share/oh-my-zsh
|
export ZSH=/usr/share/oh-my-zsh
|
||||||
export ZSH_CUSTOM=/usr/share/zsh
|
export ZSH_CUSTOM=/usr/share/zsh
|
||||||
|
ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE="fg=10"
|
||||||
ZSH_THEME="af-magic"
|
ZSH_THEME="af-magic"
|
||||||
|
|
||||||
plugins=(
|
plugins=(
|
||||||
archlinux
|
archlinux
|
||||||
docker
|
docker
|
||||||
docker-compose
|
docker-compose
|
||||||
|
fzf
|
||||||
git
|
git
|
||||||
systemd
|
systemd
|
||||||
vagrant
|
vagrant
|
||||||
@@ -27,12 +29,11 @@ plugins=(
|
|||||||
)
|
)
|
||||||
|
|
||||||
source $ZSH/oh-my-zsh.sh
|
source $ZSH/oh-my-zsh.sh
|
||||||
bindkey '^R' history-incremental-pattern-search-backward
|
#bindkey '^R' history-incremental-pattern-search-backward
|
||||||
|
|
||||||
if [ -f ~/.bash_aliases ]; then
|
if [ -f ~/.bash_aliases ]; then
|
||||||
source ~/.bash_aliases
|
source ~/.bash_aliases
|
||||||
fi
|
fi
|
||||||
eval $(thefuck --alias)
|
eval $(thefuck --alias)
|
||||||
|
|
||||||
alias chromium="export GDK_BACKEND=wayland && chromium --enable-features=UseOzonePlatform --ozone-platform=wayland"
|
alias discord="export GDK_BACKEND=wayland && discord-canary"
|
||||||
alias discord="export GDK_BACKEND=wayland && discord-canary --enable-features=UseOzonePlatform,WebRTCPipeWireCapturer --ozone-platform=wayland"
|
|
||||||
|
|||||||
1
etc/udev/rules.d/91-mic-no-boost.rules
Normal file
1
etc/udev/rules.d/91-mic-no-boost.rules
Normal file
@@ -0,0 +1 @@
|
|||||||
|
SUBSYSTEM=="sound", ACTION=="change", KERNEL=="card*", ATTRS{vendor}=="0x8086", ATTRS{device}=="0x9d71", ENV{ACP_PROFILE_SET}="noboost.conf"
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
.include analog-input-internal-mic.conf
|
||||||
|
|
||||||
|
[Element Internal Mic Boost]
|
||||||
|
volume = off
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
.include default.conf
|
||||||
|
|
||||||
|
[Mapping analog-stereo]
|
||||||
|
paths-input = analog-input-internal-mic-noboost
|
||||||
Reference in New Issue
Block a user