Compare commits

..

463 Commits

Author SHA1 Message Date
Thomas Avé 26031ed745 Alacritty updates 2025-04-07 19:04:53 +02:00
Thomas Avé e89c43447a Install signal 2025-04-07 19:04:23 +02:00
Thomas Avé 02afddb503 New Aloria 2025-04-07 15:45:00 +02:00
Thomas Avé 670db726e9 Updates Arendia 2025-04-05 00:54:39 +02:00
Thomas Avé c665619dcd Update tmux config 2025-04-03 13:02:39 +02:00
Thomas Avé 4fa2cd2fb5 Update riva config 2025-04-03 11:38:33 +02:00
Thomas Avé bc1c6e9054 Disable fingerprint on Arendia + hints in Avante + tmux settings 2025-03-25 23:27:12 +01:00
Thomas Avé 7309bc192e Arendia changes 2025-03-25 22:55:29 +01:00
Thomas Avé bdfd19b895 Install avante 2025-03-19 23:24:09 +01:00
Thomas Avé aa12709581 Install discord on aloria 2025-03-19 23:05:51 +01:00
Thomas Avé 65c6d7520c Update flake.nix 2025-03-19 23:01:44 +01:00
Thomas Avé f5b103e5d5 Update dap and snacks config 2025-03-16 10:40:08 +01:00
Thomas Avé 553d8b3fbb 3.13 again 2025-03-07 14:09:49 +01:00
Thomas Avé b562516fc1 update flake.lock 2025-03-07 14:05:29 +01:00
Thomas Avé 529bff3606 Back to python 3.12? 2025-03-07 13:59:27 +01:00
Thomas Avé a71d92d118 Disable mypy 2025-03-07 13:39:29 +01:00
Thomas Avé eb717455f6 Add ROCM 2025-03-07 13:38:52 +01:00
Thomas Avé 23041b3194 Add nop to kitty 2025-03-06 19:18:45 +01:00
Thomas Avé 6d7540715a Add dap to blink 2025-02-28 13:03:34 +01:00
Thomas Avé 6740f1bdb7 Fix launch workspace script 2025-02-27 13:31:45 +01:00
Thomas Avé 722b0b68d5 Remove virtual text again 2025-02-25 22:24:57 +01:00
Thomas Avé 250b32da55 Enable dap virtual text 2025-02-25 20:04:19 +01:00
Thomas Avé d881d80825 Set conditional breakpoint 2025-02-25 20:00:02 +01:00
Thomas Avé e5002ebd12 Lazygit update 2025-02-24 20:08:33 +01:00
Thomas Avé 767cdf189a Update blink 2025-02-24 16:00:53 +01:00
Thomas Avé 284b9c705a Fix fzgo cache path mount on riva 2025-02-24 13:43:30 +01:00
Thomas Avé 733112fa76 fix run script 2025-02-22 16:07:12 +01:00
Thomas Avé 8ea0a57114 Disable codeium 2025-02-22 15:26:26 +01:00
Thomas Avé e6ed56ade3 Fix ags 2025-02-22 15:18:40 +01:00
Thomas Avé 338b27ab88 Fri 21 Feb 22:04:44 CET 2025 2025-02-21 22:04:44 +01:00
Thomas Avé dc371d3f86 Add dap reset ui 2025-02-21 18:57:05 +01:00
Thomas Avé 27e415294b Switch away from ags flake.nix 2025-02-18 21:29:58 +01:00
Thomas Avé 4cf62abd47 enable snacks image 2025-02-18 19:53:49 +01:00
Thomas Avé 8a0ac52c46 Disable battery throttling on aloria 2025-02-18 19:52:08 +01:00
Thomas Avé a7b626a131 Use regular hyprland 2025-02-18 19:51:10 +01:00
Thomas Avé 702bc720a9 update snacks 2025-02-17 20:07:11 +01:00
Thomas Avé 1a8c7395ce Update nvim plugins 2025-02-17 17:57:36 +01:00
Thomas Avé 81e8786924 Snacks changes 2025-02-17 14:22:41 +01:00
Thomas Avé 268cefd5e1 Install nvim-snacks 2025-02-17 14:10:24 +01:00
Thomas Avé 21fc8d03a7 Disable fprintd on Aloria 2025-02-17 12:12:01 +01:00
Thomas Avé b0facc618d Update home manager config 2025-02-16 23:22:45 +01:00
Thomas Avé e3974475d1 Use /home/user for workspace fzgo 2025-02-14 13:42:22 +01:00
Thomas Avé 524c4c1566 Better fzgo config 2025-02-14 13:14:10 +01:00
Thomas Avé 116749fcbd Remove no acel hyprland 2025-02-14 00:27:35 +01:00
Thomas Avé e82148131f Set precision of trackpoint/touchpads 2025-02-09 13:44:00 +01:00
Thomas Avé ad6b113e59 Update Kell config 2025-02-03 21:44:48 +01:00
Thomas Avé 801b1caf2a Hyprlock 2025-02-01 13:43:19 +01:00
Thomas Avé 1aed007db0 nvim-lint tweaks 2025-01-29 15:18:37 +01:00
Thomas Avé 9c2753cecd Install lazygit 2025-01-28 19:27:19 +01:00
Thomas Avé e1042b2653 Neovim fixes 2025-01-28 14:21:09 +01:00
Thomas Avé 2a3f2210b5 Add fzgo timer 2025-01-28 13:58:25 +01:00
Thomas Avé 4cdd4d3cf6 Update fzgo links 2025-01-28 13:14:05 +01:00
Thomas Avé 1d4fa86fa4 Fix syntax error 2025-01-28 01:41:54 +01:00
Thomas Avé 3482265bd6 Better link handling in fzgo functions 2025-01-28 01:41:03 +01:00
Thomas Avé 1b24ccb8b9 Better fzgo link handling 2025-01-28 01:37:58 +01:00
Thomas Avé 275d2875c6 Niels- 2025-01-28 01:22:49 +01:00
Thomas Avé 5cf0960459 Gitignore 2025-01-28 01:21:27 +01:00
Thomas Avé 534a0f3307 Nvim lint dmypy updates 2025-01-28 01:21:27 +01:00
Thomas Avé cc74981997 Fzgo updates 2025-01-28 01:21:26 +01:00
Thomas Avé 9b5a5b7de7 Fix rofi 2025-01-24 17:49:00 +01:00
Thomas Avé 3002f4a864 Add ghostty 2025-01-24 16:53:43 +01:00
Thomas Avé 7fd5f9ea42 Install jetbrains mono 2025-01-20 22:05:31 +01:00
Thomas Avé d7f6854d49 Add Vega 56 ids for vfio 2025-01-20 21:54:39 +01:00
Thomas Avé f021b311a3 Disable ghostty repo 2025-01-17 17:55:34 +01:00
Thomas Avé c38d6a8cbf Update flake.lock 2025-01-15 18:56:15 +01:00
Thomas Avé 345ba33f2c Update flake.lock 2025-01-11 20:54:52 +01:00
Thomas Avé f154f086cf Remove Hyprland from system packages 2025-01-08 20:11:51 +01:00
Thomas Avé 45a4649c6b Restructure 2025-01-08 19:58:41 +01:00
Thomas Avé 8a2051abee Update blink keymap 2025-01-08 19:38:40 +01:00
Thomas Avé 88ac96bfb3 Update Blink.cmp 2025-01-08 19:13:10 +01:00
Thomas Avé 2a3f292353 Merge branch 'master' of git.thomasave.be:thomasave/dotfiles 2025-01-08 18:43:56 +01:00
Thomas Avé 877995461e Adjust fzgo paths 2025-01-08 18:35:22 +01:00
Thomas Avé 0d9b27e997 Adjust fzgo paths 2025-01-02 15:55:52 +01:00
Thomas Avé 421d69c2dd Update flake.nix 2025-01-01 19:48:44 +01:00
Thomas Avé 6292c024c4 disable greetd on riva 2024-12-29 01:28:07 +01:00
Thomas Avé ff5f500c13 Better fingerprint on Arendia 2024-12-28 20:59:50 +01:00
Thomas Avé af783d008e Install ghostty 2024-12-28 20:57:55 +01:00
Thomas Avé 58ce1d3295 Add nix-command flag for blink 2024-12-27 23:57:15 +01:00
Thomas Avé 215bd075b2 Back to Copilot + Use regular element-desktop 2024-12-27 23:47:26 +01:00
Thomas Avé c6b18d0c73 Better Wireguard on Aloria 2024-12-26 15:56:45 +01:00
Thomas Avé 9180f5b309 Create Python Wrapper 2024-12-26 15:56:35 +01:00
Thomas Avé 3ced4c6162 Aloria config changes 2024-12-20 14:54:32 +01:00
Thomas Avé db45c38495 Install blame.nvim 2024-12-20 14:48:41 +01:00
Thomas Avé 3f699fde8f Update Blink config 2024-12-20 03:15:00 +01:00
Thomas Avé 81d8ac0e84 Add blink.cmp 2024-12-20 01:46:19 +01:00
Thomas Avé bb57aa3e1d Kell change font size and install vscode 2024-12-19 20:10:13 +01:00
Thomas Avé e5a8e01f35 Merge branch 'master' of git.thomasave.be:thomasave/dotfiles 2024-12-19 19:39:32 +01:00
Thomas Avé 18a5ce7070 Update flake.nix 2024-12-19 19:39:18 +01:00
Thomas Avé ed9bf1957f Remove python LSP & flake8 2024-12-19 19:33:16 +01:00
Thomas Avé e4747cf3ed Add specialization for Kell 2024-12-19 19:31:53 +01:00
Thomas Avé ed68802c1d Disable pylsp 2024-12-19 02:29:21 +01:00
Thomas Avé c99a8ff773 Remove vue lsp 2024-12-17 00:11:26 +01:00
Thomas Avé 8fa2cd9c9b Install pylsp 2024-12-15 20:37:58 +01:00
Thomas Avé 4e1bced223 Add docker host 2024-12-11 15:11:00 +01:00
Thomas Avé 3ed457b10f Update flake.nix 2024-12-08 01:12:58 +01:00
Thomas Avé d9afc0ec98 Add HDMI-A-1 to Asturia 2024-12-07 23:34:59 +01:00
Thomas Avé 8b14e9adfb Set ags temp to N/A if it isn't available 2024-12-07 23:34:35 +01:00
Thomas Avé 06a17580a9 Automount virtiofs 2024-12-07 22:52:13 +01:00
Thomas Avé 91684c0349 Update Asturia hardware configuration 2024-12-07 20:02:15 +01:00
Thomas Avé c0ec667fd1 Add Asturia config 2024-12-07 19:00:18 +01:00
Thomas Avé 3636ade1d7 Enable vfio on Kell 2024-12-07 18:34:45 +01:00
Thomas Avé 5a20c5f15f [NVIM] Update telescope settings 2024-12-01 18:16:26 +01:00
Thomas Avé 2e0c8872f4 Hide battery if state is 0 2024-12-01 17:07:26 +01:00
Thomas Avé 75c8be2bd1 Better monitor handling 2024-12-01 17:05:55 +01:00
Thomas Avé a917cf9642 Better monitor selection in AGS + install steam on Kell 2024-12-01 16:21:42 +01:00
Thomas Avé 0429edcbc1 Networkd & NFS improvements 2024-12-01 00:56:43 +01:00
Thomas Avé 4ceb50e33e Use correct program for power statistics 2024-11-29 00:44:50 +01:00
Thomas Avé 8b02610d97 Fix battery icon 2024-11-29 00:29:14 +01:00
Thomas Avé 1db94740ed Better battery widget 2024-11-28 21:35:11 +01:00
Thomas Avé 1b1a398970 Run ags on the correct monitor 2024-11-28 21:15:30 +01:00
Thomas Avé cbc805d0dc Switch to new ags 2024-11-24 21:08:34 +01:00
Thomas Avé 6c26e0a8b0 Work on switching to new ags 2024-11-24 20:46:15 +01:00
Thomas Avé 3bbe1d6016 Add nvim kitty scrollback 2024-11-23 00:20:30 +01:00
Thomas Avé f98157cae1 disable vdirsyncer 2024-11-22 23:53:54 +01:00
Thomas Avé b33d135a1d Update Riva font settings 2024-11-22 23:52:24 +01:00
Thomas Avé e434548c90 Fix treesitter config 2024-11-22 23:50:37 +01:00
Thomas Avé 8eb289f178 Hide border when only one window is active 2024-11-20 23:12:02 +01:00
Thomas Avé 7b7c6dea24 Back to old AGS 2024-11-20 14:19:05 +01:00
Thomas Avé 6473eb59f2 Arendia power tweaks 2024-11-20 14:02:43 +01:00
Thomas Avé 7e82900408 Switch Kell back to Nvidia 2024-11-20 13:59:48 +01:00
Thomas Avé a1ceb72f49 Working on finger-print 2024-11-12 23:23:34 +01:00
Thomas Avé f5f7cda33d Update treesitter config 2024-11-10 20:28:45 +01:00
Thomas Avé 333bd97793 Add search for methods and classes 2024-11-09 16:41:56 +01:00
Thomas Avé 8b15f88dc5 Use ruff 2024-11-09 02:45:51 +01:00
Thomas Avé aacdf026bd Add python dav config 2024-11-09 02:13:58 +01:00
Thomas Avé 73acd12859 Change ruff_lsp to ruff in neovim config 2024-11-08 23:51:32 +01:00
Thomas Avé f4d2f0c204 Update mallorea flake 2024-11-08 18:09:06 +01:00
Thomas Avé 761a1e85b9 Try to use fingerprint on Aloria 2024-11-07 12:07:05 +01:00
Thomas Avé e11e27b5ad update flake.lock 2024-11-06 12:25:45 +01:00
Thomas Avé 9ad7419d0f Update display settings on Arendia 2024-11-06 12:16:18 +01:00
Thomas Avé 2d8ea0f39c Add worktimer and throttled config 2024-11-06 01:36:48 +01:00
Thomas Avé 89ce0321bb Aloria fix fingerprint driver 2024-11-05 22:55:06 +01:00
Thomas Avé bc846a53eb Update display settings 2024-11-05 10:34:27 +01:00
Thomas Avé 9a21f7f4b3 Test fix 2024-11-04 23:50:38 +01:00
Thomas Avé 1f76c8601a Changes to Arendia config 2024-11-04 21:46:21 +01:00
Thomas Avé 72eaf55e6e Add Arendia public keys 2024-11-04 19:21:59 +01:00
Thomas Avé a8549485d4 Add Android tools 2024-11-01 19:53:48 +01:00
Thomas Avé 066206fa16 Add zfs snapshots 2024-11-01 15:35:48 +01:00
Thomas Avé ad1da7816b Remove alsainit 2024-10-29 20:14:01 +01:00
Thomas Avé b812ca7b12 Update flake.lock 2024-10-29 20:13:33 +01:00
Thomas Avé 7b2bb64bbd Add ZFS install instructions 2024-10-29 14:44:50 +01:00
Thomas Avé bd0ba374e7 New config for new laptop 2024-10-28 20:00:55 +01:00
Thomas Avé f4920c269a Add zfs 2024-10-28 15:43:09 +01:00
Thomas Avé 9fe408aa61 Run AI script from within neovim 2024-10-26 15:14:33 +02:00
Thomas Avé 490a1eea4c Kitty don not confirm on close 2024-10-25 14:39:07 +02:00
Thomas Avé d74b1bd435 Remove yazi from common configs 2024-10-25 02:09:02 +02:00
Thomas Avé 1eafabd3ef Make resize repeatable in Hyprland 2024-10-24 16:04:32 +02:00
Thomas Avé a3df23e8e2 Switch to different hyprland split plugin 2024-10-23 14:07:26 +02:00
Thomas Avé 64bc5a2ca1 Move nix-ld to default config 2024-10-23 12:40:27 +02:00
Thomas Avé 1b475ff93e Use iwd DHCP 2024-10-23 12:34:35 +02:00
Thomas Avé dd32b217be Remove dictionaries from nix config 2024-10-22 23:30:23 +02:00
Thomas Avé d1c1f31155 Cleanup Nvim config 2024-10-22 23:21:13 +02:00
Thomas Avé 836e903ba9 Changes to Aloria config 2024-10-22 17:08:02 +02:00
Thomas Avé e5410cc440 Switch to Kitty to try it out 2024-10-22 17:08:02 +02:00
Thomas Avé 4c9272c685 Fix mapping gj / gk with counts 2024-10-22 17:05:39 +02:00
Thomas Avé 8d8d782dd0 Temporarily fix cliphist 2024-10-18 13:01:38 +02:00
Thomas Avé 23d12bad68 Remove devenv from default install 2024-10-18 12:33:35 +02:00
Thomas Avé 441a6517cf Switch to different language server for typst 2024-10-18 12:32:06 +02:00
Thomas Avé 70230292d0 Update hyprland gaps 2024-10-15 00:25:46 +02:00
Thomas Avé bdf08c122c Not sure what changed 2024-10-15 00:09:47 +02:00
Thomas Avé 55a3387697 Tweak notifications on AGS 2024-10-14 16:58:55 +02:00
Thomas Avé d675225c83 Update flake 2024-10-08 11:29:26 +02:00
Thomas Avé 843e4cee33 Install additional apps on kell and aloria 2024-10-08 11:29:26 +02:00
Thomas Avé 11652691e2 Suspend on pause or calculator press 2024-10-08 11:29:26 +02:00
Thomas Avé f84abf9908 Always use monitor with the lowest id for ags 2024-10-08 11:29:26 +02:00
Thomas Avé 38e4b5b3a7 Aloria power management 2024-10-06 18:01:51 +02:00
Thomas Avé 5cc088ac8b Add Tolnedra config 2024-10-06 13:36:06 +02:00
Thomas Avé 66753b3971 Force timeout 2024-10-02 14:56:27 +02:00
Thomas Avé b9dc120232 Install some nerd fonts 2024-10-02 13:22:57 +02:00
Thomas Avé 1416cb5af0 Remove nerdfonts 2024-10-02 00:26:15 +02:00
Thomas Avé 101f34d891 Clean tmp on boot 2024-10-01 23:59:35 +02:00
Thomas Avé a1750022b2 Verify if sensors works before using it 2024-10-01 23:32:17 +02:00
Thomas Avé fe021e683c Use SUPER_L instead of SUPER 2024-10-01 23:16:05 +02:00
Thomas Avé fa9e9e25af Run Hyprland on Riva 2024-10-01 22:55:37 +02:00
Thomas Avé 84b400bb6d Sat Sep 28 07:05:15 PM CEST 2024 2024-09-28 19:05:15 +02:00
Thomas Avé e5d274e7a7 Use bridge on Kell 2024-09-28 17:16:27 +02:00
Thomas Avé f54ad78da1 Make gj gk silent 2024-09-26 20:40:22 +02:00
Thomas Avé efc8587724 change back to copilot 2024-09-26 14:50:47 +02:00
Thomas Avé 884b7c57fc Fix Supermaven 2024-09-26 00:22:05 +02:00
Thomas Avé b26a8430d0 Change keymap 2024-09-25 23:38:33 +02:00
Thomas Avé 9e6d3646a2 Merge ai assistants in one file 2024-09-25 23:33:33 +02:00
Thomas Avé 7c96d27673 Switch to neocodeium 2024-09-25 23:17:51 +02:00
Thomas Avé 00df4a21be Try codeium 2024-09-25 23:07:14 +02:00
Thomas Avé c54fc573bf Wed 25 Sep 20:46:20 CEST 2024 2024-09-25 20:46:20 +02:00
Thomas Avé bb34612ac1 update tmux theme 2024-09-25 20:43:33 +02:00
Thomas Avé 6e4b916b81 Fix Obsidian.nvim templates for daily notes 2024-09-25 16:08:22 +02:00
Thomas Avé 88bcb4dc5c Wed Sep 25 12:43:48 PM CEST 2024 2024-09-25 12:43:48 +02:00
Thomas Avé f52f6756c5 Add start_firefox script 2024-09-25 12:33:20 +02:00
Thomas Avé b8babcf71d Install fonts on all systems 2024-09-22 16:57:59 +02:00
Thomas Avé 016535a111 Improve NFS handling 2024-09-22 16:29:01 +02:00
Thomas Avé a1f35cf72d Setup Bash with Starship 2024-09-20 15:13:14 +02:00
Thomas Avé 1f2119ca25 Update flake.nix 2024-09-17 13:35:02 +02:00
Thomas Avé 40809c10cb fix push command 2024-09-14 17:53:40 +02:00
Thomas Avé 86a7542e71 Accept any number of arguments instead of needing to use strings 2024-09-14 17:52:29 +02:00
Thomas Avé b669606c4d Rework push to use a function that accepts an argument 2024-09-14 17:46:22 +02:00
Thomas Avé d47afbf174 Update FZGO scripts 2024-09-14 17:37:13 +02:00
Thomas Avé d600d01515 Add ARM 2024-09-13 22:27:48 +00:00
Thomas Avé b2949528a2 Sat 14 Sep 00:03:25 CEST 2024 2024-09-14 00:03:30 +02:00
Thomas Avé 0885df1411 Fri Sep 13 23:40:04 CEST 2024 2024-09-13 23:40:08 +02:00
Thomas Avé 39ab1a3fc8 Fri 13 Sep 23:34:58 CEST 2024 2024-09-13 23:34:58 +02:00
Thomas Avé 1a82154359 Fri 13 Sep 11:15:45 CEST 2024 2024-09-13 11:15:45 +02:00
Thomas Avé 87c2f5f834 Indent 2024-09-13 10:46:49 +02:00
Thomas Avé d435903a2d Fri 13 Sep 10:45:22 CEST 2024 2024-09-13 10:45:22 +02:00
Thomas Avé 61c210f2eb Mon 9 Sep 11:44:20 CEST 2024 2024-09-09 11:44:20 +02:00
Thomas Avé dec0d75a6d Neovim fixes 2024-09-04 22:22:59 +02:00
Thomas Avé 25f5dc6d6d Tue 27 Aug 13:24:33 CEST 2024 2024-08-27 13:24:33 +02:00
Thomas Avé 63e49d0d62 Add Vault host 2024-08-27 11:50:55 +02:00
Thomas Avé c23f29d78a Wed 21 Aug 00:35:48 CEST 2024 2024-08-21 00:35:52 +02:00
Thomas Avé 6e2f176944 Wed Aug 21 12:35:24 AM CEST 2024 2024-08-21 00:35:24 +02:00
Thomas Avé 2345503f96 Fri 16 Aug 12:12:36 CEST 2024 2024-08-16 12:12:36 +02:00
Thomas Avé 8a014d5752 Fri 16 Aug 11:54:12 CEST 2024 2024-08-16 11:54:12 +02:00
Thomas Avé ce6bf9328c Wed 14 Aug 22:01:35 CEST 2024 2024-08-14 22:01:35 +02:00
Thomas Avé f7ce0a2997 Wed 14 Aug 22:01:21 CEST 2024 2024-08-14 22:01:21 +02:00
Thomas Avé 81e38fb86f Fri Aug 9 03:15:08 PM CEST 2024 2024-08-09 15:15:08 +02:00
Thomas Avé 92fec3de13 Fri Aug 9 03:13:13 PM CEST 2024 2024-08-09 15:13:13 +02:00
Thomas Avé 0f36df1718 Fri 9 Aug 12:15:22 CEST 2024 2024-08-09 12:15:23 +02:00
Thomas Avé 19a0cdc50e Thu 1 Aug 20:44:47 CEST 2024 2024-08-01 20:44:47 +02:00
Thomas Avé 050f8fb0be Thu 1 Aug 20:20:49 CEST 2024 2024-08-01 20:20:49 +02:00
Thomas Avé c77806691f Thu 1 Aug 16:12:43 CEST 2024 2024-08-01 16:12:43 +02:00
Thomas Avé 7ee949ac6c Tue 30 Jul 13:36:16 CEST 2024 2024-07-30 13:36:16 +02:00
Thomas Avé 3bc0c0977e Thu 25 Jul 15:29:31 CEST 2024 2024-07-25 15:29:31 +02:00
Thomas Avé 2c9efde7ef Sat 20 Jul 12:47:38 CEST 2024 2024-07-20 12:47:38 +02:00
Thomas Avé 9e6e41915d Thu 18 Jul 10:47:17 CEST 2024 2024-07-18 10:47:17 +02:00
Thomas Avé 97fd7910d9 Switch to Deno LSP 2024-07-17 17:26:18 +02:00
Thomas Avé 7062a5c9e6 Wed Jul 17 02:31:49 PM CEST 2024 2024-07-17 14:31:49 +02:00
Thomas Avé 4b21bddf93 Wed 17 Jul 14:28:33 CEST 2024 2024-07-17 14:28:33 +02:00
Thomas Avé 40840635fe Wed 17 Jul 14:21:03 CEST 2024 2024-07-17 14:21:03 +02:00
Thomas Avé 9b7265babf Sun 14 Jul 14:21:47 CEST 2024 2024-07-14 14:21:47 +02:00
Thomas Avé cad95215b8 Sun 14 Jul 12:53:35 CEST 2024 2024-07-14 12:53:35 +02:00
Thomas Avé 3364474e16 Fri 12 Jul 16:23:49 CEST 2024 2024-07-12 16:23:49 +02:00
Thomas Avé 08e64f4165 Thu 11 Jul 01:57:37 CEST 2024 2024-07-11 01:57:37 +02:00
Thomas Avé 3e97f5b81b Wed 10 Jul 22:15:25 CEST 2024 2024-07-10 22:15:25 +02:00
Thomas Avé 759bfb4edd Tue 9 Jul 22:23:41 CEST 2024 2024-07-09 22:23:41 +02:00
Thomas Avé 7de8c6e16f Tue 9 Jul 22:22:51 CEST 2024 2024-07-09 22:22:51 +02:00
Thomas Avé 29db36686c Sun 7 Jul 13:20:20 CEST 2024 2024-07-07 13:20:20 +02:00
Thomas Avé 98d80f4a06 Sat 6 Jul 23:50:25 CEST 2024 2024-07-06 23:50:25 +02:00
Thomas Avé 63cec4ff99 Sat 6 Jul 14:52:01 CEST 2024 2024-07-06 14:52:01 +02:00
Thomas Avé b4f089f2ad Sat 6 Jul 13:28:13 CEST 2024 2024-07-06 13:28:13 +02:00
Thomas Avé 726883a4fd Sat 6 Jul 13:27:03 CEST 2024 2024-07-06 13:27:03 +02:00
Thomas Avé d966639a71 Sat 6 Jul 13:21:49 CEST 2024 2024-07-06 13:22:49 +02:00
Thomas Avé e65bb2e5af Sat 6 Jul 01:11:33 CEST 2024 2024-07-06 01:11:37 +02:00
Thomas Avé 3326154e0d Sat 6 Jul 01:11:18 CEST 2024 2024-07-06 01:11:18 +02:00
Thomas Avé 38266ed3e9 Sat 6 Jul 00:48:20 CEST 2024 2024-07-06 00:48:23 +02:00
Thomas Avé 302b53d8e2 Sat 6 Jul 00:48:13 CEST 2024 2024-07-06 00:48:13 +02:00
Thomas Avé 6c6430ab99 Sat 6 Jul 00:37:34 CEST 2024 2024-07-06 00:37:34 +02:00
Thomas Avé 7671890fef Sat 6 Jul 00:36:05 CEST 2024 2024-07-06 00:36:05 +02:00
Thomas Avé df6f7e5686 Sat 6 Jul 00:22:01 CEST 2024 2024-07-06 00:22:01 +02:00
Thomas Avé 8238826e66 Sat 6 Jul 00:01:45 CEST 2024 2024-07-06 00:01:45 +02:00
Thomas Avé f945ad5112 Fri 5 Jul 23:18:09 CEST 2024 2024-07-05 23:18:09 +02:00
Thomas Avé b5e139205c Fri 5 Jul 23:07:29 CEST 2024 2024-07-05 23:07:29 +02:00
Thomas Avé 0fa57729fc Fri 5 Jul 22:52:38 CEST 2024 2024-07-05 22:52:38 +02:00
Thomas Avé a4c80201af Fri 5 Jul 22:46:16 CEST 2024 2024-07-05 22:46:16 +02:00
Thomas Avé 96b62caffd Fri 5 Jul 18:36:44 CEST 2024 2024-07-05 18:36:44 +02:00
Thomas Avé d760733969 Fri 5 Jul 18:35:37 CEST 2024 2024-07-05 18:35:37 +02:00
Thomas Avé 8904959b9c Fri 5 Jul 18:24:53 CEST 2024 2024-07-05 18:24:53 +02:00
Thomas Avé dc78bbd981 Fri 5 Jul 18:11:46 CEST 2024 2024-07-05 18:11:46 +02:00
Thomas Avé 270ff0ae17 Fri 5 Jul 18:07:30 CEST 2024 2024-07-05 18:07:30 +02:00
Thomas Avé 11de1da003 Fri Jul 5 03:50:08 PM CEST 2024 2024-07-05 15:50:08 +02:00
Thomas Avé 63a3997f83 Fri Jul 5 03:10:53 PM CEST 2024 2024-07-05 15:10:53 +02:00
Thomas Avé 58b56a9fa5 Add initial ags config 2024-07-05 14:06:21 +02:00
Thomas Avé e7d85bec90 Fri 5 Jul 01:33:59 CEST 2024 2024-07-05 01:33:59 +02:00
Thomas Avé 7c025957f3 Fri Jul 5 12:32:30 AM CEST 2024 2024-07-05 00:32:30 +02:00
Thomas Avé 09ea39f9b5 Thu Jul 4 08:09:25 PM CEST 2024 2024-07-04 20:09:25 +02:00
Thomas Avé b0d924c8db Thu Jul 4 08:03:58 PM CEST 2024 2024-07-04 20:03:58 +02:00
Thomas Avé 24f1230a7c Tue Jul 2 07:36:44 PM CEST 2024 2024-07-02 19:36:44 +02:00
Thomas Avé a87a2dad73 Sun Jun 23 10:42:28 PM CEST 2024 2024-06-23 22:42:28 +02:00
Thomas Avé 40a8a9806d Sun Jun 23 10:28:04 PM CEST 2024 2024-06-23 22:28:04 +02:00
Thomas Avé 5da182da3d Sun Jun 23 10:25:35 PM CEST 2024 2024-06-23 22:25:35 +02:00
Thomas Avé f30ff52f92 Sun Jun 23 10:22:07 PM CEST 2024 2024-06-23 22:22:07 +02:00
Thomas Avé f3848d7844 Sun Jun 23 09:58:15 PM CEST 2024 2024-06-23 21:58:15 +02:00
Thomas Avé 95adfac98e Sun Jun 23 09:51:14 PM CEST 2024 2024-06-23 21:51:19 +02:00
Thomas Avé 5276775d59 Sun Jun 23 03:42:09 PM CEST 2024 2024-06-23 15:42:13 +02:00
Thomas Avé 0cd4f1d044 Sun Jun 23 02:44:05 AM CEST 2024 2024-06-23 02:44:11 +02:00
Thomas Avé e1971e3465 Sun Jun 23 02:43:31 AM CEST 2024 2024-06-23 02:43:36 +02:00
Thomas Avé 42ffe4c0b4 fix wireguard 2024-06-23 02:43:12 +02:00
Thomas Avé ca94b6299b Sat Jun 22 10:45:16 PM CEST 2024 2024-06-22 22:45:20 +02:00
Thomas Avé 23ae2bbfb2 Sat Jun 22 09:48:46 PM CEST 2024 2024-06-22 21:48:46 +02:00
Thomas Avé a87eec200e Sat Jun 22 04:27:59 PM CEST 2024 2024-06-22 16:27:59 +02:00
Thomas Avé 232efe0efd Sat Jun 22 04:05:57 PM CEST 2024 2024-06-22 16:05:57 +02:00
Thomas Avé 7295175f04 Sat Jun 22 02:41:08 PM CEST 2024 2024-06-22 14:41:08 +02:00
Thomas Avé 923f87182c Sat Jun 22 02:40:10 PM CEST 2024 2024-06-22 14:40:14 +02:00
Thomas Avé adfe9dd92a Rename nixvm to riva 2024-06-22 14:32:46 +02:00
Thomas Avé 444c534c38 Sat Jun 22 01:44:27 AM CEST 2024 2024-06-22 01:44:27 +02:00
Thomas Avé bdbcd87426 Sat Jun 22 12:00:10 AM CEST 2024 2024-06-22 00:00:10 +02:00
Thomas Avé 50e73789fa Fri Jun 21 11:59:00 PM CEST 2024 2024-06-21 23:59:00 +02:00
Thomas Avé 1e1454c947 Fri Jun 21 11:44:23 PM CEST 2024 2024-06-21 23:44:23 +02:00
Thomas Avé 6e6bbf3e1e Fri Jun 21 05:42:10 PM CEST 2024 2024-06-21 17:42:10 +02:00
Thomas Avé a7ba2910b8 Fri Jun 21 05:25:14 PM CEST 2024 2024-06-21 17:25:14 +02:00
Thomas Avé 88f0f6d22d Fri Jun 21 04:30:40 PM CEST 2024 2024-06-21 16:30:40 +02:00
Thomas Avé 81d7f7ad38 Fri Jun 21 03:28:06 PM CEST 2024 2024-06-21 15:28:06 +02:00
Thomas Avé 5a29d68fe0 Fri Jun 21 03:26:24 PM CEST 2024 2024-06-21 15:26:24 +02:00
Thomas Avé dc56d51b2b Fri Jun 21 03:23:05 PM CEST 2024 2024-06-21 15:23:05 +02:00
Thomas Avé af92f2bd1d Fri Jun 21 03:15:04 PM CEST 2024 2024-06-21 15:15:04 +02:00
Thomas Avé b764ff7417 Fri Jun 21 02:56:54 PM CEST 2024 2024-06-21 14:56:54 +02:00
Thomas Avé 13709da5ad Fri Jun 21 02:08:04 PM CEST 2024 2024-06-21 14:08:04 +02:00
Thomas Avé cab316b9e1 Fri Jun 21 02:03:01 PM CEST 2024 2024-06-21 14:03:01 +02:00
Thomas Avé b8d914355d Fri Jun 21 01:53:47 PM CEST 2024 2024-06-21 13:54:37 +02:00
Thomas Avé cf90da37f0 Thu Jun 20 10:45:57 AM CEST 2024 2024-06-20 10:45:57 +02:00
Thomas Avé 9504fc441a Thu Jun 20 10:27:29 AM CEST 2024 2024-06-20 10:27:29 +02:00
Thomas Avé 24850d7dc2 Sat Jun 15 12:51:22 PM CEST 2024 2024-06-15 12:51:26 +02:00
Thomas Avé 6d8c88758a Fri Jun 14 10:10:48 PM CEST 2024 2024-06-14 22:10:48 +02:00
Thomas Avé dc66e8847f Fri Jun 14 09:45:40 PM CEST 2024 2024-06-14 21:45:44 +02:00
Thomas Avé ae7fcde709 Fri Jun 14 09:32:41 PM CEST 2024 2024-06-14 21:32:41 +02:00
Thomas Avé 3c24c2cf3c Fri Jun 14 09:14:07 PM CEST 2024 2024-06-14 21:14:07 +02:00
Thomas Avé e7ab2e1c77 Fri Jun 14 06:54:59 PM UTC 2024 2024-06-14 18:54:59 +00:00
Thomas Avé 992da67998 Thu Jun 13 09:41:21 PM CEST 2024 2024-06-13 21:41:21 +02:00
Thomas Avé 186c797ad5 Move some services to desktop.nix 2024-06-13 18:06:10 +02:00
Thomas Avé a9459f881a Thu Jun 13 04:48:04 PM CEST 2024 2024-06-13 16:48:04 +02:00
Thomas Avé 39da0aac37 Thu Jun 13 04:23:03 PM CEST 2024 2024-06-13 16:23:07 +02:00
Thomas Avé 67f90d20f6 Check for remote path before loading prompt 2024-06-13 16:12:24 +02:00
Thomas Avé 0e0346dafc Thu Jun 13 02:29:55 PM CEST 2024 2024-06-13 14:30:01 +02:00
Thomas Avé 53f3890ab5 Add YAML LSP 2024-06-13 14:09:54 +02:00
Thomas Avé 79c8ce04a0 Add NixVM to zsh and ssh 2024-06-13 13:59:10 +02:00
Thomas Avé 430d7e30c0 Add Wireguard to NixVM 2024-06-13 13:58:47 +02:00
Thomas Avé ccb5dd1dc8 Add NixVM keys 2024-06-13 13:38:25 +02:00
Thomas Avé 84c3c5fbad Create desktop.nix 2024-06-13 13:38:02 +02:00
Thomas Avé 0d1ba34155 Rename NixOS to NixVM 2024-06-13 13:14:56 +02:00
Thomas Avé 1872b9dd60 Update service creation to put the name of the failed service more
directly
2024-06-13 10:35:39 +00:00
Thomas Avé 8e93efe945 Fix path 2024-06-13 10:25:19 +00:00
Thomas Avé b54a18f3a4 Update flake.lock 2024-06-13 12:24:23 +02:00
Thomas Avé 9b4bd8fcc1 Formatting 2024-06-13 11:53:29 +02:00
Thomas Avé d14db5a303 Switch to branch of split-monitor-workspaces 2024-06-13 11:50:46 +02:00
Thomas Avé 2550456c65 No longer use mason 2024-06-12 23:20:14 +02:00
Thomas Avé 5552746a54 Disable ollama and hyprland plugin for now 2024-06-12 23:19:47 +02:00
Thomas Avé 7a899a428d Disable hyprland split plugin for now 2024-06-12 15:44:18 +02:00
Thomas Avé e6bac973fa Fix brightness 2024-06-12 15:16:11 +02:00
Thomas Avé 6a6ccc3a63 Re-add open function 2024-06-12 12:08:51 +02:00
Thomas Avé 4cd787e004 Mon Jun 10 05:03:07 PM CEST 2024 2024-06-10 17:03:07 +02:00
Thomas Avé 723ebeeedd Mon Jun 10 04:56:55 PM CEST 2024 2024-06-10 16:56:55 +02:00
Thomas Avé 3dc765ce26 Mon Jun 10 04:44:12 PM CEST 2024 2024-06-10 16:44:12 +02:00
Thomas Avé 7af0a4e7fd Mon Jun 10 04:31:23 PM CEST 2024 2024-06-10 16:31:23 +02:00
Thomas Avé 2a90b44b84 Mon Jun 10 04:28:16 PM CEST 2024 2024-06-10 16:28:16 +02:00
Thomas Avé c7da813de2 Mon Jun 10 04:09:54 PM CEST 2024 2024-06-10 16:09:54 +02:00
Thomas Avé 85791beff8 Aloria update 2024-06-10 16:04:33 +02:00
Thomas Avé f1a77181e7 Mon Jun 10 01:21:53 PM UTC 2024 2024-06-10 13:21:53 +00:00
Thomas Avé e6b2252a83 Add Vault.nix 2024-06-10 13:07:36 +00:00
Thomas Avé 31e0001a58 Mon Jun 10 12:14:37 PM CEST 2024 2024-06-10 12:14:37 +02:00
Thomas Avé b192b20d97 Sun Jun 9 06:01:19 PM CEST 2024 2024-06-09 18:01:19 +02:00
Thomas Avé 2ba80c4418 Sun Jun 9 05:58:07 PM CEST 2024 2024-06-09 17:58:07 +02:00
Thomas Avé 441b8fd168 Sat Jun 8 05:31:27 PM CEST 2024 2024-06-08 17:31:27 +02:00
Thomas Avé 414b6815df Fri Jun 7 01:01:14 AM CEST 2024 2024-06-07 01:01:19 +02:00
Thomas Avé aa8916c231 Thu Jun 6 09:45:43 PM CEST 2024 2024-06-06 21:45:43 +02:00
Thomas Avé 0fbefd2026 Thu Jun 6 08:26:15 PM CEST 2024 2024-06-06 20:26:15 +02:00
Thomas Avé 511d50ed6b Thu Jun 6 08:15:03 PM CEST 2024 2024-06-06 20:15:03 +02:00
Thomas Avé e10dfc484e Wed Jun 5 08:44:34 PM CEST 2024 2024-06-05 20:44:39 +02:00
Thomas Avé da9d3eccec Wed Jun 5 08:17:53 PM CEST 2024 2024-06-05 20:17:53 +02:00
Thomas Avé 4253ae326c Wed Jun 5 08:05:34 PM CEST 2024 2024-06-05 20:05:34 +02:00
Thomas Avé 31389aa08f Wed Jun 5 06:36:37 PM CEST 2024 2024-06-05 18:36:37 +02:00
Thomas Avé 7a629c251d Wed Jun 5 06:34:54 PM CEST 2024 2024-06-05 18:34:54 +02:00
Thomas Avé 162e9d0ce1 Wed Jun 5 02:45:51 PM CEST 2024 2024-06-05 14:45:51 +02:00
Thomas Avé 3cc58eb458 Wed Jun 5 02:36:07 PM CEST 2024 2024-06-05 14:36:07 +02:00
Thomas Avé 9447a15776 Wed Jun 5 02:31:58 PM CEST 2024 2024-06-05 14:31:58 +02:00
Thomas Avé 38b8b76b08 Wed Jun 5 01:57:00 PM CEST 2024 2024-06-05 13:57:00 +02:00
Thomas Avé f74bce95c9 Wed Jun 5 01:56:42 PM CEST 2024 2024-06-05 13:56:42 +02:00
Thomas Avé d092fc690d Wed Jun 5 01:28:56 PM CEST 2024 2024-06-05 13:28:56 +02:00
Thomas Avé 214a6d0a63 Wed Jun 5 02:34:34 AM CEST 2024 2024-06-05 02:34:34 +02:00
Thomas Avé f502a44d4b Wed Jun 5 02:23:39 AM CEST 2024 2024-06-05 02:23:39 +02:00
Thomas Avé 0cd298f97b Wed Jun 5 02:13:12 AM CEST 2024 2024-06-05 02:13:12 +02:00
Thomas Avé 1ae78f195d Wed Jun 5 02:11:35 AM CEST 2024 2024-06-05 02:11:35 +02:00
Thomas Avé b0f2924fbf Wed Jun 5 01:17:14 AM CEST 2024 2024-06-05 01:17:14 +02:00
Thomas Avé 0fd6f47908 Wed Jun 5 01:02:16 AM CEST 2024 2024-06-05 01:02:16 +02:00
Thomas Avé ffe3246a8d Wed Jun 5 12:55:36 AM CEST 2024 2024-06-05 00:55:36 +02:00
Thomas Avé 67c2d077e4 Tweaking Aloria script 2024-06-05 00:15:14 +02:00
Thomas Avé a29ff96c11 Tue Jun 4 11:45:22 PM CEST 2024 2024-06-04 23:45:22 +02:00
Thomas Avé 261b40e097 Tue Jun 4 11:44:59 PM CEST 2024 2024-06-04 23:44:59 +02:00
Thomas Avé 3941003f56 Tue Jun 4 11:43:23 PM CEST 2024 2024-06-04 23:43:23 +02:00
Thomas Avé a0c5c0ea56 Tue Jun 4 11:42:15 PM CEST 2024 2024-06-04 23:42:15 +02:00
Thomas Avé a82119b8da Tue Jun 4 11:41:05 PM CEST 2024 2024-06-04 23:41:11 +02:00
Thomas Avé 01cbaa1030 Tue Jun 4 11:16:09 PM CEST 2024 2024-06-04 23:16:09 +02:00
Thomas Avé 52a1f1fc0d Tue Jun 4 11:11:41 PM CEST 2024 2024-06-04 23:11:41 +02:00
Thomas Avé 504d7adf14 Tue Jun 4 10:28:19 PM CEST 2024 2024-06-04 22:28:19 +02:00
Thomas Avé 29671fb9df Tue Jun 4 10:27:59 PM CEST 2024 2024-06-04 22:27:59 +02:00
Thomas Avé 1db9388a7d Tue Jun 4 10:27:38 PM CEST 2024 2024-06-04 22:27:38 +02:00
Thomas Avé 251fa42493 Tue Jun 4 10:13:24 PM CEST 2024 2024-06-04 22:14:20 +02:00
Thomas Avé d6f4ca2f3d Tue Jun 4 04:16:30 PM CEST 2024 2024-06-04 16:16:30 +02:00
Thomas Avé 2f88658882 Tue Jun 4 04:15:48 PM CEST 2024 2024-06-04 16:15:48 +02:00
Thomas Avé 7a6f3c57c0 Tue Jun 4 01:59:19 AM CEST 2024 2024-06-04 01:59:19 +02:00
Thomas Avé d488c4b4a6 Tue Jun 4 01:52:03 AM CEST 2024 2024-06-04 01:52:03 +02:00
Thomas Avé a7fec5dd4e Tue Jun 4 01:50:37 AM CEST 2024 2024-06-04 01:50:42 +02:00
Thomas Avé 4991d9f7a4 Tue Jun 4 01:49:00 AM CEST 2024 2024-06-04 01:49:00 +02:00
Thomas Avé d8c14f30d8 Tue Jun 4 01:48:49 AM CEST 2024 2024-06-04 01:48:49 +02:00
Thomas Avé abb64b1d01 Tue Jun 4 01:48:34 AM CEST 2024 2024-06-04 01:48:34 +02:00
Thomas Avé e0e75470e8 Tue Jun 4 12:53:01 AM CEST 2024 2024-06-04 00:53:01 +02:00
Thomas Avé d7b9755f91 Mon Jun 3 09:04:39 PM CEST 2024 2024-06-03 21:04:39 +02:00
Thomas Avé 36fa874bc8 Mon Jun 3 09:04:20 PM CEST 2024 2024-06-03 21:04:20 +02:00
Thomas Avé 063df11269 Mon Jun 3 08:09:38 PM CEST 2024 2024-06-03 20:09:38 +02:00
Thomas Avé 8ba13936c7 Mon Jun 3 07:18:55 PM CEST 2024 2024-06-03 19:18:55 +02:00
Thomas Avé 21b3671b75 Mon Jun 3 07:15:28 PM CEST 2024 2024-06-03 19:15:28 +02:00
Thomas Avé fddbaa913b Mon Jun 3 07:12:42 PM CEST 2024 2024-06-03 19:12:42 +02:00
Thomas Avé 3ca8234d9d Mon Jun 3 07:04:57 PM CEST 2024 2024-06-03 19:04:57 +02:00
Thomas Avé 0bab358ce0 Mon Jun 3 06:36:08 PM CEST 2024 2024-06-03 18:36:08 +02:00
Thomas Avé 4e7e951cb3 Mon Jun 3 06:06:35 PM CEST 2024 2024-06-03 18:06:35 +02:00
Thomas Avé 03f89ffbda Mon Jun 3 06:01:26 PM CEST 2024 2024-06-03 18:01:26 +02:00
Thomas Avé 08c59af817 Mon Jun 3 05:37:31 PM CEST 2024 2024-06-03 17:37:31 +02:00
Thomas Avé 8be89a76cd Mon Jun 3 05:18:13 PM CEST 2024 2024-06-03 17:18:13 +02:00
Thomas Avé a8d4ffd131 Mon Jun 3 04:02:50 PM CEST 2024 2024-06-03 16:02:50 +02:00
Thomas Avé 441d5bfa22 Mon Jun 3 04:01:31 PM CEST 2024 2024-06-03 16:01:31 +02:00
Thomas Avé 699b39f4a7 Mon Jun 3 02:00:07 AM CEST 2024 2024-06-03 02:00:07 +02:00
Thomas Avé c72b114ee2 Mon Jun 3 01:09:45 AM CEST 2024 2024-06-03 01:09:45 +02:00
Thomas Avé 0b1b9c1481 Mon Jun 3 01:00:53 AM CEST 2024 2024-06-03 01:00:53 +02:00
Thomas Avé 0483baf022 Mon Jun 3 12:06:57 AM CEST 2024 2024-06-03 00:06:57 +02:00
Thomas Avé 5d5c37164a Sun Jun 2 10:54:29 PM CEST 2024 2024-06-02 22:54:29 +02:00
Thomas Avé ea6a1f199a Sun Jun 2 10:43:44 PM CEST 2024 2024-06-02 22:43:44 +02:00
Thomas Avé d2c13c9255 Sun Jun 2 10:20:01 PM CEST 2024 2024-06-02 22:20:01 +02:00
Thomas Avé c54a0f53bf Sun Jun 2 10:10:47 PM CEST 2024 2024-06-02 22:10:47 +02:00
Thomas Avé 8cba74203d Merge branch 'master' of git.thomasave.be:thomasave/dotfiles 2024-06-02 17:12:31 +02:00
Thomas Avé 05b773a143 Sun Jun 2 04:52:47 PM CEST 2024 2024-06-02 17:08:38 +02:00
Thomas Avé ac051a5b3c Sun Jun 2 05:07:56 PM CEST 2024 2024-06-02 17:07:56 +02:00
Thomas Avé a373a06bf0 Sun Jun 2 04:52:47 PM CEST 2024 2024-06-02 16:57:11 +02:00
Thomas Avé bc9d05a8b4 Sun Jun 2 04:38:31 PM CEST 2024 2024-06-02 16:46:57 +02:00
Thomas Avé e80a006602 Sun Jun 2 04:35:44 PM CEST 2024 2024-06-02 16:36:56 +02:00
Thomas Avé 6a0854f52e Sun Jun 2 04:33:02 PM CEST 2024 2024-06-02 16:34:02 +02:00
Thomas Avé da7d35955e Sun Jun 2 02:51:31 PM CEST 2024 2024-06-02 14:51:31 +02:00
Thomas Avé c162aa6d4f Sun Jun 2 02:51:15 PM CEST 2024 2024-06-02 14:51:15 +02:00
Thomas Avé 2aca421337 Sun Jun 2 02:50:05 PM CEST 2024 2024-06-02 14:50:05 +02:00
Thomas Avé 3dc025f4e4 Sun Jun 2 02:39:54 PM CEST 2024 2024-06-02 14:39:54 +02:00
Thomas Avé cbe6f05774 Sun Jun 2 02:38:25 PM CEST 2024 2024-06-02 14:38:25 +02:00
Thomas Avé 82c3983af7 Sun Jun 2 02:17:07 PM CEST 2024 2024-06-02 14:17:07 +02:00
Thomas Avé d40b3c72b0 Sun Jun 2 02:10:58 PM CEST 2024 2024-06-02 14:10:58 +02:00
Thomas Avé 27d786142d Sun Jun 2 02:03:52 PM CEST 2024 2024-06-02 14:03:52 +02:00
Thomas Avé e3f896fc68 Sun Jun 2 02:02:14 PM CEST 2024 2024-06-02 14:02:14 +02:00
Thomas Avé d11e7cf1d4 Sun Jun 2 01:51:07 PM CEST 2024 2024-06-02 13:51:07 +02:00
Thomas Avé 4318cf43be Sun Jun 2 01:50:50 PM CEST 2024 2024-06-02 13:50:50 +02:00
Thomas Avé 1bed2cc714 Sun Jun 2 01:48:18 PM CEST 2024 2024-06-02 13:48:18 +02:00
Thomas Avé 7876f9736f Sun Jun 2 01:36:24 PM CEST 2024 2024-06-02 13:36:24 +02:00
Thomas Avé 075d3d0bc3 Sun Jun 2 01:14:46 PM CEST 2024 2024-06-02 13:14:46 +02:00
Thomas Avé 4f819189a0 Sun Jun 2 01:05:51 PM CEST 2024 2024-06-02 13:05:51 +02:00
Thomas Avé 2128e9dc94 Sat Jun 1 06:28:19 PM CEST 2024 2024-06-01 18:28:19 +02:00
Thomas Avé c3b3e434d7 Sat Jun 1 06:10:39 PM CEST 2024 2024-06-01 18:10:39 +02:00
Thomas Avé 51b2a2f7a8 Sat Jun 1 06:06:00 PM CEST 2024 2024-06-01 18:06:00 +02:00
Thomas Avé 681e813b0b Sat Jun 1 05:59:10 PM CEST 2024 2024-06-01 17:59:10 +02:00
Thomas Avé d3424c1873 Sat Jun 1 05:57:53 PM CEST 2024 2024-06-01 17:57:53 +02:00
Thomas Avé 3c2e5ecbf2 Sat Jun 1 05:55:08 PM CEST 2024 2024-06-01 17:55:08 +02:00
Thomas Avé 113a871320 Sat Jun 1 05:51:49 PM CEST 2024 2024-06-01 17:51:49 +02:00
Thomas Avé 392bd9c0d6 Sat Jun 1 05:49:46 PM CEST 2024 2024-06-01 17:49:46 +02:00
Thomas Avé 0ce2405c81 Sat Jun 1 05:22:46 PM CEST 2024 2024-06-01 17:22:46 +02:00
Thomas Avé d27d4d28fc Sat Jun 1 05:19:39 PM CEST 2024 2024-06-01 17:19:39 +02:00
Thomas Avé fc742c24e0 Sat Jun 1 05:10:24 PM CEST 2024 2024-06-01 17:10:24 +02:00
Thomas Avé c3ee1c352f Sat Jun 1 05:00:23 PM CEST 2024 2024-06-01 17:00:23 +02:00
Thomas Avé 3f2ec3c3e5 $(date) 2024-06-01 16:59:35 +02:00
Thomas Avé 2768455cb7 `date` 2024-06-01 16:57:25 +02:00
Thomas Avé c643f70f98 `date` 2024-06-01 16:56:07 +02:00
Thomas Avé 4c8460ce84 `date` 2024-06-01 16:52:20 +02:00
Thomas Avé d6ff7492b8 `date` 2024-06-01 16:35:37 +02:00
Thomas Avé a2e454015c Work on moving hyprland 2024-05-31 23:44:20 +02:00
Thomas Avé ee733b781e Add Hyprland 2024-05-31 22:25:50 +02:00
Thomas Avé fa8d665e9e Remove old files 2024-05-31 19:03:49 +02:00
Thomas Avé 1c1c9befdd Update dotnet 2024-05-31 18:18:11 +02:00
Thomas Avé 3321f01fc6 remove lazy lock 2024-05-31 18:01:14 +02:00
Thomas Avé 418a91a241 Add neovim config 2024-05-31 18:00:12 +02:00
Thomas Avé 62b4adfff4 Initial zsh config finished 2024-05-31 17:49:42 +02:00
Thomas Avé 2365f43535 restructure 2024-05-31 17:33:30 +02:00
Thomas Avé 1378553559 Add search Script 2024-05-31 16:45:21 +02:00
Thomas Avé a054181d3f Add files 2024-05-31 15:40:15 +02:00
Thomas Avé aeda05a8d1 Restructure 2024-05-31 15:26:03 +02:00
Thomas Avé 321bd28f35 Move zsh to module 2024-05-31 15:20:29 +02:00
Thomas Avé cf068c7eb8 ZSH as default shell 2024-05-31 15:03:11 +02:00
Thomas Avé a1dc86fb39 Indentation 2024-05-31 14:55:36 +02:00
Thomas Avé c3142b0761 Work on install zsh 2024-05-31 14:52:02 +02:00
Thomas Avé 07a2b762ea Install nvim and bash in home-manager 2024-05-31 14:37:28 +02:00
Thomas Avé e632eff25b Add Home-Manager 2024-05-31 14:29:38 +02:00
Thomas Avé 629049e5d4 Add ssh keys 2024-05-31 14:04:54 +02:00
Thomas Avé d934d81b6f Add initial NixOS config 2024-05-31 12:41:57 +02:00
266 changed files with 7322 additions and 12366 deletions

View File

@ -1,26 +0,0 @@
Checks: "*,
-abseil-*,
-altera-*,
-android-*,
-fuchsia-*,
-google-*,
-llvm*,
-zircon-*,
-bugprone-easily-swappable-parameters
-readability-identifier-length
-readability-avoid-const-params-in-decls,
-readability-magic-numbers
-bugprone-narrowing-conversions
-modernize-use-trailing-return-type
-cppcoreguidelines-pro-type-union-access
-modernize-use-nodiscard
-cppcoreguidelines-narrowing-conversions
-cppcoreguidelines-avoid-magic-numbers
-Wsign-compare
-hicpp-uppercase-literal-suffix
-readability-uppercase-literal-suffix
-readability-named-parameter
-performance-avoid-endl"
WarningsAsErrors: ''
HeaderFilterRegex: ''
FormatStyle: none

View File

@ -1,753 +0,0 @@
[general]
#
# Used as a default path for save operations if no other path is specified.
# ~ is expanded to the current user home dir.
#
#default-save-path=
# If set to "gpg", aerc will use system gpg binary and keystore for all crypto
# operations. If set to "internal", the internal openpgp keyring will be used.
# If set to "auto", the system gpg will be preferred unless the internal
# keyring already exists, in which case the latter will be used.
#
# Default: auto
#pgp-provider=auto
# By default, the file permissions of accounts.conf must be restrictive and
# only allow reading by the file owner (0600). Set this option to true to
# ignore this permission check. Use this with care as it may expose your
# credentials.
#
# Default: false
#unsafe-accounts-conf=false
# Output log messages to specified file. A path starting with ~/ is expanded to
# the user home dir. When redirecting aerc's output to a file using > shell
# redirection, this setting is ignored and log messages are printed to stdout.
#
#log-file=
# Only log messages above the specified level to log-file. Supported levels
# are: trace, debug, info, warn and error. When redirecting aerc's output to
# a file using > shell redirection, this setting is ignored and the log level
# is forced to trace.
#
# Default: info
#log-level=info
# Set the $TERM environment variable used for the embedded terminal.
#
# Default: xterm-256color
term=xterm-256color
# Display OSC8 strings in the embedded terminal
#
# Default: false
#enable-osc8=false
# Default shell command to use for :menu. This will be executed with sh -c and
# will run in an popover dialog.
#
# Any occurrence of %f will be replaced by a temporary file path where the
# command is expected to write output lines to be consumed by :menu. Otherwise,
# the lines will be read from the command's standard output.
#
# Examples:
# default-menu-cmd=fzf
# default-menu-cmd=fzf --multi
# default-menu-cmd=dmenu -l 20
# default-menu-cmd=ranger --choosefiles=%f
#
#default-menu-cmd=
[ui]
border-char-vertical="│"
border-char-horizontal="─"
styleset-name=catppuccin-mocha
#
# Describes the format for each row in a mailbox view. This is a comma
# separated list of column names with an optional align and width suffix. After
# the column name, one of the '<' (left), ':' (center) or '>' (right) alignment
# characters can be added (by default, left) followed by an optional width
# specifier. The width is either an integer representing a fixed number of
# characters, or a percentage between 1% and 99% representing a fraction of the
# terminal width. It can also be one of the '*' (auto) or '=' (fit) special
# width specifiers. Auto width columns will be equally attributed the remaining
# terminal width. Fit width columns take the width of their contents. If no
# width specifier is set, '*' is used by default.
#
# Default: date<20,name<17,flags>4,subject<*
#index-columns=date<20,name<17,flags>4,subject<*
#
# Each name in index-columns must have a corresponding column-$name setting.
# All column-$name settings accept golang text/template syntax. See
# aerc-templates(7) for available template attributes and functions.
#
# Here are some examples to show the To field instead of the From field for
# an email (modifying column-name):
#
# 1. a generic one
# column-name={{ .Peer | names | join ", " }}
# 2. based upon the selected folder
# column-name={{if match .Folder "^(Gesendet|Sent)$"}}{{index (.To | names) 0}}{{else}}{{index (.From | names) 0}}{{end}}
#
# Default settings
#column-date={{.DateAutoFormat .Date.Local}}
#column-name={{index (.From | names) 0}}
#column-flags={{.Flags | join ""}}
#column-subject={{.ThreadPrefix}}{{if .ThreadFolded}}{{printf "{%d}" .ThreadCount}}{{end}}{{.Subject}}
#
# String separator inserted between columns. When the column width specifier is
# an exact number of characters, the separator is added to it (i.e. the exact
# width will be fully available for the column contents).
#
# Default: " "
#column-separator=" "
#
# See time.Time#Format at https://godoc.org/time#Time.Format
#
# Default: 2006-01-02 03:04 PM (ISO 8601 + 12 hour time)
timestamp-format=2006-01-02 15:04
#
# Index-only time format for messages that were received/sent today.
# If this is not specified, timestamp-format is used instead.
#
#this-day-time-format=
#
# Index-only time format for messages that were received/sent within the last
# 7 days. If this is not specified, timestamp-format is used instead.
#
#this-week-time-format=
#
# Index-only time format for messages that were received/sent this year.
# If this is not specified, timestamp-format is used instead.
#
#this-year-time-format=
#
# Width of the sidebar, including the border.
#
# Default: 20
sidebar-width=30
#
# Message to display when viewing an empty folder.
#
# Default: (no messages)
#empty-message=(no messages)
# Message to display when no folders exists or are all filtered
#
# Default: (no folders)
#empty-dirlist=(no folders)
#
# Value to set {{.Subject}} template to when subject is empty.
#
# Default: (no subject)
#empty-subject=(no subject)
# Enable mouse events in the ui, e.g. clicking and scrolling with the mousewheel
#
# Default: false
mouse-enabled=true
#
# Ring the bell when new messages are received
#
# Default: true
#new-message-bell=true
#
# Template to use for Account tab titles
#
# Default: {{.Account}}
#tab-title-account={{.Account}}
# Marker to show before a pinned tab's name.
#
# Default: `
#pinned-tab-marker='`'
# Template for the left side of the directory list.
# See aerc-templates(7) for all available fields and functions.
#
# Default: {{.Folder}}
#dirlist-left={{.Folder}}
# Template for the right side of the directory list.
# See aerc-templates(7) for all available fields and functions.
#
# Default: {{if .Unread}}{{humanReadable .Unread}}/{{end}}{{if .Exists}}{{humanReadable .Exists}}{{end}}
dirlist-right={{if .Unread}}{{humanReadable .Unread}}{{end}}
# Delay after which the messages are actually listed when entering a directory.
# This avoids loading messages when skipping over folders and makes the UI more
# responsive. If you do not want that, set it to 0s.
#
# Default: 200ms
#dirlist-delay=200ms
# Display the directory list as a foldable tree that allows to collapse and
# expand the folders.
#
# Default: false
dirlist-tree=true
# If dirlist-tree is enabled, set level at which folders are collapsed by
# default. Set to 0 to disable.
#
# Default: 0
#dirlist-collapse=0
# List of space-separated criteria to sort the messages by, see *sort*
# command in *aerc*(1) for reference. Prefixing a criterion with "-r "
# reverses that criterion.
#
# Example: "from -r date"
#
#sort=
# Moves to next message when the current message is deleted
#
# Default: true
#next-message-on-delete=true
# Automatically set the "seen" flag when a message is opened in the message
# viewer.
#
# Default: true
#auto-mark-read=true
# The directories where the stylesets are stored. It takes a colon-separated
# list of directories. If this is unset or if a styleset cannot be found, the
# following paths will be used as a fallback in that order:
#
# ${XDG_CONFIG_HOME:-~/.config}/aerc/stylesets
# ${XDG_DATA_HOME:-~/.local/share}/aerc/stylesets
# /usr/local/share/aerc/stylesets
# /usr/share/aerc/stylesets
#
#stylesets-dirs=
# Uncomment to use box-drawing characters for vertical and horizontal borders.
#
# Default: " "
#border-char-vertical=" "
#border-char-horizontal=" "
# Sets the styleset to use for the aerc ui elements.
#
# Default: default
# Activates fuzzy search in commands and their arguments: the typed string is
# searched in the command or option in any position, and need not be
# consecutive characters in the command or option.
#
# Default: false
#fuzzy-complete=false
# How long to wait after the last input before auto-completion is triggered.
#
# Default: 250ms
#completion-delay=250ms
# The minimum required characters to allow auto-completion to be triggered after
# completion-delay.
#
# Setting this to "manual" disables automatic completion, leaving only the
# manually triggered completion with the $complete key (see aerc-binds(5) for
# more details).
#
# Default: 1
#completion-min-chars=1
#
# Global switch for completion popovers
#
# Default: true
#completion-popovers=true
# Uncomment to use UTF-8 symbols to indicate PGP status of messages
#
# Default: ASCII
#icon-unencrypted=
#icon-encrypted=✔
#icon-signed=✔
#icon-signed-encrypted=✔
#icon-unknown=✘
#icon-invalid=⚠
# Reverses the order of the message list. By default, the message list is
# ordered with the newest (highest UID) message on top. Reversing the order
# will put the oldest (lowest UID) message on top. This can be useful in cases
# where the backend does not support sorting.
#
# Default: false
#reverse-msglist-order = false
# Reverse display of the mesage threads. Default order is the the intial
# message is on the top with all the replies being displayed below. The
# reverse option will put the initial message at the bottom with the
# replies on top.
#
# Default: false
#reverse-thread-order=false
# Sort the thread siblings according to the sort criteria for the messages. If
# sort-thread-siblings is false, the thread siblings will be sorted based on
# the message UID in ascending order. This option is only applicable for
# client-side threading with a backend that enables sorting. Note that there's
# a performance impact when sorting is activated.
#
# Default: false
#sort-thread-siblings=false
#[ui:account=foo]
#
# Enable a threaded view of messages. If this is not supported by the backend
# (IMAP server or notmuch), threads will be built by the client.
#
# Default: false
#threading-enabled=false
# Force client-side thread building
#
# Default: false
#force-client-threads=false
# Show thread context enables messages which do not match the current query (or
# belong to the current mailbox) to be shown for context. These messages can be
# styled separately using "msglist_thread_context" in a styleset. This feature
# is not supported by all backends
#
# Default: false
#show-thread-context=false
# Debounce client-side thread building
#
# Default: 50ms
#client-threads-delay=50ms
#
# Thread prefix customization:
#
# Customize the thread prefix appearance by selecting the arrow head.
#
# Default: ">"
#thread-prefix-tip = ">"
#
# Customize the thread prefix appearance by selecting the arrow indentation.
#
# Default: " "
#thread-prefix-indent = " "
#
# Customize the thread prefix appearance by selecting the vertical extension of
# the arrow.
#
# Default: "│"
#thread-prefix-stem = "│"
#
# Customize the thread prefix appearance by selecting the horizontal extension
# of the arrow.
#
# Default: ""
#thread-prefix-limb = ""
#
# Customize the thread prefix appearance by selecting the folded thread
# indicator.
#
# Default: ""
#thread-prefix-folded = ""
#
# Customize the thread prefix appearance by selecting the unfolded thread
# indicator.
#
# Default: ""
#thread-prefix-unfolded = ""
#
# Customize the thread prefix appearance by selecting the first child connector.
#
# Default: ""
#thread-prefix-first-child = ""
#
# Customize the thread prefix appearance by selecting the connector used if
# the message has siblings.
#
# Default: "├─"
#thread-prefix-has-siblings = "├─"
#
# Customize the thread prefix appearance by selecting the connector used if the
# message has no parents and no children.
#
# Default: ""
#thread-prefix-lone = ""
#
# Customize the thread prefix appearance by selecting the connector used if the
# message has no parents and has children.
#
# Default: ""
#thread-prefix-orphan = ""
#
# Customize the thread prefix appearance by selecting the connector for the last
# sibling.
#
# Default: "└─"
#thread-prefix-last-sibling = "└─"
#
# Customize the reversed thread prefix appearance by selecting the connector for
# the last sibling.
#
# Default: "┌─"
#thread-prefix-last-sibling-reverse = "┌─"
#
# Customize the reversed thread prefix appearance by selecting the first child
# connector.
#
# Default: ""
#thread-prefix-first-child-reverse = ""
#
# Customize the reversed thread prefix appearance by selecting the connector
# used if the message has no parents and has children.
#
# Default: ""
#thread-prefix-orphan-reverse = ""
[statusline]
#
# Describes the format for the status line. This is a comma separated list of
# column names with an optional align and width suffix. See [ui].index-columns
# for more details. To completely mute the status line except for push
# notifications, explicitly set status-columns to an empty string.
#
# Default: left<*,center:=,right>*
#status-columns=left<*,center:=,right>*
#
# Each name in status-columns must have a corresponding column-$name setting.
# All column-$name settings accept golang text/template syntax. See
# aerc-templates(7) for available template attributes and functions.
#
# Default settings
#column-left=[{{.Account}}] {{.StatusInfo}}
#column-center={{.PendingKeys}}
#column-right={{.TrayInfo}}
#
# String separator inserted between columns.
# See [ui].column-separator for more details.
#
#column-separator=" "
# Specifies the separator between grouped statusline elements.
#
# Default: " | "
#separator=" | "
# Defines the mode for displaying the status elements.
# Options: text, icon
#
# Default: text
#display-mode=text
[viewer]
#
# Specifies the pager to use when displaying emails. Note that some filters
# may add ANSI codes to add color to rendered emails, so you may want to use a
# pager which supports ANSI codes.
#
# Default: less -Rc
# pager=less -Rc
pager=nvim -u $XDG_CONFIG_HOME/nvim/aerc.lua
#
# If an email offers several versions (multipart), you can configure which
# mimetype to prefer. For example, this can be used to prefer plaintext over
# html emails.
#
# Default: text/plain,text/html
#alternatives=text/plain,text/html
#
# Default setting to determine whether to show full headers or only parsed
# ones in message viewer.
#
# Default: false
#show-headers=false
#
# Layout of headers when viewing a message. To display multiple headers in the
# same row, separate them with a pipe, e.g. "From|To". Rows will be hidden if
# none of their specified headers are present in the message.
#
# Default: From|To,Cc|Bcc,Date,Subject
#header-layout=From|To,Cc|Bcc,Date,Subject
# Whether to always show the mimetype of an email, even when it is just a single part
#
# Default: false
#always-show-mime=false
# Define the maximum height of the mimetype switcher before a scrollbar is used.
# The height of the mimetype switcher is restricted to half of the display
# height. If the provided value for the height is zero, the number of parts will
# be used as the height of the type switcher.
#
# Default: 0
#max-mime-height = 0
# Parses and extracts http links when viewing a message. Links can then be
# accessed with the open-link command.
#
# Default: true
#parse-http-links=true
[compose]
#
# Specifies the command to run the editor with. It will be shown in an embedded
# terminal, though it may also launch a graphical window if the environment
# supports it. Defaults to $EDITOR, or vi.
#editor=
#
# When set, aerc will create and read .eml files for composing that have
# non-standard \n linebreaks. This is only relevant if the used editor does not
# support CRLF linebreaks.
#
#lf-editor=false
#
# Default header fields to display when composing a message. To display
# multiple headers in the same row, separate them with a pipe, e.g. "To|From".
#
# Default: To|From,Subject
#header-layout=To|From,Subject
#
# Edit headers into the text editor instead than separate fields.
#
# When this is true, address-book-cmd is not supported and address completion
# is left to the editor itself. Also, displaying multiple headers on the same
# line is not possible.
#
# Default: false
#edit-headers=false
#
# Specifies the command to be used to tab-complete email addresses. Any
# occurrence of "%s" in the address-book-cmd will be replaced with what the
# user has typed so far.
#
# The command must output the completions to standard output, one completion
# per line. Each line must be tab-delimited, with an email address occurring as
# the first field. Only the email address field is required. The second field,
# if present, will be treated as the contact name. Additional fields are
# ignored.
#
# This parameter can also be set per account in accounts.conf.
address-book-cmd='notmuch address "%s"'
# Specifies the command to be used to select attachments. Any occurrence of
# '%s' in the file-picker-cmd will be replaced with the argument <arg>
# to :attach -m <arg>. Any occurence of '%f' will be replaced by the
# location of a temporary file, from which aerc will read the selected files.
#
# If '%f' is not present, the command must output the selected files to
# standard output, one file per line. If it is present, then aerc does not
# capture the standard output and instead reads the files from the temporary
# file which should have the same format.
#file-picker-cmd=
#
# Allow to address yourself when replying
#
# Default: true
#reply-to-self=true
# Warn before sending an email with an empty subject.
#
# Default: false
#empty-subject-warning=false
#
# Warn before sending an email that matches the specified regexp but does not
# have any attachments. Leave empty to disable this feature.
#
# Uses Go's regexp syntax, documented at https://golang.org/s/re2syntax. The
# "(?im)" flags are set by default (case-insensitive and multi-line).
#
# Example:
# no-attachment-warning=^[^>]*attach(ed|ment)
#
#no-attachment-warning=
#
# When set, aerc will generate "format=flowed" bodies with a content type of
# "text/plain; format=flowed" as described in RFC3676. This format is easier to
# handle for some mailing software, and generally just looks like ordinary
# text. To actually make use of this format's features, you'll need support in
# your editor.
#
#format-flowed=false
[multipart-converters]
#
# Converters allow to generate multipart/alternative messages by converting the
# main text/plain part into any other MIME type. Only exact MIME types are
# accepted. The commands are invoked with sh -c and are expected to output
# valid UTF-8 text.
#
# Example (obviously, this requires that you write your main text/plain body
# using the markdown syntax):
# text/html=pandoc -f markdown -t html --standalone
# text/html=lynx -dump -force_html -stdin
text/html=w3m -dump -o display_link_number=1 -T text/html
[filters]
#
# Filters allow you to pipe an email body through a shell command to render
# certain emails differently, e.g. highlighting them with ANSI escape codes.
#
# The commands are invoked with sh -c. The following folders are prepended to
# the system $PATH to allow referencing filters from their name only:
#
# ${XDG_CONFIG_HOME:-~/.config}/aerc/filters
# ~/.local/libexec/aerc/filters
# ${XDG_DATA_HOME:-~/.local/share}/aerc/filters
# $PREFIX/libexec/aerc/filters
# $PREFIX/share/aerc/filters
# /usr/libexec/aerc/filters
# /usr/share/aerc/filters
#
# If you want to run a program in your default $PATH which has the same name
# as a builtin filter (e.g. /usr/bin/colorize), use its absolute path.
#
# The following variables are defined in the filter command environment:
#
# AERC_MIME_TYPE the part MIME type/subtype
# AERC_FORMAT the part content type format= parameter
# AERC_FILENAME the attachment filename (if any)
# AERC_SUBJECT the message Subject header value
# AERC_FROM the message From header value
#
# The first filter which matches the email's mimetype will be used, so order
# them from most to least specific.
#
# You can also match on non-mimetypes, by prefixing with the header to match
# against (non-case-sensitive) and a comma, e.g. subject,text will match a
# subject which contains "text". Use header,~regex to match against a regex.
text/plain=cat
text/calendar=gnome-calendar
message/delivery-status=cat
message/rfc822=cat
# text/html=lynx -dump -force_html -stdin
text/html=w3m -dump -o display_link_number=1 -T text/html
#text/html=html | colorize
text/*=bat -fP --file-name="$AERC_FILENAME"
application/x-sh=bat -fP -l sh
#image/*=catimg -w $(tput cols) -
#subject,~Git(hub|lab)=lolcat -f
#from,thatguywhodoesnothardwraphismessages=wrap -w 100 | colorize
# This special filter is only used to post-process email headers when
# [viewer].show-headers=true
# By default, headers are piped directly into the pager.
#
# .headers=colorize
[openers]
#
# Openers allow you to specify the command to use for the :open and :open-link
# actions on a per-MIME-type basis. The :open-link URL scheme is used to
# determine the MIME type as follows: x-scheme-handler/<scheme>.
#
# {} is expanded as the temporary filename or URL to be opened with proper
# shell quoting. If it is not encountered in the command, the filename/URL will
# be appended to the end of the command. The command will then be executed with
# `sh -c`.
#
# Like [filters], openers support basic shell globbing. The first opener which
# matches the part's MIME type (or URL scheme handler MIME type) will be used,
# so order them from most to least specific.
#
# Examples:
# x-scheme-handler/irc=hexchat
# x-scheme-handler/http*=printf '%s' {} | wl-copy
# text/html=surf -dfgms
# text/plain=gvim {} +125
# message/rfc822=thunderbird
[hooks]
#
# Hooks are triggered whenever the associated event occurs.
#
# Executed when a new email arrives in the selected folder
#mail-received=notify-send "[$AERC_ACCOUNT/$AERC_FOLDER] New mail from $AERC_FROM_NAME" "$AERC_SUBJECT"
#
# Executed when mail is deleted from a folder
#mail-deleted=mbsync "$AERC_ACCOUNT:$AERC_FOLDER" &
#
# Executed when aerc adds mail to a folder
#mail-added=mbsync "$AERC_ACCOUNT:$AERC_FOLDER" &
#
# Executed when aerc starts
#aerc-startup=aerc :terminal calcurse && aerc :next-tab
#
# Executed when aerc shuts down.
#aerc-shutdown=
[templates]
# Templates are used to populate email bodies automatically.
#
# The directories where the templates are stored. It takes a colon-separated
# list of directories. If this is unset or if a template cannot be found, the
# following paths will be used as a fallback in that order:
#
# ${XDG_CONFIG_HOME:-~/.config}/aerc/templates
# ${XDG_DATA_HOME:-~/.local/share}/aerc/templates
# /usr/local/share/aerc/templates
# /usr/share/aerc/templates
#
#template-dirs=
# The default template to be used for new messages.
#
# default: new_message
#new-message=new_message
# The default template to be used for quoted replies.
#
# default: quoted_reply
#quoted-reply=quoted_reply
# The default template to be used for forward as body.
#
# default: forward_as_body
#forwards=forward_as_body

View File

@ -1,172 +0,0 @@
# Binds are of the form <key sequence> = <command to run>
# To use '=' in a key sequence, substitute it with "Eq": "<Ctrl+Eq>"
# If you wish to bind #, you can wrap the key sequence in quotes: "#" = quit
<C-p> = :menu -adc 'fzy -l 30' :cf -a<Enter>
<tab> = :next-tab<Enter>
? = :help keys<Enter>
<F5> = :check-mail<Enter>
# <C-c> = :prompt 'Quit?' quit<Enter>
# <C-q> = :prompt 'Quit?' quit<Enter>
# <C-z> = :suspend<Enter>
[messages]
q = :q<Enter>
<Backspace> = :q<Enter>
j = :next<Enter>
# <Down> = :next<Enter>
# <C-d> = :next 50%<Enter>
# <C-f> = :next 100%<Enter>
# <PgDn> = :next 100%<Enter>
k = :prev<Enter>
<Up> = :prev<Enter>
# <C-e> = :prev 50%<Enter>
# <C-d> = :prev 100%<Enter>
# <PgUp> = :prev 100%<Enter>
g = :select 0<Enter>
G = :select -1<Enter>
J = :next-folder<Enter>
K = :prev-folder<Enter>
v = :mark -t<Enter>
# <Space> = :mark -t<Enter>:next<Enter>
V = :mark -v<Enter>
<Space> = :read -t<Enter>
T = :toggle-threads<Enter>
# zc = :fold<Enter>
# zo = :unfold<Enter>
# za = :fold -t<Enter>
# zM = :fold -a<Enter>
# zR = :unfold -a<Enter>
# <C-p> = :fold -t<Enter>
<Enter> = :view<Enter>
d = :prompt 'Really delete this message?' 'delete-message'<Enter>
D = :delete<Enter>
a = :archive flat<Enter>
A = :unmark -a<Enter>:mark -T<Enter>:archive flat<Enter>
f = :flag -t<Enter>
c = :compose<Enter>
m = :compose<Enter>
rr = :reply -a<Enter>
rq = :reply -aq<Enter>
Rr = :reply<Enter>
Rq = :reply -q<Enter>
c = :cf<space>
$ = :term<space>
! = :term<space>
| = :pipe<space>
/ = :search -a<space>
\ = :filter -a <space>
n = :next-result<Enter>
N = :prev-result<Enter>
<Esc> = :clear<Enter>
s = :split<Enter>
S = :vsplit<Enter>
pl = :patch list<Enter>
pa = :patch apply <Tab>
pd = :patch drop <Tab>
pb = :patch rebase<Enter>
pt = :patch term<Enter>
ps = :patch switch <Tab>
[messages:folder=Drafts]
<Enter> = :recall<Enter>
[view]
/ = :toggle-key-passthrough<Enter>/
q = :close<Enter>
O = :open<Enter>
o = :open<Enter>
S = :save<space>
| = :pipe<space>
D = :delete<Enter>
A = :archive flat<Enter>
<C-l> = :open-link <space>
f = :flag -t<Enter>
rr = :reply -a<Enter>
rq = :reply -aq<Enter>
Rr = :reply<Enter>
Rq = :reply -q<Enter>
H = :toggle-headers<Enter>
<C-k> = :prev-part<Enter>
<C-Up> = :prev-part<Enter>
<C-j> = :next-part<Enter>
<C-Down> = :next-part<Enter>
J = :next<Enter>
<C-Right> = :next<Enter>
K = :prev<Enter>
<C-Left> = :prev<Enter>
[view::passthrough]
$noinherit = true
$ex = <C-x>
<Esc> = :toggle-key-passthrough<Enter>
[compose]
# Keybindings used when the embedded terminal is not selected in the compose
# view
$noinherit = true
$ex = <C-x>
$complete = <C-o>
<C-k> = :prev-field<Enter>
<C-Up> = :prev-field<Enter>
<C-j> = :next-field<Enter>
<C-Down> = :next-field<Enter>
<A-p> = :switch-account -p<Enter>
<C-Left> = :switch-account -p<Enter>
<A-n> = :switch-account -n<Enter>
<C-Right> = :switch-account -n<Enter>
<tab> = :next-field<Enter>
<backtab> = :prev-field<Enter>
<C-p> = :prev-tab<Enter>
<C-PgUp> = :prev-tab<Enter>
<C-n> = :next-tab<Enter>
<C-PgDn> = :next-tab<Enter>
[compose::editor]
# Keybindings used when the embedded terminal is selected in the compose view
$noinherit = true
$ex = <C-x>
<C-k> = :prev-field<Enter>
<C-Up> = :prev-field<Enter>
<C-j> = :next-field<Enter>
<C-Down> = :next-field<Enter>
<C-p> = :prev-tab<Enter>
<C-PgUp> = :prev-tab<Enter>
<C-n> = :next-tab<Enter>
<C-PgDn> = :next-tab<Enter>
[compose::review]
# Keybindings used when reviewing a message to be sent
y = :send<Enter>
n = :abort<Enter>
v = :preview<Enter>
p = :postpone<Enter>
q = :choose -o d discard abort -o p postpone postpone<Enter>
e = :edit<Enter>
a = :attach<space>
d = :detach<space>
[terminal]
$noinherit = true
$ex = <C-x>
<C-p> = :prev-tab<Enter>
<C-n> = :next-tab<Enter>
<C-PgUp> = :prev-tab<Enter>
<C-PgDn> = :next-tab<Enter>

View File

@ -1 +0,0 @@
Inbox=tag:inbox and not tag:archived and not tag:deleted

View File

@ -1,58 +0,0 @@
*.default=true
*.normal=true
default.fg=#abb2bf
default.bg=#11121D
*.bg=#11121D
error.fg=#f38ba8
warning.fg=#fab387
success.fg=#a6e3a1
tab.fg=#6c7086
tab.bg=#181825
tab.selected.fg=#cdd6f4
tab.selected.bg=#023269
tab.selected.bold=true
part*.selected.bg=#023269
border.fg=#023269
border.bold=true
msglist_unread.bold=true
msglist_unread.fg=#f9e2af
msglist_flagged.fg=#e06c75
msglist_flagged.bold=true
msglist_result.fg=#89b4fa
msglist_result.bold=true
msglist_*.selected.bold=true
msglist_*.selected.bg=#023269
msglist_*.bg=#11121D
dirlist_*.selected.bold=true
dirlist_*.selected.bg=#023269
dirlist_*.bg=#181825
statusline_default.fg=#9399b2
statusline_default.bg=#2C3043
statusline_error.bold=true
statusline_success.bold=true
spinner.bg=#11121D
[viewer]
header.bg=#181825
url.fg=#89b4fa
url.underline=true
header.bold=true
signature.dim=true
diff_meta.bold=true
diff_chunk.fg=#89b4fa
diff_chunk_func.fg=#89b4fa
diff_chunk_func.bold=true
diff_add.fg=#a6e3a1
diff_del.fg=#f38ba8
quote_*.fg=#6c7086
quote_1.fg=#9399b2

View File

@ -1,115 +0,0 @@
[colors.bright]
black = "#555555"
blue = "#00afff"
cyan = "#50cdfe"
green = "#b0e05e"
magenta = "#af87ff"
red = "#f5669c"
white = "#ffffff"
yellow = "#fef26c"
[colors.normal]
black = "#121212"
blue = "#0f7fcf"
cyan = "#42a7cf"
green = "#97e123"
magenta = "#8700ff"
red = "#fa2573"
white = "#bbbbbb"
yellow = "#dfd460"
[colors.primary]
background = "#000010"
foreground = "#F8F8F2"
[font]
size = 15
[font.bold]
family = "Iosevka Term Extended"
style = "Bold"
[font.bold_italic]
family = "Iosevka Term Extended"
style = "Bold Italic"
[font.italic]
family = "Iosevka Term Extended"
style = "Italic"
[font.normal]
family = "Iosevka Term Extended"
style = "Regular"
[[keyboard.bindings]]
action = "ToggleFullscreen"
key = "F11"
[[keyboard.bindings]]
action = "ToggleViMode"
key = "Escape"
mode = "Vi"
[[keyboard.bindings]]
action = "ScrollHalfPageUp"
key = "E"
mode = "Vi"
mods = "Control"
[[keyboard.bindings]]
key = "F"
mods = "Control|Shift"
action = "ReceiveChar"
[[keyboard.bindings]]
chars = "\u001B[72;6u"
key = "H"
mods = "Control|Shift"
[[keyboard.bindings]]
chars = "\u001B[74;6u"
key = "J"
mods = "Control|Shift"
[[keyboard.bindings]]
chars = "\u001B[75;6u"
key = "K"
mods = "Control|Shift"
[[keyboard.bindings]]
chars = "\u001B[76;6u"
key = "L"
mods = "Control|Shift"
[[keyboard.bindings]]
chars = "\u001B[105;5u"
key = "I"
mods = "Control"
[[keyboard.bindings]]
chars = "\u001B[46;5u"
key = "Period"
mods = "Control"
[[keyboard.bindings]]
chars = "\u001B[44;5u"
key = "Comma"
mods = "Control"
[[keyboard.bindings]]
chars = "\u001B[59;5u"
key = "Semicolon"
mods = "Control"
[[keyboard.bindings]]
chars = "\u001B[13;2u"
key = "Return"
mods = "Shift"
[scrolling]
history = 10000
[window]
dynamic_padding = true
dynamic_title = true
opacity = 0.3

@ -1 +0,0 @@
Subproject commit fc2b46896fe9daf1b1b1a6a0af5ae6fcfefa7511

View File

@ -1,109 +0,0 @@
-- Grab environment we need
local ipairs = ipairs
local math = math
--- The gridh layout layoutbox icon.
-- @beautiful beautiful.layout_gridh
-- @param surface
-- @see gears.surface
--- The gridv layout layoutbox icon.
-- @beautiful beautiful.layout_gridv
-- @param surface
-- @see gears.surface
local grid = {}
local function do_grid(p, orientation)
local wa = p.workarea
local cls = p.clients
-- Swap workarea dimensions, if our orientation is "east"
if orientation == 'east' then
wa.width, wa.height = wa.height, wa.width
wa.x, wa.y = wa.y, wa.x
end
if #cls > 0 then
local rows, cols
if #cls == 2 then
rows, cols = 1, 2
else
rows = math.ceil(math.sqrt(#cls))
cols = math.ceil(#cls / rows)
end
local first_col_rows = #cls - rows * (cols - 1)
for k, c in ipairs(cls) do
k = k - 1
local g = {}
local row, col, lrows, lcols
if k < first_col_rows then
row = k
col = 0
lrows = first_col_rows
lcols = cols
else
row = (k - first_col_rows) % rows
col = math.floor((k - first_col_rows) / rows) + 1
lrows = rows
lcols = cols
end
if row == lrows - 1 then
g.height = wa.height - math.ceil(wa.height / lrows) * row
g.y = wa.height - g.height
else
g.height = math.ceil(wa.height / lrows)
g.y = g.height * row
end
if col == lcols - 1 then
g.width = wa.width - math.ceil(wa.width / lcols) * col
g.x = wa.width - g.width
else
g.width = math.ceil(wa.width / lcols)
g.x = g.width * col
end
g.y = g.y + wa.y
g.x = g.x + wa.x
-- Swap window dimensions, if our orientation is "east"
if orientation == 'east' then
g.width, g.height = g.height, g.width
g.x, g.y = g.y, g.x
end
p.geometries[c] = g
end
end
end
-- Horizontal grid layout.
-- @param screen The screen to arrange.
grid.horizontal = {}
grid.horizontal.name = "gridh"
function grid.horizontal.arrange(p)
return do_grid(p, "east")
end
-- Vertical grid layout.
-- @param screen The screen to arrange.
grid.name = "grid"
function grid.arrange(p)
return do_grid(p, "south")
end
--- The grid layout.
-- Try to give all clients the same size.
-- @clientlayout awful.layout.suit.grid
-- @usebeautiful beautiful.layout_gridv
--- The horizontal grid layout.
-- Try to give all clients the same size.
-- @clientlayout awful.layout.suit.grid.horizontal
-- @usebeautiful beautiful.layout_gridh
return grid

View File

@ -1,95 +0,0 @@
local naughty = require("naughty")
local beautiful = require("beautiful")
local gears = require("gears")
local awful = require("awful")
local dpi = beautiful.xresources.apply_dpi
-- ===================================================================
-- Theme Definitions
-- ===================================================================
naughty.config.defaults.ontop = true
naughty.config.defaults.icon_size = dpi(32)
naughty.config.defaults.screen = awful.screen.focused()
naughty.config.defaults.timeout = 3
naughty.config.defaults.title = "System Notification"
naughty.config.defaults.margin = dpi(16)
naughty.config.defaults.border_width = 0
naughty.config.defaults.position = "top_right"
naughty.config.defaults.shape = function(cr, w, h)
gears.shape.rounded_rect(cr, w, h, dpi(6))
end
naughty.config.padding = dpi(7)
naughty.config.spacing = dpi(7)
naughty.config.icon_dirs = {
"/usr/share/icons/Tela-dark",
"/usr/share/pixmaps/"
}
naughty.config.icon_formats = {"png", "svg"}
-- Timeouts
naughty.config.presets.low.timeout = 3
naughty.config.presets.critical.timeout = 0
naughty.config.presets.normal = {
font = beautiful.title_font,
fg = beautiful.fg_normal,
bg = beautiful.bg_normal,
position = "top_right"
}
naughty.config.presets.low = {
font = beautiful.title_font,
fg = beautiful.fg_normal,
bg = beautiful.bg_normal,
position = "top_right"
}
naughty.config.presets.critical = {
font = "SF Display Bold 10",
fg = "#ffffff",
bg = "#ff0000",
position = "top_right",
timeout = 0
}
naughty.config.presets.ok = naughty.config.presets.normal
naughty.config.presets.info = naughty.config.presets.normal
naughty.config.presets.warn = naughty.config.presets.critical
-- ===================================================================
-- Error Handling
-- ===================================================================
if awesome.startup_errors then
naughty.notify({
preset = naughty.config.presets.critical,
title = "Oops, there were errors during startup!",
text = awesome.startup_errors
})
end
do
local in_error = false
awesome.connect_signal(
"debug::error",
function(err)
if in_error then
return
end
in_error = true
naughty.notify({
preset = naughty.config.presets.critical,
title = "Oops, an error happened!",
text = tostring(err)
})
in_error = false
end
)
end

View File

@ -1,26 +0,0 @@
local awful = require("awful")
local lain = require("lain")
local grid = require("components.layout.grid")
local quake = lain.util.quake({app="alacritty", followtag=true, argname = '--class %s', extra="--option=window.opacity=1.0 --option=\"colors.primary.background='#000d2b'\" -e tmux", height=0.3})
-- Import panels
local top_panel = require("components.top-panel")
-- Set up each screen (add tags & panels)
awful.screen.connect_for_each_screen(function(s)
for i = 1, 10, 1
do
awful.tag.add(tostring(i % 10), {
layout = grid,
screen = s,
selected = i == 1
})
end
s.quake = quake
-- Only add the top panel on the primary screen
if s.index == 1 then
top_panel.create(s)
end
end)

View File

@ -1,183 +0,0 @@
-- ===================================================================
-- Initialization
-- ===================================================================
local awful = require("awful")
local beautiful = require("beautiful")
local wibox = require("wibox")
local theme = require("theme")
local lain = require("lain")
local tag_list = require("components.widgets.tag-list")
local layout_box = require("components.widgets.layout-box")
local battery_widget = require("components.widgets.battery-widget.battery")
local volume_widget = require("components.widgets.volume-widget.volume")
local pl = require("utils.powerline")
-- import widgets
local task_list = require("components.widgets.task-list")
-- ===================================================================
-- Custom Widgets
-- ===================================================================
local top_panel = {}
local watch_widget, watch_timer = awful.widget.watch('bash -c "checkupdates | wc -l"', 360)
local updates_indicator = wibox.widget{
{
layout = wibox.layout.fixed.horizontal,
{
{
widget = watch_widget,
},
top = 0, bottom = 2, left = 0, right = 0,
widget = wibox.container.margin
},
{
{
image = "/usr/share/icons/Papirus/48x48/apps/org.kde.archUpdate.svg",
forced_width = 18,
widget = wibox.widget.imagebox,
},
top = 5, bottom = 0, left = 5, right = 0,
widget = wibox.container.margin
}
},
widget = wibox.container.background
}
local frequency_widget = wibox.widget {
layout = wibox.layout.fixed.horizontal,
awful.widget.watch('bash -c "/usr/bin/cat /proc/cpuinfo | grep MHz | cut -b 12- | sort -r | head -n 1 | xargs printf \'%f / 1000\n\' | bc -l | awk \'{printf \\"%.2f\\n\\", $0}\'"', 1),
wibox.widget.textbox('GHz')
}
local memory_widget = wibox.widget{
layout = wibox.layout.fixed.horizontal,
lain.widget.mem({
settings = function()
widget:set_markup(lain.util.markup.font(theme.font, mem_now.used .. " MB"))
end,
}),
}
local cpu_widget = wibox.widget{
layout = wibox.layout.fixed.horizontal,
lain.widget.cpu({
settings = function()
widget:set_markup(lain.util.markup.font(theme.font, "CPU: " .. cpu_now.usage .. "%"))
end,
})
}
local clock = wibox.widget.textclock('%a %b %d, %H:%M:%S', 1)
local tag_lists = {}
local current_tag_list = wibox.widget {
layout = wibox.layout.fixed.horizontal
}
local layout_boxes = {}
local current_layout_box = wibox.widget {
layout = wibox.layout.fixed.horizontal
}
local governor_selector, governor_timer = awful.widget.watch('bash -c "cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor"', 5)
-- ===================================================================
-- Bar Creation
-- ===================================================================
top_panel.create = function(s)
local panel = awful.wibar({
screen = s,
position = "top",
ontop = true,
height = beautiful.top_panel_height,
width = s.geometry.width,
bg = "#12151cbb"
})
for t in screen do
tag_lists[t] = tag_list.create(t)
layout_boxes[t] = layout_box.create(t)
end
current_tag_list:add(tag_lists[s])
current_layout_box:add(layout_boxes[s])
panel:setup {
expand = "none",
layout = wibox.layout.align.horizontal,
task_list.create(s),
current_tag_list,
{
layout = wibox.layout.fixed.horizontal,
pl(wibox.widget{}, theme.bg_normal .. "00", theme.top_panel_powerline),
pl(wibox.container.margin(wibox.widget.systray(), 0, 0, 5, 5), theme.top_panel_powerline, theme.bg_normal),
pl(volume_widget({widget_type='icon_and_text'}), theme.bg_normal, theme.top_panel_powerline),
pl(awful.widget.watch('bash -c "sensors | grep Tctl | cut -f 10 -d \' \' | cut -c 2-"', 5), theme.top_panel_powerline, theme.bg_normal),
pl(memory_widget, theme.bg_normal, theme.top_panel_powerline),
pl(cpu_widget, theme.top_panel_powerline, theme.bg_normal),
pl(frequency_widget, theme.bg_normal, theme.top_panel_powerline),
pl(updates_indicator, theme.top_panel_powerline, theme.bg_normal),
pl(current_layout_box, theme.bg_normal, theme.top_panel_powerline),
pl(clock, theme.top_panel_powerline, theme.top_panel_powerline),
}
}
-- ===================================================================
-- Functionality
-- ===================================================================
-- hide panel when client is fullscreen
local function change_panel_visibility(client)
if client.screen == s then
panel.ontop = not client.fullscreen
end
end
-- connect panel visibility function to relevant signals
client.connect_signal("property::fullscreen", change_panel_visibility)
client.connect_signal("focus", change_panel_visibility)
client.connect_signal("focus", function (c, _)
current_tag_list:reset(current_tag_list)
current_tag_list:add(tag_lists[c.screen])
current_layout_box:reset(current_layout_box)
current_layout_box:add(layout_boxes[c.screen])
end)
-- connect panel visibility function to relevant signals
updates_indicator:connect_signal("button::press", function(_, _, _, _)
local update_command = 'WINIT_X11_SCALE_FACTOR=1 alacritty -e bash -c "yay ; echo \'\nDone, press any key to exit...\' ; read"'
awful.spawn.easy_async_with_shell(update_command, function(_)
watch_timer:emit_signal("timeout")
end)
end)
clock:connect_signal("button::press", function(_, _, _, _)
awful.spawn('gnome-calendar')
end)
governor_selector:connect_signal("button::press", function(c, _, _, button)
awful.spawn.easy_async_with_shell('bash -c "cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor"', function(output)
output = output:gsub("%s+", "")
if output == 'powersave' then
awful.spawn.easy_async('sudo /opt/power/performance.sh', function(_)
governor_selector:emit_signal("timeout")
end)
else
awful.spawn.easy_async('sudo /opt/power/powersave.sh', function(_)
governor_timer:emit_signal("timeout")
end)
end
end)
end)
end
return top_panel

View File

@ -1,75 +0,0 @@
# Battery widget
Simple and easy-to-install widget for Awesome Window Manager.
This widget consists of:
- an icon which shows the battery level:
![Battery Widget](./bat-wid-1.png)
- a pop-up window, which shows up when you hover over an icon:
![Battery Widget](./bat-wid-2.png)
Alternatively you can use a tooltip (check the code):
![Battery Widget](./bat-wid-22.png)
- a pop-up warning message which appears on bottom right corner when battery level is less that 15% (you can get the image [here](https://vk.com/images/stickers/1933/512.png)):
![Battery Widget](./bat-wid-3.png)
Note that widget uses the Arc icon theme, so it should be [installed](https://github.com/horst3180/arc-icon-theme#installation) first under **/usr/share/icons/Arc/** folder.
## Customization
It is possible to customize widget by providing a table with all or some of the following config parameters:
| Name | Default | Description |
|---|---|---|
| `font` | Play 8 | Fond |
| `path_to_icons` | `/usr/share/icons/Arc/status/symbolic/` | Path to the folder with icons* |
| `show_current_level`| false | Show current charge level |
| `margin_right`|0| The right margin of the widget|
| `margin_left`|0| The left margin of the widget|
| `display_notification` | `false` | Display a notification on mouseover |
| `notification_position` | `top_right` | The notification position |
| `timeout` | 10 | How often in seconds the widget refreshes |
| `warning_msg_title` | _Huston, we have a problem_ | Title of the warning popup |
| `warning_msg_text` | _Battery is dying_ | Text of the warning popup |
| `warning_msg_position` | `bottom_right` | Position of the warning popup |
| `warning_msg_icon` | ~/.config/awesome/awesome-wm-widgets/battery-widget/spaceman.jpg | Icon of the warning popup |
| `enable_battery_warning` | `true` | Display low battery warning |
*Note: the widget expects following icons to be present in the folder:
- battery-caution-charging-symbolic.svg
- battery-empty-charging-symbolic.svg
- battery-full-charged-symbolic.svg
- battery-full-symbolic.svg
- battery-good-symbolic.svg
- battery-low-symbolic.svg
- battery-caution-symbolic.svg
- battery-empty-symbolic.svg
- battery-full-charging-symbolic.svg
- battery-good-charging-symbolic.svg
- battery-low-charging-symbolic.svg
- battery-missing-symbolic.svg
## Installation
This widget reads the output of acpi tool.
- install `acpi` and check the output:
```bash
$ sudo apt-get install acpi
$ acpi
Battery 0: Discharging, 66%, 02:34:06 remaining
```
```lua
local battery_widget = require("awesome-wm-widgets.battery-widget.battery")
...
s.mytasklist, -- Middle widget
{ -- Right widgets
layout = wibox.layout.fixed.horizontal,
...
battery_widget(),
...
```

Binary file not shown.

Before

Width:  |  Height:  |  Size: 700 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

View File

@ -1,209 +0,0 @@
-------------------------------------------------
-- Battery Widget for Awesome Window Manager
-- Shows the battery status using the ACPI tool
-- More details could be found here:
-- https://github.com/streetturtle/awesome-wm-widgets/tree/master/battery-widget
-- @author Pavel Makhov
-- @copyright 2017 Pavel Makhov
-------------------------------------------------
local awful = require("awful")
local naughty = require("naughty")
local watch = require("awful.widget.watch")
local wibox = require("wibox")
local gfs = require("gears.filesystem")
local dpi = require('beautiful').xresources.apply_dpi
-- acpi sample outputs
-- Battery 0: Discharging, 75%, 01:51:38 remaining
-- Battery 0: Charging, 53%, 00:57:43 until charged
local HOME = os.getenv("HOME")
local WIDGET_DIR = HOME .. '/.config/awesome/awesome-wm-widgets/battery-widget'
local battery_widget = {}
local function worker(user_args)
local args = user_args or {}
local font = args.font or 'Play 8'
local path_to_icons = args.path_to_icons or "/usr/share/icons/Arc/status/symbolic/"
local show_current_level = args.show_current_level or false
local margin_left = args.margin_left or 0
local margin_right = args.margin_right or 0
local display_notification = args.display_notification or false
local display_notification_onClick = args.display_notification_onClick or true
local position = args.notification_position or "top_right"
local timeout = args.timeout or 10
local warning_msg_title = args.warning_msg_title or 'Huston, we have a problem'
local warning_msg_text = args.warning_msg_text or 'Battery is dying'
local warning_msg_position = args.warning_msg_position or 'bottom_right'
local warning_msg_icon = args.warning_msg_icon or WIDGET_DIR .. '/spaceman.jpg'
local enable_battery_warning = args.enable_battery_warning
if enable_battery_warning == nil then
enable_battery_warning = true
end
if not gfs.dir_readable(path_to_icons) then
naughty.notify{
title = "Battery Widget",
text = "Folder with icons doesn't exist: " .. path_to_icons,
preset = naughty.config.presets.critical
}
end
local icon_widget = wibox.widget {
{
id = "icon",
widget = wibox.widget.imagebox,
resize = false
},
valign = 'center',
layout = wibox.container.place,
}
local level_widget = wibox.widget {
font = font,
widget = wibox.widget.textbox
}
battery_widget = wibox.widget {
icon_widget,
level_widget,
layout = wibox.layout.fixed.horizontal,
}
-- Popup with battery info
-- One way of creating a pop-up notification - naughty.notify
local notification
local function show_battery_status(batteryType)
awful.spawn.easy_async([[bash -c 'acpi']],
function(stdout, _, _, _)
naughty.destroy(notification)
notification = naughty.notify{
text = stdout,
title = "Battery status",
icon = path_to_icons .. batteryType .. ".svg",
icon_size = dpi(16),
position = position,
timeout = 5, hover_timeout = 0.5,
width = 200,
screen = mouse.screen
}
end
)
end
-- Alternative to naughty.notify - tooltip. You can compare both and choose the preferred one
--battery_popup = awful.tooltip({objects = {battery_widget}})
-- To use colors from beautiful theme put
-- following lines in rc.lua before require("battery"):
-- beautiful.tooltip_fg = beautiful.fg_normal
-- beautiful.tooltip_bg = beautiful.bg_normal
local function show_battery_warning()
naughty.notify {
icon = warning_msg_icon,
icon_size = 100,
text = warning_msg_text,
title = warning_msg_title,
timeout = 25, -- show the warning for a longer time
hover_timeout = 0.5,
position = warning_msg_position,
bg = "#F06060",
fg = "#EEE9EF",
width = 300,
screen = mouse.screen
}
end
local last_battery_check = os.time()
local batteryType = "battery-good-symbolic"
watch("acpi -i", timeout,
function(widget, stdout)
local battery_info = {}
local capacities = {}
for s in stdout:gmatch("[^\r\n]+") do
-- Match a line with status and charge level
local status, charge_str, _ = string.match(s, '.+: ([%a%s]+), (%d?%d?%d)%%,?(.*)')
if status ~= nil then
-- Enforce that for each entry in battery_info there is an
-- entry in capacities of zero. If a battery has status
-- "Unknown" then there is no capacity reported and we treat it
-- as zero capactiy for later calculations.
table.insert(battery_info, {status = status, charge = tonumber(charge_str)})
table.insert(capacities, 0)
end
-- Match a line where capacity is reported
local cap_str = string.match(s, '.+:.+last full capacity (%d+)')
if cap_str ~= nil then
capacities[#capacities] = tonumber(cap_str) or 0
end
end
local capacity = 0
local charge = 0
local status
for i, batt in ipairs(battery_info) do
if capacities[i] ~= nil then
if batt.charge >= charge then
status = batt.status -- use most charged battery status
-- this is arbitrary, and maybe another metric should be used
end
-- Adds up total (capacity-weighted) charge and total capacity.
-- It effectively ignores batteries with status "Unknown" as we
-- treat them with capacity zero.
charge = charge + batt.charge * capacities[i]
capacity = capacity + capacities[i]
end
end
charge = charge / capacity
if show_current_level then
level_widget.text = string.format('%d%%', charge)
end
if (charge >= 1 and charge < 15) then
batteryType = "battery-empty%s-symbolic"
if enable_battery_warning and status ~= 'Charging' and os.difftime(os.time(), last_battery_check) > 300 then
-- if 5 minutes have elapsed since the last warning
last_battery_check = os.time()
show_battery_warning()
end
elseif (charge >= 15 and charge < 40) then batteryType = "battery-caution%s-symbolic"
elseif (charge >= 40 and charge < 60) then batteryType = "battery-low%s-symbolic"
elseif (charge >= 60 and charge < 80) then batteryType = "battery-good%s-symbolic"
elseif (charge >= 80 and charge <= 100) then batteryType = "battery-full%s-symbolic"
end
if status == 'Charging' then
batteryType = string.format(batteryType, '-charging')
else
batteryType = string.format(batteryType, '')
end
widget.icon:set_image(path_to_icons .. batteryType .. ".svg")
-- Update popup text
-- battery_popup.text = string.gsub(stdout, "\n$", "")
end,
icon_widget)
if display_notification then
battery_widget:connect_signal("mouse::enter", function() show_battery_status(batteryType) end)
battery_widget:connect_signal("mouse::leave", function() naughty.destroy(notification) end)
elseif display_notification_onClick then
battery_widget:connect_signal("button::press", function(_,_,_,button)
if (button == 3) then show_battery_status(batteryType) end
end)
battery_widget:connect_signal("mouse::leave", function() naughty.destroy(notification) end)
end
return wibox.container.margin(battery_widget, margin_left, margin_right)
end
return setmetatable(battery_widget, { __call = function(_, ...) return worker(...) end })

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

View File

@ -1,43 +0,0 @@
local awful = require('awful')
-- ===================================================================
-- Widget Creation
-- ===================================================================
-- Create an imagebox widget which will contains an icon indicating which layout we're using.
-- We need one layoutbox per screen.
local layout_box = {}
layout_box.create = function(s)
local box = awful.widget.layoutbox(s)
box:buttons(
awful.util.table.join(
awful.button({}, 1,
function()
awful.layout.inc(1)
end
),
awful.button({}, 3,
function()
awful.layout.inc(-1)
end
),
awful.button({}, 4,
function()
awful.layout.inc(1)
end
),
awful.button({}, 5,
function()
awful.layout.inc(-1)
end
)
)
)
return box
end
return layout_box

View File

@ -1,65 +0,0 @@
local awful = require("awful")
local wibox = require("wibox")
local theme = require("theme")
local tag_list = {}
tag_list.create = function(s)
local filter = function(tag)
local count = 0
for _, t in ipairs(s.tags) do
if #t:clients() > 0 or t.selected then
count = count + 1
end
end
return (#tag:clients() > 0 and count > 1) or (tag.selected and #tag:clients() == 0 and count > 1)
end
local taglist_buttons = awful.util.table.join(
awful.button({}, 1,
function(c)
c.selected = true
for _, tag in ipairs(s.tags) do
if tag.index ~= c.index then
tag.selected = false
end
end
end
)
)
return awful.widget.taglist {
screen = s,
-- filter = awful.widget.taglist.filter.noempty,
filter = filter,
widget_template = {
{
{
id = 'index_role',
widget = wibox.widget.textbox,
},
left = 10,
right = 10,
widget = wibox.container.margin
},
id = 'background_role',
widget = wibox.container.background,
create_callback = function(self, c3, _, _)
self:get_children_by_id('index_role')[1].markup = '<b> '..c3.name..' </b>'
self:connect_signal('mouse::enter', function()
if self.bg ~= theme.top_panel_powerline then
self.backup = self.bg
self.has_backup = true
end
self.bg = theme.top_panel_powerline
end)
self:connect_signal('mouse::leave', function()
if self.has_backup and not c3.selected then self.bg = self.backup end
end)
end,
},
buttons = taglist_buttons,
}
end
return tag_list

View File

@ -1,224 +0,0 @@
-- ████████╗ █████╗ ███████╗██╗ ██╗ ██╗ ██╗███████╗████████╗
-- ╚══██╔══╝██╔══██╗██╔════╝██║ ██╔╝ ██║ ██║██╔════╝╚══██╔══╝
-- ██║ ███████║███████╗█████╔╝ ██║ ██║███████╗ ██║
-- ██║ ██╔══██║╚════██║██╔═██╗ ██║ ██║╚════██║ ██║
-- ██║ ██║ ██║███████║██║ ██╗ ███████╗██║███████║ ██║
-- ╚═╝ ╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ ╚══════╝╚═╝╚══════╝ ╚═╝
-- ===================================================================
-- Initialization
-- ===================================================================
local awful = require('awful')
local wibox = require('wibox')
local gears = require('gears')
local pl = require("utils.powerline")
local theme = require("theme")
local dpi = require('beautiful').xresources.apply_dpi
local capi = {button = button}
local ICON_DIR = gears.filesystem.get_configuration_dir() .. "/images/"
-- define module table
local task_list = {}
-- ===================================================================
-- Functionality
-- ===================================================================
local function create_buttons(buttons, object)
if buttons then
local btns = {}
for _, b in ipairs(buttons) do
-- Create a proxy button object: it will receive the real
-- press and release events, and will propagate them to the
-- button object the user provided, but with the object as
-- argument.
local btn = capi.button {modifiers = b.modifiers, button = b.button}
btn:connect_signal('press',
function()
object.minimized = false
object:raise()
end
)
btns[#btns + 1] = btn
end
return btns
end
end
local function list_update(w, buttons, label, _, objects)
-- update the widgets, creating them if needed
w:reset()
local index = 0
local count = 0
for _ in pairs(objects) do
count = count + 1
end
local static_length = 16 * count
local total_text_length = 0
for _, o in ipairs(objects) do
if o.name then
total_text_length = total_text_length + o.name:len()
end
end
local truncate = (total_text_length + static_length) > 170
for i, o in ipairs(objects) do
index = index + 1
local ib, cb, tb, cbm, bgb, tbm, ibm, tt, l, ll
ib = wibox.widget.imagebox()
tb = wibox.widget.textbox()
cb = wibox.container.margin(wibox.widget.imagebox(ICON_DIR .. "close.svg"), dpi(9), dpi(0), dpi(9), dpi(9))
cb.shape = gears.shape.circle
cbm = wibox.container.margin(cb, dpi(0), dpi(0), dpi(0), dpi(0)) -- 4, 8 ,12 ,12 -- close button
cbm:buttons(gears.table.join(awful.button({}, 1, nil,
function()
o.kill(o)
end
)))
bgb = wibox.container.background()
tbm = wibox.container.margin(tb, dpi(4), dpi(4))
ibm = wibox.container.margin(ib, dpi(5), dpi(5), dpi(5), dpi(5)) -- 12 is default top and bottom margin --app icon
l = wibox.layout.fixed.horizontal()
ll = wibox.layout.fixed.horizontal()
-- All of this is added in a fixed widget
l:fill_space(true)
l:add(ibm)
l:add(tbm)
ll:add(l)
ll:add(cbm)
if (index % 2 == 0) then
local end_color = (count == index or objects[index+1].minimized) and "" or theme.top_panel_powerline
local main_color = o.minimized and "" or theme.bg_normal
bgb:set_widget(pl(ll, main_color, end_color, true))
else
local end_color = (count == index or objects[index+1].minimized) and "" or theme.bg_normal
local main_color = o.minimized and "" or theme.top_panel_powerline
bgb:set_widget(pl(ll, main_color, end_color, true))
end
l:buttons(create_buttons(buttons, o))
-- Tooltip to display whole title, if it was truncated
tt = awful.tooltip({
objects = {tb},
mode = 'outside',
align = 'bottom',
delay_show = 1,
})
local text, _, bg_image, icon, args = label(o, tb)
args = args or {}
-- The text might be invalid, so use pcall.
if text == nil or text == '' then
tbm:set_margins(0)
else
-- truncate when title is too long
local text_only = text:match('>(.*)<')
local max_length = math.floor((155 - static_length) / count)
if (truncate and text_only:len() > max_length) then
text = text:gsub('>(.*)<', '>' .. string.sub(text_only, 1, max_length) .. '...<')
tt:set_text(text)
tt:add_to_object(tb)
else
tt:remove_from_object(tb)
end
if not tb:set_markup_silently(text) then
tb:set_markup('<i>&lt;Invalid text&gt;</i>')
end
end
-- bgb:set_bg(bg)
if type(bg_image) == 'function' then
-- TODO: Why does this pass nil as an argument?
bg_image = bg_image(tb, o, nil, objects, i)
end
-- bgb:set_bgimage(bg_image)
if icon then
ib.image = icon
else
ibm:set_margins(0)
end
w:add(bgb)
end
end
-- ===================================================================
-- Widget Creation
-- ===================================================================
local tasklist_buttons = awful.util.table.join(
awful.button({}, 1,
function(c)
if c == client.focus then
c.minimized = true
else
-- Without this, the following
-- :isvisible() makes no sense
c.minimized = false
if not c:isvisible() and c.first_tag then
c.first_tag:view_only()
end
-- This will also un-minimize
-- the client, if needed
client.focus = c
c:raise()
end
end
),
awful.button({}, 2,
function(c)
c.kill(c)
end
),
awful.button({}, 4,
function()
awful.client.focus.byidx(1)
end
),
awful.button({}, 5,
function()
awful.client.focus.byidx(-1)
end
)
)
local filter = function(c, _)
local tags = c.screen.tags
for _, t in ipairs(tags) do
if t.selected then
local ctags = c:tags()
for _, v in ipairs(ctags) do
if v == t and c.screen == client.focus.screen then
return true
end
end
end
end
return false
end
task_list.create = function(s)
return awful.widget.tasklist(
s,
filter,
tasklist_buttons,
{},
list_update,
wibox.layout.fixed.horizontal()
)
end
return task_list

View File

@ -1,119 +0,0 @@
# Volume widget
Volume widget based on [amixer](https://linux.die.net/man/1/amixer) (is used for controlling the audio volume) and [pacmd](https://linux.die.net/man/1/pacmd) (is used for selecting a sink/source). Also, the widget provides an easy way to customize how it looks, following types are supported out-of-the-box:
![types](screenshots/variations.png)
From left to right: `horizontal_bar`, `vertical_bar`, `icon`, `icon_and_text`, `arc`
A right-click on the widget opens a popup where you can choose a sink/source:
![sink-sources](screenshots/volume-sink-sources.png)
Left click toggles mute and middle click opens a mixer ([pavucontrol](https://freedesktop.org/software/pulseaudio/pavucontrol/) by default).
### Features
- switch between sinks/sources by right click on the widget;
- more responsive than previous versions of volume widget, which were refreshed once a second;
- 5 predefined customizable looks;
## Installation
Clone the repo under **~/.config/awesome/** and add widget in **rc.lua**:
```lua
local volume_widget = require('awesome-wm-widgets.volume-widget.volume')
...
s.mytasklist, -- Middle widget
{ -- Right widgets
layout = wibox.layout.fixed.horizontal,
...
-- default
volume_widget(),
-- customized
volume_widget{
widget_type = 'arc'
},
```
Note that widget uses following command the get the current volume: `amixer -D pulse sget Master`, so please make sure that it works for you, otherwise you need to set parameter `device = 'default'`.
### Shortcuts
To improve responsiveness of the widget when volume level is changed by a shortcut use corresponding methods of the widget:
```lua
awful.key({ modkey }, "]", function() volume_widget:inc(5) end),
awful.key({ modkey }, "[", function() volume_widget:dec(5) end),
awful.key({ modkey }, "\\", function() volume_widget:toggle() end),
```
## Customization
It is possible to customize the widget by providing a table with all or some of the following config parameters:
### Generic parameter
| Name | Default | Description |
|---|---|---|
| `mixer_cmd` | `pavucontrol` | command to run on middle click (e.g. a mixer program) |
| `step` | `5` | How much the volume is raised or lowered at once (in %) |
| `widget_type`| `icon_and_text`| Widget type, one of `horizontal_bar`, `vertical_bar`, `icon`, `icon_and_text`, `arc` |
| `device` | `pulse` | Select the device name to control |
Depends on the chosen widget type add parameters from the corresponding section below:
#### `icon` parameters
| Name | Default | Description |
|---|---|---|
| `icon_dir`| `./icons`| Path to the folder with icons |
_Note:_ if you are changing icons, the folder should contain following .svg images:
- audio-volume-high-symbolic
- audio-volume-medium-symbolic
- audio-volume-low-symbolic
- audio-volume-muted-symbolic
#### `icon_and_text` parameters
| Name | Default | Description |
|---|---|---|
| `icon_dir`| `./icons`| Path to the folder with icons |
| `font` | `beautiful.font` | Font name and size, like `Play 12` |
#### `arc` parameters
| Name | Default | Description |
|---|---|---|
| `thickness` | 2 | Thickness of the arc |
| `main_color` | `beautiful.fg_color` | Color of the arc |
| `bg_color` | `#ffffff11` | Color of the arc's background |
| `mute_color` | `beautiful.fg_urgent` | Color of the arc when mute |
| `size` | 18 | Size of the widget |
#### `horizontal_bar` parameters
| Name | Default | Description |
|---|---|---|
| `main_color` | `beautiful.fg_normal` | Color of the bar |
| `mute_color` | `beautiful.fg_urgent` | Color of the bar when mute |
| `bg_color` | `'#ffffff11'` | Color of the bar's background |
| `width` | `50` | The bar width |
| `margins` | `10` | Top and bottom margins (if your wibar is 22 px high, bar will be 2 px = 22 - 2*10) |
| `shape` | `'bar'` | [gears.shape](https://awesomewm.org/doc/api/libraries/gears.shape.html), could be `octogon`, `hexagon`, `powerline`, etc |
| `with_icon` | `true` | Show volume icon|
_Note:_ I didn't figure out how does the `forced_height` property of progressbar widget work (maybe it doesn't work at all), thus there is a workaround with margins.
#### `vertical_bar` parameters
| Name | Default | Description |
|---|---|---|
| `main_color` | `beautiful.fg_normal` | Color of the bar |
| `mute_color` | `beautiful.fg_urgent` | Color of the bar when mute |
| `bg_color` | `'#ffffff11'` | Color of the bar's background |
| `width` | `10` | The bar width |
| `margins` | `20` | Top and bottom margins (if your wibar is 22 px high, bar will be 2 px = 22 - 2*10) |
| `shape` | `'bar'` | [gears.shape](https://awesomewm.org/doc/api/libraries/gears.shape.html), could be `octogon`, `hexagon`, `powerline`, etc |
| `with_icon` | `true` | Show volume icon|

View File

@ -1,88 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="16"
viewBox="0 0 16 16"
height="16"
id="svg2"
version="1.1"
inkscape:version="0.91 r"
sodipodi:docname="audio-volume-high-symbolic.svg">
<metadata
id="metadata30">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1215"
inkscape:window-height="776"
id="namedview28"
showgrid="true"
inkscape:zoom="38.125"
inkscape:cx="8"
inkscape:cy="8"
inkscape:window-x="65"
inkscape:window-y="24"
inkscape:window-maximized="1"
inkscape:current-layer="svg2"
showguides="true"
inkscape:snap-intersection-paths="false"
inkscape:object-paths="false">
<inkscape:grid
type="xygrid"
id="grid4158" />
</sodipodi:namedview>
<defs
id="defs4" />
<path
d="M 6,2 2,6 2,10 6,14 6,9 7,8 6,7 Z"
id="path18"
inkscape:connector-curvature="0"
style="fill:#bebebe"
sodipodi:nodetypes="cccccccc" />
<path
d="M 1.300003,5 C 0.216589,5 0,6.163269 0,7.4 L 0,8.6 C 0,9.836747 0.24312,11 1.300003,11 L 3,11 3,5 Z"
id="path20"
inkscape:connector-curvature="0"
style="fill:#bebebe"
sodipodi:nodetypes="ssssccs" />
<path
style="opacity:1;fill:#bebebe;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 13.140638,1 11.726417,2.413582 C 12.808349,3.4955144 13.990412,5.4467621 14,8 c 0,2.551493 -1.192916,4.505751 -2.273583,5.586418 L 13.140638,15 C 14.595711,13.544927 16.019176,11 16,8 16.035061,5 14.595117,2.4544787 13.140638,1 Z"
id="path4508"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccccc" />
<path
style="opacity:1;fill:#bebebe;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 11,3.1156678 9.5897193,4.5261118 C 10.372347,5.3087395 11,6.5690611 11,8 11,9.4309388 10.372767,10.690952 9.5897193,11.474 L 11,12.884 C 12.275645,11.608355 13,9.854095 13,8 13,6.1543677 12.273068,4.3887355 11,3.1156678 Z"
id="path4529"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccccc" />
<path
style="opacity:1;fill:#bebebe;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 8.629,5 7.2094668,6.4096296 C 8,7.05621 8,7.805653 8,8 8,8.1932576 7.982199,8.9408674 7.209,9.59 L 8.6289063,11 C 9.8466375,9.952694 10,8.5984701 10,8 10,7.400497 9.854476,6.062891 8.629,5 Z"
id="path4569"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccscccc" />
</svg>

Before

Width:  |  Height:  |  Size: 3.4 KiB

View File

@ -1,88 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="16"
viewBox="0 0 16 16"
height="16"
id="svg2"
version="1.1"
inkscape:version="0.91 r"
sodipodi:docname="audio-volume-low-symbolic.svg">
<metadata
id="metadata30">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1215"
inkscape:window-height="776"
id="namedview28"
showgrid="true"
inkscape:zoom="38.125"
inkscape:cx="8"
inkscape:cy="8"
inkscape:window-x="65"
inkscape:window-y="24"
inkscape:window-maximized="1"
inkscape:current-layer="svg2"
showguides="true"
inkscape:snap-intersection-paths="false"
inkscape:object-paths="false">
<inkscape:grid
type="xygrid"
id="grid4158" />
</sodipodi:namedview>
<defs
id="defs4" />
<path
d="M 6,2 2,6 2,10 6,14 6,9 7,8 6,7 Z"
id="path18"
inkscape:connector-curvature="0"
style="fill:#bebebe"
sodipodi:nodetypes="cccccccc" />
<path
d="M 1.300003,5 C 0.216589,5 0,6.163269 0,7.4 L 0,8.6 C 0,9.836747 0.24312,11 1.300003,11 L 3,11 3,5 Z"
id="path20"
inkscape:connector-curvature="0"
style="fill:#bebebe"
sodipodi:nodetypes="ssssccs" />
<path
style="opacity:0.3;fill:#bebebe;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 13.140638,1 11.726417,2.413582 C 12.808349,3.4955144 13.990412,5.4467621 14,8 c 0,2.551493 -1.192916,4.505751 -2.273583,5.586418 L 13.140638,15 C 14.595711,13.544927 16.019176,11 16,8 16.035061,5 14.595117,2.4544787 13.140638,1 Z"
id="path4508"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccccc" />
<path
style="opacity:0.3;fill:#bebebe;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 11,3.1156678 9.5897193,4.5261118 C 10.372347,5.3087395 11,6.5690611 11,8 11,9.4309388 10.372767,10.690952 9.5897193,11.474 L 11,12.884 C 12.275645,11.608355 13,9.854095 13,8 13,6.1543677 12.273068,4.3887355 11,3.1156678 Z"
id="path4529"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccccc" />
<path
style="opacity:1;fill:#bebebe;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 8.629,5 7.2094668,6.4096296 C 8,7.05621 8,7.805653 8,8 8,8.1932576 7.982199,8.9408674 7.209,9.59 L 8.6289063,11 C 9.8466375,9.952694 10,8.5984701 10,8 10,7.400497 9.854476,6.062891 8.629,5 Z"
id="path4569"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccscccc" />
</svg>

Before

Width:  |  Height:  |  Size: 3.4 KiB

View File

@ -1,88 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="16"
viewBox="0 0 16 16"
height="16"
id="svg2"
version="1.1"
inkscape:version="0.91 r"
sodipodi:docname="audio-volume-medium-symbolic.svg">
<metadata
id="metadata30">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1215"
inkscape:window-height="776"
id="namedview28"
showgrid="true"
inkscape:zoom="38.125"
inkscape:cx="8"
inkscape:cy="8"
inkscape:window-x="65"
inkscape:window-y="24"
inkscape:window-maximized="1"
inkscape:current-layer="svg2"
showguides="true"
inkscape:snap-intersection-paths="false"
inkscape:object-paths="false">
<inkscape:grid
type="xygrid"
id="grid4158" />
</sodipodi:namedview>
<defs
id="defs4" />
<path
d="M 6,2 2,6 2,10 6,14 6,9 7,8 6,7 Z"
id="path18"
inkscape:connector-curvature="0"
style="fill:#bebebe"
sodipodi:nodetypes="cccccccc" />
<path
d="M 1.300003,5 C 0.216589,5 0,6.163269 0,7.4 L 0,8.6 C 0,9.836747 0.24312,11 1.300003,11 L 3,11 3,5 Z"
id="path20"
inkscape:connector-curvature="0"
style="fill:#bebebe"
sodipodi:nodetypes="ssssccs" />
<path
style="opacity:0.3;fill:#bebebe;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 13.140638,1 11.726417,2.413582 C 12.808349,3.4955144 13.990412,5.4467621 14,8 c 0,2.551493 -1.192916,4.505751 -2.273583,5.586418 L 13.140638,15 C 14.595711,13.544927 16.019176,11 16,8 16.035061,5 14.595117,2.4544787 13.140638,1 Z"
id="path4508"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccccc" />
<path
style="opacity:1;fill:#bebebe;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 11,3.1156678 9.5897193,4.5261118 C 10.372347,5.3087395 11,6.5690611 11,8 11,9.4309388 10.372767,10.690952 9.5897193,11.474 L 11,12.884 C 12.275645,11.608355 13,9.854095 13,8 13,6.1543677 12.273068,4.3887355 11,3.1156678 Z"
id="path4529"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccccc" />
<path
style="opacity:1;fill:#bebebe;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 8.629,5 7.2094668,6.4096296 C 8,7.05621 8,7.805653 8,8 8,8.1932576 7.982199,8.9408674 7.209,9.59 L 8.6289063,11 C 9.8466375,9.952694 10,8.5984701 10,8 10,7.400497 9.854476,6.062891 8.629,5 Z"
id="path4569"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccscccc" />
</svg>

Before

Width:  |  Height:  |  Size: 3.4 KiB

View File

@ -1,88 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="16"
viewBox="0 0 16 16"
height="16"
id="svg2"
version="1.1"
inkscape:version="0.91 r13725"
sodipodi:docname="audio-volume-muted-symbolic.svg">
<metadata
id="metadata30">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1215"
inkscape:window-height="776"
id="namedview28"
showgrid="true"
inkscape:zoom="38.125"
inkscape:cx="3.4229508"
inkscape:cy="7.947541"
inkscape:window-x="65"
inkscape:window-y="24"
inkscape:window-maximized="1"
inkscape:current-layer="svg2"
showguides="true"
inkscape:snap-intersection-paths="false"
inkscape:object-paths="false">
<inkscape:grid
type="xygrid"
id="grid4158" />
</sodipodi:namedview>
<defs
id="defs4" />
<path
d="M 6,2 2,6 2,10 6,14 6,9 7,8 6,7 Z"
id="path18"
inkscape:connector-curvature="0"
style="fill:#bebebe"
sodipodi:nodetypes="cccccccc" />
<path
d="M 1.300003,5 C 0.216589,5 0,6.163269 0,7.4 L 0,8.6 C 0,9.836747 0.24312,11 1.300003,11 L 3,11 3,5 Z"
id="path20"
inkscape:connector-curvature="0"
style="fill:#bebebe"
sodipodi:nodetypes="ssssccs" />
<path
style="opacity:0.3;fill:#bebebe;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 13.140638,1 11.726417,2.413582 C 12.808349,3.4955144 13.990412,5.4467621 14,8 c 0,2.551493 -1.192916,4.505751 -2.273583,5.586418 L 13.140638,15 C 14.595711,13.544927 16.019176,11 16,8 16.035061,5 14.595117,2.4544787 13.140638,1 Z"
id="path4508"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccccc" />
<path
style="opacity:0.3;fill:#bebebe;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 11,3.1156678 9.5897193,4.5261118 C 10.372347,5.3087395 11,6.5690611 11,8 11,9.4309388 10.372767,10.690952 9.5897193,11.474 L 11,12.884 C 12.275645,11.608355 13,9.854095 13,8 13,6.1543677 12.273068,4.3887355 11,3.1156678 Z"
id="path4529"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccccc" />
<path
style="opacity:0.3;fill:#bebebe;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 8.629,5 7.2094668,6.4096296 C 8,7.05621 8,7.805653 8,8 8,8.1932576 7.982199,8.9408674 7.209,9.59 L 8.6289063,11 C 9.8466375,9.952694 10,8.5984701 10,8 10,7.400497 9.854476,6.062891 8.629,5 Z"
id="path4569"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccscccc" />
</svg>

Before

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 72 KiB

View File

@ -1,105 +0,0 @@
local utils = {}
local function split(string_to_split, separator)
if separator == nil then separator = "%s" end
local t = {}
for str in string.gmatch(string_to_split, "([^".. separator .."]+)") do
table.insert(t, str)
end
return t
end
function utils.extract_sinks_and_sources(pacmd_output)
local sinks = {}
local sources = {}
local device
local properties
local ports
local in_sink = false
local in_source = false
local in_device = false
local in_properties = false
local in_ports = false
for line in pacmd_output:gmatch("[^\r\n]+") do
if string.match(line, 'source%(s%) available.') then
in_sink = false
in_source = true
end
if string.match(line, 'sink%(s%) available.') then
in_sink = true
in_source = false
end
if string.match(line, 'index:') then
in_device = true
in_properties = false
device = {
id = line:match(': (%d+)'),
is_default = string.match(line, '*') ~= nil
}
if in_sink then
table.insert(sinks, device)
elseif in_source then
table.insert(sources, device)
end
end
if string.match(line, '^\tproperties:') then
in_device = false
in_properties = true
properties = {}
device['properties'] = properties
end
if string.match(line, 'ports:') then
in_device = false
in_properties = false
in_ports = true
ports = {}
device['ports'] = ports
end
if string.match(line, 'active port:') then
in_device = false
in_properties = false
in_ports = false
device['active_port'] = line:match(': (.+)'):gsub('<',''):gsub('>','')
end
if in_device then
local t = split(line, ': ')
local key = t[1]:gsub('\t+', ''):lower()
local value = t[2]:gsub('^<', ''):gsub('>$', '')
device[key] = value
end
if in_properties then
local t = split(line, '=')
local key = t[1]:gsub('\t+', ''):gsub('%.', '_'):gsub('-', '_'):gsub(':', ''):gsub("%s+$", "")
local value
if t[2] == nil then
value = t[2]
else
value = t[2]:gsub('"', ''):gsub("^%s+", ""):gsub(' Analog Stereo', '')
end
properties[key] = value
end
if in_ports then
local t = split(line, ': ')
local key = t[1]
if key ~= nil then
key = key:gsub('\t+', '')
end
ports[key] = t[2]
end
end
return sinks, sources
end
return utils

View File

@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#ffffff" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-volume-2"><polygon points="11 5 6 9 2 9 2 15 6 15 11 19 11 5"></polygon><path d="M19.07 4.93a10 10 0 0 1 0 14.14M15.54 8.46a5 5 0 0 1 0 7.07"></path></svg>

Before

Width:  |  Height:  |  Size: 354 B

View File

@ -1,230 +0,0 @@
-------------------------------------------------
-- The Ultimate Volume Widget for Awesome Window Manager
-- More details could be found here:
-- https://github.com/streetturtle/widgets/tree/master/volume-widget
-- @author Pavel Makhov
-- @copyright 2020 Pavel Makhov
-------------------------------------------------
local awful = require("awful")
local wibox = require("wibox")
local spawn = require("awful.spawn")
local gears = require("gears")
local beautiful = require("beautiful")
local watch = require("awful.widget.watch")
local utils = require("components.widgets.volume-widget.utils")
local LIST_DEVICES_CMD = [[sh -c "pacmd list-sinks; pacmd list-sources"]]
local function GET_VOLUME_CMD(device) return 'amixer -D ' .. device .. ' sget Master' end
local function INC_VOLUME_CMD(device, step) return 'amixer -D ' .. device .. ' sset Master ' .. step .. '%+' end
local function DEC_VOLUME_CMD(device, step) return 'amixer -D ' .. device .. ' sset Master ' .. step .. '%-' end
local function TOG_VOLUME_CMD(device) return 'amixer -D ' .. device .. ' sset Master toggle' end
local widget_types = {
icon_and_text = require("components.widgets.volume-widget.widgets.icon-and-text-widget"),
icon = require("components.widgets.volume-widget.widgets.icon-widget"),
arc = require("components.widgets.volume-widget.widgets.arc-widget"),
horizontal_bar = require("components.widgets.volume-widget.widgets.horizontal-bar-widget"),
vertical_bar = require("components.widgets.volume-widget.widgets.vertical-bar-widget")
}
local volume = {}
local rows = { layout = wibox.layout.fixed.vertical }
local popup = awful.popup{
bg = beautiful.bg_normal,
ontop = true,
visible = false,
shape = gears.shape.rounded_rect,
border_width = 1,
border_color = beautiful.bg_focus,
maximum_width = 400,
offset = { y = 5 },
widget = {}
}
local function build_main_line(device)
if device.active_port ~= nil and device.ports[device.active_port] ~= nil then
return device.properties.device_description .. ' · ' .. device.ports[device.active_port]
else
return device.properties.device_description
end
end
local function build_rows(devices, on_checkbox_click, device_type)
local device_rows = { layout = wibox.layout.fixed.vertical }
for _, device in pairs(devices) do
local checkbox = wibox.widget {
checked = device.is_default,
color = beautiful.bg_normal,
paddings = 2,
shape = gears.shape.circle,
forced_width = 20,
forced_height = 20,
check_color = beautiful.fg_urgent,
widget = wibox.widget.checkbox
}
checkbox:connect_signal("button::press", function()
spawn.easy_async(string.format([[sh -c 'pacmd set-default-%s "%s"']], device_type, device.name), function()
on_checkbox_click()
end)
end)
local row = wibox.widget {
{
{
{
checkbox,
valign = 'center',
layout = wibox.container.place,
},
{
{
text = build_main_line(device),
align = 'left',
widget = wibox.widget.textbox
},
left = 10,
layout = wibox.container.margin
},
spacing = 8,
layout = wibox.layout.align.horizontal
},
margins = 4,
layout = wibox.container.margin
},
bg = beautiful.bg_normal,
widget = wibox.container.background
}
row:connect_signal("mouse::enter", function(c) c:set_bg(beautiful.bg_focus) end)
row:connect_signal("mouse::leave", function(c) c:set_bg(beautiful.bg_normal) end)
local old_cursor, old_wibox
row:connect_signal("mouse::enter", function()
local wb = mouse.current_wibox
old_cursor, old_wibox = wb.cursor, wb
wb.cursor = "hand1"
end)
row:connect_signal("mouse::leave", function()
if old_wibox then
old_wibox.cursor = old_cursor
old_wibox = nil
end
end)
row:connect_signal("button::press", function()
spawn.easy_async(string.format([[sh -c 'pacmd set-default-%s "%s"']], device_type, device.name), function()
on_checkbox_click()
end)
end)
table.insert(device_rows, row)
end
return device_rows
end
local function build_header_row(text)
return wibox.widget{
{
markup = "<b>" .. text .. "</b>",
align = 'center',
widget = wibox.widget.textbox
},
bg = beautiful.bg_normal,
widget = wibox.container.background
}
end
local function rebuild_popup()
spawn.easy_async(LIST_DEVICES_CMD, function(stdout)
local sinks, sources = utils.extract_sinks_and_sources(stdout)
for i = 0, #rows do rows[i]=nil end
table.insert(rows, build_header_row("SINKS"))
table.insert(rows, build_rows(sinks, function() rebuild_popup() end, "sink"))
table.insert(rows, build_header_row("SOURCES"))
table.insert(rows, build_rows(sources, function() rebuild_popup() end, "source"))
popup:setup(rows)
end)
end
local function worker(user_args)
local args = user_args or {}
local mixer_cmd = args.mixer_cmd or 'pavucontrol'
local widget_type = args.widget_type
local refresh_rate = args.refresh_rate or 1
local step = args.step or 5
local device = args.device or 'pipewire'
if widget_types[widget_type] == nil then
volume.widget = widget_types['icon_and_text'].get_widget(args.icon_and_text_args)
else
volume.widget = widget_types[widget_type].get_widget(args)
end
local function update_graphic(widget, stdout)
local mute = string.match(stdout, "%[(o%D%D?)%]") -- \[(o\D\D?)\] - [on] or [off]
if mute == 'off' then widget:mute()
elseif mute == 'on' then widget:unmute()
end
local volume_level = string.match(stdout, "(%d?%d?%d)%%") -- (\d?\d?\d)\%)
if volume_level ~= nil then
volume_level = string.format("% 3d", volume_level)
widget:set_volume_level(volume_level)
end
end
function volume:inc(s)
spawn.easy_async(INC_VOLUME_CMD(device, s or step), function(stdout) update_graphic(volume.widget, stdout) end)
end
function volume:dec(s)
spawn.easy_async(DEC_VOLUME_CMD(device, s or step), function(stdout) update_graphic(volume.widget, stdout) end)
end
function volume:toggle()
spawn.easy_async(TOG_VOLUME_CMD(device), function(stdout) update_graphic(volume.widget, stdout) end)
end
function volume:mixer()
if mixer_cmd then
spawn.easy_async(mixer_cmd)
end
end
volume.widget:buttons(
awful.util.table.join(
awful.button({}, 3, function()
if popup.visible then
popup.visible = not popup.visible
else
rebuild_popup()
popup:move_next_to(mouse.current_widget_geometry)
end
end),
awful.button({}, 4, function() volume:inc() end),
awful.button({}, 5, function() volume:dec() end),
awful.button({}, 2, function() volume:mixer() end),
awful.button({}, 1, function() volume:toggle() end)
)
)
watch(GET_VOLUME_CMD(device), refresh_rate, update_graphic, volume.widget)
return volume.widget
end
return setmetatable(volume, { __call = function(_, ...) return worker(...) end })

View File

@ -1,46 +0,0 @@
local wibox = require("wibox")
local beautiful = require('beautiful')
local ICON_DIR = os.getenv("HOME") .. '/.config/awesome/components/widgets/volume-widget/icons/'
local widget = {}
function widget.get_widget(widgets_args)
local args = widgets_args or {}
local thickness = args.thickness or 2
local main_color = args.main_color or beautiful.fg_color
local bg_color = args.bg_color or '#ffffff11'
local mute_color = args.mute_color or beautiful.fg_urgent
local size = args.size or 18
return wibox.widget {
{
id = "icon",
image = ICON_DIR .. 'audio-volume-high-symbolic.svg',
resize = true,
widget = wibox.widget.imagebox,
},
max_value = 100,
thickness = thickness,
start_angle = 4.71238898, -- 2pi*3/4
forced_height = size,
forced_width = size,
bg = bg_color,
paddings = 2,
widget = wibox.container.arcchart,
set_volume_level = function(self, new_value)
self.value = new_value
end,
mute = function(self)
self.colors = { mute_color }
end,
unmute = function(self)
self.colors = { main_color }
end
}
end
return widget

View File

@ -1,58 +0,0 @@
local wibox = require("wibox")
local beautiful = require('beautiful')
local gears = require("gears")
local ICON_DIR = os.getenv("HOME") .. '/.config/awesome/components/widgets/volume-widget/icons/'
local widget = {}
function widget.get_widget(widgets_args)
local args = widgets_args or {}
local main_color = args.main_color or beautiful.fg_normal
local mute_color = args.mute_color or beautiful.fg_urgent
local bg_color = args.bg_color or '#ffffff11'
local width = args.width or 50
local margins = args.margins or 10
local shape = args.shape or 'bar'
local with_icon = args.with_icon == true and true or false
local bar = wibox.widget {
{
{
id = "icon",
image = ICON_DIR .. 'audio-volume-high-symbolic.svg',
resize = false,
widget = wibox.widget.imagebox,
},
valign = 'center',
visible = with_icon,
layout = wibox.container.place,
},
{
id = 'bar',
max_value = 100,
forced_width = width,
color = main_color,
margins = { top = margins, bottom = margins },
background_color = bg_color,
shape = gears.shape[shape],
widget = wibox.widget.progressbar,
},
spacing = 4,
layout = wibox.layout.fixed.horizontal,
set_volume_level = function(self, new_value)
self:get_children_by_id('bar')[1]:set_value(tonumber(new_value))
end,
mute = function(self)
self:get_children_by_id('bar')[1]:set_color(mute_color)
end,
unmute = function(self)
self:get_children_by_id('bar')[1]:set_color(main_color)
end
}
return bar
end
return widget

View File

@ -1,59 +0,0 @@
local wibox = require("wibox")
local beautiful = require('beautiful')
local widget = {}
local ICON_DIR = os.getenv("HOME") .. '/.config/awesome/components/widgets/volume-widget/icons/'
function widget.get_widget(widgets_args)
local args = widgets_args or {}
local font = args.font or beautiful.font
local icon_dir = args.icon_dir or ICON_DIR
return wibox.widget {
{
{
id = "icon",
resize = false,
widget = wibox.widget.imagebox,
},
valign = 'center',
layout = wibox.container.place
},
{
id = 'txt',
font = font,
widget = wibox.widget.textbox
},
layout = wibox.layout.fixed.horizontal,
set_volume_level = function(self, new_value)
self:get_children_by_id('txt')[1]:set_text(new_value)
local volume_icon_name
if self.is_muted then
volume_icon_name = 'audio-volume-muted-symbolic'
else
local new_value_num = tonumber(new_value)
if (new_value_num >= 0 and new_value_num < 33) then
volume_icon_name="audio-volume-low-symbolic"
elseif (new_value_num < 66) then
volume_icon_name="audio-volume-medium-symbolic"
else
volume_icon_name="audio-volume-high-symbolic"
end
end
self:get_children_by_id('icon')[1]:set_image(icon_dir .. volume_icon_name .. '.svg')
end,
mute = function(self)
self.is_muted = true
self:get_children_by_id('icon')[1]:set_image(icon_dir .. 'audio-volume-muted-symbolic.svg')
end,
unmute = function(self)
self.is_muted = false
end
}
end
return widget

View File

@ -1,46 +0,0 @@
local wibox = require("wibox")
local widget = {}
local ICON_DIR = os.getenv("HOME") .. '/.config/awesome/components/widgets/volume-widget/icons/'
function widget.get_widget(widgets_args)
local args = widgets_args or {}
local icon_dir = args.icon_dir or ICON_DIR
return wibox.widget {
{
id = "icon",
resize = false,
widget = wibox.widget.imagebox,
},
valign = 'center',
layout = wibox.container.place,
set_volume_level = function(self, new_value)
local volume_icon_name
if self.is_muted then
volume_icon_name = 'audio-volume-muted-symbolic'
else
local new_value_num = tonumber(new_value)
if (new_value_num >= 0 and new_value_num < 33) then
volume_icon_name="audio-volume-low-symbolic"
elseif (new_value_num < 66) then
volume_icon_name="audio-volume-medium-symbolic"
else
volume_icon_name="audio-volume-high-symbolic"
end
end
self:get_children_by_id('icon')[1]:set_image(icon_dir .. volume_icon_name .. '.svg')
end,
mute = function(self)
self.is_muted = true
self:get_children_by_id('icon')[1]:set_image(icon_dir .. 'audio-volume-muted-symbolic.svg')
end,
unmute = function(self)
self.is_muted = false
end
}
end
return widget

View File

@ -1,64 +0,0 @@
local wibox = require("wibox")
local beautiful = require('beautiful')
local gears = require("gears")
local ICON_DIR = os.getenv("HOME") .. '/.config/awesome/components/widgets/volume-widget/icons/'
local widget = {}
function widget.get_widget(widgets_args)
local args = widgets_args or {}
local main_color = args.main_color or beautiful.fg_normal
local mute_color = args.mute_color or beautiful.fg_urgent
local bg_color = args.bg_color or '#ffffff11'
local width = args.width or 10
local margins = args.height or 2
local shape = args.shape or 'bar'
local with_icon = args.with_icon == true and true or false
local bar = wibox.widget {
{
{
id = "icon",
image = ICON_DIR .. 'audio-volume-high-symbolic.svg',
resize = false,
widget = wibox.widget.imagebox,
},
valign = 'center',
visible = with_icon,
layout = wibox.container.place,
},
{
{
id = 'bar',
max_value = 100,
forced_width = width,
forced_height = 5,
margins = { top = margins, bottom = margins },
color = main_color,
background_color = bg_color,
shape = gears.shape[shape],
widget = wibox.widget.progressbar,
},
forced_width = width,
direction = 'east',
layout = wibox.container.rotate,
},
spacing = 4,
layout = wibox.layout.fixed.horizontal,
set_volume_level = function(self, new_value)
self:get_children_by_id('bar')[1]:set_value(tonumber(new_value))
end,
mute = function(self)
self:get_children_by_id('bar')[1]:set_color(mute_color)
end,
unmute = function(self)
self:get_children_by_id('bar')[1]:set_color(main_color)
end
}
return bar
end
return widget

View File

@ -1,3 +0,0 @@
<svg width="461" height="461" viewBox="0 0 461 461" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M285.08 230.397L456.218 59.27C462.294 53.193 462.294 43.359 456.218 37.284L423.511 4.56501C420.598 1.65401 416.645 0.0150146 412.519 0.0150146C408.392 0.0150146 404.439 1.65401 401.526 4.56501L230.388 175.705L59.25 4.56501C56.337 1.65401 52.384 0.0150146 48.257 0.0150146C44.131 0.0150146 40.177 1.65401 37.265 4.56501L4.55799 37.284C-1.51901 43.359 -1.51901 53.193 4.55799 59.27L175.696 230.398L4.57499 401.505C-1.49901 407.582 -1.49901 417.416 4.57499 423.491L37.284 456.21C40.195 459.121 44.149 460.76 48.276 460.76C52.403 460.76 56.356 459.121 59.27 456.21L230.387 285.09L401.505 456.21C404.418 459.121 408.371 460.76 412.498 460.76C416.626 460.76 420.579 459.121 423.49 456.21L456.199 423.491C462.273 417.416 462.273 407.582 456.199 401.505L285.08 230.397Z" fill="white"/>
</svg>

Before

Width:  |  Height:  |  Size: 894 B

View File

@ -1,707 +0,0 @@
local awful = require("awful")
local gears = require("gears")
local naughty = require("naughty")
local beautiful = require("beautiful")
local volume_widget = require("components.widgets.volume-widget.volume")
local dpi = beautiful.xresources.apply_dpi
local modkey = "Mod4"
-- define module table
local keys = {}
-- AwesomeWM Vim Tmux Navigator
local function get_first_nonempty_tag()
local screen = awful.screen.focused()
local tags = screen.tags
for _, t in ipairs(tags) do
if #t:clients() == 0 then
return t
end
end
end
local focus_bydirection = function(direction)
awful.client.focus.global_bydirection(direction)
if client.focus then
-- focus on the client
client.focus:raise()
end
-- BUG: focus across screens is wonky when there are no clients on the destination screen
-- https://github.com/awesomeWM/awesome/issues/3638
-- Workaround: manually unfocus client after moving focus to an empty screen
local is_empty_destination = #awful.screen.focused().clients < 1
if is_empty_destination then
-- manually unfocus the current focused client
client.focus = nil
end
end
require("awesomewm-vim-tmux-navigator") {
up = {"Up", "k"},
down = {"Down", "j"},
left = {"Left", "h"},
right = {"Right", "l"},
mod = "Mod4",
mod_keysym = "Super_L",
experimental = true,
focus = focus_bydirection
}
-- ===================================================================
-- Movement Functions (Called by some keybinds)
-- ===================================================================
local function get_screen(s)
return s and screen[s]
end
-- Move given client to given direction
local function move_client(sel, dir)
sel = sel or awful.client.focus
if sel then
-- move focus
awful.client.focus.global_bydirection(dir, sel)
local c = client.focus
-- swapping inside a screen
if get_screen(sel.screen) == get_screen(c.screen) and sel ~= c then
c:swap(sel)
client.focus = sel
sel:raise()
-- swapping to an empty screen
elseif sel == c then
sel:move_to_screen(awful.screen.focused())
-- swapping to a nonempty screen
elseif get_screen(sel.screen) ~= get_screen(c.screen) and sel ~= c then
sel:move_to_screen(c.screen)
client.focus = sel
sel:raise()
end
end
end
-- Resize client in given direction
local floating_resize_amount = dpi(20)
local tiling_resize_factor = 0.01
local function resize_client(c, direction)
if awful.layout.get(mouse.screen) == awful.layout.suit.floating or (c and c.floating) then
if direction == "up" then
c:relative_move(0, 0, 0, -floating_resize_amount)
elseif direction == "down" then
c:relative_move(0, 0, 0, floating_resize_amount)
elseif direction == "left" then
c:relative_move(0, 0, -floating_resize_amount, 0)
elseif direction == "right" then
c:relative_move(0, 0, floating_resize_amount, 0)
end
else
if direction == "up" then
awful.client.incwfact(-tiling_resize_factor)
elseif direction == "down" then
awful.client.incwfact(tiling_resize_factor)
elseif direction == "left" then
awful.tag.incmwfact(-tiling_resize_factor)
elseif direction == "right" then
awful.tag.incmwfact(tiling_resize_factor)
end
end
end
-- ===================================================================
-- Mouse bindings
-- ===================================================================
-- Mouse buttons on the desktop
keys.desktopbuttons = gears.table.join(
-- left click on desktop to hide notification
awful.button({}, 1,
function ()
naughty.destroy_all_notifications()
end
),
awful.button({}, 7, function() volume_widget:inc(5) end),
awful.button({}, 6, function() volume_widget:dec(5) end)
)
-- Mouse buttons on the client
keys.clientbuttons = gears.table.join(
-- Raise client
awful.button({}, 1,
function(c)
client.focus = c
c:raise()
end
),
-- Move and Resize Client
awful.button({modkey}, 1, awful.mouse.client.move),
awful.button({modkey}, 3, awful.mouse.client.resize),
awful.button({}, 7, function() volume_widget:inc(5) end),
awful.button({}, 6, function() volume_widget:dec(5) end)
)
-- ===================================================================
-- Desktop Key bindings
-- ===================================================================
keys.globalkeys = gears.table.join(
-- =========================================
-- SPAWN APPLICATION KEY BINDINGS
-- =========================================
-- Spawn terminal
awful.key({modkey}, "Return",
function()
local c = client.focus
if c and c.class == "Alacritty" then
awful.spawn(string.format(os.getenv("XDG_CONFIG_HOME") .. "/scripts/launch_alacritty.sh %d", c.pid))
else
awful.spawn('bash -c "WINIT_X11_SCALE_FACTOR=1 alacritty"')
end
end,
{description = "open a terminal", group = "launcher"}
),
-- Spawn terminal
awful.key({modkey, "Shift"}, "Return",
function()
awful.spawn('bash -c "WINIT_X11_SCALE_FACTOR=1 alacritty"')
end,
{description = "open a terminal", group = "launcher"}
),
-- Spawn browser
awful.key({modkey}, "b",
function()
awful.spawn("firefox")
end,
{description = "Open Firefox", group = "launcher"}
),
-- Lock the screen
awful.key({"Control", "Mod1"}, "l",
function()
awful.spawn('bash -c "i3lockr --blur 25"')
end,
{description = "Open lock", group = "launcher"}
),
-- Generate TOTP
awful.key({modkey}, "y",
function()
awful.spawn.with_shell(os.getenv("XDG_CONFIG_HOME") .. "/rofi/rofi-ykman.sh")
end,
{description = "Generate TOTP", group = "launcher"}
),
-- Spawn file manager
awful.key({modkey}, "a",
function()
awful.spawn("nautilus")
end,
{description = "Open Nautilus", group = "launcher"}
),
-- launch rofi
awful.key({modkey}, "XF86Launch5",
function()
awful.spawn(os.getenv("XDG_CONFIG_HOME") .. "/scripts/toggle_rofi.sh")
end,
{description = "application launcher", group = "launcher"}
),
-- launch rofi
awful.key({modkey}, "d",
function()
awful.spawn(os.getenv("XDG_CONFIG_HOME") .. "/scripts/toggle_rofi.sh")
end,
{description = "application launcher", group = "launcher"}
),
-- launch clipman
awful.key({modkey}, "c",
function()
awful.spawn.with_shell('CM_LAUNCHER=rofi-script rofi -modi "clipmenu:/usr/bin/clipmenu" -show clipmenu')
end,
{description = "Clipboard manager", group = "launcher"}
),
-- Go to sleep
awful.key({"Control", "Mod2", "Mod4"}, "q",
function()
awful.spawn.with_shell('systemctl suspend')
end,
{description = "Clipboard manager", group = "launcher"}
),
-- Quake
awful.key({ }, "F9", function () awful.screen.focused().quake:toggle() end),
-- =========================================
-- FUNCTION KEYS
-- =========================================
-- Brightness
awful.key({}, "XF86MonBrightnessUp",
function()
awful.spawn("xbacklight -inc 10", false)
end,
{description = "+10%", group = "hotkeys"}
),
awful.key({}, "XF86MonBrightnessDown",
function()
awful.spawn("xbacklight -dec 10", false)
end,
{description = "-10%", group = "hotkeys"}
),
-- ALSA volume control
awful.key({}, "XF86AudioRaiseVolume",
function()
volume_widget:inc(5)
end,
{description = "volume up", group = "hotkeys"}
),
awful.key({}, "XF86AudioLowerVolume",
function()
volume_widget:dec(5)
end,
{description = "volume down", group = "hotkeys"}
),
awful.key({}, "XF86AudioMute",
function()
volume_widget:toggle()
end,
{description = "toggle mute", group = "hotkeys"}
),
awful.key({}, "XF86AudioNext",
function()
awful.spawn("playerctl next", false)
end,
{description = "next music", group = "hotkeys"}
),
awful.key({}, "XF86AudioPrev",
function()
awful.spawn("playerctl previous", false)
end,
{description = "previous music", group = "hotkeys"}
),
awful.key({}, "XF86AudioPlay",
function()
awful.spawn("playerctl play-pause", false)
end,
{description = "play/pause music", group = "hotkeys"}
),
awful.key({modkey}, "XF86AudioMute",
function()
awful.spawn("playerctl play-pause", false)
end,
{description = "play/pause music", group = "hotkeys"}
),
awful.key({modkey}, "XF86AudioRaiseVolume",
function()
awful.spawn("playerctl next", false)
end,
{description = "volume up", group = "hotkeys"}
),
awful.key({modkey}, "XF86AudioLowerVolume",
function()
awful.spawn("playerctl previous", false)
end,
{description = "volume down", group = "hotkeys"}
),
-- Screenshot on prtscn using scrot
awful.key({}, "Print",
function()
awful.spawn("scrot -e 'mv $f ~/Pictures/Screenshots/ 2>/dev/null'", false)
end
),
-- =========================================
-- RELOAD / QUIT AWESOME
-- =========================================
-- Reload Awesome
awful.key({modkey, "Shift"}, "r",
awesome.restart,
{description = "reload awesome", group = "awesome"}
),
-- Quit Awesome
awful.key({modkey}, "Escape",
function()
-- emit signal to show the exit screen
awful.spawn("rofi -show power-menu -modi power-menu:" .. os.getenv("XDG_CONFIG_HOME") .. "/scripts/rofi-power-menu")
end,
{description = "toggle exit screen", group = "hotkeys"}
),
awful.key({}, "XF86PowerOff",
function()
-- emit signal to show the exit screen
awful.spawn("rofi -show power-menu -modi power-menu:~/.config/scripts/rofi-power-menu")
end,
{description = "toggle exit screen", group = "hotkeys"}
),
awful.key({}, "XF86Calculator",
function()
awful.spawn("rofi -show calc -modi calc -no-show-match -no-sort -calc-command \"echo -n '{result}' | xsel --clipboard\"")
end,
{description = "Launch the calculator", group = "hotkeys"}
),
-- Focus client by index (cycle through clients)
awful.key({modkey}, "Tab",
function()
local screen = awful.screen.focused()
local tags = screen.tags
local current_tag = screen.selected_tag
local used_tags = {}
for _, t in ipairs(tags) do
if t == current_tag or #t:clients() > 0 then
table.insert(used_tags, t)
end
end
local found = false
for _, t in ipairs(used_tags) do
if found then
t:view_only()
return
elseif t == current_tag then
found = true
end
end
used_tags[1]:view_only()
end,
{description = "Switch to next tag", group = "client"}
),
awful.key({modkey, "Shift"}, "Tab",
function()
local tags = root.tags()
local current_tag = awful.screen.focused().selected_tag
local used_tags = {}
for _, t in ipairs(tags) do
if t == current_tag or #t:clients() > 0 then
table.insert(used_tags, t)
end
end
local found = false
for _, t in ipairs(used_tags) do
if found then
awful.screen.focus(t.screen.index)
t:view_only()
return
elseif t == current_tag then
found = true
end
end
used_tags[1]:view_only()
end,
{description = "Switch to next tag", group = "client"}
),
awful.key({"Mod1"}, "Tab", -- Alt-Tab Cycle through clients
function()
local clients = {}
local found = false
local function focus_client(c)
awful.screen.focus(c.screen.index)
c.first_tag:view_only()
client.focus = c
c:raise()
end
for _, t in ipairs(root.tags()) do
for i, c in ipairs(t:clients()) do
if found then
focus_client(c)
return
elseif c == client.focus then
found = true
end
table.insert(clients, c)
end
end
focus_client(clients[1])
end,
{description = "Switch to next tag", group = "client"}
),
awful.key({modkey}, "t",
function()
local first_empty = get_first_nonempty_tag()
if first_empty ~= nil then
first_empty:view_only()
end
end,
{description = "Switch to next tag", group = "client"}
),
awful.key({modkey, "Shift"}, "t",
function()
local first_empty = get_first_nonempty_tag()
if first_empty ~= nil then
client.focus:move_to_tag(first_empty)
first_empty:view_only()
end
end,
{description = "Switch to next tag", group = "client"}
),
-- =========================================
-- SCREEN FOCUSING
-- =========================================
-- Focus screen by index (cycle through screens)
awful.key({modkey}, "s",
function()
awful.screen.focus_relative(-1)
end
),
-- =========================================
-- CLIENT RESIZING
-- =========================================
awful.key({modkey, "Control"}, "Down",
function(_)
resize_client(client.focus, "down")
end
),
awful.key({modkey, "Control"}, "Up",
function(_)
resize_client(client.focus, "up")
end
),
awful.key({modkey, "Control"}, "Left",
function(_)
resize_client(client.focus, "left")
end
),
awful.key({modkey, "Control"}, "Right",
function(_)
resize_client(client.focus, "right")
end
),
awful.key({modkey, "Control"}, "j",
function(_)
resize_client(client.focus, "down")
end
),
awful.key({ modkey, "Control" }, "k",
function(_)
resize_client(client.focus, "up")
end
),
awful.key({modkey, "Control"}, "h",
function(_)
resize_client(client.focus, "left")
end
),
awful.key({modkey, "Control"}, "l",
function(_)
resize_client(client.focus, "right")
end
),
-- =========================================
-- GAP CONTROL
-- =========================================
-- Gap control
-- awful.key({modkey, :Shift"}, "minus",
-- function()
-- awful.tag.incgap(5, nil)
-- end,
-- {description = "increment gaps size for the current tag", group = "gaps"}
-- ),
-- awful.key({modkey}, "minus",
-- function()
-- awful.tag.incgap(-5, nil)
-- end,
-- {description = "decrement gap size for the current tag", group = "gaps"}
-- ),
awful.key({ modkey }, "=",
function ()
awful.tag.incncol( 1, nil, true)
end,
{description = "increase the number of columns", group = "layout"}
),
awful.key({ modkey }, "minus",
function ()
awful.tag.incncol(-1, nil, true)
end,
{description = "decrease the number of columns", group = "layout"}
),
-- =========================================
-- LAYOUT SELECTION
-- =========================================
-- select next layout
awful.key({modkey}, "space",
function()
awful.layout.inc(1)
end,
{description = "select next", group = "layout"}
),
-- select previous layout
awful.key({modkey, "Shift"}, "space",
function()
awful.layout.inc(-1)
end,
{description = "select previous", group = "layout"}
),
-- =========================================
-- CLIENT MINIMIZATION
-- =========================================
-- restore minimized client
awful.key({modkey, "Shift"}, "n",
function()
local c = awful.client.restore()
-- Focus restored client
if c then
client.focus = c
c:raise()
end
end,
{description = "restore minimized", group = "client"}
)
)
-- ===================================================================
-- Client Key bindings
-- ===================================================================
keys.clientkeys = gears.table.join(
-- Move to edge or swap by direction
awful.key({modkey, "Shift"}, "Down",
function(c)
move_client(c, "down")
end
),
awful.key({modkey, "Shift"}, "Up",
function(c)
move_client(c, "up")
end
),
awful.key({modkey, "Shift"}, "Left",
function(c)
move_client(c, "left")
end
),
awful.key({modkey, "Shift"}, "Right",
function(c)
move_client(c, "right")
end
),
awful.key({modkey, "Shift"}, "j",
function(c)
move_client(c, "down")
end
),
awful.key({modkey, "Shift"}, "k",
function(c)
move_client(c, "up")
end
),
awful.key({modkey, "Shift"}, "h",
function(c)
move_client(c, "left")
end
),
awful.key({modkey, "Shift"}, "l",
function(c)
move_client(c, "right")
end
),
-- close client
awful.key({modkey}, "q",
function(c)
c:kill()
for _, i in ipairs(client.get()) do
i.minimized = false
end
end,
{description = "close", group = "client"}
),
-- float client
awful.key({modkey}, "f",
function(c)
awful.client.floating.toggle(c)
end,
{description = "float", group = "client"}
),
-- Minimize
awful.key({modkey}, "n",
function(c)
c.minimized = true
end,
{description = "minimize", group = "client"}
),
-- Maximize
awful.key({modkey}, "m",
function(c)
c.maximized = not c.maximized
c:raise()
end,
{description = "(un)maximize", group = "client"}
),
-- Full Screen
awful.key({modkey}, "F11",
function(c)
c.fullscreen = not c.fullscreen
c:raise()
end,
{description = "(un)fullscreen", group = "client"}
)
)
local function register_tag(tag)
keys.globalkeys = gears.table.join(keys.globalkeys,
-- Switch to tag
awful.key({modkey}, "#" .. tag + 9,
function()
local screen = awful.screen.focused()
local t = screen.tags[tag]
if t then
t:view_only()
end
end,
{description = "view tag #"..tag, group = "tag"}
),
-- Move client to tag
awful.key({modkey, "Shift"}, "#" .. tag + 9,
function()
if client.focus then
local t= client.focus.screen.tags[tag]
if t then
client.focus:move_to_tag(t)
t:view_only()
end
end
end,
{description = "move focused client to tag #"..tag, group = "tag"}
)
)
end
-- Bind all key numbers to tags
for i = 1, 10 do
register_tag(i)
end
return keys

@ -1 +0,0 @@
Subproject commit 88f5a8abd2649b348ffec433a24a263b37f122c0

View File

@ -1,69 +0,0 @@
-- Standard awesome libraries
local gears = require("gears")
local awful = require("awful")
local beautiful = require("beautiful")
-- Local imports
local grid = require("components.layout.grid")
-- Import theme
beautiful.init(gears.filesystem.get_configuration_dir() .. "theme.lua")
-- Load components
require("components.notifications")
require("components.screen")
require("utils.signals")
-- Autofocus a new client when previously focused one is closed
require("awful.autofocus")
-- Define layouts
awful.layout.append_default_layouts({
awful.layout.suit.tile,
awful.layout.suit.floating,
grid.horizontal,
awful.layout.suit.fair.horizontal,
awful.layout.suit.tile.left,
awful.layout.suit.tile.bottom,
awful.layout.suit.tile.top,
grid,
})
-- List of apps to run on start-up
local run_on_start_up = {
"numlockx on",
"nm-applet",
"xcape -e \"Super_L=Super_L|XF86Launch5\" -t 5000",
gears.filesystem.get_configuration_dir() .. "/scripts/setup_display.sh",
"feh --no-fehbg --bg-fill " .. gears.filesystem.get_configuration_dir() .. "/images/wallpaper.png",
}
-- Run all the apps listed in run_on_start_up
for _, app in ipairs(run_on_start_up) do
local findme = app
local firstspace = app:find(" ")
if firstspace then
findme = app:sub(0, firstspace - 1)
end
-- Run commands only if it's not already running.
awful.spawn.with_shell(string.format("echo 'pgrep -f -u $USER -x %s > /dev/null || (%s)' | bash -", findme, app), false)
end
-- Start timers
gears.timer {
timeout = 60,
call_now = true,
autostart = true,
callback = function()
awful.spawn({"xmodmap", "/home/user/.Xmodmap"}) -- If not repeated it sometimes just stops working
end
}
-- Import Keybinds
local keys = require("keys")
root.keys(keys.globalkeys)
root.buttons(keys.desktopbuttons)
-- Import rules
local create_rules = require("rules").create
awful.rules.rules = create_rules(keys.clientkeys, keys.clientbuttons)

View File

@ -1,73 +0,0 @@
-- ██████╗ ██╗ ██╗██╗ ███████╗███████╗
-- ██╔══██╗██║ ██║██║ ██╔════╝██╔════╝
-- ██████╔╝██║ ██║██║ █████╗ ███████╗
-- ██╔══██╗██║ ██║██║ ██╔══╝ ╚════██║
-- ██║ ██║╚██████╔╝███████╗███████╗███████║
-- ╚═╝ ╚═╝ ╚═════╝ ╚══════╝╚══════╝╚══════╝
-- ===================================================================
-- Initialization
-- ===================================================================
local awful = require("awful")
local beautiful = require("beautiful")
-- define screen height and width
local screen_height = awful.screen.focused().geometry.height
local screen_width = awful.screen.focused().geometry.width
-- define module table
local rules = {}
-- ===================================================================
-- Rules
-- ===================================================================
-- return a table of client rules including provided keys / buttons
function rules.create(clientkeys, clientbuttons)
return {
-- All clients will match this rule.
{
rule = {},
properties = {
titlebars_enabled = beautiful.titlebars_enabled,
border_width = beautiful.border_width,
border_color = beautiful.border_normal,
focus = awful.client.focus.filter,
raise = true,
keys = clientkeys,
buttons = clientbuttons,
screen = awful.screen.preferred,
placement = awful.placement.centered,
size_hints_honor = false
},
},
-- Floating clients.
{
rule_any = {
name = {
"Steam Guard - Computer Authorization Required"
},
role = {
"pop-up",
"GtkFileChooserDialog"
},
type = {
"dialog"
}
}, properties = {floating = true}
},
-- File chooser dialog
{
rule_any = {role = {"GtkFileChooserDialog"}},
properties = {floating = true, width = screen_width * 0.55, height = screen_height * 0.65}
},
}
end
-- return module table
return rules

View File

@ -1,48 +0,0 @@
local dpi = require("beautiful.xresources").apply_dpi
local theme = {}
-- Font
theme.font = "Ubuntu 12"
theme.title_font = "Ubuntu 12"
-- Background
theme.bg_normal = "#1f2430"
theme.bg_dark = "#000000"
theme.bg_focus = "#151821"
theme.bg_urgent = "#ed8274"
theme.bg_minimize = "#444444"
-- Foreground
theme.fg_normal = "#ffffff"
theme.fg_focus = "#e4e4e4"
theme.fg_urgent = "#ffffff"
theme.fg_minimize = "#ffffff"
-- Window Gap Distance
theme.useless_gap = dpi(2)
-- Show Gaps if Only One Client is Visible
theme.gap_single_client = false
-- Window Borders
theme.border_width = dpi(3)
theme.border_normal = "#00000000"
theme.border_focus = "#002F5F"
theme.border_marked = theme.fg_urgent
-- Panel Sizing
theme.top_panel_height = dpi(30)
theme.top_panel_powerline = "#002F5F"
-- Taglist
theme.taglist_bg_focus = theme.top_panel_powerline
-- Notification Sizing
theme.notification_max_width = dpi(350)
-- System Tray
theme.bg_systray = theme.top_panel_powerline
theme.systray_icon_spacing = dpi(15)
-- return theme
return theme

View File

@ -1,22 +0,0 @@
local mouse_utils = {}
function mouse_utils.move_mouse_onto_focused_client()
local c = client.focus
if c then
local geometry = c:geometry()
local mouse_coords = mouse.coords()
local margin = 10
-- Don't move the mouse if it's already over the client
if not (mouse_coords.x > geometry.x - margin
and mouse_coords.x < geometry.x + geometry.width + margin
and mouse_coords.y > geometry.y - margin
and mouse_coords.y < geometry.y + geometry.height + margin) then
local x = geometry.x + geometry.width/2
local y = geometry.y + geometry.height/2
mouse.coords({x = x, y = y}, true)
end
end
end
return mouse_utils

View File

@ -1,34 +0,0 @@
local lain = require("lain")
local wibox = require("wibox")
local beautiful = require("beautiful")
local dpi = beautiful.xresources.apply_dpi
-- ===================================================================
-- Helper functions
-- ===================================================================
local function powerline(widget, bgcolor, adjacentcolor, right)
right = right or false
local arrow = right and lain.util.separators.arrow_right or lain.util.separators.arrow_left
-- if (not right) then
-- table.insert(container, )
-- else
-- table.insert(container, )
-- end
return wibox.widget{
{
layout = wibox.layout.fixed.horizontal,
{
wibox.container.margin(widget, dpi(6), dpi(10), dpi(0), dpi(1)),
bg = bgcolor,
widget = wibox.container.background
},
arrow(bgcolor, adjacentcolor)
},
top = 0, bottom = 0, left = 0, right = 0,
widget = wibox.container.margin
}
end
return powerline

View File

@ -1,79 +0,0 @@
local awful = require("awful")
local beautiful = require("beautiful")
local gears = require("gears")
local mouse_utils = require("utils.mouse")
-- Focus clients under mouse
client.connect_signal("mouse::enter", function(c)
c:emit_signal("request::activate", "mouse_enter", {raise = false})
end)
client.connect_signal("manage", function (c)
-- Set the window as a slave (put it at the end of others instead of setting it as master)
if not awesome.startup then
awful.client.setslave(c)
end
if awesome.startup and not c.size_hints.user_position and not c.size_hints.program_position then
-- Prevent clients from being unreachable after screen count changes.
awful.placement.no_offscreen(c)
end
-- Unminimize and unmaximize the other clients
for _, o in ipairs(client.get()) do
o.minimized = false
o.maximized = false
o.fullscreen = false
end
gears.timer.delayed_call(function()
local geometry = c:geometry()
local x = geometry.x + geometry.width/2
local y = geometry.y + geometry.height/2
mouse.coords({x = x, y = y}, true)
end)
end)
-- Reload config when screen geometry changes
screen.connect_signal("property::geometry", awesome.restart)
-- ===================================================================
-- Garbage collection (allows for lower memory consumption)
-- ===================================================================
collectgarbage("setpause", 110)
collectgarbage("setstepmul", 1000)
client.connect_signal("property::maximized", function(focused)
local hide = focused.maximized or focused.fullscreen
for _, c in ipairs(client.get()) do
if not c.floating and c.screen == focused.screen and c.first_tag == focused.first_tag then
c.minimized = hide
end
end
focused.minimized = false
end)
client.connect_signal("unmanage", function(unmanaged)
if unmanaged.maximized then
for _, c in ipairs(client.get()) do
if not c.floating and c.screen == unmanaged.screen then
c.minimized = false
end
end
end
end)
client.connect_signal("focus", function(c)
if #c.screen.clients > 1 then
c.border_color = beautiful.border_focus
end
gears.timer.delayed_call(mouse_utils.move_mouse_onto_focused_client)
end)
client.connect_signal("unfocus", function(c)
c.border_color = beautiful.border_normal
end)

View File

@ -1,12 +0,0 @@
[global]
frame_color = "#00000000"
separator_color= frame
background = "#24273A"
foreground = "#ffffff"
font = "Ubuntu 10.5"
width = (0, 600)
padding = 15
origin = top-right
offset = 10x10
horizontal_padding = 20
gap_size = 15

View File

@ -1,26 +0,0 @@
[user]
email = email@thomasave.be
name = Thomas Avé
[alias]
s = status
a = add
[color]
ui = auto
[core]
excludesfile = ~/.gitignore
editor = nvim
[diff]
noprefix = true
[pull]
rebase = false
[push]
autoSetupRemote = true
[init]
defaultBranch = master
[credential]
helper = store
[filter "lfs"]
smudge = git-lfs smudge -- %f
process = git-lfs filter-process
required = true
clean = git-lfs clean -- %f

View File

@ -1,8 +0,0 @@
(
move_left: Some(( code: Char('h'), modifiers: ( bits: 0,),)),
move_right: Some(( code: Char('l'), modifiers: ( bits: 0,),)),
move_up: Some(( code: Char('k'), modifiers: ( bits: 0,),)),
move_down: Some(( code: Char('j'), modifiers: ( bits: 0,),)),
stash_open: Some(( code: Char('l'), modifiers: ( bits: 0,),)),
open_help: Some(( code: F(1), modifiers: ( bits: 0,),)),
)

View File

@ -1,23 +0,0 @@
(
selected_tab: Reset,
command_fg: White,
selection_bg: Blue,
selection_fg: White,
cmdbar_bg: Blue,
cmdbar_extra_lines_bg: Blue,
disabled_fg: DarkGray,
diff_line_add: Green,
diff_line_delete: Red,
diff_file_added: LightGreen,
diff_file_removed: LightRed,
diff_file_moved: LightMagenta,
diff_file_modified: Yellow,
commit_hash: Magenta,
commit_time: LightCyan,
commit_author: Green,
danger_fg: Red,
push_gauge_bg: Blue,
push_gauge_fg: Reset,
tag_fg: LightMagenta,
branch_fg: LightYellow,
)

View File

@ -1,13 +0,0 @@
theme = "base16_transparent"
[editor]
line-number = "relative"
mouse = true
[editor.cursor-shape]
insert = "bar"
normal = "block"
select = "underline"
[editor.file-picker]
hidden = false

View File

@ -1,61 +0,0 @@
{ config, pkgs, ... }:
{
home.username = "server";
home.homeDirectory = "/home/server";
home.stateVersion = "23.11"; # Please read the comment before changing.
targets.genericLinux.enable = true;
nixpkgs.config.allowUnfree = true;
# The home.packages option allows you to install Nix packages into your
# environment.
home.packages = [
pkgs.ctop
pkgs.nodejs
pkgs.luarocks
pkgs.jre
pkgs.stdenv.cc.cc.lib
# # It is sometimes useful to fine-tune packages, for example, by applying
# # overrides. You can do that directly here, just don't forget the
# # parentheses. Maybe you want to install Nerd Fonts with a limited number of
# # fonts?
# (pkgs.nerdfonts.override { fonts = [ "FantasqueSansMono" ]; })
# # You can also create simple shell scripts directly inside your
# # configuration. For example, this adds a command 'my-hello' to your
# # environment:
# (pkgs.writeShellScriptBin "my-hello" ''
# echo "Hello, ${config.home.username}!"
# '')
];
# Home Manager is pretty good at managing dotfiles. The primary way to manage
# plain files is through 'home.file'.
home.file = {
# # Building this configuration will create a copy of 'dotfiles/screenrc' in
# # the Nix store. Activating the configuration will then make '~/.screenrc' a
# # symlink to the Nix store copy.
# ".screenrc".source = dotfiles/screenrc;
# # You can also set the file content immediately.
# ".gradle/gradle.properties".text = ''
# org.gradle.console=verbose
# org.gradle.daemon.idletimeout=3600000
# '';
};
home.sessionVariables = {
EDITOR = "nvim";
LD_LIBRARY_PATH = "${pkgs.stdenv.cc.cc.lib}/lib";
};
programs.home-manager.enable = true;
programs.neovim = {
enable = true;
viAlias = true;
vimAlias = true;
defaultEditor = true;
};
}

View File

@ -1,172 +0,0 @@
env = WLR_NO_HARDWARE_CURSORS,1
env = TERMINAL,alacritty
$scripts = /home/user/.config/scripts
$mainMod = SUPER
monitor=DP-3,preferred,0x550,1
monitor=DP-2,preferred,1920x0,1
monitor=HDMI-A-1,preferred,5760x550,1
exec-once=hyprpaper
exec-once=wl-paste --type text --watch cliphist store
exec-once=wl-paste --type image --watch cliphist store
exec-once=/usr/lib/mate-polkit/polkit-mate-authentication-agent-1
exec-once=/usr/lib/kdeconnectd
exec-once=waybar
exec-once=hyprpm reload -n
# windowrulev2 = tile, class:.*
windowrulev2 = float, title:^(rofi)(.*)$
windowrulev2 = center, title:^(rofi)(.*)$
windowrulev2 = noborder, title:^(rofi)(.*)$
windowrulev2 = stayfocused, title:^()$,class:^(steam)$
windowrulev2 = minsize 1 1, title:^()$,class:^(steam)$
windowrulev2 = stayfocused, title:^()$,class:^(steam)$
windowrule = noanim,waybar
binds {
scroll_event_delay=1
}
input {
kb_layout = us
follow_mouse = 1
kb_options = compose:rctrl, caps:super, altwin:swap_alt_win
numlock_by_default = true
}
general {
gaps_in = 1
gaps_out = 5
border_size = 2
col.active_border = rgba(002f5fee)
col.inactive_border = rgba(ffffff00)
layout = dwindle
}
xwayland {
force_zero_scaling = true
}
misc {
disable_hyprland_logo = 1
}
decoration {
rounding = 1
blur {
enabled = false
}
}
animations {
enabled = yes
# Some default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more
bezier = myBezier, 0.05, 0.9, 0.1, 1.05
animation = windows, 1, 2, myBezier
animation = windowsOut, 1, 2, default, popin 80%
animation = border, 1, 2, default
animation = borderangle, 1, 2, default
animation = fade, 1, 2, default
animation = workspaces, 1, 1, default
}
dwindle {
preserve_split = yes
no_gaps_when_only = 1
force_split = 2
}
gestures {
# See https://wiki.hyprland.org/Configuring/Variables/ for more
workspace_swipe = on
workspace_swipe_invert = false
}
bindr = $mainMod, SUPER_L, exec, pkill rofi || rofi -show drun
bindr = $mainMod, SUPER_R, exec, pkill rofi || rofi -show drun
bind = $mainMod, return, exec, $scripts/launch_alacritty.sh $(hyprctl activewindow -j | jq .pid)
bind = $mainMod SHIFT, return, exec, alacritty
bind = $mainMod, Q, killactive,
bind = $mainMod, A, exec, nautilus
bind = $mainMod, S, exec, gnome-calendar
bind = $mainMod, B, exec, MOZ_ENABLE_WAYLAND=1 firefox
bind = $mainMod, M, fullscreen, 1
bind = $mainMod, F11, fullscreen
bind = $mainMod, F, togglefloating,
bind = $mainMod, SPACE, togglesplit, # dwindle
bind = CONTROL_L ALT_L, L, exec, swaylock
bind = $mainMod, C, exec, cliphist list | awk '{print $0, "\0icon\x1fcom.github.davidmhewitt.clipped"}' | rofi -dmenu -display-columns 2 | cliphist decode | wl-copy
bind = $mainMod, Y, exec, /home/user/.config/rofi/rofi-ykman.sh
bind = $mainMod, N, exec, /home/user/.config/rofi/rofi-ssh.sh
bind = $mainMod, Escape, exec, rofi -show power-menu -modi power-menu:$scripts/rofi-power-menu
bind = ,XF86MonBrightnessUp, exec, xbacklight -inc 10
bind = ,XF86MonBrightnessDown, exec, xbacklight -dec 10
bind = ,XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 10%+ --limit 1.0
bind = ,XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 10%-
bind = ,XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle
bind = ,mouse_right, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 1%+ --limit 1.0
bind = ,mouse_left, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 1%-
bind = ,XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle
bind = ,XF86AudioNext, exec, playerctl next
bind = ,XF86AudioPrev, exec, playerctl previous
bind = $mainMod,XF86AudioMute, exec, playerctl play-pause
bind = $mainMod,XF86AudioRaiseVolume, exec, playerctl next
bind = $mainMod,XF86AudioLowerVolume, exec, playerctl previous
bind = , Print, exec, grim -g "$(slurp -d)" - | wl-copy
# Move focus with mainMod + arrow keys
bind = $mainMod, H, exec, $scripts/vim-hypr-nav.sh l
bind = $mainMod, L, exec, $scripts/vim-hypr-nav.sh r
bind = $mainMod, K, exec, $scripts/vim-hypr-nav.sh u
bind = $mainMod, J, exec, $scripts/vim-hypr-nav.sh d
bind = $mainMod CONTROL_L, H, swapwindow, l
bind = $mainMod CONTROL_L, L, swapwindow, r
bind = $mainMod CONTROL_L, K, swapwindow, u
bind = $mainMod CONTROL_L, J, swapwindow, d
bind = $mainMod SHIFT, H, movewindow, l
bind = $mainMod SHIFT, L, movewindow, r
bind = $mainMod SHIFT, K, movewindow, u
bind = $mainMod SHIFT, J, movewindow, d
binde = $mainMod ALT, L, resizeactive, 20 0
binde = $mainMod ALT, H, resizeactive, -20 0
binde = $mainMod ALT, K, resizeactive, 0 -20
binde = $mainMod ALT, J, resizeactive, 0 20
bind = $mainMod, 1, split-workspace, 1
bind = $mainMod, 2, split-workspace, 2
bind = $mainMod, 3, split-workspace, 3
bind = $mainMod, 4, split-workspace, 4
bind = $mainMod, 5, split-workspace, 5
bind = $mainMod, 6, split-workspace, 6
bind = $mainMod, 7, split-workspace, 7
bind = $mainMod, 8, split-workspace, 8
bind = $mainMod, 9, split-workspace, 9
bind = $mainMod SHIFT, 1, split-movetoworkspace, 1
bind = $mainMod SHIFT, 2, split-movetoworkspace, 2
bind = $mainMod SHIFT, 3, split-movetoworkspace, 3
bind = $mainMod SHIFT, 4, split-movetoworkspace, 4
bind = $mainMod SHIFT, 5, split-movetoworkspace, 5
bind = $mainMod SHIFT, 6, split-movetoworkspace, 6
bind = $mainMod SHIFT, 7, split-movetoworkspace, 7
bind = $mainMod SHIFT, 8, split-movetoworkspace, 8
bind = $mainMod SHIFT, 9, split-movetoworkspace, 9
bind = $mainMod SHIFT, T, split-movetoworkspace, empty
bind = $mainMod, T, split-workspace, empty
# Scroll through existing workspaces with mainMod + scroll
bind = $mainMod, TAB, split-workspace, m+1
bind = $mainMod SHIFT, TAB, split-workspace, m-1
# Move/resize windows with mainMod + LMB/RMB and dragging
bindm = $mainMod, mouse:272, movewindow
bindm = $mainMod, mouse:273, resizewindow

View File

@ -1,6 +0,0 @@
ipc = off
splash = false
preload = ~/.config/awesome/images/wallpaper.png
wallpaper = DP-3,~/.config/awesome/images/wallpaper.png
wallpaper = DP-2,~/.config/awesome/images/wallpaper.png
wallpaper = HDMI-A-1,~/.config/awesome/images/wallpaper.png

View File

@ -1,184 +0,0 @@
set $mod Mod4
font pango:monospace 0
exec --no-startup-id "/home/user/.config/scripts/setup_display.sh"
exec_always --no-startup-id "feh --no-fehbg --bg-fill /home/user/.config/wallpaper/wallpaper.png"
exec --no-startup-id "picom -b"
exec_always --no-startup-id "killall polybar; polybar -r &"
exec --no-startup-id "nm-applet &"
exec_always --no-startup-id "xmodmap /home/user/.Xmodmap"
exec --no-startup-id xcape -e "Super_L=Super_L|XF86Launch5" -t 5000
bindsym --whole-window --border button7 exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +2%
bindsym --whole-window --border button6 exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -2%
bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +10%
bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -10%
bindsym $mod+XF86AudioMute exec --no-startup-id playerctl play-pause
bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle
bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle
bindsym XF86AudioNext exec --no-startup-id playerctl next
bindsym XF86AudioPrev exec --no-startup-id playerctl previous
bindsym $mod+XF86AudioRaiseVolume exec --no-startup-id playerctl next
bindsym $mod+XF86AudioLowerVolume exec --no-startup-id playerctl previous
bindsym $mod+XF86AudioMute exec --no-startup-id playerctl play-pause
bindsym XF86AudioPlay exec --no-startup-id playerctl play-pause
bindsym XF86MonBrightnessUp exec --no-startup-id brightnessctl s 10%+
bindsym XF86MonBrightnessDown exec --no-startup-id brightnessctl s 10%-
bindsym ctrl+Mod4+q exec systemctl suspend
bindsym ctrl+Mod1+l exec i3lockr --blur 25
# Use Mouse+$mod to drag floating windows to their wanted position
floating_modifier $mod
# move tiling windows via drag & drop by left-clicking into the title bar,
# or left-clicking anywhere into the window while holding the floating modifier.
tiling_drag modifier titlebar
# start a terminal
bindsym $mod+Return exec /home/user/.config/scripts/launch_alacritty.sh $(xprop -id $(xdotool getwindowfocus) | ag ^_NET_WM_PID | cut -d '=' -f 2)
bindsym $mod+minus split v; exec /home/user/.config/scripts/launch_alacritty.sh $(xprop -id $(xdotool getwindowfocus) | ag ^_NET_WM_PID | cut -d '=' -f 2)
bindsym $mod+bar split h; exec /home/user/.config/scripts/launch_alacritty.sh $(xprop -id $(xdotool getwindowfocus) | ag ^_NET_WM_PID | cut -d '=' -f 2)
# kill focused window
bindsym $mod+q kill
# start dmenu (a program launcher)
bindsym $mod+d exec "~/.config/scripts/toggle_rofi.sh"
bindsym $mod+XF86Launch5 exec "~/.config/scripts/toggle_rofi.sh"
bindsym $mod+Escape exec "rofi -show power-menu -modi power-menu:~/.config/scripts/rofi-power-menu"
bindsym XF86PowerOff exec "rofi -show power-menu -modi power-menu:~/.config/scripts/rofi-power-menu"
bindsym $mod+c exec CM_LAUNCHER=rofi-script rofi -modi "clipmenu:/usr/bin/clipmenu" -show clipmenu
bindsym $mod+b exec firefox
bindsym $mod+a exec nautilus
# change focus
bindsym $mod+h focus left
bindsym $mod+j focus down
bindsym $mod+k focus up
bindsym $mod+l focus right
# alternatively, you can use the cursor keys:
bindsym $mod+Left focus left
bindsym $mod+Down focus down
bindsym $mod+Up focus up
bindsym $mod+Right focus right
# move focused window
bindsym $mod+Shift+h move left
bindsym $mod+Shift+j move down
bindsym $mod+Shift+k move up
bindsym $mod+Shift+l move right
# alternatively, you can use the cursor keys:
bindsym $mod+Shift+Left move left
bindsym $mod+Shift+Down move down
bindsym $mod+Shift+Up move up
bindsym $mod+Shift+Right move right
# split in horizontal orientation
bindsym $mod+ctrl+l split h
# split in vertical orientation
bindsym $mod+ctrl+j split v
# change container layout (stacked, tabbed, toggle split)
# bindsym $mod+m exec "/home/user/.config/i3/toggle_maximize.sh"
bindsym $mod+m fullscreen toggle
# toggle tiling / floating
bindsym $mod+f floating toggle
# change focus between tiling / floating windows
bindsym $mod+space focus mode_toggle
# focus the child container
#bindsym $mod+d focus child
# Define names for default workspaces for which we configure key bindings later on.
# We use variables to avoid repeating the names in multiple places.
set $ws1 "1"
set $ws2 "2"
set $ws3 "3"
set $ws4 "4"
set $ws5 "5"
set $ws6 "6"
set $ws7 "7"
set $ws8 "8"
set $ws9 "9"
set $ws10 "10"
workspace 1 output DP-1
workspace 2 output primary
workspace 1 output DP-2
# switch to workspace
bindsym $mod+1 workspace number $ws1
bindsym $mod+2 workspace number $ws2
bindsym $mod+3 workspace number $ws3
bindsym $mod+4 workspace number $ws4
bindsym $mod+5 workspace number $ws5
bindsym $mod+6 workspace number $ws6
bindsym $mod+7 workspace number $ws7
bindsym $mod+8 workspace number $ws8
bindsym $mod+9 workspace number $ws9
bindsym $mod+0 workspace number $ws10
# move focused container to workspace
bindsym $mod+Shift+1 move container to workspace number $ws1; workspace number $ws1
bindsym $mod+Shift+2 move container to workspace number $ws2; workspace number $ws2
bindsym $mod+Shift+3 move container to workspace number $ws3; workspace number $ws3
bindsym $mod+Shift+4 move container to workspace number $ws4; workspace number $ws4
bindsym $mod+Shift+5 move container to workspace number $ws5; workspace number $ws5
bindsym $mod+Shift+6 move container to workspace number $ws6; workspace number $ws6
bindsym $mod+Shift+7 move container to workspace number $ws7; workspace number $ws7
bindsym $mod+Shift+8 move container to workspace number $ws8; workspace number $ws8
bindsym $mod+Shift+9 move container to workspace number $ws9; workspace number $ws9
bindsym $mod+Shift+0 move container to workspace number $ws10; workspace number $ws10
# reload the configuration file
bindsym $mod+Shift+c reload
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
bindsym $mod+Shift+r restart
# resize window (you can also use the mouse for that)
mode "resize" {
# These bindings trigger as soon as you enter the resize mode
# Pressing left will shrink the window's width.
# Pressing right will grow the window's width.
# Pressing up will shrink the window's height.
# Pressing down will grow the window's height.
bindsym h resize shrink width 10 px or 10 ppt
bindsym j resize grow height 10 px or 10 ppt
bindsym k resize shrink height 10 px or 10 ppt
bindsym l resize grow width 10 px or 10 ppt
# same bindings, but for the arrow keys
bindsym Left resize shrink width 10 px or 10 ppt
bindsym Down resize grow height 10 px or 10 ppt
bindsym Up resize shrink height 10 px or 10 ppt
bindsym Right resize grow width 10 px or 10 ppt
# back to normal: Enter or Escape or $mod+r
bindsym Return mode "default"
bindsym Escape mode "default"
bindsym $mod+r mode "default"
}
# Colors
client.focused #00000000 #00000000 #ffffff #2e9ef4 #002F5F
client.unfocused #00000000 #00000000 #ffffff #2e9ef4 #00000000
client.focused_inactive #00000000 #00000000 #ffffff #484e50 #00000000
bindsym $mod+r mode "resize"
# Hide the title bar
default_border pixel 2
default_floating_border pixel 2
# Useless gapps
gaps inner 5
smart_gaps on

View File

@ -1,15 +0,0 @@
ACTIVE_WORKSPACE=$(i3-msg -t get_workspaces | jq -r '.[] | select(.focused == true) | .name')
if [ $ACTIVE_WORKSPACE != fullscreen ]
then
i3-msg mark _maximized_window
gnome-terminal
i3-msg mark _placeholder_window
i3-msg [con_mark="_maximized_window"] focus
i3-msg move container to workspace fullscreen
i3-msg [con_mark="_maximized_window"] focus
else
i3-msg swap mark "_placeholder_window"
i3-msg [con_mark="_maximized_window"] focus
i3-msg unmark _maximized_window
i3-msg [con_mark="_placeholder_window"] kill
fi

View File

@ -1,22 +0,0 @@
background #000010
foreground #F8F8F2
cursor #bbbbbb
selection_background #b4d5ff
color0 #121212
color8 #545454
color1 #fa2573
color9 #f5669c
color2 #97e123
color10 #b0e05e
color3 #dfd460
color11 #fef26c
color4 #0f7fcf
color12 #00afff
color5 #8700ff
color13 #af87ff
color6 #42a7cf
color14 #50cdfe
color7 #bbbbbb
color15 #ffffff
selection_foreground #121212
background_opacity 0.3

View File

@ -1,13 +0,0 @@
# BEGIN_KITTY_THEME
# Molokai
include current-theme.conf
# END_KITTY_THEME
font_family Iosevka Term Extended
bold_font auto
italic_font auto
bold_italic_font auto
font_size 13
cursor_shape block
cursor_beam_thickness 10
scrollback_lines 100000

View File

@ -1,22 +0,0 @@
set icons true
set autoquit true
set mouse true
set number true
set relativenumber true
set cursorpreviewfmt ""
cmd q quit
map <backspace2> quit
map <c-e> half-up
map . set hidden!
map o $nvim -c "lua require(\"oil\").open(\"$PWD\")"
map - $nvim -c "lua require(\"oil\").open(\"$PWD\")"
map <enter> open
cmd jump ${{
res=$(zsh -c "source $HOME/.zshrc && find_global d")
lf -remote "send $id cd \"$res\""
}}
map <c-t> :jump <enter>

View File

@ -1,155 +0,0 @@
General usage
=============
::
mpv infile --o=outfile [--of=outfileformat] [--ofopts=formatoptions] [--orawts] \
[(any other mpv options)] \
--ovc=outvideocodec [--ovcopts=outvideocodecoptions] \
--oac=outaudiocodec [--oacopts=outaudiocodecoptions]
Help for these options is provided if giving help as parameter, as in::
mpv --ovc=help
The suboptions of these generally are identical to ffmpeg's (as option parsing
is simply delegated to ffmpeg). The option --ocopyts enables copying timestamps
from the source as-is, instead of fixing them to match audio playback time
(note: this doesn't work with all output container formats); --orawts even turns
off discontinuity fixing.
Note that if neither --ofps nor --oautofps is specified, VFR encoding is assumed
and the time base is 24000fps. --oautofps sets --ofps to a guessed fps number
from the input video. Note that not all codecs and not all formats support VFR
encoding, and some which do have bugs when a target bitrate is specified - use
--ofps or --oautofps to force CFR encoding in these cases.
Of course, the options can be stored in a profile, like this .config/mpv/mpv.conf
section::
[myencprofile]
vf-add = scale=480:-2
ovc = libx264
ovcopts-add = preset=medium
ovcopts-add = tune=fastdecode
ovcopts-add = crf=23
ovcopts-add = maxrate=1500k
ovcopts-add = bufsize=1000k
ovcopts-add = rc_init_occupancy=900k
ovcopts-add = refs=2
ovcopts-add = profile=baseline
oac = aac
oacopts-add = b=96k
It's also possible to define default encoding options by putting them into
the section named ``[encoding]``. (This behavior changed after mpv 0.3.x. In
mpv 0.3.x, config options in the default section / no section were applied
to encoding. This is not the case anymore.)
One can then encode using this profile using the command::
mpv infile --o=outfile.mp4 --profile=myencprofile
Some example profiles are provided in a file
etc/encoding-profiles.conf; as for this, see below.
Encoding examples
=================
These are some examples of encoding targets this code has been used and tested
for.
Typical MPEG-4 Part 2 ("ASP", "DivX") encoding, AVI container::
mpv infile --o=outfile.avi \
--vf=fps=25 \
--ovc=mpeg4 --ovcopts=qscale=4 \
--oac=libmp3lame --oacopts=b=128k
Note: AVI does not support variable frame rate, so the fps filter must be used.
The frame rate should ideally match the input (25 for PAL, 24000/1001 or
30000/1001 for NTSC)
Typical MPEG-4 Part 10 ("AVC", "H.264") encoding, Matroska (MKV) container::
mpv infile --o=outfile.mkv \
--ovc=libx264 --ovcopts=preset=medium,crf=23,profile=baseline \
--oac=libopus --oacopts=qscale=3
Typical MPEG-4 Part 10 ("AVC", "H.264") encoding, MPEG-4 (MP4) container::
mpv infile --o=outfile.mp4 \
--ovc=libx264 --ovcopts=preset=medium,crf=23,profile=baseline \
--oac=aac --oacopts=b=128k
Typical VP8 encoding, WebM (restricted Matroska) container::
mpv infile -o outfile.mkv \
--of=webm \
--ovc=libvpx --ovcopts=qmin=6,b=1000000k \
--oac=libopus --oacopts=qscale=3
Device targets
==============
As the options for various devices can get complex, profiles can be used.
An example profile file for encoding is provided in
etc/encoding-profiles.conf in the source tree. This file is installed and loaded
by default. If you want to modify it, you can replace and it with your own copy
by doing::
mkdir -p ~/.mpv
cp /etc/mpv/encoding-profiles.conf ~/.mpv/encoding-profiles.conf
Keep in mind that the default profile is the playback one. If you want to add
options that apply only in encoding mode, put them into a ``[encoding]``
section.
Refer to the top of that file for more comments - in a nutshell, the following
options are added by it::
--profile=enc-to-dvdpal # DVD-Video PAL, use dvdauthor -v pal+4:3 -a ac3+en
--profile=enc-to-dvdntsc # DVD-Video NTSC, use dvdauthor -v ntsc+4:3 -a ac3+en
--profile=enc-to-bb-9000 # MP4 for Blackberry Bold 9000
--profile=enc-to-nok-6300 # 3GP for Nokia 6300
--profile=enc-to-psp # MP4 for PlayStation Portable
--profile=enc-to-iphone # MP4 for iPhone
--profile=enc-to-iphone-4 # MP4 for iPhone 4 (double res)
--profile=enc-to-iphone-5 # MP4 for iPhone 5 (even larger res)
You can encode using these with a command line like::
mpv infile --o=outfile.mp4 --profile=enc-to-bb-9000
Of course, you are free to override options set by these profiles by specifying
them after the -profile option.
What works
==========
* Encoding at variable frame rate (default)
* Encoding at constant frame rate using --vf=fps=RATE
* 2-pass encoding (specify flags=+pass1 in the first pass's --ovcopts, specify
flags=+pass2 in the second pass)
* Hardcoding subtitles using vobsub, ass or srt subtitle rendering (just
configure mpv for the subtitles as usual)
* Hardcoding any other mpv OSD (e.g. time codes, using --osdlevel=3 and
--vf=expand=::::1)
* Encoding directly from a DVD, network stream, webcam, or any other source
mpv supports
* Using x264 presets/tunings/profiles (by using profile=, tune=, preset= in the
--ovcopts)
* Deinterlacing/Inverse Telecine with any of mpv's filters for that
* Audio file converting: mpv --o=outfile.m4a infile.flac --no-video
--oac=aac --oacopts=b=320k
What does not work yet
======================
* 3-pass encoding (ensuring constant total size and bitrate constraints while
having VBR audio; mencoder calls this "frameno")
* Direct stream copy

View File

@ -1,179 +0,0 @@
# mpv keybindings
#
# Location of user-defined bindings: ~/.config/mpv/input.conf
#
# Lines starting with # are comments. Use SHARP to assign the # key.
# Copy this file and uncomment and edit the bindings you want to change.
#
# List of commands and further details: DOCS/man/input.rst
# List of special keys: --input-keylist
# Keybindings testing mode: mpv --input-test --force-window --idle
#
# Use 'ignore' to unbind a key fully (e.g. 'ctrl+a ignore').
#
# Strings need to be quoted and escaped:
# KEY show-text "This is a single backslash: \\ and a quote: \" !"
#
# You can use modifier-key combinations like Shift+Left or Ctrl+Alt+x with
# the modifiers Shift, Ctrl, Alt and Meta (may not work on the terminal).
#
# The default keybindings are hardcoded into the mpv binary.
# You can disable them completely with: --no-input-default-bindings
# Developer note:
# On compilation, this file is baked into the mpv binary, and all lines are
# uncommented (unless '#' is followed by a space) - thus this file defines the
# default key bindings.
# If this is enabled, treat all the following bindings as default.
#default-bindings start
#MBTN_LEFT ignore # don't do anything
#MBTN_LEFT_DBL cycle fullscreen # toggle fullscreen
#MBTN_RIGHT cycle pause # toggle pause/playback mode
#MBTN_BACK playlist-prev # skip to the previous file
#MBTN_FORWARD playlist-next # skip to the next file
# Mouse wheels, touchpad or other input devices that have axes
# if the input devices supports precise scrolling it will also scale the
# numeric value accordingly
#WHEEL_UP seek 10 # seek 10 seconds forward
#WHEEL_DOWN seek -10 # seek 10 seconds backward
#WHEEL_LEFT add volume -2
#WHEEL_RIGHT add volume 2
## Seek units are in seconds, but note that these are limited by keyframes
#RIGHT seek 5 # seek 5 seconds forward
#LEFT seek -5 # seek 5 seconds backward
#UP seek 60 # seek 1 minute forward
#DOWN seek -60 # seek 1 minute backward
# Do smaller, always exact (non-keyframe-limited), seeks with shift.
# Don't show them on the OSD (no-osd).
#Shift+RIGHT no-osd seek 1 exact # seek exactly 1 second forward
#Shift+LEFT no-osd seek -1 exact # seek exactly 1 second backward
#Shift+UP no-osd seek 5 exact # seek exactly 5 seconds forward
#Shift+DOWN no-osd seek -5 exact # seek exactly 5 seconds backward
#Ctrl+LEFT no-osd sub-seek -1 # seek to the previous subtitle
#Ctrl+RIGHT no-osd sub-seek 1 # seek to the next subtitle
#Ctrl+Shift+LEFT sub-step -1 # change subtitle timing such that the previous subtitle is displayed
#Ctrl+Shift+RIGHT sub-step 1 # change subtitle timing such that the next subtitle is displayed
#Alt+left add video-pan-x 0.1 # move the video right
#Alt+right add video-pan-x -0.1 # move the video left
#Alt+up add video-pan-y 0.1 # move the video down
#Alt+down add video-pan-y -0.1 # move the video up
#Alt++ add video-zoom 0.1 # zoom in
#Alt+- add video-zoom -0.1 # zoom out
#Alt+BS set video-zoom 0 ; set video-pan-x 0 ; set video-pan-y 0 # reset zoom and pan settings
#PGUP add chapter 1 # seek to the next chapter
#PGDWN add chapter -1 # seek to the previous chapter
#Shift+PGUP seek 600 # seek 10 minutes forward
#Shift+PGDWN seek -600 # seek 10 minutes backward
#[ multiply speed 1/1.1 # decrease the playback speed
#] multiply speed 1.1 # increase the playback speed
#{ multiply speed 0.5 # halve the playback speed
#} multiply speed 2.0 # double the playback speed
#BS set speed 1.0 # reset the speed to normal
#Shift+BS revert-seek # undo the previous (or marked) seek
#Shift+Ctrl+BS revert-seek mark # mark the position for revert-seek
#q quit
#Q quit-watch-later # exit and remember the playback position
#q {encode} quit 4
#ESC set fullscreen no # leave fullscreen
#ESC {encode} quit 4
#p cycle pause # toggle pause/playback mode
#. frame-step # advance one frame and pause
#, frame-back-step # go back by one frame and pause
#SPACE cycle pause # toggle pause/playback mode
#> playlist-next # skip to the next file
#ENTER playlist-next # skip to the next file
#< playlist-prev # skip to the previous file
#O no-osd cycle-values osd-level 3 1 # toggle displaying the OSD on user interaction or always
#o show-progress # show playback progress
#P show-progress # show playback progress
#i script-binding stats/display-stats # display information and statistics
#I script-binding stats/display-stats-toggle # toggle displaying information and statistics
#` script-binding console/enable # open the console
#z add sub-delay -0.1 # shift subtitles 100 ms earlier
#Z add sub-delay +0.1 # delay subtitles by 100 ms
#x add sub-delay +0.1 # delay subtitles by 100 ms
#ctrl++ add audio-delay 0.100 # change audio/video sync by delaying the audio
#ctrl+- add audio-delay -0.100 # change audio/video sync by shifting the audio earlier
#Shift+g add sub-scale +0.1 # increase the subtitle font size
#Shift+f add sub-scale -0.1 # decrease the subtitle font size
#9 add volume -2
#/ add volume -2
#0 add volume 2
#* add volume 2
#m cycle mute # toggle mute
#1 add contrast -1
#2 add contrast 1
#3 add brightness -1
#4 add brightness 1
#5 add gamma -1
#6 add gamma 1
#7 add saturation -1
#8 add saturation 1
#Alt+0 set current-window-scale 0.5 # halve the window size
#Alt+1 set current-window-scale 1.0 # reset the window size
#Alt+2 set current-window-scale 2.0 # double the window size
#d cycle deinterlace # toggle the deinterlacing filter
#r add sub-pos -1 # move subtitles up
#R add sub-pos +1 # move subtitles down
#t add sub-pos +1 # move subtitles down
#v cycle sub-visibility # hide or show the subtitles
#Alt+v cycle secondary-sub-visibility # hide or show the secondary subtitles
#V cycle sub-ass-vsfilter-aspect-compat # toggle stretching SSA/ASS subtitles with anamorphic videos to match the historical renderer
#u cycle-values sub-ass-override "force" "no" # toggle overriding SSA/ASS subtitle styles with the normal styles
#j cycle sub # switch subtitle track
#J cycle sub down # switch subtitle track backwards
#SHARP cycle audio # switch audio track
#_ cycle video # switch video track
#T cycle ontop # toggle placing the video on top of other windows
#f cycle fullscreen # toggle fullscreen
#s screenshot # take a screenshot of the video in its original resolution with subtitles
#S screenshot video # take a screenshot of the video in its original resolution without subtitles
#Ctrl+s screenshot window # take a screenshot of the window with OSD and subtitles
#Alt+s screenshot each-frame # automatically screenshot every frame; issue this command again to stop taking screenshots
#w add panscan -0.1 # decrease panscan
#W add panscan +0.1 # shrink black bars by cropping the video
#e add panscan +0.1 # shrink black bars by cropping the video
#A cycle-values video-aspect-override "16:9" "4:3" "2.35:1" "-1" # cycle the video aspect ratio ("-1" is the container aspect)
#POWER quit
#PLAY cycle pause # toggle pause/playback mode
#PAUSE cycle pause # toggle pause/playback mode
#PLAYPAUSE cycle pause # toggle pause/playback mode
#PLAYONLY set pause no # unpause
#PAUSEONLY set pause yes # pause
#STOP quit
#FORWARD seek 60 # seek 1 minute forward
#REWIND seek -60 # seek 1 minute backward
#NEXT playlist-next # skip to the next file
#PREV playlist-prev # skip to the previous file
#VOLUME_UP add volume 2
#VOLUME_DOWN add volume -2
#MUTE cycle mute # toggle mute
#CLOSE_WIN quit
#CLOSE_WIN {encode} quit 4
#ctrl+w quit
#E cycle edition # switch edition
#l ab-loop # set/clear A-B loop points
#L cycle-values loop-file "inf" "no" # toggle infinite looping
#ctrl+c quit 4
#DEL script-binding osc/visibility # cycle OSC visibility between never, auto (mouse-move) and always
#ctrl+h cycle-values hwdec "auto" "no" # toggle hardware decoding
#F8 show-text ${playlist} # show the playlist
#F9 show-text ${track-list} # show the list of video, audio and sub tracks
#
# Legacy bindings (may or may not be removed in the future)
#
#! add chapter -1 # seek to the previous chapter
#@ add chapter 1 # seek to the next chapter
#
# Not assigned by default
# (not an exhaustive list of unbound commands)
#
# ? cycle sub-forced-only # toggle DVD forced subs
# ? stop # stop playback (quit or enter idle mode)

View File

@ -1,93 +0,0 @@
##
## MPlayer-style key bindings
##
## Save it as ~/.config/mpv/input.conf to use it.
##
## Generally, it's recommended to use this as reference-only.
##
RIGHT seek +10
LEFT seek -10
DOWN seek -60
UP seek +60
PGUP seek 600
PGDWN seek -600
m cycle mute
SHARP cycle audio # switch audio streams
+ add audio-delay 0.100
= add audio-delay 0.100
- add audio-delay -0.100
[ multiply speed 0.9091 # scale playback speed
] multiply speed 1.1
{ multiply speed 0.5
} multiply speed 2.0
BS set speed 1.0 # reset speed to normal
q quit
ESC quit
ENTER playlist-next force # skip to next file
p cycle pause
. frame-step # advance one frame and pause
SPACE cycle pause
HOME set playlist-pos 0 # not the same as MPlayer
#END pt_up_step -1
> playlist-next # skip to next file
< playlist-prev # previous
#INS alt_src_step 1
#DEL alt_src_step -1
o osd
I show-text "${filename}" # display filename in osd
P show-progress
z add sub-delay -0.1 # subtract 100 ms delay from subs
x add sub-delay +0.1 # add
9 add volume -1
/ add volume -1
0 add volume 1
* add volume 1
1 add contrast -1
2 add contrast 1
3 add brightness -1
4 add brightness 1
5 add hue -1
6 add hue 1
7 add saturation -1
8 add saturation 1
( add balance -0.1 # adjust audio balance in favor of left
) add balance +0.1 # right
d cycle framedrop
D cycle deinterlace # toggle deinterlacer (auto-inserted filter)
r add sub-pos -1 # move subtitles up
t add sub-pos +1 # down
#? sub-step +1 # immediately display next subtitle
#? sub-step -1 # previous
#? add sub-scale +0.1 # increase subtitle font size
#? add sub-scale -0.1 # decrease subtitle font size
f cycle fullscreen
T cycle ontop # toggle video window ontop of other windows
w add panscan -0.1 # zoom out with -panscan 0 -fs
e add panscan +0.1 # in
c cycle stream-capture # save (and append) file/stream to stream.dump with -capture
s screenshot # take a screenshot (if you want PNG, use "--screenshot-format=png")
S screenshot - each-frame # S will take a png screenshot of every frame
h cycle tv-channel 1
l cycle tv-channel -1
n cycle tv-norm
#b tv_step_chanlist
#? add chapter -1 # skip to previous dvd chapter
#? add chapter +1 # next
##
## Advanced seek
## Uncomment the following lines to be able to seek to n% of the media with
## the Fx keys.
##
#F1 seek 10 absolute-percent
#F2 seek 20 absolute-percent
#F3 seek 30 absolute-percent
#F4 seek 40 absolute-percent
#F5 seek 50 absolute-percent
#F6 seek 60 absolute-percent
#F7 seek 70 absolute-percent
#F8 seek 80 absolute-percent
#F9 seek 90 absolute-percent

View File

@ -1,157 +0,0 @@
#
# Example mpv configuration file
#
# Warning:
#
# The commented example options usually do _not_ set the default values. Call
# mpv with --list-options to see the default values for most options. There is
# no builtin or example mpv.conf with all the defaults.
#
#
# Configuration files are read system-wide from /usr/local/etc/mpv.conf
# and per-user from ~/.config/mpv/mpv.conf, where per-user settings override
# system-wide settings, all of which are overridden by the command line.
#
# Configuration file settings and the command line options use the same
# underlying mechanisms. Most options can be put into the configuration file
# by dropping the preceding '--'. See the man page for a complete list of
# options.
#
# Lines starting with '#' are comments and are ignored.
#
# See the CONFIGURATION FILES section in the man page
# for a detailed description of the syntax.
#
# Profiles should be placed at the bottom of the configuration file to ensure
# that settings wanted as defaults are not restricted to specific profiles.
##################
# video settings #
##################
# Start in fullscreen mode by default.
#fs=yes
# force starting with centered window
#geometry=50%:50%
# don't allow a new window to have a size larger than 90% of the screen size
#autofit-larger=90%x90%
# Do not close the window on exit.
#keep-open=yes
# Do not wait with showing the video window until it has loaded. (This will
# resize the window once video is loaded. Also always shows a window with
# audio.)
#force-window=immediate
# Disable the On Screen Controller (OSC).
#osc=no
# Keep the player window on top of all other windows.
#ontop=yes
# Specify high quality video rendering preset (for --vo=gpu only)
# Can cause performance problems with some drivers and GPUs.
#profile=gpu-hq
# Force video to lock on the display's refresh rate, and change video and audio
# speed to some degree to ensure synchronous playback - can cause problems
# with some drivers and desktop environments.
#video-sync=display-resample
# Enable hardware decoding if available. Often, this does not work with all
# video outputs, but should work well with default settings on most systems.
# If performance or energy usage is an issue, forcing the vdpau or vaapi VOs
# may or may not help.
#hwdec=auto
##################
# audio settings #
##################
# Specify default audio device. You can list devices with: --audio-device=help
# The option takes the device string (the stuff between the '...').
#audio-device=alsa/default
# Do not filter audio to keep pitch when changing playback speed.
#audio-pitch-correction=no
# Output 5.1 audio natively, and upmix/downmix audio with a different format.
#audio-channels=5.1
# Disable any automatic remix, _if_ the audio output accepts the audio format.
# of the currently played file. See caveats mentioned in the manpage.
# (The default is "auto-safe", see manpage.)
#audio-channels=auto
##################
# other settings #
##################
# Pretend to be a web browser. Might fix playback with some streaming sites,
# but also will break with shoutcast streams.
#user-agent="Mozilla/5.0"
# cache settings
#
# Use a large seekable RAM cache even for local input.
#cache=yes
#
# Use extra large RAM cache (needs cache=yes to make it useful).
#demuxer-max-bytes=500M
#demuxer-max-back-bytes=100M
#
# Disable the behavior that the player will pause if the cache goes below a
# certain fill size.
#cache-pause=no
#
# Store cache payload on the hard disk instead of in RAM. (This may negatively
# impact performance unless used for slow input such as network.)
#cache-dir=~/.cache/
#cache-on-disk=yes
# Display English subtitles if available.
#slang=en
# Play Finnish audio if available, fall back to English otherwise.
#alang=fi,en
# Change subtitle encoding. For Arabic subtitles use 'cp1256'.
# If the file seems to be valid UTF-8, prefer UTF-8.
# (You can add '+' in front of the codepage to force it.)
#sub-codepage=cp1256
# You can also include other configuration files.
#include=/path/to/the/file/you/want/to/include
############
# Profiles #
############
# The options declared as part of profiles override global default settings,
# but only take effect when the profile is active.
# The following profile can be enabled on the command line with: --profile=eye-cancer
#[eye-cancer]
#sharpen=5
osc=no
save-position-on-quit=yes
sub-auto=fuzzy
profile=gpu-hq
scale=ewa_lanczossharp
cscale=ewa_lanczossharp
video-sync=display-resample
interpolation
tscale=oversample
hwdec=auto
force-window=yes
[Idle]
profile-cond=p["idle-active"]
profile-restore=copy-equal
title=' '
keepaspect=no
background=1

View File

@ -1,61 +0,0 @@
# This file contains all bindings that were removed after a certain release.
# If you want MPlayer bindings, use mplayer-input.conf
# Pick the bindings you want back and add them to your own input.conf. Append
# this file to your input.conf if you want them all back:
#
# cat restore-old-bindings.conf >> ~/.config/mpv/input.conf
#
# Older installations use ~/.mpv/input.conf instead.
# changed in mpv 0.27.0 (macOS and Wayland only)
# WHEEL_UP seek 10
# WHEEL_DOWN seek -10
# WHEEL_LEFT seek 5
# WHEEL_RIGHT seek -5
# changed in mpv 0.26.0
h cycle tv-channel -1 # previous channel
k cycle tv-channel +1 # next channel
H cycle dvb-channel-name -1 # previous channel
K cycle dvb-channel-name +1 # next channel
I show-text "${filename}" # display filename in osd
# changed in mpv 0.24.0
L cycle-values loop "inf" "no"
# changed in mpv 0.10.0
O osd
D cycle deinterlace
d cycle framedrop
# changed in mpv 0.7.0
ENTER playlist-next force
# changed in mpv 0.6.0
ESC quit
# changed in mpv 0.5.0
PGUP seek 600
PGDWN seek -600
RIGHT seek 10
LEFT seek -10
+ add audio-delay 0.100
- add audio-delay -0.100
( add balance -0.1
) add balance 0.1
F cycle sub-forced-only
TAB cycle program
A cycle angle
U stop
o osd
I show-text "${filename}"

View File

@ -1,657 +0,0 @@
This file intends to give a big picture overview of how mpv is structured.
player/*.c:
Essentially makes up the player applications, including the main() function
and the playback loop.
Generally, it accesses all other subsystems, initializes them, and pushes
data between them during playback.
The structure is as follows (as of commit e13c05366557cb):
* main():
* basic initializations (e.g. init_libav() and more)
* pre-parse command line (verbosity level, config file locations)
* load config files (parse_cfgfiles())
* parse command line, add files from the command line to playlist
(m_config_parse_mp_command_line())
* check help options etc. (call handle_help_options()), possibly exit
* call mp_play_files() function that works down the playlist:
* run idle loop (idle_loop()), until there are files in the
playlist or an exit command was given (only if --idle it set)
* actually load and play a file in play_current_file():
* run all the dozens of functions to load the file and
initialize playback
* run a small loop that does normal playback, until the file is
done or a command terminates playback
(on each iteration, run_playloop() is called, which is rather
big and complicated - it decodes some audio and video on
each frame, waits for input, etc.)
* uninitialize playback
* determine next entry on the playlist to play
* loop, or exit if no next file or quit is requested
(see enum stop_play_reason)
* call mp_destroy()
* run_playloop():
* calls fill_audio_out_buffers()
This checks whether new audio needs to be decoded, and pushes it
to the AO.
* calls write_video()
Decode new video, and push it to the VO.
* determines whether playback of the current file has ended
* determines when to start playback after seeks
* and calls a whole lot of other stuff
(Really, this function does everything.)
Things worth saying about the playback core:
- most state is in MPContext (core.h), which is not available to the
subsystems (and should not be made available)
- the currently played tracks are in mpctx->current_tracks, and decoder
state in track.dec/d_sub
- the other subsystems rarely call back into the frontend, and the frontend
polls them instead (probably a good thing)
- one exceptions are wakeup callbacks, which notify a "higher" component
of a changed situation in a subsystem
I like to call the player/*.c files the "frontend".
ta.h & ta.c:
Hierarchical memory manager inspired by talloc from Samba. It's like a
malloc() with more features. Most importantly, each talloc allocation can
have a parent, and if the parent is free'd, all children will be free'd as
well. The parent is an arbitrary talloc allocation. It's either set by the
allocation call by passing a talloc parent, usually as first argument to the
allocation function. It can also be set or reset later by other calls (at
least talloc_steal()). A talloc allocation that is used as parent is often
called a talloc context.
One very useful feature of talloc is fast tracking of memory leaks. ("Fast"
as in it doesn't require valgrind.) You can enable it by setting the
MPV_LEAK_REPORT environment variable to "1":
export MPV_LEAK_REPORT=1
Or permanently by building with --enable-ta-leak-report.
This will list all unfree'd allocations on exit.
Documentation can be found here:
http://git.samba.org/?p=samba.git;a=blob;f=lib/talloc/talloc.h;hb=HEAD
For some reason, we're still using API-compatible wrappers instead of TA
directly. The talloc wrapper has only a subset of the functionality, and
in particular the wrappers abort() on memory allocation failure.
Note: unlike tcmalloc, jemalloc, etc., talloc() is not actually a malloc
replacement. It works on top of system malloc and provides additional
features that are supposed to make memory management easier.
player/command.c:
This contains the implementation for client API commands and properties.
Properties are essentially dynamic variables changed by certain commands.
This is basically responsible for all user commands, like initiating
seeking, switching tracks, etc. It calls into other player/*.c files,
where most of the work is done, but also calls other parts of mpv.
player/core.h:
Data structures and function prototypes for most of player/*.c. They are
usually not accessed by other parts of mpv for the sake of modularization.
player/client.c:
This implements the client API (libmpv/client.h). For the most part, this
just calls into other parts of the player. This also manages a ringbuffer
of events from player to clients.
options/options.h, options/options.c
options.h contains the global option struct MPOpts. The option declarations
(option names, types, and MPOpts offsets for the option parser) are in
options.c. Most default values for options and MPOpts are in
mp_default_opts at the end of options.c.
MPOpts is unfortunately quite monolithic, but is being incrementally broken
up into sub-structs. Many components have their own sub-option structs
separate from MPOpts. New options should be bound to the component that uses
them. Add a new option table/struct if needed.
The global MPOpts still contains the sub-structs as fields, which serves to
link them to the option parser. For example, an entry like this may be
typical:
{"", OPT_SUBSTRUCT(demux_opts, demux_conf)},
This directs the option access code to include all options in demux_conf
into the global option list, with no prefix (""), and as part of the
MPOpts.demux_opts field. The MPOpts.demux_opts field is actually not
accessed anywhere, and instead demux.c does this:
struct m_config_cache *opts_cache =
m_config_cache_alloc(demuxer, global, &demux_conf);
struct demux_opts *opts = opts_cache->opts;
... to get a copy of its options.
See m_config.h (below) how to access options.
The actual option parser is spread over m_option.c, m_config.c, and
parse_commandline.c, and uses the option table in options.c.
options/m_config.h & m_config.c:
Code for querying and managing options. This (unfortunately) contains both
declarations for the "legacy-ish" global m_config struct, and ways to access
options in a threads-safe way anywhere, like m_config_cache_alloc().
m_config_cache_alloc() lets anyone read, observe, and write options in any
thread. The only state it needs is struct mpv_global, which is an opaque
type that can be passed "down" the component hierarchy. For safety reasons,
you should not pass down any pointers to option structs (like MPOpts), but
instead pass down mpv_global, and use m_config_cache_alloc() (or similar)
to get a synchronized copy of the options.
input/input.c:
This translates keyboard input coming from VOs and other sources (such
as remote control devices like Apple IR or client API commands) to the
key bindings listed in the user's (or the builtin) input.conf and turns
them into items of type struct mp_cmd. These commands are queued, and read
by playloop.c. They get pushed with run_command() to command.c.
Note that keyboard input and commands used by the client API are the same.
The client API only uses the command parser though, and has its own queue
of input commands somewhere else.
common/msg.h:
All terminal output must go through mp_msg().
stream/*:
File input is implemented here. stream.h/.c provides a simple stream based
interface (like reading a number of bytes at a given offset). mpv can
also play from http streams and such, which is implemented here.
E.g. if mpv sees "http://something" on the command line, it will pick
stream_lavf.c based on the prefix, and pass the rest of the filename to it.
Some stream inputs are quite special: stream_dvd.c turns DVDs into mpeg
streams (DVDs are actually a bunch of vob files etc. on a filesystem),
stream_tv.c provides TV input including channel switching.
Some stream inputs are just there to invoke special demuxers, like
stream_mf.c. (Basically to make the prefix "mf://" do something special.)
demux/:
Demuxers split data streams into audio/video/sub streams, which in turn
are split in packets. Packets (see demux_packet.h) are mostly byte chunks
tagged with a playback time (PTS). These packets are passed to the decoders.
Most demuxers have been removed from this fork, and the only important and
"actual" demuxers left are demux_mkv.c and demux_lavf.c (uses libavformat).
There are some pseudo demuxers like demux_cue.c.
The main interface is in demux.h. The stream headers are in stheader.h.
There is a stream header for each audio/video/sub stream, and each of them
holds codec information about the stream and other information.
demux.c is a bit big, the main reason being that it contains the demuxer
cache, which is implemented as a list of packets. The cache is complex
because it support seeking, multiple ranges, prefetching, and so on.
video/:
This contains several things related to audio/video decoding, as well as
video filters.
mp_image.h and img_format.h define how mpv stores decoded video frames
internally.
video/decode/:
vd_*.c are video decoders. (There's only vd_lavc.c left.) dec_video.c
handles most of connecting the frontend with the actual decoder.
video/filter/:
vf_*.c and vf.c form the video filter chain. They are fed by the video
decoder, and output the filtered images to the VOs though vf_vo.c. By
default, no video filters (except vf_vo) are used. vf_scale is automatically
inserted if the video output can't handle the video format used by the
decoder.
video/out/:
Video output. They also create GUI windows and handle user input. In most
cases, the windowing code is shared among VOs, like x11_common.c for X11 and
w32_common.c for Windows. The VOs stand between frontend and windowing code.
vo_gpu can pick a windowing system at runtime, e.g. the same binary can
provide both X11 and Cocoa support on OSX.
VOs can be reconfigured at runtime. A vo_reconfig() call can change the video
resolution and format, without destroying the window.
vo_gpu should be taken as reference.
audio/:
format.h/format.c define the uncompressed audio formats. (As well as some
compressed formats used for spdif.)
audio/decode/:
ad_*.c and dec_audio.c handle audio decoding. ad_lavc.c is the
decoder using ffmpeg. ad_spdif.c is not really a decoder, but is used for
compressed audio passthrough.
audio/filter/:
Audio filter chain. af_lavrresample is inserted if any form of conversion
between audio formats is needed.
audio/out/:
Audio outputs.
Unlike VOs, AOs can't be reconfigured on a format change. On audio format
changes, the AO will simply be closed and re-opened.
There are wrappers to support for two types of audio APIs: push.c and
pull.c. ao.c calls into one of these. They contain generic code to deal
with the data flow these APIs impose.
Note that mpv synchronizes the video to the audio. That's the reason
why buggy audio drivers can have a bad influence on playback quality.
sub/:
Contains subtitle and OSD rendering.
osd.c/.h is actually the OSD code. It queries dec_sub.c to retrieve
decoded/rendered subtitles. osd_libass.c is the actual implementation of
the OSD text renderer (which uses libass, and takes care of all the tricky
fontconfig/freetype API usage and text layouting).
The VOs call osd.c to render OSD and subtitle (via e.g. osd_draw()). osd.c
in turn asks dec_sub.c for subtitle overlay bitmaps, which relays the
request to one of the sd_*.c subtitle decoders/renderers.
Subtitle loading is in demux/. The MPlayer subreader.c is mostly gone - parts
of it survive in demux_subreader.c. It's used as last fallback, or to handle
some text subtitle types on Libav. It should go away eventually. Normally,
subtitles are loaded via demux_lavf.c.
The subtitles are passed to dec_sub.c and the subtitle decoders in sd_*.c
as they are demuxed. All text subtitles are rendered by sd_ass.c. If text
subtitles are not in the ASS format, the libavcodec subtitle converters are
used (lavc_conv.c).
Text subtitles can be preloaded, in which case they are read fully as soon
as the subtitle is selected. In this case, they are effectively stored in
sd_ass.c's internal state.
etc/:
The file input.conf is actually integrated into the mpv binary by the
build system. It contains the default keybindings.
Best practices and Concepts within mpv
======================================
General contribution etc.
-------------------------
See: DOCS/contribute.md
Error checking
--------------
If an error is relevant, it should be handled. If it's interesting, log the
error. However, mpv often keeps errors silent and reports failures somewhat
coarsely by propagating them upwards the caller chain. This is OK, as long as
the errors are not very interesting, or would require a developer to debug it
anyway (in which case using a debugger would be more convenient, and the
developer would need to add temporary debug printfs to get extremely detailed
information which would not be appropriate during normal operation).
Basically, keep a balance on error reporting. But always check them, unless you
have a good argument not to.
Memory allocation errors (OOM) are a special class of errors. Normally such
allocation failures are not handled "properly". Instead, abort() is called.
(New code should use MP_HANDLE_OOM() for this.) This is done out of laziness and
for convenience, and due to the fact that MPlayer/mplayer2 never handled it
correctly. (MPlayer varied between handling it correctly, trying to do so but
failing, and just not caring, while mplayer2 started using abort() for it.)
This is justifiable in a number of ways. Error handling paths are notoriously
untested and buggy, so merely having them won't make your program more reliable.
Having these error handling paths also complicates non-error code, due to the
need to roll back state at any point after a memory allocation.
Take any larger body of code, that is supposed to handle OOM, and test whether
the error paths actually work, for example by overriding malloc with a version
that randomly fails. You will find bugs quickly, and often they will be very
annoying to fix (if you can even reproduce them).
In addition, a clear indication that something went wrong may be missing. On
error your program may exhibit "degraded" behavior by design. Consider a video
encoder dropping frames somewhere in the middle of a video due to temporary
allocation failures, instead of just exiting with an errors. In other cases, it
may open conceptual security holes. Failing fast may be better.
mpv uses GPU APIs, which may be break on allocation errors (because driver
authors will have the same issues as described here), or don't even have a real
concept for dealing with OOM (OpenGL).
libmpv is often used by GUIs, which I predict always break if OOM happens.
Last but not least, OSes like Linux use "overcommit", which basically means that
your program may crash any time OOM happens, even if it doesn't use malloc() at
all!
But still, don't just assume malloc() always succeeds. Use MP_HANDLE_OOM(). The
ta* APIs do this for you. The reason for this is that dereferencing a NULL
pointer can have security relevant consequences if large offsets are involved.
Also, a clear error message is better than a random segfault.
Some big memory allocations are checked anyway. For example, all code must
assume that allocating video frames or packets can fail. (The above example
of dropping video frames during encoding is entirely possible in mpv.)
Undefined behavior
------------------
Undefined behavior (UB) is a concept in the C language. C is famous for being a
language that makes it almost impossible to write working code, because
undefined behavior is so easily triggered, compilers will happily abuse it to
generate "faster" code, debugging tools will shout at you, and sometimes it
even means your code doesn't work.
There is a lot of literature on this topic. Read it.
(In C's defense, UB exists in other languages too, but since they're not used
for low level infrastructure, and/or these languages are at times not rigorously
defined, simply nobody cares. However, the C standard committee is still guilty
for not addressing this. I'll admit that I can't even tell from the standard's
gibberish whether some specific behavior is UB or not. It's written like tax
law.)
In mpv, we generally try to avoid undefined behavior. For one, we want portable
and reliable operation. But more importantly, we want clean output from
debugging tools, in order to find real bugs more quickly and effectively.
Avoid the "works in practice" argument. Once debugging tools come into play, or
simply when "in practice" stops being true, this will all get back to you in a
bad way.
Global state, library safety
----------------------------
Mutable global state is when code uses global variables that are not read-only.
This must be avoided in mpv. Always use context structs that the caller of
your code needs to allocate, and whose pointers are passed to your functions.
Library safety means that your code (or library) can be used by a library
without causing conflicts with other library users in the same process. To any
piece of code, a "safe" library's API can simply be used, without having to
worry about other API users that may be around somewhere.
Libraries are often not library safe, because they use global mutable state
or other "global" resources. Typical examples include use of signals, simple
global variables (like hsearch() in libc), or internal caches not protected by
locks.
A surprisingly high number of libraries are not library safe because they need
global initialization. Typically they provide an API function, which
"initializes" the library, and which must be called before calling any other
API functions. Often, you are to provide global configuration parameters, which
can change the behavior of the library. If two libraries A and B use library C,
but A and B initialize C with different parameters, something "bad" may happen.
In addition, these global initialization functions are often not thread-safe. So
if A and B try to initialize C at the same time (from different threads and
without knowing about each other), it may cause undefined behavior. (libcurl is
a good example of both of these issues. FFmpeg and some TLS libraries used to be
affected, but improved.)
This is so bad because library A and B from the previous example most likely
have no way to cooperate, because they're from different authors and have no
business knowing each others. They'd need a library D, which wraps library C
in a safe way. Unfortunately, typically something worse happens: libraries get
"infected" by the unsafeness of its sub-libraries, and export a global init API
just to initialize the sub-libraries. In the previous example, libraries A and B
would export global init APIs just to init library C, even though the rest of
A/B are clean and library safe. (Again, libcurl is an example of this, if you
subtract other historic anti-features.)
The main problem with library safety is that its lack propagates to all
libraries using the library.
We require libmpv to be library safe. This is not really possible, because some
libraries are not library safe (FFmpeg, Xlib, partially ALSA). However, for
ideological reasons, there is no global init API, and best effort is made to try
to avoid problems.
libmpv has some features that are not library safe, but which are disabled by
default (such as terminal usage aka stdout, or JSON IPC blocking SIGPIPE for
internal convenience).
A notable, very disgustingly library unsafe behavior of libmpv is calling
abort() on some memory allocation failure. See error checking section.
Logging
-------
All logging and terminal output in mpv goes through the functions and macros
provided in common/msg.h. This is in part for library safety, and in part to
make sure users can silence all output, or to redirect the output elsewhere,
like a log file or the internal console.lua script.
Locking
-------
See generally available literature. In mpv, we use pthread for this.
Always keep locking clean. Don't skip locking just because it will work "in
practice". (See undefined behavior section.) If your use case is simple, you may
use C11 atomics (osdep/atomic.h for partial C99 support), but most likely you
will only hurt yourself and others.
Always make clear which fields in a struct are protected by which lock. If a
field is immutable, or simply not thread-safe (e.g. state for a single worker
thread), document it as well.
Internal mpv APIs are assumed to be not thread-safe by default. If they have
special guarantees (such as being usable by more than one thread at a time),
these should be explicitly documented.
All internal mpv APIs must be free of global state. Even if a component is not
thread-safe, multiple threads can use _different_ instances of it without any
locking.
On a side note, recursive locks may seem convenient at first, but introduce
additional problems with condition variables and locking hierarchies. They
should be avoided.
Locking hierarchy
-----------------
A simple way to avoid deadlocks with classic locking is to define a locking
hierarchy or lock order. If all threads acquire locks in the same order, no
deadlocks will happen.
For example, a "leaf" lock is a lock that is below all other locks in the
hierarchy. You can acquire it any time, as long as you don't acquire other
locks while holding it.
Unfortunately, C has no way to declare or check the lock order, so you should at
least document it.
In addition, try to avoid exposing locks to the outside. Making the declaration
of a lock private to a specific .c file (and _not_ exporting accessors or
lock/unlock functions that manipulate the lock) is a good idea. Your component's
API may acquire internal locks, but should release them when returning. Keeping
the entire locking in a single file makes it easy to check it.
Avoiding callback hell
----------------------
mpv code is separated in components, like the "frontend" (i.e. MPContext mpctx),
VOs, AOs, demuxers, and more. The frontend usually calls "down" the usage
hierarchy: mpctx almost on top, then things like vo/ao, and utility code on the
very bottom.
"Callback hell" is when components call both up and down the hierarchy,
which for example leads to accidentally recursion, reentrancy problems, or
locking nightmares. This is avoided by (mostly) calling only down the hierarchy.
Basically the call graph forms a DAG. The other direction is handled by event
queues, wakeup callbacks, and similar mechanisms.
Typically, a component provides an API, and does not know anything about its
user. The API user (component higher in the hierarchy) polls the state of the
lower component when needed.
This also enforces some level of modularization, and with some luck the locking
hierarchy. (Basically, locks of lower components automatically become leaf
locks.) Another positive effect is simpler memory management.
(Also see e.g.: http://250bpm.com/blog:24)
Wakeup callbacks
----------------
This is a common concept in mpv. Even the public API uses it. It's used when an
API has internal threads (or otherwise triggers asynchronous events), but the
component call hierarchy needs to be kept. The wakeup callback is the only
exception to the call hierarchy, and always calls up.
For example, vo spawns a thread that the API user (the mpv frontend) does not
need to know about. vo simply provides a single-threaded API (or that looks like
one). This API needs a way to notify the API user of new events. But the vo
event producer is on the vo thread - it can't simply invoke a callback back into
the API user, because then the API user has to deal with locking, despite not
using threads. In addition, this will probably cause problems like mentioned in
the "callback hell" section, especially lock order issues.
The solution is the wakeup callback. It merely unblocks the API user from
waiting, and the API user then uses the normal vo API to examine whether or
which state changed. As a concept, it documents what a wakeup callback is
allowed to do and what not, to avoid the aforementioned problems.
Generally, you are not allowed to call any API from the wakeup callback. You
just do whatever is needed to unblock your thread. For example, if it's waiting
on a mutex/condition variable, acquire the mutex, set a change flag, signal
the condition variable, unlock, return. (This mutex must not be held when
calling the API. It must be a leaf lock.)
Restricting the wakeup callback like this sidesteps any reentrancy issues and
other complexities. The API implementation can simply hold internal (and
non-recursive) locks while invoking the wakeup callback.
The API user still needs to deal with locking (probably), but there's only the
need to implement a single "receiver", that can handle the entire API of the
used component. (Or multiple APIs - MPContext for example has only 1 wakeup
callback that handles all AOs, VOs, input, demuxers, and more. It simple re-runs
the playloop.)
You could get something more advanced by turning this into a message queue. The
API would append a message to the queue, and the API user can read it. But then
you still need a way to "wakeup" the API user (unless you force the API user
to block on your API, which will make things inconvenient for the API user). You
also need to worry about what happens if the message queue overruns (you either
lose messages or have unbounded memory usage). In the mpv public API, the
distinction between message queue and wakeup callback is sort of blurry, because
it does provide a message queue, but an additional wakeup callback, so API
users are not required to call mpv_wait_event() with a high timeout.
mpv itself prefers using wakeup callbacks over a generic event queue, because
most times an event queue is not needed (or complicates things), and it is
better to do it manually.
(You could still abstract the API user side of wakeup callback handling, and
avoid reimplementing it all the time. Although mp_dispatch_queue already
provides mechanisms for this.)
Condition variables
-------------------
They're used whenever a thread needs to wait for something, without nonsense
like sleep calls or busy waiting. mpv uses the standard pthread API for this.
There's a lot of literature on it. Read it.
For initial understanding, it may be helpful to know that condition variables
are not variables that signal a condition. pthread_cond_t does not have any
state per-se. Maybe pthread_cond_t would better be named pthread_interrupt_t,
because its sole purpose is to interrupt a thread waiting via pthread_cond_wait()
(or similar). The "something" in "waiting for something" can be called
predicate (to avoid confusing it with "condition"). Consult literature for the
proper terms.
The very short version is...
Shared declarations:
pthread_mutex_t lock;
pthread_cond_t cond_var;
struct something state_var; // protected by lock, changes signaled by cond_var
Waiter thread:
pthread_mutex_lock(&lock);
// Wait for a change in state_var. We want to wait until predicate_fulfilled()
// returns true.
// Must be a loop for 2 reasons:
// 1. cond_var may be associated with other conditions too
// 2. pthread_cond_wait() can have sporadic wakeups
while (!predicate_fulfilled(&state_var)) {
// This unlocks, waits for cond_var to be signaled, and then locks again.
// The _whole_ point of cond_var is that unlocking and waiting for the
// signal happens atomically.
pthread_cond_wait(&cond_var, &lock);
}
// Here you may react to the state change. The state cannot change
// asynchronously as long as you still hold the lock (and didn't release
// and reacquire it).
// ...
pthread_mutex_unlock(&lock);
Signaler thread:
pthread_mutex_lock(&lock);
// Something changed. Update the shared variable with the new state.
update_state(&state_var);
// Notify that something changed. This will wake up the waiter thread if
// it's blocked in pthread_cond_wait(). If not, nothing happens.
pthread_cond_broadcast(&cond_var);
// Fun fact: good implementations wake up the waiter only when the lock is
// released, to reduce kernel scheduling overhead.
pthread_mutex_unlock(&lock);
Some basic rules:
1. Always access your state under proper locking
2. Always check your predicate before every call to pthread_cond_wait()
(And don't call pthread_cond_wait() if the predicate is fulfilled.)
3. Always call pthread_cond_wait() in a loop
(And only if your predicate failed without releasing the lock..)
4. Always call pthread_cond_broadcast()/_signal() inside of its associated
lock
mpv sometimes violates rule 3, and leaves "retrying" (i.e. looping) to the
caller.
Common pitfalls:
- Thinking that pthread_cond_t is some kind of semaphore, or holds any
application state or the user predicate (it _only_ wakes up threads
that are at the same time blocking on pthread_cond_wait() and friends,
nothing else)
- Changing the predicate, but not updating all pthread_cond_broadcast()/
_signal() calls correctly
- Forgetting that pthread_cond_wait() unlocks the lock (other threads can
and must acquire the lock)
- Holding multiple nested locks while trying to wait (=> deadlock, violates
the lock order anyway)
- Waiting for a predicate correctly, but unlocking/relocking before acting
on it (unlocking allows arbitrary state changes)
- Confusing which lock/condition var. is used to manage a bit of state
Generally available literature probably has better examples and explanations.
Using condition variables the proper way is generally preferred over using more
messy variants of them. (Just saying because on win32, "SetEvent" exists, and
it's inferior to condition variables. Try to avoid the win32 primitives, even if
you're dealing with Windows-only code.)
Threads
-------
Threading should be conservatively used. Normally, mpv code pretends to be
single-threaded, and provides thread-unsafe APIs. Threads are used coarsely,
and if you can avoid messing with threads, you should. For example, VOs and AOs
do not need to deal with threads normally, even though they run on separate
threads. The glue code "isolates" them from any threading issues.

View File

@ -1,46 +0,0 @@
{
"Comment.nvim": { "branch": "master", "commit": "0236521ea582747b58869cb72f70ccfa967d2e89" },
"bufferline.nvim": { "branch": "main", "commit": "f4b4b980ce88d546aeb69d11463187c8f716a1a1" },
"catppuccin": { "branch": "main", "commit": "a1439ad7c584efb3d0ce14ccb835967f030450fe" },
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
"cmp-cmdline": { "branch": "main", "commit": "d250c63aa13ead745e3a40f61fdd3470efde3923" },
"cmp-nvim-lsp": { "branch": "main", "commit": "5af77f54de1b16c34b23cba810150689a3a90312" },
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
"cmp-snippy": { "branch": "master", "commit": "6e39210aa3a74e2bf6462f492eaf0d436cd2b7d3" },
"copilot.lua": { "branch": "master", "commit": "f7612f5af4a7d7615babf43ab1e67a2d790c13a6" },
"diffview.nvim": { "branch": "main", "commit": "3dc498c9777fe79156f3d32dddd483b8b3dbd95f" },
"flash.nvim": { "branch": "main", "commit": "48817af25f51c0590653bbc290866e4890fe1cbe" },
"formatter.nvim": { "branch": "master", "commit": "ad246d34ce7a32f752071ed81b09b94e6b127fad" },
"gen.nvim": { "branch": "main", "commit": "87fbe811155b90eea58622614809705b966009ad" },
"lazy.nvim": { "branch": "main", "commit": "3f13f080434ac942b150679223d54f5ca91e0d52" },
"lualine.nvim": { "branch": "master", "commit": "0a5a66803c7407767b799067986b4dc3036e1983" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "273fdde8ac5e51f3a223ba70980e52bbc09d9f6f" },
"mason.nvim": { "branch": "main", "commit": "751b1fcbf3d3b783fcf8d48865264a9bcd8f9b10" },
"neogit": { "branch": "master", "commit": "98e6e855266282a3dd32e642ea14209b8787882a" },
"nvim-autopairs": { "branch": "master", "commit": "4f41e5940bc0443fdbe5f995e2a596847215cd2a" },
"nvim-cmp": { "branch": "main", "commit": "8f3c541407e691af6163e2447f3af1bd6e17f9a3" },
"nvim-lspconfig": { "branch": "master", "commit": "aa5f4f4ee10b2688fb37fa46215672441d5cd5d9" },
"nvim-neoclip.lua": { "branch": "main", "commit": "798cd0592a81c185465db3a091a0ff8a21af60fd" },
"nvim-snippy": { "branch": "master", "commit": "1184a8734e998649f3bb9a5db9efd4543282050b" },
"nvim-tree.lua": { "branch": "master", "commit": "59e65d88db177ad1e6a8cffaafd4738420ad20b6" },
"nvim-treesitter": { "branch": "master", "commit": "99d3e799b46f5c2a1fc0d7a42d7ab452de48c067" },
"nvim-web-devicons": { "branch": "master", "commit": "794bba734ec95eaff9bb82fbd112473be2087283" },
"obsidian.nvim": { "branch": "main", "commit": "754d3410b907b5f5ae3c9f4ccf643ea945021341" },
"oil.nvim": { "branch": "master", "commit": "bcfc0a2e01def5019aa14fac2fc6de20dedb6d3d" },
"plenary.nvim": { "branch": "master", "commit": "08e301982b9a057110ede7a735dd1b5285eb341f" },
"sqlite.lua": { "branch": "master", "commit": "d0ffd703b56d090d213b497ed4eb840495f14a11" },
"telescope-fzy-native.nvim": { "branch": "master", "commit": "282f069504515eec762ab6d6c89903377252bf5b" },
"telescope-undo.nvim": { "branch": "main", "commit": "95b61c01ea3a4c9e8747731148e905bbcf0ccaee" },
"telescope.nvim": { "branch": "master", "commit": "2d0d057791854decb2c9b6a0b52d43f3900dff40" },
"todo-comments.nvim": { "branch": "main", "commit": "a7e39ae9e74f2c8c6dc4eea6d40c3971ae84752d" },
"tree-sitter-hyprlang": { "branch": "master", "commit": "e5da7d0aa44403153e0394d87d9edea4e5bd6609" },
"tree-sitter-typst": { "branch": "master", "commit": "823309ed8b872dd33c7f350a3bab3d6e51436a5a" },
"trim.nvim": { "branch": "master", "commit": "4fe47a46c02a58894ded8328ca81f6c214a892f5" },
"trouble.nvim": { "branch": "main", "commit": "b9cf677f20bb2faa2dacfa870b084e568dca9572" },
"vim-bracketed-paste": { "branch": "master", "commit": "ffa3bc10ab511a646f1b30bc9345f240c15394e9" },
"vim-caddyfile": { "branch": "master", "commit": "24fe0720551883e407cb70ae1d7c03f162d1d5a0" },
"vim-hypr-nav": { "branch": "main", "commit": "6ab4865a7eb5aad35305298815a4563c9d48556a" },
"vim-rooter": { "branch": "master", "commit": "45e53f01e4e1c4a3ee20814de232162713aff578" },
"vim-snippets": { "branch": "master", "commit": "393d980157b8149b3ff65a48bc4aae24dca9c846" },
"vimtex": { "branch": "master", "commit": "a80934749c69cc6875b3c9b13ef59573a4824fb2" }
}

View File

@ -1,22 +0,0 @@
return {
"David-Kunz/gen.nvim",
opts = {
model = "mistral", -- The default model to use.
host = "localhost", -- The host running the Ollama service.
port = "11434", -- The port on which the Ollama service is listening.
display_mode = "float", -- The display mode. Can be "float" or "split".
show_prompt = false, -- Shows the Prompt submitted to Ollama.
show_model = false, -- Displays which model you are using at the beginning of your chat session.
quit_map = "q", -- set keymap for quit
no_auto_close = false, -- Never closes the window automatically.
command = function(options)
return "curl --silent --no-buffer -X POST http://" .. options.host .. ":" .. options.port .. "/api/chat -d $body"
end,
-- The command for the Ollama service. You can use placeholders $prompt, $model and $body (shellescaped).
-- This can also be a command string.
-- The executed command must return a JSON object with { response, context }
-- (context property is optional).
-- list_models = '<omitted lua function>', -- Retrieves a list of model names
debug = false -- Prints errors and the command which is run.
}
}

View File

@ -1,17 +0,0 @@
return {
"zbirenbaum/copilot.lua",
cmd = "Copilot",
event = "InsertEnter",
opts = {
suggestion = {
auto_trigger = true,
auto_refresh = true,
keymap = {
accept = "<leader><Tab>",
},
},
filetypes = {
markdown = true,
}
}
}

View File

@ -1,16 +0,0 @@
return {
'williamboman/mason-lspconfig.nvim',
dependencies = {
{'williamboman/mason.nvim', opts = {
ui = {
icons = {
package_installed = ""
}
}
}},
'neovim/nvim-lspconfig'
},
opts = {
ensure_installed = { "pyright", "texlab", "clangd", "bashls", "cmake", "jsonls", "tsserver", "vuels", "dockerls", "vimls", "html", "yamlls", "cssls", "lua_ls", "ltex", "gopls", "rust_analyzer", "jdtls", "emmet_ls", "ruff_lsp", "csharp_ls", "typst_lsp" },
}
}

View File

@ -1,26 +0,0 @@
return {
"AckslD/nvim-neoclip.lua",
dependencies = {
'nvim-telescope/telescope.nvim',
{'kkharji/sqlite.lua', module = 'sqlite'},
},
opts = {
continuous_sync = true,
enable_persistent_history = true,
keys = {
telescope = {
i = {
paste = "<cr>",
paste_behind = "<S-cr>",
},
n = {
paste = "<cr>",
paste_behind = "<S-cr>",
}
},
}
},
keys = {
{'<leader>c', '<cmd>Telescope neoclip<cr>'},
},
}

View File

@ -1,278 +0,0 @@
local function select_next(fallback)
if require("cmp").visible() then
if require'snippy'.can_expand_or_advance() then
require("cmp").select_next_item({ behavior = require("cmp").SelectBehavior.Select })
else
require("cmp").select_next_item({ behavior = require("cmp").SelectBehavior.Insert })
end
elseif require'snippy'.can_expand_or_advance() then
require'snippy'.expand_or_advance()
else
fallback()
end
end
local function select_previous(fallback)
if require("cmp").visible() then
if require'snippy'.can_expand_or_advance() then
require("cmp").select_prev_item({ behavior = require("cmp").SelectBehavior.Select })
else
require("cmp").select_prev_item({ behavior = require("cmp").SelectBehavior.Insert })
end
elseif require'snippy'.can_jump(-1) then
require'snippy'.previous()
else
fallback()
end
end
return {
"hrsh7th/nvim-cmp",
dependencies = {
'hrsh7th/cmp-buffer',
'hrsh7th/cmp-cmdline',
'hrsh7th/cmp-nvim-lsp',
'hrsh7th/cmp-path',
'honza/vim-snippets',
'dcampos/cmp-snippy',
'neovim/nvim-lspconfig',
'williamboman/mason-lspconfig.nvim',
{'dcampos/nvim-snippy', opts = {
mappings = {
is = {
['<leader><Tab>'] = 'expand_or_advance',
['<leader><S-Tab>'] = 'previous',
},
},
}},
},
keys = {
{"<leader>n", vim.diagnostic.goto_next},
{"<leader>p", vim.diagnostic.goto_prev},
{"<leader>f", vim.lsp.buf.code_action},
{"gd", vim.lsp.buf.definition},
{"gr", vim.lsp.buf.references},
{"<space>", vim.lsp.buf.hover},
{"<leader>rn", vim.lsp.buf.rename},
},
lazy = false,
config = function ()
local cmp = require("cmp")
cmp.setup({
snippet = { expand = function(args) require('snippy').expand_snippet(args.body) end },
window = {
completion = cmp.config.window.bordered(),
documentation = cmp.config.window.bordered(),
},
mapping = cmp.mapping.preset.insert({
['<CR>'] = cmp.mapping.confirm({ select = false }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items.
["<Tab>"] = cmp.mapping(select_next, { "i", "s" }),
["<C-J>"] = cmp.mapping(select_next, { "i", "s" }),
["<S-Tab>"] = cmp.mapping(select_previous, { "i", "s" }),
["<C-K>"] = cmp.mapping(select_previous, { "i", "s" }),
}),
sources = cmp.config.sources({ { name = 'nvim_lsp' }, { name = 'path' }, { name = 'snippy' }, }, { { name = 'buffer' } })
})
-- Set configuration for specific filetype.
cmp.setup.filetype('gitcommit', {
sources = cmp.config.sources({
{ name = 'cmp_git' }, -- You can specify the `cmp_git` source if you were installed it.
}, {
{ name = 'buffer' },
})
})
-- Use buffer source for `/` (if you enabled `native_menu`, this won't work anymore).
cmp.setup.cmdline('/', {
mapping = cmp.mapping.preset.cmdline(),
sources = {
{ name = 'buffer' }
}
})
-- Use cmdline & path source for ':' (if you enabled `native_menu`, this won't work anymore).
cmp.setup.cmdline(':', {
mapping = cmp.mapping.preset.cmdline(),
sources = cmp.config.sources({
{ name = 'path' }
}, {
{ name = 'cmdline' }
})
})
local cmp_completion = require('nvim-autopairs.completion.cmp')
cmp.event:on('confirm_done',cmp_completion.on_confirm_done())
-- Setup lspconfig.
local capabilities = require('cmp_nvim_lsp').default_capabilities(vim.lsp.protocol.make_client_capabilities())
require('lspconfig').pyright.setup {
capabilities = capabilities,
settings = {
python = {
analysis = {
typeCheckingMode = "off"
}
}
}
}
require('lspconfig').texlab.setup {
capabilities = capabilities
}
require('lspconfig').clangd.setup {
capabilities = capabilities,
-- root_dir = function()
-- return require('lspconfig').util.root_pattern({'.clang-format', 'build/', 'compile_flags.txt'})
-- end,
cmd = {
"clangd",
"--background-index",
"--clang-tidy",
"-j=8",
"--clang-tidy-checks=*",
"--all-scopes-completion",
"--completion-style=bundled",
"--cross-file-rename",
"--completion-style=detailed",
"--header-insertion-decorators",
"--header-insertion=iwyu",
"--pch-storage=memory"
}
}
require('lspconfig').bashls.setup {
capabilities = capabilities
}
require('lspconfig').csharp_ls.setup {
capabilities = capabilities
}
require('lspconfig').typst_lsp.setup {
capabilities = capabilities
}
require('lspconfig').cmake.setup {
capabilities = capabilities
}
require('lspconfig').jsonls.setup {
capabilities = capabilities
}
require('lspconfig').tsserver.setup {
capabilities = capabilities
}
require('lspconfig').kotlin_language_server.setup {
capabilities = capabilities
}
require('lspconfig').vuels.setup {
capabilities = capabilities
}
require('lspconfig').dockerls.setup {
capabilities = capabilities
}
require('lspconfig').vimls.setup {
capabilities = capabilities
}
require('lspconfig').html.setup {
capabilities = capabilities
}
require('lspconfig').emmet_ls.setup({
capabilities = capabilities,
filetypes = { "css", "eruby", "html", "javascript", "javascriptreact", "less", "sass", "scss", "svelte", "pug", "typescriptreact", "vue" },
init_options = {
html = {
options = {
["bem.enabled"] = true,
},
},
}
})
require('lspconfig').yamlls.setup {
capabilities = capabilities
}
require('lspconfig').cssls.setup {
capabilities = capabilities
}
require('lspconfig').jdtls.setup {
capabilities = capabilities
}
require('lspconfig').rust_analyzer.setup {
capabilities = capabilities,
}
require('lspconfig').gopls.setup {
capabilities = capabilities
}
require('lspconfig').ruff_lsp.setup {
capabilities = capabilities
}
require('lspconfig').lua_ls.setup {
settings = {
Lua = {
runtime = {
-- Tell the language server which version of Lua you're using (most likely LuaJIT in the case of Neovim)
version = 'LuaJIT',
},
diagnostics = {
-- Get the language server to recognize the `vim` global
globals = {'vim', 'use', 'awesome', 'client', 'root'},
},
workspace = {
-- Make the server aware of Neovim runtime files
library = {
['/usr/share/nvim/runtime/lua'] = true,
['/usr/share/nvim/runtime/lua/lsp'] = true,
['/usr/share/awesome/lib'] = true
}
},
-- Do not send telemetry data containing a randomized but unique identifier
telemetry = {
enable = false,
},
},
},
}
local filetypes = { "bibtex", "gitcommit", "markdown", "org", "tex", "restructuredtext", "rsweave", "latex", "quarto", "rmd", "context", "html", "xhtml", "typst", "mail" }
require('lspconfig').ltex.setup {
capabilities = capabilities,
on_attach = function(_, _)
require("ltex_extra").setup{
load_langs = {"nl-BE", "en-US", "en-GB"},
init_check = true,
}
end,
settings = {
ltex = {
enabled = filetypes,
language = "en-GB"
},
},
filetypes = filetypes
}
vim.diagnostic.config({
virtual_text = false
})
-- Show line diagnostics automatically in hover window
vim.cmd("autocmd CursorHold,CursorHoldI * lua vim.diagnostic.open_float(nil, {focus=false})")
end,
}

View File

@ -1,27 +0,0 @@
return {
'nvim-tree/nvim-tree.lua',
dependencies = {'nvim-tree/nvim-web-devicons'},
tag = 'nightly',
opts = {
sort_by = "case_sensitive",
sync_root_with_cwd = true,
update_focused_file = {
update_root = true,
},
view = {
adaptive_size = true,
mappings = {
list = {
{key = "cd", action = "cd"},
{key = "<backspace>", action = "close"},
}
},
},
renderer = {
group_empty = true,
},
filters = {
dotfiles = true,
},
}
}

View File

@ -1,88 +0,0 @@
return {
'nvim-telescope/telescope.nvim',
dependencies = {
'nvim-lua/plenary.nvim',
'nvim-telescope/telescope-fzy-native.nvim',
},
opts = {
defaults = {
file_ignore_patterns = {
".cache/.*",
"node_modules/.*",
".git/.*",
"Venv/.*",
"venv/.*",
"wandb/.*",
"Resources/.*",
"build/.*"
},
mappings = {
i = {
["jj"] = require("telescope.actions").close,
["<C-j>"] = require("telescope.actions").move_selection_next,
["<C-k>"] = require("telescope.actions").move_selection_previous,
},
},
file_sorter = require'telescope.sorters'.get_fzy_sorter,
generic_sorter = require'telescope.sorters'.get_fzy_sorter,
},
extensions = {
undo = {
side_by_side = false,
layout_strategy = "vertical",
use_delta = true,
layout_config = {
preview_height = 0.5,
},
mappings = {
i = {
["<cr>"] = require("telescope-undo.actions").restore,
["<S-y>"] = require("telescope-undo.actions").yank_additions,
},
},
}
},
fzy_native = {
override_generic_sorter = false,
override_file_sorter = true,
}
},
keys = {
{ "<leader>u", require("telescope").extensions.undo.undo},
{ "<C-Space>", require("telescope.builtin").oldfiles},
{ "<C-f>", function () require"telescope.builtin".live_grep({ path_display = { 'smart' }, }) end},
{ "<C-p>", function () -- git files
local opts = require('telescope.themes').get_ivy({})
opts["show_untracked"] = true
opts["layout_config"] = {height=0.2}
if not pcall(require"telescope.builtin".git_files, opts) then
require"telescope.builtin".find_files(opts)
end
end},
{ "<C-o>", function () -- project files
local opts = require('telescope.themes').get_ivy({})
opts["layout_config"] = {height=0.2}
require"telescope.builtin".find_files(opts)
end},
{ "<C-S-o>", function () -- buffer files
local opts = require('telescope.themes').get_ivy({})
opts["layout_config"] = {height=0.2}
require"telescope.builtin".buffers(opts)
end},
{ "<C-S-f>", function () -- fuzzy search
require"telescope.builtin".grep_string({
path_display = { 'smart' },
only_sort_text = true,
word_match = "-w",
search = '',
})
end},
},
config = function (_, opts)
local telescope = require("telescope")
telescope.setup(opts)
telescope.load_extension("undo")
telescope.load_extension('fzy_native')
end
}

View File

@ -1,44 +0,0 @@
return {
'nvim-treesitter/nvim-treesitter',
dependencies = {
"https://github.com/TheZoq2/tree-sitter-typst",
"luckasRanarison/tree-sitter-hyprlang"
},
build = ":TSUpdate",
opts = {
ensure_installed = { "cpp", "c", "lua", "vim", "dockerfile", "python", "java", "cmake", "diff", "gitcommit", "html", "css", "javascript", "json", "rust", "sql", "yaml", "markdown", "markdown_inline", "nix" },
auto_install = true,
highlight = {
enable = true,
additional_vim_regex_highlighting = false,
disable = function(lang, buf) -- Disable if file size is too big
if lang == "ini" or lang == "markdown" then
return true
end
local max_filesize = 2000 * 1024 -- 2MB
local ok, stats = pcall(vim.loop.fs_stat, vim.api.nvim_buf_get_name(buf))
if ok and stats and stats.size > max_filesize then
return true
end
end,
},
indent = {
enable = true
},
},
config = function (_, opts)
require("nvim-treesitter.configs").setup(opts)
local parser_config = require "nvim-treesitter.parsers".get_parser_configs()
require'nvim-treesitter.install'.prefer_git = true
parser_config.typst = {
install_info = {
url = "https://github.com/frozolotl/tree-sitter-typst.git", -- local path or git repo
files = {"src/parser.c", "src/scanner.cc"},
},
filetype = "typst", -- if filetype does not match the parser name
}
vim.filetype.add({
pattern = { [".*.typ"] = "typst" },
})
end
}

View File

@ -1,12 +0,0 @@
return {
'folke/trouble.nvim',
dependencies = {"nvim-tree/nvim-web-devicons"},
opts = {
action_keys = {
close = {"q", "<Esc>"},
jump = {"<cr>"},
toggle_fold = {"<tab>"},
}
},
lazy = true
}

View File

@ -1,9 +0,0 @@
logits
OpenSwarm
Lumentis
stochasticity
Feywild
closeby
ECML
theshold-based
distill

View File

@ -1,2 +0,0 @@
scaler
stochasticity

View File

@ -1,412 +0,0 @@
#################################
# Shadows #
#################################
# Enabled client-side shadows on windows. Note desktop windows
# (windows with '_NET_WM_WINDOW_TYPE_DESKTOP') never get shadow,
# unless explicitly requested using the wintypes option.
#
# shadow = false
shadow = true;
# The blur radius for shadows, in pixels. (defaults to 12)
# shadow-radius = 12
shadow-radius = 10;
# The opacity of shadows. (0.0 - 1.0, defaults to 0.75)
# shadow-opacity = .75
# The left offset for shadows, in pixels. (defaults to -15)
# shadow-offset-x = -15
shadow-offset-x = -7;
# The top offset for shadows, in pixels. (defaults to -15)
# shadow-offset-y = -15
shadow-offset-y = -7;
# Red color value of shadow (0.0 - 1.0, defaults to 0).
# shadow-red = 0
# Green color value of shadow (0.0 - 1.0, defaults to 0).
# shadow-green = 0
# Blue color value of shadow (0.0 - 1.0, defaults to 0).
# shadow-blue = 0
# Hex string color value of shadow (#000000 - #FFFFFF, defaults to #000000). This option will override options set shadow-(red/green/blue)
# shadow-color = "#000000"
# Specify a list of conditions of windows that should have no shadow.
#
# examples:
# shadow-exclude = "n:e:Notification";
#
# shadow-exclude = []
shadow-exclude = [
"name = 'Notification'",
"class_g = 'Conky'",
"class_g ?= 'Notify-osd'",
"class_g = 'Cairo-clock'",
"_GTK_FRAME_EXTENTS@:c",
"!focused"
];
# Specify a list of conditions of windows that should have no shadow painted over, such as a dock window.
# clip-shadow-above = []
# Specify a X geometry that describes the region in which shadow should not
# be painted in, such as a dock window region. Use
# shadow-exclude-reg = "x10+0+0"
# for example, if the 10 pixels on the bottom of the screen should not have shadows painted on.
#
# shadow-exclude-reg = ""
# Crop shadow of a window fully on a particular Xinerama screen to the screen.
# xinerama-shadow-crop = false
#################################
# Fading #
#################################
# Fade windows in/out when opening/closing and when opacity changes,
# unless no-fading-openclose is used.
fading = false
# fading = false;
# Opacity change between steps while fading in. (0.01 - 1.0, defaults to 0.028)
# fade-in-step = 0.028
fade-in-step = 1;
# Opacity change between steps while fading out. (0.01 - 1.0, defaults to 0.03)
# fade-out-step = 0.03
fade-out-step = 1;
# The time between steps in fade step, in milliseconds. (> 0, defaults to 10)
fade-delta = 0
# Specify a list of conditions of windows that should not be faded.
# fade-exclude = []
# Do not fade on window open/close.
no-fading-openclose = true
# Do not fade destroyed ARGB windows with WM frame. Workaround of bugs in Openbox, Fluxbox, etc.
# no-fading-destroyed-argb = false
#################################
# Transparency / Opacity #
#################################
# Opacity of inactive windows. (0.1 - 1.0, defaults to 1.0)
# inactive-opacity = 0.99
# Opacity of window titlebars and borders. (0.1 - 1.0, disabled by default)
# frame-opacity = 1.0
# Let inactive opacity set by -i override the '_NET_WM_WINDOW_OPACITY' values of windows.
# inactive-opacity-override = true
# inactive-opacity-override = true;
# Default opacity for active windows. (0.0 - 1.0, defaults to 1.0)
# active-opacity = 1.0
# Dim inactive windows. (0.0 - 1.0, defaults to 0.0)
# inactive-dim = 0.0
# Specify a list of conditions of windows that should never be considered focused.
# focus-exclude = []
focus-exclude = [ "class_g = 'Cairo-clock'" ];
# Use fixed inactive dim value, instead of adjusting according to window opacity.
# inactive-dim-fixed = 1.0
# Specify a list of opacity rules, in the format `PERCENT:PATTERN`,
# like `50:name *= "Firefox"`. picom-trans is recommended over this.
# Note we don't make any guarantee about possible conflicts with other
# programs that set '_NET_WM_WINDOW_OPACITY' on frame or client windows.
# example:
# opacity-rule = [ "80:class_g = 'URxvt'" ];
#
opacity-rule = ["0:_NET_WM_STATE@[0]:32a = '_NET_WM_STATE_HIDDEN'",]
#################################
# Corners #
#################################
# Sets the radius of rounded window corners. When > 0, the compositor will
# round the corners of windows. Does not interact well with
# `transparent-clipping`.
corner-radius = 0
# Exclude conditions for rounded corners.
rounded-corners-exclude = [
"window_type = 'dock'",
"window_type = 'desktop'"
];
#################################
# Background-Blurring #
#################################
# Parameters for background blurring, see the *BLUR* section for more information.
# blur-method =
# blur-size = 12
#
# blur-deviation = false
#
# blur-strength = 5
# Blur background of semi-transparent / ARGB windows.
# Bad in performance, with driver-dependent behavior.
# The name of the switch may change without prior notifications.
#
# blur-background = false
# Blur background of windows when the window frame is not opaque.
# Implies:
# blur-background
# Bad in performance, with driver-dependent behavior. The name may change.
#
# blur-background-frame = false
# Use fixed blur strength rather than adjusting according to window opacity.
# blur-background-fixed = false
# Specify the blur convolution kernel, with the following format:
# example:
# blur-kern = "5,5,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1";
#
# blur-kern = ""
blur-kern = "3x3box";
# Exclude conditions for background blur.
# blur-background-exclude = []
blur-background-exclude = [
"window_type = 'dock'",
"window_type = 'desktop'",
"_GTK_FRAME_EXTENTS@:c"
];
#################################
# General Settings #
#################################
# Daemonize process. Fork to background after initialization. Causes issues with certain (badly-written) drivers.
# daemon = false
# Specify the backend to use: `xrender`, `glx`, or `xr_glx_hybrid`.
# `xrender` is the default one.
#
backend = "glx"
# backend = "xrender";
# Enable/disable VSync.
# vsync = false
vsync = true;
# Enable remote control via D-Bus. See the *D-BUS API* section below for more details.
# dbus = false
# Try to detect WM windows (a non-override-redirect window with no
# child that has 'WM_STATE') and mark them as active.
#
# mark-wmwin-focused = false
mark-wmwin-focused = true;
# Mark override-redirect windows that doesn't have a child window with 'WM_STATE' focused.
# mark-ovredir-focused = false
mark-ovredir-focused = true;
# Try to detect windows with rounded corners and don't consider them
# shaped windows. The accuracy is not very high, unfortunately.
#
# detect-rounded-corners = false
detect-rounded-corners = true;
# Detect '_NET_WM_WINDOW_OPACITY' on client windows, useful for window managers
# not passing '_NET_WM_WINDOW_OPACITY' of client windows to frame windows.
#
# detect-client-opacity = false
detect-client-opacity = true;
# Use EWMH '_NET_ACTIVE_WINDOW' to determine currently focused window,
# rather than listening to 'FocusIn'/'FocusOut' event. Might have more accuracy,
# provided that the WM supports it.
#
# use-ewmh-active-win = false
# Unredirect all windows if a full-screen opaque window is detected,
# to maximize performance for full-screen windows. Known to cause flickering
# when redirecting/unredirecting windows.
#
# unredir-if-possible = false
# Delay before unredirecting the window, in milliseconds. Defaults to 0.
# unredir-if-possible-delay = 0
# Conditions of windows that shouldn't be considered full-screen for unredirecting screen.
# unredir-if-possible-exclude = []
# Use 'WM_TRANSIENT_FOR' to group windows, and consider windows
# in the same group focused at the same time.
#
# detect-transient = false
detect-transient = true;
# Use 'WM_CLIENT_LEADER' to group windows, and consider windows in the same
# group focused at the same time. This usually means windows from the same application
# will be considered focused or unfocused at the same time.
# 'WM_TRANSIENT_FOR' has higher priority if detect-transient is enabled, too.
#
# detect-client-leader = false
# Resize damaged region by a specific number of pixels.
# A positive value enlarges it while a negative one shrinks it.
# If the value is positive, those additional pixels will not be actually painted
# to screen, only used in blur calculation, and such. (Due to technical limitations,
# with use-damage, those pixels will still be incorrectly painted to screen.)
# Primarily used to fix the line corruption issues of blur,
# in which case you should use the blur radius value here
# (e.g. with a 3x3 kernel, you should use `--resize-damage 1`,
# with a 5x5 one you use `--resize-damage 2`, and so on).
# May or may not work with *--glx-no-stencil*. Shrinking doesn't function correctly.
#
# resize-damage = 1
# Specify a list of conditions of windows that should be painted with inverted color.
# Resource-hogging, and is not well tested.
#
# invert-color-include = []
# GLX backend: Avoid using stencil buffer, useful if you don't have a stencil buffer.
# Might cause incorrect opacity when rendering transparent content (but never
# practically happened) and may not work with blur-background.
# My tests show a 15% performance boost. Recommended.
#
glx-no-stencil = true;
# GLX backend: Avoid rebinding pixmap on window damage.
# Probably could improve performance on rapid window content changes,
# but is known to break things on some drivers (LLVMpipe, xf86-video-intel, etc.).
# Recommended if it works.
#
# glx-no-rebind-pixmap = false
# Disable the use of damage information.
# This cause the whole screen to be redrawn everytime, instead of the part of the screen
# has actually changed. Potentially degrades the performance, but might fix some artifacts.
# The opposing option is use-damage
#
# no-use-damage = false
use-damage = true;
# Use X Sync fence to sync clients' draw calls, to make sure all draw
# calls are finished before picom starts drawing. Needed on nvidia-drivers
# with GLX backend for some users.
#
# xrender-sync-fence = false
# GLX backend: Use specified GLSL fragment shader for rendering window contents.
# See `compton-default-fshader-win.glsl` and `compton-fake-transparency-fshader-win.glsl`
# in the source tree for examples.
#
# glx-fshader-win = ""
# Force all windows to be painted with blending. Useful if you
# have a glx-fshader-win that could turn opaque pixels transparent.
#
# force-win-blend = false
# Do not use EWMH to detect fullscreen windows.
# Reverts to checking if a window is fullscreen based only on its size and coordinates.
#
# no-ewmh-fullscreen = false
# Dimming bright windows so their brightness doesn't exceed this set value.
# Brightness of a window is estimated by averaging all pixels in the window,
# so this could comes with a performance hit.
# Setting this to 1.0 disables this behaviour. Requires --use-damage to be disabled. (default: 1.0)
#
# max-brightness = 1.0
# Make transparent windows clip other windows like non-transparent windows do,
# instead of blending on top of them.
#
# transparent-clipping = false
# Set the log level. Possible values are:
# "trace", "debug", "info", "warn", "error"
# in increasing level of importance. Case doesn't matter.
# If using the "TRACE" log level, it's better to log into a file
# using *--log-file*, since it can generate a huge stream of logs.
#
# log-level = "debug"
log-level = "warn";
# Set the log file.
# If *--log-file* is never specified, logs will be written to stderr.
# Otherwise, logs will to written to the given file, though some of the early
# logs might still be written to the stderr.
# When setting this option from the config file, it is recommended to use an absolute path.
#
# log-file = "/path/to/your/log/file"
# Show all X errors (for debugging)
# show-all-xerrors = false
# Write process ID to a file.
# write-pid-path = "/path/to/your/log/file"
# Window type settings
#
# 'WINDOW_TYPE' is one of the 15 window types defined in EWMH standard:
# "unknown", "desktop", "dock", "toolbar", "menu", "utility",
# "splash", "dialog", "normal", "dropdown_menu", "popup_menu",
# "tooltip", "notification", "combo", and "dnd".
#
# Following per window-type options are available: ::
#
# fade, shadow:::
# Controls window-type-specific shadow and fade settings.
#
# opacity:::
# Controls default opacity of the window type.
#
# focus:::
# Controls whether the window of this type is to be always considered focused.
# (By default, all window types except "normal" and "dialog" has this on.)
#
# full-shadow:::
# Controls whether shadow is drawn under the parts of the window that you
# normally won't be able to see. Useful when the window has parts of it
# transparent, and you want shadows in those areas.
#
# clip-shadow-above:::
# Controls wether shadows that would have been drawn above the window should
# be clipped. Useful for dock windows that should have no shadow painted on top.
#
# redir-ignore:::
# Controls whether this type of windows should cause screen to become
# redirected again after been unredirected. If you have unredir-if-possible
# set, and doesn't want certain window to cause unnecessary screen redirection,
# you can set this to `true`.
#
wintypes:
{
tooltip = { fade = true; shadow = true; opacity = 0.75; focus = true; full-shadow = false; };
dock = { shadow = false; clip-shadow-above = true; }
dnd = { shadow = false; }
popup_menu = { opacity = 0.8; }
dropdown_menu = { opacity = 0.8; }
};

View File

@ -1,13 +0,0 @@
;==========================================================
; Color theme
;==========================================================
[colors]
background = #1f2430
blue = #002F5F
red = #802929
green = #427241
yellow = #dbd759
black = #000000
white = #ffffff
gray = #808080

View File

@ -1,198 +0,0 @@
;==========================================================
;
;==========================================================
; Include powerline utility
include-file = ~/.config/polybar/powerline-for-polybar.config
; Include color scheme
include-file = ~/.config/polybar/colors.config
;=======================================
; Bar
;=======================================
[bar/example]
; Generic options
width = 100%
height = 32
dpi-x = 96
dpi-y = 96
tray-position = right
tray-background = ${colors.blue}
tray-offset-x = 0
tray-padding = 7
; Set bar's default background/foreground color
background = #9912151c
foreground = ${colors.white}
; Set bar's fonts list
font-0 = "Noto Sans:size=13:weight=85:antialias=true;3"
font-1 = "Source Code Pro:pixelsize=20:antialias=true;6"
font-2 = "Source Code Pro:size=11:weight=bold:antialias=true;3"
font-3 = "Font Awesome 6 Free Solid:size=10:antialias=true;3"
font-4 = "Font Awesome 6 Free:size=10:antialias=true;3"
font-5 = "Font Awesome 6 Brands:size=10:antialias=true;3"
font-6 = "Font Awesome v4 Compatibility:size=10:antialias=true;3"
; Set modules list
modules-left = xwindow
modules-center = i3
modules-right = updates temperature memory clockspeed cpu pulseaudio date startarrow
fixed-center = true
;=======================================
; Modules
;=======================================
[module/startarrow]
inherit = powerline-modules/right-to-left-starting-arrow
background = ${colors.blue}
background-next = ${colors.background}
[module/pulseaudio]
type = internal/pulseaudio
inherit = powerline-templates/right-to-left-item
background = ${colors.blue}
background-next = ${colors.background}
label-muted-foreground = ${colors.gray}
format-foreground = ${colors.white}
format-volume-background = ${colors.blue}
format-muted-background = ${colors.blue}
format-volume = " <ramp-volume> <label-volume> "
format-muted = "  <label-volume> "
ramp-volume-0 = 🔈
ramp-volume-1 = 🔊
[module/date]
; Powerline settings
inherit = powerline-templates/right-to-left-item
background = ${colors.background}
background-next = ${colors.blue}
; Other settings
type = internal/date
format-background = ${self.background}
format-foreground = ${colors.white}
date = " %a %b %d, %H:%M:%S "
[module/cpu]
; Powerline settings
inherit = powerline-templates/right-to-left-item
background = ${colors.background}
background-next = ${colors.blue}
; Other settings
type = internal/cpu
format-background = ${self.background}
format-foreground = ${colors.white}
label = " CPU %percentage%% "
[module/memory]
; Powerline settings
inherit = powerline-templates/right-to-left-item
background = ${colors.background}
background-next = ${colors.blue}
; Other settings
type = internal/memory
format-background = ${self.background}
format-foreground = ${colors.white}
label = " %used% "
[module/updates]
; Powerline settings
inherit = powerline-templates/right-to-left-item
background = ${colors.background}
background-next = ${root.background}
; Other settings
type = custom/script
format-background = ${self.background}
format-foreground = ${colors.white}
format-warn-background = ${self.background}
exec = checkupdates | wc -l
format = "  <label> "
click-left = WINIT_X11_SCALE_FACTOR=1 alacritty -e bash -c "yay ; echo Done, press any key to exit... ; read"
[module/clockspeed]
; Powerline settings
inherit = powerline-templates/right-to-left-item
background = ${colors.blue}
background-next = ${colors.background}
; Other settings
type = custom/script
format-background = ${self.background}
format-foreground = ${colors.white}
format-warn-background = ${self.background}
exec = cat /proc/cpuinfo | grep MHz | cut -b 12- | sort -r | head -n 1 | xargs printf '%f / 1000\\n' | bc -l | awk '{printf "%.2f\\n", $0}'
format = " <label> GHz "
[module/temperature]
; Powerline settings
inherit = powerline-templates/right-to-left-item
background = ${colors.blue}
background-next = ${colors.background}
; Other settings
type = custom/script
format-background = ${colors.blue}
format-foreground = ${colors.white}
format-warn-background = ${self.background}
exec = sensors | grep Tctl | awk '{print $2}' | cut -d '+' -f 2
format = " <label> "
[module/governor]
; Powerline settings
inherit = powerline-templates/right-to-left-item
background = ${colors.background}
background-next = ${colors.blue}
; Other settings
type = custom/script
format-background = ${self.background}
format-foreground = ${colors.white}
format-warn-background = ${self.background}
exec = cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
format = " <label> "
click-left = /home/user/.config/scripts/toggle_performance.sh
[module/xwindow]
; Other settings
type = internal/xwindow
inherit = powerline-templates/left-to-right-item
background = ${colors.blue}
background-next = ${root.background}
format-background = ${self.background}
format-foreground = ${colors.white}
label = "  %title% "
label-maxlen = 80
[module/i3]
type = internal/i3
pin-workspaces = false
show-urgent = true
index-sort = true
enable-click = true
label-unfocused-padding = 3
label-focused-background = ${colors.blue}
label-visible-background = ${colors.background}
label-focused-padding = 3
label-focused-font=3
label-unfocused-font=3
label-visible-font=3
label-separator-padding = 2
label-focused = %index%
label-unfocused = %index%
label-visible = %index%
label-visible-mode = %mode%
label-mode-padding = 3
label-visible-padding = 3
label-mode-background = ${colors.blue}
[module/battery]
type = custom/script
inherit = powerline-templates/right-to-left-item
background = ${colors.background}
background-next = ${colors.blue}
format-background = ${self.background}
format-foreground = ${colors.white}
exec = upower -i /org/freedesktop/UPower/devices/battery_BAT1 | ag percentage | awk '{print $2}'
format = " <label>  "

View File

@ -1,448 +0,0 @@
; ============================================================================ ;
;
; POWERLINE FOR POLYBAR - powerline-for-polybar.config
;
; ---------------------------------------------------------------------------- ;
;
; This file contains all the necessary stuff to build your own, Powerline-based,
; fancy Polybar setup.
;
; ---------------------------------------------------------------------------- ;
;
; All provided templates are documented in this file, with a description and
; the usage syntax.
;
; ============================================================================ ;
; ============================================================================
;
; :: STAND-ALONE MODULES ::
;
; ============================================================================ ;
; ============================================================================ ;
; modules :: left-to-right
; ============================================================================ ;
;
; # Left-to-right starting arrow
;
; Display a starting arrow at the beginning of a left-to-right line.
;
; NOTE: You may want to add customized content here. DON'T ! Use a regular,
; left-to-right-item for this purpose. Background and foreground colors
; are set on a per module basis.
;
; Usage:
; [module/mystartingarrow]
; inherit = powerline-modules/left-to-right-starting-arrow
; background = #rrggbb
; background-next = #rrggbb
;
; Mandatory settings:
; background Color of starting arrow. People often wants this to match
; the main theme color.
; background-next Background color of first item in line.
;
[powerline-modules/left-to-right-starting-arrow]
type = custom/text
content-background = ${self.background-next}
content-foreground = ${self.background}
content = ""
;
; # Left-to-right end-of-line separator
;
; Display a final arrow to nicely end your line with separators.
;
; Usage:
; [module/myendingarrow]
; inherit = powerline-modules/left-to-right-end-of-line-separator
; separator = #rrggbb
;
; Mandatory settings:
; separator Color of line item separator.
;
[powerline-modules/left-to-right-end-of-line-separator]
type = custom/text
content-foreground = ${self.separator}
content = ""
; ============================================================================ ;
; modules :: right-to-left
; ============================================================================ ;
;
; # Right-to-left starting arrow
;
; Display a starting arrow at the beginning of a right-to-left line.
;
; NOTE: You may want to add customized content here. DON'T ! Use a regular,
; right-to-left-item for this purpose. Background and foreground colors
; are set on a per module basis.
;
; Usage:
; [module/mystartingarrow]
; inherit = powerline-modules/right-to-left-starting-arrow
; background = #rrggbb
; background-next = #rrggbb
;
; Mandatory settings:
; background Color of starting arrow. People often wants this to match
; the main theme color.
; background-next Background color of first item in line.
;
[powerline-modules/right-to-left-starting-arrow]
type = custom/text
content-background = ${self.background-next}
content-foreground = ${self.background}
label-font = 1
content = " "
;
; # Right-to-left end-of-line separator
;
; Display a final arrow to nicely end your line with separators.
;
; Usage:
; [module/myendingarrow]
; inherit = powerline-modules/right-to-left-end-of-line-separator
; separator = #rrggbb
;
; Mandatory settings:
; separator Color of line item separator.
;
[powerline-modules/right-to-left-end-of-line-separator]
type = custom/text
content-foreground = ${self.separator}
label-font = 1
content = "  "
; ============================================================================ ;
;
; :: MODULES TEMPLATES ::
;
; ============================================================================ ;
; ============================================================================ ;
; templates :: left-to-right
; ============================================================================ ;
;
; # Left-to-right in-line item
;
; Display a left-to-right, in-line item.
;
; Usage:
; [module/mymodule]
; inherit = powerline-templates/left-to-right-item
; background = #rrggbb
; background-next = #rrggbb
; (...)
;
; Mandatory settings:
; background Background color of current item
; background-next Background color of next item in line. Should be set on
; ${root.background} if current item is last in line.
;
[powerline-templates/left-to-right-item]
format-suffix-foreground = ${self.background}
format-suffix-background = ${self.background-next}
format-suffix = ""
format-volume-suffix-foreground = ${self.background}
format-volume-suffix-background = ${self.background-next}
format-volume-suffix = ""
format-muted-suffix-foreground = ${self.background}
format-muted-suffix-background = ${self.background-next}
format-muted-suffix = ""
format-mounted-suffix-foreground = ${self.background}
format-mounted-suffix-background = ${self.background-next}
format-mounted-suffix = ""
format-unmounted-suffix-foreground = ${self.background}
format-unmounted-suffix-background = ${self.background-next}
format-unmounted-suffix = ""
format-connected-suffix-foreground = ${self.background}
format-connected-suffix-background = ${self.background-next}
format-connected-suffix = ""
format-disconnected-suffix-foreground = ${self.background}
format-disconnected-suffix-background = ${self.background-next}
format-disconnected-suffix = ""
content-suffix-foreground = ${self.background}
content-suffix-background = ${self.background-next}
content-suffix = ""
;
; # Left-to-right in-line item with separator
;
; Display a left-to-right, in-line item with separator.
;
; Usage:
; [module/mymodule]
; inherit = powerline-templates/left-to-right-item-with-separator
; background = #rrggbb
; separator = #rrggbb
; (...)
;
; Mandatory settings:
; background Background color of current item
; separator Color of line item separator.
;
[powerline-templates/left-to-right-item-with-separator]
; Prefixes
format-prefix-foreground = ${self.separator}
format-prefix-background = ${self.background}
format-prefix = ""
format-volume-prefix-foreground = ${self.separator}
format-volume-prefix-background = ${self.background}
format-volume-prefix = ""
format-muted-prefix-foreground = ${self.background}
format-muted-prefix-background = ${self.separator}
format-muted-prefix = ""
format-mounted-prefix-foreground = ${self.separator}
format-mounted-prefix-background = ${self.background}
format-mounted-prefix = ""
format-unmounted-prefix-foreground = ${self.separator}
format-unmounted-prefix-background = ${self.background}
format-unmounted-prefix = ""
format-connected-prefix-foreground = ${self.separator}
format-connected-prefix-background = ${self.background}
format-connected-prefix = ""
format-disconnected-prefix-foreground = ${self.separator}
format-disconnected-prefix-background = ${self.background}
format-disconnected-prefix = ""
content-prefix-foreground = ${self.separator}
content-prefix-background = ${self.background}
content-prefix = ""
; Suffixes
format-suffix-foreground = ${self.background}
format-suffix-background = ${self.separator}
format-suffix = ""
format-volume-suffix-foreground = ${self.background}
format-volume-suffix-background = ${self.separator}
format-volume-suffix = ""
format-muted-suffix-foreground = ${self.separator}
format-muted-suffix-background = ${self.background}
format-muted-suffix = ""
format-mounted-suffix-foreground = ${self.background}
format-mounted-suffix-background = ${self.separator}
format-mounted-suffix = ""
format-unmounted-suffix-foreground = ${self.background}
format-unmounted-suffix-background = ${self.separator}
format-unmounted-suffix = ""
format-connected-suffix-foreground = ${self.background}
format-connected-suffix-background = ${self.separator}
format-connected-suffix = ""
format-disconnected-suffix-foreground = ${self.background}
format-disconnected-suffix-background = ${self.separator}
format-disconnected-suffix = ""
content-suffix-foreground = ${self.background}
content-suffix-background = ${self.separator}
content-suffix = ""
;
; # Left-to-right line-starting item with separator
;
; Display a left-to-right, *line starting* item with separator.
;
; NOTE: This template shall only be inherited by the leftmost item of a
; left-to-right line with separators. It avoids the appearance
; of a separating arrow half at the leftmost part of the item.
;
; Usage:
; [module/mystartingmodule]
; inherit = powerline-templates/left-to-right-starting-item-with-separator
; background = #rrggbb
; separator = #rrggbb
; (...)
;
; Mandatory settings:
; background Background color of current item
; separator Color of line item separator.
;
[powerline-templates/left-to-right-starting-item-with-separator]
; Suffixes needed only
format-suffix-foreground = ${self.background}
format-suffix-background = ${self.separator}
format-suffix = ""
format-volume-suffix-foreground = ${self.background}
format-volume-suffix-background = ${self.separator}
format-volume-suffix = ""
format-muted-suffix-foreground = ${self.separator}
format-muted-suffix-background = ${self.background}
format-muted-suffix = ""
format-mounted-suffix-foreground = ${self.background}
format-mounted-suffix-background = ${self.separator}
format-mounted-suffix = ""
format-unmounted-suffix-foreground = ${self.background}
format-unmounted-suffix-background = ${self.separator}
format-unmounted-suffix = ""
format-connected-suffix-foreground = ${self.background}
format-connected-suffix-background = ${self.separator}
format-connected-suffix = ""
format-disconnected-suffix-foreground = ${self.background}
format-disconnected-suffix-background = ${self.separator}
format-disconnected-suffix = ""
content-suffix-foreground = ${self.background}
content-suffix-background = ${self.separator}
content-suffix = ""
; ============================================================================ ;
; templates :: right-to-left
; ============================================================================ ;
;
; # Right-to-left in-line item
;
; Display a right-to-left, in-line item.
;
; Usage:
; [module/mymodule]
; inherit = powerline-templates/right-to-left-item
; background = #rrggbb
; background-next = #rrggbb
; (...)
;
; Mandatory settings:
; background Background color of current item
; background-next Background color of next item in line. Should be set on
; ${root.background} if current item is last in line.
;
[powerline-templates/right-to-left-item]
format-prefix-foreground = ${self.background}
format-prefix-background = ${self.background-next}
format-prefix = ""
format-volume-prefix-foreground = ${self.background}
format-volume-prefix-background = ${self.background-next}
format-volume-prefix = ""
format-muted-prefix-foreground = ${self.background}
format-muted-prefix-background = ${self.background-next}
format-muted-prefix = ""
format-mounted-prefix-foreground = ${self.background}
format-mounted-prefix-background = ${self.background-next}
format-mounted-prefix = ""
format-unmounted-prefix-foreground = ${self.background}
format-unmounted-prefix-background = ${self.background-next}
format-unmounted-prefix = ""
format-connected-prefix-foreground = ${self.background}
format-connected-prefix-background = ${self.background-next}
format-connected-prefix = ""
format-disconnected-prefix-foreground = ${self.background}
format-disconnected-prefix-background = ${self.background-next}
format-disconnected-prefix = ""
content-prefix-foreground = ${self.background}
content-prefix-background = ${self.background-next}
content-prefix = ""
;
; # Right-to-left in-line item with separator
;
; Display a right-to-left, in-line item with separator.
;
; Usage:
; [module/mymodule]
; inherit = powerline-templates/right-to-left-item-with-separator
; background = #rrggbb
; separator = #rrggbb
; (...)
;
; Mandatory settings:
; background Background color of current item
; separator Color of line item separator.
;
[powerline-templates/right-to-left-item-with-separator]
; Prefixes
format-prefix-foreground = ${self.background}
format-prefix-background = ${self.separator}
format-prefix = ""
format-volume-prefix-foreground = ${self.background}
format-volume-prefix-background = ${self.separator}
format-volume-prefix = ""
format-muted-prefix-foreground = ${self.separator}
format-muted-prefix-background = ${self.background}
format-muted-prefix = ""
format-mounted-prefix-foreground = ${self.background}
format-mounted-prefix-background = ${self.separator}
format-mounted-prefix = ""
format-unmounted-prefix-foreground = ${self.background}
format-unmounted-prefix-background = ${self.separator}
format-unmounted-prefix = ""
format-connected-prefix-foreground = ${self.background}
format-connected-prefix-background = ${self.separator}
format-connected-prefix = ""
format-disconnected-prefix-foreground = ${self.background}
format-disconnected-prefix-background = ${self.separator}
format-disconnected-prefix = ""
content-prefix-foreground = ${self.background}
content-prefix-background = ${self.separator}
content-prefix = ""
; Suffixes
format-suffix-foreground = ${self.separator}
format-suffix-background = ${self.background}
format-suffix = ""
format-volume-suffix-foreground = ${self.separator}
format-volume-suffix-background = ${self.background}
format-volume-suffix = ""
format-muted-suffix-foreground = ${self.background}
format-muted-suffix-background = ${self.separator}
format-muted-suffix = ""
format-mounted-suffix-foreground = ${self.separator}
format-mounted-suffix-background = ${self.background}
format-mounted-suffix = ""
format-unmounted-suffix-foreground = ${self.separator}
format-unmounted-suffix-background = ${self.background}
format-unmounted-suffix = ""
format-connected-suffix-foreground = ${self.separator}
format-connected-suffix-background = ${self.background}
format-connected-suffix = ""
format-disconnected-suffix-foreground = ${self.separator}
format-disconnected-suffix-background = ${self.background}
format-disconnected-suffix = ""
content-suffix-foreground = ${self.separator}
content-suffix-background = ${self.background}
content-suffix = ""
;
; # Right-to-left line-starting item with separator
;
; Display a right-to-left, *line starting* item with separator.
;
; NOTE: This template shall only be inherited by the rightmost item of a
; right-to-left line with separators. It avoids the appearance
; of a separating arrow half at the rightmost part of the item.
;
; Usage:
; [module/mystartingmodule]
; inherit = powerline-templates/right-to-left-starting-item-with-separator
; background = #rrggbb
; separator = #rrggbb
; (...)
;
; Mandatory settings:
; background Background color of current item
; separator Color of line item separator.
;
[powerline-templates/right-to-left-starting-item-with-separator]
; Prefixes needed only
format-prefix-foreground = ${self.background}
format-prefix-background = ${self.separator}
format-prefix = ""
format-volume-prefix-foreground = ${self.background}
format-volume-prefix-background = ${self.separator}
format-volume-prefix = ""
format-muted-prefix-foreground = ${self.separator}
format-muted-prefix-background = ${self.background}
format-muted-prefix = ""
format-mounted-prefix-foreground = ${self.background}
format-mounted-prefix-background = ${self.separator}
format-mounted-prefix = ""
format-unmounted-prefix-foreground = ${self.background}
format-unmounted-prefix-background = ${self.separator}
format-unmounted-prefix = ""
format-connected-prefix-foreground = ${self.background}
format-connected-prefix-background = ${self.separator}
format-connected-prefix = ""
format-disconnected-prefix-foreground = ${self.background}
format-disconnected-prefix-background = ${self.separator}
format-disconnected-prefix = ""
content-prefix-foreground = ${self.background}
content-prefix-background = ${self.separator}
content-prefix = ""

View File

@ -1,4 +0,0 @@
try:
from main import *
except Exception as e:
print(e)

View File

@ -1,206 +0,0 @@
from libqtile import bar, layout, hook
from qtile_extras import widget
from libqtile.config import Click, Drag, Group, Key, Match, Screen
from libqtile.lazy import lazy
from libqtile.utils import guess_terminal
from qtile_extras.widget.decorations import PowerLineDecoration
from widgets.volume import Volume
import traverse
class Colors:
background = "#1f2430"
accent = "#002F5F"
panel_height = 28
panel_font_size = 13
font = "Ubuntu"
powerline_right= {
"decorations": [
PowerLineDecoration(path="arrow_right", size=10)
],
"padding": 6
}
screens = [
Screen(
top=bar.Bar(
widgets = [
widget.TaskList(theme_path="/user/share/icons/Papirus/16x16/"),
widget.Sep(padding=10, linewidth=0),
widget.GroupBox(
rounded=False,
inactive="#ffffff",
active="#ffffff",
highlight_method="block",
highlight_color=Colors.accent,
this_current_screen_border=Colors.accent,
other_current_screen_border=Colors.accent,
this_screen_border="#00000000",
other_screen_border="#00000000",
font="Ubuntu bold",
padding=9,
hide_unused=True
),
widget.Spacer(),
widget.Sep(linewidth=0, background=None, **powerline_right), # Workaround for having the last arrow
widget.Systray(icon_size=24, background=Colors.accent, **powerline_right),
widget.Memory(format="{MemUsed: .2f}{mm}", measure_mem="G", background=Colors.background, **powerline_right),
widget.ThermalSensor(tag_sensor='Tctl', background=Colors.accent, **powerline_right),
widget.CPU(background=Colors.background, format="CPU {load_percent}%", **powerline_right),
widget.CPU(background=Colors.accent, format="{freq_max}GHz", **powerline_right),
Volume(size=12, background=Colors.background, theme_path="/usr/share/icons/Papirus/16x16/"),
Volume(background=Colors.background, **powerline_right),
widget.Image(filename="/usr/share/icons/Papirus/48x48/apps/org.kde.archUpdate.svg", background=Colors.accent, margin_y=6),
widget.CheckUpdates(background=Colors.accent, distro="Arch_yay", initial_text="0", no_update_string="0", execute='WINIT_X11_SCALE_FACTOR=1 alacritty -e bash -c "yay ; echo \'\nDone, press any key to exit...\' ; read"', **powerline_right),
widget.CurrentLayout(background=Colors.background, **powerline_right),
widget.Clock(
foreground="#ffffff",
background=Colors.accent,
format="%a %b %d, %H:%M:%S",
**powerline_right
),
widget.Sep(padding=2, linewidth=0, background=Colors.accent),
],
size=panel_height, background=Colors.background + "99"
),
wallpaper="/home/user/.config/qtile/wallpaper.png",
wallpaper_mode="stretch"
),
Screen(wallpaper="/home/user/.config/qtile/wallpaper.png", wallpaper_mode="stretch"),
Screen(wallpaper="/home/user/.config/qtile/wallpaper.png", wallpaper_mode="stretch"),
]
mod = "mod4"
terminal = guess_terminal()
keys = [
# A list of available commands that can be bound to keys can be found
# at https://docs.qtile.org/en/latest/manual/config/lazy.html
# Switch between windows
Key([mod], 'k', lazy.function(traverse.up)),
Key([mod], 'j', lazy.function(traverse.down)),
Key([mod], 'h', lazy.function(traverse.left)),
Key([mod], 'l', lazy.function(traverse.right)),
Key([mod], "f", lazy.window.toggle_floating(), desc="Move focus up"),
Key([mod], "m", lazy.window.toggle_fullscreen(), desc="Move focus up"),
Key([mod], "space", lazy.layout.next(), desc="Move window focus to other window"),
# Move windows between left/right columns or move up/down in current stack.
# Moving out of range in Columns layout will create new column.
Key([mod, "shift"], "h", lazy.layout.shuffle_left(), desc="Move window to the left"),
Key([mod, "shift"], "l", lazy.layout.shuffle_right(), desc="Move window to the right"),
Key([mod, "shift"], "j", lazy.layout.shuffle_down(), desc="Move window down"),
Key([mod, "shift"], "k", lazy.layout.shuffle_up(), desc="Move window up"),
# Grow windows. If current window is on the edge of screen and direction
# will be to screen edge - window would shrink.
Key([mod, "control"], "h", lazy.layout.grow_left(), desc="Grow window to the left"),
Key([mod, "control"], "l", lazy.layout.grow_right(), desc="Grow window to the right"),
Key([mod, "control"], "j", lazy.layout.grow_down(), desc="Grow window down"),
Key([mod, "control"], "k", lazy.layout.grow_up(), desc="Grow window up"),
Key([mod], "n", lazy.layout.normalize(), desc="Reset all window sizes"),
# Toggle between split and unsplit sides of stack.
# Split = all windows displayed
# Unsplit = 1 window displayed, like Max layout, but still with
# multiple stack panes
Key(
[mod, "shift"],
"Return",
lazy.layout.toggle_split(),
desc="Toggle between split and unsplit sides of stack",
),
Key([mod], "Return", lazy.spawn(terminal), desc="Launch terminal"),
Key([mod], "b", lazy.spawn("firefox"), desc="Launch browser"),
# Toggle between different layouts as defined below
Key([mod], "Tab", lazy.next_layout(), desc="Toggle between layouts"),
Key([mod], "q", lazy.window.kill(), desc="Kill focused window"),
Key([mod, "shift"], "r", lazy.reload_config(), desc="Reload the config"),
Key([mod, "control"], "q", lazy.shutdown(), desc="Shutdown Qtile"),
Key([mod], "r", lazy.spawncmd(), desc="Spawn a command using a prompt widget"),
]
groups = []
for i in list(range(1, 10)) + [0]:
groups.append(Group(str(i)))
for i in groups[:10]:
keys.extend(
[
# mod1 + letter of group = switch to group
Key(
[mod],
i.name,
lazy.group[i.name].toscreen(),
desc="Switch to group {}".format(i.name),
),
# mod1 + shift + letter of group = switch to & move focused window to group
Key(
[mod, "shift"],
i.name,
lazy.window.togroup(i.name, switch_group=True),
desc="Switch to & move focused window to group {}".format(i.name),
),
# Or, use below if you prefer not to switch to that group.
# # mod1 + shift + letter of group = move focused window to group
# Key([mod, "shift"], i.name, lazy.window.togroup(i.name),
# desc="move focused window to group {}".format(i.name)),
]
)
layout_settings = {
"border_focus": Colors.accent,
"border_normal": "#050f43",
# "border_normal_stack": "#00000000",
# "border_focus_stack": "#00000000",
"border_width": 2,
"margin": 3
}
mouse = [
Drag([mod], "Button1", lazy.window.set_position(),
start=lazy.window.get_position()),
Drag([mod], "Button3", lazy.window.set_position(), start=lazy.window.get_size())
]
layouts = [
layout.Columns(**layout_settings),
layout.Tile(**layout_settings),
layout.Max(),
# Try more layouts by unleashing below layouts.
# layout.Stack(num_stacks=2),
# layout.Bsp(),
# layout.Matrix(),
# layout.MonadTall(),
# layout.MonadWide(),
# layout.RatioTile(),
# layout.TreeTab(),
# layout.VerticalTile(),
# layout.Zoomy(),
]
dgroups_key_binder = None
dgroups_app_rules = [] # type: list
follow_mouse_focus = True
bring_front_click = False
cursor_warp = False
floating_layout = layout.Floating(
float_rules=[
*layout.Floating.default_float_rules,
Match(wm_class="confirmreset"), # gitk
Match(wm_class="makebranch"), # gitk
Match(wm_class="maketag"), # gitk
Match(wm_class="ssh-askpass"), # ssh-askpass
Match(title="branchdialog"), # gitk
Match(title="pinentry"), # GPG key password entry
]
)
auto_fullscreen = True
focus_on_window_activation = "smart"
reconfigure_screens = True
# If things like steam games want to auto-minimize themselves when losing
# focus, should we respect this or not?
auto_minimize = False
wmname = "LG3D"

View File

@ -1,100 +0,0 @@
"""
This plugin exports four functions - up, down, left and right - that when called will
move window focus to the first window in that general direction. Focussing is based
entirely on position and geometry, so is independent of screens, layouts and whether
windows are floating or tiled. It can also move focus to and from empty screens.
Example usage:
import traverse
keys.extend([
Key([mod], 'k', lazy.function(traverse.up)),
Key([mod], 'j', lazy.function(traverse.down)),
Key([mod], 'h', lazy.function(traverse.left)),
Key([mod], 'l', lazy.function(traverse.right)),
])
Qtile versions known to work: 0.16 - 0.18
"""
from libqtile.config import Screen
def up(qtile):
_focus_window(qtile, -1, 'y')
def down(qtile):
_focus_window(qtile, 1, 'y')
def left(qtile):
_focus_window(qtile, -1, 'x')
def right(qtile):
_focus_window(qtile, 1, 'x')
def get_window_in_direction(qtile, dir, axis):
win = None
win_wide = None
dist = 10000
dist_wide = 10000
cur = qtile.current_window
if not cur:
cur = qtile.current_screen
if axis == 'x':
dim = 'width'
band_axis = 'y'
band_dim = 'height'
cur_pos = cur.x
band_min = cur.y
band_max = cur.y + cur.height
else:
dim = 'height'
band_axis = 'x'
band_dim = 'width'
band_min = cur.x
cur_pos = cur.y
band_max = cur.x + cur.width
cur_pos += getattr(cur, dim) / 2
windows = [w for g in qtile.groups if g.screen for w in g.windows]
windows.extend([s for s in qtile.screens if not s.group.windows])
if cur in windows:
windows.remove(cur)
for w in windows:
if isinstance(w, Screen) or not w.minimized:
pos = getattr(w, axis) + getattr(w, dim) / 2
gap = dir * (pos - cur_pos)
if gap > 5:
band_pos = getattr(w, band_axis) + getattr(w, band_dim) / 2
if band_min < band_pos < band_max:
if gap < dist:
dist = gap
win = w
else:
if gap < dist_wide:
dist_wide = gap
win_wide = w
if not win:
win = win_wide
return win
def _focus_window(qtile, dir, axis):
win = get_window_in_direction(qtile, dir, axis)
if win:
qtile.focus_screen(win.group.screen.index)
win.group.focus(win, True)
if not isinstance(win, Screen):
win.focus(False)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 961 KiB

View File

@ -1,28 +0,0 @@
from qtile_extras.widget import Volume as QVolume
from libqtile import images
class Volume(QVolume):
def __init__(self, size=None, **kwargs):
super().__init__(**kwargs)
self.size = size
def setup_images(self):
names = (
"audio-volume-high",
"audio-volume-low",
"audio-volume-medium",
"audio-volume-muted",
)
d_images = images.Loader(self.theme_path)(*names)
for name, img in d_images.items():
new_height = self.size if self.size else self.bar.height - 1
img.resize(height=new_height)
if img.width > self.length:
self.length = img.width + self.actual_padding * 2
if self.size:
matrix = img.pattern.get_matrix()
matrix.translate(tx=0, ty=-1 * (self.bar.height -1 - self.size) / 2 - 1)
img.pattern.set_matrix(matrix)
self.surfaces[name] = img.pattern

View File

@ -1,6 +0,0 @@
if ps -C rofi > /dev/null
then
echo "Already running"
else
rofi -show combi -combi-modi drun,calc:~/.config/rofi/show-calculator.sh
fi

View File

@ -1,8 +0,0 @@
configuration {
font: "SF Pro Rounded 13";
show-icons: true;
icon-theme: "Papirus";
kb-cancel: "Super_L+XF86Launch5,Escape";
combi-hide-mode-prefix: true;
}
@theme "~/.config/rofi/material-ocean.rasi"

View File

@ -1,115 +0,0 @@
/*
Copyright © Blacksuan19 @ 2020
part of material ocean colorscheme
licensed under GNU's GPL 3
*/
* {
background: #0f111a;
foreground: #f1f1f1;
selected: #0033a1;
selected-text: #ffffff;
}
window {
transparency: "real";
background-color: @background;
text-color: @foreground;
width: 800px;
border-radius: 5px;
}
textbox-prompt-colon {
expand: false;
background-color: @background;
padding: 4px 0px 0px 6px;
}
inputbar {
children: [ textbox-prompt-colon, entry ];
background-color: @background;
text-color: @foreground;
expand: false;
border: 0px 0px 0px 0px;
border-radius: 0px;
border-color: @selected;
margin: 0px 0px 0px 0px;
padding: 0px 0px 4px 0px;
position: center;
}
entry {
background-color: @background;
text-color: @foreground;
placeholder-color: @foreground;
expand: true;
horizontal-align: 0;
blink: true;
padding: 4px 0px 0px 4px;
font: "SF Pro Rounded 25";
}
case-indicator {
background-color: @background;
text-color: @foreground;
spacing: 0;
}
listview {
background-color: @background;
columns: 1;
spacing: 5px;
cycle: true;
dynamic: true;
layout: vertical;
fixed-height:true;
lines: 5;
}
mainbox {
background-color: @background;
children: [ inputbar, message, listview ];
spacing: 20px;
padding: 20px 15px 15px 15px;
}
message {
children: [ textbox ];
border-radius: 5px;
}
textbox {
background-color: @selected;
text-color: @foreground;
padding: 20px 6px 20px 80px;
}
element {
background-color: @background;
text-color: @foreground;
orientation: horizontal;
border-radius: 4px;
padding: 2px 2px 2px 2px;
}
element-text, element-icon {
background-color: inherit;
text-color: inherit;
}
element-icon {
size: 40px;
border: 10px;
}
element-text {
padding: 20px 0px 0px 10px;
}
element selected {
background-color: @selected;
text-color: @selected-text;
border: 0px;
border-radius: 3px;
border-color: @selected;
}

View File

@ -1,72 +0,0 @@
#!/usr/bin/env bash
# rofi-ykman
# YubiKey OATH utility
#2019 nukeop
print_usage() {
echo "Usage: rofi-ykman [command]"
echo
echo "Commands:"
echo " clipboard Copy the code to the clipboard. (default)"
echo " type Type the code."
echo
}
clipboard () {
if [ $XDG_SESSION_TYPE == "wayland" ]
then
wl-copy
else
xsel --clipboard
fi
}
type () {
if [ $XDG_SESSION_TYPE == "wayland" ]
then
wtype -
else
xargs xdotool type
fi
}
# shortcuts
type="Alt+1"
clipboard="Alt+2"
main() {
accounts=$(ykman oath accounts list)
shortcuts=(
-kb-custom-1 "$type"
-kb-custom-2 "$clipboard"
)
prompt="YubiKey OATH"
account=$(echo "${accounts/, TOTP/\n}" | awk '{ print $0 "\0icon\x1fyubioath"; }' | rofi -dmenu -i -p "$prompt" ${shortcuts[@]})
case $? in
1) exit ;;
10) command=type ;;
11) command=clipboard ;;
*) command=$default_command ;;
esac
code=$(ykman oath accounts code "$account")
IFS=', ' read -r -a code <<< "$code"
case $command in
clipboard) echo -n "${code[-1]}" | wl-copy;;
type) echo -n "${code[-1]}" | type;;
esac
}
default_command="${1:-clipboard}"
case $default_command in
clipboard|type) ;;
*) print_usage; exit 1;;
esac
main

View File

@ -1,10 +0,0 @@
#!/bin/bash
if [[ -z "$1" ]]; then
echo -e "Calc Mode\0icon\x1fgnome-calculator"
else
killall rofi
# so rofi doesn't complain "can't launch rofi inside rofi"
rofi -show calc -modi calc -no-show-match -no-sort -calc-command "echo -n '{result}' | xsel --clipboard"
fi

View File

@ -1,147 +0,0 @@
#!/bin/bash
# Headless
NVIM=true
ZSH=true
PROFILE=true
TMUX=true
# GUI
AWESOME=false
ALACRITTY=false
MPV=false
SUDO="sudo"
if [[ $(whoami) == "root" ]]; then
SUDO=""
fi
#################################################
# Basic Preparation #
#################################################
OS=$(grep -E '^(NAME)=' /etc/os-release )
if [[ -z "${XDG_CONFIG_HOME}" ]]; then
mkdir -p "$HOME"/.config
XDG_CONFIG_HOME="$HOME"/.config
fi
if [[ -z "${XDG_DATA_HOME}" ]]; then
mkdir -p "$HOME"/.local/share
XDG_DATA_HOME="$HOME"/.local/share
fi
#################################################
# Neovim #
#################################################
if $NVIM; then
dependencies="neovim git unzip fzf cmake gcc make curl wget ripgrep"
if [[ $OS == "NAME=\"Arch Linux\"" ]]; then
$SUDO pacman -Sy --needed --noconfirm $dependencies npm go fd dotnet-sdk
elif [[ $OS == "NAME=\"Ubuntu\"" ]]; then
$SUDO apt update
$SUDO apt install -y software-properties-common
$SUDO add-apt-repository ppa:neovim-ppa/unstable -y
$SUDO curl -sL https://deb.nodesource.com/setup_21.x | $SUDO bash -
repo_version=$(if command -v lsb_release &> /dev/null; then lsb_release -r -s; else grep -oP '(?<=^VERSION_ID=).+' /etc/os-release | tr -d '"'; fi)
wget https://packages.microsoft.com/config/ubuntu/"$repo_version"/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
$SUDO dpkg -i packages-microsoft-prod.deb
rm packages-microsoft-prod.deb
$SUDO apt update
$SUDO apt install -y $dependencies python3-venv python3-pip nodejs golang fd-find cargo dotnet-sdk-8.0
fi
nvim --headless "+Lazy! sync" +qa
nvim --headless "+MasonInstall bash-language-server pyright typescript-language-server rust-analyzer clangd cmake-language-server css-lsp dockerfile-language-server emmet-ls gopls html-lsp jdtls json-lsp ltex-ls lua-language-server ruff-lsp rustfmt rustywind texlab vetur-vls vim-language-server yaml-language-server csharp-language-server typst-lsp" +qa
fi
#################################################
# ZSH #
#################################################
if $ZSH; then
PROFILE=true
dependencies="fzf zsh curl zoxide fzy"
if [[ $OS == "NAME=\"Arch Linux\"" ]]; then
$SUDO pacman -Sy --needed --noconfirm $dependencies zsh-autosuggestions
echo "Please manually install yay"
elif [[ $OS == "NAME=\"Ubuntu\"" ]]; then
$SUDO apt update
$SUDO apt install -y $dependencies
fi
mkdir -p "$HOME"/.local/state/zsh/
git clone https://github.com/cxreg/smartcd.git /tmp/smartcd
cd /tmp/smartcd || exit
make install
cd - || exit
fi
#################################################
# Awesome #
#################################################
if $AWESOME; then
dependencies="awesome picom numlockx xcape rofi"
if [[ $OS == "NAME=\"Arch Linux\"" ]]; then
$SUDO pacman -Sy --needed --noconfirm $dependencies network-manager-applet xorg-xmodmap adobe-source-code-pro-fonts noto-fonts ttf-nerd-fonts-symbols
elif [[ $OS == "NAME=\"Ubuntu\"" ]]; then
$SUDO apt update
$SUDO apt install -y $dependencies awesome-extra
fi
fi
#################################################
# Alacritty #
#################################################
if $ALACRITTY; then
dependencies="alacritty"
if [[ $OS == "NAME=\"Arch Linux\"" ]]; then
$SUDO pacman -Sy --needed --noconfirm $dependencies
elif [[ $OS == "NAME=\"Ubuntu\"" ]]; then
$SUDO apt update
$SUDO apt install -y software-properties-common
$SUDO add-apt-repository ppa:aslatter/ppa -y
$SUDO apt update
$SUDO apt install -y $dependencies
fi
fi
#################################################
# MPV #
#################################################
if $MPV; then
dependencies="mpv"
if [[ $OS == "NAME=\"Arch Linux\"" ]]; then
$SUDO pacman -Sy --needed --noconfirm $dependencies
elif [[ $OS == "NAME=\"Ubuntu\"" ]]; then
$SUDO apt update
$SUDO apt install -y $dependencies
fi
fi
#################################################
# Tmux #
#################################################
if $TMUX; then
dependencies="tmux git zsh xdg-utils"
if [[ $OS == "NAME=\"Arch Linux\"" ]]; then
$SUDO pacman -Sy --needed --noconfirm $dependencies
git clone https://github.com/tmux-plugins/tpm "$XDG_DATA_HOME"/tmux/plugins/tpm
"$XDG_DATA_HOME"/tmux/plugins/tpm/bin/install_plugins
elif [[ $OS == "NAME=\"Ubuntu\"" ]]; then
$SUDO apt update
$SUDO apt install -y $dependencies
git clone https://github.com/tmux-plugins/tpm "$HOME"/.tmux/plugins/tpm
"$HOME"/.tmux/plugins/tpm/bin/install_plugins
fi
fi

View File

@ -1,37 +0,0 @@
#!/bin/bash
RUNNING_WAYPIPE=false
SSH_CLIENT=""
CHILD_PID=$(pgrep -P "$1")
GRAND_CHILD_PID=$(pgrep -P "$CHILD_PID")
if [ "$GRAND_CHILD_PID" != 0 ]; then
GRAND_CHILD_NAME=$(ps -p "$GRAND_CHILD_PID" -o comm=)
if [ "$GRAND_CHILD_NAME" == "ssh" ]; then
CHILD_PID=$GRAND_CHILD_PID
SSH_CLIENT=$(ps -p "$CHILD_PID" -o args --no-headers | awk '{ print $2 }')
fi
if [ "$GRAND_CHILD_NAME" == "waypipe" ]; then
RUNNING_WAYPIPE=true
CHILD_PID=$(pgrep -P "$GRAND_CHILD_PID")
SSH_CLIENT=$(ps -p "$GRAND_CHILD_PID" -o args --no-headers | awk '{ print $4 }')
fi
fi
if [ $RUNNING_WAYPIPE == true ]; then
PREVIOUS_SESSION_ID=$(grep -z "SSH_SESSION_ID" "/proc/$CHILD_PID/environ" | xargs -0 -n 1 | grep -oP "[0-9]*")
SSH_SESSION_ID=$RANDOM
alacritty -e zsh -c "SSH_SESSION_ID=$SSH_SESSION_ID waypipe ssh -t \"$SSH_CLIENT\" env SSH_SESSION_ID=\"$SSH_SESSION_ID\" PREVIOUS_SESSION_ID=\"$PREVIOUS_SESSION_ID\" \"zsh --login\""
else
if [ "$(ps -p "$1" -o comm=)" == "alacritty" ]; then
CWD=$(readlink -e /proc/"$CHILD_PID"/cwd)
if [ "$CWD" != "" ]; then
alacritty --working-directory "$CWD"
else
alacritty
fi
else
alacritty
fi
fi

View File

@ -1,18 +0,0 @@
#!/usr/bin/python3
import telegram
import fileinput
import asyncio
async def run():
text = "Vault Etienne:\n\n"
for line in fileinput.input():
text += line
bot = telegram.Bot(token="381718873:AAElFmI2BDjumCehhWicuksE0vutrPSkoGA")
chat_id = 125754925
await bot.send_message(chat_id, text)
if __name__ == "__main__":
loop = asyncio.get_event_loop()
loop.run_until_complete(asyncio.wait([loop.create_task(run())]))
loop.close()

View File

@ -1,69 +0,0 @@
set-environment -g TMUX_PLUGIN_MANAGER_PATH '~/.local/share/tmux/plugins'
# Use vi keybindings in copy mode
set-window-option -g mode-keys vi
bind-key -T copy-mode-vi 'v' send -X begin-selection
bind-key -T copy-mode-vi 'y' send -X copy-selection
# Use C-a as prefix
unbind C-b
set-option -g prefix C-a
bind-key C-a send-prefix
# More visual split commands
bind | split-window -h -c "#{pane_current_path}"
bind - split-window -v -c "#{pane_current_path}"
bind c new-window -c "#{pane_current_path}"
unbind '"'
unbind %
# Allow to use the mouse
set -g mouse on
# theme
set -g @themepack 'powerline/double/blue'
# Allow using ctrl + arrow keys
set-option -g xterm-keys on
# status bar
# set -g status-right '#{net_speed} | #{prefix_highlight} #{battery_icon}#{battery_percentage} | %a %h-%d %H:%M'
set-window-option -g status-left " #S "
set-window-option -g status-right " #{prefix_highlight} \"#(hostname)\" %H:%M %d-%b-%y "
set-window-option -g window-status-format " #I: #W "
set-window-option -g window-status-current-format " #I: #W "
# Set title suffix to "- TMUX"
# set-option -g set-titles on
# set-option -g set-titles-string '#S: #W - TMUX'
# # Smart pane switching with awareness of vim splits and system windows
# is_vim="ps -o state= -o comm= -t '#{pane_tty}' | grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'"
# bind -n C-Left if-shell "$is_vim" "send-keys C-h" "run-shell 'sh ~/.config/awesome/awesomewm-vim-tmux-navigator/tmux_focus.sh left'"
# bind -n C-Down if-shell "$is_vim" "send-keys C-j" "run-shell 'sh ~/.config/awesome/awesomewm-vim-tmux-navigator/tmux_focus.sh down'"
# bind -n C-Up if-shell "$is_vim" "send-keys C-k" "run-shell 'sh ~/.config/awesome/awesomewm-vim-tmux-navigator/tmux_focus.sh up'"
# bind -n C-Right if-shell "$is_vim" "send-keys C-l" "run-shell 'sh ~/.config/awesome/awesomewm-vim-tmux-navigator/tmux_focus.sh right'"
# bind-key -T copy-mode-vi 'C-Left' "run-shell 'sh ~/.config/awesome/awesomewm-vim-tmux-navigator/tmux_focus.sh left'"
# bind-key -T copy-mode-vi 'C-Down' "run-shell 'sh ~/.config/awesome/awesomewm-vim-tmux-navigator/tmux_focus.sh down'"
# bind-key -T copy-mode-vi 'C-Up' "run-shell 'sh ~/.config/awesome/awesomewm-vim-tmux-navigator/tmux_focus.sh up'"
# bind-key -T copy-mode-vi 'C-Right' "run-shell 'sh ~/.config/awesome/awesomewm-vim-tmux-navigator/tmux_focus.sh right'"
# Extrakto
# set -g @extrakto_split_direction v
# set -g @extrakto_split_size 15
# Plugins (Keep this last)
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'christoomey/vim-tmux-navigator'
# set -g @plugin 'tmux-plugins/tmux-copycat'
# set -g @plugin 'tmux-plugins/tmux-open'
# set -g @plugin 'tmux-plugins/tmux-prefix-highlight'
# set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-yank'
# set -g @plugin 'laktak/extrakto'
set -g @plugin 'jimeh/tmux-themepack'
run '~/.local/share/tmux/plugins/tpm/tpm'
#ZSH
set -g default-shell /bin/zsh
# colors
set-option -sa terminal-overrides ',screen-256color:RGB'

View File

@ -1,289 +0,0 @@
set nocompatible
syntax on
let VIMHOME = split(&rtp, ",")[0]
let $VIMHOME = VIMHOME
" vim-plug
call plug#begin(VIMHOME."/plugs")
" Plug 'Valloric/YouCompleteMe'
Plug 'nixprime/cpsm', {'do': './install.sh'}
Plug 'kien/ctrlp.vim'
Plug 'prabirshrestha/asyncomplete.vim'
Plug 'prabirshrestha/vim-lsp'
Plug 'prabirshrestha/asyncomplete-lsp.vim'
Plug 'ervandew/supertab'
Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'ConradIrwin/vim-bracketed-paste'
Plug 'NLKNguyen/papercolor-theme'
Plug 'Shougo/deoplete.nvim'
Plug 'christoomey/vim-tmux-navigator'
Plug 'cohama/lexima.vim', {'do': 'sed -i \"s/has(.nvim.) && //\" autoload/lexima/insmode.vim'}
Plug 'editorconfig/editorconfig-vim'
Plug 'gmarik/Vundle.vim'
Plug 'hdima/python-syntax'
Plug 'jeetsukumaran/vim-buffergator'
Plug 'kristijanhusak/vim-hybrid-material'
Plug 'lambdalisue/fern.vim'
Plug 'lervag/vimtex'
Plug 'neovimhaskell/haskell-vim'
Plug 'nvie/vim-flake8'
Plug 'octol/vim-cpp-enhanced-highlight'
Plug 'pangloss/vim-javascript'
Plug 'posva/vim-vue'
Plug 'rhysd/vim-grammarous'
Plug 'roxma/nvim-yarp'
Plug 'roxma/vim-hug-neovim-rpc'
Plug 'tmux-plugins/vim-tmux'
Plug 'tmux-plugins/vim-tmux-focus-events'
Plug 'tomtom/tcomment_vim'
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
Plug 'vim-scripts/indentpython.vim'
Plug 'vimwiki/vimwiki'
call plug#end()
let g:ycm_global_ycm_extra_conf = '~/.vim/.ycm_extra_conf.py'
let mapleader=","
:command W w
:command Q q
:command WQ wq
:command Wq wq
nnoremap j gj
nnoremap k gk
nnoremap <C-U> <C-O>
nnoremap <C-E> <C-U>
" don't store .swp files in the file's own directory
" neither for .ext~ files
set directory=/home/user/.vim/tmp/
set backupdir=/home/user/.vim/tmp/
" VimWiki
let g:vimwiki_key_mappings = { 'table_mappings': 0 }
let g:vimwiki_markdown_link_ext = 1
autocmd FileType vimwiki setlocal shiftwidth=2 softtabstop=2 expandtab
" Autoindent for filetype
filetype plugin indent on
set autoindent
set encoding=utf-8
set scrolloff=5
set sidescrolloff=10
set completeopt-=preview
set backspace=indent,eol,start
" Splits
set splitbelow
set splitright
" CtrlP
let g:ctrlp_match_func = {'match': 'cpsm#CtrlPMatch'}
nnoremap <silent> <C-o> :CtrlPBuffer<CR>
let g:cpsm_unicode=1
let g:ctrlp_user_command = ['.git/', 'git --git-dir=%s/.git ls-files -oc --exclude-standard']
" Unsaved buffer switching
set hidden
" Line numbering
set number
set numberwidth=4
:set mouse=a
" Allow xterm-key usage inside tmux
execute "set <xUp>=\e[1;*A"
execute "set <xDown>=\e[1;*B"
execute "set <xRight>=\e[1;*C"
execute "set <xLeft>=\e[1;*D"
" Persistent undo
set undodir=~/.vim/undodir/
set undofile
set undolevels=1000
set undoreload=10000
" Searching
set ignorecase
set smartcase
set incsearch
set hlsearch
nnoremap <leader><space> :noh<CR>
" Text wrapping
set lbr
" Vimtex
let g:tex_flavor = 'latex'
" Tabs
if has("autocmd")
filetype plugin indent on
autocmd FileType make set tabstop=8 shiftwidth=8 softtabstop=0 noexpandtab
endif
" Terminal colors
set t_Co=256
set background=dark
let g:airline_theme="solarized"
let g:airline_solarized_bg="dark"
set tabstop=4
set shiftwidth=4
set softtabstop=4
set expandtab
" Commenting
nnoremap <silent> <leader>c :TComment<CR>
nnoremap <silent> <leader>C :TCommentBlock<CR>
vnoremap <silent> <leader>c :TCommentInline<CR>
vnoremap <silent> <leader>C :TCommentBlock<CR>
" Tab completion
set wildmode=longest,list
set wildmenu
set guifont=Ubuntu\ Mono\ derivative\ Powerline\ 13
let g:airline_powerline_fonts = 1
set laststatus=2
set ttimeoutlen=50
" Color scheme
syntax enable
let python_highlight_all=1
let g:solarized_termcolors=256
colorscheme hybrid_material
" Remap u to y
vnoremap u y
" Save clipboard on quit
autocmd VimLeave * call system("xsel -ib", getreg('+'))
" Automatically remove trailing spaces
let blacklist = ['vimwiki']
autocmd BufWritePre * if index(blacklist, &ft) < 0 | :%s/\s\+$//e
" Use deoplete.
autocmd FileType python let g:deoplete#enable_at_startup = 1
" VPW: set filetype for .py3
autocmd BufRead,BufNewFile *.py3 set filetype=python
" Vue indent
autocmd FileType vue setlocal shiftwidth=2 softtabstop=2 expandtab
autocmd FileType javascript setlocal shiftwidth=2 softtabstop=2 expandtab
autocmd FileType vue syntax sync fromstart
" Disable shift+k for manual lookup
map <S-k> <Nop>
" Prolog: set filetype for .pl
autocmd BufRead,BufNewFile *.pl set filetype=prolog
" Disable modelines, fix CVE
set modelines=0
set nomodeline
" Coc extensions
set updatetime=300
set shortmess+=c
if has("nvim-0.5.0") || has("patch-8.1.1564")
" Recently vim can merge signcolumn and number column into one
set signcolumn=number
else
set signcolumn=yes
endif
let g:coc_global_extensions = []
command! -nargs=1 Ext :call add(g:coc_global_extensions, <args>)
let g:coc_filetype_map = {'tex': 'latex', 'md': 'markdown'}
nmap <silent> <leader>p <Plug>(coc-diagnostic-prev)
nmap <silent> <leader>n <Plug>(coc-diagnostic-next)
nmap <silent> <leader>f <Plug>(coc-codeaction-line)
vmap <silent> <leader>f <Plug>(coc-codeaction-line)
nmap <buffer> gd <plug>(lsp-definition)
nnoremap <Leader>p :CocList yank<CR>
vnoremap <Leader>p :CocList yank<CR>
Ext 'coc-snippets'
Ext 'coc-emoji'
Ext 'coc-highlight'
Ext 'coc-emmet'
" Ext 'coc-omnisharp'
Ext 'coc-vimtex'
Ext 'coc-json'
Ext 'coc-java'
Ext 'coc-pyright'
Ext 'coc-css'
Ext 'coc-html'
Ext 'coc-cmake'
Ext 'coc-clangd'
Ext 'coc-docker'
Ext 'coc-fzf-preview'
Ext 'coc-ltex'
Ext 'coc-vetur'
Ext 'coc-yank'
" Ext 'coc-sh'
" FZF Preview
nnoremap <silent> <Leader>/ :<C-u>CocCommand fzf-preview.Lines --add-fzf-arg=--no-sort --add-fzf-arg=--query="'"<CR>
nnoremap <silent> <C-f> :<C-u>CocCommand fzf-preview.ProjectGrepRecall<CR>
nnoremap <silent> <Leader>d :<C-u>CocCommand fzf-preview.CocCurrentDiagnostics<CR>
nnoremap <silent> <Leader>d :<C-u>CocCommand fzf-preview.CocCurrentDiagnostics<CR>
delc Ext
" Language Server
if executable('pyls')
" pip install python-language-server
au User lsp_setup call lsp#register_server({
\ 'name': 'pyls',
\ 'cmd': {server_info->['pyls']},
\ 'allowlist': ['python'],
\ })
endif
function! s:on_lsp_buffer_enabled() abort
setlocal omnifunc=lsp#complete
setlocal signcolumn=yes
if exists('+tagfunc') | setlocal tagfunc=lsp#tagfunc | endif
nmap <buffer> gs <plug>(lsp-document-symbol-search)
nmap <buffer> gS <plug>(lsp-workspace-symbol-search)
nmap <buffer> gr <plug>(lsp-references)
nmap <buffer> gi <plug>(lsp-implementation)
nmap <buffer> gt <plug>(lsp-type-definition)
nmap <buffer> <leader>rn <plug>(lsp-rename)
nmap <buffer> [g <plug>(lsp-previous-diagnostic)
nmap <buffer> ]g <plug>(lsp-next-diagnostic)
nmap <buffer> K <plug>(lsp-hover)
nnoremap <buffer> <expr><c-f> lsp#scroll(+4)
nnoremap <buffer> <expr><c-d> lsp#scroll(-4)
let g:lsp_format_sync_timeout = 1000
autocmd! BufWritePre *.rs,*.go call execute('LspDocumentFormatSync')
" refer to doc to add more commands
endfunction
augroup lsp_install
au!
" call s:on_lsp_buffer_enabled only for languages that has the server registered.
autocmd User lsp_buffer_enabled call s:on_lsp_buffer_enabled()
augroup END
" Tab for completion
let g:SuperTabContextDefaultCompletionType = "<c-n>"
let g:SuperTabDefaultCompletionType = "<c-n>"
" Go to Defintion CoC
nmap <buffer> gd :call CocActionAsync('jumpDefinition')<CR>

View File

@ -1,141 +0,0 @@
# Partially stolen from https://bitbucket.org/mblum/libgp/src/2537ea7329ef/.ycm_extra_conf.py
import os, glob, subprocess, re
import ycm_core
# These are the compilation flags that will be used in case there's no
# compilation database set (by default, one is not set).
# CHANGE THIS LIST OF FLAGS. YES, THIS IS THE DROID YOU HAVE BEEN LOOKING FOR.
STD = "-std=c++17"
flags = [
'-Wall',
'-Wextra',
'-Wno-long-long',
'-Wno-variadic-macros',
'-pedantic',
'-Weffc++',
'-fexceptions',
# THIS IS IMPORTANT! Without a "-std=<something>" flag, clang won't know which
# language to use when compiling headers. So it will guess. Badly. So C++
# headers will be compiled as C headers. You don't want that so ALWAYS specify
# a "-std=<something>".
# For a C project, you would set this to something like 'c99' instead of
# 'c++11'.
STD,
# ...and the same thing goes for the magic -x option which specifies the
# language that the files to be compiled are written in. This is mostly
# relevant for c++ headers.
# For a C project, you would set this to 'c' instead of 'c++'.
'-x', 'c++',
'-isystem', '/usr/include/qt',
'-I', 'include',
'-I', '.',
'-I', 'src',
'-I', 'main/cpp'
]
def AddSystemIncludes():
global flags
try:
output = subprocess.check_output(["clang++", STD, "-E", "-v", "-x", "c++", os.devnull], stderr=subprocess.STDOUT).decode("utf-8")
for loc in re.findall(r"^ (/.*)$", output, re.M):
flags += ["-isystem", loc]
except:
print("Clang++ not found")
flags += [
'-isystem', '/usr/include/x86_64-linux-gnu/c++/7',
'-isystem', '/usr/include/c++/7',
'-isystem', '/usr/include',
'-isystem', '/usr/local/include'
]
AddSystemIncludes()
# Set this to the absolute path to the folder (NOT the file!) containing the
# compile_commands.json file to use that instead of 'flags'. See here for
# more details: http://clang.llvm.org/docs/JSONCompilationDatabase.html
#
# Most projects will NOT need to set this to anything; you can just change the
# 'flags' list of compilation flags. Notice that YCM itself uses that approach.
compilation_database_folder = None
if compilation_database_folder:
database = ycm_core.CompilationDatabase( compilation_database_folder )
else:
database = None
def DirectoryOfThisScript():
return os.path.dirname( os.path.abspath( __file__ ) )
def MakeRelativePathsInFlagsAbsolute( flags, working_directory ):
if not working_directory:
return list( flags )
new_flags = []
make_next_absolute = False
path_flags = [ '-isystem', '-I', '-iquote', '--sysroot=' ]
for flag in flags:
new_flag = flag
if make_next_absolute:
make_next_absolute = False
if not flag.startswith( '/' ):
new_flag = os.path.join( working_directory, flag )
for path_flag in path_flags:
if flag == path_flag:
make_next_absolute = True
break
if flag.startswith( path_flag ):
path = flag[ len( path_flag ): ]
new_flag = path_flag + os.path.join( working_directory, path )
break
if new_flag:
new_flags.append( new_flag )
return new_flags
def FlagsForFile( filename ):
if database:
# Bear in mind that compilation_info.compiler_flags_ does NOT return a
# python list, but a "list-like" StringVec object
compilation_info = database.GetCompilationInfoForFile( filename )
final_flags = MakeRelativePathsInFlagsAbsolute(
compilation_info.compiler_flags_,
compilation_info.compiler_working_dir_ )
else:
# relative_to = DirectoryOfThisScript()
relative_to = ProjectRoot(filename)
final_flags = MakeRelativePathsInFlagsAbsolute( flags, relative_to ) + ["-I", os.path.abspath(os.path.dirname(filename))] + ExtIncludes(relative_to) + BuildIncludes(relative_to, filename)
try:
resources_lib_base = os.path.join(relative_to, "main", "resources", "lib")
final_flags += ["-I"+os.path.join(resources_lib_base, f, "include") for f in os.listdir(resources_lib_base)]
except: pass
return {
'flags': final_flags,
'do_cache': True
}
def ProjectRoot(filename):
path = os.path.abspath(os.path.dirname(filename))
while path != os.path.abspath(os.path.dirname(path)) and not (os.path.isdir(os.path.join(path, ".git")) or os.path.isdir(os.path.join(path, "include")) or os.path.isdir(os.path.join(path, "src"))):
path = os.path.abspath(os.path.dirname(path))
if not (os.path.isdir(os.path.join(path, "include")) or os.path.isdir(os.path.join(path, "src")) or os.path.isdir(os.path.join(path, "main"))):
return os.path.abspath(os.path.dirname(filename))
else:
return path
def ExtIncludes(path):
starting_paths = glob.glob(os.path.join(path, "build", "ext-*")) + glob.glob(os.path.join(path, "ext", "*"))
paths = starting_paths
for p in starting_paths:
paths += glob.glob(os.path.join(p, "include")) + glob.glob(os.path.join(p, "*", "include"))
paths += glob.glob(os.path.join(p, "src", "ext-*")) + glob.glob(os.path.join(p, "src", "ext-*", "include")) + glob.glob(os.path.join(p, "src", "ext-*", "*", "include"))
return ["-I%s" % p for p in paths]
def BuildIncludes(project_root, filename):
file_path = os.path.abspath(os.path.dirname(filename))[len(project_root) + 1:]
return ["-I%s/build/%s" % (project_root, file_path)]

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +0,0 @@
{
"python.linting.enabled": false,
"ltex.enabled": ["latex", "markdown"],
"ltex.language":"en-GB"
}

Binary file not shown.

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More