GithubHelp home page GithubHelp logo

Strange behaviour about zellij-jump-list HOT 19 CLOSED

matiux avatar matiux commented on September 27, 2024
Strange behaviour

from zellij-jump-list.

Comments (19)

blank2121 avatar blank2121 commented on September 27, 2024

Can you give a bit more information? ie, your zellij version, though I don't think any updates would have broken it, and when it broke. Did it not work from the start or what?

from zellij-jump-list.

matiux avatar matiux commented on September 27, 2024

Hi @blank2121 you are right, my apologies.

stty size: 58 253
zellij: 0.40.0
Linux iuxhome 6.8.7-arch1-1 #1 SMP PREEMPT_DYNAMIC Wed, 17 Apr 2024 15:20:28 +0000 x86_64 GNU/Linux
zsh --version: 5.9 (x86_64-pc-linux-gnu)
ohmyzsh
powerlevel10k

Yes, it didn't work from the start.
I tried both the compilation with cargo and the downloaded wasm file

from zellij-jump-list.

blank2121 avatar blank2121 commented on September 27, 2024

If it didn't even work from the start, then it must be to a version issue as wasm doesn't have compatibility issues from machine to machine.

I have some time today, so I'm going to investigate.

from zellij-jump-list.

matiux avatar matiux commented on September 27, 2024

@blank2121 when you say "a version issue" you mean "zellij version"? Hence a problem with Zellij 0.40.0?

from zellij-jump-list.

blank2121 avatar blank2121 commented on September 27, 2024

Precisely, if it doesn't work from the start for you, my guess is some feature changes made my previously functional code no longer functional.

from zellij-jump-list.

matiux avatar matiux commented on September 27, 2024

I installed your plugin for the first time on Zellij 0.40.0.
So I don't know if worked before. are you planning to check out and update your plugin to zellij 0.40.0?

from zellij-jump-list.

blank2121 avatar blank2121 commented on September 27, 2024

Yes, I have more time today so I'm going to do some detective work. I'm going to work on this today and I don't expect this to be too challenging

from zellij-jump-list.

matiux avatar matiux commented on September 27, 2024

Fantastic, let me know. I will be your beta tester :)

p.a. Same issue with a similar plugin: https://github.com/Nacho114/harpoon

maybe it's really Zellij 0.40.0

from zellij-jump-list.

blank2121 avatar blank2121 commented on September 27, 2024

weird because if it is an issue with harpoon as well then I think there is something up with you machine as i updated the dependencies to 0.40.0 and updated my harpoon and they both work as intended. Can I see you config where the plugin would be ran? also where you have the .wasm file?

from zellij-jump-list.

matiux avatar matiux commented on September 27, 2024

this is the entire zellij config file where you will see

bind "Ctrl k" {
    LaunchOrFocusPlugin "file:~/.config/zellij/plugins/zellij-jump-list.wasm" {
        floating true; move_to_focused_tab true;
    }
}
// If you'd like to override the default keybindings completely, be sure to change "keybinds" to "keybinds clear-defaults=true"
keybinds {
    normal {
        // uncomment this and adjust key if using copy_on_select=false
        // bind "Alt c" { Copy; }
    }
    locked {
        bind "Ctrl g" { SwitchToMode "Normal"; }
    }
    resize {
        bind "Ctrl n" { SwitchToMode "Normal"; }
        bind "h" "Left" { Resize "Increase Left"; }
        bind "j" "Down" { Resize "Increase Down"; }
        bind "k" "Up" { Resize "Increase Up"; }
        bind "l" "Right" { Resize "Increase Right"; }
        bind "H" { Resize "Decrease Left"; }
        bind "J" { Resize "Decrease Down"; }
        bind "K" { Resize "Decrease Up"; }
        bind "L" { Resize "Decrease Right"; }
        bind "=" "+" { Resize "Increase"; }
        bind "-" { Resize "Decrease"; }
    }
    pane {
        bind "Ctrl p" { SwitchToMode "Normal"; }
        bind "h" "Left" { MoveFocus "Left"; }
        bind "l" "Right" { MoveFocus "Right"; }
        bind "j" "Down" { MoveFocus "Down"; }
        bind "k" "Up" { MoveFocus "Up"; }
        bind "p" { SwitchFocus; }
        bind "n" { NewPane; SwitchToMode "Normal"; }
        bind "d" { NewPane "Down"; SwitchToMode "Normal"; }
        bind "r" { NewPane "Right"; SwitchToMode "Normal"; }
        bind "x" { CloseFocus; SwitchToMode "Normal"; }
        bind "f" { ToggleFocusFullscreen; SwitchToMode "Normal"; }
        bind "z" { TogglePaneFrames; SwitchToMode "Normal"; }
        bind "w" { ToggleFloatingPanes; SwitchToMode "Normal"; }
        bind "e" { TogglePaneEmbedOrFloating; SwitchToMode "Normal"; }
        bind "c" { SwitchToMode "RenamePane"; PaneNameInput 0;}
    }
    move {
        bind "Ctrl h" { SwitchToMode "Normal"; }
        bind "n" "Tab" { MovePane; }
        bind "p" { MovePaneBackwards; }
        bind "h" "Left" { MovePane "Left"; }
        bind "j" "Down" { MovePane "Down"; }
        bind "k" "Up" { MovePane "Up"; }
        bind "l" "Right" { MovePane "Right"; }
    }
    tab {
        bind "Ctrl t" { SwitchToMode "Normal"; }
        bind "r" { SwitchToMode "RenameTab"; TabNameInput 0; }
        bind "h" "Left" "Up" "k" { GoToPreviousTab; }
        bind "l" "Right" "Down" "j" { GoToNextTab; }
        bind "n" { NewTab; SwitchToMode "Normal"; }
        bind "x" { CloseTab; SwitchToMode "Normal"; }
        bind "s" { ToggleActiveSyncTab; SwitchToMode "Normal"; }
        bind "b" { BreakPane; SwitchToMode "Normal"; }
        bind "]" { BreakPaneRight; SwitchToMode "Normal"; }
        bind "[" { BreakPaneLeft; SwitchToMode "Normal"; }
        bind "1" { GoToTab 1; SwitchToMode "Normal"; }
        bind "2" { GoToTab 2; SwitchToMode "Normal"; }
        bind "3" { GoToTab 3; SwitchToMode "Normal"; }
        bind "4" { GoToTab 4; SwitchToMode "Normal"; }
        bind "5" { GoToTab 5; SwitchToMode "Normal"; }
        bind "6" { GoToTab 6; SwitchToMode "Normal"; }
        bind "7" { GoToTab 7; SwitchToMode "Normal"; }
        bind "8" { GoToTab 8; SwitchToMode "Normal"; }
        bind "9" { GoToTab 9; SwitchToMode "Normal"; }
        bind "Tab" { ToggleTab; }
    }
    scroll {
        bind "Ctrl s" { SwitchToMode "Normal"; }
        bind "e" { EditScrollback; SwitchToMode "Normal"; }
        bind "s" { SwitchToMode "EnterSearch"; SearchInput 0; }
        bind "Ctrl c" { ScrollToBottom; SwitchToMode "Normal"; }
        bind "j" "Down" { ScrollDown; }
        bind "k" "Up" { ScrollUp; }
        bind "Ctrl f" "PageDown" "Right" "l" { PageScrollDown; }
        bind "Ctrl b" "PageUp" "Left" "h" { PageScrollUp; }
        bind "d" { HalfPageScrollDown; }
        bind "u" { HalfPageScrollUp; }
        // uncomment this and adjust key if using copy_on_select=false
        // bind "Alt c" { Copy; }
    }
    search {
        bind "Ctrl s" { SwitchToMode "Normal"; }
        bind "Ctrl c" { ScrollToBottom; SwitchToMode "Normal"; }
        bind "j" "Down" { ScrollDown; }
        bind "k" "Up" { ScrollUp; }
        bind "Ctrl f" "PageDown" "Right" "l" { PageScrollDown; }
        bind "Ctrl b" "PageUp" "Left" "h" { PageScrollUp; }
        bind "d" { HalfPageScrollDown; }
        bind "u" { HalfPageScrollUp; }
        bind "n" { Search "down"; }
        bind "p" { Search "up"; }
        bind "c" { SearchToggleOption "CaseSensitivity"; }
        bind "w" { SearchToggleOption "Wrap"; }
        bind "o" { SearchToggleOption "WholeWord"; }
    }
    entersearch {
        bind "Ctrl c" "Esc" { SwitchToMode "Scroll"; }
        bind "Enter" { SwitchToMode "Search"; }
    }
    renametab {
        bind "Ctrl c" { SwitchToMode "Normal"; }
        bind "Esc" { UndoRenameTab; SwitchToMode "Tab"; }
    }
    renamepane {
        bind "Ctrl c" { SwitchToMode "Normal"; }
        bind "Esc" { UndoRenamePane; SwitchToMode "Pane"; }
    }
    session {
        bind "Ctrl o" { SwitchToMode "Normal"; }
        bind "Ctrl s" { SwitchToMode "Scroll"; }
        bind "d" { Detach; }
        bind "w" {
            LaunchOrFocusPlugin "zellij:session-manager" {
                floating true
                move_to_focused_tab true
            };
            SwitchToMode "Normal"
        }
    }
    tmux {
        bind "[" { SwitchToMode "Scroll"; }
        bind "Ctrl b" { Write 2; SwitchToMode "Normal"; }
        bind "\"" { NewPane "Down"; SwitchToMode "Normal"; }
        bind "%" { NewPane "Right"; SwitchToMode "Normal"; }
        bind "z" { ToggleFocusFullscreen; SwitchToMode "Normal"; }
        bind "c" { NewTab; SwitchToMode "Normal"; }
        bind "," { SwitchToMode "RenameTab"; }
        bind "p" { GoToPreviousTab; SwitchToMode "Normal"; }
        bind "n" { GoToNextTab; SwitchToMode "Normal"; }
        bind "Left" { MoveFocus "Left"; SwitchToMode "Normal"; }
        bind "Right" { MoveFocus "Right"; SwitchToMode "Normal"; }
        bind "Down" { MoveFocus "Down"; SwitchToMode "Normal"; }
        bind "Up" { MoveFocus "Up"; SwitchToMode "Normal"; }
        bind "h" { MoveFocus "Left"; SwitchToMode "Normal"; }
        bind "l" { MoveFocus "Right"; SwitchToMode "Normal"; }
        bind "j" { MoveFocus "Down"; SwitchToMode "Normal"; }
        bind "k" { MoveFocus "Up"; SwitchToMode "Normal"; }
        bind "o" { FocusNextPane; }
        bind "d" { Detach; }
        bind "Space" { NextSwapLayout; }
        bind "x" { CloseFocus; SwitchToMode "Normal"; }
    }
    shared_except "locked" {
        bind "Ctrl g" { SwitchToMode "Locked"; }
        bind "Ctrl q" { Quit; }
        bind "Alt n" { NewPane; }
        bind "Alt h" "Alt Left" { MoveFocusOrTab "Left"; }
        bind "Alt l" "Alt Right" { MoveFocusOrTab "Right"; }
        bind "Alt j" "Alt Down" { MoveFocus "Down"; }
        bind "Alt k" "Alt Up" { MoveFocus "Up"; }
        bind "Alt =" "Alt +" { Resize "Increase"; }
        bind "Alt -" { Resize "Decrease"; }
        bind "Alt [" { PreviousSwapLayout; }
        bind "Alt ]" { NextSwapLayout; }
        bind "Alt f" {
            LaunchPlugin "filepicker" {
                // floating true // uncomment this to have the filepicker opened in a floating window
                close_on_selection true // comment this out to have the filepicker remain open even after selecting a file
            };
        }
        bind "Ctrl y" {
            LaunchOrFocusPlugin "file:~/.config/zellij/plugins/room.wasm" {
                floating true
                ignore_case false
            }
        }
        // bind "Ctrl k" {
        //     LaunchOrFocusPlugin "file:~/.config/zellij/plugins/harpoon.wasm" {
        //         floating true; move_to_focused_tab true;
        //     }
        // }
        bind "Ctrl k" {
            LaunchOrFocusPlugin "file:~/.config/zellij/plugins/zellij-jump-list.wasm" {
                floating true; move_to_focused_tab true;
            }
        }
        bind "Ctrl f" {
            LaunchOrFocusPlugin "file:~/.config/zellij/plugins/zellij_forgot.wasm" {
                "LOAD_ZELLIJ_BINDINGS" "true"
                "Switch tabs" "Ctrl y"
                "Switch panels" "Ctrl k"
                "Filepicker" "Alt f"
                floating true
            }
        }
    }
    shared_except "normal" "locked" {
        bind "Enter" "Esc" { SwitchToMode "Normal"; }
    }
    shared_except "pane" "locked" {
        bind "Ctrl p" { SwitchToMode "Pane"; }
    }
    shared_except "resize" "locked" {
        bind "Ctrl n" { SwitchToMode "Resize"; }
    }
    shared_except "scroll" "locked" {
        bind "Ctrl s" { SwitchToMode "Scroll"; }
    }
    shared_except "session" "locked" {
        bind "Ctrl o" { SwitchToMode "Session"; }
    }
    shared_except "tab" "locked" {
        bind "Ctrl t" { SwitchToMode "Tab"; }
    }
    shared_except "move" "locked" {
        bind "Ctrl h" { SwitchToMode "Move"; }
    }
    shared_except "tmux" "locked" {
        bind "Ctrl b" { SwitchToMode "Tmux"; }
    }
}

plugins {
    tab-bar { path "tab-bar"; }
    status-bar { path "status-bar"; }
    strider { path "strider"; }
    compact-bar { path "compact-bar"; }
    session-manager { path "session-manager"; }
}

// Choose what to do when zellij receives SIGTERM, SIGINT, SIGQUIT or SIGHUP
// eg. when terminal window with an active zellij session is closed
// Options:
//   - detach (Default)
//   - quit
//
// on_force_close "quit"

//  Send a request for a simplified ui (without arrow fonts) to plugins
//  Options:
//    - true
//    - false (Default)
//
// simplified_ui true

// Choose the path to the default shell that zellij will use for opening new panes
// Default: $SHELL
//
// default_shell "fish"

// Choose the path to override cwd that zellij will use for opening new panes
//
// default_cwd ""

// Toggle between having pane frames around the panes
// Options:
//   - true (default)
//   - false
//
pane_frames true

// Toggle between having Zellij lay out panes according to a predefined set of layouts whenever possible
// Options:
//   - true (default)
//   - false
//
// auto_layout true

// Whether sessions should be serialized to the cache folder (including their tabs/panes, cwds and running commands) so that they can later be resurrected
// Options:
//   - true (default)
//   - false
//
session_serialization true

// Whether pane viewports are serialized along with the session, default is false
// Options:
//   - true
//   - false (default)
serialize_pane_viewport true

// Scrollback lines to serialize along with the pane viewport when serializing sessions, 0
// defaults to the scrollback size. If this number is higher than the scrollback size, it will
// also default to the scrollback size. This does nothing if `serialize_pane_viewport` is not true.
//
// scrollback_lines_to_serialize 10000

// Define color themes for Zellij
// For more examples, see: https://github.com/zellij-org/zellij/tree/main/example/themes
// Once these themes are defined, one of them should to be selected in the "theme" section of this file
//
// themes {
//     dracula {
//         fg 248 248 242
//         bg 40 42 54
//         red 255 85 85
//         green 80 250 123
//         yellow 241 250 140
//         blue 98 114 164
//         magenta 255 121 198
//         orange 255 184 108
//         cyan 139 233 253
//         black 0 0 0
//         white 255 255 255
//     }
// }

// Choose the theme that is specified in the themes section.
// Default: default
//
// theme "default"

// The name of the default layout to load on startup
// Default: "default"
//
// default_layout "compact"

// Choose the mode that zellij uses when starting up.
// Default: normal
//
// default_mode "locked"

// Toggle enabling the mouse mode.
// On certain configurations, or terminals this could
// potentially interfere with copying text.
// Options:
//   - true (default)
//   - false
//
// mouse_mode false

// Configure the scroll back buffer size
// This is the number of lines zellij stores for each pane in the scroll back
// buffer. Excess number of lines are discarded in a FIFO fashion.
// Valid values: positive integers
// Default value: 10000
//
// scroll_buffer_size 10000

// Provide a command to execute when copying text. The text will be piped to
// the stdin of the program to perform the copy. This can be used with
// terminal emulators which do not support the OSC 52 ANSI control sequence
// that will be used by default if this option is not set.
// Examples:
//
// copy_command "xclip -selection clipboard" // x11
copy_command "wl-copy"                    // wayland
// copy_command "pbcopy"                     // osx

// Choose the destination for copied text
// Allows using the primary selection buffer (on x11/wayland) instead of the system clipboard.
// Does not apply when using copy_command.
// Options:
//   - system (default)
//   - primary
//
// copy_clipboard "primary"

// Enable or disable automatic copy (and clear) of selection when releasing mouse
// Default: true
//
// copy_on_select false

// Path to the default editor to use to edit pane scrollbuffer
// Default: $EDITOR or $VISUAL
//
scrollback_editor "/usr/bin/nvim"

// When attaching to an existing session with other users,
// should the session be mirrored (true)
// or should each user have their own cursor (false)
// Default: false
//
// mirror_session true

// The folder in which Zellij will look for layouts
//
// layout_dir "/path/to/my/layout_dir"

// The folder in which Zellij will look for themes
//
// theme_dir "/path/to/my/theme_dir"

// Enable or disable the rendering of styled and colored underlines (undercurl).
// May need to be disabled for certain unsupported terminals
// Default: true
//
// styled_underlines false

from zellij-jump-list.

matiux avatar matiux commented on September 27, 2024

And this is my default layout:

layout {
    default_tab_template {
        pane size=1 borderless=true {
            plugin location="zellij:tab-bar"
        }
        children
        pane size=2 borderless=true {
            plugin location="zellij:status-bar"
        }
    }
    tab name="iux" focus=true {
        pane split_direction="vertical" {
            pane cwd="~/" name="iux's home 1" focus=true
            pane cwd="~/" name="iux's home 2"
        }
        pane split_direction="vertical" {
            pane cwd="/" name="root" command="/usr/bin/zsh" {
                args "-c" "neofetch"
            }
            pane name="htop" command="htop"
        }
    }
    tab_template name="strider_tab" {
        pane size=1 borderless=true {
            plugin location="zellij:tab-bar"
        }
        pane split_direction="Vertical" {
            pane size="15%" {
                plugin location="zellij:strider"
            }
            children
        }
        pane size=2 borderless=true {
            plugin location="zellij:status-bar"
        }
    }
    strider_tab name="fpicker" cwd="/"
    tab name="shiva" cwd="~/Documents/Programming/Abilio/shiva" {
        pane size="70%" stacked=true {
            pane name="exporter" cwd="./shiva-exporter"
            pane name="pubblicazioni" cwd="./gestore-pubblicazioni"
            pane name="magazzino" cwd="./magazzino-lotti"
        }
        pane size="30%" {
            pane name="Git operations"
        }
    }
}

This is the output of the plugin

Screenshot_20240421_190812

from zellij-jump-list.

blank2121 avatar blank2121 commented on September 27, 2024

wait so where is the issue? If that is the output then it looks like it is in order.

there are no duplicate panels. those repeats mean that you have visited them multiple times. though you originally said that some were missing.

from zellij-jump-list.

matiux avatar matiux commented on September 27, 2024

I thought that I would see the list of all panels of all tabs. Maybe I misunderstood the function of the plugin?

from zellij-jump-list.

blank2121 avatar blank2121 commented on September 27, 2024

The function of the plugin is to keep track of the panels you move from and too and to track that. Then my plugin makes it so you can backtrack through those movements making switching to previously used panels easier. Though the main application comes when you use multiple tabs though Zellij tracks them in a way that makes that odd. That is the thing that I personally plan to fix as that is where the application of this plugin truly is seen.

if the function of this plugin was not what you were looking for then still share as I enjoyed the process and maybe will make that my next Zellij based project. (I also plan to make a Zellij plugin installer though)

from zellij-jump-list.

matiux avatar matiux commented on September 27, 2024

So, my apologie.. I misunderstood the goal of this plugin. I would like to have a plugin to navigate easily all the panels of all the tabs. For example I'm using room to easily navigate between tabs. I would like to do the same thing with panels. Maybe harpoon could be the solution, but as I said, I receive in output an empty panel. I opened an issue here

from zellij-jump-list.

blank2121 avatar blank2121 commented on September 27, 2024

That should be specified in the README but you have to run it with the keyboard shortcut first and then it will track the changes and sadly at the moment it bugs out when changing panels in tabs (though maybe version 0.40.0 fixed that).

I'll take that idea from you (and refer you as the original idea) and potentially make that. Room is great but it only does tabs and it would be very easy to make a version that adds the specific panels. I could probably fork that and add that as a feature.

with that unless you have anything else, I will close this thread

from zellij-jump-list.

matiux avatar matiux commented on September 27, 2024

You can certainly close. And thanks for the help. Just a comparison, does harpoon work for you? If it works for you, do you have any ideas what my problem might be?

from zellij-jump-list.

blank2121 avatar blank2121 commented on September 27, 2024

I'm not too sure why as it depends on the issues you face. for me i run the plugin and it worked as intended. to test of it is an issue with config vs the file, i'd suggest running zellij action launch-or-focus-plugin --floating file:~/Downloads/harpoon.wasm and then use it that way and if it doesn't work then something is up with the file or how your machine uses the file.

from zellij-jump-list.

blank2121 avatar blank2121 commented on September 27, 2024

miss understanding of functionality/purpose of plugin. Issue resolved.

from zellij-jump-list.

Related Issues (2)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.