Compare commits
2 Commits
b6531abf57
...
f09d772b43
| Author | SHA1 | Date | |
|---|---|---|---|
|
f09d772b43
|
|||
|
093b7afe94
|
@ -22,8 +22,11 @@ require("mason").setup({
|
|||||||
require("mason-lspconfig").setup()
|
require("mason-lspconfig").setup()
|
||||||
require("lspconfig").pylsp.setup {}
|
require("lspconfig").pylsp.setup {}
|
||||||
|
|
||||||
local rt = require("rust-tools")
|
require("auto-save").setup({
|
||||||
|
enabled = false
|
||||||
|
})
|
||||||
|
|
||||||
|
local rt = require("rust-tools")
|
||||||
rt.setup({
|
rt.setup({
|
||||||
server = {
|
server = {
|
||||||
on_attach = function(_, bufnr)
|
on_attach = function(_, bufnr)
|
||||||
|
|||||||
@ -117,4 +117,6 @@ return require('packer').startup(function(use)
|
|||||||
'nvim-lualine/lualine.nvim',
|
'nvim-lualine/lualine.nvim',
|
||||||
requires = { 'nvim-tree/nvim-web-devicons', opt = true }
|
requires = { 'nvim-tree/nvim-web-devicons', opt = true }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
use "Pocco81/auto-save.nvim"
|
||||||
end)
|
end)
|
||||||
|
|||||||
10
tree/.local/bin/eww-workspaces
Executable file
10
tree/.local/bin/eww-workspaces
Executable file
@ -0,0 +1,10 @@
|
|||||||
|
#!/usr/bin/env nu
|
||||||
|
|
||||||
|
let active = (hyprctl activeworkspace -j | from json | get id)
|
||||||
|
|
||||||
|
hyprctl workspaces -j |
|
||||||
|
from json |
|
||||||
|
sort-by id |
|
||||||
|
get id |
|
||||||
|
each {|id| {id: $id class: (if ($id == $active) {"active"} else {""}) }} |
|
||||||
|
to json
|
||||||
41
tree/.local/bin/mullvad-status
Executable file
41
tree/.local/bin/mullvad-status
Executable file
@ -0,0 +1,41 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
if ! which mullvad &> /dev/null
|
||||||
|
then
|
||||||
|
echo "ERROR: command 'mullvad' does not exist"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
STATUS="$(mullvad status)"
|
||||||
|
|
||||||
|
CONNECTING="Connecting"
|
||||||
|
CONNECTED="Connected"
|
||||||
|
DISCONNECTED="Disconnected"
|
||||||
|
|
||||||
|
check_status() {
|
||||||
|
STRING="$1"
|
||||||
|
echo "$STATUS" | grep -iq "$STRING"
|
||||||
|
}
|
||||||
|
|
||||||
|
TOOLTIP="$STATUS"
|
||||||
|
ICON=""
|
||||||
|
ON_CLICK=""
|
||||||
|
|
||||||
|
|
||||||
|
if check_status "$DISCONNECTED"; then
|
||||||
|
CLASS="disconnected"
|
||||||
|
ON_CLICK="mullvad connect"
|
||||||
|
elif check_status "$CONNECTED"; then
|
||||||
|
CLASS=""
|
||||||
|
ICON=""
|
||||||
|
ON_CLICK="mullvad disconnect"
|
||||||
|
elif check_status "$CONNECTING"; then
|
||||||
|
CLASS="connecting"
|
||||||
|
ON_CLICK="mullvad disconnect"
|
||||||
|
else
|
||||||
|
CLASS="disconnected"
|
||||||
|
ON_CLICK="mullvad connect"
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo '{"icon":"'$ICON'", "tooltip":"'$TOOLTIP'", "class":"'$CLASS'", "on_click": "'$ON_CLICK'"}'
|
||||||
|
|
||||||
Reference in New Issue
Block a user