topinambour 1.0.11 → 1.0.12

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bd58ccf9a13dafa848a0091098256879687c5877
4
- data.tar.gz: e6bf6b64542f156627325b9748a94007916d3b2d
3
+ metadata.gz: 1097375b658adb543853602368b6127648ee3fb7
4
+ data.tar.gz: e38ac41d0e6878eea8e76307a3b047bef497537a
5
5
  SHA512:
6
- metadata.gz: 16387db255b4837972943be109094fe88ea1dbe4f4007b3206040115b6b02711be5871ac0d8dc00e443b9d167464ec84a44be1f7b8017d5dd8fcf2daf0c41580
7
- data.tar.gz: 9816772c41dfc77d1202f8761e6488cf04592005852d162bdd2da5221a47fef33f8ab723c3bc65e70fb6fc56d2629d78f65fe715eca84b3a02ddbc449ae88510
6
+ metadata.gz: 9cb4907fe941ca948e06439583061fc3ff3a60d3ac45daadefc870519ea4d794102bb467a499419a092bd35b89c57614b1a2a84c91124a539f48544702d7d2f0
7
+ data.tar.gz: d04d3e2e61ebe6490b9b32fade4b1daeca1c041528c1be406b7995eb39c28337e363fc97e499701a224779b64f089ee1d39d19c4ed67499ed3f2b1f4ac5b7765
data/README.md CHANGED
@@ -3,42 +3,31 @@
3
3
  [![Gem Version](https://badge.fury.io/rb/topinambour.svg)](https://badge.fury.io/rb/topinambour)
4
4
  [![Code Climate](https://codeclimate.com/github/cedlemo/topinambour/badges/gpa.svg)](https://codeclimate.com/github/cedlemo/topinambour)
5
5
 
6
+ <a href="https://raw.github.com/cedlemo/topinambour/master/screenshot_terminal_chooser.png"><img src="https://raw.github.com/cedlemo/topinambour/master/screenshot_terminal_chooser.png" alt="Topinambour Preview"></a>
6
7
 
7
- <a href="https://raw.github.com/cedlemo/topinambour/master/terminal_selector_screen.gif"><img src="https://raw.github.com/cedlemo/topinambour/master/terminal_selector_screen.gif" style="width:576px;height:324px;" alt="Color selection gif"></a>
8
-
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
-
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>
8
+ ## Introduction
9
+ Topinambour is a Terminal written with the **Gtk3** and **Vte3** ruby bindings from the project [Ruby-GNOME2](https://github.com/ruby-gnome2/ruby-gnome2).
12
10
 
13
11
 
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
+ gem install topinambour
15
13
 
16
14
  ## Features
17
15
 
18
- * Tabs supports
19
- * Tabs can be reordered or selected through the preview mode ( `Shift + Ctrl + o` ).
20
- * Each tab can be named.
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.
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)
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.
16
+ <a href="https://raw.github.com/cedlemo/topinambour/master/screenshot_color_scheme.png"><img src="https://raw.github.com/cedlemo/topinambour/master/screenshot_color_scheme.png" alt="Topinambour Preview"></a>
27
17
 
28
- ## TODO:
29
- * Name all the important widgets so that they can be easily themed in Css.
30
- * `#topinambour-overview-box`
31
- * `#topinambour-headerbar`
32
- * `#topinambour-window`
33
- * `#topinambour-scrollbar`
34
- * `#topinambour-notebook`
35
-
36
- * Write a description of the widgets that have a Css name/Id.
37
- * 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.
38
- * 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.
18
+ * supports tabs
19
+ * tabs can be reordered or selected through the preview mode ( `Shift + Ctrl + o` ).
20
+ * each tab can be named.
21
+ * the theme can be done via a Css file, there is a load button that allow to reload the Css file when needed.
22
+ * terminal colors can be changed on the fly and saved.
23
+ * terminal font can be changed on the fly and saved.
24
+ * in the terminals, some patterns can be clicked (urls, emails, color names ...) in order to launch the appropriate application or a related dialog window.
25
+ * 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.
39
26
 
40
27
  ## Shortcuts
41
28
 
29
+ <a href="https://raw.github.com/cedlemo/topinambour/master/screenshot_shortcuts.png"><img src="https://raw.github.com/cedlemo/topinambour/master/screenshot_shortcuts.png" alt="Topinambour Shortcuts"></a>
30
+
42
31
  * `Shift + Ctrl + t` new tab
43
32
 
44
33
  * `Shift + Ctrl + q` quit Topinambour
@@ -61,10 +50,112 @@ Topinambour is Terminal written with the Gtk3 and Vte3 ruby bindings from the pr
61
50
 
62
51
  * `Shift + Ctrl + Up` diminue topinambour window size to its minimum or resize to its previous height.
63
52
 
64
- * `Shift + Ctrl + Scroll` scroll down or up in order to decrease or increase the opacity.
53
+ * `Shift + Ctrl + PageUp` increase the opacity.
54
+
55
+ * `Shift + Ctrl + PageDown` decrease the opacity.
56
+
57
+ ## Css theming
58
+
59
+ By default, topinambour will look for the file `~/.config/topinambour/topinambour.css`. You can select another file in the preferences dialog.
60
+ Various widget can be themed via the Css like the headerbar for example. Here is the Css used in the first screenshot (the Gtk theme is the Arc theme).
61
+
62
+ ```css
63
+ *{
64
+ }
65
+
66
+ #topinambour-window, #topinambour-notebook {
67
+ background-color: rgba(0,0,0,0);
68
+ }
69
+
70
+ #topinambour-overview-box {
71
+ margin-right: 24px;
72
+ background-color: rgba(87,91,108,0.95);
73
+ border-radius: 6px;
74
+ color: #b0b0b0;
75
+ }
76
+
77
+ #topinambour-headerbar {
78
+ background-color: #282828;
79
+ border: none;
80
+ box-shadow: none;
81
+ }
82
+
83
+ #topinambour-headerbar:backdrop {
84
+ background-color: rgba(50,50,50,0.7);
85
+ border: none;
86
+ box-shadow: none;
87
+ }
88
+
89
+ #topinambour-scrollbar {
90
+ background-color: rgba(0,0,0,0);
91
+ border: none;
92
+ }
93
+
94
+ #topinambour-scrollbar trough{
95
+ background-color: rgba(0,0,0,0);
96
+ border: none;
97
+ }
98
+ #topinambour-scrollbar slider{
99
+ margin-left: 8px;
100
+ background-color: #076678;
101
+ }
102
+
103
+ #topinambour-tab-term {
104
+ background-color: rgb(40,40,40);
105
+ }
106
+
107
+ grid button {
108
+ margin: 0px;
109
+ padding: 0px;
110
+ }
111
+
112
+ grid button image {
113
+ border: solid 3px rgba(0, 0, 0, 0.0);
114
+ margin: 0px;
115
+ padding: 0px;
116
+ }
117
+ ```
118
+
119
+ ## Build and Install git version.
120
+
121
+ git clone git@github.com:cedlemo/topinambour.git
122
+ cd topinambour
123
+ gem build topinambour.gemspec
124
+ gem install topinambour-x.x.x.gem
125
+ ~> topinambour
126
+
127
+ *Tips:*
128
+ > Don't forget, if you install it localy, you need that your system know the path of
129
+ the ruby gem binaries (for example).
130
+
131
+ export PATH="${PATH}:/home/${USER}/bin:${HOME}/gem/ruby/2.3.0/bin"
132
+
133
+
134
+
135
+ ## Old version (before 1.0.11)
136
+
137
+ <a href="https://raw.github.com/cedlemo/topinambour/master/terminal_selector_screen.gif"><img src="https://raw.github.com/cedlemo/topinambour/master/terminal_selector_screen.gif" style="width:576px;height:324px;" alt="Color selection gif"></a>
138
+
139
+ <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>
140
+
141
+ <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>
142
+
143
+
144
+
145
+ ### TODO:
146
+ * Name all the important widgets so that they can be easily themed in Css.
147
+ * `#topinambour-overview-box`
148
+ * `#topinambour-headerbar`
149
+ * `#topinambour-window`
150
+ * `#topinambour-scrollbar`
151
+ * `#topinambour-notebook`
152
+
153
+ * Write a description of the widgets that have a Css name/Id.
154
+ * 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.
155
+ * 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.
65
156
 
66
157
 
67
- ## User configuration
158
+ ### User configuration
68
159
 
69
160
  It can be found in the file `$HOME/.config/topinambour/topinambour.css` (Be carefull by default Topinambour use fish as a default shell, if you want to use another one specify it in the topinambour.css file)
70
161
 
@@ -137,7 +228,7 @@ Which means that the old file can be something like that : *topinambour.css_2016
137
228
 
138
229
  ## Installation
139
230
 
140
- ### Dependancies
231
+ ### Dependencies
141
232
 
142
233
  * gtk3 vte3 sass
143
234
 
@@ -153,7 +244,7 @@ Which means that the old file can be something like that : *topinambour.css_2016
153
244
 
154
245
  ~> topinambour
155
246
 
156
- ### Tips:
247
+ #### Tips:
157
248
 
158
249
  Don't forget, if you install it localy, you need that your system know the path of
159
250
  the ruby gem binaries (for example).
data/bin/topinambour CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
- # Copyright 2015-2016 Cedric LE MOIGNE, cedlemo@gmx.com
2
+ # Copyright 2015-2017 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
@@ -22,7 +22,16 @@
22
22
  require "gtk3"
23
23
  require "vte3"
24
24
  require "fileutils"
25
- require "sass"
25
+
26
+ Signal.trap("INT") {
27
+ STDERR.puts "\tTopinambour processus pid = #{Process.pid} has been interrupted with Ctrl-C"
28
+ exit
29
+ }
30
+
31
+ Signal.trap("TERM") {
32
+ STDERR.puts "\tTopinambour processus pid = #{Process.pid} has been killed"
33
+ exit
34
+ }
26
35
 
27
36
  CURRENT_PATH = File.expand_path(File.dirname(__FILE__))
28
37
  LIB_PATH = "#{CURRENT_PATH}/../lib"
@@ -36,10 +45,7 @@ resource = Gio::Resource.load(gresource_bin)
36
45
  Gio::Resources.register(resource)
37
46
  # Load default libraries !!WARNING!! loading order matters
38
47
 
39
- #load_time = Time.now
40
- #old_time = 0
41
-
42
- %w(actions style_properties css_handler application rgb_names_regexes
48
+ %w(actions application rgb_names_regexes
43
49
  terminal_regex terminal notebook color_selector font_selector
44
50
  terminal_chooser shortcuts searchbar window preferences).each do |l|
45
51
  if File.exist?("#{USR_LIB_PATH}/#{l}.rb")
@@ -47,13 +53,8 @@ terminal_chooser shortcuts searchbar window preferences).each do |l|
47
53
  else
48
54
  require "#{LIB_PATH}/#{l}.rb"
49
55
  end
50
- # old_time = load_time
51
- # load_time = Time.now
52
- # puts "#{load_time - old_time} s for loading #{l}.rb"
53
56
  end
54
57
 
55
- Gtk::IconTheme.default.add_resource_path("/com/github/cedlemo/topinambour/icons")
56
-
57
58
  topinambour = TopinambourApplication.new
58
59
 
59
60
  exit(topinambour.run([$PROGRAM_NAME] + ARGV))
data/data/app-menu.ui CHANGED
@@ -3,14 +3,18 @@
3
3
  <!-- interface-requires gtk+ 3.0 -->
4
4
  <menu id="appmenu">
5
5
  <section>
6
- <item>
7
- <attribute name="label" translatable="yes">_Preferences</attribute>
8
- <attribute name="action">app.preferences</attribute>
9
- </item>
10
6
  <item>
11
7
  <attribute name="label" translatable="yes">_About</attribute>
12
8
  <attribute name="action">app.about</attribute>
13
9
  </item>
10
+ <item>
11
+ <attribute name="label" translatable="yes">_Shortcuts</attribute>
12
+ <attribute name="action">app.shortcuts</attribute>
13
+ </item>
14
+ <item>
15
+ <attribute name="label" translatable="yes">_Preferences</attribute>
16
+ <attribute name="action">app.preferences</attribute>
17
+ </item>
14
18
  </section>
15
19
 
16
20
  <section>
Binary file
data/data/headerbar.ui CHANGED
@@ -6,7 +6,7 @@
6
6
  <property name="visible">True</property>
7
7
  <property name="can_focus">False</property>
8
8
  <property name="title">Topinambour</property>
9
- <property name="has_subtitle">False</property>
9
+ <property name="has_subtitle">True</property>
10
10
  <property name="show_close_button">True</property>
11
11
  <child>
12
12
  <object class="GtkButton" id="prev_button">
@@ -60,11 +60,10 @@
60
60
  <property name="tooltip_text" translatable="yes">Change the name of the tab and hit
61
61
  enter in order to validate
62
62
  </property>
63
- <property name="max_length">40</property>
64
- <property name="max_width_chars">40</property>
63
+ <property name="max_length">100</property>
64
+ <property name="max_width_chars">100</property>
65
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>
66
+ <property name="secondary_icon_name">edit-clear-symbolic</property>
68
67
  <property name="primary_icon_tooltip_text" translatable="yes">Close this tab</property>
69
68
  <property name="secondary_icon_tooltip_text" translatable="yes">Reset your changes and use the
70
69
  default label for the current tab
@@ -93,7 +92,7 @@ default label for the current tab
93
92
  </packing>
94
93
  </child>
95
94
  <child>
96
- <object class="GtkButton" id="menu_button">
95
+ <object class="GtkMenuButton" id="menu_button">
97
96
  <property name="name">menu_button</property>
98
97
  <property name="visible">True</property>
99
98
  <property name="can_focus">True</property>
@@ -112,63 +111,6 @@ default label for the current tab
112
111
  <property name="position">5</property>
113
112
  </packing>
114
113
  </child>
115
- <child>
116
- <object class="GtkButton" id="css_reload_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">Reload the Css file</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">view-refresh-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="font_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">Change the font</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">font-select-symbolic</property>
145
- </object>
146
- </child>
147
- </object>
148
- <packing>
149
- <property name="pack_type">end</property>
150
- <property name="position">6</property>
151
- </packing>
152
- </child>
153
- <child>
154
- <object class="GtkButton" id="colors_sel_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">Set the color scheme</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">color-select-symbolic</property>
164
- </object>
165
- </child>
166
- </object>
167
- <packing>
168
- <property name="pack_type">end</property>
169
- <property name="position">7</property>
170
- </packing>
171
- </child>
172
114
  <child>
173
115
  <object class="GtkButton" id="term_overv_button">
174
116
  <property name="visible">True</property>
@@ -185,7 +127,7 @@ default label for the current tab
185
127
  </object>
186
128
  <packing>
187
129
  <property name="pack_type">end</property>
188
- <property name="position">8</property>
130
+ <property name="position">7</property>
189
131
  </packing>
190
132
  </child>
191
133
  </object>
@@ -0,0 +1,131 @@
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="GtkPopover" id="main_menu_popover">
6
+ <property name="can_focus">False</property>
7
+ <property name="modal">False</property>
8
+ <child>
9
+ <object class="GtkBox">
10
+ <property name="visible">True</property>
11
+ <property name="can_focus">False</property>
12
+ <property name="orientation">vertical</property>
13
+ <property name="spacing">6</property>
14
+ <property name="margin">12</property>
15
+ <child>
16
+ <object class="GtkBox">
17
+ <property name="visible">True</property>
18
+ <property name="can_focus">False</property>
19
+ <property name="spacing">6</property>
20
+ <property name="homogeneous">True</property>
21
+ <child>
22
+ <object class="GtkButton" id="colors_sel_button">
23
+ <property name="visible">True</property>
24
+ <property name="can_focus">True</property>
25
+ <property name="receives_default">True</property>
26
+ <property name="tooltip_text" translatable="yes">Set the color scheme</property>
27
+ <child>
28
+ <object class="GtkImage">
29
+ <property name="visible">True</property>
30
+ <property name="can_focus">False</property>
31
+ <property name="icon_name">color-select-symbolic</property>
32
+ </object>
33
+ </child>
34
+ </object>
35
+ <packing>
36
+ <property name="expand">False</property>
37
+ <property name="fill">True</property>
38
+ <property name="position">0</property>
39
+ </packing>
40
+ </child>
41
+ <child>
42
+ <object class="GtkButton" id="font_sel_button">
43
+ <property name="visible">True</property>
44
+ <property name="can_focus">True</property>
45
+ <property name="receives_default">True</property>
46
+ <property name="tooltip_text" translatable="yes">Change the font</property>
47
+ <child>
48
+ <object class="GtkImage">
49
+ <property name="visible">True</property>
50
+ <property name="can_focus">False</property>
51
+ <property name="icon_name">font-select-symbolic</property>
52
+ </object>
53
+ </child>
54
+ </object>
55
+ <packing>
56
+ <property name="expand">False</property>
57
+ <property name="fill">True</property>
58
+ <property name="position">1</property>
59
+ </packing>
60
+ </child>
61
+ <child>
62
+ <object class="GtkButton" id="css_reload_button">
63
+ <property name="visible">True</property>
64
+ <property name="can_focus">True</property>
65
+ <property name="receives_default">True</property>
66
+ <property name="tooltip_text" translatable="yes">Reload the Css file</property>
67
+ <child>
68
+ <object class="GtkImage">
69
+ <property name="visible">True</property>
70
+ <property name="can_focus">False</property>
71
+ <property name="icon_name">view-refresh-symbolic</property>
72
+ </object>
73
+ </child>
74
+ </object>
75
+ <packing>
76
+ <property name="expand">False</property>
77
+ <property name="fill">True</property>
78
+ <property name="position">2</property>
79
+ </packing>
80
+ </child>
81
+ </object>
82
+ <packing>
83
+ <property name="expand">False</property>
84
+ <property name="fill">True</property>
85
+ <property name="position">0</property>
86
+ </packing>
87
+ </child>
88
+ <child>
89
+ <object class="GtkSeparator">
90
+ <property name="orientation">horizontal</property>
91
+ <property name="margin-top">6</property>
92
+ <property name="margin-bottom">6</property>
93
+ <property name="visible">True</property>
94
+ </object>
95
+ </child>
96
+ <child>
97
+ <object class="GtkModelButton">
98
+ <property name="can_focus">True</property>
99
+ <property name="text" translatable="yes">_Preferences</property>
100
+ <property name="action-name">app.preferences</property>
101
+ <property name="visible">True</property>
102
+ </object>
103
+ </child>
104
+ <child>
105
+ <object class="GtkModelButton">
106
+ <property name="can_focus">True</property>
107
+ <property name="text" translatable="yes">_About</property>
108
+ <property name="action-name">app.about</property>
109
+ <property name="visible">True</property>
110
+ </object>
111
+ </child>
112
+ <child>
113
+ <object class="GtkSeparator">
114
+ <property name="orientation">horizontal</property>
115
+ <property name="margin-top">6</property>
116
+ <property name="margin-bottom">6</property>
117
+ <property name="visible">True</property>
118
+ </object>
119
+ </child>
120
+ <child>
121
+ <object class="GtkModelButton">
122
+ <property name="can_focus">True</property>
123
+ <property name="text" translatable="yes">_Quit</property>
124
+ <property name="action-name">app.quit</property>
125
+ <property name="visible">True</property>
126
+ </object>
127
+ </child>
128
+ </object>
129
+ </child>
130
+ </object>
131
+ </interface>