├── .gitignore ├── .gitmodules ├── LICENSE.MD ├── README.md ├── bin ├── backup-dir ├── itopdf ├── minimize-pdf ├── sort-json ├── wget-dir ├── wofi-power └── wofi-windows ├── code └── settings.json ├── first-run.sh ├── fonts.conf ├── gitconfig ├── gtk ├── gtkrc-2.0 └── settings.ini ├── install ├── install.conf.yaml ├── install_yay ├── kitty ├── kitty.conf ├── tokyonight_day.conf └── tokyonight_storm.conf ├── mako └── config ├── mpv ├── input.conf ├── mpv.conf └── scripts │ ├── auto-save.lua │ ├── autoload.lua │ ├── autosub.lua │ └── mpris.so ├── nvim ├── .gitignore ├── .stylua.toml ├── init.lua └── lua │ └── plugins.lua ├── shell ├── TokyoNight Day.theme ├── TokyoNight Storm.theme ├── bash_profile ├── bashrc └── config.fish ├── sway ├── bg.jpg └── config ├── swaylock └── config ├── waybar ├── config └── style.css ├── wofi ├── config └── style.css └── zathura ├── tokyonight_day.zathurarc ├── tokyonight_storm.zathurarc └── zathurarc /.gitignore: -------------------------------------------------------------------------------- 1 | *.pkg.tar.xz 2 | .vscode 3 | mpv/watch_later 4 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "dotbot"] 2 | path = dotbot 3 | url = https://github.com/anishathalye/dotbot 4 | branch = master 5 | [submodule "gtk/themes/fausto-tokyo-night"] 6 | path = gtk/themes/fausto-tokyo-night 7 | url = https://github.com/Fausto-Korpsvart/Tokyo-Night-GTK-Theme.git 8 | -------------------------------------------------------------------------------- /LICENSE.MD: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 2, June 1991 3 | 4 | Copyright (C) 1989, 1991 Free Software Foundation, Inc., 5 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 6 | Everyone is permitted to copy and distribute verbatim copies 7 | of this license document, but changing it is not allowed. 8 | 9 | Preamble 10 | 11 | The licenses for most software are designed to take away your 12 | freedom to share and change it. By contrast, the GNU General Public 13 | License is intended to guarantee your freedom to share and change free 14 | software--to make sure the software is free for all its users. This 15 | General Public License applies to most of the Free Software 16 | Foundation's software and to any other program whose authors commit to 17 | using it. (Some other Free Software Foundation software is covered by 18 | the GNU Lesser General Public License instead.) You can apply it to 19 | your programs, too. 20 | 21 | When we speak of free software, we are referring to freedom, not 22 | price. Our General Public Licenses are designed to make sure that you 23 | have the freedom to distribute copies of free software (and charge for 24 | this service if you wish), that you receive source code or can get it 25 | if you want it, that you can change the software or use pieces of it 26 | in new free programs; and that you know you can do these things. 27 | 28 | To protect your rights, we need to make restrictions that forbid 29 | anyone to deny you these rights or to ask you to surrender the rights. 30 | These restrictions translate to certain responsibilities for you if you 31 | distribute copies of the software, or if you modify it. 32 | 33 | For example, if you distribute copies of such a program, whether 34 | gratis or for a fee, you must give the recipients all the rights that 35 | you have. You must make sure that they, too, receive or can get the 36 | source code. And you must show them these terms so they know their 37 | rights. 38 | 39 | We protect your rights with two steps: (1) copyright the software, and 40 | (2) offer you this license which gives you legal permission to copy, 41 | distribute and/or modify the software. 42 | 43 | Also, for each author's protection and ours, we want to make certain 44 | that everyone understands that there is no warranty for this free 45 | software. If the software is modified by someone else and passed on, we 46 | want its recipients to know that what they have is not the original, so 47 | that any problems introduced by others will not reflect on the original 48 | authors' reputations. 49 | 50 | Finally, any free program is threatened constantly by software 51 | patents. We wish to avoid the danger that redistributors of a free 52 | program will individually obtain patent licenses, in effect making the 53 | program proprietary. To prevent this, we have made it clear that any 54 | patent must be licensed for everyone's free use or not licensed at all. 55 | 56 | The precise terms and conditions for copying, distribution and 57 | modification follow. 58 | 59 | GNU GENERAL PUBLIC LICENSE 60 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 61 | 62 | 0. This License applies to any program or other work which contains 63 | a notice placed by the copyright holder saying it may be distributed 64 | under the terms of this General Public License. The "Program", below, 65 | refers to any such program or work, and a "work based on the Program" 66 | means either the Program or any derivative work under copyright law: 67 | that is to say, a work containing the Program or a portion of it, 68 | either verbatim or with modifications and/or translated into another 69 | language. (Hereinafter, translation is included without limitation in 70 | the term "modification".) Each licensee is addressed as "you". 71 | 72 | Activities other than copying, distribution and modification are not 73 | covered by this License; they are outside its scope. The act of 74 | running the Program is not restricted, and the output from the Program 75 | is covered only if its contents constitute a work based on the 76 | Program (independent of having been made by running the Program). 77 | Whether that is true depends on what the Program does. 78 | 79 | 1. You may copy and distribute verbatim copies of the Program's 80 | source code as you receive it, in any medium, provided that you 81 | conspicuously and appropriately publish on each copy an appropriate 82 | copyright notice and disclaimer of warranty; keep intact all the 83 | notices that refer to this License and to the absence of any warranty; 84 | and give any other recipients of the Program a copy of this License 85 | along with the Program. 86 | 87 | You may charge a fee for the physical act of transferring a copy, and 88 | you may at your option offer warranty protection in exchange for a fee. 89 | 90 | 2. You may modify your copy or copies of the Program or any portion 91 | of it, thus forming a work based on the Program, and copy and 92 | distribute such modifications or work under the terms of Section 1 93 | above, provided that you also meet all of these conditions: 94 | 95 | a) You must cause the modified files to carry prominent notices 96 | stating that you changed the files and the date of any change. 97 | 98 | b) You must cause any work that you distribute or publish, that in 99 | whole or in part contains or is derived from the Program or any 100 | part thereof, to be licensed as a whole at no charge to all third 101 | parties under the terms of this License. 102 | 103 | c) If the modified program normally reads commands interactively 104 | when run, you must cause it, when started running for such 105 | interactive use in the most ordinary way, to print or display an 106 | announcement including an appropriate copyright notice and a 107 | notice that there is no warranty (or else, saying that you provide 108 | a warranty) and that users may redistribute the program under 109 | these conditions, and telling the user how to view a copy of this 110 | License. (Exception: if the Program itself is interactive but 111 | does not normally print such an announcement, your work based on 112 | the Program is not required to print an announcement.) 113 | 114 | These requirements apply to the modified work as a whole. If 115 | identifiable sections of that work are not derived from the Program, 116 | and can be reasonably considered independent and separate works in 117 | themselves, then this License, and its terms, do not apply to those 118 | sections when you distribute them as separate works. But when you 119 | distribute the same sections as part of a whole which is a work based 120 | on the Program, the distribution of the whole must be on the terms of 121 | this License, whose permissions for other licensees extend to the 122 | entire whole, and thus to each and every part regardless of who wrote it. 123 | 124 | Thus, it is not the intent of this section to claim rights or contest 125 | your rights to work written entirely by you; rather, the intent is to 126 | exercise the right to control the distribution of derivative or 127 | collective works based on the Program. 128 | 129 | In addition, mere aggregation of another work not based on the Program 130 | with the Program (or with a work based on the Program) on a volume of 131 | a storage or distribution medium does not bring the other work under 132 | the scope of this License. 133 | 134 | 3. You may copy and distribute the Program (or a work based on it, 135 | under Section 2) in object code or executable form under the terms of 136 | Sections 1 and 2 above provided that you also do one of the following: 137 | 138 | a) Accompany it with the complete corresponding machine-readable 139 | source code, which must be distributed under the terms of Sections 140 | 1 and 2 above on a medium customarily used for software interchange; or, 141 | 142 | b) Accompany it with a written offer, valid for at least three 143 | years, to give any third party, for a charge no more than your 144 | cost of physically performing source distribution, a complete 145 | machine-readable copy of the corresponding source code, to be 146 | distributed under the terms of Sections 1 and 2 above on a medium 147 | customarily used for software interchange; or, 148 | 149 | c) Accompany it with the information you received as to the offer 150 | to distribute corresponding source code. (This alternative is 151 | allowed only for noncommercial distribution and only if you 152 | received the program in object code or executable form with such 153 | an offer, in accord with Subsection b above.) 154 | 155 | The source code for a work means the preferred form of the work for 156 | making modifications to it. For an executable work, complete source 157 | code means all the source code for all modules it contains, plus any 158 | associated interface definition files, plus the scripts used to 159 | control compilation and installation of the executable. However, as a 160 | special exception, the source code distributed need not include 161 | anything that is normally distributed (in either source or binary 162 | form) with the major components (compiler, kernel, and so on) of the 163 | operating system on which the executable runs, unless that component 164 | itself accompanies the executable. 165 | 166 | If distribution of executable or object code is made by offering 167 | access to copy from a designated place, then offering equivalent 168 | access to copy the source code from the same place counts as 169 | distribution of the source code, even though third parties are not 170 | compelled to copy the source along with the object code. 171 | 172 | 4. You may not copy, modify, sublicense, or distribute the Program 173 | except as expressly provided under this License. Any attempt 174 | otherwise to copy, modify, sublicense or distribute the Program is 175 | void, and will automatically terminate your rights under this License. 176 | However, parties who have received copies, or rights, from you under 177 | this License will not have their licenses terminated so long as such 178 | parties remain in full compliance. 179 | 180 | 5. You are not required to accept this License, since you have not 181 | signed it. However, nothing else grants you permission to modify or 182 | distribute the Program or its derivative works. These actions are 183 | prohibited by law if you do not accept this License. Therefore, by 184 | modifying or distributing the Program (or any work based on the 185 | Program), you indicate your acceptance of this License to do so, and 186 | all its terms and conditions for copying, distributing or modifying 187 | the Program or works based on it. 188 | 189 | 6. Each time you redistribute the Program (or any work based on the 190 | Program), the recipient automatically receives a license from the 191 | original licensor to copy, distribute or modify the Program subject to 192 | these terms and conditions. You may not impose any further 193 | restrictions on the recipients' exercise of the rights granted herein. 194 | You are not responsible for enforcing compliance by third parties to 195 | this License. 196 | 197 | 7. If, as a consequence of a court judgment or allegation of patent 198 | infringement or for any other reason (not limited to patent issues), 199 | conditions are imposed on you (whether by court order, agreement or 200 | otherwise) that contradict the conditions of this License, they do not 201 | excuse you from the conditions of this License. If you cannot 202 | distribute so as to satisfy simultaneously your obligations under this 203 | License and any other pertinent obligations, then as a consequence you 204 | may not distribute the Program at all. For example, if a patent 205 | license would not permit royalty-free redistribution of the Program by 206 | all those who receive copies directly or indirectly through you, then 207 | the only way you could satisfy both it and this License would be to 208 | refrain entirely from distribution of the Program. 209 | 210 | If any portion of this section is held invalid or unenforceable under 211 | any particular circumstance, the balance of the section is intended to 212 | apply and the section as a whole is intended to apply in other 213 | circumstances. 214 | 215 | It is not the purpose of this section to induce you to infringe any 216 | patents or other property right claims or to contest validity of any 217 | such claims; this section has the sole purpose of protecting the 218 | integrity of the free software distribution system, which is 219 | implemented by public license practices. Many people have made 220 | generous contributions to the wide range of software distributed 221 | through that system in reliance on consistent application of that 222 | system; it is up to the author/donor to decide if he or she is willing 223 | to distribute software through any other system and a licensee cannot 224 | impose that choice. 225 | 226 | This section is intended to make thoroughly clear what is believed to 227 | be a consequence of the rest of this License. 228 | 229 | 8. If the distribution and/or use of the Program is restricted in 230 | certain countries either by patents or by copyrighted interfaces, the 231 | original copyright holder who places the Program under this License 232 | may add an explicit geographical distribution limitation excluding 233 | those countries, so that distribution is permitted only in or among 234 | countries not thus excluded. In such case, this License incorporates 235 | the limitation as if written in the body of this License. 236 | 237 | 9. The Free Software Foundation may publish revised and/or new versions 238 | of the General Public License from time to time. Such new versions will 239 | be similar in spirit to the present version, but may differ in detail to 240 | address new problems or concerns. 241 | 242 | Each version is given a distinguishing version number. If the Program 243 | specifies a version number of this License which applies to it and "any 244 | later version", you have the option of following the terms and conditions 245 | either of that version or of any later version published by the Free 246 | Software Foundation. If the Program does not specify a version number of 247 | this License, you may choose any version ever published by the Free Software 248 | Foundation. 249 | 250 | 10. If you wish to incorporate parts of the Program into other free 251 | programs whose distribution conditions are different, write to the author 252 | to ask for permission. For software which is copyrighted by the Free 253 | Software Foundation, write to the Free Software Foundation; we sometimes 254 | make exceptions for this. Our decision will be guided by the two goals 255 | of preserving the free status of all derivatives of our free software and 256 | of promoting the sharing and reuse of software generally. 257 | 258 | NO WARRANTY 259 | 260 | 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY 261 | FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN 262 | OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES 263 | PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED 264 | OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 265 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS 266 | TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE 267 | PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, 268 | REPAIR OR CORRECTION. 269 | 270 | 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 271 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR 272 | REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, 273 | INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING 274 | OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED 275 | TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY 276 | YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER 277 | PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE 278 | POSSIBILITY OF SUCH DAMAGES. 279 | 280 | END OF TERMS AND CONDITIONS 281 | 282 | How to Apply These Terms to Your New Programs 283 | 284 | If you develop a new program, and you want it to be of the greatest 285 | possible use to the public, the best way to achieve this is to make it 286 | free software which everyone can redistribute and change under these terms. 287 | 288 | To do so, attach the following notices to the program. It is safest 289 | to attach them to the start of each source file to most effectively 290 | convey the exclusion of warranty; and each file should have at least 291 | the "copyright" line and a pointer to where the full notice is found. 292 | 293 | {description} 294 | Copyright (C) {year} {fullname} 295 | 296 | This program is free software; you can redistribute it and/or modify 297 | it under the terms of the GNU General Public License as published by 298 | the Free Software Foundation; either version 2 of the License, or 299 | (at your option) any later version. 300 | 301 | This program is distributed in the hope that it will be useful, 302 | but WITHOUT ANY WARRANTY; without even the implied warranty of 303 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 304 | GNU General Public License for more details. 305 | 306 | You should have received a copy of the GNU General Public License along 307 | with this program; if not, write to the Free Software Foundation, Inc., 308 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 309 | 310 | Also add information on how to contact you by electronic and paper mail. 311 | 312 | If the program is interactive, make it output a short notice like this 313 | when it starts in an interactive mode: 314 | 315 | Gnomovision version 69, Copyright (C) year name of author 316 | Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 317 | This is free software, and you are welcome to redistribute it 318 | under certain conditions; type `show c' for details. 319 | 320 | The hypothetical commands `show w' and `show c' should show the appropriate 321 | parts of the General Public License. Of course, the commands you use may 322 | be called something other than `show w' and `show c'; they could even be 323 | mouse-clicks or menu items--whatever suits your program. 324 | 325 | You should also get your employer (if you work as a programmer) or your 326 | school, if any, to sign a "copyright disclaimer" for the program, if 327 | necessary. Here is a sample; alter the names: 328 | 329 | Yoyodyne, Inc., hereby disclaims all copyright interest in the program 330 | `Gnomovision' (which makes passes at compilers) written by James Hacker. 331 | 332 | {signature of Ty Coon}, 1 April 1989 333 | Ty Coon, President of Vice 334 | 335 | This General Public License does not permit incorporating your program into 336 | proprietary programs. If your program is a subroutine library, you may 337 | consider it more useful to permit linking proprietary applications with the 338 | library. If this is what you want to do, use the GNU Lesser General 339 | Public License instead of this License. 340 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Dotfiles 2 | 3 | Check https://github.com/Jguer/dotfiles/tree/awesomewm for my old awesomewm branch 4 | 5 | ## Tokyo Night based 6 | 7 | Based on the **tokyo-night** [vim](https://github.com/ghifarit53/tokyonight-vim) and 8 | [vscode](https://github.com/enkia/tokyo-night-vscode-theme) theme. 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | ### Applications 17 | 18 | **OS**: Arch 19 | **WM**: Sway 20 | **LockScreen**: swaylock-effects 21 | **Launcher**: wofi 22 | **File Manager**: nautilus 23 | 24 | **Development Environment**: VSCode 25 | **Text Editor**: Neovim 26 | 27 | **Document Viewer**: zathura 28 | **Video**: mpv 29 | 30 | ### Required utils 31 | 32 | ``` 33 | yay -S swaylock waybar \ 34 | mako network-manager-applet polkit-gnome \ 35 | gammastep blueman swayidle slurp grim swappy \ 36 | playerctl light wofi 37 | ``` 38 | -------------------------------------------------------------------------------- /bin/backup-dir: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | tar -czf "$(date +%Y-%m-%d)"_"$(basename $1)".tar.gz "$1" && sha256sum "$(date +%Y-%m-%d)"_"$(basename $1)".tar.gz >> "$(date +%Y-%m-%d)".sum 4 | -------------------------------------------------------------------------------- /bin/itopdf: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # @Author: jguer 3 | 4 | name=$(basename "$PWD") 5 | shopt -s nullglob 6 | 7 | convert {*.JPG,*.jpg,*.png} "$name.pdf" 8 | 9 | read -p "Minimize PDF? " -n 1 -r 10 | echo # (optional) move to a new line 11 | if [[ ! $REPLY =~ ^[Nn]$ ]] 12 | then 13 | gs -q -dNOPAUSE -dBATCH -dSAFER \ 14 | -dNumRenderingThreads=4 \ 15 | -dBandHeight=100 \ 16 | -dBandBufferSpace=500000000 \ 17 | -dBufferSpace=1000000000 \ 18 | -sBandListStorage=memory \ 19 | -sDEVICE=pdfwrite \ 20 | -dCompatibilityLevel=1.4 \ 21 | -dPDFSETTINGS=/ebook \ 22 | -dDetectDuplicateImages=true \ 23 | -dEmbedAllFonts=false \ 24 | -dSubsetFonts=true \ 25 | -dConvertCMYKImagesToRGB=true \ 26 | -dCompressFonts=true \ 27 | -r150 \ 28 | -sOutputFile="${name}2.pdf" \ 29 | "${name}.pdf" 30 | mv "${name}2.pdf" "${name}.pdf" 31 | mv {*.JPG,*.jpg,*.png} ~/.local/share/Trash/files/ 32 | fi 33 | 34 | -------------------------------------------------------------------------------- /bin/minimize-pdf: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # @Author: jguer 3 | # @Date: 2016-01-03 00:24:04 4 | # @Last Modified by: jguer 5 | # @Last Modified time: 2016-01-03 00:28:57 6 | 7 | buildroot="$(mktemp -d)" 8 | mode="$1" 9 | 10 | if [ -z "$mode" ] 11 | then 12 | mode="ebook" 13 | fi 14 | 15 | shopt -s nullglob 16 | 17 | for f in *.{PDF,pdf}; do 18 | echo "Converting: $f" 19 | gs -q -dNOPAUSE -dBATCH -dSAFER \ 20 | -dNumRenderingThreads=4 \ 21 | -dBandHeight=100 \ 22 | -dBandBufferSpace=500000000 \ 23 | -dBufferSpace=1000000000 \ 24 | -sBandListStorage=memory \ 25 | -sDEVICE=pdfwrite \ 26 | -dCompatibilityLevel=1.4 \ 27 | -dPDFSETTINGS=/$mode \ 28 | -dDetectDuplicateImages=true \ 29 | -dConvertCMYKImagesToRGB=true \ 30 | -r144 \ 31 | -sOutputFile="${buildroot}/${f}" \ 32 | -sPDFPassword=instrmed \ 33 | -f "${f}" 34 | done 35 | 36 | xdg-open "${buildroot}" 37 | -------------------------------------------------------------------------------- /bin/sort-json: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | """ 3 | This program is free software: you can redistribute it and/or modify 4 | it under the terms of the GNU General Public License as published by 5 | the Free Software Foundation, either version 3 of the License, or 6 | (at your option) any later version. 7 | 8 | This program is distributed in the hope that it will be useful, 9 | but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | GNU General Public License for more details. 12 | 13 | You should have received a copy of the GNU General Public License 14 | along with this program. If not, see . 15 | 16 | Jguer 2021 github.com/jguer/dotfiles 17 | """ 18 | 19 | import argparse 20 | import json 21 | import sys 22 | 23 | 24 | def main(): 25 | parser = argparse.ArgumentParser(description="Sort JSON keys of a file.") 26 | parser.add_argument( 27 | "-w", 28 | "--write", 29 | dest="write", 30 | help="overwrite file", 31 | action="store_true", 32 | ) 33 | parser.add_argument( 34 | "--indent", 35 | help="default indentation", 36 | dest="indent", 37 | type=int, 38 | default=2, 39 | ) 40 | parser.add_argument("file", help="JSON file to format") 41 | parser.set_defaults(feature=True) 42 | args = parser.parse_args() 43 | 44 | with open(args.file, "r+") as f: 45 | parsed = json.load(f) 46 | f.seek(0) 47 | output = f if args.write else sys.stdout 48 | json.dump(parsed, output, sort_keys=True, indent=args.indent) 49 | f.truncate() 50 | 51 | 52 | main() 53 | -------------------------------------------------------------------------------- /bin/wget-dir: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # remove http:// etc 4 | SUBSTRING=$(cut -d. -f2- <<<"$1") 5 | # remove last slash if present 6 | if [ "${SUBSTRING: -1}" = "/" ]; then 7 | SUBSTRING="${SUBSTRING%?}" 8 | fi 9 | # count subdirectories 10 | NCUT=$(grep -o "/" <<<"$SUBSTRING" | wc -l) 11 | 12 | wget -m -r -nH --cut-dirs="$NCUT" -np -R index.html* -e robots=off "$1" 13 | -------------------------------------------------------------------------------- /bin/wofi-power: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | entries="⇠ Logout\n⏾ Suspend\n⭮ Reboot\n⏻ Shutdown" 4 | 5 | selected=$(echo -e $entries|wofi --lines=4 --dmenu --cache-file /dev/null | awk '{print tolower($2)}') 6 | 7 | case $selected in 8 | logout) 9 | swaymsg exit;; 10 | suspend) 11 | exec systemctl suspend;; 12 | reboot) 13 | exec systemctl reboot;; 14 | shutdown) 15 | exec systemctl poweroff -i;; 16 | esac 17 | -------------------------------------------------------------------------------- /bin/wofi-windows: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # ------Get available windows: 4 | windows=$(swaymsg -t get_tree | jq -r ' 5 | recurse(.nodes[]?) | 6 | recurse(.floating_nodes[]?) | 7 | select(.type=="con"), select(.type=="floating_con") | 8 | (.id | tostring) + " " + .app_id + ": " + .name') 9 | 10 | # ------Select window with wofi: 11 | selected=$(echo "$windows" | wofi -d -i -p "Switch to:" | awk '{print $1}') 12 | 13 | # ------Tell sway to focus said window: 14 | swaymsg [con_id="$selected"] focus 15 | -------------------------------------------------------------------------------- /code/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "[json]": { 3 | "editor.defaultFormatter": "vscode.json-language-features" 4 | }, 5 | "[markdown]": { 6 | "files.trimTrailingWhitespace": false 7 | }, 8 | "[python]": { 9 | "editor.defaultFormatter": "ms-python.python" 10 | }, 11 | "[typescriptreact]": { 12 | "editor.defaultFormatter": "vscode.typescript-language-features" 13 | }, 14 | "breadcrumbs.enabled": true, 15 | "editor.autoIndent": "full", 16 | "editor.bracketPairColorization.enabled": true, 17 | "editor.copyWithSyntaxHighlighting": true, 18 | "editor.cursorBlinking": "smooth", 19 | "editor.cursorSmoothCaretAnimation": "on", 20 | "editor.cursorStyle": "line", 21 | "editor.cursorWidth": 2, 22 | "editor.fontFamily": "FiraCode Nerd Font Mono", 23 | "editor.fontLigatures": true, 24 | "editor.fontSize": 14, 25 | "editor.fontWeight": "450", 26 | "editor.glyphMargin": true, 27 | "editor.guides.bracketPairs": "active", 28 | "editor.inlineSuggest.enabled": true, 29 | "editor.letterSpacing": 0.6, 30 | "editor.lineHeight": 22, 31 | "editor.minimap.enabled": false, 32 | "editor.renderControlCharacters": true, 33 | "editor.renderWhitespace": "trailing", 34 | "editor.rulers": [80, 120, 121], 35 | "editor.scrollBeyondLastColumn": 2, 36 | "editor.semanticHighlighting.enabled": true, 37 | "editor.showFoldingControls": "mouseover", 38 | "editor.smoothScrolling": true, 39 | "editor.snippetSuggestions": "top", 40 | "editor.suggestFontSize": 16, 41 | "editor.suggestSelection": "first", 42 | "editor.wordWrapColumn": 80, 43 | "explorer.compactFolders": false, 44 | "explorer.confirmDelete": false, 45 | "explorer.confirmDragAndDrop": false, 46 | "explorer.openEditors.visible": 5, 47 | "explorer.sortOrder": "type", 48 | "extensions.ignoreRecommendations": true, 49 | "files.autoGuessEncoding": false, 50 | "files.autoSave": "onFocusChange", 51 | "files.encoding": "utf8", 52 | "files.eol": "\n", 53 | "files.exclude": { 54 | "**/__pycache__": true, 55 | "**/_site": true, 56 | "**/.DS_Store": true, 57 | "**/.git": true, 58 | "**/.hg": true, 59 | "**/.mypy_cache": true, 60 | "**/.pytest_cache": true, 61 | "**/.svn": true, 62 | "**/*.asset-cache": true, 63 | "**/*.cache": true, 64 | "**/*.coverage": true, 65 | "**/*.egg-info": true, 66 | "**/*.jekyll-cache": true, 67 | "**/*.pyc": true, 68 | "**/*.tweet-cache": true, 69 | "**/bower_components": true, 70 | "**/celerybeat-schedule": true, 71 | "**/CVS": true, 72 | "**/node_modules": true, 73 | "**/tmp": true 74 | }, 75 | "files.trimFinalNewlines": true, 76 | "files.trimTrailingWhitespace": true, 77 | "git.autofetch": true, 78 | "git.enableSmartCommit": true, 79 | "git.openRepositoryInParentFolders": "never", 80 | "github.copilot.enable": { 81 | "*": true, 82 | "yaml": true, 83 | "plaintext": true, 84 | "markdown": true 85 | }, 86 | "go.editorContextMenuCommands": { 87 | "fillStruct": true, 88 | "generateTestForFile": true 89 | }, 90 | "go.formatTool": "gofmt", 91 | "go.lintOnSave": "file", 92 | "go.lintTool": "golangci-lint", 93 | "gopls": { 94 | "build.directoryFilters": ["-node_modules", "-vendor", "-.git"], 95 | "ui.semanticTokens": true 96 | }, 97 | "keyboard.dispatch": "keyCode", 98 | "liveshare.presence": false, 99 | "material-icon-theme.folders.color": "#82aaff", 100 | "search.followSymlinks": true, 101 | "search.useIgnoreFiles": false, 102 | "telemetry.telemetryLevel": "off", 103 | "terminal.external.linuxExec": "kitty", 104 | "terminal.integrated.cursorStyle": "block", 105 | "terminal.integrated.defaultProfile.linux": "fish", 106 | "terminal.integrated.fontSize": 15, 107 | "terminal.integrated.letterSpacing": 1, 108 | "terminal.integrated.profiles.linux": { 109 | "fish": { 110 | "args": [], 111 | "path": "fish" 112 | } 113 | }, 114 | "terminal.integrated.scrollback": 10000, 115 | "update.showReleaseNotes": false, 116 | "vim.foldfix": true, 117 | "vim.highlightedyank.enable": true, 118 | "vim.leader": ",", 119 | "vim.useSystemClipboard": true, 120 | "window.restoreWindows": "native", 121 | "workbench.activityBar.visible": true, 122 | "workbench.colorTheme": "Tokyo Night Storm", 123 | "workbench.editor.showTabs": true, 124 | "workbench.editor.untitled.hint": "hidden", 125 | "workbench.iconTheme": "material-icon-theme", 126 | "workbench.sideBar.location": "right", 127 | "workbench.startupEditor": "newUntitledFile", 128 | "workbench.statusBar.visible": true 129 | } 130 | -------------------------------------------------------------------------------- /first-run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Heavy installs 3 | set -e 4 | 5 | # Fira font 6 | mkdir -p ~/.fonts && 7 | curl https://github.com/ryanoasis/nerd-fonts/releases/download/v2.1.0/FiraCode.zip -L -o /tmp/FiraCode.zip && 8 | unzip /tmp/FiraCode -d ~/.fonts 9 | 10 | rm -fv ~/.fonts/Fura* ~/.fonts/*Windows* 11 | 12 | fc-cache 13 | 14 | # Code extensions 15 | # code --list-extensions | xargs -L 1 echo code --install-extension 16 | code-insiders --install-extension --pre-release eamodio.gitlens 17 | code-insiders --install-extension --pre-release enkia.tokyo-night 18 | code-insiders --install-extension --pre-release GitHub.copilot-chat 19 | code-insiders --install-extension --pre-release GitHub.copilot-labs 20 | code-insiders --install-extension --pre-release GitHub.copilot-nightly 21 | code-insiders --install-extension --pre-release golang.go 22 | code-insiders --install-extension --pre-release hashicorp.terraform 23 | code-insiders --install-extension --pre-release ms-azuretools.vscode-docker 24 | code-insiders --install-extension --pre-release ms-kubernetes-tools.vscode-kubernetes-tools 25 | code-insiders --install-extension --pre-release ms-python.python 26 | code-insiders --install-extension --pre-release ms-python.vscode-pylance 27 | code-insiders --install-extension --pre-release ms-vsliveshare.vsliveshare 28 | code-insiders --install-extension --pre-release PKief.material-icon-theme 29 | code-insiders --install-extension --pre-release redhat.vscode-yaml 30 | code-insiders --install-extension --pre-release streetsidesoftware.code-spell-checker 31 | code-insiders --install-extension --pre-release tilt-dev.tiltfile 32 | code-insiders --install-extension --pre-release vscodevim.vim 33 | 34 | gsettings set org.gnome.desktop.interface icon-theme 'Tokyonight-Dark-Cyan' 35 | gsettings set org.gnome.desktop.interface gtk-theme 'Tokyonight-Storm' 36 | -------------------------------------------------------------------------------- /fonts.conf: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 96 7 | 8 | 9 | 10 | 11 | true 12 | 13 | 14 | 15 | 16 | kr 17 | 18 | 19 | Noto Sans CJK KR 20 | 21 | 22 | 23 | 24 | ja 25 | 26 | 27 | Noto Sans CJK JP 28 | 29 | 30 | 31 | 32 | unknown 33 | 34 | 35 | rgb 36 | 37 | 38 | 39 | 40 | serif 41 | 42 | 43 | JoyPixels 44 | 45 | 46 | Noto Serif 47 | 48 | 49 | 50 | 51 | sans-serif 52 | 53 | 54 | JoyPixels 55 | 56 | 57 | Inter 58 | 59 | 60 | 61 | 62 | monospace 63 | 64 | 65 | FiraCode Nerd Font Mono 66 | 67 | 68 | Font Awesome 5 Free Solid 69 | 70 | 71 | 72 | -------------------------------------------------------------------------------- /gitconfig: -------------------------------------------------------------------------------- 1 | # ~/.gitconfig 2 | [branch] 3 | autosetuprebase = always 4 | 5 | [commit] 6 | gpgsign = true 7 | 8 | [push] 9 | default = current 10 | #followTags = true 11 | 12 | [rebase] 13 | autostash = true 14 | autosquash = true 15 | 16 | [include] 17 | path=~/.gitconfig-user 18 | 19 | [status] 20 | submoduleSummary = true 21 | 22 | [core] 23 | excludesfile = ~/.gitignore 24 | 25 | [pager] 26 | diff = delta 27 | log = delta 28 | reflog = delta 29 | show = delta 30 | 31 | [diff] 32 | colorMoved = default 33 | 34 | [merge] 35 | conflictStyle = zdiff3 36 | 37 | [delta] 38 | minus-style = syntax "#3f2d3d" 39 | minus-non-emph-style = syntax "#3f2d3d" 40 | minus-emph-style = syntax "#763842" 41 | minus-empty-line-marker-style = syntax "#3f2d3d" 42 | line-numbers-minus-style = "#b2555b" 43 | plus-style = syntax "#283b4d" 44 | plus-non-emph-style = syntax "#283b4d" 45 | plus-emph-style = syntax "#316172" 46 | plus-empty-line-marker-style = syntax "#283b4d" 47 | line-numbers-plus-style = "#266d6a" 48 | line-numbers-zero-style = "#3b4261" 49 | features = line-numbers decorations 50 | hyperlinks = True 51 | navigate = True 52 | 53 | [interactive] 54 | diffFilter = delta --color-only 55 | 56 | [pull] 57 | rebase = true 58 | 59 | [protocol] 60 | version = 2 61 | 62 | [credential] 63 | helper = /usr/lib/git-core/git-credential-libsecret 64 | 65 | [init] 66 | defaultBranch = main 67 | 68 | [url "https://github.com/"] 69 | insteadOf = "git@github.com:" 70 | 71 | [url "git@github.com:"] 72 | pushInsteadOf = "https://github.com/" 73 | pushInsteadOf = "git@github.com:" 74 | -------------------------------------------------------------------------------- /gtk/gtkrc-2.0: -------------------------------------------------------------------------------- 1 | gtk-icon-theme-name = "Tokyonight-Dark" 2 | gtk-theme-name = "Tokyonight-Storm" 3 | gtk-cursor-theme-name = "elementary" 4 | gtk-font-name = "Inter 11" 5 | -------------------------------------------------------------------------------- /gtk/settings.ini: -------------------------------------------------------------------------------- 1 | [Settings] 2 | gtk-icon-theme-name = Tokyonight-Dark 3 | gtk-theme-name = Tokyonight-Storm 4 | gtk-font-name = Inter 11 5 | gtk-decoration-layout = menu: 6 | -------------------------------------------------------------------------------- /install: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -e 4 | 5 | CONFIG="install.conf.yaml" 6 | DOTBOT_DIR="dotbot" 7 | 8 | DOTBOT_BIN="bin/dotbot" 9 | BASEDIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" 10 | 11 | cd "${BASEDIR}" 12 | git submodule update --init --recursive "${DOTBOT_DIR}" 13 | 14 | "${BASEDIR}/${DOTBOT_DIR}/${DOTBOT_BIN}" -d "${BASEDIR}" -c "${CONFIG}" "${@}" 15 | -------------------------------------------------------------------------------- /install.conf.yaml: -------------------------------------------------------------------------------- 1 | - defaults: 2 | link: 3 | force: true 4 | relink: true 5 | create: true 6 | 7 | - clean: ["~"] 8 | 9 | - link: 10 | # Login Session 11 | ~/.bashrc: shell/bashrc 12 | ~/.bash_profile: shell/bash_profile 13 | # Shell 14 | ~/.config/fish/config.fish: shell/config.fish 15 | "~/.config/fish/themes/TokyoNight Day.theme": "shell/TokyoNight Day.theme" 16 | "~/.config/fish/themes/TokyoNight Storm.theme": "shell/TokyoNight Storm.theme" 17 | # Wayland :rocket: 18 | ~/.config/mako/config: mako/config 19 | ~/.config/sway/config: sway/config 20 | ~/.config/swaylock/config: swaylock/config 21 | ~/.config/waybar/config: waybar/config 22 | ~/.config/waybar/style.css: waybar/style.css 23 | # wofi 24 | ~/.config/wofi/config: wofi/config 25 | ~/.config/wofi/style.css: wofi/style.css 26 | # GTK 27 | ~/.config/gtk-3.0/settings.ini: gtk/settings.ini 28 | # Fonts 29 | ~/.config/fontconfig/fonts.conf: fonts.conf 30 | # Iconography 31 | "~/.icons/Tokyonight-Dark": "gtk/themes/fausto-tokyo-night/icons/Tokyonight-Dark" 32 | "~/.themes/Tokyonight-Storm": "gtk/themes/fausto-tokyo-night/themes/Tokyonight-Storm-BL" 33 | "~/.config/gtk-4.0": "gtk/themes/fausto-tokyo-night/themes/Tokyonight-Storm-BL/gtk-4.0" 34 | # Applications 35 | ~/.config/kitty/kitty.conf: kitty/kitty.conf 36 | ~/.config/kitty/tokyonight_storm.conf: kitty/tokyonight_storm.conf 37 | ~/.config/kitty/tokyonight_day.conf: kitty/tokyonight_day.conf 38 | ~/.gitconfig: gitconfig 39 | # MPV 40 | ~/.config/mpv/mpv.conf: mpv/mpv.conf 41 | ~/.config/mpv/input.conf: mpv/input.conf 42 | ~/.config/mpv/scripts: mpv/scripts 43 | # Text 44 | ~/.config/nvim: nvim 45 | ~/.config/zathura/zathurarc: "zathura/zathurarc" 46 | ~/.config/zathura/tokyonight_day.zathurarc: "zathura/tokyonight_day.zathurarc" 47 | ~/.config/zathura/tokyonight_storm.zathurarc: "zathura/tokyonight_storm.zathurarc" 48 | "~/.config/Code - Insiders/User/settings.json": code/settings.json 49 | - shell: 50 | - [git submodule update --init --recursive, Installing submodules] 51 | -------------------------------------------------------------------------------- /install_yay: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | ################################################################################# 3 | # File Name : yay.sh 4 | # Created By : jguer 5 | # Creation Date : [2016-08-17 16:33] 6 | # Last Modified : [2016-08-17 16:37] 7 | # Description : Yay installer 8 | ################################################################################# 9 | 10 | buildroot="$(mktemp -d)" 11 | pkg="yay-bin" 12 | 13 | sudo -v 14 | sudo pacman -S --needed --noconfirm git 15 | 16 | mkdir -p "$buildroot" 17 | cd "$buildroot" || exit 1 18 | 19 | curl -L -O https://aur.archlinux.org/cgit/aur.git/snapshot/${pkg}.tar.gz 20 | tar -xvf ${pkg}.tar.gz 21 | 22 | cd "${buildroot}/${pkg}" || exit 1 23 | makepkg --syncdeps --install --noconfirm 24 | 25 | cd "$HOME" || exit 1 26 | rm -rf "$buildroot" 27 | -------------------------------------------------------------------------------- /kitty/kitty.conf: -------------------------------------------------------------------------------- 1 | # vim:fileencoding=utf-8:ft=config:fdm=marker foldlevel=0 2 | 3 | font_family FiraCode Nerd Font Mono 4 | bold_font auto 5 | italic_font auto 6 | bold_italic_font auto 7 | 8 | shell_integration disabled 9 | 10 | font_size 12.5 11 | background_opacity 0.90 12 | 13 | shell /usr/bin/fish 14 | 15 | # {{{ Keybindings 16 | map kitty_mod+t new_tab_with_cwd 17 | # }}} 18 | 19 | include tokyonight_storm.conf 20 | -------------------------------------------------------------------------------- /kitty/tokyonight_storm.conf: -------------------------------------------------------------------------------- 1 | # vim:ft=kitty 2 | 3 | ## name: Tokyo Night Storm 4 | ## license: MIT 5 | ## author: Folke Lemaitre 6 | ## upstream: https://github.com/folke/tokyonight.nvim/raw/main/extras/kitty/tokyonight_storm.conf 7 | 8 | 9 | background #24283b 10 | foreground #c0caf5 11 | selection_background #2e3c64 12 | selection_foreground #c0caf5 13 | url_color #73daca 14 | cursor #c0caf5 15 | cursor_text_color #24283b 16 | 17 | # Tabs 18 | active_tab_background #7aa2f7 19 | active_tab_foreground #1f2335 20 | inactive_tab_background #292e42 21 | inactive_tab_foreground #545c7e 22 | #tab_bar_background #1d202f 23 | 24 | # Windows 25 | active_border_color #7aa2f7 26 | inactive_border_color #292e42 27 | 28 | # normal 29 | color0 #1d202f 30 | color1 #f7768e 31 | color2 #9ece6a 32 | color3 #e0af68 33 | color4 #7aa2f7 34 | color5 #bb9af7 35 | color6 #7dcfff 36 | color7 #a9b1d6 37 | 38 | # bright 39 | color8 #414868 40 | color9 #f7768e 41 | color10 #9ece6a 42 | color11 #e0af68 43 | color12 #7aa2f7 44 | color13 #bb9af7 45 | color14 #7dcfff 46 | color15 #c0caf5 47 | 48 | # extended colors 49 | color16 #ff9e64 50 | color17 #db4b4b 51 | -------------------------------------------------------------------------------- /mako/config: -------------------------------------------------------------------------------- 1 | # vim:fileencoding=utf-8:ft=dosini:fdm=marker foldlevel=0 2 | 3 | # Appearance {{{ 4 | font=Inter Medium 11 5 | width=350 6 | padding=10 7 | margin=10 8 | border-size=2 9 | border-radius=8 10 | 11 | background-color=#1d202f 12 | border-color=#f7768e 13 | text-color=#c0caf5 14 | # }}} 15 | 16 | default-timeout=5000 17 | on-button-middle=exec makoctl menu -n "$id" wofi --dmenu -p 'Select action: ' 18 | on-notify=exec mpv /usr/share/sounds/freedesktop/stereo/message.oga 19 | 20 | [urgency=high] 21 | border-color=#f7768e 22 | ignore-timeout=1 -------------------------------------------------------------------------------- /mpv/input.conf: -------------------------------------------------------------------------------- 1 | WHEEL_UP add volume 5 2 | WHEEL_DOWN add volume -5 3 | WHEEL_LEFT ignore 4 | WHEEL_RIGHT ignore 5 | b script_binding auto_load_subs 6 | -------------------------------------------------------------------------------- /mpv/mpv.conf: -------------------------------------------------------------------------------- 1 | #vim: syntax=config vim:fdm=marker foldlevel=1 tabstop=2 shiftwidth=2 2 | 3 | # Video Settings {{{ 4 | hwdec=vaapi 5 | vo=gpu 6 | gpu-context=wayland 7 | hwdec-codecs=all 8 | hwdec-preload=auto 9 | # }}} 10 | 11 | # General {{{ 12 | save-position-on-quit 13 | # no-border 14 | autofit=30% 15 | osd-duration=1500 16 | # }}} 17 | 18 | # {{{ Audio 19 | volume-max=150 20 | slang=enm,en,eng,fr,pt 21 | alang=en,fr,pt 22 | # }}} 23 | 24 | # Subtitle {{{ 25 | demuxer-mkv-subtitle-preroll=yes 26 | sub-auto=fuzzy 27 | sub-gauss=0.9 28 | sub-gray=yes 29 | sub-font-size=52 30 | sub-blur=0.2 31 | sub-font='Inter' 32 | sub-border-color=0.0/0.0/0.0/1.0 33 | sub-border-size=3.0 34 | sub-color=1.0/1.0/1.0/1.0 35 | sub-margin-x=100 36 | sub-margin-y=50 37 | sub-shadow-color=0.0/0.0/0.0/0.25 38 | sub-shadow-offset=0 39 | sub-ass-vsfilter-blur-compat=no 40 | sub-fix-timing=yes 41 | # }}} 42 | -------------------------------------------------------------------------------- /mpv/scripts/auto-save.lua: -------------------------------------------------------------------------------- 1 | -- In case "save-position-on-quit" is used (e.g. by config) this script will 2 | -- remove it when only a certain amount of seconds are left to play (threshold). 3 | 4 | if not mp.get_property_bool("options/save-position-on-quit") then 5 | return 6 | end 7 | 8 | local opts = require("mp.options") 9 | local o = { 10 | thresh_end = 180, 11 | thresh_start = 60, 12 | } 13 | opts.read_options(o) 14 | 15 | -- Return true when multiple files are being played 16 | function check_playlist() 17 | local pcount, err = mp.get_property_number("playlist-count") 18 | if not pcount then 19 | print("error: " .. err) 20 | pcount = 1 21 | end 22 | 23 | return pcount > 1 24 | end 25 | 26 | -- Return true when the current playback time is not too close to the start or end 27 | function check_time() 28 | local remaining, err = mp.get_property_number("time-remaining") 29 | if not remaining then 30 | print("error: " .. err) 31 | remaining = -math.huge 32 | end 33 | local pos, err = mp.get_property_number("time-pos") 34 | if not pos then 35 | print("error: " .. err) 36 | pos = -math.huge 37 | end 38 | 39 | return pos > o.thresh_start and remaining > o.thresh_end 40 | end 41 | 42 | mp.add_forced_key_binding("q", "quit-watch-later-conditional", function() 43 | mp.set_property_bool("options/save-position-on-quit", check_playlist() or check_time()) 44 | mp.command("quit") 45 | end) 46 | -------------------------------------------------------------------------------- /mpv/scripts/autoload.lua: -------------------------------------------------------------------------------- 1 | -- This script automatically loads playlist entries before and after the 2 | -- the currently played file. It does so by scanning the directory a file is 3 | -- located in when starting playback. It sorts the directory entries 4 | -- alphabetically, and adds entries before and after the current file to 5 | -- the internal playlist. (It stops if the it would add an already existing 6 | -- playlist entry at the same position - this makes it "stable".) 7 | -- Add at most 5000 * 2 files when starting a file (before + after). 8 | MAXENTRIES = 5000 9 | 10 | local options = require("mp.options") 11 | 12 | o = { 13 | disabled = false, 14 | } 15 | options.read_options(o) 16 | 17 | function Set(t) 18 | local set = {} 19 | for _, v in pairs(t) do 20 | set[v] = true 21 | end 22 | return set 23 | end 24 | 25 | EXTENSIONS = Set({ 26 | "mkv", 27 | "avi", 28 | "mp4", 29 | "ogv", 30 | "webm", 31 | "rmvb", 32 | "flv", 33 | "wmv", 34 | "mpeg", 35 | "mpg", 36 | "m4v", 37 | "3gp", 38 | "mp3", 39 | "wav", 40 | "ogv", 41 | "flac", 42 | "m4a", 43 | "wma", 44 | }) 45 | 46 | mputils = require("mp.utils") 47 | 48 | function add_files_at(index, files) 49 | index = index - 1 50 | local oldcount = mp.get_property_number("playlist-count", 1) 51 | for i = 1, #files do 52 | mp.commandv("loadfile", files[i], "append") 53 | mp.commandv("playlist-move", oldcount + i - 1, index + i - 1) 54 | end 55 | end 56 | 57 | function get_extension(path) 58 | match = string.match(path, "%.([^%.]+)$") 59 | if match == nil then 60 | return "nomatch" 61 | else 62 | return match 63 | end 64 | end 65 | 66 | table.filter = function(t, iter) 67 | for i = #t, 1, -1 do 68 | if not iter(t[i]) then 69 | table.remove(t, i) 70 | end 71 | end 72 | end 73 | 74 | function find_and_add_entries() 75 | local path = mp.get_property("path", "") 76 | local dir, filename = mputils.split_path(path) 77 | if o.disabled or #dir == 0 then 78 | return 79 | end 80 | local pl_count = mp.get_property_number("playlist-count", 1) 81 | if 82 | (pl_count > 1 and autoload == nil) 83 | or (pl_count == 1 and EXTENSIONS[string.lower(get_extension(filename))] == nil) 84 | then 85 | return 86 | else 87 | autoload = true 88 | end 89 | 90 | local files = mputils.readdir(dir, "files") 91 | if files == nil then 92 | return 93 | end 94 | table.filter(files, function(v, k) 95 | if string.match(v, "^%.") then 96 | return false 97 | end 98 | local ext = get_extension(v) 99 | if ext == nil then 100 | return false 101 | end 102 | return EXTENSIONS[string.lower(ext)] 103 | end) 104 | table.sort(files, function(a, b) 105 | local len = string.len(a) - string.len(b) 106 | if len ~= 0 then -- case for ordering filename ending with such as X.Y.Z 107 | local ext = string.len(get_extension(a)) + 1 108 | a = string.sub(a, 1, -ext) 109 | b = string.sub(b, 1, -ext) 110 | end 111 | return string.lower(a) < string.lower(b) 112 | end) 113 | 114 | if dir == "." then 115 | dir = "" 116 | end 117 | 118 | local pl = mp.get_property_native("playlist", {}) 119 | local pl_current = mp.get_property_number("playlist-pos", 0) + 1 120 | -- Find the current pl entry (dir+"/"+filename) in the sorted dir list 121 | local current 122 | for i = 1, #files do 123 | if files[i] == filename then 124 | current = i 125 | break 126 | end 127 | end 128 | if current == nil then 129 | return 130 | end 131 | 132 | local append = { [-1] = {}, [1] = {} } 133 | for direction = -1, 1, 2 do -- 2 iterations, with direction = -1 and +1 134 | for i = 1, MAXENTRIES do 135 | local file = files[current + i * direction] 136 | local pl_e = pl[pl_current + i * direction] 137 | if file == nil or file[1] == "." then 138 | break 139 | end 140 | 141 | local filepath = dir .. file 142 | if pl_e then 143 | -- If there's a playlist entry, and it's the same file, stop. 144 | if pl_e.filename == filepath then 145 | break 146 | end 147 | end 148 | 149 | if direction == -1 then 150 | if pl_current == 1 then -- never add additional entries in the middle 151 | mp.msg.info("Prepending " .. file) 152 | table.insert(append[-1], 1, filepath) 153 | end 154 | else 155 | mp.msg.info("Adding " .. file) 156 | table.insert(append[1], filepath) 157 | end 158 | end 159 | end 160 | 161 | add_files_at(pl_current + 1, append[1]) 162 | add_files_at(pl_current, append[-1]) 163 | end 164 | 165 | mp.register_event("start-file", find_and_add_entries) 166 | -------------------------------------------------------------------------------- /mpv/scripts/autosub.lua: -------------------------------------------------------------------------------- 1 | --- modification by jguer 2 | --- default keybinding: b 3 | local utils = require("mp.utils") 4 | local mp = require("mp") 5 | local msg = require("mp.msg") 6 | 7 | local subl = "/bin/subdl" 8 | local lang_list = { "eng" } 9 | 10 | local function startswith(text, prefix) 11 | return text:find(prefix, 1, true) == 1 12 | end 13 | 14 | local function load_sub_from_file() 15 | local path = mp.get_property("path") 16 | local t = {} 17 | 18 | if path == nil or path == "" or startswith(path, "http") then 19 | return t 20 | end 21 | 22 | for i, lang in ipairs(lang_list) do 23 | t[i] = {} 24 | t[i].res = mp.command_native({ 25 | name = "subprocess", 26 | args = { 27 | subl, 28 | "--existing=bypass", 29 | string.format("--lang=%s", lang), 30 | string.format("--output={m}.{M}.%s.srt", lang), 31 | path, 32 | }, 33 | }) 34 | t[i].sub_path = path .. "." .. lang .. ".srt" 35 | t[i].sub_lang = lang 36 | end 37 | return t 38 | end 39 | 40 | local function load_sub_from_title() 41 | local title = mp.get_property("media-title") 42 | local t = {} 43 | if title == nil or title == "" then 44 | return t 45 | end 46 | 47 | msg.info(("searching:%s"):format(title)) 48 | 49 | local wd = mp.get_property("working-directory") 50 | local path = wd .. "/" .. title .. ".tmp" 51 | local f = io.open(path, "w") 52 | 53 | f:write("generated by mpv auto-sub\n") 54 | f:close() 55 | 56 | for i, lang in ipairs(lang_list) do 57 | t[i] = {} 58 | t[i].res = mp.command_native({ 59 | name = "subprocess", 60 | args = { 61 | subl, 62 | "--existing=bypass", 63 | string.format("--lang=%s", lang), 64 | string.format("--search=%s", title), 65 | string.format("--output={m}.{M}.%s.srt", lang), 66 | path, 67 | }, 68 | }) 69 | t[i].sub_path = path .. "." .. lang .. ".srt" 70 | t[i].sub_lang = lang 71 | end 72 | 73 | os.remove(path) 74 | return t 75 | end 76 | 77 | local function load_sub_fn() 78 | mp.osd_message("Searching subtitle") 79 | local res = load_sub_from_file() 80 | local reload = false 81 | local sub_paths = {} 82 | for _, t in ipairs(res) do 83 | if t.res.status == 0 then 84 | reload = true 85 | local i_sub = #sub_paths + 1 86 | sub_paths[i_sub] = {} 87 | sub_paths[i_sub].path = t.sub_path 88 | sub_paths[i_sub].lang = t.sub_lang 89 | end 90 | end 91 | 92 | if not reload then 93 | res = load_sub_from_title() 94 | for _, t in ipairs(res) do 95 | if t.res.status == 0 then 96 | reload = true 97 | local i_sub = #sub_paths + 1 98 | sub_paths[i_sub] = {} 99 | sub_paths[i_sub].path = t.sub_path 100 | sub_paths[i_sub].lang = t.sub_lang 101 | end 102 | end 103 | end 104 | 105 | if reload then 106 | mp.osd_message(string.format("Subtitles downloaded: %d", #sub_paths)) 107 | for _, sub_path in ipairs(sub_paths) do 108 | mp.command_native_async({ name = "sub-add", url = sub_path.path, lang = sub_path.lang }) 109 | end 110 | else 111 | mp.osd_message("Did not find subtitle") 112 | end 113 | end 114 | 115 | mp.add_key_binding("b", "auto_load_subs", load_sub_fn) 116 | -------------------------------------------------------------------------------- /mpv/scripts/mpris.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Jguer/dotfiles/df20e72c3c998bc977c1af711c81d51fd1c70279/mpv/scripts/mpris.so -------------------------------------------------------------------------------- /nvim/.gitignore: -------------------------------------------------------------------------------- 1 | plugin 2 | -------------------------------------------------------------------------------- /nvim/.stylua.toml: -------------------------------------------------------------------------------- 1 | column_width = 88 2 | line_endings = "Unix" 3 | indent_type = "Spaces" 4 | indent_width = 2 5 | quote_style = "AutoPreferDouble" 6 | -------------------------------------------------------------------------------- /nvim/init.lua: -------------------------------------------------------------------------------- 1 | require("plugins") 2 | 3 | vim.cmd([[colorscheme tokyonight]]) 4 | 5 | -- Leader Key 6 | vim.g.mapleader = "," 7 | 8 | -- File settings 9 | vim.o.hidden = true 10 | vim.o.swapfile = false 11 | vim.o.backup = false 12 | vim.o.wrap = false 13 | vim.o.scrolloff = 2 14 | vim.o.clipboard = "unnamedplus" 15 | 16 | -- Tabbing 17 | vim.o.smarttab = true 18 | vim.o.shiftwidth = 2 19 | vim.o.tabstop = 2 20 | vim.o.softtabstop = 2 21 | vim.o.expandtab = true 22 | vim.o.copyindent = true 23 | vim.o.autoindent = true 24 | 25 | -- Display 26 | vim.o.termguicolors = true 27 | vim.o.number = true 28 | vim.o.cursorline = true 29 | -------------------------------------------------------------------------------- /nvim/lua/plugins.lua: -------------------------------------------------------------------------------- 1 | local fn = vim.fn 2 | local install_path = fn.stdpath("data") .. "/site/pack/packer/start/packer.nvim" 3 | if fn.empty(fn.glob(install_path)) > 0 then 4 | packer_bootstrap = fn.system({ 5 | "git", 6 | "clone", 7 | "--depth", 8 | "1", 9 | "https://github.com/wbthomason/packer.nvim", 10 | install_path, 11 | }) 12 | end 13 | 14 | require("packer").startup(function() 15 | use("wbthomason/packer.nvim") 16 | use("folke/tokyonight.nvim") 17 | 18 | use({ 19 | "nvim-lualine/lualine.nvim", 20 | requires = { 21 | "kyazdani42/nvim-web-devicons", 22 | opt = true, 23 | }, 24 | config = function() 25 | require("lualine").setup({ 26 | options = { theme = "tokyonight" }, 27 | }) 28 | end, 29 | }) 30 | 31 | use({ 32 | "nvim-treesitter/nvim-treesitter", 33 | run = function() require('nvim-treesitter.install').update({ with_sync = true }) end, 34 | config = function() 35 | require("nvim-treesitter.configs").setup({ 36 | highlight = { 37 | enable = true, 38 | disable = {}, 39 | }, 40 | indent = { 41 | enable = true, 42 | disable = {}, 43 | }, 44 | ensure_installed = { 45 | "toml", 46 | "json", 47 | "fish", 48 | "bash", 49 | "go", 50 | "lua", 51 | "python", 52 | }, 53 | }) 54 | end, 55 | }) 56 | 57 | use({ 58 | "ur4ltz/surround.nvim", 59 | config = function() 60 | require("surround").setup({ mappings_style = "surround" }) 61 | end, 62 | }) 63 | 64 | use({ 65 | "lewis6991/gitsigns.nvim", 66 | requires = { "nvim-lua/plenary.nvim" }, 67 | config = function() 68 | require("gitsigns").setup() 69 | end, 70 | }) 71 | 72 | use({ 73 | "lukas-reineke/indent-blankline.nvim", 74 | config = function() 75 | require("indent_blankline").setup({ 76 | show_current_context = true, 77 | show_current_context_start = true, 78 | }) 79 | end, 80 | }) 81 | 82 | use("b3nj5m1n/kommentary") 83 | 84 | if packer_bootstrap then 85 | require("packer").sync() 86 | end 87 | end) 88 | -------------------------------------------------------------------------------- /shell/TokyoNight Day.theme: -------------------------------------------------------------------------------- 1 | # Upstream: https://github.com/folke/tokyonight.nvim/blob/main/extras/fish/tokyonight_day.fish 2 | # Syntax Highlighting Colors 3 | fish_color_normal 3760bf 4 | fish_color_command 007197 5 | fish_color_keyword 9854f1 6 | fish_color_quote 8c6c3e 7 | fish_color_redirection 3760bf 8 | fish_color_end f52a65 9 | fish_color_error f52a65 10 | fish_color_param 7847bd 11 | fish_color_comment 848cb5 12 | fish_color_selection --background=b6bfe2 13 | fish_color_search_match --background=b6bfe2 14 | fish_color_operator 587539 15 | fish_color_escape 9854f1 16 | fish_color_autosuggestion 848cb5 17 | 18 | # Completion Pager Colors 19 | fish_pager_color_progress 848cb5 20 | fish_pager_color_prefix 007197 21 | fish_pager_color_completion 3760bf 22 | fish_pager_color_description 848cb5 23 | fish_pager_color_selected_background --background=b6bfe2 24 | -------------------------------------------------------------------------------- /shell/TokyoNight Storm.theme: -------------------------------------------------------------------------------- 1 | # Upstream: https://github.com/folke/tokyonight.nvim/blob/main/extras/fish/tokyonight_storm.fish 2 | # Syntax Highlighting Colors 3 | fish_color_normal c0caf5 4 | fish_color_command 7dcfff 5 | fish_color_keyword bb9af7 6 | fish_color_quote e0af68 7 | fish_color_redirection c0caf5 8 | fish_color_end ff9e64 9 | fish_color_error f7768e 10 | fish_color_param 9d7cd8 11 | fish_color_comment 565f89 12 | fish_color_selection --background=2e3c64 13 | fish_color_search_match --background=2e3c64 14 | fish_color_operator 9ece6a 15 | fish_color_escape bb9af7 16 | fish_color_autosuggestion 565f89 17 | 18 | # Completion Pager Colors 19 | fish_pager_color_progress 565f89 20 | fish_pager_color_prefix 7dcfff 21 | fish_pager_color_completion c0caf5 22 | fish_pager_color_description 565f89 23 | fish_pager_color_selected_background --background=2e3c64 24 | -------------------------------------------------------------------------------- /shell/bash_profile: -------------------------------------------------------------------------------- 1 | export EDITOR='nvim' 2 | export DIFFPROG='nvim -d' 3 | export VISUAL='nvim' 4 | export PAGER='less' 5 | export GOPATH="$HOME/go" 6 | export GPG_TTY=$(tty) 7 | export LESS='-iMRS -x2' 8 | export SYSTEMD_LESS='FRXMK' 9 | 10 | # bat 11 | export BAT_PAGER="less -RS" 12 | export BAT_THEME="OneHalfDark" 13 | 14 | # NNN 15 | export FZF_DEFAULT_COMMAND='fd --type f' 16 | export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND" 17 | 18 | # Wayland 19 | export LIBVA_DRIVER_NAME=iHD 20 | 21 | export MOZ_ENABLE_WAYLAND=1 22 | export MOZ_DBUS_REMOTE=1 23 | 24 | export SDL_VIDEODRIVER=wayland 25 | export _JAVA_AWT_WM_NONREPARENTING=1 26 | export QT_QPA_PLATFORM=wayland 27 | export CLUTTER_BACKEND=wayland 28 | 29 | export XDG_SESSION_TYPE=wayland 30 | export XDG_CURRENT_DESKTOP=sway 31 | 32 | export NO_AT_BRIDGE=1 33 | export DOCKER_HOST="unix://$XDG_RUNTIME_DIR/podman/podman.sock" 34 | alias docker-compose='podman-compose' 35 | 36 | 37 | pathappend() { 38 | for ARG in "$@" 39 | do 40 | if [ -d "$ARG" ] && [[ ":$PATH:" != *":$ARG:"* ]]; then 41 | PATH="${PATH:+"$PATH:"}$ARG" 42 | fi 43 | done 44 | } 45 | 46 | pathappend "$HOME/dotfiles/bin" "$GOPATH/bin" "$HOME/.local/bin" 47 | 48 | eval $(gnome-keyring-daemon --start) 49 | export SSH_AUTH_SOCK 50 | 51 | if [ -z $DISPLAY ] && [ "$(tty)" = "/dev/tty1" ]; then 52 | exec sway > /var/log/sway.log 2>&1 53 | fi 54 | 55 | [[ -f ~/.bashrc ]] && . ~/.bashrc 56 | -------------------------------------------------------------------------------- /shell/bashrc: -------------------------------------------------------------------------------- 1 | # If not running interactively, don't do anything 2 | [[ $- != *i* ]] && return 3 | 4 | eval "$(starship init bash)" 5 | 6 | alias ls="exa" 7 | alias ll="exa --icons --git -la" 8 | alias tree="exa --icons --tree" 9 | 10 | alias cat="bat" 11 | alias find="fd" 12 | 13 | -------------------------------------------------------------------------------- /shell/config.fish: -------------------------------------------------------------------------------- 1 | alias ls="exa" 2 | alias ll="exa --icons --git -la" 3 | alias tree="exa --icons --tree" 4 | 5 | alias cat="bat" 6 | 7 | set fish_greeting 8 | 9 | # Git alias 10 | alias gco='git checkout' 11 | alias gcb='git checkout -b' 12 | 13 | alias gdf='git diff' 14 | alias gps='git push' 15 | alias gpl='git pull' 16 | 17 | alias grbi='git rebase -i' 18 | alias gct='git commit -v' 19 | alias gcta='git commit -v -a' 20 | alias gst='git status' 21 | alias gad='git add' 22 | 23 | alias dco='docker-compose' 24 | 25 | zoxide init fish | source 26 | starship init fish | source 27 | 28 | function fish_user_key_bindings 29 | fzf_key_bindings 30 | end 31 | 32 | set SSH_AUTH_SOCK {$XDG_RUNTIME_DIR}/gnupg/S.gpg-agent.ssh 33 | set DOCKER_HOST "unix://$XDG_RUNTIME_DIR/podman/podman.sock" 34 | 35 | fish_config theme choose TokyoNight\ Storm 36 | -------------------------------------------------------------------------------- /sway/bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Jguer/dotfiles/df20e72c3c998bc977c1af711c81d51fd1c70279/sway/bg.jpg -------------------------------------------------------------------------------- /sway/config: -------------------------------------------------------------------------------- 1 | # vim:fileencoding=utf-8:ft=config:fdm=marker foldlevel=0 2 | 3 | ## Variables {{{ 4 | set $mod Mod4 5 | set $left h 6 | set $down j 7 | set $up k 8 | set $right l 9 | set $term kitty 10 | set $menu wofi --insensitive --show drun | xargs swaymsg exec -- 11 | set $gnome-schema org.gnome.desktop.interface 12 | # }}} 13 | 14 | # Settings {{{ 15 | smart_borders on 16 | output * bg ~/dotfiles/sway/bg.jpg fill 17 | font pango:Inter:style=Regular 10 18 | default_border pixel 2 19 | default_floating_border pixel 2 20 | 21 | exec_always { 22 | gsettings set $gnome-schema gtk-theme 'Tokyonight-Storm' 23 | gsettings set $gnome-schema icon-theme 'Tokyonight-Dark' 24 | gsettings set $gnome-schema font-name 'Inter 11' 25 | } 26 | # }}} 27 | 28 | # I/O configuration {{{ 29 | input type:keyboard { 30 | xkb_layout "us,pt" 31 | xkb_variant "," 32 | #xkb_options "grp:alt_shift_toggle,terminate:ctrl_alt_bksp" 33 | xkb_options "grp:alt_shift_toggle,caps:swapescape,terminate:ctrl_alt_bksp" 34 | repeat_delay 300 35 | repeat_rate 30 36 | } 37 | 38 | input type:touchpad { 39 | dwt enabled 40 | accel_profile adaptive 41 | pointer_accel 0.3 42 | tap enabled 43 | natural_scroll enabled 44 | middle_emulation enabled 45 | } 46 | 47 | seat * hide_cursor 8000 48 | bindswitch --reload --locked lid:on output eDP-1 disable 49 | bindswitch --reload --locked lid:off output eDP-1 enable 50 | 51 | #}}} 52 | 53 | # Keybindings {{{ 54 | # Launch term 55 | bindsym $mod+Return exec $term 56 | # Kill focused window 57 | bindsym $mod+Shift+q kill 58 | # Start launcher 59 | bindsym $mod+d exec $menu 60 | # Drag windows by holding down $mod and left mouse button. 61 | # Resize them with right mouse button + $mod. 62 | floating_modifier $mod normal 63 | # Reload the configuration file 64 | bindsym $mod+Shift+c reload 65 | # Exit sway (logs you out of your Wayland session) 66 | bindsym $mod+Shift+e exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -b 'Yes, exit sway' 'swaymsg exit' 67 | # Move your focus around 68 | bindsym $mod+$left focus left 69 | bindsym $mod+$down focus down 70 | bindsym $mod+$up focus up 71 | bindsym $mod+$right focus right 72 | # Move the focused window with the same, but add Shift 73 | bindsym $mod+Shift+$left move left 74 | bindsym $mod+Shift+$down move down 75 | bindsym $mod+Shift+$up move up 76 | bindsym $mod+Shift+$right move right 77 | # Switch to workspace 78 | bindsym $mod+1 workspace number 1 79 | bindsym $mod+2 workspace number 2 80 | bindsym $mod+3 workspace number 3 81 | bindsym $mod+4 workspace number 4 82 | bindsym $mod+5 workspace number 5 83 | bindsym $mod+6 workspace number 6 84 | bindsym $mod+7 workspace number 7 85 | bindsym $mod+8 workspace number 8 86 | bindsym $mod+9 workspace number 9 87 | bindsym $mod+0 workspace number 10 88 | # Move focused container to workspace 89 | bindsym $mod+Shift+1 move container to workspace number 1 90 | bindsym $mod+Shift+2 move container to workspace number 2 91 | bindsym $mod+Shift+3 move container to workspace number 3 92 | bindsym $mod+Shift+4 move container to workspace number 4 93 | bindsym $mod+Shift+5 move container to workspace number 5 94 | bindsym $mod+Shift+6 move container to workspace number 6 95 | bindsym $mod+Shift+7 move container to workspace number 7 96 | bindsym $mod+Shift+8 move container to workspace number 8 97 | bindsym $mod+Shift+9 move container to workspace number 9 98 | bindsym $mod+Shift+0 move container to workspace number 10 99 | # Layout stuff: 100 | bindsym $mod+b splith 101 | bindsym $mod+v splitv 102 | # Switch the current container between different layout styles 103 | bindsym $mod+s layout stacking 104 | bindsym $mod+w layout tabbed 105 | bindsym $mod+e layout toggle split 106 | # Make the current focus fullscreen 107 | bindsym $mod+f fullscreen 108 | # Toggle the current focus between tiling and floating mode 109 | bindsym $mod+Shift+space floating toggle 110 | # Swap focus between the tiling area and the floating area 111 | bindsym $mod+space focus mode_toggle 112 | # Move focus to the parent container 113 | bindsym $mod+a focus parent 114 | # Scratchpad: 115 | # Move the currently focused window to the scratchpad 116 | bindsym $mod+Shift+minus move scratchpad 117 | bindsym $mod+minus scratchpad show 118 | # Resizing containers: 119 | mode "resize" { 120 | # left will shrink the containers width 121 | bindsym $left resize shrink width 10px 122 | # down will grow the containers height 123 | bindsym $down resize grow height 10px 124 | # up will shrink the containers height 125 | bindsym $up resize shrink height 10px 126 | # right will grow the containers width 127 | bindsym $right resize grow width 10px 128 | # Return to default mode 129 | bindsym Return mode "default" 130 | bindsym Escape mode "default" 131 | } 132 | bindsym $mod+r mode "resize" 133 | 134 | # Custom keybindings 135 | bindsym XF86AudioRaiseVolume exec pactl set-sink-volume @DEFAULT_SINK@ +2% 136 | bindsym XF86AudioLowerVolume exec pactl set-sink-volume @DEFAULT_SINK@ -2% 137 | bindsym --locked XF86AudioMute exec pactl set-sink-mute @DEFAULT_SINK@ toggle 138 | bindsym --locked XF86AudioMicMute exec pactl set-source-mute @DEFAULT_SOURCE@ toggle 139 | bindsym XF86MonBrightnessDown exec light -U 2 140 | bindsym XF86MonBrightnessUp exec light -A 2 141 | bindsym --locked XF86AudioPlay exec playerctl play-pause 142 | bindsym --locked XF86AudioNext exec playerctl next 143 | bindsym --locked XF86AudioPrev exec playerctl previous 144 | bindsym Print exec grim -g "$(slurp)" - | swappy -f - 145 | bindsym $mod+q exec wofi-power 146 | bindsym $mod+Tab exec wofi-windows 147 | bindsym $mod+x exec swaylock 148 | # }}} 149 | 150 | # Window Rules {{{ 151 | for_window [app_id="firefox" title="Firefox — Sharing Indicator"] border none, floating enable, nofocus 152 | for_window [app_id="firefoxdeveloperedition" title="Firefox Developer Edition — Sharing Indicator"] border none, floating enable, nofocus 153 | for_window [window_role="pop-up"] floating enable 154 | for_window [app_id="mpv"] border none, floating enable, resize set width 531 height 300, move position 1345 125, sticky enable 155 | for_window [title="^Picture in picture$"] \ 156 | floating enable, move position 877 450, sticky enable, border none 157 | for_window [app_id="firefox" title="^Picture-in-Picture$"] \ 158 | floating enable, move position 877 450, sticky enable, border none 159 | # }}} 160 | 161 | # Status Bar {{{ 162 | bar { 163 | swaybar_command waybar 164 | } 165 | # }}}: 166 | 167 | # Exec {{{ 168 | include /etc/sway/config.d/* 169 | 170 | exec swayidle -w \ 171 | timeout 300 'swaylock -f' \ 172 | timeout 600 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' \ 173 | before-sleep 'swaylock -f' 174 | 175 | exec mako 176 | exec nm-applet --indicator 177 | exec /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 178 | exec gammastep-indicator -m wayland -P -r -l 48.857:2.295 179 | exec aa-notify -p -s 1 -w 60 -f /var/log/audit/audit.log 180 | exec blueman-applet 181 | # }}} 182 | -------------------------------------------------------------------------------- /swaylock/config: -------------------------------------------------------------------------------- 1 | ignore-empty-password 2 | show-keyboard-layout 3 | indicator-caps-lock 4 | 5 | color=24283b 6 | font="Inter 14" 7 | indicator-radius=80 8 | indicator-thickness=20 9 | key-hl-color=bb9af7 10 | 11 | inside-color=1d202f 12 | inside-clear-color=1d202f 13 | inside-caps-lock-color=f7768e 14 | inside-ver-color=9ece6a 15 | inside-wrong-color=e0af68 16 | 17 | ring-color=1d202f 18 | ring-clear-color=1d202f 19 | ring-caps-lock-color=f7768e 20 | ring-ver-color=9ece6a 21 | ring-wrong-color=e0af68 22 | 23 | line-color=7aa2f7 24 | line-clear-color=1d202f 25 | line-caps-lock-color=f7768e 26 | line-ver-color=9ece6a 27 | line-wrong-color=e0af68 28 | 29 | text-color=c0caf5 30 | text-clear-color=1d202f 31 | text-caps-lock-color=f7768e 32 | text-ver-color=9ece6a 33 | text-wrong-color=e0af68 34 | 35 | layout-bg-color=1d202f 36 | layout-text-color=c0caf5 -------------------------------------------------------------------------------- /waybar/config: -------------------------------------------------------------------------------- 1 | { 2 | "layer": "top", 3 | "position": "top", 4 | "modules-left": [ 5 | "sway/mode" 6 | ], 7 | "modules-center": [], 8 | "modules-right": [ 9 | "sway/workspaces", 10 | "tray", 11 | "idle_inhibitor", 12 | "backlight", 13 | "pulseaudio", 14 | "battery", 15 | "sway/language", 16 | "clock" 17 | ], 18 | "sway/window": { 19 | "max-length": 50 20 | }, 21 | "tray": { 22 | "icon-size": 20, 23 | "spacing": 3 24 | }, 25 | "idle_inhibitor": { 26 | "format": "{icon}", 27 | "format-icons": { 28 | "activated": "", 29 | "deactivated": "" 30 | } 31 | }, 32 | "pulseaudio": { 33 | "format": "{volume}% {icon}", 34 | "format-bluetooth": "{volume}% {icon}", 35 | "format-muted": "", 36 | "format-icons": { 37 | "headphone": "", 38 | "hands-free": "", 39 | "headset": "", 40 | "phone": "", 41 | "portable": "", 42 | "car": "", 43 | "default": [ 44 | "", 45 | "" 46 | ] 47 | }, 48 | "scroll-step": 2, 49 | "on-click": "pactl set-sink-mute @DEFAULT_SINK@ toggle", 50 | "on-click-right": "pavucontrol" 51 | }, 52 | "backlight": { 53 | "device": "intel_backlight", 54 | "format": "{percent}% {icon}", 55 | "format-icons": [ 56 | "", 57 | "" 58 | ], 59 | "on-scroll-up": "light -A 1", 60 | "on-scroll-down": "light -U 1" 61 | }, 62 | "battery": { 63 | "format": "{capacity}% {icon}", 64 | "format-icons": [ 65 | "", 66 | "", 67 | "", 68 | "", 69 | "" 70 | ] 71 | }, 72 | "clock": { 73 | "format": "{:%H:%M %Z}", 74 | "tooltip": true, 75 | "tooltip-format": "{:%Y %B}\n{calendar}", 76 | "timezones": [ 77 | "Europe/Paris", 78 | "UTC" 79 | ] 80 | } 81 | } -------------------------------------------------------------------------------- /waybar/style.css: -------------------------------------------------------------------------------- 1 | * { 2 | border-radius: 0; 3 | font-family: Inter Medium; 4 | font-size: 12px; 5 | min-height: 0; 6 | } 7 | 8 | window#waybar { 9 | background: transparent; 10 | color: #c0caf5; 11 | } 12 | 13 | tooltip { 14 | background: #1d202f; 15 | border-radius: 15px; 16 | border-width: 2px; 17 | border-style: solid; 18 | border-color: #f7768e; 19 | } 20 | 21 | #workspaces button { 22 | padding: 0px 10px; 23 | color: #a9b1d6; 24 | } 25 | 26 | #workspaces button.focused { 27 | box-shadow: 2px 2px 2px #1d202f; 28 | color: #c0caf5; 29 | background-color: #f7768e; 30 | border-radius: 15px; 31 | } 32 | 33 | #workspaces button.urgent { 34 | color: #c0caf5; 35 | background-color: #e0af68; 36 | border-radius: 15px; 37 | } 38 | 39 | #workspaces button:hover { 40 | background-color: #bb9af7; 41 | color: #c0caf5; 42 | border-radius: 15px; 43 | } 44 | 45 | #clock, 46 | #battery, 47 | #pulseaudio, 48 | #workspaces, 49 | #language, 50 | #tray, 51 | #idle_inhibitor, 52 | #backlight { 53 | background-color: #24283b; 54 | padding: 0px 8px; 55 | margin: 8px 0px; 56 | } 57 | 58 | #workspaces { 59 | margin-left: 10px; 60 | border-radius: 15px 0px 0px 15px; 61 | } 62 | 63 | #clock { 64 | color: #f7768e; 65 | border-radius: 0px 15px 15px 0px; 66 | margin-right: 10px; 67 | padding-right: 10px; 68 | } 69 | 70 | #battery { 71 | color: #9ece6a; 72 | } 73 | 74 | #backlight { 75 | color: #e0af68; 76 | } 77 | 78 | #idle_inhibitor { 79 | color: #7dcfff; 80 | } 81 | 82 | #battery.charging { 83 | color: #7aa2f7; 84 | } 85 | 86 | #battery.warning:not(.charging) { 87 | background-color: #414868; 88 | color: #c0caf5; 89 | } 90 | 91 | #language { 92 | color: #bb9af7; 93 | } 94 | 95 | #pulseaudio { 96 | color: #7aa2f7; 97 | } -------------------------------------------------------------------------------- /wofi/config: -------------------------------------------------------------------------------- 1 | height=40% 2 | hide_scroll=true 3 | insensitive=true 4 | location=2 5 | matching=fuzzy 6 | mode=run 7 | prompt= 8 | term=kitty 9 | width=40% 10 | yoffset=300 11 | line_wrap=word 12 | signle_click=true -------------------------------------------------------------------------------- /wofi/style.css: -------------------------------------------------------------------------------- 1 | * { 2 | font-family: Inter Medium; 3 | } 4 | 5 | window { 6 | margin: 1px; 7 | border: 10px solid #7aa2f7; 8 | border-radius: 10px; 9 | } 10 | 11 | #input { 12 | margin: 5px; 13 | border-radius: 0px; 14 | border: none; 15 | border-bottom: 0px solid #c0caf5; 16 | background-color: #1d202f; 17 | color: #c0caf5; 18 | } 19 | 20 | #inner-box { 21 | margin: 5px; 22 | background-color: #1d202f; 23 | } 24 | 25 | #outer-box { 26 | margin: 3px; 27 | padding: 20px; 28 | background-color: #1d202f; 29 | border-radius: 10px; 30 | } 31 | 32 | #text { 33 | margin: 5px; 34 | color: #c0caf5; 35 | } 36 | 37 | #entry:selected { 38 | background-color: #414868; 39 | } 40 | 41 | #text:selected { 42 | text-decoration-color: #c0caf5; 43 | } -------------------------------------------------------------------------------- /zathura/tokyonight_day.zathurarc: -------------------------------------------------------------------------------- 1 | # Tokyonight color theme for Zathura 2 | # Swaps Foreground for Background to get a light version if the user prefers 3 | # 4 | # Tokyonight color theme 5 | # 6 | set notification-error-bg "#f52a65" 7 | set notification-error-fg "#3760bf" 8 | set notification-warning-bg "#8c6c3e" 9 | set notification-warning-fg "#a1a6c5" 10 | set notification-bg "#e1e2e7" 11 | set notification-fg "#3760bf" 12 | set completion-bg "#e1e2e7" 13 | set completion-fg "#6172b0" 14 | set completion-group-bg "#e1e2e7" 15 | set completion-group-fg "#6172b0" 16 | set completion-highlight-bg "#a1a6c5" 17 | set completion-highlight-fg "#3760bf" 18 | set index-bg "#e1e2e7" 19 | set index-fg "#3760bf" 20 | set index-active-bg "#a1a6c5" 21 | set index-active-fg "#3760bf" 22 | set inputbar-bg "#e1e2e7" 23 | set inputbar-fg "#3760bf" 24 | set statusbar-bg "#e1e2e7" 25 | set statusbar-fg "#3760bf" 26 | set highlight-color "#8c6c3e" 27 | set highlight-active-color "#587539" 28 | set default-bg "#e1e2e7" 29 | set default-fg "#3760bf" 30 | set render-loading true 31 | set render-loading-fg "#e1e2e7" 32 | set render-loading-bg "#3760bf" 33 | # 34 | # Recolor mode settings 35 | # to switch modes 36 | # 37 | set recolor-lightcolor "#e1e2e7" 38 | set recolor-darkcolor "#3760bf" 39 | -------------------------------------------------------------------------------- /zathura/tokyonight_storm.zathurarc: -------------------------------------------------------------------------------- 1 | # Tokyonight color theme for Zathura 2 | # Swaps Foreground for Background to get a light version if the user prefers 3 | # 4 | # Tokyonight color theme 5 | # 6 | set notification-error-bg "#f7768e" 7 | set notification-error-fg "#c0caf5" 8 | set notification-warning-bg "#e0af68" 9 | set notification-warning-fg "#414868" 10 | set notification-bg "#24283b" 11 | set notification-fg "#c0caf5" 12 | set completion-bg "#24283b" 13 | set completion-fg "#a9b1d6" 14 | set completion-group-bg "#24283b" 15 | set completion-group-fg "#a9b1d6" 16 | set completion-highlight-bg "#414868" 17 | set completion-highlight-fg "#c0caf5" 18 | set index-bg "#24283b" 19 | set index-fg "#c0caf5" 20 | set index-active-bg "#414868" 21 | set index-active-fg "#c0caf5" 22 | set inputbar-bg "#24283b" 23 | set inputbar-fg "#c0caf5" 24 | set statusbar-bg "#24283b" 25 | set statusbar-fg "#c0caf5" 26 | set highlight-color "#e0af68" 27 | set highlight-active-color "#9ece6a" 28 | set default-bg "#24283b" 29 | set default-fg "#c0caf5" 30 | set render-loading true 31 | set render-loading-fg "#24283b" 32 | set render-loading-bg "#c0caf5" 33 | # 34 | # Recolor mode settings 35 | # to switch modes 36 | # 37 | set recolor-lightcolor "#24283b" 38 | set recolor-darkcolor "#c0caf5" 39 | -------------------------------------------------------------------------------- /zathura/zathurarc: -------------------------------------------------------------------------------- 1 | # vim:fdm=marker foldlevel=0 2 | #{{{ Colours 3 | 4 | include "tokyonight_storm.zathurarc" 5 | 6 | set recolor true 7 | 8 | #}}} 9 | 10 | #{{{ Layout 11 | set adjust-open width 12 | set incremental-search false 13 | set statusbar-home-tilde true 14 | set selection-clipboard clipboard 15 | #}}} 16 | 17 | #{{{ Other Options 18 | set scroll-page-aware "true" 19 | set smooth-scroll "true" 20 | set scroll-step 50 21 | #}}} 22 | 23 | #{{{ Key bindings 24 | map scroll full_up 25 | map scroll full_down 26 | map scroll full_up all 27 | map scroll full_up 28 | map scroll full_down 29 | 30 | map + zoom in 31 | map - zoom out 32 | map q quit 33 | map w adjust_window width 34 | map z adjust_window bestfit 35 | 36 | map navigate next 37 | map navigate previous 38 | map b toggle_statusbar 39 | 40 | map abort 41 | #}}} 42 | --------------------------------------------------------------------------------