topinambour 1.0.8 → 1.0.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +40 -46
- data/bin/topinambour +11 -3
- data/data/headerbar.ui +173 -0
- data/data/prefs-dialog.ui +576 -0
- data/data/topinambour.css +16 -0
- data/data/topinambour.gresource +0 -0
- data/data/topinambour.gresource.xml +2 -0
- data/data/window-menu.ui +1 -0
- data/lib/actions.rb +14 -4
- data/lib/application.rb +6 -6
- data/lib/color_selector.rb +3 -6
- data/lib/css_editor.rb +1 -1
- data/lib/css_handler.rb +12 -7
- data/lib/font_selector.rb +2 -4
- data/lib/notebook.rb +9 -1
- data/lib/preferences.rb +185 -0
- data/lib/resize_message.rb +1 -1
- data/lib/rgb_names_regexes.rb +3 -0
- data/lib/searchbar.rb +54 -0
- data/lib/shortcuts.rb +27 -8
- data/lib/style_properties.rb +48 -37
- data/lib/terminal.rb +3 -1
- data/lib/terminal_chooser.rb +26 -19
- data/lib/terminal_regex.rb +3 -2
- data/lib/window.rb +100 -35
- metadata +12 -9
- data/lib/headerbar.rb +0 -126
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 992cf1b66a113669bb7103401a101e9fa3f1d97d
|
4
|
+
data.tar.gz: e0f45aba03748b34f8ea2276035dddb7c534a92b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1eed728dc94c6019167d69878c8381f121fad9dac32f9cafa2826cd894c42e6d4ab25a7c21f3e8e920f19fb58035706ed966d5f387224f12ed4c0469da8a9229
|
7
|
+
data.tar.gz: db9520fccb7604376319c8cf9e91e55e574c0e9e76e2d539652c7e50b21336a06801121af0afa77d9b231527466d54b57a6d3f3b75c0d183f547600a1b2f17be
|
data/README.md
CHANGED
@@ -8,44 +8,55 @@
|
|
8
8
|
|
9
9
|
<a href="https://raw.github.com/cedlemo/topinambour/master/color_selection_screen.gif"><img src="https://raw.github.com/cedlemo/topinambour/master/color_selection_screen.gif" style="width:576px;height:324px;" alt="Color selection gif"></a>
|
10
10
|
|
11
|
-
|
11
|
+
<a href="https://raw.github.com/cedlemo/topinambour/master/terminal_regex_color.gif"><img src="https://raw.github.com/cedlemo/topinambour/master/terminal_regex_color.gif" style="width:576px;height:324px;" alt="Regex color gif"></a>
|
12
|
+
|
13
|
+
|
14
|
+
Topinambour is Terminal written with the Gtk3 and Vte3 ruby bindings from the project [Ruby-GNOME2](https://github.com/ruby-gnome2/ruby-gnome2). I have written it for testing purpose, but Topinambour works well and I use it as my primary terminal emulator.
|
12
15
|
|
13
16
|
## Features
|
14
17
|
|
15
18
|
* Tabs supports
|
16
|
-
* Tabs can be reordered or selected through the preview mode ( `Shift + Ctrl + o` )
|
19
|
+
* Tabs can be reordered or selected through the preview mode ( `Shift + Ctrl + o` ).
|
17
20
|
* Each tab can be named.
|
18
|
-
* The configuration can be done via a Css file
|
19
|
-
* Terminal colors can be changed on the fly and saved in the CSS configuration file
|
20
|
-
* Terminal font can be changed on the fly and saved in the CSS configuration file
|
21
|
+
* The configuration can be done via a Css file.
|
22
|
+
* Terminal colors can be changed on the fly and saved in the CSS configuration file.
|
23
|
+
* Terminal font can be changed on the fly and saved in the CSS configuration file.
|
21
24
|
* The Css file can be edited in a tab of Topinambour and saved. Each modifications are applied while you are writting them. (Use `Shift + Ctrl + w` to close the editor)
|
22
|
-
*
|
25
|
+
* In the terminals, some patterns can be clicked (urls, emails, color names ...) in order to launch the appropriate application or a related dialog window.
|
26
|
+
* Topinambour allows users to modify existing modules. For example if a user copy the css_editor.rb in the directory *~/.config/topinambour/lib/css_editor.rb*, he should be able to modify it in order to fit its needs.
|
23
27
|
|
24
28
|
## TODO:
|
25
|
-
*
|
26
|
-
*
|
29
|
+
* Name all the important widget so that they can be easily themed in Css.
|
30
|
+
* Write a description of the widgets that have a Css name/Id.
|
31
|
+
* Improve the Css editor with a part for the Css parsing error when the user writes. Add a color chooser widget in the related tab.
|
27
32
|
* Make Topinambour allows users to easily create their own modules. For example create a tab that will act as a MPD client. There will be widgets that control a MPD server and a GtkTree widget that displays the playlist of the MPD server for example.
|
28
33
|
|
29
34
|
## Shortcuts
|
30
35
|
|
31
36
|
* `Shift + Ctrl + t` new tab
|
32
|
-
|
37
|
+
|
33
38
|
* `Shift + Ctrl + q` quit Topinambour
|
34
|
-
|
39
|
+
|
35
40
|
* `Shift + Ctrl + w` close current tab
|
36
|
-
|
41
|
+
|
37
42
|
* `Shift + Ctrl + left` previous tab
|
38
|
-
|
43
|
+
|
39
44
|
* `Shift + Ctrl + right` next tab
|
40
|
-
|
45
|
+
|
41
46
|
* `Shift + Ctrl + c` display color selectors for the vte in overlay mod (Esc to leave)
|
42
|
-
|
47
|
+
|
43
48
|
* `Shift + Ctrl + f` display font selector for the vte in overlay mod (Esc to leave)
|
44
|
-
|
49
|
+
|
45
50
|
* `Shift + Ctrl + o` display previews of all tabs (Esc to leave)
|
46
51
|
|
47
52
|
* `Shift + Ctrl + e` open the Css configuration editor in a new notebook tab.
|
48
53
|
|
54
|
+
* `Shift + Ctrl + /` open for the current terminal a search entry.
|
55
|
+
|
56
|
+
* `Shift + Ctrl + Up` diminue topinambour window size to its minimum or resize to its previous height.
|
57
|
+
|
58
|
+
* `Shift + Ctrl + Scroll` scroll down or up in order to decrease or increase the opacity.
|
59
|
+
|
49
60
|
|
50
61
|
## User configuration
|
51
62
|
|
@@ -79,43 +90,26 @@ It can be found in the file `$HOME/.config/topinambour/topinambour.css` (Be care
|
|
79
90
|
-TopinambourWindow-width: 1000;*/
|
80
91
|
}
|
81
92
|
|
82
|
-
TopinambourWindow
|
93
|
+
TopinambourWindow headerbar entry{
|
83
94
|
border-radius: 4px;
|
84
95
|
}
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
border-style: solid;
|
91
|
-
border-color: rgba(49, 150, 188, 1);
|
92
|
-
border-radius: 6px 0px 0px 0px;
|
93
|
-
}
|
94
|
-
TopinambourWindow GtkOverlay GtkScrolledWindow#terminal_chooser GtkBox{
|
95
|
-
background-color: rgba(49, 150, 188, 0.5);
|
96
|
-
border-top: 1px;
|
97
|
-
border-left: 1px;
|
98
|
-
border-bottom: 1px;
|
99
|
-
border-style: solid;
|
100
|
-
border-color: rgba(49, 150, 188, 1);
|
101
|
-
border-radius: 6px 0px 0px 6px;
|
96
|
+
|
97
|
+
#OverviewBox {
|
98
|
+
background-color: rgba(0,0,0,0.2);
|
99
|
+
border: solid 1px rgba(49, 150, 188, 1);
|
100
|
+
border-radius: 6px 0px 0px 6px;
|
102
101
|
}
|
103
102
|
|
104
|
-
|
103
|
+
grid button {
|
105
104
|
margin: 0px;
|
106
105
|
padding: 0px;
|
107
|
-
}
|
108
106
|
|
109
|
-
TopinambourWindow GtkOverlay GtkScrolledWindow GtkGrid GtkButton GtkImage {
|
110
|
-
border: solid 3px rgba(0, 0, 0, 0.0);
|
111
107
|
}
|
112
108
|
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
border-top-right-radius: 6px;
|
118
|
-
border-bottom-left-radius: 6px;
|
109
|
+
grid button image {
|
110
|
+
border: solid 3px rgba(0, 0, 0, 0.0);
|
111
|
+
margin: 0px;
|
112
|
+
padding: 0px;
|
119
113
|
}
|
120
114
|
```
|
121
115
|
|
@@ -141,7 +135,7 @@ Which means that the old file can be something like that : *topinambour.css_2016
|
|
141
135
|
|
142
136
|
### Launch the terminal
|
143
137
|
|
144
|
-
~> topinambour
|
138
|
+
~> topinambour
|
145
139
|
|
146
140
|
### Tips:
|
147
141
|
|
@@ -156,7 +150,7 @@ the ruby gem binaries (for example).
|
|
156
150
|
|
157
151
|
git clone https://github.com/cedlemo/topinambour.git
|
158
152
|
cd topinambour/bin
|
159
|
-
|
153
|
+
|
160
154
|
##### Edit the files Topinambour and test
|
161
155
|
The filenames correspond to their functionnalities.
|
162
156
|
Simply run `./topinambour` when you have done your modifications.
|
@@ -165,7 +159,7 @@ You will need fish shell if you want to test it.
|
|
165
159
|
|
166
160
|
### Copying:
|
167
161
|
|
168
|
-
Copyright 2015-2016
|
162
|
+
Copyright 2015-2016 Cedric Le Moigne
|
169
163
|
|
170
164
|
This program is free software: you can redistribute it and/or modify
|
171
165
|
it under the terms of the GNU General Public License as published by
|
data/bin/topinambour
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
-
# Copyright 2015-2016
|
2
|
+
# Copyright 2015-2016 Cedric LE MOIGNE, cedlemo@gmx.com
|
3
3
|
# This file is part of Topinambour.
|
4
4
|
#
|
5
5
|
# Topinambour is free software: you can redistribute it and/or modify
|
@@ -36,13 +36,21 @@ resource = Gio::Resource.load(gresource_bin)
|
|
36
36
|
Gio::Resources.register(resource)
|
37
37
|
# Load default libraries !!WARNING!! loading order matters
|
38
38
|
|
39
|
-
|
40
|
-
|
39
|
+
#load_time = Time.now
|
40
|
+
#old_time = 0
|
41
|
+
|
42
|
+
%w(actions style_properties css_handler application rgb_names_regexes
|
43
|
+
terminal_regex terminal notebook color_selector font_selector
|
44
|
+
terminal_chooser shortcuts searchbar window css_editor
|
45
|
+
preferences).each do |l|
|
41
46
|
if File.exist?("#{USR_LIB_PATH}/#{l}.rb")
|
42
47
|
require "#{USR_LIB_PATH}/#{l}.rb"
|
43
48
|
else
|
44
49
|
require "#{LIB_PATH}/#{l}.rb"
|
45
50
|
end
|
51
|
+
# old_time = load_time
|
52
|
+
# load_time = Time.now
|
53
|
+
# puts "#{load_time - old_time} s for loading #{l}.rb"
|
46
54
|
end
|
47
55
|
|
48
56
|
Gtk::IconTheme.default.add_resource_path("/com/github/cedlemo/topinambour/icons")
|
data/data/headerbar.ui
ADDED
@@ -0,0 +1,173 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<!-- Generated with glade 3.20.0 -->
|
3
|
+
<interface>
|
4
|
+
<requires lib="gtk+" version="3.20"/>
|
5
|
+
<object class="GtkHeaderBar" id="headerbar">
|
6
|
+
<property name="visible">True</property>
|
7
|
+
<property name="can_focus">False</property>
|
8
|
+
<property name="title">Topinambour</property>
|
9
|
+
<property name="has_subtitle">False</property>
|
10
|
+
<property name="show_close_button">True</property>
|
11
|
+
<child>
|
12
|
+
<object class="GtkButton" id="prev_button">
|
13
|
+
<property name="visible">True</property>
|
14
|
+
<property name="can_focus">True</property>
|
15
|
+
<property name="receives_default">True</property>
|
16
|
+
<property name="tooltip_text" translatable="yes">Prev</property>
|
17
|
+
<property name="always_show_image">True</property>
|
18
|
+
<child>
|
19
|
+
<object class="GtkImage">
|
20
|
+
<property name="visible">True</property>
|
21
|
+
<property name="can_focus">False</property>
|
22
|
+
<property name="icon_name">pan-start-symbolic</property>
|
23
|
+
</object>
|
24
|
+
</child>
|
25
|
+
</object>
|
26
|
+
</child>
|
27
|
+
<child>
|
28
|
+
<object class="GtkLabel" id="current_tab">
|
29
|
+
<property name="visible">True</property>
|
30
|
+
<property name="can_focus">False</property>
|
31
|
+
<property name="tooltip_text" translatable="yes">Current</property>
|
32
|
+
<property name="label" translatable="yes">label</property>
|
33
|
+
</object>
|
34
|
+
<packing>
|
35
|
+
<property name="position">1</property>
|
36
|
+
</packing>
|
37
|
+
</child>
|
38
|
+
<child>
|
39
|
+
<object class="GtkButton" id="next_button">
|
40
|
+
<property name="visible">True</property>
|
41
|
+
<property name="can_focus">True</property>
|
42
|
+
<property name="receives_default">True</property>
|
43
|
+
<property name="tooltip_text" translatable="yes">Next</property>
|
44
|
+
<child>
|
45
|
+
<object class="GtkImage">
|
46
|
+
<property name="visible">True</property>
|
47
|
+
<property name="can_focus">False</property>
|
48
|
+
<property name="icon_name">pan-end-symbolic</property>
|
49
|
+
</object>
|
50
|
+
</child>
|
51
|
+
</object>
|
52
|
+
<packing>
|
53
|
+
<property name="position">2</property>
|
54
|
+
</packing>
|
55
|
+
</child>
|
56
|
+
<child>
|
57
|
+
<object class="GtkEntry" id="current_label">
|
58
|
+
<property name="visible">True</property>
|
59
|
+
<property name="can_focus">True</property>
|
60
|
+
<property name="tooltip_text" translatable="yes">Change the name of the tab and hit
|
61
|
+
enter in order to validate
|
62
|
+
</property>
|
63
|
+
<property name="max_length">40</property>
|
64
|
+
<property name="max_width_chars">40</property>
|
65
|
+
<property name="shadow_type">etched-in</property>
|
66
|
+
<property name="primary_icon_name">edit-delete</property>
|
67
|
+
<property name="secondary_icon_name">edit-clear</property>
|
68
|
+
<property name="primary_icon_tooltip_text" translatable="yes">Close this tab</property>
|
69
|
+
<property name="secondary_icon_tooltip_text" translatable="yes">Reset your changes and use the
|
70
|
+
default label for the current tab
|
71
|
+
</property>
|
72
|
+
</object>
|
73
|
+
<packing>
|
74
|
+
<property name="position">3</property>
|
75
|
+
</packing>
|
76
|
+
</child>
|
77
|
+
<child>
|
78
|
+
<object class="GtkButton" id="new_term">
|
79
|
+
<property name="visible">True</property>
|
80
|
+
<property name="can_focus">True</property>
|
81
|
+
<property name="receives_default">True</property>
|
82
|
+
<property name="tooltip_text" translatable="yes">New terminal</property>
|
83
|
+
<child>
|
84
|
+
<object class="GtkImage">
|
85
|
+
<property name="visible">True</property>
|
86
|
+
<property name="can_focus">False</property>
|
87
|
+
<property name="icon_name">tab-new-symbolic</property>
|
88
|
+
</object>
|
89
|
+
</child>
|
90
|
+
</object>
|
91
|
+
<packing>
|
92
|
+
<property name="position">4</property>
|
93
|
+
</packing>
|
94
|
+
</child>
|
95
|
+
<child>
|
96
|
+
<object class="GtkButton" id="menu_button">
|
97
|
+
<property name="name">menu_button</property>
|
98
|
+
<property name="visible">True</property>
|
99
|
+
<property name="can_focus">True</property>
|
100
|
+
<property name="receives_default">True</property>
|
101
|
+
<property name="tooltip_text" translatable="yes">Main menu</property>
|
102
|
+
<child>
|
103
|
+
<object class="GtkImage">
|
104
|
+
<property name="visible">True</property>
|
105
|
+
<property name="can_focus">False</property>
|
106
|
+
<property name="icon_name">open-menu-symbolic</property>
|
107
|
+
</object>
|
108
|
+
</child>
|
109
|
+
</object>
|
110
|
+
<packing>
|
111
|
+
<property name="pack_type">end</property>
|
112
|
+
<property name="position">5</property>
|
113
|
+
</packing>
|
114
|
+
</child>
|
115
|
+
<child>
|
116
|
+
<object class="GtkButton" id="font_sel_button">
|
117
|
+
<property name="visible">True</property>
|
118
|
+
<property name="can_focus">True</property>
|
119
|
+
<property name="receives_default">True</property>
|
120
|
+
<property name="tooltip_text" translatable="yes">Change the font</property>
|
121
|
+
<child>
|
122
|
+
<object class="GtkImage">
|
123
|
+
<property name="visible">True</property>
|
124
|
+
<property name="can_focus">False</property>
|
125
|
+
<property name="icon_name">font-select-symbolic</property>
|
126
|
+
</object>
|
127
|
+
</child>
|
128
|
+
</object>
|
129
|
+
<packing>
|
130
|
+
<property name="pack_type">end</property>
|
131
|
+
<property name="position">6</property>
|
132
|
+
</packing>
|
133
|
+
</child>
|
134
|
+
<child>
|
135
|
+
<object class="GtkButton" id="colors_sel_button">
|
136
|
+
<property name="visible">True</property>
|
137
|
+
<property name="can_focus">True</property>
|
138
|
+
<property name="receives_default">True</property>
|
139
|
+
<property name="tooltip_text" translatable="yes">Set the color scheme</property>
|
140
|
+
<child>
|
141
|
+
<object class="GtkImage">
|
142
|
+
<property name="visible">True</property>
|
143
|
+
<property name="can_focus">False</property>
|
144
|
+
<property name="icon_name">color-select-symbolic</property>
|
145
|
+
</object>
|
146
|
+
</child>
|
147
|
+
</object>
|
148
|
+
<packing>
|
149
|
+
<property name="pack_type">end</property>
|
150
|
+
<property name="position">7</property>
|
151
|
+
</packing>
|
152
|
+
</child>
|
153
|
+
<child>
|
154
|
+
<object class="GtkButton" id="term_overv_button">
|
155
|
+
<property name="visible">True</property>
|
156
|
+
<property name="can_focus">True</property>
|
157
|
+
<property name="receives_default">True</property>
|
158
|
+
<property name="tooltip_text" translatable="yes">Manage the tabs in the Tab Overview.</property>
|
159
|
+
<child>
|
160
|
+
<object class="GtkImage">
|
161
|
+
<property name="visible">True</property>
|
162
|
+
<property name="can_focus">False</property>
|
163
|
+
<property name="icon_name">emblem-photos-symbolic</property>
|
164
|
+
</object>
|
165
|
+
</child>
|
166
|
+
</object>
|
167
|
+
<packing>
|
168
|
+
<property name="pack_type">end</property>
|
169
|
+
<property name="position">8</property>
|
170
|
+
</packing>
|
171
|
+
</child>
|
172
|
+
</object>
|
173
|
+
</interface>
|