This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// eslint-disable-next-line import/no-commonjs | |
var assert = require('assert'); | |
function starRegex(pattern: string) { | |
return RegExp( | |
pattern | |
.split('.') | |
.map(x => { | |
if (x === '**') return '[a-zA-Z\\.]*'; | |
if (x.includes('**')) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Fixes extremely slow apropos command on macos | |
# Using `apropos` on macos rebuilds the whatis database every time. | |
# Fish shell uses apropos for command completion. | |
# Simply add the file below to `~/.config/fish/conf.d` to fix the issue | |
set db ~/.whatis.db | |
function apropos_update | |
echo "Updating apropos / whatis database at $db" | |
man --path | tr ":" " " | xargs /usr/libexec/makewhatis -o $db |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- put this file somewhere in your nvim config, like: ~/.config/nvim/lua/config/lua-lsp.lua | |
-- usage: require'lspconfig'.sumneko_lua.setup(require("config.lua-lsp")) | |
local library = {} | |
local path = vim.split(package.path, ";") | |
-- this is the ONLY correct way to setup your path | |
table.insert(path, "lua/?.lua") | |
table.insert(path, "lua/?/init.lua") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/env bash | |
WORKSPACE=$(hyprctl clients -j | jq -rec '.[] | select(.class == "quake") | .workspace .name') | |
if [ -z "$WORKSPACE" ]; then | |
echo "start" | |
hyprctl dispatch -- exec wezterm --config window_background_opacity=0.9 start --class quake | |
elif [ "$WORKSPACE" == "special" ]; then | |
echo "show" | |
hyprctl dispatch movetoworkspace "1,^(quake)\$" |
OlderNewer