mirror of
https://github.com/zoriya/flake.git
synced 2026-06-01 10:15:45 +00:00
Add kitty bindings
This commit is contained in:
@@ -30,14 +30,38 @@ in {
|
||||
swayidle
|
||||
]
|
||||
++ [lock];
|
||||
|
||||
programs.kitty = {
|
||||
enable = true;
|
||||
extraConfig = ''
|
||||
enable_audio_bell no
|
||||
confirm_os_window_close 0
|
||||
map kitty_mod+r launch --type background --stdin-source=@screen_scrollback sh -c 'grep -Eo "(http|https)://[a-zA-Z0-9./?=_%:-]*" | sort -u | rofi -dmenu -p "Launch in browser" | xargs xdg-open'
|
||||
disable_ligatures always
|
||||
|
||||
clear_all_shortcuts yes
|
||||
kitty_mod alt
|
||||
map ctrl+shift+c copy_to_clipboard
|
||||
map ctrl+shift+v paste_from_clipboard
|
||||
|
||||
|
||||
# map kitty_mod+r launch --type background --stdin-source=@screen_scrollback sh -c 'grep -Eo "(http|https)://[a-zA-Z0-9./?=_%:-]*" | sort -u | rofi -dmenu -p "Launch in browser" | xargs xdg-open'
|
||||
map kitty_mod+r open_url_with_hints
|
||||
map kitty_mod+n launch --type=tab --cwd=current
|
||||
|
||||
map kitty_mod+k scroll_line_up
|
||||
map kitty_mod+j scroll_line_down
|
||||
map kitty_mod+h previous_tab
|
||||
map kitty_mod+l next_tab
|
||||
|
||||
map kitty_mod+o scroll_to_prompt -1
|
||||
map kitty_mod+i scroll_to_prompt 1
|
||||
map kitty_mod+space show_last_command_output
|
||||
|
||||
'';
|
||||
};
|
||||
programs.zsh.shellAliases = {
|
||||
ssh = "kitty +kitten ssh";
|
||||
};
|
||||
|
||||
home.sessionVariables = {
|
||||
EDITOR = "nvim";
|
||||
|
||||
@@ -21,7 +21,7 @@ in {
|
||||
|
||||
xdg.configFile."fcitx5/config".text = ''
|
||||
[Hotkey/TriggerKeys]
|
||||
0=Super+N
|
||||
0=Super+Shift+L
|
||||
|
||||
[Behavior]
|
||||
ShowInputMethodInformation=False
|
||||
|
||||
@@ -5,6 +5,8 @@ exec-once=fusuma -c /home/zoriya/.config/fusuma/config.yaml
|
||||
exec-once=swayidle -w timeout 1200 lock before-sleep lock
|
||||
exec-once=/home/zoriya/.config/hypr/wallpaper.sh init
|
||||
exec-once=kitty --class=scratchpad
|
||||
exec-once=fcitx5 -d
|
||||
|
||||
|
||||
autogenerated = 0
|
||||
|
||||
|
||||
@@ -8,6 +8,4 @@ export XMODIFIERS=@im=fcitx
|
||||
export XIM_SERVERS=fcitx
|
||||
export GLFW_IM_MODULE=ibus
|
||||
|
||||
fcitx5 -d
|
||||
|
||||
exec Hyprland
|
||||
|
||||
@@ -28,6 +28,27 @@ return {
|
||||
},
|
||||
}
|
||||
})
|
||||
|
||||
local colors = require("catppuccin.palettes").get_palette()
|
||||
local TelescopeColor = {
|
||||
TelescopeMatching = { fg = colors.flamingo },
|
||||
TelescopeSelection = { fg = colors.text, bg = colors.surface0, bold = true },
|
||||
|
||||
TelescopePromptPrefix = { bg = colors.surface0 },
|
||||
TelescopePromptNormal = { bg = colors.surface0 },
|
||||
TelescopeResultsNormal = { bg = colors.mantle },
|
||||
TelescopePreviewNormal = { bg = colors.mantle },
|
||||
TelescopePromptBorder = { bg = colors.surface0, fg = colors.surface0 },
|
||||
TelescopeResultsBorder = { bg = colors.mantle, fg = colors.mantle },
|
||||
TelescopePreviewBorder = { bg = colors.mantle, fg = colors.mantle },
|
||||
TelescopePromptTitle = { bg = colors.pink, fg = colors.mantle },
|
||||
TelescopeResultsTitle = { fg = colors.mantle },
|
||||
TelescopePreviewTitle = { bg = colors.green, fg = colors.mantle },
|
||||
}
|
||||
|
||||
for hl, col in pairs(TelescopeColor) do
|
||||
vim.api.nvim_set_hl(0, hl, col)
|
||||
end
|
||||
vim.cmd([[colorscheme catppuccin-mocha]])
|
||||
end
|
||||
},
|
||||
|
||||
@@ -14,11 +14,11 @@ return {
|
||||
cmd = "Telescope",
|
||||
version = false, -- telescope did only one release, so use HEAD for now
|
||||
keys = {
|
||||
{ "<leader>f", "<cmd>Telescope find_files<cr>", desc = "Find Files" },
|
||||
{ "<leader>F", "<cmd>Telescope live_grep theme=ivy<cr>", desc = "Grep" },
|
||||
{ "<leader>gl", "<cmd>Telescope git_commits<CR>", desc = "Git log" },
|
||||
{ "<leader>gb", "<cmd>Telescope git_branches<CR>", desc = "Git branches" },
|
||||
{ "<leader>gs", "<cmd>Telescope git_status<CR>", desc = "Git status" },
|
||||
{ "<leader>f", "<cmd>Telescope find_files<cr>", desc = "Find Files" },
|
||||
{ "<leader>F", "<cmd>Telescope live_grep theme=ivy<cr>", desc = "Grep" },
|
||||
{ "<leader>gl", "<cmd>Telescope git_commits<CR>", desc = "Git log" },
|
||||
{ "<leader>gb", "<cmd>Telescope git_branches<CR>", desc = "Git branches" },
|
||||
{ "<leader>gs", "<cmd>Telescope git_status<CR>", desc = "Git status" },
|
||||
},
|
||||
opts = function()
|
||||
local actions = require "telescope.actions"
|
||||
@@ -37,12 +37,12 @@ return {
|
||||
path_display = { "truncate" },
|
||||
mappings = {
|
||||
i = {
|
||||
["<esc>"] = actions.close,
|
||||
["<C-h>"] = function () vim.api.nvim_input("<C-w>") end,
|
||||
["<C-BS>"] = function () vim.api.nvim_input("<C-w>") end,
|
||||
["<A-k>"] = actions.move_selection_previous,
|
||||
["<A-j>"] = actions.move_selection_next,
|
||||
["<c-t>"] = function()
|
||||
["<esc>"] = actions.close,
|
||||
["<C-h>"] = function() vim.api.nvim_input("<C-w>") end,
|
||||
["<C-BS>"] = function() vim.api.nvim_input("<C-w>") end,
|
||||
["<A-k>"] = actions.move_selection_previous,
|
||||
["<A-j>"] = actions.move_selection_next,
|
||||
["<c-t>"] = function()
|
||||
local has_trouble, trouble_action = pcall(require, "trouble.providers.telescope")
|
||||
if has_trouble then
|
||||
trouble_action.open_with_trouble()
|
||||
@@ -53,9 +53,9 @@ return {
|
||||
},
|
||||
extensions = {
|
||||
fzf = {
|
||||
fuzzy = true, -- false will only do exact matching
|
||||
override_generic_sorter = true, -- override the generic sorter
|
||||
override_file_sorter = true, -- override the file sorter
|
||||
fuzzy = true, -- false will only do exact matching
|
||||
override_generic_sorter = true, -- override the generic sorter
|
||||
override_file_sorter = true, -- override the file sorter
|
||||
}
|
||||
},
|
||||
pickers = {
|
||||
@@ -72,6 +72,11 @@ return {
|
||||
},
|
||||
},
|
||||
}
|
||||
end
|
||||
end,
|
||||
config = function(_, opts)
|
||||
local telescope = require("telescope")
|
||||
telescope.setup(opts)
|
||||
telescope.load_extension("fzf")
|
||||
end,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,7 +7,6 @@ return {
|
||||
dependencies = {
|
||||
"nvim-treesitter/nvim-treesitter-textobjects"
|
||||
},
|
||||
---@type TSConfig
|
||||
opts = {
|
||||
highlight = { enable = true },
|
||||
indent = { enable = true },
|
||||
@@ -29,7 +28,6 @@ return {
|
||||
},
|
||||
},
|
||||
},
|
||||
---@param opts TSConfig
|
||||
config = function(_, opts)
|
||||
require("nvim-treesitter.configs").setup(opts)
|
||||
end,
|
||||
|
||||
Reference in New Issue
Block a user