Compare commits
No commits in common. "sway" and "suckless" have entirely different histories.
55
.gitignore
vendored
Normal file
|
@ -0,0 +1,55 @@
|
||||||
|
# Prerequisites
|
||||||
|
*.d
|
||||||
|
|
||||||
|
# Object files
|
||||||
|
*.o
|
||||||
|
*.ko
|
||||||
|
*.obj
|
||||||
|
*.elf
|
||||||
|
|
||||||
|
# Linker output
|
||||||
|
*.ilk
|
||||||
|
*.map
|
||||||
|
*.exp
|
||||||
|
|
||||||
|
# Precompiled Headers
|
||||||
|
*.gch
|
||||||
|
*.pch
|
||||||
|
|
||||||
|
# Libraries
|
||||||
|
*.lib
|
||||||
|
*.a
|
||||||
|
*.la
|
||||||
|
*.lo
|
||||||
|
|
||||||
|
# Shared objects (inc. Windows DLLs)
|
||||||
|
*.dll
|
||||||
|
*.so
|
||||||
|
*.so.*
|
||||||
|
*.dylib
|
||||||
|
|
||||||
|
# Executables
|
||||||
|
*.exe
|
||||||
|
*.out
|
||||||
|
*.app
|
||||||
|
*.i*86
|
||||||
|
*.x86_64
|
||||||
|
*.hex
|
||||||
|
|
||||||
|
# Debug files
|
||||||
|
*.dSYM/
|
||||||
|
*.su
|
||||||
|
*.idb
|
||||||
|
*.pdb
|
||||||
|
|
||||||
|
# Kernel Module Compile Results
|
||||||
|
*.mod*
|
||||||
|
*.cmd
|
||||||
|
.tmp_versions/
|
||||||
|
modules.order
|
||||||
|
Module.symvers
|
||||||
|
Mkfile.old
|
||||||
|
dkms.conf
|
||||||
|
|
||||||
|
# lockscreen image
|
||||||
|
source/slock/lockscreen.*
|
712
LICENSE
|
@ -1,674 +1,38 @@
|
||||||
GNU GENERAL PUBLIC LICENSE
|
MIT/X Consortium License
|
||||||
Version 3, 29 June 2007
|
|
||||||
|
© 2006-2019 Anselm R Garbe <anselm@garbe.ca>
|
||||||
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
© 2006-2009 Jukka Salmi <jukka at salmi dot ch>
|
||||||
Everyone is permitted to copy and distribute verbatim copies
|
© 2006-2007 Sander van Dijk <a dot h dot vandijk at gmail dot com>
|
||||||
of this license document, but changing it is not allowed.
|
© 2007-2011 Peter Hartlich <sgkkr at hartlich dot com>
|
||||||
|
© 2007-2009 Szabolcs Nagy <nszabolcs at gmail dot com>
|
||||||
Preamble
|
© 2007-2009 Christof Musik <christof at sendfax dot de>
|
||||||
|
© 2007-2009 Premysl Hruby <dfenze at gmail dot com>
|
||||||
The GNU General Public License is a free, copyleft license for
|
© 2007-2008 Enno Gottox Boland <gottox at s01 dot de>
|
||||||
software and other kinds of works.
|
© 2008 Martin Hurton <martin dot hurton at gmail dot com>
|
||||||
|
© 2008 Neale Pickett <neale dot woozle dot org>
|
||||||
The licenses for most software and other practical works are designed
|
© 2009 Mate Nagy <mnagy at port70 dot net>
|
||||||
to take away your freedom to share and change the works. By contrast,
|
© 2010-2016 Hiltjo Posthuma <hiltjo@codemadness.org>
|
||||||
the GNU General Public License is intended to guarantee your freedom to
|
© 2010-2012 Connor Lane Smith <cls@lubutu.com>
|
||||||
share and change all versions of a program--to make sure it remains free
|
© 2011 Christoph Lohmann <20h@r-36.net>
|
||||||
software for all its users. We, the Free Software Foundation, use the
|
© 2015-2016 Quentin Rameau <quinq@fifth.space>
|
||||||
GNU General Public License for most of our software; it applies also to
|
© 2015-2016 Eric Pruitt <eric.pruitt@gmail.com>
|
||||||
any other work released this way by its authors. You can apply it to
|
© 2016-2017 Markus Teich <markus.teich@stusta.mhn.de>
|
||||||
your programs, too.
|
© 2020-2022 Chris Down <chris@chrisdown.name>
|
||||||
|
|
||||||
When we speak of free software, we are referring to freedom, not
|
Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
price. Our General Public Licenses are designed to make sure that you
|
copy of this software and associated documentation files (the "Software"),
|
||||||
have the freedom to distribute copies of free software (and charge for
|
to deal in the Software without restriction, including without limitation
|
||||||
them if you wish), that you receive source code or can get it if you
|
the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||||
want it, that you can change the software or use pieces of it in new
|
and/or sell copies of the Software, and to permit persons to whom the
|
||||||
free programs, and that you know you can do these things.
|
Software is furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
To protect your rights, we need to prevent others from denying you
|
The above copyright notice and this permission notice shall be included in
|
||||||
these rights or asking you to surrender the rights. Therefore, you have
|
all copies or substantial portions of the Software.
|
||||||
certain responsibilities if you distribute copies of the software, or if
|
|
||||||
you modify it: responsibilities to respect the freedom of others.
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
For example, if you distribute copies of such a program, whether
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||||
gratis or for a fee, you must pass on to the recipients the same
|
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
freedoms that you received. You must make sure that they, too, receive
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||||
or can get the source code. And you must show them these terms so they
|
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
know their rights.
|
DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
Developers that use the GNU GPL protect your rights with two steps:
|
|
||||||
(1) assert copyright on the software, and (2) offer you this License
|
|
||||||
giving you legal permission to copy, distribute and/or modify it.
|
|
||||||
|
|
||||||
For the developers' and authors' protection, the GPL clearly explains
|
|
||||||
that there is no warranty for this free software. For both users' and
|
|
||||||
authors' sake, the GPL requires that modified versions be marked as
|
|
||||||
changed, so that their problems will not be attributed erroneously to
|
|
||||||
authors of previous versions.
|
|
||||||
|
|
||||||
Some devices are designed to deny users access to install or run
|
|
||||||
modified versions of the software inside them, although the manufacturer
|
|
||||||
can do so. This is fundamentally incompatible with the aim of
|
|
||||||
protecting users' freedom to change the software. The systematic
|
|
||||||
pattern of such abuse occurs in the area of products for individuals to
|
|
||||||
use, which is precisely where it is most unacceptable. Therefore, we
|
|
||||||
have designed this version of the GPL to prohibit the practice for those
|
|
||||||
products. If such problems arise substantially in other domains, we
|
|
||||||
stand ready to extend this provision to those domains in future versions
|
|
||||||
of the GPL, as needed to protect the freedom of users.
|
|
||||||
|
|
||||||
Finally, every program is threatened constantly by software patents.
|
|
||||||
States should not allow patents to restrict development and use of
|
|
||||||
software on general-purpose computers, but in those that do, we wish to
|
|
||||||
avoid the special danger that patents applied to a free program could
|
|
||||||
make it effectively proprietary. To prevent this, the GPL assures that
|
|
||||||
patents cannot be used to render the program non-free.
|
|
||||||
|
|
||||||
The precise terms and conditions for copying, distribution and
|
|
||||||
modification follow.
|
|
||||||
|
|
||||||
TERMS AND CONDITIONS
|
|
||||||
|
|
||||||
0. Definitions.
|
|
||||||
|
|
||||||
"This License" refers to version 3 of the GNU General Public License.
|
|
||||||
|
|
||||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
|
||||||
works, such as semiconductor masks.
|
|
||||||
|
|
||||||
"The Program" refers to any copyrightable work licensed under this
|
|
||||||
License. Each licensee is addressed as "you". "Licensees" and
|
|
||||||
"recipients" may be individuals or organizations.
|
|
||||||
|
|
||||||
To "modify" a work means to copy from or adapt all or part of the work
|
|
||||||
in a fashion requiring copyright permission, other than the making of an
|
|
||||||
exact copy. The resulting work is called a "modified version" of the
|
|
||||||
earlier work or a work "based on" the earlier work.
|
|
||||||
|
|
||||||
A "covered work" means either the unmodified Program or a work based
|
|
||||||
on the Program.
|
|
||||||
|
|
||||||
To "propagate" a work means to do anything with it that, without
|
|
||||||
permission, would make you directly or secondarily liable for
|
|
||||||
infringement under applicable copyright law, except executing it on a
|
|
||||||
computer or modifying a private copy. Propagation includes copying,
|
|
||||||
distribution (with or without modification), making available to the
|
|
||||||
public, and in some countries other activities as well.
|
|
||||||
|
|
||||||
To "convey" a work means any kind of propagation that enables other
|
|
||||||
parties to make or receive copies. Mere interaction with a user through
|
|
||||||
a computer network, with no transfer of a copy, is not conveying.
|
|
||||||
|
|
||||||
An interactive user interface displays "Appropriate Legal Notices"
|
|
||||||
to the extent that it includes a convenient and prominently visible
|
|
||||||
feature that (1) displays an appropriate copyright notice, and (2)
|
|
||||||
tells the user that there is no warranty for the work (except to the
|
|
||||||
extent that warranties are provided), that licensees may convey the
|
|
||||||
work under this License, and how to view a copy of this License. If
|
|
||||||
the interface presents a list of user commands or options, such as a
|
|
||||||
menu, a prominent item in the list meets this criterion.
|
|
||||||
|
|
||||||
1. Source Code.
|
|
||||||
|
|
||||||
The "source code" for a work means the preferred form of the work
|
|
||||||
for making modifications to it. "Object code" means any non-source
|
|
||||||
form of a work.
|
|
||||||
|
|
||||||
A "Standard Interface" means an interface that either is an official
|
|
||||||
standard defined by a recognized standards body, or, in the case of
|
|
||||||
interfaces specified for a particular programming language, one that
|
|
||||||
is widely used among developers working in that language.
|
|
||||||
|
|
||||||
The "System Libraries" of an executable work include anything, other
|
|
||||||
than the work as a whole, that (a) is included in the normal form of
|
|
||||||
packaging a Major Component, but which is not part of that Major
|
|
||||||
Component, and (b) serves only to enable use of the work with that
|
|
||||||
Major Component, or to implement a Standard Interface for which an
|
|
||||||
implementation is available to the public in source code form. A
|
|
||||||
"Major Component", in this context, means a major essential component
|
|
||||||
(kernel, window system, and so on) of the specific operating system
|
|
||||||
(if any) on which the executable work runs, or a compiler used to
|
|
||||||
produce the work, or an object code interpreter used to run it.
|
|
||||||
|
|
||||||
The "Corresponding Source" for a work in object code form means all
|
|
||||||
the source code needed to generate, install, and (for an executable
|
|
||||||
work) run the object code and to modify the work, including scripts to
|
|
||||||
control those activities. However, it does not include the work's
|
|
||||||
System Libraries, or general-purpose tools or generally available free
|
|
||||||
programs which are used unmodified in performing those activities but
|
|
||||||
which are not part of the work. For example, Corresponding Source
|
|
||||||
includes interface definition files associated with source files for
|
|
||||||
the work, and the source code for shared libraries and dynamically
|
|
||||||
linked subprograms that the work is specifically designed to require,
|
|
||||||
such as by intimate data communication or control flow between those
|
|
||||||
subprograms and other parts of the work.
|
|
||||||
|
|
||||||
The Corresponding Source need not include anything that users
|
|
||||||
can regenerate automatically from other parts of the Corresponding
|
|
||||||
Source.
|
|
||||||
|
|
||||||
The Corresponding Source for a work in source code form is that
|
|
||||||
same work.
|
|
||||||
|
|
||||||
2. Basic Permissions.
|
|
||||||
|
|
||||||
All rights granted under this License are granted for the term of
|
|
||||||
copyright on the Program, and are irrevocable provided the stated
|
|
||||||
conditions are met. This License explicitly affirms your unlimited
|
|
||||||
permission to run the unmodified Program. The output from running a
|
|
||||||
covered work is covered by this License only if the output, given its
|
|
||||||
content, constitutes a covered work. This License acknowledges your
|
|
||||||
rights of fair use or other equivalent, as provided by copyright law.
|
|
||||||
|
|
||||||
You may make, run and propagate covered works that you do not
|
|
||||||
convey, without conditions so long as your license otherwise remains
|
|
||||||
in force. You may convey covered works to others for the sole purpose
|
|
||||||
of having them make modifications exclusively for you, or provide you
|
|
||||||
with facilities for running those works, provided that you comply with
|
|
||||||
the terms of this License in conveying all material for which you do
|
|
||||||
not control copyright. Those thus making or running the covered works
|
|
||||||
for you must do so exclusively on your behalf, under your direction
|
|
||||||
and control, on terms that prohibit them from making any copies of
|
|
||||||
your copyrighted material outside their relationship with you.
|
|
||||||
|
|
||||||
Conveying under any other circumstances is permitted solely under
|
|
||||||
the conditions stated below. Sublicensing is not allowed; section 10
|
|
||||||
makes it unnecessary.
|
|
||||||
|
|
||||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
|
||||||
|
|
||||||
No covered work shall be deemed part of an effective technological
|
|
||||||
measure under any applicable law fulfilling obligations under article
|
|
||||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
|
||||||
similar laws prohibiting or restricting circumvention of such
|
|
||||||
measures.
|
|
||||||
|
|
||||||
When you convey a covered work, you waive any legal power to forbid
|
|
||||||
circumvention of technological measures to the extent such circumvention
|
|
||||||
is effected by exercising rights under this License with respect to
|
|
||||||
the covered work, and you disclaim any intention to limit operation or
|
|
||||||
modification of the work as a means of enforcing, against the work's
|
|
||||||
users, your or third parties' legal rights to forbid circumvention of
|
|
||||||
technological measures.
|
|
||||||
|
|
||||||
4. Conveying Verbatim Copies.
|
|
||||||
|
|
||||||
You may convey verbatim copies of the Program's source code as you
|
|
||||||
receive it, in any medium, provided that you conspicuously and
|
|
||||||
appropriately publish on each copy an appropriate copyright notice;
|
|
||||||
keep intact all notices stating that this License and any
|
|
||||||
non-permissive terms added in accord with section 7 apply to the code;
|
|
||||||
keep intact all notices of the absence of any warranty; and give all
|
|
||||||
recipients a copy of this License along with the Program.
|
|
||||||
|
|
||||||
You may charge any price or no price for each copy that you convey,
|
|
||||||
and you may offer support or warranty protection for a fee.
|
|
||||||
|
|
||||||
5. Conveying Modified Source Versions.
|
|
||||||
|
|
||||||
You may convey a work based on the Program, or the modifications to
|
|
||||||
produce it from the Program, in the form of source code under the
|
|
||||||
terms of section 4, provided that you also meet all of these conditions:
|
|
||||||
|
|
||||||
a) The work must carry prominent notices stating that you modified
|
|
||||||
it, and giving a relevant date.
|
|
||||||
|
|
||||||
b) The work must carry prominent notices stating that it is
|
|
||||||
released under this License and any conditions added under section
|
|
||||||
7. This requirement modifies the requirement in section 4 to
|
|
||||||
"keep intact all notices".
|
|
||||||
|
|
||||||
c) You must license the entire work, as a whole, under this
|
|
||||||
License to anyone who comes into possession of a copy. This
|
|
||||||
License will therefore apply, along with any applicable section 7
|
|
||||||
additional terms, to the whole of the work, and all its parts,
|
|
||||||
regardless of how they are packaged. This License gives no
|
|
||||||
permission to license the work in any other way, but it does not
|
|
||||||
invalidate such permission if you have separately received it.
|
|
||||||
|
|
||||||
d) If the work has interactive user interfaces, each must display
|
|
||||||
Appropriate Legal Notices; however, if the Program has interactive
|
|
||||||
interfaces that do not display Appropriate Legal Notices, your
|
|
||||||
work need not make them do so.
|
|
||||||
|
|
||||||
A compilation of a covered work with other separate and independent
|
|
||||||
works, which are not by their nature extensions of the covered work,
|
|
||||||
and which are not combined with it such as to form a larger program,
|
|
||||||
in or on a volume of a storage or distribution medium, is called an
|
|
||||||
"aggregate" if the compilation and its resulting copyright are not
|
|
||||||
used to limit the access or legal rights of the compilation's users
|
|
||||||
beyond what the individual works permit. Inclusion of a covered work
|
|
||||||
in an aggregate does not cause this License to apply to the other
|
|
||||||
parts of the aggregate.
|
|
||||||
|
|
||||||
6. Conveying Non-Source Forms.
|
|
||||||
|
|
||||||
You may convey a covered work in object code form under the terms
|
|
||||||
of sections 4 and 5, provided that you also convey the
|
|
||||||
machine-readable Corresponding Source under the terms of this License,
|
|
||||||
in one of these ways:
|
|
||||||
|
|
||||||
a) Convey the object code in, or embodied in, a physical product
|
|
||||||
(including a physical distribution medium), accompanied by the
|
|
||||||
Corresponding Source fixed on a durable physical medium
|
|
||||||
customarily used for software interchange.
|
|
||||||
|
|
||||||
b) Convey the object code in, or embodied in, a physical product
|
|
||||||
(including a physical distribution medium), accompanied by a
|
|
||||||
written offer, valid for at least three years and valid for as
|
|
||||||
long as you offer spare parts or customer support for that product
|
|
||||||
model, to give anyone who possesses the object code either (1) a
|
|
||||||
copy of the Corresponding Source for all the software in the
|
|
||||||
product that is covered by this License, on a durable physical
|
|
||||||
medium customarily used for software interchange, for a price no
|
|
||||||
more than your reasonable cost of physically performing this
|
|
||||||
conveying of source, or (2) access to copy the
|
|
||||||
Corresponding Source from a network server at no charge.
|
|
||||||
|
|
||||||
c) Convey individual copies of the object code with a copy of the
|
|
||||||
written offer to provide the Corresponding Source. This
|
|
||||||
alternative is allowed only occasionally and noncommercially, and
|
|
||||||
only if you received the object code with such an offer, in accord
|
|
||||||
with subsection 6b.
|
|
||||||
|
|
||||||
d) Convey the object code by offering access from a designated
|
|
||||||
place (gratis or for a charge), and offer equivalent access to the
|
|
||||||
Corresponding Source in the same way through the same place at no
|
|
||||||
further charge. You need not require recipients to copy the
|
|
||||||
Corresponding Source along with the object code. If the place to
|
|
||||||
copy the object code is a network server, the Corresponding Source
|
|
||||||
may be on a different server (operated by you or a third party)
|
|
||||||
that supports equivalent copying facilities, provided you maintain
|
|
||||||
clear directions next to the object code saying where to find the
|
|
||||||
Corresponding Source. Regardless of what server hosts the
|
|
||||||
Corresponding Source, you remain obligated to ensure that it is
|
|
||||||
available for as long as needed to satisfy these requirements.
|
|
||||||
|
|
||||||
e) Convey the object code using peer-to-peer transmission, provided
|
|
||||||
you inform other peers where the object code and Corresponding
|
|
||||||
Source of the work are being offered to the general public at no
|
|
||||||
charge under subsection 6d.
|
|
||||||
|
|
||||||
A separable portion of the object code, whose source code is excluded
|
|
||||||
from the Corresponding Source as a System Library, need not be
|
|
||||||
included in conveying the object code work.
|
|
||||||
|
|
||||||
A "User Product" is either (1) a "consumer product", which means any
|
|
||||||
tangible personal property which is normally used for personal, family,
|
|
||||||
or household purposes, or (2) anything designed or sold for incorporation
|
|
||||||
into a dwelling. In determining whether a product is a consumer product,
|
|
||||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
|
||||||
product received by a particular user, "normally used" refers to a
|
|
||||||
typical or common use of that class of product, regardless of the status
|
|
||||||
of the particular user or of the way in which the particular user
|
|
||||||
actually uses, or expects or is expected to use, the product. A product
|
|
||||||
is a consumer product regardless of whether the product has substantial
|
|
||||||
commercial, industrial or non-consumer uses, unless such uses represent
|
|
||||||
the only significant mode of use of the product.
|
|
||||||
|
|
||||||
"Installation Information" for a User Product means any methods,
|
|
||||||
procedures, authorization keys, or other information required to install
|
|
||||||
and execute modified versions of a covered work in that User Product from
|
|
||||||
a modified version of its Corresponding Source. The information must
|
|
||||||
suffice to ensure that the continued functioning of the modified object
|
|
||||||
code is in no case prevented or interfered with solely because
|
|
||||||
modification has been made.
|
|
||||||
|
|
||||||
If you convey an object code work under this section in, or with, or
|
|
||||||
specifically for use in, a User Product, and the conveying occurs as
|
|
||||||
part of a transaction in which the right of possession and use of the
|
|
||||||
User Product is transferred to the recipient in perpetuity or for a
|
|
||||||
fixed term (regardless of how the transaction is characterized), the
|
|
||||||
Corresponding Source conveyed under this section must be accompanied
|
|
||||||
by the Installation Information. But this requirement does not apply
|
|
||||||
if neither you nor any third party retains the ability to install
|
|
||||||
modified object code on the User Product (for example, the work has
|
|
||||||
been installed in ROM).
|
|
||||||
|
|
||||||
The requirement to provide Installation Information does not include a
|
|
||||||
requirement to continue to provide support service, warranty, or updates
|
|
||||||
for a work that has been modified or installed by the recipient, or for
|
|
||||||
the User Product in which it has been modified or installed. Access to a
|
|
||||||
network may be denied when the modification itself materially and
|
|
||||||
adversely affects the operation of the network or violates the rules and
|
|
||||||
protocols for communication across the network.
|
|
||||||
|
|
||||||
Corresponding Source conveyed, and Installation Information provided,
|
|
||||||
in accord with this section must be in a format that is publicly
|
|
||||||
documented (and with an implementation available to the public in
|
|
||||||
source code form), and must require no special password or key for
|
|
||||||
unpacking, reading or copying.
|
|
||||||
|
|
||||||
7. Additional Terms.
|
|
||||||
|
|
||||||
"Additional permissions" are terms that supplement the terms of this
|
|
||||||
License by making exceptions from one or more of its conditions.
|
|
||||||
Additional permissions that are applicable to the entire Program shall
|
|
||||||
be treated as though they were included in this License, to the extent
|
|
||||||
that they are valid under applicable law. If additional permissions
|
|
||||||
apply only to part of the Program, that part may be used separately
|
|
||||||
under those permissions, but the entire Program remains governed by
|
|
||||||
this License without regard to the additional permissions.
|
|
||||||
|
|
||||||
When you convey a copy of a covered work, you may at your option
|
|
||||||
remove any additional permissions from that copy, or from any part of
|
|
||||||
it. (Additional permissions may be written to require their own
|
|
||||||
removal in certain cases when you modify the work.) You may place
|
|
||||||
additional permissions on material, added by you to a covered work,
|
|
||||||
for which you have or can give appropriate copyright permission.
|
|
||||||
|
|
||||||
Notwithstanding any other provision of this License, for material you
|
|
||||||
add to a covered work, you may (if authorized by the copyright holders of
|
|
||||||
that material) supplement the terms of this License with terms:
|
|
||||||
|
|
||||||
a) Disclaiming warranty or limiting liability differently from the
|
|
||||||
terms of sections 15 and 16 of this License; or
|
|
||||||
|
|
||||||
b) Requiring preservation of specified reasonable legal notices or
|
|
||||||
author attributions in that material or in the Appropriate Legal
|
|
||||||
Notices displayed by works containing it; or
|
|
||||||
|
|
||||||
c) Prohibiting misrepresentation of the origin of that material, or
|
|
||||||
requiring that modified versions of such material be marked in
|
|
||||||
reasonable ways as different from the original version; or
|
|
||||||
|
|
||||||
d) Limiting the use for publicity purposes of names of licensors or
|
|
||||||
authors of the material; or
|
|
||||||
|
|
||||||
e) Declining to grant rights under trademark law for use of some
|
|
||||||
trade names, trademarks, or service marks; or
|
|
||||||
|
|
||||||
f) Requiring indemnification of licensors and authors of that
|
|
||||||
material by anyone who conveys the material (or modified versions of
|
|
||||||
it) with contractual assumptions of liability to the recipient, for
|
|
||||||
any liability that these contractual assumptions directly impose on
|
|
||||||
those licensors and authors.
|
|
||||||
|
|
||||||
All other non-permissive additional terms are considered "further
|
|
||||||
restrictions" within the meaning of section 10. If the Program as you
|
|
||||||
received it, or any part of it, contains a notice stating that it is
|
|
||||||
governed by this License along with a term that is a further
|
|
||||||
restriction, you may remove that term. If a license document contains
|
|
||||||
a further restriction but permits relicensing or conveying under this
|
|
||||||
License, you may add to a covered work material governed by the terms
|
|
||||||
of that license document, provided that the further restriction does
|
|
||||||
not survive such relicensing or conveying.
|
|
||||||
|
|
||||||
If you add terms to a covered work in accord with this section, you
|
|
||||||
must place, in the relevant source files, a statement of the
|
|
||||||
additional terms that apply to those files, or a notice indicating
|
|
||||||
where to find the applicable terms.
|
|
||||||
|
|
||||||
Additional terms, permissive or non-permissive, may be stated in the
|
|
||||||
form of a separately written license, or stated as exceptions;
|
|
||||||
the above requirements apply either way.
|
|
||||||
|
|
||||||
8. Termination.
|
|
||||||
|
|
||||||
You may not propagate or modify a covered work except as expressly
|
|
||||||
provided under this License. Any attempt otherwise to propagate or
|
|
||||||
modify it is void, and will automatically terminate your rights under
|
|
||||||
this License (including any patent licenses granted under the third
|
|
||||||
paragraph of section 11).
|
|
||||||
|
|
||||||
However, if you cease all violation of this License, then your
|
|
||||||
license from a particular copyright holder is reinstated (a)
|
|
||||||
provisionally, unless and until the copyright holder explicitly and
|
|
||||||
finally terminates your license, and (b) permanently, if the copyright
|
|
||||||
holder fails to notify you of the violation by some reasonable means
|
|
||||||
prior to 60 days after the cessation.
|
|
||||||
|
|
||||||
Moreover, your license from a particular copyright holder is
|
|
||||||
reinstated permanently if the copyright holder notifies you of the
|
|
||||||
violation by some reasonable means, this is the first time you have
|
|
||||||
received notice of violation of this License (for any work) from that
|
|
||||||
copyright holder, and you cure the violation prior to 30 days after
|
|
||||||
your receipt of the notice.
|
|
||||||
|
|
||||||
Termination of your rights under this section does not terminate the
|
|
||||||
licenses of parties who have received copies or rights from you under
|
|
||||||
this License. If your rights have been terminated and not permanently
|
|
||||||
reinstated, you do not qualify to receive new licenses for the same
|
|
||||||
material under section 10.
|
|
||||||
|
|
||||||
9. Acceptance Not Required for Having Copies.
|
|
||||||
|
|
||||||
You are not required to accept this License in order to receive or
|
|
||||||
run a copy of the Program. Ancillary propagation of a covered work
|
|
||||||
occurring solely as a consequence of using peer-to-peer transmission
|
|
||||||
to receive a copy likewise does not require acceptance. However,
|
|
||||||
nothing other than this License grants you permission to propagate or
|
|
||||||
modify any covered work. These actions infringe copyright if you do
|
|
||||||
not accept this License. Therefore, by modifying or propagating a
|
|
||||||
covered work, you indicate your acceptance of this License to do so.
|
|
||||||
|
|
||||||
10. Automatic Licensing of Downstream Recipients.
|
|
||||||
|
|
||||||
Each time you convey a covered work, the recipient automatically
|
|
||||||
receives a license from the original licensors, to run, modify and
|
|
||||||
propagate that work, subject to this License. You are not responsible
|
|
||||||
for enforcing compliance by third parties with this License.
|
|
||||||
|
|
||||||
An "entity transaction" is a transaction transferring control of an
|
|
||||||
organization, or substantially all assets of one, or subdividing an
|
|
||||||
organization, or merging organizations. If propagation of a covered
|
|
||||||
work results from an entity transaction, each party to that
|
|
||||||
transaction who receives a copy of the work also receives whatever
|
|
||||||
licenses to the work the party's predecessor in interest had or could
|
|
||||||
give under the previous paragraph, plus a right to possession of the
|
|
||||||
Corresponding Source of the work from the predecessor in interest, if
|
|
||||||
the predecessor has it or can get it with reasonable efforts.
|
|
||||||
|
|
||||||
You may not impose any further restrictions on the exercise of the
|
|
||||||
rights granted or affirmed under this License. For example, you may
|
|
||||||
not impose a license fee, royalty, or other charge for exercise of
|
|
||||||
rights granted under this License, and you may not initiate litigation
|
|
||||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
|
||||||
any patent claim is infringed by making, using, selling, offering for
|
|
||||||
sale, or importing the Program or any portion of it.
|
|
||||||
|
|
||||||
11. Patents.
|
|
||||||
|
|
||||||
A "contributor" is a copyright holder who authorizes use under this
|
|
||||||
License of the Program or a work on which the Program is based. The
|
|
||||||
work thus licensed is called the contributor's "contributor version".
|
|
||||||
|
|
||||||
A contributor's "essential patent claims" are all patent claims
|
|
||||||
owned or controlled by the contributor, whether already acquired or
|
|
||||||
hereafter acquired, that would be infringed by some manner, permitted
|
|
||||||
by this License, of making, using, or selling its contributor version,
|
|
||||||
but do not include claims that would be infringed only as a
|
|
||||||
consequence of further modification of the contributor version. For
|
|
||||||
purposes of this definition, "control" includes the right to grant
|
|
||||||
patent sublicenses in a manner consistent with the requirements of
|
|
||||||
this License.
|
|
||||||
|
|
||||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
|
||||||
patent license under the contributor's essential patent claims, to
|
|
||||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
|
||||||
propagate the contents of its contributor version.
|
|
||||||
|
|
||||||
In the following three paragraphs, a "patent license" is any express
|
|
||||||
agreement or commitment, however denominated, not to enforce a patent
|
|
||||||
(such as an express permission to practice a patent or covenant not to
|
|
||||||
sue for patent infringement). To "grant" such a patent license to a
|
|
||||||
party means to make such an agreement or commitment not to enforce a
|
|
||||||
patent against the party.
|
|
||||||
|
|
||||||
If you convey a covered work, knowingly relying on a patent license,
|
|
||||||
and the Corresponding Source of the work is not available for anyone
|
|
||||||
to copy, free of charge and under the terms of this License, through a
|
|
||||||
publicly available network server or other readily accessible means,
|
|
||||||
then you must either (1) cause the Corresponding Source to be so
|
|
||||||
available, or (2) arrange to deprive yourself of the benefit of the
|
|
||||||
patent license for this particular work, or (3) arrange, in a manner
|
|
||||||
consistent with the requirements of this License, to extend the patent
|
|
||||||
license to downstream recipients. "Knowingly relying" means you have
|
|
||||||
actual knowledge that, but for the patent license, your conveying the
|
|
||||||
covered work in a country, or your recipient's use of the covered work
|
|
||||||
in a country, would infringe one or more identifiable patents in that
|
|
||||||
country that you have reason to believe are valid.
|
|
||||||
|
|
||||||
If, pursuant to or in connection with a single transaction or
|
|
||||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
|
||||||
covered work, and grant a patent license to some of the parties
|
|
||||||
receiving the covered work authorizing them to use, propagate, modify
|
|
||||||
or convey a specific copy of the covered work, then the patent license
|
|
||||||
you grant is automatically extended to all recipients of the covered
|
|
||||||
work and works based on it.
|
|
||||||
|
|
||||||
A patent license is "discriminatory" if it does not include within
|
|
||||||
the scope of its coverage, prohibits the exercise of, or is
|
|
||||||
conditioned on the non-exercise of one or more of the rights that are
|
|
||||||
specifically granted under this License. You may not convey a covered
|
|
||||||
work if you are a party to an arrangement with a third party that is
|
|
||||||
in the business of distributing software, under which you make payment
|
|
||||||
to the third party based on the extent of your activity of conveying
|
|
||||||
the work, and under which the third party grants, to any of the
|
|
||||||
parties who would receive the covered work from you, a discriminatory
|
|
||||||
patent license (a) in connection with copies of the covered work
|
|
||||||
conveyed by you (or copies made from those copies), or (b) primarily
|
|
||||||
for and in connection with specific products or compilations that
|
|
||||||
contain the covered work, unless you entered into that arrangement,
|
|
||||||
or that patent license was granted, prior to 28 March 2007.
|
|
||||||
|
|
||||||
Nothing in this License shall be construed as excluding or limiting
|
|
||||||
any implied license or other defenses to infringement that may
|
|
||||||
otherwise be available to you under applicable patent law.
|
|
||||||
|
|
||||||
12. No Surrender of Others' Freedom.
|
|
||||||
|
|
||||||
If conditions are imposed on you (whether by court order, agreement or
|
|
||||||
otherwise) that contradict the conditions of this License, they do not
|
|
||||||
excuse you from the conditions of this License. If you cannot convey a
|
|
||||||
covered work so as to satisfy simultaneously your obligations under this
|
|
||||||
License and any other pertinent obligations, then as a consequence you may
|
|
||||||
not convey it at all. For example, if you agree to terms that obligate you
|
|
||||||
to collect a royalty for further conveying from those to whom you convey
|
|
||||||
the Program, the only way you could satisfy both those terms and this
|
|
||||||
License would be to refrain entirely from conveying the Program.
|
|
||||||
|
|
||||||
13. Use with the GNU Affero General Public License.
|
|
||||||
|
|
||||||
Notwithstanding any other provision of this License, you have
|
|
||||||
permission to link or combine any covered work with a work licensed
|
|
||||||
under version 3 of the GNU Affero General Public License into a single
|
|
||||||
combined work, and to convey the resulting work. The terms of this
|
|
||||||
License will continue to apply to the part which is the covered work,
|
|
||||||
but the special requirements of the GNU Affero General Public License,
|
|
||||||
section 13, concerning interaction through a network will apply to the
|
|
||||||
combination as such.
|
|
||||||
|
|
||||||
14. Revised Versions of this License.
|
|
||||||
|
|
||||||
The Free Software Foundation may publish revised and/or new versions of
|
|
||||||
the GNU General Public License from time to time. Such new versions will
|
|
||||||
be similar in spirit to the present version, but may differ in detail to
|
|
||||||
address new problems or concerns.
|
|
||||||
|
|
||||||
Each version is given a distinguishing version number. If the
|
|
||||||
Program specifies that a certain numbered version of the GNU General
|
|
||||||
Public License "or any later version" applies to it, you have the
|
|
||||||
option of following the terms and conditions either of that numbered
|
|
||||||
version or of any later version published by the Free Software
|
|
||||||
Foundation. If the Program does not specify a version number of the
|
|
||||||
GNU General Public License, you may choose any version ever published
|
|
||||||
by the Free Software Foundation.
|
|
||||||
|
|
||||||
If the Program specifies that a proxy can decide which future
|
|
||||||
versions of the GNU General Public License can be used, that proxy's
|
|
||||||
public statement of acceptance of a version permanently authorizes you
|
|
||||||
to choose that version for the Program.
|
|
||||||
|
|
||||||
Later license versions may give you additional or different
|
|
||||||
permissions. However, no additional obligations are imposed on any
|
|
||||||
author or copyright holder as a result of your choosing to follow a
|
|
||||||
later version.
|
|
||||||
|
|
||||||
15. Disclaimer of Warranty.
|
|
||||||
|
|
||||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
|
||||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
|
||||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
|
||||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
|
||||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
|
||||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
|
||||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
|
||||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
|
||||||
|
|
||||||
16. Limitation of Liability.
|
|
||||||
|
|
||||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
|
||||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
|
||||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
|
||||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
|
||||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
|
||||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
|
||||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
|
||||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
|
||||||
SUCH DAMAGES.
|
|
||||||
|
|
||||||
17. Interpretation of Sections 15 and 16.
|
|
||||||
|
|
||||||
If the disclaimer of warranty and limitation of liability provided
|
|
||||||
above cannot be given local legal effect according to their terms,
|
|
||||||
reviewing courts shall apply local law that most closely approximates
|
|
||||||
an absolute waiver of all civil liability in connection with the
|
|
||||||
Program, unless a warranty or assumption of liability accompanies a
|
|
||||||
copy of the Program in return for a fee.
|
|
||||||
|
|
||||||
END OF TERMS AND CONDITIONS
|
|
||||||
|
|
||||||
How to Apply These Terms to Your New Programs
|
|
||||||
|
|
||||||
If you develop a new program, and you want it to be of the greatest
|
|
||||||
possible use to the public, the best way to achieve this is to make it
|
|
||||||
free software which everyone can redistribute and change under these terms.
|
|
||||||
|
|
||||||
To do so, attach the following notices to the program. It is safest
|
|
||||||
to attach them to the start of each source file to most effectively
|
|
||||||
state the exclusion of warranty; and each file should have at least
|
|
||||||
the "copyright" line and a pointer to where the full notice is found.
|
|
||||||
|
|
||||||
<one line to give the program's name and a brief idea of what it does.>
|
|
||||||
Copyright (C) <year> <name of author>
|
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
Also add information on how to contact you by electronic and paper mail.
|
|
||||||
|
|
||||||
If the program does terminal interaction, make it output a short
|
|
||||||
notice like this when it starts in an interactive mode:
|
|
||||||
|
|
||||||
<program> Copyright (C) <year> <name of author>
|
|
||||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
|
||||||
This is free software, and you are welcome to redistribute it
|
|
||||||
under certain conditions; type `show c' for details.
|
|
||||||
|
|
||||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
|
||||||
parts of the General Public License. Of course, your program's commands
|
|
||||||
might be different; for a GUI interface, you would use an "about box".
|
|
||||||
|
|
||||||
You should also get your employer (if you work as a programmer) or school,
|
|
||||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
|
||||||
For more information on this, and how to apply and follow the GNU GPL, see
|
|
||||||
<https://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
The GNU General Public License does not permit incorporating your program
|
|
||||||
into proprietary programs. If your program is a subroutine library, you
|
|
||||||
may consider it more useful to permit linking proprietary applications with
|
|
||||||
the library. If this is what you want to do, use the GNU Lesser General
|
|
||||||
Public License instead of this License. But first, please read
|
|
||||||
<https://www.gnu.org/licenses/why-not-lgpl.html>.
|
|
||||||
|
|
249
README.md
|
@ -9,24 +9,235 @@
|
||||||
|
|
||||||
![screenshot](./assets/screenshot.png)
|
![screenshot](./assets/screenshot.png)
|
||||||
|
|
||||||
## Program list
|
## Key Features
|
||||||
|
|
||||||
### core programs
|
### dwm features
|
||||||
- sway
|
* **A bunch of extra layouts**
|
||||||
- swaybg
|
- *Default ones:*
|
||||||
- swaylock
|
- master & stack.
|
||||||
- swayidle
|
- floating.
|
||||||
- waybar
|
- monocle
|
||||||
- kanshi
|
- *Added ones:*
|
||||||
- wob
|
- dwindle.
|
||||||
- fuzzel
|
- spiral.
|
||||||
- fnott
|
- centered master (also known as three column).
|
||||||
- foot
|
- centered floating master (master window floating at the center of the screen, stack on the back).
|
||||||
|
- grid.
|
||||||
|
* **Keychord based keybindings:** Just like emacs, you can have chained keybindings, which exponentially extends the amount of keybindings you can have.
|
||||||
|
* **Scratchpad support:** Convenient scratchpad functionality for storing and retrieving frequently used applications.
|
||||||
|
* **Tag based workflow**
|
||||||
|
- Each tag (also called workspaces) is meant to have it's purpose, this is achieved with an extensive set of window rules:
|
||||||
|
- *Tag 1:* Coding
|
||||||
|
- *Tag 2:* Testing
|
||||||
|
- *Tag 3:* Web browsing
|
||||||
|
- *Tag 4:* Chatting
|
||||||
|
- *Tag 5:* Audio tools
|
||||||
|
- *Tag 6:* Video tools
|
||||||
|
- *Tag 7:* Graphic tools
|
||||||
|
- *Tag 8:* Office & Document tools
|
||||||
|
- *Tag 9:* Gaming
|
||||||
|
|
||||||
|
### Other suckless utilities included
|
||||||
|
|
||||||
|
* *dmenu:* the best run launcher. This build includes some very useful scripts for things like wifi, bluetooth and wallpaper configuration, drive mounting, etc.
|
||||||
|
* *st:* the fastest terminal emulator ever, [siduck's build](https://github.com/siduck/st).
|
||||||
|
* *slock:* simple and efficient lock screen with fingerprint reader support.
|
||||||
|
* *dwbmlocks:* what enables you to customize dwm's status area in the bar. This build includes some cool & customizable status scripts.
|
||||||
|
|
||||||
|
### Config files
|
||||||
|
|
||||||
|
Other configuration files included in this project are available at the config folder. These are:
|
||||||
|
|
||||||
|
* `.bash_profile & .bashrc`: Bash configuration files, the profile is neccesary to start up dwm on tty login.
|
||||||
|
* `.config/btop`: [btop](https://github.com/aristocratos/btop) is a system monitoring utility, cooler than htop. Accesible from dwm via a scratchpad.
|
||||||
|
* `.config/gtk-2.0` & `.config/gtk-3.0`: GTK theeming files, I use the Cantarell font, the [Gruvbox-Dark-BL](https://github.com/Fausto-Korpsvart/Gruvbox-GTK-Theme) theme and the [Simp1e-Gruvbox-Dark](https://gitlab.com/cursors/simp1e) cursor theme.
|
||||||
|
* `.config/Kvantum`: Qt theeming via Kvantum, Gruvbox theme is included here too.
|
||||||
|
* `.config/lvim`: [Lunarvim](https://www.lunarvim.org/) configuration files, this is a neovim distribution and my text editor of choice.
|
||||||
|
* `.config/mpv`: Mpv config files, mainly just for vim-like keybindings.
|
||||||
|
* `.config/newsboat`: [Newsboat](https://github.com/newsboat/newsboat) is an awesome RSS/Atom feeds reader for the terminal. Also accesible from dwm via a scratchpad. The config file is for vim-like keybindings and also my collection of RSS & YouTube subscriptions feeds (you can open any video in mpv hitting first comma and then v).
|
||||||
|
* `.config/picom`: The only X compositor that actually works, responsible of transparency and some animations.
|
||||||
|
* `.config/dunst`: A cool, minimal and fast notification daemon. Best one out there.
|
||||||
|
* `.config/qutebrowser`: Sometimes I like using a minimal browser, and qutebrowser is the best one.
|
||||||
|
* `.config/X11`: This is where I put the xinitrc file, responsible of starting up dwm properly.
|
||||||
|
* `.config/vifm`: [vifm](https://vifm.info/) is the best terminal file manager with everything you will and may need, with vim-like keybindings and image previews (with ueberzug).
|
||||||
|
* `.config/zathura`: [zathura](https://git.pwmt.org/pwmt/zathura) is my document viewer of choice, also with vim-like keybindings.
|
||||||
|
|
||||||
|
## Dependencies
|
||||||
|
|
||||||
|
Make sure to have these dependencies installed in your system, in this case package names are from Void Linux, you'll have to look for the package names in your distribution:
|
||||||
|
|
||||||
|
* **Build dependencies**
|
||||||
|
|
||||||
|
```
|
||||||
|
libX11-devel
|
||||||
|
libXft-devel
|
||||||
|
libXrender-devel
|
||||||
|
libXinerama-devel
|
||||||
|
libXrandr-devel
|
||||||
|
libXext-devel
|
||||||
|
imlib2-devel
|
||||||
|
harfbuzz-devel
|
||||||
|
fontconfig-devel
|
||||||
|
gd-devel
|
||||||
|
pam-devel
|
||||||
|
libnotify
|
||||||
|
xinit
|
||||||
|
setxkbmap
|
||||||
|
brightnessctl
|
||||||
|
make
|
||||||
|
gcc
|
||||||
|
vala
|
||||||
|
```
|
||||||
|
|
||||||
|
* **Runtime dependencies** (required for dmenu scripts & dwm)
|
||||||
|
|
||||||
|
```
|
||||||
|
fd-find
|
||||||
|
feh
|
||||||
|
xdpyinfo
|
||||||
|
xdotool
|
||||||
|
xclip
|
||||||
|
ffmpeg
|
||||||
|
maim
|
||||||
|
slop
|
||||||
|
udisks2
|
||||||
|
bluez
|
||||||
|
j4-dmenu-desktop
|
||||||
|
NetworkManager
|
||||||
|
power-profiles-daemon
|
||||||
|
polkit-gnome
|
||||||
|
unclutter-xfixes
|
||||||
|
gnome-keyring
|
||||||
|
picom
|
||||||
|
ueberzug
|
||||||
|
```
|
||||||
|
|
||||||
|
* **Other dependencies** (scratchpads)
|
||||||
|
|
||||||
|
- `bitwarden`: launched with flatpak by default
|
||||||
|
- `btop`
|
||||||
|
- `pulsemixer`
|
||||||
|
- `alsa-utils`
|
||||||
|
- `newsboat`
|
||||||
|
- `arandr`
|
||||||
|
- `mpv`
|
||||||
|
- `zathura`
|
||||||
|
- `nsxiv`
|
||||||
|
- `cmus`
|
||||||
|
- `cmus-flac`
|
||||||
|
- `qalculate-gtk`: launched with flatpak by default
|
||||||
|
- `ytfzf`: [download here](https://github.com/pystardust/ytfzf)
|
||||||
|
- `ani-cli`: [download here](https://github.com/pystardust/ani-cli)
|
||||||
|
- `flix-cli`: [download here](https://github.com/d4r1us-drk/flix-cli)
|
||||||
|
|
||||||
|
### System stuff (just here to keep track on stuff I need to rebuild the system)
|
||||||
|
|
||||||
|
* **System dependencies** (stuff required for the main installation)
|
||||||
|
|
||||||
|
```
|
||||||
|
NetworkManager
|
||||||
|
dhcpcd
|
||||||
|
wpa_supplicant
|
||||||
|
grub-x86_64-efi
|
||||||
|
efibootmgr
|
||||||
|
lvm2
|
||||||
|
cryptsetup
|
||||||
|
vim
|
||||||
|
elogind
|
||||||
|
polkit
|
||||||
|
dbus
|
||||||
|
xorg-server
|
||||||
|
xf86-input-libinput
|
||||||
|
xss-lock
|
||||||
|
pipewire
|
||||||
|
wireplumber
|
||||||
|
alsa-pipewire
|
||||||
|
gstreamer1
|
||||||
|
gstreamermm
|
||||||
|
gstreamer-vaapi
|
||||||
|
gst-plugins-bad1
|
||||||
|
gst-plugins-good1
|
||||||
|
gst-plugins-base1
|
||||||
|
gst-plugins-ugly1
|
||||||
|
bluez
|
||||||
|
bluez-alsa
|
||||||
|
libspa-alsa
|
||||||
|
libspa-bluetooth
|
||||||
|
mesa
|
||||||
|
mesa-vaapi
|
||||||
|
```
|
||||||
|
|
||||||
|
* **Intel stuff** (I mainly use intel devices)
|
||||||
|
|
||||||
|
```
|
||||||
|
xf86-video-intel
|
||||||
|
mesa-intel-dri
|
||||||
|
mesa-vulkan-intel
|
||||||
|
intel-media-driver
|
||||||
|
libva-intel-driver
|
||||||
|
```
|
||||||
|
|
||||||
|
## Installation & How To Modify
|
||||||
|
|
||||||
|
After installing them with your package manager of choice, you can do the following to get the source code and start to modify it to your liking.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Clone this repository
|
||||||
|
$ git clone https://github.com/d4r1us-drk/neodotfiles.git
|
||||||
|
|
||||||
|
# Go into the repository
|
||||||
|
$ cd neodotfiles
|
||||||
|
|
||||||
|
# Select which project to compile & install (dwm in this case)
|
||||||
|
$ cd source/dwm
|
||||||
|
|
||||||
|
# To install
|
||||||
|
$ sudo make install && make clean
|
||||||
|
```
|
||||||
|
|
||||||
|
This repository is not a tutorial on how to modify or configure dwm or any of the included suckless tools, you obviusly don't need to learn C to do this, with this build you can start with an usable base and you wont even need to patch anything. If you want to add a patch though, you will need to do this manually, because most patching utilities like `patch` and `git apply` will fail due to how much of the code base I modified myself.
|
||||||
|
|
||||||
|
To configure my build, the only file you really need to modify is the `config.h` file in each tool, which has everything commented and explained. Of course this being *my* build, it is already configured for my needs.
|
||||||
|
|
||||||
|
## dwm patch list
|
||||||
|
|
||||||
|
These are the patches I applied to this dwm build (some of them I modified):
|
||||||
|
|
||||||
|
- adjacenttag
|
||||||
|
- alpha
|
||||||
|
- alwayscenter
|
||||||
|
- attachbottom
|
||||||
|
- autostart
|
||||||
|
- barpadding
|
||||||
|
- centeredmaster
|
||||||
|
- clientindicators
|
||||||
|
- combo
|
||||||
|
- cyclelayouts
|
||||||
|
- fibonacci
|
||||||
|
- focusmaster-return
|
||||||
|
- fullscreen
|
||||||
|
- gridmode
|
||||||
|
- keychord
|
||||||
|
- movestack
|
||||||
|
- pertag
|
||||||
|
- restartsig
|
||||||
|
- rmaster
|
||||||
|
- scratchpads
|
||||||
|
- statuspadding
|
||||||
|
- sticky
|
||||||
|
- stickyindicator
|
||||||
|
- tag-preview
|
||||||
|
- tapresize
|
||||||
|
- truecenteredtitle
|
||||||
|
- warp
|
||||||
|
- winicon
|
||||||
|
|
||||||
|
## Credits
|
||||||
|
|
||||||
|
- dwm and the suckless tools available here are made by the suckless guys at [https://suckless.org](https://suckless.org).
|
||||||
|
- dwmblocks is made by torrinfail and available [here](https://github.com/torrinfail/dwmblocks)
|
||||||
|
|
||||||
|
## License
|
||||||
|
|
||||||
|
This project is licenced under the MIT License
|
||||||
|
|
||||||
### personal preference
|
|
||||||
- btop
|
|
||||||
- yazi
|
|
||||||
- newsboat
|
|
||||||
- cmus
|
|
||||||
- imv
|
|
||||||
- zathura
|
|
||||||
|
|
Before Width: | Height: | Size: 1.6 MiB After Width: | Height: | Size: 348 KiB |
43
config/X11/xinitrc
Executable file
|
@ -0,0 +1,43 @@
|
||||||
|
#!/bin/sh
|
||||||
|
## ____ __
|
||||||
|
## / __ \_________ _/ /_____
|
||||||
|
## / / / / ___/ __ `/ //_/ _ \
|
||||||
|
## / /_/ / / / /_/ / ,< / __/ Clay Gomera (Drake)
|
||||||
|
## /_____/_/ \__,_/_/|_|\___/ My custom xinitrc
|
||||||
|
##
|
||||||
|
|
||||||
|
userresources=$HOME/.Xresources
|
||||||
|
usermodmap=$HOME/.Xmodmap
|
||||||
|
sysresources=/etc/X11/xinit/.Xresources
|
||||||
|
sysmodmap=/etc/X11/xinit/.Xmodmap
|
||||||
|
|
||||||
|
# merge in defaults and keymaps
|
||||||
|
if [ -f $sysresources ]; then
|
||||||
|
xrdb -merge $sysresources
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -f $sysmodmap ]; then
|
||||||
|
xmodmap $sysmodmap
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -f "$userresources" ]; then
|
||||||
|
xrdb -merge "$userresources"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -f "$usermodmap" ]; then
|
||||||
|
xmodmap "$usermodmap"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# X11 Stuff
|
||||||
|
export MOZ_USE_XINPUT2=1
|
||||||
|
export QT_STYLE_OVERRIDE=kvantum
|
||||||
|
export XDG_SESSION_TYPE=X11
|
||||||
|
|
||||||
|
# GTK & cursor stuff
|
||||||
|
export XCURSOR_PATH="$XDG_DATA_HOME/icons/"
|
||||||
|
export XCURSOR_THEME="Simp1e-Gruvbox-Dark"
|
||||||
|
export GTK_THEME="Gruvbox-Dark"
|
||||||
|
export GTK_ICON_THEME="Papirus-Dark"
|
||||||
|
|
||||||
|
# initialize dwm
|
||||||
|
dbus-launch dwm
|
|
@ -1,4 +1,4 @@
|
||||||
#? Config file for btop v. 1.4.0
|
#? Config file for btop v. 1.3.2
|
||||||
|
|
||||||
#* Name of a btop++/bpytop/bashtop formatted ".theme" file, "Default" and "TTY" for builtin themes.
|
#* Name of a btop++/bpytop/bashtop formatted ".theme" file, "Default" and "TTY" for builtin themes.
|
||||||
#* Themes should be placed in "../share/btop/themes" relative to binary or "$HOME/.config/btop/themes"
|
#* Themes should be placed in "../share/btop/themes" relative to binary or "$HOME/.config/btop/themes"
|
||||||
|
@ -57,13 +57,13 @@ update_ms = 500
|
||||||
|
|
||||||
#* Processes sorting, "pid" "program" "arguments" "threads" "user" "memory" "cpu lazy" "cpu direct",
|
#* Processes sorting, "pid" "program" "arguments" "threads" "user" "memory" "cpu lazy" "cpu direct",
|
||||||
#* "cpu lazy" sorts top process over time (easier to follow), "cpu direct" updates top process directly.
|
#* "cpu lazy" sorts top process over time (easier to follow), "cpu direct" updates top process directly.
|
||||||
proc_sorting = "memory"
|
proc_sorting = "cpu direct"
|
||||||
|
|
||||||
#* Reverse sorting order, True or False.
|
#* Reverse sorting order, True or False.
|
||||||
proc_reversed = False
|
proc_reversed = False
|
||||||
|
|
||||||
#* Show processes as a tree.
|
#* Show processes as a tree.
|
||||||
proc_tree = True
|
proc_tree = False
|
||||||
|
|
||||||
#* Use the cpu graph colors in the process list.
|
#* Use the cpu graph colors in the process list.
|
||||||
proc_colors = True
|
proc_colors = True
|
||||||
|
@ -72,7 +72,7 @@ proc_colors = True
|
||||||
proc_gradient = True
|
proc_gradient = True
|
||||||
|
|
||||||
#* If process cpu usage should be of the core it's running on or usage of the total available cpu power.
|
#* If process cpu usage should be of the core it's running on or usage of the total available cpu power.
|
||||||
proc_per_core = False
|
proc_per_core = True
|
||||||
|
|
||||||
#* Show process memory as bytes instead of percent.
|
#* Show process memory as bytes instead of percent.
|
||||||
proc_mem_bytes = True
|
proc_mem_bytes = True
|
||||||
|
|
341
config/doom/config.el
Normal file
|
@ -0,0 +1,341 @@
|
||||||
|
(beacon-mode 1)
|
||||||
|
|
||||||
|
(map! :leader
|
||||||
|
(:prefix ("b". "buffer")
|
||||||
|
:desc "List bookmarks" "L" #'list-bookmarks
|
||||||
|
:desc "Save current bookmarks to bookmark file" "w" #'bookmark-save))
|
||||||
|
|
||||||
|
(global-auto-revert-mode 1)
|
||||||
|
(setq global-auto-revert-non-file-buffers t)
|
||||||
|
|
||||||
|
(evil-define-key 'normal ibuffer-mode-map
|
||||||
|
(kbd "f c") 'ibuffer-filter-by-content
|
||||||
|
(kbd "f d") 'ibuffer-filter-by-directory
|
||||||
|
(kbd "f f") 'ibuffer-filter-by-filename
|
||||||
|
(kbd "f m") 'ibuffer-filter-by-mode
|
||||||
|
(kbd "f n") 'ibuffer-filter-by-name
|
||||||
|
(kbd "f x") 'ibuffer-filter-disable
|
||||||
|
(kbd "g h") 'ibuffer-do-kill-lines
|
||||||
|
(kbd "g H") 'ibuffer-update)
|
||||||
|
|
||||||
|
;; https://stackoverflow.com/questions/9547912/emacs-calendar-show-more-than-3-months
|
||||||
|
(defun drk/year-calendar (&optional year)
|
||||||
|
(interactive)
|
||||||
|
(require 'calendar)
|
||||||
|
(let* (
|
||||||
|
(current-year (number-to-string (nth 5 (decode-time (current-time)))))
|
||||||
|
(month 0)
|
||||||
|
(year (if year year (string-to-number (format-time-string "%Y" (current-time))))))
|
||||||
|
(switch-to-buffer (get-buffer-create calendar-buffer))
|
||||||
|
(when (not (eq major-mode 'calendar-mode))
|
||||||
|
(calendar-mode))
|
||||||
|
(setq displayed-month month)
|
||||||
|
(setq displayed-year year)
|
||||||
|
(setq buffer-read-only nil)
|
||||||
|
(erase-buffer)
|
||||||
|
;; horizontal rows
|
||||||
|
(dotimes (j 4)
|
||||||
|
;; vertical columns
|
||||||
|
(dotimes (i 3)
|
||||||
|
(calendar-generate-month
|
||||||
|
(setq month (+ month 1))
|
||||||
|
year
|
||||||
|
;; indentation / spacing between months
|
||||||
|
(+ 5 (* 25 i))))
|
||||||
|
(goto-char (point-max))
|
||||||
|
(insert (make-string (- 10 (count-lines (point-min) (point-max))) ?\n))
|
||||||
|
(widen)
|
||||||
|
(goto-char (point-max))
|
||||||
|
(narrow-to-region (point-max) (point-max)))
|
||||||
|
(widen)
|
||||||
|
(goto-char (point-min))
|
||||||
|
(setq buffer-read-only t)))
|
||||||
|
|
||||||
|
(defun drk/scroll-year-calendar-forward (&optional arg event)
|
||||||
|
"Scroll the yearly calendar by year in a forward direction."
|
||||||
|
(interactive (list (prefix-numeric-value current-prefix-arg)
|
||||||
|
last-nonmenu-event))
|
||||||
|
(unless arg (setq arg 0))
|
||||||
|
(save-selected-window
|
||||||
|
(if (setq event (event-start event)) (select-window (posn-window event)))
|
||||||
|
(unless (zerop arg)
|
||||||
|
(let* (
|
||||||
|
(year (+ displayed-year arg)))
|
||||||
|
(drk/year-calendar year)))
|
||||||
|
(goto-char (point-min))
|
||||||
|
(run-hooks 'calendar-move-hook)))
|
||||||
|
|
||||||
|
(defun drk/scroll-year-calendar-backward (&optional arg event)
|
||||||
|
"Scroll the yearly calendar by year in a backward direction."
|
||||||
|
(interactive (list (prefix-numeric-value current-prefix-arg)
|
||||||
|
last-nonmenu-event))
|
||||||
|
(drk/scroll-year-calendar-forward (- (or arg 1)) event))
|
||||||
|
|
||||||
|
(map! :leader
|
||||||
|
:desc "Scroll year calendar backward" "<left>" #'drk/scroll-year-calendar-backward
|
||||||
|
:desc "Scroll year calendar forward" "<right>" #'drk/scroll-year-calendar-forward)
|
||||||
|
|
||||||
|
(defalias 'year-calendar 'drk/year-calendar)
|
||||||
|
|
||||||
|
(map! :leader
|
||||||
|
(:prefix ("c h" . "Help info from Clippy")
|
||||||
|
:desc "Clippy describes function under point" "f" #'clippy-describe-function
|
||||||
|
:desc "Clippy describes variable under point" "v" #'clippy-describe-variable))
|
||||||
|
|
||||||
|
(require 'dap-netcore)
|
||||||
|
(require 'dap-dlv-go)
|
||||||
|
(map! :leader
|
||||||
|
(:prefix ("d" . "dap-mode")
|
||||||
|
:desc "Toggle breakpoint" "t" #'dap-breakpoint-toggle
|
||||||
|
:desc "Continue execution" "c" #'dap-continue
|
||||||
|
:desc "Step in" "n" #'dap-step-in
|
||||||
|
:desc "Step out" "N" #'dap-step-out
|
||||||
|
:desc "See all breakpoints" "b" #'dap-ui-breakpoints-toggle
|
||||||
|
:desc "Change variable value" "s" #'dap-ui-set-variable-value
|
||||||
|
:desc "Evaluate expression at point" "e" #'dap-eval-thing-at-point
|
||||||
|
:desc "Evaluate expression" "E" #'dap-eval
|
||||||
|
:desc "Run debugger" "r" #'dap-debug
|
||||||
|
:desc "Restart debugger" "R" #'dap-debug-restart
|
||||||
|
:desc "Stop debugger" "d" #'dap-disconnect))
|
||||||
|
(use-package dap-mode
|
||||||
|
:init
|
||||||
|
(dap-auto-configure-mode)
|
||||||
|
|
||||||
|
:custom
|
||||||
|
(dap-netcore-download-url "https://github.com/Samsung/netcoredbg/releases/download/3.1.0-1031/netcoredbg-linux-amd64.tar.gz"))
|
||||||
|
|
||||||
|
;; With dired-open plugin, you can launch external programs for certain
|
||||||
|
;; extensions For example, I set all .png files to open in 'vimiv' and all .mp4
|
||||||
|
;; files to open in 'mpv'
|
||||||
|
(setq dired-open-extensions '(("gif" . "vimiv")
|
||||||
|
("jpg" . "vimiv")
|
||||||
|
("png" . "vimiv")
|
||||||
|
("mkv" . "mpv")
|
||||||
|
("mp3" . "mpv")
|
||||||
|
("mp4" . "mpv")))
|
||||||
|
|
||||||
|
(evil-define-key 'normal peep-dired-mode-map
|
||||||
|
(kbd "j") 'peep-dired-next-file
|
||||||
|
(kbd "k") 'peep-dired-prev-file)
|
||||||
|
(add-hook 'peep-dired-hook 'evil-normalize-keymaps)
|
||||||
|
|
||||||
|
(setq delete-by-moving-to-trash t
|
||||||
|
trash-directory "~/.local/share/Trash/files/")
|
||||||
|
|
||||||
|
(setq doom-theme 'doom-gruvbox)
|
||||||
|
(map! :leader
|
||||||
|
:desc "Load new theme" "h t" #'load-theme)
|
||||||
|
|
||||||
|
(use-package emojify
|
||||||
|
:hook (after-init . global-emojify-mode))
|
||||||
|
|
||||||
|
(setq doom-font (font-spec :family "Mononoki Nerd Font" :size 18)
|
||||||
|
doom-variable-pitch-font (font-spec :family "Mononoki Nerd Font" :size 18)
|
||||||
|
doom-big-font (font-spec :family "Mononoki Nerd Font" :size 24))
|
||||||
|
(after! doom-themes
|
||||||
|
(setq doom-themes-enable-bold t
|
||||||
|
doom-themes-enable-italic t))
|
||||||
|
(custom-set-faces!
|
||||||
|
'(font-lock-comment-face :slant italic)
|
||||||
|
'(font-lock-keyword-face :slant italic))
|
||||||
|
|
||||||
|
(defun drk/insert-todays-date (prefix)
|
||||||
|
(interactive "P")
|
||||||
|
(let ((format (cond
|
||||||
|
((not prefix) "%A, %B %d, %Y")
|
||||||
|
((equal prefix '(4)) "%m-%d-%Y")
|
||||||
|
((equal prefix '(16)) "%Y-%m-%d"))))
|
||||||
|
(insert (format-time-string format))))
|
||||||
|
|
||||||
|
(require 'calendar)
|
||||||
|
(defun drk/insert-any-date (date)
|
||||||
|
"Insert DATE using the current locale."
|
||||||
|
(interactive (list (calendar-read-date)))
|
||||||
|
(insert (calendar-date-string date)))
|
||||||
|
|
||||||
|
(map! :leader
|
||||||
|
(:prefix ("i d" . "Insert date")
|
||||||
|
:desc "Insert any date" "a" #'drk/insert-any-date
|
||||||
|
:desc "Insert todays date" "t" #'drk/insert-todays-date))
|
||||||
|
|
||||||
|
(setq ivy-posframe-display-functions-alist
|
||||||
|
'((swiper . ivy-posframe-display-at-point)
|
||||||
|
(complete-symbol . ivy-posframe-display-at-point)
|
||||||
|
(counsel-M-x . ivy-display-function-fallback)
|
||||||
|
(counsel-esh-history . ivy-posframe-display-at-window-center)
|
||||||
|
(counsel-describe-function . ivy-display-function-fallback)
|
||||||
|
(counsel-describe-variable . ivy-display-function-fallback)
|
||||||
|
(counsel-find-file . ivy-display-function-fallback)
|
||||||
|
(counsel-recentf . ivy-display-function-fallback)
|
||||||
|
(counsel-register . ivy-posframe-display-at-frame-bottom-window-center)
|
||||||
|
(dmenu . ivy-posframe-display-at-frame-top-center)
|
||||||
|
(nil . ivy-posframe-display))
|
||||||
|
ivy-posframe-height-alist
|
||||||
|
'((swiper . 20)
|
||||||
|
(dmenu . 20)
|
||||||
|
(t . 10)))
|
||||||
|
(ivy-posframe-mode 1) ; 1 enables posframe-mode, 0 disables it.
|
||||||
|
|
||||||
|
(map! :leader
|
||||||
|
(:prefix ("v" . "Ivy")
|
||||||
|
:desc "Ivy push view" "v p" #'ivy-push-view
|
||||||
|
:desc "Ivy switch view" "v s" #'ivy-switch-view))
|
||||||
|
|
||||||
|
(setq display-line-numbers-type t)
|
||||||
|
(map! :leader
|
||||||
|
:desc "Comment or uncomment lines" "TAB TAB" #'comment-line
|
||||||
|
(:prefix ("t" . "toggle")
|
||||||
|
:desc "Toggle line numbers" "l" #'doom/toggle-line-numbers
|
||||||
|
:desc "Toggle line highlight in frame" "h" #'hl-line-mode
|
||||||
|
:desc "Toggle line highlight globally" "H" #'global-hl-line-mode
|
||||||
|
:desc "Toggle truncate lines" "t" #'toggle-truncate-lines))
|
||||||
|
|
||||||
|
(add-hook 'csharp-mode-hook #'lsp-deferred)
|
||||||
|
|
||||||
|
(add-hook 'go-mode-hook #'lsp-deferred)
|
||||||
|
|
||||||
|
(add-hook 'rust-mode-hook #'lsp-deferred)
|
||||||
|
|
||||||
|
(custom-set-faces
|
||||||
|
'(markdown-header-face ((t (:inherit font-lock-function-name-face :weight bold :family "Mononoki Nerd Font"))))
|
||||||
|
'(markdown-header-face-1 ((t (:inherit markdown-header-face :height 1.7))))
|
||||||
|
'(markdown-header-face-2 ((t (:inherit markdown-header-face :height 1.6))))
|
||||||
|
'(markdown-header-face-3 ((t (:inherit markdown-header-face :height 1.5))))
|
||||||
|
'(markdown-header-face-4 ((t (:inherit markdown-header-face :height 1.4))))
|
||||||
|
'(markdown-header-face-5 ((t (:inherit markdown-header-face :height 1.3))))
|
||||||
|
'(markdown-header-face-6 ((t (:inherit markdown-header-face :height 1.2)))))
|
||||||
|
|
||||||
|
(set-face-attribute 'mode-line nil :font "Mononoki Nerd Font-14")
|
||||||
|
(setq doom-modeline-height 30 ;; sets modeline height
|
||||||
|
doom-modeline-bar-width 5 ;; sets right bar width
|
||||||
|
doom-modeline-persp-name t ;; adds perspective name to modeline
|
||||||
|
doom-modeline-persp-icon t) ;; adds folder icon next to persp name
|
||||||
|
|
||||||
|
(xterm-mouse-mode 1)
|
||||||
|
|
||||||
|
(map! :leader
|
||||||
|
:desc "Toggle neotree" "e" #'neotree-toggle)
|
||||||
|
(setq neo-theme 'nerd)
|
||||||
|
(setq neo-smart-open t)
|
||||||
|
(setq projectile-switch-project-action 'neotree-projectile-action)
|
||||||
|
|
||||||
|
(map! :leader
|
||||||
|
(:prefix ("=" . "open file")
|
||||||
|
:desc "Edit agenda file" "a" #'(lambda () (interactive) (find-file "~/org/agenda.org"))
|
||||||
|
:desc "Edit doom config.org" "c" #'(lambda () (interactive) (find-file "~/.config/doom/config.org"))
|
||||||
|
:desc "Edit doom init.el" "i" #'(lambda () (interactive) (find-file "~/.config/doom/init.el"))
|
||||||
|
:desc "Edit doom packages.el" "p" #'(lambda () (interactive) (find-file "~/.config/doom/packages.el"))))
|
||||||
|
|
||||||
|
(map! :leader
|
||||||
|
:desc "Org babel tangle" "m B" #'org-babel-tangle)
|
||||||
|
(after! org
|
||||||
|
(setq org-directory "~/org/"
|
||||||
|
org-agenda-files '("~/org/agenda.org")
|
||||||
|
org-default-notes-file (expand-file-name "notes.org" org-directory)
|
||||||
|
org-ellipsis " ▼ "
|
||||||
|
org-superstar-headline-bullets-list '("◉" "●" "○" "◆" "●" "○" "◆")
|
||||||
|
org-superstar-item-bullet-alist '((?+ . ?➤) (?- . ?✦)) ; changes +/- symbols in item lists
|
||||||
|
org-log-done 'time
|
||||||
|
org-hide-emphasis-markers t
|
||||||
|
;; ex. of org-link-abbrev-alist in action
|
||||||
|
;; [[arch-wiki:Name_of_Page][Description]]
|
||||||
|
org-link-abbrev-alist ; This overwrites the default Doom org-link-abbrev-list
|
||||||
|
'(("google" . "http://www.google.com/search?q=")
|
||||||
|
("arch-wiki" . "https://wiki.archlinux.org/index.php/")
|
||||||
|
("ddg" . "https://duckduckgo.com/?q=")
|
||||||
|
("wiki" . "https://en.wikipedia.org/wiki/"))
|
||||||
|
org-todo-keywords ; This overwrites the default Doom org-todo-keywords
|
||||||
|
'((sequence
|
||||||
|
"TODO(t)" ; A task that is ready to be tackled
|
||||||
|
"BLOG(b)" ; Blog writing assignments
|
||||||
|
"GYM(g)" ; Things to accomplish at the gym
|
||||||
|
"GAME(j)" ; Things to accomplish at the gym
|
||||||
|
"PROJ(p)" ; A project that contains other tasks
|
||||||
|
"VIDEO(v)" ; Video assignments
|
||||||
|
"WAIT(w)" ; Something is holding up this task
|
||||||
|
"|" ; The pipe necessary to separate "active" states and "inactive" states
|
||||||
|
"DONE(d)" ; Task has been completed
|
||||||
|
"CANCELLED(c)" )))) ; Task has been cancelled
|
||||||
|
(setq org-agenda-custom-commands
|
||||||
|
'(("p" "Priority view"
|
||||||
|
((tags "PRIORITY=\"A\""
|
||||||
|
((org-agenda-skip-function '(org-agenda-skip-entry-if 'todo 'done))
|
||||||
|
(org-agenda-overriding-header "High priority unfinished tasks:")))
|
||||||
|
(tags "PRIORITY=\"B\""
|
||||||
|
((org-agenda-skip-function '(org-agenda-skip-entry-if 'todo 'done))
|
||||||
|
(org-agenda-overriding-header "Medium priority unfinished tasks:")))
|
||||||
|
(tags "PRIORITY=\"C\""
|
||||||
|
((org-agenda-skip-function '(org-agenda-skip-entry-if 'todo 'done))
|
||||||
|
(org-agenda-overriding-header "Low priority unfinished tasks:")))))
|
||||||
|
("i" "INTEC view"
|
||||||
|
((tags "homeworks"
|
||||||
|
((org-agenda-skip-function '(org-agenda-skip-entry-if 'todo 'done))
|
||||||
|
(org-agenda-overriding-header "Pending homeworks:")))
|
||||||
|
(tags "studies"
|
||||||
|
((org-agenda-skip-function '(org-agenda-skip-entry-if 'todo 'done))
|
||||||
|
(org-agenda-overriding-header "Pending studies:")))
|
||||||
|
(tags "exam"
|
||||||
|
((org-agenda-skip-function '(org-agenda-skip-entry-if 'todo 'done))
|
||||||
|
(org-agenda-overriding-header "Pending exams:")))))
|
||||||
|
))
|
||||||
|
|
||||||
|
(setq
|
||||||
|
org-agenda-block-separator 985827
|
||||||
|
org-fancy-priorities-list '("" "" "")
|
||||||
|
org-priority-faces
|
||||||
|
'((?A :foreground "#fb4934" :weight bold)
|
||||||
|
(?B :foreground "#fabd2f" :weight bold)
|
||||||
|
(?C :foreground "#83a598" :weight bold)))
|
||||||
|
|
||||||
|
(setq org-publish-use-timestamps-flag nil)
|
||||||
|
(setq org-export-with-broken-links t)
|
||||||
|
|
||||||
|
(use-package! org-auto-tangle
|
||||||
|
:defer t
|
||||||
|
:hook (org-mode . org-auto-tangle-mode)
|
||||||
|
:config
|
||||||
|
(setq org-auto-tangle-default t))
|
||||||
|
|
||||||
|
(define-globalized-minor-mode global-rainbow-mode rainbow-mode
|
||||||
|
(lambda () (rainbow-mode 1)))
|
||||||
|
(global-rainbow-mode 1 )
|
||||||
|
|
||||||
|
(map! :leader
|
||||||
|
(:prefix ("r" . "registers")
|
||||||
|
:desc "Copy to register" "c" #'copy-to-register
|
||||||
|
:desc "Frameset to register" "f" #'frameset-to-register
|
||||||
|
:desc "Insert contents of register" "i" #'insert-register
|
||||||
|
:desc "Jump to register" "j" #'jump-to-register
|
||||||
|
:desc "List registers" "l" #'list-registers
|
||||||
|
:desc "Number to register" "n" #'number-to-register
|
||||||
|
:desc "Interactively choose a register" "r" #'counsel-register
|
||||||
|
:desc "View a register" "v" #'view-register
|
||||||
|
:desc "Window configuration to register" "w" #'window-configuration-to-register
|
||||||
|
:desc "Increment register" "+" #'increment-register
|
||||||
|
:desc "Point to register" "SPC" #'point-to-register))
|
||||||
|
|
||||||
|
(setq shell-file-name "/bin/bash"
|
||||||
|
vterm-max-scrollback 5000)
|
||||||
|
(map! :leader
|
||||||
|
:desc "Vterm popup toggle" "v t" #'+vterm/toggle)
|
||||||
|
|
||||||
|
(defun prefer-horizontal-split ()
|
||||||
|
(set-variable 'split-height-threshold nil t)
|
||||||
|
(set-variable 'split-width-threshold 40 t)) ; make this as low as needed
|
||||||
|
(add-hook 'markdown-mode-hook 'prefer-horizontal-split)
|
||||||
|
(map! :leader
|
||||||
|
:desc "Clone indirect buffer other window" "b c" #'clone-indirect-buffer-other-window)
|
||||||
|
|
||||||
|
(map! :leader
|
||||||
|
(:prefix ("w" . "window")
|
||||||
|
:desc "Winner redo" "<right>" #'winner-redo
|
||||||
|
:desc "Winner undo" "<left>" #'winner-undo))
|
||||||
|
|
||||||
|
(map! :leader
|
||||||
|
:desc "Zap to char" "z" #'zap-to-char
|
||||||
|
:desc "Zap up to char" "Z" #'zap-up-to-char)
|
||||||
|
|
||||||
|
(set-frame-parameter nil 'alpha-background 95) ; For current frame
|
||||||
|
(add-to-list 'default-frame-alist '(alpha-background . 95)) ; For all new frames henceforth
|
||||||
|
(when (daemonp)
|
||||||
|
(exec-path-from-shell-initialize))
|
759
config/doom/config.org
Normal file
|
@ -0,0 +1,759 @@
|
||||||
|
#+TITLE: DRK's Doom Emacs Config
|
||||||
|
#+AUTHOR: Clay Gomera (Drake)
|
||||||
|
#+DESCRIPTION: DRK's personal Doom Emacs config.
|
||||||
|
#+STARTUP: showeverything
|
||||||
|
#+PROPERTY: header-args :tangle config.el
|
||||||
|
|
||||||
|
* TABLE OF CONTENTS :toc:
|
||||||
|
- [[#about-this-config][ABOUT THIS CONFIG]]
|
||||||
|
- [[#beacon][BEACON]]
|
||||||
|
- [[#bookmarks-and-buffers][BOOKMARKS AND BUFFERS]]
|
||||||
|
- [[#bookmarks][Bookmarks]]
|
||||||
|
- [[#buffers][Buffers]]
|
||||||
|
- [[#global-auto-revert][Global Auto Revert]]
|
||||||
|
- [[#keybindings-within-ibuffer-mode][Keybindings within ibuffer mode]]
|
||||||
|
- [[#calendar][CALENDAR]]
|
||||||
|
- [[#clippy][CLIPPY]]
|
||||||
|
- [[#dap-mode][DAP MODE]]
|
||||||
|
- [[#dired][DIRED]]
|
||||||
|
- [[#keybindings-within-dired-with-peep-dired-mode-enabled][Keybindings Within Dired With Peep-Dired-Mode Enabled]]
|
||||||
|
- [[#making-deleted-files-go-to-trash-can][Making deleted files go to trash can]]
|
||||||
|
- [[#doom-theme][DOOM THEME]]
|
||||||
|
- [[#emojis][EMOJIS]]
|
||||||
|
- [[#fonts][FONTS]]
|
||||||
|
- [[#insert-date][INSERT DATE]]
|
||||||
|
- [[#ivy][IVY]]
|
||||||
|
- [[#ivy-posframe][IVY-POSFRAME]]
|
||||||
|
- [[#ivy-keybindings][IVY KEYBINDINGS]]
|
||||||
|
- [[#line-settings][LINE SETTINGS]]
|
||||||
|
- [[#lsp][LSP]]
|
||||||
|
- [[#markdown][MARKDOWN]]
|
||||||
|
- [[#modeline][MODELINE]]
|
||||||
|
- [[#mouse-support][MOUSE SUPPORT]]
|
||||||
|
- [[#neotree][NEOTREE]]
|
||||||
|
- [[#open-specific-files][OPEN SPECIFIC FILES]]
|
||||||
|
- [[#org-mode][ORG MODE]]
|
||||||
|
- [[#org-publish][Org-publish]]
|
||||||
|
- [[#org-auto-tangle][Org-auto-tangle]]
|
||||||
|
- [[#rainbow-mode][RAINBOW MODE]]
|
||||||
|
- [[#registers][REGISTERS]]
|
||||||
|
- [[#shells][SHELLS]]
|
||||||
|
- [[#splits][SPLITS]]
|
||||||
|
- [[#winner-mode][WINNER MODE]]
|
||||||
|
- [[#zap-to-char][ZAP TO CHAR]]
|
||||||
|
- [[#transparent][TRANSPARENT]]
|
||||||
|
|
||||||
|
* ABOUT THIS CONFIG
|
||||||
|
This is my personal Doom Emacs config. Doom Emacs is a distribution of Emacs
|
||||||
|
that uses the "evil" keybindings (Vim keybindings) and includes a number of nice
|
||||||
|
extensions and a bit of configuration out of the box. I am maintaining this
|
||||||
|
config not just for myself, but also for those that want to explore some of what
|
||||||
|
is possible with Emacs. I will add a lot of examples of plugins and settings,
|
||||||
|
some of them I may not even use personally. I do this because many people
|
||||||
|
following me on YouTube look at my configs as "documentation". This config is
|
||||||
|
based on DistroTube's config.
|
||||||
|
|
||||||
|
* BEACON
|
||||||
|
Never lose your cursor. When you scroll, your cursor will shine! This is a
|
||||||
|
global minor-mode. Turn it on everywhere with:
|
||||||
|
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(beacon-mode 1)
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
* BOOKMARKS AND BUFFERS
|
||||||
|
Doom Emacs uses 'SPC b' for keybindings related to bookmarks and buffers.
|
||||||
|
|
||||||
|
** Bookmarks
|
||||||
|
Bookmarks are somewhat like registers in that they record positions you can jump
|
||||||
|
to. Unlike registers, they have long names, and they persist automatically from
|
||||||
|
one Emacs session to the next. The prototypical use of bookmarks is to record
|
||||||
|
where you were reading in various files.
|
||||||
|
|
||||||
|
#+BEGIN_SRC emacs-lisp
|
||||||
|
(map! :leader
|
||||||
|
(:prefix ("b". "buffer")
|
||||||
|
:desc "List bookmarks" "L" #'list-bookmarks
|
||||||
|
:desc "Save current bookmarks to bookmark file" "w" #'bookmark-save))
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
|
** Buffers
|
||||||
|
Regarding /buffers/, the text you are editing in Emacs resides in an object called
|
||||||
|
a /buffer/. Each time you visit a file, a buffer is used to hold the file’s text.
|
||||||
|
Each time you invoke Dired, a buffer is used to hold the directory listing.
|
||||||
|
/Ibuffer/ is a program that lists all of your Emacs /buffers/, allowing you to
|
||||||
|
navigate between them and filter them.
|
||||||
|
|
||||||
|
| COMMAND | DESCRIPTION | KEYBINDING |
|
||||||
|
|-----------------+----------------------+------------|
|
||||||
|
| ibuffer | Launch ibuffer | SPC b i |
|
||||||
|
| kill-buffer | Kill current buffer | SPC b k |
|
||||||
|
| next-buffer | Goto next buffer | SPC b n |
|
||||||
|
| previous-buffer | Goto previous buffer | SPC b p |
|
||||||
|
| save-buffer | Save current buffer | SPC b s |
|
||||||
|
|
||||||
|
** Global Auto Revert
|
||||||
|
A buffer can get out of sync with respect to its visited file on disk if that
|
||||||
|
file is changed by another program. To keep it up to date, you can enable Auto
|
||||||
|
Revert mode by typing M-x auto-revert-mode, or you can set it to be turned on
|
||||||
|
globally with 'global-auto-revert-mode'. I have also turned on Global Auto
|
||||||
|
Revert on non-file buffers, which is especially useful for 'dired' buffers.
|
||||||
|
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(global-auto-revert-mode 1)
|
||||||
|
(setq global-auto-revert-non-file-buffers t)
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
** Keybindings within ibuffer mode
|
||||||
|
|
||||||
|
| COMMAND | DESCRIPTION | KEYBINDING |
|
||||||
|
|-----------------------------------+----------------------------------------+------------|
|
||||||
|
| ibuffer-mark-forward | Mark the buffer | m |
|
||||||
|
| ibuffer-unmark-forward | Unmark the buffer | u |
|
||||||
|
| ibuffer-do-kill-on-deletion-marks | Kill the marked buffers | x |
|
||||||
|
| ibuffer-filter-by-content | Ibuffer filter by content | f c |
|
||||||
|
| ibuffer-filter-by-directory | Ibuffer filter by directory | f d |
|
||||||
|
| ibuffer-filter-by-filename | Ibuffer filter by filename (full path) | f f |
|
||||||
|
| ibuffer-filter-by-mode | Ibuffer filter by mode | f m |
|
||||||
|
| ibuffer-filter-by-name | Ibuffer filter by name | f n |
|
||||||
|
| ibuffer-filter-disable | Disable ibuffer filter | f x |
|
||||||
|
| ibuffer-do-kill-lines | Hide marked buffers | g h |
|
||||||
|
| ibuffer-update | Restore hidden buffers | g H |
|
||||||
|
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(evil-define-key 'normal ibuffer-mode-map
|
||||||
|
(kbd "f c") 'ibuffer-filter-by-content
|
||||||
|
(kbd "f d") 'ibuffer-filter-by-directory
|
||||||
|
(kbd "f f") 'ibuffer-filter-by-filename
|
||||||
|
(kbd "f m") 'ibuffer-filter-by-mode
|
||||||
|
(kbd "f n") 'ibuffer-filter-by-name
|
||||||
|
(kbd "f x") 'ibuffer-filter-disable
|
||||||
|
(kbd "g h") 'ibuffer-do-kill-lines
|
||||||
|
(kbd "g H") 'ibuffer-update)
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
* CALENDAR
|
||||||
|
Let's make a 12-month calendar available so we can have a calendar app that,
|
||||||
|
when we click on time/date in xmobar, we get a nice 12-month calendar to view.
|
||||||
|
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
;; https://stackoverflow.com/questions/9547912/emacs-calendar-show-more-than-3-months
|
||||||
|
(defun drk/year-calendar (&optional year)
|
||||||
|
(interactive)
|
||||||
|
(require 'calendar)
|
||||||
|
(let* (
|
||||||
|
(current-year (number-to-string (nth 5 (decode-time (current-time)))))
|
||||||
|
(month 0)
|
||||||
|
(year (if year year (string-to-number (format-time-string "%Y" (current-time))))))
|
||||||
|
(switch-to-buffer (get-buffer-create calendar-buffer))
|
||||||
|
(when (not (eq major-mode 'calendar-mode))
|
||||||
|
(calendar-mode))
|
||||||
|
(setq displayed-month month)
|
||||||
|
(setq displayed-year year)
|
||||||
|
(setq buffer-read-only nil)
|
||||||
|
(erase-buffer)
|
||||||
|
;; horizontal rows
|
||||||
|
(dotimes (j 4)
|
||||||
|
;; vertical columns
|
||||||
|
(dotimes (i 3)
|
||||||
|
(calendar-generate-month
|
||||||
|
(setq month (+ month 1))
|
||||||
|
year
|
||||||
|
;; indentation / spacing between months
|
||||||
|
(+ 5 (* 25 i))))
|
||||||
|
(goto-char (point-max))
|
||||||
|
(insert (make-string (- 10 (count-lines (point-min) (point-max))) ?\n))
|
||||||
|
(widen)
|
||||||
|
(goto-char (point-max))
|
||||||
|
(narrow-to-region (point-max) (point-max)))
|
||||||
|
(widen)
|
||||||
|
(goto-char (point-min))
|
||||||
|
(setq buffer-read-only t)))
|
||||||
|
|
||||||
|
(defun drk/scroll-year-calendar-forward (&optional arg event)
|
||||||
|
"Scroll the yearly calendar by year in a forward direction."
|
||||||
|
(interactive (list (prefix-numeric-value current-prefix-arg)
|
||||||
|
last-nonmenu-event))
|
||||||
|
(unless arg (setq arg 0))
|
||||||
|
(save-selected-window
|
||||||
|
(if (setq event (event-start event)) (select-window (posn-window event)))
|
||||||
|
(unless (zerop arg)
|
||||||
|
(let* (
|
||||||
|
(year (+ displayed-year arg)))
|
||||||
|
(drk/year-calendar year)))
|
||||||
|
(goto-char (point-min))
|
||||||
|
(run-hooks 'calendar-move-hook)))
|
||||||
|
|
||||||
|
(defun drk/scroll-year-calendar-backward (&optional arg event)
|
||||||
|
"Scroll the yearly calendar by year in a backward direction."
|
||||||
|
(interactive (list (prefix-numeric-value current-prefix-arg)
|
||||||
|
last-nonmenu-event))
|
||||||
|
(drk/scroll-year-calendar-forward (- (or arg 1)) event))
|
||||||
|
|
||||||
|
(map! :leader
|
||||||
|
:desc "Scroll year calendar backward" "<left>" #'drk/scroll-year-calendar-backward
|
||||||
|
:desc "Scroll year calendar forward" "<right>" #'drk/scroll-year-calendar-forward)
|
||||||
|
|
||||||
|
(defalias 'year-calendar 'drk/year-calendar)
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
* CLIPPY
|
||||||
|
Gives us a popup box with "Clippy, the paper clip". You can make him say various
|
||||||
|
things by calling 'clippy-say' function. But the more useful functions of
|
||||||
|
clippy are the two describe functions provided: 'clippy-describe-function' and
|
||||||
|
'clippy-describe-variable'. Hit the appropriate keybinding while the point is
|
||||||
|
over a function/variable to call it. A popup with helpful clippy will appear,
|
||||||
|
telling you about the function/variable (using describe-function and
|
||||||
|
describe-variable respectively).
|
||||||
|
|
||||||
|
| COMMAND | DESCRIPTION | KEYBINDING |
|
||||||
|
|--------------------------+---------------------------------------+------------|
|
||||||
|
| clippy-describe-function | /Clippy describes function under point/ | SPC c h f |
|
||||||
|
| clippy-describe-variable | /Clippy describes variable under point/ | SPC c h v |
|
||||||
|
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(map! :leader
|
||||||
|
(:prefix ("c h" . "Help info from Clippy")
|
||||||
|
:desc "Clippy describes function under point" "f" #'clippy-describe-function
|
||||||
|
:desc "Clippy describes variable under point" "v" #'clippy-describe-variable))
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
* DAP MODE
|
||||||
|
dap-mode is a debugger manager for emacs that supports multiple languages.
|
||||||
|
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(require 'dap-netcore)
|
||||||
|
(require 'dap-dlv-go)
|
||||||
|
(map! :leader
|
||||||
|
(:prefix ("d" . "dap-mode")
|
||||||
|
:desc "Toggle breakpoint" "t" #'dap-breakpoint-toggle
|
||||||
|
:desc "Continue execution" "c" #'dap-continue
|
||||||
|
:desc "Step in" "n" #'dap-step-in
|
||||||
|
:desc "Step out" "N" #'dap-step-out
|
||||||
|
:desc "See all breakpoints" "b" #'dap-ui-breakpoints-toggle
|
||||||
|
:desc "Change variable value" "s" #'dap-ui-set-variable-value
|
||||||
|
:desc "Evaluate expression at point" "e" #'dap-eval-thing-at-point
|
||||||
|
:desc "Evaluate expression" "E" #'dap-eval
|
||||||
|
:desc "Run debugger" "r" #'dap-debug
|
||||||
|
:desc "Restart debugger" "R" #'dap-debug-restart
|
||||||
|
:desc "Stop debugger" "d" #'dap-disconnect))
|
||||||
|
(use-package dap-mode
|
||||||
|
:init
|
||||||
|
(dap-auto-configure-mode)
|
||||||
|
|
||||||
|
:custom
|
||||||
|
(dap-netcore-download-url "https://github.com/Samsung/netcoredbg/releases/download/3.1.0-1031/netcoredbg-linux-amd64.tar.gz"))
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
* DIRED
|
||||||
|
Dired is the file manager within Emacs.
|
||||||
|
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
;; With dired-open plugin, you can launch external programs for certain
|
||||||
|
;; extensions For example, I set all .png files to open in 'vimiv' and all .mp4
|
||||||
|
;; files to open in 'mpv'
|
||||||
|
(setq dired-open-extensions '(("gif" . "vimiv")
|
||||||
|
("jpg" . "vimiv")
|
||||||
|
("png" . "vimiv")
|
||||||
|
("mkv" . "mpv")
|
||||||
|
("mp3" . "mpv")
|
||||||
|
("mp4" . "mpv")))
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
** Keybindings Within Dired With Peep-Dired-Mode Enabled
|
||||||
|
If peep-dired is enabled, you will get image previews as you go up/down with 'j'
|
||||||
|
and 'k'
|
||||||
|
|
||||||
|
| COMMAND | DESCRIPTION | KEYBINDING |
|
||||||
|
|----------------------+------------------------------------------+------------|
|
||||||
|
| peep-dired | /Toggle previews within dired/ | SPC d p |
|
||||||
|
| peep-dired-next-file | /Move to next file in peep-dired-mode/ | j |
|
||||||
|
| peep-dired-prev-file | /Move to previous file in peep-dired-mode/ | k |
|
||||||
|
|
||||||
|
#+BEGIN_SRC emacs-lisp
|
||||||
|
(evil-define-key 'normal peep-dired-mode-map
|
||||||
|
(kbd "j") 'peep-dired-next-file
|
||||||
|
(kbd "k") 'peep-dired-prev-file)
|
||||||
|
(add-hook 'peep-dired-hook 'evil-normalize-keymaps)
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
|
** Making deleted files go to trash can
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(setq delete-by-moving-to-trash t
|
||||||
|
trash-directory "~/.local/share/Trash/files/")
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
* DOOM THEME
|
||||||
|
Setting the theme to doom-one. To try out new themes, I set a keybinding for
|
||||||
|
counsel-load-theme with 'SPC h t'.
|
||||||
|
|
||||||
|
#+BEGIN_SRC emacs-lisp
|
||||||
|
(setq doom-theme 'doom-gruvbox)
|
||||||
|
(map! :leader
|
||||||
|
:desc "Load new theme" "h t" #'load-theme)
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
|
* EMOJIS
|
||||||
|
Emojify is an Emacs extension to display emojis. It can display github style
|
||||||
|
emojis like :smile: or plain ascii ones like :).
|
||||||
|
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(use-package emojify
|
||||||
|
:hook (after-init . global-emojify-mode))
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
* FONTS
|
||||||
|
Settings related to fonts within Doom Emacs:
|
||||||
|
+ 'doom-font' -- standard monospace font that is used for most things in Emacs.
|
||||||
|
+ 'doom-variable-pitch-font' -- variable font which is useful in some Emacs plugins.
|
||||||
|
+ 'doom-big-font' -- used in doom-big-font-mode; useful for presentations.
|
||||||
|
+ 'font-lock-comment-face' -- for comments.
|
||||||
|
+ 'font-lock-keyword-face' -- for keywords with special significanclike 'setq' in elisp.
|
||||||
|
|
||||||
|
#+BEGIN_SRC emacs-lisp
|
||||||
|
(setq doom-font (font-spec :family "Mononoki Nerd Font" :size 18)
|
||||||
|
doom-variable-pitch-font (font-spec :family "Mononoki Nerd Font" :size 18)
|
||||||
|
doom-big-font (font-spec :family "Mononoki Nerd Font" :size 24))
|
||||||
|
(after! doom-themes
|
||||||
|
(setq doom-themes-enable-bold t
|
||||||
|
doom-themes-enable-italic t))
|
||||||
|
(custom-set-faces!
|
||||||
|
'(font-lock-comment-face :slant italic)
|
||||||
|
'(font-lock-keyword-face :slant italic))
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
|
* INSERT DATE
|
||||||
|
Some custom functions to insert the date. The function 'insert-todays-date' can
|
||||||
|
be used one of three different ways: (1) just the keybinding without the
|
||||||
|
universal argument prefix, (2) with one universal argument prefix, or (3) with
|
||||||
|
two universal argument prefixes. The universal argument prefix is 'SPC-u' in
|
||||||
|
Doom Emacs (C-u in standard GNU Emacs). The function 'insert-any-date' only
|
||||||
|
outputs to one format, which is the same format as 'insert-todays-date' without
|
||||||
|
a prefix.
|
||||||
|
|
||||||
|
| COMMAND | EXAMPLE OUTPUT | KEYBINDING |
|
||||||
|
|------------------------+---------------------------+-----------------------|
|
||||||
|
| drk/insert-todays-date | Friday, November 19, 2021 | SPC i d t |
|
||||||
|
| drk/insert-todays-date | 11-19-2021 | SPC u SPC i d t |
|
||||||
|
| drk/insert-todays-date | 2021-11-19 | SPC u SPC u SPC i d t |
|
||||||
|
| drk/insert-any-date | Friday, November 19, 2021 | SPC i d a |
|
||||||
|
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(defun drk/insert-todays-date (prefix)
|
||||||
|
(interactive "P")
|
||||||
|
(let ((format (cond
|
||||||
|
((not prefix) "%A, %B %d, %Y")
|
||||||
|
((equal prefix '(4)) "%m-%d-%Y")
|
||||||
|
((equal prefix '(16)) "%Y-%m-%d"))))
|
||||||
|
(insert (format-time-string format))))
|
||||||
|
|
||||||
|
(require 'calendar)
|
||||||
|
(defun drk/insert-any-date (date)
|
||||||
|
"Insert DATE using the current locale."
|
||||||
|
(interactive (list (calendar-read-date)))
|
||||||
|
(insert (calendar-date-string date)))
|
||||||
|
|
||||||
|
(map! :leader
|
||||||
|
(:prefix ("i d" . "Insert date")
|
||||||
|
:desc "Insert any date" "a" #'drk/insert-any-date
|
||||||
|
:desc "Insert todays date" "t" #'drk/insert-todays-date))
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
* IVY
|
||||||
|
Ivy is a generic completion mechanism for Emacs.
|
||||||
|
|
||||||
|
** IVY-POSFRAME
|
||||||
|
Ivy-posframe is an ivy extension, which lets ivy use posframe to show its
|
||||||
|
candidate menu. Some of the settings below involve:
|
||||||
|
+ ivy-posframe-display-functions-alist -- sets the display position for specific
|
||||||
|
programs
|
||||||
|
+ ivy-posframe-height-alist -- sets the height of the list displayed for
|
||||||
|
specific programs
|
||||||
|
|
||||||
|
Available functions (positions) for 'ivy-posframe-display-functions-alist'
|
||||||
|
+ ivy-posframe-display-at-frame-center
|
||||||
|
+ ivy-posframe-display-at-window-center
|
||||||
|
+ ivy-posframe-display-at-frame-bottom-left
|
||||||
|
+ ivy-posframe-display-at-window-bottom-left
|
||||||
|
+ ivy-posframe-display-at-frame-bottom-window-center
|
||||||
|
+ ivy-posframe-display-at-point
|
||||||
|
+ ivy-posframe-display-at-frame-top-center
|
||||||
|
|
||||||
|
=NOTE:= If the setting for 'ivy-posframe-display' is set to 'nil' (false),
|
||||||
|
anything that is set to 'ivy-display-function-fallback' will just default to
|
||||||
|
their normal position in Doom Emacs (usually a bottom split). However, if this
|
||||||
|
is set to 't' (true), then the fallback position will be centered in the window.
|
||||||
|
|
||||||
|
#+BEGIN_SRC emacs-lisp
|
||||||
|
(setq ivy-posframe-display-functions-alist
|
||||||
|
'((swiper . ivy-posframe-display-at-point)
|
||||||
|
(complete-symbol . ivy-posframe-display-at-point)
|
||||||
|
(counsel-M-x . ivy-display-function-fallback)
|
||||||
|
(counsel-esh-history . ivy-posframe-display-at-window-center)
|
||||||
|
(counsel-describe-function . ivy-display-function-fallback)
|
||||||
|
(counsel-describe-variable . ivy-display-function-fallback)
|
||||||
|
(counsel-find-file . ivy-display-function-fallback)
|
||||||
|
(counsel-recentf . ivy-display-function-fallback)
|
||||||
|
(counsel-register . ivy-posframe-display-at-frame-bottom-window-center)
|
||||||
|
(dmenu . ivy-posframe-display-at-frame-top-center)
|
||||||
|
(nil . ivy-posframe-display))
|
||||||
|
ivy-posframe-height-alist
|
||||||
|
'((swiper . 20)
|
||||||
|
(dmenu . 20)
|
||||||
|
(t . 10)))
|
||||||
|
(ivy-posframe-mode 1) ; 1 enables posframe-mode, 0 disables it.
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
|
** IVY KEYBINDINGS
|
||||||
|
By default, Doom Emacs does not use 'SPC v', so the format I use for these
|
||||||
|
bindings is 'SPC v' plus 'key'.
|
||||||
|
|
||||||
|
#+BEGIN_SRC emacs-lisp
|
||||||
|
(map! :leader
|
||||||
|
(:prefix ("v" . "Ivy")
|
||||||
|
:desc "Ivy push view" "v p" #'ivy-push-view
|
||||||
|
:desc "Ivy switch view" "v s" #'ivy-switch-view))
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
|
* LINE SETTINGS
|
||||||
|
I set comment-line to 'SPC TAB TAB' which is a rather comfortable keybinding for
|
||||||
|
me on my ZSA Moonlander keyboard. The standard Emacs keybinding for
|
||||||
|
comment-line is 'C-x C-;'. The other keybindings are for commands that toggle
|
||||||
|
on/off various line-related settings. Doom Emacs uses 'SPC t' for "toggle"
|
||||||
|
commands, so I choose 'SPC t' plus 'key' for those bindings.
|
||||||
|
|
||||||
|
| COMMAND | DESCRIPTION | KEYBINDING |
|
||||||
|
|--------------------------+-------------------------------------------+-------------|
|
||||||
|
| comment-line | /Comment or uncomment lines/ | SPC TAB TAB |
|
||||||
|
| hl-line-mode | /Toggle line highlighting in current frame/ | SPC t h |
|
||||||
|
| global-hl-line-mode | /Toggle line highlighting globally/ | SPC t H |
|
||||||
|
| doom/toggle-line-numbers | /Toggle line numbers/ | SPC t l |
|
||||||
|
| toggle-truncate-lines | /Toggle truncate lines/ | SPC t t |
|
||||||
|
|
||||||
|
#+BEGIN_SRC emacs-lisp
|
||||||
|
(setq display-line-numbers-type t)
|
||||||
|
(map! :leader
|
||||||
|
:desc "Comment or uncomment lines" "TAB TAB" #'comment-line
|
||||||
|
(:prefix ("t" . "toggle")
|
||||||
|
:desc "Toggle line numbers" "l" #'doom/toggle-line-numbers
|
||||||
|
:desc "Toggle line highlight in frame" "h" #'hl-line-mode
|
||||||
|
:desc "Toggle line highlight globally" "H" #'global-hl-line-mode
|
||||||
|
:desc "Toggle truncate lines" "t" #'toggle-truncate-lines))
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
|
* LSP
|
||||||
|
Autostart lsp for programming languages
|
||||||
|
|
||||||
|
- C#:
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(add-hook 'csharp-mode-hook #'lsp-deferred)
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
- Go:
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(add-hook 'go-mode-hook #'lsp-deferred)
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
- Rust:
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(add-hook 'rust-mode-hook #'lsp-deferred)
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
* MARKDOWN
|
||||||
|
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(custom-set-faces
|
||||||
|
'(markdown-header-face ((t (:inherit font-lock-function-name-face :weight bold :family "Mononoki Nerd Font"))))
|
||||||
|
'(markdown-header-face-1 ((t (:inherit markdown-header-face :height 1.7))))
|
||||||
|
'(markdown-header-face-2 ((t (:inherit markdown-header-face :height 1.6))))
|
||||||
|
'(markdown-header-face-3 ((t (:inherit markdown-header-face :height 1.5))))
|
||||||
|
'(markdown-header-face-4 ((t (:inherit markdown-header-face :height 1.4))))
|
||||||
|
'(markdown-header-face-5 ((t (:inherit markdown-header-face :height 1.3))))
|
||||||
|
'(markdown-header-face-6 ((t (:inherit markdown-header-face :height 1.2)))))
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
* MODELINE
|
||||||
|
The modeline is the bottom status bar that appears in Emacs windows. For more
|
||||||
|
information on what is available to configure in the Doom modeline, check out:
|
||||||
|
https://github.com/seagle0128/doom-modeline
|
||||||
|
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(set-face-attribute 'mode-line nil :font "Mononoki Nerd Font-14")
|
||||||
|
(setq doom-modeline-height 30 ;; sets modeline height
|
||||||
|
doom-modeline-bar-width 5 ;; sets right bar width
|
||||||
|
doom-modeline-persp-name t ;; adds perspective name to modeline
|
||||||
|
doom-modeline-persp-icon t) ;; adds folder icon next to persp name
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
* MOUSE SUPPORT
|
||||||
|
Adding mouse support in the terminal version of Emacs.
|
||||||
|
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(xterm-mouse-mode 1)
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
* NEOTREE
|
||||||
|
1. SPC + e to toggle neotree
|
||||||
|
2. Make neotree prettier
|
||||||
|
3. Every time when the neotree window is opened, let it find current file and jump to node.
|
||||||
|
4. When running ‘projectile-switch-project’ (SPC p p), ‘neotree’ will change root automatically.
|
||||||
|
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(map! :leader
|
||||||
|
:desc "Toggle neotree" "e" #'neotree-toggle)
|
||||||
|
(setq neo-theme 'nerd)
|
||||||
|
(setq neo-smart-open t)
|
||||||
|
(setq projectile-switch-project-action 'neotree-projectile-action)
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
* OPEN SPECIFIC FILES
|
||||||
|
Keybindings to open files that I work with all the time using the find-file
|
||||||
|
command, which is the interactive file search that opens with 'C-x C-f' in GNU
|
||||||
|
Emacs or 'SPC f f' in Doom Emacs. These keybindings use find-file
|
||||||
|
non-interactively since we specify exactly what file to open. The format I use
|
||||||
|
for these bindings is 'SPC =' plus 'key' since Doom Emacs does not use 'SPC ='.
|
||||||
|
|
||||||
|
| PATH TO FILE | DESCRIPTION | KEYBINDING |
|
||||||
|
|--------------------------------+-----------------------+------------|
|
||||||
|
| ~/org/agenda.org | /Edit agenda file/ | SPC = a |
|
||||||
|
| ~/.config/doom/config.org" | /Edit doom config.org/ | SPC = c |
|
||||||
|
| ~/.config/doom/init.el" | /Edit doom init.el/ | SPC = i |
|
||||||
|
| ~/.config/doom/packages.el" | /Edit doom packages.el/ | SPC = p |
|
||||||
|
|
||||||
|
#+BEGIN_SRC emacs-lisp
|
||||||
|
(map! :leader
|
||||||
|
(:prefix ("=" . "open file")
|
||||||
|
:desc "Edit agenda file" "a" #'(lambda () (interactive) (find-file "~/org/agenda.org"))
|
||||||
|
:desc "Edit doom config.org" "c" #'(lambda () (interactive) (find-file "~/.config/doom/config.org"))
|
||||||
|
:desc "Edit doom init.el" "i" #'(lambda () (interactive) (find-file "~/.config/doom/init.el"))
|
||||||
|
:desc "Edit doom packages.el" "p" #'(lambda () (interactive) (find-file "~/.config/doom/packages.el"))))
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
|
* ORG MODE
|
||||||
|
I wrapped most of this block in (after! org). Without this, my settings might
|
||||||
|
be evaluated too early, which will result in my settings being overwritten by
|
||||||
|
Doom's defaults. I have also enabled org-journal, org-superstar and org-roam by
|
||||||
|
adding (+journal +pretty +roam2) to the org section of my Doom Emacs init.el.
|
||||||
|
|
||||||
|
#+BEGIN_SRC emacs-lisp
|
||||||
|
(map! :leader
|
||||||
|
:desc "Org babel tangle" "m B" #'org-babel-tangle)
|
||||||
|
(after! org
|
||||||
|
(setq org-directory "~/org/"
|
||||||
|
org-agenda-files '("~/org/agenda.org")
|
||||||
|
org-default-notes-file (expand-file-name "notes.org" org-directory)
|
||||||
|
org-ellipsis " ▼ "
|
||||||
|
org-superstar-headline-bullets-list '("◉" "●" "○" "◆" "●" "○" "◆")
|
||||||
|
org-superstar-item-bullet-alist '((?+ . ?➤) (?- . ?✦)) ; changes +/- symbols in item lists
|
||||||
|
org-log-done 'time
|
||||||
|
org-hide-emphasis-markers t
|
||||||
|
;; ex. of org-link-abbrev-alist in action
|
||||||
|
;; [[arch-wiki:Name_of_Page][Description]]
|
||||||
|
org-link-abbrev-alist ; This overwrites the default Doom org-link-abbrev-list
|
||||||
|
'(("google" . "http://www.google.com/search?q=")
|
||||||
|
("arch-wiki" . "https://wiki.archlinux.org/index.php/")
|
||||||
|
("ddg" . "https://duckduckgo.com/?q=")
|
||||||
|
("wiki" . "https://en.wikipedia.org/wiki/"))
|
||||||
|
org-todo-keywords ; This overwrites the default Doom org-todo-keywords
|
||||||
|
'((sequence
|
||||||
|
"TODO(t)" ; A task that is ready to be tackled
|
||||||
|
"BLOG(b)" ; Blog writing assignments
|
||||||
|
"GYM(g)" ; Things to accomplish at the gym
|
||||||
|
"GAME(j)" ; Things to accomplish at the gym
|
||||||
|
"PROJ(p)" ; A project that contains other tasks
|
||||||
|
"VIDEO(v)" ; Video assignments
|
||||||
|
"WAIT(w)" ; Something is holding up this task
|
||||||
|
"|" ; The pipe necessary to separate "active" states and "inactive" states
|
||||||
|
"DONE(d)" ; Task has been completed
|
||||||
|
"CANCELLED(c)" )))) ; Task has been cancelled
|
||||||
|
(setq org-agenda-custom-commands
|
||||||
|
'(("p" "Priority view"
|
||||||
|
((tags "PRIORITY=\"A\""
|
||||||
|
((org-agenda-skip-function '(org-agenda-skip-entry-if 'todo 'done))
|
||||||
|
(org-agenda-overriding-header "High priority unfinished tasks:")))
|
||||||
|
(tags "PRIORITY=\"B\""
|
||||||
|
((org-agenda-skip-function '(org-agenda-skip-entry-if 'todo 'done))
|
||||||
|
(org-agenda-overriding-header "Medium priority unfinished tasks:")))
|
||||||
|
(tags "PRIORITY=\"C\""
|
||||||
|
((org-agenda-skip-function '(org-agenda-skip-entry-if 'todo 'done))
|
||||||
|
(org-agenda-overriding-header "Low priority unfinished tasks:")))))
|
||||||
|
("i" "INTEC view"
|
||||||
|
((tags "homeworks"
|
||||||
|
((org-agenda-skip-function '(org-agenda-skip-entry-if 'todo 'done))
|
||||||
|
(org-agenda-overriding-header "Pending homeworks:")))
|
||||||
|
(tags "studies"
|
||||||
|
((org-agenda-skip-function '(org-agenda-skip-entry-if 'todo 'done))
|
||||||
|
(org-agenda-overriding-header "Pending studies:")))
|
||||||
|
(tags "exam"
|
||||||
|
((org-agenda-skip-function '(org-agenda-skip-entry-if 'todo 'done))
|
||||||
|
(org-agenda-overriding-header "Pending exams:")))))
|
||||||
|
))
|
||||||
|
|
||||||
|
(setq
|
||||||
|
org-agenda-block-separator 985827
|
||||||
|
org-fancy-priorities-list '("" "" "")
|
||||||
|
org-priority-faces
|
||||||
|
'((?A :foreground "#fb4934" :weight bold)
|
||||||
|
(?B :foreground "#fabd2f" :weight bold)
|
||||||
|
(?C :foreground "#83a598" :weight bold)))
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
|
** Org-publish
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(setq org-publish-use-timestamps-flag nil)
|
||||||
|
(setq org-export-with-broken-links t)
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
** Org-auto-tangle
|
||||||
|
=org-auto-tangle= allows you to add the option =#+auto_tangle: t= in your Org file
|
||||||
|
so that it automatically tangles when you save the document.
|
||||||
|
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(use-package! org-auto-tangle
|
||||||
|
:defer t
|
||||||
|
:hook (org-mode . org-auto-tangle-mode)
|
||||||
|
:config
|
||||||
|
(setq org-auto-tangle-default t))
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
* RAINBOW MODE
|
||||||
|
Rainbox mode displays the actual color for any hex value color. It's such a
|
||||||
|
nice feature that I wanted it turned on all the time, regardless of what mode I
|
||||||
|
am in. The following creates a global minor mode for rainbow-mode and enables
|
||||||
|
it.
|
||||||
|
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(define-globalized-minor-mode global-rainbow-mode rainbow-mode
|
||||||
|
(lambda () (rainbow-mode 1)))
|
||||||
|
(global-rainbow-mode 1 )
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
* REGISTERS
|
||||||
|
Emacs registers are compartments where you can save text, rectangles and
|
||||||
|
positions for later use. Once you save text or a rectangle in a register, you
|
||||||
|
can copy it into the buffer once or many times; once you save a position in a
|
||||||
|
register, you can jump back to that position once or many times. The default
|
||||||
|
GNU Emacs keybindings for these commands (with the exception of
|
||||||
|
counsel-register) involves 'C-x r' followed by one or more other keys. I wanted
|
||||||
|
to make this a little more user friendly, and since I am using Doom Emacs, I
|
||||||
|
choose to replace the 'C-x r' part of the key chords with 'SPC r'.
|
||||||
|
|
||||||
|
| COMMAND | DESCRIPTION | KEYBINDING |
|
||||||
|
|----------------------------------+----------------------------------+------------|
|
||||||
|
| copy-to-register | /Copy to register/ | SPC r c |
|
||||||
|
| frameset-to-register | /Frameset to register/ | SPC r f |
|
||||||
|
| insert-register | /Insert contents of register/ | SPC r i |
|
||||||
|
| jump-to-register | /Jump to register/ | SPC r j |
|
||||||
|
| list-registers | /List registers/ | SPC r l |
|
||||||
|
| number-to-register | /Number to register/ | SPC r n |
|
||||||
|
| counsel-register | /Interactively choose a register/ | SPC r r |
|
||||||
|
| view-register | /View a register/ | SPC r v |
|
||||||
|
| window-configuration-to-register | /Window configuration to register/ | SPC r w |
|
||||||
|
| increment-register | /Increment register/ | SPC r + |
|
||||||
|
| point-to-register | /Point to register/ | SPC r SPC |
|
||||||
|
|
||||||
|
#+BEGIN_SRC emacs-lisp
|
||||||
|
(map! :leader
|
||||||
|
(:prefix ("r" . "registers")
|
||||||
|
:desc "Copy to register" "c" #'copy-to-register
|
||||||
|
:desc "Frameset to register" "f" #'frameset-to-register
|
||||||
|
:desc "Insert contents of register" "i" #'insert-register
|
||||||
|
:desc "Jump to register" "j" #'jump-to-register
|
||||||
|
:desc "List registers" "l" #'list-registers
|
||||||
|
:desc "Number to register" "n" #'number-to-register
|
||||||
|
:desc "Interactively choose a register" "r" #'counsel-register
|
||||||
|
:desc "View a register" "v" #'view-register
|
||||||
|
:desc "Window configuration to register" "w" #'window-configuration-to-register
|
||||||
|
:desc "Increment register" "+" #'increment-register
|
||||||
|
:desc "Point to register" "SPC" #'point-to-register))
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
|
* SHELLS
|
||||||
|
Settings for the various shells and terminal emulators within Emacs.
|
||||||
|
+ 'shell-file-name' -- sets the shell to be used in M-x shell, M-x term, M-x
|
||||||
|
ansi-term and M-x vterm.
|
||||||
|
|
||||||
|
#+BEGIN_SRC emacs-lisp
|
||||||
|
(setq shell-file-name "/bin/bash"
|
||||||
|
vterm-max-scrollback 5000)
|
||||||
|
(map! :leader
|
||||||
|
:desc "Vterm popup toggle" "v t" #'+vterm/toggle)
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
|
* SPLITS
|
||||||
|
I set splits to default to opening on the right using 'prefer-horizontal-split'.
|
||||||
|
I set a keybinding for 'clone-indirect-buffer-other-window' for when I want to
|
||||||
|
have the same document in two splits. The text of the indirect buffer is always
|
||||||
|
identical to the text of its base buffer; changes made by editing either one are
|
||||||
|
visible immediately in the other. But in all other respects, the indirect
|
||||||
|
buffer and its base buffer are completely separate. For example, I can fold one
|
||||||
|
split but other will be unfolded.
|
||||||
|
|
||||||
|
#+BEGIN_SRC emacs-lisp
|
||||||
|
(defun prefer-horizontal-split ()
|
||||||
|
(set-variable 'split-height-threshold nil t)
|
||||||
|
(set-variable 'split-width-threshold 40 t)) ; make this as low as needed
|
||||||
|
(add-hook 'markdown-mode-hook 'prefer-horizontal-split)
|
||||||
|
(map! :leader
|
||||||
|
:desc "Clone indirect buffer other window" "b c" #'clone-indirect-buffer-other-window)
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
|
* WINNER MODE
|
||||||
|
Winner mode has been included with GNU Emacs since version 20. This is a global
|
||||||
|
minor mode and, when activated, it allows you to “undo” (and “redo”) changes in
|
||||||
|
the window configuration with the key commands 'SCP w <left>' and 'SPC w
|
||||||
|
<right>'.
|
||||||
|
|
||||||
|
#+BEGIN_SRC emacs-lisp
|
||||||
|
(map! :leader
|
||||||
|
(:prefix ("w" . "window")
|
||||||
|
:desc "Winner redo" "<right>" #'winner-redo
|
||||||
|
:desc "Winner undo" "<left>" #'winner-undo))
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
|
* ZAP TO CHAR
|
||||||
|
Emacs provides a 'zap-to-char' command that kills from the current point to a
|
||||||
|
character. It is bound to 'M-z' in standard GNU Emacs but since Doom Emacs uses
|
||||||
|
'SPC' as its leader key and does not have 'SPC z' binded to anything, it just
|
||||||
|
makes since to use it for 'zap-to-char'. Note that 'zap-to-char' can be used
|
||||||
|
with the universal argument 'SPC u' to modify its behavior. Examples of
|
||||||
|
'zap-to-char' usage are listed in the table below:
|
||||||
|
|
||||||
|
| KEYBINDING | WHAT IS DOES |
|
||||||
|
|---------------------------+------------------------------------------------------------|
|
||||||
|
| SPC z e | deletes all chars to the next occurrence of 'e' |
|
||||||
|
| SPC u 2 SPC z e | deletes all chars to the second occurrence of 'e' |
|
||||||
|
| SPC u - SPC z e | deletes all chars to the previous occurrence of 'e' |
|
||||||
|
| SPC u -2 SPC z e | deletes all chars to the fourth previous occurrence of 'e' |
|
||||||
|
| SPC u 1 0 0 SPC u SPC z e | deletes all chars to the 100th occurrence of 'e' |
|
||||||
|
|
||||||
|
=TIP:= The universal argument (SPC u) can only take a single integer by default.
|
||||||
|
If you need to use a multi-digit number (like 100 in the last example in the
|
||||||
|
table above), then you must terminate the universal argument with another 'SPC
|
||||||
|
u' after typing the number.
|
||||||
|
|
||||||
|
'zap-up-to-char' is an alternative command that does not zap the char specified.
|
||||||
|
It is binded to 'SPC Z'. It can also be used in conjunction with the universal
|
||||||
|
argument 'SPC u' in similar fashion to the the 'zap-to-char' examples above.
|
||||||
|
|
||||||
|
=NOTE:= Vim (evil mode) has similar functionality builtin. You can delete to the
|
||||||
|
next occurrence of 'e' by using 'dte' in normal. To delete to the next
|
||||||
|
occurrence of 'e' including the 'e', then you would use 'dfe'. And you can
|
||||||
|
modify 'dt' and 'df' by prefixing them with numbers, so '2dte' would delete to
|
||||||
|
the second occurrence of 'e'.
|
||||||
|
|
||||||
|
#+BEGIN_SRC emacs-lisp
|
||||||
|
(map! :leader
|
||||||
|
:desc "Zap to char" "z" #'zap-to-char
|
||||||
|
:desc "Zap up to char" "Z" #'zap-up-to-char)
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
|
* TRANSPARENT
|
||||||
|
Transparent window
|
||||||
|
|
||||||
|
#+BEGIN_SRC emacs-lisp
|
||||||
|
(set-frame-parameter nil 'alpha-background 95) ; For current frame
|
||||||
|
(add-to-list 'default-frame-alist '(alpha-background . 95)) ; For all new frames henceforth
|
||||||
|
(when (daemonp)
|
||||||
|
(exec-path-from-shell-initialize))
|
||||||
|
#+END_SRC
|
195
config/doom/init.el
Normal file
|
@ -0,0 +1,195 @@
|
||||||
|
;;; init.el -*- lexical-binding: t; -*-
|
||||||
|
|
||||||
|
;; This file controls what Doom modules are enabled and what order they load
|
||||||
|
;; in. Remember to run 'doom sync' after modifying it!
|
||||||
|
|
||||||
|
;; NOTE Press 'SPC h d h' (or 'C-h d h' for non-vim users) to access Doom's
|
||||||
|
;; documentation. There you'll find a link to Doom's Module Index where all
|
||||||
|
;; of our modules are listed, including what flags they support.
|
||||||
|
|
||||||
|
;; NOTE Move your cursor over a module's name (or its flags) and press 'K' (or
|
||||||
|
;; 'C-c c k' for non-vim users) to view its documentation. This works on
|
||||||
|
;; flags as well (those symbols that start with a plus).
|
||||||
|
;;
|
||||||
|
;; Alternatively, press 'gd' (or 'C-c c d') on a module to browse its
|
||||||
|
;; directory (for easy access to its source code).
|
||||||
|
|
||||||
|
(doom! :input
|
||||||
|
;;bidi ; (tfel ot) thgir etirw uoy gnipleh
|
||||||
|
;;chinese
|
||||||
|
;;japanese
|
||||||
|
;;layout ; auie,ctsrnm is the superior home row
|
||||||
|
|
||||||
|
:completion
|
||||||
|
company ; the ultimate code completion backend
|
||||||
|
;;(corfu +orderless) ; complete with cap(f), cape and a flying feather!
|
||||||
|
;;helm ; the *other* search engine for love and life
|
||||||
|
;;ido ; the other *other* search engine...
|
||||||
|
;;ivy ; a search engine for love and life
|
||||||
|
vertico ; the search engine of the future
|
||||||
|
|
||||||
|
:ui
|
||||||
|
;;deft ; notational velocity for Emacs
|
||||||
|
doom ; what makes DOOM look the way it does
|
||||||
|
doom-dashboard ; a nifty splash screen for Emacs
|
||||||
|
doom-quit ; DOOM quit-message prompts when you quit Emacs
|
||||||
|
(emoji +unicode) ; 🙂
|
||||||
|
hl-todo ; highlight TODO/FIXME/NOTE/DEPRECATED/HACK/REVIEW
|
||||||
|
;;hydra
|
||||||
|
indent-guides ; highlighted indent columns
|
||||||
|
ligatures ; ligatures and symbols to make your code pretty again
|
||||||
|
;;minimap ; show a map of the code on the side
|
||||||
|
modeline ; snazzy, Atom-inspired modeline, plus API
|
||||||
|
;;nav-flash ; blink cursor line after big motions
|
||||||
|
neotree ; a project drawer, like NERDTree for vim
|
||||||
|
ophints ; highlight the region an operation acts on
|
||||||
|
(popup +defaults) ; tame sudden yet inevitable temporary windows
|
||||||
|
;;tabs ; a tab bar for Emacs
|
||||||
|
;;treemacs ; a project drawer, like neotree but cooler
|
||||||
|
unicode ; extended unicode support for various languages
|
||||||
|
(vc-gutter +pretty) ; vcs diff in the fringe
|
||||||
|
vi-tilde-fringe ; fringe tildes to mark beyond EOB
|
||||||
|
;;window-select ; visually switch windows
|
||||||
|
workspaces ; tab emulation, persistence & separate workspaces
|
||||||
|
;;zen ; distraction-free coding or writing
|
||||||
|
|
||||||
|
:editor
|
||||||
|
(evil +everywhere) ; come to the dark side, we have cookies
|
||||||
|
file-templates ; auto-snippets for empty files
|
||||||
|
fold ; (nigh) universal code folding
|
||||||
|
;;(format +onsave) ; automated prettiness
|
||||||
|
;;god ; run Emacs commands without modifier keys
|
||||||
|
;;lispy ; vim for lisp, for people who don't like vim
|
||||||
|
;;multiple-cursors ; editing in many places at once
|
||||||
|
;;objed ; text object editing for the innocent
|
||||||
|
;;parinfer ; turn lisp into python, sort of
|
||||||
|
;;rotate-text ; cycle region at point between text candidates
|
||||||
|
snippets ; my elves. They type so I don't have to
|
||||||
|
word-wrap ; soft wrapping with language-aware indent
|
||||||
|
|
||||||
|
:emacs
|
||||||
|
dired ; making dired pretty [functional]
|
||||||
|
electric ; smarter, keyword-based electric-indent
|
||||||
|
ibuffer ; interactive buffer management
|
||||||
|
undo ; persistent, smarter undo for your inevitable mistakes
|
||||||
|
vc ; version-control and Emacs, sitting in a tree
|
||||||
|
|
||||||
|
:term
|
||||||
|
;;eshell ; the elisp shell that works everywhere
|
||||||
|
;;shell ; simple shell REPL for Emacs
|
||||||
|
;;term ; basic terminal emulator for Emacs
|
||||||
|
vterm ; the best terminal emulation in Emacs
|
||||||
|
|
||||||
|
:checkers
|
||||||
|
syntax ; tasing you for every semicolon you forget
|
||||||
|
;;(spell +flyspell) ; tasing you for misspelling mispelling
|
||||||
|
;;grammar ; tasing grammar mistake every you make
|
||||||
|
|
||||||
|
:tools
|
||||||
|
;;ansible
|
||||||
|
biblio ; Writes a PhD for you (citation needed)
|
||||||
|
;;collab ; buffers with friends
|
||||||
|
debugger ; FIXME stepping through code, to help you add bugs
|
||||||
|
;;direnv
|
||||||
|
docker
|
||||||
|
;;editorconfig ; let someone else argue about tabs vs spaces
|
||||||
|
;;ein ; tame Jupyter notebooks with emacs
|
||||||
|
(eval +overlay) ; run code, run (also, repls)
|
||||||
|
lookup ; navigate your code and its documentation
|
||||||
|
lsp ; M-x vscode
|
||||||
|
magit ; a git porcelain for Emacs
|
||||||
|
;;make ; run make tasks from Emacs
|
||||||
|
;;pass ; password manager for nerds
|
||||||
|
pdf ; pdf enhancements
|
||||||
|
;;prodigy ; FIXME managing external services & code builders
|
||||||
|
;;rgb ; creating color strings
|
||||||
|
;;taskrunner ; taskrunner for all your projects
|
||||||
|
;;terraform ; infrastructure as code
|
||||||
|
;;tmux ; an API for interacting with tmux
|
||||||
|
tree-sitter ; syntax and parsing, sitting in a tree...
|
||||||
|
;;upload ; map local to remote projects via ssh/ftp
|
||||||
|
|
||||||
|
:os
|
||||||
|
(:if (featurep :system 'macos) macos) ; improve compatibility with macOS
|
||||||
|
tty ; improve the terminal Emacs experience
|
||||||
|
|
||||||
|
:lang
|
||||||
|
;;agda ; types of types of types of types...
|
||||||
|
;;beancount ; mind the GAAP
|
||||||
|
(cc +lsp) ; C > C++ == 1
|
||||||
|
;;clojure ; java with a lisp
|
||||||
|
;;common-lisp ; if you've seen one lisp, you've seen them all
|
||||||
|
;;coq ; proofs-as-programs
|
||||||
|
;;crystal ; ruby at the speed of c
|
||||||
|
csharp ; unity, .NET, and mono shenanigans
|
||||||
|
data ; config/data formats
|
||||||
|
(dart +flutter) ; paint ui and not much else
|
||||||
|
;;dhall
|
||||||
|
;;elixir ; erlang done right
|
||||||
|
;;elm ; care for a cup of TEA?
|
||||||
|
emacs-lisp ; drown in parentheses
|
||||||
|
;;erlang ; an elegant language for a more civilized age
|
||||||
|
;;ess ; emacs speaks statistics
|
||||||
|
;;factor
|
||||||
|
;;faust ; dsp, but you get to keep your soul
|
||||||
|
;;fortran ; in FORTRAN, GOD is REAL (unless declared INTEGER)
|
||||||
|
;;fsharp ; ML stands for Microsoft's Language
|
||||||
|
;;fstar ; (dependent) types and (monadic) effects and Z3
|
||||||
|
gdscript ; the language you waited for
|
||||||
|
(go +lsp) ; the hipster dialect
|
||||||
|
;;(graphql +lsp) ; Give queries a REST
|
||||||
|
;;(haskell +lsp) ; a language that's lazier than I am
|
||||||
|
;;hy ; readability of scheme w/ speed of python
|
||||||
|
;;idris ; a language you can depend on
|
||||||
|
json ; At least it ain't XML
|
||||||
|
;;(java +lsp) ; the poster child for carpal tunnel syndrome
|
||||||
|
javascript ; all(hope(abandon(ye(who(enter(here))))))
|
||||||
|
;;julia ; a better, faster MATLAB
|
||||||
|
;;kotlin ; a better, slicker Java(Script)
|
||||||
|
latex ; writing papers in Emacs has never been so fun
|
||||||
|
;;lean ; for folks with too much to prove
|
||||||
|
;;ledger ; be audit you can be
|
||||||
|
lua ; one-based indices? one-based indices
|
||||||
|
markdown ; writing docs for people to ignore
|
||||||
|
;;nim ; python + lisp at the speed of c
|
||||||
|
;;nix ; I hereby declare "nix geht mehr!"
|
||||||
|
;;ocaml ; an objective camel
|
||||||
|
org ; organize your plain life in plain text
|
||||||
|
;;php ; perl's insecure younger brother
|
||||||
|
;;plantuml ; diagrams for confusing people more
|
||||||
|
;;purescript ; javascript, but functional
|
||||||
|
python ; beautiful is better than ugly
|
||||||
|
;;qt ; the 'cutest' gui framework ever
|
||||||
|
;;racket ; a DSL for DSLs
|
||||||
|
;;raku ; the artist formerly known as perl6
|
||||||
|
rest ; Emacs as a REST client
|
||||||
|
;;rst ; ReST in peace
|
||||||
|
;;(ruby +rails) ; 1.step {|i| p "Ruby is #{i.even? ? 'love' : 'life'}"}
|
||||||
|
(rust +lsp) ; Fe2O3.unwrap().unwrap().unwrap().unwrap()
|
||||||
|
;;scala ; java, but good
|
||||||
|
;;(scheme +guile) ; a fully conniving family of lisps
|
||||||
|
sh ; she sells {ba,z,fi}sh shells on the C xor
|
||||||
|
;;sml
|
||||||
|
;;solidity ; do you need a blockchain? No.
|
||||||
|
;;swift ; who asked for emoji variables?
|
||||||
|
;;terra ; Earth and Moon in alignment for performance.
|
||||||
|
web ; the tubes
|
||||||
|
yaml ; JSON, but readable
|
||||||
|
zig ; C, but simpler
|
||||||
|
|
||||||
|
:email
|
||||||
|
;;(mu4e +org +gmail)
|
||||||
|
;;notmuch
|
||||||
|
;;(wanderlust +gmail)
|
||||||
|
|
||||||
|
:app
|
||||||
|
calendar
|
||||||
|
;;emms
|
||||||
|
;;everywhere ; *leave* Emacs!? You must be joking
|
||||||
|
;;irc ; how neckbeards socialize
|
||||||
|
(rss +org) ; emacs as an RSS reader
|
||||||
|
;;twitter ; twitter client https://twitter.com/vnought
|
||||||
|
|
||||||
|
:config
|
||||||
|
literate
|
||||||
|
(default +bindings +smartparens))
|
83
config/doom/packages.el
Normal file
|
@ -0,0 +1,83 @@
|
||||||
|
;; -*- no-byte-compile: t; -*-
|
||||||
|
;;; $DOOMDIR/packages.el
|
||||||
|
|
||||||
|
;; To install a package with Doom you must declare them here and run 'doom sync'
|
||||||
|
;; on the command line, then restart Emacs for the changes to take effect -- or
|
||||||
|
;; use 'M-x doom/reload'.
|
||||||
|
|
||||||
|
|
||||||
|
;; To install SOME-PACKAGE from MELPA, ELPA or emacsmirror:
|
||||||
|
;; (package! some-package)
|
||||||
|
|
||||||
|
;; To install a package directly from a remote git repo, you must specify a
|
||||||
|
;; `:recipe'. You'll find documentation on what `:recipe' accepts here:
|
||||||
|
;; https://github.com/radian-software/straight.el#the-recipe-format
|
||||||
|
;; (package! another-package
|
||||||
|
;; :recipe (:host github :repo "username/repo"))
|
||||||
|
|
||||||
|
;; If the package you are trying to install does not contain a PACKAGENAME.el
|
||||||
|
;; file, or is located in a subdirectory of the repo, you'll need to specify
|
||||||
|
;; `:files' in the `:recipe':
|
||||||
|
;; (package! this-package
|
||||||
|
;; :recipe (:host github :repo "username/repo"
|
||||||
|
;; :files ("some-file.el" "src/lisp/*.el")))
|
||||||
|
|
||||||
|
;; If you'd like to disable a package included with Doom, you can do so here
|
||||||
|
;; with the `:disable' property:
|
||||||
|
;; (package! builtin-package :disable t)
|
||||||
|
|
||||||
|
;; You can override the recipe of a built in package without having to specify
|
||||||
|
;; all the properties for `:recipe'. These will inherit the rest of its recipe
|
||||||
|
;; from Doom or MELPA/ELPA/Emacsmirror:
|
||||||
|
;; (package! builtin-package :recipe (:nonrecursive t))
|
||||||
|
;; (package! builtin-package-2 :recipe (:repo "myfork/package"))
|
||||||
|
|
||||||
|
;; Specify a `:branch' to install a package from a particular branch or tag.
|
||||||
|
;; This is required for some packages whose default branch isn't 'master' (which
|
||||||
|
;; our package manager can't deal with; see radian-software/straight.el#279)
|
||||||
|
;; (package! builtin-package :recipe (:branch "develop"))
|
||||||
|
|
||||||
|
;; Use `:pin' to specify a particular commit to install.
|
||||||
|
;; (package! builtin-package :pin "1a2b3c4d5e")
|
||||||
|
|
||||||
|
|
||||||
|
;; Doom's packages are pinned to a specific commit and updated from release to
|
||||||
|
;; release. The `unpin!' macro allows you to unpin single packages...
|
||||||
|
;; (unpin! pinned-package)
|
||||||
|
;; ...or multiple packages
|
||||||
|
;; (unpin! pinned-package another-pinned-package)
|
||||||
|
;; ...Or *all* packages (NOT RECOMMENDED; will likely break things)
|
||||||
|
;; (unpin! t)
|
||||||
|
|
||||||
|
(package! gitconfig-mode
|
||||||
|
:recipe (:host github :repo "magit/git-modes"
|
||||||
|
:files ("gitconfig-mode.el")))
|
||||||
|
(package! gitignore-mode
|
||||||
|
:recipe (:host github :repo "magit/git-modes"
|
||||||
|
:files ("gitignore-mode.el")))
|
||||||
|
(package! flycheck-aspell)
|
||||||
|
(package! async)
|
||||||
|
(package! dired-open)
|
||||||
|
(package! dired-subtree)
|
||||||
|
(package! esxml)
|
||||||
|
(package! evil-tutor)
|
||||||
|
(package! imenu-list)
|
||||||
|
(package! ivy-posframe)
|
||||||
|
(package! mw-thesaurus)
|
||||||
|
(package! org-board)
|
||||||
|
(package! org-web-tools)
|
||||||
|
(package! org-auto-tangle)
|
||||||
|
(package! peep-dired)
|
||||||
|
(package! rainbow-mode)
|
||||||
|
(package! request)
|
||||||
|
(package! resize-window)
|
||||||
|
(package! s)
|
||||||
|
(package! tldr)
|
||||||
|
(package! wc-mode)
|
||||||
|
(package! beacon)
|
||||||
|
(package! olivetti)
|
||||||
|
(package! sharper)
|
||||||
|
(package! csproj-mode)
|
||||||
|
(package! dap-mode)
|
||||||
|
(package! vimrc-mode)
|
||||||
|
(package! exec-path-from-shell)
|
BIN
config/dunst/critical.png
Normal file
After Width: | Height: | Size: 35 KiB |
358
config/dunst/dunstrc
Normal file
|
@ -0,0 +1,358 @@
|
||||||
|
[global]
|
||||||
|
### Display ###
|
||||||
|
|
||||||
|
# Which monitor should the notifications be displayed on.
|
||||||
|
monitor = 0
|
||||||
|
|
||||||
|
# Display notification on focused monitor. Possible modes are:
|
||||||
|
# mouse: follow mouse pointer
|
||||||
|
# keyboard: follow window with keyboard focus
|
||||||
|
# none: don't follow anything
|
||||||
|
#
|
||||||
|
# "keyboard" needs a window manager that exports the
|
||||||
|
# _NET_ACTIVE_WINDOW property.
|
||||||
|
# This should be the case for almost all modern window managers.
|
||||||
|
#
|
||||||
|
# If this option is set to mouse or keyboard, the monitor option
|
||||||
|
# will be ignored.
|
||||||
|
follow = mouse
|
||||||
|
|
||||||
|
# Show how many messages are currently hidden (because of geometry).
|
||||||
|
indicate_hidden = yes
|
||||||
|
|
||||||
|
# Shrink window if it's smaller than the width. Will be ignored if
|
||||||
|
# width is 0.
|
||||||
|
shrink = no
|
||||||
|
|
||||||
|
# The transparency of the window. Range: [0; 100].
|
||||||
|
# This option will only work if a compositing window manager is
|
||||||
|
# present (e.g. xcompmgr, compiz, etc.).
|
||||||
|
transparency = 5
|
||||||
|
|
||||||
|
# Draw a line of "separator_height" pixel height between two
|
||||||
|
# notifications.
|
||||||
|
# Set to 0 to disable.
|
||||||
|
separator_height = 2
|
||||||
|
|
||||||
|
# Padding between text and separator.
|
||||||
|
padding = 8
|
||||||
|
|
||||||
|
# Horizontal padding.
|
||||||
|
horizontal_padding = 8
|
||||||
|
|
||||||
|
# Defines width in pixels of frame around the notification window.
|
||||||
|
# Set to 0 to disable.
|
||||||
|
frame_width = 2
|
||||||
|
|
||||||
|
# Defines color of the frame around the notification window.
|
||||||
|
frame_color = "#cc241d"
|
||||||
|
|
||||||
|
# Define a color for the separator.
|
||||||
|
# possible values are:
|
||||||
|
# * auto: dunst tries to find a color fitting to the background;
|
||||||
|
# * foreground: use the same color as the foreground;
|
||||||
|
# * frame: use the same color as the frame;
|
||||||
|
# * anything else will be interpreted as a X color.
|
||||||
|
separator_color = auto
|
||||||
|
|
||||||
|
# Sort messages by urgency.
|
||||||
|
sort = yes
|
||||||
|
|
||||||
|
# Don't remove messages, if the user is idle (no mouse or keyboard input)
|
||||||
|
# for longer than idle_threshold seconds.
|
||||||
|
# Set to 0 to disable.
|
||||||
|
# A client can set the 'transient' hint to bypass this. See the rules
|
||||||
|
# section for how to disable this if necessary
|
||||||
|
idle_threshold = 120
|
||||||
|
|
||||||
|
### Text ###
|
||||||
|
font = mononoki Nerd Font 10
|
||||||
|
|
||||||
|
# The spacing between lines. If the height is smaller than the
|
||||||
|
# font height, it will get raised to the font height.
|
||||||
|
line_height = 0
|
||||||
|
|
||||||
|
# Possible values are:
|
||||||
|
# full: Allow a small subset of html markup in notifications:
|
||||||
|
# <b>bold</b>
|
||||||
|
# <i>italic</i>
|
||||||
|
# <s>strikethrough</s>
|
||||||
|
# <u>underline</u>
|
||||||
|
#
|
||||||
|
# For a complete reference see
|
||||||
|
# <http://developer.gnome.org/pango/stable/PangoMarkupFormat.html>.
|
||||||
|
#
|
||||||
|
# strip: This setting is provided for compatibility with some broken
|
||||||
|
# clients that send markup even though it's not enabled on the
|
||||||
|
# server. Dunst will try to strip the markup but the parsing is
|
||||||
|
# simplistic so using this option outside of matching rules for
|
||||||
|
# specific applications *IS GREATLY DISCOURAGED*.
|
||||||
|
#
|
||||||
|
# no: Disable markup parsing, incoming notifications will be treated as
|
||||||
|
# plain text. Dunst will not advertise that it has the body-markup
|
||||||
|
# capability if this is set as a global setting.
|
||||||
|
#
|
||||||
|
# It's important to note that markup inside the format option will be parsed
|
||||||
|
# regardless of what this is set to.
|
||||||
|
markup = full
|
||||||
|
|
||||||
|
# The format of the message. Possible variables are:
|
||||||
|
# %a appname
|
||||||
|
# %s summary
|
||||||
|
# %b body
|
||||||
|
# %i iconname (including its path)
|
||||||
|
# %I iconname (without its path)
|
||||||
|
# %p progress value if set ([ 0%] to [100%]) or nothing
|
||||||
|
# %n progress value if set without any extra characters
|
||||||
|
# %% Literal %
|
||||||
|
# Markup is allowed
|
||||||
|
format = "<b>%s</b>\n%b"
|
||||||
|
|
||||||
|
# Alignment of message text.
|
||||||
|
# Possible values are "left", "center" and "right".
|
||||||
|
alignment = center
|
||||||
|
|
||||||
|
# Show age of message if message is older than show_age_threshold
|
||||||
|
# seconds.
|
||||||
|
# Set to -1 to disable.
|
||||||
|
show_age_threshold = 60
|
||||||
|
|
||||||
|
# Split notifications into multiple lines if they don't fit into
|
||||||
|
# geometry.
|
||||||
|
word_wrap = yes
|
||||||
|
|
||||||
|
# When word_wrap is set to no, specify where to make an ellipsis in long lines.
|
||||||
|
# Possible values are "start", "middle" and "end".
|
||||||
|
ellipsize = middle
|
||||||
|
|
||||||
|
# Ignore newlines '\n' in notifications.
|
||||||
|
ignore_newline = no
|
||||||
|
|
||||||
|
# Stack together notifications with the same content
|
||||||
|
stack_duplicates = true
|
||||||
|
|
||||||
|
# Hide the count of stacked notifications with the same content
|
||||||
|
hide_duplicate_count = false
|
||||||
|
|
||||||
|
# Display indicators for URLs (U) and actions (A).
|
||||||
|
show_indicators = yes
|
||||||
|
|
||||||
|
### Icons ###
|
||||||
|
|
||||||
|
# Align icons left/right/off
|
||||||
|
icon_position = left
|
||||||
|
|
||||||
|
# Scale larger icons down to this size, set to 0 to disable
|
||||||
|
max_icon_size = 32
|
||||||
|
|
||||||
|
# Paths to default icons.
|
||||||
|
icon_path = /usr/share/icons/Papirus-Dark/96x96/devices:/usr/share/icons/Papirus-Dark/48x48/status:/usr/share/icons/Papirus-Dark/96x96/apps
|
||||||
|
|
||||||
|
### History ###
|
||||||
|
|
||||||
|
# Should a notification popped up from history be sticky or timeout
|
||||||
|
# as if it would normally do.
|
||||||
|
sticky_history = yes
|
||||||
|
|
||||||
|
# Maximum amount of notifications kept in history
|
||||||
|
history_length = 20
|
||||||
|
|
||||||
|
### Misc/Advanced ###
|
||||||
|
|
||||||
|
# dmenu path.
|
||||||
|
dmenu = /usr/bin/dmenu -p dunst:
|
||||||
|
|
||||||
|
# Browser for opening urls in context menu.
|
||||||
|
browser = /usr/bin/qutebrowser
|
||||||
|
|
||||||
|
# Always run rule-defined scripts, even if the notification is suppressed
|
||||||
|
always_run_script = true
|
||||||
|
|
||||||
|
# Define the title of the windows spawned by dunst
|
||||||
|
title = Dunst
|
||||||
|
|
||||||
|
# Define the class of the windows spawned by dunst
|
||||||
|
class = Dunst
|
||||||
|
|
||||||
|
# Define the corner radius of the notification window
|
||||||
|
# in pixel size. If the radius is 0, you have no rounded
|
||||||
|
# corners.
|
||||||
|
# The radius will be automatically lowered if it exceeds half of the
|
||||||
|
# notification height to avoid clipping text and/or icons.
|
||||||
|
corner_radius = 0
|
||||||
|
|
||||||
|
### Legacy
|
||||||
|
|
||||||
|
# Use the Xinerama extension instead of RandR for multi-monitor support.
|
||||||
|
# This setting is provided for compatibility with older nVidia drivers that
|
||||||
|
# do not support RandR and using it on systems that support RandR is highly
|
||||||
|
# discouraged.
|
||||||
|
#
|
||||||
|
# By enabling this setting dunst will not be able to detect when a monitor
|
||||||
|
# is connected or disconnected which might break follow mode if the screen
|
||||||
|
# layout changes.
|
||||||
|
force_xinerama = false
|
||||||
|
|
||||||
|
### mouse
|
||||||
|
|
||||||
|
# Defines action of mouse event
|
||||||
|
# Possible values are:
|
||||||
|
# * none: Don't do anything.
|
||||||
|
# * do_action: If the notification has exactly one action, or one is marked as default,
|
||||||
|
# invoke it. If there are multiple and no default, open the context menu.
|
||||||
|
# * close_current: Close current notification.
|
||||||
|
# * close_all: Close all notifications.
|
||||||
|
mouse_left_click = do_action
|
||||||
|
mouse_middle_click = close_all
|
||||||
|
mouse_right_click = close_current
|
||||||
|
|
||||||
|
# Experimental features that may or may not work correctly. Do not expect them
|
||||||
|
# to have a consistent behaviour across releases.
|
||||||
|
[experimental]
|
||||||
|
# Calculate the dpi to use on a per-monitor basis.
|
||||||
|
# If this setting is enabled the Xft.dpi value will be ignored and instead
|
||||||
|
# dunst will attempt to calculate an appropriate dpi value for each monitor
|
||||||
|
# using the resolution and physical size. This might be useful in setups
|
||||||
|
# where there are multiple screens with very different dpi values.
|
||||||
|
per_monitor_dpi = false
|
||||||
|
|
||||||
|
[urgency_low]
|
||||||
|
# IMPORTANT: colors have to be defined in quotation marks.
|
||||||
|
# Otherwise the "#" and following would be interpreted as a comment.
|
||||||
|
background = "#282828"
|
||||||
|
foreground = "#ebdbd2"
|
||||||
|
timeout = 5
|
||||||
|
# Icon for notifications with low urgency, uncomment to enable
|
||||||
|
icon = /home/drk/.config/dunst/normal.png
|
||||||
|
|
||||||
|
[urgency_normal]
|
||||||
|
background = "#282828"
|
||||||
|
foreground = "#ebdbd2"
|
||||||
|
timeout = 5
|
||||||
|
# Icon for notifications with normal urgency, uncomment to enable
|
||||||
|
icon = /home/drk/.config/dunst/normal.png
|
||||||
|
|
||||||
|
[urgency_critical]
|
||||||
|
background = "#900000"
|
||||||
|
foreground = "#ebdbd2"
|
||||||
|
frame_color = "#ff0000"
|
||||||
|
timeout = 5
|
||||||
|
# Icon for notifications with critical urgency, uncomment to enable
|
||||||
|
icon = /home/drk/.config/dunst/critical.png
|
||||||
|
|
||||||
|
# Every section that isn't one of the above is interpreted as a rules to
|
||||||
|
# override settings for certain messages.
|
||||||
|
#
|
||||||
|
# Messages can be matched by
|
||||||
|
# appname (discouraged, see desktop_entry)
|
||||||
|
# body
|
||||||
|
# category
|
||||||
|
# desktop_entry
|
||||||
|
# icon
|
||||||
|
# match_transient
|
||||||
|
# msg_urgency
|
||||||
|
# stack_tag
|
||||||
|
# summary
|
||||||
|
#
|
||||||
|
# and you can override the
|
||||||
|
# background
|
||||||
|
# foreground
|
||||||
|
# format
|
||||||
|
# frame_color
|
||||||
|
# fullscreen
|
||||||
|
# new_icon
|
||||||
|
# set_stack_tag
|
||||||
|
# set_transient
|
||||||
|
# timeout
|
||||||
|
# urgency
|
||||||
|
#
|
||||||
|
# Shell-like globbing will get expanded.
|
||||||
|
#
|
||||||
|
# Instead of the appname filter, it's recommended to use the desktop_entry filter.
|
||||||
|
# GLib based applications export their desktop-entry name. In comparison to the appname,
|
||||||
|
# the desktop-entry won't get localized.
|
||||||
|
#
|
||||||
|
# SCRIPTING
|
||||||
|
# You can specify a script that gets run when the rule matches by
|
||||||
|
# setting the "script" option.
|
||||||
|
# The script will be called as follows:
|
||||||
|
# script appname summary body icon urgency
|
||||||
|
# where urgency can be "LOW", "NORMAL" or "CRITICAL".
|
||||||
|
#
|
||||||
|
# NOTE: if you don't want a notification to be displayed, set the format
|
||||||
|
# to "".
|
||||||
|
# NOTE: It might be helpful to run dunst -print in a terminal in order
|
||||||
|
# to find fitting options for rules.
|
||||||
|
|
||||||
|
# Disable the transient hint so that idle_threshold cannot be bypassed from the
|
||||||
|
# client
|
||||||
|
#[transient_disable]
|
||||||
|
# match_transient = yes
|
||||||
|
# set_transient = no
|
||||||
|
#
|
||||||
|
# Make the handling of transient notifications more strict by making them not
|
||||||
|
# be placed in history.
|
||||||
|
#[transient_history_ignore]
|
||||||
|
# match_transient = yes
|
||||||
|
# history_ignore = yes
|
||||||
|
|
||||||
|
# fullscreen values
|
||||||
|
# show: show the notifications, regardless if there is a fullscreen window opened
|
||||||
|
# delay: displays the new notification, if there is no fullscreen window active
|
||||||
|
# If the notification is already drawn, it won't get undrawn.
|
||||||
|
# pushback: same as delay, but when switching into fullscreen, the notification will get
|
||||||
|
# withdrawn from screen again and will get delayed like a new notification
|
||||||
|
#[fullscreen_delay_everything]
|
||||||
|
# fullscreen = delay
|
||||||
|
#[fullscreen_show_critical]
|
||||||
|
# msg_urgency = critical
|
||||||
|
# fullscreen = show
|
||||||
|
|
||||||
|
#[espeak]
|
||||||
|
# summary = "*"
|
||||||
|
# script = dunst_espeak.sh
|
||||||
|
|
||||||
|
#[script-test]
|
||||||
|
# summary = "*script*"
|
||||||
|
# script = dunst_test.sh
|
||||||
|
|
||||||
|
#[ignore]
|
||||||
|
# # This notification will not be displayed
|
||||||
|
# summary = "foobar"
|
||||||
|
# format = ""
|
||||||
|
|
||||||
|
#[history-ignore]
|
||||||
|
# # This notification will not be saved in history
|
||||||
|
# summary = "foobar"
|
||||||
|
# history_ignore = yes
|
||||||
|
|
||||||
|
#[skip-display]
|
||||||
|
# # This notification will not be displayed, but will be included in the history
|
||||||
|
# summary = "foobar"
|
||||||
|
# skip_display = yes
|
||||||
|
|
||||||
|
#[signed_on]
|
||||||
|
# appname = Pidgin
|
||||||
|
# summary = "*signed on*"
|
||||||
|
# urgency = low
|
||||||
|
#
|
||||||
|
#[signed_off]
|
||||||
|
# appname = Pidgin
|
||||||
|
# summary = *signed off*
|
||||||
|
# urgency = low
|
||||||
|
#
|
||||||
|
#[says]
|
||||||
|
# appname = Pidgin
|
||||||
|
# summary = *says*
|
||||||
|
# urgency = critical
|
||||||
|
#
|
||||||
|
#[twitter]
|
||||||
|
# appname = Pidgin
|
||||||
|
# summary = *twitter.com*
|
||||||
|
# urgency = normal
|
||||||
|
#
|
||||||
|
#[stack-volumes]
|
||||||
|
# appname = "some_volume_notifiers"
|
||||||
|
# set_stack_tag = "volume"
|
||||||
|
#
|
||||||
|
# vim: ft=cfg
|
BIN
config/dunst/normal.png
Normal file
After Width: | Height: | Size: 3.8 KiB |
|
@ -1,238 +0,0 @@
|
||||||
## ____ __
|
|
||||||
## / __ \_________ _/ /_____
|
|
||||||
## / / / / ___/ __ `/ //_/ _ \
|
|
||||||
## / /_/ / / / /_/ / ,< / __/ Clay Gomera (Drake)
|
|
||||||
## /_____/_/ \__,_/_/|_|\___/ My custom fish config
|
|
||||||
##
|
|
||||||
|
|
||||||
### ADDING TO THE PATH
|
|
||||||
# First line removes the path; second line sets it. Without the first line,
|
|
||||||
# your path gets massive and fish becomes very slow.
|
|
||||||
set -e fish_user_paths
|
|
||||||
set -U fish_user_paths $HOME/.bin $HOME/.local/bin $HOME/.go/bin $HOME/.cargo/bin $HOME/.local/lib/flutter/bin $HOME/.local/lib/android/emulator $HOME/.local/share/JetBrains/Toolbox/scripts /var/lib/flatpak/exports/bin/ $fish_user_paths
|
|
||||||
|
|
||||||
### EXPORT ###
|
|
||||||
set fish_greeting # Supresses fish's intro message
|
|
||||||
set TERM "xterm-256color" # Sets the terminal type
|
|
||||||
|
|
||||||
### SET BAT AS MANPAGER
|
|
||||||
set -x MANPAGER "sh -c 'sed -u -e \"s/\\x1B\[[0-9;]*m//g; s/.\\x08//g\" | bat -p -lman'"
|
|
||||||
|
|
||||||
### SET EITHER DEFAULT EMACS MODE OR VI MODE ###
|
|
||||||
function fish_user_key_bindings
|
|
||||||
# fish_default_key_bindings
|
|
||||||
fish_vi_key_bindings
|
|
||||||
end
|
|
||||||
### END OF VI MODE ###
|
|
||||||
|
|
||||||
### AUTOCOMPLETE AND HIGHLIGHT COLORS ###
|
|
||||||
set fish_color_normal brcyan
|
|
||||||
set fish_color_autosuggestion '#504945'
|
|
||||||
set fish_color_command brcyan
|
|
||||||
set fish_color_error '#fb4934'
|
|
||||||
set fish_color_param brcyan
|
|
||||||
|
|
||||||
### FUNCTIONS ###
|
|
||||||
# Functions needed for !! and !$
|
|
||||||
function __history_previous_command
|
|
||||||
switch (commandline -t)
|
|
||||||
case "!"
|
|
||||||
commandline -t $history[1]; commandline -f repaint
|
|
||||||
case "*"
|
|
||||||
commandline -i !
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
function __history_previous_command_arguments
|
|
||||||
switch (commandline -t)
|
|
||||||
case "!"
|
|
||||||
commandline -t ""
|
|
||||||
commandline -f history-token-search-backward
|
|
||||||
case "*"
|
|
||||||
commandline -i '$'
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
# The bindings for !! and !$
|
|
||||||
if [ "$fish_key_bindings" = "fish_vi_key_bindings" ];
|
|
||||||
bind -Minsert ! __history_previous_command
|
|
||||||
bind -Minsert '$' __history_previous_command_arguments
|
|
||||||
else
|
|
||||||
bind ! __history_previous_command
|
|
||||||
bind '$' __history_previous_command_arguments
|
|
||||||
end
|
|
||||||
|
|
||||||
# Function for creating a backup file
|
|
||||||
# ex: backup file.txt
|
|
||||||
# result: copies file as file.txt.bak
|
|
||||||
function backup --argument filename
|
|
||||||
cp $filename $filename.bak
|
|
||||||
end
|
|
||||||
|
|
||||||
# Function for copying files and directories, even recursively.
|
|
||||||
# ex: copy DIRNAME LOCATIONS
|
|
||||||
# result: copies the directory and all of its contents.
|
|
||||||
function copy
|
|
||||||
set count (count $argv | tr -d \n)
|
|
||||||
if test "$count" = 2; and test -d "$argv[1]"
|
|
||||||
set from (echo $argv[1] | trim-right /)
|
|
||||||
set to (echo $argv[2])
|
|
||||||
command cp -r $from $to
|
|
||||||
else
|
|
||||||
command cp $argv
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
# Function for printing a column (splits input on whitespace)
|
|
||||||
# ex: echo 1 2 3 | coln 3
|
|
||||||
# output: 3
|
|
||||||
function coln
|
|
||||||
while read -l input
|
|
||||||
echo $input | awk '{print $'$argv[1]'}'
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
# Function for printing a row
|
|
||||||
# ex: seq 3 | rown 3
|
|
||||||
# output: 3
|
|
||||||
function rown --argument index
|
|
||||||
sed -n "$index p"
|
|
||||||
end
|
|
||||||
|
|
||||||
# Function for ignoring the first 'n' lines
|
|
||||||
# ex: seq 10 | skip 5
|
|
||||||
# results: prints everything but the first 5 lines
|
|
||||||
function skip --argument n
|
|
||||||
tail +(math 1 + $n)
|
|
||||||
end
|
|
||||||
|
|
||||||
# Function for taking the first 'n' lines
|
|
||||||
# ex: seq 10 | take 5
|
|
||||||
# results: prints only the first 5 lines
|
|
||||||
function take --argument number
|
|
||||||
head -$number
|
|
||||||
end
|
|
||||||
|
|
||||||
# unlock ssh keys
|
|
||||||
function unlock
|
|
||||||
ssh-add "$HOME/.ssh/$argv[1]"
|
|
||||||
end
|
|
||||||
|
|
||||||
### END OF FUNCTIONS ###
|
|
||||||
|
|
||||||
### ALIASES ###
|
|
||||||
# navigation
|
|
||||||
alias ..='cd ..'
|
|
||||||
alias ...='cd ../..'
|
|
||||||
alias .3='cd ../../..'
|
|
||||||
alias .4='cd ../../../..'
|
|
||||||
alias .5='cd ../../../../..'
|
|
||||||
|
|
||||||
# use lunarvim or neovim for vim if present.
|
|
||||||
if test -x "$HOME/.local/bin/lvim"
|
|
||||||
alias vim "$HOME/.local/bin/lvim"
|
|
||||||
else if test -x (command -v nvim)
|
|
||||||
alias vim "nvim"
|
|
||||||
end
|
|
||||||
|
|
||||||
# bat as cat
|
|
||||||
if test -x (command -v bat)
|
|
||||||
alias cat "bat"
|
|
||||||
end
|
|
||||||
|
|
||||||
# Changing "ls" to "eza"
|
|
||||||
alias ls='eza -al --color=always --group-directories-first' # my preferred listing
|
|
||||||
alias la='eza -a --color=always --group-directories-first' # all files and dirs
|
|
||||||
alias ll='eza -l --color=always --group-directories-first' # long format
|
|
||||||
alias lt='eza -aT --color=always --group-directories-first' # tree listing
|
|
||||||
alias l.='eza -a | egrep "^\."'
|
|
||||||
|
|
||||||
# package management
|
|
||||||
alias pku="paru -Syu"
|
|
||||||
alias pki="paru -S"
|
|
||||||
alias pkr="paru -Rcns"
|
|
||||||
alias pks="paru -Ss"
|
|
||||||
alias pkc="paru -Scc && paru -Rns (pacman -Qtdq)"
|
|
||||||
|
|
||||||
# Colorize grep output (good for log files)
|
|
||||||
alias grep='grep --color=auto'
|
|
||||||
alias egrep='egrep --color=auto'
|
|
||||||
alias fgrep='fgrep --color=auto'
|
|
||||||
|
|
||||||
# file management
|
|
||||||
alias fm="yazi"
|
|
||||||
alias flm="yazi"
|
|
||||||
alias cp='cp -iv'
|
|
||||||
alias mv='mv -iv'
|
|
||||||
alias rm='rm -vI'
|
|
||||||
alias mkd='mkdir -pv'
|
|
||||||
alias mkdir='mkdir -pv'
|
|
||||||
|
|
||||||
# audio
|
|
||||||
alias mx='pulsemixer'
|
|
||||||
alias amx='alsamixer'
|
|
||||||
alias mk='cmus'
|
|
||||||
alias ms='cmus'
|
|
||||||
alias music='cmus'
|
|
||||||
|
|
||||||
# multimedia scripts
|
|
||||||
alias fli='flix-cli'
|
|
||||||
alias ani='ani-cli'
|
|
||||||
alias aniq='ani-cli -q'
|
|
||||||
|
|
||||||
# adding flags
|
|
||||||
alias df='df -h'
|
|
||||||
alias free='free -m'
|
|
||||||
|
|
||||||
# ps
|
|
||||||
alias psa="ps auxf"
|
|
||||||
alias psgrep="ps aux | grep -v grep | grep -i -e VSZ -e"
|
|
||||||
alias psmem='ps auxf | sort -nr -k 4'
|
|
||||||
alias pscpu='ps auxf | sort -nr -k 3'
|
|
||||||
|
|
||||||
# git
|
|
||||||
alias git-adu='git add -u'
|
|
||||||
alias git-adl='git add .'
|
|
||||||
alias git-brn='git branch'
|
|
||||||
alias git-chk='git checkout'
|
|
||||||
alias git-cln='git clone'
|
|
||||||
alias git-cmt='git commit -m'
|
|
||||||
alias git-fth='git fetch'
|
|
||||||
alias git-pll='git pull origin'
|
|
||||||
alias git-psh='git push origin'
|
|
||||||
alias git-sts='git status'
|
|
||||||
alias git-tag='git tag'
|
|
||||||
alias git-ntg='git tag -a'
|
|
||||||
|
|
||||||
# power management
|
|
||||||
alias po='systemctl poweroff'
|
|
||||||
alias sp='systemctl suspend'
|
|
||||||
alias rb='systemctl reboot'
|
|
||||||
|
|
||||||
# youtube-
|
|
||||||
alias yta-aac="yt-dlp --extract-audio --audio-format aac "
|
|
||||||
alias yta-best="yt-dlp --extract-audio --audio-format best "
|
|
||||||
alias yta-flac="yt-dlp --extract-audio --audio-format flac "
|
|
||||||
alias yta-m4a="yt-dlp --extract-audio --audio-format m4a "
|
|
||||||
alias yta-mp3="yt-dlp --extract-audio --audio-format mp3 "
|
|
||||||
alias yta-opus="yt-dlp --extract-audio --audio-format opus "
|
|
||||||
alias yta-vorbis="yt-dlp --extract-audio --audio-format vorbis "
|
|
||||||
alias yta-wav="yt-dlp --extract-audio --audio-format wav "
|
|
||||||
alias ytv-best="yt-dlp -f bestvideo+bestaudio "
|
|
||||||
alias yt='ytfzf -ftslT chafa'
|
|
||||||
alias youtube='ytfzf -ftslT chafa'
|
|
||||||
alias ytm='ytfzf -mtslT chafa'
|
|
||||||
alias youtube-music='ytfzf -mtslT chafa'
|
|
||||||
|
|
||||||
# network and bluetooth
|
|
||||||
alias netstats='nmcli dev'
|
|
||||||
alias wfi='nmtui-connect'
|
|
||||||
alias wfi-scan='nmcli dev wifi rescan && nmcli dev wifi list'
|
|
||||||
alias wfi-edit='nmtui-edit'
|
|
||||||
alias wfi-on='nmcli radio wifi on'
|
|
||||||
alias wfi-off='nmcli radio wifi off'
|
|
||||||
alias blt='bluetoothctl'
|
|
||||||
|
|
||||||
### SETTING THE STARSHIP PROMPT ###
|
|
||||||
starship init fish | source
|
|
||||||
zoxide init fish | source
|
|
|
@ -1,83 +0,0 @@
|
||||||
# -*- conf -*-
|
|
||||||
|
|
||||||
# For documentation on these options, see `man fnott.ini`
|
|
||||||
|
|
||||||
# =======================
|
|
||||||
# General Options
|
|
||||||
# =======================
|
|
||||||
|
|
||||||
# output=<undefined>#
|
|
||||||
# min-width=0
|
|
||||||
# max-width=0
|
|
||||||
# max-height=0
|
|
||||||
stacking-order=bottom-up
|
|
||||||
anchor=top-right
|
|
||||||
icon-theme=Papirus-Dark
|
|
||||||
selection-helper=fuzzel --dmenu0
|
|
||||||
selection-helper-uses-null-separator=true
|
|
||||||
play-sound=paplay ${filename}
|
|
||||||
sound-file=/usr/share/sounds/ocean/stereo/message-contact-in.oga
|
|
||||||
layer=top
|
|
||||||
dpi-aware=yes
|
|
||||||
|
|
||||||
# Timeout values are in seconds. 0 to disable
|
|
||||||
max-timeout=10
|
|
||||||
default-timeout=5
|
|
||||||
# idle-timeout=0
|
|
||||||
|
|
||||||
# =======================
|
|
||||||
# Fonts and Formating
|
|
||||||
# =======================
|
|
||||||
|
|
||||||
# title
|
|
||||||
title-font=Mononoki Nerd Font:size=6
|
|
||||||
title-format= # don't want this printed
|
|
||||||
|
|
||||||
# summary
|
|
||||||
summary-font=Mononoki Nerd Font:size=8
|
|
||||||
summary-format=<i>%s</i>\n
|
|
||||||
|
|
||||||
# body
|
|
||||||
body-font=Mononoki Nerd Font:size=8
|
|
||||||
body-format=%b
|
|
||||||
|
|
||||||
# =======================
|
|
||||||
# Appearance
|
|
||||||
# =======================
|
|
||||||
|
|
||||||
# sizes, paddings, margins
|
|
||||||
max-icon-size=32
|
|
||||||
edge-margin-vertical=5
|
|
||||||
edge-margin-horizontal=5
|
|
||||||
notification-margin=8
|
|
||||||
border-radius=0
|
|
||||||
border-size=3
|
|
||||||
padding-vertical=18
|
|
||||||
padding-horizontal=18
|
|
||||||
progress-bar-height=20
|
|
||||||
#icon= # dont want an icon
|
|
||||||
|
|
||||||
# colors
|
|
||||||
background=1d2021ff
|
|
||||||
border-color=cc241dff
|
|
||||||
title-color=fbf1c7ff
|
|
||||||
summary-color=ebdbb2ff
|
|
||||||
body-color=ebdbb2ff
|
|
||||||
progress-bar-color=fbf1c7ff
|
|
||||||
|
|
||||||
|
|
||||||
# =======================
|
|
||||||
# Priorities (low, normal, critical)
|
|
||||||
# =======================
|
|
||||||
|
|
||||||
# [low]
|
|
||||||
# background=2b2b2bff
|
|
||||||
# title-color=888888ff
|
|
||||||
# summary-color=888888ff
|
|
||||||
# body-color=888888ff
|
|
||||||
|
|
||||||
# [normal]
|
|
||||||
|
|
||||||
[critical]
|
|
||||||
background=1d2021ff
|
|
||||||
border-color=fb4934ff
|
|
|
@ -1,211 +0,0 @@
|
||||||
# -*- conf -*-
|
|
||||||
|
|
||||||
shell=fish
|
|
||||||
# term=foot (or xterm-256color if built with -Dterminfo=disabled)
|
|
||||||
# login-shell=no
|
|
||||||
|
|
||||||
# app-id=foot # globally set wayland app-id. Default values are "foot" and "footclient" for desktop and server mode
|
|
||||||
# title=foot
|
|
||||||
# locked-title=no
|
|
||||||
|
|
||||||
font=Mononoki Nerd Font:size=12
|
|
||||||
# font-bold=<bold variant of regular font>
|
|
||||||
# font-italic=<italic variant of regular font>
|
|
||||||
# font-bold-italic=<bold+italic variant of regular font>
|
|
||||||
# font-size-adjustment=0.5
|
|
||||||
# line-height=<font metrics>
|
|
||||||
# letter-spacing=0
|
|
||||||
# horizontal-letter-offset=0
|
|
||||||
# vertical-letter-offset=0
|
|
||||||
# underline-offset=<font metrics>
|
|
||||||
# underline-thickness=<font underline thickness>
|
|
||||||
# box-drawings-uses-font-glyphs=no
|
|
||||||
# dpi-aware=no
|
|
||||||
|
|
||||||
# initial-window-size-pixels=700x500 # Or,
|
|
||||||
initial-window-size-chars=140x35
|
|
||||||
# initial-window-mode=windowed
|
|
||||||
pad=8x8 # optionally append 'center'
|
|
||||||
# resize-by-cells=yes
|
|
||||||
# resize-delay-ms=100
|
|
||||||
|
|
||||||
# bold-text-in-bright=no
|
|
||||||
# word-delimiters=,│`|:"'()[]{}<>
|
|
||||||
# selection-target=primary
|
|
||||||
# workers=<number of logical CPUs>
|
|
||||||
# utmp-helper=/usr/lib/utempter/utempter # When utmp backend is ‘libutempter’ (Linux)
|
|
||||||
# utmp-helper=/usr/libexec/ulog-helper # When utmp backend is ‘ulog’ (FreeBSD)
|
|
||||||
|
|
||||||
[environment]
|
|
||||||
# name=value
|
|
||||||
|
|
||||||
[bell]
|
|
||||||
# urgent=no
|
|
||||||
# notify=no
|
|
||||||
# visual=no
|
|
||||||
# command=
|
|
||||||
# command-focused=no
|
|
||||||
|
|
||||||
[desktop-notifications]
|
|
||||||
# command=notify-send --wait --app-name ${app-id} --icon ${app-id} --category ${category} --urgency ${urgency} --expire-time ${expire-time} --hint STRING:image-path:${icon} --hint BOOLEAN:suppress-sound:${muted} --hint STRING:sound-name:${sound-name} --replace-id ${replace-id} ${action-argument} --print-id -- ${title} ${body}
|
|
||||||
# command-action-argument=--action ${action-name}=${action-label}
|
|
||||||
# close=""
|
|
||||||
# inhibit-when-focused=yes
|
|
||||||
|
|
||||||
|
|
||||||
[scrollback]
|
|
||||||
lines=10000
|
|
||||||
# multiplier=3.0
|
|
||||||
# indicator-position=relative
|
|
||||||
# indicator-format=""
|
|
||||||
|
|
||||||
[url]
|
|
||||||
launch=xdg-open ${url}
|
|
||||||
# label-letters=sadfjklewcmpgh
|
|
||||||
# osc8-underline=url-mode
|
|
||||||
# protocols=http, https, ftp, ftps, file, gemini, gopher
|
|
||||||
# uri-characters=abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_.,~:;/?#@!$&%*+="'()[]
|
|
||||||
|
|
||||||
[cursor]
|
|
||||||
style=underline
|
|
||||||
# color=<inverse foreground/background>
|
|
||||||
blink=yes
|
|
||||||
# blink-rate=500
|
|
||||||
# beam-thickness=1.5
|
|
||||||
# underline-thickness=<font underline thickness>
|
|
||||||
|
|
||||||
[mouse]
|
|
||||||
# hide-when-typing=no
|
|
||||||
# alternate-scroll-mode=yes
|
|
||||||
|
|
||||||
[touch]
|
|
||||||
# long-press-delay=400
|
|
||||||
|
|
||||||
[colors]
|
|
||||||
alpha=0.95
|
|
||||||
background=1d2021
|
|
||||||
foreground=fbf1c7
|
|
||||||
regular0=282828
|
|
||||||
regular1=cc241d
|
|
||||||
regular2=98971a
|
|
||||||
regular3=d79921
|
|
||||||
regular4=458588
|
|
||||||
regular5=b16286
|
|
||||||
regular6=689d6a
|
|
||||||
regular7=a89984
|
|
||||||
bright0=928374
|
|
||||||
bright1=fb4934
|
|
||||||
bright2=b8bb26
|
|
||||||
bright3=fabd2f
|
|
||||||
bright4=83a598
|
|
||||||
bright5=d3869b
|
|
||||||
bright6=8ec07c
|
|
||||||
bright7=ebdbb2
|
|
||||||
|
|
||||||
[csd]
|
|
||||||
# preferred=server
|
|
||||||
# size=26
|
|
||||||
# font=<primary font>
|
|
||||||
# color=<foreground color>
|
|
||||||
# hide-when-maximized=no
|
|
||||||
# double-click-to-maximize=yes
|
|
||||||
# border-width=0
|
|
||||||
# border-color=<csd.color>
|
|
||||||
# button-width=26
|
|
||||||
# button-color=<background color>
|
|
||||||
# button-minimize-color=<regular4>
|
|
||||||
# button-maximize-color=<regular2>
|
|
||||||
# button-close-color=<regular1>
|
|
||||||
|
|
||||||
[key-bindings]
|
|
||||||
# scrollback-up-page=Shift+Page_Up
|
|
||||||
# scrollback-up-half-page=none
|
|
||||||
# scrollback-up-line=none
|
|
||||||
# scrollback-down-page=Shift+Page_Down
|
|
||||||
# scrollback-down-half-page=none
|
|
||||||
# scrollback-down-line=none
|
|
||||||
# scrollback-home=none
|
|
||||||
# scrollback-end=none
|
|
||||||
# clipboard-copy=Control+Shift+c XF86Copy
|
|
||||||
# clipboard-paste=Control+Shift+v XF86Paste
|
|
||||||
# primary-paste=Shift+Insert
|
|
||||||
# search-start=Control+Shift+r
|
|
||||||
# font-increase=Control+plus Control+equal Control+KP_Add
|
|
||||||
# font-decrease=Control+minus Control+KP_Subtract
|
|
||||||
# font-reset=Control+0 Control+KP_0
|
|
||||||
# spawn-terminal=Control+Shift+n
|
|
||||||
# minimize=none
|
|
||||||
# maximize=none
|
|
||||||
# fullscreen=none
|
|
||||||
# pipe-visible=[sh -c "xurls | fuzzel | xargs -r firefox"] none
|
|
||||||
# pipe-scrollback=[sh -c "xurls | fuzzel | xargs -r firefox"] none
|
|
||||||
# pipe-selected=[xargs -r firefox] none
|
|
||||||
# pipe-command-output=[wl-copy] none # Copy last command's output to the clipboard
|
|
||||||
# show-urls-launch=Control+Shift+o
|
|
||||||
# show-urls-copy=none
|
|
||||||
# show-urls-persistent=none
|
|
||||||
# prompt-prev=Control+Shift+z
|
|
||||||
# prompt-next=Control+Shift+x
|
|
||||||
# unicode-input=Control+Shift+u
|
|
||||||
# noop=none
|
|
||||||
|
|
||||||
[search-bindings]
|
|
||||||
# cancel=Control+g Control+c Escape
|
|
||||||
# commit=Return
|
|
||||||
# find-prev=Control+r
|
|
||||||
# find-next=Control+s
|
|
||||||
# cursor-left=Left Control+b
|
|
||||||
# cursor-left-word=Control+Left Mod1+b
|
|
||||||
# cursor-right=Right Control+f
|
|
||||||
# cursor-right-word=Control+Right Mod1+f
|
|
||||||
# cursor-home=Home Control+a
|
|
||||||
# cursor-end=End Control+e
|
|
||||||
# delete-prev=BackSpace
|
|
||||||
# delete-prev-word=Mod1+BackSpace Control+BackSpace
|
|
||||||
# delete-next=Delete
|
|
||||||
# delete-next-word=Mod1+d Control+Delete
|
|
||||||
# extend-char=Shift+Right
|
|
||||||
# extend-to-word-boundary=Control+w Control+Shift+Right
|
|
||||||
# extend-to-next-whitespace=Control+Shift+w
|
|
||||||
# extend-line-down=Shift+Down
|
|
||||||
# extend-backward-char=Shift+Left
|
|
||||||
# extend-backward-to-word-boundary=Control+Shift+Left
|
|
||||||
# extend-backward-to-next-whitespace=none
|
|
||||||
# extend-line-up=Shift+Up
|
|
||||||
# clipboard-paste=Control+v Control+Shift+v Control+y XF86Paste
|
|
||||||
# primary-paste=Shift+Insert
|
|
||||||
# unicode-input=none
|
|
||||||
# quit=none
|
|
||||||
# scrollback-up-page=Shift+Page_Up
|
|
||||||
# scrollback-up-half-page=none
|
|
||||||
# scrollback-up-line=none
|
|
||||||
# scrollback-down-page=Shift+Page_Down
|
|
||||||
# scrollback-down-half-page=none
|
|
||||||
# scrollback-down-line=none
|
|
||||||
# scrollback-home=none
|
|
||||||
# scrollback-end=none
|
|
||||||
|
|
||||||
[url-bindings]
|
|
||||||
# cancel=Control+g Control+c Control+d Escape
|
|
||||||
# toggle-url-visible=t
|
|
||||||
|
|
||||||
[text-bindings]
|
|
||||||
# \x03=Mod4+c # Map Super+c -> Ctrl+c
|
|
||||||
|
|
||||||
[mouse-bindings]
|
|
||||||
# scrollback-up-mouse=BTN_WHEEL_BACK
|
|
||||||
# scrollback-down-mouse=BTN_WHEEL_FORWARD
|
|
||||||
# font-increase=Control+BTN_WHEEL_BACK
|
|
||||||
# font-decrease=Control+BTN_WHEEL_FORWARD
|
|
||||||
# selection-override-modifiers=Shift
|
|
||||||
# primary-paste=BTN_MIDDLE
|
|
||||||
# select-begin=BTN_LEFT
|
|
||||||
# select-begin-block=Control+BTN_LEFT
|
|
||||||
# select-extend=BTN_RIGHT
|
|
||||||
# select-extend-character-wise=Control+BTN_RIGHT
|
|
||||||
# select-word=BTN_LEFT-2
|
|
||||||
# select-word-whitespace=Control+BTN_LEFT-2
|
|
||||||
# select-quote = BTN_LEFT-3
|
|
||||||
# select-row=BTN_LEFT-4
|
|
||||||
|
|
||||||
# vim: ft=dosini
|
|
|
@ -1,80 +0,0 @@
|
||||||
font=Mononoki Nerd Font:size=12
|
|
||||||
dpi-aware=no
|
|
||||||
prompt=" "
|
|
||||||
icon-theme=Papirus-Dark
|
|
||||||
icons-enabled=yes
|
|
||||||
password-character=*
|
|
||||||
fuzzy=yes
|
|
||||||
terminal=foot
|
|
||||||
lines=20
|
|
||||||
width=70
|
|
||||||
inner-pad=12
|
|
||||||
vertical-pad=24
|
|
||||||
horizontal-pad=32
|
|
||||||
layer=top
|
|
||||||
exit-on-keyboard-focus-loss=yes
|
|
||||||
|
|
||||||
[colors]
|
|
||||||
background=1d2021ff
|
|
||||||
text=fbf1c7ff
|
|
||||||
match=8ec07cff
|
|
||||||
selection-match=1d2021ff
|
|
||||||
selection=cc241dff
|
|
||||||
selection-text=ebdbb2ff
|
|
||||||
border=cc241dff
|
|
||||||
prompt=fbf1c7ff
|
|
||||||
input=fbf1c7ff
|
|
||||||
|
|
||||||
[border]
|
|
||||||
width=3
|
|
||||||
radius=0
|
|
||||||
|
|
||||||
[dmenu]
|
|
||||||
mode=text
|
|
||||||
exit-immediately-if-empty=no
|
|
||||||
|
|
||||||
[key-bindings]
|
|
||||||
# cancel=Escape Control+g
|
|
||||||
# execute=Return KP_Enter Control+y
|
|
||||||
# execute-or-next=Tab
|
|
||||||
# cursor-left=Left Control+b
|
|
||||||
# cursor-left-word=Control+Left Mod1+b
|
|
||||||
# cursor-right=Right Control+f
|
|
||||||
# cursor-right-word=Control+Right Mod1+f
|
|
||||||
# cursor-home=Home Control+a
|
|
||||||
# cursor-end=End Control+e
|
|
||||||
# delete-prev=BackSpace
|
|
||||||
# delete-prev-word=Mod1+BackSpace Control+BackSpace
|
|
||||||
# delete-next=Delete KP_Delete Control+d
|
|
||||||
# delete-next-word=Mod1+d Control+Delete Control+KP_Delete
|
|
||||||
# delete-line=Control+k
|
|
||||||
# prev=Up Control+p
|
|
||||||
# prev-with-wrap=ISO_Left_Tab
|
|
||||||
# prev-page=Page_Up KP_Page_Up
|
|
||||||
# next=Down Control+n
|
|
||||||
# next-with-wrap=none
|
|
||||||
# next-page=Page_Down KP_Page_Down
|
|
||||||
|
|
||||||
# custom-N: *dmenu mode only*. Like execute, but with a non-zero
|
|
||||||
# exit-code; custom-1 exits with code 10, custom-2 with 11, custom-3
|
|
||||||
# with 12, and so on.
|
|
||||||
|
|
||||||
# custom-1=Mod1+1
|
|
||||||
# custom-2=Mod1+2
|
|
||||||
# custom-3=Mod1+3
|
|
||||||
# custom-4=Mod1+4
|
|
||||||
# custom-5=Mod1+5
|
|
||||||
# custom-6=Mod1+6
|
|
||||||
# custom-7=Mod1+7
|
|
||||||
# custom-8=Mod1+8
|
|
||||||
# custom-9=Mod1+9
|
|
||||||
# custom-10=Mod1+0
|
|
||||||
# custom-11=Mod1+exclam
|
|
||||||
# custom-12=Mod1+at
|
|
||||||
# custom-13=Mod1+numbersign
|
|
||||||
# custom-14=Mod1+dollar
|
|
||||||
# custom-15=Mod1+percent
|
|
||||||
# custom-16=Mod1+dead_circumflex
|
|
||||||
# custom-17=Mod1+ampersand
|
|
||||||
# custom-18=Mod1+asterix
|
|
||||||
# custom-19=Mod1+parentleft
|
|
|
@ -1,34 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
# rs_clip - A simple clipboard menu script for rofi/dmenu/wofi/fuzzel
|
|
||||||
# Author: Clay Gomera (Drake)
|
|
||||||
# Dependencies: fuzzel, cliphist, wl-clipboard (wl-copy)
|
|
||||||
|
|
||||||
########################
|
|
||||||
# Function Definitions #
|
|
||||||
########################
|
|
||||||
|
|
||||||
# Check for missing dependencies
|
|
||||||
check_dependencies() {
|
|
||||||
local missing_deps=()
|
|
||||||
for dep in fuzzel cliphist wl-copy; do
|
|
||||||
if ! command -v "$dep" &> /dev/null; then
|
|
||||||
missing_deps+=("$dep")
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
if [ ${#missing_deps[@]} -ne 0 ]; then
|
|
||||||
echo "Missing dependencies: ${missing_deps[*]}"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
####################
|
|
||||||
# Main Script Flow #
|
|
||||||
####################
|
|
||||||
|
|
||||||
# Check for dependencies
|
|
||||||
check_dependencies
|
|
||||||
|
|
||||||
# Pass clipboard data into the menu
|
|
||||||
cliphist list | $RUNNER -l 10 -p "[ Clipboard] " | cliphist decode | wl-copy
|
|
|
@ -1,143 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
# ***This script was made by Clay Gomera (Drake)***
|
|
||||||
# - Description: A simple power menu script for fuzzel
|
|
||||||
# - Dependencies: fuzzel, power-profiles-daemon, libnotify (notify-send)
|
|
||||||
|
|
||||||
#####################
|
|
||||||
# Main manu options #
|
|
||||||
#####################
|
|
||||||
option1=" Logout"
|
|
||||||
option2=" Reboot"
|
|
||||||
option3=" Power off"
|
|
||||||
option4=" Suspend"
|
|
||||||
option5=" Lock"
|
|
||||||
option6=" Change power profile"
|
|
||||||
option7=" Exit"
|
|
||||||
options="$option1\n$option2\n$option3\n$option4\n$option5\n$option6\n$option7"
|
|
||||||
|
|
||||||
##################################
|
|
||||||
# Power profiles submenu options #
|
|
||||||
##################################
|
|
||||||
pwr1=" Performance"
|
|
||||||
pwr2=" Balanced"
|
|
||||||
pwr3=" Power Saver"
|
|
||||||
pwr4=" Cancel"
|
|
||||||
pwrs="$pwr1\n$pwr2\n$pwr3\n$pwr4"
|
|
||||||
|
|
||||||
###################
|
|
||||||
# Other variables #
|
|
||||||
###################
|
|
||||||
# This variable will store the current wallpaper
|
|
||||||
currwall="$HOME/.config/sway/wallpaper/locked.*"
|
|
||||||
|
|
||||||
# This variable will store the current power profile
|
|
||||||
currentpwr=$(powerprofilesctl get)
|
|
||||||
if [ "$currentpwr" = "performance" ]; then
|
|
||||||
currentpwr="$pwr1"
|
|
||||||
elif [ "$currentpwr" = "balanced" ]; then
|
|
||||||
currentpwr="$pwr2"
|
|
||||||
elif [ "$currentpwr" = "power-saver" ]; then
|
|
||||||
currentpwr="$pwr3"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# prompts
|
|
||||||
prompt1="[ Power Options] "
|
|
||||||
prompt2="[ Power Profiles - Currently set to: $currentpwr] "
|
|
||||||
|
|
||||||
########################
|
|
||||||
# Function Definitions #
|
|
||||||
########################
|
|
||||||
# Check for missing dependencies
|
|
||||||
check_dependencies() {
|
|
||||||
local missing_deps=()
|
|
||||||
for dep in fuzzel powerprofilesctl notify-send; do
|
|
||||||
if ! command -v "$dep" &> /dev/null; then
|
|
||||||
missing_deps+=("$dep")
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
if [ ${#missing_deps[@]} -ne 0 ]; then
|
|
||||||
echo "Missing dependencies: ${missing_deps[*]}"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
## Ask yes/no for action confirmation
|
|
||||||
confirm_action() {
|
|
||||||
local prompt="$1"
|
|
||||||
echo -e " Yes\n No" | $RUNNER -i -l 2 -p "$prompt" | grep -q " Yes"
|
|
||||||
}
|
|
||||||
|
|
||||||
####################
|
|
||||||
# Main Script Flow #
|
|
||||||
####################
|
|
||||||
|
|
||||||
check_dependencies
|
|
||||||
|
|
||||||
action=$(echo -e "$options" | $RUNNER -i -l 7 -p "$prompt1") # main menu prompt
|
|
||||||
if [ -z "$action" ]; then
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
case "$action" in
|
|
||||||
"$option1")
|
|
||||||
if confirm_action "[ Are you sure you want to logout?] "; then
|
|
||||||
paplay /usr/share/sounds/ocean/stereo/desktop-logout.oga &
|
|
||||||
sleep 1
|
|
||||||
loginctl kill-session self
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
"$option2")
|
|
||||||
if confirm_action "[ Are you sure you want to reboot?] "; then
|
|
||||||
paplay /usr/share/sounds/ocean/stereo/desktop-logout.oga &
|
|
||||||
sleep 1
|
|
||||||
systemctl reboot
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
"$option3")
|
|
||||||
if confirm_action "[ Are you sure you want to power off?] "; then
|
|
||||||
paplay /usr/share/sounds/ocean/stereo/desktop-logout.oga &
|
|
||||||
sleep 1
|
|
||||||
systemctl poweroff
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
"$option4")
|
|
||||||
systemctl suspend
|
|
||||||
;;
|
|
||||||
"$option5")
|
|
||||||
loginctl lock-session
|
|
||||||
;;
|
|
||||||
"$option6")
|
|
||||||
pwraction=$(echo -e "$pwrs" | $RUNNER -l 4 -i -p "$prompt2")
|
|
||||||
case "$pwraction" in
|
|
||||||
"$pwr1")
|
|
||||||
if [ "$currentpwr" = "$pwr1" ]; then
|
|
||||||
notify-send "Power Menu" "The power profile is already set to performance"
|
|
||||||
exit 1
|
|
||||||
else
|
|
||||||
powerprofilesctl set performance && notify-send "Power Menu" "Power profile switched to performance"
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
"$pwr2")
|
|
||||||
if [ "$currentpwr" = "$pwr2" ]; then
|
|
||||||
notify-send "Power Menu" "The power profile is already set to balanced"
|
|
||||||
exit 1
|
|
||||||
else
|
|
||||||
powerprofilesctl set balanced && notify-send "Power Menu" "Power profile switched to balanced"
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
"$pwr3")
|
|
||||||
if [ "$currentpwr" = "$pwr3" ]; then
|
|
||||||
notify-send "Power Menu" "The power profile is already set to power saver"
|
|
||||||
exit 1
|
|
||||||
else
|
|
||||||
powerprofilesctl set power-saver && notify-send "Power Menu" "Power profile switched to power saver"
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
"$pwr4")
|
|
||||||
exit 0
|
|
||||||
esac;;
|
|
||||||
"$option7")
|
|
||||||
exit 0;
|
|
||||||
esac
|
|
|
@ -1,310 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
# rs_scrot - A simple screenshot menu script for rofi/dmenu/wofi/fuzzel
|
|
||||||
# Author: Clay Gomera (Drake)
|
|
||||||
# Dependencies: fuzzel, grim, slurp, jq, wf-recorder, wl-clipboard (wl-copy), libnotify (notify-send)
|
|
||||||
|
|
||||||
############################
|
|
||||||
# Configuration Parameters #
|
|
||||||
############################
|
|
||||||
|
|
||||||
# Directory to save screenshots
|
|
||||||
SHOTDIR="$XDG_PICTURES_DIR/Screenshots"
|
|
||||||
VCAPDIR="$XDG_VIDEOS_DIR/Screencasts" # $MEDIA_DIR refers to a global variable in .xinitrc/.bash_profile
|
|
||||||
[ ! -d "$SHOTDIR" ] && [ ! -d "$VCAPDIR" ] && mkdir -p "$SHOTDIR" "$VCAPDIR" || echo
|
|
||||||
|
|
||||||
# Get audio devices and descriptions
|
|
||||||
audioDevices=$(pactl list sources | grep "Name" | awk '{print $2}')
|
|
||||||
audioDescriptions=$(pactl list sources | grep "Description" | cut -d' ' -f2-)
|
|
||||||
|
|
||||||
# Create an associative array for mapping pretty names to actual names
|
|
||||||
declare -A audioMap
|
|
||||||
while IFS= read -r name && IFS= read -r desc <&3; do
|
|
||||||
audioMap["$desc"]="$name"
|
|
||||||
done < <(echo "$audioDevices") 3< <(echo "$audioDescriptions")
|
|
||||||
|
|
||||||
#####################
|
|
||||||
# Main Menu Options #
|
|
||||||
#####################
|
|
||||||
mainChoice1=" Take an screenshot"
|
|
||||||
mainChoice2=" Record the screen"
|
|
||||||
mainChoice3=" Exit"
|
|
||||||
mainChoices="$mainChoice1\n$mainChoice2\n$mainChoice3"
|
|
||||||
|
|
||||||
#############################
|
|
||||||
## Screenshot menu choices ##
|
|
||||||
#############################
|
|
||||||
shotChoice1=" Entire screen"
|
|
||||||
shotChoice2=" Entire screen with delay"
|
|
||||||
shotChoice3=" Select region"
|
|
||||||
shotChoice4=" Active window"
|
|
||||||
shotChoice5=" Exit"
|
|
||||||
shotChoices="$shotChoice1\n$shotChoice2\n$shotChoice3\n$shotChoice4\n$shotChoice5"
|
|
||||||
|
|
||||||
#############################
|
|
||||||
## Screencast menu choices ##
|
|
||||||
#############################
|
|
||||||
vidChoice1=" Record the screen"
|
|
||||||
vidChoice2=" Record region"
|
|
||||||
vidChoice3=" Record the screen with audio"
|
|
||||||
vidChoice4=" Stop recording"
|
|
||||||
vidChoice5=" Exit"
|
|
||||||
vidChoices="$vidChoice1\n$vidChoice2\n$vidChoice3\n$vidChoice4\n$vidChoice5"
|
|
||||||
|
|
||||||
###################
|
|
||||||
# Submenu Options #
|
|
||||||
###################
|
|
||||||
subShotChoice1=" Copy to clipboard"
|
|
||||||
subShotChoice2=" Save to $XDG_PICTURES_DIR"
|
|
||||||
subShotChoice3=" Exit"
|
|
||||||
subShotChoices="$subShotChoice1\n$subShotChoice2\n$subShotChoice3"
|
|
||||||
|
|
||||||
####################################
|
|
||||||
# Screenshot Delay Submenu Options #
|
|
||||||
####################################
|
|
||||||
delayChoice1=" 3 sec delay"
|
|
||||||
delayChoice2=" 5 sec delay"
|
|
||||||
delayChoice3=" 10 sec delay"
|
|
||||||
delayChoice4=" Exit"
|
|
||||||
delayChoices="$delayChoice1\n$delayChoice2\n$delayChoice3\n$delayChoice4"
|
|
||||||
|
|
||||||
########################
|
|
||||||
# Function Definitions #
|
|
||||||
########################
|
|
||||||
|
|
||||||
# Check for missing dependencies
|
|
||||||
check_dependencies() {
|
|
||||||
local missing_deps=()
|
|
||||||
for dep in fuzzel grim slurp jq wl-copy notify-send wf-recorder; do
|
|
||||||
if ! command -v "$dep" &> /dev/null; then
|
|
||||||
missing_deps+=("$dep")
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
if [ ${#missing_deps[@]} -ne 0 ]; then
|
|
||||||
echo "Missing dependencies: ${missing_deps[*]}"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
# Prompt user for screenshot action
|
|
||||||
shot_action_prompt() {
|
|
||||||
shotActionCases=$(echo -e "$subShotChoices" | $RUNNER -l 3 -i -p "[ What do you want to do with this screenshot?] ")
|
|
||||||
}
|
|
||||||
|
|
||||||
# Prompt user for screenshot delay
|
|
||||||
delay_prompt() {
|
|
||||||
delayActionsCases=$(echo -e "$delayChoices" | $RUNNER -l 4 -i -p "[ Select Delay] ")
|
|
||||||
}
|
|
||||||
|
|
||||||
# Take a full screen screenshot without delay
|
|
||||||
shot_screen() {
|
|
||||||
shot_action_prompt
|
|
||||||
case "$shotActionCases" in
|
|
||||||
"$subShotChoice1")
|
|
||||||
sleep 0.5 && grim - | wl-copy && notify-send "Screenshot Menu" "Screenshot copied to clipboard"
|
|
||||||
;;
|
|
||||||
"$subShotChoice2")
|
|
||||||
sleep 0.5 && grim "$SHOTDIR/$(date +%s).png" && notify-send "Screenshot Menu" "Screenshot saved to $SHOTDIR"
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
exit 0
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
}
|
|
||||||
|
|
||||||
# Take a full screen screenshot with delay
|
|
||||||
shot_screen_delay() {
|
|
||||||
shot_action_prompt
|
|
||||||
if [ "$shotActionCases" = "$subShotChoice1" ]; then
|
|
||||||
delay_prompt
|
|
||||||
case $delayActionsCases in
|
|
||||||
"$delayChoice1")
|
|
||||||
sleep 3 && grim - | wl-copy && notify-send "Screenshot Menu" "Screenshot saved to clipboard"
|
|
||||||
;;
|
|
||||||
"$delayChoice2")
|
|
||||||
sleep 5 && grim - | wl-copy && notify-send "Screenshot Menu" "Screenshot saved to clipboard"
|
|
||||||
;;
|
|
||||||
"$delayChoice3")
|
|
||||||
sleep 10 && grim - | wl-copy && notify-send "Screenshot Menu" "Screenshot saved to clipboard"
|
|
||||||
;;
|
|
||||||
"$delayChoice4")
|
|
||||||
exit 0
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
elif [ "$shotActionCases" = "$subShotChoice2" ]; then
|
|
||||||
delay_prompt
|
|
||||||
case $delayActionsCases in
|
|
||||||
"$delayChoice1")
|
|
||||||
sleep 3 && grim "$SHOTDIR/$(date +%s).png" && notify-send "Screenshot Menu" "Screenshot saved to $SHOTDIR"
|
|
||||||
;;
|
|
||||||
"$delayChoice2")
|
|
||||||
sleep 5 && grim "$SHOTDIR/$(date +%s).png" && notify-send "Screenshot Menu" "Screenshot saved to $SHOTDIR"
|
|
||||||
;;
|
|
||||||
"$delayChoice3")
|
|
||||||
sleep 10 && grim "$SHOTDIR/$(date +%s).png" && notify-send "Screenshot Menu" "Screenshot saved to $SHOTDIR"
|
|
||||||
;;
|
|
||||||
"$delayChoice4")
|
|
||||||
exit 0
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
else
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
# Take a screenshot of a selected area
|
|
||||||
shot_area() {
|
|
||||||
shot_action_prompt
|
|
||||||
case "$shotActionCases" in
|
|
||||||
"$subShotChoice1")
|
|
||||||
sleep 0.5 && grim -g "$(slurp)" - | wl-copy && notify-send "Screenshot Menu" "Screenshot saved to clipboard"
|
|
||||||
;;
|
|
||||||
"$subShotChoice2")
|
|
||||||
sleep 0.5 && grim -g "$(slurp)" "$SHOTDIR/$(date +%s).png" && notify-send "Screenshot Menu" "Screenshot saved to $SHOTDIR"
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
exit 0
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
}
|
|
||||||
|
|
||||||
# Take a screenshot of the active window
|
|
||||||
shot_window() {
|
|
||||||
shot_action_prompt
|
|
||||||
# Get the currently focused window information in Sway
|
|
||||||
local focused=$(swaymsg -t get_tree | jq '.. | select(.focused?) | select(.focused==true)')
|
|
||||||
local geom=$(echo "$focused" | jq -r '"\(.rect.x),\(.rect.y) \(.rect.width)x\(.rect.height)"')
|
|
||||||
|
|
||||||
case "$shotActionCases" in
|
|
||||||
"$subShotChoice1")
|
|
||||||
sleep 0.5 && grim -g "$geom" - | wl-copy && notify-send "Screenshot Menu" "Screenshot saved to clipboard"
|
|
||||||
;;
|
|
||||||
"$subShotChoice2")
|
|
||||||
sleep 0.5 && grim -g "$geom" "$SHOTDIR/$(date +%s).png" && notify-send "Screenshot Menu" "Screenshot saved to $SHOTDIR"
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
exit 0
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
}
|
|
||||||
|
|
||||||
# Record the entire screen
|
|
||||||
vid_screen() {
|
|
||||||
for ((i = 3; i >= 1; i--)); do
|
|
||||||
notify-send "Screenshot Menu" -t 1000 "Starting in $i seconds"
|
|
||||||
sleep 1
|
|
||||||
done
|
|
||||||
wf-recorder -f "$VCAPDIR/$(date +%s).mp4"
|
|
||||||
notify-send "Screenshot Menu" "Screenshot" "Recording saved to $VCAPDIR"
|
|
||||||
}
|
|
||||||
|
|
||||||
# Record a specific area of the screen
|
|
||||||
vid_area() {
|
|
||||||
wf-recorder -g "$(slurp)" -f "$VCAPDIR/$(date +%s).mp4"
|
|
||||||
notify-send "Screenshot Menu" "Screenshot" "Recording saved to $VCAPDIR"
|
|
||||||
}
|
|
||||||
|
|
||||||
# Record the entire screen with audio
|
|
||||||
vid_screen_audio() {
|
|
||||||
local chosenPrettyDevice=$(echo -e "$audioDescriptions" | $RUNNER -i -p "[ Select audio input] ")
|
|
||||||
local chosenDevice="${audioMap["$chosenPrettyDevice"]}"
|
|
||||||
if [ -n "$chosenDevice" ]; then
|
|
||||||
for ((i = 3; i >= 1; i--)); do
|
|
||||||
notify-send "Screenshot Menu" -t 1000 "Starting in $i seconds"
|
|
||||||
sleep 1
|
|
||||||
done
|
|
||||||
wf-recorder --audio="$chosenDevice" -f "$VCAPDIR/$(date +%s).mp4"
|
|
||||||
else
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
notify-send "Screenshot Menu" "Screenshot" "Recording saved to $VCAPDIR"
|
|
||||||
}
|
|
||||||
|
|
||||||
# Stop the video recording
|
|
||||||
vid_stop_recording() {
|
|
||||||
if pidof wf-recorder; then
|
|
||||||
killall -s SIGINT wf-recorder
|
|
||||||
else
|
|
||||||
notify-send "Screenshot Menu" "You are not recording right now"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
###################
|
|
||||||
# Check arguments #
|
|
||||||
###################
|
|
||||||
|
|
||||||
# Show help information
|
|
||||||
if [ "$1" == '--help' ] || [ "$1" = '-h' ]; then
|
|
||||||
echo "rs_scrot"
|
|
||||||
echo "USAGE: rs_scrot [OPTION]"
|
|
||||||
echo -e "(no option)\tshow the screenshot menu"
|
|
||||||
echo -e "-s, --stop\tstop recording"
|
|
||||||
echo -e "-h, --help\tthis screen"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# stop recording with -s or --stop arguments
|
|
||||||
if [ "$1" = '--stop' ] || [ "$1" = '-s' ]; then
|
|
||||||
vid_stop_recording
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
####################
|
|
||||||
# Main Script Flow #
|
|
||||||
####################
|
|
||||||
|
|
||||||
# Check for dependencies
|
|
||||||
check_dependencies
|
|
||||||
|
|
||||||
# Display main menu and execute selected option
|
|
||||||
mainCase=$(echo -e "$mainChoices" | $RUNNER -l 3 -i -p "[ Screenshot/Screencast Utility] ")
|
|
||||||
if [ -z "$mainCase" ]; then
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
case $mainCase in
|
|
||||||
"$mainChoice1")
|
|
||||||
shotCases=$(echo -e "$shotChoices" | $RUNNER -l 5 -i -p "[ Screenshot Menu] ") # screenshot menu prompt
|
|
||||||
case $shotCases in
|
|
||||||
"$shotChoice1")
|
|
||||||
shot_screen
|
|
||||||
;;
|
|
||||||
"$shotChoice2")
|
|
||||||
shot_screen_delay
|
|
||||||
;;
|
|
||||||
"$shotChoice3")
|
|
||||||
shot_area
|
|
||||||
;;
|
|
||||||
"$shotChoice4")
|
|
||||||
shot_window
|
|
||||||
;;
|
|
||||||
"$shotChoice5")
|
|
||||||
exit 0
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
;;
|
|
||||||
"$mainChoice2")
|
|
||||||
vidCases=$(echo -e "$vidChoices" | $RUNNER -l 5 -i -p "[ Screencast Menu] ")
|
|
||||||
case $vidCases in
|
|
||||||
"$vidChoice1")
|
|
||||||
vid_screen
|
|
||||||
;;
|
|
||||||
"$vidChoice2")
|
|
||||||
vid_area
|
|
||||||
;;
|
|
||||||
"$vidChoice3")
|
|
||||||
vid_screen_audio
|
|
||||||
;;
|
|
||||||
"$vidChoice4")
|
|
||||||
vid_stop_recording
|
|
||||||
;;
|
|
||||||
"$vidChoice5")
|
|
||||||
exit 0
|
|
||||||
esac
|
|
||||||
;;
|
|
||||||
"$mainChoice3")
|
|
||||||
exit 0
|
|
||||||
;;
|
|
||||||
esac
|
|
|
@ -1,33 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
# rs_wall - A simple screenshot menu script for rofi/dmenu/wofi/fuzzel
|
|
||||||
# Author: Clay Gomera (Drake)
|
|
||||||
# Dependencies: fuzzel, wob
|
|
||||||
|
|
||||||
############################
|
|
||||||
# Configuration Parameters #
|
|
||||||
############################
|
|
||||||
walldir="$XDG_PICTURES_DIR/Wallpapers" # wallpapers folder, change it to yours
|
|
||||||
|
|
||||||
####################
|
|
||||||
# Main Script Flow #
|
|
||||||
####################
|
|
||||||
|
|
||||||
cd "$walldir" || exit 1
|
|
||||||
wallpaper=$(/bin/ls | sort -n | $RUNNER -l 5 -i -p "[ Wallpaper Selector] ")
|
|
||||||
if [ -n "$wallpaper" ]; then
|
|
||||||
if [[ "$wallpaper" == *.jpg ]]; then
|
|
||||||
rm -f "$HOME/.config/sway/wallpaper/"*
|
|
||||||
cp "$wallpaper" "$HOME/.config/sway/wallpaper/background.jpg"
|
|
||||||
cp "$wallpaper" "$HOME/.config/sway/wallpaper/locked.jpg"
|
|
||||||
swaymsg output \* bg "$HOME/.config/sway/wallpaper/background.jpg" fill
|
|
||||||
elif [[ "$wallpaper" == *.png ]]; then
|
|
||||||
rm -f "$HOME/.config/sway/wallpaper/"*
|
|
||||||
cp "$wallpaper" "$HOME/.config/sway/wallpaper/background.png"
|
|
||||||
cp "$wallpaper" "$HOME/.config/sway/wallpaper/locked.png"
|
|
||||||
swaymsg output \* bg "$HOME/.config/sway/wallpaper/background.png" fill
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
exit 0
|
|
|
@ -1,167 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
# rs_wifi - A simple WiFi menu script for rofi/dmenu/wofi/fuzzel
|
|
||||||
# Author: Clay Gomera (Drake)
|
|
||||||
# Dependencies: {rofi || dmenu || wofi || fuzzel}, NetworkManager, libnotify (notify-send)
|
|
||||||
|
|
||||||
############################
|
|
||||||
# Configuration Parameters #
|
|
||||||
############################
|
|
||||||
|
|
||||||
# Main menu options
|
|
||||||
option1=" Turn on WiFi"
|
|
||||||
option2=" Turn off WiFi"
|
|
||||||
option3=" Disconnect WiFi"
|
|
||||||
option4=" Connect WiFi"
|
|
||||||
option5=" Setup captive portal"
|
|
||||||
option6=" Exit"
|
|
||||||
options="$option1\n$option2\n$option3\n$option4\n$option5\n$option6"
|
|
||||||
|
|
||||||
# WiFi interface information
|
|
||||||
wifi_info=$(nmcli dev | awk '/wifi/ {print $1,$3; exit}')
|
|
||||||
read -r wlan constate <<< "$wifi_info"
|
|
||||||
|
|
||||||
########################
|
|
||||||
# Function Definitions #
|
|
||||||
########################
|
|
||||||
|
|
||||||
# Check for missing dependencies
|
|
||||||
check_dependencies() {
|
|
||||||
local run_launcher_found=false
|
|
||||||
for launcher in rofi dmenu wofi fuzzel; do
|
|
||||||
if command -v "$launcher" &> /dev/null; then
|
|
||||||
run_launcher_found=true
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
if [ "$run_launcher_found" = false ]; then
|
|
||||||
echo "Missing dependency: one of rofi, dmenu, wofi or fuzzel is required."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
local missing_deps=()
|
|
||||||
for dep in nmcli notify-send; do
|
|
||||||
if ! command -v "$dep" &> /dev/null; then
|
|
||||||
missing_deps+=("$dep")
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
if [ ${#missing_deps[@]} -ne 0 ]; then
|
|
||||||
echo "Missing dependencies: ${missing_deps[*]}"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
# Turn off WiFi
|
|
||||||
turnoff() {
|
|
||||||
nmcli radio wifi off
|
|
||||||
if [ $? -eq 0 ]; then
|
|
||||||
notify-send "Wifi Menu" "WiFi has been turned off"
|
|
||||||
else
|
|
||||||
notify-send "Wifi Menu" "Failed to turn off WiFi"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
# Turn on WiFi
|
|
||||||
turnon() {
|
|
||||||
nmcli radio wifi on
|
|
||||||
if [ $? -eq 0 ]; then
|
|
||||||
notify-send "Wifi Menu" "WiFi has been turned on"
|
|
||||||
else
|
|
||||||
notify-send "Wifi Menu" "Failed to turn on WiFi"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
# Disconnect from WiFi
|
|
||||||
disconnect() {
|
|
||||||
if [ "$constate" = "disconnected" ]; then
|
|
||||||
notify-send "Wifi Menu" "WiFi is already disconnected"
|
|
||||||
elif [ "$constate" = "connected" ]; then
|
|
||||||
nmcli device disconnect "$wlan"
|
|
||||||
if [ $? -eq 0 ]; then
|
|
||||||
notify-send "Wifi Menu" "WiFi has been disconnected"
|
|
||||||
else
|
|
||||||
notify-send "Wifi Menu" "Failed to disconnect WiFi"
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
notify-send "Wifi Menu" "Unknown WiFi state"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
# Connect to a WiFi network
|
|
||||||
connect() {
|
|
||||||
notify-send "Wifi Menu" -t 5000 "Scanning networks..."
|
|
||||||
nmcli dev wifi rescan
|
|
||||||
wifinet=$(nmcli -f BSSID,SSID,BARS,SECURITY dev wifi list | sed -n '1!p' | $RUNNER -i -l 10 -p "[ Select a Wifi Network] ");
|
|
||||||
if [ -z "$wifinet" ]; then
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
bssid=$(echo "$wifinet" | awk '{print $1}')
|
|
||||||
ssid=$(echo "$wifinet" | awk '{print $2}')
|
|
||||||
}
|
|
||||||
|
|
||||||
# Prompt for WiFi password
|
|
||||||
password() {
|
|
||||||
if nmcli connection show | awk -v ssid="$ssid" '$1 == ssid {found=1} END {exit !found}'; then
|
|
||||||
pass=""
|
|
||||||
elif nmcli -f BSSID,SECURITY dev wifi list | grep -w "$bssid" | awk '{print $2}' | grep -q -- "--"; then
|
|
||||||
pass=""
|
|
||||||
else
|
|
||||||
pass=$($RUNNER -l 0 --password -p "[Enter Password ] " );
|
|
||||||
if [ -z "$pass" ]; then
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
# Execute WiFi connection
|
|
||||||
action() {
|
|
||||||
if [ -n "$pass" ]; then
|
|
||||||
nmcli dev wifi connect "$bssid" password "$pass"
|
|
||||||
else
|
|
||||||
nmcli dev wifi connect "$bssid"
|
|
||||||
fi
|
|
||||||
if [ $? -eq 0 ]; then
|
|
||||||
notify-send "Wifi Menu" "Connected to $ssid"
|
|
||||||
else
|
|
||||||
notify-send "Wifi Menu" "Failed to connect to $ssid"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
####################
|
|
||||||
# Main Script Flow #
|
|
||||||
####################
|
|
||||||
|
|
||||||
# Check for dependencies
|
|
||||||
check_dependencies
|
|
||||||
|
|
||||||
cases=$(echo -e "$options" | $RUNNER -i -l 6 -p "[ Wifi Settings] " ) # main menu prompt
|
|
||||||
if [ -z "$cases" ]; then
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
case "$cases" in
|
|
||||||
"$option1")
|
|
||||||
turnon
|
|
||||||
;;
|
|
||||||
"$option2")
|
|
||||||
turnoff
|
|
||||||
;;
|
|
||||||
"$option3")
|
|
||||||
disconnect
|
|
||||||
;;
|
|
||||||
"$option4")
|
|
||||||
if connect; then
|
|
||||||
if password; then
|
|
||||||
action
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
"$option5")
|
|
||||||
${BROWSER:-xdg-open} http://networkcheck.kde.org
|
|
||||||
;;
|
|
||||||
"$option6")
|
|
||||||
exit 0
|
|
||||||
;;
|
|
||||||
esac
|
|
|
@ -1,46 +0,0 @@
|
||||||
profile triple-x1yoga {
|
|
||||||
exec pgrep wl-mirror && pkill -n wl-mirror
|
|
||||||
output eDP-1 position 3200,0
|
|
||||||
output HDMI-A-1 mode 1920x1080@100Hz position 1280,0
|
|
||||||
output DP-2 mode 1280x1024@75Hz position 0,0
|
|
||||||
}
|
|
||||||
|
|
||||||
profile triple-t480 {
|
|
||||||
exec pgrep wl-mirror && pkill -n wl-mirror
|
|
||||||
output eDP-1 position 3200,0
|
|
||||||
output HDMI-A-2 mode 1920x1080@100Hz position 1280,0
|
|
||||||
output DP-1 mode 1280x1024@75Hz position 0,0
|
|
||||||
}
|
|
||||||
|
|
||||||
profile hdmi-x1yoga {
|
|
||||||
exec pgrep wl-mirror && pkill -n wl-mirror
|
|
||||||
output eDP-1 position 0,0
|
|
||||||
output HDMI-A-1 position 1920,0
|
|
||||||
exec wl-present mirror eDP-1 --fullscreen-output HDMI-A-1 --fullscreen
|
|
||||||
}
|
|
||||||
|
|
||||||
profile hdmi-t480 {
|
|
||||||
exec pgrep wl-mirror && pkill -n wl-mirror
|
|
||||||
output eDP-1 position 0,0
|
|
||||||
output HDMI-A-2 position 1920,0
|
|
||||||
exec wl-present mirror eDP-1 --fullscreen-output HDMI-A-2 --fullscreen
|
|
||||||
}
|
|
||||||
|
|
||||||
profile hdmi-c-x1yoga {
|
|
||||||
exec pgrep wl-mirror && pkill -n wl-mirror
|
|
||||||
output eDP-1 position 0,0
|
|
||||||
output DP-2 position 1920,0
|
|
||||||
exec wl-present mirror eDP-1 --fullscreen-output DP-2 --fullscreen
|
|
||||||
}
|
|
||||||
|
|
||||||
profile hdmi-c-t480 {
|
|
||||||
exec pgrep wl-mirror && pkill -n wl-mirror
|
|
||||||
output eDP-1 position 0,0
|
|
||||||
output DP-1 position 1920,0
|
|
||||||
exec wl-present mirror eDP-1 --fullscreen-output DP-1 --fullscreen
|
|
||||||
}
|
|
||||||
|
|
||||||
profile laptop {
|
|
||||||
exec pgrep wl-mirror && pkill -n wl-mirror
|
|
||||||
output eDP-1 position 0,0
|
|
||||||
}
|
|
|
@ -1,8 +1,8 @@
|
||||||
[Added Associations]
|
[Added Associations]
|
||||||
image/=imv.desktop
|
image/=nsxiv.desktop
|
||||||
image/jpeg=imv.desktop
|
image/jpeg=nsxiv.desktop
|
||||||
image/png=imv.desktop
|
image/png=nsxiv.desktop
|
||||||
image/gif=imv.desktop
|
image/gif=nsxiv.desktop
|
||||||
image/svg+xml=org.inkscape.Inkscape.desktop
|
image/svg+xml=org.inkscape.Inkscape.desktop
|
||||||
application/vnd.comicbook+zip=org.pwmt.zathura-cb.desktop
|
application/vnd.comicbook+zip=org.pwmt.zathura-cb.desktop
|
||||||
application/pdf=org.pwmt.zathura-pdf-poppler.desktop
|
application/pdf=org.pwmt.zathura-pdf-poppler.desktop
|
||||||
|
@ -39,14 +39,14 @@ video/x-ogm=mpv.desktop;
|
||||||
video/x-ogm+ogg=mpv.desktop;
|
video/x-ogm+ogg=mpv.desktop;
|
||||||
video/x-theora=mpv.desktop;
|
video/x-theora=mpv.desktop;
|
||||||
video/x-theora+ogg=mpv.desktop;
|
video/x-theora+ogg=mpv.desktop;
|
||||||
x-scheme-handler/http=com.brave.Browser.desktop;
|
x-scheme-handler/http=org.mozilla.firefox.desktop;
|
||||||
x-scheme-handler/https=com.brave.Browser.desktop;
|
x-scheme-handler/https=org.mozilla.firefox.desktop;
|
||||||
|
|
||||||
[Default Applications]
|
[Default Applications]
|
||||||
image/=imv.desktop
|
image/=nsxiv.desktop
|
||||||
image/jpeg=imv.desktop
|
image/jpeg=nsxiv.desktop
|
||||||
image/png=imv.desktop
|
image/png=nsxiv.desktop
|
||||||
image/gif=imv.desktop
|
image/gif=nsxiv.desktop
|
||||||
image/svg+xml=org.inkscape.Inkscape.desktop
|
image/svg+xml=org.inkscape.Inkscape.desktop
|
||||||
application/vnd.comicbook+zip=org.pwmt.zathura-cb.desktop
|
application/vnd.comicbook+zip=org.pwmt.zathura-cb.desktop
|
||||||
application/pdf=org.pwmt.zathura-pdf-poppler.desktop
|
application/pdf=org.pwmt.zathura-pdf-poppler.desktop
|
||||||
|
@ -83,6 +83,6 @@ video/x-ogm=mpv.desktop;
|
||||||
video/x-ogm+ogg=mpv.desktop;
|
video/x-ogm+ogg=mpv.desktop;
|
||||||
video/x-theora=mpv.desktop;
|
video/x-theora=mpv.desktop;
|
||||||
video/x-theora+ogg=mpv.desktop;
|
video/x-theora+ogg=mpv.desktop;
|
||||||
x-scheme-handler/http=com.brave.Browser.desktop;
|
x-scheme-handler/http=org.mozilla.firefox.desktop;
|
||||||
x-scheme-handler/https=com.brave.Browser.desktop;
|
x-scheme-handler/https=org.mozilla.firefox.desktop;
|
||||||
x-scheme-handler/jetbrains=jetbrains-toolbox.desktop
|
x-scheme-handler/jetbrains=jetbrains-toolbox.desktop
|
||||||
|
|
70
config/picom/picom.conf
Normal file
|
@ -0,0 +1,70 @@
|
||||||
|
## ____ __
|
||||||
|
## / __ \_________ _/ /_____
|
||||||
|
## / / / / ___/ __ `/ //_/ _ \
|
||||||
|
## / /_/ / / / /_/ / ,< / __/ Clay Gomera (Drake)
|
||||||
|
## /_____/_/ \__,_/_/|_|\___/ My custom picom config
|
||||||
|
|
||||||
|
## Shadows
|
||||||
|
shadow = false;
|
||||||
|
#shadow-radius = 8;
|
||||||
|
#shadow-opacity = .90
|
||||||
|
#shadow-offset-x = -10;
|
||||||
|
#shadow-offset-y = -10;
|
||||||
|
# shadow-red = 0
|
||||||
|
# shadow-green = 0
|
||||||
|
# shadow-blue = 0
|
||||||
|
# shadow-color = "#000000"
|
||||||
|
#shadow-exclude = [
|
||||||
|
# "name = 'Notification'",
|
||||||
|
# "class_g = 'Conky'",
|
||||||
|
# "class_g ?= 'Notify-osd'",
|
||||||
|
# "class_g = 'Cairo-clock'",
|
||||||
|
# "_GTK_FRAME_EXTENTS@:c"
|
||||||
|
#];
|
||||||
|
|
||||||
|
## Fading
|
||||||
|
fading = false;
|
||||||
|
#fade-in-step = 0.05;
|
||||||
|
#fade-out-step = 0.05;
|
||||||
|
#fade-delta = 8
|
||||||
|
#fade-exclude = []
|
||||||
|
no-fading-openclose = true
|
||||||
|
no-fading-destroyed-argb = true
|
||||||
|
|
||||||
|
## Transparency and opacity
|
||||||
|
inactive-opacity = 1.00;
|
||||||
|
frame-opacity = 1.0;
|
||||||
|
inactive-opacity-override = false;
|
||||||
|
focus-exclude = [ "class_g = 'Cairo-clock'" ];
|
||||||
|
# opaity-rule = []
|
||||||
|
|
||||||
|
## General Settings
|
||||||
|
backend = "glx";
|
||||||
|
vsync = true;
|
||||||
|
dbe = false;
|
||||||
|
detect-client-opacity = true;
|
||||||
|
detect-transient = true;
|
||||||
|
glx-no-stencil = true;
|
||||||
|
use-damage = true;
|
||||||
|
unredir-if-possible = true;
|
||||||
|
no-frame-pacing = true;
|
||||||
|
#unredir-if-possible-exclude = [
|
||||||
|
# "class_g = 'looking-glass-client' && !focused"
|
||||||
|
#];
|
||||||
|
glx-use-copysubbuffer-mesa = true;
|
||||||
|
|
||||||
|
wintypes:
|
||||||
|
{
|
||||||
|
normal = { fade = true; full-shadow = true; };
|
||||||
|
tooltip = { fade = true; };
|
||||||
|
menu = { fade = true; };
|
||||||
|
popup_menu = { fade = true; };
|
||||||
|
dropdown_menu = { fade = true; };
|
||||||
|
utility = { fade = true; };
|
||||||
|
dialog = { fade = true; };
|
||||||
|
notify = { fade = true; };
|
||||||
|
unknown = { fade = true; };
|
||||||
|
# notification = { shadow = true; };
|
||||||
|
# dock = { shadow = false; };
|
||||||
|
};
|
||||||
|
|
27
config/qutebrowser/bookmarks/urls
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
https://procesos.intec.edu.do/ intec-procesos
|
||||||
|
https://campusvirtual.intec.edu.do/ intec-aula-virtual
|
||||||
|
https://outlook.office.com/mail/ intec-correo
|
||||||
|
https://app.tuta.com/mail tuta
|
||||||
|
https://mail.proton.me/ protonmail
|
||||||
|
https://mail.google.com/ gmail
|
||||||
|
https://outlook.live.com/ outlook
|
||||||
|
https://floss.social/ mastodon
|
||||||
|
https://beehaw.org/ beehaw
|
||||||
|
https://pixelfed.social/ pixelfed
|
||||||
|
https://www.edx.org/ edx
|
||||||
|
https://khanacademy.org/ khanacademy
|
||||||
|
https://clientes.eps.com.do/ eps
|
||||||
|
https://www.amazon.com/ amazon
|
||||||
|
https://annas-archive.org/ annas-archive
|
||||||
|
https://cockpit.lianslair.com/ cockpit
|
||||||
|
https://cloud.lianslair.com/ nextcloud
|
||||||
|
https://vault.lianslair.com/ bitwarden
|
||||||
|
https://library.lianslair.com/ kavita
|
||||||
|
https://rss.lianslair.com/ freshrss
|
||||||
|
https://search.lianslair.com/ search
|
||||||
|
https://portainer.lianslair.com/ portainer
|
||||||
|
https://cloud.digitalocean.com/ digitalocean
|
||||||
|
https://github.com/ github
|
||||||
|
https://mega.nz/ mega
|
||||||
|
https://drive.google.com/drive/my-drive google-drive
|
||||||
|
https://web.whatsapp.com/ whatsapp
|
189
config/qutebrowser/config.py
Normal file
|
@ -0,0 +1,189 @@
|
||||||
|
## ____ __
|
||||||
|
## / __ \_________ _/ /_____
|
||||||
|
## / / / / ___/ __ `/ //_/ _ \
|
||||||
|
## / /_/ / / / /_/ / ,< / __/ Clay Gomera (Drake)
|
||||||
|
## /_____/_/ \__,_/_/|_|\___/ My custom qutebrowser config
|
||||||
|
##
|
||||||
|
|
||||||
|
# NOTE: config.py is intended for advanced users who are comfortable
|
||||||
|
# with manually migrating the config file on qutebrowser upgrades. If
|
||||||
|
# you prefer, you can also configure qutebrowser using the
|
||||||
|
# :set/:bind/:config-* commands without having to write a config.py
|
||||||
|
# file.
|
||||||
|
#
|
||||||
|
# Documentation:
|
||||||
|
# qute://help/configuring.html
|
||||||
|
# qute://help/settings.html
|
||||||
|
|
||||||
|
# Uncomment this to still load settings configured via autoconfig.yml
|
||||||
|
# config.load_autoconfig()
|
||||||
|
# Or uncomment this line to load settings from config.py
|
||||||
|
config.load_autoconfig(False)
|
||||||
|
|
||||||
|
# Aliases for commands. The keys of the given dictionary are the
|
||||||
|
# aliases, while the values are the commands they map to.
|
||||||
|
# Type: Dict
|
||||||
|
c.aliases = {'q': 'quit', 'w': 'session-save', 'wq': 'quit --save'}
|
||||||
|
|
||||||
|
# Setting dark mode
|
||||||
|
# config.set("colors.webpage.darkmode.enabled", True) # this will force dark mode for everything
|
||||||
|
config.set("colors.webpage.preferred_color_scheme", "dark") # this will request dark mode if it's supported
|
||||||
|
|
||||||
|
# Which cookies to accept. With QtWebEngine, this setting also controls
|
||||||
|
# other features with tracking capabilities similar to those of cookies;
|
||||||
|
# including IndexedDB, DOM storage, filesystem API, service workers, and
|
||||||
|
# AppCache. Note that with QtWebKit, only `all` and `never` are
|
||||||
|
# supported as per-domain values. Setting `no-3rdparty` or `no-
|
||||||
|
# unknown-3rdparty` per-domain on QtWebKit will have the same effect as
|
||||||
|
# `all`.
|
||||||
|
# Type: String
|
||||||
|
# Valid values:
|
||||||
|
# - all: Accept all cookies.
|
||||||
|
# - no-3rdparty: Accept cookies from the same origin only. This is known to break some sites, such as GMail.
|
||||||
|
# - no-unknown-3rdparty: Accept cookies from the same origin only, unless a cookie is already set for the domain. On QtWebEngine, this is the same as no-3rdparty.
|
||||||
|
# - never: Don't accept cookies at all.
|
||||||
|
config.set('content.cookies.accept', 'all', 'chrome-devtools://*')
|
||||||
|
|
||||||
|
# Which cookies to accept. With QtWebEngine, this setting also controls
|
||||||
|
# other features with tracking capabilities similar to those of cookies;
|
||||||
|
# including IndexedDB, DOM storage, filesystem API, service workers, and
|
||||||
|
# AppCache. Note that with QtWebKit, only `all` and `never` are
|
||||||
|
# supported as per-domain values. Setting `no-3rdparty` or `no-
|
||||||
|
# unknown-3rdparty` per-domain on QtWebKit will have the same effect as
|
||||||
|
# `all`.
|
||||||
|
# Type: String
|
||||||
|
# Valid values:
|
||||||
|
# - all: Accept all cookies.
|
||||||
|
# - no-3rdparty: Accept cookies from the same origin only. This is known to break some sites, such as GMail.
|
||||||
|
# - no-unknown-3rdparty: Accept cookies from the same origin only, unless a cookie is already set for the domain. On QtWebEngine, this is the same as no-3rdparty.
|
||||||
|
# - never: Don't accept cookies at all.
|
||||||
|
config.set('content.cookies.accept', 'all', 'devtools://*')
|
||||||
|
|
||||||
|
# User agent to send. The following placeholders are defined: *
|
||||||
|
# `{os_info}`: Something like "X11; Linux x86_64". * `{webkit_version}`:
|
||||||
|
# The underlying WebKit version (set to a fixed value with
|
||||||
|
# QtWebEngine). * `{qt_key}`: "Qt" for QtWebKit, "QtWebEngine" for
|
||||||
|
# QtWebEngine. * `{qt_version}`: The underlying Qt version. *
|
||||||
|
# `{upstream_browser_key}`: "Version" for QtWebKit, "Chrome" for
|
||||||
|
# QtWebEngine. * `{upstream_browser_version}`: The corresponding
|
||||||
|
# Safari/Chrome version. * `{qutebrowser_version}`: The currently
|
||||||
|
# running qutebrowser version. The default value is equal to the
|
||||||
|
# unchanged user agent of QtWebKit/QtWebEngine. Note that the value
|
||||||
|
# read from JavaScript is always the global value. With QtWebEngine
|
||||||
|
# between 5.12 and 5.14 (inclusive), changing the value exposed to
|
||||||
|
# JavaScript requires a restart.
|
||||||
|
# Type: FormatString
|
||||||
|
#config.set('content.headers.user_agent', 'Mozilla/5.0 ({os_info}) AppleWebKit/{webkit_version} (KHTML, like Gecko) {upstream_browser_key}/{upstream_browser_version} Safari/{webkit_version}', 'https://web.whatsapp.com/')
|
||||||
|
#config.set('content.headers.user_agent', 'Mozilla/5.0 ({os_info}; rv:71.0) Gecko/20100101 Firefox/71.0', 'https://accounts.google.com/*')
|
||||||
|
#config.set('content.headers.user_agent', 'Mozilla/5.0 ({os_info}) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99 Safari/537.36', 'https://*.slack.com/*')
|
||||||
|
#config.set('content.headers.user_agent', 'Mozilla/5.0 ({os_info}; rv:71.0) Gecko/20100101 Firefox/71.0', 'https://docs.google.com/*')
|
||||||
|
#config.set('content.headers.user_agent', 'Mozilla/5.0 ({os_info}; rv:71.0) Gecko/20100101 Firefox/71.0', 'https://drive.google.com/*')
|
||||||
|
|
||||||
|
# Load images automatically in web pages.
|
||||||
|
# Type: Bool
|
||||||
|
config.set('content.images', True, 'chrome-devtools://*')
|
||||||
|
|
||||||
|
# Load images automatically in web pages.
|
||||||
|
# Type: Bool
|
||||||
|
config.set('content.images', True, 'devtools://*')
|
||||||
|
|
||||||
|
# Enable JavaScript.
|
||||||
|
# Type: Bool
|
||||||
|
config.set('content.javascript.enabled', True, 'chrome-devtools://*')
|
||||||
|
|
||||||
|
# Enable JavaScript.
|
||||||
|
# Type: Bool
|
||||||
|
config.set('content.javascript.enabled', True, 'devtools://*')
|
||||||
|
|
||||||
|
# Enable JavaScript.
|
||||||
|
# Type: Bool
|
||||||
|
config.set('content.javascript.enabled', True, 'chrome://*/*')
|
||||||
|
|
||||||
|
# Enable JavaScript.
|
||||||
|
# Type: Bool
|
||||||
|
config.set('content.javascript.enabled', True, 'qute://*/*')
|
||||||
|
|
||||||
|
# Directory to save downloads to. If unset, a sensible OS-specific
|
||||||
|
# default is used.
|
||||||
|
# Type: Directory
|
||||||
|
c.downloads.location.directory = '~/Downloads'
|
||||||
|
|
||||||
|
# When to show the tab bar.
|
||||||
|
# Type: String
|
||||||
|
# Valid values:
|
||||||
|
# - always: Always show the tab bar.
|
||||||
|
# - never: Always hide the tab bar.
|
||||||
|
# - multiple: Hide the tab bar if only one tab is open.
|
||||||
|
# - switching: Show the tab bar when switching tabs.
|
||||||
|
c.tabs.show = 'always'
|
||||||
|
|
||||||
|
# Setting default page for when opening new tabs or new windows with
|
||||||
|
# commands like :open -t and :open -w .
|
||||||
|
c.url.default_page = 'https://search.lianslair.com'
|
||||||
|
c.url.start_pages = 'https://search.lianslair.com'
|
||||||
|
|
||||||
|
# Search engines which can be used via the address bar. Maps a search
|
||||||
|
# engine name (such as `DEFAULT`, or `ddg`) to a URL with a `{}`
|
||||||
|
# placeholder. The placeholder will be replaced by the search term, use
|
||||||
|
# `{{` and `}}` for literal `{`/`}` braces. The following further
|
||||||
|
# placeholds are defined to configure how special characters in the
|
||||||
|
# search terms are replaced by safe characters (called 'quoting'): *
|
||||||
|
# `{}` and `{semiquoted}` quote everything except slashes; this is the
|
||||||
|
# most sensible choice for almost all search engines (for the search
|
||||||
|
# term `slash/and&` this placeholder expands to `slash/and%26amp`).
|
||||||
|
# * `{quoted}` quotes all characters (for `slash/and&` this
|
||||||
|
# placeholder expands to `slash%2Fand%26amp`). * `{unquoted}` quotes
|
||||||
|
# nothing (for `slash/and&` this placeholder expands to
|
||||||
|
# `slash/and&`). The search engine named `DEFAULT` is used when
|
||||||
|
# `url.auto_search` is turned on and something else than a URL was
|
||||||
|
# entered to be opened. Other search engines can be used by prepending
|
||||||
|
# the search engine name to the search term, e.g. `:open google
|
||||||
|
# qutebrowser`.
|
||||||
|
# Type: Dict
|
||||||
|
c.url.searchengines = {'DEFAULT': 'https://search.lianslair.com/search?q={}', 'aw': 'https://wiki.archlinux.org/?search={}', 'ub': 'https://www.urbandictionary.com/define.php?term={}', 'wiki': 'https://en.wikipedia.org/wiki/{}'}
|
||||||
|
|
||||||
|
# Default font families to use. Whenever "default_family" is used in a
|
||||||
|
# font setting, it's replaced with the fonts listed here. If set to an
|
||||||
|
# empty value, a system-specific monospace default is used.
|
||||||
|
# Type: List of Font, or Font
|
||||||
|
c.fonts.default_family = '"Inter"'
|
||||||
|
|
||||||
|
# Default font size to use. Whenever "default_size" is used in a font
|
||||||
|
# setting, it's replaced with the size listed here. Valid values are
|
||||||
|
# either a float value with a "pt" suffix, or an integer value with a
|
||||||
|
# "px" suffix.
|
||||||
|
# Type: String
|
||||||
|
c.fonts.default_size = '10pt'
|
||||||
|
|
||||||
|
# Font used in the completion widget.
|
||||||
|
# Type: Font
|
||||||
|
c.fonts.completion.entry = '10pt "mononoki Nerd Font"'
|
||||||
|
|
||||||
|
# Font used for the debugging console.
|
||||||
|
# Type: Font
|
||||||
|
c.fonts.debug_console = '10pt "mononoki Nerd Font"'
|
||||||
|
|
||||||
|
# Font used for prompts.
|
||||||
|
# Type: Font
|
||||||
|
c.fonts.prompts = 'default_size sans-serif'
|
||||||
|
|
||||||
|
# Font used in the statusbar.
|
||||||
|
# Type: Font
|
||||||
|
c.fonts.statusbar = '10pt "Inter"'
|
||||||
|
|
||||||
|
config.source('gruvbox.py')
|
||||||
|
|
||||||
|
# Bindings for normal mode
|
||||||
|
config.bind('M', 'hint links spawn mpv {hint-url}')
|
||||||
|
config.bind('Z', 'hint links spawn st -e youtube-dl {hint-url}')
|
||||||
|
config.bind('t', 'set-cmd-text -s :open -t')
|
||||||
|
config.bind('xb', 'config-cycle statusbar.show always never')
|
||||||
|
config.bind('xt', 'config-cycle tabs.show always never')
|
||||||
|
config.bind('xx', 'config-cycle statusbar.show always never;; config-cycle tabs.show always never')
|
||||||
|
|
||||||
|
# configs
|
||||||
|
config.set('content.notifications.enabled', False)
|
||||||
|
config.set('content.blocking.method', 'both')
|
||||||
|
config.set('content.blocking.enabled', True)
|
||||||
|
config.set('content.autoplay', False)
|
||||||
|
config.set('content.register_protocol_handler', False)
|
333
config/qutebrowser/gruvbox.py
Normal file
|
@ -0,0 +1,333 @@
|
||||||
|
# gruvbox dark hard qutebrowser theme by Florian Bruhin <me@the-compiler.org>
|
||||||
|
#
|
||||||
|
# Originally based on:
|
||||||
|
# base16-qutebrowser (https://github.com/theova/base16-qutebrowser)
|
||||||
|
# Base16 qutebrowser template by theova and Daniel Mulford
|
||||||
|
# Gruvbox dark, hard scheme by Dawid Kurek (dawikur@gmail.com), morhetz (https://github.com/morhetz/gruvbox)
|
||||||
|
|
||||||
|
bg0_hard = "#1d2021"
|
||||||
|
bg0_soft = '#32302f'
|
||||||
|
bg0_normal = '#282828'
|
||||||
|
|
||||||
|
bg0 = bg0_normal
|
||||||
|
bg1 = "#3c3836"
|
||||||
|
bg2 = "#504945"
|
||||||
|
bg3 = "#665c54"
|
||||||
|
bg4 = "#7c6f64"
|
||||||
|
|
||||||
|
fg0 = "#fbf1c7"
|
||||||
|
fg1 = "#ebdbb2"
|
||||||
|
fg2 = "#d5c4a1"
|
||||||
|
fg3 = "#bdae93"
|
||||||
|
fg4 = "#a89984"
|
||||||
|
|
||||||
|
bright_red = "#fb4934"
|
||||||
|
bright_green = "#b8bb26"
|
||||||
|
bright_yellow = "#fabd2f"
|
||||||
|
bright_blue = "#83a598"
|
||||||
|
bright_purple = "#d3869b"
|
||||||
|
bright_aqua = "#8ec07c"
|
||||||
|
bright_gray = "#928374"
|
||||||
|
bright_orange = "#fe8019"
|
||||||
|
|
||||||
|
dark_red = "#cc241d"
|
||||||
|
dark_green = "#98971a"
|
||||||
|
dark_yellow = "#d79921"
|
||||||
|
dark_blue = "#458588"
|
||||||
|
dark_purple = "#b16286"
|
||||||
|
dark_aqua = "#689d6a"
|
||||||
|
dark_gray = "#a89984"
|
||||||
|
dark_orange = "#d65d0e"
|
||||||
|
|
||||||
|
### Completion
|
||||||
|
|
||||||
|
# Text color of the completion widget. May be a single color to use for
|
||||||
|
# all columns or a list of three colors, one for each column.
|
||||||
|
c.colors.completion.fg = [fg1, bright_aqua, bright_yellow]
|
||||||
|
|
||||||
|
# Background color of the completion widget for odd rows.
|
||||||
|
c.colors.completion.odd.bg = bg0
|
||||||
|
|
||||||
|
# Background color of the completion widget for even rows.
|
||||||
|
c.colors.completion.even.bg = c.colors.completion.odd.bg
|
||||||
|
|
||||||
|
# Foreground color of completion widget category headers.
|
||||||
|
c.colors.completion.category.fg = bright_blue
|
||||||
|
|
||||||
|
# Background color of the completion widget category headers.
|
||||||
|
c.colors.completion.category.bg = bg1
|
||||||
|
|
||||||
|
# Top border color of the completion widget category headers.
|
||||||
|
c.colors.completion.category.border.top = c.colors.completion.category.bg
|
||||||
|
|
||||||
|
# Bottom border color of the completion widget category headers.
|
||||||
|
c.colors.completion.category.border.bottom = c.colors.completion.category.bg
|
||||||
|
|
||||||
|
# Foreground color of the selected completion item.
|
||||||
|
c.colors.completion.item.selected.fg = fg0
|
||||||
|
|
||||||
|
# Background color of the selected completion item.
|
||||||
|
c.colors.completion.item.selected.bg = bg4
|
||||||
|
|
||||||
|
# Top border color of the selected completion item.
|
||||||
|
c.colors.completion.item.selected.border.top = bg2
|
||||||
|
|
||||||
|
# Bottom border color of the selected completion item.
|
||||||
|
c.colors.completion.item.selected.border.bottom = c.colors.completion.item.selected.border.top
|
||||||
|
|
||||||
|
# Foreground color of the matched text in the selected completion item.
|
||||||
|
c.colors.completion.item.selected.match.fg = bright_orange
|
||||||
|
|
||||||
|
# Foreground color of the matched text in the completion.
|
||||||
|
c.colors.completion.match.fg = c.colors.completion.item.selected.match.fg
|
||||||
|
|
||||||
|
# Color of the scrollbar handle in the completion view.
|
||||||
|
c.colors.completion.scrollbar.fg = c.colors.completion.item.selected.fg
|
||||||
|
|
||||||
|
# Color of the scrollbar in the completion view.
|
||||||
|
c.colors.completion.scrollbar.bg = c.colors.completion.category.bg
|
||||||
|
|
||||||
|
### Context menu
|
||||||
|
|
||||||
|
# Background color of disabled items in the context menu.
|
||||||
|
c.colors.contextmenu.disabled.bg = bg3
|
||||||
|
|
||||||
|
# Foreground color of disabled items in the context menu.
|
||||||
|
c.colors.contextmenu.disabled.fg = fg3
|
||||||
|
|
||||||
|
# Background color of the context menu. If set to null, the Qt default is used.
|
||||||
|
c.colors.contextmenu.menu.bg = bg0
|
||||||
|
|
||||||
|
# Foreground color of the context menu. If set to null, the Qt default is used.
|
||||||
|
c.colors.contextmenu.menu.fg = fg2
|
||||||
|
|
||||||
|
# Background color of the context menu's selected item. If set to null, the Qt default is used.
|
||||||
|
c.colors.contextmenu.selected.bg = bg2
|
||||||
|
|
||||||
|
#Foreground color of the context menu's selected item. If set to null, the Qt default is used.
|
||||||
|
c.colors.contextmenu.selected.fg = c.colors.contextmenu.menu.fg
|
||||||
|
|
||||||
|
### Downloads
|
||||||
|
|
||||||
|
# Background color for the download bar.
|
||||||
|
c.colors.downloads.bar.bg = bg0
|
||||||
|
|
||||||
|
# Color gradient start for download text.
|
||||||
|
c.colors.downloads.start.fg = bg0
|
||||||
|
|
||||||
|
# Color gradient start for download backgrounds.
|
||||||
|
c.colors.downloads.start.bg = bright_blue
|
||||||
|
|
||||||
|
# Color gradient end for download text.
|
||||||
|
c.colors.downloads.stop.fg = c.colors.downloads.start.fg
|
||||||
|
|
||||||
|
# Color gradient stop for download backgrounds.
|
||||||
|
c.colors.downloads.stop.bg = bright_aqua
|
||||||
|
|
||||||
|
# Foreground color for downloads with errors.
|
||||||
|
c.colors.downloads.error.fg = bright_red
|
||||||
|
|
||||||
|
### Hints
|
||||||
|
|
||||||
|
# Font color for hints.
|
||||||
|
c.colors.hints.fg = bg0
|
||||||
|
|
||||||
|
# Background color for hints.
|
||||||
|
c.colors.hints.bg = 'rgba(250, 191, 47, 200)' # bright_yellow
|
||||||
|
|
||||||
|
# Font color for the matched part of hints.
|
||||||
|
c.colors.hints.match.fg = bg4
|
||||||
|
|
||||||
|
### Keyhint widget
|
||||||
|
|
||||||
|
# Text color for the keyhint widget.
|
||||||
|
c.colors.keyhint.fg = fg4
|
||||||
|
|
||||||
|
# Highlight color for keys to complete the current keychain.
|
||||||
|
c.colors.keyhint.suffix.fg = fg0
|
||||||
|
|
||||||
|
# Background color of the keyhint widget.
|
||||||
|
c.colors.keyhint.bg = bg0
|
||||||
|
|
||||||
|
### Messages
|
||||||
|
|
||||||
|
# Foreground color of an error message.
|
||||||
|
c.colors.messages.error.fg = bg0
|
||||||
|
|
||||||
|
# Background color of an error message.
|
||||||
|
c.colors.messages.error.bg = bright_red
|
||||||
|
|
||||||
|
# Border color of an error message.
|
||||||
|
c.colors.messages.error.border = c.colors.messages.error.bg
|
||||||
|
|
||||||
|
# Foreground color of a warning message.
|
||||||
|
c.colors.messages.warning.fg = bg0
|
||||||
|
|
||||||
|
# Background color of a warning message.
|
||||||
|
c.colors.messages.warning.bg = bright_purple
|
||||||
|
|
||||||
|
# Border color of a warning message.
|
||||||
|
c.colors.messages.warning.border = c.colors.messages.warning.bg
|
||||||
|
|
||||||
|
# Foreground color of an info message.
|
||||||
|
c.colors.messages.info.fg = fg2
|
||||||
|
|
||||||
|
# Background color of an info message.
|
||||||
|
c.colors.messages.info.bg = bg0
|
||||||
|
|
||||||
|
# Border color of an info message.
|
||||||
|
c.colors.messages.info.border = c.colors.messages.info.bg
|
||||||
|
|
||||||
|
### Prompts
|
||||||
|
|
||||||
|
# Foreground color for prompts.
|
||||||
|
c.colors.prompts.fg = fg2
|
||||||
|
|
||||||
|
# Border used around UI elements in prompts.
|
||||||
|
c.colors.prompts.border = f'1px solid {bg1}'
|
||||||
|
|
||||||
|
# Background color for prompts.
|
||||||
|
c.colors.prompts.bg = bg3
|
||||||
|
|
||||||
|
# Background color for the selected item in filename prompts.
|
||||||
|
c.colors.prompts.selected.bg = bg2
|
||||||
|
|
||||||
|
### Statusbar
|
||||||
|
|
||||||
|
# Foreground color of the statusbar.
|
||||||
|
c.colors.statusbar.normal.fg = fg2
|
||||||
|
|
||||||
|
# Background color of the statusbar.
|
||||||
|
c.colors.statusbar.normal.bg = bg0
|
||||||
|
|
||||||
|
# Foreground color of the statusbar in insert mode.
|
||||||
|
c.colors.statusbar.insert.fg = bg0
|
||||||
|
|
||||||
|
# Background color of the statusbar in insert mode.
|
||||||
|
c.colors.statusbar.insert.bg = dark_aqua
|
||||||
|
|
||||||
|
# Foreground color of the statusbar in passthrough mode.
|
||||||
|
c.colors.statusbar.passthrough.fg = bg0
|
||||||
|
|
||||||
|
# Background color of the statusbar in passthrough mode.
|
||||||
|
c.colors.statusbar.passthrough.bg = dark_blue
|
||||||
|
|
||||||
|
# Foreground color of the statusbar in private browsing mode.
|
||||||
|
c.colors.statusbar.private.fg = bright_purple
|
||||||
|
|
||||||
|
# Background color of the statusbar in private browsing mode.
|
||||||
|
c.colors.statusbar.private.bg = bg0
|
||||||
|
|
||||||
|
# Foreground color of the statusbar in command mode.
|
||||||
|
c.colors.statusbar.command.fg = fg3
|
||||||
|
|
||||||
|
# Background color of the statusbar in command mode.
|
||||||
|
c.colors.statusbar.command.bg = bg1
|
||||||
|
|
||||||
|
# Foreground color of the statusbar in private browsing + command mode.
|
||||||
|
c.colors.statusbar.command.private.fg = c.colors.statusbar.private.fg
|
||||||
|
|
||||||
|
# Background color of the statusbar in private browsing + command mode.
|
||||||
|
c.colors.statusbar.command.private.bg = c.colors.statusbar.command.bg
|
||||||
|
|
||||||
|
# Foreground color of the statusbar in caret mode.
|
||||||
|
c.colors.statusbar.caret.fg = bg0
|
||||||
|
|
||||||
|
# Background color of the statusbar in caret mode.
|
||||||
|
c.colors.statusbar.caret.bg = dark_purple
|
||||||
|
|
||||||
|
# Foreground color of the statusbar in caret mode with a selection.
|
||||||
|
c.colors.statusbar.caret.selection.fg = c.colors.statusbar.caret.fg
|
||||||
|
|
||||||
|
# Background color of the statusbar in caret mode with a selection.
|
||||||
|
c.colors.statusbar.caret.selection.bg = bright_purple
|
||||||
|
|
||||||
|
# Background color of the progress bar.
|
||||||
|
c.colors.statusbar.progress.bg = bright_blue
|
||||||
|
|
||||||
|
# Default foreground color of the URL in the statusbar.
|
||||||
|
c.colors.statusbar.url.fg = fg4
|
||||||
|
|
||||||
|
# Foreground color of the URL in the statusbar on error.
|
||||||
|
c.colors.statusbar.url.error.fg = dark_red
|
||||||
|
|
||||||
|
# Foreground color of the URL in the statusbar for hovered links.
|
||||||
|
c.colors.statusbar.url.hover.fg = bright_orange
|
||||||
|
|
||||||
|
# Foreground color of the URL in the statusbar on successful load
|
||||||
|
# (http).
|
||||||
|
c.colors.statusbar.url.success.http.fg = bright_red
|
||||||
|
|
||||||
|
# Foreground color of the URL in the statusbar on successful load
|
||||||
|
# (https).
|
||||||
|
c.colors.statusbar.url.success.https.fg = fg0
|
||||||
|
|
||||||
|
# Foreground color of the URL in the statusbar when there's a warning.
|
||||||
|
c.colors.statusbar.url.warn.fg = bright_purple
|
||||||
|
|
||||||
|
### tabs
|
||||||
|
|
||||||
|
# Background color of the tab bar.
|
||||||
|
c.colors.tabs.bar.bg = bg0
|
||||||
|
|
||||||
|
# Color gradient start for the tab indicator.
|
||||||
|
c.colors.tabs.indicator.start = bright_blue
|
||||||
|
|
||||||
|
# Color gradient end for the tab indicator.
|
||||||
|
c.colors.tabs.indicator.stop = bright_aqua
|
||||||
|
|
||||||
|
# Color for the tab indicator on errors.
|
||||||
|
c.colors.tabs.indicator.error = bright_red
|
||||||
|
|
||||||
|
# Foreground color of unselected odd tabs.
|
||||||
|
c.colors.tabs.odd.fg = fg2
|
||||||
|
|
||||||
|
# Background color of unselected odd tabs.
|
||||||
|
c.colors.tabs.odd.bg = bg2
|
||||||
|
|
||||||
|
# Foreground color of unselected even tabs.
|
||||||
|
c.colors.tabs.even.fg = c.colors.tabs.odd.fg
|
||||||
|
|
||||||
|
# Background color of unselected even tabs.
|
||||||
|
c.colors.tabs.even.bg = bg3
|
||||||
|
|
||||||
|
# Foreground color of selected odd tabs.
|
||||||
|
c.colors.tabs.selected.odd.fg = fg2
|
||||||
|
|
||||||
|
# Background color of selected odd tabs.
|
||||||
|
c.colors.tabs.selected.odd.bg = bg0
|
||||||
|
|
||||||
|
# Foreground color of selected even tabs.
|
||||||
|
c.colors.tabs.selected.even.fg = c.colors.tabs.selected.odd.fg
|
||||||
|
|
||||||
|
# Background color of selected even tabs.
|
||||||
|
c.colors.tabs.selected.even.bg = bg0
|
||||||
|
|
||||||
|
# Background color of pinned unselected even tabs.
|
||||||
|
c.colors.tabs.pinned.even.bg = bright_green
|
||||||
|
|
||||||
|
# Foreground color of pinned unselected even tabs.
|
||||||
|
c.colors.tabs.pinned.even.fg = bg2
|
||||||
|
|
||||||
|
# Background color of pinned unselected odd tabs.
|
||||||
|
c.colors.tabs.pinned.odd.bg = bright_green
|
||||||
|
|
||||||
|
# Foreground color of pinned unselected odd tabs.
|
||||||
|
c.colors.tabs.pinned.odd.fg = c.colors.tabs.pinned.even.fg
|
||||||
|
|
||||||
|
# Background color of pinned selected even tabs.
|
||||||
|
c.colors.tabs.pinned.selected.even.bg = bg0
|
||||||
|
|
||||||
|
# Foreground color of pinned selected even tabs.
|
||||||
|
c.colors.tabs.pinned.selected.even.fg = c.colors.tabs.selected.odd.fg
|
||||||
|
|
||||||
|
# Background color of pinned selected odd tabs.
|
||||||
|
c.colors.tabs.pinned.selected.odd.bg = c.colors.tabs.pinned.selected.even.bg
|
||||||
|
|
||||||
|
# Foreground color of pinned selected odd tabs.
|
||||||
|
c.colors.tabs.pinned.selected.odd.fg = c.colors.tabs.selected.odd.fg
|
||||||
|
|
||||||
|
# Background color for webpages if unset (or empty to use the theme's
|
||||||
|
# color).
|
||||||
|
#c.colors.webpage.bg = bg4
|
||||||
|
|
0
config/runit/service/.gitkeep
Normal file
3
config/runit/sv/gnome-keyring-daemon
Executable file
|
@ -0,0 +1,3 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
exec gnome-keyring-daemon --start --components=secrets
|
20
config/runit/sv/ssh-agent
Executable file
|
@ -0,0 +1,20 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
#
|
||||||
|
# Start ssh-agent from runit
|
||||||
|
#
|
||||||
|
# Author: Dave Eddy <dave@daveeddy.com>
|
||||||
|
# Date: August 29, 2018
|
||||||
|
# License: MIT
|
||||||
|
|
||||||
|
file=~/.ssh/ssh-agent-env
|
||||||
|
|
||||||
|
exec > "$file"
|
||||||
|
|
||||||
|
echo "# started $(date)"
|
||||||
|
|
||||||
|
# For some reason, this line doesn't get emitted by ssh-agent when it is run
|
||||||
|
# with -d or -D. Since we are starting the program with exec we already know
|
||||||
|
# the pid ahead of time though so we can create this line manually
|
||||||
|
echo "SSH_AGENT_PID=$$; export SSH_AGENT_PID"
|
||||||
|
|
||||||
|
exec ssh-agent -D
|
|
@ -1,33 +0,0 @@
|
||||||
## ____ __
|
|
||||||
## / __ \_________ _/ /_____
|
|
||||||
## / / / / ___/ __ `/ //_/ _ \
|
|
||||||
## / /_/ / / / /_/ / ,< / __/ Clay Gomera (Drake)
|
|
||||||
## /_____/_/ \__,_/_/|_|\___/ My custom starship prompt config
|
|
||||||
##
|
|
||||||
|
|
||||||
add_newline = false
|
|
||||||
|
|
||||||
[line_break]
|
|
||||||
disabled = true
|
|
||||||
|
|
||||||
[character]
|
|
||||||
error_symbol = "[ ](bold red) "
|
|
||||||
success_symbol = "[ ](bold green)"
|
|
||||||
|
|
||||||
[directory]
|
|
||||||
truncation_length = 5
|
|
||||||
home_symbol = " "
|
|
||||||
format = "[$path](bold italic yellow) "
|
|
||||||
|
|
||||||
[hostname]
|
|
||||||
ssh_only = false
|
|
||||||
disabled = false
|
|
||||||
style = "italic #87A752"
|
|
||||||
|
|
||||||
[package]
|
|
||||||
disabled = true
|
|
||||||
|
|
||||||
[username]
|
|
||||||
show_always = true
|
|
||||||
style_user = "bold red"
|
|
||||||
format = "[$user]($style)[ in ](white)"
|
|
|
@ -1 +0,0 @@
|
||||||
include ~/.config/sway/modules/*
|
|
|
@ -1,22 +0,0 @@
|
||||||
bar swaybar_command waybar
|
|
||||||
|
|
||||||
exec {
|
|
||||||
hash dbus-update-activation-environment 2>/dev/null && dbus-update-activation-environment DISPLAY WAYLAND_DISPLAY XDG_CURRENT_DESKTOP
|
|
||||||
/usr/lib/xdg-desktop-portal-wlr
|
|
||||||
/usr/lib/xdg-desktop-portal-gtk
|
|
||||||
/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
|
|
||||||
startidle
|
|
||||||
sway-audio-idle-inhibit
|
|
||||||
fnott
|
|
||||||
wl-paste --type text --watch cliphist store
|
|
||||||
wl-paste --type image --watch cliphist store
|
|
||||||
dex -a -s ~/.config/autostart
|
|
||||||
mkfifo /tmp/wobpipe
|
|
||||||
tail -f /tmp/wobpipe | wob -c ~/.config/wob/wob.ini
|
|
||||||
nextinit
|
|
||||||
paplay /usr/share/sounds/ocean/stereo/desktop-login.oga
|
|
||||||
}
|
|
||||||
|
|
||||||
exec_always {
|
|
||||||
pidof kanshi && kill -1 $(pidof kanshi) || kanshi
|
|
||||||
}
|
|
|
@ -1,244 +0,0 @@
|
||||||
# Logo key. Use Mod1 for Alt.
|
|
||||||
set $mod Mod4
|
|
||||||
|
|
||||||
# Home row direction keys, like vim
|
|
||||||
set $left h
|
|
||||||
set $down j
|
|
||||||
set $up k
|
|
||||||
set $right l
|
|
||||||
|
|
||||||
# Apps
|
|
||||||
set $term foot
|
|
||||||
set $chat flatpak run org.signal.Signal
|
|
||||||
set $office flatpak run org.libreoffice.LibreOffice
|
|
||||||
set $passwords flatpak run com.bitwarden.desktop
|
|
||||||
set $notes flatpak run net.cozic.joplin_desktop
|
|
||||||
set $browser $BROWSER
|
|
||||||
set $vm flatpak run org.gnome.Boxes
|
|
||||||
set $file foot -T yazi -a yazi yazi
|
|
||||||
set $editor $VISUAL
|
|
||||||
set $music foot -T cmus -a cmus cmus
|
|
||||||
set $rss foot -T newsboat -a newsboat newsboat
|
|
||||||
set $ani-cli foot -T ani-cli -a ani-cli ani-cli
|
|
||||||
set $ytfzf foot -T ytfzf -a ytfzf ytfzf -flstT chafa
|
|
||||||
set $ytfzf-music foot -T ytfzf-music -a ytfzf-music ytfzf -mlstT chafa
|
|
||||||
set $flix-cli foot -T flix-cli -a flix-cli flix-cli
|
|
||||||
set $audiomixer foot -T pulsemixer -a pulsemixer pulsemixer
|
|
||||||
set $monitor foot -T btop -a btop btop
|
|
||||||
|
|
||||||
# JetBrains IDEs
|
|
||||||
set $rider ~/.local/share/JetBrains/Toolbox/scripts/rider
|
|
||||||
set $idea ~/.local/share/JetBrains/Toolbox/scripts/idea
|
|
||||||
set $clion ~/.local/share/JetBrains/Toolbox/scripts/clion
|
|
||||||
set $goland ~/.local/share/JetBrains/Toolbox/scripts/goland
|
|
||||||
set $rustrover ~/.local/share/JetBrains/Toolbox/scripts/rustrover
|
|
||||||
set $webstorm ~/.local/share/JetBrains/Toolbox/scripts/webstorm
|
|
||||||
set $pycharm ~/.local/share/JetBrains/Toolbox/scripts/pycharm
|
|
||||||
set $datagrip ~/.local/share/JetBrains/Toolbox/scripts/datagrip
|
|
||||||
|
|
||||||
# Your preferred application launcher
|
|
||||||
# Note: pass the final command to swaymsg so that the resulting window can be opened
|
|
||||||
# on the original workspace that the command was run on.
|
|
||||||
set $menu fuzzel | xargs swaymsg exec --
|
|
||||||
set $menu-wifi ~/.config/fuzzel/scripts/rs_wifi | xargs swaymsg exec --
|
|
||||||
set $menu-power ~/.config/fuzzel/scripts/rs_power | xargs swaymsg exec --
|
|
||||||
set $menu-emoji ~/.config/fuzzel/scripts/rs_emoji | xargs swaymsg exec --
|
|
||||||
set $menu-wall ~/.config/fuzzel/scripts/rs_wall | xargs swaymsg exec --
|
|
||||||
set $menu-scrot ~/.config/fuzzel/scripts/rs_scrot | xargs swaymsg exec --
|
|
||||||
set $menu-blue ~/.config/fuzzel/scripts/rs_blue | xargs swaymsg exec --
|
|
||||||
set $menu-clip ~/.config/fuzzel/scripts/rs_clip | xargs swaymsg exec --
|
|
||||||
|
|
||||||
# Start a terminal
|
|
||||||
bindsym $mod+Return exec $term
|
|
||||||
|
|
||||||
# Kill focused window
|
|
||||||
bindsym $mod+q kill
|
|
||||||
|
|
||||||
# XF86 Keys
|
|
||||||
bindsym XF86AudioRaiseVolume exec mediacontrol volume-up 5
|
|
||||||
bindsym XF86AudioLowerVolume exec mediacontrol volume-down 5
|
|
||||||
bindsym XF86AudioMute exec mediacontrol volume-mute
|
|
||||||
bindsym XF86AudioMicMute exec mediacontrol mic-mute
|
|
||||||
bindsym XF86AudioPause exec mediacontrol media-play-pause
|
|
||||||
bindsym XF86AudioPlay exec mediacontrol media-play-pause
|
|
||||||
bindsym XF86AudioNext exec mediacontrol media-play-next
|
|
||||||
bindsym XF86AudioPrev exec mediacontrol media-play-prev
|
|
||||||
bindsym XF86AudioStop exec mediacontrol media-play-stop
|
|
||||||
bindsym XF86MonBrightnessUp exec mediacontrol brightness-up 5
|
|
||||||
bindsym XF86MonBrightnessDown exec mediacontrol brightness-down 5
|
|
||||||
bindsym XF86News exec $rss
|
|
||||||
|
|
||||||
# Drag floating windows by holding down $mod and left mouse button.
|
|
||||||
# Resize them with right mouse button + $mod.
|
|
||||||
# Despite the name, also works for non-floating windows.
|
|
||||||
# Change normal to inverse to use left mouse button for resizing and right
|
|
||||||
# mouse button for dragging.
|
|
||||||
floating_modifier $mod normal
|
|
||||||
|
|
||||||
# Reload the configuration file
|
|
||||||
bindsym $mod+Shift+Ctrl+r reload
|
|
||||||
|
|
||||||
# Exit sway (logs you out of your Wayland session)
|
|
||||||
bindsym $mod+Shift+Ctrl+q exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -B 'Yes, exit sway' 'swaymsg exit'
|
|
||||||
|
|
||||||
### Moving around:
|
|
||||||
# Move your focus around
|
|
||||||
bindsym $mod+$left focus left
|
|
||||||
bindsym $mod+$down focus down
|
|
||||||
bindsym $mod+$up focus up
|
|
||||||
bindsym $mod+$right focus right
|
|
||||||
# Or use $mod+[up|down|left|right]
|
|
||||||
bindsym $mod+Left focus left
|
|
||||||
bindsym $mod+Down focus down
|
|
||||||
bindsym $mod+Up focus up
|
|
||||||
bindsym $mod+Right focus right
|
|
||||||
|
|
||||||
# Move the focused window with the same, but add Shift
|
|
||||||
bindsym $mod+Shift+$left move left
|
|
||||||
bindsym $mod+Shift+$down move down
|
|
||||||
bindsym $mod+Shift+$up move up
|
|
||||||
bindsym $mod+Shift+$right move right
|
|
||||||
# Ditto, with arrow 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
|
|
||||||
|
|
||||||
### Workspaces:
|
|
||||||
# Switch to workspace
|
|
||||||
bindsym $mod+1 workspace number 1
|
|
||||||
bindsym $mod+2 workspace number 2
|
|
||||||
bindsym $mod+3 workspace number 3
|
|
||||||
bindsym $mod+4 workspace number 4
|
|
||||||
bindsym $mod+5 workspace number 5
|
|
||||||
bindsym $mod+6 workspace number 6
|
|
||||||
bindsym $mod+7 workspace number 7
|
|
||||||
bindsym $mod+8 workspace number 8
|
|
||||||
bindsym $mod+9 workspace number 9
|
|
||||||
bindsym $mod+0 workspace number 10
|
|
||||||
# Move focused container to workspace
|
|
||||||
bindsym $mod+Shift+1 [con_id=__focused__] move container to workspace number 1, focus
|
|
||||||
bindsym $mod+Shift+2 [con_id=__focused__] move container to workspace number 2, focus
|
|
||||||
bindsym $mod+Shift+3 [con_id=__focused__] move container to workspace number 3, focus
|
|
||||||
bindsym $mod+Shift+4 [con_id=__focused__] move container to workspace number 4, focus
|
|
||||||
bindsym $mod+Shift+5 [con_id=__focused__] move container to workspace number 5, focus
|
|
||||||
bindsym $mod+Shift+6 [con_id=__focused__] move container to workspace number 6, focus
|
|
||||||
bindsym $mod+Shift+7 [con_id=__focused__] move container to workspace number 7, focus
|
|
||||||
bindsym $mod+Shift+8 [con_id=__focused__] move container to workspace number 8, focus
|
|
||||||
bindsym $mod+Shift+9 [con_id=__focused__] move container to workspace number 9, focus
|
|
||||||
bindsym $mod+Shift+0 [con_id=__focused__] move container to workspace number 10, focus
|
|
||||||
# Note: workspaces can have any name you want, not just numbers.
|
|
||||||
# We just use 1-10 as the default.
|
|
||||||
|
|
||||||
### Layout stuff:
|
|
||||||
# You can "split" the current object of your focus with
|
|
||||||
# $mod+s or $mod+v, for horizontal and vertical splits
|
|
||||||
# respectively.
|
|
||||||
mode "split" {
|
|
||||||
bindsym v splith; mode "default"
|
|
||||||
bindsym s splitv; mode "default"
|
|
||||||
bindsym Return mode "default"
|
|
||||||
bindsym Escape mode "default"
|
|
||||||
}
|
|
||||||
bindsym $mod+w mode "split"
|
|
||||||
|
|
||||||
# Switch the current container between different layout styles
|
|
||||||
mode "layout" {
|
|
||||||
bindsym s layout stacking; mode "default"
|
|
||||||
bindsym w layout tabbed; mode "default"
|
|
||||||
bindsym t layout toggle split; mode "default"
|
|
||||||
bindsym f fullscreen; mode "default"
|
|
||||||
bindsym Return mode "default"
|
|
||||||
bindsym Escape mode "default"
|
|
||||||
}
|
|
||||||
bindsym $mod+e mode "layout"
|
|
||||||
|
|
||||||
# Toggle the current focus between tiling and floating mode
|
|
||||||
bindsym $mod+Alt+space floating toggle
|
|
||||||
|
|
||||||
# Swap focus between the tiling area and the floating area
|
|
||||||
bindsym $mod+space focus mode_toggle
|
|
||||||
|
|
||||||
# Move focus to the parent container
|
|
||||||
bindsym $mod+Shift+Return focus parent
|
|
||||||
|
|
||||||
### Scratchpad:
|
|
||||||
# Sway has a "scratchpad", which is a bag of holding for windows.
|
|
||||||
# You can send windows there and get them back later.
|
|
||||||
|
|
||||||
# Move the currently focused window to the scratchpad
|
|
||||||
bindsym $mod+Shift+s move scratchpad
|
|
||||||
|
|
||||||
# Show the next scratchpad window or hide the focused scratchpad window.
|
|
||||||
# If there are multiple scratchpad windows, this command cycles through them.
|
|
||||||
bindsym $mod+s scratchpad show
|
|
||||||
|
|
||||||
### Resizing containers:
|
|
||||||
mode "resize" {
|
|
||||||
# left will shrink the containers width
|
|
||||||
# right will grow the containers width
|
|
||||||
# up will shrink the containers height
|
|
||||||
# down will grow the containers height
|
|
||||||
bindsym $left resize shrink width 10px
|
|
||||||
bindsym $down resize grow height 10px
|
|
||||||
bindsym $up resize shrink height 10px
|
|
||||||
bindsym $right resize grow width 10px
|
|
||||||
|
|
||||||
# Ditto, with arrow keys
|
|
||||||
bindsym Left resize shrink width 10px
|
|
||||||
bindsym Down resize grow height 10px
|
|
||||||
bindsym Up resize shrink height 10px
|
|
||||||
bindsym Right resize grow width 10px
|
|
||||||
|
|
||||||
# Return to default mode
|
|
||||||
bindsym Return mode "default"
|
|
||||||
bindsym Escape mode "default"
|
|
||||||
}
|
|
||||||
bindsym $mod+r mode "resize"
|
|
||||||
|
|
||||||
### Mode for launching apps
|
|
||||||
mode "apps" {
|
|
||||||
# Start apps
|
|
||||||
bindsym f exec $file; mode "default"
|
|
||||||
bindsym e exec $editor; mode "default"
|
|
||||||
bindsym w exec $browser; mode "default"
|
|
||||||
bindsym c exec $chat; mode "default"
|
|
||||||
bindsym o exec $office; mode "default"
|
|
||||||
bindsym n exec $notes; mode "default"
|
|
||||||
bindsym m exec $music; mode "default"
|
|
||||||
bindsym r exec $rss; mode "default"
|
|
||||||
bindsym p exec $passwords; mode "default"
|
|
||||||
bindsym v exec $vm; mode "default"
|
|
||||||
bindsym Shift+b exec $monitor; mode "default"
|
|
||||||
bindsym Shift+p exec $audiomixer; mode "default"
|
|
||||||
bindsym Shift+y exec $ytfzf; mode "default"
|
|
||||||
bindsym Shift+m exec $ytfzf-music; mode "default"
|
|
||||||
bindsym Shift+a exec $ani-cli; mode "default"
|
|
||||||
bindsym Shift+f exec $flix-cli; mode "default"
|
|
||||||
bindsym Ctrl+d exec $rider; mode "default"
|
|
||||||
bindsym Ctrl+i exec $idea; mode "default"
|
|
||||||
bindsym Ctrl+g exec $goland; mode "default"
|
|
||||||
bindsym Ctrl+r exec $rustrover; mode "default"
|
|
||||||
bindsym Ctrl+c exec $clion; mode "default"
|
|
||||||
bindsym Ctrl+w exec $webstorm; mode "default"
|
|
||||||
bindsym Ctrl+p exec $pycharm; mode "default"
|
|
||||||
bindsym Ctrl+t exec $datagrip; mode "default"
|
|
||||||
bindsym Return mode "default"
|
|
||||||
bindsym Escape mode "default"
|
|
||||||
}
|
|
||||||
bindsym $mod+a mode "apps"
|
|
||||||
|
|
||||||
# Run launcher scripts
|
|
||||||
mode "launcher" {
|
|
||||||
bindsym d exec $menu; mode "default"
|
|
||||||
bindsym q exec $menu-power; mode "default"
|
|
||||||
bindsym e exec $menu-emoji; mode "default"
|
|
||||||
bindsym w exec $menu-wall; mode "default"
|
|
||||||
bindsym s exec $menu-scrot; mode "default"
|
|
||||||
bindsym b exec $menu-blue; mode "default"
|
|
||||||
bindsym c exec $menu-clip; mode "default"
|
|
||||||
bindsym i exec $menu-wifi; mode "default"
|
|
||||||
bindsym Return mode "default"
|
|
||||||
bindsym Escape mode "default"
|
|
||||||
}
|
|
||||||
bindsym $mod+p mode "launcher"
|
|
|
@ -1,25 +0,0 @@
|
||||||
# Input settings
|
|
||||||
input {
|
|
||||||
type:touchpad {
|
|
||||||
dwt disabled
|
|
||||||
tap enabled
|
|
||||||
natural_scroll enabled
|
|
||||||
middle_emulation enabled
|
|
||||||
}
|
|
||||||
|
|
||||||
type:pointer {
|
|
||||||
accel_profile adaptive
|
|
||||||
dwtp disabled
|
|
||||||
pointer_accel 0.5
|
|
||||||
}
|
|
||||||
|
|
||||||
type:keyboard {
|
|
||||||
xkb_layout us,es
|
|
||||||
xkb_options grp:shift_caps_toggle
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
# Cursor settings
|
|
||||||
seat * hide_cursor 10000
|
|
||||||
mouse_warping container
|
|
||||||
focus_follows_mouse yes
|
|
|
@ -1,25 +0,0 @@
|
||||||
# Set background for all outputs
|
|
||||||
output * {
|
|
||||||
bg ~/.config/sway/wallpaper/background.* fill
|
|
||||||
}
|
|
||||||
|
|
||||||
# # Configure internal display (eDP-1)
|
|
||||||
# output eDP-1 {
|
|
||||||
# mode 1920x1080
|
|
||||||
# position 3200,0
|
|
||||||
# transform normal
|
|
||||||
# }
|
|
||||||
|
|
||||||
# # Configure external display (HDMI-A-2)
|
|
||||||
# output HDMI-A-2 {
|
|
||||||
# mode 1920x1080@100Hz
|
|
||||||
# position 1280,0
|
|
||||||
# transform normal
|
|
||||||
# }
|
|
||||||
|
|
||||||
# # Configure external display (DP-1)
|
|
||||||
# output DP-1 {
|
|
||||||
# mode 1280x1024@75Hz
|
|
||||||
# position 0,0
|
|
||||||
# transform normal
|
|
||||||
# }
|
|
|
@ -1,110 +0,0 @@
|
||||||
# Set the variables
|
|
||||||
set {
|
|
||||||
$ii inhibit_idle focus
|
|
||||||
$game inhibit_idle focus; floating enable; border none; fullscreen enable; shadows disable
|
|
||||||
$popup floating enable; border pixel 1; sticky enable; shadows enable
|
|
||||||
$float floating enable; border pixel 1; shadows enable
|
|
||||||
$important inhibit_idle open; floating enable; border pixel 1
|
|
||||||
$max inhibit_idle visible; floating enable; sticky enable; border pixel 1
|
|
||||||
}
|
|
||||||
|
|
||||||
for_window {
|
|
||||||
#ii - inhibit_idle focus
|
|
||||||
[class="Cemu"] $ii
|
|
||||||
[instance="cemu"] $ii
|
|
||||||
[app_id="cemu"] $ii
|
|
||||||
[app_id="rpcs3"] $ii
|
|
||||||
[app_id="yuzu"] $ii
|
|
||||||
[class="yuzu"] $ii
|
|
||||||
[app_id="snes9x-gtk"] $ii
|
|
||||||
|
|
||||||
#game - inhibit_idle focus; floating enable; border none; fullscreen enable
|
|
||||||
[instance="origin.exe"] $game
|
|
||||||
[instance="gamescope"] $game
|
|
||||||
[class="dolphin-emu" title="Dolphin (.*) \| (.*) \| (.*) \| (.*)"] $game
|
|
||||||
[class="sm64ex"] $game
|
|
||||||
[class="gamescope"] $game
|
|
||||||
[class="steam_app.*"] $game
|
|
||||||
[instance="steam_app.*"] $game
|
|
||||||
[class="LLBlaze.x86_64"] $game
|
|
||||||
[app_id="clonehero"] $game
|
|
||||||
[app_id="CombatMaster.x86_64"] $game; saturation set 2
|
|
||||||
|
|
||||||
#popup - floating enable; sticky enable
|
|
||||||
[app_id="firefox" title="^Picture-in-Picture$"] $popup
|
|
||||||
[app_id="stoken-gui"] $popup
|
|
||||||
[app_id="org.twosheds.iwgtk"] $popup
|
|
||||||
[app_id="iwgtk"] $popup
|
|
||||||
[app_id="ksysguard"] $popup
|
|
||||||
[app_id="galculator"] $popup
|
|
||||||
[title="(?:Open|Save) (?:File|Folder|As)" app_id="dolphin|org.kde.ark|pcmanfm|pcmanfm-qt"] $popup
|
|
||||||
[title="^(File|Folder)\s*Already Exists\s*—\s*" app_id="dolphin|org.kde.ark|pcmanfm|pcmanfm-qt"] $popup
|
|
||||||
[title="Confirm to replace files" app_id="dolphin|org.kde.ark|pcmanfm|pcmanfm-qt"] $popup
|
|
||||||
[app_id="pavucontrol"] $popup
|
|
||||||
[app_id="qtalarm"] $popup
|
|
||||||
[app_id="deluge" title="Add Torrents*"] $popup
|
|
||||||
|
|
||||||
#float - floating enable; border pixel 1
|
|
||||||
[app_id="org.telegram.desktop"] $float; blur off; shadows disable; inhibit_idle open
|
|
||||||
[app_id="com.github.weclaw1.ImageRoll"] $float
|
|
||||||
[app_id="teams-for-linux"] $float
|
|
||||||
[app_id="viewnior"] $float
|
|
||||||
[instance="viewnior"] $float
|
|
||||||
[instance="yakyak"] $float
|
|
||||||
[class="Microsoft Teams - Preview"] $float
|
|
||||||
[class="teams-for-linux"] $float
|
|
||||||
[class="Microsoft Teams - Insiders"] $float
|
|
||||||
[app_id="Alacritty_floating"] $float
|
|
||||||
[title="^Information\s*—\s*Dolphin" app_id="dolphin"] $float
|
|
||||||
[title="^Loading archive" app_id="org.kde.ark"] $float
|
|
||||||
[instance="crx_nckgahadagoaajjgafhacjanaoiihapd"] $float
|
|
||||||
[title="Preferences" app_id="pcmanfm-qt"] $float
|
|
||||||
[title="File Properties" app_id="pcmanfm-qt"] $float
|
|
||||||
[app_id="anki"] $float
|
|
||||||
[window_role="pop-up,task_dialog,About"] $float; shadows enable
|
|
||||||
[window_type="dialog"] $float; shadows enable
|
|
||||||
[window_type="utility"] $float; shadows enable
|
|
||||||
[window_type="toolbar"] $float; shadows enable
|
|
||||||
[window_type="splash"] $float; shadows enable
|
|
||||||
[window_type="menu"] $float; shadows enable
|
|
||||||
[window_type="dropdown_menu"] $float; shadows enable
|
|
||||||
[window_type="popup_menu"] $float; shadows enable
|
|
||||||
[window_type="tooltip"] $float; shadows enable
|
|
||||||
[window_type="notification"] $float; shadows enable
|
|
||||||
|
|
||||||
#important - inhibit_idle open; floating enable; border pixel 1
|
|
||||||
[title="Move files" app_id="dolphin|org.kde.ark|pcmanfm|pcmanfm-qt"] $important
|
|
||||||
[title="^(Copying|Moving)\s*—\s*Dolphin" app_id="dolphin|org.kde.ark|pcmanfm|pcmanfm-qt"] $important
|
|
||||||
[title="^Extracting\s" app_id="(dolphin|org.kde.ark)"] $important
|
|
||||||
[title="Copy Files" app_id="dolphin|org.kde.ark|pcmanfm|pcmanfm-qt"] $important
|
|
||||||
[title="Delete Files" app_id="dolphin|org.kde.ark|pcmanfm|pcmanfm-qt"] $important
|
|
||||||
[title="Removable medium is inserted" app_id="pcmanfm|pcmanfm-qt"] $important
|
|
||||||
[title="Compressing (.*) — Ark" app_id="org.kde.ark"] $important; resize set width 18 ppt
|
|
||||||
|
|
||||||
#max - inhibit_idle visible; floating enable; sticky enable; border pixel 1
|
|
||||||
[title="MAX - Chromium" instance="chromium"] $max
|
|
||||||
[title="MAX - Chromium" app_id="chromium"] $max
|
|
||||||
[title="MAX - Chromium" app_id="chromium" urgent=recent] $max; focus; move position center
|
|
||||||
[title="https:\/\/max.niceincontact.com\/index.html - Chromium" instance="chromium"] $max
|
|
||||||
[title="https:\/\/max.niceincontact.com\/index.html - Chromium" app_id="chromium"] $max
|
|
||||||
[title="https:\/\/max.niceincontact.com\/index.html - Chromium" app_id="chromium" urgent="latest"] $max; focus; move position center
|
|
||||||
|
|
||||||
#misc
|
|
||||||
[class="steam"] floating enable; max_render_time off; blur disabled
|
|
||||||
[class="wgc.exe"] floating enable; max_render_time off; blur disabled
|
|
||||||
[app_id="org.telegram.desktop" title="Telegram"] floating disable; inhibit_idle none
|
|
||||||
[urgent=latest] focus
|
|
||||||
[floating] shadows enable
|
|
||||||
[app_id="alacritty"] saturation set 2; blur enable
|
|
||||||
[app_id="firefox" title="Firefox — Sharing Indicator"] floating enable; kill
|
|
||||||
[title="Wine System Tray"] floating enable; kill
|
|
||||||
[title="Android Emulator - *"] floating enable; border normal
|
|
||||||
[title="Emulator" window_type="utility"] move scratchpad
|
|
||||||
[app_id="brave-nngceckbapebfimnlniiiahkandclblb-Default"] floating enable
|
|
||||||
[title="Extension: (Bitwarden Password Manager) - Bitwarden — Mozilla Firefox"] floating enable
|
|
||||||
[title="Open File"] floating enable
|
|
||||||
[title="About"] floating enable
|
|
||||||
[app_id="xdg-desktop-portal-gtk"] floating enable
|
|
||||||
[app_id="qalculate-gtk"] floating enable
|
|
||||||
[app_id="com.nextcloud.desktopclient.nextcloud"] floating enable
|
|
||||||
}
|
|
|
@ -1,41 +0,0 @@
|
||||||
# Font
|
|
||||||
font pango: Mononoki Nerd Font 12
|
|
||||||
|
|
||||||
# Color scheme (Gruvbox dark)
|
|
||||||
set $color_normal_white #a89984
|
|
||||||
set $color_bright_white #ebdbb2
|
|
||||||
set $color_normal_gray #282828
|
|
||||||
set $color_bright_gray #665c54
|
|
||||||
set $color_bright_yellow #d79921
|
|
||||||
set $color_normal_black #1d2021
|
|
||||||
set $color_unused #ff0000
|
|
||||||
set $color_normal_red #cc241d
|
|
||||||
set $color_normal_teal #689d6a
|
|
||||||
set $color_normal_green #98971a
|
|
||||||
|
|
||||||
# Title bar colors
|
|
||||||
# Colors border background text indicator child_border
|
|
||||||
client.focused $color_normal_red $color_bright_gray $color_bright_white $color_normal_teal $color_normal_red
|
|
||||||
client.focused_inactive $color_bright_gray $color_bright_gray $color_bright_white $color_normal_green $color_bright_gray
|
|
||||||
client.unfocused $color_bright_gray $color_normal_gray $color_normal_white $color_normal_green $color_bright_gray
|
|
||||||
client.urgent $color_bright_yellow $color_bright_yellow $color_normal_black $color_unused $color_unused
|
|
||||||
client.placeholder $color_unused $color_unused $color_unused $color_unused $color_unused
|
|
||||||
|
|
||||||
# Window borders
|
|
||||||
default_border pixel 3
|
|
||||||
default_floating_border pixel 3
|
|
||||||
smart_borders off
|
|
||||||
gaps inner 5
|
|
||||||
#mouse_warping on
|
|
||||||
|
|
||||||
# gsettings
|
|
||||||
exec gsettings set org.gnome.desktop.interface {
|
|
||||||
gtk-theme 'Gruvbox-Dark'
|
|
||||||
icon-theme 'Papirus-Dark'
|
|
||||||
cursor-theme 'Simp1e-Gruvbox-Dark'
|
|
||||||
font-name 'Inter 10'
|
|
||||||
document-font-name 'Liberation Serif 12'
|
|
||||||
monospace-font-name 'Mononoki Nerd Font 12'
|
|
||||||
enable-animations true
|
|
||||||
color-scheme 'prefer-dark'
|
|
||||||
}
|
|
|
@ -1,119 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
# dependencies: pamixer, brightnessctl, wob, pulseaudio-utils
|
|
||||||
|
|
||||||
# Configuration
|
|
||||||
WOBPIPE="/tmp/wobpipe"
|
|
||||||
SOUND_EFFECT="/usr/share/sounds/ocean/stereo/audio-volume-change.oga"
|
|
||||||
DEFAULT_VOLUME_STEP=5
|
|
||||||
DEFAULT_BRIGHTNESS_STEP=5
|
|
||||||
|
|
||||||
# Function to display help message
|
|
||||||
show_help() {
|
|
||||||
echo "Usage: $0 [command] [options]"
|
|
||||||
echo ""
|
|
||||||
echo "Commands:"
|
|
||||||
echo " volume-up [STEP] Increase volume by STEP (default: $DEFAULT_VOLUME_STEP)"
|
|
||||||
echo " volume-down [STEP] Decrease volume by STEP (default: $DEFAULT_VOLUME_STEP)"
|
|
||||||
echo " volume-mute Toggle mute for speakers"
|
|
||||||
echo " mic-mute Toggle mute for microphone"
|
|
||||||
echo " media-play-pause Play/pause media"
|
|
||||||
echo " media-next Skip to the next track"
|
|
||||||
echo " media-prev Go back to the previous track"
|
|
||||||
echo " media-stop Stop media playback"
|
|
||||||
echo " brightness-up [STEP] Increase brightness by STEP% (default: $DEFAULT_BRIGHTNESS_STEP)"
|
|
||||||
echo " brightness-down [STEP] Decrease brightness by STEP% (default: $DEFAULT_BRIGHTNESS_STEP)"
|
|
||||||
echo ""
|
|
||||||
}
|
|
||||||
|
|
||||||
# Function to get current volume with mute status
|
|
||||||
get_volume_status() {
|
|
||||||
local volume="$(pamixer --get-volume)"
|
|
||||||
if [ "$(pamixer --get-mute)" = "true" ]; then
|
|
||||||
echo "$volume muted"
|
|
||||||
else
|
|
||||||
echo "$volume"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
# Function to update wobpipe with current volume/mute status
|
|
||||||
update_volume_wobpipe() {
|
|
||||||
update_wobpipe "$(get_volume_status)"
|
|
||||||
}
|
|
||||||
|
|
||||||
# Function to update wobpipe with a custom message
|
|
||||||
update_wobpipe() {
|
|
||||||
echo "$1" > "$WOBPIPE"
|
|
||||||
}
|
|
||||||
|
|
||||||
# Function to change volume with custom step
|
|
||||||
change_volume() {
|
|
||||||
local action="$1"
|
|
||||||
local step="${2:-$DEFAULT_VOLUME_STEP}"
|
|
||||||
if [ "$action" = "up" ]; then
|
|
||||||
pamixer -i "$step"
|
|
||||||
elif [ "$action" = "down" ]; then
|
|
||||||
pamixer -d "$step"
|
|
||||||
fi
|
|
||||||
update_volume_wobpipe
|
|
||||||
paplay "$SOUND_EFFECT"
|
|
||||||
}
|
|
||||||
|
|
||||||
# Function to toggle mute
|
|
||||||
toggle_mute() {
|
|
||||||
pamixer -t
|
|
||||||
update_volume_wobpipe
|
|
||||||
}
|
|
||||||
|
|
||||||
# Function to change brightness with custom step
|
|
||||||
change_brightness() {
|
|
||||||
local action="$1"
|
|
||||||
local step="${2:-$DEFAULT_BRIGHTNESS_STEP}"
|
|
||||||
if [ "$action" = "up" ]; then
|
|
||||||
brightnessctl s "$step%+"
|
|
||||||
elif [ "$action" = "down" ]; then
|
|
||||||
brightnessctl s "$step%-"
|
|
||||||
fi
|
|
||||||
update_wobpipe "$(brightnessctl -m | cut -d, -f4 | tr -d '%')"
|
|
||||||
}
|
|
||||||
|
|
||||||
# Parse command-line arguments
|
|
||||||
case "$1" in
|
|
||||||
volume-up)
|
|
||||||
change_volume "up" "$2"
|
|
||||||
;;
|
|
||||||
volume-down)
|
|
||||||
change_volume "down" "$2"
|
|
||||||
;;
|
|
||||||
volume-mute)
|
|
||||||
toggle_mute
|
|
||||||
;;
|
|
||||||
mic-mute)
|
|
||||||
pamixer --default-source -t
|
|
||||||
;;
|
|
||||||
media-play-pause)
|
|
||||||
playerctl play-pause
|
|
||||||
;;
|
|
||||||
media-next)
|
|
||||||
playerctl next
|
|
||||||
;;
|
|
||||||
media-prev)
|
|
||||||
playerctl previous
|
|
||||||
;;
|
|
||||||
media-stop)
|
|
||||||
playerctl stop
|
|
||||||
;;
|
|
||||||
brightness-up)
|
|
||||||
change_brightness "up" "$2"
|
|
||||||
;;
|
|
||||||
brightness-down)
|
|
||||||
change_brightness "down" "$2"
|
|
||||||
;;
|
|
||||||
-h|--help)
|
|
||||||
show_help
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
echo "Invalid command: $1"
|
|
||||||
show_help
|
|
||||||
;;
|
|
||||||
esac
|
|
|
@ -1,7 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
while [[ "$(top -bn1 | grep -m 1 -o waybar)" = "" ]]; do
|
|
||||||
sleep 1
|
|
||||||
done
|
|
||||||
|
|
||||||
sleep 1 && flatpak run com.nextcloud.desktopclient.nextcloud --background > /dev/null 2>&1
|
|
|
@ -1,12 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
lockcmd="swaylock -f -i '$HOME/.config/sway/wallpaper/locked.*'"
|
|
||||||
screenoff="swaymsg 'output * power off'"
|
|
||||||
screenon="swaymsg 'output * power on'"
|
|
||||||
|
|
||||||
swayidle -w \
|
|
||||||
lock "$lockcmd" \
|
|
||||||
timeout 300 "$lockcmd" \
|
|
||||||
timeout 600 "$screenoff" \
|
|
||||||
resume "$screenon" \
|
|
||||||
before-sleep "$lockcmd"
|
|
|
@ -1,34 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
cd "$HOME" || exit 1
|
|
||||||
|
|
||||||
# Session settings
|
|
||||||
export XDG_CURRENT_DESKTOP=sway
|
|
||||||
export XDG_SESSION_DESKTOP=sway
|
|
||||||
export XDG_SESSION_TYPE=wayland
|
|
||||||
export EGL_PLATFORM=wayland
|
|
||||||
export SDL_VIDEODRIVER=wayland
|
|
||||||
export CLUTTER_PLATFORM=wayland
|
|
||||||
export QT_QPA_PLATFORM=wayland
|
|
||||||
export QT_STYLE_OVERRIDE=kvantum
|
|
||||||
export GDK_BACKEND=wayland
|
|
||||||
export QT_WAYLAND_DISABLE_WINDOWDECORATION=1
|
|
||||||
export XKB_DEFAULT_LAYOUT=us
|
|
||||||
export MOZ_ENABLE_WAYLAND=1
|
|
||||||
export MOZ_WAYLAND_USE_VAAPI=1
|
|
||||||
export MOZ_DISABLE_RDD_SANDBOX=1
|
|
||||||
export ELECTRON_OZONE_PLATFORM_HINT=auto
|
|
||||||
export GTK_CSD=0
|
|
||||||
|
|
||||||
# GTK & cursor stuff
|
|
||||||
export XCURSOR_PATH="$XDG_DATA_HOME/icons/"
|
|
||||||
export XCURSOR_THEME="Simp1e-Gruvbox-Dark"
|
|
||||||
export GTK_THEME="Gruvbox-Dark"
|
|
||||||
export GTK_ICON_THEME="Papirus-Dark"
|
|
||||||
export GTK_CURSOR_THEME="Simp1e-Gruvbox-Dark"
|
|
||||||
|
|
||||||
# User defined enviroment variables
|
|
||||||
export RUNNER="fuzzel --dmenu"
|
|
||||||
|
|
||||||
# Start compositor
|
|
||||||
exec sway
|
|
Before Width: | Height: | Size: 1.8 MiB |
Before Width: | Height: | Size: 1.8 MiB |
29
config/vifm/colors/gruvbox.vifm
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
" gruvbox color scheme approximation for vifm
|
||||||
|
|
||||||
|
" Reset all styles first
|
||||||
|
highlight clear
|
||||||
|
|
||||||
|
highlight Border cterm=none ctermfg=235 ctermbg=default
|
||||||
|
|
||||||
|
highlight TopLine cterm=none ctermfg=214 ctermbg=235
|
||||||
|
highlight TopLineSel cterm=bold ctermfg=214 ctermbg=237
|
||||||
|
|
||||||
|
highlight Win cterm=none ctermfg=223 ctermbg=none
|
||||||
|
highlight OtherWin cterm=none ctermfg=223 ctermbg=none
|
||||||
|
highlight Directory cterm=bold ctermfg=109 ctermbg=default
|
||||||
|
highlight CurrLine cterm=bold,inverse ctermfg=default ctermbg=default
|
||||||
|
highlight OtherLine cterm=bold ctermfg=default ctermbg=235
|
||||||
|
highlight Selected cterm=none ctermfg=223 ctermbg=237
|
||||||
|
|
||||||
|
highlight JobLine cterm=bold ctermfg=116 ctermbg=238
|
||||||
|
highlight StatusLine cterm=bold ctermfg=144 ctermbg=236
|
||||||
|
highlight ErrorMsg cterm=bold ctermfg=167 ctermbg=default
|
||||||
|
highlight WildMenu cterm=bold ctermfg=235 ctermbg=144
|
||||||
|
highlight CmdLine cterm=none ctermfg=223 ctermbg=default
|
||||||
|
|
||||||
|
highlight Executable cterm=bold ctermfg=142 ctermbg=default
|
||||||
|
highlight Link cterm=none ctermfg=132 ctermbg=default
|
||||||
|
highlight BrokenLink cterm=bold ctermfg=167 ctermbg=default
|
||||||
|
highlight Device cterm=none,standout ctermfg=214 ctermbg=default
|
||||||
|
highlight Fifo cterm=none ctermfg=172 ctermbg=default
|
||||||
|
highlight Socket cterm=bold ctermfg=223 ctermbg=default
|
56
config/vifm/scripts/vifmimg
Executable file
|
@ -0,0 +1,56 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
PCACHE="$HOME/.cache/vifm/thumbnail.$(stat --printf '%n\0%i\0%F\0%s\0%W\0%Y' -- "$(readlink -f "$PWD/$6")" | sha256sum)"
|
||||||
|
export PCACHE="${PCACHE%% *}"
|
||||||
|
|
||||||
|
pclear() {
|
||||||
|
printf '{"action": "remove", "identifier": "vifm-preview"}\n' > "$FIFO_UEBERZUG"
|
||||||
|
}
|
||||||
|
|
||||||
|
image() {
|
||||||
|
printf '{"action": "add", "identifier": "vifm-preview", "x": "%s", "y": "%s", "width": "%s", "height": "%s", "scaler": "contain", "path": "%s"}\n' "$2" "$3" "$4" "$5" "$6" > "$FIFO_UEBERZUG"
|
||||||
|
}
|
||||||
|
|
||||||
|
main() {
|
||||||
|
case "$1" in
|
||||||
|
"clear")
|
||||||
|
pclear "$@"
|
||||||
|
;;
|
||||||
|
"draw")
|
||||||
|
FILE="$PWD/$6"
|
||||||
|
image "$1" "$2" "$3" "$4" "$5" "$FILE"
|
||||||
|
;;
|
||||||
|
"video")
|
||||||
|
[ ! -f "${PCACHE}.jpg" ] && \
|
||||||
|
ffmpegthumbnailer -i "$6" -o "${PCACHE}.jpg" -s 0 -q 5
|
||||||
|
image "$1" "$2" "$3" "$4" "$5" "${PCACHE}.jpg"
|
||||||
|
;;
|
||||||
|
"epub")
|
||||||
|
[ ! -f "$PCACHE" ] && \
|
||||||
|
epub-thumbnailer "$6" "$PCACHE" 1024
|
||||||
|
image "$1" "$2" "$3" "$4" "$5" "$PCACHE"
|
||||||
|
;;
|
||||||
|
"pdf")
|
||||||
|
[ ! -f "${PCACHE}.jpg" ] && \
|
||||||
|
pdftoppm -jpeg -f 1 -singlefile "$6" "$PCACHE"
|
||||||
|
image "$1" "$2" "$3" "$4" "$5" "${PCACHE}.jpg"
|
||||||
|
;;
|
||||||
|
"djvu")
|
||||||
|
[ ! -f "${PCACHE}.jpg" ] && \
|
||||||
|
ddjvu -format=tiff -quality=90 -page=1 "$6" "$PCACHE.jpg"
|
||||||
|
image "$1" "$2" "$3" "$4" "$5" "${PCACHE}.jpg"
|
||||||
|
;;
|
||||||
|
"audio")
|
||||||
|
[ ! -f "${PCACHE}.jpg" ] && \
|
||||||
|
ffmpeg -hide_banner -i "$6" "${PCACHE}.jpg" -y >/dev/null
|
||||||
|
image "$1" "$2" "$3" "$4" "$5" "${PCACHE}.jpg"
|
||||||
|
;;
|
||||||
|
"font")
|
||||||
|
[ ! -f "${PCACHE}.jpg" ] && \
|
||||||
|
fontpreview -i "$6" -o "${PCACHE}.jpg"
|
||||||
|
image "$1" "$2" "$3" "$4" "$5" "${PCACHE}.jpg"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
main "$@"
|
21
config/vifm/scripts/vifmrun
Executable file
|
@ -0,0 +1,21 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
if [ -z "$(command -v vifm)" ]; then
|
||||||
|
printf "vifm isn't installed on your system!\n"
|
||||||
|
exit 1
|
||||||
|
elif [ -z "$(command -v ueberzug)" ]; then
|
||||||
|
exec vifm "$@"
|
||||||
|
else
|
||||||
|
cleanup() {
|
||||||
|
exec 3>&-
|
||||||
|
rm "$FIFO_UEBERZUG"
|
||||||
|
}
|
||||||
|
[ ! -d "$HOME/.cache/vifm" ] && mkdir -p "$HOME/.cache/vifm"
|
||||||
|
export FIFO_UEBERZUG="$HOME/.cache/vifm/ueberzug-${$}"
|
||||||
|
mkfifo "$FIFO_UEBERZUG"
|
||||||
|
ueberzug layer -s <"$FIFO_UEBERZUG" -p json &
|
||||||
|
exec 3>"$FIFO_UEBERZUG"
|
||||||
|
trap cleanup EXIT
|
||||||
|
vifm "$@" 3>&-
|
||||||
|
vifmimg clear
|
||||||
|
fi
|
6568
config/vifm/vifm-help.txt
Normal file
510
config/vifm/vifmrc
Normal file
|
@ -0,0 +1,510 @@
|
||||||
|
" ____ __
|
||||||
|
" / __ \_________ _/ /_____
|
||||||
|
" / / / / ___/ __ `/ //_/ _ \
|
||||||
|
" / /_/ / / / /_/ / ,< / __/ Clay Gomera (Drake)
|
||||||
|
" /_____/_/ \__,_/_/|_|\___/ My custom vifm config
|
||||||
|
|
||||||
|
" vim: filetype=vifm :
|
||||||
|
" My config file for the vifm terminal file manager.
|
||||||
|
" ------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
" This is the actual command used to start vi. The default is vim.
|
||||||
|
" If you would like to use emacs or emacsclient, you can use them.
|
||||||
|
" Since emacs is a GUI app and not a terminal app like vim, append the command
|
||||||
|
" with an ampersand (&).
|
||||||
|
|
||||||
|
set vicmd=~/.local/bin/lvim
|
||||||
|
|
||||||
|
" This makes vifm perform file operations on its own instead of relying on
|
||||||
|
" standard utilities like `cp`. While using `cp` and alike is a more universal
|
||||||
|
" solution, it's also much slower when processing large amounts of files and
|
||||||
|
" doesn't support progress measuring.
|
||||||
|
|
||||||
|
set syscalls
|
||||||
|
|
||||||
|
" Trash Directory
|
||||||
|
" The default is to move files that are deleted with dd or :d to
|
||||||
|
" the trash directory. If you change this you will not be able to move
|
||||||
|
" files by deleting them and then using p to put the file in the new location.
|
||||||
|
" I recommend not changing this until you are familiar with vifm.
|
||||||
|
" This probably shouldn't be an option.
|
||||||
|
|
||||||
|
set trash
|
||||||
|
|
||||||
|
" This is how many directories to store in the directory history.
|
||||||
|
|
||||||
|
set history=100
|
||||||
|
|
||||||
|
" Automatically resolve symbolic links on l or Enter.
|
||||||
|
|
||||||
|
set nofollowlinks
|
||||||
|
|
||||||
|
" With this option turned on you can run partially entered commands with
|
||||||
|
" unambiguous beginning using :! (e.g. :!Te instead of :!Terminal or :!Te<tab>).
|
||||||
|
|
||||||
|
" set fastrun
|
||||||
|
|
||||||
|
" Natural sort of (version) numbers within text.
|
||||||
|
|
||||||
|
set sortnumbers
|
||||||
|
|
||||||
|
" Maximum number of changes that can be undone.
|
||||||
|
|
||||||
|
set undolevels=100
|
||||||
|
|
||||||
|
" If you installed the vim.txt help file set vimhelp.
|
||||||
|
" If would rather use a plain text help file set novimhelp.
|
||||||
|
|
||||||
|
set novimhelp
|
||||||
|
|
||||||
|
" If you would like to run an executable file when you
|
||||||
|
" press return on the file name set this.
|
||||||
|
|
||||||
|
set norunexec
|
||||||
|
|
||||||
|
" Selected color scheme
|
||||||
|
" The following line will cause issues if using vifm.vim with regular vim.
|
||||||
|
" Either use neovim or comment out the following line.
|
||||||
|
colorscheme gruvbox
|
||||||
|
|
||||||
|
" Format for displaying time in file list. For example:
|
||||||
|
" TIME_STAMP_FORMAT=%m/%d-%H:%M
|
||||||
|
" See man date or man strftime for details.
|
||||||
|
|
||||||
|
set timefmt=%m/%d\ %H:%M
|
||||||
|
|
||||||
|
" Show list of matches on tab completion in command-line mode
|
||||||
|
|
||||||
|
set wildmenu
|
||||||
|
|
||||||
|
" Display completions in a form of popup with descriptions of the matches
|
||||||
|
|
||||||
|
set wildstyle=popup
|
||||||
|
|
||||||
|
" Display suggestions in normal, visual and view modes for keys, marks and
|
||||||
|
" registers (at most 5 files). In other view, when available.
|
||||||
|
|
||||||
|
set suggestoptions=normal,visual,view,otherpane,keys,marks,registers
|
||||||
|
|
||||||
|
" Ignore case in search patterns unless it contains at least one uppercase
|
||||||
|
" letter
|
||||||
|
|
||||||
|
set ignorecase
|
||||||
|
set smartcase
|
||||||
|
|
||||||
|
" Don't highlight search results automatically
|
||||||
|
|
||||||
|
set nohlsearch
|
||||||
|
|
||||||
|
" Use increment searching (search while typing)
|
||||||
|
set incsearch
|
||||||
|
|
||||||
|
" Try to leave some space from cursor to upper/lower border in lists
|
||||||
|
|
||||||
|
set scrolloff=4
|
||||||
|
|
||||||
|
" Don't do too many requests to slow file systems
|
||||||
|
|
||||||
|
if !has('win')
|
||||||
|
set slowfs=curlftpfs
|
||||||
|
endif
|
||||||
|
|
||||||
|
" Set custom status line look
|
||||||
|
|
||||||
|
set statusline=" Hint: %z%= %A %10u:%-7g %15s %20d "
|
||||||
|
|
||||||
|
" Set line numbers to show
|
||||||
|
|
||||||
|
" ------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
" :mark mark /full/directory/path [filename]
|
||||||
|
|
||||||
|
mark h ~/
|
||||||
|
|
||||||
|
" ------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
" :com[mand][!] command_name action
|
||||||
|
" The following macros can be used in a command
|
||||||
|
" %a is replaced with the user arguments.
|
||||||
|
" %c the current file under the cursor.
|
||||||
|
" %C the current file under the cursor in the other directory.
|
||||||
|
" %f the current selected file, or files.
|
||||||
|
" %F the current selected file, or files in the other directory.
|
||||||
|
" %b same as %f %F.
|
||||||
|
" %d the current directory name.
|
||||||
|
" %D the other window directory name.
|
||||||
|
" %m run the command in a menu window
|
||||||
|
|
||||||
|
command! df df -h %m 2> /dev/null
|
||||||
|
command! diff vim -d %f %F
|
||||||
|
command! zip zip -r %f.zip %f
|
||||||
|
command! run !! ./%f
|
||||||
|
command! make !!make %a
|
||||||
|
command! mkcd :mkdir %a | cd %a
|
||||||
|
command! vgrep vim "+grep %a"
|
||||||
|
command! reload :write | restart
|
||||||
|
|
||||||
|
" ------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
" The file type is for the default programs to be used with
|
||||||
|
" a file extension.
|
||||||
|
" :filetype pattern1,pattern2 defaultprogram,program2
|
||||||
|
" :fileviewer pattern1,pattern2 consoleviewer
|
||||||
|
" The other programs for the file type can be accessed with the :file command
|
||||||
|
" The command macros %f, %F, %d, %F may be used in the commands.
|
||||||
|
" The %a macro is ignored. To use a % you must put %%.
|
||||||
|
|
||||||
|
" For automated FUSE mounts, you must register an extension with :file[x]type
|
||||||
|
" in one of following formats:
|
||||||
|
"
|
||||||
|
" :filetype extensions FUSE_MOUNT|some_mount_command using %SOURCE_FILE and %DESTINATION_DIR variables
|
||||||
|
" %SOURCE_FILE and %DESTINATION_DIR are filled in by vifm at runtime.
|
||||||
|
" A sample line might look like this:
|
||||||
|
" :filetype *.zip,*.jar,*.war,*.ear FUSE_MOUNT|fuse-zip %SOURCE_FILE %DESTINATION_DIR
|
||||||
|
"
|
||||||
|
" :filetype extensions FUSE_MOUNT2|some_mount_command using %PARAM and %DESTINATION_DIR variables
|
||||||
|
" %PARAM and %DESTINATION_DIR are filled in by vifm at runtime.
|
||||||
|
" A sample line might look like this:
|
||||||
|
" :filetype *.ssh FUSE_MOUNT2|sshfs %PARAM %DESTINATION_DIR
|
||||||
|
" %PARAM value is filled from the first line of file (whole line).
|
||||||
|
" Example first line for SshMount filetype: root@127.0.0.1:/
|
||||||
|
"
|
||||||
|
" You can also add %CLEAR if you want to clear screen before running FUSE
|
||||||
|
" program.
|
||||||
|
|
||||||
|
" Pdf and cbz
|
||||||
|
filextype *.cbz,*.pdf zathura %c %i &, apvlv %c, xpdf %c
|
||||||
|
fileviewer *.pdf
|
||||||
|
\ vifmimg pdf %px %py %pw %ph %c
|
||||||
|
\ %pc
|
||||||
|
\ vifmimg clear
|
||||||
|
|
||||||
|
" PostScript
|
||||||
|
filextype *.ps,*.eps,*.ps.gz
|
||||||
|
\ {View in zathura}
|
||||||
|
\ zathura %f,
|
||||||
|
\ {View in gv}
|
||||||
|
\ gv %c %i &,
|
||||||
|
|
||||||
|
" Djvu
|
||||||
|
filextype *.djvu
|
||||||
|
\ {View in zathura}
|
||||||
|
\ zathura %f,
|
||||||
|
\ {View in apvlv}
|
||||||
|
\ apvlv %f,
|
||||||
|
fileviewer *.djvu
|
||||||
|
\ vifmimg djvu %px %py %pw %ph %c
|
||||||
|
\ %pc
|
||||||
|
\ vifmimg clear
|
||||||
|
|
||||||
|
fileviewer *.epub
|
||||||
|
\ vifmimg epub %px %py %pw %ph %c
|
||||||
|
\ %pc
|
||||||
|
\ vifmimg clear
|
||||||
|
|
||||||
|
" Audio
|
||||||
|
filetype *.wav,*.mp3,*.flac,*.m4a,*.wma,*.ape,*.ac3,*.og[agx],*.spx,*.opus
|
||||||
|
\ {Play using mpv}
|
||||||
|
\ mpv %f,
|
||||||
|
fileviewer *.wav,*.mp3,*.flac,*.m4a,*.wma,*.ape,*.ac3,*.og[agx],*.spx,*.opus
|
||||||
|
\ vifmimg audio %px %py %pw %ph %c
|
||||||
|
\ %pc
|
||||||
|
\ vifmimg clear
|
||||||
|
|
||||||
|
" Video
|
||||||
|
filextype *.avi,*.mp4,*.wmv,*.dat,*.3gp,*.ogv,*.mkv,*.mpg,*.mpeg,*.vob,
|
||||||
|
\*.fl[icv],*.m2v,*.mov,*.webm,*.ts,*.mts,*.m4v,*.r[am],*.qt,*.divx,
|
||||||
|
\*.as[fx]
|
||||||
|
\ {View using mplayer}
|
||||||
|
\ mpv %f,
|
||||||
|
fileviewer *.avi,*.mp4,*.wmv,*.dat,*.3gp,*.ogv,*.mkv,*.mpg,*.mpeg,*.vob,
|
||||||
|
\*.fl[icv],*.m2v,*.mov,*.webm,*.ts,*.mts,*.m4v,*.r[am],*.qt,*.divx,
|
||||||
|
\*.as[fx]
|
||||||
|
\ vifmimg video %px %py %pw %ph %c
|
||||||
|
\ %pc
|
||||||
|
\ vifmimg clear
|
||||||
|
|
||||||
|
" Web
|
||||||
|
filextype *.html,*.htm
|
||||||
|
\ {Open with emacs}
|
||||||
|
\ emacsclient -c %c &,
|
||||||
|
\ {Open with vim}
|
||||||
|
\ vim %c &,
|
||||||
|
\ {Open with dwb}
|
||||||
|
\ dwb %f %i &,
|
||||||
|
\ {Open with firefox}
|
||||||
|
\ firefox %f &,
|
||||||
|
\ {Open with uzbl}
|
||||||
|
\ uzbl-browser %f %i &,
|
||||||
|
filetype *.html,*.htm links, lynx
|
||||||
|
|
||||||
|
" Object
|
||||||
|
filetype *.o nm %f | less
|
||||||
|
|
||||||
|
" Man page
|
||||||
|
filetype *.[1-8] man ./%c
|
||||||
|
fileviewer *.[1-8] man ./%c | col -b
|
||||||
|
|
||||||
|
" Images
|
||||||
|
filextype *.bmp,*.jpg,*.jpeg,*.png,*.gif,*.xpm,*.webp
|
||||||
|
\ {View in imv}
|
||||||
|
\ nsxiv %f &,
|
||||||
|
fileviewer *.bmp,*.jpg,*.jpeg,*.png,*.gif,*.xpm,*.webp
|
||||||
|
\ vifmimg draw %px %py %pw %ph %c
|
||||||
|
\ %pc
|
||||||
|
\ vifmimg clear
|
||||||
|
|
||||||
|
" Fonts
|
||||||
|
fileviewer *.ttf, *.otf
|
||||||
|
\ vifmimg font %px %py %pw %ph %c
|
||||||
|
\ %pc
|
||||||
|
\ vifmimg clear
|
||||||
|
|
||||||
|
" OpenRaster
|
||||||
|
filextype *.ora
|
||||||
|
\ {Edit in MyPaint}
|
||||||
|
\ mypaint %f,
|
||||||
|
|
||||||
|
" Mindmap
|
||||||
|
filextype *.vym
|
||||||
|
\ {Open with VYM}
|
||||||
|
\ vym %f &,
|
||||||
|
|
||||||
|
" MD5
|
||||||
|
filetype *.md5
|
||||||
|
\ {Check MD5 hash sum}
|
||||||
|
\ md5sum -c %f %S,
|
||||||
|
|
||||||
|
" SHA1
|
||||||
|
filetype *.sha1
|
||||||
|
\ {Check SHA1 hash sum}
|
||||||
|
\ sha1sum -c %f %S,
|
||||||
|
|
||||||
|
" SHA256
|
||||||
|
filetype *.sha256
|
||||||
|
\ {Check SHA256 hash sum}
|
||||||
|
\ sha256sum -c %f %S,
|
||||||
|
|
||||||
|
" SHA512
|
||||||
|
filetype *.sha512
|
||||||
|
\ {Check SHA512 hash sum}
|
||||||
|
\ sha512sum -c %f %S,
|
||||||
|
|
||||||
|
" GPG signature
|
||||||
|
filetype *.asc
|
||||||
|
\ {Check signature}
|
||||||
|
\ !!gpg --verify %c,
|
||||||
|
|
||||||
|
" Torrent
|
||||||
|
filetype *.torrent flatpak run org.qbittorrent.qBittorrent %f &
|
||||||
|
fileviewer *.torrent dumptorrent -v %c
|
||||||
|
|
||||||
|
" FuseZipMount
|
||||||
|
filetype *.zip,*.jar,*.war,*.ear,*.oxt,*.apkg
|
||||||
|
\ {Mount with fuse-zip}
|
||||||
|
\ FUSE_MOUNT|fuse-zip %SOURCE_FILE %DESTINATION_DIR,
|
||||||
|
\ {View contents}
|
||||||
|
\ zip -sf %c | less,
|
||||||
|
\ {Extract here}
|
||||||
|
\ tar -xf %c,
|
||||||
|
fileviewer *.zip,*.jar,*.war,*.ear,*.oxt zip -sf %c
|
||||||
|
|
||||||
|
" ArchiveMount
|
||||||
|
filetype *.tar,*.tar.bz2,*.tbz2,*.tgz,*.tar.gz,*.tar.xz,*.txz
|
||||||
|
\ {Mount with archivemount}
|
||||||
|
\ FUSE_MOUNT|archivemount %SOURCE_FILE %DESTINATION_DIR,
|
||||||
|
fileviewer *.tgz,*.tar.gz tar -tzf %c
|
||||||
|
fileviewer *.tar.bz2,*.tbz2 tar -tjf %c
|
||||||
|
fileviewer *.tar.txz,*.txz xz --list %c
|
||||||
|
fileviewer *.tar tar -tf %c
|
||||||
|
|
||||||
|
" Rar2FsMount and rar archives
|
||||||
|
filetype *.rar
|
||||||
|
\ {Mount with rar2fs}
|
||||||
|
\ FUSE_MOUNT|rar2fs %SOURCE_FILE %DESTINATION_DIR,
|
||||||
|
fileviewer *.rar unrar v %c
|
||||||
|
|
||||||
|
" IsoMount
|
||||||
|
filetype *.iso
|
||||||
|
\ {Mount with fuseiso}
|
||||||
|
\ FUSE_MOUNT|fuseiso %SOURCE_FILE %DESTINATION_DIR,
|
||||||
|
|
||||||
|
" SshMount
|
||||||
|
filetype *.ssh
|
||||||
|
\ {Mount with sshfs}
|
||||||
|
\ FUSE_MOUNT2|sshfs %PARAM %DESTINATION_DIR %FOREGROUND,
|
||||||
|
|
||||||
|
" FtpMount
|
||||||
|
filetype *.ftp
|
||||||
|
\ {Mount with curlftpfs}
|
||||||
|
\ FUSE_MOUNT2|curlftpfs -o ftp_port=-,,disable_eprt %PARAM %DESTINATION_DIR %FOREGROUND,
|
||||||
|
|
||||||
|
" Fuse7z and 7z archives
|
||||||
|
filetype *.7z
|
||||||
|
\ {Mount with fuse-7z}
|
||||||
|
\ FUSE_MOUNT|fuse-7z %SOURCE_FILE %DESTINATION_DIR,
|
||||||
|
fileviewer *.7z 7z l %c
|
||||||
|
|
||||||
|
" Office files
|
||||||
|
filextype *.odt,*.doc,*.docx,*.xls,*.xlsx,*.odp,*.pptx flatpak run org.libreoffice.LibreOffice %f &
|
||||||
|
fileviewer *.doc catdoc %c
|
||||||
|
fileviewer *.docx docx2txt.pl %f -
|
||||||
|
|
||||||
|
" TuDu files
|
||||||
|
filetype *.tudu tudu -f %c
|
||||||
|
|
||||||
|
" Qt projects
|
||||||
|
filextype *.pro qtcreator %f &
|
||||||
|
|
||||||
|
" Directories
|
||||||
|
filextype */
|
||||||
|
\ {View in thunar}
|
||||||
|
\ Thunar %f &,
|
||||||
|
|
||||||
|
" Syntax highlighting in preview
|
||||||
|
"
|
||||||
|
" Explicitly set highlight type for some extensions
|
||||||
|
"
|
||||||
|
" 256-color terminal
|
||||||
|
" fileviewer *.[ch],*.[ch]pp highlight -O xterm256 -s dante --syntax c %c
|
||||||
|
" fileviewer Makefile,Makefile.* highlight -O xterm256 -s dante --syntax make %c
|
||||||
|
"
|
||||||
|
" 16-color terminal
|
||||||
|
" fileviewer *.c,*.h highlight -O ansi -s dante %c
|
||||||
|
"
|
||||||
|
" Or leave it for automatic detection
|
||||||
|
"
|
||||||
|
" fileviewer *[^/] pygmentize -O style=monokai -f console256 -g
|
||||||
|
|
||||||
|
" Displaying pictures in terminal
|
||||||
|
"
|
||||||
|
" fileviewer *.jpg,*.png shellpic %c
|
||||||
|
|
||||||
|
" Open all other files with default system programs (you can also remove all
|
||||||
|
" :file[x]type commands above to ensure they don't interfere with system-wide
|
||||||
|
" settings). By default all unknown files are opened with 'vi[x]cmd'
|
||||||
|
" uncommenting one of lines below will result in ignoring 'vi[x]cmd' option
|
||||||
|
" for unknown file types.
|
||||||
|
" For *nix:
|
||||||
|
" filetype * xdg-open
|
||||||
|
" For OS X:
|
||||||
|
" filetype * open
|
||||||
|
" For Windows:
|
||||||
|
" filetype * start, explorer
|
||||||
|
|
||||||
|
" GETTING ICONS TO DISPLAY IN VIFM
|
||||||
|
" You need the next 14 lines!
|
||||||
|
|
||||||
|
" file types
|
||||||
|
set classify=' :dir:/, :exe:, :reg:, :link:'
|
||||||
|
" various file names
|
||||||
|
set classify+=' ::../::, ::*.sh::, ::*.[hc]pp::, ::*.[hc]::, ::/^copying|license$/::, ::.git/,,*.git/::, ::*.epub,,*.fb2,,*.djvu::, ::*.pdf::, ::*.htm,,*.html,,**.[sx]html,,*.xml::'
|
||||||
|
" archives
|
||||||
|
set classify+=' ::*.7z,,*.ace,,*.arj,,*.bz2,,*.cpio,,*.deb,,*.dz,,*.gz,,*.jar,,*.lzh,,*.lzma,,*.rar,,*.rpm,,*.rz,,*.tar,,*.taz,,*.tb2,,*.tbz,,*.tbz2,,*.tgz,,*.tlz,,*.trz,,*.txz,,*.tz,,*.tz2,,*.xz,,*.z,,*.zip,,*.zoo::'
|
||||||
|
" images
|
||||||
|
set classify+=' ::*.bmp,,*.gif,,*.jpeg,,*.jpg,,*.ico,,*.png,,*.ppm,,*.svg,,*.svgz,,*.tga,,*.tif,,*.tiff,,*.xbm,,*.xcf,,*.xpm,,*.xspf,,*.xwd::'
|
||||||
|
" audio
|
||||||
|
set classify+=' ::*.aac,,*.anx,,*.asf,,*.au,,*.axa,,*.flac,,*.m2a,,*.m4a,,*.mid,,*.midi,,*.mp3,,*.mpc,,*.oga,,*.ogg,,*.ogx,,*.ra,,*.ram,,*.rm,,*.spx,,*.wav,,*.wma,,*.ac3::'
|
||||||
|
" media
|
||||||
|
set classify+=' ::*.avi,,*.ts,,*.axv,,*.divx,,*.m2v,,*.m4p,,*.m4v,,.mka,,*.mkv,,*.mov,,*.mp4,,*.flv,,*.mp4v,,*.mpeg,,*.mpg,,*.nuv,,*.ogv,,*.pbm,,*.pgm,,*.qt,,*.vob,,*.wmv,,*.xvid::'
|
||||||
|
" office files
|
||||||
|
set classify+=' ::*.doc,,*.docx::, ::*.xls,,*.xls[mx]::, ::*.pptx,,*.ppt::'
|
||||||
|
|
||||||
|
" ------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
" What should be saved automatically between vifm runs
|
||||||
|
" Like in previous versions of vifm
|
||||||
|
" set vifminfo=options,filetypes,commands,bookmarks,dhistory,state,cs
|
||||||
|
" Like in vi
|
||||||
|
set vifminfo=dhistory,savedirs,chistory,state,tui,shistory,
|
||||||
|
\phistory,fhistory,dirstack,registers,bookmarks,bmarks
|
||||||
|
|
||||||
|
" ------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
" Examples of configuring both panels
|
||||||
|
|
||||||
|
" Customize view columns a bit (enable ellipsis for truncated file names)
|
||||||
|
"
|
||||||
|
" set viewcolumns=-{name}..,6{}.
|
||||||
|
|
||||||
|
" Filter-out build and temporary files
|
||||||
|
"
|
||||||
|
" filter! /^.*\.(lo|o|d|class|py[co])$|.*~$/
|
||||||
|
|
||||||
|
" ------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
" Sample mappings
|
||||||
|
|
||||||
|
"Open all images in current directory in sxiv thumbnail mode
|
||||||
|
nnoremap sx :!sxiv -t %d & <cr>
|
||||||
|
|
||||||
|
"Open selected images in gimp
|
||||||
|
nnoremap gp :!gimp %f & <cr>
|
||||||
|
|
||||||
|
" Start shell in current directory
|
||||||
|
nnoremap s :shell<cr>
|
||||||
|
|
||||||
|
" Display sorting dialog
|
||||||
|
nnoremap S :sort<cr>
|
||||||
|
|
||||||
|
" Toggle visibility of preview window
|
||||||
|
nnoremap w :view<cr>
|
||||||
|
vnoremap w :view<cr>gv
|
||||||
|
|
||||||
|
" Open file in the background using its default program
|
||||||
|
nnoremap gb :file &<cr>l
|
||||||
|
|
||||||
|
" Yank current directory path into the clipboard
|
||||||
|
nnoremap yd :!echo %d | xclip %i<cr>
|
||||||
|
|
||||||
|
" Yank current file path into the clipboard
|
||||||
|
nnoremap yf :!echo %c:p | xclip %i<cr>
|
||||||
|
|
||||||
|
" Mappings for faster renaming
|
||||||
|
nnoremap I cw<c-a>
|
||||||
|
nnoremap cc cw<c-u>
|
||||||
|
nnoremap A cw
|
||||||
|
|
||||||
|
" Open console in current directory
|
||||||
|
nnoremap ,t :!xterm &<cr>
|
||||||
|
|
||||||
|
" Open editor to edit vifmrc and apply settings after returning to vifm
|
||||||
|
nnoremap ,c :write | edit $MYVIFMRC | restart<cr>
|
||||||
|
" Open gvim to edit vifmrc
|
||||||
|
nnoremap ,C :!gvim --remote-tab-silent $MYVIFMRC &<cr>
|
||||||
|
|
||||||
|
" Toggle wrap setting on ,w key
|
||||||
|
nnoremap ,w :set wrap!<cr>
|
||||||
|
|
||||||
|
" Example of standard two-panel file managers mappings
|
||||||
|
nnoremap <f3> :!less %f<cr>
|
||||||
|
nnoremap <f4> :edit<cr>
|
||||||
|
nnoremap <f5> :copy<cr>
|
||||||
|
nnoremap <f6> :move<cr>
|
||||||
|
nnoremap <f7> :mkdir<space>
|
||||||
|
nnoremap <f8> :delete<cr>
|
||||||
|
|
||||||
|
" ------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
" Various customization examples
|
||||||
|
|
||||||
|
" Use ag (the silver searcher) instead of grep
|
||||||
|
"
|
||||||
|
" set grepprg='ag --line-numbers %i %a %s'
|
||||||
|
|
||||||
|
" Add additional place to look for executables
|
||||||
|
"
|
||||||
|
" let $PATH = $HOME.'/bin/fuse:'.$PATH
|
||||||
|
|
||||||
|
" Block particular shortcut
|
||||||
|
"
|
||||||
|
" nnoremap <left> <nop>
|
||||||
|
|
||||||
|
" Export IPC name of current instance as environment variable and use it to
|
||||||
|
" communicate with the instance later.
|
||||||
|
"
|
||||||
|
" It can be used in some shell script that gets run from inside vifm, for
|
||||||
|
" example, like this:
|
||||||
|
" vifm --server-name "$VIFM_SERVER_NAME" --remote +"cd '$PWD'"
|
||||||
|
"
|
||||||
|
" let $VIFM_SERVER_NAME = v:servername
|
|
@ -1,273 +0,0 @@
|
||||||
{
|
|
||||||
"reload-style-on-change": true,
|
|
||||||
"position": "top",
|
|
||||||
"height": 26,
|
|
||||||
"spacing": 0,
|
|
||||||
"layer": "top",
|
|
||||||
|
|
||||||
"modules-left": [
|
|
||||||
"sway/workspaces",
|
|
||||||
"sway/mode",
|
|
||||||
"sway/scratchpad",
|
|
||||||
"sway/window"
|
|
||||||
],
|
|
||||||
|
|
||||||
"modules-right": [
|
|
||||||
"tray",
|
|
||||||
"custom/arrow1",
|
|
||||||
"clock",
|
|
||||||
"custom/arrow2",
|
|
||||||
"cpu",
|
|
||||||
"memory",
|
|
||||||
"custom/arrow3",
|
|
||||||
"sway/language",
|
|
||||||
"custom/arrow4",
|
|
||||||
"idle_inhibitor",
|
|
||||||
"power-profiles-daemon",
|
|
||||||
"battery",
|
|
||||||
"battery#bat2",
|
|
||||||
"custom/arrow5",
|
|
||||||
"pulseaudio",
|
|
||||||
"custom/arrow6",
|
|
||||||
"backlight",
|
|
||||||
"custom/arrow7",
|
|
||||||
"network",
|
|
||||||
"bluetooth"
|
|
||||||
],
|
|
||||||
|
|
||||||
// Modules
|
|
||||||
|
|
||||||
"sway/workspaces": {
|
|
||||||
"on-click": "activate",
|
|
||||||
"sort-by-number": true,
|
|
||||||
"format": "{icon}",
|
|
||||||
"format-icons": {
|
|
||||||
"1": "\udb82\udf3a",
|
|
||||||
"2": "\udb82\udf3b",
|
|
||||||
"3": "\udb82\udf3c",
|
|
||||||
"4": "\udb82\udf3d",
|
|
||||||
"5": "\udb82\udf3e",
|
|
||||||
"6": "\udb82\udf3f",
|
|
||||||
"7": "\udb82\udf40",
|
|
||||||
"8": "\udb82\udf41",
|
|
||||||
"9": "\udb82\udf42",
|
|
||||||
"10": "\udb83\udfe9",
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
"sway/mode": {
|
|
||||||
"format": "<span style=\"italic\">{}</span>"
|
|
||||||
},
|
|
||||||
|
|
||||||
"sway/scratchpad": {
|
|
||||||
"format": "{icon} {count}",
|
|
||||||
"show-empty": false,
|
|
||||||
"format-icons": ["", "\uf2d2"],
|
|
||||||
"tooltip": true,
|
|
||||||
"tooltip-format": "{app}: {title}"
|
|
||||||
},
|
|
||||||
|
|
||||||
"sway/window": {
|
|
||||||
"tooltip": false,
|
|
||||||
"format": "{title}",
|
|
||||||
"icon": true,
|
|
||||||
"icon-size": 16,
|
|
||||||
"separate-outputs": true,
|
|
||||||
"max-length": 60
|
|
||||||
},
|
|
||||||
|
|
||||||
"tray": {
|
|
||||||
"icon-size": 16,
|
|
||||||
"spacing": 10
|
|
||||||
},
|
|
||||||
|
|
||||||
"cpu": {
|
|
||||||
"interval": 1,
|
|
||||||
"format": "\uf4bc {usage}%",
|
|
||||||
"on-click": "foot -T btop -a btop btop"
|
|
||||||
},
|
|
||||||
|
|
||||||
"memory": {
|
|
||||||
"interval": 1,
|
|
||||||
"format": "\uefc5 {percentage}%",
|
|
||||||
"on-click": "foot -T btop -a btop btop"
|
|
||||||
},
|
|
||||||
|
|
||||||
"sway/language": {
|
|
||||||
"format": "\udb80\udf0c {}",
|
|
||||||
"on-click": "swaymsg input type:keyboard xkb_switch_layout next",
|
|
||||||
"tooltip": false,
|
|
||||||
},
|
|
||||||
|
|
||||||
"pulseaudio": {
|
|
||||||
"scroll-step": 1, // %, can be a float
|
|
||||||
"tooltip-format": "{volume}% - {desc}",
|
|
||||||
"format": "{icon} {format_source}",
|
|
||||||
"format-bluetooth": "{icon}\udb80\udcaf {format_source}",
|
|
||||||
"format-bluetooth-muted": "\udb81\udd81 {icon}\udb80\udcaf {format_source}",
|
|
||||||
"format-muted": "\udb81\udd81 {format_source}",
|
|
||||||
"format-source": "\udb80\udf6c",
|
|
||||||
"format-source-muted": "\udb80\udf6d",
|
|
||||||
"format-icons": {
|
|
||||||
"headphone": "\udb80\udecb",
|
|
||||||
"hands-free": "\udb86\udc4f",
|
|
||||||
"headset": "\udb80\udece",
|
|
||||||
"phone": "\udb80\udff2",
|
|
||||||
"portable": "\udb80\udff2",
|
|
||||||
"car": "\udb80\udd0b",
|
|
||||||
"default": [
|
|
||||||
"\udb81\udd7f",
|
|
||||||
"\udb81\udd80",
|
|
||||||
"\udb81\udd7e"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"on-click": "foot -T audiomixer -a audiomixer pulsemixer"
|
|
||||||
},
|
|
||||||
|
|
||||||
"backlight": {
|
|
||||||
"format": "{icon}",
|
|
||||||
"format-icons": [
|
|
||||||
"\udb86\ude4e",
|
|
||||||
"\udb86\ude4f",
|
|
||||||
"\udb86\ude50",
|
|
||||||
"\udb86\ude51",
|
|
||||||
"\udb86\ude52",
|
|
||||||
"\udb86\ude53",
|
|
||||||
"\udb86\ude54",
|
|
||||||
"\udb86\ude55",
|
|
||||||
"\udb81\udee8"
|
|
||||||
],
|
|
||||||
"tooltip-format": "{percent}%"
|
|
||||||
},
|
|
||||||
|
|
||||||
"idle_inhibitor": {
|
|
||||||
"format": "{icon}",
|
|
||||||
"format-icons": {
|
|
||||||
"activated": "\uea71",
|
|
||||||
"deactivated": "\ueabc"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
"power-profiles-daemon": {
|
|
||||||
"format": "{icon}",
|
|
||||||
"tooltip-format": "Power profile: {profile}",
|
|
||||||
"tooltip": true,
|
|
||||||
"format-icons": {
|
|
||||||
"default": "",
|
|
||||||
"performance": "",
|
|
||||||
"balanced": "",
|
|
||||||
"power-saver": ""
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
"battery": {
|
|
||||||
"bat": "BAT0",
|
|
||||||
"states": {
|
|
||||||
"warning": 30,
|
|
||||||
"critical": 15
|
|
||||||
},
|
|
||||||
"format": "{icon}",
|
|
||||||
"format-charging": "{icon} \udb81\udea5",
|
|
||||||
"format-plugged": "{icon} \udb81\udea5",
|
|
||||||
"format-critical": "{icon} \udb84\ude38",
|
|
||||||
"format-warning": "{icon} \udb84\ude38",
|
|
||||||
"format-icons": [
|
|
||||||
"\udb80\udc7a",
|
|
||||||
"\udb80\udc7c",
|
|
||||||
"\udb80\udc7e",
|
|
||||||
"\udb80\udc80",
|
|
||||||
"\udb80\udc79"
|
|
||||||
],
|
|
||||||
"tooltip-format": "{capacity}% - {timeTo}",
|
|
||||||
"on-click": "$HOME/.config/rofi/scripts/rs_power"
|
|
||||||
},
|
|
||||||
|
|
||||||
"battery#bat2": {
|
|
||||||
"bat": "BAT1",
|
|
||||||
"states": {
|
|
||||||
"warning": 30,
|
|
||||||
"critical": 15
|
|
||||||
},
|
|
||||||
"format": "{icon}",
|
|
||||||
"format-charging": "{icon} \udb81\udea5",
|
|
||||||
"format-plugged": "{icon} \udb81\udea5",
|
|
||||||
"format-critical": "{icon} \udb84\ude38",
|
|
||||||
"format-warning": "{icon} \udb84\ude38",
|
|
||||||
"format-icons": [
|
|
||||||
"\udb80\udc7a",
|
|
||||||
"\udb80\udc7c",
|
|
||||||
"\udb80\udc7e",
|
|
||||||
"\udb80\udc80",
|
|
||||||
"\udb80\udc79"
|
|
||||||
],
|
|
||||||
"tooltip-format": "{capacity}% - {timeTo}",
|
|
||||||
"on-click": "$HOME/.config/fuzzel/scripts/rs_power"
|
|
||||||
},
|
|
||||||
|
|
||||||
"network": {
|
|
||||||
"format-wifi": "\udb81\udda9",
|
|
||||||
"format-ethernet": "\udb80\ude00",
|
|
||||||
"format-disconnected": "\udb80\udd5b",
|
|
||||||
"tooltip-format": "({essid} - {signalStrength}%) - {ifname}: {ipaddr}/{cidr}",
|
|
||||||
"on-click": "$HOME/.config/fuzzel/scripts/rs_wifi"
|
|
||||||
},
|
|
||||||
|
|
||||||
"bluetooth": {
|
|
||||||
"format": "\udb80\udcb2",
|
|
||||||
"format-on": "\udb80\udcaf",
|
|
||||||
"fotmat-off": "\udb80\udcb2",
|
|
||||||
"fotmat-disabled": "\udb80\udcb2",
|
|
||||||
"format-connected": "\udb80\udcb1",
|
|
||||||
"tooltip-format": "{controller_alias}\t{controller_address} ON",
|
|
||||||
"tooltip-format-on": "{controller_alias}\t{controller_address} ON",
|
|
||||||
"tooltip-format-off": "{controller_alias}\t{controller_address} OFF",
|
|
||||||
"tooltip-format-disabled": "{controller_alias}\t{controller_address} OFF",
|
|
||||||
"tooltip-format-connected": "{controller_alias}\t{controller_address} ON\n\n{num_connections} connected\n\n{device_enumerate}",
|
|
||||||
"tooltip-format-enumerate-connected": "{device_alias}\t{device_address}",
|
|
||||||
"tooltip-format-enumerate-connected-battery": "{device_alias}\t{device_address}\t{device_battery_percentage}%",
|
|
||||||
"on-click": "$HOME/.config/fuzzel/scripts/rs_blue",
|
|
||||||
"on-click-right": "bluetoothctl disconnect",
|
|
||||||
"on-click-middle": "bluetoothctl power off"
|
|
||||||
},
|
|
||||||
|
|
||||||
"clock": {
|
|
||||||
"tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>",
|
|
||||||
"format": "\udb82\udd54 {:%H:%M}",
|
|
||||||
"format-alt": "\udb80\udcf5 {:%Y-%m-%d}"
|
|
||||||
},
|
|
||||||
|
|
||||||
"custom/arrow1": {
|
|
||||||
"format": "",
|
|
||||||
"tooltip": false
|
|
||||||
},
|
|
||||||
|
|
||||||
"custom/arrow2": {
|
|
||||||
"format": "",
|
|
||||||
"tooltip": false
|
|
||||||
},
|
|
||||||
|
|
||||||
"custom/arrow3": {
|
|
||||||
"format": "",
|
|
||||||
"tooltip": false
|
|
||||||
},
|
|
||||||
|
|
||||||
"custom/arrow4": {
|
|
||||||
"format": "",
|
|
||||||
"tooltip": false
|
|
||||||
},
|
|
||||||
|
|
||||||
"custom/arrow5": {
|
|
||||||
"format": "",
|
|
||||||
"tooltip": false
|
|
||||||
},
|
|
||||||
|
|
||||||
"custom/arrow6": {
|
|
||||||
"format": "",
|
|
||||||
"tooltip": false
|
|
||||||
},
|
|
||||||
|
|
||||||
"custom/arrow7": {
|
|
||||||
"format": "",
|
|
||||||
"tooltip": false
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,285 +0,0 @@
|
||||||
/* =====================================
|
|
||||||
Colors (Gruvbox Dark)
|
|
||||||
===================================== */
|
|
||||||
@define-color white #fbf1c7;
|
|
||||||
@define-color black #1d2021;
|
|
||||||
@define-color red #cc241d;
|
|
||||||
@define-color green #98971a;
|
|
||||||
@define-color yellow #d79921;
|
|
||||||
@define-color orange #d65d0e;
|
|
||||||
@define-color blue #458588;
|
|
||||||
@define-color purple #b16286;
|
|
||||||
@define-color aqua #689d6a;
|
|
||||||
@define-color gray #a89984;
|
|
||||||
/* Brighter variants */
|
|
||||||
@define-color brwhite #ebdbb2;
|
|
||||||
@define-color brblack #504945;
|
|
||||||
@define-color brgray #928374;
|
|
||||||
@define-color brred #fb4934;
|
|
||||||
@define-color brgreen #b8bb26;
|
|
||||||
@define-color bryellow #fabd2f;
|
|
||||||
@define-color brorange #fe8019;
|
|
||||||
@define-color brblue #83a598;
|
|
||||||
@define-color brpurple #d3869b;
|
|
||||||
@define-color braqua #8ec07c;
|
|
||||||
/* Darker variants */
|
|
||||||
@define-color drred #9d0006;
|
|
||||||
@define-color drgreen #79740e;
|
|
||||||
@define-color drpurple #8f3f71;
|
|
||||||
@define-color drorange #af3a03;
|
|
||||||
@define-color drgray #3c3836;
|
|
||||||
@define-color drblue #076678;
|
|
||||||
@define-color draqua #427b58;
|
|
||||||
@define-color dryellow #b57614;
|
|
||||||
|
|
||||||
/* =====================================
|
|
||||||
Color Definitions for Modules
|
|
||||||
===================================== */
|
|
||||||
@define-color critical @brred;
|
|
||||||
@define-color unfocused @braqua;
|
|
||||||
@define-color focused @red;
|
|
||||||
@define-color inactive @gray;
|
|
||||||
@define-color clock @purple;
|
|
||||||
@define-color monitor @blue;
|
|
||||||
@define-color language @aqua;
|
|
||||||
@define-color idle @green;
|
|
||||||
@define-color powerprofile @green;
|
|
||||||
@define-color battery @green;
|
|
||||||
@define-color volume @yellow;
|
|
||||||
@define-color backlight @orange;
|
|
||||||
@define-color network @red;
|
|
||||||
@define-color wbackground rgba(29, 32, 33, 0.90);
|
|
||||||
|
|
||||||
/* =====================================
|
|
||||||
Keyframes
|
|
||||||
===================================== */
|
|
||||||
@keyframes blink {
|
|
||||||
to {
|
|
||||||
color: @critical;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* =====================================
|
|
||||||
Reset Styles
|
|
||||||
===================================== */
|
|
||||||
* {
|
|
||||||
border: none;
|
|
||||||
border-radius: 0;
|
|
||||||
min-height: 0;
|
|
||||||
padding: 0;
|
|
||||||
box-shadow: none;
|
|
||||||
text-shadow: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* =====================================
|
|
||||||
Button Styles
|
|
||||||
===================================== */
|
|
||||||
button {
|
|
||||||
box-shadow: inset 0 -3px transparent;
|
|
||||||
border: none;
|
|
||||||
border-radius: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Prevent strange hover effect on workspace buttons */
|
|
||||||
button:hover {
|
|
||||||
background: inherit;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* =====================================
|
|
||||||
General Bar Styles
|
|
||||||
===================================== */
|
|
||||||
window#waybar {
|
|
||||||
background-color: @wbackground;
|
|
||||||
font-family: Symbols Nerd Font Mono, Mononoki Nerd Font;
|
|
||||||
font-size: 14px;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* =====================================
|
|
||||||
Workspaces Module
|
|
||||||
===================================== */
|
|
||||||
#workspaces button {
|
|
||||||
font-family: Symbols Nerd Font Mono;
|
|
||||||
font-size: 16px;
|
|
||||||
padding: 0px 0px;
|
|
||||||
margin: 0 0;
|
|
||||||
color: @white;
|
|
||||||
}
|
|
||||||
|
|
||||||
#workspaces button.visible {
|
|
||||||
color: @white;
|
|
||||||
}
|
|
||||||
|
|
||||||
#workspaces button.focused {
|
|
||||||
color: @wbackground;
|
|
||||||
background: @focused;
|
|
||||||
}
|
|
||||||
|
|
||||||
#workspaces button.unfocused {
|
|
||||||
color: @white;
|
|
||||||
}
|
|
||||||
|
|
||||||
#workspaces button.urgent {
|
|
||||||
color: @wbackground;
|
|
||||||
background: @critical;
|
|
||||||
}
|
|
||||||
|
|
||||||
#workspaces button:hover {
|
|
||||||
background: @yellow;
|
|
||||||
color: @black;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* =====================================
|
|
||||||
Mode Module
|
|
||||||
===================================== */
|
|
||||||
#mode {
|
|
||||||
color: @wbackground;
|
|
||||||
background-color: @red;
|
|
||||||
border-bottom: 3px solid @white;
|
|
||||||
padding: 3px;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* =====================================
|
|
||||||
Window Module
|
|
||||||
===================================== */
|
|
||||||
#window {
|
|
||||||
color: @white;
|
|
||||||
padding: 0 10px;
|
|
||||||
margin: 5px 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* =====================================
|
|
||||||
Margins and Layout Adjustments
|
|
||||||
===================================== */
|
|
||||||
#window, #workspaces {
|
|
||||||
margin: 0 4px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.modules-left > widget:first-child > #workspaces {
|
|
||||||
margin-left: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.modules-right > widget:last-child > #workspaces {
|
|
||||||
margin-right: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* =====================================
|
|
||||||
Individual Module Styles
|
|
||||||
===================================== */
|
|
||||||
#cpu,
|
|
||||||
#memory,
|
|
||||||
#language,
|
|
||||||
#idle_inhibitor,
|
|
||||||
#power-profiles-daemon,
|
|
||||||
#battery,
|
|
||||||
#pulseaudio,
|
|
||||||
#backlight,
|
|
||||||
#network,
|
|
||||||
#bluetooth,
|
|
||||||
#clock {
|
|
||||||
color: @white;
|
|
||||||
padding-left: 4px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#clock {
|
|
||||||
background-color: @clock;
|
|
||||||
}
|
|
||||||
|
|
||||||
#cpu {
|
|
||||||
background-color: @monitor;
|
|
||||||
}
|
|
||||||
|
|
||||||
#memory {
|
|
||||||
background-color: @monitor;
|
|
||||||
}
|
|
||||||
|
|
||||||
#language {
|
|
||||||
background-color: @language;
|
|
||||||
}
|
|
||||||
|
|
||||||
#idle_inhibitor {
|
|
||||||
background-color: @battery;
|
|
||||||
}
|
|
||||||
|
|
||||||
#power-profiles-daemon {
|
|
||||||
background-color: @powerprofile;
|
|
||||||
}
|
|
||||||
|
|
||||||
#battery,
|
|
||||||
#battery.charging,
|
|
||||||
#battery.plugged {
|
|
||||||
background-color: @battery;
|
|
||||||
}
|
|
||||||
|
|
||||||
#battery.critical:not(.charging) {
|
|
||||||
color: @white;
|
|
||||||
animation: blink 0.5s linear infinite alternate;
|
|
||||||
}
|
|
||||||
|
|
||||||
#network,
|
|
||||||
#network.disconnected {
|
|
||||||
background-color: @network;
|
|
||||||
}
|
|
||||||
|
|
||||||
#bluetooth,
|
|
||||||
#bluetooth.disconnected {
|
|
||||||
background-color: @network;
|
|
||||||
padding-right: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#pulseaudio,
|
|
||||||
#pulseaudio.muted {
|
|
||||||
background-color: @volume;
|
|
||||||
}
|
|
||||||
|
|
||||||
#backlight {
|
|
||||||
background-color: @backlight;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* =====================================
|
|
||||||
Modeline Arrows
|
|
||||||
===================================== */
|
|
||||||
#custom-arrow1,
|
|
||||||
#custom-arrow2,
|
|
||||||
#custom-arrow3,
|
|
||||||
#custom-arrow4,
|
|
||||||
#custom-arrow5,
|
|
||||||
#custom-arrow6,
|
|
||||||
#custom-arrow7 {
|
|
||||||
font-size: 18pt;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Individual Modeline Arrow Styles */
|
|
||||||
#custom-arrow1 {
|
|
||||||
background: transparent;
|
|
||||||
color: @clock;
|
|
||||||
}
|
|
||||||
|
|
||||||
#custom-arrow2 {
|
|
||||||
background: @clock;
|
|
||||||
color: @monitor;
|
|
||||||
}
|
|
||||||
|
|
||||||
#custom-arrow3 {
|
|
||||||
background: @monitor;
|
|
||||||
color: @language;
|
|
||||||
}
|
|
||||||
|
|
||||||
#custom-arrow4 {
|
|
||||||
background: @language;
|
|
||||||
color: @battery;
|
|
||||||
}
|
|
||||||
|
|
||||||
#custom-arrow5 {
|
|
||||||
background: @battery;
|
|
||||||
color: @volume;
|
|
||||||
}
|
|
||||||
|
|
||||||
#custom-arrow6 {
|
|
||||||
background: @volume;
|
|
||||||
color: @backlight;
|
|
||||||
}
|
|
||||||
|
|
||||||
#custom-arrow7 {
|
|
||||||
background: @backlight;
|
|
||||||
color: @network;
|
|
||||||
}
|
|
|
@ -1,10 +0,0 @@
|
||||||
timeout=500
|
|
||||||
anchor=center
|
|
||||||
border_size=3
|
|
||||||
bar_padding=10
|
|
||||||
border_color=cc241dff
|
|
||||||
background_color=1d2021ff
|
|
||||||
bar_color=fbf1c7ff
|
|
||||||
|
|
||||||
[style.muted]
|
|
||||||
bar_color=cc241dff
|
|
|
@ -1,303 +0,0 @@
|
||||||
# A TOML linter such as https://taplo.tamasfe.dev/ can use this schema to validate your config.
|
|
||||||
# If you encounter any issues, please make an issue at https://github.com/yazi-rs/schemas.
|
|
||||||
"$schema" = "https://yazi-rs.github.io/schemas/keymap.json"
|
|
||||||
|
|
||||||
[manager]
|
|
||||||
|
|
||||||
keymap = [
|
|
||||||
{ on = "<Esc>", run = "escape", desc = "Exit visual mode, clear selected, or cancel search" },
|
|
||||||
{ on = "<C-[>", run = "escape", desc = "Exit visual mode, clear selected, or cancel search" },
|
|
||||||
{ on = "q", run = "quit", desc = "Exit the process" },
|
|
||||||
{ on = "Q", run = "quit --no-cwd-file", desc = "Exit the process without writing cwd-file" },
|
|
||||||
{ on = "<C-c>", run = "close", desc = "Close the current tab, or quit if it is last tab" },
|
|
||||||
{ on = "<C-z>", run = "suspend", desc = "Suspend the process" },
|
|
||||||
|
|
||||||
# Hopping
|
|
||||||
{ on = "k", run = "arrow -1", desc = "Move cursor up" },
|
|
||||||
{ on = "j", run = "arrow 1", desc = "Move cursor down" },
|
|
||||||
|
|
||||||
{ on = "<Up>", run = "arrow -1", desc = "Move cursor up" },
|
|
||||||
{ on = "<Down>", run = "arrow 1", desc = "Move cursor down" },
|
|
||||||
|
|
||||||
{ on = "<C-u>", run = "arrow -50%", desc = "Move cursor up half page" },
|
|
||||||
{ on = "<C-d>", run = "arrow 50%", desc = "Move cursor down half page" },
|
|
||||||
{ on = "<C-b>", run = "arrow -100%", desc = "Move cursor up one page" },
|
|
||||||
{ on = "<C-f>", run = "arrow 100%", desc = "Move cursor down one page" },
|
|
||||||
|
|
||||||
{ on = "<S-PageUp>", run = "arrow -50%", desc = "Move cursor up half page" },
|
|
||||||
{ on = "<S-PageDown>", run = "arrow 50%", desc = "Move cursor down half page" },
|
|
||||||
{ on = "<PageUp>", run = "arrow -100%", desc = "Move cursor up one page" },
|
|
||||||
{ on = "<PageDown>", run = "arrow 100%", desc = "Move cursor down one page" },
|
|
||||||
|
|
||||||
{ on = [ "g", "g" ], run = "arrow -99999999", desc = "Move cursor to the top" },
|
|
||||||
{ on = "G", run = "arrow 99999999", desc = "Move cursor to the bottom" },
|
|
||||||
|
|
||||||
# Navigation
|
|
||||||
{ on = "h", run = "leave", desc = "Go back to the parent directory" },
|
|
||||||
{ on = "l", run = "enter", desc = "Enter the child directory" },
|
|
||||||
|
|
||||||
{ on = "<Left>", run = "leave", desc = "Go back to the parent directory" },
|
|
||||||
{ on = "<Right>", run = "enter", desc = "Enter the child directory" },
|
|
||||||
|
|
||||||
{ on = "H", run = "back", desc = "Go back to the previous directory" },
|
|
||||||
{ on = "L", run = "forward", desc = "Go forward to the next directory" },
|
|
||||||
|
|
||||||
# Seeking
|
|
||||||
{ on = "K", run = "seek -5", desc = "Seek up 5 units in the preview" },
|
|
||||||
{ on = "J", run = "seek 5", desc = "Seek down 5 units in the preview" },
|
|
||||||
|
|
||||||
# Selection
|
|
||||||
{ on = "<Space>", run = [ "select --state=none", "arrow 1" ], desc = "Toggle the current selection state" },
|
|
||||||
{ on = "v", run = "visual_mode", desc = "Enter visual mode (selection mode)" },
|
|
||||||
{ on = "V", run = "visual_mode --unset", desc = "Enter visual mode (unset mode)" },
|
|
||||||
{ on = "<C-a>", run = "select_all --state=true", desc = "Select all files" },
|
|
||||||
{ on = "<C-r>", run = "select_all --state=none", desc = "Inverse selection of all files" },
|
|
||||||
|
|
||||||
# Operation
|
|
||||||
{ on = "o", run = "open", desc = "Open selected files" },
|
|
||||||
{ on = "O", run = "open --interactive", desc = "Open selected files interactively" },
|
|
||||||
{ on = "<Enter>", run = "open", desc = "Open selected files" },
|
|
||||||
{ on = "<S-Enter>", run = "open --interactive", desc = "Open selected files interactively" },
|
|
||||||
{ on = "y", run = "yank", desc = "Yank selected files (copy)" },
|
|
||||||
{ on = "x", run = "yank --cut", desc = "Yank selected files (cut)" },
|
|
||||||
{ on = "p", run = "paste", desc = "Paste yanked files" },
|
|
||||||
{ on = "P", run = "paste --force", desc = "Paste yanked files (overwrite if the destination exists)" },
|
|
||||||
{ on = "-", run = "link", desc = "Symlink the absolute path of yanked files" },
|
|
||||||
{ on = "_", run = "link --relative", desc = "Symlink the relative path of yanked files" },
|
|
||||||
{ on = "<C-->", run = "hardlink", desc = "Hardlink yanked files" },
|
|
||||||
{ on = "Y", run = "unyank", desc = "Cancel the yank status" },
|
|
||||||
{ on = "X", run = "unyank", desc = "Cancel the yank status" },
|
|
||||||
{ on = "d", run = "remove", desc = "Trash selected files" },
|
|
||||||
{ on = "D", run = "remove --permanently", desc = "Permanently delete selected files" },
|
|
||||||
{ on = "a", run = "create", desc = "Create a file (ends with / for directories)" },
|
|
||||||
{ on = "r", run = "rename --cursor=before_ext", desc = "Rename selected file(s)" },
|
|
||||||
{ on = ";", run = "shell --interactive", desc = "Run a shell command" },
|
|
||||||
{ on = ":", run = "shell --block --interactive", desc = "Run a shell command (block until finishes)" },
|
|
||||||
{ on = ".", run = "hidden toggle", desc = "Toggle the visibility of hidden files" },
|
|
||||||
{ on = "s", run = "search fd", desc = "Search files by name using fd" },
|
|
||||||
{ on = "S", run = "search rg", desc = "Search files by content using ripgrep" },
|
|
||||||
{ on = "<C-s>", run = "escape --search", desc = "Cancel the ongoing search" },
|
|
||||||
{ on = "z", run = "plugin zoxide", desc = "Jump to a directory using zoxide" },
|
|
||||||
{ on = "Z", run = "plugin fzf", desc = "Jump to a directory or reveal a file using fzf" },
|
|
||||||
|
|
||||||
# Linemode
|
|
||||||
{ on = [ "m", "s" ], run = "linemode size", desc = "Set linemode to size" },
|
|
||||||
{ on = [ "m", "p" ], run = "linemode permissions", desc = "Set linemode to permissions" },
|
|
||||||
{ on = [ "m", "c" ], run = "linemode ctime", desc = "Set linemode to ctime" },
|
|
||||||
{ on = [ "m", "m" ], run = "linemode mtime", desc = "Set linemode to mtime" },
|
|
||||||
{ on = [ "m", "o" ], run = "linemode owner", desc = "Set linemode to owner" },
|
|
||||||
{ on = [ "m", "n" ], run = "linemode none", desc = "Set linemode to none" },
|
|
||||||
|
|
||||||
# Copy
|
|
||||||
{ on = [ "c", "c" ], run = "copy path", desc = "Copy the file path" },
|
|
||||||
{ on = [ "c", "d" ], run = "copy dirname", desc = "Copy the directory path" },
|
|
||||||
{ on = [ "c", "f" ], run = "copy filename", desc = "Copy the filename" },
|
|
||||||
{ on = [ "c", "n" ], run = "copy name_without_ext", desc = "Copy the filename without extension" },
|
|
||||||
|
|
||||||
# Filter
|
|
||||||
{ on = "f", run = "filter --smart", desc = "Filter files" },
|
|
||||||
|
|
||||||
# Find
|
|
||||||
{ on = "/", run = "find --smart", desc = "Find next file" },
|
|
||||||
{ on = "?", run = "find --previous --smart", desc = "Find previous file" },
|
|
||||||
{ on = "n", run = "find_arrow", desc = "Go to the next found" },
|
|
||||||
{ on = "N", run = "find_arrow --previous", desc = "Go to the previous found" },
|
|
||||||
|
|
||||||
# Sorting
|
|
||||||
{ on = [ ",", "m" ], run = [ "sort modified --reverse=no", "linemode mtime" ], desc = "Sort by modified time" },
|
|
||||||
{ on = [ ",", "M" ], run = [ "sort modified --reverse", "linemode mtime" ], desc = "Sort by modified time (reverse)" },
|
|
||||||
{ on = [ ",", "c" ], run = [ "sort created --reverse=no", "linemode ctime" ], desc = "Sort by created time" },
|
|
||||||
{ on = [ ",", "C" ], run = [ "sort created --reverse", "linemode ctime" ], desc = "Sort by created time (reverse)" },
|
|
||||||
{ on = [ ",", "e" ], run = "sort extension --reverse=no", desc = "Sort by extension" },
|
|
||||||
{ on = [ ",", "E" ], run = "sort extension --reverse", desc = "Sort by extension (reverse)" },
|
|
||||||
{ on = [ ",", "a" ], run = "sort alphabetical --reverse=no", desc = "Sort alphabetically" },
|
|
||||||
{ on = [ ",", "A" ], run = "sort alphabetical --reverse", desc = "Sort alphabetically (reverse)" },
|
|
||||||
{ on = [ ",", "n" ], run = "sort natural --reverse=no", desc = "Sort naturally" },
|
|
||||||
{ on = [ ",", "N" ], run = "sort natural --reverse", desc = "Sort naturally (reverse)" },
|
|
||||||
{ on = [ ",", "s" ], run = [ "sort size --reverse=no", "linemode size" ], desc = "Sort by size" },
|
|
||||||
{ on = [ ",", "S" ], run = [ "sort size --reverse", "linemode size" ], desc = "Sort by size (reverse)" },
|
|
||||||
{ on = [ ",", "r" ], run = "sort random --reverse=no", desc = "Sort randomly" },
|
|
||||||
|
|
||||||
# Goto
|
|
||||||
{ on = [ "g", "h" ], run = "cd ~", desc = "Go to the home directory" },
|
|
||||||
{ on = [ "g", "c" ], run = "cd ~/.config", desc = "Go to the config directory" },
|
|
||||||
{ on = [ "g", "d" ], run = "cd ~/Downloads", desc = "Go to the downloads directory" },
|
|
||||||
{ on = [ "g", "<Space>" ], run = "cd --interactive", desc = "Go to a directory interactively" },
|
|
||||||
|
|
||||||
# Tabs
|
|
||||||
{ on = "t", run = "tab_create --current", desc = "Create a new tab with CWD" },
|
|
||||||
|
|
||||||
{ on = "1", run = "tab_switch 0", desc = "Switch to the first tab" },
|
|
||||||
{ on = "2", run = "tab_switch 1", desc = "Switch to the second tab" },
|
|
||||||
{ on = "3", run = "tab_switch 2", desc = "Switch to the third tab" },
|
|
||||||
{ on = "4", run = "tab_switch 3", desc = "Switch to the fourth tab" },
|
|
||||||
{ on = "5", run = "tab_switch 4", desc = "Switch to the fifth tab" },
|
|
||||||
{ on = "6", run = "tab_switch 5", desc = "Switch to the sixth tab" },
|
|
||||||
{ on = "7", run = "tab_switch 6", desc = "Switch to the seventh tab" },
|
|
||||||
{ on = "8", run = "tab_switch 7", desc = "Switch to the eighth tab" },
|
|
||||||
{ on = "9", run = "tab_switch 8", desc = "Switch to the ninth tab" },
|
|
||||||
|
|
||||||
{ on = "[", run = "tab_switch -1 --relative", desc = "Switch to the previous tab" },
|
|
||||||
{ on = "]", run = "tab_switch 1 --relative", desc = "Switch to the next tab" },
|
|
||||||
|
|
||||||
{ on = "{", run = "tab_swap -1", desc = "Swap current tab with previous tab" },
|
|
||||||
{ on = "}", run = "tab_swap 1", desc = "Swap current tab with next tab" },
|
|
||||||
|
|
||||||
# Tasks
|
|
||||||
{ on = "w", run = "tasks_show", desc = "Show task manager" },
|
|
||||||
|
|
||||||
# Help
|
|
||||||
{ on = "~", run = "help", desc = "Open help" },
|
|
||||||
{ on = "<F1>", run = "help", desc = "Open help" },
|
|
||||||
]
|
|
||||||
|
|
||||||
[tasks]
|
|
||||||
|
|
||||||
keymap = [
|
|
||||||
{ on = "<Esc>", run = "close", desc = "Close task manager" },
|
|
||||||
{ on = "<C-[>", run = "close", desc = "Close task manager" },
|
|
||||||
{ on = "<C-c>", run = "close", desc = "Close task manager" },
|
|
||||||
{ on = "w", run = "close", desc = "Close task manager" },
|
|
||||||
|
|
||||||
{ on = "k", run = "arrow -1", desc = "Move cursor up" },
|
|
||||||
{ on = "j", run = "arrow 1", desc = "Move cursor down" },
|
|
||||||
|
|
||||||
{ on = "<Up>", run = "arrow -1", desc = "Move cursor up" },
|
|
||||||
{ on = "<Down>", run = "arrow 1", desc = "Move cursor down" },
|
|
||||||
|
|
||||||
{ on = "<Enter>", run = "inspect", desc = "Inspect the task" },
|
|
||||||
{ on = "x", run = "cancel", desc = "Cancel the task" },
|
|
||||||
|
|
||||||
# Help
|
|
||||||
{ on = "~", run = "help", desc = "Open help" },
|
|
||||||
{ on = "<F1>", run = "help", desc = "Open help" },
|
|
||||||
]
|
|
||||||
|
|
||||||
[select]
|
|
||||||
|
|
||||||
keymap = [
|
|
||||||
{ on = "<Esc>", run = "close", desc = "Cancel selection" },
|
|
||||||
{ on = "<C-[>", run = "close", desc = "Cancel selection" },
|
|
||||||
{ on = "<C-c>", run = "close", desc = "Cancel selection" },
|
|
||||||
{ on = "<Enter>", run = "close --submit", desc = "Submit the selection" },
|
|
||||||
|
|
||||||
{ on = "k", run = "arrow -1", desc = "Move cursor up" },
|
|
||||||
{ on = "j", run = "arrow 1", desc = "Move cursor down" },
|
|
||||||
|
|
||||||
{ on = "<Up>", run = "arrow -1", desc = "Move cursor up" },
|
|
||||||
{ on = "<Down>", run = "arrow 1", desc = "Move cursor down" },
|
|
||||||
|
|
||||||
# Help
|
|
||||||
{ on = "~", run = "help", desc = "Open help" },
|
|
||||||
{ on = "<F1>", run = "help", desc = "Open help" },
|
|
||||||
]
|
|
||||||
|
|
||||||
[input]
|
|
||||||
|
|
||||||
keymap = [
|
|
||||||
{ on = "<C-c>", run = "close", desc = "Cancel input" },
|
|
||||||
{ on = "<Enter>", run = "close --submit", desc = "Submit the input" },
|
|
||||||
{ on = "<Esc>", run = "escape", desc = "Go back the normal mode, or cancel input" },
|
|
||||||
{ on = "<C-[>", run = "escape", desc = "Go back the normal mode, or cancel input" },
|
|
||||||
|
|
||||||
# Mode
|
|
||||||
{ on = "i", run = "insert", desc = "Enter insert mode" },
|
|
||||||
{ on = "a", run = "insert --append", desc = "Enter append mode" },
|
|
||||||
{ on = "I", run = [ "move -999", "insert" ], desc = "Move to the BOL, and enter insert mode" },
|
|
||||||
{ on = "A", run = [ "move 999", "insert --append" ], desc = "Move to the EOL, and enter append mode" },
|
|
||||||
{ on = "v", run = "visual", desc = "Enter visual mode" },
|
|
||||||
{ on = "V", run = [ "move -999", "visual", "move 999" ], desc = "Enter visual mode and select all" },
|
|
||||||
|
|
||||||
# Character-wise movement
|
|
||||||
{ on = "h", run = "move -1", desc = "Move back a character" },
|
|
||||||
{ on = "l", run = "move 1", desc = "Move forward a character" },
|
|
||||||
{ on = "<Left>", run = "move -1", desc = "Move back a character" },
|
|
||||||
{ on = "<Right>", run = "move 1", desc = "Move forward a character" },
|
|
||||||
{ on = "<C-b>", run = "move -1", desc = "Move back a character" },
|
|
||||||
{ on = "<C-f>", run = "move 1", desc = "Move forward a character" },
|
|
||||||
|
|
||||||
# Word-wise movement
|
|
||||||
{ on = "b", run = "backward", desc = "Move back to the start of the current or previous word" },
|
|
||||||
{ on = "w", run = "forward", desc = "Move forward to the start of the next word" },
|
|
||||||
{ on = "e", run = "forward --end-of-word", desc = "Move forward to the end of the current or next word" },
|
|
||||||
{ on = "<A-b>", run = "backward", desc = "Move back to the start of the current or previous word" },
|
|
||||||
{ on = "<A-f>", run = "forward --end-of-word", desc = "Move forward to the end of the current or next word" },
|
|
||||||
|
|
||||||
# Line-wise movement
|
|
||||||
{ on = "0", run = "move -999", desc = "Move to the BOL" },
|
|
||||||
{ on = "$", run = "move 999", desc = "Move to the EOL" },
|
|
||||||
{ on = "<C-a>", run = "move -999", desc = "Move to the BOL" },
|
|
||||||
{ on = "<C-e>", run = "move 999", desc = "Move to the EOL" },
|
|
||||||
{ on = "<Home>", run = "move -999", desc = "Move to the BOL" },
|
|
||||||
{ on = "<End>", run = "move 999", desc = "Move to the EOL" },
|
|
||||||
|
|
||||||
# Delete
|
|
||||||
{ on = "<Backspace>", run = "backspace", desc = "Delete the character before the cursor" },
|
|
||||||
{ on = "<Delete>", run = "backspace --under", desc = "Delete the character under the cursor" },
|
|
||||||
{ on = "<C-h>", run = "backspace", desc = "Delete the character before the cursor" },
|
|
||||||
{ on = "<C-d>", run = "backspace --under", desc = "Delete the character under the cursor" },
|
|
||||||
|
|
||||||
# Kill
|
|
||||||
{ on = "<C-u>", run = "kill bol", desc = "Kill backwards to the BOL" },
|
|
||||||
{ on = "<C-k>", run = "kill eol", desc = "Kill forwards to the EOL" },
|
|
||||||
{ on = "<C-w>", run = "kill backward", desc = "Kill backwards to the start of the current word" },
|
|
||||||
{ on = "<A-d>", run = "kill forward", desc = "Kill forwards to the end of the current word" },
|
|
||||||
|
|
||||||
# Cut/Yank/Paste
|
|
||||||
{ on = "d", run = "delete --cut", desc = "Cut the selected characters" },
|
|
||||||
{ on = "D", run = [ "delete --cut", "move 999" ], desc = "Cut until the EOL" },
|
|
||||||
{ on = "c", run = "delete --cut --insert", desc = "Cut the selected characters, and enter insert mode" },
|
|
||||||
{ on = "C", run = [ "delete --cut --insert", "move 999" ], desc = "Cut until the EOL, and enter insert mode" },
|
|
||||||
{ on = "x", run = [ "delete --cut", "move 1 --in-operating" ], desc = "Cut the current character" },
|
|
||||||
{ on = "y", run = "yank", desc = "Copy the selected characters" },
|
|
||||||
{ on = "p", run = "paste", desc = "Paste the copied characters after the cursor" },
|
|
||||||
{ on = "P", run = "paste --before", desc = "Paste the copied characters before the cursor" },
|
|
||||||
|
|
||||||
# Undo/Redo
|
|
||||||
{ on = "u", run = "undo", desc = "Undo the last operation" },
|
|
||||||
{ on = "<C-r>", run = "redo", desc = "Redo the last operation" },
|
|
||||||
|
|
||||||
# Help
|
|
||||||
{ on = "~", run = "help", desc = "Open help" },
|
|
||||||
{ on = "<F1>", run = "help", desc = "Open help" },
|
|
||||||
]
|
|
||||||
|
|
||||||
[completion]
|
|
||||||
|
|
||||||
keymap = [
|
|
||||||
{ on = "<C-c>", run = "close", desc = "Cancel completion" },
|
|
||||||
{ on = "<Tab>", run = "close --submit", desc = "Submit the completion" },
|
|
||||||
{ on = "<Enter>", run = [ "close --submit", "close_input --submit" ], desc = "Submit the completion and input" },
|
|
||||||
|
|
||||||
{ on = "<A-k>", run = "arrow -1", desc = "Move cursor up" },
|
|
||||||
{ on = "<A-j>", run = "arrow 1", desc = "Move cursor down" },
|
|
||||||
|
|
||||||
{ on = "<Up>", run = "arrow -1", desc = "Move cursor up" },
|
|
||||||
{ on = "<Down>", run = "arrow 1", desc = "Move cursor down" },
|
|
||||||
|
|
||||||
{ on = "<C-p>", run = "arrow -1", desc = "Move cursor up" },
|
|
||||||
{ on = "<C-n>", run = "arrow 1", desc = "Move cursor down" },
|
|
||||||
|
|
||||||
# Help
|
|
||||||
{ on = "~", run = "help", desc = "Open help" },
|
|
||||||
{ on = "<F1>", run = "help", desc = "Open help" },
|
|
||||||
]
|
|
||||||
|
|
||||||
[help]
|
|
||||||
|
|
||||||
keymap = [
|
|
||||||
{ on = "<Esc>", run = "escape", desc = "Clear the filter, or hide the help" },
|
|
||||||
{ on = "<C-[>", run = "escape", desc = "Clear the filter, or hide the help" },
|
|
||||||
{ on = "q", run = "close", desc = "Exit the process" },
|
|
||||||
{ on = "<C-c>", run = "close", desc = "Hide the help" },
|
|
||||||
|
|
||||||
# Navigation
|
|
||||||
{ on = "k", run = "arrow -1", desc = "Move cursor up" },
|
|
||||||
{ on = "j", run = "arrow 1", desc = "Move cursor down" },
|
|
||||||
|
|
||||||
{ on = "<Up>", run = "arrow -1", desc = "Move cursor up" },
|
|
||||||
{ on = "<Down>", run = "arrow 1", desc = "Move cursor down" },
|
|
||||||
|
|
||||||
# Filtering
|
|
||||||
{ on = "f", run = "filter", desc = "Apply a filter for the help items" },
|
|
||||||
]
|
|
|
@ -1,146 +0,0 @@
|
||||||
# vim:fileencoding=utf-8:foldmethod=marker
|
|
||||||
|
|
||||||
# : Manager {{{
|
|
||||||
|
|
||||||
[manager]
|
|
||||||
cwd = { fg = "#83a598" }
|
|
||||||
|
|
||||||
# Hovered
|
|
||||||
hovered = { fg = "#282828", bg = "#83a598" }
|
|
||||||
preview_hovered = { underline = true }
|
|
||||||
|
|
||||||
# Find
|
|
||||||
find_keyword = { fg = "#b8bb26", italic = true }
|
|
||||||
find_position = { fg = "#fe8019", bg = "reset", italic = true }
|
|
||||||
|
|
||||||
# Marker
|
|
||||||
marker_selected = { fg = "#b8bb26", bg = "#b8bb26" }
|
|
||||||
marker_copied = { fg = "#b8bb26", bg = "#b8bb26" }
|
|
||||||
marker_cut = { fg = "#fb4934", bg = "#fb4934" }
|
|
||||||
|
|
||||||
# Tab
|
|
||||||
tab_active = { fg = "#282828", bg = "#504945" }
|
|
||||||
tab_inactive = { fg = "#a89984", bg = "#3c3836" }
|
|
||||||
tab_width = 1
|
|
||||||
|
|
||||||
# Border
|
|
||||||
border_symbol = "│"
|
|
||||||
border_style = { fg = "#665c54" }
|
|
||||||
|
|
||||||
# Highlighting
|
|
||||||
# syntect_theme = "~/.config/yazi/Gruvbox-Dark.tmTheme"
|
|
||||||
|
|
||||||
# : }}}
|
|
||||||
|
|
||||||
|
|
||||||
# : Status {{{
|
|
||||||
|
|
||||||
[status]
|
|
||||||
separator_open = ""
|
|
||||||
separator_close = ""
|
|
||||||
separator_style = { fg = "#3c3836", bg = "#3c3836" }
|
|
||||||
|
|
||||||
# Mode
|
|
||||||
mode_normal = { fg = "#282828", bg = "#A89984", bold = true }
|
|
||||||
mode_select = { fg = "#282828", bg = "#b8bb26", bold = true }
|
|
||||||
mode_unset = { fg = "#282828", bg = "#d3869b", bold = true }
|
|
||||||
|
|
||||||
# Progress
|
|
||||||
progress_label = { fg = "#ebdbb2", bold = true }
|
|
||||||
progress_normal = { fg = "#504945", bg = "#3c3836" }
|
|
||||||
progress_error = { fg = "#fb4934", bg = "#3c3836" }
|
|
||||||
|
|
||||||
# Permissions
|
|
||||||
permissions_t = { fg = "#504945" }
|
|
||||||
permissions_r = { fg = "#b8bb26" }
|
|
||||||
permissions_w = { fg = "#fb4934" }
|
|
||||||
permissions_x = { fg = "#b8bb26" }
|
|
||||||
permissions_s = { fg = "#665c54" }
|
|
||||||
|
|
||||||
# : }}}
|
|
||||||
|
|
||||||
|
|
||||||
# : Input {{{
|
|
||||||
|
|
||||||
[input]
|
|
||||||
border = { fg = "#bdae93" }
|
|
||||||
title = {}
|
|
||||||
value = {}
|
|
||||||
selected = { reversed = true }
|
|
||||||
|
|
||||||
# : }}}
|
|
||||||
|
|
||||||
|
|
||||||
# : Select {{{
|
|
||||||
|
|
||||||
[select]
|
|
||||||
border = { fg = "#504945" }
|
|
||||||
active = { fg = "#fe8019" }
|
|
||||||
inactive = {}
|
|
||||||
|
|
||||||
# : }}}
|
|
||||||
|
|
||||||
|
|
||||||
# : Tasks {{{
|
|
||||||
|
|
||||||
[tasks]
|
|
||||||
border = { fg = "#504945" }
|
|
||||||
title = {}
|
|
||||||
hovered = { underline = true }
|
|
||||||
|
|
||||||
# : }}}
|
|
||||||
|
|
||||||
|
|
||||||
# : Which {{{
|
|
||||||
|
|
||||||
[which]
|
|
||||||
mask = { bg = "#3c3836" }
|
|
||||||
cand = { fg = "#83a598" }
|
|
||||||
rest = { fg = "#928374" }
|
|
||||||
desc = { fg = "#fe8019" }
|
|
||||||
separator = " "
|
|
||||||
separator_style = { fg = "#504945" }
|
|
||||||
|
|
||||||
# : }}}
|
|
||||||
|
|
||||||
|
|
||||||
# : Help {{{
|
|
||||||
|
|
||||||
[help]
|
|
||||||
on = { fg = "#fe8019" }
|
|
||||||
exec = { fg = "#83a598" }
|
|
||||||
desc = { fg = "#928374" }
|
|
||||||
hovered = { bg = "#504945", bold = true }
|
|
||||||
footer = { fg = "#3c3836", bg = "#a89984" }
|
|
||||||
|
|
||||||
# : }}}
|
|
||||||
|
|
||||||
|
|
||||||
# : File-specific styles {{{
|
|
||||||
|
|
||||||
[filetype]
|
|
||||||
|
|
||||||
rules = [
|
|
||||||
# Images
|
|
||||||
{ mime = "image/*", fg = "#83a598" },
|
|
||||||
|
|
||||||
# Videos
|
|
||||||
{ mime = "video/*", fg = "#b8bb26" },
|
|
||||||
{ mime = "audio/*", fg = "#b8bb26" },
|
|
||||||
|
|
||||||
# Archives
|
|
||||||
{ mime = "application/zip", fg = "#fe8019" },
|
|
||||||
{ mime = "application/gzip", fg = "#fe8019" },
|
|
||||||
{ mime = "application/x-tar", fg = "#fe8019" },
|
|
||||||
{ mime = "application/x-bzip", fg = "#fe8019" },
|
|
||||||
{ mime = "application/x-bzip2", fg = "#fe8019" },
|
|
||||||
{ mime = "application/x-7z-compressed", fg = "#fe8019" },
|
|
||||||
{ mime = "application/x-rar", fg = "#fe8019" },
|
|
||||||
|
|
||||||
# Fallback
|
|
||||||
{ name = "*", fg = "#a89984" },
|
|
||||||
{ name = "*/", fg = "#83a598" }
|
|
||||||
]
|
|
||||||
|
|
||||||
# : }}}
|
|
||||||
|
|
|
@ -1,201 +0,0 @@
|
||||||
# A TOML linter such as https://taplo.tamasfe.dev/ can use this schema to validate your config.
|
|
||||||
# If you encounter any issues, please make an issue at https://github.com/yazi-rs/schemas.
|
|
||||||
"$schema" = "https://yazi-rs.github.io/schemas/yazi.json"
|
|
||||||
|
|
||||||
[manager]
|
|
||||||
ratio = [ 1, 4, 3 ]
|
|
||||||
sort_by = "natural"
|
|
||||||
sort_sensitive = false
|
|
||||||
sort_reverse = false
|
|
||||||
sort_dir_first = true
|
|
||||||
sort_translit = false
|
|
||||||
linemode = "none"
|
|
||||||
show_hidden = false
|
|
||||||
show_symlink = true
|
|
||||||
scrolloff = 5
|
|
||||||
mouse_events = [ "click", "scroll" ]
|
|
||||||
title_format = "Yazi: {cwd}"
|
|
||||||
|
|
||||||
[preview]
|
|
||||||
tab_size = 2
|
|
||||||
max_width = 600
|
|
||||||
max_height = 900
|
|
||||||
cache_dir = ""
|
|
||||||
image_filter = "triangle"
|
|
||||||
image_quality = 75
|
|
||||||
sixel_fraction = 15
|
|
||||||
ueberzug_scale = 1
|
|
||||||
ueberzug_offset = [ 0, 0, 0, 0 ]
|
|
||||||
|
|
||||||
[opener]
|
|
||||||
edit = [
|
|
||||||
{ run = '${EDITOR:-vi} "$@"', desc = "$EDITOR", block = true, for = "unix" },
|
|
||||||
{ run = 'code %*', orphan = true, desc = "code", for = "windows" },
|
|
||||||
{ run = 'code -w %*', block = true, desc = "code (block)", for = "windows" },
|
|
||||||
]
|
|
||||||
open = [
|
|
||||||
{ run = 'xdg-open "$1"', desc = "Open", for = "linux" },
|
|
||||||
{ run = 'open "$@"', desc = "Open", for = "macos" },
|
|
||||||
{ run = 'start "" "%1"', orphan = true, desc = "Open", for = "windows" },
|
|
||||||
]
|
|
||||||
reveal = [
|
|
||||||
{ run = 'xdg-open "$(dirname "$1")"', desc = "Reveal", for = "linux" },
|
|
||||||
{ run = 'open -R "$1"', desc = "Reveal", for = "macos" },
|
|
||||||
{ run = 'explorer /select,"%1"', orphan = true, desc = "Reveal", for = "windows" },
|
|
||||||
{ run = '''exiftool "$1"; echo "Press enter to exit"; read _''', block = true, desc = "Show EXIF", for = "unix" },
|
|
||||||
]
|
|
||||||
extract = [
|
|
||||||
{ run = 'ya pub extract --list "$@"', desc = "Extract here", for = "unix" },
|
|
||||||
{ run = 'ya pub extract --list %*', desc = "Extract here", for = "windows" },
|
|
||||||
]
|
|
||||||
play = [
|
|
||||||
{ run = 'mpv --force-window "$@"', orphan = true, for = "unix" },
|
|
||||||
{ run = 'mpv --force-window %*', orphan = true, for = "windows" },
|
|
||||||
{ run = '''mediainfo "$1"; echo "Press enter to exit"; read _''', block = true, desc = "Show media info", for = "unix" },
|
|
||||||
]
|
|
||||||
|
|
||||||
[open]
|
|
||||||
rules = [
|
|
||||||
# Folder
|
|
||||||
{ name = "*/", use = [ "edit", "open", "reveal" ] },
|
|
||||||
# Text
|
|
||||||
{ mime = "text/*", use = [ "edit", "reveal" ] },
|
|
||||||
# Image
|
|
||||||
{ mime = "image/*", use = [ "open", "reveal" ] },
|
|
||||||
# Media
|
|
||||||
{ mime = "{audio,video}/*", use = [ "play", "reveal" ] },
|
|
||||||
# Archive
|
|
||||||
{ mime = "application/{,g}zip", use = [ "extract", "reveal" ] },
|
|
||||||
{ mime = "application/x-{tar,bzip*,7z-compressed,xz,rar}", use = [ "extract", "reveal" ] },
|
|
||||||
# JSON
|
|
||||||
{ mime = "application/{json,x-ndjson}", use = [ "edit", "reveal" ] },
|
|
||||||
{ mime = "*/javascript", use = [ "edit", "reveal" ] },
|
|
||||||
# Empty file
|
|
||||||
{ mime = "inode/x-empty", use = [ "edit", "reveal" ] },
|
|
||||||
# Fallback
|
|
||||||
{ name = "*", use = [ "open", "reveal" ] },
|
|
||||||
]
|
|
||||||
|
|
||||||
[tasks]
|
|
||||||
micro_workers = 10
|
|
||||||
macro_workers = 25
|
|
||||||
bizarre_retry = 5
|
|
||||||
image_alloc = 536870912 # 512MB
|
|
||||||
image_bound = [ 0, 0 ]
|
|
||||||
suppress_preload = false
|
|
||||||
|
|
||||||
[plugin]
|
|
||||||
|
|
||||||
fetchers = [
|
|
||||||
# Mimetype
|
|
||||||
{ id = "mime", name = "*", run = "mime", if = "!mime", prio = "high" },
|
|
||||||
]
|
|
||||||
preloaders = [
|
|
||||||
# Image
|
|
||||||
{ mime = "image/{avif,hei?,jxl,svg+xml}", run = "magick" },
|
|
||||||
{ mime = "image/*", run = "image" },
|
|
||||||
# Video
|
|
||||||
{ mime = "video/*", run = "video" },
|
|
||||||
# PDF
|
|
||||||
{ mime = "application/pdf", run = "pdf" },
|
|
||||||
# Font
|
|
||||||
{ mime = "font/*", run = "font" },
|
|
||||||
{ mime = "application/vnd.ms-opentype", run = "font" },
|
|
||||||
]
|
|
||||||
previewers = [
|
|
||||||
{ name = "*/", run = "folder", sync = true },
|
|
||||||
# Code
|
|
||||||
{ mime = "text/*", run = "code" },
|
|
||||||
{ mime = "*/{xml,javascript,x-wine-extension-ini}", run = "code" },
|
|
||||||
# JSON
|
|
||||||
{ mime = "application/{json,x-ndjson}", run = "json" },
|
|
||||||
# Image
|
|
||||||
{ mime = "image/{avif,hei?,jxl,svg+xml}", run = "magick" },
|
|
||||||
{ mime = "image/*", run = "image" },
|
|
||||||
# Video
|
|
||||||
{ mime = "video/*", run = "video" },
|
|
||||||
# PDF
|
|
||||||
{ mime = "application/pdf", run = "pdf" },
|
|
||||||
# Archive
|
|
||||||
{ mime = "application/{,g}zip", run = "archive" },
|
|
||||||
{ mime = "application/x-{tar,bzip*,7z-compressed,xz,rar,iso9660-image}", run = "archive" },
|
|
||||||
# Font
|
|
||||||
{ mime = "font/*", run = "font" },
|
|
||||||
{ mime = "application/vnd.ms-opentype", run = "font" },
|
|
||||||
# Empty file
|
|
||||||
{ mime = "inode/x-empty", run = "empty" },
|
|
||||||
# Fallback
|
|
||||||
{ name = "*", run = "file" },
|
|
||||||
]
|
|
||||||
|
|
||||||
[input]
|
|
||||||
cursor_blink = false
|
|
||||||
|
|
||||||
# cd
|
|
||||||
cd_title = "Change directory:"
|
|
||||||
cd_origin = "top-center"
|
|
||||||
cd_offset = [ 0, 2, 50, 3 ]
|
|
||||||
|
|
||||||
# create
|
|
||||||
create_title = "Create:"
|
|
||||||
create_origin = "top-center"
|
|
||||||
create_offset = [ 0, 2, 50, 3 ]
|
|
||||||
|
|
||||||
# rename
|
|
||||||
rename_title = "Rename:"
|
|
||||||
rename_origin = "hovered"
|
|
||||||
rename_offset = [ 0, 1, 50, 3 ]
|
|
||||||
|
|
||||||
# trash
|
|
||||||
trash_title = "Move {n} selected file{s} to trash? (y/N)"
|
|
||||||
trash_origin = "top-center"
|
|
||||||
trash_offset = [ 0, 2, 50, 3 ]
|
|
||||||
|
|
||||||
# delete
|
|
||||||
delete_title = "Delete {n} selected file{s} permanently? (y/N)"
|
|
||||||
delete_origin = "top-center"
|
|
||||||
delete_offset = [ 0, 2, 50, 3 ]
|
|
||||||
|
|
||||||
# filter
|
|
||||||
filter_title = "Filter:"
|
|
||||||
filter_origin = "top-center"
|
|
||||||
filter_offset = [ 0, 2, 50, 3 ]
|
|
||||||
|
|
||||||
# find
|
|
||||||
find_title = [ "Find next:", "Find previous:" ]
|
|
||||||
find_origin = "top-center"
|
|
||||||
find_offset = [ 0, 2, 50, 3 ]
|
|
||||||
|
|
||||||
# search
|
|
||||||
search_title = "Search via {n}:"
|
|
||||||
search_origin = "top-center"
|
|
||||||
search_offset = [ 0, 2, 50, 3 ]
|
|
||||||
|
|
||||||
# shell
|
|
||||||
shell_title = [ "Shell:", "Shell (block):" ]
|
|
||||||
shell_origin = "top-center"
|
|
||||||
shell_offset = [ 0, 2, 50, 3 ]
|
|
||||||
|
|
||||||
# overwrite
|
|
||||||
overwrite_title = "Overwrite an existing file? (y/N)"
|
|
||||||
overwrite_origin = "top-center"
|
|
||||||
overwrite_offset = [ 0, 2, 50, 3 ]
|
|
||||||
|
|
||||||
# quit
|
|
||||||
quit_title = "{n} task{s} running, sure to quit? (y/N)"
|
|
||||||
quit_origin = "top-center"
|
|
||||||
quit_offset = [ 0, 2, 50, 3 ]
|
|
||||||
|
|
||||||
[select]
|
|
||||||
open_title = "Open with:"
|
|
||||||
open_origin = "hovered"
|
|
||||||
open_offset = [ 0, 1, 50, 7 ]
|
|
||||||
|
|
||||||
[which]
|
|
||||||
sort_by = "none"
|
|
||||||
sort_sensitive = false
|
|
||||||
sort_reverse = false
|
|
||||||
sort_translit = false
|
|
||||||
|
|
||||||
[log]
|
|
||||||
enabled = false
|
|
|
@ -5,7 +5,7 @@
|
||||||
## /_____/_/ \__,_/_/|_|\___/ My custom zathura config
|
## /_____/_/ \__,_/_/|_|\___/ My custom zathura config
|
||||||
##
|
##
|
||||||
|
|
||||||
set font "mononoki Nerd Font 9"
|
set font "mononoki Nerd Font 12"
|
||||||
set default-bg "#262626" #00
|
set default-bg "#262626" #00
|
||||||
set default-fg "#ebdbb2" #01
|
set default-fg "#ebdbb2" #01
|
||||||
|
|
||||||
|
|
|
@ -1,28 +0,0 @@
|
||||||
// Zed keymap
|
|
||||||
//
|
|
||||||
// For information on binding keys, see the Zed
|
|
||||||
// documentation: https://zed.dev/docs/key-bindings
|
|
||||||
//
|
|
||||||
// To see the default key bindings run `zed: open default keymap`
|
|
||||||
// from the command palette.
|
|
||||||
[
|
|
||||||
{
|
|
||||||
"context": "Workspace",
|
|
||||||
"bindings": {
|
|
||||||
// "shift shift": "file_finder::Toggle"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"context": "Editor",
|
|
||||||
"bindings": {
|
|
||||||
// "j k": ["workspace::SendKeystrokes", "escape"]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"context": "Terminal",
|
|
||||||
"bindings": {
|
|
||||||
"ctrl-w": "pane::CloseActiveItem", // Don't pass ctrl-w to terminal, let Zed handle it.
|
|
||||||
"ctrl-`": "workspace::ToggleBottomDock" // match vscode behavior
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
|
@ -1,96 +0,0 @@
|
||||||
// Zed settings
|
|
||||||
//
|
|
||||||
// For information on how to configure Zed, see the Zed
|
|
||||||
// documentation: https://zed.dev/docs/configuring-zed
|
|
||||||
//
|
|
||||||
// To see all of Zed's default settings without changing your
|
|
||||||
// custom settings, run `zed: open default settings` from the
|
|
||||||
// command palette
|
|
||||||
{
|
|
||||||
// don't prompt for updates
|
|
||||||
"auto_update": false,
|
|
||||||
|
|
||||||
// editor settings
|
|
||||||
"autosave": "on_focus_change",
|
|
||||||
"confirm_quit": true,
|
|
||||||
"tab_size": 4,
|
|
||||||
"ui_font_size": 16,
|
|
||||||
"buffer_font_size": 16,
|
|
||||||
"soft_wrap": "editor_width",
|
|
||||||
"hard_tabs": false,
|
|
||||||
"vim_mode": true,
|
|
||||||
"search": {
|
|
||||||
"regex": true // allow regex search
|
|
||||||
},
|
|
||||||
|
|
||||||
// specific languages settings
|
|
||||||
"languages": {
|
|
||||||
"Dart": {
|
|
||||||
"tab_size": 2
|
|
||||||
},
|
|
||||||
"LaTeX": {
|
|
||||||
"tab_size": 2
|
|
||||||
},
|
|
||||||
"JSON": {
|
|
||||||
"tab_size": 2
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
// theme settings
|
|
||||||
"theme": {
|
|
||||||
"mode": "system",
|
|
||||||
"light": "Gruvbox Dark Hard",
|
|
||||||
"dark": "Gruvbox Dark Hard"
|
|
||||||
},
|
|
||||||
|
|
||||||
// terminal settings
|
|
||||||
"terminal": {
|
|
||||||
"shell": {
|
|
||||||
"program": "fish"
|
|
||||||
},
|
|
||||||
"blinking": "on"
|
|
||||||
},
|
|
||||||
|
|
||||||
// configure tabs UI
|
|
||||||
"tabs": {
|
|
||||||
"close_position": "right",
|
|
||||||
"file_icons": true,
|
|
||||||
"git_status": true
|
|
||||||
},
|
|
||||||
|
|
||||||
// settings for project panel and outline panel
|
|
||||||
"project_panel": {
|
|
||||||
"button": true,
|
|
||||||
"default_width": 300,
|
|
||||||
"dock": "left",
|
|
||||||
"indent_size": 10
|
|
||||||
},
|
|
||||||
"outline_panel": {
|
|
||||||
"button": true,
|
|
||||||
"default_width": 200,
|
|
||||||
"dock": "right",
|
|
||||||
"indent_size": 15
|
|
||||||
},
|
|
||||||
|
|
||||||
// disable panels I don't need
|
|
||||||
"chat_panel": {
|
|
||||||
"button": false
|
|
||||||
},
|
|
||||||
"collaboration_panel": {
|
|
||||||
"button": false
|
|
||||||
},
|
|
||||||
"assistant": {
|
|
||||||
"button": false,
|
|
||||||
"version": "2"
|
|
||||||
},
|
|
||||||
"features": {
|
|
||||||
"copilot": false,
|
|
||||||
"inline_completion_provider": "none"
|
|
||||||
},
|
|
||||||
|
|
||||||
// disable telemetry
|
|
||||||
"telemetry": {
|
|
||||||
"diagnostics": false,
|
|
||||||
"metrics": false
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -140,6 +140,7 @@
|
||||||
# 330859bc-7506-492d-9370-9a6f0614037f (BlueZ Experimental Bluetooth Quality Report)
|
# 330859bc-7506-492d-9370-9a6f0614037f (BlueZ Experimental Bluetooth Quality Report)
|
||||||
# a6695ace-ee7f-4fb9-881a-5fac66c629af (BlueZ Experimental Offload Codecs)
|
# a6695ace-ee7f-4fb9-881a-5fac66c629af (BlueZ Experimental Offload Codecs)
|
||||||
# 6fbaf188-05e0-496a-9885-d6ddfdb4e03e (BlueZ Experimental ISO socket)
|
# 6fbaf188-05e0-496a-9885-d6ddfdb4e03e (BlueZ Experimental ISO socket)
|
||||||
|
# 69518c4c-b69f-4679-8bc1-c021b47b5733 (BlueZ Experimental Poll Errqueue)
|
||||||
# Defaults to false.
|
# Defaults to false.
|
||||||
#KernelExperimental = false
|
#KernelExperimental = false
|
||||||
|
|
||||||
|
|
25
etc/crypttab
|
@ -1,13 +1,14 @@
|
||||||
# Configuration for encrypted block devices.
|
# crypttab: mappings for encrypted partitions
|
||||||
# See crypttab(5) for details.
|
#
|
||||||
|
# Each mapped device will be created in /dev/mapper, so your /etc/fstab
|
||||||
|
# should use the /dev/mapper/<name> paths for encrypted devices.
|
||||||
|
#
|
||||||
|
# NOTE: Do not list your root (/) partition here.
|
||||||
|
|
||||||
# NOTE: Do not list your root (/) partition here, it must be set up
|
# <name> <device> <password> <options>
|
||||||
# beforehand by the initramfs (/etc/mkinitcpio.conf).
|
# home /dev/hda4 /etc/mypassword1
|
||||||
|
# data1 /dev/hda3 /etc/mypassword2
|
||||||
# <name> <device> <password> <options>
|
# data2 /dev/hda5 /etc/cryptfs.key
|
||||||
# home UUID=b8ad5c18-f445-495d-9095-c9ec4f9d2f37 /etc/mypassword1
|
# swap /dev/hdx4 /dev/urandom swap,cipher=aes-cbc-essiv:sha256,size=256
|
||||||
# data1 /dev/sda3 /etc/mypassword2
|
# vol /dev/hdb7 none
|
||||||
# data2 /dev/sda5 /etc/cryptfs.key
|
# <lvmname> <device> /boot/volume.key luks
|
||||||
# swap /dev/sdx4 /dev/urandom swap,cipher=aes-cbc-essiv:sha256,size=256
|
|
||||||
# vol /dev/sdb7 none
|
|
||||||
LVMNAME /path/device /path/key luks
|
|
||||||
|
|
|
@ -1,63 +1,23 @@
|
||||||
# GRUB boot loader configuration
|
#
|
||||||
|
# Configuration file for GRUB.
|
||||||
|
#
|
||||||
GRUB_DEFAULT=0
|
GRUB_DEFAULT=0
|
||||||
GRUB_TIMEOUT=2
|
GRUB_HIDDEN_TIMEOUT=1
|
||||||
GRUB_DISTRIBUTOR="Arch"
|
GRUB_HIDDEN_TIMEOUT_QUIET=true
|
||||||
GRUB_CMDLINE_LINUX_DEFAULT="rd.luks.uuid=UUID rd.luks.name=UUID=LVMNAME rd.luks.key=UUID=KEYPATH loglevel=3 quiet systemd.show_status=auto rd.udev.log_level=3"
|
GRUB_TIMEOUT=0
|
||||||
GRUB_CMDLINE_LINUX=""
|
GRUB_DISTRIBUTOR="Void"
|
||||||
|
GRUB_CMDLINE_LINUX_DEFAULT="loglevel=3 quiet"
|
||||||
# Preload both GPT and MBR modules so that they are not missed
|
#GRUB_CMDLINE_LINUX_DEFAULT="rd.luks.uuid=<uuid> rd.luks.vg=<vgname> loglevel=3 quiet"
|
||||||
GRUB_PRELOAD_MODULES="part_gpt part_msdos"
|
|
||||||
|
|
||||||
# Uncomment to enable booting from LUKS encrypted devices
|
|
||||||
GRUB_ENABLE_CRYPTODISK=y
|
GRUB_ENABLE_CRYPTODISK=y
|
||||||
|
|
||||||
# Set to 'countdown' or 'hidden' to change timeout behavior,
|
|
||||||
# press ESC key to display menu.
|
|
||||||
GRUB_TIMEOUT_STYLE=hidden
|
|
||||||
|
|
||||||
# Uncomment to use basic console
|
# Uncomment to use basic console
|
||||||
GRUB_TERMINAL_INPUT=console
|
#GRUB_TERMINAL_INPUT="console"
|
||||||
|
|
||||||
# Uncomment to disable graphical terminal
|
# Uncomment to disable graphical terminal
|
||||||
#GRUB_TERMINAL_OUTPUT=console
|
#GRUB_TERMINAL_OUTPUT=console
|
||||||
|
#GRUB_BACKGROUND=/usr/share/void-artwork/splash.png
|
||||||
# The resolution used on graphical terminal
|
#GRUB_GFXMODE=1920x1080x32
|
||||||
# note that you can use only modes which your graphic card supports via VBE
|
|
||||||
# you can see them in real GRUB with the command `videoinfo'
|
|
||||||
GRUB_GFXMODE=auto
|
|
||||||
|
|
||||||
# Uncomment to allow the kernel use the same resolution used by grub
|
|
||||||
GRUB_GFXPAYLOAD_LINUX=keep
|
|
||||||
|
|
||||||
# Uncomment if you want GRUB to pass to the Linux kernel the old parameter
|
|
||||||
# format "root=/dev/xxx" instead of "root=/dev/disk/by-uuid/xxx"
|
|
||||||
#GRUB_DISABLE_LINUX_UUID=true
|
#GRUB_DISABLE_LINUX_UUID=true
|
||||||
|
#GRUB_DISABLE_RECOVERY=true
|
||||||
# Uncomment to disable generation of recovery mode menu entries
|
|
||||||
GRUB_DISABLE_RECOVERY=true
|
|
||||||
|
|
||||||
# Uncomment and set to the desired menu colors. Used by normal and wallpaper
|
# Uncomment and set to the desired menu colors. Used by normal and wallpaper
|
||||||
# modes only. Entries specified as foreground/background.
|
# modes only. Entries specified as foreground/background.
|
||||||
#GRUB_COLOR_NORMAL="light-blue/black"
|
#GRUB_COLOR_NORMAL="light-blue/black"
|
||||||
#GRUB_COLOR_HIGHLIGHT="light-cyan/blue"
|
#GRUB_COLOR_HIGHLIGHT="light-cyan/blue"
|
||||||
|
|
||||||
# Uncomment one of them for the gfx desired, a image background or a gfxtheme
|
|
||||||
#GRUB_BACKGROUND="/path/to/wallpaper"
|
|
||||||
#GRUB_THEME="/path/to/gfxtheme"
|
|
||||||
|
|
||||||
# Uncomment to get a beep at GRUB start
|
|
||||||
#GRUB_INIT_TUNE="480 440 1"
|
|
||||||
|
|
||||||
# Uncomment to make GRUB remember the last selection. This requires
|
|
||||||
# setting 'GRUB_DEFAULT=saved' above.
|
|
||||||
#GRUB_SAVEDEFAULT=true
|
|
||||||
|
|
||||||
# Uncomment to disable submenus in boot menu
|
|
||||||
#GRUB_DISABLE_SUBMENU=y
|
|
||||||
|
|
||||||
# Probing for other operating systems is disabled for security reasons. Read
|
|
||||||
# documentation on GRUB_DISABLE_OS_PROBER, if still want to enable this
|
|
||||||
# functionality install os-prober and uncomment to detect and include other
|
|
||||||
# operating systems.
|
|
||||||
#GRUB_DISABLE_OS_PROBER=false
|
|
||||||
|
|
24
etc/issue
|
@ -1,13 +1,13 @@
|
||||||
[0;37;40m
|
[H[2J[3J
|
||||||
[1;34;40m [0;37;40m [1;34;40m [0;37;40m [1;34;40m [0;37;40m [1;37;40m###[0;37;40m [1;34;40m###[0;37;40m [1;37;40m##[0;37;40m
|
\e[H\e[2J
|
||||||
[1;34;40m [0;37;40m [1;34;40m [0;37;40m [1;37;40m##[0;37;40m [1;34;40m##[0;37;40m
|
\e[0;32m
|
||||||
[1;34;40m┌ #### [1;37;40m###[0;37;40m [1;37;40m###[0;37;40m [1;34;40m [0;37;40m [1;37;40m####[0;37;40m [1;34;40m [0;37;40m [1;37;40m##[0;37;40m [1;37;40m###[0;37;40m [1;34;40m##[0;37;40m [1;37;40m### ###[0;37;40m [1;37;40m###[0;37;40m [1;37;40m###[0;37;40m [1;37;40m###[0;37;40m [1;31;40m ###[0;37;40m [1;31;40m###[0;37;40m
|
_______
|
||||||
[1;34;40m│ [0;37;40m [1;34;40m## [0;37;40m [1;37;40m###[0;37;40m [1;37;40m##[1;34;40m [0;37;40m [1;37;40m##[0;37;40m [1;34;40m [0;37;40m [1;37;40m###[0;37;40m [1;31;40m [1;37;40m##[0;37;40m [1;34;40m##[0;37;40m [1;37;40m##[0;37;40m [1;37;40m###[0;37;40m [1;37;40m##[0;37;40m [1;37;40m##[0;37;40m [1;37;40m##[0;37;40m [1;31;40m [0;37;40m [1;31;40m##[0;37;40m [1;31;40m##[0;37;40m
|
\\_____ `- ____ ____ .__ .___ .____ .__
|
||||||
[1;34;40m│ ##### [0;37;40m [1;37;40m##[0;37;40m [1;34;40m [0;37;40m [1;37;40m##[0;37;40m [1;34;40m [0;37;40m [1;37;40m##[0;37;40m [1;37;40m##[0;37;40m [1;34;40m##[0;37;40m [1;37;40m##[0;37;40m [1;37;40m##[0;37;40m [1;37;40m##[0;37;40m [1;37;40m##[0;37;40m [1;37;40m##[0;37;40m [1;31;40m [0;37;40m [1;31;40m###[0;37;40m
|
/\\ ___ `- \\ \\ \\ / /___ |__| __| _/ | | |__| ____ __ _____ ___
|
||||||
[1;34;40m│ ##[0;37;40m [1;34;40m## [0;37;40m [1;37;40m##[0;37;40m [1;34;40m [0;37;40m [1;37;40m##[0;37;40m [1;34;40m [0;37;40m [1;37;40m##[0;37;40m [1;37;40m##[0;37;40m [1;34;40m##[0;37;40m [1;37;40m##[0;37;40m [1;37;40m##[0;37;40m [1;37;40m##[0;37;40m [1;37;40m##[0;37;40m [1;37;40m ##[0;37;40m [1;31;40m [0;37;40m [1;31;40m##[0;37;40m [1;31;40m## [0;37;40m
|
| | / \\ | | \\ Y / _ \\| |/ __ | | | | |/ \\| | \\ \\/ /
|
||||||
[1;34;40m│ ###### [0;37;40m [1;37;40m##[0;37;40m [1;34;40m [0;37;40m [1;37;40m####[0;37;40m [1;34;40m [1;37;40m###[0;37;40m [1;37;40m###[0;37;40m [1;34;40m####[0;37;40m [1;37;40m####[0;37;40m [1;37;40m###[0;37;40m [1;37;40m###[0;37;40m [1;37;40m######[0;37;40m [1;31;40m ###[0;37;40m [1;34;40m [1;31;40m ###[0;37;40m
|
| | \\___/ | | \\ ( <_> ) / /_/ | | |___| | | \\ | /> <
|
||||||
[1;34;40m└───────────────────────────────────────────[0;36;40m A simple, lightweight distribution.
|
\\ `-_____ \\/ \\___/ \\____/|__\\____ | |_______ \\__|___| /____//__/\\_ \\
|
||||||
[0;37;40m
|
`-______\\ \\/ \\/ \\/ \\/
|
||||||
OS: Arch\s Kernel: \r Processor: \m TTY: \l
|
|
||||||
[0m
|
|
||||||
|
|
||||||
|
\e[0m
|
||||||
|
Welcome Back! Linux Version: \r (\n) (\l)
|
||||||
|
|
|
@ -1,81 +0,0 @@
|
||||||
# vim:set ft=sh
|
|
||||||
# MODULES
|
|
||||||
# The following modules are loaded before any boot hooks are
|
|
||||||
# run. Advanced users may wish to specify all system modules
|
|
||||||
# in this array. For instance:
|
|
||||||
# MODULES=(usbhid xhci_hcd)
|
|
||||||
MODULES=(i915)
|
|
||||||
|
|
||||||
# BINARIES
|
|
||||||
# This setting includes any additional binaries a given user may
|
|
||||||
# wish into the CPIO image. This is run last, so it may be used to
|
|
||||||
# override the actual binaries included by a given hook
|
|
||||||
# BINARIES are dependency parsed, so you may safely ignore libraries
|
|
||||||
BINARIES=()
|
|
||||||
|
|
||||||
# FILES
|
|
||||||
# This setting is similar to BINARIES above, however, files are added
|
|
||||||
# as-is and are not parsed in any way. This is useful for config files.
|
|
||||||
FILES=(KEYPATH)
|
|
||||||
|
|
||||||
# HOOKS
|
|
||||||
# This is the most important setting in this file. The HOOKS control the
|
|
||||||
# modules and scripts added to the image, and what happens at boot time.
|
|
||||||
# Order is important, and it is recommended that you do not change the
|
|
||||||
# order in which HOOKS are added. Run 'mkinitcpio -H <hook name>' for
|
|
||||||
# help on a given hook.
|
|
||||||
# 'base' is _required_ unless you know precisely what you are doing.
|
|
||||||
# 'udev' is _required_ in order to automatically load modules
|
|
||||||
# 'filesystems' is _required_ unless you specify your fs modules in MODULES
|
|
||||||
# Examples:
|
|
||||||
## This setup specifies all modules in the MODULES setting above.
|
|
||||||
## No RAID, lvm2, or encrypted root is needed.
|
|
||||||
# HOOKS=(base)
|
|
||||||
#
|
|
||||||
## This setup will autodetect all modules for your system and should
|
|
||||||
## work as a sane default
|
|
||||||
# HOOKS=(base udev autodetect modconf block filesystems fsck)
|
|
||||||
#
|
|
||||||
## This setup will generate a 'full' image which supports most systems.
|
|
||||||
## No autodetection is done.
|
|
||||||
# HOOKS=(base udev modconf block filesystems fsck)
|
|
||||||
#
|
|
||||||
## This setup assembles a mdadm array with an encrypted root file system.
|
|
||||||
## Note: See 'mkinitcpio -H mdadm_udev' for more information on RAID devices.
|
|
||||||
# HOOKS=(base udev modconf keyboard keymap consolefont block mdadm_udev encrypt filesystems fsck)
|
|
||||||
#
|
|
||||||
## This setup loads an lvm2 volume group.
|
|
||||||
# HOOKS=(base udev modconf block lvm2 filesystems fsck)
|
|
||||||
#
|
|
||||||
## This will create a systemd based initramfs which loads an encrypted root filesystem.
|
|
||||||
# HOOKS=(base systemd autodetect modconf kms keyboard sd-vconsole sd-encrypt block filesystems fsck)
|
|
||||||
#
|
|
||||||
## NOTE: If you have /usr on a separate partition, you MUST include the
|
|
||||||
# usr and fsck hooks.
|
|
||||||
HOOKS=(base systemd autodetect microcode modconf kms keyboard keymap sd-vconsole block sd-encrypt lvm2 filesystems fsck)
|
|
||||||
|
|
||||||
# COMPRESSION
|
|
||||||
# Use this to compress the initramfs image. By default, zstd compression
|
|
||||||
# is used for Linux ≥ 5.9 and gzip compression is used for Linux < 5.9.
|
|
||||||
# Use 'cat' to create an uncompressed image.
|
|
||||||
#COMPRESSION="zstd"
|
|
||||||
#COMPRESSION="gzip"
|
|
||||||
#COMPRESSION="bzip2"
|
|
||||||
#COMPRESSION="lzma"
|
|
||||||
#COMPRESSION="xz"
|
|
||||||
#COMPRESSION="lzop"
|
|
||||||
#COMPRESSION="lz4"
|
|
||||||
|
|
||||||
# COMPRESSION_OPTIONS
|
|
||||||
# Additional options for the compressor
|
|
||||||
#COMPRESSION_OPTIONS=()
|
|
||||||
|
|
||||||
# MODULES_DECOMPRESS
|
|
||||||
# Decompress loadable kernel modules and their firmware during initramfs
|
|
||||||
# creation. Switch (yes/no).
|
|
||||||
# Enable to allow further decreasing image size when using high compression
|
|
||||||
# (e.g. xz -9e or zstd --long --ultra -22) at the expense of increased RAM usage
|
|
||||||
# at early boot.
|
|
||||||
# Note that any compressed files will be placed in the uncompressed early CPIO
|
|
||||||
# to avoid double compression.
|
|
||||||
#MODULES_DECOMPRESS="no"
|
|
100
etc/pacman.conf
|
@ -1,100 +0,0 @@
|
||||||
#
|
|
||||||
# /etc/pacman.conf
|
|
||||||
#
|
|
||||||
# See the pacman.conf(5) manpage for option and repository directives
|
|
||||||
|
|
||||||
#
|
|
||||||
# GENERAL OPTIONS
|
|
||||||
#
|
|
||||||
[options]
|
|
||||||
# The following paths are commented out with their default values listed.
|
|
||||||
# If you wish to use different paths, uncomment and update the paths.
|
|
||||||
#RootDir = /
|
|
||||||
#DBPath = /var/lib/pacman/
|
|
||||||
#CacheDir = /var/cache/pacman/pkg/
|
|
||||||
#LogFile = /var/log/pacman.log
|
|
||||||
#GPGDir = /etc/pacman.d/gnupg/
|
|
||||||
#HookDir = /etc/pacman.d/hooks/
|
|
||||||
HoldPkg = pacman glibc
|
|
||||||
#XferCommand = /usr/bin/curl -L -C - -f -o %o %u
|
|
||||||
#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u
|
|
||||||
#CleanMethod = KeepInstalled
|
|
||||||
Architecture = auto
|
|
||||||
|
|
||||||
# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup
|
|
||||||
#IgnorePkg =
|
|
||||||
#IgnoreGroup =
|
|
||||||
|
|
||||||
#NoUpgrade =
|
|
||||||
#NoExtract =
|
|
||||||
|
|
||||||
# Misc options
|
|
||||||
#UseSyslog
|
|
||||||
Color
|
|
||||||
#NoProgressBar
|
|
||||||
CheckSpace
|
|
||||||
#VerbosePkgLists
|
|
||||||
ParallelDownloads = 5
|
|
||||||
DownloadUser = alpm
|
|
||||||
#DisableSandbox
|
|
||||||
ILoveCandy
|
|
||||||
|
|
||||||
# By default, pacman accepts packages signed by keys that its local keyring
|
|
||||||
# trusts (see pacman-key and its man page), as well as unsigned packages.
|
|
||||||
SigLevel = Required DatabaseOptional
|
|
||||||
LocalFileSigLevel = Optional
|
|
||||||
#RemoteFileSigLevel = Required
|
|
||||||
|
|
||||||
# NOTE: You must run `pacman-key --init` before first using pacman; the local
|
|
||||||
# keyring can then be populated with the keys of all official Arch Linux
|
|
||||||
# packagers with `pacman-key --populate archlinux`.
|
|
||||||
|
|
||||||
#
|
|
||||||
# REPOSITORIES
|
|
||||||
# - can be defined here or included from another file
|
|
||||||
# - pacman will search repositories in the order defined here
|
|
||||||
# - local/custom mirrors can be added here or in separate files
|
|
||||||
# - repositories listed first will take precedence when packages
|
|
||||||
# have identical names, regardless of version number
|
|
||||||
# - URLs will have $repo replaced by the name of the current repo
|
|
||||||
# - URLs will have $arch replaced by the name of the architecture
|
|
||||||
#
|
|
||||||
# Repository entries are of the format:
|
|
||||||
# [repo-name]
|
|
||||||
# Server = ServerName
|
|
||||||
# Include = IncludePath
|
|
||||||
#
|
|
||||||
# The header [repo-name] is crucial - it must be present and
|
|
||||||
# uncommented to enable the repo.
|
|
||||||
#
|
|
||||||
|
|
||||||
# The testing repositories are disabled by default. To enable, uncomment the
|
|
||||||
# repo name header and Include lines. You can add preferred servers immediately
|
|
||||||
# after the header, and they will be used before the default mirrors.
|
|
||||||
|
|
||||||
#[core-testing]
|
|
||||||
#Include = /etc/pacman.d/mirrorlist
|
|
||||||
|
|
||||||
[core]
|
|
||||||
Include = /etc/pacman.d/mirrorlist
|
|
||||||
|
|
||||||
#[extra-testing]
|
|
||||||
#Include = /etc/pacman.d/mirrorlist
|
|
||||||
|
|
||||||
[extra]
|
|
||||||
Include = /etc/pacman.d/mirrorlist
|
|
||||||
|
|
||||||
# If you want to run 32 bit applications on your x86_64 system,
|
|
||||||
# enable the multilib repositories as required here.
|
|
||||||
|
|
||||||
#[multilib-testing]
|
|
||||||
#Include = /etc/pacman.d/mirrorlist
|
|
||||||
|
|
||||||
#[multilib]
|
|
||||||
#Include = /etc/pacman.d/mirrorlist
|
|
||||||
|
|
||||||
# An example of a custom package repository. See the pacman manpage for
|
|
||||||
# tips on creating your own repositories.
|
|
||||||
#[custom]
|
|
||||||
#SigLevel = Optional TrustAll
|
|
||||||
#Server = file:///home/custompkgs
|
|
|
@ -1,9 +0,0 @@
|
||||||
#%PAM-1.0
|
|
||||||
|
|
||||||
auth required pam_securetty.so
|
|
||||||
auth requisite pam_nologin.so
|
|
||||||
auth include system-local-login
|
|
||||||
auth optional pam_gnome_keyring.so
|
|
||||||
account include system-local-login
|
|
||||||
session include system-local-login
|
|
||||||
session optional pam_gnome_keyring.so auto_start
|
|
|
@ -1,7 +0,0 @@
|
||||||
#%PAM-1.0
|
|
||||||
|
|
||||||
auth sufficient pam_fprintd.so
|
|
||||||
auth include system-login
|
|
||||||
account include system-login
|
|
||||||
password include system-login
|
|
||||||
session include system-login
|
|
47
etc/rc.conf
Normal file
|
@ -0,0 +1,47 @@
|
||||||
|
# /etc/rc.conf - system configuration for void
|
||||||
|
|
||||||
|
# Set the host name.
|
||||||
|
#
|
||||||
|
# NOTE: it's preferred to declare the hostname in /etc/hostname instead:
|
||||||
|
# - echo myhost > /etc/hostname
|
||||||
|
#
|
||||||
|
#HOSTNAME="void-live"
|
||||||
|
|
||||||
|
# Set RTC to UTC or localtime.
|
||||||
|
#HARDWARECLOCK="UTC"
|
||||||
|
|
||||||
|
# Set timezone, availables timezones can be found at /usr/share/zoneinfo.
|
||||||
|
#
|
||||||
|
# NOTE: it's preferred to set the timezone in /etc/localtime instead:
|
||||||
|
# - ln -sf /usr/share/zoneinfo/<timezone> /etc/localtime
|
||||||
|
# Setting the timezone here requires a reboot to apply any changes/fixes
|
||||||
|
# and read-write access to the filesystem.
|
||||||
|
#
|
||||||
|
#TIMEZONE="Europe/Madrid"
|
||||||
|
|
||||||
|
# Keymap to load, see loadkeys(8).
|
||||||
|
#KEYMAP="es"
|
||||||
|
|
||||||
|
# Console font to load, see setfont(8).
|
||||||
|
#FONT="lat9w-16"
|
||||||
|
|
||||||
|
# Console map to load, see setfont(8).
|
||||||
|
#FONT_MAP=
|
||||||
|
|
||||||
|
# Font unimap to load, see setfont(8).
|
||||||
|
#FONT_UNIMAP=
|
||||||
|
|
||||||
|
# Amount of ttys which should be setup.
|
||||||
|
#TTYS=
|
||||||
|
|
||||||
|
# Set the mode for cgroup mounts.
|
||||||
|
# hybrid: mount cgroup v1 under /sys/fs/cgroup and
|
||||||
|
# cgroup v2 under /sys/fs/cgroup/unified
|
||||||
|
# legacy: mount cgroup v1 /sys/fs/cgroup
|
||||||
|
# unified: mount cgroup v2 under /sys/fs/cgroup
|
||||||
|
CGROUP_MODE=unified
|
||||||
|
|
||||||
|
# Set this to true only if you do not want seed files to actually credit the
|
||||||
|
# RNG, for example if you plan to replicate this file system image and do not
|
||||||
|
# have the wherewithal to first delete the contents of /var/lib/seedrng.
|
||||||
|
#SEEDRNG_SKIP_CREDIT=false
|
6
etc/rc.local
Executable file
|
@ -0,0 +1,6 @@
|
||||||
|
#!/bin/sh
|
||||||
|
# Default rc.local for void; add your custom commands here.
|
||||||
|
#
|
||||||
|
# This is run by runit in stage 2 before the services are executed
|
||||||
|
# (see /etc/runit/2).
|
||||||
|
mount --make-rshared /
|
14
etc/sv/runsvdir-drk/run
Executable file
|
@ -0,0 +1,14 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
export USER="drk"
|
||||||
|
export HOME="/home/$USER"
|
||||||
|
export XDG_RUNTIME_DIR="/run/user/$(id -u $USER)"
|
||||||
|
mkdir $XDG_RUNTIME_DIR
|
||||||
|
chown $USER:$USER $XDG_RUNTIME_DIR
|
||||||
|
|
||||||
|
groups="$(id -Gn "$USER" | tr ' ' ':')"
|
||||||
|
svdir="$HOME/.config/runit/service"
|
||||||
|
mkdir -p "$svdir"
|
||||||
|
chown $USER:$USER "$svdir"
|
||||||
|
|
||||||
|
exec chpst -u "$USER:$groups" runsvdir "$svdir"
|
|
@ -1 +0,0 @@
|
||||||
FONT=ter-118n
|
|
|
@ -6,6 +6,10 @@ export XDG_CACHE_HOME="$HOME/.cache"
|
||||||
export XDG_CONFIG_HOME="$HOME/.config"
|
export XDG_CONFIG_HOME="$HOME/.config"
|
||||||
export XDG_LIB_HOME="$HOME/.local/lib"
|
export XDG_LIB_HOME="$HOME/.local/lib"
|
||||||
export XDG_BIN_HOME="$HOME/.local/bin"
|
export XDG_BIN_HOME="$HOME/.local/bin"
|
||||||
|
export XDG_SOURCE_HOME="$HOME/.local/src"
|
||||||
|
|
||||||
|
# X11
|
||||||
|
export XINITRC="$XDG_CONFIG_HOME/X11/xinitrc"
|
||||||
|
|
||||||
# Sanely export XDG Base dir variables
|
# Sanely export XDG Base dir variables
|
||||||
eval "$(sed 's/^[^#].*/export &/g;t;d' ~/.config/user-dirs.dirs)"
|
eval "$(sed 's/^[^#].*/export &/g;t;d' ~/.config/user-dirs.dirs)"
|
||||||
|
@ -35,7 +39,7 @@ export GOPATH="$XDG_DATA_HOME/go"
|
||||||
export CARGO_HOME="$XDG_DATA_HOME/cargo"
|
export CARGO_HOME="$XDG_DATA_HOME/cargo"
|
||||||
|
|
||||||
## Flutter
|
## Flutter
|
||||||
export CHROME_EXECUTABLE="/var/lib/flatpak/app/com.brave.Browser/x86_64/stable/active/export/bin/com.brave.Browser"
|
export CHROME_EXECUTABLE="/var/lib/flatpak/app/io.github.ungoogled_software.ungoogled_chromium/x86_64/stable/active/export/bin/io.github.ungoogled_software.ungoogled_chromium"
|
||||||
export PUB_CACHE="$XDG_DATA_HOME/pub-cache"
|
export PUB_CACHE="$XDG_DATA_HOME/pub-cache"
|
||||||
export FLUTTER_ROOT="$XDG_LIB_HOME/flutter"
|
export FLUTTER_ROOT="$XDG_LIB_HOME/flutter"
|
||||||
export FLUTTER_ANALYTICS_DISABLED=true
|
export FLUTTER_ANALYTICS_DISABLED=true
|
||||||
|
@ -47,9 +51,15 @@ export ANDROID_SDK_ROOT="$ANDROID_HOME"
|
||||||
export ANDROID_USER_HOME="$XDG_DATA_HOME/android"
|
export ANDROID_USER_HOME="$XDG_DATA_HOME/android"
|
||||||
export ANDROID_EMULATOR_HOME="$ANDROID_USER_HOME"
|
export ANDROID_EMULATOR_HOME="$ANDROID_USER_HOME"
|
||||||
export ANDROID_AVD_HOME="$ANDROID_USER_HOME/avd"
|
export ANDROID_AVD_HOME="$ANDROID_USER_HOME/avd"
|
||||||
export JAVA_HOME="/usr/lib/jvm/jre-21-openjdk"
|
export JAVA_HOME="/usr/lib/jvm/openjdk21"
|
||||||
export GRADLE_USER_HOME="$XDG_DATA_HOME/gradle"
|
export GRADLE_USER_HOME="$XDG_DATA_HOME/gradle"
|
||||||
|
|
||||||
|
## Dotnet
|
||||||
|
export DOTNET_CLI_HOME="$XDG_LIB_HOME/dotnet"
|
||||||
|
export DOTNET_ROOT="$DOTNET_CLI_HOME"
|
||||||
|
export DOTNET_CLI_TELEMETRY_OPTOUT=true
|
||||||
|
export DOTENT_SKIP_FIRST_TIME_EXPERIENCE=true
|
||||||
|
|
||||||
# Set path
|
# Set path
|
||||||
## local bin paths
|
## local bin paths
|
||||||
if [ -d "$HOME/.bin" ]; then
|
if [ -d "$HOME/.bin" ]; then
|
||||||
|
@ -88,9 +98,14 @@ if [ -d "$ANDROID_HOME/tools/bin" ]; then
|
||||||
PATH="$ANDROID_HOME/tools/bin:$PATH"
|
PATH="$ANDROID_HOME/tools/bin:$PATH"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
## dotnet cli
|
||||||
|
if [ -d $DOTNET_CLI_HOME ]; then
|
||||||
|
PATH="$DOTNET_CLI_HOME:$PATH"
|
||||||
|
fi
|
||||||
|
|
||||||
## dotnet sdk tools
|
## dotnet sdk tools
|
||||||
if [ -d $DOTNET_CLI_HOME/tools ]; then
|
if [ -d $DOTNET_CLI_HOME/.dotnet/tools ]; then
|
||||||
PATH="$DOTNET_CLI_HOME/tools:$PATH"
|
PATH="$DOTNET_CLI_HOME/.dotnet/tools:$PATH"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
## AppImage applications
|
## AppImage applications
|
||||||
|
@ -103,10 +118,6 @@ if [ -d "$XDG_DATA_HOME/JetBrains/Toolbox/scripts" ]; then
|
||||||
PATH="$XDG_DATA_HOME/JetBrains/Toolbox/scripts:$PATH"
|
PATH="$XDG_DATA_HOME/JetBrains/Toolbox/scripts:$PATH"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -d "$XDG_CONFIG_HOME/sway/scripts" ]; then
|
|
||||||
PATH="$XDG_CONFIG_HOME/sway/scripts:$PATH"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Create config directories if they don't exist
|
# Create config directories if they don't exist
|
||||||
if [ ! -d "$WGETDIR" ] || [ ! -d "$GNUPGHOME" ]; then
|
if [ ! -d "$WGETDIR" ] || [ ! -d "$GNUPGHOME" ]; then
|
||||||
mkdir -p "$WGETDIR" "$GNUPGHOME"
|
mkdir -p "$WGETDIR" "$GNUPGHOME"
|
||||||
|
@ -115,8 +126,8 @@ fi
|
||||||
# Bashrc
|
# Bashrc
|
||||||
source "$BASHRC"
|
source "$BASHRC"
|
||||||
|
|
||||||
# Starting wayland session
|
# Starting xsession
|
||||||
if [ -z "$DISPLAY" ] && [ "$(tty)" = "/dev/tty1" ]; then
|
if [ -z "$DISPLAY" ] && [ "$(tty)" = "/dev/tty1" ]; then
|
||||||
startsway &>/dev/null
|
startx "$XINITRC" -- vt1 -keeptty &>> /dev/null
|
||||||
logout
|
logout
|
||||||
fi
|
fi
|
||||||
|
|
91
home/.bashrc
|
@ -3,7 +3,7 @@ export TERM="xterm-256color" # getting proper colors
|
||||||
export HISTCONTROL=ignoredups:erasedups # no duplicate entries
|
export HISTCONTROL=ignoredups:erasedups # no duplicate entries
|
||||||
|
|
||||||
### "bat" as manpager
|
### "bat" as manpager
|
||||||
export MANPAGER="sh -c 'sed -u -e \"s/\\x1B\[[0-9;]*m//g; s/.\\x08//g\" | bat -p -lman'"
|
export MANPAGER="batman"
|
||||||
|
|
||||||
# use bash-completion, if available
|
# use bash-completion, if available
|
||||||
[[ $PS1 && -f /usr/share/bash-completion/bash_completion ]] && \
|
[[ $PS1 && -f /usr/share/bash-completion/bash_completion ]] && \
|
||||||
|
@ -111,6 +111,9 @@ alias \
|
||||||
# fastfetch as neofetch
|
# fastfetch as neofetch
|
||||||
[ -x "$(command -v fastfetch)" ] && alias neofetch="fastfetch"
|
[ -x "$(command -v fastfetch)" ] && alias neofetch="fastfetch"
|
||||||
|
|
||||||
|
# btop as htop
|
||||||
|
[ -x "$(command -v btop)" ] && alias htop="btop"
|
||||||
|
|
||||||
# use lunarvim or neovim for vim if present.
|
# use lunarvim or neovim for vim if present.
|
||||||
if [ -x "$(command -v $HOME/.local/bin/lvim)" ]; then
|
if [ -x "$(command -v $HOME/.local/bin/lvim)" ]; then
|
||||||
alias vim="$HOME/.local/bin/lvim"
|
alias vim="$HOME/.local/bin/lvim"
|
||||||
|
@ -128,13 +131,13 @@ fi
|
||||||
|
|
||||||
# function to detect os and assign aliases to package managers
|
# function to detect os and assign aliases to package managers
|
||||||
alias \
|
alias \
|
||||||
pku="paru -Syu" \
|
xbu="sudo xbps-install -Su" \
|
||||||
pki="paru -S" \
|
xbi="sudo xbps-install -S" \
|
||||||
pkr="paru -Rcns" \
|
xbr="sudo xbps-remove -R" \
|
||||||
pks="paru -Ss" \
|
xbrs="sudo xbps-remove" \
|
||||||
pkc="paru -Scc && paru -Rcns (pacman -Qtdq)"
|
xbc="sudo xbps-remove -Oo" \
|
||||||
|
xbs="sudo xbps-query -R"
|
||||||
|
|
||||||
#pkg-clean="sudo pacman -R $(pacman -Qtds)" \
|
|
||||||
# colorize grep output (good for log files)
|
# colorize grep output (good for log files)
|
||||||
alias \
|
alias \
|
||||||
grep="grep --color=auto" \
|
grep="grep --color=auto" \
|
||||||
|
@ -170,15 +173,15 @@ alias \
|
||||||
# audio
|
# audio
|
||||||
alias \
|
alias \
|
||||||
mx="pulsemixer" \
|
mx="pulsemixer" \
|
||||||
mk="cmus" \
|
mk="musikcube" \
|
||||||
ms="cmus" \
|
ms="musikcube" \
|
||||||
music="cmus"
|
music="musikcube"
|
||||||
|
|
||||||
# power management
|
# power management
|
||||||
alias \
|
alias \
|
||||||
po="systemctl poweroff" \
|
po="loginctl poweroff" \
|
||||||
sp="systemctl suspend" \
|
sp="loginctl suspend" \
|
||||||
rb="systemctl reboot"
|
rb="loginctl reboot"
|
||||||
|
|
||||||
# file management
|
# file management
|
||||||
alias \
|
alias \
|
||||||
|
@ -220,6 +223,62 @@ alias \
|
||||||
wfi-off="nmcli radio wifi off" \
|
wfi-off="nmcli radio wifi off" \
|
||||||
blt="bluetoothctl"
|
blt="bluetoothctl"
|
||||||
|
|
||||||
# starship prompt
|
### PROMPT
|
||||||
eval "$(starship init bash)"
|
# get current branch in git repo
|
||||||
eval "$(zoxide init bash)"
|
function parse_git_branch() {
|
||||||
|
BRANCH=$(git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/')
|
||||||
|
if [ ! "${BRANCH}" == "" ]; then
|
||||||
|
STAT=$(parse_git_dirty)
|
||||||
|
echo "[${BRANCH}${STAT}]"
|
||||||
|
else
|
||||||
|
echo ""
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# get current branch in git repo
|
||||||
|
function parse_git_branch() {
|
||||||
|
BRANCH=$(git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/')
|
||||||
|
if [ ! "${BRANCH}" == "" ]; then
|
||||||
|
STAT=$(parse_git_dirty)
|
||||||
|
echo "[${BRANCH}${STAT}]"
|
||||||
|
else
|
||||||
|
echo ""
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# get current status of git repo
|
||||||
|
function parse_git_dirty {
|
||||||
|
status=$(git status 2>&1 | tee)
|
||||||
|
dirty=$(echo -n "${status}" 2> /dev/null | grep "modified:" &> /dev/null; echo "$?")
|
||||||
|
untracked=$(echo -n "${status}" 2> /dev/null | grep "Untracked files" &> /dev/null; echo "$?")
|
||||||
|
ahead=$(echo -n "${status}" 2> /dev/null | grep "Your branch is ahead of" &> /dev/null; echo "$?")
|
||||||
|
newfile=$(echo -n "${status}" 2> /dev/null | grep "new file:" &> /dev/null; echo "$?")
|
||||||
|
renamed=$(echo -n "${status}" 2> /dev/null | grep "renamed:" &> /dev/null; echo "$?")
|
||||||
|
deleted=$(echo -n "${status}" 2> /dev/null | grep "deleted:" &> /dev/null; echo "$?")
|
||||||
|
bits=''
|
||||||
|
if [ "${renamed}" == "0" ]; then
|
||||||
|
bits=">${bits}"
|
||||||
|
fi
|
||||||
|
if [ "${ahead}" == "0" ]; then
|
||||||
|
bits="*${bits}"
|
||||||
|
fi
|
||||||
|
if [ "${newfile}" == "0" ]; then
|
||||||
|
bits="+${bits}"
|
||||||
|
fi
|
||||||
|
if [ "${untracked}" == "0" ]; then
|
||||||
|
bits="?${bits}"
|
||||||
|
fi
|
||||||
|
if [ "${deleted}" == "0" ]; then
|
||||||
|
bits="x${bits}"
|
||||||
|
fi
|
||||||
|
if [ "${dirty}" == "0" ]; then
|
||||||
|
bits="!${bits}"
|
||||||
|
fi
|
||||||
|
if [ ! "${bits}" == "" ]; then
|
||||||
|
echo " ${bits}"
|
||||||
|
else
|
||||||
|
echo ""
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
export PS1="[\[\e[31m\]\u\[\e[m\]\[\e[35m\]@\[\e[m\]\[\e[32m\]\h\[\e[m\]] [\[\e[33m\]\W\[\e[m\]\[\e[34m\]\`parse_git_branch\`\[\e[m\]] "
|
||||||
|
|
|
@ -1,4 +0,0 @@
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" version="1">
|
|
||||||
<rect style="fill:#783535" width="16" height="16" x="0" y="0" rx=".8" ry=".8"/>
|
|
||||||
<path style="fill:#f1e9de" d="m 4.0778022,3.0000069 c -0.048735,0.5708172 0.1988144,2.400385 0.1782184,2.5909634 0.014861,0.2607783 0.2526897,0.3302782 0.2526897,0.3302782 L 4.80112,5.9278185 C 4.8868949,5.5236132 5.0105912,5.1394927 5.2427381,5 H 7 v 7.00866 L 6.011623,11.99134 5.988377,11.00552 5.3453462,10.99448 l -0.2024855,2.005513 4.4909013,5e-6 0.501981,-0.485703 C 9.7981732,12.401877 9.1429842,12.301437 9,11.638717 V 4 h 2.324981 c 0.07628,0.079818 -0.346846,0.5594016 -0.271767,0.630798 0.335976,0.3194996 0.585859,0.540103 0.875354,0.5326994 V 3.0000015 Z"/>
|
|
||||||
</svg>
|
|
Before Width: | Height: | Size: 738 B |
|
@ -1,7 +0,0 @@
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" version="1">
|
|
||||||
<rect style="opacity:0.2" width="20" height="20" x="1" y="1.5" rx="1" ry="1"/>
|
|
||||||
<rect style="fill:#783535" width="20" height="20" x="1" y="1" rx="1" ry="1"/>
|
|
||||||
<path style="opacity:0.2" d="m 5.508917,4.999993 c -0.068229,0.799145 0.2783405,2.2997475 0.249506,2.5665575 0.020805,0.36509 0.353766,0.46239 0.353766,0.46239 l 0.409374,0.0092 c 0.120085,-0.56589 0.29326,-0.843005 0.618266,-1.038295 H 9 V 18.036544 L 8.002341,18.012294 7.969796,17.012892 7.28348,16.997442 7,18.999993 12.787269,19 13.490042,18.320015 C 13.017445,18.162625 12.200178,18.02201 12,17.0942 V 5.999548 h 3.154978 C 15.261761,6.111293 14.669393,6.682703 14.774504,6.782658 15.24487,7.229958 15.594707,7.538803 16,7.528438 V 4.9999855 Z"/>
|
|
||||||
<path style="fill:#f1e9de" d="m 5.508917,4 c -0.068229,0.799145 0.2783405,2.2997475 0.249506,2.5665575 0.020805,0.36509 0.353766,0.46239 0.353766,0.46239 l 0.409374,0.0092 c 0.120085,-0.56589 0.29326,-0.843005 0.618266,-1.038295 H 9 V 17.036551 L 8.002341,17.012301 7.969796,16.012899 7.28348,15.997449 7,18 l 5.787269,7e-6 0.702773,-0.679985 C 13.017445,17.162632 12.200178,17.022017 12,16.094207 V 4.999555 h 3.154978 C 15.261761,5.1113 14.669393,5.68271 14.774504,5.782665 15.24487,6.229965 15.594707,6.53881 16,6.528445 V 3.9999925 Z"/>
|
|
||||||
<path style="opacity:0.1;fill:#ffffff" d="M 2,1 C 1.446,1 1,1.446 1,2 v 0.5 c 0,-0.554 0.446,-1 1,-1 h 18 c 0.554,0 1,0.446 1,1 V 2 C 21,1.446 20.554,1 20,1 Z"/>
|
|
||||||
</svg>
|
|
Before Width: | Height: | Size: 1.5 KiB |
|
@ -1,7 +0,0 @@
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" version="1">
|
|
||||||
<rect style="opacity:0.2" width="20" height="20" x="2" y="2.5" rx="1" ry="1"/>
|
|
||||||
<rect style="fill:#783535" width="20" height="20" x="2" y="2" rx="1" ry="1"/>
|
|
||||||
<path style="opacity:0.2" d="m 6.508917,5.999993 c -0.068229,0.799145 0.2783405,2.2997475 0.249506,2.5665575 0.020805,0.36509 0.353766,0.46239 0.353766,0.46239 l 0.409374,0.0092 c 0.120085,-0.56589 0.29326,-0.843005 0.618266,-1.038295 H 10 V 19.036544 L 9.002341,19.012294 8.969796,18.012892 8.28348,17.997442 8,19.999993 13.787269,20 14.490042,19.320015 C 14.017445,19.162625 13.200178,19.02201 13,18.0942 V 6.999548 h 3.154978 C 16.261761,7.111293 15.669393,7.682703 15.774504,7.782658 16.24487,8.229958 16.594707,8.538803 17,8.528438 V 5.9999855 Z"/>
|
|
||||||
<path style="fill:#f1e9de" d="m 6.508917,5 c -0.068229,0.799145 0.2783405,2.2997475 0.249506,2.5665575 0.020805,0.36509 0.353766,0.46239 0.353766,0.46239 l 0.409374,0.0092 c 0.120085,-0.56589 0.29326,-0.843005 0.618266,-1.038295 H 10 V 18.036551 L 9.002341,18.012301 8.969796,17.012899 8.28348,16.997449 8,19 l 5.787269,7e-6 0.702773,-0.679985 C 14.017445,18.162632 13.200178,18.022017 13,17.094207 V 5.999555 h 3.154978 C 16.261761,6.1113 15.669393,6.68271 15.774504,6.782665 16.24487,7.229965 16.594707,7.53881 17,7.528445 V 4.9999925 Z"/>
|
|
||||||
<path style="opacity:0.1;fill:#ffffff" d="M 3,2 C 2.446,2 2,2.446 2,3 v 0.5 c 0,-0.554 0.446,-1 1,-1 h 18 c 0.554,0 1,0.446 1,1 V 3 C 22,2.446 21.554,2 21,2 Z"/>
|
|
||||||
</svg>
|
|
Before Width: | Height: | Size: 1.5 KiB |
|
@ -1,7 +0,0 @@
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" version="1">
|
|
||||||
<rect style="opacity:0.2" width="28" height="28" x="2" y="3" rx="1.4" ry="1.4"/>
|
|
||||||
<rect style="fill:#783535" width="28" height="28" x="2" y="2" rx="1.4" ry="1.4"/>
|
|
||||||
<path style="opacity:0.2" d="m 8.0127404,7.0000082 c -0.09747,1.1416345 0.3976289,3.9998458 0.3564368,4.3810018 0.029721,0.521557 0.5053794,0.660557 0.5053794,0.660557 l 0.5848194,0.01314 C 9.6309258,11.246297 9.8783179,10.278985 10.342613,10 h 2.657384 v 15.01732 l -1.92504,-0.03464 -0.04649,-1.971645 -0.98045,-0.02207 -0.404974,4.011026 9.481617,10e-6 1.003961,-0.971406 C 19.453484,25.803748 18.28596,25.60287 17.999992,24.277428 V 9 h 4.707189 C 22.859728,9.1596356 22.013488,9.9185081 22.163647,10.061301 22.835598,10.7003 23.42101,11.141506 24,11.126699 V 6.9999975 Z"/>
|
|
||||||
<path style="fill:#f1e9de" d="m 8.0127404,6.0000082 c -0.09747,1.1416345 0.3976289,3.9998458 0.3564368,4.3810018 0.029721,0.521557 0.5053794,0.660557 0.5053794,0.660557 l 0.5848194,0.01314 C 9.6309258,10.246297 9.8783179,9.2789854 10.342613,9 h 2.657384 v 15.01732 l -1.92504,-0.03464 -0.04649,-1.971645 -0.98045,-0.02207 -0.404974,4.011026 9.481617,10e-6 1.003961,-0.971406 C 19.453484,24.803748 18.28596,24.60287 17.999992,23.277428 V 8 h 4.707189 C 22.859728,8.1596356 22.013488,8.9185081 22.163647,9.0613008 22.835598,9.7003 23.42101,10.141506 24,10.126699 V 5.9999975 Z"/>
|
|
||||||
<path style="fill:#ffffff;opacity:0.1" d="M 3.4003906 2 C 2.6247906 2 2 2.6247906 2 3.4003906 L 2 4.4003906 C 2 3.6247906 2.6247906 3 3.4003906 3 L 28.599609 3 C 29.375209 3 30 3.6247906 30 4.4003906 L 30 3.4003906 C 30 2.6247906 29.375209 2 28.599609 2 L 3.4003906 2 z"/>
|
|
||||||
</svg>
|
|
Before Width: | Height: | Size: 1.6 KiB |
|
@ -1,7 +0,0 @@
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" version="1">
|
|
||||||
<rect style="opacity:0.2" width="40" height="40" x="4" y="5" rx="2" ry="2"/>
|
|
||||||
<rect style="fill:#783535" width="40" height="40" x="4" y="4" rx="2" ry="2"/>
|
|
||||||
<path style="opacity:0.2" d="m 13.017834,11 c -0.136458,1.59829 0.556681,5.59979 0.499012,6.13341 0.04161,0.73018 0.707532,0.92478 0.707532,0.92478 l 0.818748,0.0184 C 15.283296,16.94481 15.629646,16.39058 16.279658,16 H 20 V 36.072755 L 18.004682,36.024255 17.939592,34.02545 16.56696,33.99455 16,39 l 12.574537,1.5e-5 1.405547,-1.35997 C 29.034891,37.325265 27.400356,37.044035 27,35.188415 V 14 h 6.309958 c 0.213565,0.22349 -0.971171,1.36631 -0.76095,1.56622 0.940734,0.8946 1.640407,1.51229 2.450994,1.49156 v -6.057795 z"/>
|
|
||||||
<path style="fill:#f1e9de" d="m 13.017834,10 c -0.136458,1.59829 0.556681,5.59979 0.499012,6.13341 0.04161,0.73018 0.707532,0.92478 0.707532,0.92478 l 0.818748,0.0184 C 15.283296,15.94481 15.629646,15.39058 16.279658,15 H 20 V 35.072755 L 18.004682,35.024255 17.939592,33.02545 16.56696,32.99455 16,38 l 12.574537,1.5e-5 1.405547,-1.35997 C 29.034891,36.325265 27.400356,36.044035 27,34.188415 V 13 h 6.309958 c 0.213565,0.22349 -0.971171,1.36631 -0.76095,1.56622 0.940734,0.8946 1.640407,1.51229 2.450994,1.49156 V 9.999985 Z"/>
|
|
||||||
<path style="fill:#ffffff;opacity:0.1" d="M 6 4 C 4.892 4 4 4.892 4 6 L 4 7 C 4 5.892 4.892 5 6 5 L 42 5 C 43.108 5 44 5.892 44 7 L 44 6 C 44 4.892 43.108 4 42 4 L 6 4 z"/>
|
|
||||||
</svg>
|
|
Before Width: | Height: | Size: 1.4 KiB |
|
@ -1,7 +0,0 @@
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" width="64" height="64" version="1">
|
|
||||||
<rect style="opacity:0.2" width="56" height="56" x="4" y="5" rx="2.8" ry="2.8"/>
|
|
||||||
<rect style="fill:#783535" width="56" height="56" x="4" y="4" rx="2.8" ry="2.8"/>
|
|
||||||
<path style="opacity:0.2" d="m 16.025481,13.000014 c -0.19494,2.283269 0.795258,7.999692 0.712873,8.762004 0.05944,1.043114 1.010759,1.321114 1.010759,1.321114 l 1.169639,0.02628 c 0.3431,-1.61682 0.837884,-2.551443 1.766474,-3.109413 h 5.314768 v 29.034639 l -2.850452,-0.06928 -0.09298,-2.943289 -1.9609,-0.04414 L 20.285714,52.99998 38.24932,53 40.257242,51.057188 C 38.906968,50.607494 36.57192,50.205738 35.999984,47.554854 V 16.999998 h 9.414378 c 0.305094,0.319271 -1.387386,1.837016 -1.087068,2.122602 1.343902,1.277998 2.514726,2.16041 3.672706,2.130796 v -8.253403 z"/>
|
|
||||||
<path style="fill:#f1e9de" d="m 16.025481,12.000016 c -0.19494,2.283269 0.795258,7.999692 0.712873,8.762004 0.05944,1.043114 1.010759,1.321114 1.010759,1.321114 l 1.169639,0.02628 c 0.3431,-1.61682 0.837884,-2.551442 1.766474,-3.109413 h 5.314768 V 48.03464 l -2.850452,-0.06928 -0.09298,-2.943289 -1.9609,-0.04414 -0.809948,7.022051 17.963606,2e-5 2.007922,-1.942812 C 38.906968,49.607496 36.57192,49.20574 35.999984,46.554856 V 16 h 9.414378 c 0.305094,0.319271 -1.387386,1.837016 -1.087068,2.122602 C 45.671196,19.4006 46.84202,20.283012 48,20.253398 v -8.253403 z"/>
|
|
||||||
<path style="opacity:0.1;fill:#ffffff" d="M 6.8007812 4 C 5.2495812 4 4 5.2495812 4 6.8007812 L 4 7.8007812 C 4 6.2495813 5.2495812 5 6.8007812 5 L 57.199219 5 C 58.750419 5 60 6.2495812 60 7.8007812 L 60 6.8007812 C 60 5.2495813 58.750419 4 57.199219 4 L 6.8007812 4 z"/>
|
|
||||||
</svg>
|
|
Before Width: | Height: | Size: 1.6 KiB |
|
@ -1,4 +1,4 @@
|
||||||
[Icon Theme]
|
[Icon Theme]
|
||||||
Name=Default
|
Name=Default
|
||||||
Comment=Default Cursor Theme
|
Comment=Default Cursor Theme
|
||||||
Inherits=Simp1e-Catppuccin-Mocha
|
Inherits=Simp1e-Gruvbox-Dark
|
||||||
|
|
30
local/src/dmenu/LICENSE
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
MIT/X Consortium License
|
||||||
|
|
||||||
|
© 2006-2019 Anselm R Garbe <anselm@garbe.ca>
|
||||||
|
© 2006-2008 Sander van Dijk <a.h.vandijk@gmail.com>
|
||||||
|
© 2006-2007 Michał Janeczek <janeczek@gmail.com>
|
||||||
|
© 2007 Kris Maglione <jg@suckless.org>
|
||||||
|
© 2009 Gottox <gottox@s01.de>
|
||||||
|
© 2009 Markus Schnalke <meillo@marmaro.de>
|
||||||
|
© 2009 Evan Gates <evan.gates@gmail.com>
|
||||||
|
© 2010-2012 Connor Lane Smith <cls@lubutu.com>
|
||||||
|
© 2014-2022 Hiltjo Posthuma <hiltjo@codemadness.org>
|
||||||
|
© 2015-2019 Quentin Rameau <quinq@fifth.space>
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
|
copy of this software and associated documentation files (the "Software"),
|
||||||
|
to deal in the Software without restriction, including without limitation
|
||||||
|
the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||||
|
and/or sell copies of the Software, and to permit persons to whom the
|
||||||
|
Software is furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in
|
||||||
|
all copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||||
|
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||||
|
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
|
DEALINGS IN THE SOFTWARE.
|
64
local/src/dmenu/Makefile
Normal file
|
@ -0,0 +1,64 @@
|
||||||
|
# dmenu - dynamic menu
|
||||||
|
# See LICENSE file for copyright and license details.
|
||||||
|
|
||||||
|
include config.mk
|
||||||
|
|
||||||
|
SRC = drw.c dmenu.c stest.c util.c
|
||||||
|
OBJ = $(SRC:.c=.o)
|
||||||
|
|
||||||
|
all: options dmenu stest
|
||||||
|
|
||||||
|
options:
|
||||||
|
@echo dmenu build options:
|
||||||
|
@echo "CFLAGS = $(CFLAGS)"
|
||||||
|
@echo "LDFLAGS = $(LDFLAGS)"
|
||||||
|
@echo "CC = $(CC)"
|
||||||
|
|
||||||
|
.c.o:
|
||||||
|
$(CC) -c $(CFLAGS) $<
|
||||||
|
|
||||||
|
config.h:
|
||||||
|
cp config.def.h $@
|
||||||
|
|
||||||
|
$(OBJ): arg.h config.h config.mk drw.h
|
||||||
|
|
||||||
|
dmenu: dmenu.o drw.o util.o
|
||||||
|
$(CC) -o $@ dmenu.o drw.o util.o $(LDFLAGS)
|
||||||
|
|
||||||
|
stest: stest.o
|
||||||
|
$(CC) -o $@ stest.o $(LDFLAGS)
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -f dmenu stest $(OBJ) dmenu-$(VERSION).tar.gz
|
||||||
|
|
||||||
|
dist: clean
|
||||||
|
mkdir -p dmenu-$(VERSION)
|
||||||
|
cp LICENSE Makefile README arg.h config.def.h config.mk dmenu.1\
|
||||||
|
drw.h util.h dmenu_path dmenu_run stest.1 $(SRC)\
|
||||||
|
dmenu-$(VERSION)
|
||||||
|
tar -cf dmenu-$(VERSION).tar dmenu-$(VERSION)
|
||||||
|
gzip dmenu-$(VERSION).tar
|
||||||
|
rm -rf dmenu-$(VERSION)
|
||||||
|
|
||||||
|
install: all
|
||||||
|
mkdir -p $(DESTDIR)$(PREFIX)/bin
|
||||||
|
cp -f dmenu dmenu_path dmenu_run stest $(DESTDIR)$(PREFIX)/bin
|
||||||
|
chmod 755 $(DESTDIR)$(PREFIX)/bin/dmenu
|
||||||
|
chmod 755 $(DESTDIR)$(PREFIX)/bin/dmenu_path
|
||||||
|
chmod 755 $(DESTDIR)$(PREFIX)/bin/dmenu_run
|
||||||
|
chmod 755 $(DESTDIR)$(PREFIX)/bin/stest
|
||||||
|
mkdir -p $(DESTDIR)$(MANPREFIX)/man1
|
||||||
|
sed "s/VERSION/$(VERSION)/g" < dmenu.1 > $(DESTDIR)$(MANPREFIX)/man1/dmenu.1
|
||||||
|
sed "s/VERSION/$(VERSION)/g" < stest.1 > $(DESTDIR)$(MANPREFIX)/man1/stest.1
|
||||||
|
chmod 644 $(DESTDIR)$(MANPREFIX)/man1/dmenu.1
|
||||||
|
chmod 644 $(DESTDIR)$(MANPREFIX)/man1/stest.1
|
||||||
|
|
||||||
|
uninstall:
|
||||||
|
rm -f $(DESTDIR)$(PREFIX)/bin/dmenu\
|
||||||
|
$(DESTDIR)$(PREFIX)/bin/dmenu_path\
|
||||||
|
$(DESTDIR)$(PREFIX)/bin/dmenu_run\
|
||||||
|
$(DESTDIR)$(PREFIX)/bin/stest\
|
||||||
|
$(DESTDIR)$(MANPREFIX)/man1/dmenu.1\
|
||||||
|
$(DESTDIR)$(MANPREFIX)/man1/stest.1
|
||||||
|
|
||||||
|
.PHONY: all options clean dist install uninstall
|
24
local/src/dmenu/README
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
dmenu - dynamic menu
|
||||||
|
====================
|
||||||
|
dmenu is an efficient dynamic menu for X.
|
||||||
|
|
||||||
|
|
||||||
|
Requirements
|
||||||
|
------------
|
||||||
|
In order to build dmenu you need the Xlib header files.
|
||||||
|
|
||||||
|
|
||||||
|
Installation
|
||||||
|
------------
|
||||||
|
Edit config.mk to match your local setup (dmenu is installed into
|
||||||
|
the /usr/local namespace by default).
|
||||||
|
|
||||||
|
Afterwards enter the following command to build and install dmenu
|
||||||
|
(if necessary as root):
|
||||||
|
|
||||||
|
make clean install
|
||||||
|
|
||||||
|
|
||||||
|
Running dmenu
|
||||||
|
-------------
|
||||||
|
See the man page for details.
|
49
local/src/dmenu/arg.h
Normal file
|
@ -0,0 +1,49 @@
|
||||||
|
/*
|
||||||
|
* Copy me if you can.
|
||||||
|
* by 20h
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef ARG_H__
|
||||||
|
#define ARG_H__
|
||||||
|
|
||||||
|
extern char *argv0;
|
||||||
|
|
||||||
|
/* use main(int argc, char *argv[]) */
|
||||||
|
#define ARGBEGIN for (argv0 = *argv, argv++, argc--;\
|
||||||
|
argv[0] && argv[0][0] == '-'\
|
||||||
|
&& argv[0][1];\
|
||||||
|
argc--, argv++) {\
|
||||||
|
char argc_;\
|
||||||
|
char **argv_;\
|
||||||
|
int brk_;\
|
||||||
|
if (argv[0][1] == '-' && argv[0][2] == '\0') {\
|
||||||
|
argv++;\
|
||||||
|
argc--;\
|
||||||
|
break;\
|
||||||
|
}\
|
||||||
|
for (brk_ = 0, argv[0]++, argv_ = argv;\
|
||||||
|
argv[0][0] && !brk_;\
|
||||||
|
argv[0]++) {\
|
||||||
|
if (argv_ != argv)\
|
||||||
|
break;\
|
||||||
|
argc_ = argv[0][0];\
|
||||||
|
switch (argc_)
|
||||||
|
|
||||||
|
#define ARGEND }\
|
||||||
|
}
|
||||||
|
|
||||||
|
#define ARGC() argc_
|
||||||
|
|
||||||
|
#define EARGF(x) ((argv[0][1] == '\0' && argv[1] == NULL)?\
|
||||||
|
((x), abort(), (char *)0) :\
|
||||||
|
(brk_ = 1, (argv[0][1] != '\0')?\
|
||||||
|
(&argv[0][1]) :\
|
||||||
|
(argc--, argv++, argv[0])))
|
||||||
|
|
||||||
|
#define ARGF() ((argv[0][1] == '\0' && argv[1] == NULL)?\
|
||||||
|
(char *)0 :\
|
||||||
|
(brk_ = 1, (argv[0][1] != '\0')?\
|
||||||
|
(&argv[0][1]) :\
|
||||||
|
(argc--, argv++, argv[0])))
|
||||||
|
|
||||||
|
#endif
|
25
local/src/dmenu/config.h
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
/* See LICENSE file for copyright and license details. */
|
||||||
|
/* Default settings; can be overriden by command line. */
|
||||||
|
|
||||||
|
static int topbar = 1; /* -b option; if 0, dmenu appears at bottom */
|
||||||
|
static int fuzzy = 1; /* -F option; if 0, dmenu doesn't use fuzzy matching */
|
||||||
|
/* -fn option overrides fonts[0]; default X11 font or font set */
|
||||||
|
static const char *fonts[] = {"Symbols Nerd Font Mono:size=10", "mononoki Nerd Font:size=12"};
|
||||||
|
static const char *prompt = NULL; /* -p option; prompt to the left of input field */
|
||||||
|
static const char *colors[SchemeLast][2] = {
|
||||||
|
/* fg bg */
|
||||||
|
[SchemeNorm] = { "#ebdbb2", "#1d2021" },
|
||||||
|
[SchemeSel] = { "#ebdbb2", "#cc241d" },
|
||||||
|
[SchemeSelHighlight] = { "#fbf1c7", "#282828" },
|
||||||
|
[SchemeNormHighlight] = { "#fbf1c7", "#282828" },
|
||||||
|
[SchemeOut] = { "#ebdbb2", "#8ec07c" },
|
||||||
|
[SchemeOutHighlight] = { "#fabd2f", "#83a598" },
|
||||||
|
};
|
||||||
|
/* -l option; if nonzero, dmenu uses vertical list with given number of lines */
|
||||||
|
static unsigned int lines = 0;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Characters not considered part of a word while deleting words
|
||||||
|
* for example: " /?\"&[]"
|
||||||
|
*/
|
||||||
|
static const char worddelimiters[] = " ";
|
32
local/src/dmenu/config.mk
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
# dmenu version
|
||||||
|
VERSION = 5.2
|
||||||
|
|
||||||
|
# paths
|
||||||
|
PREFIX = /usr/local
|
||||||
|
MANPREFIX = $(PREFIX)/share/man
|
||||||
|
|
||||||
|
X11INC = /usr/X11R6/include
|
||||||
|
X11LIB = /usr/X11R6/lib
|
||||||
|
|
||||||
|
# Xinerama, comment if you don't want it
|
||||||
|
XINERAMALIBS = -lXinerama
|
||||||
|
XINERAMAFLAGS = -DXINERAMA
|
||||||
|
|
||||||
|
# freetype
|
||||||
|
FREETYPELIBS = -lfontconfig -lXft
|
||||||
|
FREETYPEINC = /usr/include/freetype2
|
||||||
|
# OpenBSD (uncomment)
|
||||||
|
#FREETYPEINC = $(X11INC)/freetype2
|
||||||
|
#MANPREFIX = ${PREFIX}/man
|
||||||
|
|
||||||
|
# includes and libs
|
||||||
|
INCS = -I$(X11INC) -I$(FREETYPEINC)
|
||||||
|
LIBS = -L$(X11LIB) -lX11 $(XINERAMALIBS) $(FREETYPELIBS) -lm
|
||||||
|
|
||||||
|
# flags
|
||||||
|
CPPFLAGS = -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_XOPEN_SOURCE=700 -D_POSIX_C_SOURCE=200809L -DVERSION=\"$(VERSION)\" $(XINERAMAFLAGS)
|
||||||
|
CFLAGS = -std=c99 -pedantic -Wall -Os $(INCS) $(CPPFLAGS)
|
||||||
|
LDFLAGS = $(LIBS)
|
||||||
|
|
||||||
|
# compiler and linker
|
||||||
|
CC = cc
|
197
local/src/dmenu/dmenu.1
Normal file
|
@ -0,0 +1,197 @@
|
||||||
|
.TH DMENU 1 dmenu\-VERSION
|
||||||
|
.SH NAME
|
||||||
|
dmenu \- dynamic menu
|
||||||
|
.SH SYNOPSIS
|
||||||
|
.B dmenu
|
||||||
|
.RB [ \-bfivP ]
|
||||||
|
.RB [ \-l
|
||||||
|
.IR lines ]
|
||||||
|
.RB [ \-m
|
||||||
|
.IR monitor ]
|
||||||
|
.RB [ \-p
|
||||||
|
.IR prompt ]
|
||||||
|
.RB [ \-fn
|
||||||
|
.IR font ]
|
||||||
|
.RB [ \-nb
|
||||||
|
.IR color ]
|
||||||
|
.RB [ \-nf
|
||||||
|
.IR color ]
|
||||||
|
.RB [ \-sb
|
||||||
|
.IR color ]
|
||||||
|
.RB [ \-sf
|
||||||
|
.IR color ]
|
||||||
|
.RB [ \-w
|
||||||
|
.IR windowid ]
|
||||||
|
.P
|
||||||
|
.BR dmenu_run " ..."
|
||||||
|
.SH DESCRIPTION
|
||||||
|
.B dmenu
|
||||||
|
is a dynamic menu for X, which reads a list of newline\-separated items from
|
||||||
|
stdin. When the user selects an item and presses Return, their choice is printed
|
||||||
|
to stdout and dmenu terminates. Entering text will narrow the items to those
|
||||||
|
matching the tokens in the input.
|
||||||
|
.P
|
||||||
|
.B dmenu_run
|
||||||
|
is a script used by
|
||||||
|
.IR dwm (1)
|
||||||
|
which lists programs in the user's $PATH and runs the result in their $SHELL.
|
||||||
|
.SH OPTIONS
|
||||||
|
.TP
|
||||||
|
.B \-b
|
||||||
|
dmenu appears at the bottom of the screen.
|
||||||
|
.TP
|
||||||
|
.B \-f
|
||||||
|
dmenu grabs the keyboard before reading stdin if not reading from a tty. This
|
||||||
|
is faster, but will lock up X until stdin reaches end\-of\-file.
|
||||||
|
.TP
|
||||||
|
.B \-i
|
||||||
|
dmenu matches menu items case insensitively.
|
||||||
|
.TP
|
||||||
|
.B \-P
|
||||||
|
dmenu will not directly display the keyboard input, but instead replace it with dots. All data from stdin will be ignored.
|
||||||
|
.TP
|
||||||
|
.BI \-l " lines"
|
||||||
|
dmenu lists items vertically, with the given number of lines.
|
||||||
|
.TP
|
||||||
|
.BI \-m " monitor"
|
||||||
|
dmenu is displayed on the monitor number supplied. Monitor numbers are starting
|
||||||
|
from 0.
|
||||||
|
.TP
|
||||||
|
.BI \-p " prompt"
|
||||||
|
defines the prompt to be displayed to the left of the input field.
|
||||||
|
.TP
|
||||||
|
.BI \-fn " font"
|
||||||
|
defines the font or font set used.
|
||||||
|
.TP
|
||||||
|
.BI \-nb " color"
|
||||||
|
defines the normal background color.
|
||||||
|
.IR #RGB ,
|
||||||
|
.IR #RRGGBB ,
|
||||||
|
and X color names are supported.
|
||||||
|
.TP
|
||||||
|
.BI \-nf " color"
|
||||||
|
defines the normal foreground color.
|
||||||
|
.TP
|
||||||
|
.BI \-sb " color"
|
||||||
|
defines the selected background color.
|
||||||
|
.TP
|
||||||
|
.BI \-sf " color"
|
||||||
|
defines the selected foreground color.
|
||||||
|
.TP
|
||||||
|
.B \-v
|
||||||
|
prints version information to stdout, then exits.
|
||||||
|
.TP
|
||||||
|
.BI \-w " windowid"
|
||||||
|
embed into windowid.
|
||||||
|
.SH USAGE
|
||||||
|
dmenu is completely controlled by the keyboard. Items are selected using the
|
||||||
|
arrow keys, page up, page down, home, and end.
|
||||||
|
.TP
|
||||||
|
.B Tab
|
||||||
|
Copy the selected item to the input field.
|
||||||
|
.TP
|
||||||
|
.B Return
|
||||||
|
Confirm selection. Prints the selected item to stdout and exits, returning
|
||||||
|
success.
|
||||||
|
.TP
|
||||||
|
.B Ctrl-Return
|
||||||
|
Confirm selection. Prints the selected item to stdout and continues.
|
||||||
|
.TP
|
||||||
|
.B Shift\-Return
|
||||||
|
Confirm input. Prints the input text to stdout and exits, returning success.
|
||||||
|
.TP
|
||||||
|
.B Escape
|
||||||
|
Exit without selecting an item, returning failure.
|
||||||
|
.TP
|
||||||
|
.B Ctrl-Left
|
||||||
|
Move cursor to the start of the current word
|
||||||
|
.TP
|
||||||
|
.B Ctrl-Right
|
||||||
|
Move cursor to the end of the current word
|
||||||
|
.TP
|
||||||
|
.B C\-a
|
||||||
|
Home
|
||||||
|
.TP
|
||||||
|
.B C\-b
|
||||||
|
Left
|
||||||
|
.TP
|
||||||
|
.B C\-c
|
||||||
|
Escape
|
||||||
|
.TP
|
||||||
|
.B C\-d
|
||||||
|
Delete
|
||||||
|
.TP
|
||||||
|
.B C\-e
|
||||||
|
End
|
||||||
|
.TP
|
||||||
|
.B C\-f
|
||||||
|
Right
|
||||||
|
.TP
|
||||||
|
.B C\-g
|
||||||
|
Escape
|
||||||
|
.TP
|
||||||
|
.B C\-h
|
||||||
|
Backspace
|
||||||
|
.TP
|
||||||
|
.B C\-i
|
||||||
|
Tab
|
||||||
|
.TP
|
||||||
|
.B C\-j
|
||||||
|
Return
|
||||||
|
.TP
|
||||||
|
.B C\-J
|
||||||
|
Shift-Return
|
||||||
|
.TP
|
||||||
|
.B C\-k
|
||||||
|
Delete line right
|
||||||
|
.TP
|
||||||
|
.B C\-m
|
||||||
|
Return
|
||||||
|
.TP
|
||||||
|
.B C\-M
|
||||||
|
Shift-Return
|
||||||
|
.TP
|
||||||
|
.B C\-n
|
||||||
|
Down
|
||||||
|
.TP
|
||||||
|
.B C\-p
|
||||||
|
Up
|
||||||
|
.TP
|
||||||
|
.B C\-u
|
||||||
|
Delete line left
|
||||||
|
.TP
|
||||||
|
.B C\-w
|
||||||
|
Delete word left
|
||||||
|
.TP
|
||||||
|
.B C\-y
|
||||||
|
Paste from primary X selection
|
||||||
|
.TP
|
||||||
|
.B C\-Y
|
||||||
|
Paste from X clipboard
|
||||||
|
.TP
|
||||||
|
.B M\-b
|
||||||
|
Move cursor to the start of the current word
|
||||||
|
.TP
|
||||||
|
.B M\-f
|
||||||
|
Move cursor to the end of the current word
|
||||||
|
.TP
|
||||||
|
.B M\-g
|
||||||
|
Home
|
||||||
|
.TP
|
||||||
|
.B M\-G
|
||||||
|
End
|
||||||
|
.TP
|
||||||
|
.B M\-h
|
||||||
|
Up
|
||||||
|
.TP
|
||||||
|
.B M\-j
|
||||||
|
Page down
|
||||||
|
.TP
|
||||||
|
.B M\-k
|
||||||
|
Page up
|
||||||
|
.TP
|
||||||
|
.B M\-l
|
||||||
|
Down
|
||||||
|
.SH SEE ALSO
|
||||||
|
.IR dwm (1),
|
||||||
|
.IR stest (1)
|
1023
local/src/dmenu/dmenu.c
Normal file
13
local/src/dmenu/dmenu_path
Executable file
|
@ -0,0 +1,13 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
cachedir="${XDG_CACHE_HOME:-"$HOME/.cache"}"
|
||||||
|
cache="$cachedir/dmenu_run"
|
||||||
|
|
||||||
|
[ ! -e "$cachedir" ] && mkdir -p "$cachedir"
|
||||||
|
|
||||||
|
IFS=:
|
||||||
|
if stest -dqr -n "$cache" $PATH; then
|
||||||
|
stest -flx $PATH | sort -u | tee "$cache"
|
||||||
|
else
|
||||||
|
cat "$cache"
|
||||||
|
fi
|
2
local/src/dmenu/dmenu_run
Executable file
|
@ -0,0 +1,2 @@
|
||||||
|
#!/bin/sh
|
||||||
|
dmenu_path | dmenu "$@" | ${SHELL:-"/bin/sh"} &
|
406
local/src/dmenu/drw.c
Normal file
|
@ -0,0 +1,406 @@
|
||||||
|
/* See LICENSE file for copyright and license details. */
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <X11/Xlib.h>
|
||||||
|
#include <X11/Xft/Xft.h>
|
||||||
|
|
||||||
|
#include "drw.h"
|
||||||
|
#include "util.h"
|
||||||
|
|
||||||
|
#define UTF_INVALID 0xFFFD
|
||||||
|
#define UTF_SIZ 4
|
||||||
|
|
||||||
|
static const unsigned char utfbyte[UTF_SIZ + 1] = {0x80, 0, 0xC0, 0xE0, 0xF0};
|
||||||
|
static const unsigned char utfmask[UTF_SIZ + 1] = {0xC0, 0x80, 0xE0, 0xF0, 0xF8};
|
||||||
|
static const long utfmin[UTF_SIZ + 1] = { 0, 0, 0x80, 0x800, 0x10000};
|
||||||
|
static const long utfmax[UTF_SIZ + 1] = {0x10FFFF, 0x7F, 0x7FF, 0xFFFF, 0x10FFFF};
|
||||||
|
|
||||||
|
static long utf8decodebyte(const char c, size_t *i) {
|
||||||
|
for (*i = 0; *i < (UTF_SIZ + 1); ++(*i))
|
||||||
|
if (((unsigned char)c & utfmask[*i]) == utfbyte[*i])
|
||||||
|
return (unsigned char)c & ~utfmask[*i];
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static size_t utf8validate(long *u, size_t i) {
|
||||||
|
if (!BETWEEN(*u, utfmin[i], utfmax[i]) || BETWEEN(*u, 0xD800, 0xDFFF))
|
||||||
|
*u = UTF_INVALID;
|
||||||
|
for (i = 1; *u > utfmax[i]; ++i)
|
||||||
|
;
|
||||||
|
return i;
|
||||||
|
}
|
||||||
|
|
||||||
|
static size_t utf8decode(const char *c, long *u, size_t clen) {
|
||||||
|
size_t i, j, len, type;
|
||||||
|
long udecoded;
|
||||||
|
|
||||||
|
*u = UTF_INVALID;
|
||||||
|
if (!clen)
|
||||||
|
return 0;
|
||||||
|
udecoded = utf8decodebyte(c[0], &len);
|
||||||
|
if (!BETWEEN(len, 1, UTF_SIZ))
|
||||||
|
return 1;
|
||||||
|
for (i = 1, j = 1; i < clen && j < len; ++i, ++j) {
|
||||||
|
udecoded = (udecoded << 6) | utf8decodebyte(c[i], &type);
|
||||||
|
if (type)
|
||||||
|
return j;
|
||||||
|
}
|
||||||
|
if (j < len)
|
||||||
|
return 0;
|
||||||
|
*u = udecoded;
|
||||||
|
utf8validate(u, len);
|
||||||
|
|
||||||
|
return len;
|
||||||
|
}
|
||||||
|
|
||||||
|
Drw *drw_create(Display *dpy, int screen, Window root, unsigned int w, unsigned int h) {
|
||||||
|
Drw *drw = ecalloc(1, sizeof(Drw));
|
||||||
|
|
||||||
|
drw->dpy = dpy;
|
||||||
|
drw->screen = screen;
|
||||||
|
drw->root = root;
|
||||||
|
drw->w = w;
|
||||||
|
drw->h = h;
|
||||||
|
drw->drawable = XCreatePixmap(dpy, root, w, h, DefaultDepth(dpy, screen));
|
||||||
|
drw->gc = XCreateGC(dpy, root, 0, NULL);
|
||||||
|
XSetLineAttributes(dpy, drw->gc, 1, LineSolid, CapButt, JoinMiter);
|
||||||
|
|
||||||
|
return drw;
|
||||||
|
}
|
||||||
|
|
||||||
|
void drw_resize(Drw *drw, unsigned int w, unsigned int h) {
|
||||||
|
if (!drw)
|
||||||
|
return;
|
||||||
|
|
||||||
|
drw->w = w;
|
||||||
|
drw->h = h;
|
||||||
|
if (drw->drawable)
|
||||||
|
XFreePixmap(drw->dpy, drw->drawable);
|
||||||
|
drw->drawable = XCreatePixmap(drw->dpy, drw->root, w, h, DefaultDepth(drw->dpy, drw->screen));
|
||||||
|
}
|
||||||
|
|
||||||
|
void drw_free(Drw *drw) {
|
||||||
|
XFreePixmap(drw->dpy, drw->drawable);
|
||||||
|
XFreeGC(drw->dpy, drw->gc);
|
||||||
|
drw_fontset_free(drw->fonts);
|
||||||
|
free(drw);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* This function is an implementation detail. Library users should use
|
||||||
|
* drw_fontset_create instead.
|
||||||
|
*/
|
||||||
|
static Fnt *xfont_create(Drw *drw, const char *fontname, FcPattern *fontpattern) {
|
||||||
|
Fnt *font;
|
||||||
|
XftFont *xfont = NULL;
|
||||||
|
FcPattern *pattern = NULL;
|
||||||
|
|
||||||
|
if (fontname) {
|
||||||
|
/* Using the pattern found at font->xfont->pattern does not yield the
|
||||||
|
* same substitution results as using the pattern returned by
|
||||||
|
* FcNameParse; using the latter results in the desired fallback
|
||||||
|
* behaviour whereas the former just results in missing-character
|
||||||
|
* rectangles being drawn, at least with some fonts. */
|
||||||
|
if (!(xfont = XftFontOpenName(drw->dpy, drw->screen, fontname))) {
|
||||||
|
fprintf(stderr, "error, cannot load font from name: '%s'\n", fontname);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
if (!(pattern = FcNameParse((FcChar8 *) fontname))) {
|
||||||
|
fprintf(stderr, "error, cannot parse font name to pattern: '%s'\n", fontname);
|
||||||
|
XftFontClose(drw->dpy, xfont);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
} else if (fontpattern) {
|
||||||
|
if (!(xfont = XftFontOpenPattern(drw->dpy, fontpattern))) {
|
||||||
|
fprintf(stderr, "error, cannot load font from pattern.\n");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
die("no font specified.");
|
||||||
|
}
|
||||||
|
|
||||||
|
font = ecalloc(1, sizeof(Fnt));
|
||||||
|
font->xfont = xfont;
|
||||||
|
font->pattern = pattern;
|
||||||
|
font->h = xfont->ascent + xfont->descent;
|
||||||
|
font->dpy = drw->dpy;
|
||||||
|
|
||||||
|
return font;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void xfont_free(Fnt *font) {
|
||||||
|
if (!font)
|
||||||
|
return;
|
||||||
|
if (font->pattern)
|
||||||
|
FcPatternDestroy(font->pattern);
|
||||||
|
XftFontClose(font->dpy, font->xfont);
|
||||||
|
free(font);
|
||||||
|
}
|
||||||
|
|
||||||
|
Fnt *drw_fontset_create(Drw* drw, const char *fonts[], size_t fontcount) {
|
||||||
|
Fnt *cur, *ret = NULL;
|
||||||
|
size_t i;
|
||||||
|
|
||||||
|
if (!drw || !fonts)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
for (i = 1; i <= fontcount; i++) {
|
||||||
|
if ((cur = xfont_create(drw, fonts[fontcount - i], NULL))) {
|
||||||
|
cur->next = ret;
|
||||||
|
ret = cur;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return (drw->fonts = ret);
|
||||||
|
}
|
||||||
|
|
||||||
|
void drw_fontset_free(Fnt *font) {
|
||||||
|
if (font) {
|
||||||
|
drw_fontset_free(font->next);
|
||||||
|
xfont_free(font);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void drw_clr_create(Drw *drw, Clr *dest, const char *clrname) {
|
||||||
|
if (!drw || !dest || !clrname)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (!XftColorAllocName(drw->dpy, DefaultVisual(drw->dpy, drw->screen),
|
||||||
|
DefaultColormap(drw->dpy, drw->screen),
|
||||||
|
clrname, dest))
|
||||||
|
die("error, cannot allocate color '%s'", clrname);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Wrapper to create color schemes. The caller has to call free(3) on the
|
||||||
|
* returned color scheme when done using it. */
|
||||||
|
Clr *drw_scm_create(Drw *drw, const char *clrnames[], size_t clrcount) {
|
||||||
|
size_t i;
|
||||||
|
Clr *ret;
|
||||||
|
|
||||||
|
/* need at least two colors for a scheme */
|
||||||
|
if (!drw || !clrnames || clrcount < 2 || !(ret = ecalloc(clrcount, sizeof(XftColor))))
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
for (i = 0; i < clrcount; i++)
|
||||||
|
drw_clr_create(drw, &ret[i], clrnames[i]);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
void drw_setfontset(Drw *drw, Fnt *set) {
|
||||||
|
if (drw)
|
||||||
|
drw->fonts = set;
|
||||||
|
}
|
||||||
|
|
||||||
|
void drw_setscheme(Drw *drw, Clr *scm) {
|
||||||
|
if (drw)
|
||||||
|
drw->scheme = scm;
|
||||||
|
}
|
||||||
|
|
||||||
|
void drw_rect(Drw *drw, int x, int y, unsigned int w, unsigned int h, int filled, int invert) {
|
||||||
|
if (!drw || !drw->scheme)
|
||||||
|
return;
|
||||||
|
XSetForeground(drw->dpy, drw->gc, invert ? drw->scheme[ColBg].pixel : drw->scheme[ColFg].pixel);
|
||||||
|
if (filled)
|
||||||
|
XFillRectangle(drw->dpy, drw->drawable, drw->gc, x, y, w, h);
|
||||||
|
else
|
||||||
|
XDrawRectangle(drw->dpy, drw->drawable, drw->gc, x, y, w - 1, h - 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
int drw_text(Drw *drw, int x, int y, unsigned int w, unsigned int h, unsigned int lpad, const char *text, int invert) {
|
||||||
|
int i, ty, ellipsis_x = 0;
|
||||||
|
unsigned int tmpw, ew, ellipsis_w = 0, ellipsis_len;
|
||||||
|
XftDraw *d = NULL;
|
||||||
|
Fnt *usedfont, *curfont, *nextfont;
|
||||||
|
int utf8strlen, utf8charlen, render = x || y || w || h;
|
||||||
|
long utf8codepoint = 0;
|
||||||
|
const char *utf8str;
|
||||||
|
FcCharSet *fccharset;
|
||||||
|
FcPattern *fcpattern;
|
||||||
|
FcPattern *match;
|
||||||
|
XftResult result;
|
||||||
|
int charexists = 0, overflow = 0;
|
||||||
|
/* keep track of a couple codepoints for which we have no match. */
|
||||||
|
enum { nomatches_len = 64 };
|
||||||
|
static struct { long codepoint[nomatches_len]; unsigned int idx; } nomatches;
|
||||||
|
static unsigned int ellipsis_width = 0;
|
||||||
|
|
||||||
|
if (!drw || (render && (!drw->scheme || !w)) || !text || !drw->fonts)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
if (!render) {
|
||||||
|
w = invert ? invert : ~invert;
|
||||||
|
} else {
|
||||||
|
XSetForeground(drw->dpy, drw->gc, drw->scheme[invert ? ColFg : ColBg].pixel);
|
||||||
|
XFillRectangle(drw->dpy, drw->drawable, drw->gc, x, y, w, h);
|
||||||
|
d = XftDrawCreate(drw->dpy, drw->drawable,
|
||||||
|
DefaultVisual(drw->dpy, drw->screen),
|
||||||
|
DefaultColormap(drw->dpy, drw->screen));
|
||||||
|
x += lpad;
|
||||||
|
w -= lpad;
|
||||||
|
}
|
||||||
|
|
||||||
|
usedfont = drw->fonts;
|
||||||
|
if (!ellipsis_width && render)
|
||||||
|
ellipsis_width = drw_fontset_getwidth(drw, "...");
|
||||||
|
while (1) {
|
||||||
|
ew = ellipsis_len = utf8strlen = 0;
|
||||||
|
utf8str = text;
|
||||||
|
nextfont = NULL;
|
||||||
|
while (*text) {
|
||||||
|
utf8charlen = utf8decode(text, &utf8codepoint, UTF_SIZ);
|
||||||
|
for (curfont = drw->fonts; curfont; curfont = curfont->next) {
|
||||||
|
charexists = charexists || XftCharExists(drw->dpy, curfont->xfont, utf8codepoint);
|
||||||
|
if (charexists) {
|
||||||
|
drw_font_getexts(curfont, text, utf8charlen, &tmpw, NULL);
|
||||||
|
if (ew + ellipsis_width <= w) {
|
||||||
|
/* keep track where the ellipsis still fits */
|
||||||
|
ellipsis_x = x + ew;
|
||||||
|
ellipsis_w = w - ew;
|
||||||
|
ellipsis_len = utf8strlen;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ew + tmpw > w) {
|
||||||
|
overflow = 1;
|
||||||
|
/* called from drw_fontset_getwidth_clamp():
|
||||||
|
* it wants the width AFTER the overflow
|
||||||
|
*/
|
||||||
|
if (!render)
|
||||||
|
x += tmpw;
|
||||||
|
else
|
||||||
|
utf8strlen = ellipsis_len;
|
||||||
|
} else if (curfont == usedfont) {
|
||||||
|
utf8strlen += utf8charlen;
|
||||||
|
text += utf8charlen;
|
||||||
|
ew += tmpw;
|
||||||
|
} else {
|
||||||
|
nextfont = curfont;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (overflow || !charexists || nextfont)
|
||||||
|
break;
|
||||||
|
else
|
||||||
|
charexists = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (utf8strlen) {
|
||||||
|
if (render) {
|
||||||
|
ty = y + (h - usedfont->h) / 2 + usedfont->xfont->ascent;
|
||||||
|
XftDrawStringUtf8(d, &drw->scheme[invert ? ColBg : ColFg],
|
||||||
|
usedfont->xfont, x, ty, (XftChar8 *)utf8str, utf8strlen);
|
||||||
|
}
|
||||||
|
x += ew;
|
||||||
|
w -= ew;
|
||||||
|
}
|
||||||
|
if (render && overflow)
|
||||||
|
drw_text(drw, ellipsis_x, y, ellipsis_w, h, 0, "...", invert);
|
||||||
|
|
||||||
|
if (!*text || overflow) {
|
||||||
|
break;
|
||||||
|
} else if (nextfont) {
|
||||||
|
charexists = 0;
|
||||||
|
usedfont = nextfont;
|
||||||
|
} else {
|
||||||
|
/* Regardless of whether or not a fallback font is found, the
|
||||||
|
* character must be drawn. */
|
||||||
|
charexists = 1;
|
||||||
|
|
||||||
|
for (i = 0; i < nomatches_len; ++i) {
|
||||||
|
/* avoid calling XftFontMatch if we know we won't find a match */
|
||||||
|
if (utf8codepoint == nomatches.codepoint[i])
|
||||||
|
goto no_match;
|
||||||
|
}
|
||||||
|
|
||||||
|
fccharset = FcCharSetCreate();
|
||||||
|
FcCharSetAddChar(fccharset, utf8codepoint);
|
||||||
|
|
||||||
|
if (!drw->fonts->pattern) {
|
||||||
|
/* Refer to the comment in xfont_create for more information. */
|
||||||
|
die("the first font in the cache must be loaded from a font string.");
|
||||||
|
}
|
||||||
|
|
||||||
|
fcpattern = FcPatternDuplicate(drw->fonts->pattern);
|
||||||
|
FcPatternAddCharSet(fcpattern, FC_CHARSET, fccharset);
|
||||||
|
FcPatternAddBool(fcpattern, FC_SCALABLE, FcTrue);
|
||||||
|
|
||||||
|
FcConfigSubstitute(NULL, fcpattern, FcMatchPattern);
|
||||||
|
FcDefaultSubstitute(fcpattern);
|
||||||
|
match = XftFontMatch(drw->dpy, drw->screen, fcpattern, &result);
|
||||||
|
|
||||||
|
FcCharSetDestroy(fccharset);
|
||||||
|
FcPatternDestroy(fcpattern);
|
||||||
|
|
||||||
|
if (match) {
|
||||||
|
usedfont = xfont_create(drw, NULL, match);
|
||||||
|
if (usedfont && XftCharExists(drw->dpy, usedfont->xfont, utf8codepoint)) {
|
||||||
|
for (curfont = drw->fonts; curfont->next; curfont = curfont->next)
|
||||||
|
; /* NOP */
|
||||||
|
curfont->next = usedfont;
|
||||||
|
} else {
|
||||||
|
xfont_free(usedfont);
|
||||||
|
nomatches.codepoint[++nomatches.idx % nomatches_len] = utf8codepoint;
|
||||||
|
no_match:
|
||||||
|
usedfont = drw->fonts;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (d)
|
||||||
|
XftDrawDestroy(d);
|
||||||
|
|
||||||
|
return x + (render ? w : 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
void drw_map(Drw *drw, Window win, int x, int y, unsigned int w, unsigned int h) {
|
||||||
|
if (!drw)
|
||||||
|
return;
|
||||||
|
|
||||||
|
XCopyArea(drw->dpy, drw->drawable, win, drw->gc, x, y, w, h, x, y);
|
||||||
|
XSync(drw->dpy, False);
|
||||||
|
}
|
||||||
|
|
||||||
|
unsigned int drw_fontset_getwidth(Drw *drw, const char *text) {
|
||||||
|
if (!drw || !drw->fonts || !text)
|
||||||
|
return 0;
|
||||||
|
return drw_text(drw, 0, 0, 0, 0, 0, text, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
unsigned int drw_fontset_getwidth_clamp(Drw *drw, const char *text, unsigned int n) {
|
||||||
|
unsigned int tmp = 0;
|
||||||
|
if (drw && drw->fonts && text && n)
|
||||||
|
tmp = drw_text(drw, 0, 0, 0, 0, 0, text, n);
|
||||||
|
return MIN(n, tmp);
|
||||||
|
}
|
||||||
|
|
||||||
|
void drw_font_getexts(Fnt *font, const char *text, unsigned int len, unsigned int *w, unsigned int *h) {
|
||||||
|
XGlyphInfo ext;
|
||||||
|
|
||||||
|
if (!font || !text)
|
||||||
|
return;
|
||||||
|
|
||||||
|
XftTextExtentsUtf8(font->dpy, font->xfont, (XftChar8 *)text, len, &ext);
|
||||||
|
if (w)
|
||||||
|
*w = ext.xOff;
|
||||||
|
if (h)
|
||||||
|
*h = font->h;
|
||||||
|
}
|
||||||
|
|
||||||
|
Cur *drw_cur_create(Drw *drw, int shape) {
|
||||||
|
Cur *cur;
|
||||||
|
|
||||||
|
if (!drw || !(cur = ecalloc(1, sizeof(Cur))))
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
cur->cursor = XCreateFontCursor(drw->dpy, shape);
|
||||||
|
|
||||||
|
return cur;
|
||||||
|
}
|
||||||
|
|
||||||
|
void drw_cur_free(Drw *drw, Cur *cursor) {
|
||||||
|
if (!cursor)
|
||||||
|
return;
|
||||||
|
|
||||||
|
XFreeCursor(drw->dpy, cursor->cursor);
|
||||||
|
free(cursor);
|
||||||
|
}
|
58
local/src/dmenu/drw.h
Normal file
|
@ -0,0 +1,58 @@
|
||||||
|
/* See LICENSE file for copyright and license details. */
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
Cursor cursor;
|
||||||
|
} Cur;
|
||||||
|
|
||||||
|
typedef struct Fnt {
|
||||||
|
Display *dpy;
|
||||||
|
unsigned int h;
|
||||||
|
XftFont *xfont;
|
||||||
|
FcPattern *pattern;
|
||||||
|
struct Fnt *next;
|
||||||
|
} Fnt;
|
||||||
|
|
||||||
|
enum { ColFg, ColBg }; /* Clr scheme index */
|
||||||
|
typedef XftColor Clr;
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
unsigned int w, h;
|
||||||
|
Display *dpy;
|
||||||
|
int screen;
|
||||||
|
Window root;
|
||||||
|
Drawable drawable;
|
||||||
|
GC gc;
|
||||||
|
Clr *scheme;
|
||||||
|
Fnt *fonts;
|
||||||
|
} Drw;
|
||||||
|
|
||||||
|
/* Drawable abstraction */
|
||||||
|
Drw *drw_create(Display *dpy, int screen, Window win, unsigned int w, unsigned int h);
|
||||||
|
void drw_resize(Drw *drw, unsigned int w, unsigned int h);
|
||||||
|
void drw_free(Drw *drw);
|
||||||
|
|
||||||
|
/* Fnt abstraction */
|
||||||
|
Fnt *drw_fontset_create(Drw* drw, const char *fonts[], size_t fontcount);
|
||||||
|
void drw_fontset_free(Fnt* set);
|
||||||
|
unsigned int drw_fontset_getwidth(Drw *drw, const char *text);
|
||||||
|
unsigned int drw_fontset_getwidth_clamp(Drw *drw, const char *text, unsigned int n);
|
||||||
|
void drw_font_getexts(Fnt *font, const char *text, unsigned int len, unsigned int *w, unsigned int *h);
|
||||||
|
|
||||||
|
/* Colorscheme abstraction */
|
||||||
|
void drw_clr_create(Drw *drw, Clr *dest, const char *clrname);
|
||||||
|
Clr *drw_scm_create(Drw *drw, const char *clrnames[], size_t clrcount);
|
||||||
|
|
||||||
|
/* Cursor abstraction */
|
||||||
|
Cur *drw_cur_create(Drw *drw, int shape);
|
||||||
|
void drw_cur_free(Drw *drw, Cur *cursor);
|
||||||
|
|
||||||
|
/* Drawing context manipulation */
|
||||||
|
void drw_setfontset(Drw *drw, Fnt *set);
|
||||||
|
void drw_setscheme(Drw *drw, Clr *scm);
|
||||||
|
|
||||||
|
/* Drawing functions */
|
||||||
|
void drw_rect(Drw *drw, int x, int y, unsigned int w, unsigned int h, int filled, int invert);
|
||||||
|
int drw_text(Drw *drw, int x, int y, unsigned int w, unsigned int h, unsigned int lpad, const char *text, int invert);
|
||||||
|
|
||||||
|
/* Map functions */
|
||||||
|
void drw_map(Drw *drw, Window win, int x, int y, unsigned int w, unsigned int h);
|
163
local/src/dmenu/patches/dmenu-fuzzymatch-4.9.diff
Normal file
|
@ -0,0 +1,163 @@
|
||||||
|
From 94353eb52055927d9079f3d9e33da1c954abf386 Mon Sep 17 00:00:00 2001
|
||||||
|
From: aleks <aleks.stier@icloud.com>
|
||||||
|
Date: Wed, 26 Jun 2019 13:25:10 +0200
|
||||||
|
Subject: [PATCH] Add support for fuzzy-matching
|
||||||
|
|
||||||
|
---
|
||||||
|
config.def.h | 1 +
|
||||||
|
config.mk | 2 +-
|
||||||
|
dmenu.c | 89 ++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||||
|
3 files changed, 91 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/config.def.h b/config.def.h
|
||||||
|
index 1edb647..51612b9 100644
|
||||||
|
--- a/config.def.h
|
||||||
|
+++ b/config.def.h
|
||||||
|
@@ -2,6 +2,7 @@
|
||||||
|
/* Default settings; can be overriden by command line. */
|
||||||
|
|
||||||
|
static int topbar = 1; /* -b option; if 0, dmenu appears at bottom */
|
||||||
|
+static int fuzzy = 1; /* -F option; if 0, dmenu doesn't use fuzzy matching */
|
||||||
|
/* -fn option overrides fonts[0]; default X11 font or font set */
|
||||||
|
static const char *fonts[] = {
|
||||||
|
"monospace:size=10"
|
||||||
|
diff --git a/config.mk b/config.mk
|
||||||
|
index 0929b4a..d14309a 100644
|
||||||
|
--- a/config.mk
|
||||||
|
+++ b/config.mk
|
||||||
|
@@ -20,7 +20,7 @@ FREETYPEINC = /usr/include/freetype2
|
||||||
|
|
||||||
|
# includes and libs
|
||||||
|
INCS = -I$(X11INC) -I$(FREETYPEINC)
|
||||||
|
-LIBS = -L$(X11LIB) -lX11 $(XINERAMALIBS) $(FREETYPELIBS)
|
||||||
|
+LIBS = -L$(X11LIB) -lX11 $(XINERAMALIBS) $(FREETYPELIBS) -lm
|
||||||
|
|
||||||
|
# flags
|
||||||
|
CPPFLAGS = -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_XOPEN_SOURCE=700 -D_POSIX_C_SOURCE=200809L -DVERSION=\"$(VERSION)\" $(XINERAMAFLAGS)
|
||||||
|
diff --git a/dmenu.c b/dmenu.c
|
||||||
|
index 6b8f51b..96ddc98 100644
|
||||||
|
--- a/dmenu.c
|
||||||
|
+++ b/dmenu.c
|
||||||
|
@@ -1,6 +1,7 @@
|
||||||
|
/* See LICENSE file for copyright and license details. */
|
||||||
|
#include <ctype.h>
|
||||||
|
#include <locale.h>
|
||||||
|
+#include <math.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
|
@@ -32,6 +33,7 @@ struct item {
|
||||||
|
char *text;
|
||||||
|
struct item *left, *right;
|
||||||
|
int out;
|
||||||
|
+ double distance;
|
||||||
|
};
|
||||||
|
|
||||||
|
static char text[BUFSIZ] = "";
|
||||||
|
@@ -210,9 +212,94 @@ grabkeyboard(void)
|
||||||
|
die("cannot grab keyboard");
|
||||||
|
}
|
||||||
|
|
||||||
|
+int
|
||||||
|
+compare_distance(const void *a, const void *b)
|
||||||
|
+{
|
||||||
|
+ struct item *da = *(struct item **) a;
|
||||||
|
+ struct item *db = *(struct item **) b;
|
||||||
|
+
|
||||||
|
+ if (!db)
|
||||||
|
+ return 1;
|
||||||
|
+ if (!da)
|
||||||
|
+ return -1;
|
||||||
|
+
|
||||||
|
+ return da->distance == db->distance ? 0 : da->distance < db->distance ? -1 : 1;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+void
|
||||||
|
+fuzzymatch(void)
|
||||||
|
+{
|
||||||
|
+ /* bang - we have so much memory */
|
||||||
|
+ struct item *it;
|
||||||
|
+ struct item **fuzzymatches = NULL;
|
||||||
|
+ char c;
|
||||||
|
+ int number_of_matches = 0, i, pidx, sidx, eidx;
|
||||||
|
+ int text_len = strlen(text), itext_len;
|
||||||
|
+
|
||||||
|
+ matches = matchend = NULL;
|
||||||
|
+
|
||||||
|
+ /* walk through all items */
|
||||||
|
+ for (it = items; it && it->text; it++) {
|
||||||
|
+ if (text_len) {
|
||||||
|
+ itext_len = strlen(it->text);
|
||||||
|
+ pidx = 0; /* pointer */
|
||||||
|
+ sidx = eidx = -1; /* start of match, end of match */
|
||||||
|
+ /* walk through item text */
|
||||||
|
+ for (i = 0; i < itext_len && (c = it->text[i]); i++) {
|
||||||
|
+ /* fuzzy match pattern */
|
||||||
|
+ if (!fstrncmp(&text[pidx], &c, 1)) {
|
||||||
|
+ if(sidx == -1)
|
||||||
|
+ sidx = i;
|
||||||
|
+ pidx++;
|
||||||
|
+ if (pidx == text_len) {
|
||||||
|
+ eidx = i;
|
||||||
|
+ break;
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+ /* build list of matches */
|
||||||
|
+ if (eidx != -1) {
|
||||||
|
+ /* compute distance */
|
||||||
|
+ /* add penalty if match starts late (log(sidx+2))
|
||||||
|
+ * add penalty for long a match without many matching characters */
|
||||||
|
+ it->distance = log(sidx + 2) + (double)(eidx - sidx - text_len);
|
||||||
|
+ /* fprintf(stderr, "distance %s %f\n", it->text, it->distance); */
|
||||||
|
+ appenditem(it, &matches, &matchend);
|
||||||
|
+ number_of_matches++;
|
||||||
|
+ }
|
||||||
|
+ } else {
|
||||||
|
+ appenditem(it, &matches, &matchend);
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ if (number_of_matches) {
|
||||||
|
+ /* initialize array with matches */
|
||||||
|
+ if (!(fuzzymatches = realloc(fuzzymatches, number_of_matches * sizeof(struct item*))))
|
||||||
|
+ die("cannot realloc %u bytes:", number_of_matches * sizeof(struct item*));
|
||||||
|
+ for (i = 0, it = matches; it && i < number_of_matches; i++, it = it->right) {
|
||||||
|
+ fuzzymatches[i] = it;
|
||||||
|
+ }
|
||||||
|
+ /* sort matches according to distance */
|
||||||
|
+ qsort(fuzzymatches, number_of_matches, sizeof(struct item*), compare_distance);
|
||||||
|
+ /* rebuild list of matches */
|
||||||
|
+ matches = matchend = NULL;
|
||||||
|
+ for (i = 0, it = fuzzymatches[i]; i < number_of_matches && it && \
|
||||||
|
+ it->text; i++, it = fuzzymatches[i]) {
|
||||||
|
+ appenditem(it, &matches, &matchend);
|
||||||
|
+ }
|
||||||
|
+ free(fuzzymatches);
|
||||||
|
+ }
|
||||||
|
+ curr = sel = matches;
|
||||||
|
+ calcoffsets();
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
static void
|
||||||
|
match(void)
|
||||||
|
{
|
||||||
|
+ if (fuzzy) {
|
||||||
|
+ fuzzymatch();
|
||||||
|
+ return;
|
||||||
|
+ }
|
||||||
|
static char **tokv = NULL;
|
||||||
|
static int tokn = 0;
|
||||||
|
|
||||||
|
@@ -702,6 +789,8 @@ main(int argc, char *argv[])
|
||||||
|
topbar = 0;
|
||||||
|
else if (!strcmp(argv[i], "-f")) /* grabs keyboard before reading stdin */
|
||||||
|
fast = 1;
|
||||||
|
+ else if (!strcmp(argv[i], "-F")) /* grabs keyboard before reading stdin */
|
||||||
|
+ fuzzy = 0;
|
||||||
|
else if (!strcmp(argv[i], "-i")) { /* case-insensitive item matching */
|
||||||
|
fstrncmp = strncasecmp;
|
||||||
|
fstrstr = cistrstr;
|
||||||
|
--
|
||||||
|
2.22.0
|
||||||
|
|
|
@ -0,0 +1,97 @@
|
||||||
|
From fcdc1593ed418166f20b7e691a49b1e6eefc116e Mon Sep 17 00:00:00 2001
|
||||||
|
From: Nathaniel Evan <nathanielevan@zohomail.com>
|
||||||
|
Date: Fri, 11 Dec 2020 11:08:12 +0700
|
||||||
|
Subject: [PATCH] Highlight matched text in a different color scheme
|
||||||
|
|
||||||
|
---
|
||||||
|
config.def.h | 3 +++
|
||||||
|
dmenu.c | 44 +++++++++++++++++++++++++++++++++++++++++---
|
||||||
|
2 files changed, 44 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/config.def.h b/config.def.h
|
||||||
|
index 1edb647..79be73a 100644
|
||||||
|
--- a/config.def.h
|
||||||
|
+++ b/config.def.h
|
||||||
|
@@ -11,7 +11,10 @@ static const char *colors[SchemeLast][2] = {
|
||||||
|
/* fg bg */
|
||||||
|
[SchemeNorm] = { "#bbbbbb", "#222222" },
|
||||||
|
[SchemeSel] = { "#eeeeee", "#005577" },
|
||||||
|
+ [SchemeSelHighlight] = { "#ffc978", "#005577" },
|
||||||
|
+ [SchemeNormHighlight] = { "#ffc978", "#222222" },
|
||||||
|
[SchemeOut] = { "#000000", "#00ffff" },
|
||||||
|
+ [SchemeOutHighlight] = { "#ffc978", "#00ffff" },
|
||||||
|
};
|
||||||
|
/* -l option; if nonzero, dmenu uses vertical list with given number of lines */
|
||||||
|
static unsigned int lines = 0;
|
||||||
|
diff --git a/dmenu.c b/dmenu.c
|
||||||
|
index 65f25ce..cce1ad1 100644
|
||||||
|
--- a/dmenu.c
|
||||||
|
+++ b/dmenu.c
|
||||||
|
@@ -26,8 +26,7 @@
|
||||||
|
#define TEXTW(X) (drw_fontset_getwidth(drw, (X)) + lrpad)
|
||||||
|
|
||||||
|
/* enums */
|
||||||
|
-enum { SchemeNorm, SchemeSel, SchemeOut, SchemeLast }; /* color schemes */
|
||||||
|
-
|
||||||
|
+enum { SchemeNorm, SchemeSel, SchemeOut, SchemeNormHighlight, SchemeSelHighlight, SchemeOutHighlight, SchemeLast }; /* color schemes */
|
||||||
|
struct item {
|
||||||
|
char *text;
|
||||||
|
struct item *left, *right;
|
||||||
|
@@ -113,6 +112,43 @@ cistrstr(const char *s, const char *sub)
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
+static void
|
||||||
|
+drawhighlights(struct item *item, int x, int y, int maxw)
|
||||||
|
+{
|
||||||
|
+ char restorechar, tokens[sizeof text], *highlight, *token;
|
||||||
|
+ int indentx, highlightlen;
|
||||||
|
+
|
||||||
|
+ drw_setscheme(drw, scheme[item == sel ? SchemeSelHighlight : item->out ? SchemeOutHighlight : SchemeNormHighlight]);
|
||||||
|
+ strcpy(tokens, text);
|
||||||
|
+ for (token = strtok(tokens, " "); token; token = strtok(NULL, " ")) {
|
||||||
|
+ highlight = fstrstr(item->text, token);
|
||||||
|
+ while (highlight) {
|
||||||
|
+ // Move item str end, calc width for highlight indent, & restore
|
||||||
|
+ highlightlen = highlight - item->text;
|
||||||
|
+ restorechar = *highlight;
|
||||||
|
+ item->text[highlightlen] = '\0';
|
||||||
|
+ indentx = TEXTW(item->text);
|
||||||
|
+ item->text[highlightlen] = restorechar;
|
||||||
|
+
|
||||||
|
+ // Move highlight str end, draw highlight, & restore
|
||||||
|
+ restorechar = highlight[strlen(token)];
|
||||||
|
+ highlight[strlen(token)] = '\0';
|
||||||
|
+ if (indentx - (lrpad / 2) - 1 < maxw)
|
||||||
|
+ drw_text(
|
||||||
|
+ drw,
|
||||||
|
+ x + indentx - (lrpad / 2) - 1,
|
||||||
|
+ y,
|
||||||
|
+ MIN(maxw - indentx, TEXTW(highlight) - lrpad),
|
||||||
|
+ bh, 0, highlight, 0
|
||||||
|
+ );
|
||||||
|
+ highlight[strlen(token)] = restorechar;
|
||||||
|
+
|
||||||
|
+ if (strlen(highlight) - strlen(token) < strlen(token)) break;
|
||||||
|
+ highlight = fstrstr(highlight + strlen(token), token);
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
static int
|
||||||
|
drawitem(struct item *item, int x, int y, int w)
|
||||||
|
{
|
||||||
|
@@ -123,7 +159,9 @@ drawitem(struct item *item, int x, int y, int w)
|
||||||
|
else
|
||||||
|
drw_setscheme(drw, scheme[SchemeNorm]);
|
||||||
|
|
||||||
|
- return drw_text(drw, x, y, w, bh, lrpad / 2, item->text, 0);
|
||||||
|
+ int r = drw_text(drw, x, y, w, bh, lrpad / 2, item->text, 0);
|
||||||
|
+ drawhighlights(item, x, y, w);
|
||||||
|
+ return r;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
--
|
||||||
|
2.29.2
|
||||||
|
|
144
local/src/dmenu/patches/dmenu-mousesupport-5.2.diff
Normal file
|
@ -0,0 +1,144 @@
|
||||||
|
diff --git a/dmenu.c b/dmenu.c
|
||||||
|
index 7cf253b..d276a94 100644
|
||||||
|
--- a/dmenu.c
|
||||||
|
+++ b/dmenu.c
|
||||||
|
@@ -528,6 +528,119 @@ draw:
|
||||||
|
drawmenu();
|
||||||
|
}
|
||||||
|
|
||||||
|
+static void
|
||||||
|
+buttonpress(XEvent *e)
|
||||||
|
+{
|
||||||
|
+ struct item *item;
|
||||||
|
+ XButtonPressedEvent *ev = &e->xbutton;
|
||||||
|
+ int x = 0, y = 0, h = bh, w;
|
||||||
|
+
|
||||||
|
+ if (ev->window != win)
|
||||||
|
+ return;
|
||||||
|
+
|
||||||
|
+ /* right-click: exit */
|
||||||
|
+ if (ev->button == Button3)
|
||||||
|
+ exit(1);
|
||||||
|
+
|
||||||
|
+ if (prompt && *prompt)
|
||||||
|
+ x += promptw;
|
||||||
|
+
|
||||||
|
+ /* input field */
|
||||||
|
+ w = (lines > 0 || !matches) ? mw - x : inputw;
|
||||||
|
+
|
||||||
|
+ /* left-click on input: clear input,
|
||||||
|
+ * NOTE: if there is no left-arrow the space for < is reserved so
|
||||||
|
+ * add that to the input width */
|
||||||
|
+ if (ev->button == Button1 &&
|
||||||
|
+ ((lines <= 0 && ev->x >= 0 && ev->x <= x + w +
|
||||||
|
+ ((!prev || !curr->left) ? TEXTW("<") : 0)) ||
|
||||||
|
+ (lines > 0 && ev->y >= y && ev->y <= y + h))) {
|
||||||
|
+ insert(NULL, -cursor);
|
||||||
|
+ drawmenu();
|
||||||
|
+ return;
|
||||||
|
+ }
|
||||||
|
+ /* middle-mouse click: paste selection */
|
||||||
|
+ if (ev->button == Button2) {
|
||||||
|
+ XConvertSelection(dpy, (ev->state & ShiftMask) ? clip : XA_PRIMARY,
|
||||||
|
+ utf8, utf8, win, CurrentTime);
|
||||||
|
+ drawmenu();
|
||||||
|
+ return;
|
||||||
|
+ }
|
||||||
|
+ /* scroll up */
|
||||||
|
+ if (ev->button == Button4 && prev) {
|
||||||
|
+ sel = curr = prev;
|
||||||
|
+ calcoffsets();
|
||||||
|
+ drawmenu();
|
||||||
|
+ return;
|
||||||
|
+ }
|
||||||
|
+ /* scroll down */
|
||||||
|
+ if (ev->button == Button5 && next) {
|
||||||
|
+ sel = curr = next;
|
||||||
|
+ calcoffsets();
|
||||||
|
+ drawmenu();
|
||||||
|
+ return;
|
||||||
|
+ }
|
||||||
|
+ if (ev->button != Button1)
|
||||||
|
+ return;
|
||||||
|
+ if (ev->state & ~ControlMask)
|
||||||
|
+ return;
|
||||||
|
+ if (lines > 0) {
|
||||||
|
+ /* vertical list: (ctrl)left-click on item */
|
||||||
|
+ w = mw - x;
|
||||||
|
+ for (item = curr; item != next; item = item->right) {
|
||||||
|
+ y += h;
|
||||||
|
+ if (ev->y >= y && ev->y <= (y + h)) {
|
||||||
|
+ puts(item->text);
|
||||||
|
+ if (!(ev->state & ControlMask))
|
||||||
|
+ exit(0);
|
||||||
|
+ sel = item;
|
||||||
|
+ if (sel) {
|
||||||
|
+ sel->out = 1;
|
||||||
|
+ drawmenu();
|
||||||
|
+ }
|
||||||
|
+ return;
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+ } else if (matches) {
|
||||||
|
+ /* left-click on left arrow */
|
||||||
|
+ x += inputw;
|
||||||
|
+ w = TEXTW("<");
|
||||||
|
+ if (prev && curr->left) {
|
||||||
|
+ if (ev->x >= x && ev->x <= x + w) {
|
||||||
|
+ sel = curr = prev;
|
||||||
|
+ calcoffsets();
|
||||||
|
+ drawmenu();
|
||||||
|
+ return;
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+ /* horizontal list: (ctrl)left-click on item */
|
||||||
|
+ for (item = curr; item != next; item = item->right) {
|
||||||
|
+ x += w;
|
||||||
|
+ w = MIN(TEXTW(item->text), mw - x - TEXTW(">"));
|
||||||
|
+ if (ev->x >= x && ev->x <= x + w) {
|
||||||
|
+ puts(item->text);
|
||||||
|
+ if (!(ev->state & ControlMask))
|
||||||
|
+ exit(0);
|
||||||
|
+ sel = item;
|
||||||
|
+ if (sel) {
|
||||||
|
+ sel->out = 1;
|
||||||
|
+ drawmenu();
|
||||||
|
+ }
|
||||||
|
+ return;
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+ /* left-click on right arrow */
|
||||||
|
+ w = TEXTW(">");
|
||||||
|
+ x = mw - w;
|
||||||
|
+ if (next && ev->x >= x && ev->x <= x + w) {
|
||||||
|
+ sel = curr = next;
|
||||||
|
+ calcoffsets();
|
||||||
|
+ drawmenu();
|
||||||
|
+ return;
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
static void
|
||||||
|
paste(void)
|
||||||
|
{
|
||||||
|
@@ -582,6 +695,9 @@ run(void)
|
||||||
|
break;
|
||||||
|
cleanup();
|
||||||
|
exit(1);
|
||||||
|
+ case ButtonPress:
|
||||||
|
+ buttonpress(&ev);
|
||||||
|
+ break;
|
||||||
|
case Expose:
|
||||||
|
if (ev.xexpose.count == 0)
|
||||||
|
drw_map(drw, win, 0, 0, mw, mh);
|
||||||
|
@@ -679,7 +795,8 @@ setup(void)
|
||||||
|
/* create menu window */
|
||||||
|
swa.override_redirect = True;
|
||||||
|
swa.background_pixel = scheme[SchemeNorm][ColBg].pixel;
|
||||||
|
- swa.event_mask = ExposureMask | KeyPressMask | VisibilityChangeMask;
|
||||||
|
+ swa.event_mask = ExposureMask | KeyPressMask | VisibilityChangeMask |
|
||||||
|
+ ButtonPressMask;
|
||||||
|
win = XCreateWindow(dpy, parentwin, x, y, mw, mh, 0,
|
||||||
|
CopyFromParent, CopyFromParent, CopyFromParent,
|
||||||
|
CWOverrideRedirect | CWBackPixel | CWEventMask, &swa);
|
53
local/src/dmenu/patches/dmenu-mousesupport-motion-5.2.diff
Normal file
|
@ -0,0 +1,53 @@
|
||||||
|
diff --git a/dmenu.c b/dmenu.c
|
||||||
|
index 48d4980..7677401 100644
|
||||||
|
--- a/dmenu.c
|
||||||
|
+++ b/dmenu.c
|
||||||
|
@@ -641,6 +641,29 @@ buttonpress(XEvent *e)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
+static void
|
||||||
|
+motionevent(XButtonEvent *ev)
|
||||||
|
+{
|
||||||
|
+ struct item *it;
|
||||||
|
+ int xy, ev_xy;
|
||||||
|
+
|
||||||
|
+ if (ev->window != win || matches == 0)
|
||||||
|
+ return;
|
||||||
|
+
|
||||||
|
+ xy = lines > 0 ? bh : inputw + promptw + TEXTW("<");
|
||||||
|
+ ev_xy = lines > 0 ? ev->y : ev->x;
|
||||||
|
+ for (it = curr; it && it != next; it = it->right) {
|
||||||
|
+ int wh = lines > 0 ? bh : textw_clamp(it->text, mw - xy - TEXTW(">"));
|
||||||
|
+ if (ev_xy >= xy && ev_xy < (xy + wh)) {
|
||||||
|
+ sel = it;
|
||||||
|
+ calcoffsets();
|
||||||
|
+ drawmenu();
|
||||||
|
+ break;
|
||||||
|
+ }
|
||||||
|
+ xy += wh;
|
||||||
|
+ }
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
static void
|
||||||
|
paste(void)
|
||||||
|
{
|
||||||
|
@@ -702,6 +725,9 @@ run(void)
|
||||||
|
case ButtonPress:
|
||||||
|
buttonpress(&ev);
|
||||||
|
break;
|
||||||
|
+ case MotionNotify:
|
||||||
|
+ motionevent(&ev.xbutton);
|
||||||
|
+ break;
|
||||||
|
case Expose:
|
||||||
|
if (ev.xexpose.count == 0)
|
||||||
|
drw_map(drw, win, 0, 0, mw, mh);
|
||||||
|
@@ -800,7 +826,7 @@ setup(void)
|
||||||
|
swa.override_redirect = True;
|
||||||
|
swa.background_pixel = scheme[SchemeNorm][ColBg].pixel;
|
||||||
|
swa.event_mask = ExposureMask | KeyPressMask | VisibilityChangeMask |
|
||||||
|
- ButtonPressMask;
|
||||||
|
+ ButtonPressMask | PointerMotionMask;
|
||||||
|
win = XCreateWindow(dpy, parentwin, x, y, mw, mh, 0,
|
||||||
|
CopyFromParent, CopyFromParent, CopyFromParent,
|
||||||
|
CWOverrideRedirect | CWBackPixel | CWEventMask, &swa);
|
103
local/src/dmenu/patches/dmenu-password-5.0.diff
Normal file
|
@ -0,0 +1,103 @@
|
||||||
|
From c4de1032bd4c247bc20b6ab92a10a8d778966679 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Mehrad Mahmoudian <m.mahmoudian@gmail.com>
|
||||||
|
Date: Tue, 4 May 2021 12:05:09 +0300
|
||||||
|
Subject: [PATCH] patched with password patch
|
||||||
|
|
||||||
|
---
|
||||||
|
dmenu.1 | 5 ++++-
|
||||||
|
dmenu.c | 21 +++++++++++++++++----
|
||||||
|
2 files changed, 21 insertions(+), 5 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/dmenu.1 b/dmenu.1
|
||||||
|
index 323f93c..762f707 100644
|
||||||
|
--- a/dmenu.1
|
||||||
|
+++ b/dmenu.1
|
||||||
|
@@ -3,7 +3,7 @@
|
||||||
|
dmenu \- dynamic menu
|
||||||
|
.SH SYNOPSIS
|
||||||
|
.B dmenu
|
||||||
|
-.RB [ \-bfiv ]
|
||||||
|
+.RB [ \-bfivP ]
|
||||||
|
.RB [ \-l
|
||||||
|
.IR lines ]
|
||||||
|
.RB [ \-m
|
||||||
|
@@ -47,6 +47,9 @@ is faster, but will lock up X until stdin reaches end\-of\-file.
|
||||||
|
.B \-i
|
||||||
|
dmenu matches menu items case insensitively.
|
||||||
|
.TP
|
||||||
|
+.B \-P
|
||||||
|
+dmenu will not directly display the keyboard input, but instead replace it with dots. All data from stdin will be ignored.
|
||||||
|
+.TP
|
||||||
|
.BI \-l " lines"
|
||||||
|
dmenu lists items vertically, with the given number of lines.
|
||||||
|
.TP
|
||||||
|
diff --git a/dmenu.c b/dmenu.c
|
||||||
|
index 65f25ce..ad8f63b 100644
|
||||||
|
--- a/dmenu.c
|
||||||
|
+++ b/dmenu.c
|
||||||
|
@@ -37,7 +37,7 @@ struct item {
|
||||||
|
static char text[BUFSIZ] = "";
|
||||||
|
static char *embed;
|
||||||
|
static int bh, mw, mh;
|
||||||
|
-static int inputw = 0, promptw;
|
||||||
|
+static int inputw = 0, promptw, passwd = 0;
|
||||||
|
static int lrpad; /* sum of left and right padding */
|
||||||
|
static size_t cursor;
|
||||||
|
static struct item *items = NULL;
|
||||||
|
@@ -132,6 +132,7 @@ drawmenu(void)
|
||||||
|
unsigned int curpos;
|
||||||
|
struct item *item;
|
||||||
|
int x = 0, y = 0, w;
|
||||||
|
+ char *censort;
|
||||||
|
|
||||||
|
drw_setscheme(drw, scheme[SchemeNorm]);
|
||||||
|
drw_rect(drw, 0, 0, mw, mh, 1, 1);
|
||||||
|
@@ -143,7 +144,12 @@ drawmenu(void)
|
||||||
|
/* draw input field */
|
||||||
|
w = (lines > 0 || !matches) ? mw - x : inputw;
|
||||||
|
drw_setscheme(drw, scheme[SchemeNorm]);
|
||||||
|
- drw_text(drw, x, 0, w, bh, lrpad / 2, text, 0);
|
||||||
|
+ if (passwd) {
|
||||||
|
+ censort = ecalloc(1, sizeof(text));
|
||||||
|
+ memset(censort, '.', strlen(text));
|
||||||
|
+ drw_text(drw, x, 0, w, bh, lrpad / 2, censort, 0);
|
||||||
|
+ free(censort);
|
||||||
|
+ } else drw_text(drw, x, 0, w, bh, lrpad / 2, text, 0);
|
||||||
|
|
||||||
|
curpos = TEXTW(text) - TEXTW(&text[cursor]);
|
||||||
|
if ((curpos += lrpad / 2 - 1) < w) {
|
||||||
|
@@ -524,6 +530,11 @@ readstdin(void)
|
||||||
|
char buf[sizeof text], *p;
|
||||||
|
size_t i, imax = 0, size = 0;
|
||||||
|
unsigned int tmpmax = 0;
|
||||||
|
+ if(passwd){
|
||||||
|
+ inputw = lines = 0;
|
||||||
|
+ return;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
|
||||||
|
/* read each line from stdin and add it to the item list */
|
||||||
|
for (i = 0; fgets(buf, sizeof buf, stdin); i++) {
|
||||||
|
@@ -689,7 +700,7 @@ setup(void)
|
||||||
|
static void
|
||||||
|
usage(void)
|
||||||
|
{
|
||||||
|
- fputs("usage: dmenu [-bfiv] [-l lines] [-p prompt] [-fn font] [-m monitor]\n"
|
||||||
|
+ fputs("usage: dmenu [-bfivP] [-l lines] [-p prompt] [-fn font] [-m monitor]\n"
|
||||||
|
" [-nb color] [-nf color] [-sb color] [-sf color] [-w windowid]\n", stderr);
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
@@ -712,7 +723,9 @@ main(int argc, char *argv[])
|
||||||
|
else if (!strcmp(argv[i], "-i")) { /* case-insensitive item matching */
|
||||||
|
fstrncmp = strncasecmp;
|
||||||
|
fstrstr = cistrstr;
|
||||||
|
- } else if (i + 1 == argc)
|
||||||
|
+ } else if (!strcmp(argv[i], "-P")) /* is the input a password */
|
||||||
|
+ passwd = 1;
|
||||||
|
+ else if (i + 1 == argc)
|
||||||
|
usage();
|
||||||
|
/* these options take one argument */
|
||||||
|
else if (!strcmp(argv[i], "-l")) /* number of lines in vertical list */
|
||||||
|
--
|
||||||
|
2.31.1
|
||||||
|
|
|
@ -1,20 +1,21 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
# __ _ _ _ _ _ _
|
# _ _ _ _ _ _
|
||||||
# _ __ ___ / _(_) | |__ | |_ _ ___| |_ ___ ___ | |_| |__
|
# __| |_ __ ___ ___ _ __ _ _ | |__ | |_ _ ___| |_ ___ ___ | |_ | |__
|
||||||
# | '__/ _ \| |_| |_____| '_ \| | | | |/ _ \ __/ _ \ / _ \| __| '_ \
|
# / _` | '_ ` _ \ / _ \ '_ \| | | |_____| '_ \| | | | |/ _ \ __/ _ \ / _ \| __|| '_ \
|
||||||
# | | | (_) | _| |_____| |_) | | |_| | __/ || (_) | (_) | |_| | | |
|
# | (_| | | | | | | __/ | | | |_| |_____| |_) | | |_| | __/ || (_) | (_) | |_ | | | |
|
||||||
# |_| \___/|_| |_| |_.__/|_|\__,_|\___|\__\___/ \___/ \__|_| |_|
|
# \__,_|_| |_| |_|\___|_| |_|\__,_| |_.__/|_|\__,_|\___|\__\___/ \___/ \__||_| |_|
|
||||||
#
|
#
|
||||||
# Author: Nick Clyde (clydedroid)
|
# Author: Nick Clyde (clydedroid)
|
||||||
|
# dmenu support by: Layerex
|
||||||
#
|
#
|
||||||
# A script that generates a rofi menu that uses bluetoothctl to
|
# A script that generates a dmenu menu that uses bluetoothctl to
|
||||||
# connect to bluetooth devices and display status info.
|
# connect to bluetooth devices and display status info.
|
||||||
#
|
#
|
||||||
# Inspired by networkmanager-dmenu (https://github.com/firecat53/networkmanager-dmenu)
|
# Inspired by networkmanager-dmenu (https://github.com/firecat53/networkmanager-dmenu)
|
||||||
# Thanks to x70b1 (https://github.com/polybar/polybar-scripts/tree/master/polybar-scripts/system-bluetooth-bluetoothctl)
|
# Thanks to x70b1 (https://github.com/polybar/polybar-scripts/tree/master/polybar-scripts/system-bluetooth-bluetoothctl)
|
||||||
#
|
#
|
||||||
# Depends on:
|
# Depends on:
|
||||||
# Arch repositories: rofi, bluez-utils (contains bluetoothctl)
|
# Arch repositories: dmenu, bluez-utils (contains bluetoothctl)
|
||||||
|
|
||||||
# Constants
|
# Constants
|
||||||
divider="---------"
|
divider="---------"
|
||||||
|
@ -22,7 +23,7 @@ goback="Back"
|
||||||
|
|
||||||
# Checks if bluetooth controller is powered on
|
# Checks if bluetooth controller is powered on
|
||||||
power_on() {
|
power_on() {
|
||||||
if bluetoothctl show | grep -q "Powered: yes"; then
|
if bluetoothctl show | grep -F -q "Powered: yes"; then
|
||||||
return 0
|
return 0
|
||||||
else
|
else
|
||||||
return 1
|
return 1
|
||||||
|
@ -35,7 +36,7 @@ toggle_power() {
|
||||||
bluetoothctl power off
|
bluetoothctl power off
|
||||||
show_menu
|
show_menu
|
||||||
else
|
else
|
||||||
if rfkill list bluetooth | grep -q 'blocked: yes'; then
|
if rfkill list bluetooth | grep -F -q 'blocked: yes'; then
|
||||||
rfkill unblock bluetooth && sleep 3
|
rfkill unblock bluetooth && sleep 3
|
||||||
fi
|
fi
|
||||||
bluetoothctl power on
|
bluetoothctl power on
|
||||||
|
@ -45,7 +46,7 @@ toggle_power() {
|
||||||
|
|
||||||
# Checks if controller is scanning for new devices
|
# Checks if controller is scanning for new devices
|
||||||
scan_on() {
|
scan_on() {
|
||||||
if bluetoothctl show | grep -q "Discovering: yes"; then
|
if bluetoothctl show | grep -F -q "Discovering: yes"; then
|
||||||
echo "Scan: on"
|
echo "Scan: on"
|
||||||
return 0
|
return 0
|
||||||
else
|
else
|
||||||
|
@ -57,7 +58,7 @@ scan_on() {
|
||||||
# Toggles scanning state
|
# Toggles scanning state
|
||||||
toggle_scan() {
|
toggle_scan() {
|
||||||
if scan_on; then
|
if scan_on; then
|
||||||
kill $(pgrep -f "bluetoothctl scan on")
|
kill "$(pgrep -F -f "bluetoothctl scan on")"
|
||||||
bluetoothctl scan off
|
bluetoothctl scan off
|
||||||
show_menu
|
show_menu
|
||||||
else
|
else
|
||||||
|
@ -70,7 +71,7 @@ toggle_scan() {
|
||||||
|
|
||||||
# Checks if controller is able to pair to devices
|
# Checks if controller is able to pair to devices
|
||||||
pairable_on() {
|
pairable_on() {
|
||||||
if bluetoothctl show | grep -q "Pairable: yes"; then
|
if bluetoothctl show | grep -F -q "Pairable: yes"; then
|
||||||
echo "Pairable: on"
|
echo "Pairable: on"
|
||||||
return 0
|
return 0
|
||||||
else
|
else
|
||||||
|
@ -92,7 +93,7 @@ toggle_pairable() {
|
||||||
|
|
||||||
# Checks if controller is discoverable by other devices
|
# Checks if controller is discoverable by other devices
|
||||||
discoverable_on() {
|
discoverable_on() {
|
||||||
if bluetoothctl show | grep -q "Discoverable: yes"; then
|
if bluetoothctl show | grep -F -q "Discoverable: yes"; then
|
||||||
echo "Discoverable: on"
|
echo "Discoverable: on"
|
||||||
return 0
|
return 0
|
||||||
else
|
else
|
||||||
|
@ -115,7 +116,7 @@ toggle_discoverable() {
|
||||||
# Checks if a device is connected
|
# Checks if a device is connected
|
||||||
device_connected() {
|
device_connected() {
|
||||||
device_info=$(bluetoothctl info "$1")
|
device_info=$(bluetoothctl info "$1")
|
||||||
if echo "$device_info" | grep -q "Connected: yes"; then
|
if echo "$device_info" | grep -F -q "Connected: yes"; then
|
||||||
return 0
|
return 0
|
||||||
else
|
else
|
||||||
return 1
|
return 1
|
||||||
|
@ -126,17 +127,17 @@ device_connected() {
|
||||||
toggle_connection() {
|
toggle_connection() {
|
||||||
if device_connected "$1"; then
|
if device_connected "$1"; then
|
||||||
bluetoothctl disconnect "$1"
|
bluetoothctl disconnect "$1"
|
||||||
device_menu "$device"
|
# device_menu "$device"
|
||||||
else
|
else
|
||||||
bluetoothctl connect "$1"
|
bluetoothctl connect "$1"
|
||||||
device_menu "$device"
|
# device_menu "$device"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# Checks if a device is paired
|
# Checks if a device is paired
|
||||||
device_paired() {
|
device_paired() {
|
||||||
device_info=$(bluetoothctl info "$1")
|
device_info=$(bluetoothctl info "$1")
|
||||||
if echo "$device_info" | grep -q "Paired: yes"; then
|
if echo "$device_info" | grep -F -q "Paired: yes"; then
|
||||||
echo "Paired: yes"
|
echo "Paired: yes"
|
||||||
return 0
|
return 0
|
||||||
else
|
else
|
||||||
|
@ -159,7 +160,7 @@ toggle_paired() {
|
||||||
# Checks if a device is trusted
|
# Checks if a device is trusted
|
||||||
device_trusted() {
|
device_trusted() {
|
||||||
device_info=$(bluetoothctl info "$1")
|
device_info=$(bluetoothctl info "$1")
|
||||||
if echo "$device_info" | grep -q "Trusted: yes"; then
|
if echo "$device_info" | grep -F -q "Trusted: yes"; then
|
||||||
echo "Trusted: yes"
|
echo "Trusted: yes"
|
||||||
return 0
|
return 0
|
||||||
else
|
else
|
||||||
|
@ -185,18 +186,12 @@ print_status() {
|
||||||
if power_on; then
|
if power_on; then
|
||||||
printf ''
|
printf ''
|
||||||
|
|
||||||
paired_devices_cmd="devices Paired"
|
mapfile -t paired_devices < <(bluetoothctl paired-devices | grep -F Device | cut -d ' ' -f 2)
|
||||||
# Check if an outdated version of bluetoothctl is used to preserve backwards compatibility
|
|
||||||
if (( $(echo "$(bluetoothctl version | cut -d ' ' -f 2) < 5.65" | bc -l) )); then
|
|
||||||
paired_devices_cmd="paired-devices"
|
|
||||||
fi
|
|
||||||
|
|
||||||
mapfile -t paired_devices < <(bluetoothctl "$paired_devices_cmd" | grep Device | cut -d ' ' -f 2)
|
|
||||||
counter=0
|
counter=0
|
||||||
|
|
||||||
for device in "${paired_devices[@]}"; do
|
for device in "${paired_devices[@]}"; do
|
||||||
if device_connected "$device"; then
|
if device_connected "$device"; then
|
||||||
device_alias=$(bluetoothctl info "$device" | grep "Alias" | cut -d ' ' -f 2-)
|
device_alias="$(bluetoothctl info "$device" | grep -F "Alias" | cut -d ' ' -f 2-)"
|
||||||
|
|
||||||
if [ $counter -gt 0 ]; then
|
if [ $counter -gt 0 ]; then
|
||||||
printf ", %s" "$device_alias"
|
printf ", %s" "$device_alias"
|
||||||
|
@ -218,8 +213,8 @@ device_menu() {
|
||||||
device=$1
|
device=$1
|
||||||
|
|
||||||
# Get device name and mac address
|
# Get device name and mac address
|
||||||
device_name=$(echo "$device" | cut -d ' ' -f 3-)
|
device_name="$(echo "$device" | cut -d ' ' -f 3-)"
|
||||||
mac=$(echo "$device" | cut -d ' ' -f 2)
|
mac="$(echo "$device" | cut -d ' ' -f 2)"
|
||||||
|
|
||||||
# Build options
|
# Build options
|
||||||
if device_connected "$mac"; then
|
if device_connected "$mac"; then
|
||||||
|
@ -231,11 +226,11 @@ device_menu() {
|
||||||
trusted=$(device_trusted "$mac")
|
trusted=$(device_trusted "$mac")
|
||||||
options="$connected\n$paired\n$trusted\n$divider\n$goback\nExit"
|
options="$connected\n$paired\n$trusted\n$divider\n$goback\nExit"
|
||||||
|
|
||||||
# Open rofi menu, read chosen option
|
# Open dmenu menu, read chosen option
|
||||||
chosen="$(echo -e "$options" | $RUNNER -i -l 8 -p "[$device_name] ")"
|
chosen="$(echo -e "$options" | run_dmenu "$device_name")"
|
||||||
|
|
||||||
# Match chosen option to command
|
# Match chosen option to command
|
||||||
case "$chosen" in
|
case $chosen in
|
||||||
"" | "$divider")
|
"" | "$divider")
|
||||||
echo "No option chosen."
|
echo "No option chosen."
|
||||||
;;
|
;;
|
||||||
|
@ -254,7 +249,7 @@ device_menu() {
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
# Opens a rofi menu with current bluetooth status and options to connect
|
# Opens a dmenu menu with current bluetooth status and options to connect
|
||||||
show_menu() {
|
show_menu() {
|
||||||
# Get menu options
|
# Get menu options
|
||||||
if power_on; then
|
if power_on; then
|
||||||
|
@ -262,25 +257,25 @@ show_menu() {
|
||||||
|
|
||||||
# Human-readable names of devices, one per line
|
# Human-readable names of devices, one per line
|
||||||
# If scan is off, will only list paired devices
|
# If scan is off, will only list paired devices
|
||||||
devices=$(bluetoothctl devices | grep Device | cut -d ' ' -f 3-)
|
devices=$(bluetoothctl devices | grep -F Device | cut -d ' ' -f 3-)
|
||||||
|
|
||||||
# Get controller flags
|
# Get controller flags
|
||||||
scan=$(scan_on)
|
scan=$(scan_on)
|
||||||
pairable=$(pairable_on)
|
pairable=$(pairable_on)
|
||||||
discoverable=$(discoverable_on)
|
discoverable=$(discoverable_on)
|
||||||
|
|
||||||
# Options passed to rofi
|
# Options passed to dmenu
|
||||||
options="$devices\n$divider\n$power\n$scan\n$pairable\n$discoverable\nExit"
|
options="$devices\n$divider\n$power\n$scan\n$pairable\n$discoverable\nExit"
|
||||||
else
|
else
|
||||||
power="Power: off"
|
power="Power: off"
|
||||||
options="$power\nExit"
|
options="$power\nExit"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Open rofi menu, read chosen option
|
# Open dmenu menu, read chosen option
|
||||||
chosen="$(echo -e "$options" | $RUNNER -i -l 7 -p "[ Bluetooth] ")"
|
chosen="$(echo -e "$options" | run_dmenu "Bluetooth")"
|
||||||
|
|
||||||
# Match chosen option to command
|
# Match chosen option to command
|
||||||
case "$chosen" in
|
case $chosen in
|
||||||
"" | "$divider")
|
"" | "$divider")
|
||||||
echo "No option chosen."
|
echo "No option chosen."
|
||||||
;;
|
;;
|
||||||
|
@ -297,13 +292,21 @@ show_menu() {
|
||||||
toggle_pairable
|
toggle_pairable
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
device=$(bluetoothctl devices | grep "$chosen")
|
device=$(bluetoothctl devices | grep -F "$chosen")
|
||||||
# Open a submenu if a device is selected
|
# Open a submenu if a device is selected
|
||||||
if [[ $device ]]; then device_menu "$device"; fi
|
if [[ $device ]]; then device_menu "$device"; fi
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
|
original_args=("$@")
|
||||||
|
|
||||||
|
# dmenu command to pipe into. Extra arguments to dmenu-bluetooth are passed through to dmenu. This
|
||||||
|
# allows the user to set fonts, sizes, colours, etc.
|
||||||
|
run_dmenu() {
|
||||||
|
dmenu "${original_args[@]}" -l 5 -i -p "$1"
|
||||||
|
}
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
--status)
|
--status)
|
||||||
print_status
|
print_status
|
8
local/src/dmenu/scripts/dmenu_drun
Executable file
|
@ -0,0 +1,8 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# ***This script was made by Clay Gomera (Drake)***
|
||||||
|
# - Description: A simple desktop dmenu script
|
||||||
|
# - Dependencies: dmenu, j4-dmenu-desktop
|
||||||
|
|
||||||
|
# uses j4-dmenu-desktop to launch programs by it's desktop entry
|
||||||
|
j4-dmenu-desktop --dmenu "dmenu -i -l 10 -p ' Launch:'" --no-generic
|