initial commit

This commit is contained in:
Luis 2024-01-17 05:31:35 +01:00
parent 216206ffdd
commit 58d079944f
496 changed files with 120459 additions and 1 deletions

354
LICENSE Normal file
View File

@ -0,0 +1,354 @@
Creative Commons Attribution-NonCommercial 4.0 International Creative Commons
Corporation ("Creative Commons") is not a law firm and does not provide legal
services or legal advice. Distribution of Creative Commons public licenses
does not create a lawyer-client or other relationship. Creative Commons makes
its licenses and related information available on an "as-is" basis. Creative
Commons gives no warranties regarding its licenses, any material licensed
under their terms and conditions, or any related information. Creative Commons
disclaims all liability for damages resulting from their use to the fullest
extent possible.
Using Creative Commons Public Licenses
Creative Commons public licenses provide a standard set of terms and conditions
that creators and other rights holders may use to share original works of
authorship and other material subject to copyright and certain other rights
specified in the public license below. The following considerations are for
informational purposes only, are not exhaustive, and do not form part of our
licenses.
Considerations for licensors: Our public licenses are intended for use by
those authorized to give the public permission to use material in ways otherwise
restricted by copyright and certain other rights. Our licenses are irrevocable.
Licensors should read and understand the terms and conditions of the license
they choose before applying it. Licensors should also secure all rights necessary
before applying our licenses so that the public can reuse the material as
expected. Licensors should clearly mark any material not subject to the license.
This includes other CC-licensed material, or material used under an exception
or limitation to copyright. More considerations for licensors : wiki.creativecommons.org/Considerations_for_licensors
Considerations for the public: By using one of our public licenses, a licensor
grants the public permission to use the licensed material under specified
terms and conditions. If the licensor's permission is not necessary for any
reasonfor example, because of any applicable exception or limitation to copyrightthen
that use is not regulated by the license. Our licenses grant only permissions
under copyright and certain other rights that a licensor has authority to
grant. Use of the licensed material may still be restricted for other reasons,
including because others have copyright or other rights in the material. A
licensor may make special requests, such as asking that all changes be marked
or described. Although not required by our licenses, you are encouraged to
respect those requests where reasonable. More considerations for the public
: wiki.creativecommons.org/Considerations_for_licensees Creative Commons Attribution-NonCommercial
4.0 International Public License
By exercising the Licensed Rights (defined below), You accept and agree to
be bound by the terms and conditions of this Creative Commons Attribution-NonCommercial
4.0 International Public License ("Public License"). To the extent this Public
License may be interpreted as a contract, You are granted the Licensed Rights
in consideration of Your acceptance of these terms and conditions, and the
Licensor grants You such rights in consideration of benefits the Licensor
receives from making the Licensed Material available under these terms and
conditions.
Section 1 Definitions.
a. Adapted Material means material subject to Copyright and Similar Rights
that is derived from or based upon the Licensed Material and in which the
Licensed Material is translated, altered, arranged, transformed, or otherwise
modified in a manner requiring permission under the Copyright and Similar
Rights held by the Licensor. For purposes of this Public License, where the
Licensed Material is a musical work, performance, or sound recording, Adapted
Material is always produced where the Licensed Material is synched in timed
relation with a moving image.
b. Adapter's License means the license You apply to Your Copyright and Similar
Rights in Your contributions to Adapted Material in accordance with the terms
and conditions of this Public License.
c. Copyright and Similar Rights means copyright and/or similar rights closely
related to copyright including, without limitation, performance, broadcast,
sound recording, and Sui Generis Database Rights, without regard to how the
rights are labeled or categorized. For purposes of this Public License, the
rights specified in Section 2(b)(1)-(2) are not Copyright and Similar Rights.
d. Effective Technological Measures means those measures that, in the absence
of proper authority, may not be circumvented under laws fulfilling obligations
under Article 11 of the WIPO Copyright Treaty adopted on December 20, 1996,
and/or similar international agreements.
e. Exceptions and Limitations means fair use, fair dealing, and/or any other
exception or limitation to Copyright and Similar Rights that applies to Your
use of the Licensed Material.
f. Licensed Material means the artistic or literary work, database, or other
material to which the Licensor applied this Public License.
g. Licensed Rights means the rights granted to You subject to the terms and
conditions of this Public License, which are limited to all Copyright and
Similar Rights that apply to Your use of the Licensed Material and that the
Licensor has authority to license.
h. Licensor means the individual(s) or entity(ies) granting rights under this
Public License.
i. NonCommercial means not primarily intended for or directed towards commercial
advantage or monetary compensation. For purposes of this Public License, the
exchange of the Licensed Material for other material subject to Copyright
and Similar Rights by digital file-sharing or similar means is NonCommercial
provided there is no payment of monetary compensation in connection with the
exchange.
j. Share means to provide material to the public by any means or process that
requires permission under the Licensed Rights, such as reproduction, public
display, public performance, distribution, dissemination, communication, or
importation, and to make material available to the public including in ways
that members of the public may access the material from a place and at a time
individually chosen by them.
k. Sui Generis Database Rights means rights other than copyright resulting
from Directive 96/9/EC of the European Parliament and of the Council of 11
March 1996 on the legal protection of databases, as amended and/or succeeded,
as well as other essentially equivalent rights anywhere in the world.
l. You means the individual or entity exercising the Licensed Rights under
this Public License. Your has a corresponding meaning.
Section 2 Scope.
a. License grant.
1. Subject to the terms and conditions of this Public License, the Licensor
hereby grants You a worldwide, royalty-free, non-sublicensable, non-exclusive,
irrevocable license to exercise the Licensed Rights in the Licensed Material
to:
A. reproduce and Share the Licensed Material, in whole or in part, for NonCommercial
purposes only; and
B. produce, reproduce, and Share Adapted Material for NonCommercial purposes
only.
2. Exceptions and Limitations. For the avoidance of doubt, where Exceptions
and Limitations apply to Your use, this Public License does not apply, and
You do not need to comply with its terms and conditions.
3. Term. The term of this Public License is specified in Section 6(a).
4. Media and formats; technical modifications allowed. The Licensor authorizes
You to exercise the Licensed Rights in all media and formats whether now known
or hereafter created, and to make technical modifications necessary to do
so. The Licensor waives and/or agrees not to assert any right or authority
to forbid You from making technical modifications necessary to exercise the
Licensed Rights, including technical modifications necessary to circumvent
Effective Technological Measures. For purposes of this Public License, simply
making modifications authorized by this Section 2(a)(4) never produces Adapted
Material.
5. Downstream recipients.
A. Offer from the Licensor Licensed Material. Every recipient of the Licensed
Material automatically receives an offer from the Licensor to exercise the
Licensed Rights under the terms and conditions of this Public License.
B. No downstream restrictions. You may not offer or impose any additional
or different terms or conditions on, or apply any Effective Technological
Measures to, the Licensed Material if doing so restricts exercise of the Licensed
Rights by any recipient of the Licensed Material.
6. No endorsement. Nothing in this Public License constitutes or may be construed
as permission to assert or imply that You are, or that Your use of the Licensed
Material is, connected with, or sponsored, endorsed, or granted official status
by, the Licensor or others designated to receive attribution as provided in
Section 3(a)(1)(A)(i).
b. Other rights.
1. Moral rights, such as the right of integrity, are not licensed under this
Public License, nor are publicity, privacy, and/or other similar personality
rights; however, to the extent possible, the Licensor waives and/or agrees
not to assert any such rights held by the Licensor to the limited extent necessary
to allow You to exercise the Licensed Rights, but not otherwise.
2. Patent and trademark rights are not licensed under this Public License.
3. To the extent possible, the Licensor waives any right to collect royalties
from You for the exercise of the Licensed Rights, whether directly or through
a collecting society under any voluntary or waivable statutory or compulsory
licensing scheme. In all other cases the Licensor expressly reserves any right
to collect such royalties, including when the Licensed Material is used other
than for NonCommercial purposes.
Section 3 License Conditions.
Your exercise of the Licensed Rights is expressly made subject to the following
conditions.
a. Attribution.
1. If You Share the Licensed Material (including in modified form), You must:
A. retain the following if it is supplied by the Licensor with the Licensed
Material:
i. identification of the creator(s) of the Licensed Material and any others
designated to receive attribution, in any reasonable manner requested by the
Licensor (including by pseudonym if designated);
ii. a copyright notice;
iii. a notice that refers to this Public License;
iv. a notice that refers to the disclaimer of warranties;
v. a URI or hyperlink to the Licensed Material to the extent reasonably practicable;
B. indicate if You modified the Licensed Material and retain an indication
of any previous modifications; and
C. indicate the Licensed Material is licensed under this Public License, and
include the text of, or the URI or hyperlink to, this Public License.
2. You may satisfy the conditions in Section 3(a)(1) in any reasonable manner
based on the medium, means, and context in which You Share the Licensed Material.
For example, it may be reasonable to satisfy the conditions by providing a
URI or hyperlink to a resource that includes the required information.
3. If requested by the Licensor, You must remove any of the information required
by Section 3(a)(1)(A) to the extent reasonably practicable.
4. If You Share Adapted Material You produce, the Adapter's License You apply
must not prevent recipients of the Adapted Material from complying with this
Public License.
Section 4 Sui Generis Database Rights.
Where the Licensed Rights include Sui Generis Database Rights that apply to
Your use of the Licensed Material:
a. for the avoidance of doubt, Section 2(a)(1) grants You the right to extract,
reuse, reproduce, and Share all or a substantial portion of the contents of
the database for NonCommercial purposes only;
b. if You include all or a substantial portion of the database contents in
a database in which You have Sui Generis Database Rights, then the database
in which You have Sui Generis Database Rights (but not its individual contents)
is Adapted Material; and
c. You must comply with the conditions in Section 3(a) if You Share all or
a substantial portion of the contents of the database.
For the avoidance of doubt, this Section 4 supplements and does not replace
Your obligations under this Public License where the Licensed Rights include
other Copyright and Similar Rights.
Section 5 Disclaimer of Warranties and Limitation of Liability.
a. Unless otherwise separately undertaken by the Licensor, to the extent possible,
the Licensor offers the Licensed Material as-is and as-available, and makes
no representations or warranties of any kind concerning the Licensed Material,
whether express, implied, statutory, or other. This includes, without limitation,
warranties of title, merchantability, fitness for a particular purpose, non-infringement,
absence of latent or other defects, accuracy, or the presence or absence of
errors, whether or not known or discoverable. Where disclaimers of warranties
are not allowed in full or in part, this disclaimer may not apply to You.
b. To the extent possible, in no event will the Licensor be liable to You
on any legal theory (including, without limitation, negligence) or otherwise
for any direct, special, indirect, incidental, consequential, punitive, exemplary,
or other losses, costs, expenses, or damages arising out of this Public License
or use of the Licensed Material, even if the Licensor has been advised of
the possibility of such losses, costs, expenses, or damages. Where a limitation
of liability is not allowed in full or in part, this limitation may not apply
to You.
c. The disclaimer of warranties and limitation of liability provided above
shall be interpreted in a manner that, to the extent possible, most closely
approximates an absolute disclaimer and waiver of all liability.
Section 6 Term and Termination.
a. This Public License applies for the term of the Copyright and Similar Rights
licensed here. However, if You fail to comply with this Public License, then
Your rights under this Public License terminate automatically.
b. Where Your right to use the Licensed Material has terminated under Section
6(a), it reinstates:
1. automatically as of the date the violation is cured, provided it is cured
within 30 days of Your discovery of the violation; or
2. upon express reinstatement by the Licensor.
For the avoidance of doubt, this Section 6(b) does not affect any right the
Licensor may have to seek remedies for Your violations of this Public License.
c. For the avoidance of doubt, the Licensor may also offer the Licensed Material
under separate terms or conditions or stop distributing the Licensed Material
at any time; however, doing so will not terminate this Public License.
d. Sections 1, 5, 6, 7, and 8 survive termination of this Public License.
Section 7 Other Terms and Conditions.
a. The Licensor shall not be bound by any additional or different terms or
conditions communicated by You unless expressly agreed.
b. Any arrangements, understandings, or agreements regarding the Licensed
Material not stated herein are separate from and independent of the terms
and conditions of this Public License.
Section 8 Interpretation.
a. For the avoidance of doubt, this Public License does not, and shall not
be interpreted to, reduce, limit, restrict, or impose conditions on any use
of the Licensed Material that could lawfully be made without permission under
this Public License.
b. To the extent possible, if any provision of this Public License is deemed
unenforceable, it shall be automatically reformed to the minimum extent necessary
to make it enforceable. If the provision cannot be reformed, it shall be severed
from this Public License without affecting the enforceability of the remaining
terms and conditions.
c. No term or condition of this Public License will be waived and no failure
to comply consented to unless expressly agreed to by the Licensor.
d. Nothing in this Public License constitutes or may be interpreted as a limitation
upon, or waiver of, any privileges and immunities that apply to the Licensor
or You, including from the legal processes of any jurisdiction or authority.
Creative Commons is not a party to its public licenses. Notwithstanding, Creative
Commons may elect to apply one of its public licenses to material it publishes
and in those instances will be considered the "Licensor." The text of the
Creative Commons public licenses is dedicated to the public domain under the
CC0 Public Domain Dedication. Except for the limited purpose of indicating
that material is shared under a Creative Commons public license or as otherwise
permitted by the Creative Commons policies published at creativecommons.org/policies,
Creative Commons does not authorize the use of the trademark "Creative Commons"
or any other trademark or logo of Creative Commons without its prior written
consent including, without limitation, in connection with any unauthorized
modifications to any of its public licenses or any other arrangements, understandings,
or agreements concerning use of licensed material. For the avoidance of doubt,
this paragraph does not form part of the public licenses.
Creative Commons may be contacted at creativecommons.org.

View File

@ -1,2 +1,2 @@
# dotfiles
Config files

View File

@ -0,0 +1,8 @@
Section "OutputClass"
Identifier "AMDgpu"
MatchDriver "amdgpu"
Driver "amdgpu"
Option "Tear Free" "true"
Option "VariableRefresh" "true"
Option "DRI" "3"
EndSection

View File

@ -0,0 +1,6 @@
Section "InputClass"
Identifier "system-keyboard"
MatchDriver "libinput"
MatchIsKeyboard "on"
Option "XkbLayout" "es"
EndSection

View File

@ -0,0 +1,9 @@
Section "InputClass"
Identifier "touchpad"
Driver "libinput"
MatchIsTouchpad "on"
Option "Tapping" "on" # activate behaviors on click
Option "NaturalScrolling" "false" # natural displacement
Option "ScrollMethod" "twofinger" # method used for scrolling
Option "DisableWhileTyping" "true" # disable touchpad while typing
EndSection

1
etc/doas.conf Normal file
View File

@ -0,0 +1 @@
permit nopass keepenv :wheel

6
etc/fstab Normal file
View File

@ -0,0 +1,6 @@
# <fs> <mountpoint> <type> <opts> <dump/pass>
PARTUUID=1bd21d8e-6c2e-2148-8a88-4fac33e93d73 /boot vfat defaults,noatime 0 2
PARTUUID=956631a7-21c7-2646-aceb-80b65206fddf / xfs defaults,noatime 0 0
PARTUUID=f1e8ba79-a410-fd44-83ed-8791a275d9d1 none swap defaults 0 0
tmpfs /tmp tmpfs nosuid,noatime,nodev,size=3G 0 0
tmpfs /var/cache/scratchpkg/work tmpfs nosuid,noatime,nodev,size=16G 0 0

31
etc/inittab Normal file
View File

@ -0,0 +1,31 @@
#
# /etc/inittab: system runlevel description
#
# Runlevels:
# 0 Halt
# 1(S) Single-user
# 2 Multi-user
# 3-5 Not used
# 6 Reboot
id:2:initdefault:
rc::sysinit:/etc/rc
rs:S1:wait:/etc/rc.single
rm:2:wait:/etc/rc.multi
rh:06:wait:/etc/rc.shutdown
ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -r now
su:S:once:/sbin/sulogin
ng:2:respawn:/sbin/ngetty 1 2 3 4 5 6
#1:2:respawn:/sbin/agetty --noclear tty1 9600
#2:2:respawn:/sbin/agetty tty2 9600
#3:2:respawn:/sbin/agetty tty3 9600
#4:2:respawn:/sbin/agetty tty4 9600
#5:2:respawn:/sbin/agetty tty5 9600
#6:2:respawn:/sbin/agetty tty6 9600
# End /etc/inittab

2
etc/modprobe.d/i915.conf Normal file
View File

@ -0,0 +1,2 @@
options i915 mitigations=off
options i915 fastboot=1

View File

@ -0,0 +1,2 @@
# Switch audio output from HDMI to PCH and Enable sound chipset powersaving
options snd-hda-intel index=1,0 power_save=1

7
etc/rc.local Normal file
View File

@ -0,0 +1,7 @@
#!/bin/sh
# Wifi para wlp8s0
ip link set wlp8s0 up
ip a add 192.168.1.3/24 dev wlp8s0
ip route add default via 192.168.1.1 dev wlp8s0
wpa_supplicant -B -D nl80211 -i wlp8s0 -c /etc/wpa_supplicant.conf
# End of file

23
etc/resolv.conf Normal file
View File

@ -0,0 +1,23 @@
# DNS Europeo
#nameserver 193.110.81.0
#nameserver 185.253.5.0
# Cloudfare
nameserver 1.1.1.1
nameserver 1.0.0.1
# CyberGhost
#nameserver 38.132.106.139
#nameserver 194.187.251.67
# Control D
#nameserver 76.76.2.0
#nameserver 76.76.10.0
# Quad 9
#nameserver 9.9.9.9
#nameserver 149.112.112.112
# OpenDns
#nameserver 208.67.222.222
#nameserver 208.67.220.220

10
etc/scratchpkg.alias Normal file
View File

@ -0,0 +1,10 @@
#
# /etc/scratchpkg.alias : scratchpkg alias file
#
# format:
# <real package> <aliased package>
#
# example:
# openssl libressl
rust rust-bin
ninja samurai

22
etc/scratchpkg.conf Normal file
View File

@ -0,0 +1,22 @@
#
# Configuration file for scratchpkg
#
#export CFLAGS="-O2 -march=native -pipe -fuse-ld=mold"
export CFLAGS="-O2 -march=native -pipe"
export CXXFLAGS="${CFLAGS}"
export FCFLAGS="${CFLAGS}"
export FFLAGS="${CFLAGS}"
export RUSTFLAGS="-C target-cpu=native"
export MAKEFLAGS="-j$(nproc)"
SOURCE_DIR="/mnt/venom/var/cache/scratchpkg/sources"
# PACKAGE_DIR="/var/cache/scratchpkg/packages"
# WORK_DIR="/var/cache/scratchpkg/work"
# CURL_OPTS=""
# COMPRESSION_MODE="xz"
# NO_STRIP="no"
# IGNORE_MDSUM="no"
# KEEP_LIBTOOL="no"
KEEP_LOCALE="yes"
# KEEP_DOC="no"

3
etc/scratchpkg.mask Normal file
View File

@ -0,0 +1,3 @@
#
# /etc/scratchpkg.mask : exclude packages from sysup
#

12
etc/scratchpkg.repo Normal file
View File

@ -0,0 +1,12 @@
#
# /etc/scratchpkg.repo : scratchpkg repo file
#
# format:
# <repo directory> <repo url for sync>
#
/usr/ports/local https://github.com/lumarogit/local/tree/main
/usr/ports/core https://github.com/venomlinux/ports/tree/repos/core
/usr/ports/main https://github.com/venomlinux/ports/tree/repos/main
#/usr/ports/multilib https://github.com/venomlinux/ports/tree/repos/multilib
#/usr/ports/nonfree https://github.com/venomlinux/ports/tree/repos/nonfree
#/usr/ports/testing https://github.com/venomlinux/ports/tree/repos/testing

5
etc/shells Normal file
View File

@ -0,0 +1,5 @@
# /etc/shells
/bin/sh
/bin/dash
/bin/bash
/bin/mksh

1
gentoo/etc/doas.conf Normal file
View File

@ -0,0 +1 @@
permit nopass keepenv :wheel

5
gentoo/etc/fstab Normal file
View File

@ -0,0 +1,5 @@
# <fs> <mountpoint> <type> <opts> <dump/pass>
PARTUUID=1bd21d8e-6c2e-2148-8a88-4fac33e93d73 /boot vfat defaults,noatime 0 2
PARTUUID=956631a7-21c7-2646-aceb-80b65206fddf / xfs defaults,noatime 0 0
tmpfs /tmp tmpfs size=1G,nosuid,noatime,nodev 0 0
tmpfs /var/tmp/portage tmpfs size=16G,uid=portage,gid=portage,mode=775,nosuid,noatime,nodev 0 0

4
gentoo/etc/local.d/red.start Executable file
View File

@ -0,0 +1,4 @@
#!/bin/sh
ip link set wlp2s0 up
ip a add 192.168.1.133/24 dev wlp2s0
ip route add default via 192.168.1.1 dev wlp2s0

View File

@ -0,0 +1,2 @@
# Switch audio output from HDMI to PCH and Enable sound chipset powersaving
options snd-hda-intel index=1,0 power_save=1

View File

@ -0,0 +1,34 @@
# Portage
ACCEPT_LICENSE="*"
ACCEPT_KEYWORDS="~amd64"
COMMON_FLAGS="-march=native -O2 -pipe"
CFLAGS="${COMMON_FLAGS}"
CXXFLAGS="${COMMON_FLAGS}"
FCFLAGS="${COMMON_FLAGS}"
FFLAGS="${COMMON_FLAGS}"
RUSTFLAGS="-C target-cpu=native"
CPU_FLAGS_X86="aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt rdrand sse sse2 sse3 sse4_1 sse4_2 ssse3"
EMERGE_DEFAULT_OPTS="--complete-graph=y --keep-going --quiet-build --with-bdeps=y"
USE="alsa -elogind -gnome -gnome-keyring -gold -kde -networkmanager -policykit -pulseaudio savedconfig -systemd vaapi -wayland X"
LLVM_TARGETS="X86"
CMAKE_MAKEFILE_GENERATOR="ninja"
NINJAOPTS="-j8"
MAKEOPTS="-j8"
PORTDIR="/var/db/repos/gentoo"
DISTDIR="/var/cache/distfiles"
PKGDIR="/var/cache/binpkgs"
GENTOO_MIRRORS="https://mirrors.soeasyto.com/distfiles.gentoo.org/ https://mirror.eu.oneandone.net/linux/distributions/gentoo/gentoo/ https://ftp.rnl.tecnico.ulisboa.pt/pub/gentoo/gentoo-distfiles/"
# Idioma
LC_MESSAGES=C
L10N="es es-ES"
# Hardware
#VIDEO_CARDS="intel i965 amdgpu radeonsi"
VIDEO_CARDS="intel i965"
INPUT_DEVICES="libinput"
MICROCODE_SIGNATURES="-S"
GRUB_PLATFORMS="efi-64"

View File

@ -0,0 +1 @@
../../var/db/repos/gentoo/profiles/default/linux/amd64/17.1/no-multilib

View File

@ -0,0 +1 @@
<media-gfx/gimp-9999 **

View File

@ -0,0 +1 @@
media-libs/alsa-lib alisp thread-safety

View File

@ -0,0 +1 @@
media-plugins/alsa-plugins ffmpeg libsamplerate

View File

@ -0,0 +1 @@
media-sound/audacity ffmpeg

View File

@ -0,0 +1 @@
media-video/avidemux qt5

View File

@ -0,0 +1 @@
media-libs/avidemux-plugins qt5 lame libsamplerate vorbis x264

View File

@ -0,0 +1 @@
media-libs/babl introspection lcms

View File

@ -0,0 +1 @@
app-text/djvu jpeg tiff xml

View File

@ -0,0 +1 @@
media-video/ffmpeg opus v4l vorbis x264

View File

@ -0,0 +1 @@
media-libs/freetype harfbuzz png

View File

@ -0,0 +1 @@
x11-libs/gdk-pixbuf jpeg

View File

@ -0,0 +1 @@
media-libs/gegl cairo ffmpeg introspection lcms pdf svg tiff webp

View File

@ -0,0 +1 @@
sys-kernel/gentoo-sources experimental symlink

View File

@ -0,0 +1 @@
media-libs/gexiv2 python

View File

@ -0,0 +1 @@
app-text/ghostscript-gpl cups

View File

@ -0,0 +1 @@
sys-boot/grub mount

View File

@ -0,0 +1 @@
media-libs/harfbuzz icu

View File

@ -0,0 +1 @@
sys-libs/ldb python

View File

@ -0,0 +1 @@
x11-libs/libdrm video_cards_radeon

View File

@ -0,0 +1 @@
dev-libs/libpcre2 pcre16

View File

@ -0,0 +1 @@
media-libs/libpng apng

View File

@ -0,0 +1 @@
app-office/libreoffice clang

View File

@ -0,0 +1 @@
media-libs/libv4l jpeg

View File

@ -0,0 +1 @@
media-libs/libvpx postproc

View File

@ -0,0 +1 @@
dev-libs/libxml2 icu

View File

@ -0,0 +1 @@
sys-devel/llvm -binutils-plugin

View File

@ -0,0 +1 @@
x11-themes/gtk-engines-murrine -themes

View File

@ -0,0 +1 @@
net-libs/nodejs inspector

View File

@ -0,0 +1 @@
sys-apps/openrc -netifrc

View File

@ -0,0 +1 @@
app-text/poppler cairo

View File

@ -0,0 +1 @@
dev-lang/python:3.9 sqlite

View File

@ -0,0 +1 @@
dev-qt/qtgui dbus jpeg

View File

@ -0,0 +1 @@
x11-terms/rxvt-unicode 256-color xft

View File

@ -0,0 +1 @@
net-fs/samba cups

View File

@ -0,0 +1 @@
#sys-apps/systemd-utils -boot -sysusers -udev

View File

@ -0,0 +1 @@
sys-libs/tdb python

View File

@ -0,0 +1 @@
sys-libs/tevent python

View File

@ -0,0 +1 @@
media-libs/tiff jpeg lzma webp

View File

@ -0,0 +1 @@
www-client/w3m imlib

View File

@ -0,0 +1 @@
dev-libs/xmlsec nss

View File

@ -0,0 +1 @@
app-text/xmlto text

View File

@ -0,0 +1 @@
x11-base/xorg-server suid

View File

@ -0,0 +1 @@
sys-libs/zlib minizip

View File

@ -0,0 +1,13 @@
--- a/src/main.C
+++ b/src/main.C
@@ -874,9 +874,8 @@
#endif
}
- if (parent)
{
- resize_all_windows (0, 0, 0);
+ resize_all_windows (szHint.width, szHint.height, 1);
scr_remap_chars ();
scr_touch (true);
}

View File

@ -0,0 +1,351 @@
diff --git a/config.def.h b/config.def.h
index 6f05dce..93cbcc0 100644
--- a/config.def.h
+++ b/config.def.h
@@ -199,6 +199,8 @@ static Shortcut shortcuts[] = {
{ TERMMOD, XK_Y, selpaste, {.i = 0} },
{ ShiftMask, XK_Insert, selpaste, {.i = 0} },
{ TERMMOD, XK_Num_Lock, numlock, {.i = 0} },
+ { ShiftMask, XK_Page_Up, kscrollup, {.i = -1} },
+ { ShiftMask, XK_Page_Down, kscrolldown, {.i = -1} },
};
/*
diff --git a/st.c b/st.c
index ebdf360..817cc47 100644
--- a/st.c
+++ b/st.c
@@ -35,6 +35,7 @@
#define ESC_ARG_SIZ 16
#define STR_BUF_SIZ ESC_BUF_SIZ
#define STR_ARG_SIZ ESC_ARG_SIZ
+#define HISTSIZE 2000
/* macros */
#define IS_SET(flag) ((term.mode & (flag)) != 0)
@@ -42,6 +43,9 @@
#define ISCONTROLC1(c) (BETWEEN(c, 0x80, 0x9f))
#define ISCONTROL(c) (ISCONTROLC0(c) || ISCONTROLC1(c))
#define ISDELIM(u) (u && wcschr(worddelimiters, u))
+#define TLINE(y) ((y) < term.scr ? term.hist[((y) + term.histi - \
+ term.scr + HISTSIZE + 1) % HISTSIZE] : \
+ term.line[(y) - term.scr])
enum term_mode {
MODE_WRAP = 1 << 0,
@@ -115,6 +119,9 @@ typedef struct {
int col; /* nb col */
Line *line; /* screen */
Line *alt; /* alternate screen */
+ Line hist[HISTSIZE]; /* history buffer */
+ int histi; /* history index */
+ int scr; /* scroll back */
int *dirty; /* dirtyness of lines */
TCursor c; /* cursor */
int ocx; /* old cursor col */
@@ -184,8 +191,8 @@ static void tnewline(int);
static void tputtab(int);
static void tputc(Rune);
static void treset(void);
-static void tscrollup(int, int);
-static void tscrolldown(int, int);
+static void tscrollup(int, int, int);
+static void tscrolldown(int, int, int);
static void tsetattr(const int *, int);
static void tsetchar(Rune, const Glyph *, int, int);
static void tsetdirt(int, int);
@@ -416,10 +423,10 @@ tlinelen(int y)
{
int i = term.col;
- if (term.line[y][i - 1].mode & ATTR_WRAP)
+ if (TLINE(y)[i - 1].mode & ATTR_WRAP)
return i;
- while (i > 0 && term.line[y][i - 1].u == ' ')
+ while (i > 0 && TLINE(y)[i - 1].u == ' ')
--i;
return i;
@@ -528,7 +535,7 @@ selsnap(int *x, int *y, int direction)
* Snap around if the word wraps around at the end or
* beginning of a line.
*/
- prevgp = &term.line[*y][*x];
+ prevgp = &TLINE(*y)[*x];
prevdelim = ISDELIM(prevgp->u);
for (;;) {
newx = *x + direction;
@@ -543,14 +550,14 @@ selsnap(int *x, int *y, int direction)
yt = *y, xt = *x;
else
yt = newy, xt = newx;
- if (!(term.line[yt][xt].mode & ATTR_WRAP))
+ if (!(TLINE(yt)[xt].mode & ATTR_WRAP))
break;
}
if (newx >= tlinelen(newy))
break;
- gp = &term.line[newy][newx];
+ gp = &TLINE(newy)[newx];
delim = ISDELIM(gp->u);
if (!(gp->mode & ATTR_WDUMMY) && (delim != prevdelim
|| (delim && gp->u != prevgp->u)))
@@ -571,14 +578,14 @@ selsnap(int *x, int *y, int direction)
*x = (direction < 0) ? 0 : term.col - 1;
if (direction < 0) {
for (; *y > 0; *y += direction) {
- if (!(term.line[*y-1][term.col-1].mode
+ if (!(TLINE(*y-1)[term.col-1].mode
& ATTR_WRAP)) {
break;
}
}
} else if (direction > 0) {
for (; *y < term.row-1; *y += direction) {
- if (!(term.line[*y][term.col-1].mode
+ if (!(TLINE(*y)[term.col-1].mode
& ATTR_WRAP)) {
break;
}
@@ -609,13 +616,13 @@ getsel(void)
}
if (sel.type == SEL_RECTANGULAR) {
- gp = &term.line[y][sel.nb.x];
+ gp = &TLINE(y)[sel.nb.x];
lastx = sel.ne.x;
} else {
- gp = &term.line[y][sel.nb.y == y ? sel.nb.x : 0];
+ gp = &TLINE(y)[sel.nb.y == y ? sel.nb.x : 0];
lastx = (sel.ne.y == y) ? sel.ne.x : term.col-1;
}
- last = &term.line[y][MIN(lastx, linelen-1)];
+ last = &TLINE(y)[MIN(lastx, linelen-1)];
while (last >= gp && last->u == ' ')
--last;
@@ -850,6 +857,9 @@ void
ttywrite(const char *s, size_t n, int may_echo)
{
const char *next;
+ Arg arg = (Arg) { .i = term.scr };
+
+ kscrolldown(&arg);
if (may_echo && IS_SET(MODE_ECHO))
twrite(s, n, 1);
@@ -1061,13 +1071,53 @@ tswapscreen(void)
}
void
-tscrolldown(int orig, int n)
+kscrolldown(const Arg* a)
+{
+ int n = a->i;
+
+ if (n < 0)
+ n = term.row + n;
+
+ if (n > term.scr)
+ n = term.scr;
+
+ if (term.scr > 0) {
+ term.scr -= n;
+ selscroll(0, -n);
+ tfulldirt();
+ }
+}
+
+void
+kscrollup(const Arg* a)
+{
+ int n = a->i;
+
+ if (n < 0)
+ n = term.row + n;
+
+ if (term.scr <= HISTSIZE-n) {
+ term.scr += n;
+ selscroll(0, n);
+ tfulldirt();
+ }
+}
+
+void
+tscrolldown(int orig, int n, int copyhist)
{
int i;
Line temp;
LIMIT(n, 0, term.bot-orig+1);
+ if (copyhist) {
+ term.histi = (term.histi - 1 + HISTSIZE) % HISTSIZE;
+ temp = term.hist[term.histi];
+ term.hist[term.histi] = term.line[term.bot];
+ term.line[term.bot] = temp;
+ }
+
tsetdirt(orig, term.bot-n);
tclearregion(0, term.bot-n+1, term.col-1, term.bot);
@@ -1077,17 +1127,28 @@ tscrolldown(int orig, int n)
term.line[i-n] = temp;
}
- selscroll(orig, n);
+ if (term.scr == 0)
+ selscroll(orig, n);
}
void
-tscrollup(int orig, int n)
+tscrollup(int orig, int n, int copyhist)
{
int i;
Line temp;
LIMIT(n, 0, term.bot-orig+1);
+ if (copyhist) {
+ term.histi = (term.histi + 1) % HISTSIZE;
+ temp = term.hist[term.histi];
+ term.hist[term.histi] = term.line[orig];
+ term.line[orig] = temp;
+ }
+
+ if (term.scr > 0 && term.scr < HISTSIZE)
+ term.scr = MIN(term.scr + n, HISTSIZE-1);
+
tclearregion(0, orig, term.col-1, orig+n-1);
tsetdirt(orig+n, term.bot);
@@ -1097,7 +1158,8 @@ tscrollup(int orig, int n)
term.line[i+n] = temp;
}
- selscroll(orig, -n);
+ if (term.scr == 0)
+ selscroll(orig, -n);
}
void
@@ -1126,7 +1188,7 @@ tnewline(int first_col)
int y = term.c.y;
if (y == term.bot) {
- tscrollup(term.top, 1);
+ tscrollup(term.top, 1, 1);
} else {
y++;
}
@@ -1291,14 +1353,14 @@ void
tinsertblankline(int n)
{
if (BETWEEN(term.c.y, term.top, term.bot))
- tscrolldown(term.c.y, n);
+ tscrolldown(term.c.y, n, 0);
}
void
tdeleteline(int n)
{
if (BETWEEN(term.c.y, term.top, term.bot))
- tscrollup(term.c.y, n);
+ tscrollup(term.c.y, n, 0);
}
int32_t
@@ -1735,11 +1797,11 @@ csihandle(void)
break;
case 'S': /* SU -- Scroll <n> line up */
DEFAULT(csiescseq.arg[0], 1);
- tscrollup(term.top, csiescseq.arg[0]);
+ tscrollup(term.top, csiescseq.arg[0], 0);
break;
case 'T': /* SD -- Scroll <n> line down */
DEFAULT(csiescseq.arg[0], 1);
- tscrolldown(term.top, csiescseq.arg[0]);
+ tscrolldown(term.top, csiescseq.arg[0], 0);
break;
case 'L': /* IL -- Insert <n> blank lines */
DEFAULT(csiescseq.arg[0], 1);
@@ -2251,7 +2313,7 @@ eschandle(uchar ascii)
return 0;
case 'D': /* IND -- Linefeed */
if (term.c.y == term.bot) {
- tscrollup(term.top, 1);
+ tscrollup(term.top, 1, 1);
} else {
tmoveto(term.c.x, term.c.y+1);
}
@@ -2264,7 +2326,7 @@ eschandle(uchar ascii)
break;
case 'M': /* RI -- Reverse index */
if (term.c.y == term.top) {
- tscrolldown(term.top, 1);
+ tscrolldown(term.top, 1, 1);
} else {
tmoveto(term.c.x, term.c.y-1);
}
@@ -2474,7 +2536,7 @@ twrite(const char *buf, int buflen, int show_ctrl)
void
tresize(int col, int row)
{
- int i;
+ int i, j;
int minrow = MIN(row, term.row);
int mincol = MIN(col, term.col);
int *bp;
@@ -2511,6 +2573,14 @@ tresize(int col, int row)
term.dirty = xrealloc(term.dirty, row * sizeof(*term.dirty));
term.tabs = xrealloc(term.tabs, col * sizeof(*term.tabs));
+ for (i = 0; i < HISTSIZE; i++) {
+ term.hist[i] = xrealloc(term.hist[i], col * sizeof(Glyph));
+ for (j = mincol; j < col; j++) {
+ term.hist[i][j] = term.c.attr;
+ term.hist[i][j].u = ' ';
+ }
+ }
+
/* resize each row to new width, zero-pad if needed */
for (i = 0; i < minrow; i++) {
term.line[i] = xrealloc(term.line[i], col * sizeof(Glyph));
@@ -2569,7 +2639,7 @@ drawregion(int x1, int y1, int x2, int y2)
continue;
term.dirty[y] = 0;
- xdrawline(term.line[y], x1, y, x2);
+ xdrawline(TLINE(y), x1, y, x2);
}
}
@@ -2590,8 +2660,9 @@ draw(void)
cx--;
drawregion(0, 0, term.col, term.row);
- xdrawcursor(cx, term.c.y, term.line[term.c.y][cx],
- term.ocx, term.ocy, term.line[term.ocy][term.ocx]);
+ if (term.scr == 0)
+ xdrawcursor(cx, term.c.y, term.line[term.c.y][cx],
+ term.ocx, term.ocy, term.line[term.ocy][term.ocx]);
term.ocx = cx;
term.ocy = term.c.y;
xfinishdraw();
diff --git a/st.h b/st.h
index fa2eddf..adda2db 100644
--- a/st.h
+++ b/st.h
@@ -81,6 +81,8 @@ void die(const char *, ...);
void redraw(void);
void draw(void);
+void kscrolldown(const Arg *);
+void kscrollup(const Arg *);
void printscreen(const Arg *);
void printsel(const Arg *);
void sendbreak(const Arg *);

View File

@ -0,0 +1,13 @@
diff --git a/config.def.h b/config.def.h
index ec1b576..4b3bf15 100644
--- a/config.def.h
+++ b/config.def.h
@@ -163,6 +163,8 @@ static uint forcemousemod = ShiftMask;
*/
static MouseShortcut mshortcuts[] = {
/* mask button function argument release */
+ { ShiftMask, Button4, kscrollup, {.i = 1} },
+ { ShiftMask, Button5, kscrolldown, {.i = 1} },
{ XK_ANY_MOD, Button2, selpaste, {.i = 0}, 1 },
{ XK_ANY_MOD, Button4, ttysend, {.s = "\031"} },
{ XK_ANY_MOD, Button5, ttysend, {.s = "\005"} },

View File

@ -0,0 +1,38 @@
From fe22e3d1434be1819fe0c0200d4a20967b02f3f6 Mon Sep 17 00:00:00 2001
From: Felix Chen <sryvk.pura@protonmail.com>
Date: Mon, 7 Sep 2020 11:45:01 +0800
Subject: [PATCH] Place title in the middle of barwin
---
dwm.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/dwm.c b/dwm.c
index 664c527..23e94f5 100644
--- a/dwm.c
+++ b/dwm.c
@@ -697,6 +697,7 @@ void
drawbar(Monitor *m)
{
int x, w, tw = 0;
+ int tlpad;
int boxs = drw->fonts->h / 9;
int boxw = drw->fonts->h / 6 + 2;
unsigned int i, occ = 0, urg = 0;
@@ -732,9 +733,11 @@ drawbar(Monitor *m)
if ((w = m->ww - tw - x) > bh) {
if (m->sel) {
drw_setscheme(drw, scheme[m == selmon ? SchemeSel : SchemeNorm]);
- drw_text(drw, x, 0, w, bh, lrpad / 2, m->sel->name, 0);
+ tlpad = MAX((m->ww - ((int)TEXTW(m->sel->name) - lrpad)) / 2 - x, lrpad / 2);
+ drw_text(drw, x, 0, w, bh, tlpad, m->sel->name, 0);
if (m->sel->isfloating)
- drw_rect(drw, x + boxs, boxs, boxw, boxw, m->sel->isfixed, 0);
+ drw_rect(drw, x + boxs + tlpad - lrpad / 2, boxs,
+ boxw, boxw, m->sel->isfixed, 0);
} else {
drw_setscheme(drw, scheme[SchemeNorm]);
drw_rect(drw, x, 0, w, bh, 1, 1);
--
2.28.0

View File

@ -0,0 +1,31 @@
From 700b0bdea872f4c00182b2bd925b41fe03f8d222 Mon Sep 17 00:00:00 2001
From: Aidan Hall <aidan.hall@outlook.com>
Date: Tue, 2 Jun 2020 14:41:53 +0000
Subject: [PATCH] Prevents hiding the border if layout is floating.
---
dwm.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/dwm.c b/dwm.c
index 4465af1..2dd959d 100644
--- a/dwm.c
+++ b/dwm.c
@@ -1282,6 +1282,14 @@ resizeclient(Client *c, int x, int y, int w, int h)
c->oldw = c->w; c->w = wc.width = w;
c->oldh = c->h; c->h = wc.height = h;
wc.border_width = c->bw;
+ if (((nexttiled(c->mon->clients) == c && !nexttiled(c->next))
+ || &monocle == c->mon->lt[c->mon->sellt]->arrange)
+ && !c->isfullscreen && !c->isfloating
+ && NULL != c->mon->lt[c->mon->sellt]->arrange) {
+ c->w = wc.width += c->bw * 2;
+ c->h = wc.height += c->bw * 2;
+ wc.border_width = 0;
+ }
XConfigureWindow(dpy, c->win, CWX|CWY|CWWidth|CWHeight|CWBorderWidth, &wc);
configure(c);
XSync(dpy, False);
--
2.26.2

View File

@ -0,0 +1,177 @@
diff --git a/dwm.c b/dwm.c
index 4465af1..6474055 100644
--- a/dwm.c
+++ b/dwm.c
@@ -111,6 +111,7 @@ typedef struct {
void (*arrange)(Monitor *);
} Layout;
+typedef struct Pertag Pertag;
struct Monitor {
char ltsymbol[16];
float mfact;
@@ -130,6 +131,7 @@ struct Monitor {
Monitor *next;
Window barwin;
const Layout *lt[2];
+ Pertag *pertag;
};
typedef struct {
@@ -271,6 +273,15 @@ static Window root, wmcheckwin;
/* configuration, allows nested code to access above variables */
#include "config.h"
+struct Pertag {
+ unsigned int curtag, prevtag; /* current and previous tag */
+ int nmasters[LENGTH(tags) + 1]; /* number of windows in master area */
+ float mfacts[LENGTH(tags) + 1]; /* mfacts per tag */
+ unsigned int sellts[LENGTH(tags) + 1]; /* selected layouts */
+ const Layout *ltidxs[LENGTH(tags) + 1][2]; /* matrix of tags and layouts indexes */
+ int showbars[LENGTH(tags) + 1]; /* display bar for the current tag */
+};
+
/* compile-time check if all tags fit into an unsigned int bit array. */
struct NumTags { char limitexceeded[LENGTH(tags) > 31 ? -1 : 1]; };
@@ -631,6 +642,7 @@ Monitor *
createmon(void)
{
Monitor *m;
+ unsigned int i;
m = ecalloc(1, sizeof(Monitor));
m->tagset[0] = m->tagset[1] = 1;
@@ -641,6 +653,20 @@ createmon(void)
m->lt[0] = &layouts[0];
m->lt[1] = &layouts[1 % LENGTH(layouts)];
strncpy(m->ltsymbol, layouts[0].symbol, sizeof m->ltsymbol);
+ m->pertag = ecalloc(1, sizeof(Pertag));
+ m->pertag->curtag = m->pertag->prevtag = 1;
+
+ for (i = 0; i <= LENGTH(tags); i++) {
+ m->pertag->nmasters[i] = m->nmaster;
+ m->pertag->mfacts[i] = m->mfact;
+
+ m->pertag->ltidxs[i][0] = m->lt[0];
+ m->pertag->ltidxs[i][1] = m->lt[1];
+ m->pertag->sellts[i] = m->sellt;
+
+ m->pertag->showbars[i] = m->showbar;
+ }
+
return m;
}
@@ -966,7 +992,7 @@ grabkeys(void)
void
incnmaster(const Arg *arg)
{
- selmon->nmaster = MAX(selmon->nmaster + arg->i, 0);
+ selmon->nmaster = selmon->pertag->nmasters[selmon->pertag->curtag] = MAX(selmon->nmaster + arg->i, 0);
arrange(selmon);
}
@@ -1501,9 +1527,9 @@ void
setlayout(const Arg *arg)
{
if (!arg || !arg->v || arg->v != selmon->lt[selmon->sellt])
- selmon->sellt ^= 1;
+ selmon->sellt = selmon->pertag->sellts[selmon->pertag->curtag] ^= 1;
if (arg && arg->v)
- selmon->lt[selmon->sellt] = (Layout *)arg->v;
+ selmon->lt[selmon->sellt] = selmon->pertag->ltidxs[selmon->pertag->curtag][selmon->sellt] = (Layout *)arg->v;
strncpy(selmon->ltsymbol, selmon->lt[selmon->sellt]->symbol, sizeof selmon->ltsymbol);
if (selmon->sel)
arrange(selmon);
@@ -1522,7 +1548,7 @@ setmfact(const Arg *arg)
f = arg->f < 1.0 ? arg->f + selmon->mfact : arg->f - 1.0;
if (f < 0.1 || f > 0.9)
return;
- selmon->mfact = f;
+ selmon->mfact = selmon->pertag->mfacts[selmon->pertag->curtag] = f;
arrange(selmon);
}
@@ -1699,7 +1725,7 @@ tile(Monitor *m)
void
togglebar(const Arg *arg)
{
- selmon->showbar = !selmon->showbar;
+ selmon->showbar = selmon->pertag->showbars[selmon->pertag->curtag] = !selmon->showbar;
updatebarpos(selmon);
XMoveResizeWindow(dpy, selmon->barwin, selmon->wx, selmon->by, selmon->ww, bh);
arrange(selmon);
@@ -1738,9 +1764,33 @@ void
toggleview(const Arg *arg)
{
unsigned int newtagset = selmon->tagset[selmon->seltags] ^ (arg->ui & TAGMASK);
+ int i;
if (newtagset) {
selmon->tagset[selmon->seltags] = newtagset;
+
+ if (newtagset == ~0) {
+ selmon->pertag->prevtag = selmon->pertag->curtag;
+ selmon->pertag->curtag = 0;
+ }
+
+ /* test if the user did not select the same tag */
+ if (!(newtagset & 1 << (selmon->pertag->curtag - 1))) {
+ selmon->pertag->prevtag = selmon->pertag->curtag;
+ for (i = 0; !(newtagset & 1 << i); i++) ;
+ selmon->pertag->curtag = i + 1;
+ }
+
+ /* apply settings for this view */
+ selmon->nmaster = selmon->pertag->nmasters[selmon->pertag->curtag];
+ selmon->mfact = selmon->pertag->mfacts[selmon->pertag->curtag];
+ selmon->sellt = selmon->pertag->sellts[selmon->pertag->curtag];
+ selmon->lt[selmon->sellt] = selmon->pertag->ltidxs[selmon->pertag->curtag][selmon->sellt];
+ selmon->lt[selmon->sellt^1] = selmon->pertag->ltidxs[selmon->pertag->curtag][selmon->sellt^1];
+
+ if (selmon->showbar != selmon->pertag->showbars[selmon->pertag->curtag])
+ togglebar(NULL);
+
focus(NULL);
arrange(selmon);
}
@@ -2035,11 +2085,37 @@ updatewmhints(Client *c)
void
view(const Arg *arg)
{
+ int i;
+ unsigned int tmptag;
+
if ((arg->ui & TAGMASK) == selmon->tagset[selmon->seltags])
return;
selmon->seltags ^= 1; /* toggle sel tagset */
- if (arg->ui & TAGMASK)
+ if (arg->ui & TAGMASK) {
selmon->tagset[selmon->seltags] = arg->ui & TAGMASK;
+ selmon->pertag->prevtag = selmon->pertag->curtag;
+
+ if (arg->ui == ~0)
+ selmon->pertag->curtag = 0;
+ else {
+ for (i = 0; !(arg->ui & 1 << i); i++) ;
+ selmon->pertag->curtag = i + 1;
+ }
+ } else {
+ tmptag = selmon->pertag->prevtag;
+ selmon->pertag->prevtag = selmon->pertag->curtag;
+ selmon->pertag->curtag = tmptag;
+ }
+
+ selmon->nmaster = selmon->pertag->nmasters[selmon->pertag->curtag];
+ selmon->mfact = selmon->pertag->mfacts[selmon->pertag->curtag];
+ selmon->sellt = selmon->pertag->sellts[selmon->pertag->curtag];
+ selmon->lt[selmon->sellt] = selmon->pertag->ltidxs[selmon->pertag->curtag][selmon->sellt];
+ selmon->lt[selmon->sellt^1] = selmon->pertag->ltidxs[selmon->pertag->curtag][selmon->sellt^1];
+
+ if (selmon->showbar != selmon->pertag->showbars[selmon->pertag->curtag])
+ togglebar(NULL);
+
focus(NULL);
arrange(selmon);
}

View File

@ -0,0 +1,59 @@
diff --git a/config.def.h b/config.def.h
index 1c0b587..3fb5cf8 100644
--- a/config.def.h
+++ b/config.def.h
@@ -21,6 +21,18 @@ static const char *colors[][3] = {
/* tagging */
static const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" };
+static const char *tagsel[][2] = {
+ { "#ffffff", "#ff0000" },
+ { "#ffffff", "#ff7f00" },
+ { "#000000", "#ffff00" },
+ { "#000000", "#00ff00" },
+ { "#ffffff", "#0000ff" },
+ { "#ffffff", "#4b0082" },
+ { "#ffffff", "#9400d3" },
+ { "#000000", "#ffffff" },
+ { "#ffffff", "#000000" },
+};
+
static const Rule rules[] = {
/* xprop(1):
* WM_CLASS(STRING) = instance, class
diff --git a/dwm.c b/dwm.c
index b0b3466..c16d5f5 100644
--- a/dwm.c
+++ b/dwm.c
@@ -264,6 +264,7 @@ static Atom wmatom[WMLast], netatom[NetLast];
static int running = 1;
static Cur *cursor[CurLast];
static Clr **scheme;
+static Clr **tagscheme;
static Display *dpy;
static Drw *drw;
static Monitor *mons, *selmon;
@@ -717,7 +718,7 @@ drawbar(Monitor *m)
x = 0;
for (i = 0; i < LENGTH(tags); i++) {
w = TEXTW(tags[i]);
- drw_setscheme(drw, scheme[m->tagset[m->seltags] & 1 << i ? SchemeSel : SchemeNorm]);
+ drw_setscheme(drw, (m->tagset[m->seltags] & 1 << i ? tagscheme[i] : scheme[SchemeNorm]));
drw_text(drw, x, 0, w, bh, lrpad / 2, tags[i], urg & 1 << i);
if (occ & 1 << i)
drw_rect(drw, x + boxs, boxs, boxw, boxw,
@@ -1568,9 +1569,14 @@ setup(void)
cursor[CurResize] = drw_cur_create(drw, XC_sizing);
cursor[CurMove] = drw_cur_create(drw, XC_fleur);
/* init appearance */
+ if (LENGTH(tags) > LENGTH(tagsel))
+ die("too few color schemes for the tags");
scheme = ecalloc(LENGTH(colors), sizeof(Clr *));
for (i = 0; i < LENGTH(colors); i++)
scheme[i] = drw_scm_create(drw, colors[i], 3);
+ tagscheme = ecalloc(LENGTH(tagsel), sizeof(Clr *));
+ for (i = 0; i < LENGTH(tagsel); i++)
+ tagscheme[i] = drw_scm_create(drw, tagsel[i], 2);
/* init bars */
updatebars();
updatestatus();

View File

@ -0,0 +1,102 @@
diff --git a/config.def.h b/config.def.h
index fd77a07..09737d7 100644
--- a/config.def.h
+++ b/config.def.h
@@ -64,6 +64,8 @@ static Key keys[] = {
{ MODKEY, XK_p, spawn, {.v = dmenucmd } },
{ MODKEY|ShiftMask, XK_Return, spawn, {.v = termcmd } },
{ MODKEY, XK_b, togglebar, {0} },
+ { MODKEY|ShiftMask, XK_j, rotatestack, {.i = +1 } },
+ { MODKEY|ShiftMask, XK_k, rotatestack, {.i = -1 } },
{ MODKEY, XK_j, focusstack, {.i = +1 } },
{ MODKEY, XK_k, focusstack, {.i = -1 } },
{ MODKEY, XK_i, incnmaster, {.i = +1 } },
diff --git a/dwm.c b/dwm.c
index 421bf27..1ec8b10 100644
--- a/dwm.c
+++ b/dwm.c
@@ -165,6 +165,8 @@ static void detachstack(Client *c);
static Monitor *dirtomon(int dir);
static void drawbar(Monitor *m);
static void drawbars(void);
+static void enqueue(Client *c);
+static void enqueuestack(Client *c);
static void enternotify(XEvent *e);
static void expose(XEvent *e);
static void focus(Client *c);
@@ -194,6 +196,7 @@ static void resize(Client *c, int x, int y, int w, int h, int interact);
static void resizeclient(Client *c, int x, int y, int w, int h);
static void resizemouse(const Arg *arg);
static void restack(Monitor *m);
+static void rotatestack(const Arg *arg);
static void run(void);
static void scan(void);
static int sendevent(Client *c, Atom proto);
@@ -765,6 +768,28 @@ drawbars(void)
}
void
+enqueue(Client *c)
+{
+ Client *l;
+ for (l = c->mon->clients; l && l->next; l = l->next);
+ if (l) {
+ l->next = c;
+ c->next = NULL;
+ }
+}
+
+void
+enqueuestack(Client *c)
+{
+ Client *l;
+ for (l = c->mon->stack; l && l->snext; l = l->snext);
+ if (l) {
+ l->snext = c;
+ c->snext = NULL;
+ }
+}
+
+void
enternotify(XEvent *e)
{
Client *c;
@@ -1390,6 +1415,38 @@ restack(Monitor *m)
}
void
+rotatestack(const Arg *arg)
+{
+ Client *c = NULL, *f;
+
+ if (!selmon->sel)
+ return;
+ f = selmon->sel;
+ if (arg->i > 0) {
+ for (c = nexttiled(selmon->clients); c && nexttiled(c->next); c = nexttiled(c->next));
+ if (c){
+ detach(c);
+ attach(c);
+ detachstack(c);
+ attachstack(c);
+ }
+ } else {
+ if ((c = nexttiled(selmon->clients))){
+ detach(c);
+ enqueue(c);
+ detachstack(c);
+ enqueuestack(c);
+ }
+ }
+ if (c){
+ arrange(selmon);
+ //unfocus(f, 1);
+ focus(f);
+ restack(selmon);
+ }
+}
+
+void
run(void)
{
XEvent ev;

View File

@ -0,0 +1,90 @@
diff -up a/config.def.h b/config.def.h
--- a/config.def.h 2019-06-06 21:23:27.006661784 +0200
+++ b/config.def.h 2019-06-20 15:05:59.083102462 +0200
@@ -58,11 +58,14 @@ static const Layout layouts[] = {
static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */
static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, "-fn", dmenufont, "-nb", col_gray1, "-nf", col_gray3, "-sb", col_cyan, "-sf", col_gray4, NULL };
static const char *termcmd[] = { "st", NULL };
+static const char scratchpadname[] = "scratchpad";
+static const char *scratchpadcmd[] = { "st", "-t", scratchpadname, "-g", "120x34", NULL };
static Key keys[] = {
/* modifier key function argument */
{ MODKEY, XK_p, spawn, {.v = dmenucmd } },
{ MODKEY|ShiftMask, XK_Return, spawn, {.v = termcmd } },
+ { MODKEY, XK_grave, togglescratch, {.v = scratchpadcmd } },
{ MODKEY, XK_b, togglebar, {0} },
{ MODKEY, XK_j, focusstack, {.i = +1 } },
{ MODKEY, XK_k, focusstack, {.i = -1 } },
diff -up a/dwm.c b/dwm.c
--- a/dwm.c 2019-06-06 21:23:27.023328450 +0200
+++ b/dwm.c 2019-06-20 15:07:01.089767947 +0200
@@ -213,6 +213,7 @@ static void tagmon(const Arg *arg);
static void tile(Monitor *);
static void togglebar(const Arg *arg);
static void togglefloating(const Arg *arg);
+static void togglescratch(const Arg *arg);
static void toggletag(const Arg *arg);
static void toggleview(const Arg *arg);
static void unfocus(Client *c, int setfocus);
@@ -273,6 +274,8 @@ static Window root, wmcheckwin;
/* configuration, allows nested code to access above variables */
#include "config.h"
+static unsigned int scratchtag = 1 << LENGTH(tags);
+
/* compile-time check if all tags fit into an unsigned int bit array. */
struct NumTags { char limitexceeded[LENGTH(tags) > 31 ? -1 : 1]; };
@@ -1052,6 +1055,14 @@ manage(Window w, XWindowAttributes *wa)
&& (c->x + (c->w / 2) < c->mon->wx + c->mon->ww)) ? bh : c->mon->my);
c->bw = borderpx;
+ selmon->tagset[selmon->seltags] &= ~scratchtag;
+ if (!strcmp(c->name, scratchpadname)) {
+ c->mon->tagset[c->mon->seltags] |= c->tags = scratchtag;
+ c->isfloating = True;
+ c->x = c->mon->wx + (c->mon->ww / 2 - WIDTH(c) / 2);
+ c->y = c->mon->wy + (c->mon->wh / 2 - HEIGHT(c) / 2);
+ }
+
wc.border_width = c->bw;
XConfigureWindow(dpy, w, CWBorderWidth, &wc);
XSetWindowBorder(dpy, w, scheme[SchemeNorm][ColBorder].pixel);
@@ -1661,6 +1672,7 @@ spawn(const Arg *arg)
{
if (arg->v == dmenucmd)
dmenumon[0] = '0' + selmon->num;
+ selmon->tagset[selmon->seltags] &= ~scratchtag;
if (fork() == 0) {
if (dpy)
close(ConnectionNumber(dpy));
@@ -1748,6 +1760,28 @@ togglefloating(const Arg *arg)
}
void
+togglescratch(const Arg *arg)
+{
+ Client *c;
+ unsigned int found = 0;
+
+ for (c = selmon->clients; c && !(found = c->tags & scratchtag); c = c->next);
+ if (found) {
+ unsigned int newtagset = selmon->tagset[selmon->seltags] ^ scratchtag;
+ if (newtagset) {
+ selmon->tagset[selmon->seltags] = newtagset;
+ focus(NULL);
+ arrange(selmon);
+ }
+ if (ISVISIBLE(c)) {
+ focus(c);
+ restack(selmon);
+ }
+ } else
+ spawn(arg);
+}
+
+void
toggletag(const Arg *arg)
{
unsigned int newtags;

View File

@ -0,0 +1,20 @@
# Para LLVM, CLANG y RUST
-llvm_targets_AArch64
-llvm_targets_AMDGPU
-llvm_targets_ARM
-llvm_targets_AVR
-llvm_targets_BPF
-llvm_targets_Hexagon
-llvm_targets_Lanai
-llvm_targets_LoongArch
-llvm_targets_MSP430
-llvm_targets_Mips
-llvm_targets_NVPTX
-llvm_targets_PowerPC
-llvm_targets_RISCV
-llvm_targets_Sparc
-llvm_targets_SystemZ
-llvm_targets_VE
-llvm_targets_WebAssembly
-llvm_targets_X86
-llvm_targets_XCore

View File

@ -0,0 +1,22 @@
# created by eselect-repo
[ricerlay]
location = /var/db/repos/ricerlay
sync-type = git
sync-uri = https://github.com/gentoo-mirror/ricerlay.git
[nymphos]
location = /var/db/repos/nymphos
sync-type = git
sync-uri = https://github.com/gentoo-mirror/nymphos.git
[setkeh]
location = /var/db/repos/setkeh
sync-type = git
sync-uri = https://github.com/gentoo-mirror/setkeh.git

View File

@ -0,0 +1,26 @@
# created by eselect-repo
[ricerlay]
location = /var/db/repos/ricerlay
sync-type = git
sync-uri = https://github.com/gentoo-mirror/ricerlay.git
[nymphos]
location = /var/db/repos/nymphos
sync-type = git
sync-uri = https://github.com/gentoo-mirror/nymphos.git
[setkeh]
location = /var/db/repos/setkeh
sync-type = git
sync-uri = https://github.com/gentoo-mirror/setkeh.git
[stefantalpalaru]
location = /var/db/repos/stefantalpalaru
sync-type = git
sync-uri = https://github.com/gentoo-mirror/stefantalpalaru.git

View File

@ -0,0 +1,8 @@
[DEFAULT]
main-repo = gentoo
[gentoo]
location = /var/db/repos/gentoo
sync-type = git
sync-uri = https://anongit.gentoo.org/git/repo/gentoo.git
auto-sync = yes

View File

@ -0,0 +1,6 @@
[librewolf]
priority = 50
location = <repo-location>/librewolf
sync-type = git
sync-uri = https://gitlab.com/librewolf-community/browser/gentoo.git
auto-sync = Yes

View File

@ -0,0 +1,85 @@
/* See LICENSE file for copyright and license details. */
/* interval between updates (in ms) */
const unsigned int interval = 1000;
/* text to show if no value can be retrieved */
static const char unknown_str[] = "n/a";
/* maximum output string length */
#define MAXLEN 2048
/*
* function description argument (example)
*
* battery_perc battery percentage battery name (BAT0)
* NULL on OpenBSD/FreeBSD
* battery_state battery charging state battery name (BAT0)
* NULL on OpenBSD/FreeBSD
* battery_remaining battery remaining HH:MM battery name (BAT0)
* NULL on OpenBSD/FreeBSD
* cpu_perc cpu usage in percent NULL
* cpu_freq cpu frequency in MHz NULL
* datetime date and time format string (%F %T)
* disk_free free disk space in GB mountpoint path (/)
* disk_perc disk usage in percent mountpoint path (/)
* disk_total total disk space in GB mountpoint path (/")
* disk_used used disk space in GB mountpoint path (/)
* entropy available entropy NULL
* gid GID of current user NULL
* hostname hostname NULL
* ipv4 IPv4 address interface name (eth0)
* ipv6 IPv6 address interface name (eth0)
* kernel_release `uname -r` NULL
* keyboard_indicators caps/num lock indicators format string (c?n?)
* see keyboard_indicators.c
* keymap layout (variant) of current NULL
* keymap
* load_avg load average NULL
* netspeed_rx receive network speed interface name (wlan0)
* netspeed_tx transfer network speed interface name (wlan0)
* num_files number of files in a directory path
* (/home/foo/Inbox/cur)
* ram_free free memory in GB NULL
* ram_perc memory usage in percent NULL
* ram_total total memory size in GB NULL
* ram_used used memory in GB NULL
* run_command custom shell command command (echo foo)
* swap_free free swap in GB NULL
* swap_perc swap usage in percent NULL
* swap_total total swap size in GB NULL
* swap_used used swap in GB NULL
* temp temperature in degree celsius sensor file
* (/sys/class/thermal/...)
* NULL on OpenBSD
* thermal zone on FreeBSD
* (tz0, tz1, etc.)
* uid UID of current user NULL
* uptime system uptime NULL
* username username of current user NULL
* vol_perc OSS/ALSA volume in percent mixer file (/dev/mixer)
* wifi_perc WiFi signal in percent interface name (wlan0)
* wifi_essid WiFi ESSID interface name (wlan0)
*/
static const char estado[] = "a=$(amixer get Master | tail -n 1 | cut -d ' '\
-f 8); if [ $a = '[on]' ]; then printf 'Vol'; \
else printf 'Sil'; fi";
static const struct arg args[] = {
/* function format argument */
/*
* { run_command, "  %s", "light -G" }, // Brillo de pantalla
* { keyboard_indicators, "| NUM:%s ", "Y" }, // Indicador de teclado numérico
* { battery_state, "  %s", "BAT1" }, // Estado de la batería
* { battery_perc, "%s%%", "BAT1" }, // Porcentaje batería
* { cpu_perc, "  %2s%%", NULL }, // Uso del cpu
* { ram_perc, "  %2s%%", NULL }, // Uso de la ram
*/
{ wifi_perc, "Wifi:%s%%", "wlp2s0" }, // Calidad conexión wifi
{ run_command, " %s", estado }, // Indicador volumen
{ run_command, ":%s", "amixer sget Master | grep 'Mono:' | awk -F'[][]' '{ print $2 }'" }, // Indicador volumen
{ temp, " %s°C", "/sys/devices/platform/coretemp.0/hwmon/hwmon0/temp2_input" }, // Temperatura core1
{ datetime, " %s", "%R" }, // Hora
{ num_files, " T:%s ", "/home/luis/.local/share/Trash/files/" }, // Papelera de reciclaje
};

View File

@ -0,0 +1,152 @@
#ifdef _WINDOW_CONFIG
/* default window dimensions (overwritten via -g option): */
enum {
WIN_WIDTH = 800,
WIN_HEIGHT = 600
};
/* colors and font are configured with 'background', 'foreground' and
* 'font' X resource properties.
* See X(7) section Resources and xrdb(1) for more information.
*/
#endif
#ifdef _IMAGE_CONFIG
/* levels (in percent) to use when zooming via '-' and '+':
* (first/last value is used as min/max zoom level)
*/
static const float zoom_levels[] = {
12.5, 25.0, 50.0, 75.0,
100.0, 150.0, 200.0, 400.0, 800.0
};
/* default slideshow delay (in sec, overwritten via -S option): */
enum { SLIDESHOW_DELAY = 5 };
/* gamma correction: the user-visible ranges [-GAMMA_RANGE, 0] and
* (0, GAMMA_RANGE] are mapped to the ranges [0, 1], and (1, GAMMA_MAX].
* */
static const double GAMMA_MAX = 10.0;
static const int GAMMA_RANGE = 32;
/* command i_scroll pans image 1/PAN_FRACTION of screen width/height */
static const int PAN_FRACTION = 5;
/* if false, pixelate images at zoom level != 100%,
* toggled with 'a' key binding
*/
static const bool ANTI_ALIAS = true;
/* if true, use a checkerboard background for alpha layer,
* toggled with 'A' key binding
*/
static const bool ALPHA_LAYER = false;
#endif
#ifdef _THUMBS_CONFIG
/* thumbnail sizes in pixels (width == height): */
static const int thumb_sizes[] = { 32, 64, 96, 128, 160 };
/* thumbnail size at startup, index into thumb_sizes[]: */
static const int THUMB_SIZE = 3;
#endif
#ifdef _MAPPINGS_CONFIG
/* keyboard mappings for image and thumbnail mode: */
static const keymap_t keys[] = {
/* modifiers key function argument */
{ 0, XK_q, g_quit, None },
{ 0, XK_Return, g_switch_mode, None },
{ 0, XK_f, g_toggle_fullscreen, None },
{ 0, XK_b, g_toggle_bar, None },
{ ControlMask, XK_x, g_prefix_external, None },
{ 0, XK_g, g_first, None },
{ 0, XK_G, g_n_or_last, None },
{ 0, XK_r, g_reload_image, None },
{ 0, XK_D, g_remove_image, None },
{ ControlMask, XK_h, g_scroll_screen, DIR_LEFT },
{ ControlMask, XK_Left, g_scroll_screen, DIR_LEFT },
{ ControlMask, XK_j, g_scroll_screen, DIR_DOWN },
{ ControlMask, XK_Down, g_scroll_screen, DIR_DOWN },
{ ControlMask, XK_k, g_scroll_screen, DIR_UP },
{ ControlMask, XK_Up, g_scroll_screen, DIR_UP },
{ ControlMask, XK_l, g_scroll_screen, DIR_RIGHT },
{ ControlMask, XK_Right, g_scroll_screen, DIR_RIGHT },
{ 0, XK_plus, g_zoom, +1 },
{ 0, XK_KP_Add, g_zoom, +1 },
{ 0, XK_minus, g_zoom, -1 },
{ 0, XK_KP_Subtract, g_zoom, -1 },
{ 0, XK_m, g_toggle_image_mark, None },
{ 0, XK_M, g_mark_range, None },
{ ControlMask, XK_m, g_reverse_marks, None },
{ ControlMask, XK_u, g_unmark_all, None },
{ 0, XK_N, g_navigate_marked, +1 },
{ 0, XK_P, g_navigate_marked, -1 },
{ 0, XK_braceleft, g_change_gamma, -1 },
{ 0, XK_braceright, g_change_gamma, +1 },
{ ControlMask, XK_g, g_change_gamma, 0 },
{ 0, XK_h, t_move_sel, DIR_LEFT },
{ 0, XK_Left, t_move_sel, DIR_LEFT },
{ 0, XK_j, t_move_sel, DIR_DOWN },
{ 0, XK_Down, t_move_sel, DIR_DOWN },
{ 0, XK_k, t_move_sel, DIR_UP },
{ 0, XK_Up, t_move_sel, DIR_UP },
{ 0, XK_l, t_move_sel, DIR_RIGHT },
{ 0, XK_Right, t_move_sel, DIR_RIGHT },
{ 0, XK_R, t_reload_all, None },
{ 0, XK_n, i_navigate, +1 },
{ 0, XK_n, i_scroll_to_edge, DIR_LEFT | DIR_UP },
{ 0, XK_space, i_navigate, +1 },
{ 0, XK_p, i_navigate, -1 },
{ 0, XK_p, i_scroll_to_edge, DIR_LEFT | DIR_UP },
{ 0, XK_BackSpace, i_navigate, -1 },
{ 0, XK_bracketright, i_navigate, +10 },
{ 0, XK_bracketleft, i_navigate, -10 },
{ ControlMask, XK_6, i_alternate, None },
{ ControlMask, XK_n, i_navigate_frame, +1 },
{ ControlMask, XK_p, i_navigate_frame, -1 },
{ ControlMask, XK_space, i_toggle_animation, None },
{ 0, XK_h, i_scroll, DIR_LEFT },
{ 0, XK_Left, i_scroll, DIR_LEFT },
{ 0, XK_j, i_scroll, DIR_DOWN },
{ 0, XK_Down, i_scroll, DIR_DOWN },
{ 0, XK_k, i_scroll, DIR_UP },
{ 0, XK_Up, i_scroll, DIR_UP },
{ 0, XK_l, i_scroll, DIR_RIGHT },
{ 0, XK_Right, i_scroll, DIR_RIGHT },
{ 0, XK_H, i_scroll_to_edge, DIR_LEFT },
{ 0, XK_J, i_scroll_to_edge, DIR_DOWN },
{ 0, XK_K, i_scroll_to_edge, DIR_UP },
{ 0, XK_L, i_scroll_to_edge, DIR_RIGHT },
{ 0, XK_equal, i_set_zoom, 100 },
{ 0, XK_w, i_fit_to_win, SCALE_DOWN },
{ 0, XK_W, i_fit_to_win, SCALE_FIT },
{ 0, XK_e, i_fit_to_win, SCALE_WIDTH },
{ 0, XK_E, i_fit_to_win, SCALE_HEIGHT },
{ 0, XK_less, i_rotate, DEGREE_270 },
{ 0, XK_greater, i_rotate, DEGREE_90 },
{ 0, XK_question, i_rotate, DEGREE_180 },
{ 0, XK_bar, i_flip, FLIP_HORIZONTAL },
{ 0, XK_underscore, i_flip, FLIP_VERTICAL },
{ 0, XK_a, i_toggle_antialias, None },
{ 0, XK_A, i_toggle_alpha, None },
{ 0, XK_s, i_slideshow, None },
};
/* mouse button mappings for image mode: */
static const button_t buttons[] = {
/* modifiers button function argument */
{ 0, 1, i_cursor_navigate, None },
{ 0, 2, i_drag, DRAG_ABSOLUTE },
{ 0, 3, g_switch_mode, None },
{ 0, 4, g_zoom, +1 },
{ 0, 5, g_zoom, -1 },
};
#endif

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,23 @@
/* 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 */
/* -fn option overrides fonts[0]; default X11 font or font set */
static const char *fonts[] = {
"monospace:size=10"
};
static const char *prompt = NULL; /* -p option; prompt to the left of input field */
static const char *colors[SchemeLast][2] = {
/* fg bg */
[SchemeNorm] = { "#bbbbbb", "#222222" },
[SchemeSel] = { "#eeeeee", "#005577" },
[SchemeOut] = { "#000000", "#00ffff" },
};
/* -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[] = " ";

View File

@ -0,0 +1,23 @@
/* 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 */
/* -fn option overrides fonts[0]; default X11 font or font set */
static const char *fonts[] = {
"monospace:size=10"
};
static const char *prompt = NULL; /* -p option; prompt to the left of input field */
static const char *colors[SchemeLast][2] = {
/* fg bg */
[SchemeNorm] = { "#bbbbbb", "#222222" },
[SchemeSel] = { "#eeeeee", "#005577" },
[SchemeOut] = { "#000000", "#00ffff" },
};
/* -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[] = " ";

View File

@ -0,0 +1,19 @@
static const char *background_color = "#000000";
static const char *border_color = "#777777";
static const char *font_color = "#ffffff";
static const char *font_pattern = "mononoki:size=9";
static const unsigned line_spacing = 6;
static const unsigned int padding = 9;
static const unsigned int width = 230;
static const unsigned int border_size = 1;
static const unsigned int pos_x = 10;
static const unsigned int pos_y = 20;
enum corners { TOP_LEFT, TOP_RIGHT, BOTTOM_LEFT, BOTTOM_RIGHT };
enum corners corner = TOP_RIGHT;
static const unsigned int duration = 1; /* in seconds */
#define DISMISS_BUTTON Button1
#define ACTION_BUTTON Button3

View File

@ -0,0 +1,12 @@
/* user and group to drop privileges to */
static const char *user = "nobody";
static const char *group = "nogroup";
static const char *colorname[NUMCOLS] = {
[INIT] = "black", /* after initialization */
[INPUT] = "#005577", /* during input */
[FAILED] = "#CC3333", /* wrong password */
};
/* treat a cleared input like a wrong password (color) */
static const int failonclear = 1;

View File

@ -0,0 +1,58 @@
/* See LICENSE file for copyright and license details. */
/* appearance */
static const char font[] = "-*-*-medium-*-*-*-14-*-*-*-*-*-*-*";
static const char* normbgcolor = "#222222";
static const char* normfgcolor = "#cccccc";
static const char* selbgcolor = "#555555";
static const char* selfgcolor = "#ffffff";
static const char before[] = "<";
static const char after[] = ">";
static const int tabwidth = 200;
static const Bool foreground = True;
/*
* Where to place a new tab when it is opened. When npisrelative is True,
* then the current position is changed + newposition. If npisrelative
* is False, then newposition is an absolute position.
*/
static int newposition = 0;
static Bool npisrelative = False;
#define SETPROP(p) { \
.v = (char *[]){ "/bin/sh", "-c", \
"prop=\"`xwininfo -children -id $1 | grep '^ 0x' | sed -e's@^ *\\(0x[0-9a-f]*\\) \"\\([^\"]*\\)\".*@\\1 \\2@' | xargs -0 printf %b | dmenu -l 10`\" &&" \
"xprop -id $1 -f $0 8s -set $0 \"$prop\"", \
p, winid, NULL \
} \
}
#define MODKEY ControlMask
static Key keys[] = { \
/* modifier key function argument */
{ MODKEY|ShiftMask, XK_Return, focusonce, { 0 } },
{ MODKEY|ShiftMask, XK_Return, spawn, { 0 } },
{ MODKEY, XK_t, spawn, SETPROP("_TABBED_SELECT_TAB") },
{ MODKEY|ShiftMask, XK_l, rotate, { .i = +1 } },
{ MODKEY|ShiftMask, XK_h, rotate, { .i = -1 } },
{ MODKEY|ShiftMask, XK_j, movetab, { .i = -1 } },
{ MODKEY|ShiftMask, XK_k, movetab, { .i = +1 } },
{ MODKEY, XK_Tab, rotate, { .i = 0 } },
{ MODKEY, XK_1, move, { .i = 0 } },
{ MODKEY, XK_2, move, { .i = 1 } },
{ MODKEY, XK_3, move, { .i = 2 } },
{ MODKEY, XK_4, move, { .i = 3 } },
{ MODKEY, XK_5, move, { .i = 4 } },
{ MODKEY, XK_6, move, { .i = 5 } },
{ MODKEY, XK_7, move, { .i = 6 } },
{ MODKEY, XK_8, move, { .i = 7 } },
{ MODKEY, XK_9, move, { .i = 8 } },
{ MODKEY, XK_0, move, { .i = 9 } },
{ MODKEY, XK_q, killclient, { 0 } },
{ 0, XK_F11, fullscreen, { 0 } },
};

View File

@ -0,0 +1,478 @@
/* See LICENSE file for copyright and license details. */
/*
* appearance
*
* font: see http://freedesktop.org/software/fontconfig/fontconfig-user.html
*/
static char *font = "mononoki:pixelsize=14:antialias=true:autohint=true";
static int borderpx = 2;
/*
* What program is execed by st depends of these precedence rules:
* 1: program passed with -e
* 2: scroll and/or utmp
* 3: SHELL environment variable
* 4: value of shell in /etc/passwd
* 5: value of shell in config.h
*/
static char *shell = "/bin/sh";
char *utmp = NULL;
/* scroll program: to enable use a string like "scroll" */
char *scroll = NULL;
char *stty_args = "stty raw pass8 nl -echo -iexten -cstopb 38400";
/* identification sequence returned in DA and DECID */
char *vtiden = "\033[?6c";
/* Kerning / character bounding-box multipliers */
static float cwscale = 1.0;
static float chscale = 1.0;
/*
* word delimiter string
*
* More advanced example: L" `'\"()[]{}"
*/
wchar_t *worddelimiters = L" ";
/* selection timeouts (in milliseconds) */
static unsigned int doubleclicktimeout = 300;
static unsigned int tripleclicktimeout = 600;
/* alt screens */
int allowaltscreen = 1;
/* allow certain non-interactive (insecure) window operations such as:
setting the clipboard text */
int allowwindowops = 0;
/*
* draw latency range in ms - from new content/keypress/etc until drawing.
* within this range, st draws when content stops arriving (idle). mostly it's
* near minlatency, but it waits longer for slow updates to avoid partial draw.
* low minlatency will tear/flicker more, as it can "detect" idle too early.
*/
static double minlatency = 8;
static double maxlatency = 33;
/*
* blinking timeout (set to 0 to disable blinking) for the terminal blinking
* attribute.
*/
static unsigned int blinktimeout = 800;
/*
* thickness of underline and bar cursors
*/
static unsigned int cursorthickness = 2;
/*
* bell volume. It must be a value between -100 and 100. Use 0 for disabling
* it
*/
static int bellvolume = 0;
/* default TERM value */
char *termname = "st-256color";
/*
* spaces per tab
*
* When you are changing this value, don't forget to adapt the »it« value in
* the st.info and appropriately install the st.info in the environment where
* you use this st version.
*
* it#$tabspaces,
*
* Secondly make sure your kernel is not expanding tabs. When running `stty
* -a` »tab0« should appear. You can tell the terminal to not expand tabs by
* running following command:
*
* stty tabs
*/
unsigned int tabspaces = 8;
/* Terminal colors (16 first used in escape sequence) */
static const char *colorname[] = {
/* 8 normal colors */
"black",
"red3",
"green3",
"yellow3",
"blue2",
"magenta3",
"cyan3",
"gray90",
/* 8 bright colors */
"gray50",
"red",
"green",
"yellow",
"#5c5cff",
"magenta",
"cyan",
"white",
[255] = 0,
/* more colors can be added after 255 to use with DefaultXX */
"#cccccc",
"#555555",
"gray90", /* default foreground colour */
"black", /* default background colour */
};
/*
* Default colors (colorname index)
* foreground, background, cursor, reverse cursor
*/
unsigned int defaultfg = 258;
unsigned int defaultbg = 259;
unsigned int defaultcs = 256;
static unsigned int defaultrcs = 257;
/*
* Default shape of cursor
* 2: Block ("█")
* 4: Underline ("_")
* 6: Bar ("|")
* 7: Snowman ("☃")
*/
static unsigned int cursorshape = 6;
/*
* Default columns and rows numbers
*/
static unsigned int cols = 80;
static unsigned int rows = 24;
/*
* Default colour and shape of the mouse cursor
*/
static unsigned int mouseshape = XC_xterm;
static unsigned int mousefg = 7;
static unsigned int mousebg = 0;
/*
* Color used to display font attributes when fontconfig selected a font which
* doesn't match the ones requested.
*/
static unsigned int defaultattr = 11;
/*
* Force mouse select/shortcuts while mask is active (when MODE_MOUSE is set).
* Note that if you want to use ShiftMask with selmasks, set this to an other
* modifier, set to 0 to not use it.
*/
static uint forcemousemod = ShiftMask;
/*
* Internal mouse shortcuts.
* Beware that overloading Button1 will disable the selection.
*/
static MouseShortcut mshortcuts[] = {
/* mask button function argument release */
{ ShiftMask, Button4, kscrollup, {.i = 1} },
{ ShiftMask, Button5, kscrolldown, {.i = 1} },
{ XK_ANY_MOD, Button2, selpaste, {.i = 0}, 1 },
{ ShiftMask, Button4, ttysend, {.s = "\033[5;2~"} },
{ XK_ANY_MOD, Button4, ttysend, {.s = "\031"} },
{ ShiftMask, Button5, ttysend, {.s = "\033[6;2~"} },
{ XK_ANY_MOD, Button5, ttysend, {.s = "\005"} },
};
/* Internal keyboard shortcuts. */
#define MODKEY Mod1Mask
#define TERMMOD (ControlMask|ShiftMask)
static Shortcut shortcuts[] = {
/* mask keysym function argument */
{ XK_ANY_MOD, XK_Break, sendbreak, {.i = 0} },
{ ControlMask, XK_Print, toggleprinter, {.i = 0} },
{ ShiftMask, XK_Print, printscreen, {.i = 0} },
{ XK_ANY_MOD, XK_Print, printsel, {.i = 0} },
{ TERMMOD, XK_Prior, zoom, {.f = +1} },
{ TERMMOD, XK_Next, zoom, {.f = -1} },
{ TERMMOD, XK_Home, zoomreset, {.f = 0} },
{ TERMMOD, XK_C, clipcopy, {.i = 0} },
{ TERMMOD, XK_V, clippaste, {.i = 0} },
{ TERMMOD, XK_Y, selpaste, {.i = 0} },
{ ShiftMask, XK_Insert, selpaste, {.i = 0} },
{ TERMMOD, XK_Num_Lock, numlock, {.i = 0} },
{ ShiftMask, XK_Page_Up, kscrollup, {.i = -1} },
{ ShiftMask, XK_Page_Down, kscrolldown, {.i = -1} },
};
/*
* Special keys (change & recompile st.info accordingly)
*
* Mask value:
* * Use XK_ANY_MOD to match the key no matter modifiers state
* * Use XK_NO_MOD to match the key alone (no modifiers)
* appkey value:
* * 0: no value
* * > 0: keypad application mode enabled
* * = 2: term.numlock = 1
* * < 0: keypad application mode disabled
* appcursor value:
* * 0: no value
* * > 0: cursor application mode enabled
* * < 0: cursor application mode disabled
*
* Be careful with the order of the definitions because st searches in
* this table sequentially, so any XK_ANY_MOD must be in the last
* position for a key.
*/
/*
* If you want keys other than the X11 function keys (0xFD00 - 0xFFFF)
* to be mapped below, add them to this array.
*/
static KeySym mappedkeys[] = { -1 };
/*
* State bits to ignore when matching key or button events. By default,
* numlock (Mod2Mask) and keyboard layout (XK_SWITCH_MOD) are ignored.
*/
static uint ignoremod = Mod2Mask|XK_SWITCH_MOD;
/*
* This is the huge key array which defines all compatibility to the Linux
* world. Please decide about changes wisely.
*/
static Key key[] = {
/* keysym mask string appkey appcursor */
{ XK_KP_Home, ShiftMask, "\033[2J", 0, -1},
{ XK_KP_Home, ShiftMask, "\033[1;2H", 0, +1},
{ XK_KP_Home, XK_ANY_MOD, "\033[H", 0, -1},
{ XK_KP_Home, XK_ANY_MOD, "\033[1~", 0, +1},
{ XK_KP_Up, XK_ANY_MOD, "\033Ox", +1, 0},
{ XK_KP_Up, XK_ANY_MOD, "\033[A", 0, -1},
{ XK_KP_Up, XK_ANY_MOD, "\033OA", 0, +1},
{ XK_KP_Down, XK_ANY_MOD, "\033Or", +1, 0},
{ XK_KP_Down, XK_ANY_MOD, "\033[B", 0, -1},
{ XK_KP_Down, XK_ANY_MOD, "\033OB", 0, +1},
{ XK_KP_Left, XK_ANY_MOD, "\033Ot", +1, 0},
{ XK_KP_Left, XK_ANY_MOD, "\033[D", 0, -1},
{ XK_KP_Left, XK_ANY_MOD, "\033OD", 0, +1},
{ XK_KP_Right, XK_ANY_MOD, "\033Ov", +1, 0},
{ XK_KP_Right, XK_ANY_MOD, "\033[C", 0, -1},
{ XK_KP_Right, XK_ANY_MOD, "\033OC", 0, +1},
{ XK_KP_Prior, ShiftMask, "\033[5;2~", 0, 0},
{ XK_KP_Prior, XK_ANY_MOD, "\033[5~", 0, 0},
{ XK_KP_Begin, XK_ANY_MOD, "\033[E", 0, 0},
{ XK_KP_End, ControlMask, "\033[J", -1, 0},
{ XK_KP_End, ControlMask, "\033[1;5F", +1, 0},
{ XK_KP_End, ShiftMask, "\033[K", -1, 0},
{ XK_KP_End, ShiftMask, "\033[1;2F", +1, 0},
{ XK_KP_End, XK_ANY_MOD, "\033[4~", 0, 0},
{ XK_KP_Next, ShiftMask, "\033[6;2~", 0, 0},
{ XK_KP_Next, XK_ANY_MOD, "\033[6~", 0, 0},
{ XK_KP_Insert, ShiftMask, "\033[2;2~", +1, 0},
{ XK_KP_Insert, ShiftMask, "\033[4l", -1, 0},
{ XK_KP_Insert, ControlMask, "\033[L", -1, 0},
{ XK_KP_Insert, ControlMask, "\033[2;5~", +1, 0},
{ XK_KP_Insert, XK_ANY_MOD, "\033[4h", -1, 0},
{ XK_KP_Insert, XK_ANY_MOD, "\033[2~", +1, 0},
{ XK_KP_Delete, ControlMask, "\033[M", -1, 0},
{ XK_KP_Delete, ControlMask, "\033[3;5~", +1, 0},
{ XK_KP_Delete, ShiftMask, "\033[2K", -1, 0},
{ XK_KP_Delete, ShiftMask, "\033[3;2~", +1, 0},
{ XK_KP_Delete, XK_ANY_MOD, "\033[P", -1, 0},
{ XK_KP_Delete, XK_ANY_MOD, "\033[3~", +1, 0},
{ XK_KP_Multiply, XK_ANY_MOD, "\033Oj", +2, 0},
{ XK_KP_Add, XK_ANY_MOD, "\033Ok", +2, 0},
{ XK_KP_Enter, XK_ANY_MOD, "\033OM", +2, 0},
{ XK_KP_Enter, XK_ANY_MOD, "\r", -1, 0},
{ XK_KP_Subtract, XK_ANY_MOD, "\033Om", +2, 0},
{ XK_KP_Decimal, XK_ANY_MOD, "\033On", +2, 0},
{ XK_KP_Divide, XK_ANY_MOD, "\033Oo", +2, 0},
{ XK_KP_0, XK_ANY_MOD, "\033Op", +2, 0},
{ XK_KP_1, XK_ANY_MOD, "\033Oq", +2, 0},
{ XK_KP_2, XK_ANY_MOD, "\033Or", +2, 0},
{ XK_KP_3, XK_ANY_MOD, "\033Os", +2, 0},
{ XK_KP_4, XK_ANY_MOD, "\033Ot", +2, 0},
{ XK_KP_5, XK_ANY_MOD, "\033Ou", +2, 0},
{ XK_KP_6, XK_ANY_MOD, "\033Ov", +2, 0},
{ XK_KP_7, XK_ANY_MOD, "\033Ow", +2, 0},
{ XK_KP_8, XK_ANY_MOD, "\033Ox", +2, 0},
{ XK_KP_9, XK_ANY_MOD, "\033Oy", +2, 0},
{ XK_Up, ShiftMask, "\033[1;2A", 0, 0},
{ XK_Up, Mod1Mask, "\033[1;3A", 0, 0},
{ XK_Up, ShiftMask|Mod1Mask,"\033[1;4A", 0, 0},
{ XK_Up, ControlMask, "\033[1;5A", 0, 0},
{ XK_Up, ShiftMask|ControlMask,"\033[1;6A", 0, 0},
{ XK_Up, ControlMask|Mod1Mask,"\033[1;7A", 0, 0},
{ XK_Up,ShiftMask|ControlMask|Mod1Mask,"\033[1;8A", 0, 0},
{ XK_Up, XK_ANY_MOD, "\033[A", 0, -1},
{ XK_Up, XK_ANY_MOD, "\033OA", 0, +1},
{ XK_Down, ShiftMask, "\033[1;2B", 0, 0},
{ XK_Down, Mod1Mask, "\033[1;3B", 0, 0},
{ XK_Down, ShiftMask|Mod1Mask,"\033[1;4B", 0, 0},
{ XK_Down, ControlMask, "\033[1;5B", 0, 0},
{ XK_Down, ShiftMask|ControlMask,"\033[1;6B", 0, 0},
{ XK_Down, ControlMask|Mod1Mask,"\033[1;7B", 0, 0},
{ XK_Down,ShiftMask|ControlMask|Mod1Mask,"\033[1;8B",0, 0},
{ XK_Down, XK_ANY_MOD, "\033[B", 0, -1},
{ XK_Down, XK_ANY_MOD, "\033OB", 0, +1},
{ XK_Left, ShiftMask, "\033[1;2D", 0, 0},
{ XK_Left, Mod1Mask, "\033[1;3D", 0, 0},
{ XK_Left, ShiftMask|Mod1Mask,"\033[1;4D", 0, 0},
{ XK_Left, ControlMask, "\033[1;5D", 0, 0},
{ XK_Left, ShiftMask|ControlMask,"\033[1;6D", 0, 0},
{ XK_Left, ControlMask|Mod1Mask,"\033[1;7D", 0, 0},
{ XK_Left,ShiftMask|ControlMask|Mod1Mask,"\033[1;8D",0, 0},
{ XK_Left, XK_ANY_MOD, "\033[D", 0, -1},
{ XK_Left, XK_ANY_MOD, "\033OD", 0, +1},
{ XK_Right, ShiftMask, "\033[1;2C", 0, 0},
{ XK_Right, Mod1Mask, "\033[1;3C", 0, 0},
{ XK_Right, ShiftMask|Mod1Mask,"\033[1;4C", 0, 0},
{ XK_Right, ControlMask, "\033[1;5C", 0, 0},
{ XK_Right, ShiftMask|ControlMask,"\033[1;6C", 0, 0},
{ XK_Right, ControlMask|Mod1Mask,"\033[1;7C", 0, 0},
{ XK_Right,ShiftMask|ControlMask|Mod1Mask,"\033[1;8C",0, 0},
{ XK_Right, XK_ANY_MOD, "\033[C", 0, -1},
{ XK_Right, XK_ANY_MOD, "\033OC", 0, +1},
{ XK_ISO_Left_Tab, ShiftMask, "\033[Z", 0, 0},
{ XK_Return, Mod1Mask, "\033\r", 0, 0},
{ XK_Return, XK_ANY_MOD, "\r", 0, 0},
{ XK_Insert, ShiftMask, "\033[4l", -1, 0},
{ XK_Insert, ShiftMask, "\033[2;2~", +1, 0},
{ XK_Insert, ControlMask, "\033[L", -1, 0},
{ XK_Insert, ControlMask, "\033[2;5~", +1, 0},
{ XK_Insert, XK_ANY_MOD, "\033[4h", -1, 0},
{ XK_Insert, XK_ANY_MOD, "\033[2~", +1, 0},
{ XK_Delete, ControlMask, "\033[M", -1, 0},
{ XK_Delete, ControlMask, "\033[3;5~", +1, 0},
{ XK_Delete, ShiftMask, "\033[2K", -1, 0},
{ XK_Delete, ShiftMask, "\033[3;2~", +1, 0},
{ XK_Delete, XK_ANY_MOD, "\033[P", -1, 0},
{ XK_Delete, XK_ANY_MOD, "\033[3~", +1, 0},
{ XK_BackSpace, XK_NO_MOD, "\177", 0, 0},
{ XK_BackSpace, Mod1Mask, "\033\177", 0, 0},
{ XK_Home, ShiftMask, "\033[2J", 0, -1},
{ XK_Home, ShiftMask, "\033[1;2H", 0, +1},
{ XK_Home, XK_ANY_MOD, "\033[H", 0, -1},
{ XK_Home, XK_ANY_MOD, "\033[1~", 0, +1},
{ XK_End, ControlMask, "\033[J", -1, 0},
{ XK_End, ControlMask, "\033[1;5F", +1, 0},
{ XK_End, ShiftMask, "\033[K", -1, 0},
{ XK_End, ShiftMask, "\033[1;2F", +1, 0},
{ XK_End, XK_ANY_MOD, "\033[4~", 0, 0},
{ XK_Prior, ControlMask, "\033[5;5~", 0, 0},
{ XK_Prior, ShiftMask, "\033[5;2~", 0, 0},
{ XK_Prior, XK_ANY_MOD, "\033[5~", 0, 0},
{ XK_Next, ControlMask, "\033[6;5~", 0, 0},
{ XK_Next, ShiftMask, "\033[6;2~", 0, 0},
{ XK_Next, XK_ANY_MOD, "\033[6~", 0, 0},
{ XK_F1, XK_NO_MOD, "\033OP" , 0, 0},
{ XK_F1, /* F13 */ ShiftMask, "\033[1;2P", 0, 0},
{ XK_F1, /* F25 */ ControlMask, "\033[1;5P", 0, 0},
{ XK_F1, /* F37 */ Mod4Mask, "\033[1;6P", 0, 0},
{ XK_F1, /* F49 */ Mod1Mask, "\033[1;3P", 0, 0},
{ XK_F1, /* F61 */ Mod3Mask, "\033[1;4P", 0, 0},
{ XK_F2, XK_NO_MOD, "\033OQ" , 0, 0},
{ XK_F2, /* F14 */ ShiftMask, "\033[1;2Q", 0, 0},
{ XK_F2, /* F26 */ ControlMask, "\033[1;5Q", 0, 0},
{ XK_F2, /* F38 */ Mod4Mask, "\033[1;6Q", 0, 0},
{ XK_F2, /* F50 */ Mod1Mask, "\033[1;3Q", 0, 0},
{ XK_F2, /* F62 */ Mod3Mask, "\033[1;4Q", 0, 0},
{ XK_F3, XK_NO_MOD, "\033OR" , 0, 0},
{ XK_F3, /* F15 */ ShiftMask, "\033[1;2R", 0, 0},
{ XK_F3, /* F27 */ ControlMask, "\033[1;5R", 0, 0},
{ XK_F3, /* F39 */ Mod4Mask, "\033[1;6R", 0, 0},
{ XK_F3, /* F51 */ Mod1Mask, "\033[1;3R", 0, 0},
{ XK_F3, /* F63 */ Mod3Mask, "\033[1;4R", 0, 0},
{ XK_F4, XK_NO_MOD, "\033OS" , 0, 0},
{ XK_F4, /* F16 */ ShiftMask, "\033[1;2S", 0, 0},
{ XK_F4, /* F28 */ ControlMask, "\033[1;5S", 0, 0},
{ XK_F4, /* F40 */ Mod4Mask, "\033[1;6S", 0, 0},
{ XK_F4, /* F52 */ Mod1Mask, "\033[1;3S", 0, 0},
{ XK_F5, XK_NO_MOD, "\033[15~", 0, 0},
{ XK_F5, /* F17 */ ShiftMask, "\033[15;2~", 0, 0},
{ XK_F5, /* F29 */ ControlMask, "\033[15;5~", 0, 0},
{ XK_F5, /* F41 */ Mod4Mask, "\033[15;6~", 0, 0},
{ XK_F5, /* F53 */ Mod1Mask, "\033[15;3~", 0, 0},
{ XK_F6, XK_NO_MOD, "\033[17~", 0, 0},
{ XK_F6, /* F18 */ ShiftMask, "\033[17;2~", 0, 0},
{ XK_F6, /* F30 */ ControlMask, "\033[17;5~", 0, 0},
{ XK_F6, /* F42 */ Mod4Mask, "\033[17;6~", 0, 0},
{ XK_F6, /* F54 */ Mod1Mask, "\033[17;3~", 0, 0},
{ XK_F7, XK_NO_MOD, "\033[18~", 0, 0},
{ XK_F7, /* F19 */ ShiftMask, "\033[18;2~", 0, 0},
{ XK_F7, /* F31 */ ControlMask, "\033[18;5~", 0, 0},
{ XK_F7, /* F43 */ Mod4Mask, "\033[18;6~", 0, 0},
{ XK_F7, /* F55 */ Mod1Mask, "\033[18;3~", 0, 0},
{ XK_F8, XK_NO_MOD, "\033[19~", 0, 0},
{ XK_F8, /* F20 */ ShiftMask, "\033[19;2~", 0, 0},
{ XK_F8, /* F32 */ ControlMask, "\033[19;5~", 0, 0},
{ XK_F8, /* F44 */ Mod4Mask, "\033[19;6~", 0, 0},
{ XK_F8, /* F56 */ Mod1Mask, "\033[19;3~", 0, 0},
{ XK_F9, XK_NO_MOD, "\033[20~", 0, 0},
{ XK_F9, /* F21 */ ShiftMask, "\033[20;2~", 0, 0},
{ XK_F9, /* F33 */ ControlMask, "\033[20;5~", 0, 0},
{ XK_F9, /* F45 */ Mod4Mask, "\033[20;6~", 0, 0},
{ XK_F9, /* F57 */ Mod1Mask, "\033[20;3~", 0, 0},
{ XK_F10, XK_NO_MOD, "\033[21~", 0, 0},
{ XK_F10, /* F22 */ ShiftMask, "\033[21;2~", 0, 0},
{ XK_F10, /* F34 */ ControlMask, "\033[21;5~", 0, 0},
{ XK_F10, /* F46 */ Mod4Mask, "\033[21;6~", 0, 0},
{ XK_F10, /* F58 */ Mod1Mask, "\033[21;3~", 0, 0},
{ XK_F11, XK_NO_MOD, "\033[23~", 0, 0},
{ XK_F11, /* F23 */ ShiftMask, "\033[23;2~", 0, 0},
{ XK_F11, /* F35 */ ControlMask, "\033[23;5~", 0, 0},
{ XK_F11, /* F47 */ Mod4Mask, "\033[23;6~", 0, 0},
{ XK_F11, /* F59 */ Mod1Mask, "\033[23;3~", 0, 0},
{ XK_F12, XK_NO_MOD, "\033[24~", 0, 0},
{ XK_F12, /* F24 */ ShiftMask, "\033[24;2~", 0, 0},
{ XK_F12, /* F36 */ ControlMask, "\033[24;5~", 0, 0},
{ XK_F12, /* F48 */ Mod4Mask, "\033[24;6~", 0, 0},
{ XK_F12, /* F60 */ Mod1Mask, "\033[24;3~", 0, 0},
{ XK_F13, XK_NO_MOD, "\033[1;2P", 0, 0},
{ XK_F14, XK_NO_MOD, "\033[1;2Q", 0, 0},
{ XK_F15, XK_NO_MOD, "\033[1;2R", 0, 0},
{ XK_F16, XK_NO_MOD, "\033[1;2S", 0, 0},
{ XK_F17, XK_NO_MOD, "\033[15;2~", 0, 0},
{ XK_F18, XK_NO_MOD, "\033[17;2~", 0, 0},
{ XK_F19, XK_NO_MOD, "\033[18;2~", 0, 0},
{ XK_F20, XK_NO_MOD, "\033[19;2~", 0, 0},
{ XK_F21, XK_NO_MOD, "\033[20;2~", 0, 0},
{ XK_F22, XK_NO_MOD, "\033[21;2~", 0, 0},
{ XK_F23, XK_NO_MOD, "\033[23;2~", 0, 0},
{ XK_F24, XK_NO_MOD, "\033[24;2~", 0, 0},
{ XK_F25, XK_NO_MOD, "\033[1;5P", 0, 0},
{ XK_F26, XK_NO_MOD, "\033[1;5Q", 0, 0},
{ XK_F27, XK_NO_MOD, "\033[1;5R", 0, 0},
{ XK_F28, XK_NO_MOD, "\033[1;5S", 0, 0},
{ XK_F29, XK_NO_MOD, "\033[15;5~", 0, 0},
{ XK_F30, XK_NO_MOD, "\033[17;5~", 0, 0},
{ XK_F31, XK_NO_MOD, "\033[18;5~", 0, 0},
{ XK_F32, XK_NO_MOD, "\033[19;5~", 0, 0},
{ XK_F33, XK_NO_MOD, "\033[20;5~", 0, 0},
{ XK_F34, XK_NO_MOD, "\033[21;5~", 0, 0},
{ XK_F35, XK_NO_MOD, "\033[23;5~", 0, 0},
};
/*
* Selection types' masks.
* Use the same masks as usual.
* Button1Mask is always unset, to make masks match between ButtonPress.
* ButtonRelease and MotionNotify.
* If no match is found, regular selection is used.
*/
static uint selmasks[] = {
[SEL_RECTANGULAR] = Mod1Mask,
};
/*
* Printable characters in ASCII, used to estimate the advance width
* of single wide characters.
*/
static char ascii_printable[] =
" !\"#$%&'()*+,-./0123456789:;<=>?"
"@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_"
"`abcdefghijklmnopqrstuvwxyz{|}~";

View File

@ -0,0 +1,182 @@
/* See LICENSE file for copyright and license details. */
#include <X11/XF86keysym.h>
/* appearance */
static const unsigned int borderpx = 1; /* border pixel of windows */
static const unsigned int snap = 32; /* snap pixel */
static const int showbar = 1; /* 0 means no bar */
static const int topbar = 1; /* 0 means bottom bar */
static const char *fonts[] = { "mononoki:size=9:style=Regular" };
static const char dmenufont[] = "mononoki:size=9:style=Bold";
static const char col1[] = "#000000";
static const char col2[] = "#353535";
static const char col3[] = "#777777";
static const char col4[] = "#ffffff";
static const char col5[] = "#535353";
static const char *colors[][3] = {
/* fg bg border */
[SchemeNorm] = { col4, col1, col2 },
[SchemeSel] = { col4, col1, col5 },
};
/* tagging */
static const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" };
static const char *tagsel[][2] = {
{ "#000000", "#ffffff" },
{ "#000000", "#ffffff" },
{ "#000000", "#ffffff" },
{ "#000000", "#ffffff" },
{ "#000000", "#ffffff" },
{ "#000000", "#ffffff" },
{ "#000000", "#ffffff" },
{ "#000000", "#ffffff" },
{ "#000000", "#ffffff" },
};
static const Rule rules[] = {
/* xprop(1):
* WM_CLASS(STRING) = instance, class
* WM_NAME(STRING) = title
*/
/* class instance title tags mask isfloating monitor */
{ "Gimp", NULL, NULL, 0, 0, -1 },
};
/* layout(s) */
static const float mfact = 0.55; /* factor of master area size [0.05..0.95] */
static const int nmaster = 1; /* number of clients in master area */
static const int resizehints = 0; /* 1 means respect size hints in tiled resizals */
static const int lockfullscreen = 1; /* 1 will force focus on the fullscreen window */
static const Layout layouts[] = {
/* symbol arrange function */
{ "[]=", tile }, /* first entry is default */
{ "><>", NULL }, /* no layout function means floating behavior */
{ "[M]", monocle },
};
/* key definitions */
#define MODKEY Mod4Mask
#define TAGKEYS(KEY,TAG) \
{ MODKEY, KEY, view, {.ui = 1 << TAG} }, \
{ MODKEY|ControlMask, KEY, toggleview, {.ui = 1 << TAG} }, \
{ MODKEY|ShiftMask, KEY, tag, {.ui = 1 << TAG} }, \
{ MODKEY|ControlMask|ShiftMask, KEY, toggletag, {.ui = 1 << TAG} },
/* helper for spawning shell commands in the pre dwm-5.0 fashion */
#define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } }
/* commands */
static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */
static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, "-fn", dmenufont, "-nb", col1, "-nf", col3, "-sb", col1, "-sf", col4, NULL };
static const char scratchpadname[] = "scratchpad";
static const char *termcmd[] = { "st", NULL };
static const char *scratchpadcmd[] = { "st", "-t", scratchpadname, "-g", "120x34", NULL };
static const char *nnncmd[] = { "st","-t", "nnn - Gestor de archivos", "-e", "nnn", NULL };
/*
*static const char *termcmd[] = { "urxvtc", NULL };
*static const char *scratchpadcmd[] = { "urxvtc", "-name", scratchpadname, "-geometry", "120x34", NULL };
*static const char *nnncmd[] = { "urxvtc","-title", "nnn - Gestor de archivos", "-e", "nnn", NULL };
*/
static const char *upvol[] = { "amixer", "-q","sset","Master","1%+", NULL };
static const char *downvol[] = { "amixer", "-q","sset","Master","1%-", NULL };
static const char *mute[] = { "amixer", "set", "Master", "toggle", NULL };
static const char *dmenurecord[] = { "/home/luis/.local/bin/grabar.sh", NULL };
static const char *dmenuapagar[] = { "/home/luis/.local/bin/sesion.sh", NULL };
static const char *upbright[] = { "light", "-A", "5", NULL };
static const char *downbright[] = { "light","-U", "5", NULL };
static Key keys[] = {
/* modifier key function argument */
{ MODKEY, XK_d, spawn, {.v = dmenucmd } },
{ MODKEY|ShiftMask, XK_Return, spawn, {.v = termcmd } },
{ MODKEY, XK_s, togglescratch, {.v = scratchpadcmd } },
{ MODKEY, XK_b, togglebar, {0} },
{ MODKEY|ShiftMask, XK_j, rotatestack, {.i = +1 } },
{ MODKEY|ShiftMask, XK_k, rotatestack, {.i = -1 } },
{ MODKEY, XK_j, focusstack, {.i = +1 } },
{ MODKEY, XK_k, focusstack, {.i = -1 } },
{ MODKEY, XK_i, incnmaster, {.i = +1 } },
{ MODKEY, XK_u, incnmaster, {.i = -1 } },
{ MODKEY, XK_h, setmfact, {.f = -0.05} },
{ MODKEY, XK_l, setmfact, {.f = +0.05} },
{ MODKEY, XK_Return, zoom, {0} },
{ MODKEY, XK_Tab, view, {0} },
{ MODKEY|ShiftMask, XK_q, killclient, {0} },
{ MODKEY, XK_t, setlayout, {.v = &layouts[0]} },
{ MODKEY, XK_f, setlayout, {.v = &layouts[1]} },
{ MODKEY, XK_m, setlayout, {.v = &layouts[2]} },
{ MODKEY, XK_space, setlayout, {0} },
{ MODKEY|ShiftMask, XK_space, togglefloating, {0} },
{ MODKEY, XK_0, view, {.ui = ~0 } },
{ MODKEY|ShiftMask, XK_0, tag, {.ui = ~0 } },
{ MODKEY, XK_comma, focusmon, {.i = -1 } },
{ MODKEY, XK_period, focusmon, {.i = +1 } },
{ MODKEY|ShiftMask, XK_comma, tagmon, {.i = -1 } },
{ MODKEY|ShiftMask, XK_period, tagmon, {.i = +1 } },
TAGKEYS( XK_1, 0)
TAGKEYS( XK_2, 1)
TAGKEYS( XK_3, 2)
TAGKEYS( XK_4, 3)
TAGKEYS( XK_5, 4)
TAGKEYS( XK_6, 5)
TAGKEYS( XK_7, 6)
TAGKEYS( XK_8, 7)
TAGKEYS( XK_9, 8)
{ MODKEY|ShiftMask, XK_e, quit, {0} },
/* Modos de captura de pantalla */
{ 0, XK_Print, spawn, SHCMD("scrot /tmp/'%F_%T.png' -e 'xclip -selection c -t image/png < $f'; sleep 1; exec herbe 'Pantalla en portapapeles'") }, // Captura de pantalla al portapapeles
{ ControlMask, XK_Print, spawn, SHCMD("scrot -u /tmp/'%F_%T.png' -e 'xclip -selection c -t image/png < $f'; sleep 1; exec herbe 'Ventana en portapapeles'") }, // Ventana seleccionada al portapapeles
{ ShiftMask, XK_Print, spawn, SHCMD("sleep 1; scrot -s /tmp/'%F_%T.png' -e 'xclip -selection c -t image/png < $f'; sleep 1; exec herbe 'Área en portapapeles'") }, // Area seleccionada al portapapeles
{ MODKEY, XK_Print, spawn, SHCMD("scrot 'c_%F_%H%M%S_$wx$h.png' -e 'mv $f /home/luis/Capturas/'; sleep 1; exec herbe 'Pantalla en ~/Capturas'") },//Captura de pantalla
{ MODKEY|ControlMask, XK_Print, spawn, SHCMD("scrot -u 'v_%F_%H%M%S_$wx$h.png' -e 'mv $f /home/luis/Capturas/'; sleep 1; exec herbe 'Ventana en ~/Capturas'") },//Captura de ventana
{ MODKEY|ShiftMask, XK_Print, spawn, SHCMD("sleep 1; scrot -s 'a_%F_%H%M%S_$wx$h.png' -e 'mv $f /home/luis/Capturas/'; exec herbe 'Área en ~/Capturas'") },//Captura de Area
/* Atajos multimedia */
/*
{ 0, XF86XK_AudioPlay, spawn, SHCMD("mpc toggle") },
{ 0, XF86XK_AudioPrev, spawn, SHCMD("mpc prev") },
{ 0, XF86XK_AudioNext, spawn, SHCMD("mpc next") },
{ 0, XF86XK_AudioStop, spawn, SHCMD("mpc stop") },
*/
{ 0, XF86XK_AudioMute, spawn, {.v = mute } },
{ 0, XF86XK_AudioLowerVolume, spawn, {.v = downvol } },
{ 0, XF86XK_AudioRaiseVolume, spawn, {.v = upvol } },
{ MODKEY, XK_F10, spawn, {.v = upvol } },
{ MODKEY, XK_F9, spawn, {.v = downvol } },
{ MODKEY, XK_F11, spawn, {.v = mute } },
/* Ajustar brillo de la pantalla */
{ 0, XF86XK_MonBrightnessUp, spawn, {.v = upbright} },
{ 0, XF86XK_MonBrightnessDown, spawn, {.v = downbright } },
{ MODKEY, XK_F6, spawn, {.v = upbright } },
{ MODKEY, XK_F5, spawn, {.v = downbright } },
/* Comandos personalizados */
{ MODKEY, XK_z, spawn, {.v = nnncmd } },
{ MODKEY, XK_v, spawn, {.v = dmenurecord } },
{ MODKEY, XK_x, spawn, {.v = dmenuapagar } },
};
/* button definitions */
/* click can be ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */
static Button buttons[] = {
/* click event mask button function argument */
{ ClkLtSymbol, 0, Button1, setlayout, {0} },
{ ClkLtSymbol, 0, Button3, setlayout, {.v = &layouts[2]} },
{ ClkWinTitle, 0, Button2, zoom, {0} },
{ ClkStatusText, 0, Button2, spawn, {.v = termcmd } },
{ ClkClientWin, MODKEY, Button1, movemouse, {0} },
{ ClkClientWin, MODKEY, Button2, togglefloating, {0} },
{ ClkClientWin, MODKEY, Button3, resizemouse, {0} },
{ ClkTagBar, 0, Button1, view, {0} },
{ ClkTagBar, 0, Button3, toggleview, {0} },
{ ClkTagBar, MODKEY, Button1, tag, {0} },
{ ClkTagBar, MODKEY, Button3, toggletag, {0} },
};

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,3 @@
DIST nnn-4.3.tar.gz 236606 BLAKE2B cec0a73a40fae76e478c3299e2ae8a613c2e1b16e009d4f69cc3c9c9f6ea5df4048fc7f941ae6369293cf56df9b91a496531f4b34bf05f1dbbf8fab9120ffe78 SHA512 588af174d86db14acf5d1e2ac42f88ca5c6f0e105996a58771e7e0f989f224616e7a12d74fecc96540a9782db0cf8857c21bf0f50df4ee3b4b5c641291c64575
EBUILD nnn-4.3.ebuild 823 BLAKE2B 67b992b610c0b55b6fa4043ff7295c9aea1fa74274f4fc4930900e93847a61c7607d2bc4b059a293ff71304979ee557be574c47319b2581f1319cb6162a3841a SHA512 7b576713874aeb9a8b211b6b5672b8b1b71494e2232232ab437b902a7281406d428a1ead44ffbdcf2e48039952eaa1abbafa22e8f3491b069e37ba4276a8ee2c
EBUILD nnn-9999.ebuild 1147 BLAKE2B bb36770e4c46acaf1d924afaed89240dc2d194208fc92da8437a92f6f50d26579a6086ac2e929fbda696a1b157a505d207d73daa29b93d54427327b21d0e6a1b SHA512 67584e8ad929762fa1303167e413d7d1bbe91d84b7b2cc9f50e6d6579d9047738202256c45141bde646821f9fa3d23bdbed81d355b4a95fdb0a63ca3dd27b82e

View File

@ -0,0 +1,42 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit bash-completion-r1 toolchain-funcs xdg-utils
DESCRIPTION="The missing terminal file browser for X"
HOMEPAGE="https://github.com/jarun/nnn"
SRC_URI="https://github.com/jarun/nnn/archive/v${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="BSD-2"
SLOT="0"
KEYWORDS="~amd64 ~ppc64 ~x86"
DEPEND="sys-libs/ncurses:0=
sys-libs/readline:0="
RDEPEND="${DEPEND}"
src_prepare() {
default
tc-export CC
sed -i -e '/install: all/install:/' Makefile || die "sed failed"
}
src_install() {
emake PREFIX="${EPREFIX}/usr" DESTDIR="${D}" install
emake PREFIX="${EPREFIX}/usr" DESTDIR="${D}" install-desktop
einstalldocs
}
pkg_postinst() {
xdg_desktop_database_update
}
pkg_postrm() {
xdg_desktop_database_update
}

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