i am using terminator 0.96.
When I start programming I have to open my terminator do a few splits and start programms in every split. Is it possible to do this with a script?
For example splitting terminal in 4 windows and use a command in every window.
Is something like this possible?
You can save layouts, though some of the preferences won't save in Terminator, at least not for me.
What I did was altering the default layout in preferences (right-click > preferences) to make it save the layout of the different terminals.
Then to save custom commands, I edited the configuration file directly:
~/.config/terminator/config
Here you'll have to enter a 'command' line that ends with ; bash, like so:
[[[terminal2]]]
command = cd ~/Documents/myPath; bash
...
Follow this Tutorial to set and save your layout:
http://www.linuxnov.com/the-complete-guide-to-configure-terminator-terminal-emulator-layouts/
Next right-click on any split window and choose Preferences, and in the Preferences dialog, Global Tab > Behavior section, check the checkbox called "Window geometry hints".
Edit the ~/.config/terminator/config file. "YOUR-SAVED-LAYOUT" in the config example below refers to the name you gave to you layout after following the steps on the tutorial above. Config file looks like this before you edit:
[global_config]
geometry_hinting = True
title_use_system_font = False
[keybindings]
[layouts]
[[default]]
[[[child1]]]
parent = window0
type = Terminal
[[[window0]]]
parent = ""
type = Window
[[YOUR-SAVED-LAYOUT]]
[[[child0]]]
fullscreen = False
...
...
Delete the "default" node above so only your layout is left. Example below:
[global_config]
geometry_hinting = True
title_use_system_font = False
[keybindings]
[layouts]
[[YOUR-SAVED-LAYOUT]]
[[[child0]]]
fullscreen = False
...
...
Rename "YOUR-SAVED-LAYOUT" to "default" as follows:
[global_config]
geometry_hinting = True
title_use_system_font = False
[keybindings]
[layouts]
[[default]]
[[[child0]]]
fullscreen = False
...
...
Save the config file and exit.
Close and open Terminator. Your layout should now be default layout and applied everytime you launch Terminator.
NB: There is a bug. i use version 1.90 on debian 9 and it won't launch with the panes in their right position. Close and launch again.
Related
hello Godot's comunity !
I try to integrate in a project a way to import custom json file to generate Tilemap. So I use a EditorScript to generate it but now I want to open a file dialog popup to choose specific file in my disk. So i tried something like this :
tool
extends EditorScript
func _run():
var fileDialog = EditorFileDialog.new()
fileDialog.mode = EditorFileDialog.MODE_OPEN_FILE
fileDialog.access = EditorFileDialog.ACCESS_FILESYSTEM
fileDialog.popup()
...
but nothing happened. Only this in debugger :
scene/gui/control.cpp:2154 - Condition "!is_inside_tree()" is true.
scene/2d/canvas_item.cpp:469 - Condition "!is_inside_tree()" is true. Returned: get_transform()
scene/2d/canvas_item.cpp:939 - Condition "!is_inside_tree()" is true. Returned: Rect2()
scene/gui/control.cpp:2128 - Condition "!is_inside_tree()" is true.
scene/gui/control.cpp:2128 - Condition "!is_inside_tree()" is true.
./scene/main/node.h:269 - Condition "!data.tree" is true. Returned: nullptr
Any idea to do that ?
You need to give the FileDialog a viewport to be shown in.
You do so by getting the viewport of the editor:
var viewport = get_editor_interface().get_editor_viewport()
viewport.add_child(fileDialog)
this will show the dialog, but to ensure you do not run into followup problems:
The editor script is freed soon after running the run function, so connected signals will be not fired after choosing a file. (See here)
In the issue is the solution to secure the connected functions in the script are fired, by keeping the instance in the dialog. After you finished you should free the dialog to make sure you can run the script again, without closing the whole editor.
Complete code would look something like this:
tool
extends EditorScript
var fileDialog : EditorFileDialog = null
func _run():
fileDialog = EditorFileDialog.new()
fileDialog.mode = EditorFileDialog.MODE_OPEN_FILE
fileDialog.access = EditorFileDialog.ACCESS_FILESYSTEM
fileDialog.connect("file_selected", self, "on_file_selected")
var viewport = get_editor_interface().get_editor_viewport()
viewport.add_child(fileDialog)
fileDialog.set_meta("_created_by", self) # needed so the script is not directly freed after the run function. Would disconnect all signals otherwise
fileDialog.popup(Rect2(0,0, 700, 500)) # Giving the dialog a predefined size
print("end")
func on_file_selected(filename : String) :
print(filename)
if (fileDialog != null):
fileDialog.queue_free() # Dialog has to be freed in order for the script to be called again.
I want to force Terminator to open at the top-left of my screen. When I saved the layout I had the window positioned correctly. However, whenever I open Terminator upon computer restart, the window is positioned near the top and about 1.5 inches from the left.
I've been messing around with the config file, but cannot figure out the 'position' paramters. For example, under [[[child0]]] :
position = 36:32
and under [[[child1]]] :
position = 834
Can anyone explain how to customize these parameters?
System info:
Ubuntu 17.10, kernel 4.13.0-43
screen dimensions: 1920x1080 pixels, or 508x286 mm
Terminator v 1.91
terminator/config :
[global_config]
always_split_with_profile = True
suppress_multiple_term_dialog = True
title_transmit_bg_color = "#8ae234"
[keybindings]
[layouts]
[[default]]
[[[child0]]]
fullscreen = False
last_active_term = a69b1a79-eb9d-4c15-ac27-0502efc4c4f7
last_active_window = True
maximised = False
order = 0
parent = ""
position = 36:32
size = 808, 1014
title = bp#bpenner: ~
type = Window
[[[child1]]]
order = 0
parent = child0
position = 834
ratio = 0.826560951437
type = VPaned
[[[terminal2]]]
order = 0
parent = child1
profile = BP
type = Terminal
uuid = a69b1a79-eb9d-4c15-ac27-0502efc4c4f7
[[[terminal3]]]
order = 1
parent = child1
profile = BP
type = Terminal
uuid = 454d7873-3e55-49a4-af8c-6456f99d5e1e
[plugins]
[profiles]
[[default]]
cursor_color = "#aaaaaa"
There are a couple of things to try.
The following worked for me:
Open Terminator, then adjust its window's size and position as desired.
In the Terminator window, in the command-line area, right-click then choose Preferences.
In the Layouts tab, expand the Type / Name list, select Terminal1, then click Save.
Exit the Preferences dialog, then close and re-open Terminator.
Another approach that one can use to configure the display properties of many applications is to add the --geometry= parameter to the application's command line.
In a shell command line, type man x to display the man page for the X window system.
Scroll down to GEOMETRY SPECIFICATIONS.
I believe that your config file is missing the first [[[window0]]] entry, which comes before the [[[child]]] entries on my default settings.
Here are my config settings in which the first window starts with the upper left corner at position y=100 and x=100 pixels and it's size is 1000 X 700 pixels.
(notice the different format required to make these entries)
[global_config]
[keybindings]
[profiles]
[[default]]
audible_bell = True
cursor_color = "#aaaaaa"
[layouts]
[[default]]
[[[window0]]]
type = Window
parent = ""
size = 1000 , 700
position = 100:100
[[[child1]]]
type = Terminal
parent = window0
[plugins]
Hope it helps.
This worked for me to set terminator windows on the top left corner on 4k display (ubuntu 22.04):
Edit config file nano ~/.config/terminator/config
Under [[[window0]]] add size and position:
[[[window0]]]
type = Window
size = 1920, 1080
position = 0:0
parent = ""
I am trying to verify that the text box gets the focus (the blinking cursor gets placed inside of it) after a certain action. I tried to use the Focused property, but it does not seem to work, or the object doesnt have this property. This is on a Web application. Here is the code
reportPage = Aliases.iexplore.IESA;
saveWindow = reportPage.Find("ObjectIdentifier", "MainContent_saveFilterSetDialog_saveDialog", 50, true);
saveWindowNameTextBox = saveWindow.Find("ObjectIdentifier", "*MainContent_*_sfsName", 25, true);
if(saveWindowNameTextBox.Focused == true)
Log.Message("The blinking cursor is inside of the name text box")
else
Log.Error("The blinking cursor is not inside of the name text box")
The logging window says "Waiting for Focused", then it fails and the log says "Unable to find the object with the specified properties"
NOTE: When I inspect this text box object in the object inspector window, "Focused" is not listed in the list of properties.
Is there another way to accomplish this?
I was able to accomplish this using an HTML DOM property activeElement
var actualFocusedElement = Sys.Browser().Page("*BC/Report*").contentDocument.activeElement.id
if(aqString.Contains(actualElement, "saveDialog_tmpl_sfsName", 0, true))
Log.Message("The blinking cursor is inside of the name text box")
else
Log.Error("The blinking cursor is not inside of the name text box")
Q: When editing a .tex file in Textmate 2: How can you print latex sections in a bigger font size?
I added following grammar to the Latex bundle:
{ patterns = (
{ begin = 'section\{';
end = '\}';
name = 'markup.heading.1.latex';
},
);
}
And additionally I added following Setting that is applied to the newly defined markup.heading.1.latex scope:
{ fontName = 'Baskerville';
fontSize = '2.25em';
}
The problem: it only matches sections without a leading :
... and when I change the scope definition to the following (adding \\ in front of "section"):
{ patterns = (
{ begin = '\\section\{';
end = '\}';
name = 'markup.heading.1.latex';
},
);
}
.. the scope is not applied.
Any ideas?
The answer to your question is to edit the theme bundle.
The procedure to change the appearance of section in Texmate 2 is the following:
In the Bundle editor menu, select Edit bundles ....
Then select the bundle Themes.
From menu File, select New, and when prompted select Setting
Give a name to the setting.
In the Scope Selector field use meta.function.section.latex
Then you can edit the setting, for example:
{
fontName = 'Courier';
fontSize = 36;
}
Then save (in the usual way, e.g, command-s).
You can repeat for other sectioning command (to identify the scope, move the cursor on the appropriate place and then use the following key combination control-shift-P)
answer taken from here Please give the original author credit.
Coded in pygtk, I created the program menu this way:
def _create_menu
manager = self._window.get_ui_manager()
self.action_group = gtk.ActionGroup("SomeActions")
self.action_group.add_actions([
("Top", None, _("Main Menu")),
("Test", None, _("Test"), self.shortcut[0], _("Test1"), self.cb_on_test),
("Other", None, _("Other"), self.shortcut[1], _("Test2"), self.cb_on_other)])
manager.insert_action_group(self.action_group, -1)
self.ui_id = manager.add_ui_from_string(ui_str)
The menu shows up as expected, but what I don't understand is: how to change accelerator keys previously assigned to the menu from other methods and/or modules?
Changing accel's variable values (shortcut[0] and shortcut[1]) did not automatically updates the menu entry. Please help
You can do it like this. (Disclaimer: I'm translating it from C on the fly)
gtk.accel_map_change_entry('<Actions>/SomeActions/Test', gtk.keysyms.t, gtk.gdk.CONTROL_MASK, False)
This makes it Ctrl-T, for example. The False means don't set the new accelerator if Ctrl-T is already used.