mirror of
https://github.com/zoriya/flake.git
synced 2025-12-06 06:36:19 +00:00
Compare commits
2 Commits
9aec0768ae
...
78542a3c83
| Author | SHA1 | Date | |
|---|---|---|---|
| 78542a3c83 | |||
| 34faa25d3a |
@@ -178,7 +178,7 @@ binds {
|
||||
Mod+Escape allow-inhibiting=false { toggle-keyboard-shortcuts-inhibit; }
|
||||
}
|
||||
|
||||
workspace "emtpy" {
|
||||
workspace "music" {
|
||||
open-on-output "Dell Inc. DELL S2722QC 2HHZH24"
|
||||
}
|
||||
workspace "chat" {
|
||||
@@ -197,10 +197,15 @@ window-rule {
|
||||
open-focused false
|
||||
}
|
||||
|
||||
window-rule {
|
||||
match app-id="com.github.th_ch.youtube_music"
|
||||
open-on-workspace "music"
|
||||
}
|
||||
|
||||
window-rule {
|
||||
match app-id="discord"
|
||||
match app-id="vesktop"
|
||||
match app-id="com.github.th_ch.youtube_music"
|
||||
match app-id="slack"
|
||||
open-on-workspace "chat"
|
||||
}
|
||||
|
||||
|
||||
@@ -21,8 +21,14 @@ fi
|
||||
current_session=$(tmux display-message -p "#S")
|
||||
|
||||
if ! tmux has-session "-t=$selected_name" 2> /dev/null; then
|
||||
tmux new-session -ds "$selected_name" -c "$selected" -e "CMD=$EDITOR ."
|
||||
tmux new-window -dt "$selected_name:1" -c "$selected" -e "CMD="
|
||||
if [[ "$selected" == "$HOME/work/new" ]]; then
|
||||
selected_name="work"
|
||||
ssh_tunnel="ssh zroux@localhost -p 2222 -D 6666"
|
||||
tmux new-session -ds "$selected_name" -c "$selected" -e "CMD=$ssh_tunnel"
|
||||
else
|
||||
tmux new-session -ds "$selected_name" -c "$selected" -e "CMD=$EDITOR ."
|
||||
tmux new-window -dt "$selected_name:1" -c "$selected" -e "CMD="
|
||||
fi
|
||||
fi
|
||||
|
||||
tmux switch-client -t "$selected_name"
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
local function git_show(ref)
|
||||
local git_root = Snacks.git.get_root()
|
||||
local function finder(opts, ctx)
|
||||
return require("snacks.picker.source.proc").proc({
|
||||
opts,
|
||||
{
|
||||
---@type snacks.picker.finder
|
||||
local function finder(_opts, ctx)
|
||||
return require("snacks.picker.source.proc").proc(
|
||||
ctx:opts({
|
||||
cmd = "git",
|
||||
args = { "show", "--name-status", "--pretty=tformat:", ref },
|
||||
cwd = Snacks.git.get_root(),
|
||||
@@ -12,8 +12,9 @@ local function git_show(ref)
|
||||
item.file = string.sub(item.text, 3)
|
||||
item.commit = ref
|
||||
end,
|
||||
},
|
||||
}, ctx)
|
||||
}),
|
||||
ctx
|
||||
)
|
||||
end
|
||||
|
||||
Snacks.picker.pick({
|
||||
@@ -263,19 +264,19 @@ return {
|
||||
end, { desc = "Grep" })
|
||||
|
||||
vim.keymap.set("n", "<leader>gl", function()
|
||||
Snacks.picker.git_log({cwd = Snacks.git.get_root() })
|
||||
Snacks.picker.git_log({ cwd = Snacks.git.get_root() })
|
||||
end, { desc = "Git log" })
|
||||
|
||||
vim.keymap.set("n", "<leader>gh", function()
|
||||
Snacks.picker.git_log_file({cwd = Snacks.git.get_root() })
|
||||
Snacks.picker.git_log_file({ cwd = Snacks.git.get_root() })
|
||||
end, { desc = "Git logs buffer" })
|
||||
|
||||
vim.keymap.set("n", "<leader>gB", function()
|
||||
Snacks.picker.git_branches({cwd = Snacks.git.get_root() })
|
||||
Snacks.picker.git_branches({ cwd = Snacks.git.get_root() })
|
||||
end, { desc = "Git branches" })
|
||||
|
||||
vim.keymap.set("n", "<leader>gs", function()
|
||||
Snacks.picker.git_status({cwd = Snacks.git.get_root() })
|
||||
Snacks.picker.git_status({ cwd = Snacks.git.get_root() })
|
||||
end, { desc = "Git status" })
|
||||
end,
|
||||
},
|
||||
|
||||
@@ -37,7 +37,16 @@ in {
|
||||
# Gnome-control-center can only be launched if XDG_CURRENT_DESKTOP is GNOME.
|
||||
gnome-control-center = wrapProgram super.gnome-control-center ["gnome-control-center"] "--set XDG_CURRENT_DESKTOP GNOME";
|
||||
|
||||
slack = enableWayland super.slack ["slack"];
|
||||
# i can't get this to work /shrug
|
||||
# slack = super.symlinkJoin {
|
||||
# name = super.slack.name;
|
||||
# paths = [super.slack];
|
||||
# buildInputs = [super.makeWrapper];
|
||||
# postBuild = ''
|
||||
# wrapProgram $out/bin/slack --add-flags "--disable-smooth-scrolling"
|
||||
# substituteInPlace ${super.slack}/share/applications/slack.desktop --replace ${super.slack} $out
|
||||
# '';
|
||||
# };
|
||||
discord = enableWayland super.discord ["discord" "Discord"];
|
||||
vesktop = enableWayland super.vesktop ["vesktop"];
|
||||
youtube-music = enableWayland super.youtube-music ["youtube-music"];
|
||||
|
||||
Reference in New Issue
Block a user