├── .github └── workflows │ └── build.yml ├── .gitignore ├── COPYING ├── README.md ├── data ├── jargonaut.desktop.in └── meson.build ├── debian ├── changelog ├── compat ├── control ├── install └── rules ├── makepot ├── meson.build ├── po ├── LINGUAS └── meson.build ├── test └── usr ├── bin └── jargonaut ├── lib └── jargonaut │ ├── jargonaut.py │ ├── settings.py │ └── ui.py └── share ├── glib-2.0 └── schemas │ └── org.x.jargonaut.gschema.xml ├── icons └── hicolor │ └── scalable │ └── apps │ ├── jargonaut-channel-chat.svg │ ├── jargonaut-channel-help.svg │ ├── jargonaut-outline.svg │ ├── jargonaut-status-msg-symbolic.svg │ ├── jargonaut-status-normal-symbolic.svg │ ├── jargonaut-symbolic.svg │ └── jargonaut.svg └── jargonaut ├── jargonaut.ui ├── sample-conversation.html ├── shortcuts.ui ├── style.css └── webview.css /.github/workflows/build.yml: -------------------------------------------------------------------------------- 1 | name: Build 2 | 3 | on: 4 | push: 5 | branches: 6 | - master 7 | pull_request: 8 | branches: 9 | - master 10 | workflow_dispatch: 11 | inputs: 12 | debug_enabled: 13 | type: boolean 14 | description: 'Start an SSH server on failure.' 15 | required: false 16 | default: false 17 | 18 | jobs: 19 | build: 20 | uses: linuxmint/github-actions/.github/workflows/do-builds.yml@master 21 | with: 22 | commit_id: master 23 | ############################## Comma separated list - like 'linuxmint/xapp, linuxmint/cinnamon-desktop' 24 | dependencies: 25 | ############################## 26 | 27 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | debian/jargonaut/ 2 | debian/*debhelper* 3 | debian/files 4 | debian/*substvars* 5 | usr/share/jargonaut/jargonaut.ui~ -------------------------------------------------------------------------------- /COPYING: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 2, June 1991 3 | 4 | Copyright (C) 1989, 1991 Free Software Foundation, Inc., 5 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 6 | Everyone is permitted to copy and distribute verbatim copies 7 | of this license document, but changing it is not allowed. 8 | 9 | Preamble 10 | 11 | The licenses for most software are designed to take away your 12 | freedom to share and change it. By contrast, the GNU General Public 13 | License is intended to guarantee your freedom to share and change free 14 | software--to make sure the software is free for all its users. This 15 | General Public License applies to most of the Free Software 16 | Foundation's software and to any other program whose authors commit to 17 | using it. (Some other Free Software Foundation software is covered by 18 | the GNU Lesser General Public License instead.) You can apply it to 19 | your programs, too. 20 | 21 | When we speak of free software, we are referring to freedom, not 22 | price. Our General Public Licenses are designed to make sure that you 23 | have the freedom to distribute copies of free software (and charge for 24 | this service if you wish), that you receive source code or can get it 25 | if you want it, that you can change the software or use pieces of it 26 | in new free programs; and that you know you can do these things. 27 | 28 | To protect your rights, we need to make restrictions that forbid 29 | anyone to deny you these rights or to ask you to surrender the rights. 30 | These restrictions translate to certain responsibilities for you if you 31 | distribute copies of the software, or if you modify it. 32 | 33 | For example, if you distribute copies of such a program, whether 34 | gratis or for a fee, you must give the recipients all the rights that 35 | you have. You must make sure that they, too, receive or can get the 36 | source code. And you must show them these terms so they know their 37 | rights. 38 | 39 | We protect your rights with two steps: (1) copyright the software, and 40 | (2) offer you this license which gives you legal permission to copy, 41 | distribute and/or modify the software. 42 | 43 | Also, for each author's protection and ours, we want to make certain 44 | that everyone understands that there is no warranty for this free 45 | software. If the software is modified by someone else and passed on, we 46 | want its recipients to know that what they have is not the original, so 47 | that any problems introduced by others will not reflect on the original 48 | authors' reputations. 49 | 50 | Finally, any free program is threatened constantly by software 51 | patents. We wish to avoid the danger that redistributors of a free 52 | program will individually obtain patent licenses, in effect making the 53 | program proprietary. To prevent this, we have made it clear that any 54 | patent must be licensed for everyone's free use or not licensed at all. 55 | 56 | The precise terms and conditions for copying, distribution and 57 | modification follow. 58 | 59 | GNU GENERAL PUBLIC LICENSE 60 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 61 | 62 | 0. This License applies to any program or other work which contains 63 | a notice placed by the copyright holder saying it may be distributed 64 | under the terms of this General Public License. The "Program", below, 65 | refers to any such program or work, and a "work based on the Program" 66 | means either the Program or any derivative work under copyright law: 67 | that is to say, a work containing the Program or a portion of it, 68 | either verbatim or with modifications and/or translated into another 69 | language. (Hereinafter, translation is included without limitation in 70 | the term "modification".) Each licensee is addressed as "you". 71 | 72 | Activities other than copying, distribution and modification are not 73 | covered by this License; they are outside its scope. The act of 74 | running the Program is not restricted, and the output from the Program 75 | is covered only if its contents constitute a work based on the 76 | Program (independent of having been made by running the Program). 77 | Whether that is true depends on what the Program does. 78 | 79 | 1. You may copy and distribute verbatim copies of the Program's 80 | source code as you receive it, in any medium, provided that you 81 | conspicuously and appropriately publish on each copy an appropriate 82 | copyright notice and disclaimer of warranty; keep intact all the 83 | notices that refer to this License and to the absence of any warranty; 84 | and give any other recipients of the Program a copy of this License 85 | along with the Program. 86 | 87 | You may charge a fee for the physical act of transferring a copy, and 88 | you may at your option offer warranty protection in exchange for a fee. 89 | 90 | 2. You may modify your copy or copies of the Program or any portion 91 | of it, thus forming a work based on the Program, and copy and 92 | distribute such modifications or work under the terms of Section 1 93 | above, provided that you also meet all of these conditions: 94 | 95 | a) You must cause the modified files to carry prominent notices 96 | stating that you changed the files and the date of any change. 97 | 98 | b) You must cause any work that you distribute or publish, that in 99 | whole or in part contains or is derived from the Program or any 100 | part thereof, to be licensed as a whole at no charge to all third 101 | parties under the terms of this License. 102 | 103 | c) If the modified program normally reads commands interactively 104 | when run, you must cause it, when started running for such 105 | interactive use in the most ordinary way, to print or display an 106 | announcement including an appropriate copyright notice and a 107 | notice that there is no warranty (or else, saying that you provide 108 | a warranty) and that users may redistribute the program under 109 | these conditions, and telling the user how to view a copy of this 110 | License. (Exception: if the Program itself is interactive but 111 | does not normally print such an announcement, your work based on 112 | the Program is not required to print an announcement.) 113 | 114 | These requirements apply to the modified work as a whole. If 115 | identifiable sections of that work are not derived from the Program, 116 | and can be reasonably considered independent and separate works in 117 | themselves, then this License, and its terms, do not apply to those 118 | sections when you distribute them as separate works. But when you 119 | distribute the same sections as part of a whole which is a work based 120 | on the Program, the distribution of the whole must be on the terms of 121 | this License, whose permissions for other licensees extend to the 122 | entire whole, and thus to each and every part regardless of who wrote it. 123 | 124 | Thus, it is not the intent of this section to claim rights or contest 125 | your rights to work written entirely by you; rather, the intent is to 126 | exercise the right to control the distribution of derivative or 127 | collective works based on the Program. 128 | 129 | In addition, mere aggregation of another work not based on the Program 130 | with the Program (or with a work based on the Program) on a volume of 131 | a storage or distribution medium does not bring the other work under 132 | the scope of this License. 133 | 134 | 3. You may copy and distribute the Program (or a work based on it, 135 | under Section 2) in object code or executable form under the terms of 136 | Sections 1 and 2 above provided that you also do one of the following: 137 | 138 | a) Accompany it with the complete corresponding machine-readable 139 | source code, which must be distributed under the terms of Sections 140 | 1 and 2 above on a medium customarily used for software interchange; or, 141 | 142 | b) Accompany it with a written offer, valid for at least three 143 | years, to give any third party, for a charge no more than your 144 | cost of physically performing source distribution, a complete 145 | machine-readable copy of the corresponding source code, to be 146 | distributed under the terms of Sections 1 and 2 above on a medium 147 | customarily used for software interchange; or, 148 | 149 | c) Accompany it with the information you received as to the offer 150 | to distribute corresponding source code. (This alternative is 151 | allowed only for noncommercial distribution and only if you 152 | received the program in object code or executable form with such 153 | an offer, in accord with Subsection b above.) 154 | 155 | The source code for a work means the preferred form of the work for 156 | making modifications to it. For an executable work, complete source 157 | code means all the source code for all modules it contains, plus any 158 | associated interface definition files, plus the scripts used to 159 | control compilation and installation of the executable. However, as a 160 | special exception, the source code distributed need not include 161 | anything that is normally distributed (in either source or binary 162 | form) with the major components (compiler, kernel, and so on) of the 163 | operating system on which the executable runs, unless that component 164 | itself accompanies the executable. 165 | 166 | If distribution of executable or object code is made by offering 167 | access to copy from a designated place, then offering equivalent 168 | access to copy the source code from the same place counts as 169 | distribution of the source code, even though third parties are not 170 | compelled to copy the source along with the object code. 171 | 172 | 4. You may not copy, modify, sublicense, or distribute the Program 173 | except as expressly provided under this License. Any attempt 174 | otherwise to copy, modify, sublicense or distribute the Program is 175 | void, and will automatically terminate your rights under this License. 176 | However, parties who have received copies, or rights, from you under 177 | this License will not have their licenses terminated so long as such 178 | parties remain in full compliance. 179 | 180 | 5. You are not required to accept this License, since you have not 181 | signed it. However, nothing else grants you permission to modify or 182 | distribute the Program or its derivative works. These actions are 183 | prohibited by law if you do not accept this License. Therefore, by 184 | modifying or distributing the Program (or any work based on the 185 | Program), you indicate your acceptance of this License to do so, and 186 | all its terms and conditions for copying, distributing or modifying 187 | the Program or works based on it. 188 | 189 | 6. Each time you redistribute the Program (or any work based on the 190 | Program), the recipient automatically receives a license from the 191 | original licensor to copy, distribute or modify the Program subject to 192 | these terms and conditions. You may not impose any further 193 | restrictions on the recipients' exercise of the rights granted herein. 194 | You are not responsible for enforcing compliance by third parties to 195 | this License. 196 | 197 | 7. If, as a consequence of a court judgment or allegation of patent 198 | infringement or for any other reason (not limited to patent issues), 199 | conditions are imposed on you (whether by court order, agreement or 200 | otherwise) that contradict the conditions of this License, they do not 201 | excuse you from the conditions of this License. If you cannot 202 | distribute so as to satisfy simultaneously your obligations under this 203 | License and any other pertinent obligations, then as a consequence you 204 | may not distribute the Program at all. For example, if a patent 205 | license would not permit royalty-free redistribution of the Program by 206 | all those who receive copies directly or indirectly through you, then 207 | the only way you could satisfy both it and this License would be to 208 | refrain entirely from distribution of the Program. 209 | 210 | If any portion of this section is held invalid or unenforceable under 211 | any particular circumstance, the balance of the section is intended to 212 | apply and the section as a whole is intended to apply in other 213 | circumstances. 214 | 215 | It is not the purpose of this section to induce you to infringe any 216 | patents or other property right claims or to contest validity of any 217 | such claims; this section has the sole purpose of protecting the 218 | integrity of the free software distribution system, which is 219 | implemented by public license practices. Many people have made 220 | generous contributions to the wide range of software distributed 221 | through that system in reliance on consistent application of that 222 | system; it is up to the author/donor to decide if he or she is willing 223 | to distribute software through any other system and a licensee cannot 224 | impose that choice. 225 | 226 | This section is intended to make thoroughly clear what is believed to 227 | be a consequence of the rest of this License. 228 | 229 | 8. If the distribution and/or use of the Program is restricted in 230 | certain countries either by patents or by copyrighted interfaces, the 231 | original copyright holder who places the Program under this License 232 | may add an explicit geographical distribution limitation excluding 233 | those countries, so that distribution is permitted only in or among 234 | countries not thus excluded. In such case, this License incorporates 235 | the limitation as if written in the body of this License. 236 | 237 | 9. The Free Software Foundation may publish revised and/or new versions 238 | of the General Public License from time to time. Such new versions will 239 | be similar in spirit to the present version, but may differ in detail to 240 | address new problems or concerns. 241 | 242 | Each version is given a distinguishing version number. If the Program 243 | specifies a version number of this License which applies to it and "any 244 | later version", you have the option of following the terms and conditions 245 | either of that version or of any later version published by the Free 246 | Software Foundation. If the Program does not specify a version number of 247 | this License, you may choose any version ever published by the Free Software 248 | Foundation. 249 | 250 | 10. If you wish to incorporate parts of the Program into other free 251 | programs whose distribution conditions are different, write to the author 252 | to ask for permission. For software which is copyrighted by the Free 253 | Software Foundation, write to the Free Software Foundation; we sometimes 254 | make exceptions for this. Our decision will be guided by the two goals 255 | of preserving the free status of all derivatives of our free software and 256 | of promoting the sharing and reuse of software generally. 257 | 258 | NO WARRANTY 259 | 260 | 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY 261 | FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN 262 | OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES 263 | PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED 264 | OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 265 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS 266 | TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE 267 | PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, 268 | REPAIR OR CORRECTION. 269 | 270 | 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 271 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR 272 | REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, 273 | INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING 274 | OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED 275 | TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY 276 | YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER 277 | PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE 278 | POSSIBILITY OF SUCH DAMAGES. 279 | 280 | END OF TERMS AND CONDITIONS 281 | 282 | How to Apply These Terms to Your New Programs 283 | 284 | If you develop a new program, and you want it to be of the greatest 285 | possible use to the public, the best way to achieve this is to make it 286 | free software which everyone can redistribute and change under these terms. 287 | 288 | To do so, attach the following notices to the program. It is safest 289 | to attach them to the start of each source file to most effectively 290 | convey the exclusion of warranty; and each file should have at least 291 | the "copyright" line and a pointer to where the full notice is found. 292 | 293 | 294 | Copyright (C) 295 | 296 | This program is free software; you can redistribute it and/or modify 297 | it under the terms of the GNU General Public License as published by 298 | the Free Software Foundation; either version 2 of the License, or 299 | (at your option) any later version. 300 | 301 | This program is distributed in the hope that it will be useful, 302 | but WITHOUT ANY WARRANTY; without even the implied warranty of 303 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 304 | GNU General Public License for more details. 305 | 306 | You should have received a copy of the GNU General Public License along 307 | with this program; if not, write to the Free Software Foundation, Inc., 308 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 309 | 310 | Also add information on how to contact you by electronic and paper mail. 311 | 312 | If the program is interactive, make it output a short notice like this 313 | when it starts in an interactive mode: 314 | 315 | Gnomovision version 69, Copyright (C) year name of author 316 | Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 317 | This is free software, and you are welcome to redistribute it 318 | under certain conditions; type `show c' for details. 319 | 320 | The hypothetical commands `show w' and `show c' should show the appropriate 321 | parts of the General Public License. Of course, the commands you use may 322 | be called something other than `show w' and `show c'; they could even be 323 | mouse-clicks or menu items--whatever suits your program. 324 | 325 | You should also get your employer (if you work as a programmer) or your 326 | school, if any, to sign a "copyright disclaimer" for the program, if 327 | necessary. Here is a sample; alter the names: 328 | 329 | Yoyodyne, Inc., hereby disclaims all copyright interest in the program 330 | `Gnomovision' (which makes passes at compilers) written by James Hacker. 331 | 332 | , 1 April 1989 333 | Ty Coon, President of Vice 334 | 335 | This General Public License does not permit incorporating your program into 336 | proprietary programs. If your program is a subroutine library, you may 337 | consider it more useful to permit linking proprietary applications with the 338 | library. If this is what you want to do, use the GNU Lesser General 339 | Public License instead of this License. 340 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Jargonaut 2 | 3 | Jargonaut is an easy to use Chat Room application. 4 | 5 | It's an XAPP so it's designed to work on all Linux distributions and all desktop environments. 6 | 7 | Under the hood it uses IRC, though it makes no difference from a user point of view. It doesn't act as an IRC client, only a chat room application. 8 | 9 | # TODO 10 | 11 | ## ALPHA 12 | 13 | - Connect to multiple channels 14 | - support mono tags 15 | 16 | ## Integration 17 | 18 | - Check i18n 19 | - Set up translations 20 | - Document the project scope (this isn't meant to be a full IRC client) 21 | - decouple default settings from mint values 22 | - raise awareness that anything prior join isn't seen (i.e. noobs get the impression the room is dead), assistant 23 | - notifications shouldn't be HTML escaped 24 | 25 | # Security / Privacy / Moderation 26 | 27 | - disable thumbs by default 28 | - Filter unwanted words 29 | 30 | ## BETA 31 | 32 | - ability to ignore users (probably means we need a unique way of IDing them as well) 33 | - don't autoscroll if the scrolledview isn't at the bottom 34 | - improve autocompletion for nicknames (it should work when you say hi at least..) 35 | - wait for view to be loaded before autoscroll 36 | - make not quitting on window close optional 37 | 38 | ## Features relying on upload 39 | 40 | - Add inxi automation 41 | - Add img DND 42 | - Add buffer pastebin/imagebin 43 | 44 | ## Distant future 45 | 46 | - Show what happened before join(), via a logger/bot? 47 | - detect all caps message and suppress them 48 | - add a line to indicate where the last read message was 49 | -------------------------------------------------------------------------------- /data/jargonaut.desktop.in: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=Chat Room 3 | Comment=A place for users to help each other 4 | Keywords=irc;help;support;chat; 5 | Exec=jargonaut 6 | Icon=jargonaut 7 | Terminal=false 8 | Type=Application 9 | Encoding=UTF-8 10 | Categories=GTK;Network;IRCClient; 11 | StartupNotify=false 12 | -------------------------------------------------------------------------------- /data/meson.build: -------------------------------------------------------------------------------- 1 | i18n.merge_file( 2 | input: 'jargonaut.desktop.in', 3 | output: 'jargonaut.desktop', 4 | po_dir: podir, 5 | type: 'desktop', 6 | install: true, 7 | install_dir: datadir / 'applications', 8 | ) 9 | -------------------------------------------------------------------------------- /debian/changelog: -------------------------------------------------------------------------------- 1 | jargonaut (1.1.0) wilma; urgency=medium 2 | 3 | [ Clement Lefebvre ] 4 | * New layout 5 | * Fix calls to print_info 6 | * identification: Add more info to print_info 7 | 8 | [ Michael Webster ] 9 | * Layout improvements 10 | * Add timestamps 11 | * Report parts, joins, nick-changes. 12 | * Add github workflow. 13 | 14 | [ Clement Lefebvre ] 15 | * Simplify user list 16 | * Set the spell checker language to en_US 17 | * Make HW Acceleration configurable 18 | * Remove leftover code 19 | * Prefer light mode by default 20 | 21 | [ Michael Webster ] 22 | * Freeze message rendering while in scrollback. 23 | * Add 24h clock preference, restrict infobar to specific prefs. 24 | 25 | [ Clement Lefebvre ] 26 | * Fix typo 27 | * Update README 28 | 29 | -- Clement Lefebvre Tue, 23 Apr 2024 10:28:27 +0100 30 | 31 | jargonaut (1.0.9) virginia; urgency=medium 32 | 33 | * Fix notifications 34 | * Improve /me command 35 | * Update README 36 | * Disable HW acceleration policy 37 | * Notify when the window is not focused 38 | * CSS: Use media to support light/dark modes 39 | * Increase opacity on default tray icon 40 | * Update README 41 | * Support numpad Enter key 42 | * Add spell checking 43 | * Update README 44 | 45 | -- Clement Lefebvre Fri, 08 Mar 2024 15:05:12 +0000 46 | 47 | jargonaut (1.0.8) wilma; urgency=medium 48 | 49 | * Remove treeview 50 | * .gitignore: Add usr/share/jargonaut/jargonaut.ui~ 51 | * Update look and feel 52 | * Fine tune /me 53 | * Hide horizontal scrollbar 54 | * Add padding to the right 55 | * Recognize more image extensions 56 | * Improve thumbs and links 57 | * Update README 58 | * Add compatibility for Webkit2 4.0 59 | 60 | -- Clement Lefebvre Fri, 08 Mar 2024 00:13:53 +0000 61 | 62 | jargonaut (1.0.7) wilma; urgency=medium 63 | 64 | * Make highlight red and case-insensitive 65 | * Improve color palette 66 | * Sort user list alphabetically 67 | * Fix names handling 68 | * Specify a quit message 69 | * Use print_info vs print 70 | * Refactoring: Rename IRCApp 71 | * Refactoring: Use signals and move settings utility functions 72 | * Move basic UI parts to ui.py 73 | * Don't depend on libXapp 2.6 74 | * Ensure IRC callbacks run in the GTK thread 75 | * UI: Set the window icon name 76 | * Add a webkit view 77 | * Escape any tags coming from IRC and make links clickable 78 | * Replace img text with a thumbnail 79 | * Support /me commands 80 | * Add a tray icon 81 | * Add notifications 82 | * Add missing dep, sort imports 83 | * Add .gitignore 84 | * Update README 85 | 86 | -- Clement Lefebvre Thu, 07 Mar 2024 10:32:25 +0000 87 | 88 | jargonaut (1.0.6) wilma; urgency=medium 89 | 90 | * Right align user column 91 | * Style messages differently for self, highlights, repeats 92 | * Add support for Nickserv password 93 | * Update README 94 | 95 | -- Clement Lefebvre Sun, 03 Mar 2024 22:06:17 +0000 96 | 97 | jargonaut (1.0.5) wilma; urgency=medium 98 | 99 | * Handle rejected nicknames 100 | * Handle connection errors 101 | * Handle nick changes and quit events 102 | * Properly disconnect from the server 103 | * Update README 104 | 105 | -- Clement Lefebvre Sun, 03 Mar 2024 16:30:18 +0000 106 | 107 | jargonaut (1.0.4) wilma; urgency=medium 108 | 109 | * Add a fancy style in the headerbar 110 | * Add a sidebar for channels, help, rules, settings. 111 | * Implement menu 112 | * Add shortcuts.ui to makepot 113 | 114 | -- Clement Lefebvre Sun, 03 Mar 2024 14:25:56 +0000 115 | 116 | jargonaut (1.0.3) wilma; urgency=medium 117 | 118 | * Add keyboard shortcuts for text formatting 119 | * Move default values to gsettings 120 | * Add dark mode support 121 | * Update README 122 | * Fix deprecation warning 123 | * Change window subtitle 124 | * Center window 125 | * Use monospace font 126 | * Add missing import 127 | * Use a color palette 128 | * Disable debug info by default 129 | * Don't italicize the username 130 | * Use CSS for styling 131 | * Add a temporary icon 132 | * Fix category and keywords in desktop file 133 | 134 | -- Clement Lefebvre Sun, 03 Mar 2024 11:06:55 +0000 135 | 136 | jargonaut (1.0.2) wilma; urgency=medium 137 | 138 | * Fix TLS with Python 3.12 139 | * Fix wrong variable name 140 | * Rename connect() 141 | * Turn the App into a singleton 142 | * Fix GObject.idle_add deprecation 143 | * Add autocompletion 144 | * Fix userlist, add a user count 145 | * Update README 146 | 147 | -- Clement Lefebvre Sat, 02 Mar 2024 18:07:21 +0000 148 | 149 | jargonaut (1.0.1) wilma; urgency=medium 150 | 151 | * Update README 152 | * Don't allow empty messages to be sent 153 | * Autoscroll 154 | * Connect with TLS 155 | * Add a user list 156 | 157 | -- Clement Lefebvre Sat, 02 Mar 2024 01:22:13 +0000 158 | 159 | jargonaut (1.0.0) wilma; urgency=medium 160 | 161 | * Initial version 162 | 163 | -- Clement Lefebvre Fri, 01 Mar 2024 22:36:00 -0000 164 | -------------------------------------------------------------------------------- /debian/compat: -------------------------------------------------------------------------------- 1 | 11 -------------------------------------------------------------------------------- /debian/control: -------------------------------------------------------------------------------- 1 | Source: jargonaut 2 | Section: x11 3 | Priority: optional 4 | Maintainer: Linux Mint 5 | Build-Depends: 6 | debhelper (>= 9), 7 | dh-python 8 | Standards-Version: 3.9.5 9 | 10 | Package: jargonaut 11 | Architecture: all 12 | Depends: 13 | gir1.2-glib-2.0, 14 | gir1.2-gtk-3.0 (>= 3.22.0), 15 | gir1.2-notify-0.7, 16 | gir1.2-xapp-1.0, 17 | gir1.2-webkit2-4.1 | gir1.2-webkit2-4.0, 18 | gir1.2-gspell-1, 19 | python3-irc, 20 | ${misc:Depends}, 21 | ${python3:Depends} 22 | Description: Chat Room application 23 | An easy to use chat room application. 24 | -------------------------------------------------------------------------------- /debian/install: -------------------------------------------------------------------------------- 1 | usr/ 2 | -------------------------------------------------------------------------------- /debian/rules: -------------------------------------------------------------------------------- 1 | #!/usr/bin/make -f 2 | 3 | DEB_VERSION := $(shell dpkg-parsechangelog | egrep '^Version:' | cut -f 2 -d ' ') 4 | 5 | %: 6 | dh $@ --with=python3 7 | 8 | # Inject version number in the code 9 | override_dh_installdeb: 10 | dh_installdeb 11 | for pkg in $$(dh_listpackages -i); do \ 12 | find debian/$$pkg -type f -exec sed -i -e s/__DEB_VERSION__/$(DEB_VERSION)/g {} +; \ 13 | done 14 | -------------------------------------------------------------------------------- /makepot: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | intltool-extract --type=gettext/glade usr/share/jargonaut/jargonaut.ui 3 | intltool-extract --type=gettext/glade usr/share/jargonaut/shortcuts.ui 4 | xgettext --language=Python -cTRANSLATORS --keyword=_ --keyword=N_ --output=jargonaut.pot usr/lib/jargonaut/*.py usr/bin/* usr/share/jargonaut/*.ui.h 5 | rm -f usr/share/jargonaut/*.ui.h 6 | -------------------------------------------------------------------------------- /meson.build: -------------------------------------------------------------------------------- 1 | project('jargonaut', version : '1.1.0') 2 | 3 | i18n = import('i18n') 4 | 5 | gettext_package = meson.project_name() 6 | 7 | prefix = get_option('prefix') 8 | datadir = get_option('datadir') 9 | 10 | podir = meson.source_root() / 'po' 11 | 12 | subdir('data') 13 | subdir('po') 14 | -------------------------------------------------------------------------------- /po/LINGUAS: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /po/meson.build: -------------------------------------------------------------------------------- 1 | i18n.gettext(gettext_package, 2 | preset: 'glib' 3 | ) 4 | -------------------------------------------------------------------------------- /test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | sudo rm -rf /usr/lib/jargonaut 4 | sudo rm -rf /usr/share/jargonaut 5 | sudo cp -R usr / 6 | sudo glib-compile-schemas /usr/share/glib-2.0/schemas 7 | 8 | jargonaut 9 | -------------------------------------------------------------------------------- /usr/bin/jargonaut: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | /usr/lib/jargonaut/jargonaut.py $* 4 | -------------------------------------------------------------------------------- /usr/lib/jargonaut/jargonaut.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python3 2 | 3 | import gi 4 | gi.require_version('Gtk', '3.0') 5 | gi.require_version('Gspell', '1') 6 | gi.require_version('Notify', '0.7') 7 | try: 8 | gi.require_version('WebKit2', '4.1') 9 | except: 10 | gi.require_version('WebKit2', '4.0') 11 | gi.require_version('XApp', '1.0') 12 | from gi.repository import Gtk, Gio, GLib, Gdk, Notify, WebKit2, XApp, Gspell 13 | import irc.client 14 | import getpass 15 | import gettext 16 | import html 17 | import locale 18 | import os 19 | import random 20 | import re 21 | import setproctitle 22 | import ssl 23 | import webbrowser 24 | from irc.connection import Factory 25 | from settings import bind_entry_widget, bind_switch_widget 26 | from ui import build_menu, idle, _async, color_palette, format_timespan, get_span_minutes 27 | 28 | # i18n 29 | APP = "jargonaut" 30 | LOCALE_DIR = "/usr/share/locale" 31 | locale.bindtextdomain(APP, LOCALE_DIR) 32 | gettext.bindtextdomain(APP, LOCALE_DIR) 33 | gettext.textdomain(APP) 34 | _ = gettext.gettext 35 | 36 | setproctitle.setproctitle("jargonaut") 37 | Notify.init(_("Chat Room")) 38 | 39 | class Message(): 40 | def __init__(self, nick, text, action=None, old_nick=None, separator=False): 41 | self.nick = nick 42 | self.text = text 43 | self.time = GLib.DateTime.new_now_local() 44 | self.action = action 45 | self.old_nick = old_nick 46 | self.separator = separator 47 | 48 | class App(Gtk.Application): 49 | def __init__(self): 50 | super().__init__(application_id="org.x.jargonaut") 51 | self.window = None 52 | 53 | def do_activate(self): 54 | # If the window already exists, present it to the user 55 | if self.window is not None: 56 | self.window.present() 57 | return 58 | 59 | self.is_connected = False 60 | self.user_colors = {} 61 | self.color_index = 0 62 | 63 | self.settings = Gio.Settings(schema="org.x.jargonaut") 64 | self.channel = self.settings.get_string("channel") 65 | self.server = self.settings.get_string("server") 66 | self.port = self.settings.get_int("port") 67 | self.tls = self.settings.get_boolean("tls-connection") 68 | self.nickname = self.get_new_nickname() 69 | 70 | self.channel_users = {} 71 | self.channel_users[self.channel] = [] 72 | self.messages = [] 73 | self.n_real_messages = 0 74 | self.scrollback_queue_start_count = 0 75 | self.separator_message = None 76 | 77 | prefer_dark_mode = self.settings.get_boolean("prefer-dark-mode") 78 | try: 79 | # DarkModeManager is available in XApp 2.6+ 80 | self.dark_mode_manager = XApp.DarkModeManager.new(prefer_dark_mode) 81 | except: 82 | print("XAppDarkModeManager not available, using Gtk.Settings") 83 | # Use the Gtk.Settings API as a fallback for older versions 84 | Gtk.Settings.get_default().set_property("gtk-application-prefer-dark-theme", prefer_dark_mode) 85 | 86 | self.last_key_press_is_tab = False 87 | self.last_message_nick = "" 88 | 89 | self.builder = Gtk.Builder() 90 | self.builder.add_from_file("/usr/share/jargonaut/jargonaut.ui") 91 | self.window = self.builder.get_object("main_window") 92 | self.window.set_application(self) 93 | self.window.connect("delete_event", self.close_window) 94 | self.window.show() 95 | 96 | css_provider = Gtk.CssProvider() 97 | css_provider.load_from_path("/usr/share/jargonaut/style.css") 98 | Gtk.StyleContext.add_provider_for_screen( 99 | Gdk.Screen.get_default(), 100 | css_provider, 101 | Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION 102 | ) 103 | 104 | # Users button 105 | self.builder.get_object("users_button").connect("clicked", self.on_users_button_clicked) 106 | self.builder.get_object("back_button").connect("clicked", self.on_back_button_clicked) 107 | 108 | # Tray 109 | menu = Gtk.Menu() 110 | image = Gtk.Image.new_from_icon_name("application-exit-symbolic", Gtk.IconSize.MENU) 111 | menuItem = Gtk.ImageMenuItem(label=_("Quit"), image=image) 112 | menuItem.connect('activate', self.on_tray_quit) 113 | menu.append(menuItem) 114 | menu.show_all() 115 | self.tray = XApp.StatusIcon() 116 | self.tray.set_secondary_menu(menu) 117 | self.tray.set_icon_name("jargonaut-status-normal-symbolic") 118 | self.tray.set_tooltip_text(_("Chat Room")) 119 | self.tray.set_visible(True) 120 | self.tray.connect('activate', self.on_tray_activated) 121 | 122 | # Menubar 123 | menu = self.builder.get_object("main_menu") 124 | build_menu(self, self.window, menu) 125 | 126 | self.main_stack = self.builder.get_object("main_stack") 127 | 128 | # Settings widgets 129 | 130 | bind_switch_widget(self.builder.get_object("pref_dark"), self.settings, "prefer-dark-mode", fn_callback=self.update_dark_mode) 131 | bind_switch_widget(self.builder.get_object("pref_24h"), self.settings, "timestamp-24h", fn_callback=self.update_timestamp_format) 132 | 133 | bind_entry_widget(self.builder.get_object("pref_nickname"), self.settings, "nickname", fn_callback=self.show_restart_infobar) 134 | bind_entry_widget(self.builder.get_object("pref_password"), self.settings, "password", fn_callback=self.show_restart_infobar), 135 | bind_switch_widget(self.builder.get_object("pref_acceleration"), self.settings, "hw-acceleration", fn_callback=self.update_hw_acceleration) 136 | 137 | self.webview = WebKit2.WebView() 138 | self.update_hw_acceleration(self.settings.get_boolean("hw-acceleration")) 139 | self.webview.connect("decide-policy", self.on_decide_policy) 140 | self.webview.show() 141 | self.render_html() 142 | 143 | self.builder.get_object("webview_box").pack_start(self.webview, True, True, 0) 144 | 145 | self.scrollback_return_button = self.builder.get_object("scrollback_return_button") 146 | self.scrollback_return_button.connect("clicked", self.on_scrollback_return_button_clicked) 147 | 148 | self.user_treeview = self.builder.get_object("treeview_users") 149 | self.user_store = Gtk.ListStore(str, str) # nick, raw_nick 150 | self.user_treeview.set_model(self.user_store) 151 | self.user_store.set_sort_column_id(1, Gtk.SortType.ASCENDING) 152 | 153 | self.user_list_box = self.builder.get_object("user_list_box") 154 | self.user_list_box.set_visible(self.settings.get_boolean("user-list-visible")) 155 | self.current_paned_position = 0 156 | 157 | 158 | self.chat_paned = self.builder.get_object("chat_paned") 159 | 160 | completion = Gtk.EntryCompletion() 161 | completion.set_model(self.user_store) 162 | completion.set_text_column(1) 163 | completion.set_inline_completion(True) 164 | completion.set_popup_completion(True) 165 | 166 | self.entry = self.builder.get_object("entry_main") 167 | self.entry.set_completion(completion) 168 | self.entry.connect("key-press-event", self.on_key_press_event) 169 | 170 | checker = Gspell.Checker() 171 | language = Gspell.Language.lookup("en_US") 172 | checker.set_language(language) 173 | buffer = Gspell.EntryBuffer.get_from_gtk_entry_buffer(self.entry.get_buffer()) 174 | buffer.set_spell_checker(checker) 175 | gspell_entry = Gspell.Entry.get_from_gtk_entry(self.entry) 176 | gspell_entry.set_inline_spell_checking(True) 177 | 178 | renderer = Gtk.CellRendererText() 179 | col = Gtk.TreeViewColumn("Users", renderer, markup=0) 180 | self.user_treeview.append_column(col) 181 | 182 | self.assign_color(self.nickname) 183 | self.builder.get_object("label_username").set_markup(self.nickname) 184 | 185 | self.client = irc.client.SimpleIRCClient() 186 | self.client.connection.add_global_handler("welcome", self.on_welcome) 187 | self.client.connection.add_global_handler("join", self.on_join) 188 | self.client.connection.add_global_handler("namreply", self.on_namreply) 189 | self.client.connection.add_global_handler("notice", self.on_notice) 190 | self.client.connection.add_global_handler("nick", self.on_nick) 191 | self.client.connection.add_global_handler("quit", self.on_quit) 192 | self.client.connection.add_global_handler("part", self.on_part) 193 | self.client.connection.add_global_handler("all_raw_messages", self.on_all_raw_messages) 194 | self.client.connection.add_global_handler("pubmsg", self.on_pubmsg) 195 | self.client.connection.add_global_handler("erroneusnickname", self.on_erroneusnickname) 196 | self.client.connection.add_global_handler("disconnect", self.on_disconnect) 197 | self.client.connection.add_global_handler("error", self.on_error) 198 | self.client.connection.add_global_handler("nicknameinuse", self.on_nicknameinuse) 199 | 200 | if os.environ.get("JARGONAUT_NO_SERVER_TEST", False): 201 | self.main_stack.set_visible_child_name("page_chat") 202 | else: 203 | self.connect_to_server() 204 | 205 | ######################### 206 | # Nickname/user functions 207 | ######################### 208 | 209 | def assign_color(self, nick): 210 | if nick not in self.user_colors.keys(): 211 | color = color_palette[self.color_index] 212 | print(f"Assigning color {color} to {nick}") 213 | self.user_colors[nick] = color 214 | self.color_index = (self.color_index + 1) % len(color_palette) 215 | 216 | def get_nick_markup(self, nick): 217 | color = self.user_colors[nick] 218 | nick = f"{nick}" 219 | return nick 220 | 221 | def get_new_nickname(self, with_random_suffix=False): 222 | if self.settings.get_string("nickname") != "": 223 | prefix = self.settings.get_string("nickname") 224 | else: 225 | prefix = getpass.getuser() 226 | if with_random_suffix: 227 | prefix = prefix[:13] # 13 chars max + 3 chars for suffix 228 | suffix = '{:02x}'.format(random.randint(0, 255)) 229 | return f"{prefix}_{suffix}" 230 | else: 231 | return prefix[:16] # 16 chars max 232 | 233 | ##################### 234 | # IRC commands 235 | ##################### 236 | 237 | @_async 238 | def connect_to_server(self): 239 | try: 240 | if self.tls: 241 | context = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT) 242 | context.check_hostname = False 243 | context.verify_mode = ssl.CERT_NONE 244 | factory = Factory(wrapper=context.wrap_socket) 245 | self.client.connect(self.settings.get_string("server"), 246 | self.settings.get_int("port"), 247 | self.nickname, connect_factory=factory) 248 | else: 249 | self.client.connect(self.settings.get_string("server"), 250 | self.settings.get_int("port"), 251 | self.nickname) 252 | self.is_connected = True 253 | self.client.start() 254 | except Exception as e: 255 | self.show_error_status("dialog-error-symbolic", _("Error"), str(e)) 256 | 257 | @_async 258 | def join_channels(self, connection): 259 | connection.join(self.channel) 260 | connection.names([self.channel]) 261 | 262 | @_async 263 | def identify(self, connection): 264 | username = self.settings.get_string("nickname") 265 | password = self.settings.get_string("password") 266 | if username != "" and password != "": 267 | self.print_info(f"Identifying as {username}...") 268 | connection.privmsg("Nickserv", f"IDENTIFY {username} {password}") 269 | 270 | @_async 271 | def send_message(self, message): 272 | message = message.replace('\x16', '\x1D') 273 | self.client.connection.privmsg(self.channel, message) 274 | 275 | @_async 276 | def disconnect(self): 277 | try: 278 | self.client.connection.disconnect(message=_("Jargonaut signing out!")) 279 | except Exception as e: 280 | print(e) 281 | 282 | ##################### 283 | # IRC signal handlers 284 | ##################### 285 | 286 | @idle 287 | def on_welcome(self, connection, event): 288 | self.join_channels(connection) 289 | 290 | @idle 291 | def on_join(self, connection, event): 292 | self.print_info(f"Joined channel: target={event.target} source={event.source}") 293 | nick = event.source.nick 294 | channel = event.target 295 | if nick not in self.channel_users[channel]: 296 | self.assign_color(nick) 297 | self.channel_users[channel].append(nick) 298 | self.update_users() 299 | if nick == self.nickname: 300 | self.builder.get_object("main_stack").set_visible_child_name("page_chat") 301 | self.entry.grab_focus() 302 | self.identify(connection) 303 | else: 304 | message = Message(nick, None, "join") 305 | self.messages.append(message) 306 | self.render_html() 307 | 308 | @idle 309 | def on_namreply(self, connection, event): 310 | channel = event.arguments[1] 311 | users = event.arguments[2].split() 312 | for user in users: 313 | for character in ["~", "&", "@", "%", "+"]: 314 | if user.startswith(character): 315 | user = user[1:] 316 | break 317 | self.assign_color(user) 318 | if not user in self.channel_users[channel]: 319 | self.channel_users[channel].append(user) 320 | self.update_users() 321 | 322 | @idle 323 | def on_notice(self, connection, event): 324 | self.print_info("Notice: " + event.source + " " + event.arguments[0]) 325 | 326 | @idle 327 | def on_nick(self, connection, event): 328 | self.print_info(f"Nick: target={event.target} source={event.source}") 329 | old_nick = event.source.nick 330 | new_nick = event.target 331 | if old_nick in self.channel_users[self.channel]: 332 | self.channel_users[self.channel].remove(old_nick) 333 | if not new_nick in self.channel_users[self.channel]: 334 | self.channel_users[self.channel].append(new_nick) 335 | if not new_nick in self.user_colors.keys(): 336 | self.assign_color(new_nick) 337 | if old_nick == self.nickname: 338 | self.nickname = new_nick 339 | self.builder.get_object("label_username").set_markup(new_nick) 340 | self.update_users() 341 | 342 | if new_nick != self.nickname: 343 | message = Message(new_nick, None, "nick", event.source.nick) 344 | self.messages.append(message) 345 | self.render_html() 346 | 347 | @idle 348 | def on_quit(self, connection, event): 349 | self.print_info(f"Quit: target={event.target} source={event.source}") 350 | nick = event.source.nick 351 | channel = event.target 352 | if nick in self.channel_users[self.channel]: 353 | self.channel_users[self.channel].remove(nick) 354 | self.update_users() 355 | 356 | if nick != self.nickname: 357 | message = Message(nick, None, "quit") 358 | self.messages.append(message) 359 | self.render_html() 360 | 361 | @idle 362 | def on_part(self, connection, event): 363 | self.print_info(f"Part: target={event.target} source={event.source}") 364 | nick = event.source.nick 365 | channel = event.target 366 | if nick in self.channel_users[channel]: 367 | self.channel_users[channel].remove(nick) 368 | self.update_users() 369 | 370 | if nick != self.nickname: 371 | message = Message(nick, None, "quit") 372 | self.messages.append(message) 373 | self.render_html() 374 | 375 | @idle 376 | def on_all_raw_messages(self, connection, event): 377 | if self.settings.get_boolean("debug"): 378 | content = str(event.arguments) 379 | self.print_info("Raw message: " + content) 380 | # Actions (i.e. /me commands) are not received as PRIVMSGS or PUBMSGS 381 | # only as RAW messages, so we need to handle them here 382 | if f"PRIVMSG {self.channel}" in content: 383 | if "\\x01ACTION" in content: 384 | nick = content.split("!")[0].split(":")[1] 385 | text = content.split("\\x01ACTION")[1].split("\\x01")[0] 386 | text = f"\x01ACTION{text}\x01" 387 | self.print_message(nick, text) 388 | 389 | @idle 390 | def on_pubmsg(self, connection, event): 391 | nick = event.source.split('!')[0] 392 | message = event.arguments[0] 393 | self.print_message(nick, message) 394 | 395 | @idle 396 | def on_erroneusnickname(self, connection, event): 397 | self.print_info("Invalid nickname: %s" % event.arguments[0]) 398 | self.show_error_status("dialog-error-symbolic", _("Invalid nickname"), _("Your nickname was rejected. Restart the application to reset it.")) 399 | self.settings.set_string("nickname", "") 400 | 401 | @idle 402 | def on_disconnect(self, connection, event): 403 | self.print_info("Disconnected from server: %s" % event.target) 404 | self.show_error_status("dialog-error-symbolic", _("Disconnected"), _("You have been disconnected from the server. Please try to reconnect.")) 405 | 406 | @idle 407 | def on_error(self, connection, event): 408 | self.print_info("Error from server: %s" % event.arguments[0]) 409 | self.show_error_status("dialog-error-symbolic", _("Error"), _("An error occurred: ") + event.arguments[0]) 410 | 411 | @idle 412 | def on_nicknameinuse(self, connection, event): 413 | self.nickname = self.get_new_nickname(with_random_suffix=True) 414 | self.assign_color(self.nickname) 415 | connection.nick(self.nickname) 416 | self.print_info(f"Nickname in use, switching to '{self.nickname}'") 417 | self.builder.get_object("label_username").set_markup(self.nickname) 418 | 419 | ################## 420 | # UI IRC functions 421 | ################## 422 | 423 | def render_if_current(self): 424 | script = """ 425 | ({ 426 | page_height: document.body.scrollHeight, 427 | current_position: document.body.scrollTop, 428 | viewport_height: window.innerHeight 429 | }); 430 | """ 431 | self.webview.evaluate_javascript(script, -1, None, None, None, self.on_position_query_finished) 432 | 433 | def on_position_query_finished(self, webview, result, user_data=None): 434 | jscvalue = webview.evaluate_javascript_finish(result) 435 | if jscvalue is not None and jscvalue.is_object(): 436 | page_height = jscvalue.object_get_property("page_height").to_double() 437 | current_position = jscvalue.object_get_property("current_position").to_double() 438 | viewport_height = jscvalue.object_get_property("viewport_height").to_double() 439 | 440 | if current_position + viewport_height >= page_height - 10: 441 | self.scrollback_return_button.hide() 442 | self.scrollback_queue_start_count = 0 443 | self._real_render_html() 444 | else: 445 | if self.scrollback_queue_start_count == 0 and self.messages[-1].action is None: 446 | self.scrollback_queue_start_count = self.n_real_messages - 1 447 | 448 | if self.separator_message is not None: 449 | self.messages.remove(self.separator_message) 450 | 451 | message = Message(None, None, separator=True) 452 | # We're already handling a message (which was already appended), 453 | # place this before it. 454 | self.messages.insert(-1, message) 455 | self.separator_message = message 456 | 457 | queued_count = self.n_real_messages - self.scrollback_queue_start_count 458 | if queued_count > 0: 459 | self.scrollback_return_button.show() 460 | button_text = gettext.ngettext(_("%d new message"), _("%d new messages"), queued_count) % (queued_count) 461 | self.scrollback_return_button.set_label(button_text) 462 | 463 | def render_html(self): 464 | self.render_if_current() 465 | 466 | def _real_render_html(self): 467 | messages_section = "
" 468 | last_nick = "" 469 | last_message_time = None 470 | minutes_since_previous_message = 0 471 | for message in self.messages: 472 | if last_message_time is not None: 473 | minutes_since_previous_message = get_span_minutes(message.time, last_message_time) 474 | last_message_time = message.time 475 | date = format_timespan(message.time, self.settings.get_boolean("timestamp-24h")) 476 | mine = "" 477 | response = "" 478 | nickname = message.nick 479 | 480 | if message.text is not None: 481 | text = message.text 482 | words = text.lower().split(" ") 483 | if text.startswith("\x01ACTION") and text.endswith("\x01"): 484 | text = text.replace("\x01ACTION", "").replace("\x01", "") 485 | text = f"<-- {text}" 486 | if message.nick == self.nickname: 487 | mine = "mine" 488 | elif self.nickname.lower() in words or (self.nickname+":").lower() in words or ("@"+self.nickname).lower() in words: 489 | response = "response" 490 | 491 | if message.action is not None: 492 | if message.action == "join": 493 | action_message = _(f"{nickname} joined the channel") 494 | elif message.action == "quit": 495 | action_message = _(f"{nickname} left the channel") 496 | elif message.action == "nick": 497 | action_message = _(f"{message.old_nick} is now {nickname}") 498 | 499 | messages_section += f""" 500 |
501 |
{action_message}
502 |
503 | """ 504 | elif message.separator: 505 | messages_section += f""" 506 |
507 | """ 508 | elif message.nick == last_nick and minutes_since_previous_message < 5: 509 | messages_section += f""" 510 |
{text}
511 | """ 512 | else: 513 | letter = nickname[0].upper() 514 | color = self.user_colors[nickname] 515 | messages_section += f""" 516 |
517 |
518 | {letter} 519 |
{nickname}{date}
520 |
{text}
521 | """ 522 | # ignore parts/joins with respect to chat continuity 523 | if message.action is None and not message.separator: 524 | last_nick = message.nick 525 | 526 | html = f""" 527 | 528 | 529 | 530 | 531 | 532 | {messages_section} 533 |
534 | 537 | 538 | 539 | """ 540 | 541 | self.webview.load_html(html, "file:///usr/share/jargonaut/") 542 | 543 | @idle 544 | def print_message(self, nick, text): 545 | # Escape any tags, i.e. show exactly what people typed, don't let Webkit interpret it. 546 | text = html.escape(text) 547 | # Format text (IRC codes -> pango/HTML) 548 | text = re.sub(r'\x02(.*?)\x02', r'\1', text) 549 | text = re.sub(r'\x16(.*?)\x16', r'\1', text) 550 | text = re.sub(r'\x1D(.*?)\x1D', r'\1', text) 551 | text = re.sub(r'\x1F(.*?)\x1F', r'\1', text) 552 | text = re.sub(r'\x1E(.*?)\x1E', r'\1', text) 553 | # Convert URLs to clickable links 554 | url_pattern = r'((http[s]?://[^\s]{3,}\.[^\s]{2,}))' 555 | def repl(match): 556 | url = match.group(1) 557 | if url.lower().endswith(('.png', '.jpg', '.jpeg', '.gif', '.svg', '.bmp', '.webp')): 558 | return f'' 559 | else: 560 | return f'{url}' 561 | text = re.sub(url_pattern, repl, text) 562 | 563 | message = Message(nick, text) 564 | self.messages.append(message) 565 | self.n_real_messages += 1 566 | self.render_html() 567 | self.last_message_nick = nick 568 | 569 | words = text.lower().split(" ") 570 | if self.nickname.lower() in words or (self.nickname+":").lower() in words or ("@"+self.nickname).lower() in words: 571 | if not self.is_window_focused(): 572 | self.tray.set_icon_name("jargonaut-status-msg-symbolic") 573 | title = _("Message from %s") % message.nick 574 | self.send_notification(title, text) 575 | 576 | @idle 577 | def update_users(self): 578 | self.user_store.clear() 579 | users = self.channel_users[self.channel] 580 | self.builder.get_object("users_label").set_text(str(len(users))) 581 | for user in users: 582 | self.user_store.append([self.get_nick_markup(user), user]) 583 | 584 | @idle 585 | def print_info(self, message): 586 | print("Info: " + message) 587 | 588 | @idle 589 | def show_error_status(self, icon_name, message, details): 590 | self.builder.get_object("main_stack").set_visible_child_name("page_status") 591 | self.builder.get_object("status_icon").set_from_icon_name(icon_name, Gtk.IconSize.DIALOG) 592 | self.builder.get_object("status_label").set_text(message) 593 | self.builder.get_object("status_details").set_text(details) 594 | 595 | ############### 596 | # App functions 597 | ############### 598 | 599 | def on_decide_policy(self, view, decision, decision_type): 600 | if decision_type == WebKit2.PolicyDecisionType.NAVIGATION_ACTION: 601 | navigation_action = decision.get_navigation_action() 602 | if navigation_action.get_mouse_button() == 0: 603 | return False 604 | uri = decision.get_request().get_uri() 605 | webbrowser.open(uri) 606 | decision.ignore() 607 | return True 608 | return False 609 | 610 | def on_scrollback_return_button_clicked(self, widget): 611 | self.scrollback_return_button.hide() 612 | self.scrollback_queue_start_count = 0 613 | self._real_render_html() 614 | 615 | def close_window(self, window, event): 616 | window.hide() 617 | return True 618 | 619 | def send_notification(self, title, text): 620 | # We use self.notification (instead of just a variable) to keep a memory pointer 621 | # on the notification. Without doing this, callbacks are never executed by Gtk/Notify. 622 | self.notification = Notify.Notification.new(title, text, "jargonaut-status-msg-symbolic") 623 | self.notification.set_urgency(2) 624 | self.notification.set_timeout(Notify.EXPIRES_NEVER) 625 | self.notification.connect("closed", self.on_notification_closed) 626 | self.notification.show() 627 | 628 | def on_notification_closed(self, notification): 629 | self.tray.set_icon_name("jargonaut-status-normal-symbolic") 630 | self.window.show() 631 | self.window.present() 632 | 633 | def on_tray_quit(self, widget): 634 | self.quit() 635 | 636 | def is_window_focused(self): 637 | focused = False 638 | try: 639 | focused = self.window.get_window().get_state() & Gdk.WindowState.FOCUSED 640 | except: 641 | focused = self.window.is_active() and self.window.get_visible() 642 | return focused 643 | 644 | def on_back_button_clicked(self, widget): 645 | self.builder.get_object("main_stack").set_visible_child_name("page_chat") 646 | self.builder.get_object("back_button").set_visible(False) 647 | self.entry.grab_focus() 648 | 649 | def on_users_button_clicked(self, widget): 650 | visible = self.user_list_box.get_visible() 651 | self.settings.set_boolean("user-list-visible", not visible) 652 | self.user_list_box.set_visible(not visible) 653 | 654 | def on_tray_activated(self, icon, button, time): 655 | if button == Gdk.BUTTON_PRIMARY: 656 | self.tray.set_icon_name("jargonaut-status-normal-symbolic") 657 | if self.is_window_focused(): 658 | self.window.hide() 659 | else: 660 | self.window.show() 661 | self.window.present_with_time(time) 662 | 663 | def update_hw_acceleration(self, active): 664 | settings = self.webview.get_settings() 665 | if active: 666 | policy = WebKit2.HardwareAccelerationPolicy.ALWAYS 667 | else: 668 | policy = WebKit2.HardwareAccelerationPolicy.NEVER 669 | settings.set_hardware_acceleration_policy(policy) 670 | self.show_restart_infobar() 671 | 672 | @idle 673 | def update_dark_mode(self, active): 674 | Gtk.Settings.get_default().set_property("gtk-application-prefer-dark-theme", active) 675 | 676 | def update_timestamp_format(self, active): 677 | self.render_html() 678 | 679 | def show_restart_infobar(self, *args, **kargs): 680 | # avoid showing the info bar during init 681 | if self.main_stack.get_visible_child_name() != "page_settings": 682 | return 683 | 684 | self.builder.get_object("prefs_restart_infobar").show() 685 | 686 | def on_key_press_event(self, widget, event): 687 | keyname = Gdk.keyval_name(event.keyval) 688 | ctrl = (event.state & Gdk.ModifierType.CONTROL_MASK) 689 | position = widget.get_position() 690 | text = widget.get_text() 691 | if keyname == "Tab": 692 | if " " in text: 693 | return True 694 | if text == "": 695 | return True 696 | completion = widget.get_completion() 697 | model = completion.get_model() 698 | if len(model) > 0: 699 | num_matches = 0 700 | for row in model: 701 | if row[1].startswith(text): 702 | num_matches += 1 703 | if num_matches > 0: 704 | # Adding prefix 705 | completion.insert_prefix() 706 | if num_matches == 1: 707 | # Adding suffix (cause single match) 708 | widget.set_text(text + ": ") 709 | elif self.last_key_press_is_tab: 710 | # Adding suffix (cause double tab) 711 | widget.set_text(text + ": ") 712 | widget.set_position(-1) 713 | self.last_key_press_is_tab = True 714 | return True # Stop propagation of the event 715 | else: 716 | self.last_key_press_is_tab = False 717 | if keyname == "Return" or keyname == "KP_Enter": 718 | message = text.strip() 719 | if message != "": 720 | completion = widget.get_completion() 721 | widget.set_completion(None) 722 | widget.set_text("") 723 | widget.set_completion(completion) 724 | if message.startswith("/me "): 725 | local_msg = message.replace("/me ", self.nickname + " ", 1) 726 | remote_msg = message.replace("/me ", " ", 1) 727 | remote_msg = f"\x01ACTION{remote_msg}\x01" 728 | self.print_message(self.nickname, local_msg) 729 | self.send_message(remote_msg) 730 | else: 731 | self.print_message(self.nickname, message) 732 | self.send_message(message) 733 | 734 | return True 735 | elif ctrl and keyname == "b": 736 | widget.set_text(text + "\x02") 737 | widget.set_position(position + 1) 738 | return True 739 | elif ctrl and keyname == "i": 740 | # This should be \x1D but Gtk.Entry won't accept it 741 | # so we use \x16 instead and we replace it when sending 742 | # the message 743 | widget.set_text(text + "\x16") 744 | widget.set_position(position + 1) 745 | return True 746 | elif ctrl and keyname == "u": 747 | widget.set_text(text + "\x1F") 748 | widget.set_position(position + 1) 749 | return True 750 | elif ctrl and keyname == "s": 751 | widget.set_text(text + "\x1E") 752 | widget.set_position(position + 1) 753 | return True 754 | 755 | return False 756 | 757 | def do_startup(self): 758 | Gtk.Application.do_startup(self) 759 | 760 | def do_shutdown(self): 761 | if self.is_connected: 762 | self.disconnect() 763 | 764 | Gtk.Application.do_shutdown(self) 765 | 766 | app = App() 767 | app.run() -------------------------------------------------------------------------------- /usr/lib/jargonaut/settings.py: -------------------------------------------------------------------------------- 1 | def bind_entry_widget(widget, settings, key, fn_callback=None): 2 | widget.set_text(settings.get_string(key)) 3 | widget.connect("changed", on_bound_entry_changed, settings, key, fn_callback) 4 | return widget 5 | 6 | def bind_switch_widget(widget, settings, key, fn_callback=None): 7 | widget.set_active(settings.get_boolean(key)) 8 | widget.connect("notify::active", on_bound_switch_activated, settings, key, fn_callback) 9 | return widget 10 | 11 | def on_bound_entry_changed(widget, settings, key, fn_callback=None): 12 | settings.set_string(key, widget.get_text()) 13 | if fn_callback is not None: 14 | fn_callback(widget.get_active()) 15 | 16 | def on_bound_switch_activated(widget, active, settings, key, fn_callback=None): 17 | settings.set_boolean(key, widget.get_active()) 18 | if fn_callback is not None: 19 | fn_callback(widget.get_active()) 20 | -------------------------------------------------------------------------------- /usr/lib/jargonaut/ui.py: -------------------------------------------------------------------------------- 1 | import gi 2 | gi.require_version('Gtk', '3.0') 3 | from gi.repository import Gtk, GLib 4 | import gettext 5 | import locale 6 | import math 7 | import threading 8 | 9 | # i18n 10 | APP = "jargonaut" 11 | LOCALE_DIR = "/usr/share/locale" 12 | locale.bindtextdomain(APP, LOCALE_DIR) 13 | gettext.bindtextdomain(APP, LOCALE_DIR) 14 | gettext.textdomain(APP) 15 | _ = gettext.gettext 16 | 17 | color_palette = [ 18 | "#27252E", # Dark grey 19 | "#E6194B", # Red 20 | "#3CB44B", # Green 21 | "#D1A75A", # Jaune 22 | "#4363D8", # Bleu 23 | "#F58231", # Orange 24 | "#911EB4", # Violet 25 | "#42D4F4", # Cyan 26 | "#F032E6", # Magenta 27 | "#7BDC9A", # Vert clair 28 | "#efb6b6", # Rose 29 | "#469990", # Vert d'eau 30 | "#d3afeb", # Lavande 31 | "#9A6324", # Brun 32 | "#800000", # Marron 33 | "#AAFFC3", # Vert menthe 34 | "#808000", # Olive 35 | "#000075", # Bleu marine 36 | "#A5A5A5" # Gris 37 | ] 38 | 39 | # Used as a decorator to run things in the background 40 | def _async(func): 41 | def wrapper(*args, **kwargs): 42 | thread = threading.Thread(target=func, args=args, kwargs=kwargs) 43 | thread.daemon = True 44 | thread.start() 45 | return thread 46 | return wrapper 47 | 48 | # Used as a decorator to run things in the main loop, from another thread 49 | def idle(func): 50 | def wrapper(*args): 51 | GLib.idle_add(func, *args) 52 | return wrapper 53 | 54 | def build_menu(app, window, menu): 55 | accel_group = Gtk.AccelGroup() 56 | window.add_accel_group(accel_group) 57 | item = Gtk.ImageMenuItem() 58 | item.set_label(_("Preferences")) 59 | item.connect("activate", open_preferences, app) 60 | menu.append(item) 61 | menu.append(Gtk.SeparatorMenuItem()) 62 | item = Gtk.ImageMenuItem() 63 | item.set_image(Gtk.Image.new_from_icon_name("preferences-desktop-keyboard-shortcuts-symbolic", Gtk.IconSize.MENU)) 64 | item.set_label(_("Keyboard Shortcuts")) 65 | item.connect("activate", open_keyboard_shortcuts) 66 | key, mod = Gtk.accelerator_parse("K") 67 | item.add_accelerator("activate", accel_group, key, mod, Gtk.AccelFlags.VISIBLE) 68 | menu.append(item) 69 | item = Gtk.ImageMenuItem() 70 | item.set_image(Gtk.Image.new_from_icon_name("help-about-symbolic", Gtk.IconSize.MENU)) 71 | item.set_label(_("About")) 72 | item.connect("activate", open_about, window) 73 | key, mod = Gtk.accelerator_parse("F1") 74 | item.add_accelerator("activate", accel_group, key, mod, Gtk.AccelFlags.VISIBLE) 75 | menu.append(item) 76 | item = Gtk.ImageMenuItem(label=_("Quit")) 77 | image = Gtk.Image.new_from_icon_name("application-exit-symbolic", Gtk.IconSize.MENU) 78 | item.set_image(image) 79 | item.connect("activate", on_menu_quit, app) 80 | key, mod = Gtk.accelerator_parse("Q") 81 | item.add_accelerator("activate", accel_group, key, mod, Gtk.AccelFlags.VISIBLE) 82 | key, mod = Gtk.accelerator_parse("W") 83 | item.add_accelerator("activate", accel_group, key, mod, Gtk.AccelFlags.VISIBLE) 84 | menu.append(item) 85 | menu.show_all() 86 | 87 | def on_menu_quit(widget, app): 88 | app.quit() 89 | 90 | def open_about(widget, window): 91 | dlg = Gtk.AboutDialog() 92 | dlg.set_transient_for(window) 93 | dlg.set_title(_("About")) 94 | dlg.set_program_name("Jargonaut") 95 | dlg.set_comments(_("Chat Room")) 96 | try: 97 | h = open("/usr/share/common-licenses/GPL", encoding="utf-8") 98 | s = h.readlines() 99 | gpl = "" 100 | for line in s: 101 | gpl += line 102 | h.close() 103 | dlg.set_license(gpl) 104 | except Exception as e: 105 | print(e) 106 | 107 | dlg.set_version("__DEB_VERSION__") 108 | dlg.set_icon_name("jargonaut") 109 | dlg.set_logo_icon_name("jargonaut") 110 | dlg.set_website("https://www.github.com/linuxmint/jargonaut") 111 | 112 | def close(w, res): 113 | if res == Gtk.ResponseType.CANCEL or res == Gtk.ResponseType.DELETE_EVENT: 114 | w.destroy() 115 | 116 | dlg.connect("response", close) 117 | dlg.show() 118 | 119 | def open_preferences(widget, app): 120 | app.builder.get_object("main_stack").set_visible_child_name("page_settings") 121 | app.builder.get_object("back_button").set_visible(True) 122 | 123 | def open_keyboard_shortcuts(widget): 124 | gladefile = "/usr/share/jargonaut/shortcuts.ui" 125 | builder = Gtk.Builder() 126 | builder.set_translation_domain(APP) 127 | builder.add_from_file(gladefile) 128 | window = builder.get_object("shortcuts") 129 | window.set_title(_("Chat Room")) 130 | window.show() 131 | 132 | def get_span_minutes(message_dt, previous_dt): 133 | span = message_dt.difference(previous_dt) 134 | return math.floor(span / GLib.TIME_SPAN_MINUTE) 135 | 136 | def format_timespan(message_dt, use_24h): 137 | now = GLib.DateTime.new_now_local() 138 | y, m, d = now.get_ymd() 139 | 140 | this_past_midnight_dt = GLib.DateTime.new_local(y, m, d, 0, 0, 0) 141 | before_today = this_past_midnight_dt.difference(message_dt) > 0 142 | 143 | formatted = None 144 | 145 | if use_24h: 146 | formatted = message_dt.format("%-H:%M") 147 | else: 148 | formatted = message_dt.format("%-I:%M %p") 149 | 150 | if before_today: 151 | formatted += " %x" 152 | 153 | return formatted 154 | -------------------------------------------------------------------------------- /usr/share/glib-2.0/schemas/org.x.jargonaut.gschema.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | true 6 | 7 | 8 | "irc.spotchat.org" 9 | 10 | 11 | 6697 12 | 13 | 14 | "#minttest" 15 | 16 | 17 | "" 18 | 19 | 20 | "" 21 | 22 | 23 | false 24 | 25 | 26 | true 27 | 28 | 29 | false 30 | Whether to print debug information to stdout 31 | 32 | 33 | false 34 | WebKit2 HW Acceleration 35 | 36 | 37 | true 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /usr/share/icons/hicolor/scalable/apps/jargonaut-channel-chat.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 23 | 25 | 28 | 32 | 36 | 37 | 46 | 56 | 66 | 67 | 94 | 106 | 107 | 109 | 110 | 112 | image/svg+xml 113 | 115 | 116 | 117 | Lapo Calamandrei 118 | 119 | 120 | 122 | Message New 123 | 124 | 126 | 128 | 130 | 132 | 134 | 136 | 138 | 139 | 140 | 141 | 145 | 148 | 152 | 156 | 161 | 164 | 165 | 171 | 172 | 174 | 178 | 183 | 186 | 187 | 195 | 196 | 197 | 201 | 206 | 209 | 210 | 215 | 222 | 226 | 227 | 228 | 229 | -------------------------------------------------------------------------------- /usr/share/icons/hicolor/scalable/apps/jargonaut-channel-help.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 21 | 23 | 26 | 30 | 34 | 35 | 44 | 54 | 64 | 65 | 93 | 95 | 96 | 98 | image/svg+xml 99 | 101 | 102 | 103 | Lapo Calamandrei 104 | 105 | 106 | 108 | Message New 109 | 110 | 112 | 114 | 116 | 118 | 120 | 122 | 124 | 125 | 126 | 127 | 131 | 134 | 138 | 142 | 147 | 150 | 151 | 157 | 158 | 160 | 164 | 169 | 172 | 173 | 181 | 185 | 190 | 195 | 196 | 197 | 198 | 202 | 207 | 210 | 211 | 215 | 220 | 225 | 226 | 231 | 238 | 242 | 243 | 244 | 245 | -------------------------------------------------------------------------------- /usr/share/icons/hicolor/scalable/apps/jargonaut-outline.svg: -------------------------------------------------------------------------------- 1 | 2 | 14 | 32 | 35 | 36 | 38 | 41 | 44 | 48 | 49 | 56 | 59 | 60 | 68 | 70 | 79 | 80 | 88 | 92 | 96 | 97 | 99 | 103 | 104 | 113 | 120 | 123 | 124 | 132 | 135 | 139 | 140 | 148 | 156 | 164 | 169 | 174 | 178 | 182 | 186 | 187 | 195 | 203 | 212 | 221 | 230 | 238 | 245 | 248 | 249 | 257 | 264 | 267 | 268 | 276 | 278 | 282 | 286 | 287 | 294 | 297 | 298 | 305 | 308 | 309 | 318 | 320 | 324 | 328 | 332 | 333 | 342 | 344 | 348 | 352 | 356 | 360 | 364 | 368 | 369 | 378 | 380 | 384 | 388 | 392 | 396 | 400 | 404 | 405 | 414 | 416 | 420 | 424 | 428 | 429 | 438 | 440 | 444 | 448 | 449 | 458 | 460 | 464 | 468 | 469 | 478 | 485 | 488 | 489 | 496 | 499 | 500 | 508 | 510 | 514 | 518 | 522 | 526 | 527 | 535 | 537 | 541 | 545 | 546 | 556 | 566 | 568 | 572 | 576 | 580 | 581 | 591 | 601 | 611 | 621 | 631 | 641 | 650 | 652 | 656 | 660 | 661 | 668 | 671 | 672 | 679 | 682 | 683 | 684 | 688 | 694 | 700 | 705 | 709 | 719 | 724 | 725 | 726 | 727 | -------------------------------------------------------------------------------- /usr/share/icons/hicolor/scalable/apps/jargonaut-status-msg-symbolic.svg: -------------------------------------------------------------------------------- 1 | 2 | 13 | 15 | 33 | 37 | 43 | 44 | -------------------------------------------------------------------------------- /usr/share/icons/hicolor/scalable/apps/jargonaut-status-normal-symbolic.svg: -------------------------------------------------------------------------------- 1 | 2 | 13 | 15 | 33 | 39 | 40 | -------------------------------------------------------------------------------- /usr/share/icons/hicolor/scalable/apps/jargonaut-symbolic.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 16 | 36 | 45 | 46 | 48 | 54 | 57 | 61 | 62 | 63 | 67 | 71 | 77 | 83 | 88 | 92 | 102 | 107 | 108 | 109 | 110 | 111 | -------------------------------------------------------------------------------- /usr/share/icons/hicolor/scalable/apps/jargonaut.svg: -------------------------------------------------------------------------------- 1 | 2 | 14 | 32 | 35 | 36 | 38 | 41 | 45 | 49 | 50 | 53 | 57 | 61 | 62 | 65 | 68 | 72 | 73 | 80 | 83 | 84 | 92 | 94 | 103 | 104 | 112 | 116 | 120 | 121 | 123 | 127 | 128 | 137 | 144 | 147 | 148 | 156 | 159 | 163 | 164 | 172 | 180 | 188 | 193 | 198 | 202 | 206 | 210 | 211 | 219 | 227 | 236 | 245 | 254 | 262 | 269 | 272 | 273 | 281 | 288 | 291 | 292 | 300 | 302 | 306 | 310 | 311 | 318 | 321 | 322 | 329 | 332 | 333 | 342 | 344 | 348 | 352 | 356 | 357 | 366 | 368 | 372 | 376 | 380 | 384 | 388 | 392 | 393 | 402 | 404 | 408 | 412 | 416 | 420 | 424 | 428 | 429 | 438 | 440 | 444 | 448 | 452 | 453 | 462 | 464 | 468 | 472 | 473 | 482 | 484 | 488 | 492 | 493 | 502 | 509 | 512 | 513 | 520 | 523 | 524 | 532 | 534 | 538 | 542 | 546 | 550 | 551 | 559 | 561 | 565 | 569 | 570 | 580 | 590 | 592 | 596 | 600 | 604 | 605 | 615 | 625 | 635 | 645 | 655 | 665 | 674 | 676 | 680 | 684 | 685 | 692 | 695 | 696 | 703 | 706 | 707 | 715 | 720 | 724 | 725 | 730 | 739 | 750 | 751 | 756 | 762 | 768 | 773 | 777 | 787 | 792 | 793 | 794 | 795 | -------------------------------------------------------------------------------- /usr/share/jargonaut/jargonaut.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | True 7 | False 8 | go-previous-symbolic 9 | 10 | 11 | True 12 | False 13 | 14 | 15 | False 16 | center 17 | 600 18 | 400 19 | jargonaut 20 | False 21 | 22 | 23 | True 24 | False 25 | vertical 26 | 27 | 28 | True 29 | False 30 | crossfade 31 | 32 | 33 | True 34 | False 35 | center 36 | center 37 | vertical 38 | 12 39 | 40 | 41 | True 42 | False 43 | network-server-symbolic 44 | 6 45 | 46 | 47 | False 48 | True 49 | 0 50 | 51 | 52 | 53 | 54 | True 55 | False 56 | Connecting to the Chat Room... 57 | 58 | 59 | 60 | 61 | 62 | False 63 | True 64 | 1 65 | 66 | 67 | 68 | 69 | True 70 | False 71 | True 72 | 73 | 74 | False 75 | True 76 | 2 77 | 78 | 79 | 80 | 81 | page_status 82 | 83 | 84 | 85 | 86 | True 87 | False 88 | 6 89 | 90 | 91 | True 92 | False 93 | vertical 94 | 6 95 | 96 | 97 | True 98 | False 99 | 0 100 | in 101 | 102 | 103 | True 104 | False 105 | 106 | 107 | True 108 | False 109 | 110 | 111 | True 112 | False 113 | 114 | 115 | True 116 | False 117 | vertical 118 | 119 | 120 | 121 | 122 | 123 | -1 124 | 125 | 126 | 127 | 128 | 5 new messages 129 | True 130 | True 131 | True 132 | Click to see new messages 133 | center 134 | end 135 | 4 136 | right 137 | True 138 | 139 | 140 | 141 | 142 | True 143 | True 144 | 1 145 | 146 | 147 | 148 | 149 | True 150 | False 151 | 152 | 153 | True 154 | False 155 | 156 | 157 | False 158 | True 159 | 0 160 | 161 | 162 | 163 | 164 | True 165 | True 166 | 150 167 | 168 | 169 | True 170 | True 171 | False 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | False 180 | True 181 | 1 182 | 183 | 184 | 185 | 186 | False 187 | True 188 | 1 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | True 201 | True 202 | 0 203 | 204 | 205 | 206 | 207 | True 208 | False 209 | 6 210 | 6 211 | 11 212 | 213 | 214 | True 215 | True 216 | True 217 | none 218 | 219 | 220 | True 221 | False 222 | 6 223 | 224 | 225 | True 226 | False 227 | jargonaut-channel-help 228 | 229 | 230 | False 231 | True 232 | 0 233 | 234 | 235 | 236 | 237 | True 238 | False 239 | Questions 240 | 241 | 242 | 243 | 244 | 245 | False 246 | True 247 | 1 248 | 249 | 250 | 251 | 252 | 253 | 254 | False 255 | True 256 | 0 257 | 258 | 259 | 260 | 261 | True 262 | True 263 | True 264 | none 265 | 266 | 267 | True 268 | False 269 | 6 270 | 271 | 272 | True 273 | False 274 | jargonaut-channel-chat 275 | 276 | 277 | False 278 | True 279 | 0 280 | 281 | 282 | 283 | 284 | True 285 | False 286 | Discussions 287 | 288 | 289 | 290 | 291 | 292 | False 293 | True 294 | 1 295 | 296 | 297 | 298 | 299 | 300 | 301 | False 302 | True 303 | 1 304 | 305 | 306 | 307 | 308 | True 309 | True 310 | True 311 | Users connected to the chat room 312 | none 313 | 314 | 315 | True 316 | False 317 | 6 318 | 319 | 320 | True 321 | False 322 | system-users-symbolic 323 | 324 | 325 | False 326 | True 327 | 0 328 | 329 | 330 | 331 | 332 | True 333 | False 334 | 12 335 | 336 | 337 | False 338 | True 339 | 1 340 | 341 | 342 | 343 | 344 | 345 | 346 | False 347 | True 348 | end 349 | 2 350 | 351 | 352 | 353 | 354 | False 355 | True 356 | 1 357 | 358 | 359 | 360 | 361 | True 362 | False 363 | 6 364 | 6 365 | 6 366 | 6 367 | 368 | 369 | True 370 | False 371 | This is your nickname in the chat room 372 | 373 | 374 | False 375 | True 376 | 0 377 | 378 | 379 | 380 | 381 | True 382 | True 383 | True 384 | Type here to chat... 385 | 386 | 387 | True 388 | True 389 | 2 390 | 391 | 392 | 393 | 394 | False 395 | True 396 | 2 397 | 398 | 399 | 400 | 401 | True 402 | True 403 | 1 404 | 405 | 406 | 407 | 408 | page_chat 409 | 1 410 | 411 | 412 | 413 | 414 | True 415 | False 416 | 0 417 | vertical 418 | 419 | 420 | False 421 | True 422 | 423 | 424 | False 425 | 6 426 | end 427 | 428 | 429 | 430 | 431 | 432 | 433 | 434 | 435 | 436 | 437 | 438 | False 439 | False 440 | 0 441 | 442 | 443 | 444 | 445 | False 446 | 16 447 | 448 | 449 | True 450 | False 451 | Restart the application for changes to take effect. 452 | 453 | 454 | False 455 | True 456 | 0 457 | 458 | 459 | 460 | 461 | 462 | 463 | 464 | 465 | 466 | 467 | False 468 | False 469 | 0 470 | 471 | 472 | 473 | 474 | 475 | 476 | 477 | False 478 | True 479 | 0 480 | 481 | 482 | 483 | 484 | 485 | True 486 | False 487 | start 488 | 20 489 | 20 490 | 12 491 | 12 492 | 12 493 | 494 | 495 | True 496 | False 497 | start 498 | center 499 | Default nickname 500 | 501 | 502 | 503 | 504 | 505 | 0 506 | 0 507 | 508 | 509 | 510 | 511 | True 512 | True 513 | 16 characters max. If already taken, a random suffix is appended. 514 | center 515 | True 516 | 16 517 | 518 | 519 | 1 520 | 0 521 | 522 | 523 | 524 | 525 | True 526 | False 527 | start 528 | center 529 | Prefer dark mode 530 | 531 | 532 | 533 | 534 | 535 | 0 536 | 4 537 | 538 | 539 | 540 | 541 | True 542 | True 543 | start 544 | 545 | 546 | 1 547 | 4 548 | 549 | 550 | 551 | 552 | True 553 | False 554 | start 555 | center 556 | Nickserv password 557 | 558 | 559 | 560 | 561 | 562 | 0 563 | 2 564 | 565 | 566 | 567 | 568 | True 569 | True 570 | If you are registered with Nickserv, enter your password here. 571 | center 572 | True 573 | False 574 | 16 575 | password 576 | 577 | 578 | 1 579 | 2 580 | 581 | 582 | 583 | 584 | True 585 | False 586 | start 587 | center 588 | Hardware acceleration 589 | 590 | 591 | 592 | 593 | 594 | 0 595 | 5 596 | 597 | 598 | 599 | 600 | True 601 | True 602 | start 603 | 604 | 605 | 1 606 | 5 607 | 608 | 609 | 610 | 611 | True 612 | False 613 | start 614 | center 615 | Use 24h clock 616 | 617 | 618 | 619 | 620 | 621 | 0 622 | 6 623 | 624 | 625 | 626 | 627 | True 628 | True 629 | start 630 | 631 | 632 | 1 633 | 6 634 | 635 | 636 | 637 | 638 | 639 | 640 | 641 | 642 | 643 | 644 | 645 | 646 | 647 | 648 | 649 | 650 | False 651 | True 652 | 1 653 | 654 | 655 | 656 | 657 | page_settings 658 | 2 659 | 660 | 661 | 662 | 663 | True 664 | True 665 | 1 666 | 667 | 668 | 669 | 670 | 671 | 672 | True 673 | False 674 | Chat Room 675 | A place for users to help each other 676 | True 677 | 678 | 679 | True 680 | True 681 | False 682 | True 683 | main_menu 684 | 685 | 686 | True 687 | False 688 | open-menu-symbolic 689 | 690 | 691 | 692 | 693 | 694 | 695 | True 696 | True 697 | True 698 | image1 699 | 700 | 701 | 1 702 | 703 | 704 | 705 | 706 | 707 | 708 | -------------------------------------------------------------------------------- /usr/share/jargonaut/sample-conversation.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | C 10 |
clem_14:49
11 |
the welcome screen will probably mention the chat room and let you launch it, but that's it.
12 |
I think...
13 |
14 | 15 |
16 | J 17 |
Joe14:50
18 |
oh really? http://toto.com
19 |
20 | 21 |
22 | D 23 |
Dave14:52
24 |
oh wow!
25 |
clem_: no way!
26 | 30 |
31 | 32 |
33 | C 34 |
clem_14:58
35 |
yeah yeah check http://toto.com
36 |
37 | 38 | 41 | -------------------------------------------------------------------------------- /usr/share/jargonaut/shortcuts.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 1 6 | 7 | 8 | 1 9 | Shortcuts 10 | 15 11 | 12 | 13 | 1 14 | Text formatting 15 | 16 | 17 | 1 18 | <Control>B 19 | Bold 20 | 21 | 22 | 23 | 24 | 1 25 | <Control>I 26 | Italic 27 | 28 | 29 | 30 | 31 | 1 32 | <Control>U 33 | Underline 34 | 35 | 36 | 37 | 38 | 1 39 | <Control>S 40 | Strikethrough 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /usr/share/jargonaut/style.css: -------------------------------------------------------------------------------- 1 | treeview { 2 | font-family: Monospace; 3 | } 4 | 5 | headerbar { 6 | background-image: repeating-linear-gradient( 7 | 135deg, 8 | rgba(85, 60, 154, 0.1), 9 | rgba(85, 60, 154, 0.1) 50px, 10 | rgba(179, 147, 211, 0.1) 50px, 11 | rgba(179, 147, 211, 0.1) 100px 12 | ),radial-gradient(circle at center,transparent 20%,rgba(0, 0, 0, 0.3)); 13 | } -------------------------------------------------------------------------------- /usr/share/jargonaut/webview.css: -------------------------------------------------------------------------------- 1 | @media(prefers-color-scheme: dark) { 2 | body { 3 | background: #404040; 4 | color: #d8dee9; 5 | } 6 | 7 | a { 8 | color: PowderBlue; 9 | } 10 | 11 | .nick { 12 | color: #ebf2f9; 13 | } 14 | 15 | .mine .line { 16 | color: #a6acb9; 17 | font-style: italic; 18 | } 19 | 20 | } 21 | 22 | @media(prefers-color-scheme: light) { 23 | body { 24 | background: #ffffff; 25 | color: #2d2d2d; 26 | } 27 | 28 | a { 29 | color: grey; 30 | } 31 | 32 | .mine .line { 33 | font-style: italic; 34 | color: grey; 35 | } 36 | 37 | } 38 | 39 | body { 40 | font: normal 15px Source Sans Pro,sans-serif; 41 | overflow-x: hidden; /* Hide horizontal scrollbar */ 42 | padding-right: 10px; 43 | } 44 | 45 | img { 46 | padding: 5px; 47 | } 48 | 49 | .thumb { 50 | max-height: 200px; 51 | border-radius: 10%; 52 | } 53 | 54 | .nick { 55 | text-align: left; 56 | font-weight: bold; 57 | } 58 | 59 | .messages { 60 | position: relative; 61 | left: 0px; 62 | top: 0px; 63 | padding: 15px; 64 | padding-bottom: 5px; 65 | } 66 | 67 | .avatar { 68 | position: absolute; 69 | top: 16px; 70 | left: 3px; 71 | cursor: pointer; 72 | font-size: 18px; 73 | display: flex; 74 | align-content: center; 75 | text-align: center; 76 | } 77 | 78 | .avatar span { 79 | font-size: 1em; 80 | color: white; 81 | border-radius: 50%; 82 | height: 2em; 83 | width: 2em; 84 | line-height: 2em; 85 | font-weight: 500; 86 | box-shadow: inset 0 -1px 0 rgba(0,0,0,.3); 87 | } 88 | 89 | .nick { 90 | position: relative; 91 | top: 0px; 92 | left: 30px; 93 | font-weight: 600; 94 | } 95 | 96 | .line { 97 | position: relative; 98 | left: 30px; 99 | top: 3px; 100 | font-size: 1em; 101 | font-weight: 400; 102 | padding-bottom: 0.1em; 103 | } 104 | 105 | .date { 106 | color: #848b95; 107 | font-size: 0.6em; 108 | margin-left: 10px; 109 | font-weight: normal; 110 | } 111 | 112 | .response { 113 | background: linear-gradient(to right, rgba(0,0,0,.1) 60%, rgba(0,0,0,0)); 114 | color: #ec5f66; 115 | font-weight: 600; 116 | } 117 | 118 | .action { 119 | font-size: 0.6em; 120 | padding-top: .1em; 121 | padding-bottom: .1em; 122 | } 123 | 124 | .action-text { 125 | padding-top: .1em; 126 | padding-bottom: .1em; 127 | text-align: right; 128 | } 129 | 130 | hr.solid 131 | .separator { 132 | border-top: 1px #848b95; 133 | } --------------------------------------------------------------------------------