Updated
This commit is contained in:
parent
f50de2c3f3
commit
0be8c55a79
37 changed files with 763 additions and 479 deletions
|
@ -1,2 +0,0 @@
|
|||
# ~/.bash_logout
|
||||
clear
|
|
@ -20,18 +20,15 @@ export INPUTRC="$HOME/.config/X11/inputrc"
|
|||
export GNUPGHOME="$HOME/.local/share/gnupg"
|
||||
export LESSHISTFILE="-"
|
||||
export BASHRC="$HOME/.bashrc"
|
||||
export GOPATH="$HOME/.go"
|
||||
|
||||
# Default apps
|
||||
export TERMINAL="st"
|
||||
export EDITOR="$HOME/.local/bin/lvim"
|
||||
export VISUAL="st -n editor -c editor -e $EDITOR"
|
||||
export BROWSER="flatpak run com.brave.Browser"
|
||||
export BROWSER="brave"
|
||||
export VIEWER="zathura"
|
||||
|
||||
# Dev Tools Envs
|
||||
export GOPATH="$HOME/.go"
|
||||
export DOTNET_ROOT="$HOME/.dotnet"
|
||||
|
||||
# Set path
|
||||
if [ -d "$HOME/.bin" ]; then
|
||||
PATH="$HOME/.bin:$PATH"
|
||||
|
@ -42,35 +39,37 @@ fi
|
|||
if [ -d "$HOME/.cargo/bin" ]; then
|
||||
PATH="$HOME/.cargo/bin:$PATH"
|
||||
fi
|
||||
if [ -d "$GOPATH/bin" ]; then
|
||||
PATH="$GOPATH/bin:$PATH"
|
||||
fi
|
||||
if [ -d "$HOME/.local/lib/flutter/bin" ]; then
|
||||
PATH="$HOME/.local/lib/flutter/bin:$PATH"
|
||||
fi
|
||||
if [ -d $HOME/.dotnet/tools ]; then
|
||||
PATH="$HOME/.dotnet/tools:$PATH"
|
||||
fi
|
||||
if [ -d "$HOME/Applications" ]; then
|
||||
PATH="$HOME/Applications:$PATH"
|
||||
fi
|
||||
if [ -d "$HOME/.go/bin" ]; then
|
||||
PATH="$HOME/.go/bin:$PATH"
|
||||
fi
|
||||
if [ -d $XDG_DATA_HOME/JetBrains/Toolbox/scripts ]; then
|
||||
if [ -d "$XDG_DATA_HOME/JetBrains/Toolbox/scripts" ]; then
|
||||
PATH="$XDG_DATA_HOME/JetBrains/Toolbox/scripts:$PATH"
|
||||
fi
|
||||
if [ -d $HOME/.dotnet/ ]; then
|
||||
PATH="$HOME/.dotnet/:$PATH"
|
||||
fi
|
||||
if [ -d $HOME/.dotnet/tools/ ]; then
|
||||
PATH="$HOME/.dotnet/tools/:$PATH"
|
||||
fi
|
||||
if [ -d "$HOME/.flutter/bin" ]; then
|
||||
PATH="$HOME/.flutter/bin/:$PATH"
|
||||
if [ -d "$HOME/.config/vifm/scripts" ]; then
|
||||
PATH="$HOME/.config/vifm/scripts:$PATH"
|
||||
fi
|
||||
|
||||
# Bashrc
|
||||
source "$BASHRC"
|
||||
# export SSH_AUTH_SOCK
|
||||
if [[ -z "${SSH_CONNECTION}" ]]; then
|
||||
export SSH_AUTH_SOCK="$XDG_RUNTIME_DIR/ssh-agent.socket"
|
||||
fi
|
||||
|
||||
# Create config directories if they don't exist
|
||||
if [ ! -d "$WGETDIR" ] || [ ! -d "$GNUPGHOME" ]; then
|
||||
mkdir -p "$WGETDIR" "$GNUPGHOME"
|
||||
fi
|
||||
if [ ! -f "$WGETRC" ]; then
|
||||
touch "$WGETRC"
|
||||
fi
|
||||
|
||||
# Bashrc
|
||||
source "$BASHRC"
|
||||
|
||||
# Starting xsession
|
||||
if [ -z "$DISPLAY" ] && [ "$(tty)" = "/dev/tty1" ]; then
|
||||
|
|
|
@ -3,7 +3,7 @@ export TERM="xterm-256color" # getting proper colors
|
|||
export HISTCONTROL=ignoredups:erasedups # no duplicate entries
|
||||
|
||||
### "bat" as manpager
|
||||
export MANPAGER="bat -p"
|
||||
export MANPAGER="sh -c 'sed -u -e \"s/\\x1B\[[0-9;]*m//g; s/.\\x08//g\" | bat -p -lman'"
|
||||
|
||||
# use bash-completion, if available
|
||||
[[ $PS1 && -f /usr/share/bash-completion/bash_completion ]] && \
|
||||
|
@ -128,11 +128,12 @@ fi
|
|||
|
||||
# function to detect os and assign aliases to package managers
|
||||
alias \
|
||||
pkg-update="sudo xbps-install -Su" \
|
||||
pkg-install="sudo xbps-install -S" \
|
||||
pkg-remove="sudo xbps-remove -R" \
|
||||
pkg-autoremove="sudo xbps-remove -Oo" \
|
||||
pkg-search="sudo xbps-query -s" \
|
||||
pkg-update="paru -Syyu" \
|
||||
pkg-install="paru -S" \
|
||||
pkg-remove="paru -Rcns" \
|
||||
pkg-remove-sec="paru -R" \
|
||||
pkg-autoremove="paru -Scc && paru -Rns (pacman -Qtdq)" \
|
||||
pkg-search="paru -Ss"
|
||||
|
||||
# colorize grep output (good for log files)
|
||||
alias \
|
||||
|
@ -210,10 +211,6 @@ alias \
|
|||
yt="ytfzf -ftsl" \
|
||||
ytm="ytfzf -mtsl"
|
||||
|
||||
# distrobox
|
||||
alias \
|
||||
dv="distrobox enter devbox"
|
||||
|
||||
# network and bluetooth
|
||||
alias \
|
||||
netstats="nmcli dev" \
|
||||
|
@ -224,6 +221,76 @@ alias \
|
|||
wfi-off="nmcli radio wifi off" \
|
||||
blt="bluetoothctl"
|
||||
|
||||
# Automatically add completion for all aliases to commands having completion functions
|
||||
# this currently slows startup a bit, but it isn't terrible
|
||||
function alias_completion {
|
||||
local namespace="alias_completion"
|
||||
|
||||
# parse function based completion definitions, where capture group 2 => function and 3 => trigger
|
||||
local compl_regex='complete( +[^ ]+)* -F ([^ ]+) ("[^"]+"|[^ ]+)'
|
||||
# parse alias definitions, where capture group 1 => trigger, 2 => command, 3 => command arguments
|
||||
local alias_regex="alias ([^=]+)='(\"[^\"]+\"|[^ ]+)(( +[^ ]+)*)'"
|
||||
|
||||
# create array of function completion triggers, keeping multi-word triggers together
|
||||
eval "local completions=($(complete -p | sed -Ene "/$compl_regex/s//'\3'/p"))"
|
||||
(( ${#completions[@]} == 0 )) && return 0
|
||||
|
||||
# create temporary file for wrapper functions and completions
|
||||
command rm -f "/tmp/${namespace}-*.tmp" &> /dev/null # preliminary cleanup
|
||||
local tmp_file; tmp_file="$(mktemp "/tmp/${namespace}-${RANDOM}XXX.tmp")" || return 1
|
||||
|
||||
local completion_loader; completion_loader="$(complete -p -D 2>/dev/null | sed -Ene 's/.* -F ([^ ]*).*/\1/p')"
|
||||
|
||||
# read in "<alias> '<aliased command>' '<command args>'" lines from defined aliases
|
||||
local line; while read line; do
|
||||
eval "local alias_tokens; alias_tokens=($line)" 2>/dev/null || continue # some alias arg patterns cause an eval parse error
|
||||
local alias_name="${alias_tokens[0]}" alias_cmd="${alias_tokens[1]}" alias_args="${alias_tokens[2]# }"
|
||||
|
||||
# skip aliases to pipes, boolean control structures and other command lists
|
||||
# (leveraging that eval errs out if $alias_args contains unquoted shell metacharacters)
|
||||
eval "local alias_arg_words; alias_arg_words=($alias_args)" 2>/dev/null || continue
|
||||
# avoid expanding wildcards
|
||||
read -a alias_arg_words <<< "$alias_args"
|
||||
|
||||
# skip alias if there is no completion function triggered by the aliased command
|
||||
if [[ ! " ${completions[*]} " =~ " $alias_cmd " ]]; then
|
||||
if [[ -n "$completion_loader" ]]; then
|
||||
# force loading of completions for the aliased command
|
||||
eval "$completion_loader $alias_cmd"
|
||||
# 124 means completion loader was successful
|
||||
[[ $? -eq 124 ]] || continue
|
||||
completions+=($alias_cmd)
|
||||
else
|
||||
continue
|
||||
fi
|
||||
fi
|
||||
local new_completion="$(complete -p "$alias_cmd")"
|
||||
|
||||
# create a wrapper inserting the alias arguments if any
|
||||
if [[ -n $alias_args ]]; then
|
||||
local compl_func="${new_completion/#* -F /}"; compl_func="${compl_func%% *}"
|
||||
# avoid recursive call loops by ignoring our own functions
|
||||
if [[ "${compl_func#_$namespace::}" == $compl_func ]]; then
|
||||
local compl_wrapper="_${namespace}::${alias_name}"
|
||||
echo "function $compl_wrapper {
|
||||
(( COMP_CWORD += ${#alias_arg_words[@]} ))
|
||||
COMP_WORDS=($alias_cmd $alias_args \${COMP_WORDS[@]:1})
|
||||
(( COMP_POINT -= \${#COMP_LINE} ))
|
||||
COMP_LINE=\${COMP_LINE/$alias_name/$alias_cmd $alias_args}
|
||||
(( COMP_POINT += \${#COMP_LINE} ))
|
||||
$compl_func
|
||||
}" >> "$tmp_file"
|
||||
new_completion="${new_completion/ -F $compl_func / -F $compl_wrapper }"
|
||||
fi
|
||||
fi
|
||||
|
||||
# replace completion trigger by alias
|
||||
new_completion="${new_completion% *} $alias_name"
|
||||
echo "$new_completion" >> "$tmp_file"
|
||||
done < <(alias -p | sed -Ene "s/$alias_regex/\1 '\2' '\3'/p")
|
||||
source "$tmp_file" && command rm -f "$tmp_file" &> /dev/null
|
||||
}; alias_completion
|
||||
|
||||
### PROMPT
|
||||
# get current branch in git repo
|
||||
function parse_git_branch() {
|
||||
|
@ -283,11 +350,3 @@ function parse_git_dirty {
|
|||
}
|
||||
|
||||
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\]] "
|
||||
|
||||
export SSH_AUTH_SOCK=${HOME}/.ssh/agent
|
||||
if ! pgrep -u ${USER} ssh-agent > /dev/null; then
|
||||
rm -f ${SSH_AUTH_SOCK}
|
||||
fi
|
||||
if [ ! -S ${SSH_AUTH_SOCK} ]; then
|
||||
eval $(ssh-agent -a ${SSH_AUTH_SOCK} 2> /dev/null)
|
||||
fi
|
||||
|
|
|
@ -37,9 +37,7 @@ export XDG_SESSION_TYPE=X11
|
|||
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 SSH_AUTH_SOCK="$XDG_RUNTIME_DIR/gcr/ssh"
|
||||
export GTK_ICON_THEME="Gruvbox-Plus-Dark"
|
||||
|
||||
# initialize dwm
|
||||
dbus-launch dwm
|
||||
exec dwm
|
||||
|
|
|
@ -53,7 +53,7 @@ graph_symbol_proc = "default"
|
|||
shown_boxes = "cpu mem net proc"
|
||||
|
||||
#* Update time in milliseconds, recommended 2000 ms or above for better sample times for graphs.
|
||||
update_ms = 500
|
||||
update_ms = 1000
|
||||
|
||||
#* 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.
|
||||
|
|
|
@ -335,7 +335,7 @@
|
|||
:desc "Zap to char" "z" #'zap-to-char
|
||||
:desc "Zap up to char" "Z" #'zap-up-to-char)
|
||||
|
||||
(set-frame-parameter nil 'alpha-background 98) ; For current frame
|
||||
(add-to-list 'default-frame-alist '(alpha-background . 98)) ; For all new frames henceforth
|
||||
(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))
|
||||
|
|
|
@ -752,8 +752,8 @@ the second occurrence of 'e'.
|
|||
Transparent window
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(set-frame-parameter nil 'alpha-background 98) ; For current frame
|
||||
(add-to-list 'default-frame-alist '(alpha-background . 98)) ; For all new frames henceforth
|
||||
(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
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
gtk-theme-name="Gruvbox-Dark"
|
||||
gtk-icon-theme-name="Papirus-Dark"
|
||||
gtk-icon-theme-name="Gruvbox-Plus-Dark"
|
||||
gtk-font-name="Inter 10"
|
||||
gtk-cursor-theme-name="Simp1e-Gruvbox-Dark"
|
||||
gtk-cursor-theme-size=0
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
[Settings]
|
||||
gtk-theme-name=Gruvbox-Dark
|
||||
gtk-icon-theme-name=Papirus-Dark
|
||||
gtk-icon-theme-name=Gruvbox-Plus-Dark
|
||||
gtk-font-name=Inter 10
|
||||
gtk-cursor-theme-name=Simp1e-Gruvbox-Dark
|
||||
gtk-cursor-theme-size=0
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
# ~/.bash_logout: executed by bash(1) when login shell exits.
|
||||
|
||||
if [ "$SHLVL" = 1 ]; then
|
||||
[ -x /usr/bin/clear ] && /usr/bin/clear -q
|
||||
fi
|
|
@ -1,14 +0,0 @@
|
|||
# crypttab: mappings for encrypted partitions
|
||||
#
|
||||
# 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.
|
||||
|
||||
# <name> <device> <password> <options>
|
||||
# home /dev/hda4 /etc/mypassword1
|
||||
# data1 /dev/hda3 /etc/mypassword2
|
||||
# data2 /dev/hda5 /etc/cryptfs.key
|
||||
# swap /dev/hdx4 /dev/urandom swap,cipher=aes-cbc-essiv:sha256,size=256
|
||||
# vol /dev/hdb7 none
|
||||
thklvm /dev/nvme0n1p2 /boot/volume.key luks
|
|
@ -1,22 +0,0 @@
|
|||
#
|
||||
# Configuration file for GRUB.
|
||||
#
|
||||
GRUB_DEFAULT=0
|
||||
GRUB_HIDDEN_TIMEOUT=1
|
||||
GRUB_HIDDEN_TIMEOUT_QUIET=true
|
||||
GRUB_TIMEOUT=0
|
||||
GRUB_DISTRIBUTOR="Void"
|
||||
GRUB_CMDLINE_LINUX_DEFAULT="rd.lvm.vg=thkvg rd.luks.uuid=a2d27caa-9675-4e07-ad78-51d796c879de loglevel=3 quiet"
|
||||
# Uncomment to use basic console
|
||||
#GRUB_TERMINAL_INPUT="console"
|
||||
# Uncomment to disable graphical terminal
|
||||
#GRUB_TERMINAL_OUTPUT=console
|
||||
#GRUB_BACKGROUND=/usr/share/void-artwork/splash.png
|
||||
#GRUB_GFXMODE=1920x1080x32
|
||||
#GRUB_DISABLE_LINUX_UUID=true
|
||||
#GRUB_DISABLE_RECOVERY=true
|
||||
# Uncomment and set to the desired menu colors. Used by normal and wallpaper
|
||||
# modes only. Entries specified as foreground/background.
|
||||
#GRUB_COLOR_NORMAL="light-blue/black"
|
||||
#GRUB_COLOR_HIGHLIGHT="light-cyan/blue"
|
||||
GRUB_ENABLE_CRYPTODISK=y
|
|
@ -1,4 +0,0 @@
|
|||
# PUT YOUR CONFIG IN separate files
|
||||
# in /etc/dracut.conf.d named "<name>.conf"
|
||||
# SEE man dracut.conf(5) for options
|
||||
add_drivers+=" i915 "
|
|
@ -1,13 +0,0 @@
|
|||
[H[2J[3J
|
||||
\e[H\e[2J
|
||||
\e[0;32m
|
||||
_______
|
||||
\\_____ `- ____ ____ .__ .___ .____ .__
|
||||
/\\ ___ `- \\ \\ \\ / /___ |__| __| _/ | | |__| ____ __ _____ ___
|
||||
| | / \\ | | \\ Y / _ \\| |/ __ | | | | |/ \\| | \\ \\/ /
|
||||
| | \\___/ | | \\ ( <_> ) / /_/ | | |___| | | \\ | /> <
|
||||
\\ `-_____ \\/ \\___/ \\____/|__\\____ | |_______ \\__|___| /____//__/\\_ \\
|
||||
`-______\\ \\/ \\/ \\/ \\/
|
||||
|
||||
\e[0m
|
||||
Welcome Back! Linux Version: \r (\n) (\l)
|
13
etc/crypttab
Normal file
13
etc/crypttab
Normal file
|
@ -0,0 +1,13 @@
|
|||
# Configuration for encrypted block devices.
|
||||
# See crypttab(5) for details.
|
||||
|
||||
# NOTE: Do not list your root (/) partition here, it must be set up
|
||||
# beforehand by the initramfs (/etc/mkinitcpio.conf).
|
||||
|
||||
# <name> <device> <password> <options>
|
||||
# home UUID=b8ad5c18-f445-495d-9095-c9ec4f9d2f37 /etc/mypassword1
|
||||
# data1 /dev/sda3 /etc/mypassword2
|
||||
# data2 /dev/sda5 /etc/cryptfs.key
|
||||
# swap /dev/sdx4 /dev/urandom swap,cipher=aes-cbc-essiv:sha256,size=256
|
||||
# vol /dev/sdb7 none
|
||||
#<vgname> <cryptdrive> <keypath> luks
|
63
etc/default/grub
Normal file
63
etc/default/grub
Normal file
|
@ -0,0 +1,63 @@
|
|||
# GRUB boot loader configuration
|
||||
|
||||
GRUB_DEFAULT=0
|
||||
GRUB_TIMEOUT=2
|
||||
GRUB_DISTRIBUTOR="Arch"
|
||||
GRUB_CMDLINE_LINUX_DEFAULT="rd.luks.name=<UUID>=<LVMNAME> rd.luks.key=<UUID>=<KEYPATH> loglevel=3 quiet systemd.show_status=auto rd.udev.log_level=3 splash"
|
||||
GRUB_CMDLINE_LINUX=""
|
||||
|
||||
# Preload both GPT and MBR modules so that they are not missed
|
||||
GRUB_PRELOAD_MODULES="part_gpt part_msdos"
|
||||
|
||||
# Uncomment to enable booting from LUKS encrypted devices
|
||||
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
|
||||
GRUB_TERMINAL_INPUT=console
|
||||
|
||||
# Uncomment to disable graphical terminal
|
||||
#GRUB_TERMINAL_OUTPUT=console
|
||||
|
||||
# The resolution used on graphical terminal
|
||||
# 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
|
||||
|
||||
# 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
|
||||
# modes only. Entries specified as foreground/background.
|
||||
#GRUB_COLOR_NORMAL="light-blue/black"
|
||||
#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=true
|
13
etc/issue
Normal file
13
etc/issue
Normal file
|
@ -0,0 +1,13 @@
|
|||
[0;37;40m
|
||||
[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
|
||||
[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;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
|
||||
[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
|
||||
|
81
etc/mkinitcpio.conf
Normal file
81
etc/mkinitcpio.conf
Normal file
|
@ -0,0 +1,81 @@
|
|||
# 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=(/boot/volume.key)
|
||||
|
||||
# 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 plymouth 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
Normal file
100
etc/pacman.conf
Normal file
|
@ -0,0 +1,100 @@
|
|||
#
|
||||
# /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
|
||||
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
|
||||
[chaotic-aur]
|
||||
Include = /etc/pacman.d/chaotic-mirrorlist
|
1
etc/vconsole.conf
Normal file
1
etc/vconsole.conf
Normal file
|
@ -0,0 +1 @@
|
|||
FONT=ter-122n
|
|
@ -4,10 +4,9 @@
|
|||
# - Description: A simple script for file editing in dmenu
|
||||
# - Dependencies: dmenu, fd
|
||||
|
||||
##########
|
||||
## main ##
|
||||
##########
|
||||
# start from home directory
|
||||
cd "$HOME" || exit 0
|
||||
|
||||
file=1
|
||||
while [ "$file" ]; do
|
||||
file=$(fd -LHpd 1 | dmenu -i -l 10 -p " Open file in text editor $(basename "$(pwd)")")
|
||||
|
|
|
@ -1,12 +1,10 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# ***This script was made by Clay Gomera (Drake)***
|
||||
# - Description: A simple power menu dmenu script
|
||||
# - Dependencies: dmenu, power-profiles-daemon, slock
|
||||
# *** Script by Clay Gomera (Drake) ***
|
||||
# Description: A dmenu script for managing power options
|
||||
# Dependencies: dmenu, powerprofilesctl, slock, systemctl, notify-send
|
||||
|
||||
#######################
|
||||
## Main manu options ##
|
||||
#######################
|
||||
# Main menu options
|
||||
option1=" Logout"
|
||||
option2=" Reboot"
|
||||
option3=" Power off"
|
||||
|
@ -16,55 +14,27 @@ option6=" Change power profile"
|
|||
option7=" Exit"
|
||||
options="$option1\n$option2\n$option3\n$option4\n$option5\n$option6\n$option7"
|
||||
|
||||
####################################
|
||||
## Power profiles submenu options ##
|
||||
####################################
|
||||
# Power profiles submenu options
|
||||
pwr1=" Performance"
|
||||
pwr2=" Balanced"
|
||||
pwr3=" Power Saver"
|
||||
pwr4=" Cancel"
|
||||
pwrs="$pwr1\n$pwr2\n$pwr3\n$pwr4"
|
||||
|
||||
## This variable will store the current power profile
|
||||
# Store the current power profile
|
||||
currentpwr=$(powerprofilesctl get)
|
||||
|
||||
## This variable will store the current wallpaper set by feh
|
||||
# Store the current wallpaper set by feh
|
||||
currentwall=$(tail --lines=1 "$HOME/.fehbg" | awk '{print $4}' | sed "s/'//g")
|
||||
|
||||
# Check for missing dependencies
|
||||
check_dependencies() {
|
||||
if ! [ -x "$(command -v dmenu)" ]; then
|
||||
echo "Missing dependency: dmenu is required."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
local missing_deps=()
|
||||
for dep in loginctl 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
|
||||
# Ask user for confirmation with yes/no options
|
||||
confirm_action() {
|
||||
local prompt="$1"
|
||||
echo -e " Yes\n No" | dmenu -l 2 -i -p "$prompt" | grep -q " Yes"
|
||||
}
|
||||
|
||||
####################
|
||||
# Main Script Flow #
|
||||
####################
|
||||
|
||||
# Check for dependencies
|
||||
check_dependencies
|
||||
|
||||
action=$(echo -e "$options" | dmenu -i -p " Power Options"); # main menu prompt
|
||||
# Show main menu and get user action
|
||||
action=$(echo -e "$options" | dmenu -i -p " Power Options")
|
||||
if [ -z "$action" ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
@ -77,60 +47,66 @@ case "$action" in
|
|||
;;
|
||||
"$option2")
|
||||
if confirm_action " Are you sure you want to reboot?"; then
|
||||
loginctl reboot
|
||||
systemctl reboot
|
||||
fi
|
||||
;;
|
||||
"$option3")
|
||||
if confirm_action " Are you sure you want to power off?"; then
|
||||
loginctl poweroff
|
||||
systemctl poweroff
|
||||
fi
|
||||
;;
|
||||
"$option4")
|
||||
slock -b "$currentwall" loginctl suspend
|
||||
systemctl suspend
|
||||
;;
|
||||
"$option5")
|
||||
slock -b "$currentwall"
|
||||
;;
|
||||
"$option6")
|
||||
#####
|
||||
## These conditions will be used for the prompt
|
||||
#####
|
||||
if [ "$currentpwr" = "performance" ]; then
|
||||
# Determine current power profile for submenu
|
||||
case "$currentpwr" in
|
||||
"performance")
|
||||
currentpwr="$pwr1"
|
||||
elif [ "$currentpwr" = "balanced" ]; then
|
||||
;;
|
||||
"balanced")
|
||||
currentpwr="$pwr2"
|
||||
elif [ "$currentpwr" = "power-saver" ]; then
|
||||
;;
|
||||
"power-saver")
|
||||
currentpwr="$pwr3"
|
||||
fi
|
||||
pwraction=$(echo -e "$pwrs" | dmenu -i -p " Power Profile Menu - Currently set to: $currentpwr") # power profiles submenu prompt
|
||||
;;
|
||||
*)
|
||||
currentpwr="Unknown"
|
||||
;;
|
||||
esac
|
||||
|
||||
# Show power profile submenu and get user action
|
||||
pwraction=$(echo -e "$pwrs" | dmenu -i -p " Power Profile Menu - Currently set to: $currentpwr")
|
||||
case "$pwraction" in
|
||||
"$pwr1")
|
||||
if [ "$currentpwr" = "$pwr1" ]; then # if the power profile is already set to performance
|
||||
if [ "$currentpwr" = "$pwr1" ]; then
|
||||
notify-send "The power profile is already set to performance"
|
||||
exit 1
|
||||
else
|
||||
powerprofilesctl set performance && notify-send "Power profile switched to performance" # if not, set the powerprofile to performance
|
||||
powerprofilesctl set performance && notify-send "Power profile switched to performance"
|
||||
fi
|
||||
;;
|
||||
"$pwr2")
|
||||
if [ "$currentpwr" = "$pwr2" ]; then # if the power profile is already set to balanced
|
||||
if [ "$currentpwr" = "$pwr2" ]; then
|
||||
notify-send "The power profile is already set to balanced"
|
||||
exit 1
|
||||
else
|
||||
powerprofilesctl set balanced && notify-send "Power profile switched to balanced" # if not, set the powerprofile to balanced
|
||||
powerprofilesctl set balanced && notify-send "Power profile switched to balanced"
|
||||
fi
|
||||
;;
|
||||
"$pwr3")
|
||||
if [ "$currentpwr" = "$pwr3" ]; then # if the power profile is already set to power saver
|
||||
if [ "$currentpwr" = "$pwr3" ]; then
|
||||
notify-send "The power profile is already set to power saver"
|
||||
exit 1
|
||||
else
|
||||
powerprofilesctl set power-saver && notify-send "Power profile switched to power saver" # if not, set the powerprofile to power saver
|
||||
powerprofilesctl set power-saver && notify-send "Power profile switched to power saver"
|
||||
fi
|
||||
;;
|
||||
"$pwr4")
|
||||
exit 0
|
||||
esac;;
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
"$option7")
|
||||
exit 0
|
||||
;;
|
||||
|
|
|
@ -1,26 +1,26 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# ***This script was made by Clay Gomera (Drake)***
|
||||
# - Description: A simple screenshot/screencast dmenu script
|
||||
# - Dependencies: maim, slop, ffmpeg, dmenu, libnotify
|
||||
# *** Script by Clay Gomera (Drake) ***
|
||||
# Description: A simple screenshot/screencast dmenu script
|
||||
# Dependencies: maim, slop, ffmpeg, dmenu, libnotify
|
||||
|
||||
## Screenshot & Screencast Directory
|
||||
## Define directories for saving screenshots and screencasts
|
||||
SHOTDIR="$XDG_PICTURES_DIR/Screenshots"
|
||||
CASTDIR="$XDG_VIDEOS_DIR/Screencasts"
|
||||
mkdir -p "$SHOTDIR" "$CASTDIR"
|
||||
|
||||
## Format Variables
|
||||
## Define available formats for images and videos
|
||||
image_formats="jpg\npng"
|
||||
video_formats="mp4\nmkv"
|
||||
|
||||
## Main menu choices
|
||||
## Define choices for the main menu
|
||||
mcho1=" Take a screenshot"
|
||||
mcho2=" Record the screen"
|
||||
mcho3=" Stop recording"
|
||||
mcho4=" Exit"
|
||||
mchos="$mcho1\n$mcho2\n$mcho3\n$mcho4"
|
||||
|
||||
## Main submenu choices
|
||||
## Define choices for the screenshot submenu
|
||||
mscho1=" Capture the entire screen"
|
||||
mscho2=" Capture the entire screen (With delay)"
|
||||
mscho3=" Capture area"
|
||||
|
@ -28,20 +28,18 @@ mscho4=" Capture active window"
|
|||
mscho5=" Exit"
|
||||
mschos="$mscho1\n$mscho2\n$mscho3\n$mscho4\n$mscho5"
|
||||
|
||||
## Save/clip submenu choices
|
||||
## Define choices for saving screenshots
|
||||
svcho1=" Copy to clipboard"
|
||||
svcho2=" Save to $SHOTDIR"
|
||||
svchos="$svcho1\n$svcho2"
|
||||
|
||||
## Delay subsubmenu
|
||||
## Define delay options for screenshots
|
||||
del1=" 3 sec delay"
|
||||
del2=" 5 sec delay"
|
||||
del3=" 10 sec delay"
|
||||
dels="$del1\n$del2\n$del3"
|
||||
|
||||
#####
|
||||
## This function will check for dependencies
|
||||
#####
|
||||
# Check if required dependencies are installed
|
||||
check_dependencies() {
|
||||
local dependencies=("maim" "ffmpeg" "dmenu" "notify-send" "xclip" "xdotool" "xdpyinfo")
|
||||
for dep in "${dependencies[@]}"; do
|
||||
|
@ -52,46 +50,32 @@ check_dependencies() {
|
|||
done
|
||||
}
|
||||
|
||||
#####
|
||||
## This function uses the svchos variable to ask the user what to do with the
|
||||
## screenshot
|
||||
#####
|
||||
# Prompt the user to choose an action for saving the screenshot
|
||||
fsvchos() {
|
||||
svchoice=$(echo -e "$svchos" | dmenu -i -l 2 -p " What do you want to do with this screenshot?")
|
||||
}
|
||||
|
||||
#####
|
||||
## This function uses the dels variable to ask the user which delay option to
|
||||
## choose
|
||||
#####
|
||||
# Prompt the user to choose a delay option for screenshots
|
||||
fdel() {
|
||||
del=$(echo -e "$dels" | dmenu -i -p " Select Delay")
|
||||
}
|
||||
|
||||
#####
|
||||
## This function allows the user to choose the screenshot format
|
||||
#####
|
||||
# Prompt the user to choose the image format for screenshots
|
||||
fimage_format() {
|
||||
image_format=$(echo -e "$image_formats" | dmenu -i -p " Choose screenshot format")
|
||||
}
|
||||
|
||||
#####
|
||||
## This function allows the user to choose the recording format
|
||||
#####
|
||||
# Prompt the user to choose the video format for recordings
|
||||
fvideo_format() {
|
||||
video_format=$(echo -e "$video_formats" | dmenu -i -p " Choose video format")
|
||||
}
|
||||
|
||||
#####
|
||||
## This function does a full screen screenshot without delay, depending on what
|
||||
## the user chooses on the fsvchos function, the screenshot will be saved to the
|
||||
## clipboard or to $SHOTDIR
|
||||
#####
|
||||
# Capture a full-screen screenshot without delay
|
||||
shot_screen() {
|
||||
fimage_format
|
||||
fsvchos
|
||||
if [ "$svchoice" = "$svcho1" ]; then
|
||||
maim | xclip -selection clipboard -t image/"$image_format" && notify-send "Screenshot saved to clipboard"
|
||||
maim -f "$image_format" | xclip -selection clipboard -t image/"$image_format" && notify-send "Screenshot saved to clipboard"
|
||||
elif [ "$svchoice" = "$svcho2" ]; then
|
||||
maim -f "$image_format" "$SHOTDIR/$(date +%s).$image_format" && notify-send "Screenshot saved"
|
||||
else
|
||||
|
@ -99,12 +83,7 @@ shot_screen() {
|
|||
fi
|
||||
}
|
||||
|
||||
#####
|
||||
## This function does a full screen screenshot with delay, depending on what the
|
||||
## user chooses on the fsvchos function, the screenshot will be saved to the
|
||||
## clipboard or to $SHOTDIR. And depending on what the user chooses on the fdel
|
||||
## function, the delay will be between 3 and 10 seconds
|
||||
#####
|
||||
# Capture a full-screen screenshot with a user-defined delay
|
||||
shot_screen_delay() {
|
||||
fimage_format
|
||||
fsvchos
|
||||
|
@ -132,54 +111,41 @@ shot_screen_delay() {
|
|||
|
||||
sleep 1
|
||||
if [ "$svchoice" = "$svcho1" ]; then
|
||||
maim | xclip -selection clipboard -t image/"$image_format" && notify-send "Screenshot saved to clipboard";
|
||||
maim -f "$image_format" | xclip -selection clipboard -t image/"$image_format" && notify-send "Screenshot saved to clipboard"
|
||||
elif [ "$svchoice" = "$svcho2" ]; then
|
||||
maim -f "$image_format" "$SHOTDIR/$(date +%s).$image_format" && notify-send "Screenshot saved to $SHOTDIR";
|
||||
maim -f "$image_format" "$SHOTDIR/$(date +%s).$image_format" && notify-send "Screenshot saved to $SHOTDIR"
|
||||
else
|
||||
exit 0
|
||||
fi
|
||||
}
|
||||
|
||||
#####
|
||||
## This function allows the user to select the area on the screen to screenshot
|
||||
## depending on what the user chooses on the fsvchos function, the screenshot will
|
||||
## be saved to the clipboard or to $SHOTDIR
|
||||
#####
|
||||
# Capture a user-defined area of the screen
|
||||
shot_area() {
|
||||
fimage_format
|
||||
fsvchos
|
||||
if [ "$svchoice" = "$svcho1" ]; then
|
||||
maim -s | xclip -selection clipboard -t image/"$image_format" && notify-send "Screenshot saved to clipboard";
|
||||
maim -f "$image_format" -s | xclip -selection clipboard -t image/"$image_format" && notify-send "Screenshot saved to clipboard"
|
||||
elif [ "$svchoice" = "$svcho2" ]; then
|
||||
maim -s -f "$image_format" "$SHOTDIR/$(date +%s).$image_format" && notify-send "Screenshot saved to $SHOTDIR";
|
||||
maim -s -f "$image_format" "$SHOTDIR/$(date +%s).$image_format" && notify-send "Screenshot saved to $SHOTDIR"
|
||||
else
|
||||
exit 0
|
||||
fi
|
||||
}
|
||||
|
||||
#####
|
||||
## This function does a screenshot of the currently active window, depending
|
||||
## on what the user chooses on the fsvchos function, the screenshot will be
|
||||
## saved to the clipboard or to $SHOTDIR
|
||||
#####
|
||||
# Capture a screenshot of the currently active window
|
||||
shot_window() {
|
||||
fimage_format
|
||||
fsvchos
|
||||
if [ "$svchoice" = "$svcho1" ]; then
|
||||
maim -i "$(xdotool getactivewindow)" | xclip -selection clipboard -t image/"$image_format" && notify-send "Screenshot saved to clipboard";
|
||||
maim -f "$image_format" -i "$(xdotool getactivewindow)" | xclip -selection clipboard -t image/"$image_format" && notify-send "Screenshot saved to clipboard"
|
||||
elif [ "$svchoice" = "$svcho2" ]; then
|
||||
maim -i "$(xdotool getactivewindow)" -f "$image_format" "$SHOTDIR/$(date +%s).$image_format" && notify-send "Screenshot saved to $SHOTDIR";
|
||||
maim -i "$(xdotool getactivewindow)" -f "$image_format" "$SHOTDIR/$(date +%s).$image_format" && notify-send "Screenshot saved to $SHOTDIR"
|
||||
else
|
||||
exit 0
|
||||
fi
|
||||
}
|
||||
|
||||
#####
|
||||
## This function uses ffmpeg to record the screen, It will check if ffmpeg is
|
||||
## already running (already recording), to prevent the user from executing
|
||||
## another ffmpeg instance, if it's not running, it will grab the screen
|
||||
## resolution with xdpyinfo and use it to record the screen with ffmpeg.
|
||||
#####
|
||||
# Start recording the entire screen using ffmpeg
|
||||
rec_screen() {
|
||||
fvideo_format
|
||||
if pgrep -x "ffmpeg" > /dev/null; then
|
||||
|
@ -192,9 +158,7 @@ rec_screen() {
|
|||
fi
|
||||
}
|
||||
|
||||
#####
|
||||
## This function will record the screen with a given delay
|
||||
#####
|
||||
# Start recording the entire screen with a user-defined delay
|
||||
rec_screen_delay() {
|
||||
fvideo_format
|
||||
fdel
|
||||
|
@ -230,7 +194,7 @@ rec_screen_delay() {
|
|||
fi
|
||||
}
|
||||
|
||||
## This function allows the user to record a selected area of the screen
|
||||
# Start recording a user-defined area of the screen
|
||||
rec_area() {
|
||||
fvideo_format
|
||||
if pgrep -x "ffmpeg" > /dev/null; then
|
||||
|
@ -248,7 +212,7 @@ rec_area() {
|
|||
fi
|
||||
}
|
||||
|
||||
## This function allows the user to record the currently active window
|
||||
# Start recording the currently active window
|
||||
rec_window() {
|
||||
fvideo_format
|
||||
if pgrep -x "ffmpeg" > /dev/null; then
|
||||
|
@ -266,66 +230,44 @@ rec_window() {
|
|||
fi
|
||||
}
|
||||
|
||||
#####
|
||||
## This function stops screen recording, it first checks if ffmpeg is already
|
||||
## running (already recording), to only stop a recording if there's an ffmpeg
|
||||
## instance running
|
||||
#####
|
||||
# Stop the ongoing screen recording
|
||||
stop_recording() {
|
||||
if pgrep -x "ffmpeg" > /dev/null; then
|
||||
pkill -f "ffmpeg -f x11grab"
|
||||
notify-send "Screen recording stopped. Video saved to $CASTDIR"
|
||||
else
|
||||
notify-send "You aren't recording anything at the moment"
|
||||
notify-send "No recording in progress."
|
||||
fi
|
||||
}
|
||||
|
||||
## main
|
||||
check_dependencies;
|
||||
mchoice=$(echo -e "$mchos" | dmenu -i -l 4 -p " Screen Capture Menu") # main menu prompt
|
||||
# Main script execution
|
||||
check_dependencies
|
||||
|
||||
# Display the main menu and handle user choice
|
||||
mchoice=$(echo -e "$mchos" | dmenu -i -l 4 -p " Screen Capture Menu")
|
||||
case $mchoice in
|
||||
"$mcho1")
|
||||
mschoice=$(echo -e "$mschos" | dmenu -i -l 9 -p " Screenshot Menu") # screenshot menu prompt
|
||||
# Display the screenshot submenu and handle user choice
|
||||
mschoice=$(echo -e "$mschos" | dmenu -i -l 9 -p " Screenshot Menu")
|
||||
case $mschoice in
|
||||
"$mscho1")
|
||||
shot_screen;
|
||||
;;
|
||||
"$mscho2")
|
||||
shot_screen_delay;
|
||||
;;
|
||||
"$mscho3")
|
||||
shot_area;
|
||||
;;
|
||||
"$mscho4")
|
||||
shot_window;
|
||||
;;
|
||||
"$mscho5")
|
||||
exit 0
|
||||
"$mscho1") shot_screen ;;
|
||||
"$mscho2") shot_screen_delay ;;
|
||||
"$mscho3") shot_area ;;
|
||||
"$mscho4") shot_window ;;
|
||||
"$mscho5") exit 0 ;;
|
||||
esac
|
||||
;;
|
||||
"$mcho2")
|
||||
mschoice=$(echo -e "$mschos" | dmenu -i -l 9 -p " Screencast Menu") # screenshot menu prompt
|
||||
# Display the screencast submenu and handle user choice
|
||||
mschoice=$(echo -e "$mschos" | dmenu -i -l 9 -p " Screencast Menu")
|
||||
case $mschoice in
|
||||
"$mscho1")
|
||||
rec_screen;
|
||||
;;
|
||||
"$mscho2")
|
||||
rec_screen_delay;
|
||||
;;
|
||||
"$mscho3")
|
||||
rec_area;
|
||||
;;
|
||||
"$mscho4")
|
||||
rec_window;
|
||||
;;
|
||||
"$mscho5")
|
||||
exit 0
|
||||
"$mscho1") rec_screen ;;
|
||||
"$mscho2") rec_screen_delay ;;
|
||||
"$mscho3") rec_area ;;
|
||||
"$mscho4") rec_window ;;
|
||||
"$mscho5") exit 0 ;;
|
||||
esac
|
||||
;;
|
||||
"$mcho3")
|
||||
stop_recording;
|
||||
;;
|
||||
"$mcho4")
|
||||
exit 0;
|
||||
;;
|
||||
"$mcho3") stop_recording ;;
|
||||
"$mcho4") exit 0 ;;
|
||||
esac
|
||||
|
|
|
@ -1,18 +1,16 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# ***This script was made by Clay Gomera (Drake)***
|
||||
# - Description: A simple dmenu script to set the wallpaper on X
|
||||
# - Dependencies: dmenu, fd, feh
|
||||
# *** Script by Clay Gomera (Drake) ***
|
||||
# Description: A dmenu script to set the wallpaper on X using feh
|
||||
# Dependencies: dmenu, fd, feh
|
||||
|
||||
##########################
|
||||
## Wallpapers Directory ##
|
||||
##########################
|
||||
# Directory containing wallpapers
|
||||
walldir="$XDG_PICTURES_DIR/Wallpapers"
|
||||
cd "$walldir" || exit # we cd into $walldir in order to get only the file name on the main prompt
|
||||
|
||||
#######################
|
||||
## Wallpaper options ##
|
||||
#######################
|
||||
# Change to wallpaper directory or exit if it fails
|
||||
cd "$walldir" || exit
|
||||
|
||||
# Define wallpaper options for feh
|
||||
option1="Fill"
|
||||
option2="Center"
|
||||
option3="Tile"
|
||||
|
@ -20,30 +18,31 @@ option4="Max"
|
|||
option5="Scale"
|
||||
options="$option1\n$option2\n$option3\n$option4\n$option5"
|
||||
|
||||
##########
|
||||
## main ##
|
||||
##########
|
||||
wallpaper=$(fd -p ./ | dmenu -i -p " Select a wallpaper ") # main prompt
|
||||
if [ "$wallpaper" ]; then # if the user made a choice
|
||||
chosenwall=$wallpaper # reassign $wallpaper to $chosenwall
|
||||
else
|
||||
# Prompt user to select a wallpaper
|
||||
wallpaper=$(fd -p ./ | dmenu -i -p " Select a wallpaper")
|
||||
if [ -z "$wallpaper" ]; then
|
||||
exit 0
|
||||
fi
|
||||
action=$(echo -e "$options" | dmenu -i -p " Chose the format ") # options prompt
|
||||
|
||||
# Store the selected wallpaper
|
||||
chosenwall="$wallpaper"
|
||||
|
||||
# Prompt user to select a wallpaper format
|
||||
action=$(echo -e "$options" | dmenu -i -p " Choose the format")
|
||||
case "$action" in
|
||||
$option1*)
|
||||
feh --bg-fill "$chosenwall";
|
||||
"$option1")
|
||||
feh --bg-fill "$chosenwall"
|
||||
;;
|
||||
$option2*)
|
||||
feh --bg-center "$chosenwall";
|
||||
"$option2")
|
||||
feh --bg-center "$chosenwall"
|
||||
;;
|
||||
$option3*)
|
||||
feh --bg-tile "$chosenwall";
|
||||
"$option3")
|
||||
feh --bg-tile "$chosenwall"
|
||||
;;
|
||||
$option4*)
|
||||
feh --bg-max "$chosenwall";
|
||||
"$option4")
|
||||
feh --bg-max "$chosenwall"
|
||||
;;
|
||||
$option5*)
|
||||
feh --bg-scale "$chosenwall";
|
||||
"$option5")
|
||||
feh --bg-scale "$chosenwall"
|
||||
;;
|
||||
esac
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# ***This script was made by Clay Gomera (Drake)***
|
||||
# - Description: A simple wifi dmenu script
|
||||
# - Dependencies: dmenu, NetworkManager
|
||||
# *** Script by Clay Gomera (Drake) ***
|
||||
# Description: A simple WiFi management script using dmenu and NetworkManager
|
||||
# Dependencies: dmenu, NetworkManager, notify-send
|
||||
|
||||
## Main menu options
|
||||
# Main menu options
|
||||
option1=" Turn on WiFi"
|
||||
option2=" Turn off WiFi"
|
||||
option3=" Disconnect WiFi"
|
||||
|
@ -13,15 +13,11 @@ option5=" Setup captive portal"
|
|||
option6=" Exit"
|
||||
options="$option1\n$option2\n$option3\n$option4\n$option5\n$option6"
|
||||
|
||||
#####
|
||||
## These variables will store specific information about the wireless interface
|
||||
#####
|
||||
# Retrieve wireless interface information
|
||||
wifi_info=$(nmcli dev | awk '/wifi/ {print $1,$3; exit}')
|
||||
read -r wlan constate <<< "$wifi_info"
|
||||
read -r wlan state <<< "$wifi_info"
|
||||
|
||||
#####
|
||||
## This function uses nmcli to turn off wifi and then sends a notification
|
||||
#####
|
||||
# Function to turn off WiFi
|
||||
turnoff() {
|
||||
nmcli radio wifi off
|
||||
if [ $? -eq 0 ]; then
|
||||
|
@ -31,9 +27,7 @@ turnoff() {
|
|||
fi
|
||||
}
|
||||
|
||||
#####
|
||||
## This function uses nmcli to turn on wifi and then sends a notification
|
||||
#####
|
||||
# Function to turn on WiFi
|
||||
turnon() {
|
||||
nmcli radio wifi on
|
||||
if [ $? -eq 0 ]; then
|
||||
|
@ -43,14 +37,11 @@ turnon() {
|
|||
fi
|
||||
}
|
||||
|
||||
#####
|
||||
## This function uses nmcli and the $wlan and $constate variables to disconnect
|
||||
## from the wifi network and then sends a notification
|
||||
#####
|
||||
# Function to disconnect WiFi
|
||||
disconnect() {
|
||||
if [ "$constate" = "disconnected" ]; then
|
||||
if [ "$state" = "disconnected" ]; then
|
||||
notify-send "WiFi is already disconnected"
|
||||
elif [ "$constate" = "connected" ]; then
|
||||
elif [ "$state" = "connected" ]; then
|
||||
nmcli device disconnect "$wlan"
|
||||
if [ $? -eq 0 ]; then
|
||||
notify-send "WiFi has been disconnected"
|
||||
|
@ -62,14 +53,11 @@ disconnect() {
|
|||
fi
|
||||
}
|
||||
|
||||
#####
|
||||
## This function uses nmcli to first scan for available networks and then the
|
||||
## $bssid variable will store the SSID of the network that the user chooses
|
||||
#####
|
||||
# Function to select and connect to a WiFi network
|
||||
connect() {
|
||||
notify-send -t 5000 "Scanning networks..."
|
||||
nmcli dev wifi rescan
|
||||
wifinet=$(nmcli -f BSSID,SSID,BARS,SECURITY dev wifi list | sed -n '1!p' | dmenu -i -l 10 -p " Select a Wifi Network")
|
||||
local wifinet=$(nmcli -f BSSID,SSID,BARS,SECURITY dev wifi list | sed -n '1!p' | dmenu -i -l 10 -p " Select a Wifi Network")
|
||||
if [ -z "$wifinet" ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
@ -77,9 +65,7 @@ connect() {
|
|||
ssid=$(echo "$wifinet" | awk '{print $2}')
|
||||
}
|
||||
|
||||
#####
|
||||
## This function will store the WiFi password in the $pass variable
|
||||
#####
|
||||
# Function to prompt for WiFi password
|
||||
password() {
|
||||
if nmcli connection show | awk -v ssid="$ssid" '$1 == ssid {found=1} END {exit !found}'; then
|
||||
pass=""
|
||||
|
@ -93,10 +79,7 @@ password() {
|
|||
fi
|
||||
}
|
||||
|
||||
#####
|
||||
## This function will actually connect to the chosen WiFi network using the
|
||||
## $bssid and $pass variables
|
||||
#####
|
||||
# Function to connect to the selected WiFi network
|
||||
action() {
|
||||
if [ -n "$pass" ]; then
|
||||
nmcli dev wifi connect "$bssid" password "$pass"
|
||||
|
@ -110,15 +93,13 @@ action() {
|
|||
fi
|
||||
}
|
||||
|
||||
##########
|
||||
## main ##
|
||||
##########
|
||||
cases=$(echo -e "$options" | dmenu -l 6 -i -p " Wifi Settings")
|
||||
if [ -z "$cases" ]; then
|
||||
# Show menu and handle user choice
|
||||
case=$(echo -e "$options" | dmenu -l 6 -i -p " WiFi Settings")
|
||||
if [ -z "$case" ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
case "$cases" in
|
||||
case "$case" in
|
||||
"$option1")
|
||||
turnon
|
||||
;;
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
/* Appearance */
|
||||
static const unsigned int borderpx = 1; /* border pixel of windows */
|
||||
static const unsigned int snap = 32; /* snap pixel */
|
||||
static const unsigned int gappx = 6; /* gaps between windows */
|
||||
static const int showbar = 1; /* 0 means no bar */
|
||||
static const int topbar = 1; /* 0 means bottom bar */
|
||||
static const int vertpad = 0; /* vertical padding of bar */
|
||||
|
@ -153,7 +154,7 @@ static const Rule rules[] = {
|
|||
{"Xournalpp", NULL, NULL, 1 << 6, 0, -1},
|
||||
{"Com.github.xournalpp.xournalpp", NULL, NULL, 1 << 6, 0, -1},
|
||||
/* 8 - Office Tag */
|
||||
{"DesktopEditors", NULL, NULL, 1 << 7, 0, -1},
|
||||
{"ONLYOFFICE Desktop Editors", NULL, NULL, 1 << 7, 0, -1},
|
||||
{"Soffice", "soffice", NULL, 1 << 7, 0, -1},
|
||||
{"libreoffice-startcenter", NULL, NULL, 1 << 7, 0, -1},
|
||||
{"libreoffice-calc", NULL, NULL, 1 << 7, 0, -1},
|
||||
|
@ -205,7 +206,7 @@ static const Rule rules[] = {
|
|||
/* Layout(s) */
|
||||
static const float mfact = 0.5; /* 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 resizehints = 1; /* 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 */
|
||||
|
@ -235,13 +236,14 @@ static const Layout layouts[] = {
|
|||
static const char *dmenucmd[] = { "dmenu_run", "-fn", dmenufont, "-nb", col_gray1, "-nf", col_gray3, "-sb", col_cyan, "-sf", col_gray4, NULL };
|
||||
static const char *termcmd[] = { "st", NULL };
|
||||
static const char *editor[] = { "emacsclient", "-c", "-a", "'emacs'", NULL };
|
||||
static const char *browser[] = { "flatpak", "run", "com.brave.Browser", NULL };
|
||||
static const char *browser[] = { "brave", NULL };
|
||||
static const char *chat[] = { "flatpak", "run", "org.signal.Signal", NULL };
|
||||
static const char *vm[] = { "virt-manager", NULL };
|
||||
static const char *office[] = { "flatpak", "run", "org.libreoffice.LibreOffice", NULL };
|
||||
static const char *office[] = { "flatpak", "run", "org.onlyoffice.desktopeditors", NULL };
|
||||
static const char *videoeditor[] = { "flatpak", "run", "org.kde.kdenlive", NULL };
|
||||
static const char *imageeditor[] = { "flatpak", "run", "org.gimp.GIMP", NULL };
|
||||
static const char *audioeditor[] = { "flatpak", "run", "org.audacityteam.Audacity", NULL };
|
||||
static const char *game[] = { "flatpak", "run", "com.valvesoftware.Steam", NULL };
|
||||
|
||||
/* Keybindings */
|
||||
static Keychord *keychords[] = {
|
||||
|
@ -268,6 +270,7 @@ static Keychord *keychords[] = {
|
|||
&((Keychord){2, {{MODKEY, XK_a}, {0, XK_k}}, spawn, {.v = videoeditor } }), /* Launch video editor (tag 6) */
|
||||
&((Keychord){2, {{MODKEY, XK_a}, {0, XK_i}}, spawn, {.v = imageeditor } }), /* Launch image editor (tag 7) */
|
||||
&((Keychord){2, {{MODKEY, XK_a}, {0, XK_o}}, spawn, {.v = office } }), /* Launch office suite (tag 8) */
|
||||
&((Keychord){2, {{MODKEY, XK_a}, {0, XK_g}}, spawn, {.v = game } }), /* Launch office suite (tag 9) */
|
||||
|
||||
/* Keyboard Layouts */
|
||||
&((Keychord){2, {{MODKEY, XK_x}, {0, XK_e}}, spawn, SHCMD("setxkbmap -layout es && pkill -RTMIN+10 dwmblocks") }), /* Switch to Spanish keyboard layout */
|
||||
|
@ -323,10 +326,10 @@ static Keychord *keychords[] = {
|
|||
&((Keychord){1, {{MODKEY|Mod1Mask, XK_space}}, togglefloating, {0} }), /* Toggle floating mode on active window */
|
||||
&((Keychord){1, {{MODKEY, XK_0}}, view, {.ui = ~0 } }), /* View all windows from all tags */
|
||||
&((Keychord){1, {{MODKEY|ShiftMask, XK_0}}, tag, {.ui = ~0 } }), /* View active window on all tags (similar to sticky, more nuclear) */
|
||||
&((Keychord){1, {{MODKEY, XK_comma}}, focusmon, {.i = +1 } }), /* Focus next screen */
|
||||
&((Keychord){1, {{MODKEY, XK_period}}, focusmon, {.i = -1 } }), /* Focus previous screen */
|
||||
&((Keychord){1, {{MODKEY|ShiftMask, XK_comma}}, tagmon, {.i = +1 } }), /* Move active window to next screen */
|
||||
&((Keychord){1, {{MODKEY|ShiftMask, XK_period}}, tagmon, {.i = -1 } }), /* Move active window to previous screen */
|
||||
&((Keychord){1, {{MODKEY, XK_comma}}, focusmon, {.i = -1 } }), /* Focus next screen */
|
||||
&((Keychord){1, {{MODKEY, XK_period}}, focusmon, {.i = +1 } }), /* Focus previous screen */
|
||||
&((Keychord){1, {{MODKEY|ShiftMask, XK_comma}}, tagmon, {.i = -1 } }), /* Move active window to next screen */
|
||||
&((Keychord){1, {{MODKEY|ShiftMask, XK_period}}, tagmon, {.i = +1 } }), /* Move active window to previous screen */
|
||||
&((Keychord){1, {{MODKEY, XK_b}}, togglebar, {0} }), /* Toggle bar */
|
||||
|
||||
/* Scratchpads */
|
||||
|
|
|
@ -56,8 +56,8 @@
|
|||
#define ISVISIBLE(C) ((C->tags & C->mon->tagset[C->mon->seltags]) || C->issticky)
|
||||
#define LENGTH(X) (sizeof X / sizeof X[0])
|
||||
#define MOUSEMASK (BUTTONMASK|PointerMotionMask)
|
||||
#define WIDTH(X) ((X)->w + 2 * (X)->bw)
|
||||
#define HEIGHT(X) ((X)->h + 2 * (X)->bw)
|
||||
#define WIDTH(X) ((X)->w + 2 * (X)->bw + gappx)
|
||||
#define HEIGHT(X) ((X)->h + 2 * (X)->bw + gappx)
|
||||
#define NUMTAGS (LENGTH(tags) + LENGTH(scratchpads))
|
||||
#define TAGMASK ((1 << NUMTAGS) - 1)
|
||||
#define SPTAG(i) ((1 << LENGTH(tags)) << (i))
|
||||
|
@ -619,6 +619,9 @@ void combotag(const Arg *arg) {
|
|||
combo = 1;
|
||||
selmon->sel->tags = arg->ui & TAGMASK;
|
||||
}
|
||||
// Set the monitor's selected tag to the new tag
|
||||
selmon->tagset[selmon->seltags] = arg->ui & TAGMASK;
|
||||
|
||||
focus(NULL);
|
||||
arrange(selmon);
|
||||
}
|
||||
|
@ -1906,17 +1909,39 @@ void resize(Client *c, int x, int y, int w, int h, int interact) {
|
|||
|
||||
void resizeclient(Client *c, int x, int y, int w, int h) {
|
||||
XWindowChanges wc;
|
||||
unsigned int n;
|
||||
unsigned int gapoffset;
|
||||
unsigned int gapincr;
|
||||
Client *nbc;
|
||||
|
||||
c->oldx = c->x; c->x = wc.x = x;
|
||||
c->oldy = c->y; c->y = wc.y = y;
|
||||
c->oldw = c->w; c->w = wc.width = w;
|
||||
c->oldh = c->h; c->h = wc.height = h;
|
||||
wc.border_width = c->bw;
|
||||
|
||||
/* Get number of clients for the client's monitor */
|
||||
for (n = 0, nbc = nexttiled(c->mon->clients); nbc; nbc = nexttiled(nbc->next), n++);
|
||||
|
||||
/* Do nothing if layout is floating */
|
||||
if (c->isfloating || c->mon->lt[c->mon->sellt]->arrange == NULL) {
|
||||
gapincr = gapoffset = 0;
|
||||
} else {
|
||||
/* Remove border and gap if layout is monocle or only one client */
|
||||
if (c->mon->lt[c->mon->sellt]->arrange == monocle || n == 1) {
|
||||
gapoffset = 0;
|
||||
gapincr = -2 * borderpx;
|
||||
wc.border_width = 0;
|
||||
} else {
|
||||
gapoffset = gappx;
|
||||
gapincr = 2 * gappx;
|
||||
}
|
||||
}
|
||||
|
||||
c->oldx = c->x; c->x = wc.x = x + gapoffset;
|
||||
c->oldy = c->y; c->y = wc.y = y + gapoffset;
|
||||
c->oldw = c->w; c->w = wc.width = w - gapincr;
|
||||
c->oldh = c->h; c->h = wc.height = h - gapincr;
|
||||
|
||||
if (c->beingmoved)
|
||||
return;
|
||||
|
||||
wc.border_width = c->bw;
|
||||
|
||||
XConfigureWindow(dpy, c->win, CWX|CWY|CWWidth|CWHeight|CWBorderWidth, &wc);
|
||||
configure(c);
|
||||
XSync(dpy, False);
|
||||
|
@ -2080,15 +2105,21 @@ void scan(void) {
|
|||
void sendmon(Client *c, Monitor *m) {
|
||||
if (c->mon == m)
|
||||
return;
|
||||
int hadfocus = (c == selmon->sel);
|
||||
unfocus(c, 1);
|
||||
detach(c);
|
||||
detachstack(c);
|
||||
arrange(c->mon);
|
||||
c->mon = m;
|
||||
c->tags = m->tagset[m->seltags]; /* assign tags of target monitor */
|
||||
attachbottom(c);
|
||||
attachstack(c);
|
||||
arrange(m);
|
||||
if (hadfocus) {
|
||||
focus(c);
|
||||
restack(m);
|
||||
} else
|
||||
focus(NULL);
|
||||
arrange(NULL);
|
||||
}
|
||||
|
||||
void setclientstate(Client *c, long state) {
|
||||
|
@ -2396,7 +2427,7 @@ void tile(Monitor *m) {
|
|||
if (i < m->nmaster) {
|
||||
h = (m->wh - my) / (MIN(n, m->nmaster) - i);
|
||||
resize(c, m->rmaster ? m->wx + m->ww - mw : m->wx,
|
||||
m->wy + my, mw - (2*c->bw), h - (2*c->bw), 0);
|
||||
m->wy + my, mw - (2*c->bw) + (n > 1 ? gappx : 0), h - (2*c->bw), 0);
|
||||
if (my + HEIGHT(c) < m->wh)
|
||||
my += HEIGHT(c);
|
||||
} else {
|
||||
|
|
40
source/dwm/patches/dwm-sendmon_keepfocus-6.2.diff
Normal file
40
source/dwm/patches/dwm-sendmon_keepfocus-6.2.diff
Normal file
|
@ -0,0 +1,40 @@
|
|||
From 812695104701acaaa5b31afad08fdb576486ae72 Mon Sep 17 00:00:00 2001
|
||||
From: Bakkeby <bakkeby@gmail.com>
|
||||
Date: Thu, 27 Jun 2024 17:55:57 +0200
|
||||
Subject: [PATCH] sendmon_keepfocus patch
|
||||
|
||||
---
|
||||
dwm.c | 10 ++++++++--
|
||||
1 file changed, 8 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/dwm.c b/dwm.c
|
||||
index 4465af1..2def4a1 100644
|
||||
--- a/dwm.c
|
||||
+++ b/dwm.c
|
||||
@@ -1412,15 +1412,21 @@ sendmon(Client *c, Monitor *m)
|
||||
{
|
||||
if (c->mon == m)
|
||||
return;
|
||||
+ int hadfocus = (c == selmon->sel);
|
||||
unfocus(c, 1);
|
||||
detach(c);
|
||||
detachstack(c);
|
||||
+ arrange(c->mon);
|
||||
c->mon = m;
|
||||
c->tags = m->tagset[m->seltags]; /* assign tags of target monitor */
|
||||
attach(c);
|
||||
attachstack(c);
|
||||
- focus(NULL);
|
||||
- arrange(NULL);
|
||||
+ arrange(m);
|
||||
+ if (hadfocus) {
|
||||
+ focus(c);
|
||||
+ restack(m);
|
||||
+ } else
|
||||
+ focus(NULL);
|
||||
}
|
||||
|
||||
void
|
||||
--
|
||||
2.45.2
|
||||
|
101
source/dwm/patches/dwm-uselessgap-20211119-58414bee958f2.diff
Normal file
101
source/dwm/patches/dwm-uselessgap-20211119-58414bee958f2.diff
Normal file
|
@ -0,0 +1,101 @@
|
|||
From 58414bee958f2e7ed91d6fe31f503ec4a406981b Mon Sep 17 00:00:00 2001
|
||||
From: cirala <thim@cederlund.de>
|
||||
Date: Fri, 19 Nov 2021 18:14:07 +0100
|
||||
Subject: [PATCH] Fix for dwm-uselessgap
|
||||
Previous versions of the patch doubles the
|
||||
gap between the master and slave stacks.
|
||||
|
||||
---
|
||||
config.def.h | 3 ++-
|
||||
dwm.c | 38 +++++++++++++++++++++++++++++++-------
|
||||
2 files changed, 33 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/config.def.h b/config.def.h
|
||||
index a2ac963..17a205f 100644
|
||||
--- a/config.def.h
|
||||
+++ b/config.def.h
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
/* appearance */
|
||||
static const unsigned int borderpx = 1; /* border pixel of windows */
|
||||
+static const unsigned int gappx = 6; /* gaps between 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 */
|
||||
@@ -34,7 +35,7 @@ static const Rule rules[] = {
|
||||
/* 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 = 1; /* 1 means respect size hints in tiled resizals */
|
||||
+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[] = {
|
||||
diff --git a/dwm.c b/dwm.c
|
||||
index 5e4d494..b626e89 100644
|
||||
--- a/dwm.c
|
||||
+++ b/dwm.c
|
||||
@@ -52,8 +52,8 @@
|
||||
#define ISVISIBLE(C) ((C->tags & C->mon->tagset[C->mon->seltags]))
|
||||
#define LENGTH(X) (sizeof X / sizeof X[0])
|
||||
#define MOUSEMASK (BUTTONMASK|PointerMotionMask)
|
||||
-#define WIDTH(X) ((X)->w + 2 * (X)->bw)
|
||||
-#define HEIGHT(X) ((X)->h + 2 * (X)->bw)
|
||||
+#define WIDTH(X) ((X)->w + 2 * (X)->bw + gappx)
|
||||
+#define HEIGHT(X) ((X)->h + 2 * (X)->bw + gappx)
|
||||
#define TAGMASK ((1 << LENGTH(tags)) - 1)
|
||||
#define TEXTW(X) (drw_fontset_getwidth(drw, (X)) + lrpad)
|
||||
|
||||
@@ -1277,12 +1277,36 @@ void
|
||||
resizeclient(Client *c, int x, int y, int w, int h)
|
||||
{
|
||||
XWindowChanges wc;
|
||||
+ unsigned int n;
|
||||
+ unsigned int gapoffset;
|
||||
+ unsigned int gapincr;
|
||||
+ Client *nbc;
|
||||
|
||||
- c->oldx = c->x; c->x = wc.x = x;
|
||||
- c->oldy = c->y; c->y = wc.y = y;
|
||||
- c->oldw = c->w; c->w = wc.width = w;
|
||||
- c->oldh = c->h; c->h = wc.height = h;
|
||||
wc.border_width = c->bw;
|
||||
+
|
||||
+ /* Get number of clients for the client's monitor */
|
||||
+ for (n = 0, nbc = nexttiled(c->mon->clients); nbc; nbc = nexttiled(nbc->next), n++);
|
||||
+
|
||||
+ /* Do nothing if layout is floating */
|
||||
+ if (c->isfloating || c->mon->lt[c->mon->sellt]->arrange == NULL) {
|
||||
+ gapincr = gapoffset = 0;
|
||||
+ } else {
|
||||
+ /* Remove border and gap if layout is monocle or only one client */
|
||||
+ if (c->mon->lt[c->mon->sellt]->arrange == monocle || n == 1) {
|
||||
+ gapoffset = 0;
|
||||
+ gapincr = -2 * borderpx;
|
||||
+ wc.border_width = 0;
|
||||
+ } else {
|
||||
+ gapoffset = gappx;
|
||||
+ gapincr = 2 * gappx;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ c->oldx = c->x; c->x = wc.x = x + gapoffset;
|
||||
+ c->oldy = c->y; c->y = wc.y = y + gapoffset;
|
||||
+ c->oldw = c->w; c->w = wc.width = w - gapincr;
|
||||
+ c->oldh = c->h; c->h = wc.height = h - gapincr;
|
||||
+
|
||||
XConfigureWindow(dpy, c->win, CWX|CWY|CWWidth|CWHeight|CWBorderWidth, &wc);
|
||||
configure(c);
|
||||
XSync(dpy, False);
|
||||
@@ -1688,7 +1712,7 @@ tile(Monitor *m)
|
||||
for (i = my = ty = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), i++)
|
||||
if (i < m->nmaster) {
|
||||
h = (m->wh - my) / (MIN(n, m->nmaster) - i);
|
||||
- resize(c, m->wx, m->wy + my, mw - (2*c->bw), h - (2*c->bw), 0);
|
||||
+ resize(c, m->wx, m->wy + my, mw - (2*c->bw) + (n > 1 ? gappx : 0), h - (2*c->bw), 0);
|
||||
if (my + HEIGHT(c) < m->wh)
|
||||
my += HEIGHT(c);
|
||||
} else {
|
||||
--
|
||||
2.33.1
|
||||
|
|
@ -8,9 +8,11 @@
|
|||
# activate neccesary env variables for ssh-agent and other stuff
|
||||
dbus-update-activation-environment DISPLAY XAUTHORITY &
|
||||
|
||||
# bind gnome secrets component to currently running gnome-keyring instance launched with PAM on login (this unlocks the keyring)
|
||||
gnome-keyring-daemon --start --components=secrets &
|
||||
|
||||
# autostart programs, use pidof <program> || program, to prevent relaunching stuff if dwm is restarted
|
||||
pidof pipewire || pipewire &
|
||||
pidof polkit-gnome-authentication-agent-1 || /usr/libexec/polkit-gnome-authentication-agent-1 &
|
||||
pidof polkit-gnome-authentication-agent-1 || /usr/lib/polkit-gnome-authentication-agent-1 &
|
||||
pidof dwmblocks || dwmblocks &
|
||||
pidof unclutter || unclutter --hide-on-touch &
|
||||
pidof dunst || dunst --config $HOME/.config/dunst/dunstrc &
|
||||
|
@ -21,7 +23,7 @@ pidof emacs || /usr/bin/emacs --daemon &
|
|||
# set theming and font thingy
|
||||
gsettings set org.gnome.desktop.interface cursor-theme 'Simp1e-Gruvbox-Dark' &
|
||||
gsettings set org.gnome.desktop.interface cursor-size 16 &
|
||||
gsettings set org.gnome.desktop.interface icon-theme 'Papirus-Dark' &
|
||||
gsettings set org.gnome.desktop.interface icon-theme 'Gruvbox-Plus-Dark' &
|
||||
gsettings set org.gnome.desktop.interface gtk-theme 'Gruvbox-Dark' &
|
||||
gsettings set org.gnome.desktop.interface color-scheme 'prefer-dark' &
|
||||
gsettings set org.gnome.desktop.interface font-name 'Inter 10' &
|
||||
|
@ -32,29 +34,25 @@ gsettings set org.gnome.desktop.interface font-hinting 'full' &
|
|||
|
||||
# grab monitor status (varies with the machine)
|
||||
### T480 monitors
|
||||
monitor1=$(cat /sys/class/drm/card0-DP-1/status)
|
||||
monitor2=$(cat /sys/class/drm/card0-HDMI-A-2/status)
|
||||
monitor1=$(cat /sys/class/drm/card1-HDMI-A-2/status)
|
||||
monitor2=$(cat /sys/class/drm/card1-DP-1/status)
|
||||
|
||||
# if monitors are connected, then use xrandr to set desired settings
|
||||
if [ "$monitor1" = "connected" ] && [ "$monitor2" = "connected" ]; then
|
||||
xrandr --output eDP1 --mode 1920x1080 --pos 0x0 --rotate normal \
|
||||
--output DP1 --primary --mode 1920x1080 --rate 100.00 --pos 1924x0 --rotate normal \
|
||||
--output HDMI2 --mode 1280x1024 --rate 75.00 --pos 3844x0 --rotate normal &
|
||||
xrandr --output eDP1 --mode 1920x1080 --pos 3200x0 --rotate normal \
|
||||
--output HDMI2 --primary --mode 1920x1080 --rate 100.00 --pos 1280x0 --rotate normal \
|
||||
--output DP1 --mode 1280x1024 --rate 75.00 --pos 0x0 --rotate normal &
|
||||
elif [ "$monitor1" = "connected" ]; then
|
||||
xrandr --output eDP1 --primary --auto \
|
||||
--output DP1 --auto --scale-from 1920x1080 --same-as eDP1 &
|
||||
--output HDMI2 --auto --scale-from 1920x1080 --same-as eDP1 &
|
||||
elif [ "$monitor2" = "connected" ]; then
|
||||
xrandr --output eDP1 --primary --auto \
|
||||
--output HDMI2 --auto --scale-from 1920x1080 --same-as eDP1 &
|
||||
--output DP1 --auto --scale-from 1920x1080 --same-as eDP1 &
|
||||
else
|
||||
xrandr --output eDP1 --primary --auto \
|
||||
--output DP1 --off \
|
||||
--output HDMI2 --off &
|
||||
--output HDMI2 --off \
|
||||
--output DP1 --off &
|
||||
fi
|
||||
|
||||
# set wallpaper
|
||||
sh "$HOME"/.fehbg &
|
||||
|
||||
# bind gnome secrets component to currently running gnome-keyring instance launched with PAM on login (this unlocks the keyring)
|
||||
gnome-keyring-daemon --start --components=secrets &
|
||||
|
||||
|
|
|
@ -117,7 +117,7 @@ char *termname = "st-256color";
|
|||
unsigned int tabspaces = 4;
|
||||
|
||||
/* bg opacity */
|
||||
float alpha = 0.98;
|
||||
float alpha = 0.95;
|
||||
|
||||
/* Terminal colors (16 first used in escape sequence) */
|
||||
static const char *colorname[] = {
|
||||
|
|
BIN
source/st/st
BIN
source/st/st
Binary file not shown.
|
@ -1,2 +0,0 @@
|
|||
# Void Linux templates for xbps-src
|
||||
Put them in void-packages/srcpkgs/ and use xbps-src to build and package them.
|
|
@ -1,16 +0,0 @@
|
|||
# Template file for 'ani-cli'
|
||||
pkgname=ani-cli
|
||||
version=4.8
|
||||
revision=1
|
||||
depends="curl openssl mpv aria2 ffmpeg"
|
||||
short_desc="CLI tool to browse and play anime"
|
||||
maintainer="chtc <notnotcha0t1c@protonmail.com>"
|
||||
license="GPL-3.0-or-later"
|
||||
homepage="https://github.com/pystardust/ani-cli"
|
||||
distfiles="${homepage}/archive/refs/tags/v${version}.tar.gz>${pkgname}-${version}.tar.gz"
|
||||
checksum=9857bf88a1cbef4580dea52da349d3b23d2288b67a03fdd7b6c5c1b35d08351d
|
||||
|
||||
do_install() {
|
||||
vbin ani-cli
|
||||
vinstall README.md 644 usr/share/doc/$pkgname
|
||||
}
|
|
@ -1,5 +0,0 @@
|
|||
Distrobox uses podman or docker to create containers of the Linux distribution of your choice.
|
||||
Either one of these packages need to be installed:
|
||||
|
||||
- docker: enable docker usage
|
||||
- podman: enable podman usage
|
|
@ -1,16 +0,0 @@
|
|||
# Template file for 'distrobox'
|
||||
pkgname=distrobox
|
||||
version=1.7.2.1
|
||||
revision=1
|
||||
short_desc="Use any linux distribution inside your terminal"
|
||||
maintainer="Libera <libera@disroot.org>"
|
||||
license="GPL-3.0-or-later"
|
||||
homepage="https://distrobox.it/"
|
||||
distfiles="https://github.com/89luca89/distrobox/archive/${version}.tar.gz"
|
||||
checksum=ff2cca0c6334fff6ed577d23f68a6746ad4009f42d8a45eef5ca3850c895a4bb
|
||||
|
||||
do_install() {
|
||||
./install --prefix "${DESTDIR}/usr"
|
||||
find docs -name "*.md" -exec \
|
||||
install -Dm 644 -t "${DESTDIR}/usr/share/doc/distrobox" {} +
|
||||
}
|
|
@ -1,13 +0,0 @@
|
|||
# Template file for 'ytfzf'
|
||||
pkgname=ytfzf
|
||||
version=2.6.2
|
||||
revision=1
|
||||
build_style=gnu-makefile
|
||||
make_install_args="PREFIX=/usr doc"
|
||||
depends="jq curl"
|
||||
short_desc="POSIX shell script to find and watch YouTube videos from the terminal"
|
||||
maintainer="Bryce Vandegrift <bryce@brycevandegrift.xyz>"
|
||||
license="GPL-3.0-or-later"
|
||||
homepage="https://github.com/pystardust/ytfzf"
|
||||
distfiles="https://github.com/pystardust/${pkgname}/archive/refs/tags/v${version}.tar.gz"
|
||||
checksum=73280e4ef4f490400a42bf582b713803c523587b0b30269859eaa6f2693ec9b1
|
Loading…
Reference in a new issue