dotfiles.nix/config/hilbish/init.lua

43 lines
1.2 KiB
Lua
Raw Normal View History

2023-04-18 02:38:17 +08:00
-- Default Hilbish config
local lunacolors = require 'lunacolors'
local bait = require 'bait'
local ansikit = require 'ansikit'
local function doPrompt(fail)
hilbish.prompt(lunacolors.format(
2023-04-20 00:24:54 +08:00
'{blue}%u {cyan}%d ' .. (fail and '{red}' or '{green}') .. '{red}♥ '
2023-04-18 02:38:17 +08:00
))
end
print(lunacolors.format(hilbish.greeting))
doPrompt()
bait.catch('command.exit', function(code)
doPrompt(code ~= 0)
end)
bait.catch('hilbish.vimMode', function(mode)
if mode ~= 'insert' then
ansikit.cursorStyle(ansikit.blockCursor)
else
ansikit.cursorStyle(ansikit.lineCursor)
end
end)
2023-04-18 10:34:24 +08:00
-- Aliases
2023-04-20 00:24:54 +08:00
hilbish.alias('c', 'clear')
2023-04-18 10:34:24 +08:00
hilbish.alias('tp', 'trash-put')
hilbish.alias('la', 'ls -a')
hilbish.alias('ll', 'ls -l')
2023-04-20 00:24:54 +08:00
hilbish.alias('hm', 'cd ~/')
hilbish.alias('ud', 'cd ..')
-- wezterm
hilbish.alias('tt', 'wezterm cli set-tab-title ')
-- nixos
2023-04-18 10:34:24 +08:00
hilbish.alias('uh', 'home-manager switch --flake .#sajenim@fuchsia')
hilbish.alias('us', 'sudo nixos-rebuild switch --flake .#fuchsia')
2023-04-20 00:24:54 +08:00
-- keymap directories
hilbish.alias('crkbd', 'cd ~/keyboards/qmk_keymaps/keyboards/crkbd/keymaps/sajenim/')
hilbish.alias('kchrn', 'cd ~/keyboards/qmk_keymaps/keyboards/keychron/q4/ansi_v2/keymaps/sajenim/')