-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Awesome! #20
Comments
Hi there and thanks for the appreciation! I've read your workflow and it's for sure a common case.
To control which terminal is opened, change the setting However, this still spawns a new terminal. Let's see what you can do to cd $(vscode-recent -F absolute-path | rofi -dmenu) I'm sure you can also bind this command to a key combo in your shell if you put some time into it. Implementing a custom "copy" functionality into the Rofi plugin seems a little overkill to me, since you still need to paste the workspace path into the terminal. I hope this is clear enough, as I've put it together after work 😆 |
This seems like a potentially viable solution! However, I'm uncertain as to how to use with rofi-bangs which is what I'm currently using as the "meta" launcher https://github.com/gotbletu/shownotes/blob/master/rofi-bangs.md I'm a bit new to rofi and would be very grateful if you had some advice as to how I could integrate your suggestion with terminator and rofi-bangs This is the entry in my current rofi-bangs script: # vscode workspace selector
COMMANDS["{vsc"]="rofi -show vscode-recent -modi vscode-recent"
LABELS["{vsc"]="" Thanks for your patience on this! :o) |
My suggestion was actually to set a keybinding inside your shell (I wrote terminal before, sorry) to launch that command. So you would manually open a new terminal panel in terminator, then press some key combination like Alt-C and the Rofi menu would come up. You select the entry you want and the However, if you prefer to stick to rofi-bangs and the copy-paste workflow you described in the first post, you can do as follows. I'm assuming you're using X11, but this would be similar in Wayland.
|
hmmm. This seems good but it does not work as expected with rofi-bangs Executing the following does not open the vscode window but successfully copies the workspace url:
The following opens the dir in vscode, but fails to copy the directory
Is there a way to get both at once? |
Then just do the dumb thing and create a script that does both: #!/usr/bin/env bash
# get the selection
sel=$(vscode-recent | rofi -dmenu)
if [[ -n "$sel" ]]; then
# open in vscode (after expanding the tilde)
sh -c "code $sel"
# copy to clipboard
echo -n "$sel" | xclip -selection clipboard -in
fi You save this in Then call it from rofi-bangs. |
Sorry, just saw this! this works perfectly thank you!!! I just added a
Many thanks! |
Absolutely awesome program! :o) Hat tip!!
So i was thinking this is great for getting the vscode windows open. However, i was thinking it be made even better for when the user uses a dedicated terminal to test the program vs using the inbuilt vscode term.
When I code terraform, I can end up with 4-5 vscode instances open - all instantiated from different directories. Thus I have a split pane terminator with x4 terminals that are linked to each open vscode instance. My normal workflow is to cd to the directory from the terminal, then launch vscode using
code .
.Obviously your app is much faster at opening the vscode window, but then I still need to type in a cd command to go to the matching folder. As a possible solution, would it be possible to get rofi-vscode-mode to copy the workspace path into the copy buffer, so i could then paste to
cd
in the terminal?Maybe you have a better idea as to how to improve this workflow? Anyways, look forward to your reply. :)
The text was updated successfully, but these errors were encountered: