├── LICENSE ├── README.md ├── awesome ├── Wallpaper │ └── wp.jpg ├── assets │ ├── autostart.sh │ └── icons │ │ ├── Light │ │ ├── alarm.svg │ │ ├── bell1.svg │ │ └── broom1.svg │ │ ├── alarm1.svg │ │ ├── bell2.svg │ │ ├── lockscreen.svg │ │ ├── logout.svg │ │ ├── notifications_deletec.svg │ │ ├── notifications_deleter.svg │ │ ├── preference.png │ │ ├── reboot1.svg │ │ └── shutdown.svg ├── autostart.lua ├── helpers.lua ├── rc.lua ├── scripts │ ├── ram.sh │ ├── temp.sh │ └── touchpad.sh ├── theme.lua └── ui │ ├── dashboard │ ├── dashboard.lua │ ├── init.lua │ └── weather_widget.lua │ ├── notifications │ └── notifications.lua │ └── wibar │ ├── init.lua │ └── wibar.lua ├── rofi ├── config.rasi └── config_emoji.rasi └── wezterm └── wezterm.lua /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU General Public License is a free, copyleft license for 11 | software and other kinds of works. 12 | 13 | The licenses for most software and other practical works are designed 14 | to take away your freedom to share and change the works. By contrast, 15 | the GNU General Public License is intended to guarantee your freedom to 16 | share and change all versions of a program--to make sure it remains free 17 | software for all its users. We, the Free Software Foundation, use the 18 | GNU General Public License for most of our software; it applies also to 19 | any other work released this way by its authors. You can apply it to 20 | your programs, too. 21 | 22 | When we speak of free software, we are referring to freedom, not 23 | price. Our General Public Licenses are designed to make sure that you 24 | have the freedom to distribute copies of free software (and charge for 25 | them if you wish), that you receive source code or can get it if you 26 | want it, that you can change the software or use pieces of it in new 27 | free programs, and that you know you can do these things. 28 | 29 | To protect your rights, we need to prevent others from denying you 30 | these rights or asking you to surrender the rights. Therefore, you have 31 | certain responsibilities if you distribute copies of the software, or if 32 | you modify it: responsibilities to respect the freedom of others. 33 | 34 | For example, if you distribute copies of such a program, whether 35 | gratis or for a fee, you must pass on to the recipients the same 36 | freedoms that you received. You must make sure that they, too, receive 37 | or can get the source code. And you must show them these terms so they 38 | know their rights. 39 | 40 | Developers that use the GNU GPL protect your rights with two steps: 41 | (1) assert copyright on the software, and (2) offer you this License 42 | giving you legal permission to copy, distribute and/or modify it. 43 | 44 | For the developers' and authors' protection, the GPL clearly explains 45 | that there is no warranty for this free software. For both users' and 46 | authors' sake, the GPL requires that modified versions be marked as 47 | changed, so that their problems will not be attributed erroneously to 48 | authors of previous versions. 49 | 50 | Some devices are designed to deny users access to install or run 51 | modified versions of the software inside them, although the manufacturer 52 | can do so. This is fundamentally incompatible with the aim of 53 | protecting users' freedom to change the software. The systematic 54 | pattern of such abuse occurs in the area of products for individuals to 55 | use, which is precisely where it is most unacceptable. Therefore, we 56 | have designed this version of the GPL to prohibit the practice for those 57 | products. If such problems arise substantially in other domains, we 58 | stand ready to extend this provision to those domains in future versions 59 | of the GPL, as needed to protect the freedom of users. 60 | 61 | Finally, every program is threatened constantly by software patents. 62 | States should not allow patents to restrict development and use of 63 | software on general-purpose computers, but in those that do, we wish to 64 | avoid the special danger that patents applied to a free program could 65 | make it effectively proprietary. To prevent this, the GPL assures that 66 | patents cannot be used to render the program non-free. 67 | 68 | The precise terms and conditions for copying, distribution and 69 | modification follow. 70 | 71 | TERMS AND CONDITIONS 72 | 73 | 0. Definitions. 74 | 75 | "This License" refers to version 3 of the GNU General Public License. 76 | 77 | "Copyright" also means copyright-like laws that apply to other kinds of 78 | works, such as semiconductor masks. 79 | 80 | "The Program" refers to any copyrightable work licensed under this 81 | License. Each licensee is addressed as "you". "Licensees" and 82 | "recipients" may be individuals or organizations. 83 | 84 | To "modify" a work means to copy from or adapt all or part of the work 85 | in a fashion requiring copyright permission, other than the making of an 86 | exact copy. The resulting work is called a "modified version" of the 87 | earlier work or a work "based on" the earlier work. 88 | 89 | A "covered work" means either the unmodified Program or a work based 90 | on the Program. 91 | 92 | To "propagate" a work means to do anything with it that, without 93 | permission, would make you directly or secondarily liable for 94 | infringement under applicable copyright law, except executing it on a 95 | computer or modifying a private copy. Propagation includes copying, 96 | distribution (with or without modification), making available to the 97 | public, and in some countries other activities as well. 98 | 99 | To "convey" a work means any kind of propagation that enables other 100 | parties to make or receive copies. Mere interaction with a user through 101 | a computer network, with no transfer of a copy, is not conveying. 102 | 103 | An interactive user interface displays "Appropriate Legal Notices" 104 | to the extent that it includes a convenient and prominently visible 105 | feature that (1) displays an appropriate copyright notice, and (2) 106 | tells the user that there is no warranty for the work (except to the 107 | extent that warranties are provided), that licensees may convey the 108 | work under this License, and how to view a copy of this License. If 109 | the interface presents a list of user commands or options, such as a 110 | menu, a prominent item in the list meets this criterion. 111 | 112 | 1. Source Code. 113 | 114 | The "source code" for a work means the preferred form of the work 115 | for making modifications to it. "Object code" means any non-source 116 | form of a work. 117 | 118 | A "Standard Interface" means an interface that either is an official 119 | standard defined by a recognized standards body, or, in the case of 120 | interfaces specified for a particular programming language, one that 121 | is widely used among developers working in that language. 122 | 123 | The "System Libraries" of an executable work include anything, other 124 | than the work as a whole, that (a) is included in the normal form of 125 | packaging a Major Component, but which is not part of that Major 126 | Component, and (b) serves only to enable use of the work with that 127 | Major Component, or to implement a Standard Interface for which an 128 | implementation is available to the public in source code form. A 129 | "Major Component", in this context, means a major essential component 130 | (kernel, window system, and so on) of the specific operating system 131 | (if any) on which the executable work runs, or a compiler used to 132 | produce the work, or an object code interpreter used to run it. 133 | 134 | The "Corresponding Source" for a work in object code form means all 135 | the source code needed to generate, install, and (for an executable 136 | work) run the object code and to modify the work, including scripts to 137 | control those activities. However, it does not include the work's 138 | System Libraries, or general-purpose tools or generally available free 139 | programs which are used unmodified in performing those activities but 140 | which are not part of the work. For example, Corresponding Source 141 | includes interface definition files associated with source files for 142 | the work, and the source code for shared libraries and dynamically 143 | linked subprograms that the work is specifically designed to require, 144 | such as by intimate data communication or control flow between those 145 | subprograms and other parts of the work. 146 | 147 | The Corresponding Source need not include anything that users 148 | can regenerate automatically from other parts of the Corresponding 149 | Source. 150 | 151 | The Corresponding Source for a work in source code form is that 152 | same work. 153 | 154 | 2. Basic Permissions. 155 | 156 | All rights granted under this License are granted for the term of 157 | copyright on the Program, and are irrevocable provided the stated 158 | conditions are met. This License explicitly affirms your unlimited 159 | permission to run the unmodified Program. The output from running a 160 | covered work is covered by this License only if the output, given its 161 | content, constitutes a covered work. This License acknowledges your 162 | rights of fair use or other equivalent, as provided by copyright law. 163 | 164 | You may make, run and propagate covered works that you do not 165 | convey, without conditions so long as your license otherwise remains 166 | in force. You may convey covered works to others for the sole purpose 167 | of having them make modifications exclusively for you, or provide you 168 | with facilities for running those works, provided that you comply with 169 | the terms of this License in conveying all material for which you do 170 | not control copyright. Those thus making or running the covered works 171 | for you must do so exclusively on your behalf, under your direction 172 | and control, on terms that prohibit them from making any copies of 173 | your copyrighted material outside their relationship with you. 174 | 175 | Conveying under any other circumstances is permitted solely under 176 | the conditions stated below. Sublicensing is not allowed; section 10 177 | makes it unnecessary. 178 | 179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 180 | 181 | No covered work shall be deemed part of an effective technological 182 | measure under any applicable law fulfilling obligations under article 183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 184 | similar laws prohibiting or restricting circumvention of such 185 | measures. 186 | 187 | When you convey a covered work, you waive any legal power to forbid 188 | circumvention of technological measures to the extent such circumvention 189 | is effected by exercising rights under this License with respect to 190 | the covered work, and you disclaim any intention to limit operation or 191 | modification of the work as a means of enforcing, against the work's 192 | users, your or third parties' legal rights to forbid circumvention of 193 | technological measures. 194 | 195 | 4. Conveying Verbatim Copies. 196 | 197 | You may convey verbatim copies of the Program's source code as you 198 | receive it, in any medium, provided that you conspicuously and 199 | appropriately publish on each copy an appropriate copyright notice; 200 | keep intact all notices stating that this License and any 201 | non-permissive terms added in accord with section 7 apply to the code; 202 | keep intact all notices of the absence of any warranty; and give all 203 | recipients a copy of this License along with the Program. 204 | 205 | You may charge any price or no price for each copy that you convey, 206 | and you may offer support or warranty protection for a fee. 207 | 208 | 5. Conveying Modified Source Versions. 209 | 210 | You may convey a work based on the Program, or the modifications to 211 | produce it from the Program, in the form of source code under the 212 | terms of section 4, provided that you also meet all of these conditions: 213 | 214 | a) The work must carry prominent notices stating that you modified 215 | it, and giving a relevant date. 216 | 217 | b) The work must carry prominent notices stating that it is 218 | released under this License and any conditions added under section 219 | 7. This requirement modifies the requirement in section 4 to 220 | "keep intact all notices". 221 | 222 | c) You must license the entire work, as a whole, under this 223 | License to anyone who comes into possession of a copy. This 224 | License will therefore apply, along with any applicable section 7 225 | additional terms, to the whole of the work, and all its parts, 226 | regardless of how they are packaged. This License gives no 227 | permission to license the work in any other way, but it does not 228 | invalidate such permission if you have separately received it. 229 | 230 | d) If the work has interactive user interfaces, each must display 231 | Appropriate Legal Notices; however, if the Program has interactive 232 | interfaces that do not display Appropriate Legal Notices, your 233 | work need not make them do so. 234 | 235 | A compilation of a covered work with other separate and independent 236 | works, which are not by their nature extensions of the covered work, 237 | and which are not combined with it such as to form a larger program, 238 | in or on a volume of a storage or distribution medium, is called an 239 | "aggregate" if the compilation and its resulting copyright are not 240 | used to limit the access or legal rights of the compilation's users 241 | beyond what the individual works permit. Inclusion of a covered work 242 | in an aggregate does not cause this License to apply to the other 243 | parts of the aggregate. 244 | 245 | 6. Conveying Non-Source Forms. 246 | 247 | You may convey a covered work in object code form under the terms 248 | of sections 4 and 5, provided that you also convey the 249 | machine-readable Corresponding Source under the terms of this License, 250 | in one of these ways: 251 | 252 | a) Convey the object code in, or embodied in, a physical product 253 | (including a physical distribution medium), accompanied by the 254 | Corresponding Source fixed on a durable physical medium 255 | customarily used for software interchange. 256 | 257 | b) Convey the object code in, or embodied in, a physical product 258 | (including a physical distribution medium), accompanied by a 259 | written offer, valid for at least three years and valid for as 260 | long as you offer spare parts or customer support for that product 261 | model, to give anyone who possesses the object code either (1) a 262 | copy of the Corresponding Source for all the software in the 263 | product that is covered by this License, on a durable physical 264 | medium customarily used for software interchange, for a price no 265 | more than your reasonable cost of physically performing this 266 | conveying of source, or (2) access to copy the 267 | Corresponding Source from a network server at no charge. 268 | 269 | c) Convey individual copies of the object code with a copy of the 270 | written offer to provide the Corresponding Source. This 271 | alternative is allowed only occasionally and noncommercially, and 272 | only if you received the object code with such an offer, in accord 273 | with subsection 6b. 274 | 275 | d) Convey the object code by offering access from a designated 276 | place (gratis or for a charge), and offer equivalent access to the 277 | Corresponding Source in the same way through the same place at no 278 | further charge. You need not require recipients to copy the 279 | Corresponding Source along with the object code. If the place to 280 | copy the object code is a network server, the Corresponding Source 281 | may be on a different server (operated by you or a third party) 282 | that supports equivalent copying facilities, provided you maintain 283 | clear directions next to the object code saying where to find the 284 | Corresponding Source. Regardless of what server hosts the 285 | Corresponding Source, you remain obligated to ensure that it is 286 | available for as long as needed to satisfy these requirements. 287 | 288 | e) Convey the object code using peer-to-peer transmission, provided 289 | you inform other peers where the object code and Corresponding 290 | Source of the work are being offered to the general public at no 291 | charge under subsection 6d. 292 | 293 | A separable portion of the object code, whose source code is excluded 294 | from the Corresponding Source as a System Library, need not be 295 | included in conveying the object code work. 296 | 297 | A "User Product" is either (1) a "consumer product", which means any 298 | tangible personal property which is normally used for personal, family, 299 | or household purposes, or (2) anything designed or sold for incorporation 300 | into a dwelling. In determining whether a product is a consumer product, 301 | doubtful cases shall be resolved in favor of coverage. For a particular 302 | product received by a particular user, "normally used" refers to a 303 | typical or common use of that class of product, regardless of the status 304 | of the particular user or of the way in which the particular user 305 | actually uses, or expects or is expected to use, the product. A product 306 | is a consumer product regardless of whether the product has substantial 307 | commercial, industrial or non-consumer uses, unless such uses represent 308 | the only significant mode of use of the product. 309 | 310 | "Installation Information" for a User Product means any methods, 311 | procedures, authorization keys, or other information required to install 312 | and execute modified versions of a covered work in that User Product from 313 | a modified version of its Corresponding Source. The information must 314 | suffice to ensure that the continued functioning of the modified object 315 | code is in no case prevented or interfered with solely because 316 | modification has been made. 317 | 318 | If you convey an object code work under this section in, or with, or 319 | specifically for use in, a User Product, and the conveying occurs as 320 | part of a transaction in which the right of possession and use of the 321 | User Product is transferred to the recipient in perpetuity or for a 322 | fixed term (regardless of how the transaction is characterized), the 323 | Corresponding Source conveyed under this section must be accompanied 324 | by the Installation Information. But this requirement does not apply 325 | if neither you nor any third party retains the ability to install 326 | modified object code on the User Product (for example, the work has 327 | been installed in ROM). 328 | 329 | The requirement to provide Installation Information does not include a 330 | requirement to continue to provide support service, warranty, or updates 331 | for a work that has been modified or installed by the recipient, or for 332 | the User Product in which it has been modified or installed. Access to a 333 | network may be denied when the modification itself materially and 334 | adversely affects the operation of the network or violates the rules and 335 | protocols for communication across the network. 336 | 337 | Corresponding Source conveyed, and Installation Information provided, 338 | in accord with this section must be in a format that is publicly 339 | documented (and with an implementation available to the public in 340 | source code form), and must require no special password or key for 341 | unpacking, reading or copying. 342 | 343 | 7. Additional Terms. 344 | 345 | "Additional permissions" are terms that supplement the terms of this 346 | License by making exceptions from one or more of its conditions. 347 | Additional permissions that are applicable to the entire Program shall 348 | be treated as though they were included in this License, to the extent 349 | that they are valid under applicable law. If additional permissions 350 | apply only to part of the Program, that part may be used separately 351 | under those permissions, but the entire Program remains governed by 352 | this License without regard to the additional permissions. 353 | 354 | When you convey a copy of a covered work, you may at your option 355 | remove any additional permissions from that copy, or from any part of 356 | it. (Additional permissions may be written to require their own 357 | removal in certain cases when you modify the work.) You may place 358 | additional permissions on material, added by you to a covered work, 359 | for which you have or can give appropriate copyright permission. 360 | 361 | Notwithstanding any other provision of this License, for material you 362 | add to a covered work, you may (if authorized by the copyright holders of 363 | that material) supplement the terms of this License with terms: 364 | 365 | a) Disclaiming warranty or limiting liability differently from the 366 | terms of sections 15 and 16 of this License; or 367 | 368 | b) Requiring preservation of specified reasonable legal notices or 369 | author attributions in that material or in the Appropriate Legal 370 | Notices displayed by works containing it; or 371 | 372 | c) Prohibiting misrepresentation of the origin of that material, or 373 | requiring that modified versions of such material be marked in 374 | reasonable ways as different from the original version; or 375 | 376 | d) Limiting the use for publicity purposes of names of licensors or 377 | authors of the material; or 378 | 379 | e) Declining to grant rights under trademark law for use of some 380 | trade names, trademarks, or service marks; or 381 | 382 | f) Requiring indemnification of licensors and authors of that 383 | material by anyone who conveys the material (or modified versions of 384 | it) with contractual assumptions of liability to the recipient, for 385 | any liability that these contractual assumptions directly impose on 386 | those licensors and authors. 387 | 388 | All other non-permissive additional terms are considered "further 389 | restrictions" within the meaning of section 10. If the Program as you 390 | received it, or any part of it, contains a notice stating that it is 391 | governed by this License along with a term that is a further 392 | restriction, you may remove that term. If a license document contains 393 | a further restriction but permits relicensing or conveying under this 394 | License, you may add to a covered work material governed by the terms 395 | of that license document, provided that the further restriction does 396 | not survive such relicensing or conveying. 397 | 398 | If you add terms to a covered work in accord with this section, you 399 | must place, in the relevant source files, a statement of the 400 | additional terms that apply to those files, or a notice indicating 401 | where to find the applicable terms. 402 | 403 | Additional terms, permissive or non-permissive, may be stated in the 404 | form of a separately written license, or stated as exceptions; 405 | the above requirements apply either way. 406 | 407 | 8. Termination. 408 | 409 | You may not propagate or modify a covered work except as expressly 410 | provided under this License. Any attempt otherwise to propagate or 411 | modify it is void, and will automatically terminate your rights under 412 | this License (including any patent licenses granted under the third 413 | paragraph of section 11). 414 | 415 | However, if you cease all violation of this License, then your 416 | license from a particular copyright holder is reinstated (a) 417 | provisionally, unless and until the copyright holder explicitly and 418 | finally terminates your license, and (b) permanently, if the copyright 419 | holder fails to notify you of the violation by some reasonable means 420 | prior to 60 days after the cessation. 421 | 422 | Moreover, your license from a particular copyright holder is 423 | reinstated permanently if the copyright holder notifies you of the 424 | violation by some reasonable means, this is the first time you have 425 | received notice of violation of this License (for any work) from that 426 | copyright holder, and you cure the violation prior to 30 days after 427 | your receipt of the notice. 428 | 429 | Termination of your rights under this section does not terminate the 430 | licenses of parties who have received copies or rights from you under 431 | this License. If your rights have been terminated and not permanently 432 | reinstated, you do not qualify to receive new licenses for the same 433 | material under section 10. 434 | 435 | 9. Acceptance Not Required for Having Copies. 436 | 437 | You are not required to accept this License in order to receive or 438 | run a copy of the Program. Ancillary propagation of a covered work 439 | occurring solely as a consequence of using peer-to-peer transmission 440 | to receive a copy likewise does not require acceptance. However, 441 | nothing other than this License grants you permission to propagate or 442 | modify any covered work. These actions infringe copyright if you do 443 | not accept this License. Therefore, by modifying or propagating a 444 | covered work, you indicate your acceptance of this License to do so. 445 | 446 | 10. Automatic Licensing of Downstream Recipients. 447 | 448 | Each time you convey a covered work, the recipient automatically 449 | receives a license from the original licensors, to run, modify and 450 | propagate that work, subject to this License. You are not responsible 451 | for enforcing compliance by third parties with this License. 452 | 453 | An "entity transaction" is a transaction transferring control of an 454 | organization, or substantially all assets of one, or subdividing an 455 | organization, or merging organizations. If propagation of a covered 456 | work results from an entity transaction, each party to that 457 | transaction who receives a copy of the work also receives whatever 458 | licenses to the work the party's predecessor in interest had or could 459 | give under the previous paragraph, plus a right to possession of the 460 | Corresponding Source of the work from the predecessor in interest, if 461 | the predecessor has it or can get it with reasonable efforts. 462 | 463 | You may not impose any further restrictions on the exercise of the 464 | rights granted or affirmed under this License. For example, you may 465 | not impose a license fee, royalty, or other charge for exercise of 466 | rights granted under this License, and you may not initiate litigation 467 | (including a cross-claim or counterclaim in a lawsuit) alleging that 468 | any patent claim is infringed by making, using, selling, offering for 469 | sale, or importing the Program or any portion of it. 470 | 471 | 11. Patents. 472 | 473 | A "contributor" is a copyright holder who authorizes use under this 474 | License of the Program or a work on which the Program is based. The 475 | work thus licensed is called the contributor's "contributor version". 476 | 477 | A contributor's "essential patent claims" are all patent claims 478 | owned or controlled by the contributor, whether already acquired or 479 | hereafter acquired, that would be infringed by some manner, permitted 480 | by this License, of making, using, or selling its contributor version, 481 | but do not include claims that would be infringed only as a 482 | consequence of further modification of the contributor version. For 483 | purposes of this definition, "control" includes the right to grant 484 | patent sublicenses in a manner consistent with the requirements of 485 | this License. 486 | 487 | Each contributor grants you a non-exclusive, worldwide, royalty-free 488 | patent license under the contributor's essential patent claims, to 489 | make, use, sell, offer for sale, import and otherwise run, modify and 490 | propagate the contents of its contributor version. 491 | 492 | In the following three paragraphs, a "patent license" is any express 493 | agreement or commitment, however denominated, not to enforce a patent 494 | (such as an express permission to practice a patent or covenant not to 495 | sue for patent infringement). To "grant" such a patent license to a 496 | party means to make such an agreement or commitment not to enforce a 497 | patent against the party. 498 | 499 | If you convey a covered work, knowingly relying on a patent license, 500 | and the Corresponding Source of the work is not available for anyone 501 | to copy, free of charge and under the terms of this License, through a 502 | publicly available network server or other readily accessible means, 503 | then you must either (1) cause the Corresponding Source to be so 504 | available, or (2) arrange to deprive yourself of the benefit of the 505 | patent license for this particular work, or (3) arrange, in a manner 506 | consistent with the requirements of this License, to extend the patent 507 | license to downstream recipients. "Knowingly relying" means you have 508 | actual knowledge that, but for the patent license, your conveying the 509 | covered work in a country, or your recipient's use of the covered work 510 | in a country, would infringe one or more identifiable patents in that 511 | country that you have reason to believe are valid. 512 | 513 | If, pursuant to or in connection with a single transaction or 514 | arrangement, you convey, or propagate by procuring conveyance of, a 515 | covered work, and grant a patent license to some of the parties 516 | receiving the covered work authorizing them to use, propagate, modify 517 | or convey a specific copy of the covered work, then the patent license 518 | you grant is automatically extended to all recipients of the covered 519 | work and works based on it. 520 | 521 | A patent license is "discriminatory" if it does not include within 522 | the scope of its coverage, prohibits the exercise of, or is 523 | conditioned on the non-exercise of one or more of the rights that are 524 | specifically granted under this License. You may not convey a covered 525 | work if you are a party to an arrangement with a third party that is 526 | in the business of distributing software, under which you make payment 527 | to the third party based on the extent of your activity of conveying 528 | the work, and under which the third party grants, to any of the 529 | parties who would receive the covered work from you, a discriminatory 530 | patent license (a) in connection with copies of the covered work 531 | conveyed by you (or copies made from those copies), or (b) primarily 532 | for and in connection with specific products or compilations that 533 | contain the covered work, unless you entered into that arrangement, 534 | or that patent license was granted, prior to 28 March 2007. 535 | 536 | Nothing in this License shall be construed as excluding or limiting 537 | any implied license or other defenses to infringement that may 538 | otherwise be available to you under applicable patent law. 539 | 540 | 12. No Surrender of Others' Freedom. 541 | 542 | If conditions are imposed on you (whether by court order, agreement or 543 | otherwise) that contradict the conditions of this License, they do not 544 | excuse you from the conditions of this License. If you cannot convey a 545 | covered work so as to satisfy simultaneously your obligations under this 546 | License and any other pertinent obligations, then as a consequence you may 547 | not convey it at all. For example, if you agree to terms that obligate you 548 | to collect a royalty for further conveying from those to whom you convey 549 | the Program, the only way you could satisfy both those terms and this 550 | License would be to refrain entirely from conveying the Program. 551 | 552 | 13. Use with the GNU Affero General Public License. 553 | 554 | Notwithstanding any other provision of this License, you have 555 | permission to link or combine any covered work with a work licensed 556 | under version 3 of the GNU Affero General Public License into a single 557 | combined work, and to convey the resulting work. The terms of this 558 | License will continue to apply to the part which is the covered work, 559 | but the special requirements of the GNU Affero General Public License, 560 | section 13, concerning interaction through a network will apply to the 561 | combination as such. 562 | 563 | 14. Revised Versions of this License. 564 | 565 | The Free Software Foundation may publish revised and/or new versions of 566 | the GNU General Public License from time to time. Such new versions will 567 | be similar in spirit to the present version, but may differ in detail to 568 | address new problems or concerns. 569 | 570 | Each version is given a distinguishing version number. If the 571 | Program specifies that a certain numbered version of the GNU General 572 | Public License "or any later version" applies to it, you have the 573 | option of following the terms and conditions either of that numbered 574 | version or of any later version published by the Free Software 575 | Foundation. If the Program does not specify a version number of the 576 | GNU General Public License, you may choose any version ever published 577 | by the Free Software Foundation. 578 | 579 | If the Program specifies that a proxy can decide which future 580 | versions of the GNU General Public License can be used, that proxy's 581 | public statement of acceptance of a version permanently authorizes you 582 | to choose that version for the Program. 583 | 584 | Later license versions may give you additional or different 585 | permissions. However, no additional obligations are imposed on any 586 | author or copyright holder as a result of your choosing to follow a 587 | later version. 588 | 589 | 15. Disclaimer of Warranty. 590 | 591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 599 | 600 | 16. Limitation of Liability. 601 | 602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 610 | SUCH DAMAGES. 611 | 612 | 17. Interpretation of Sections 15 and 16. 613 | 614 | If the disclaimer of warranty and limitation of liability provided 615 | above cannot be given local legal effect according to their terms, 616 | reviewing courts shall apply local law that most closely approximates 617 | an absolute waiver of all civil liability in connection with the 618 | Program, unless a warranty or assumption of liability accompanies a 619 | copy of the Program in return for a fee. 620 | 621 | END OF TERMS AND CONDITIONS 622 | 623 | How to Apply These Terms to Your New Programs 624 | 625 | If you develop a new program, and you want it to be of the greatest 626 | possible use to the public, the best way to achieve this is to make it 627 | free software which everyone can redistribute and change under these terms. 628 | 629 | To do so, attach the following notices to the program. It is safest 630 | to attach them to the start of each source file to most effectively 631 | state the exclusion of warranty; and each file should have at least 632 | the "copyright" line and a pointer to where the full notice is found. 633 | 634 | 635 | Copyright (C) 636 | 637 | This program is free software: you can redistribute it and/or modify 638 | it under the terms of the GNU General Public License as published by 639 | the Free Software Foundation, either version 3 of the License, or 640 | (at your option) any later version. 641 | 642 | This program is distributed in the hope that it will be useful, 643 | but WITHOUT ANY WARRANTY; without even the implied warranty of 644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 645 | GNU General Public License for more details. 646 | 647 | You should have received a copy of the GNU General Public License 648 | along with this program. If not, see . 649 | 650 | Also add information on how to contact you by electronic and paper mail. 651 | 652 | If the program does terminal interaction, make it output a short 653 | notice like this when it starts in an interactive mode: 654 | 655 | Copyright (C) 656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 657 | This is free software, and you are welcome to redistribute it 658 | under certain conditions; type `show c' for details. 659 | 660 | The hypothetical commands `show w' and `show c' should show the appropriate 661 | parts of the General Public License. Of course, your program's commands 662 | might be different; for a GUI interface, you would use an "about box". 663 | 664 | You should also get your employer (if you work as a programmer) or school, 665 | if any, to sign a "copyright disclaimer" for the program, if necessary. 666 | For more information on this, and how to apply and follow the GNU GPL, see 667 | . 668 | 669 | The GNU General Public License does not permit incorporating your program 670 | into proprietary programs. If your program is a subroutine library, you 671 | may consider it more useful to permit linking proprietary applications with 672 | the library. If this is what you want to do, use the GNU Lesser General 673 | Public License instead of this License. But first, please read 674 | . 675 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # AwesomeWMRice 2 | hello this is a rice of awesomewm , I wont guarantee it works fine on your system as there are some hardcoded and spaces, widths,heights ,etc... in it . you may need to change it .\ 3 | also change the autostart.sh file to autostart your programs. you may want to add animations to it with rubato or sth else , personally i don't use them.\ 4 | I use flameshot for screenshots you may want to change it .\ 5 | the shell scripts may or may not work on your system. \ 6 | ** add your own openweather cityid and apikey in the weather_widget 7 | 8 | # Requirements: 9 | awesome 4.3(mine is build against lua 5.1 ith luajit)\ 10 | bling (https://github.com/BlingCorp/bling) \ 11 | picom\ 12 | dkjson for lua5.1\ 13 | flameshot\ 14 | networkmanager\ 15 | pipewire\ 16 | rofi\ 17 | rofi-emoji\ 18 | betterlockscreen\ 19 | xidlehook \ 20 | Cascadia nerd font \ 21 | jetbrainsmono font 22 | 23 | # Credits 24 | https://github.com/raven2cz \ 25 | https://github.com/AlphaTechnolog \ 26 | https://github.com/unixsea/dotfiles 27 | -------------------------------------------------------------------------------- /awesome/Wallpaper/wp.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/beastsongithub/AwesomeWMRice/8e3b3d61010b2eca17e0c3b9d0e00d1ef4c2de04/awesome/Wallpaper/wp.jpg -------------------------------------------------------------------------------- /awesome/assets/autostart.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | run() { 4 | if ! pgrep -f "$1" ; 5 | then 6 | "$@" & 7 | fi 8 | } 9 | 10 | # exe xfce4-clipman 11 | run "nm-applet" 12 | run "/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1" 13 | run "picom" 14 | # exe xcompmgr -C 15 | # exe udiskie 16 | run "xidlehook" "--not-when-fullscreen" "--timer" 320 'xkb-switch -s us && betterlockscreen -l' '' 17 | 18 | if pgrep -f copyq; then 19 | pkill copyq 20 | sleep 1 21 | copyq --start-server 22 | else 23 | sleep 2 24 | copyq --start-server 25 | fi 26 | #exe pasystray 27 | -------------------------------------------------------------------------------- /awesome/assets/icons/Light/alarm.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /awesome/assets/icons/Light/bell1.svg: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 13 | 17 | 19 | 23 | 35 | 36 | 37 | 41 | 44 | 48 | 52 | 56 | 58 | 61 | 62 | -------------------------------------------------------------------------------- /awesome/assets/icons/Light/broom1.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /awesome/assets/icons/alarm1.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /awesome/assets/icons/bell2.svg: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 13 | 17 | 19 | 23 | 35 | 36 | 37 | 41 | 44 | 48 | 52 | 56 | 58 | 61 | 62 | -------------------------------------------------------------------------------- /awesome/assets/icons/lockscreen.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | icon 114 lock 4 | Created with Sketch. 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /awesome/assets/icons/logout.svg: -------------------------------------------------------------------------------- 1 | 2 | 6 | 8 | -------------------------------------------------------------------------------- /awesome/assets/icons/notifications_deletec.svg: -------------------------------------------------------------------------------- 1 | 2 | 7 | 10 | 13 | 15 | -------------------------------------------------------------------------------- /awesome/assets/icons/notifications_deleter.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /awesome/assets/icons/preference.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/beastsongithub/AwesomeWMRice/8e3b3d61010b2eca17e0c3b9d0e00d1ef4c2de04/awesome/assets/icons/preference.png -------------------------------------------------------------------------------- /awesome/assets/icons/reboot1.svg: -------------------------------------------------------------------------------- 1 | x -------------------------------------------------------------------------------- /awesome/assets/icons/shutdown.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | power_settings_new 4 | Created with Sketch. 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /awesome/autostart.lua: -------------------------------------------------------------------------------- 1 | local awful = require("awful") 2 | local gfs = require("gears.filesystem") 3 | 4 | local sh_path = gfs.get_configuration_dir() .. "assets/autostart.sh" 5 | 6 | local function load_autostart() 7 | awful.spawn.with_shell(sh_path) 8 | end 9 | 10 | load_autostart() 11 | -------------------------------------------------------------------------------- /awesome/helpers.lua: -------------------------------------------------------------------------------- 1 | local gears = require("gears") 2 | local wibox = require("wibox") 3 | local beautiful = require("beautiful") 4 | local dpi = beautiful.xresources.apply_dpi 5 | 6 | local helpers = {} 7 | 8 | -- colorize a text with pango markup 9 | function helpers.get_colorized_markup(content, fg) 10 | fg = fg or beautiful.fg_notification_normal 11 | content = content or "" 12 | 13 | return '' .. content .. "" 14 | end 15 | 16 | -- add hover support 17 | function helpers.add_hover(element, bg, hbg) 18 | element:connect_signal("mouse::enter", function(self) 19 | self.bg = hbg 20 | end) 21 | element:connect_signal("mouse::leave", function(self) 22 | self.bg = bg 23 | end) 24 | end 25 | 26 | function helpers.mkrotatedinfobubble(arrow_size, arrow_pos) 27 | arrow_size = arrow_size or 15 28 | arrow_pos = arrow_pos 29 | return function(cr, width, height) 30 | gears.shape 31 | .transform(gears.shape.infobubble) 32 | :rotate_at((height + (width - height)) / 2, width / 2, math.pi / 2)( 33 | cr, 34 | height, 35 | width, 36 | 10, 37 | arrow_size, 38 | arrow_pos or height / 6 39 | ) 40 | end 41 | end 42 | 43 | function helpers.mkparallelogram(d) 44 | d = d or 3 45 | return function(cr, width, height) 46 | gears.shape.transform(gears.shape.parallelogram):scale(1, -1)(cr, width, -height, width - height / d) 47 | end 48 | end 49 | 50 | -- rounded rectangle with custom radius 51 | function helpers.mkroundrect(radius) 52 | radius = radius or dpi(10) 53 | return function(cr, width, height) 54 | return gears.shape.rounded_rect(cr, width, height, radius) 55 | end 56 | end 57 | 58 | function helpers.mkpowerline(ang, reverse) 59 | reverse = reverse or false 60 | ang = (reverse and -(ang or 12)) or (not reverse and (ang or 12)) 61 | return function(cr, width, height) 62 | gears.shape.powerline(cr, width, height, ang) 63 | end 64 | end 65 | 66 | --simple round button with hover support 67 | function helpers.mkbutton(template, bg, hbg, radius) 68 | local button = wibox.widget({ 69 | { 70 | template, 71 | margins = dpi(7), 72 | widget = wibox.container.margin, 73 | }, 74 | bg = bg, 75 | shape = helpers.mkroundrect(radius), 76 | }) 77 | if bg and hbg then 78 | helpers.add_hover(button, bg, hbg) 79 | end 80 | return button 81 | end 82 | 83 | -- trim strings 84 | function helpers.trim(input) 85 | local result = input:gsub("%s+", "") 86 | return string.gsub(result, "%s+", "") 87 | end 88 | 89 | function helpers.capitalize(txt) 90 | return string.upper(string.sub(txt, 1, 1)) .. string.sub(txt, 2, #txt) 91 | end 92 | 93 | function helpers.find_index(array, id) 94 | for index, value in ipairs(array) do 95 | if value == id then 96 | return index 97 | end 98 | end 99 | return nil 100 | end 101 | 102 | return helpers 103 | -------------------------------------------------------------------------------- /awesome/rc.lua: -------------------------------------------------------------------------------- 1 | -- awesome_mode: api-level=4:screen=on 2 | -- If LuaRocks is installed, make sure that packages installed through it are 3 | -- found (e.g. lgi). If LuaRocks is not installed, do nothing. 4 | pcall(require, "luarocks.loader") 5 | 6 | -- Standard awesome library 7 | local gears = require("gears") 8 | local awful = require("awful") 9 | require("awful.autofocus") 10 | -- Widget and layout library 11 | local wibox = require("wibox") 12 | -- Theme handling library 13 | local beautiful = require("beautiful") 14 | beautiful.init(gears.filesystem.get_configuration_dir() .. "theme.lua") 15 | -- Notification library 16 | local naughty = require("naughty") 17 | local gfs = require("gears.filesystem") 18 | -- Declarative object management 19 | local ruled = require("ruled") 20 | local menubar = require("menubar") 21 | local hotkeys_popup = require("awful.hotkeys_popup") 22 | local conf_path = gfs.get_configuration_dir() 23 | local bling = require("bling") 24 | local helpers = require("helpers") 25 | require("autostart") 26 | -- Enable hotkeys help widget for VIM and other apps 27 | -- when client with a matching name is opened: 28 | require("awful.hotkeys_popup.keys") 29 | 30 | -- {{{ Error handling 31 | -- Check if awesome encountered an error during startup and fell back to 32 | -- another config (This code will only ever execute for the fallback config) 33 | naughty.connect_signal("request::display_error", function(message, startup) 34 | naughty.notification({ 35 | urgency = "critical", 36 | title = "Oops, an error happened" .. (startup and " during startup!" or "!"), 37 | message = message, 38 | }) 39 | end) 40 | -- }}} 41 | 42 | --{{{Dashboard 43 | require("ui.dashboard") 44 | --}}} 45 | 46 | -- {{{ Variable definitions 47 | -- Themes define colours, icons, font and wallpapers. 48 | 49 | -- This is used later as the default terminal and editor to run. 50 | terminal = "wezterm" 51 | editor = os.getenv("EDITOR") or "nano" 52 | editor_cmd = terminal .. " -e " .. editor 53 | file_manager = "dolphin" 54 | app_launcher = "rofi -show combi" 55 | emoji = "rofi -show emoji -config .config/rofi/config_emoji.rasi" 56 | 57 | -- Default modkey. 58 | -- Usually, Mod4 is the key with a logo between Control and Alt. 59 | -- If you do not like this or do not have such a key, 60 | -- I suggest you to remap Mod4 to another key using xmodmap or other tools. 61 | -- However, you can use another modifier like Mod1, but it may interact with others. 62 | modkey = "Mod4" 63 | -- }}} 64 | 65 | -- {{{ Menu 66 | -- Create a launcher widget and a main menu 67 | myawesomemenu = { 68 | { 69 | "hotkeys", 70 | function() 71 | hotkeys_popup.show_help(nil, awful.screen.focused()) 72 | end, 73 | }, 74 | { "manual", terminal .. " -e man awesome" }, 75 | { "edit config", editor_cmd .. " " .. awesome.conffile }, 76 | { "restart", awesome.restart }, 77 | { 78 | "quit", 79 | function() 80 | awesome.quit() 81 | end, 82 | }, 83 | } 84 | 85 | mymainmenu = awful.menu({ 86 | items = { { "awesome", myawesomemenu, beautiful.awesome_icon }, { "open terminal", terminal } }, 87 | }) 88 | 89 | -- Menubar configuration 90 | menubar.utils.terminal = terminal -- Set the terminal for applications that require it 91 | -- }}} 92 | 93 | -- {{{ Tag layout 94 | -- Table of layouts to cover with awful.layout.inc, order matters. 95 | tag.connect_signal("request::default_layouts", function() 96 | awful.layout.append_default_layouts({ 97 | awful.layout.suit.floating, 98 | -- awful.layout.suit.tile, 99 | -- awful.layout.suit.tile.left, 100 | -- awful.layout.suit.tile.bottom, 101 | -- awful.layout.suit.tile.top, 102 | awful.layout.suit.fair, 103 | -- awful.layout.suit.fair.horizontal, 104 | -- awful.layout.suit.spiral, 105 | -- awful.layout.suit.spiral.dwindle, 106 | awful.layout.suit.max, 107 | awful.layout.suit.max.fullscreen, 108 | -- awful.layout.suit.magnifier, 109 | -- awful.layout.suit.corner.nw, 110 | bling.layout.mstab, 111 | -- bling.layout.centered, 112 | -- bling.layout.vertical, 113 | -- bling.layout.horizontal, 114 | bling.layout.equalarea, 115 | -- bling.layout.deck, 116 | -- awful.layout.suit.corner.ne, 117 | -- awful.layout.suit.corner.sw, 118 | -- awful.layout.suit.corner.se, 119 | }) 120 | end) 121 | -- }}} 122 | 123 | -- {{{ Wallpaper 124 | screen.connect_signal("request::wallpaper", function(s) 125 | awful.wallpaper({ 126 | screen = s, 127 | --{ 128 | widget = { 129 | image = beautiful.wallpaper, 130 | vertical_fit_policy = "fit", 131 | horizontal_fit_policy = "fit", 132 | upscale = true, 133 | downscale = true, 134 | resize = true, 135 | widget = wibox.widget.imagebox, 136 | }, 137 | -- valign = "center", 138 | -- halign = "center", 139 | -- content_fill_vertical = true, 140 | -- content_fill_horizontal = true, 141 | -- tiled = false, 142 | -- widget = wibox.container.tile, 143 | -- } 144 | }) 145 | end) 146 | -- }}} 147 | 148 | -- {{{ Wibar 149 | require("ui.wibar") 150 | -- }}} 151 | 152 | -- {{{ Mouse bindings 153 | awful.mouse.append_global_mousebindings({ 154 | awful.button({}, 3, function() 155 | mymainmenu:toggle() 156 | end), 157 | awful.button({}, 4, awful.tag.viewprev), 158 | awful.button({}, 5, awful.tag.viewnext), 159 | }) 160 | -- }}} 161 | 162 | -- {{{ Key bindings 163 | -- Custom Keys 164 | awful.keyboard.append_global_keybindings({ 165 | awful.key({ modkey }, "e", function() 166 | awful.spawn.with_shell(file_manager) 167 | end), 168 | awful.key({ "Mod1" }, "space", function() 169 | awful.spawn(app_launcher) 170 | end), 171 | awful.key({ modkey }, "period", function() 172 | awful.spawn(emoji) 173 | end), 174 | awful.key({ "Control" }, "#75", function() 175 | awful.spawn.with_shell(conf_path .. "scripts/touchpad.sh") 176 | end), 177 | awful.key({ "Mod1", "Control" }, "l", function() 178 | awful.spawn.with_shell("xkb-switch -s us && betterlockscreen -l") 179 | end), 180 | awful.key({ "Control" }, "Print", function() 181 | awful.spawn.with_shell("flameshot full -p ~/Pictures") 182 | end), 183 | awful.key({}, "Print", function() 184 | awful.spawn.with_shell("flameshot full -c") 185 | end), 186 | awful.key({ "Shift" }, "Print", function() 187 | awful.spawn.with_shell("flameshot gui -s -p ~/Pictures") 188 | end), 189 | awful.key({ "Shift", "Control" }, "Print", function() 190 | awful.spawn.with_shell("flameshot gui") 191 | end), 192 | awful.key({ "Mod1", "Control" }, "s", function() 193 | Adjust_popup.toggle() 194 | end), 195 | }) 196 | 197 | -- General Awesome keys 198 | awful.keyboard.append_global_keybindings({ 199 | awful.key({ modkey }, "s", hotkeys_popup.show_help, { description = "show help", group = "awesome" }), 200 | awful.key({ modkey }, "w", function() 201 | mymainmenu:show() 202 | end, { description = "show main menu", group = "awesome" }), 203 | awful.key({ modkey, "Control" }, "r", awesome.restart, { description = "reload awesome", group = "awesome" }), 204 | awful.key({ modkey, "Shift" }, "q", awesome.quit, { description = "quit awesome", group = "awesome" }), 205 | awful.key({ modkey }, "Return", function() 206 | awful.spawn(terminal) 207 | end, { description = "open a terminal", group = "launcher" }), 208 | awful.key({ modkey }, "p", function() 209 | menubar.show() 210 | end, { description = "show the menubar", group = "launcher" }), 211 | }) 212 | 213 | -- Tags related keybindings 214 | awful.keyboard.append_global_keybindings({ 215 | awful.key({ modkey }, "Left", awful.tag.viewprev, { description = "view previous", group = "tag" }), 216 | awful.key({ modkey }, "Right", awful.tag.viewnext, { description = "view next", group = "tag" }), 217 | awful.key({ modkey }, "Escape", awful.tag.history.restore, { description = "go back", group = "tag" }), 218 | }) 219 | 220 | -- Focus related keybindings 221 | awful.keyboard.append_global_keybindings({ 222 | awful.key({ modkey }, "j", function() 223 | awful.client.focus.byidx(1) 224 | end, { description = "focus next by index", group = "client" }), 225 | awful.key({ modkey }, "k", function() 226 | awful.client.focus.byidx(-1) 227 | end, { description = "focus previous by index", group = "client" }), 228 | awful.key({ modkey }, "Tab", function() 229 | awful.client.focus.history.previous() 230 | if client.focus then 231 | client.focus:raise() 232 | end 233 | end, { description = "go back", group = "client" }), 234 | awful.key({ modkey, "Control" }, "j", function() 235 | awful.screen.focus_relative(1) 236 | end, { description = "focus the next screen", group = "screen" }), 237 | awful.key({ modkey, "Control" }, "k", function() 238 | awful.screen.focus_relative(-1) 239 | end, { description = "focus the previous screen", group = "screen" }), 240 | awful.key({ modkey, "Control" }, "n", function() 241 | local c = awful.client.restore() 242 | -- Focus restored client 243 | if c then 244 | c:activate({ raise = true, context = "key.unminimize" }) 245 | end 246 | end, { description = "restore minimized", group = "client" }), 247 | }) 248 | 249 | -- Layout related keybindings 250 | awful.keyboard.append_global_keybindings({ 251 | awful.key({ modkey, "Shift" }, "j", function() 252 | awful.client.swap.byidx(1) 253 | end, { description = "swap with next client by index", group = "client" }), 254 | awful.key({ modkey, "Shift" }, "k", function() 255 | awful.client.swap.byidx(-1) 256 | end, { description = "swap with previous client by index", group = "client" }), 257 | awful.key({ modkey }, "u", awful.client.urgent.jumpto, { description = "jump to urgent client", group = "client" }), 258 | awful.key({ modkey }, "l", function() 259 | awful.tag.incmwfact(0.05) 260 | end, { description = "increase master width factor", group = "layout" }), 261 | awful.key({ modkey }, "h", function() 262 | awful.tag.incmwfact(-0.05) 263 | end, { description = "decrease master width factor", group = "layout" }), 264 | awful.key({ modkey, "Shift" }, "h", function() 265 | awful.tag.incnmaster(1, nil, true) 266 | end, { description = "increase the number of master clients", group = "layout" }), 267 | awful.key({ modkey, "Shift" }, "l", function() 268 | awful.tag.incnmaster(-1, nil, true) 269 | end, { description = "decrease the number of master clients", group = "layout" }), 270 | awful.key({ modkey, "Control" }, "h", function() 271 | awful.tag.incncol(1, nil, true) 272 | end, { description = "increase the number of columns", group = "layout" }), 273 | awful.key({ modkey, "Control" }, "l", function() 274 | awful.tag.incncol(-1, nil, true) 275 | end, { description = "decrease the number of columns", group = "layout" }), 276 | }) 277 | 278 | awful.keyboard.append_global_keybindings({ 279 | awful.key({ 280 | modifiers = { modkey }, 281 | keygroup = "numrow", 282 | description = "only view tag", 283 | group = "tag", 284 | on_press = function(index) 285 | local screen = awful.screen.focused() 286 | local tag = screen.tags[index] 287 | if tag then 288 | tag:view_only() 289 | end 290 | end, 291 | }), 292 | awful.key({ 293 | modifiers = { modkey, "Control" }, 294 | keygroup = "numrow", 295 | description = "toggle tag", 296 | group = "tag", 297 | on_press = function(index) 298 | local screen = awful.screen.focused() 299 | local tag = screen.tags[index] 300 | if tag then 301 | awful.tag.viewtoggle(tag) 302 | end 303 | end, 304 | }), 305 | awful.key({ 306 | modifiers = { modkey, "Shift" }, 307 | keygroup = "numrow", 308 | description = "move focused client to tag", 309 | group = "tag", 310 | on_press = function(index) 311 | if client.focus then 312 | local tag = client.focus.screen.tags[index] 313 | if tag then 314 | client.focus:move_to_tag(tag) 315 | end 316 | end 317 | end, 318 | }), 319 | awful.key({ 320 | modifiers = { modkey, "Control", "Shift" }, 321 | keygroup = "numrow", 322 | description = "toggle focused client on tag", 323 | group = "tag", 324 | on_press = function(index) 325 | if client.focus then 326 | local tag = client.focus.screen.tags[index] 327 | if tag then 328 | client.focus:toggle_tag(tag) 329 | end 330 | end 331 | end, 332 | }), 333 | awful.key({ 334 | modifiers = { modkey }, 335 | keygroup = "numpad", 336 | description = "select layout directly", 337 | group = "layout", 338 | on_press = function(index) 339 | local t = awful.screen.focused().selected_tag 340 | if t then 341 | t.layout = t.layouts[index] or t.layout 342 | end 343 | end, 344 | }), 345 | }) 346 | 347 | client.connect_signal("request::default_mousebindings", function() 348 | awful.mouse.append_client_mousebindings({ 349 | awful.button({}, 1, function(c) 350 | c:activate({ context = "mouse_click" }) 351 | end), 352 | awful.button({ modkey }, 1, function(c) 353 | c:activate({ context = "mouse_click", action = "mouse_move" }) 354 | end), 355 | awful.button({ modkey }, 3, function(c) 356 | c:activate({ context = "mouse_click", action = "mouse_resize" }) 357 | end), 358 | }) 359 | end) 360 | 361 | client.connect_signal("request::default_keybindings", function() 362 | awful.keyboard.append_client_keybindings({ 363 | awful.key({ modkey }, "f", function(c) 364 | c.fullscreen = not c.fullscreen 365 | c:raise() 366 | end, { description = "toggle fullscreen", group = "client" }), 367 | awful.key({ modkey, "Shift" }, "c", function(c) 368 | c:kill() 369 | end, { description = "close", group = "client" }), 370 | awful.key( 371 | { modkey, "Control" }, 372 | "space", 373 | awful.client.floating.toggle, 374 | { description = "toggle floating", group = "client" } 375 | ), 376 | awful.key({ modkey, "Control" }, "Return", function(c) 377 | c:swap(awful.client.getmaster()) 378 | end, { description = "move to master", group = "client" }), 379 | awful.key({ modkey }, "o", function(c) 380 | c:move_to_screen() 381 | end, { description = "move to screen", group = "client" }), 382 | awful.key({ modkey }, "t", function(c) 383 | c.ontop = not c.ontop 384 | end, { description = "toggle keep on top", group = "client" }), 385 | awful.key({ modkey }, "n", function(c) 386 | -- The client currently has the input focus, so it cannot be 387 | -- minimized, since minimized clients can't have the focus. 388 | c.minimized = true 389 | end, { description = "minimize", group = "client" }), 390 | awful.key({ modkey }, "m", function(c) 391 | c.maximized = not c.maximized 392 | c:raise() 393 | end, { description = "(un)maximize", group = "client" }), 394 | awful.key({ modkey, "Control" }, "m", function(c) 395 | c.maximized_vertical = not c.maximized_vertical 396 | c:raise() 397 | end, { description = "(un)maximize vertically", group = "client" }), 398 | awful.key({ modkey, "Shift" }, "m", function(c) 399 | c.maximized_horizontal = not c.maximized_horizontal 400 | c:raise() 401 | end, { description = "(un)maximize horizontally", group = "client" }), 402 | }) 403 | end) 404 | 405 | -- }}} 406 | 407 | -- {{{ Rules 408 | -- Rules to apply to new clients. 409 | ruled.client.connect_signal("request::rules", function() 410 | -- All clients will match this rule. 411 | ruled.client.append_rule({ 412 | id = "global", 413 | rule = {}, 414 | properties = { 415 | focus = awful.client.focus.filter, 416 | raise = true, 417 | screen = awful.screen.preferred, 418 | placement = awful.placement.no_overlap + awful.placement.no_offscreen, 419 | }, 420 | }) 421 | 422 | -- Floating clients. 423 | ruled.client.append_rule({ 424 | id = "floating", 425 | rule_any = { 426 | instance = { "copyq", "pinentry" }, 427 | class = { 428 | "Arandr", 429 | "Blueman-manager", 430 | "Gpick", 431 | "Kruler", 432 | "Sxiv", 433 | "Tor Browser", 434 | "Wpa_gui", 435 | "veromix", 436 | "xtightvncviewer", 437 | }, 438 | -- Note that the name property shown in xprop might be set slightly after creation of the client 439 | -- and the name shown there might not match defined rules here. 440 | name = { 441 | "Event Tester", -- xev. 442 | }, 443 | role = { 444 | "AlarmWindow", -- Thunderbird's calendar. 445 | "ConfigManager", -- Thunderbird's about:config. 446 | "pop-up", -- e.g. Google Chrome's (detached) Developer Tools. 447 | }, 448 | }, 449 | properties = { floating = true }, 450 | }) 451 | 452 | -- Add titlebars to normal clients and dialogs 453 | ruled.client.append_rule({ 454 | id = "titlebars", 455 | rule_any = { type = { "normal", "dialog" } }, 456 | properties = { titlebars_enabled = false }, 457 | }) 458 | 459 | -- Set Firefox to always map on the tag named "2" on screen 1. 460 | ruled.client.append_rule({ 461 | rule = { class = "firefox" }, 462 | properties = { tag = screen[1].tags[2] }, 463 | }) 464 | ruled.client.append_rule({ 465 | rule = { class = "Brave-browser-nightly" }, 466 | properties = { tag = screen[1].tags[2] }, 467 | }) 468 | ruled.client.append_rule({ 469 | rule = { class = "terminal64.exe" }, 470 | properties = { tag = screen[1].tags[3] }, 471 | }) 472 | ruled.client.append_rule({ 473 | rule = { class = "libreoffice" }, 474 | properties = { tag = screen[1].tags[5] }, 475 | }) 476 | ruled.client.append_rule({ 477 | rule = { class = "libreoffice-calc" }, 478 | properties = { tag = screen[1].tags[5] }, 479 | }) 480 | end) 481 | -- }}} 482 | 483 | -- {{{ Notifications 484 | require("ui.notifications.notifications") 485 | -- }}} 486 | 487 | -- Enable sloppy focus, so that focus follows mouse. 488 | client.connect_signal("mouse::enter", function(c) 489 | c:activate({ context = "mouse_enter", raise = false }) 490 | end) 491 | -------------------------------------------------------------------------------- /awesome/scripts/ram.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/sh 2 | # 3 | while true 4 | do 5 | free | grep Mem | awk '{print $3/$2}' 6 | sleep 4 7 | done 8 | -------------------------------------------------------------------------------- /awesome/scripts/temp.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | case $@ in 4 | cpu | Cpu | CPU ) 5 | sensors | awk -F\ '/[Pp]ackage\ id\ 0/{print $4}' 2>/dev/null | grep -E -o '[0-9]{2,3}' 6 | ;; 7 | 8 | fan-speed) 9 | sensors | awk -F\ '/cpu_fan/{print $2}' 2>/dev/null 10 | ;; 11 | 12 | gpu | Gpu | GPU) 13 | sensors | sed -n $(sensors | sed -n '/GPU/='),+4p | awk -F\ '/temp1/{print $2}' 2>/dev/null 14 | ;; 15 | *) 16 | exit 0 17 | ;; 18 | 19 | esac 20 | 21 | -------------------------------------------------------------------------------- /awesome/scripts/touchpad.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | state=$(xinput --list-props "ETPS/2 Elantech Touchpad" | grep "Device Enabled" | cut -d\ -f3 | cut -f2) 4 | 5 | if (($state=="1")); then 6 | xinput --disable "ETPS/2 Elantech Touchpad" 7 | notify-send -te 1800 "Touchpad OFF" 8 | elif (($state=="0")); then 9 | xinput --enable "ETPS/2 Elantech Touchpad" 10 | notify-send -te 1800 "Touchpad ON" 11 | fi 12 | -------------------------------------------------------------------------------- /awesome/theme.lua: -------------------------------------------------------------------------------- 1 | --------------------------- 2 | -- Default awesome theme -- 3 | --------------------------- 4 | local theme_assets = require("beautiful.theme_assets") 5 | local xresources = require("beautiful.xresources") 6 | local dpi = xresources.apply_dpi 7 | local gfs = require("gears.filesystem") 8 | local themes_path = gfs.get_themes_dir() 9 | local conf_path = gfs.get_configuration_dir() 10 | local gears = require("gears") 11 | 12 | local theme = {} 13 | 14 | theme.font = "JetBrains Mono 10" 15 | -- theme.font = "Cascadia Code 10" 16 | theme.nerd_font = "Cascadia Code" 17 | theme.nerd_font_mono = "Cascadia Code" 18 | 19 | --Color Scheme 20 | --Well_intentions 21 | --Liberated_nomads 22 | theme.White = "#ECEEE9" 23 | theme.Off_white = "#D5CEB4" 24 | theme.Teal_blue = "#0091A2" 25 | theme.Dusk_blue = "#1D538F" 26 | -- theme.Dark_grey_blue = "#36576A" 27 | theme.Dark_grey_blue = "#162635" 28 | theme.Medium_pink = "#B7386F" 29 | theme.Peachy_pink = "#CD7069" 30 | theme.Dusty_red = "#AC343D" 31 | theme.Custard = "#D0D34E" 32 | theme.Blue_green = "#006B59" 33 | theme.Slate = "#3E5E6B" 34 | theme.Blue_grey = "#969FBE" 35 | theme.Dark_grey = "#333333" 36 | 37 | theme.fg_normal = theme.White 38 | theme.fg_focus = theme.Off_white 39 | theme.fg_minimize = theme.Custard 40 | theme.fg_urgent = theme.Peachy_pink 41 | theme.bg_systray = theme.bg_normal 42 | theme.systray_icon_spacing = 3 43 | theme.bg_focus_hover = theme.Dark_grey_blue 44 | theme.bg_focus_hover_1 = theme.Teal_blue 45 | theme.bg_notification_urgent = theme.Peachy_pink 46 | 47 | theme.bg_normal = theme.Dark_grey_blue 48 | theme.bg_focus = theme.Teal_blue 49 | theme.bg_urgent = theme.Peachy_pink 50 | theme.bg_minimize = theme.Custard 51 | theme.fg_critical = theme.Medium_pink 52 | theme.fg_calm = theme.Blue_green 53 | theme.fg_calm_2 = theme.Teal_blue 54 | theme.fg_notification_normal = theme.Off_white 55 | 56 | theme.calendar_bg_normal = theme.Slate 57 | theme.calendar_bg_focus = theme.Dusk_blue 58 | 59 | theme.weather_day = theme.fg_focus 60 | theme.weather_night = theme.fg_calm_2 61 | -- theme.weather_max = theme.Peachy_pink 62 | -- theme.weather_min = theme.Blue_green 63 | 64 | theme.useless_gap = dpi(3) 65 | theme.border_width = dpi(1) 66 | theme.border_color_normal = theme.gray 67 | -- theme.border_color_active = theme.red 68 | theme.border_color_marked = theme.alt_white 69 | 70 | local function rounded_shape(size, partial) 71 | if partial then 72 | return function(cr, width, height) 73 | gears.shape.partially_rounded_rect(cr, width, height, false, true, false, true, 5) 74 | end 75 | else 76 | return function(cr, width, height) 77 | gears.shape.rounded_rect(cr, width, height, size) 78 | end 79 | end 80 | end 81 | 82 | -- theme.calendar_month_border_width = 1 83 | -- theme.calendar_month_padding = 5 84 | -- theme.calendar_month_shape = rounded_shape(5) 85 | -- theme.calendar_normal_shape = rounded_shape(5) 86 | -- -- theme.calendar_normal_bg_color = (weekday == 4) and "#ff9800" or "#de5e1e" 87 | -- theme.calendar_focus_fg_color = theme.black 88 | -- theme.calendar_focus_bg_color = theme.lightred .. "aa" 89 | -- theme.calendar_focus_shape = rounded_shape(5, true) 90 | -- theme.calendar_focus_markup = function(t) return '' .. t .. '' end 91 | -- theme.calendar_header_fg_color = theme.orange 92 | -- theme.calendar_header_shape = rounded_shape(10) 93 | -- theme.calendar_header_markup = function(t) return '' .. t .. '' end 94 | -- theme.calendar_weekday_shape = rounded_shape(5) 95 | -- theme.calendar_weekday_markup = function(t) return '' .. t .. '' end 96 | -- theme.calendar_weekday_fg_color = theme.white 97 | 98 | -- theme.notification_bg= theme.yellow 99 | 100 | -- There are other variable sets 101 | -- overriding the default one when 102 | -- defined, the sets are: 103 | -- taglist_[bg|fg]_[focus|urgent|occupied|empty|volatile] 104 | -- tasklist_[bg|fg]_[focus|urgent] 105 | -- titlebar_[bg|fg]_[normal|focus] 106 | -- tooltip_[font|opacity|fg_color|bg_color|border_width|border_color] 107 | -- prompt_[fg|bg|fg_cursor|bg_cursor|font] 108 | -- hotkeys_[bg|fg|border_width|border_color|shape|opacity|modifiers_fg|label_bg|label_fg|group_margin|font|description_font] 109 | -- Example: 110 | theme.taglist_bg_focus = theme.bg_focus .. "bb" 111 | -- theme.taglist_bg_focus = theme.bg_normal 112 | -- theme.taglist_bg_occupied = theme.bg_focus 113 | theme.taglist_bg_urgent = theme.bg_urgent .. "66" 114 | theme.taglist_bg_empty = theme.bg_normal 115 | theme.taglist_fg_empty = theme.fg_focus .. "70" 116 | theme.taglist_fg_focus = theme.fg_normal 117 | theme.taglist_fg_occupied = theme.Off_white .. "cc" 118 | 119 | theme.tasklist_bg_normal = theme.bg_focus .. "39" 120 | theme.tasklist_bg_focus = theme.bg_focus .. "bb" 121 | theme.tasklist_bg_urgent = theme.bg_urgent .. "aa" 122 | theme.tasklist_bg_minimize = theme.bg_minimize .. "44" 123 | theme.tasklist_fg_focus = theme.fg_normal 124 | theme.tasklist_fg_minimize = theme.fg_normal 125 | 126 | -- Generate taglist squares: 127 | local taglist_square_size = dpi(0) 128 | -- theme.taglist_squares_sel = theme_assets.taglist_squares_sel( 129 | -- taglist_square_size, theme.fg_normal 130 | -- ) 131 | -- theme.taglist_squares_unsel = theme_assets.taglist_squares_unsel( 132 | -- taglist_square_size, theme.fg_normal 133 | -- ) 134 | 135 | -- Variables set for theming notifications: 136 | -- notification_font 137 | -- notification_[bg|fg] 138 | -- notification_[width|height|margin] 139 | -- notification_[border_color|border_width|shape|opacity] 140 | 141 | -- Variables set for theming the menu: 142 | -- menu_[bg|fg]_[normal|focus] 143 | -- menu_[border_color|border_width] 144 | theme.menu_submenu_icon = themes_path .. "default/submenu.png" 145 | theme.menu_height = dpi(25) 146 | theme.menu_width = dpi(200) 147 | 148 | -- You can add as many variables as 149 | -- you wish and access them by using 150 | -- beautiful.variable in your rc.lua 151 | --theme.bg_widget = "#cc0000" 152 | 153 | theme.wallpaper = conf_path .. "Wallpaper/wp.jpg" 154 | -- theme.wallpaper = conf_path .. "Wallpaper/wp.png" 155 | 156 | -- You can use your own layout icons like this: 157 | theme.layout_fairh = gears.color.recolor_image(themes_path .. "default/layouts/fairhw.png", theme.fg_normal) 158 | theme.layout_fairv = gears.color.recolor_image(themes_path .. "default/layouts/fairvw.png", theme.fg_normal) 159 | theme.layout_floating = gears.color.recolor_image(themes_path .. "default/layouts/floatingw.png", theme.fg_normal) 160 | theme.layout_magnifier = gears.color.recolor_image(themes_path .. "default/layouts/magnifierw.png", theme.fg_normal) 161 | theme.layout_max = gears.color.recolor_image(themes_path .. "default/layouts/maxw.png", theme.fg_normal) 162 | theme.layout_fullscreen = gears.color.recolor_image(themes_path .. "default/layouts/fullscreenw.png", theme.fg_normal) 163 | theme.layout_tilebottom = gears.color.recolor_image(themes_path .. "default/layouts/tilebottomw.png", theme.fg_normal) 164 | theme.layout_tileleft = gears.color.recolor_image(themes_path .. "default/layouts/tileleftw.png", theme.fg_normal) 165 | theme.layout_tile = gears.color.recolor_image(themes_path .. "default/layouts/tilew.png", theme.fg_normal) 166 | theme.layout_tiletop = gears.color.recolor_image(themes_path .. "default/layouts/tiletopw.png", theme.fg_normal) 167 | theme.layout_spiral = gears.color.recolor_image(themes_path .. "default/layouts/spiralw.png", theme.fg_normal) 168 | theme.layout_dwindle = gears.color.recolor_image(themes_path .. "default/layouts/dwindlew.png", theme.fg_normal) 169 | theme.layout_cornernw = gears.color.recolor_image(themes_path .. "default/layouts/cornernww.png", theme.fg_normal) 170 | theme.layout_cornerne = gears.color.recolor_image(themes_path .. "default/layouts/cornernew.png", theme.fg_normal) 171 | theme.layout_cornersw = gears.color.recolor_image(themes_path .. "default/layouts/cornersww.png", theme.fg_normal) 172 | theme.layout_cornerse = gears.color.recolor_image(themes_path .. "default/layouts/cornersew.png", theme.fg_normal) 173 | 174 | -- Generate Awesome icon: 175 | theme.awesome_icon = theme_assets.awesome_icon(theme.menu_height, theme.bg_focus, theme.fg_focus) 176 | theme.notification_icon = conf_path .. "assets/icons/Light/alarm.svg" 177 | -- theme.notification_icon = gears.color.recolor_image(conf_path .. "assets/icons/alarm1.svg", theme.fg_normal) 178 | theme.notification_icon_empty = conf_path .. "assets/icons/Light/bell1.svg" 179 | -- theme.dashboard_icon = conf_path .. "assets/icons/preference.png" 180 | theme.dashboard_icon = gears.color.recolor_image(conf_path .. "assets/icons/preference.png", theme.fg_normal) 181 | theme.notifications_delete_icon = conf_path .. "assets/icons/Light/broom1.svg" 182 | theme.shutdown_icon = conf_path .. "assets/icons/shutdown.svg" 183 | theme.reboot_icon = conf_path .. "assets/icons/reboot1.svg" 184 | theme.logout_icon = conf_path .. "assets/icons/logout.svg" 185 | theme.lockscreen_icon = conf_path .. "assets/icons/lockscreen.svg" 186 | 187 | -- Define the icon theme for application icons. If not set then the icons 188 | -- from /usr/share/icons and /usr/share/icons/hicolor will be used. 189 | theme.icon_theme = "Zafiro-Icons-Dark-Blue-f" 190 | 191 | return theme 192 | 193 | -- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80 194 | -------------------------------------------------------------------------------- /awesome/ui/dashboard/dashboard.lua: -------------------------------------------------------------------------------- 1 | local beautiful = require("beautiful") 2 | local wibox = require("wibox") 3 | local awful = require("awful") 4 | local gears = require("gears") 5 | local helpers = require("helpers") 6 | local conf_path = gears.filesystem.get_configuration_dir() 7 | 8 | --{{{ُSliders 9 | local function mkslider(args) 10 | args.minimum = args.minimum or 0 11 | args.maximum = args.maximum or 100 12 | args.bar_height = args.bar_height or 30 13 | args.forced_width = args.forced_width or 235 14 | args.forced_height = args.forced_height or args.bar_height 15 | args.icon = args.icon or "" 16 | args.buttons = args.buttons 17 | args.bar_color = args.bar_color or beautiful.bg_focus .. "aa" 18 | args.bar_active_color = args.bar_active_color or beautiful.fg_normal 19 | return wibox.widget({ 20 | { 21 | id = "icon_role", 22 | markup = helpers.get_colorized_markup(args.icon, args.bar_active_color), 23 | font = beautiful.nerd_font_mono .. " 25", 24 | valign = "center", 25 | halign = "left", 26 | forced_width = 35, 27 | buttons = args.buttons, 28 | widget = wibox.widget.textbox, 29 | }, 30 | { 31 | id = "slider_role", 32 | minimum = args.minimum, 33 | maximum = args.maximum, 34 | bar_shape = gears.shape.rounded_bar, 35 | bar_height = args.bar_height, 36 | bar_color = args.bar_color, 37 | bar_active_color = args.bar_active_color, 38 | valign = "center", 39 | halign = "center", 40 | handle_width = args.bar_height, 41 | handle_shape = gears.shape.circle, 42 | handle_color = args.bar_active_color, 43 | forced_width = args.forced_width, 44 | forced_height = args.forced_height, 45 | widget = wibox.widget.slider, 46 | backup_active_color = args.bar_active_color, 47 | }, 48 | { 49 | id = "text_role", 50 | valign = "center", 51 | halign = "center", 52 | font = beautiful.nerd_font .. " 12", 53 | forced_height = args.bar_height, 54 | forced_width = 30, 55 | widget = wibox.widget.textbox, 56 | }, 57 | spacing = 4, 58 | layout = wibox.layout.fixed.horizontal, 59 | set_value = function(self, new_value) 60 | self:get_children_by_id("slider_role")[1].value = new_value 61 | self.text_role.markup = 62 | helpers.get_colorized_markup("" .. helpers.trim(new_value) .. "", args.bar_active_color) 63 | end, 64 | }) 65 | end 66 | 67 | Volume_slider = mkslider({ 68 | minimum = 0, 69 | maximum = 150, 70 | icon = "", 71 | bar_active_color = beautiful.fg_focus, 72 | buttons = gears.table.join(awful.button({}, 1, function() 73 | awful.spawn("pavucontrol") 74 | end)), 75 | }) 76 | 77 | Brightness_slider = mkslider({ 78 | minimum = 0, 79 | maximum = 100, 80 | icon = "󱩔", 81 | bar_active_color = beautiful.fg_focus, 82 | }) 83 | 84 | awful.spawn.easy_async_with_shell( 85 | "sleep 30 && pactl get-sink-volume $(pactl info | grep 'Default Sink' | cut -d ' ' -f3) | awk {'print $5'} | sed 's/%//'", 86 | function(out) 87 | Volume_slider.value = helpers.trim(out) 88 | end 89 | ) 90 | 91 | awful.spawn.easy_async_with_shell("xrandr --verbose | grep 'Brightness' | awk {'print $2'}", function(out) 92 | Brightness_slider.value = out * 100 93 | end) 94 | 95 | Volume_popup = awful.popup({ 96 | widget = { 97 | Volume_slider, 98 | margins = 20, 99 | widget = wibox.container.margin, 100 | }, 101 | ontop = true, 102 | honor_workarea = true, 103 | bg = beautiful.bg_normal, 104 | visible = false, 105 | shape = helpers.mkroundrect(), 106 | placement = awful.placement.centered, 107 | }) 108 | 109 | Brightness_popup = awful.popup({ 110 | widget = { 111 | Brightness_slider, 112 | margins = 20, 113 | widget = wibox.container.margin, 114 | }, 115 | ontop = true, 116 | honor_workarea = true, 117 | bg = beautiful.bg_normal, 118 | visible = false, 119 | shape = helpers.mkroundrect(), 120 | placement = awful.placement.centered, 121 | }) 122 | 123 | Volume_slider:get_children_by_id("slider_role")[1]:connect_signal("property::value", function(self, new_value) 124 | awful.spawn.with_shell( 125 | "pactl set-sink-volume $(pactl info | grep 'Default Sink' | cut -d ' ' -f3) " .. new_value .. "%" 126 | ) 127 | Volume_slider.text_role.markup = helpers.get_colorized_markup( 128 | "" .. tostring(new_value) .. "", 129 | new_value <= 100 and self.backup_active_color or beautiful.bg_urgent 130 | ) 131 | Volume_slider.icon_role.markup = 132 | helpers.get_colorized_markup("", new_value <= 100 and self.backup_active_color or beautiful.bg_urgent) 133 | self.bar_active_color = new_value <= 100 and self.backup_active_color or beautiful.bg_urgent 134 | self.handle_color = new_value <= 100 and self.backup_active_color or beautiful.bg_urgent 135 | end) 136 | 137 | Brightness_slider:get_children_by_id("slider_role")[1]:connect_signal("property::value", function(self, new_value) 138 | awful.spawn.with_shell("xrandr --output LVDS-1 --brightness " .. new_value / 100) 139 | Brightness_slider.text_role.markup = 140 | helpers.get_colorized_markup("" .. tostring(new_value) .. "", self.bar_active_color) 141 | end) 142 | 143 | function Volume_popup.hide() 144 | Volume_popup.visible = false 145 | end 146 | 147 | function Volume_popup.show() 148 | Volume_popup.visible = true 149 | end 150 | 151 | function Brightness_popup.hide() 152 | Brightness_popup.visible = false 153 | end 154 | 155 | function Brightness_popup.show() 156 | Brightness_popup.visible = true 157 | end 158 | 159 | Brightness_down = awful.keygrabber({ 160 | keybindings = { 161 | awful.key({}, "XF86MonBrightnessDown", function() 162 | awful.spawn.easy_async_with_shell( 163 | "xrandr --output LVDS-1 --brightness $[$(xrandr --verbose | grep 'Brightness' | awk {'print $2'}) - .1] && xrandr --verbose | grep 'Brightness' | awk {'print $2'}", 164 | function(out) 165 | Brightness_slider.value = out * 100 166 | Brightness_popup.show() 167 | end 168 | ) 169 | end), 170 | }, 171 | autostart = false, 172 | stop_key = "XF86MonBrightnessUp", 173 | timeout = 0.5, 174 | stop_event = "press", 175 | keypressed_callback = function() 176 | awful.spawn.easy_async_with_shell( 177 | "xrandr --output LVDS-1 --brightness $[$(xrandr --verbose | grep 'Brightness' | awk {'print $2'}) - .1] && xrandr --verbose | grep 'Brightness' | awk {'print $2'}", 178 | function(out) 179 | Brightness_slider.value = out * 100 180 | end 181 | ) 182 | end, 183 | timeout_callback = function() 184 | Brightness_popup.hide() 185 | end, 186 | export_keybindings = true, 187 | }) 188 | 189 | Brightness_up = awful.keygrabber({ 190 | keybindings = { 191 | awful.key({}, "XF86MonBrightnessUp", function() 192 | awful.spawn.easy_async_with_shell( 193 | "xrandr --output LVDS-1 --brightness $[$(xrandr --verbose | grep 'Brightness' | awk {'print $2'}) + .1] && xrandr --verbose | grep 'Brightness' | awk {'print $2'}", 194 | function(out) 195 | Brightness_slider.value = out * 100 196 | Brightness_popup.show() 197 | end 198 | ) 199 | end), 200 | }, 201 | autostart = false, 202 | stop_key = "XF86MonBrightnessDown", 203 | timeout = 0.5, 204 | stop_event = "press", 205 | keypressed_callback = function() 206 | awful.spawn.easy_async_with_shell( 207 | "xrandr --output LVDS-1 --brightness $[$(xrandr --verbose | grep 'Brightness' | awk {'print $2'}) + .1] && xrandr --verbose | grep 'Brightness' | awk {'print $2'}", 208 | function(out) 209 | Brightness_slider.value = out * 100 210 | end 211 | ) 212 | end, 213 | timeout_callback = function() 214 | Brightness_popup.hide() 215 | end, 216 | export_keybindings = true, 217 | }) 218 | 219 | Volume_down = awful.keygrabber({ 220 | keybindings = { 221 | awful.key({}, "XF86AudioLowerVolume", function() 222 | awful.spawn.easy_async_with_shell( 223 | "pactl set-sink-volume $(pactl info | grep 'Default Sink' | cut -d ' ' -f3) -5% && pactl get-sink-volume $(pactl info | grep 'Default Sink' | cut -d ' ' -f3) | awk {'print $5'} | sed 's/%//'", 224 | function(out) 225 | Volume_slider.value = out 226 | Volume_popup.show() 227 | end 228 | ) 229 | end), 230 | }, 231 | autostart = false, 232 | stop_key = "XF86AudioRaiseVolume", 233 | timeout = 0.5, 234 | stop_event = "press", 235 | keypressed_callback = function() 236 | awful.spawn.easy_async_with_shell( 237 | "pactl set-sink-volume $(pactl info | grep 'Default Sink' | cut -d ' ' -f3) -5% && pactl get-sink-volume $(pactl info | grep 'Default Sink' | cut -d ' ' -f3) | awk {'print $5'} | sed 's/%//'", 238 | function(out) 239 | Volume_slider.value = out 240 | end 241 | ) 242 | end, 243 | timeout_callback = function() 244 | Volume_popup.hide() 245 | end, 246 | export_keybindings = true, 247 | }) 248 | 249 | Volume_up = awful.keygrabber({ 250 | keybindings = { 251 | awful.key({}, "XF86AudioRaiseVolume", function() 252 | awful.spawn.easy_async_with_shell( 253 | "pactl set-sink-volume $(pactl info | grep 'Default Sink' | cut -d ' ' -f3) +5% && pactl get-sink-volume $(pactl info | grep 'Default Sink' | cut -d ' ' -f3) | awk {'print $5'} | sed 's/%//'", 254 | function(out) 255 | Volume_slider.value = out 256 | Volume_popup.show() 257 | end 258 | ) 259 | end), 260 | }, 261 | autostart = false, 262 | stop_key = "XF86AudioLowerVolume", 263 | timeout = 0.5, 264 | stop_event = "press", 265 | keypressed_callback = function() 266 | awful.spawn.easy_async_with_shell( 267 | "pactl set-sink-volume $(pactl info | grep 'Default Sink' | cut -d ' ' -f3) +5% && pactl get-sink-volume $(pactl info | grep 'Default Sink' | cut -d ' ' -f3) | awk {'print $5'} | sed 's/%//'", 268 | function(out) 269 | Volume_slider.value = out 270 | end 271 | ) 272 | end, 273 | timeout_callback = function() 274 | Volume_popup.hide() 275 | end, 276 | export_keybindings = true, 277 | }) 278 | 279 | --The popup in the notification Sidebar 280 | local sliders = wibox.widget({ 281 | { 282 | { 283 | { 284 | { 285 | { 286 | Volume_slider, 287 | Brightness_slider, 288 | spacing = 6, 289 | layout = wibox.layout.fixed.vertical, 290 | }, 291 | valign = "center", 292 | halign = "center", 293 | widget = wibox.container.place, 294 | }, 295 | top = 10, 296 | bottom = 10, 297 | left = 10, 298 | right = 10, 299 | widget = wibox.container.margin, 300 | }, 301 | shape = helpers.mkroundrect(), 302 | border_width = 2, 303 | border_color = beautiful.fg_focus, 304 | bg = beautiful.bg_normal, 305 | widget = wibox.container.background, 306 | }, 307 | layout = wibox.layout.fixed.horizontal, 308 | }, 309 | layout = wibox.layout.fixed.vertical, 310 | }) 311 | --}}} 312 | 313 | --{{{PowerButtons 314 | local function mkpowerbutton(icon, button_action) 315 | local button = wibox.widget({ 316 | { 317 | { 318 | image = icon, 319 | scaling_quality = "best", 320 | valign = "center", 321 | halign = "center", 322 | forced_width = 28, 323 | forced_height = 28, 324 | widget = wibox.widget.imagebox, 325 | }, 326 | margins = 10, 327 | widget = wibox.container.margin, 328 | }, 329 | bg = beautiful.bg_normal, 330 | border_width = 2, 331 | border_color = beautiful.fg_focus, 332 | shape = helpers.mkroundrect(), 333 | buttons = button_action, 334 | widget = wibox.container.background, 335 | }) 336 | helpers.add_hover(button, beautiful.bg_normal .. "55", beautiful.bg_focus) 337 | return button 338 | end 339 | 340 | local powermenu = wibox.widget({ 341 | { 342 | { 343 | { 344 | mkpowerbutton( 345 | beautiful.shutdown_icon, 346 | gears.table.join(awful.button({}, 1, function() 347 | awful.spawn.with_shell("shutdown now") 348 | end)) 349 | ), 350 | mkpowerbutton( 351 | beautiful.reboot_icon, 352 | gears.table.join(awful.button({}, 1, function() 353 | awful.spawn.with_shell("reboot") 354 | end)) 355 | ), 356 | mkpowerbutton( 357 | beautiful.logout_icon, 358 | gears.table.join(awful.button({}, 1, function() 359 | awesome.quit() 360 | end)) 361 | ), 362 | mkpowerbutton( 363 | beautiful.lockscreen_icon, 364 | gears.table.join(awful.button({}, 1, function() 365 | awful.spawn.with_shell("betterlockscreen -l") 366 | end)) 367 | ), 368 | spacing = 10, 369 | layout = wibox.layout.fixed.horizontal, 370 | }, 371 | valign = "center", 372 | halign = "center", 373 | widget = wibox.container.place, 374 | }, 375 | top = 10, 376 | bottom = 10, 377 | widget = wibox.container.margin, 378 | }, 379 | shape = helpers.mkroundrect(), 380 | border_width = 2, 381 | border_color = beautiful.fg_focus, 382 | bg = beautiful.bg_normal, 383 | widget = wibox.container.background, 384 | }) 385 | --}}} 386 | 387 | --{{{Sensors 388 | local function mk_sensor(args) 389 | args.icon = args.icon or "" 390 | args.min_value = args.min_value or 0 391 | args.max_value = args.max_value or 100 392 | args.color = args.color or beautiful.fg_normal 393 | args.max_color = args.max_color or beautiful.fg_critical 394 | args.min_color = args.min_color or beautiful.fg_calm 395 | return wibox.widget({ 396 | { 397 | { 398 | { 399 | id = "icon_role", 400 | markup = helpers.get_colorized_markup(args.icon, args.color), 401 | font = beautiful.nerd_font .. " 24", 402 | valign = "center", 403 | halign = "center", 404 | forced_width = 30, 405 | forced_height = 30, 406 | widget = wibox.widget.textbox, 407 | }, 408 | id = "radial_role", 409 | value = 0, 410 | min_value = args.min_value, 411 | max_value = args.max_value, 412 | color = args.color, 413 | border_width = 12, 414 | forced_width = 110, 415 | forced_height = 110, 416 | border_color = "#00000000", 417 | widget = wibox.container.radialprogressbar, 418 | }, 419 | margins = 20, 420 | widget = wibox.container.margin, 421 | }, 422 | bg = beautiful.bg_normal, 423 | -- shape = helpers.mkroundrect(), 424 | shape = gears.shape.circle, 425 | border_width = 2, 426 | border_color = beautiful.fg_focus, 427 | widget = wibox.container.background, 428 | set_value = function(self, new_value) 429 | self:get_children_by_id("radial_role")[1].value = new_value 430 | end, 431 | set_color = function(self, new_value) 432 | self:get_children_by_id("radial_role")[1].color = (new_value > 80 and args.max_color) 433 | or (new_value < 60 and args.min_color) 434 | or args.color 435 | self:get_children_by_id("icon_role")[1].markup = helpers.get_colorized_markup( 436 | args.icon, 437 | (new_value > 80 and args.max_color) or (new_value < 60 and args.min_color) or args.color 438 | ) 439 | end, 440 | }) 441 | end 442 | 443 | Temp_sensor = mk_sensor({ 444 | icon = "  ", 445 | color = beautiful.fg_focus, 446 | min_value = 0, 447 | max_value = 105, 448 | }) 449 | Ram_sensor = mk_sensor({ icon = "  ", min_value = 0, max_value = 100, color = beautiful.fg_focus }) 450 | Cpu_sensor = mk_sensor({ icon = "  ", color = beautiful.fg_focus }) 451 | Disk_sensor = mk_sensor({ icon = "  ", color = beautiful.fg_focus }) 452 | 453 | temp_timer = gears.timer({ 454 | timeout = 4, 455 | call_now = true, 456 | autostart = false, 457 | callback = function() 458 | awful.spawn.easy_async_with_shell(conf_path .. "scripts/temp.sh cpu", function(output) 459 | Temp_sensor.value = tonumber(output) 460 | Temp_sensor.color = tonumber(output) 461 | end) 462 | end, 463 | }) 464 | ram_timer = gears.timer({ 465 | timeout = 4, 466 | call_now = true, 467 | autostart = false, 468 | callback = function() 469 | awful.spawn.easy_async_with_shell("free | grep Mem | awk '{print $3/$2}' ", function(output) 470 | Ram_sensor.value = tonumber(output) * 100 471 | end) 472 | end, 473 | }) 474 | cpu_timer = gears.timer({ 475 | timeout = 2, 476 | call_now = true, 477 | autostart = false, 478 | callback = function() 479 | awful.spawn.easy_async_with_shell( 480 | "awk '{u=$2+$4; t=$2+$4+$5; if (NR==1){u1=u; t1=t;} else print ($2+$4-u1) * 100 / (t-t1); }' <(grep 'cpu ' /proc/stat) <(sleep 1;grep 'cpu ' /proc/stat)", 481 | function(output) 482 | Cpu_sensor.value = tonumber(output) 483 | end 484 | ) 485 | end, 486 | }) 487 | 488 | disk_timer = gears.timer({ 489 | timeout = 15, 490 | call_now = true, 491 | autostart = false, 492 | callback = function() 493 | awful.spawn.easy_async_with_shell("df --output=pcent / | tail -n 1 | sed 's/%//g' | xargs", function(output) 494 | Disk_sensor.value = tonumber(output) 495 | end) 496 | end, 497 | }) 498 | 499 | --}}} 500 | 501 | --{{{Calendar 502 | local styles = {} 503 | local function rounded_shape(size, partial) 504 | if partial then 505 | return function(cr, width, height) 506 | gears.shape.partially_rounded_rect(cr, width, height, false, true, false, true, 5) 507 | end 508 | else 509 | return function(cr, width, height) 510 | gears.shape.rounded_rect(cr, width, height, size) 511 | end 512 | end 513 | end 514 | styles.month = { 515 | padding = 8, 516 | bg_color = beautiful.bg_normal, 517 | border_width = 0, 518 | } 519 | styles.normal = { 520 | shape = rounded_shape(5), 521 | fg_color = beautiful.fg_focus, 522 | bg_color = beautiful.calendar_bg_normal .. "aa", 523 | } 524 | styles.focus = { 525 | fg_color = beautiful.fg_normal, 526 | bg_color = beautiful.calendar_bg_focus, 527 | markup = function(t) 528 | return "" .. t .. "" 529 | end, 530 | shape = rounded_shape(5, true), 531 | } 532 | styles.header = { 533 | fg_color = beautiful.fg_normal, 534 | bg_color = beautiful.calendar_bg_normal .. "99", 535 | markup = function(t) 536 | return "" .. t .. "" 537 | end, 538 | shape = rounded_shape(10), 539 | } 540 | styles.weekday = { 541 | fg_color = beautiful.fg_calm_2, 542 | bg_color = beautiful.calendar_bg_normal .. "aa", 543 | markup = function(t) 544 | return "" .. t .. "" 545 | end, 546 | shape = rounded_shape(5), 547 | } 548 | local function decorate_cell(widget, flag, date) 549 | if flag == "monthheader" and not styles.monthheader then 550 | flag = "header" 551 | end 552 | local props = styles[flag] or {} 553 | if props.markup and widget.get_text and widget.set_markup then 554 | widget:set_markup(props.markup(widget:get_text())) 555 | end 556 | -- Change bg color for weekends 557 | local d = { year = date.year, month = (date.month or 1), day = (date.day or 1) } 558 | local weekday = tonumber(os.date("%w", os.time(d))) 559 | local default_bg = (weekday == 0 or weekday == 6) and "#232323" or "#383838" 560 | local ret = wibox.widget({ 561 | { 562 | widget, 563 | margins = (props.padding or 2) + (props.border_width or 0), 564 | widget = wibox.container.margin, 565 | }, 566 | shape = props.shape, 567 | border_color = props.border_color or "#b9214f", 568 | border_width = props.border_width or 0, 569 | fg = props.fg_color or "#999999", 570 | bg = props.bg_color or default_bg, 571 | widget = wibox.container.background, 572 | }) 573 | return ret 574 | end 575 | local calendar_widget = wibox.widget({ 576 | id = "calendar_role", 577 | date = os.date("*t"), 578 | spacing = 3, 579 | forced_height = 225, 580 | long_weekdays = true, 581 | start_sunday = true, 582 | fn_embed = decorate_cell, 583 | widget = wibox.widget.calendar.month, 584 | }) 585 | 586 | local current_month = os.date("*t").month 587 | Calendar = wibox.widget({ 588 | { 589 | calendar_widget, 590 | { 591 | { 592 | { 593 | markup = helpers.get_colorized_markup(" ", beautiful.fg_normal), 594 | font = beautiful.nerd_font .. " 14", 595 | valign = "center", 596 | halign = "right", 597 | widget = wibox.widget.textbox, 598 | buttons = { 599 | awful.button({}, 1, function() 600 | calendar_widget.date = os.date("*t") 601 | end), 602 | }, 603 | }, 604 | { 605 | markup = helpers.get_colorized_markup("", beautiful.fg_normal), 606 | font = beautiful.nerd_font .. " 14", 607 | valign = "center", 608 | halign = "right", 609 | widget = wibox.widget.textbox, 610 | buttons = { 611 | awful.button({}, 1, function() 612 | local calendar_current_month = calendar_widget.date.month - 1 613 | if calendar_current_month == current_month then 614 | calendar_widget.date = os.date("*t") 615 | else 616 | calendar_widget.date = 617 | { month = calendar_current_month, year = calendar_widget.date.year } 618 | end 619 | end), 620 | }, 621 | }, 622 | { 623 | markup = helpers.get_colorized_markup("", beautiful.fg_normal), 624 | font = beautiful.nerd_font .. " 14", 625 | valign = "center", 626 | halign = "right", 627 | widget = wibox.widget.textbox, 628 | buttons = { 629 | awful.button({}, 1, function() 630 | local calendar_current_month = calendar_widget.date.month + 1 631 | if calendar_current_month == current_month then 632 | calendar_widget.date = os.date("*t") 633 | else 634 | calendar_widget.date = 635 | { month = calendar_current_month, year = calendar_widget.date.year } 636 | end 637 | end), 638 | }, 639 | }, 640 | forced_width = 55, 641 | forced_height = 30, 642 | spacing = 6, 643 | layout = wibox.layout.fixed.horizontal, 644 | }, 645 | halign = "right", 646 | widget = wibox.container.place, 647 | }, 648 | layout = wibox.layout.align.vertical, 649 | }, 650 | bg = beautiful.bg_normal, 651 | shape = helpers.mkroundrect(), 652 | border_width = 2, 653 | border_color = beautiful.fg_normal, 654 | widget = wibox.container.background, 655 | }) 656 | 657 | --}}} 658 | 659 | require("ui.dashboard.weather_widget") 660 | --{{{Dashboard 661 | Dashboard_wibox = awful.popup({ 662 | widget = { 663 | powermenu, 664 | sliders, 665 | { 666 | { 667 | { 668 | Temp_sensor, 669 | Cpu_sensor, 670 | spacing = 6, 671 | layout = wibox.layout.fixed.horizontal, 672 | }, 673 | halign = "center", 674 | valign = "center", 675 | widget = wibox.container.place, 676 | }, 677 | { 678 | { 679 | Ram_sensor, 680 | Disk_sensor, 681 | spacing = 6, 682 | layout = wibox.layout.fixed.horizontal, 683 | }, 684 | halign = "center", 685 | valign = "center", 686 | widget = wibox.container.place, 687 | }, 688 | Weather_widget, 689 | spacing = 6, 690 | layout = wibox.layout.fixed.vertical, 691 | }, 692 | spacing = 6, 693 | layout = wibox.layout.fixed.vertical, 694 | }, 695 | visible = false, 696 | ontop = true, 697 | -- bg = "#00000000", 698 | margins = 10, 699 | border_width = 10, 700 | border_color = beautiful.bg_normal, 701 | shape = helpers.mkroundrect(), 702 | bg = beautiful.bg_normal, 703 | placement = function(d) 704 | awful.placement.right( 705 | d, 706 | { margins = { top = 42 + beautiful.useless_gap * 2, right = beautiful.useless_gap * 2 } } 707 | ) 708 | end, 709 | }) 710 | 711 | function Dashboard_wibox.toggle() 712 | Dashboard_wibox.visible = not Dashboard_wibox.visible 713 | collectgarbage("collect") 714 | end 715 | 716 | Dashboard_wibox:connect_signal("property::visible", function(self) 717 | if self.visible then 718 | dashboard_button.bg = beautiful.bg_focus 719 | temp_timer:start() 720 | ram_timer:start() 721 | cpu_timer:start() 722 | disk_timer:start() 723 | Calendar_popup.visible = false 724 | else 725 | dashboard_button.bg = beautiful.bg_normal 726 | temp_timer:stop() 727 | ram_timer:stop() 728 | cpu_timer:stop() 729 | disk_timer:stop() 730 | forecast_popup.visible = false 731 | end 732 | end) 733 | -------------------------------------------------------------------------------- /awesome/ui/dashboard/init.lua: -------------------------------------------------------------------------------- 1 | require("ui.dashboard.dashboard") 2 | -------------------------------------------------------------------------------- /awesome/ui/dashboard/weather_widget.lua: -------------------------------------------------------------------------------- 1 | local beautiful = require("beautiful") 2 | local wibox = require("wibox") 3 | local helpers = require("helpers") 4 | local awful = require("awful") 5 | local gears = require("gears") 6 | local json = require("dkjson") 7 | local hgcm = helpers.get_colorized_markup 8 | local units = "metric" 9 | local weather_command = [[curl -s --show-error -X GET ]] 10 | local api_key = "" 11 | local city_id = "" 12 | local weather_link = [["https://api.openweathermap.org/data/2.5/weather?id={]] 13 | .. city_id 14 | .. [[}&appid={]] 15 | .. api_key 16 | .. [[}&units=]] 17 | .. units 18 | .. [["]] 19 | local forecast_link = [["api.openweathermap.org/data/2.5/forecast?id={"]] 20 | .. city_id 21 | .. [["}&appid={"]] 22 | .. api_key 23 | .. [["}&units=]] 24 | .. units 25 | .. [["]] 26 | local cache_path = "~/.config/awesome/ui/dashboard/.weather_cache/" 27 | 28 | local icon_map = { 29 | ["01d"] = hgcm("", beautiful.weather_day), 30 | ["02d"] = hgcm("", beautiful.weather_day), 31 | ["03d"] = hgcm("", beautiful.weather_day), 32 | ["04d"] = hgcm("", beautiful.weather_day), 33 | ["09d"] = hgcm("", beautiful.weather_day), 34 | ["10d"] = hgcm("", beautiful.weather_day), 35 | ["11d"] = hgcm("", beautiful.weather_day), 36 | ["13d"] = hgcm("", beautiful.weather_day), 37 | ["50d"] = hgcm("", beautiful.weather_day), 38 | ["01n"] = hgcm("", beautiful.weather_night), 39 | ["02n"] = hgcm("", beautiful.weather_night), 40 | ["03n"] = hgcm("", beautiful.weather_night), 41 | ["04n"] = hgcm("", beautiful.weather_night), 42 | ["09n"] = hgcm("", beautiful.weather_night), 43 | ["10n"] = hgcm("", beautiful.weather_night), 44 | ["11n"] = hgcm("", beautiful.weather_night), 45 | ["13n"] = hgcm("", beautiful.weather_night), 46 | ["50n"] = hgcm("", beautiful.weather_night), 47 | } 48 | 49 | local function create_err_box() 50 | return wibox.widget({ 51 | { 52 | id = "err_text", 53 | halign = "center", 54 | font = beautiful.nerd_font_mono .. " 12", 55 | widget = wibox.widget.textbox, 56 | }, 57 | id = "err_role", 58 | strategy = "max", 59 | width = 200, 60 | forced_height = 100, 61 | widget = wibox.container.constraint, 62 | err = function(self, error) 63 | self.err_text.markup = error 64 | end, 65 | }) 66 | end 67 | 68 | local function create_weather_box() 69 | return wibox.widget({ 70 | { 71 | { 72 | id = "forecast_toggle_icon", 73 | markup = hgcm("  ", beautiful.fg_focus), 74 | halign = "center", 75 | font = beautiful.nerd_font_mono .. " 12", 76 | widget = wibox.widget.textbox, 77 | }, 78 | id = "forecast_toggle_bg", 79 | widget = wibox.container.background, 80 | buttons = { 81 | awful.button({}, 1, function() 82 | forecast_popup.toggle() 83 | end), 84 | }, 85 | }, 86 | { 87 | { 88 | { 89 | { 90 | { 91 | id = "time_role", 92 | font = beautiful.nerd_font_mono .. " 10", 93 | valign = "center", 94 | halign = "left", 95 | widget = wibox.widget.textbox, 96 | }, 97 | { 98 | id = "city_role", 99 | font = beautiful.nerd_font_mono .. " 10", 100 | forced_height = 20, 101 | valign = "center", 102 | halign = "left", 103 | widget = wibox.widget.textbox, 104 | }, 105 | spacing_widget = { 106 | orientation = "horizontal", 107 | thickness = 1, 108 | span_ratio = 1, 109 | color = beautiful.fg_focus, 110 | widget = wibox.widget.separator, 111 | }, 112 | spacing = 2, 113 | layout = wibox.layout.fixed.vertical, 114 | }, 115 | { 116 | { 117 | { 118 | { 119 | id = "feels_like_text", 120 | font = beautiful.nerd_font_mono .. " 7", 121 | valign = "bottom", 122 | halign = "left", 123 | widget = wibox.widget.textbox, 124 | }, 125 | { 126 | id = "feels_like_role", 127 | font = beautiful.nerd_font_mono .. " 9", 128 | valign = "center", 129 | halign = "left", 130 | widget = wibox.widget.textbox, 131 | }, 132 | layout = wibox.layout.fixed.horizontal, 133 | }, 134 | { 135 | { 136 | id = "current_icon_role", 137 | font = beautiful.nerd_font_mono .. " 16", 138 | valign = "center", 139 | halign = "left", 140 | widget = wibox.widget.textbox, 141 | }, 142 | { 143 | id = "temp_role", 144 | font = beautiful.nerd_font_mono .. " 15", 145 | valign = "center", 146 | halign = "left", 147 | widget = wibox.widget.textbox, 148 | }, 149 | spacing = 8, 150 | layout = wibox.layout.fixed.horizontal, 151 | }, 152 | { 153 | { 154 | id = "current_maxmin_role", 155 | font = beautiful.nerd_font_mono .. " 10", 156 | halign = "left", 157 | widget = wibox.widget.textbox, 158 | }, 159 | { 160 | id = "description_role", 161 | font = beautiful.nerd_font_mono .. " 10", 162 | halign = "right", 163 | widget = wibox.widget.textbox, 164 | }, 165 | spacing = 8, 166 | layout = wibox.layout.fixed.horizontal, 167 | }, 168 | layout = wibox.layout.align.vertical, 169 | }, 170 | halign = "center", 171 | widget = wibox.container.place, 172 | }, 173 | { 174 | { 175 | { 176 | { 177 | markup = hgcm("", beautiful.fg_focus), 178 | font = beautiful.nerd_font_mono .. " 14", 179 | valign = "top", 180 | halign = "right", 181 | widget = wibox.widget.textbox, 182 | }, 183 | margins = 3, 184 | widget = wibox.container.margin, 185 | }, 186 | id = "update_role", 187 | bg = beautiful.bg_normal, 188 | shape = helpers.mkroundrect(), 189 | widget = wibox.container.background, 190 | buttons = { 191 | awful.button({}, 1, function() 192 | Weather_widget:emit_signal("weather::update") 193 | end), 194 | }, 195 | }, 196 | layout = wibox.layout.fixed.vertical, 197 | }, 198 | layout = wibox.layout.align.horizontal, 199 | }, 200 | { 201 | { 202 | { 203 | id = "info_role", 204 | valign = "center", 205 | halign = "left", 206 | widget = wibox.widget.textbox, 207 | }, 208 | strategy = "max", 209 | width = 200, 210 | widget = wibox.container.constraint, 211 | }, 212 | nil, 213 | { 214 | id = "sun_riseset_role", 215 | valign = "bottom", 216 | halign = "left", 217 | widget = wibox.widget.textbox, 218 | }, 219 | layout = wibox.layout.align.horizontal, 220 | }, 221 | spacing = 10, 222 | layout = wibox.layout.fixed.vertical, 223 | }, 224 | top = 8, 225 | bottom = 8, 226 | right = 8, 227 | widget = wibox.container.margin, 228 | }, 229 | layout = wibox.layout.align.horizontal, 230 | show_err = function(self, error) 231 | self:get_children_by_id("time_role")[1].markup = "" 232 | self:get_children_by_id("city_role")[1].markup = "" 233 | self:get_children_by_id("feels_like_text")[1].markup = "" 234 | self:get_children_by_id("feels_like_role")[1].markup = "" 235 | self:get_children_by_id("current_icon_role")[1].markup = "" 236 | self:get_children_by_id("temp_role")[1].markup = "" 237 | self:get_children_by_id("current_maxmin_role")[1].markup = "" 238 | self:get_children_by_id("description_role")[1].markup = "" 239 | self:get_children_by_id("sun_riseset_role")[1].markup = "" 240 | self:get_children_by_id("info_role")[1].markup = error 241 | end, 242 | update = function(self, weather_table) 243 | self:get_children_by_id("time_role")[1].markup = 244 | hgcm(os.date("%H:%M %p", weather_table["dt"]), beautiful.fg_focus) 245 | self:get_children_by_id("city_role")[1].markup = hgcm(weather_table["name"], beautiful.fg_focus) 246 | self:get_children_by_id("feels_like_text")[1].markup = hgcm("feels like:", beautiful.fg_focus) 247 | self:get_children_by_id("feels_like_role")[1].markup = 248 | hgcm("" .. weather_table["main"]["feels_like"] .. "" .. "󰔄", beautiful.fg_focus) 249 | self:get_children_by_id("current_icon_role")[1].markup = icon_map[weather_table["weather"][1]["icon"]] 250 | self:get_children_by_id("temp_role")[1].markup = 251 | hgcm(weather_table["main"]["temp"] .. "󰔄", beautiful.fg_focus) 252 | self:get_children_by_id("current_maxmin_role")[1].markup = hgcm( 253 | string.match(weather_table["main"]["temp_max"], "%d*") -- .. "󰔄" 254 | .. "" 255 | .. "/" 256 | .. string.match(weather_table["main"]["temp_min"], "%d*") -- .. "󰔄" 257 | .. "", 258 | beautiful.fg_focus 259 | ) 260 | self:get_children_by_id("description_role")[1].markup = 261 | hgcm(weather_table["weather"][1]["description"], beautiful.fg_focus) 262 | self:get_children_by_id("info_role")[1].markup = hgcm( 263 | "Humidity: " 264 | .. weather_table["main"]["humidity"] 265 | .. "%" 266 | .. "\nPressure: " 267 | .. weather_table["main"]["pressure"] 268 | .. " hPa" 269 | .. "\nVisibility: " 270 | .. weather_table["visibility"] / 1000 271 | .. "km" 272 | .. "\nWind: " 273 | .. weather_table["wind"]["speed"] 274 | .. " m/s" 275 | .. ", " 276 | .. weather_table["wind"]["deg"] 277 | .. "", 278 | -- .. " , Gust: " 279 | -- .. weather_table["wind"]["gust"], 280 | beautiful.fg_focus 281 | ) 282 | self:get_children_by_id("sun_riseset_role")[1].markup = hgcm( 283 | "Sunrise: " 284 | .. os.date("%H:%M %p", weather_table["sys"]["sunrise"]) 285 | .. "\nSunset: " 286 | .. os.date("%H:%M %p", weather_table["sys"]["sunset"]), 287 | beautiful.fg_focus 288 | ) 289 | end, 290 | }) 291 | end 292 | Weather_box = create_weather_box() 293 | 294 | Weather_widget = wibox.widget({ 295 | Weather_box, 296 | bg = beautiful.bg_normal, 297 | shape = helpers.mkroundrect(), 298 | border_width = 2, 299 | border_color = beautiful.fg_focus, 300 | widget = wibox.container.background, 301 | }) 302 | -- helpers.add_hover(Weather_widget:get_children_by_id("update_role")[1], beautiful.bg_normal, beautiful.bg_focus) 303 | 304 | local function create_forecast_box(args) 305 | args.icon = args.icon or "..." 306 | args.temp = args.temp or 0 307 | args.description = args.description or nil 308 | local hour_forecast = wibox.widget({ 309 | { 310 | { 311 | markup = args.icon, 312 | font = beautiful.nerd_font_mono .. " 14", 313 | halign = "center", 314 | widget = wibox.widget.textbox, 315 | }, 316 | { 317 | markup = hgcm(args.temp, beautiful.fg_focus), 318 | font = beautiful.nerd_font_mono .. " 8", 319 | halign = "center", 320 | widget = wibox.widget.textbox, 321 | }, 322 | spacing = 8, 323 | layout = wibox.layout.fixed.horizontal, 324 | }, 325 | { 326 | markup = hgcm(args.description, beautiful.fg_focus), 327 | font = beautiful.nerd_font_mono .. " 8", 328 | halign = "left", 329 | widget = wibox.widget.textbox, 330 | }, 331 | forced_width = 65, 332 | forced_height = 40, 333 | spacing = 4, 334 | layout = wibox.layout.fixed.vertical, 335 | }) 336 | return hour_forecast 337 | end 338 | 339 | local function create_forecast_times(time) 340 | return wibox.widget({ 341 | markup = hgcm("" .. os.date("%H:%M", time) .. "", beautiful.fg_focus), 342 | font = beautiful.nerd_font_mono .. " 10", 343 | halign = "left", 344 | valign = "top", 345 | forced_width = 65, 346 | widget = wibox.widget.textbox, 347 | }) 348 | end 349 | 350 | local function create_forecast_days(time) 351 | return wibox.widget({ 352 | markup = hgcm("" .. os.date("%A", time) .. "", beautiful.fg_focus), 353 | font = beautiful.nerd_font_mono .. " 10", 354 | forced_width = 80, 355 | forced_height = 40, 356 | halign = "left", 357 | widget = wibox.widget.textbox, 358 | }) 359 | end 360 | time_layout = wibox.widget({ 361 | spacing = 6, 362 | layout = wibox.layout.fixed.horizontal, 363 | }) 364 | day1_layout = wibox.widget({ 365 | spacing = 6, 366 | layout = wibox.layout.fixed.horizontal, 367 | }) 368 | day2_layout = wibox.widget({ 369 | spacing = 6, 370 | layout = wibox.layout.fixed.horizontal, 371 | }) 372 | day3_layout = wibox.widget({ 373 | spacing = 6, 374 | layout = wibox.layout.fixed.horizontal, 375 | }) 376 | day4_layout = wibox.widget({ 377 | spacing = 6, 378 | layout = wibox.layout.fixed.horizontal, 379 | }) 380 | day5_layout = wibox.widget({ 381 | spacing = 6, 382 | layout = wibox.layout.fixed.horizontal, 383 | }) 384 | 385 | days_layout = wibox.widget({ 386 | { 387 | { 388 | time_layout, 389 | day1_layout, 390 | day2_layout, 391 | day3_layout, 392 | day4_layout, 393 | day5_layout, 394 | spacing = 6, 395 | spacing_widget = { 396 | span_ratio = 1, 397 | color = beautiful.fg_focus, 398 | orientation = "horizontal", 399 | widget = wibox.widget.separator, 400 | }, 401 | layout = wibox.layout.fixed.vertical, 402 | }, 403 | margins = 8, 404 | widget = wibox.container.margin, 405 | }, 406 | shape = helpers.mkroundrect(), 407 | border_width = 2, 408 | border_color = beautiful.fg_focus, 409 | widget = wibox.container.background, 410 | }) 411 | 412 | forecast_popup = awful.popup({ 413 | widget = days_layout, 414 | ontop = true, 415 | honor_workarea = true, 416 | bg = beautiful.bg_normal, 417 | shape = helpers.mkroundrect(), 418 | visible = false, 419 | border_width = 10, 420 | border_color = beautiful.bg_normal, 421 | placement = function(d) 422 | awful.placement.next_to(d, { 423 | preferred_positions = "left", 424 | geometry = Dashboard_wibox, 425 | offset = { y = 10 }, 426 | margins = 8, 427 | preferred_anchors = "back", 428 | }) 429 | end, 430 | }) 431 | 432 | local function create_forecast(forecast_table) 433 | time_layout:reset() 434 | day1_layout:reset() 435 | day2_layout:reset() 436 | day3_layout:reset() 437 | day4_layout:reset() 438 | day5_layout:reset() 439 | time_layout:add(wibox.widget({ 440 | markup = hgcm("5 Days\nforecast", beautiful.fg_focus), 441 | font = beautiful.font .. " 8", 442 | halign = "left", 443 | forced_width = 80, 444 | widget = wibox.widget.textbox, 445 | })) 446 | local first_day = tonumber(os.date("%d", forecast_table["list"][1]["dt"])) 447 | 448 | for _, value in pairs(forecast_table["list"]) do 449 | local day_number = tonumber(os.date("%d", value["dt"])) 450 | local box = {} 451 | if day_number == first_day then 452 | box = create_forecast_box({ 453 | icon = icon_map[value["weather"][1]["icon"]], 454 | description = value["weather"][1]["main"], 455 | temp = string.match(value["main"]["temp_max"], "[0-9]*") .. "" .. "/" .. string.match( 456 | value["main"]["temp_min"], 457 | "[0-9]*" 458 | ) .. "", 459 | }) 460 | else 461 | box = create_forecast_box({ 462 | icon = icon_map[value["weather"][1]["icon"]], 463 | description = value["weather"][1]["main"], 464 | -- temp = string.match(value["main"]["temp"], "[0-9]*") .. "󰔄", 465 | temp = string.match(value["main"]["temp"], "[0-9]*") .. "", 466 | }) 467 | end 468 | 469 | if day_number == first_day then 470 | if #day1_layout:get_children() == 0 then 471 | day1_layout:add(create_forecast_days(value["dt"])) 472 | end 473 | day1_layout:add(box) 474 | elseif day_number == first_day + 1 then 475 | if #day2_layout:get_children() == 0 then 476 | day2_layout:add(create_forecast_days(value["dt"])) 477 | end 478 | time_layout:add(create_forecast_times(value["dt"])) 479 | day2_layout:add(box) 480 | elseif day_number == first_day + 2 then 481 | if #day3_layout:get_children() == 0 then 482 | day3_layout:add(create_forecast_days(value["dt"])) 483 | end 484 | day3_layout:add(box) 485 | elseif day_number == first_day + 3 then 486 | if #day4_layout:get_children() == 0 then 487 | day4_layout:add(create_forecast_days(value["dt"])) 488 | end 489 | day4_layout:add(box) 490 | elseif day_number == first_day + 4 then 491 | if #day5_layout:get_children() == 0 then 492 | day5_layout:add(create_forecast_days(value["dt"])) 493 | end 494 | day5_layout:add(box) 495 | end 496 | end 497 | if #day1_layout:get_children() ~= 9 then 498 | for i = 1, 9 - #day1_layout:get_children() do 499 | day1_layout:insert( 500 | 2, 501 | wibox.widget({ 502 | forced_width = 65, 503 | widget = wibox.widget.textbox, 504 | }) 505 | ) 506 | end 507 | end 508 | end 509 | 510 | function forecast_popup.toggle() 511 | forecast_popup.visible = not forecast_popup.visible 512 | end 513 | 514 | forecast_popup:connect_signal("property::visible", function(self) 515 | if self.visible then 516 | Weather_widget.widget:get_children_by_id("forecast_toggle_bg")[1].bg = beautiful.bg_focus 517 | Weather_widget.widget:get_children_by_id("forecast_toggle_icon")[1].markup = hgcm("  ", beautiful.fg_focus) 518 | else 519 | Weather_widget.widget:get_children_by_id("forecast_toggle_bg")[1].bg = beautiful.bg_normal 520 | Weather_widget.widget:get_children_by_id("forecast_toggle_icon")[1].markup = hgcm("  ", beautiful.fg_focus) 521 | end 522 | end) 523 | 524 | local weathertable = {} 525 | local forecasttable = {} 526 | Weather_widget:connect_signal("weather::update", function() 527 | weathertable = {} 528 | forecasttable = {} 529 | awful.spawn.easy_async_with_shell(weather_command .. forecast_link, function(stdout, _, _, exit_code) 530 | if exit_code == 0 then 531 | forecasttable = json.decode(stdout) 532 | awful.spawn.easy_async_with_shell( 533 | "echo $(" .. weather_command .. forecast_link .. ") > " .. cache_path .. "forecast_cache.json", 534 | function() 535 | create_forecast(forecasttable) 536 | end 537 | ) 538 | else 539 | awful.spawn.easy_async_with_shell("cat " .. cache_path .. "forecast_cache.json", function(out, _, _, exit) 540 | if exit == 0 and out ~= nil then 541 | forecasttable = json.decode(out) 542 | if (os.time() - forecasttable["list"][1]["dt"]) > 432000 then 543 | awful.spawn.with_shell("rm " .. cache_path .. "forecast_cache.json") 544 | end 545 | create_forecast(forecasttable) 546 | end 547 | end) 548 | end 549 | end) 550 | awful.spawn.easy_async_with_shell(weather_command .. weather_link, function(stdout, stderr, _, exit_code) 551 | if exit_code == 0 then 552 | awful.spawn.easy_async_with_shell( 553 | "echo $(" .. weather_command .. weather_link .. ")" .. " > " .. cache_path .. "weather_cache.json", 554 | function() 555 | weathertable = json.decode(stdout) 556 | Weather_box.update(Weather_box, weathertable) 557 | end 558 | ) 559 | else 560 | awful.spawn.easy_async_with_shell("cat " .. cache_path .. "weather_cache.json", function(out, _, _, exit) 561 | if exit == 0 and out ~= "" then 562 | weathertable = json.decode(out) 563 | Weather_box.update(Weather_box, weathertable) 564 | else 565 | Weather_box.show_err(Weather_box, stderr) 566 | end 567 | end) 568 | end 569 | end) 570 | end) 571 | 572 | gears.timer({ 573 | autostart = true, 574 | call_now = true, 575 | timeout = 5400, 576 | callback = function() 577 | Weather_widget:emit_signal("weather::update") 578 | end, 579 | }) 580 | -------------------------------------------------------------------------------- /awesome/ui/notifications/notifications.lua: -------------------------------------------------------------------------------- 1 | local naughty = require("naughty") 2 | local beautiful = require("beautiful") 3 | local wibox = require("wibox") 4 | local awful = require("awful") 5 | local ruled = require("ruled") 6 | local menubar = require("menubar") 7 | local gears = require("gears") 8 | local helpers = require("helpers") 9 | 10 | ruled.notification.connect_signal("request::rules", function() 11 | -- All notifications will match this rule. 12 | -- ruled.notification.append_rule { 13 | -- rule = { }, 14 | -- properties = { 15 | -- screen = awful.screen.preferred, 16 | -- implicit_timeout = 5, 17 | -- } 18 | -- } 19 | ruled.notification.append_rule({ 20 | rule = { app_name = "Network-Manager Applet" }, 21 | properties = { icon = menubar.utils.lookup_icon("network-connect") }, 22 | }) 23 | ruled.notification.append_rule({ 24 | rule = { app_name = "udiskie" }, 25 | properties = { urgency = "low" }, 26 | }) 27 | ruled.notification.append_rule({ 28 | rule = { urgency = "critical" }, 29 | properties = { timeout = 0, bg = beautiful.bg_notification_urgent, fg = beautiful.fg_normal }, 30 | }) 31 | ruled.notification.append_rule({ 32 | rule = { urgency = "normal" }, 33 | properties = { timeout = 0 }, 34 | }) 35 | ruled.notification.append_rule({ 36 | rule = { urgency = "low" }, 37 | properties = { timeout = 5 }, 38 | }) 39 | end) 40 | 41 | --header for sidebar notification wibox consisting of a title and a "delete all" button 42 | notif_header = wibox.widget({ 43 | { 44 | id = "dismiss_role", 45 | image = beautiful.notifications_delete_icon, 46 | forced_width = 24, 47 | forced_height = 24, 48 | valign = "center", 49 | halign = "center", 50 | widget = wibox.widget.imagebox, 51 | buttons = gears.table.join(awful.button({}, 1, function() 52 | naughty.destroy_all_notifications() 53 | end)), 54 | }, 55 | { 56 | markup = helpers.get_colorized_markup("Notifications", beautiful.fg_focus), 57 | font = beautiful.nerd_font .. " 18", 58 | halign = "center", 59 | widget = wibox.widget.textbox, 60 | }, 61 | { 62 | forced_width = 40, 63 | layout = wibox.layout.fixed.horizontal, 64 | }, 65 | layout = wibox.layout.align.horizontal, 66 | }) 67 | 68 | --the widget to display when there are no notifications 69 | local username = helpers.capitalize(os.getenv("USER")) 70 | notif_empty = wibox.widget({ 71 | { 72 | notif_header, 73 | { 74 | { 75 | image = beautiful.notification_icon_empty, 76 | resize = true, 77 | upscale = true, 78 | downscale = true, 79 | scaling_quality = "best", 80 | forced_width = 256, 81 | forced_height = 256, 82 | valign = "center", 83 | halign = "center", 84 | widget = wibox.widget.imagebox, 85 | }, 86 | { 87 | markup = "" .. helpers.get_colorized_markup( 88 | "Look \n\tAround" .. "" .. " \n\t\t" .. username .. " !" .. "", 89 | beautiful.fg_focus 90 | ) .. "", 91 | font = "Comic Sans MS 18", 92 | valign = "center", 93 | halign = "center", 94 | widget = wibox.widget.textbox, 95 | }, 96 | layout = wibox.layout.fixed.vertical, 97 | }, 98 | spacing = 130, 99 | fill_space = true, 100 | layout = wibox.layout.fixed.vertical, 101 | }, 102 | margins = 10, 103 | widget = wibox.container.margin, 104 | }) 105 | 106 | --layouts that notification boxes will be placed in(base_layouts) 107 | notif_container = wibox.widget({ 108 | spacing = beautiful.useless_gap * 2, 109 | layout = wibox.layout.fixed.vertical, 110 | }) 111 | 112 | notif_popup_container = wibox.widget({ 113 | spacing = beautiful.useless_gap * 2, 114 | layout = wibox.layout.fixed.vertical, 115 | }) 116 | 117 | notif_available = wibox.widget({ 118 | { 119 | notif_header, 120 | notif_container, 121 | spacing = beautiful.useless_gap * 2, 122 | layout = wibox.layout.fixed.vertical, 123 | }, 124 | margins = 10, 125 | widget = wibox.container.margin, 126 | }) 127 | 128 | --arrays to keep notification indexs so we can access them(for deleting,etc...) 129 | local notif_list = {} 130 | local notif_popup_list = {} 131 | 132 | --function for creating sidebar notifications 133 | local function Create_notificaion(n) 134 | local notif_actions = #n.actions == 0 and nil 135 | or wibox.widget({ 136 | notification = n, 137 | base_layout = wibox.widget({ 138 | spacing = 3, 139 | layout = wibox.layout.fixed.horizontal, 140 | }), 141 | widget_template = { 142 | { 143 | { 144 | { 145 | { 146 | id = "icon_role", 147 | forced_height = 16, 148 | forced_width = 16, 149 | widget = wibox.widget.imagebox, 150 | }, 151 | { 152 | id = "text_role", 153 | halign = "center", 154 | widget = wibox.widget.textbox, 155 | }, 156 | { 157 | forced_width = 16, 158 | layout = wibox.layout.fixed.horizontal, 159 | }, 160 | spacing = 5, 161 | layout = wibox.layout.align.horizontal, 162 | }, 163 | id = "background_role", 164 | widget = wibox.container.background, 165 | }, 166 | halign = "center", 167 | valign = "center", 168 | widget = wibox.container.place, 169 | }, 170 | margins = 4, 171 | widget = wibox.container.margin, 172 | }, 173 | style = { 174 | underline_normal = false, 175 | underline_selected = true, 176 | shape_normal = gears.shape.rounded_bar, 177 | shape_border_width_normal = 1, 178 | shape_border_width_selected = 3, 179 | icon_size_normal = 16, 180 | shape_border_color_normal = beautiful.fg_normal, 181 | }, 182 | widget = naughty.list.actions, 183 | }) 184 | 185 | local box = wibox.widget({ 186 | { 187 | { 188 | { 189 | { 190 | { 191 | { 192 | image = n.icon or beautiful.notification_icon, 193 | valign = "center", 194 | halign = "center", 195 | forced_width = 64, 196 | forced_height = 64, 197 | widget = wibox.widget.imagebox, 198 | }, 199 | n.app_name == nil and "" or { 200 | markup = helpers.get_colorized_markup(n.app_name, beautiful.fg_normal), 201 | forced_width = 64, 202 | font = beautiful.font .. " 8", 203 | valign = "center", 204 | halign = "center", 205 | widget = wibox.widget.textbox, 206 | }, 207 | layout = wibox.layout.align.vertical, 208 | }, 209 | valign = "center", 210 | widget = wibox.container.place, 211 | }, 212 | { 213 | { 214 | id = "delete_button", 215 | halign = "right", 216 | valign = "top", 217 | forced_height = 16, 218 | forced_width = 16, 219 | markup = helpers.get_colorized_markup("", beautiful.fg_critical), 220 | buttons = gears.table.join(awful.button({}, 1, function() 221 | n:destroy() 222 | end)), 223 | widget = wibox.widget.textbox, 224 | }, 225 | { 226 | markup = "" .. helpers.get_colorized_markup(n.title, beautiful.fg_normal) .. "", 227 | valign = "center", 228 | widget = wibox.widget.textbox, 229 | }, 230 | { 231 | markup = helpers.get_colorized_markup(n.message, n.fg), 232 | valign = "center", 233 | widget = wibox.widget.textbox, 234 | }, 235 | notif_actions, 236 | layout = wibox.layout.fixed.vertical, 237 | fill_space = true, 238 | }, 239 | fill_space = true, 240 | spacing = 10, 241 | layout = wibox.layout.fixed.horizontal, 242 | }, 243 | margins = 6, 244 | widget = wibox.container.margin, 245 | }, 246 | shape = helpers.mkroundrect(), 247 | border_width = 2, 248 | border_color = beautiful.fg_focus, 249 | bg = n.bg, 250 | widget = wibox.container.background, 251 | }, 252 | strategy = "max", 253 | width = 350, 254 | widget = wibox.container.constraint, 255 | }) 256 | notif_container:insert(1, box) 257 | table.insert(notif_list, 1, n.id) 258 | end 259 | 260 | local function Create_notif_popup(n) 261 | --notification actions to be used in notification boxes 262 | local notif_actions = #n.actions == 0 and nil 263 | or wibox.widget({ 264 | notification = n, 265 | base_layout = wibox.widget({ 266 | spacing = 3, 267 | layout = wibox.layout.fixed.horizontal, 268 | }), 269 | widget_template = { 270 | { 271 | { 272 | { 273 | { 274 | id = "icon_role", 275 | forced_height = 16, 276 | forced_width = 16, 277 | widget = wibox.widget.imagebox, 278 | }, 279 | { 280 | id = "text_role", 281 | halign = "center", 282 | widget = wibox.widget.textbox, 283 | }, 284 | { 285 | forced_width = 16, 286 | layout = wibox.layout.fixed.horizontal, 287 | }, 288 | spacing = 5, 289 | layout = wibox.layout.align.horizontal, 290 | }, 291 | id = "background_role", 292 | widget = wibox.container.background, 293 | }, 294 | halign = "center", 295 | valign = "center", 296 | widget = wibox.container.place, 297 | }, 298 | margins = 4, 299 | widget = wibox.container.margin, 300 | }, 301 | style = { 302 | underline_normal = false, 303 | underline_selected = true, 304 | shape_normal = gears.shape.rounded_bar, 305 | shape_border_width_normal = 1, 306 | shape_border_width_selected = 3, 307 | icon_size_normal = 16, 308 | shape_border_color_normal = beautiful.fg_normal, 309 | }, 310 | widget = naughty.list.actions, 311 | }) 312 | 313 | --the notification box 314 | local popup_box = wibox.widget({ 315 | { 316 | { 317 | { 318 | { 319 | { 320 | { 321 | image = n.icon or beautiful.notification_icon, 322 | resize = true, 323 | upscale = true, 324 | downscale = true, 325 | valign = "center", 326 | halign = "center", 327 | forced_width = 64, 328 | forced_height = 64, 329 | widget = wibox.widget.imagebox, 330 | }, 331 | n.app_name == nil and "" or { 332 | markup = helpers.get_colorized_markup(n.app_name, beautiful.fg_normal), 333 | forced_width = 64, 334 | font = beautiful.font .. " 8", 335 | valign = "center", 336 | halign = "center", 337 | widget = wibox.widget.textbox, 338 | }, 339 | layout = wibox.layout.align.vertical, 340 | }, 341 | valign = "center", 342 | widget = wibox.container.place, 343 | }, 344 | { 345 | { 346 | { 347 | markup = "" .. helpers.get_colorized_markup(n.title, beautiful.fg_normal) .. "", 348 | valign = "center", 349 | widget = wibox.widget.textbox, 350 | }, 351 | { 352 | markup = helpers.get_colorized_markup(n.message, n.fg), 353 | valign = "center", 354 | widget = wibox.widget.textbox, 355 | }, 356 | notif_actions, 357 | layout = wibox.layout.fixed.vertical, 358 | fill_space = true, 359 | }, 360 | valign = "center", 361 | widget = wibox.container.place, 362 | }, 363 | fill_space = true, 364 | spacing = 10, 365 | layout = wibox.layout.fixed.horizontal, 366 | }, 367 | margins = 6, 368 | widget = wibox.container.margin, 369 | }, 370 | shape = helpers.mkroundrect(), 371 | bg = n.bg or beautiful.bg_normal, 372 | -- buttons = gears.table.join(awful.button({}, 1, function() n:destroy() end)), 373 | widget = wibox.container.background, 374 | }, 375 | strategy = "max", 376 | width = 350, 377 | widget = wibox.container.constraint, 378 | }) 379 | 380 | table.insert(notif_popup_list, 1, n.id) --a table to keep number and index of notifications(and therefore their boxes) so we can access them 381 | notif_popup_container:insert(1, popup_box) 382 | notif_popup.visible = true 383 | -- awful.spawn.easy_async("sleep 5",function() 384 | gears.timer({ 385 | autostart = true, 386 | timeout = 5, 387 | single_shot = true, 388 | callback = function() 389 | awesome.emit_signal("notif_popup::remove", n.id) 390 | if #notif_popup_list == 0 then -- if there is no notification in the popup_container then notif_popup should become invisible 391 | notif_popup.visible = false 392 | end 393 | end, 394 | }) 395 | -- end) 396 | end 397 | 398 | --requesting icons for notifications from menubar 399 | naughty.connect_signal("request::icon", function(n, context, hints) 400 | if context ~= "app_icon" then 401 | return 402 | end 403 | local path = menubar.utils.lookup_icon(hints.app_icon) or menubar.utils.lookup_icon(hints.app_icon:lower()) 404 | 405 | if path then 406 | n.icon = path 407 | end 408 | end) 409 | --requesting action icons 410 | naughty.connect_signal("request::action_icon", function(a, _, hints) 411 | a.icon = menubar.utils.lookup_icon(hints.id) 412 | end) 413 | 414 | awesome.connect_signal("notif_popup::remove", function(nid) 415 | local index = helpers.find_index(notif_popup_list, nid) 416 | if index ~= nil then 417 | notif_popup_container:remove(index) 418 | table.remove(notif_popup_list, index) 419 | end 420 | end) 421 | 422 | naughty.connect_signal("request::display", function(n) 423 | Create_notif_popup(n) 424 | if n.urgency ~= "low" then 425 | Create_notificaion(n) 426 | notif_wibox.widget = notif_available 427 | end 428 | end) 429 | 430 | --only keep a specific number of notifications 431 | naughty.connect_signal("added", function() 432 | if #notif_list == 8 then 433 | naughty.get_by_id(notif_list[8]):destroy() 434 | table.remove(notif_list, 8) 435 | end 436 | end) 437 | 438 | naughty.connect_signal("destroyed", function(n) 439 | -- if n.urgency ~= "low" then 440 | local index = helpers.find_index(notif_list, n.id) 441 | if index ~= nil then 442 | notif_container:remove(index) 443 | table.remove(notif_list, index) 444 | end 445 | -- end 446 | awesome.emit_signal("notif_popup::remove", n.id) 447 | if #notif_list == 0 then 448 | notif_wibox.widget = notif_empty 449 | end 450 | end) 451 | 452 | notif_popup = awful.popup({ 453 | widget = notif_popup_container, 454 | ontop = true, 455 | visible = false, 456 | bg = "#00000000", 457 | honor_workarea = true, 458 | shape = helpers.mkroundrect(10), 459 | placement = function(c) 460 | awful.placement.top_right( 461 | c, 462 | { margins = { top = 42 + beautiful.useless_gap * 2.5, right = beautiful.useless_gap * 2.5 } } 463 | ) 464 | end, 465 | }) 466 | 467 | notif_wibox = wibox({ 468 | widget = notif_empty, 469 | ontop = true, 470 | shape = helpers.mkroundrect(), 471 | bg = beautiful.bg_normal, 472 | visible = false, 473 | width = 370, 474 | height = 712, 475 | x = beautiful.useless_gap * 2, 476 | y = 44 + beautiful.useless_gap * 2, 477 | }) 478 | 479 | function notif_wibox.toggle() 480 | notif_wibox.visible = not notif_wibox.visible 481 | collectgarbage("collect") 482 | end 483 | 484 | notif_wibox:connect_signal("property::visible", function(self) 485 | if self.visible then 486 | notif_widget_button.bg = beautiful.bg_focus 487 | else 488 | notif_widget_button.bg = beautiful.bg_normal 489 | end 490 | end) 491 | -------------------------------------------------------------------------------- /awesome/ui/wibar/init.lua: -------------------------------------------------------------------------------- 1 | require("ui.wibar.wibar") 2 | -------------------------------------------------------------------------------- /awesome/ui/wibar/wibar.lua: -------------------------------------------------------------------------------- 1 | local awful = require("awful") 2 | local wibox = require("wibox") 3 | local beautiful = require("beautiful") 4 | local menubar = require("menubar") 5 | local bling = require("bling") 6 | local helpers = require("helpers") 7 | 8 | -- Create a Notification widget 9 | dashboard_button = wibox.widget({ 10 | { 11 | { 12 | image = beautiful.dashboard_icon, 13 | scaling_quality = "best", 14 | forced_width = 20, 15 | forced_height = 20, 16 | valign = "center", 17 | halign = "center", 18 | widget = wibox.widget.imagebox, 19 | }, 20 | top = 2, 21 | bottom = 2, 22 | left = 4, 23 | right = 4, 24 | widget = wibox.container.margin, 25 | }, 26 | shape = helpers.mkroundrect(), 27 | widget = wibox.container.background, 28 | buttons = { awful.button({}, 1, function() 29 | Dashboard_wibox.toggle() 30 | end) }, 31 | }) 32 | 33 | notif_widget_button = wibox.widget({ 34 | { 35 | { 36 | image = beautiful.notification_icon, 37 | valign = "center", 38 | halign = "center", 39 | forced_width = 20, 40 | forced_height = 20, 41 | widget = wibox.widget.imagebox, 42 | }, 43 | top = 2, 44 | bottom = 2, 45 | left = 4, 46 | right = 4, 47 | widget = wibox.container.margin, 48 | }, 49 | shape = helpers.mkroundrect(), 50 | widget = wibox.container.background, 51 | buttons = { 52 | awful.button({}, 1, function() 53 | notif_wibox.toggle() 54 | end), 55 | }, 56 | }) 57 | 58 | -- Keyboard map indicator and switcher 59 | mykeyboardlayout = wibox.widget({ 60 | awful.widget.keyboardlayout(), 61 | left = 40, 62 | right = 40, 63 | top = 20, 64 | bottom = 20, 65 | widget = wibox.container.margin, 66 | }) 67 | 68 | kblayout_popup = awful.popup({ 69 | widget = mykeyboardlayout, 70 | ontop = true, 71 | visible = false, 72 | placement = awful.placement.centered, 73 | shape = helpers.mkroundrect(), 74 | }) 75 | 76 | local function keyboardlayout_toggle() 77 | if awesome.xkb_get_layout_group() == 1 then 78 | awesome.xkb_set_layout_group(0) 79 | else 80 | awesome.xkb_set_layout_group(1) 81 | end 82 | end 83 | 84 | kblayout_keygrabber = awful.keygrabber({ 85 | keybindings = { awful.key({ "Shift" }, "space", function() 86 | keyboardlayout_toggle() 87 | end) }, 88 | stop_key = "Shift", 89 | stop_event = "release", 90 | start_callback = function() 91 | keyboardlayout_toggle() 92 | kblayout_popup.visible = true 93 | end, 94 | stop_callback = function() 95 | kblayout_popup.visible = false 96 | end, 97 | keypressed_callback = function() 98 | keyboardlayout_toggle() 99 | end, 100 | export_keybindings = true, 101 | }) 102 | 103 | -- Create a textclock widget 104 | mytextclock = wibox.widget({ 105 | { 106 | { 107 | id = "clock_role", 108 | format = "" .. "%H:%M" .. "", 109 | refresh = 60, 110 | font = beautiful.nerd_font .. " 14", 111 | widget = wibox.widget.textclock(), 112 | }, 113 | margins = 4, 114 | widget = wibox.container.margin, 115 | }, 116 | shape = helpers.mkroundrect(), 117 | widget = wibox.container.background, 118 | buttons = { 119 | awful.button({}, 1, function() 120 | Calendar_popup.toggle() 121 | end), 122 | }, 123 | }) 124 | 125 | --system tray 126 | mysystemtray = wibox.widget({ 127 | { 128 | base_size = 22, 129 | reverse = true, 130 | widget = wibox.widget.systray(), 131 | }, 132 | valign = "center", 133 | halign = "center", 134 | widget = wibox.container.place, 135 | }) 136 | 137 | screen.connect_signal("request::desktop_decoration", function(s) 138 | -- Each screen has its own tag table. 139 | tag_1 = awful.tag.add(" 󱓻 ", { 140 | -- icon = conf_path .. "assets/icons/general.png", 141 | layout = bling.layout.mstab, 142 | -- master_fill_policy = "master_width_factor", 143 | gap_single_client = false, 144 | -- gap = 15, 145 | -- screen = s, 146 | selected = true, 147 | }) 148 | tag_2 = awful.tag.add(" 󱓻 ", { 149 | -- icon = conf_path .. "assets/icons/www.png", 150 | layout = awful.layout.suit.max, 151 | -- master_fill_policy = "master_width_factor", 152 | gap_single_client = false, 153 | -- gap = 15, 154 | -- screen = s, 155 | -- selected = true, 156 | }) 157 | tag_3 = awful.tag.add(" 󱓻 ", { 158 | --ﲹ 159 | -- icon = conf_path .. "assets/icons/exchange.png", 160 | layout = awful.layout.suit.max, 161 | -- master_fill_policy = "master_width_factor", 162 | gap_single_client = false, 163 | -- gap = 15, 164 | -- screen = s, 165 | -- selected = true, 166 | }) 167 | tag_4 = awful.tag.add(" 󱓻 ", { 168 | -- icon = conf_path .. "assets/icons/gimp.png", 169 | layout = awful.layout.suit.floating, 170 | -- master_fill_policy = "master_width_factor", 171 | gap_single_client = false, 172 | -- gap = 15, 173 | -- screen = s, 174 | -- selected = true, 175 | }) 176 | tag_5 = awful.tag.add(" 󱓻 ", { 177 | -- icon = conf_path .. "assets/icons/libre-office-suite.png", 178 | layout = bling.layout.equalarea, 179 | -- master_fill_policy = "master_width_factor", 180 | gap_single_client = false, 181 | -- gap = 15, 182 | -- screen = s, 183 | -- selected = true, 184 | }) 185 | 186 | s.mylayoutbox = wibox.widget({ 187 | awful.widget.layoutbox({ 188 | screen = s, 189 | forced_height = 48, 190 | forced_width = 48, 191 | }), 192 | top = 20, 193 | bottom = 20, 194 | left = 40, 195 | right = 40, 196 | widget = wibox.container.margin, 197 | }) 198 | 199 | s.layoutbox_popup = awful.popup({ 200 | widget = s.mylayoutbox, 201 | screen = s, 202 | ontop = true, 203 | visible = false, 204 | shape = helpers.mkroundrect(), 205 | placement = awful.placement.centered, 206 | }) 207 | 208 | layoutbox_keygrabber = awful.keygrabber({ 209 | keybindings = { 210 | awful.key({ modkey }, "space", function() 211 | awful.layout.inc(1) 212 | end, { description = "select next", group = "layout" }), 213 | }, 214 | keypressed_callback = function() 215 | awful.layout.inc(1) 216 | end, 217 | stop_key = modkey, 218 | stop_event = "release", 219 | start_callback = function() 220 | s.layoutbox_popup.visible = true 221 | end, 222 | stop_callback = function() 223 | s.layoutbox_popup.visible = false 224 | end, 225 | export_keybindings = true, 226 | }) 227 | 228 | layoutbox_keygrabber_1 = awful.keygrabber({ 229 | keybindings = { 230 | awful.key({ modkey, "Shift" }, "space", function() 231 | awful.layout.inc(-1) 232 | end, { description = "select previous", group = "layout" }), 233 | }, 234 | keypressed_callback = function() 235 | awful.layout.inc(-1) 236 | end, 237 | stop_key = modkey, 238 | stop_event = "release", 239 | start_callback = function() 240 | s.layoutbox_popup.visible = true 241 | end, 242 | stop_callback = function() 243 | s.layoutbox_popup.visible = false 244 | end, 245 | export_keybindings = true, 246 | }) 247 | 248 | -- Create a taglist widget 249 | s.mytaglist = awful.widget.taglist({ 250 | screen = s, 251 | filter = awful.widget.taglist.filter.all, 252 | style = { 253 | font = beautiful.nerd_font_mono .. " 12", 254 | -- shape = helpers.mkparallelogram(), 255 | shape = helpers.mkroundrect(), 256 | }, 257 | layout = { 258 | spacing = 2, 259 | layout = wibox.layout.fixed.horizontal, 260 | }, 261 | widget_template = { 262 | { 263 | { 264 | id = "text_role", 265 | widget = wibox.widget.textbox, 266 | }, 267 | left = 10, 268 | right = 10, 269 | widget = wibox.container.margin, 270 | }, 271 | id = "background_role", 272 | widget = wibox.container.background, 273 | -- Add support for hover colors and an index label 274 | create_callback = function(self, _, _, _) --luacheck: no unused args 275 | self:connect_signal("mouse::enter", function() 276 | if self.bg ~= beautiful.taglist_bg_focus then 277 | self.backup = self.bg 278 | self.has_backup = true 279 | end 280 | self.bg = beautiful.taglist_bg_focus 281 | end) 282 | self:connect_signal("mouse::leave", function() 283 | if self.has_backup then 284 | self.bg = self.backup 285 | end 286 | end) 287 | end, 288 | update_callback = function(self, _, _, _) --luacheck: no unused args 289 | if self.bg ~= beautiful.taglist_bg_focus then 290 | self.backup = self.bg 291 | self.has_backup = true 292 | end 293 | end, 294 | }, 295 | buttons = { 296 | awful.button({}, 1, function(t) 297 | t:view_only() 298 | end), 299 | awful.button({ modkey }, 1, function(t) 300 | if client.focus then 301 | client.focus:move_to_tag(t) 302 | end 303 | end), 304 | awful.button({}, 3, awful.tag.viewtoggle), 305 | awful.button({ modkey }, 3, function(t) 306 | if client.focus then 307 | client.focus:toggle_tag(t) 308 | end 309 | end), 310 | awful.button({}, 4, function(t) 311 | awful.tag.viewprev(t.screen) 312 | end), 313 | awful.button({}, 5, function(t) 314 | awful.tag.viewnext(t.screen) 315 | end), 316 | }, 317 | }) 318 | 319 | -- Create a tasklist widget 320 | s.mytasklist = awful.widget.tasklist({ 321 | screen = s, 322 | filter = awful.widget.tasklist.filter.currenttags, 323 | buttons = { 324 | awful.button({}, 1, function(c) 325 | c:activate({ context = "tasklist", action = "toggle_minimization" }) 326 | end), 327 | awful.button({}, 3, function() 328 | awful.menu.client_list({ theme = { width = 250 } }) 329 | end), 330 | awful.button({}, 4, function() 331 | awful.client.focus.byidx(-1) 332 | end), 333 | awful.button({}, 5, function() 334 | awful.client.focus.byidx(1) 335 | end), 336 | }, 337 | style = { 338 | -- shape = helpers.mkparallelogram(), 339 | shape = helpers.mkroundrect(), 340 | }, 341 | layout = { 342 | spacing = 2, 343 | layout = wibox.layout.flex.horizontal, 344 | }, 345 | widget_template = { 346 | { 347 | { 348 | { 349 | id = "client_icon", 350 | scaling_quality = "best", 351 | valign = "center", 352 | halign = "center", 353 | forced_width = 24, 354 | forced_height = 24, 355 | widget = wibox.widget.imagebox, 356 | }, 357 | { 358 | id = "text_role", 359 | widget = wibox.widget.textbox, 360 | }, 361 | spacing = 5, 362 | layout = wibox.layout.fixed.horizontal, 363 | }, 364 | left = 10, 365 | right = 10, 366 | widget = wibox.container.margin, 367 | }, 368 | create_callback = function(self, c, _, _) 369 | self:get_children_by_id("client_icon")[1].image = menubar.utils.lookup_icon(c.class) 370 | or menubar.utils.lookup_icon(c.class:lower()) 371 | or c.icon 372 | end, 373 | id = "background_role", 374 | widget = wibox.container.background, 375 | }, 376 | }) 377 | 378 | -- Create the wibox 379 | s.mywibox = awful.wibar({ 380 | position = "top", 381 | height = 30, 382 | border_width = 4, 383 | border_color = beautiful.bg_normal, 384 | margins = 3, 385 | shape = helpers.mkroundrect(), 386 | screen = s, 387 | bg = beautiful.bg_normal, 388 | widget = { 389 | -- expand = "none", 390 | layout = wibox.layout.align.horizontal, 391 | s.mytaglist, --Left widgets 392 | { 393 | -- Middle widget 394 | s.mytasklist, 395 | layout = wibox.layout.fixed.horizontal, 396 | }, 397 | { 398 | -- Right widgets 399 | mysystemtray, 400 | mytextclock, 401 | dashboard_button, 402 | notif_widget_button, 403 | spacing = 8, 404 | layout = wibox.layout.fixed.horizontal, 405 | }, 406 | }, 407 | }) 408 | 409 | Calendar_popup = awful.popup({ 410 | widget = Calendar, 411 | ontop = true, 412 | honor_workarea = true, 413 | margins = 8, 414 | border_width = 10, 415 | border_color = beautiful.bg_normal, 416 | visible = false, 417 | shape = helpers.mkroundrect(), 418 | placement = function(d) 419 | awful.placement.next_to(d, { 420 | margins = 8, 421 | geometry = s.mywibox, 422 | preferred_positions = "bottom", 423 | preferred_anchors = "back", 424 | }) 425 | end, 426 | }) 427 | 428 | function Calendar_popup.toggle() 429 | Calendar_popup.visible = not Calendar_popup.visible 430 | end 431 | 432 | Calendar_popup:connect_signal("property::visible", function(self) 433 | if self.visible then 434 | mytextclock.bg = beautiful.bg_focus 435 | else 436 | mytextclock.bg = beautiful.bg_normal 437 | end 438 | end) 439 | end) 440 | awful.keyboard.append_global_keybindings({ 441 | awful.key({ "Shift" }, "space", function() 442 | keyboardlayout_toggle() 443 | end), 444 | }) 445 | -------------------------------------------------------------------------------- /rofi/config.rasi: -------------------------------------------------------------------------------- 1 | configuration { 2 | modes: "combi,emoji"; 3 | combi-modes: "drun"; 4 | font: "FiraCode Nerd Font 12"; 5 | fixed-num-lines: false; 6 | show-icons: true; 7 | icon-theme: "Zafiro-Icons-Light"; 8 | /* drun-match-fields: "name,generic,exec,categories,keywords";*/ 9 | /* drun-display-format: "{name} [({generic})]";*/ 10 | /* disable-history: false;*/ 11 | /* ignored-prefixes: "";*/ 12 | /* sidebar-mode: true; */ 13 | /* eh: 1;*/ 14 | /* matching: "normal";*/ 15 | /* tokenize: true;*/ 16 | /* m: "-5";*/ 17 | /* filter: ;*/ 18 | /* dpi: -1;*/ 19 | /* threads: 0;*/ 20 | /* scroll-method: 0;*/ 21 | /* window-format: "{w} {c} {t}";*/ 22 | /* click-to-exit: true;*/ 23 | /* max-history-size: 25;*/ 24 | /* combi-hide-mode-prefix: true; */ 25 | combi-display-format: "{text}"; 26 | /* matching-negate-char: '-' /* unsupported */;*/ 27 | /* cache-dir: ;*/ 28 | /* drun-use-desktop-cache: false;*/ 29 | /* drun-reload-desktop-cache: false;*/ 30 | /* application-fallback-icon: ;*/ 31 | /* pid: "/run/user/1000/rofi.pid";*/ 32 | /* display-windowcd: ;*/ 33 | /* display-run: ;*/ 34 | /* display-ssh: ;*/ 35 | display-drun:"Search" ; 36 | display-combi:"Search" ; 37 | /* display-keys: ;*/ 38 | /* display-filebrowser: ;*/ 39 | display-emoji:"Search" ; 40 | timeout { 41 | action: "kb-cancel"; 42 | delay: 0; 43 | } 44 | } 45 | 46 | @theme "gruvbox-dark" 47 | 48 | 49 | /** Default settings, every widget inherits from this. */ 50 | /**/ 51 | * { 52 | /* Theme settings */ 53 | highlight: bold italic; 54 | scrollbar: true; 55 | /* Gruvbox dark colors */ 56 | /* gruvbox-dark-bg0: #282828; */ 57 | /* gruvbox-dark-bg0-soft: #32302f; */ 58 | /* gruvbox-dark-bg3: #665c54; */ 59 | /* gruvbox-dark-fg0: #fbf1c7; */ 60 | /* gruvbox-dark-fg1: #ebdbb2; */ 61 | /* gruvbox-dark-red-dark: #cc241d; */ 62 | /* gruvbox-dark-red-light: #fb4934; */ 63 | /* gruvbox-dark-yellow-dark: #d79921; */ 64 | /* gruvbox-dark-yellow-light: #fabd2f; */ 65 | /* gruvbox-dark-gray: #a89984; */ 66 | gruvbox-dark-bg0: #ECEEE9; 67 | gruvbox-dark-bg0-soft: #D5CEB4; 68 | gruvbox-dark-bg3: #0091A2; 69 | gruvbox-dark-fg0: #36576A; 70 | gruvbox-dark-fg1: #333333; 71 | gruvbox-dark-red-dark: #B7386F; 72 | gruvbox-dark-red-light: #CD7069; 73 | gruvbox-dark-yellow-dark: #D0D34E; 74 | gruvbox-dark-yellow-light: #e5c07b; 75 | gruvbox-dark-gray: #3E5E6B; 76 | /* Gruvbox dark colors */ 77 | /* Theme colors */ 78 | background: @gruvbox-dark-bg0; 79 | background-color: @background; 80 | foreground: @gruvbox-dark-fg1; 81 | border-color: @gruvbox-dark-gray; 82 | separatorcolor: @border-color; 83 | scrollbar-handle: @border-color; 84 | 85 | normal-background: @background; 86 | normal-foreground: @foreground; 87 | alternate-normal-background: @gruvbox-dark-bg0-soft; 88 | alternate-normal-foreground: @foreground; 89 | selected-normal-background: @gruvbox-dark-bg3; 90 | selected-normal-foreground: @gruvbox-dark-fg0; 91 | 92 | active-background: @gruvbox-dark-yellow-dark; 93 | active-foreground: @background; 94 | alternate-active-background: @active-background; 95 | alternate-active-foreground: @active-foreground; 96 | selected-active-background: @gruvbox-dark-yellow-light; 97 | selected-active-foreground: @active-foreground; 98 | 99 | urgent-background: @gruvbox-dark-red-dark; 100 | urgent-foreground: @background; 101 | alternate-urgent-background: @urgent-background; 102 | alternate-urgent-foreground: @urgent-foreground; 103 | selected-urgent-background: @gruvbox-dark-red-light; 104 | selected-urgent-foreground: @urgent-foreground; 105 | } 106 | /**/ 107 | /**/ 108 | /* /** */ 109 | /* * Entry box on top. */ 110 | /* */ */ 111 | /* entry { */ 112 | /* /** top and bottom border */ */ 113 | /* border: 2px 2px 2px 0px; */ 114 | /* border-color: @border-color; */ 115 | /* border-radius: 0px 5px 5px 0px; */ 116 | /* background-color: @alternate-normal-background; */ 117 | /* /** 4px padding on the inside of the border. */ */ 118 | /* padding: 4px; */ 119 | /* /** when no text is set, show 'Type to filter' */ */ 120 | /* placeholder: ""; */ 121 | /* /** this text is dark grey */ */ 122 | /* placeholder-color: @normal-foreground; */ 123 | /* /** inherit font setting from parent */ */ 124 | /* font: inherit; */ 125 | /* text-color: @alternate-normal-foreground; */ 126 | /* cursor: text; */ 127 | /* } */ 128 | /**/ 129 | /* /** */ 130 | /* * Input bar */ 131 | /* */ */ 132 | /* inputbar { */ 133 | /* /** no spacing between widgets */ */ 134 | /* spacing: 0; */ 135 | /* /** include entry and mode-switcher (removes prompt) */ */ 136 | /* children: [ icon-keyboard, entry ]; */ 137 | /* /** use monospace font. */ */ 138 | /* font: "FiraCode Nerd Font 14"; */ 139 | /* } */ 140 | /**/ 141 | /* /** */ 142 | /* * Mode switcher. */ 143 | /* * We set it up to 'connect' to reset of input bar. */ 144 | /* */ */ 145 | /* /* mode-switcher { */ */ 146 | /* /* /** we use spacing between children to draw a 'border' */ */ */ 147 | /* /* spacing: 2px; */ */ 148 | /* /* border: 2px; */ */ 149 | /* /* border-radius: 0px 4px 4px 0px; */ */ 150 | /* /* /** border and background are same color, widget will have desired bg color.*/ */ */ 151 | /* /* /** this way the spacing shows as a border */ */ */ 152 | /* /* border-color: darkgrey; */ */ 153 | /* /* background-color: darkgrey; */ */ 154 | /* /* /** inherit font setting from parent */ */ */ 155 | /* /* font: inherit; */ */ 156 | /* /* } */ */ 157 | /**/ 158 | /* /** */ 159 | /* * Buttons in mode switcher. */ 160 | /* */ */ 161 | /* /* button { */ */ 162 | /* /* background-color: @alternate-normal-background; */ */ 163 | /* /* border-color: @border-color; */ */ 164 | /* /* /** inherit font setting from parent */ */ */ 165 | /* /* font: inherit; */ */ 166 | /* /* cursor: pointer; */ */ 167 | /* /* } */ */ 168 | /**/ 169 | /* /** */ 170 | /* * Selected buttons in mode switcher. */ 171 | /* */ */ 172 | /* /* button selected { */ */ 173 | /* /* background-color: lightgrey; */ */ 174 | /* /* text-color: black; */ */ 175 | /* /* } */ */ 176 | /**/ 177 | /* /** */ 178 | /* * Small icon in inputbar */ 179 | /* */ */ 180 | /* icon-keyboard { */ 181 | /* /** give it a 2 pixel border, except on the right side. */ */ 182 | /* border: 2px 0px 2px 2px; */ 183 | /* /** with a radius on the left two corners. */ */ 184 | /* border-radius: 5px 0px 0px 5px; */ 185 | /* /** add matching border. */ */ 186 | /* border-color: @border-color; */ 187 | /* /** match background. */ */ 188 | /* background-color: @alternate-normal-background; */ 189 | /* /** move icon away from right border. */ */ 190 | /* padding: 0px 10px 0px 10px; */ 191 | /* /** Only use required space. */ */ 192 | /* expand: false; */ 193 | /* /** icon is around 1.2 font width */ */ 194 | /* size: 1.2em; */ 195 | /* /** Icon name, we use symbolic name here */ */ 196 | /* filename: "keyboard"; */ 197 | /* } */ 198 | /**/ 199 | /* /** */ 200 | /* * Main window widget */ 201 | /* */ */ 202 | window { 203 | /** Place on top center of rofi window on the top center of the screen. */ 204 | /* anchor: center; */ 205 | /* location: center; */ 206 | 207 | /** 100% screen width */ 208 | /* width: 50%; */ 209 | /* height: 40%; */ 210 | 211 | /** Black transparent color. */ 212 | background-color: @normal-background; 213 | /** Small one 1 font width border on inside of window. */ 214 | /* padding: 1px; */ 215 | 216 | /** border */ 217 | /* border-color: @normal-background; */ 218 | border-radius: 0.7em 0.7em 0.7em 0.7em; 219 | /* border: 0.3em 0.3em 0.3em 0.3em; */ 220 | } 221 | /**/ 222 | /* /** */ 223 | /* * Main container in the window. */ 224 | /* */ */ 225 | /* mainbox { */ 226 | /* /** spacing between widgets */ */ 227 | /* /* orientation: horizontal; */ */ 228 | /* spacing: 1em; */ 229 | /* } */ 230 | /**/ 231 | /* /** */ 232 | /* * listview that shows entries. */ 233 | /* */ */ 234 | listview { 235 | /** 4 rows. */ 236 | lines: 4; 237 | /** 6 columns */ 238 | columns: 3; 239 | /** add 1 em spacing between items */ 240 | /* spacing: 0.5em; */ 241 | /** Don't reduce columns if less items are available. */ 242 | fixed-columns: true; 243 | fixed-height: true; 244 | layout: vertical; 245 | flow: vertical; 246 | dynamic: true; 247 | } 248 | /* /** */ 249 | /* * entry in listview. */ 250 | /* */ */ 251 | element { 252 | /** clients are packed vertically. */ 253 | orientation: horizontal; 254 | children: [ element-icon, element-text ]; 255 | /** 2 px border */ 256 | /* border: 2px; */ 257 | /** with 4px radius on corners. */ 258 | border-radius: 0.7em 0.7em 0.7em 0.7em; 259 | /* border-color: @border-color; */ 260 | /* background-color: @alternate-normal-background; */ 261 | /** 4 px padding on the inside of border */ 262 | /* cursor: pointer; */ 263 | /* spacing: 6px; */ 264 | padding: 0.6em; 265 | } 266 | /**/ 267 | /* /** selected element */ */ 268 | /* element selected { */ 269 | /* /** highlighted colors */ */ 270 | /* /* border-radius: 8px 0px 8px 0px; */ */ 271 | /* border: 4px; */ 272 | /* background-color: @selected-normal-background; */ 273 | /* text-color: @selected-normal-foreground; */ 274 | /* } */ 275 | /**/ 276 | /* /** Entry icon */ */ 277 | element-icon { 278 | /** change size to 128 pixels. */ 279 | size: 2.0em; 280 | padding: 0.1em; 281 | cursor: inherit; 282 | } 283 | /**/ 284 | /* /** Entry text */ */ 285 | element-text { 286 | /* align font in (horizontally) center */ 287 | vertical-align: 0.5; 288 | horizontal-align: 0.5; 289 | font: "FiraCode Nerd Font 11"; 290 | /* cursor: inherit; */ 291 | /* text-color: @alternate-normal-foreground; */ 292 | } 293 | -------------------------------------------------------------------------------- /rofi/config_emoji.rasi: -------------------------------------------------------------------------------- 1 | configuration { 2 | modes: "combi,emoji"; 3 | combi-modes: "drun"; 4 | font: "FiraCode Nerd Font 12"; 5 | fixed-num-lines: false; 6 | show-icons: false; 7 | /* icon-theme: ; */ 8 | /* drun-match-fields: "name,generic,exec,categories,keywords";*/ 9 | /* drun-display-format: "{name} [({generic})]";*/ 10 | /* disable-history: false;*/ 11 | /* ignored-prefixes: "";*/ 12 | /* sidebar-mode: true; */ 13 | /* eh: 1;*/ 14 | /* matching: "normal";*/ 15 | /* tokenize: true;*/ 16 | /* m: "-5";*/ 17 | /* filter: ;*/ 18 | /* dpi: -1;*/ 19 | /* threads: 0;*/ 20 | /* scroll-method: 0;*/ 21 | /* window-format: "{w} {c} {t}";*/ 22 | /* click-to-exit: true;*/ 23 | /* max-history-size: 25;*/ 24 | /* combi-hide-mode-prefix: true; */ 25 | combi-display-format: "{text}"; 26 | /* matching-negate-char: '-' /* unsupported */;*/ 27 | /* cache-dir: ;*/ 28 | /* drun-use-desktop-cache: false;*/ 29 | /* drun-reload-desktop-cache: false;*/ 30 | /* application-fallback-icon: ;*/ 31 | /* pid: "/run/user/1000/rofi.pid";*/ 32 | /* display-windowcd: ;*/ 33 | /* display-run: ;*/ 34 | /* display-ssh: ;*/ 35 | display-drun:"Search" ; 36 | display-combi:"Search" ; 37 | /* display-keys: ;*/ 38 | /* display-filebrowser: ;*/ 39 | display-emoji:"Search" ; 40 | timeout { 41 | action: "kb-cancel"; 42 | delay: 0; 43 | } 44 | } 45 | 46 | @theme "gruvbox-dark" 47 | 48 | 49 | /** Default settings, every widget inherits from this. */ 50 | /**/ 51 | * { 52 | /* Theme settings */ 53 | highlight: bold italic; 54 | scrollbar: true; 55 | /* Gruvbox dark colors */ 56 | /* gruvbox-dark-bg0: #282828; */ 57 | /* gruvbox-dark-bg0-soft: #32302f; */ 58 | /* gruvbox-dark-bg3: #665c54; */ 59 | /* gruvbox-dark-fg0: #fbf1c7; */ 60 | /* gruvbox-dark-fg1: #ebdbb2; */ 61 | /* gruvbox-dark-red-dark: #cc241d; */ 62 | /* gruvbox-dark-red-light: #fb4934; */ 63 | /* gruvbox-dark-yellow-dark: #d79921; */ 64 | /* gruvbox-dark-yellow-light: #fabd2f; */ 65 | /* gruvbox-dark-gray: #a89984; */ 66 | gruvbox-dark-bg0: #ECEEE9; 67 | gruvbox-dark-bg0-soft: #D5CEB4; 68 | gruvbox-dark-bg3: #0091A2; 69 | gruvbox-dark-fg0: #36576A; 70 | gruvbox-dark-fg1: #333333; 71 | gruvbox-dark-red-dark: #B7386F; 72 | gruvbox-dark-red-light: #CD7069; 73 | gruvbox-dark-yellow-dark: #D0D34E; 74 | gruvbox-dark-yellow-light: #e5c07b; 75 | gruvbox-dark-gray: #3E5E6B; 76 | /* Gruvbox dark colors */ 77 | /* Theme colors */ 78 | background: @gruvbox-dark-bg0; 79 | background-color: @background; 80 | foreground: @gruvbox-dark-fg1; 81 | border-color: @gruvbox-dark-gray; 82 | separatorcolor: @border-color; 83 | scrollbar-handle: @border-color; 84 | 85 | normal-background: @background; 86 | normal-foreground: @foreground; 87 | alternate-normal-background: @gruvbox-dark-bg0-soft; 88 | alternate-normal-foreground: @foreground; 89 | selected-normal-background: @gruvbox-dark-bg3; 90 | selected-normal-foreground: @gruvbox-dark-fg0; 91 | 92 | active-background: @gruvbox-dark-yellow-dark; 93 | active-foreground: @background; 94 | alternate-active-background: @active-background; 95 | alternate-active-foreground: @active-foreground; 96 | selected-active-background: @gruvbox-dark-yellow-light; 97 | selected-active-foreground: @active-foreground; 98 | 99 | urgent-background: @gruvbox-dark-red-dark; 100 | urgent-foreground: @background; 101 | alternate-urgent-background: @urgent-background; 102 | alternate-urgent-foreground: @urgent-foreground; 103 | selected-urgent-background: @gruvbox-dark-red-light; 104 | selected-urgent-foreground: @urgent-foreground; 105 | } 106 | /**/ 107 | /**/ 108 | /* /** */ 109 | /* * Entry box on top. */ 110 | /* */ */ 111 | /* entry { */ 112 | /* /** top and bottom border */ */ 113 | /* border: 2px 2px 2px 0px; */ 114 | /* border-color: @border-color; */ 115 | /* border-radius: 0px 5px 5px 0px; */ 116 | /* background-color: @alternate-normal-background; */ 117 | /* /** 4px padding on the inside of the border. */ */ 118 | /* padding: 4px; */ 119 | /* /** when no text is set, show 'Type to filter' */ */ 120 | /* placeholder: ""; */ 121 | /* /** this text is dark grey */ */ 122 | /* placeholder-color: @normal-foreground; */ 123 | /* /** inherit font setting from parent */ */ 124 | /* font: inherit; */ 125 | /* text-color: @alternate-normal-foreground; */ 126 | /* cursor: text; */ 127 | /* } */ 128 | /**/ 129 | /* /** */ 130 | /* * Input bar */ 131 | /* */ */ 132 | /* inputbar { */ 133 | /* /** no spacing between widgets */ */ 134 | /* spacing: 0; */ 135 | /* /** include entry and mode-switcher (removes prompt) */ */ 136 | /* children: [ icon-keyboard, entry ]; */ 137 | /* /** use monospace font. */ */ 138 | /* font: "FiraCode Nerd Font 14"; */ 139 | /* } */ 140 | /**/ 141 | /* /** */ 142 | /* * Mode switcher. */ 143 | /* * We set it up to 'connect' to reset of input bar. */ 144 | /* */ */ 145 | /* /* mode-switcher { */ */ 146 | /* /* /** we use spacing between children to draw a 'border' */ */ */ 147 | /* /* spacing: 2px; */ */ 148 | /* /* border: 2px; */ */ 149 | /* /* border-radius: 0px 4px 4px 0px; */ */ 150 | /* /* /** border and background are same color, widget will have desired bg color.*/ */ */ 151 | /* /* /** this way the spacing shows as a border */ */ */ 152 | /* /* border-color: darkgrey; */ */ 153 | /* /* background-color: darkgrey; */ */ 154 | /* /* /** inherit font setting from parent */ */ */ 155 | /* /* font: inherit; */ */ 156 | /* /* } */ */ 157 | /**/ 158 | /* /** */ 159 | /* * Buttons in mode switcher. */ 160 | /* */ */ 161 | /* /* button { */ */ 162 | /* /* background-color: @alternate-normal-background; */ */ 163 | /* /* border-color: @border-color; */ */ 164 | /* /* /** inherit font setting from parent */ */ */ 165 | /* /* font: inherit; */ */ 166 | /* /* cursor: pointer; */ */ 167 | /* /* } */ */ 168 | /**/ 169 | /* /** */ 170 | /* * Selected buttons in mode switcher. */ 171 | /* */ */ 172 | /* /* button selected { */ */ 173 | /* /* background-color: lightgrey; */ */ 174 | /* /* text-color: black; */ */ 175 | /* /* } */ */ 176 | /**/ 177 | /* /** */ 178 | /* * Small icon in inputbar */ 179 | /* */ */ 180 | /* icon-keyboard { */ 181 | /* /** give it a 2 pixel border, except on the right side. */ */ 182 | /* border: 2px 0px 2px 2px; */ 183 | /* /** with a radius on the left two corners. */ */ 184 | /* border-radius: 5px 0px 0px 5px; */ 185 | /* /** add matching border. */ */ 186 | /* border-color: @border-color; */ 187 | /* /** match background. */ */ 188 | /* background-color: @alternate-normal-background; */ 189 | /* /** move icon away from right border. */ */ 190 | /* padding: 0px 10px 0px 10px; */ 191 | /* /** Only use required space. */ */ 192 | /* expand: false; */ 193 | /* /** icon is around 1.2 font width */ */ 194 | /* size: 1.2em; */ 195 | /* /** Icon name, we use symbolic name here */ */ 196 | /* filename: "keyboard"; */ 197 | /* } */ 198 | /**/ 199 | /* /** */ 200 | /* * Main window widget */ 201 | /* */ */ 202 | window { 203 | /** Place on top center of rofi window on the top center of the screen. */ 204 | /* anchor: center; */ 205 | /* location: center; */ 206 | 207 | /** 100% screen width */ 208 | /* width: 40%;*/ 209 | /* height: 40%;*/ 210 | 211 | /** Black transparent color. */ 212 | background-color: @normal-background; 213 | /** Small one 1 font width border on inside of window. */ 214 | /* padding: 1px; */ 215 | 216 | /** border */ 217 | /* border-color: @normal-background; */ 218 | border-radius: 0.7em 0.7em 0.7em 0.7em; 219 | /* border: 0.3em 0.3em 0.3em 0.3em; */ 220 | } 221 | /**/ 222 | /* /** */ 223 | /* * Main container in the window. */ 224 | /* */ */ 225 | /* mainbox { */ 226 | /* /** spacing between widgets */ */ 227 | /* /* orientation: horizontal; */ */ 228 | /* spacing: 1em; */ 229 | /* } */ 230 | /**/ 231 | /* /** */ 232 | /* * listview that shows entries. */ 233 | /* */ */ 234 | listview { 235 | /** 4 rows. */ 236 | lines: 6; 237 | /** 6 columns */ 238 | columns: 3; 239 | /** add 1 em spacing between items */ 240 | /* spacing: 0.5em; */ 241 | /** Don't reduce columns if less items are available. */ 242 | /* fixed-columns: true; */ 243 | /* fixed-height: true; */ 244 | layout: vertical; 245 | /* flow: vertical; */ 246 | /* dynamic: true; */ 247 | } 248 | /* /** */ 249 | /* * entry in listview. */ 250 | /* */ */ 251 | element { 252 | /** clients are packed vertically. */ 253 | orientation: vertical; 254 | children: [ element-text ]; 255 | /** 2 px border */ 256 | /* border: 2px; */ 257 | /** with 4px radius on corners. */ 258 | border-radius: 0.7em 0.7em 0.7em 0.7em; 259 | /* border-color: @border-color; */ 260 | /* background-color: @alternate-normal-background; */ 261 | /** 4 px padding on the inside of border */ 262 | /* cursor: pointer; */ 263 | /* spacing: 6px; */ 264 | padding: 0.6em; 265 | } 266 | /**/ 267 | /* /** selected element */ */ 268 | /* element selected { */ 269 | /* /** highlighted colors */ */ 270 | /* /* border-radius: 8px 0px 8px 0px; */ */ 271 | /* border: 4px; */ 272 | /* background-color: @selected-normal-background; */ 273 | /* text-color: @selected-normal-foreground; */ 274 | /* } */ 275 | /**/ 276 | /* /** Entry icon */ */ 277 | element-icon { 278 | /** change size to 128 pixels. */ 279 | /* size: 3.0em; */ 280 | padding: 0.1em; 281 | /* cursor: inherit; */ 282 | } 283 | /**/ 284 | /* /** Entry text */ */ 285 | element-text { 286 | /* align font in (horizontally) center */ 287 | vertical-align: 0.5; 288 | /* horizontal-align: 0.5; */ 289 | font: "FiraCode Nerd Font 12"; 290 | /* cursor: inherit; */ 291 | /* text-color: @alternate-normal-foreground; */ 292 | } 293 | -------------------------------------------------------------------------------- /wezterm/wezterm.lua: -------------------------------------------------------------------------------- 1 | -- Pull in the wezterm API 2 | local wezterm = require("wezterm") 3 | 4 | -- This table will hold the configuration. 5 | local config = {} 6 | 7 | -- In newer versions of wezterm, use the config_builder which will 8 | -- help provide clearer error messages 9 | if wezterm.config_builder then 10 | config = wezterm.config_builder() 11 | end 12 | 13 | -- This is where you actually apply your config choices 14 | 15 | -- For example, changing the color scheme: 16 | -- config.color_scheme = "OneDark (Gogh)" 17 | config.color_scheme = "Oceanic-Next" 18 | -- config.color_scheme = "matrix" 19 | config.font = wezterm.font_with_fallback({ 20 | "Cascadia Code", 21 | { family = "Symbols Nerd Font", weight = "Bold", stretch = "Normal", style = "Normal" }, 22 | { family = "IBM Plex Mono", weight = "Medium", stretch = "Normal", style = "Normal" }, 23 | -- { family = "JetBrains Mono", weight = "Medium", stretch = "Normal", style = "Normal" }, 24 | { family = "Noto Sans Canadian Aboriginal", weight = "Bold", stretch = "Normal", style = "Normal" }, 25 | { family = "Noto Sans Symbols", weight = "Bold", stretch = "Normal", style = "Normal" }, 26 | { family = "Noto Sans Math", weight = "Medium", stretch = "Normal", style = "Normal" }, 27 | }) 28 | config.font_size = 12 29 | config.term = "wezterm" 30 | -- config.window_background_opacity = 0.7 31 | -- config.line_height = 1.1 32 | -- config.cell_width = 1.1 33 | 34 | config.hide_tab_bar_if_only_one_tab = true 35 | 36 | -- and finally, return the configuration to wezterm 37 | return config 38 | --------------------------------------------------------------------------------