initial awesome commit
This commit is contained in:
parent
98054d1696
commit
1a60f55a0f
163 changed files with 2174 additions and 27698 deletions
|
@ -1,23 +0,0 @@
|
|||
#!/bin/bash
|
||||
## ____ __
|
||||
## / __ \_________ _/ /_____
|
||||
## / / / / ___/ __ `/ //_/ _ \
|
||||
## / /_/ / / / /_/ / ,< / __/ Clay Gomera (Drake)
|
||||
## /_____/_/ \__,_/_/|_|\___/ My custom bash_profile config
|
||||
##
|
||||
|
||||
### STARTING XSESSION
|
||||
if [ -z "$DISPLAY" ] && [ "$(tty)" = "/dev/tty1" ]
|
||||
then
|
||||
sh $HOME/.winitrc
|
||||
logout
|
||||
fi
|
||||
|
||||
### ENVIRONMENT VARIABLES
|
||||
export EDITOR="lvim" # $EDITOR use lunarvim in terminal
|
||||
export XDG_DATA_HOME="${XDG_DATA_HOME:="$HOME/.local/share"}"
|
||||
export XDG_CACHE_HOME="${XDG_CACHE_HOME:="$HOME/.cache"}"
|
||||
export XDG_CONFIG_HOME="${XDG_CONFIG_HOME:="$HOME/.config"}"
|
||||
|
||||
### BASHRC
|
||||
source "$HOME"/.bashrc # Load the bashrc
|
|
@ -1,238 +0,0 @@
|
|||
## ____ __
|
||||
## / __ \_________ _/ /_____
|
||||
## / / / / ___/ __ `/ //_/ _ \
|
||||
## / /_/ / / / /_/ / ,< / __/ Clay Gomera (Drake)
|
||||
## /_____/_/ \__,_/_/|_|\___/ My custom bash config
|
||||
##
|
||||
|
||||
### EXPORT ###
|
||||
export TERM="xterm-256color" # getting proper colors
|
||||
export HISTCONTROL=ignoredups:erasedups # no duplicate entries
|
||||
export EDITOR="$HOME/.local/bin/lvim"
|
||||
export VISUAL="wezterm start --class editor -- $HOME/.local/bin/lvim"
|
||||
|
||||
### "bat" as manpager
|
||||
export MANPAGER="sh -c 'col -bx | bat -l man -p'"
|
||||
|
||||
# use bash-completion, if available
|
||||
[[ $PS1 && -f /usr/share/bash-completion/bash_completion ]] && \
|
||||
. /usr/share/bash-completion/bash_completion
|
||||
|
||||
# if not running interactively, don't do anything
|
||||
[[ $- != *i* ]] && return
|
||||
|
||||
# use neovim for vim if present.
|
||||
[ -x "$(command -v $HOME/.local/bin/lvim)" ] && alias vim="lvim"
|
||||
|
||||
### SET VI MODE ###
|
||||
# Comment this line out to enable default emacs-like bindings
|
||||
set -o vi
|
||||
bind -m vi-command 'Control-l: clear-screen'
|
||||
bind -m vi-insert 'Control-l: clear-screen'
|
||||
|
||||
### PATH ###
|
||||
if [ -d "$HOME/.bin" ] ;
|
||||
then PATH="$HOME/.bin:$PATH"
|
||||
fi
|
||||
if [ -d "$HOME/.local/bin" ] ;
|
||||
then PATH="$HOME/.local/bin:$PATH"
|
||||
fi
|
||||
if [ -d "$HOME/Applications" ] ;
|
||||
then PATH="$HOME/Applications:$PATH"
|
||||
fi
|
||||
|
||||
### CHANGE TITLE OF TERMINALS ###
|
||||
case ${TERM} in
|
||||
xterm*|rxvt*|Eterm*|aterm|kterm|gnome*|alacritty|st|konsole*)
|
||||
PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME%%.*}:${PWD/#$HOME/\~}\007"'
|
||||
;;
|
||||
screen*)
|
||||
PROMPT_COMMAND='echo -ne "\033_${USER}@${HOSTNAME%%.*}:${PWD/#$HOME/\~}\033\\"'
|
||||
;;
|
||||
esac
|
||||
|
||||
### SHOPT ###
|
||||
shopt -s autocd # change to named directory
|
||||
shopt -s cdspell # autocorrects cd misspellings
|
||||
shopt -s cmdhist # save multi-line commands in history as single line
|
||||
shopt -s dotglob
|
||||
shopt -s histappend # do not overwrite history
|
||||
shopt -s expand_aliases # expand aliases
|
||||
shopt -s checkwinsize # checks term size when bash regains control
|
||||
|
||||
# ignore upper and lowercase when TAB completion
|
||||
bind "set completion-ignore-case on"
|
||||
|
||||
# sudo not required for some system commands
|
||||
for command in cryptsetup mount umount poweroff reboot ; do
|
||||
alias $command="sudo $command"
|
||||
done; unset command
|
||||
|
||||
### ARCHIVE EXTRACTION ###
|
||||
# usage: ex <file>
|
||||
ex ()
|
||||
{
|
||||
if [ -f "$1" ] ; then
|
||||
case $1 in
|
||||
*.tar.bz2) tar xjf "$1" ;;
|
||||
*.tar.gz) tar xzf "$1" ;;
|
||||
*.bz2) bunzip2 "$1" ;;
|
||||
*.rar) unrar x "$1" ;;
|
||||
*.gz) gunzip "$1" ;;
|
||||
*.tar) tar xf "$1" ;;
|
||||
*.tbz2) tar xjf "$1" ;;
|
||||
*.tgz) tar xzf "$1" ;;
|
||||
*.zip) unzip "$1" ;;
|
||||
*.Z) uncompress "$1";;
|
||||
*.7z) 7zz x "$1" ;;
|
||||
*.deb) ar x "$1" ;;
|
||||
*.tar.xz) tar xf "$1" ;;
|
||||
*.tar.zst) unzstd "$1" ;;
|
||||
*) echo "'$1' cannot be extracted via ex()" ;;
|
||||
esac
|
||||
else
|
||||
echo "'$1' is not a valid file"
|
||||
fi
|
||||
}
|
||||
|
||||
### ALIASES ###
|
||||
# navigation
|
||||
up () {
|
||||
local d=""
|
||||
local limit="$1"
|
||||
|
||||
# Default to limit of 1
|
||||
if [ -z "$limit" ] || [ "$limit" -le 0 ]; then
|
||||
limit=1
|
||||
fi
|
||||
|
||||
for ((i=1;i<=limit;i++)); do
|
||||
d="../$d"
|
||||
done
|
||||
|
||||
# perform cd. Show error if cd fails
|
||||
if ! cd "$d"; then
|
||||
echo "Couldn't go up $limit dirs.";
|
||||
fi
|
||||
}
|
||||
|
||||
# cd
|
||||
alias \
|
||||
..="cd .." \
|
||||
.2="cd ../.." \
|
||||
.3="cd ../../.." \
|
||||
.4="cd ../../../.." \
|
||||
.5="cd ../../../../.."
|
||||
|
||||
# bat as cat
|
||||
[ -x "$(command -v bat)" ] && alias cat="bat"
|
||||
|
||||
# pfetch as neofetch
|
||||
[ -x "$(command -v pfetch)" ] && alias neofetch="pfetch"
|
||||
|
||||
# Changing "ls" to "exa"
|
||||
alias \
|
||||
ls="exa -al --icons --color=always --group-directories-first" \
|
||||
la="exa -a --icons --color=always --group-directories-first" \
|
||||
ll="exa -l --icons --color=always --group-directories-first" \
|
||||
lt="exa -aT --icons --color=always --group-directories-first" \
|
||||
l.='exa -a | grep -E "^\."'
|
||||
|
||||
# pacman
|
||||
alias \
|
||||
pac-up="paru -Syu" \
|
||||
pac-get="paru -S" \
|
||||
pac-rmv="paru -Rcns" \
|
||||
pac-rmv-sec="paru -R" \
|
||||
pac-qry="paru -Ss" \
|
||||
pac-cln="paru -Scc && paru -Rns $(pacman -Qtdq)"
|
||||
|
||||
# colorize grep output (good for log files)
|
||||
alias \
|
||||
grep="grep --color=auto" \
|
||||
egrep="egrep --color=auto" \
|
||||
fgrep="fgrep --color=auto"
|
||||
|
||||
# git
|
||||
alias \
|
||||
git-adu="git add -u" \
|
||||
git-adl="git add ." \
|
||||
git-brn="git branch" \
|
||||
git-chk="git checkout" \
|
||||
git-cln="git clone" \
|
||||
git-cmt="git commit -m" \
|
||||
git-fth="git fetch" \
|
||||
git-pll="git pull origin" \
|
||||
git-psh="git push origin" \
|
||||
git-sts="git status" \
|
||||
git-tag="git tag" \
|
||||
git-ntg="git tag -a"
|
||||
|
||||
# adding flags
|
||||
alias \
|
||||
df="df -h" \
|
||||
free="free -m"
|
||||
|
||||
# multimedia scripts
|
||||
alias \
|
||||
fli="flix-cli" \
|
||||
ani="ani-cli" \
|
||||
aniq="ani-cli -q"
|
||||
|
||||
# audio
|
||||
alias \
|
||||
mx="pulsemixer" \
|
||||
amx="alsamixer" \
|
||||
mk="cmus" \
|
||||
ms="cmus" \
|
||||
music="cmus"
|
||||
|
||||
# power management
|
||||
alias \
|
||||
po="systemctl poweroff" \
|
||||
sp="systemctl suspend" \
|
||||
rb="systemctl reboot"
|
||||
|
||||
# file management
|
||||
alias \
|
||||
fm="vifm" \
|
||||
file="vifm" \
|
||||
flm="vifm" \
|
||||
rm="rm -vI" \
|
||||
mv="mv -iv" \
|
||||
cp="cp -iv" \
|
||||
mkd="mkdir -pv"
|
||||
|
||||
# ps
|
||||
alias \
|
||||
psa="ps auxf" \
|
||||
psgrep="ps aux | grep -v grep | grep -i -e VSZ -e" \
|
||||
psmem="ps auxf | sort -nr -k 4" \
|
||||
pscpu="ps auxf | sort -nr -k 3"
|
||||
|
||||
# youtube
|
||||
alias \
|
||||
yta-aac="yt-dlp --extract-audio --audio-format aac" \
|
||||
yta-best="yt-dlp --extract-audio --audio-format best" \
|
||||
yta-flac="yt-dlp --extract-audio --audio-format flac" \
|
||||
yta-m4a="yt-dlp --extract-audio --audio-format m4a" \
|
||||
yta-mp3="yt-dlp --extract-audio --audio-format mp3" \
|
||||
yta-opus="yt-dlp --extract-audio --audio-format opus" \
|
||||
yta-vorbis="yt-dlp --extract-audio --audio-format vorbis" \
|
||||
yta-wav="yt-dlp --extract-audio --audio-format wav" \
|
||||
ytv-best="yt-dlp -f bestvideo+bestaudio" \
|
||||
yt="ytfzf -ftsl" \
|
||||
ytm="ytfzf -mtsl"
|
||||
|
||||
# network and bluetooth
|
||||
alias \
|
||||
netstats="nmcli dev" \
|
||||
wfi="nmtui-connect" \
|
||||
wfi-scan="nmcli dev wifi rescan && nmcli dev wifi list" \
|
||||
wfi-edit="nmtui-edit" \
|
||||
wfi-on="nmcli radio wifi on" \
|
||||
wfi-off="nmcli radio wifi off" \
|
||||
blt="bluetoothctl"
|
||||
|
||||
### SETTING THE STARSHIP PROMPT ###
|
||||
eval "$(starship init bash)"
|
|
@ -1,212 +0,0 @@
|
|||
#? Config file for btop v. 1.2.13
|
||||
|
||||
#* Name of a btop++/bpytop/bashtop formatted ".theme" file, "Default" and "TTY" for builtin themes.
|
||||
#* Themes should be placed in "../share/btop/themes" relative to binary or "$HOME/.config/btop/themes"
|
||||
color_theme = "/usr/share/btop/themes/gruvbox_dark_v2.theme"
|
||||
|
||||
#* If the theme set background should be shown, set to False if you want terminal background transparency.
|
||||
theme_background = False
|
||||
|
||||
#* Sets if 24-bit truecolor should be used, will convert 24-bit colors to 256 color (6x6x6 color cube) if false.
|
||||
truecolor = True
|
||||
|
||||
#* Set to true to force tty mode regardless if a real tty has been detected or not.
|
||||
#* Will force 16-color mode and TTY theme, set all graph symbols to "tty" and swap out other non tty friendly symbols.
|
||||
force_tty = False
|
||||
|
||||
#* Define presets for the layout of the boxes. Preset 0 is always all boxes shown with default settings. Max 9 presets.
|
||||
#* Format: "box_name:P:G,box_name:P:G" P=(0 or 1) for alternate positions, G=graph symbol to use for box.
|
||||
#* Use whitespace " " as separator between different presets.
|
||||
#* Example: "cpu:0:default,mem:0:tty,proc:1:default cpu:0:braille,proc:0:tty"
|
||||
presets = "cpu:1:default,proc:0:default cpu:0:default,mem:0:default,net:0:default cpu:0:block,net:0:tty"
|
||||
|
||||
#* Set to True to enable "h,j,k,l,g,G" keys for directional control in lists.
|
||||
#* Conflicting keys for h:"help" and k:"kill" is accessible while holding shift.
|
||||
vim_keys = True
|
||||
|
||||
#* Rounded corners on boxes, is ignored if TTY mode is ON.
|
||||
rounded_corners = True
|
||||
|
||||
#* Default symbols to use for graph creation, "braille", "block" or "tty".
|
||||
#* "braille" offers the highest resolution but might not be included in all fonts.
|
||||
#* "block" has half the resolution of braille but uses more common characters.
|
||||
#* "tty" uses only 3 different symbols but will work with most fonts and should work in a real TTY.
|
||||
#* Note that "tty" only has half the horizontal resolution of the other two, so will show a shorter historical view.
|
||||
graph_symbol = "braille"
|
||||
|
||||
# Graph symbol to use for graphs in cpu box, "default", "braille", "block" or "tty".
|
||||
graph_symbol_cpu = "default"
|
||||
|
||||
# Graph symbol to use for graphs in cpu box, "default", "braille", "block" or "tty".
|
||||
graph_symbol_mem = "default"
|
||||
|
||||
# Graph symbol to use for graphs in cpu box, "default", "braille", "block" or "tty".
|
||||
graph_symbol_net = "default"
|
||||
|
||||
# Graph symbol to use for graphs in cpu box, "default", "braille", "block" or "tty".
|
||||
graph_symbol_proc = "default"
|
||||
|
||||
#* Manually set which boxes to show. Available values are "cpu mem net proc", separate values with whitespace.
|
||||
shown_boxes = "cpu mem net proc"
|
||||
|
||||
#* Update time in milliseconds, recommended 2000 ms or above for better sample times for graphs.
|
||||
update_ms = 200
|
||||
|
||||
#* 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.
|
||||
proc_sorting = "cpu lazy"
|
||||
|
||||
#* Reverse sorting order, True or False.
|
||||
proc_reversed = False
|
||||
|
||||
#* Show processes as a tree.
|
||||
proc_tree = False
|
||||
|
||||
#* Use the cpu graph colors in the process list.
|
||||
proc_colors = True
|
||||
|
||||
#* Use a darkening gradient in the process list.
|
||||
proc_gradient = True
|
||||
|
||||
#* If process cpu usage should be of the core it's running on or usage of the total available cpu power.
|
||||
proc_per_core = False
|
||||
|
||||
#* Show process memory as bytes instead of percent.
|
||||
proc_mem_bytes = True
|
||||
|
||||
#* Show cpu graph for each process.
|
||||
proc_cpu_graphs = True
|
||||
|
||||
#* Use /proc/[pid]/smaps for memory information in the process info box (very slow but more accurate)
|
||||
proc_info_smaps = False
|
||||
|
||||
#* Show proc box on left side of screen instead of right.
|
||||
proc_left = False
|
||||
|
||||
#* (Linux) Filter processes tied to the Linux kernel(similar behavior to htop).
|
||||
proc_filter_kernel = False
|
||||
|
||||
#* Sets the CPU stat shown in upper half of the CPU graph, "total" is always available.
|
||||
#* Select from a list of detected attributes from the options menu.
|
||||
cpu_graph_upper = "total"
|
||||
|
||||
#* Sets the CPU stat shown in lower half of the CPU graph, "total" is always available.
|
||||
#* Select from a list of detected attributes from the options menu.
|
||||
cpu_graph_lower = "total"
|
||||
|
||||
#* Toggles if the lower CPU graph should be inverted.
|
||||
cpu_invert_lower = True
|
||||
|
||||
#* Set to True to completely disable the lower CPU graph.
|
||||
cpu_single_graph = False
|
||||
|
||||
#* Show cpu box at bottom of screen instead of top.
|
||||
cpu_bottom = False
|
||||
|
||||
#* Shows the system uptime in the CPU box.
|
||||
show_uptime = True
|
||||
|
||||
#* Show cpu temperature.
|
||||
check_temp = True
|
||||
|
||||
#* Which sensor to use for cpu temperature, use options menu to select from list of available sensors.
|
||||
cpu_sensor = "Auto"
|
||||
|
||||
#* Show temperatures for cpu cores also if check_temp is True and sensors has been found.
|
||||
show_coretemp = True
|
||||
|
||||
#* Set a custom mapping between core and coretemp, can be needed on certain cpus to get correct temperature for correct core.
|
||||
#* Use lm-sensors or similar to see which cores are reporting temperatures on your machine.
|
||||
#* Format "x:y" x=core with wrong temp, y=core with correct temp, use space as separator between multiple entries.
|
||||
#* Example: "4:0 5:1 6:3"
|
||||
cpu_core_map = ""
|
||||
|
||||
#* Which temperature scale to use, available values: "celsius", "fahrenheit", "kelvin" and "rankine".
|
||||
temp_scale = "celsius"
|
||||
|
||||
#* Use base 10 for bits/bytes sizes, KB = 1000 instead of KiB = 1024.
|
||||
base_10_sizes = False
|
||||
|
||||
#* Show CPU frequency.
|
||||
show_cpu_freq = True
|
||||
|
||||
#* Draw a clock at top of screen, formatting according to strftime, empty string to disable.
|
||||
#* Special formatting: /host = hostname | /user = username | /uptime = system uptime
|
||||
clock_format = "%X"
|
||||
|
||||
#* Update main ui in background when menus are showing, set this to false if the menus is flickering too much for comfort.
|
||||
background_update = True
|
||||
|
||||
#* Custom cpu model name, empty string to disable.
|
||||
custom_cpu_name = ""
|
||||
|
||||
#* Optional filter for shown disks, should be full path of a mountpoint, separate multiple values with whitespace " ".
|
||||
#* Begin line with "exclude=" to change to exclude filter, otherwise defaults to "most include" filter. Example: disks_filter="exclude=/boot /home/user".
|
||||
disks_filter = ""
|
||||
|
||||
#* Show graphs instead of meters for memory values.
|
||||
mem_graphs = True
|
||||
|
||||
#* Show mem box below net box instead of above.
|
||||
mem_below_net = False
|
||||
|
||||
#* Count ZFS ARC in cached and available memory.
|
||||
zfs_arc_cached = True
|
||||
|
||||
#* If swap memory should be shown in memory box.
|
||||
show_swap = True
|
||||
|
||||
#* Show swap as a disk, ignores show_swap value above, inserts itself after first disk.
|
||||
swap_disk = True
|
||||
|
||||
#* If mem box should be split to also show disks info.
|
||||
show_disks = True
|
||||
|
||||
#* Filter out non physical disks. Set this to False to include network disks, RAM disks and similar.
|
||||
only_physical = True
|
||||
|
||||
#* Read disks list from /etc/fstab. This also disables only_physical.
|
||||
use_fstab = True
|
||||
|
||||
#* Setting this to True will hide all datasets, and only show ZFS pools. (IO stats will be calculated per-pool)
|
||||
zfs_hide_datasets = False
|
||||
|
||||
#* Set to true to show available disk space for privileged users.
|
||||
disk_free_priv = False
|
||||
|
||||
#* Toggles if io activity % (disk busy time) should be shown in regular disk usage view.
|
||||
show_io_stat = True
|
||||
|
||||
#* Toggles io mode for disks, showing big graphs for disk read/write speeds.
|
||||
io_mode = False
|
||||
|
||||
#* Set to True to show combined read/write io graphs in io mode.
|
||||
io_graph_combined = False
|
||||
|
||||
#* Set the top speed for the io graphs in MiB/s (100 by default), use format "mountpoint:speed" separate disks with whitespace " ".
|
||||
#* Example: "/mnt/media:100 /:20 /boot:1".
|
||||
io_graph_speeds = ""
|
||||
|
||||
#* Set fixed values for network graphs in Mebibits. Is only used if net_auto is also set to False.
|
||||
net_download = 100
|
||||
|
||||
net_upload = 100
|
||||
|
||||
#* Use network graphs auto rescaling mode, ignores any values set above and rescales down to 10 Kibibytes at the lowest.
|
||||
net_auto = True
|
||||
|
||||
#* Sync the auto scaling for download and upload to whichever currently has the highest scale.
|
||||
net_sync = True
|
||||
|
||||
#* Starts with the Network Interface specified here.
|
||||
net_iface = ""
|
||||
|
||||
#* Show battery stats in top right if battery is present.
|
||||
show_battery = True
|
||||
|
||||
#* Which battery to use if multiple are present. "Auto" for auto detection.
|
||||
selected_battery = "Auto"
|
||||
|
||||
#* Set loglevel for "~/.config/btop/btop.log" levels are: "ERROR" "WARNING" "INFO" "DEBUG".
|
||||
#* The level set includes all lower levels, i.e. "DEBUG" will show all logging info.
|
||||
log_level = "WARNING"
|
Binary file not shown.
Before Width: | Height: | Size: 35 KiB |
|
@ -1,359 +0,0 @@
|
|||
[global]
|
||||
### Display ###
|
||||
|
||||
# Which monitor should the notifications be displayed on.
|
||||
monitor = 0
|
||||
|
||||
# Display notification on focused monitor. Possible modes are:
|
||||
# mouse: follow mouse pointer
|
||||
# keyboard: follow window with keyboard focus
|
||||
# none: don't follow anything
|
||||
#
|
||||
# "keyboard" needs a window manager that exports the
|
||||
# _NET_ACTIVE_WINDOW property.
|
||||
# This should be the case for almost all modern window managers.
|
||||
#
|
||||
# If this option is set to mouse or keyboard, the monitor option
|
||||
# will be ignored.
|
||||
follow = mouse
|
||||
|
||||
# Show how many messages are currently hidden (because of geometry).
|
||||
indicate_hidden = yes
|
||||
|
||||
# Shrink window if it's smaller than the width. Will be ignored if
|
||||
# width is 0.
|
||||
shrink = no
|
||||
|
||||
# The transparency of the window. Range: [0; 100].
|
||||
# This option will only work if a compositing window manager is
|
||||
# present (e.g. xcompmgr, compiz, etc.).
|
||||
transparency = 30
|
||||
|
||||
# Draw a line of "separator_height" pixel height between two
|
||||
# notifications.
|
||||
# Set to 0 to disable.
|
||||
separator_height = 2
|
||||
|
||||
# Padding between text and separator.
|
||||
padding = 8
|
||||
|
||||
# Horizontal padding.
|
||||
horizontal_padding = 8
|
||||
|
||||
# Defines width in pixels of frame around the notification window.
|
||||
# Set to 0 to disable.
|
||||
frame_width = 3
|
||||
|
||||
# Defines color of the frame around the notification window.
|
||||
frame_color = "#fb4934"
|
||||
|
||||
# Define a color for the separator.
|
||||
# possible values are:
|
||||
# * auto: dunst tries to find a color fitting to the background;
|
||||
# * foreground: use the same color as the foreground;
|
||||
# * frame: use the same color as the frame;
|
||||
# * anything else will be interpreted as a X color.
|
||||
separator_color = auto
|
||||
|
||||
# Sort messages by urgency.
|
||||
sort = yes
|
||||
|
||||
# Don't remove messages, if the user is idle (no mouse or keyboard input)
|
||||
# for longer than idle_threshold seconds.
|
||||
# Set to 0 to disable.
|
||||
# A client can set the 'transient' hint to bypass this. See the rules
|
||||
# section for how to disable this if necessary
|
||||
idle_threshold = 120
|
||||
|
||||
### Text ###
|
||||
font = mononoki Nerd Font 10
|
||||
|
||||
# The spacing between lines. If the height is smaller than the
|
||||
# font height, it will get raised to the font height.
|
||||
line_height = 0
|
||||
|
||||
# Possible values are:
|
||||
# full: Allow a small subset of html markup in notifications:
|
||||
# <b>bold</b>
|
||||
# <i>italic</i>
|
||||
# <s>strikethrough</s>
|
||||
# <u>underline</u>
|
||||
#
|
||||
# For a complete reference see
|
||||
# <http://developer.gnome.org/pango/stable/PangoMarkupFormat.html>.
|
||||
#
|
||||
# strip: This setting is provided for compatibility with some broken
|
||||
# clients that send markup even though it's not enabled on the
|
||||
# server. Dunst will try to strip the markup but the parsing is
|
||||
# simplistic so using this option outside of matching rules for
|
||||
# specific applications *IS GREATLY DISCOURAGED*.
|
||||
#
|
||||
# no: Disable markup parsing, incoming notifications will be treated as
|
||||
# plain text. Dunst will not advertise that it has the body-markup
|
||||
# capability if this is set as a global setting.
|
||||
#
|
||||
# It's important to note that markup inside the format option will be parsed
|
||||
# regardless of what this is set to.
|
||||
markup = full
|
||||
|
||||
# The format of the message. Possible variables are:
|
||||
# %a appname
|
||||
# %s summary
|
||||
# %b body
|
||||
# %i iconname (including its path)
|
||||
# %I iconname (without its path)
|
||||
# %p progress value if set ([ 0%] to [100%]) or nothing
|
||||
# %n progress value if set without any extra characters
|
||||
# %% Literal %
|
||||
# Markup is allowed
|
||||
format = "<b>%s</b>\n%b"
|
||||
|
||||
# Alignment of message text.
|
||||
# Possible values are "left", "center" and "right".
|
||||
alignment = center
|
||||
|
||||
# Show age of message if message is older than show_age_threshold
|
||||
# seconds.
|
||||
# Set to -1 to disable.
|
||||
show_age_threshold = 60
|
||||
|
||||
# Split notifications into multiple lines if they don't fit into
|
||||
# geometry.
|
||||
word_wrap = yes
|
||||
|
||||
# When word_wrap is set to no, specify where to make an ellipsis in long lines.
|
||||
# Possible values are "start", "middle" and "end".
|
||||
ellipsize = middle
|
||||
|
||||
# Ignore newlines '\n' in notifications.
|
||||
ignore_newline = no
|
||||
|
||||
# Stack together notifications with the same content
|
||||
stack_duplicates = true
|
||||
|
||||
# Hide the count of stacked notifications with the same content
|
||||
hide_duplicate_count = false
|
||||
|
||||
# Display indicators for URLs (U) and actions (A).
|
||||
show_indicators = yes
|
||||
|
||||
### Icons ###
|
||||
|
||||
# Align icons left/right/off
|
||||
icon_position = left
|
||||
|
||||
# Scale larger icons down to this size, set to 0 to disable
|
||||
max_icon_size = 32
|
||||
|
||||
# Paths to default icons.
|
||||
icon_path = /usr/share/icons/gnome/16x16/status/:/usr/share/icons/gnome/16x16/devices/
|
||||
|
||||
### History ###
|
||||
|
||||
# Should a notification popped up from history be sticky or timeout
|
||||
# as if it would normally do.
|
||||
sticky_history = yes
|
||||
|
||||
# Maximum amount of notifications kept in history
|
||||
history_length = 20
|
||||
|
||||
### Misc/Advanced ###
|
||||
|
||||
# dmenu path.
|
||||
dmenu = /usr/bin/dmenu -p dunst:
|
||||
|
||||
# Browser for opening urls in context menu.
|
||||
browser = /usr/bin/firefox
|
||||
|
||||
# Always run rule-defined scripts, even if the notification is suppressed
|
||||
always_run_script = true
|
||||
|
||||
# Define the title of the windows spawned by dunst
|
||||
title = Dunst
|
||||
|
||||
# Define the class of the windows spawned by dunst
|
||||
class = Dunst
|
||||
|
||||
# Define the corner radius of the notification window
|
||||
# in pixel size. If the radius is 0, you have no rounded
|
||||
# corners.
|
||||
# The radius will be automatically lowered if it exceeds half of the
|
||||
# notification height to avoid clipping text and/or icons.
|
||||
corner_radius = 7
|
||||
|
||||
### Legacy
|
||||
|
||||
# Use the Xinerama extension instead of RandR for multi-monitor support.
|
||||
# This setting is provided for compatibility with older nVidia drivers that
|
||||
# do not support RandR and using it on systems that support RandR is highly
|
||||
# discouraged.
|
||||
#
|
||||
# By enabling this setting dunst will not be able to detect when a monitor
|
||||
# is connected or disconnected which might break follow mode if the screen
|
||||
# layout changes.
|
||||
force_xinerama = false
|
||||
|
||||
### mouse
|
||||
|
||||
# Defines action of mouse event
|
||||
# Possible values are:
|
||||
# * none: Don't do anything.
|
||||
# * do_action: If the notification has exactly one action, or one is marked as default,
|
||||
# invoke it. If there are multiple and no default, open the context menu.
|
||||
# * close_current: Close current notification.
|
||||
# * close_all: Close all notifications.
|
||||
mouse_left_click = do_action
|
||||
mouse_middle_click = close_all
|
||||
mouse_right_click = close_current
|
||||
|
||||
# Experimental features that may or may not work correctly. Do not expect them
|
||||
# to have a consistent behaviour across releases.
|
||||
[experimental]
|
||||
# Calculate the dpi to use on a per-monitor basis.
|
||||
# If this setting is enabled the Xft.dpi value will be ignored and instead
|
||||
# dunst will attempt to calculate an appropriate dpi value for each monitor
|
||||
# using the resolution and physical size. This might be useful in setups
|
||||
# where there are multiple screens with very different dpi values.
|
||||
per_monitor_dpi = false
|
||||
|
||||
[urgency_low]
|
||||
# IMPORTANT: colors have to be defined in quotation marks.
|
||||
# Otherwise the "#" and following would be interpreted as a comment.
|
||||
background = "#282828"
|
||||
foreground = "#ebdbd2"
|
||||
timeout = 5
|
||||
# Icon for notifications with low urgency, uncomment to enable
|
||||
icon = /home/drk/.config/dunst/normal.png
|
||||
|
||||
[urgency_normal]
|
||||
background = "#282828"
|
||||
foreground = "#ebdbd2"
|
||||
timeout = 5
|
||||
# Icon for notifications with normal urgency, uncomment to enable
|
||||
icon = /home/drk/.config/dunst/normal.png
|
||||
|
||||
[urgency_critical]
|
||||
background = "#900000"
|
||||
foreground = "#ebdbd2"
|
||||
frame_color = "#ff0000"
|
||||
timeout = 5
|
||||
# Icon for notifications with critical urgency, uncomment to enable
|
||||
icon = /home/drk/.config/dunst/critical.png
|
||||
|
||||
# Every section that isn't one of the above is interpreted as a rules to
|
||||
# override settings for certain messages.
|
||||
#
|
||||
# Messages can be matched by
|
||||
# appname (discouraged, see desktop_entry)
|
||||
# body
|
||||
# category
|
||||
# desktop_entry
|
||||
# icon
|
||||
# match_transient
|
||||
# msg_urgency
|
||||
# stack_tag
|
||||
# summary
|
||||
#
|
||||
# and you can override the
|
||||
# background
|
||||
# foreground
|
||||
# format
|
||||
# frame_color
|
||||
# fullscreen
|
||||
# new_icon
|
||||
# set_stack_tag
|
||||
# set_transient
|
||||
# timeout
|
||||
# urgency
|
||||
#
|
||||
# Shell-like globbing will get expanded.
|
||||
#
|
||||
# Instead of the appname filter, it's recommended to use the desktop_entry filter.
|
||||
# GLib based applications export their desktop-entry name. In comparison to the appname,
|
||||
# the desktop-entry won't get localized.
|
||||
#
|
||||
# SCRIPTING
|
||||
# You can specify a script that gets run when the rule matches by
|
||||
# setting the "script" option.
|
||||
# The script will be called as follows:
|
||||
# script appname summary body icon urgency
|
||||
# where urgency can be "LOW", "NORMAL" or "CRITICAL".
|
||||
#
|
||||
# NOTE: if you don't want a notification to be displayed, set the format
|
||||
# to "".
|
||||
# NOTE: It might be helpful to run dunst -print in a terminal in order
|
||||
# to find fitting options for rules.
|
||||
|
||||
# Disable the transient hint so that idle_threshold cannot be bypassed from the
|
||||
# client
|
||||
#[transient_disable]
|
||||
# match_transient = yes
|
||||
# set_transient = no
|
||||
#
|
||||
# Make the handling of transient notifications more strict by making them not
|
||||
# be placed in history.
|
||||
#[transient_history_ignore]
|
||||
# match_transient = yes
|
||||
# history_ignore = yes
|
||||
|
||||
# fullscreen values
|
||||
# show: show the notifications, regardless if there is a fullscreen window opened
|
||||
# delay: displays the new notification, if there is no fullscreen window active
|
||||
# If the notification is already drawn, it won't get undrawn.
|
||||
# pushback: same as delay, but when switching into fullscreen, the notification will get
|
||||
# withdrawn from screen again and will get delayed like a new notification
|
||||
#[fullscreen_delay_everything]
|
||||
# fullscreen = delay
|
||||
#[fullscreen_show_critical]
|
||||
# msg_urgency = critical
|
||||
# fullscreen = show
|
||||
|
||||
#[espeak]
|
||||
# summary = "*"
|
||||
# script = dunst_espeak.sh
|
||||
|
||||
#[script-test]
|
||||
# summary = "*script*"
|
||||
# script = dunst_test.sh
|
||||
|
||||
#[ignore]
|
||||
# # This notification will not be displayed
|
||||
# summary = "foobar"
|
||||
# format = ""
|
||||
|
||||
#[history-ignore]
|
||||
# # This notification will not be saved in history
|
||||
# summary = "foobar"
|
||||
# history_ignore = yes
|
||||
|
||||
#[skip-display]
|
||||
# # This notification will not be displayed, but will be included in the history
|
||||
# summary = "foobar"
|
||||
# skip_display = yes
|
||||
|
||||
#[signed_on]
|
||||
# appname = Pidgin
|
||||
# summary = "*signed on*"
|
||||
# urgency = low
|
||||
#
|
||||
#[signed_off]
|
||||
# appname = Pidgin
|
||||
# summary = *signed off*
|
||||
# urgency = low
|
||||
#
|
||||
#[says]
|
||||
# appname = Pidgin
|
||||
# summary = *says*
|
||||
# urgency = critical
|
||||
#
|
||||
#[twitter]
|
||||
# appname = Pidgin
|
||||
# summary = *twitter.com*
|
||||
# urgency = normal
|
||||
#
|
||||
#[stack-volumes]
|
||||
# appname = "some_volume_notifiers"
|
||||
# set_stack_tag = "volume"
|
||||
#
|
||||
# vim: ft=cfg
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 3.8 KiB |
|
@ -1,241 +0,0 @@
|
|||
## ____ __
|
||||
## / __ \_________ _/ /_____
|
||||
## / / / / ___/ __ `/ //_/ _ \
|
||||
## / /_/ / / / /_/ / ,< / __/ Clay Gomera (Drake)
|
||||
## /_____/_/ \__,_/_/|_|\___/ My custom fish config
|
||||
##
|
||||
|
||||
### ADDING TO THE PATH
|
||||
# First line removes the path; second line sets it. Without the first line,
|
||||
# your path gets massive and fish becomes very slow.
|
||||
set -e fish_user_paths
|
||||
set -U fish_user_paths $HOME/.bin $HOME/.local/bin $HOME/.config/emacs/bin $HOME/Applications /var/lib/flatpak/exports/bin/ $fish_user_paths
|
||||
|
||||
### EXPORT ###
|
||||
set fish_greeting # Supresses fish's intro message
|
||||
set TERM "xterm-256color" # Sets the terminal type
|
||||
set EDITOR "$HOME/.local/bin/lvim"
|
||||
set VISUAL "wezterm start --class editor -- $HOME/.local/bin/lvim"
|
||||
|
||||
### SET BAT AS MANPAGER
|
||||
set -x MANPAGER "sh -c 'col -bx | bat -l man -p'"
|
||||
|
||||
### SET EITHER DEFAULT EMACS MODE OR VI MODE ###
|
||||
function fish_user_key_bindings
|
||||
# fish_default_key_bindings
|
||||
fish_vi_key_bindings
|
||||
end
|
||||
### END OF VI MODE ###
|
||||
|
||||
### AUTOCOMPLETE AND HIGHLIGHT COLORS ###
|
||||
set fish_color_normal brcyan
|
||||
set fish_color_autosuggestion '#504945'
|
||||
set fish_color_command brcyan
|
||||
set fish_color_error '#fb4934'
|
||||
set fish_color_param brcyan
|
||||
|
||||
|
||||
### FUNCTIONS ###
|
||||
# Functions needed for !! and !$
|
||||
function __history_previous_command
|
||||
switch (commandline -t)
|
||||
case "!"
|
||||
commandline -t $history[1]; commandline -f repaint
|
||||
case "*"
|
||||
commandline -i !
|
||||
end
|
||||
end
|
||||
|
||||
function __history_previous_command_arguments
|
||||
switch (commandline -t)
|
||||
case "!"
|
||||
commandline -t ""
|
||||
commandline -f history-token-search-backward
|
||||
case "*"
|
||||
commandline -i '$'
|
||||
end
|
||||
end
|
||||
|
||||
# The bindings for !! and !$
|
||||
if [ "$fish_key_bindings" = "fish_vi_key_bindings" ];
|
||||
bind -Minsert ! __history_previous_command
|
||||
bind -Minsert '$' __history_previous_command_arguments
|
||||
else
|
||||
bind ! __history_previous_command
|
||||
bind '$' __history_previous_command_arguments
|
||||
end
|
||||
|
||||
# Function for creating a backup file
|
||||
# ex: backup file.txt
|
||||
# result: copies file as file.txt.bak
|
||||
function backup --argument filename
|
||||
cp $filename $filename.bak
|
||||
end
|
||||
|
||||
# Function for copying files and directories, even recursively.
|
||||
# ex: copy DIRNAME LOCATIONS
|
||||
# result: copies the directory and all of its contents.
|
||||
function copy
|
||||
set count (count $argv | tr -d \n)
|
||||
if test "$count" = 2; and test -d "$argv[1]"
|
||||
set from (echo $argv[1] | trim-right /)
|
||||
set to (echo $argv[2])
|
||||
command cp -r $from $to
|
||||
else
|
||||
command cp $argv
|
||||
end
|
||||
end
|
||||
|
||||
# Function for printing a column (splits input on whitespace)
|
||||
# ex: echo 1 2 3 | coln 3
|
||||
# output: 3
|
||||
function coln
|
||||
while read -l input
|
||||
echo $input | awk '{print $'$argv[1]'}'
|
||||
end
|
||||
end
|
||||
|
||||
# Function for printing a row
|
||||
# ex: seq 3 | rown 3
|
||||
# output: 3
|
||||
function rown --argument index
|
||||
sed -n "$index p"
|
||||
end
|
||||
|
||||
# Function for ignoring the first 'n' lines
|
||||
# ex: seq 10 | skip 5
|
||||
# results: prints everything but the first 5 lines
|
||||
function skip --argument n
|
||||
tail +(math 1 + $n)
|
||||
end
|
||||
|
||||
# Function for taking the first 'n' lines
|
||||
# ex: seq 10 | take 5
|
||||
# results: prints only the first 5 lines
|
||||
function take --argument number
|
||||
head -$number
|
||||
end
|
||||
### END OF FUNCTIONS ###
|
||||
|
||||
### ALIASES ###
|
||||
# navigation
|
||||
alias ..='cd ..'
|
||||
alias ...='cd ../..'
|
||||
alias .3='cd ../../..'
|
||||
alias .4='cd ../../../..'
|
||||
alias .5='cd ../../../../..'
|
||||
|
||||
# neovim as vim
|
||||
alias vim="$HOME/.local/bin/lvim"
|
||||
|
||||
# newsboat
|
||||
alias newsboat='newsboat -u ~/.config/newsboat/urls'
|
||||
|
||||
# bat as cat
|
||||
alias cat='bat'
|
||||
|
||||
# pfetch as neofetch
|
||||
alias neofetch='pfetch'
|
||||
|
||||
# Changing "ls" to "exa"
|
||||
alias ls='exa -al --color=always --group-directories-first' # my preferred listing
|
||||
alias la='exa -a --color=always --group-directories-first' # all files and dirs
|
||||
alias ll='exa -l --color=always --group-directories-first' # long format
|
||||
alias lt='exa -aT --color=always --group-directories-first' # tree listing
|
||||
alias l.='exa -a | egrep "^\."'
|
||||
|
||||
# package management
|
||||
alias pac-up='paru -Syu'
|
||||
alias pac-get='paru -S'
|
||||
alias pac-rmv='paru -Rcns'
|
||||
alias pac-rmv-sec='paru -R'
|
||||
alias pac-qry='paru -Ss'
|
||||
alias pac-cln='paru -Scc && paru -Rns (pacman -Qtdq)'
|
||||
|
||||
# Colorize grep output (good for log files)
|
||||
alias grep='grep --color=auto'
|
||||
alias egrep='egrep --color=auto'
|
||||
alias fgrep='fgrep --color=auto'
|
||||
|
||||
# file management
|
||||
alias fm="vifm"
|
||||
alias file="vifm"
|
||||
alias flm="vifm"
|
||||
alias cp='cp -iv'
|
||||
alias mv='mv -iv'
|
||||
alias rm='rm -vI'
|
||||
alias mkd='mkdir -pv'
|
||||
alias mkdir='mkdir -pv'
|
||||
|
||||
# audio
|
||||
alias mx='pulsemixer'
|
||||
alias amx='alsamixer'
|
||||
alias mk='cmus'
|
||||
alias ms='cmus'
|
||||
alias music='cmus'
|
||||
|
||||
# multimedia scripts
|
||||
alias fli='flix-cli'
|
||||
alias ani='ani-cli'
|
||||
alias aniq='ani-cli -q'
|
||||
|
||||
# adding flags
|
||||
alias df='df -h' # human-readable sizes
|
||||
alias free='free -m' # show sizes in MB
|
||||
|
||||
# ps
|
||||
alias psa="ps auxf"
|
||||
alias psgrep="ps aux | grep -v grep | grep -i -e VSZ -e"
|
||||
alias psmem='ps auxf | sort -nr -k 4'
|
||||
alias pscpu='ps auxf | sort -nr -k 3'
|
||||
|
||||
# git
|
||||
alias addup='git add -u'
|
||||
alias addall='git add .'
|
||||
alias branch='git branch'
|
||||
alias checkout='git checkout'
|
||||
alias clone='git clone'
|
||||
alias commit='git commit -m'
|
||||
alias fetch='git fetch'
|
||||
alias pull='git pull origin'
|
||||
alias push='git push origin'
|
||||
alias tag='git tag'
|
||||
alias newtag='git tag -a'
|
||||
|
||||
# power management
|
||||
alias po='systemctl poweroff'
|
||||
alias sp='systemctl suspend'
|
||||
alias rb='systemctl reboot'
|
||||
|
||||
# youtube-
|
||||
alias yta-aac="yt-dlp --extract-audio --audio-format aac "
|
||||
alias yta-best="yt-dlp --extract-audio --audio-format best "
|
||||
alias yta-flac="yt-dlp --extract-audio --audio-format flac "
|
||||
alias yta-m4a="yt-dlp --extract-audio --audio-format m4a "
|
||||
alias yta-mp3="yt-dlp --extract-audio --audio-format mp3 "
|
||||
alias yta-opus="yt-dlp --extract-audio --audio-format opus "
|
||||
alias yta-vorbis="yt-dlp --extract-audio --audio-format vorbis "
|
||||
alias yta-wav="yt-dlp --extract-audio --audio-format wav "
|
||||
alias ytv-best="yt-dlp -f bestvideo+bestaudio "
|
||||
alias yt='ytfzf -ftsl'
|
||||
alias youtube='ytfzf -ftsl'
|
||||
alias ytm='ytfzf -mtsl'
|
||||
alias youtube-music='ytfzf -mtsl'
|
||||
|
||||
# the terminal rickroll
|
||||
alias rr='curl -s -L https://raw.githubusercontent.com/keroserene/rickrollrc/master/roll.sh | bash'
|
||||
|
||||
# Mocp must be launched with bash instead of Fish!
|
||||
alias mocp="bash -c mocp"
|
||||
|
||||
# network and bluetooth
|
||||
alias netstats='nmcli dev'
|
||||
alias wfi='nmtui-connect'
|
||||
alias wfi-scan='nmcli dev wifi rescan && nmcli dev wifi list'
|
||||
alias wfi-edit='nmtui-edit'
|
||||
alias wfi-on='nmcli radio wifi on'
|
||||
alias wfi-off='nmcli radio wifi off'
|
||||
alias blt='bluetoothctl'
|
||||
|
||||
### SETTING THE STARSHIP PROMPT ###
|
||||
starship init fish | source
|
|
@ -1,11 +0,0 @@
|
|||
[Filechooser Settings]
|
||||
LocationMode=path-bar
|
||||
ShowHidden=false
|
||||
ShowSizeColumn=true
|
||||
GeometryX=0
|
||||
GeometryY=0
|
||||
GeometryWidth=772
|
||||
GeometryHeight=560
|
||||
SortColumn=name
|
||||
SortOrder=ascending
|
||||
StartupMode=recent
|
|
@ -1,17 +0,0 @@
|
|||
[Settings]
|
||||
gtk-theme-name=gruvbox-dark-gtk
|
||||
gtk-icon-theme-name=gruvbox-dark-icons-gtk
|
||||
gtk-font-name=Cantarell 10
|
||||
gtk-cursor-theme-name=Simp1e-Gruvbox-Dark
|
||||
gtk-cursor-theme-size=24
|
||||
gtk-toolbar-style=GTK_TOOLBAR_BOTH
|
||||
gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR
|
||||
gtk-button-images=1
|
||||
gtk-menu-images=1
|
||||
gtk-enable-event-sounds=1
|
||||
gtk-enable-input-feedback-sounds=0
|
||||
gtk-xft-antialias=1
|
||||
gtk-xft-hinting=1
|
||||
gtk-xft-hintstyle=hintslight
|
||||
gtk-xft-rgba=rgb
|
||||
gtk-application-prefer-dark-theme=1
|
|
@ -1,395 +0,0 @@
|
|||
############################################################
|
||||
### ____ __ ###
|
||||
### / __ \_________ _/ /_____ ###
|
||||
### / / / / ___/ __ `/ //_/ _ \ ###
|
||||
### / /_/ / / / /_/ / ,< / __/ Clay Gomera (Drake) ###
|
||||
### /_____/_/ \__,_/_/|_|\___/ The Hyprland config ###
|
||||
### ###
|
||||
############################################################
|
||||
|
||||
################################
|
||||
### beg_________ ___ ____ ###
|
||||
### / ___/ __ \/ _ \/ __/ ###
|
||||
### / /__/ /_/ / , _/ _/ ###
|
||||
### \___/\____/_/|_/___/ ###
|
||||
### ###
|
||||
############# {{{{ #############
|
||||
|
||||
# AUTOSTART
|
||||
## Wayland backend
|
||||
exec-once = dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP
|
||||
## Polkit agent
|
||||
exec-once = /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
|
||||
## Desktop portals
|
||||
exec-once = /usr/lib/xdg-desktop-portal
|
||||
exec-once = /usr/lib/xdg-desktop-portal-hyprland
|
||||
## Notification daemon
|
||||
exec-once = dunst --config ~/.config/dunst/dunstrc
|
||||
## Top bar
|
||||
exec-once = waybar
|
||||
## Set wallpaper
|
||||
#exec-once = $HOME/.wbg
|
||||
exec-once = swww init
|
||||
## Clipboard history
|
||||
exec-once = wl-paste --type text --watch cliphist store #Stores only text data
|
||||
exec-once = wl-paste --type image --watch cliphist store #Stores only image data
|
||||
|
||||
# MONITORS
|
||||
monitor=,preferred,auto,1
|
||||
|
||||
# INPUT
|
||||
input {
|
||||
kb_layout = us,es
|
||||
kb_options = grp:shift_caps_toggle
|
||||
follow_mouse = 1
|
||||
touchpad {
|
||||
natural_scroll = yes
|
||||
}
|
||||
sensitivity = -0.2 # -1.0 - 1.0, 0 means no modification.
|
||||
}
|
||||
|
||||
# GENERAL
|
||||
general {
|
||||
gaps_in = 4
|
||||
gaps_out = 6
|
||||
border_size = 3
|
||||
col.active_border = rgb(cc241d) rgb(d79921) 45deg
|
||||
col.inactive_border = rgb(504945)
|
||||
layout = master
|
||||
}
|
||||
|
||||
# DECORATIONS
|
||||
decoration {
|
||||
rounding = 0 # Rounded corners
|
||||
blur = yes # Window background blur
|
||||
blur_size = 4
|
||||
blur_passes = 1.5
|
||||
blur_new_optimizations = yes
|
||||
drop_shadow = yes
|
||||
shadow_range = 5
|
||||
shadow_render_power = 3
|
||||
col.shadow = rgba(1a1a1aee)
|
||||
}
|
||||
|
||||
# ANIMATIONS
|
||||
animations {
|
||||
enabled = yes
|
||||
bezier = linear,0,0,1,1
|
||||
# window creation
|
||||
animation = windowsIn,1, 3,default,popin
|
||||
animation = fadeIn,1, 3,default
|
||||
# window destruction
|
||||
animation = windowsOut,1, 3,default,popin
|
||||
animation = fadeOut,1, 3,default
|
||||
# window movement
|
||||
animation = windowsMove,1, 3,default,popin
|
||||
animation = border, 1, 2, linear
|
||||
animation = borderangle, 1, 25, linear, loop
|
||||
animation = fade, 1, 7, default
|
||||
animation = workspaces, 1, 4, default, slide
|
||||
}
|
||||
|
||||
# DWINDLE LAYOUT CONFIG
|
||||
dwindle {
|
||||
pseudotile = yes # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
|
||||
preserve_split = yes # you probably want this
|
||||
}
|
||||
|
||||
# MASTER LAYOUT CONFIG
|
||||
master {
|
||||
no_gaps_when_only = false
|
||||
new_is_master = false
|
||||
mfact = 0.50
|
||||
}
|
||||
|
||||
# TOUCHPAD GESTURES
|
||||
gestures {
|
||||
workspace_swipe = on
|
||||
}
|
||||
|
||||
# MISC
|
||||
misc {
|
||||
disable_hyprland_logo = true
|
||||
disable_splash_rendering = true
|
||||
mouse_move_enables_dpms = true
|
||||
enable_swallow = true
|
||||
swallow_regex = ^(wezterm)$
|
||||
}
|
||||
|
||||
# MOUSE SENSITIVITY
|
||||
device:epic mouse V1 {
|
||||
sensitivity = -0.5
|
||||
}
|
||||
|
||||
################################
|
||||
### end_________ ___ ____ ###
|
||||
### / ___/ __ \/ _ \/ __/ ###
|
||||
### / /__/ /_/ / , _/ _/ ###
|
||||
### \___/\____/_/|_/___/ ###
|
||||
### ###
|
||||
############# }}}} #############
|
||||
|
||||
###################################
|
||||
### beg___ __ ____ ________ ###
|
||||
### / _ \/ / / / / / __/ __/ ###
|
||||
### / , _/ /_/ / /__/ _/_\ \ ###
|
||||
### /_/|_|\____/____/___/___/ ###
|
||||
### ###
|
||||
############## {{{{ ###############
|
||||
|
||||
# WINDOW RULES
|
||||
windowrule = float, ^(qalculate-gtk)$
|
||||
|
||||
## Workspace 1 - Web
|
||||
windowrule = workspace 1, ^(org.qutebrowser.qutebrowser)$
|
||||
windowrule = workspace 1, ^(newsboat)$
|
||||
windowrule = workspace 1, ^(firefox)$
|
||||
windowrule = workspace 1, ^(Librewolf)$
|
||||
windowrule = workspace 1, ^(Chromium)$
|
||||
windowrule = workspace 1, ^(Brave-browser)$
|
||||
|
||||
## Workspace 2 - File management
|
||||
windowrule = workspace 2, ^(file_manager)$
|
||||
windowrule = workspace 2, ^(Pcmanfm)$
|
||||
|
||||
## Workspace 3 - Editors
|
||||
windowrule = workspace 3, ^(editor)$
|
||||
windowrule = workspace 3, ^(goneovim)$
|
||||
windowrule = workspace 3, ^(Code)$
|
||||
windowrule = workspace 3, ^(Emacs)$
|
||||
windowrule = workspace 3, ^(Notesnook)$
|
||||
|
||||
## Workspace 4 - Chat
|
||||
windowrule = workspace 4, ^(chat_app)$
|
||||
windowrule = workspace 4, ^(Signal)$
|
||||
|
||||
## Workspace 5 - Audio
|
||||
windowrule = workspace 5, ^(music_player)$
|
||||
windowrule = workspace 5, ^(ytfzf_music)$
|
||||
windowrule = workspace 5, ^(audacity)$
|
||||
windowrule = workspace 5, ^(Ardour)$
|
||||
windowrule = workspace 5, ^(carla)$
|
||||
windowrule = workspace 5, ^(carla-control)$
|
||||
windowrule = workspace 5, ^(hydrogen)$
|
||||
windowrule = workspace 5, ^(guitarix)$
|
||||
windowrule = workspace 5, ^(lsp-plugins)$
|
||||
windowrule = workspace 5, ^(QjackCtl)$
|
||||
windowrule = workspace 5, ^(org.rncbc.qpwgraph)$
|
||||
windowrule = workspace 5, ^(soundconverter)$
|
||||
windowrule = workspace 5, ^(kid3-qt)$
|
||||
|
||||
## Workspace 6 - Video
|
||||
windowrule = workspace 6, ^(pitivi)$
|
||||
windowrule = workspace 6, ^(org.kde.kdenlive)$
|
||||
windowrule = workspace 6, ^(mpv)$
|
||||
windowrule = workspace 6, ^(ytfzf)$
|
||||
windowrule = workspace 6, ^(flix_cli)$
|
||||
windowrule = workspace 6, ^(ani_cli)$
|
||||
windowrule = workspace 6, ^(blender)$
|
||||
windowrule = workspace 6, ^(com.obsproject.Studio)$
|
||||
windowrule = workspace 6, ^(fr.handbrake.ghb)$
|
||||
|
||||
## Workspace 7 - Graphics
|
||||
windowrule = workspace 7, ^(org.inkscape.Inkscape)$
|
||||
windowrule = workspace 7, ^(Gimp-2.10)$
|
||||
windowrule = workspace 7, ^(xournalpp)$
|
||||
windowrule = workspace 7, ^(krita)$
|
||||
windowrule = workspace 7, ^(darktable)$
|
||||
windowrule = workspace 7, ^(org.kde.digikam)$
|
||||
|
||||
## Workspace 8 - Office
|
||||
windowrule = workspace 8, ^(libreoffice-writer)$
|
||||
windowrule = workspace 8, ^(libreoffice-calc)$
|
||||
windowrule = workspace 8, ^(libreoffice-impress)$
|
||||
windowrule = workspace 8, ^(libreoffice-base)$
|
||||
windowrule = workspace 8, ^(libreoffice-draw)$
|
||||
windowrule = workspace 8, ^(libreoffice-math)$
|
||||
windowrule = workspace 8, ^(soffice)$
|
||||
windowrule = workspace 8, ^(GeoGebra)$
|
||||
|
||||
## Workspace 9 - Games
|
||||
windowrule = workspace 9, ^(org.libretro.RetroArch)$
|
||||
windowrule = workspace 9, ^(com.github.tkashkin.gamehub)$
|
||||
windowrule = workspace 9, ^(DarkPlaces)$
|
||||
windowrule = workspace 9, ^(pyrogenesis)$
|
||||
windowrule = workspace 9, ^(wesnoth)$
|
||||
windowrule = workspace 9, ^(Steam)$
|
||||
windowrule = workspace 9, ^(Minetest)$
|
||||
|
||||
## Workspace 10 - Extras
|
||||
windowrule = workspace 10, ^(Todoist)$
|
||||
windowrule = workspace 10, ^(btop)$
|
||||
windowrule = workspace 10, ^(htop)$
|
||||
windowrule = workspace 10, ^(pulsemixer)$
|
||||
windowrule = workspace 10, ^(alsamixer)$
|
||||
windowrule = workspace 10, ^(wdisplays)$
|
||||
windowrule = workspace 10, ^(font-manager)$
|
||||
windowrule = workspace 10, ^(org.qbittorrent.qBittorrent)$
|
||||
windowrule = workspace 10, ^(org.keepassxc.KeePassXC)$
|
||||
windowrule = workspace 10, ^(virt-manager)$
|
||||
|
||||
###################################
|
||||
### end___ __ ____ ________ ###
|
||||
### / _ \/ / / / / / __/ __/ ###
|
||||
### / , _/ /_/ / /__/ _/_\ \ ###
|
||||
### /_/|_|\____/____/___/___/ ###
|
||||
### ###
|
||||
############## }}}} ###############
|
||||
|
||||
##################################
|
||||
### beg___ _____ _____ ____ ###
|
||||
### / _ )/ _/ |/ / _ \/ __/ ###
|
||||
### / _ |/ // / // /\ \ ###
|
||||
### /____/___/_/|_/____/___/ ###
|
||||
### ###
|
||||
############## {{{{ ##############
|
||||
|
||||
# MODIFIER KEYS VARIABLES
|
||||
$supMod = SUPER
|
||||
$altMod = ALT
|
||||
$conMod = CONTROL
|
||||
|
||||
# MAIN KEYBINDS
|
||||
bind = $supMod, RETURN, exec, wezterm # Terminal
|
||||
bind = $supMod, q, killactive, # Close window
|
||||
bind = $supMod_$conMod_SHIFT, q, exit, # Exit the compositor
|
||||
bind = $supMod, b, exec, pkill waybar || waybar # Hide/Show the top bar
|
||||
bind = $supMod, v, togglefloating, # Toggle floating mode
|
||||
#bind = $supMod, P, pseudo, # dwindle
|
||||
#bind = $supMod, J, togglesplit, # dwindle
|
||||
|
||||
# FOCUS
|
||||
## Cycle focus with supmod + k,j
|
||||
bind = $supMod, k, layoutmsg, cyclenext
|
||||
bind = $supMod, j, layoutmsg, cycleprev
|
||||
## Focus master window
|
||||
bind = $supMod_SHIFT, RETURN, layoutmsg, focusmaster
|
||||
|
||||
# LAYOUT MANIPULATION
|
||||
## Swap windows
|
||||
bind = $supMod_SHIFT, j, layoutmsg, swapnext
|
||||
bind = $supMod_SHIFT, k, layoutmsg, swapprev
|
||||
## Swap window with master
|
||||
bind = $supMod_$conMod, RETURN, layoutmsg, swapwithmaster
|
||||
## Add/remove window to master stack
|
||||
bind = $supMod, i, layoutmsg, addmaster
|
||||
bind = $supMod, d, layoutmsg, removemaster
|
||||
## Change the master orientation
|
||||
bind = $supMod_SHIFT, l, layoutmsg, orientationnext
|
||||
bind = $supMod_SHIFT, h, layoutmsg, orientationprev
|
||||
## Window resizing
|
||||
bind = $supMod_$conMod, l, resizeactive, 30 0
|
||||
bind = $supMod_$conMod, h, resizeactive, -30 0
|
||||
bind = $supMod_$conMod, j, resizeactive, 0 30
|
||||
bind = $supMod_$conMod, k, resizeactive, 0 -30
|
||||
# Move/resize windows with supmod + lmb/rmb and dragging
|
||||
bindm = $supMod, mouse:272, movewindow
|
||||
bindm = $supMod, mouse:273, resizewindow
|
||||
|
||||
# WORKSPACES MANIPULATION
|
||||
## Switch workspaces with supmod + [0-9]
|
||||
bind = $supMod, 1, workspace, 1
|
||||
bind = $supMod, 2, workspace, 2
|
||||
bind = $supMod, 3, workspace, 3
|
||||
bind = $supMod, 4, workspace, 4
|
||||
bind = $supMod, 5, workspace, 5
|
||||
bind = $supMod, 6, workspace, 6
|
||||
bind = $supMod, 7, workspace, 7
|
||||
bind = $supMod, 8, workspace, 8
|
||||
bind = $supMod, 9, workspace, 9
|
||||
bind = $supMod, 0, workspace, 10
|
||||
## Move active window to a workspace with supmod + shift + [0-9]
|
||||
bind = $supMod_SHIFT, 1, movetoworkspace, 1
|
||||
bind = $supMod_SHIFT, 2, movetoworkspace, 2
|
||||
bind = $supMod_SHIFT, 3, movetoworkspace, 3
|
||||
bind = $supMod_SHIFT, 4, movetoworkspace, 4
|
||||
bind = $supMod_SHIFT, 5, movetoworkspace, 5
|
||||
bind = $supMod_SHIFT, 6, movetoworkspace, 6
|
||||
bind = $supMod_SHIFT, 7, movetoworkspace, 7
|
||||
bind = $supMod_SHIFT, 8, movetoworkspace, 8
|
||||
bind = $supMod_SHIFT, 9, movetoworkspace, 9
|
||||
bind = $supMod_SHIFT, 0, movetoworkspace, 10
|
||||
## Scroll through existing workspaces with supmod + scroll
|
||||
bind = $supMod, mouse_down, workspace, e+1
|
||||
bind = $supMod, mouse_up, workspace, e-1
|
||||
# Scroll through existing workspaces with supmod + arrow keys
|
||||
bind = $supMod, Right, workspace, e+1
|
||||
bind = $supMod, Left, workspace, e-1
|
||||
## Move active window through existing workspaces with supmod + arrow keys
|
||||
bind = $supMod_SHIFT, Left, movetoworkspace, e+1
|
||||
bind = $supMod_SHIFT, Right, movetoworkspace, e-1
|
||||
|
||||
# XF86 KEYS
|
||||
## Media control
|
||||
bindl=, XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_SINK@ 5%+ # Increase volume by 5%
|
||||
bindl=, XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_SINK@ 5%- # Decrease volume by 5%
|
||||
bindl=, XF86AudioMute, exec, wpctl set-mute @DEFAULT_SINK@ toggle # Toggle mute
|
||||
bindl=, XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_SOURCE@ toggle # Toggle microphone mute
|
||||
bindl=, XF86AudioPause, exec, playerctl play-pause # Play/pause
|
||||
bindl=, XF86AudioPlay, exec, playerctl play-pause # Play/pause
|
||||
bindl=, XF86AudioNext, exec, playerctl next # Next song
|
||||
bindl=, XF86AudioPrev, exec, playerctl previous # Previous song
|
||||
bindl=, XF86AudioStop, exec, playerctl stop # Stop playback
|
||||
## News
|
||||
bindl=, XF86News, exec, wezterm start --class newsboat -- newsboat
|
||||
## Brightness control
|
||||
bindl=, XF86MonBrightnessUp, exec, brightnessctl s 10%+ # Increase brightness by 10%
|
||||
bindl=, XF86MonBrightnessDown, exec, brightnessctl s 10%- # Decrease brightness by 10%
|
||||
## Display setup
|
||||
bindl=, XF86Display, exec, wdisplays # Open the display config tool (wdisplays)
|
||||
|
||||
# ROFI
|
||||
binde = $supMod_SHIFT, d, exec, pkill rofi || rofi -show drun # Desktop launcher
|
||||
binde = $supMod_SHIFT, r, exec, pkill rofi || rofi -show run # Standard launcher
|
||||
binde = $supMod_SHIFT, w, exec, pkill rofi || $HOME/.config/rofi/scripts/rofi_wall # Wallpaper setup
|
||||
binde = $supMod_SHIFT, i, exec, pkill rofi || $HOME/.config/rofi/scripts/rofi_wifi # Wifi setup
|
||||
binde = $supMod_SHIFT, e, exec, pkill rofi || $HOME/.config/rofi/scripts/rofi_emoji # Emoji picker
|
||||
binde = $supMod_SHIFT, s, exec, pkill rofi || $HOME/.config/rofi/scripts/rofi_scrot # Screenshot tool
|
||||
binde = $supMod_$conMod, s, exec, pkill rofi || $HOME/.config/rofi/scripts/rofi_scrot -s # Stop recording (for the screenshot tool)
|
||||
binde = $supMod_SHIFT, q, exec, pkill rofi || $HOME/.config/rofi/scripts/rofi_power # Power setup
|
||||
binde = $supMod_SHIFT, b, exec, pkill rofi || $HOME/.config/rofi/scripts/rofi_blue # Bluetooth setup
|
||||
binde = $supMod_SHIFT, m, exec, pkill rofi || $HOME/.config/rofi/scripts/rofi_mount # External drive mount utility
|
||||
binde = $supMod_SHIFT, c, exec, pkill rofi || cliphist list | rofi -dmenu -p " Clipboard " | cliphist decode | wl-copy # Clipboard history
|
||||
|
||||
# COLOR PICKER
|
||||
binde = $supMod_$conMod, c, exec, hyprpicker -n -a
|
||||
|
||||
# QUICK TERMINAL SCRIPTS/COMMANDS
|
||||
## Workspace 1 - Web
|
||||
binde = $supMod_$altMod, r, exec, wezterm start --class newsboat -- newsboat # RSS feed reader
|
||||
## Workspace 5 - Audio
|
||||
binde = $supMod_$altMod, m, exec, wezterm start --class ytfzf_music -- ytfzf -mlstT chafa # Listen to YouTube Music on the terminal
|
||||
## Workspace 6 - Video
|
||||
binde = $supMod_$altMod, f, exec, wezterm start --class flix_cli -- flix-cli # Watch movies on the terminal
|
||||
binde = $supMod_$altMod, a, exec, wezterm start --class ani_cli -- ani-cli # Watch anime on the terminal
|
||||
binde = $supMod_$altMod, y, exec, wezterm start --class ytfzf -- ytfzf -flstT chafa # Watch YouTube on the terminal
|
||||
## Workspace 10 - Extras
|
||||
binde = $supMod_$altMod, p, exec, wezterm start --class pulsemixer -- pulsemixer # Open the volume mixer (pulsemixer)
|
||||
binde = $supMod_$altMod, o, exec, wezterm start --class alsamixer -- alsamixer # Open the volume mixer (alsamixer)
|
||||
binde = $supMod_$altMod, b, exec, wezterm start --class btop -- btop # Open the system monitor (btop)
|
||||
binde = $supMod_$altMod, h, exec, wezterm start --class htop -- htop # Open the system monitor (htop)
|
||||
|
||||
# MAIN APPS
|
||||
## Workspace 1 - Web
|
||||
binde = $supMod, w, exec, firefox
|
||||
## Workspace 2 - File management
|
||||
binde = $supMod, f, exec, wezterm start --class file_manager -- vifm
|
||||
## Workspace 3 - Editors
|
||||
binde = $supMod, e, exec, wezterm start --class editor -- $HOME/.local/bin/lvim
|
||||
binde = $supMod, n, exec, com.notesnook.Notesnook
|
||||
## Workspace 4 - Chat
|
||||
binde = $supMod, c, exec, signal-desktop
|
||||
## Workspace 5 - Audio
|
||||
binde = $supMod, m, exec, wezterm start --class music_player -- cmus
|
||||
## Workspace 9 - Games
|
||||
binde = $supMod, g, exec, retroarch
|
||||
## Workspace 10 - Extras
|
||||
binde = $supMod, p, exec, keepassxc
|
||||
|
||||
##################################
|
||||
### end___ _____ _____ ____ ###
|
||||
### / _ )/ _/ |/ / _ \/ __/ ###
|
||||
### / _ |/ // / // /\ \ ###
|
||||
### /____/___/_/|_/____/___/ ###
|
||||
### ###
|
||||
############## {{{{ ##############
|
|
@ -1,75 +0,0 @@
|
|||
-- nvim options
|
||||
vim.opt.shiftwidth = 2
|
||||
vim.opt.tabstop = 2
|
||||
vim.opt.relativenumber = true
|
||||
vim.cmd('autocmd FileType markdown setlocal nospell')
|
||||
vim.opt.wrap = true -- wrap lines
|
||||
vim.opt.spell = false
|
||||
vim.o.shell = '/usr/bin/bash'
|
||||
|
||||
-- general
|
||||
lvim.use_icons = false
|
||||
lvim.log.level = "info"
|
||||
lvim.format_on_save = {
|
||||
enabled = true,
|
||||
pattern = "*.lua",
|
||||
timeout = 1000,
|
||||
}
|
||||
|
||||
-- change theme settings
|
||||
lvim.colorscheme = "gruvbox"
|
||||
lvim.transparent_window = true
|
||||
lvim.builtin.alpha.active = true
|
||||
lvim.builtin.alpha.mode = "dashboard"
|
||||
lvim.builtin.terminal.active = true
|
||||
lvim.builtin.nvimtree.setup.view.side = "left"
|
||||
lvim.builtin.nvimtree.setup.renderer.icons.show.git = false
|
||||
|
||||
-- automatically install missing parsers when entering buffer
|
||||
lvim.builtin.treesitter.auto_install = true
|
||||
|
||||
-- additional Plugins
|
||||
lvim.plugins = {
|
||||
{ "lunarvim/colorschemes" },
|
||||
{ "ellisonleao/gruvbox.nvim" },
|
||||
{ "puremourning/vimspector" },
|
||||
{ "OmniSharp/omnisharp-vim" },
|
||||
{ "SirVer/ultisnips" },
|
||||
{ "CRAG666/code_runner.nvim" },
|
||||
}
|
||||
|
||||
-- vimspector options
|
||||
vim.g.vimspector_enable_mappings = 'HUMAN'
|
||||
vim.g.vimspector_enable_mappings_for_mode = {
|
||||
['<leader><leader>'] = { 'n', 'v' },
|
||||
}
|
||||
|
||||
-- code runner options
|
||||
require('code_runner').setup({
|
||||
filetype = {
|
||||
java = {
|
||||
"cd $dir &&",
|
||||
"javac $fileName &&",
|
||||
"java $fileNameWithoutExt"
|
||||
},
|
||||
python = "python3 -u",
|
||||
typescript = "deno run",
|
||||
rust = {
|
||||
"cd $dir &&",
|
||||
"rustc $fileName &&",
|
||||
"$dir/$fileNameWithoutExt"
|
||||
},
|
||||
cs = function(...)
|
||||
local root_dir = require("lspconfig").util.root_pattern "*.csproj" (vim.loop.cwd())
|
||||
return "cd " .. root_dir .. " && dotnet run$end"
|
||||
end,
|
||||
},
|
||||
})
|
||||
|
||||
vim.keymap.set('n', '<leader>r', ':RunCode<CR>', { noremap = true, silent = false })
|
||||
vim.keymap.set('n', '<leader>rf', ':RunFile<CR>', { noremap = true, silent = false })
|
||||
vim.keymap.set('n', '<leader>rft', ':RunFile tab<CR>', { noremap = true, silent = false })
|
||||
vim.keymap.set('n', '<leader>rp', ':RunProject<CR>', { noremap = true, silent = false })
|
||||
vim.keymap.set('n', '<leader>rc', ':RunClose<CR>', { noremap = true, silent = false })
|
||||
vim.keymap.set('n', '<leader>crf', ':CRFiletype<CR>', { noremap = true, silent = false })
|
||||
vim.keymap.set('n', '<leader>crp', ':CRProjects<CR>', { noremap = true, silent = false })
|
|
@ -1,12 +0,0 @@
|
|||
## ____ __
|
||||
## / __ \_________ _/ /_____
|
||||
## / / / / ___/ __ `/ //_/ _ \
|
||||
## / /_/ / / / /_/ / ,< / __/ Clay Gomera (Drake)
|
||||
## /_____/_/ \__,_/_/|_|\___/ My custom mpv config
|
||||
##
|
||||
|
||||
l seek 5
|
||||
h seek -5
|
||||
j seek -60
|
||||
k seek 60
|
||||
S cycle sub
|
|
@ -1,51 +0,0 @@
|
|||
## ____ __
|
||||
## / __ \_________ _/ /_____
|
||||
## / / / / ___/ __ `/ //_/ _ \
|
||||
## / /_/ / / / /_/ / ,< / __/ Clay Gomera (Drake)
|
||||
## /_____/_/ \__,_/_/|_|\___/ My custom newsboat config
|
||||
##
|
||||
show-read-feeds yes
|
||||
auto-reload yes
|
||||
reload-threads 10
|
||||
|
||||
bind-key j down
|
||||
bind-key k up
|
||||
bind-key j next articlelist
|
||||
bind-key k prev articlelist
|
||||
bind-key J next-feed articlelist
|
||||
bind-key K prev-feed articlelist
|
||||
bind-key G end
|
||||
bind-key g home
|
||||
bind-key d pagedown
|
||||
bind-key u pageup
|
||||
bind-key l open
|
||||
bind-key h quit
|
||||
bind-key a toggle-article-read
|
||||
bind-key n next-unread
|
||||
bind-key N prev-unread
|
||||
bind-key D pb-download
|
||||
bind-key U show-urls
|
||||
bind-key x pb-delete
|
||||
|
||||
color listnormal cyan default
|
||||
color listfocus black yellow standout bold
|
||||
color listnormal_unread blue default
|
||||
color listfocus_unread yellow default bold
|
||||
color info red black bold
|
||||
color article white default bold
|
||||
|
||||
highlight all "---.*---" yellow
|
||||
highlight feedlist ".*(0/0))" black
|
||||
highlight article "(^Feed:.*|^Title:.*|^Author:.*)" cyan default bold
|
||||
highlight article "(^Link:.*|^Date:.*)" default default
|
||||
highlight article "https?://[^ ]+" green default
|
||||
highlight article "^(Title):.*$" blue default
|
||||
highlight article "\\[[0-9][0-9]*\\]" magenta default bold
|
||||
highlight article "\\[image\\ [0-9]+\\]" green default bold
|
||||
highlight article "\\[embedded flash: [0-9][0-9]*\\]" green default bold
|
||||
highlight article ":.*\\(link\\)$" cyan default
|
||||
highlight article ":.*\\(image\\)$" blue default
|
||||
highlight article ":.*\\(embedded flash\\)$" magenta default
|
||||
|
||||
browser w3m
|
||||
macro v set browser "mpv %u" ; open-in-browser ; set browser "elinks %u"
|
|
@ -1,99 +0,0 @@
|
|||
http://static.fsf.org/fsforg/rss/news.xml "~FSF News"
|
||||
http://static.fsf.org/fsforg/rss/blogs.xml "~FSF Blogs"
|
||||
https://fsfe.org/news/news.en.rss "~FSFE News"
|
||||
https://dot.kde.org/rss.xml "~KDE Dot News"
|
||||
https://planet.kde.org/global/atom.xml "~Planet KDE"
|
||||
https://pointieststick.com/feed/ "~This Week on KDE"
|
||||
https://www.kdeblog.com/rss "~KDE Blog"
|
||||
https://thisweek.gnome.org/index.xml "~This Week on GNOME"
|
||||
https://www.omgubuntu.co.uk/feed "~OMG Ubuntu!"
|
||||
https://www.omglinux.com/feed "~OMG!Linux"
|
||||
https://blog.thunderbird.net/feed/ "~The Thunderbird Blog"
|
||||
https://thelinuxexp.com/feed.xml "~The Linux Experiment"
|
||||
https://techhut.tv/feed/ "~TechHut Media"
|
||||
https://itsfoss.com/rss/ "~Its FOSS!"
|
||||
https://thelinuxcast.org/feed/feed.xml "~The Linux Cast"
|
||||
https://9to5linux.com/feed/atom "~9to5Linux"
|
||||
https://blog.elementary.io/feed.xml "~elementary OS Blog"
|
||||
https://blog.zorin.com/index.xml "~Zorin OS Blog"
|
||||
http://blog.linuxmint.com/?feed=rss2 "~Linux Mint Blog"
|
||||
https://www.gamingonlinux.com/article_rss.php "~Gaming on linux"
|
||||
https://hackaday.com/blog/feed/ "~Hackaday"
|
||||
https://opensource.com/feed "~Opensource"
|
||||
https://linux.softpedia.com/backend.xml "~Softpedia Linux"
|
||||
https://www.phoronix.com/rss.php "~Phoronix"
|
||||
https://www.computerworld.com/index.rss "~Computerworld"
|
||||
https://www.networkworld.com/category/linux/index.rss "~Networkworld Linux"
|
||||
https://betanews.com/feed "~Betanews Linux"
|
||||
http://lxer.com/module/newswire/headlines.rss "~Lxer"
|
||||
https://theevilskeleton.gitlab.io/feed.xml "~TheEvilSkeleton"
|
||||
https://tutanota.com/blog/feed.xml "~Tutanota Blogs"
|
||||
https://vanillaos.org/feed.xml "~Vanilla OS"
|
||||
https://techcrunch.com/feed/ "~TechCrunch"
|
||||
http://www.techradar.com/rss "~TechRadar"
|
||||
https://www.zdnet.com/news/rss.xml "~ZDNET - News"
|
||||
https://c3po.website/rss/ "~Blog de C3PO"
|
||||
http://yro.slashdot.org/yro.rss "~Slashdot: Your Rights Online"
|
||||
https://freedom-to-tinker.com/feed/rss/ "~Freedom to Tinker"
|
||||
https://act.eff.org/action.atom "~EFF - Action Center"
|
||||
https://www.eff.org/rss/updates.xml "~EFF - Updates"
|
||||
https://victorhckinthefreeworld.com/feed/ "~Victorhck in the free world"
|
||||
https://invidious.sethforprivacy.com/feed/channel/UCHnyfMqiRRG1u-2MsSQLbXA "~YT - Veritasium"
|
||||
https://invidious.sethforprivacy.com/feed/channel/UCtMVHI3AJD4Qk4hcbZnI9ZQ "~YT - SomeOrdinaryGamers"
|
||||
https://invidious.sethforprivacy.com/feed/channel/UCl2mFZoRqjw_ELax4Yisf6w "~YT - Louis Rossmann"
|
||||
https://invidious.sethforprivacy.com/feed/channel/UChI0q9a-ZcbZh7dAu_-J-hg "~YT - Upper Echelon"
|
||||
https://invidious.sethforprivacy.com/feed/channel/UCj8orMezFWVcoN-4S545Wtw "~YT - Max Derrat"
|
||||
https://invidious.sethforprivacy.com/feed/channel/UCkmMACUKpQeIxN9D9ARli1Q "~YT - Shadiversity"
|
||||
https://invidious.sethforprivacy.com/feed/channel/UCNYW2vfGrUE6R5mIJYzkRyQ "~YT - DrossRotzank"
|
||||
https://invidious.sethforprivacy.com/feed/channel/UC36xmz34q02JYaZYKrMwXng "~YT - Nate Gentile"
|
||||
https://invidious.sethforprivacy.com/feed/channel/UCg6gPGh8HU2U01vaFCAsvmQ "~YT - Chris Titus Tech"
|
||||
https://invidious.sethforprivacy.com/feed/channel/UCVls1GmFKf6WlTraIb_IaJg "~YT - DistroTube"
|
||||
https://invidious.sethforprivacy.com/feed/channel/UCxQKHvKbmSzGMvUrVtJYnUA "~YT - Learn Linux TV"
|
||||
https://invidious.sethforprivacy.com/feed/channel/UC5UAwBUum7CPN5buc-_N1Fw "~YT - The Linux Experiment"
|
||||
https://invidious.sethforprivacy.com/feed/channel/UCylGUf9BvQooEFjgdNudoQg "~YT - The Linux Cast"
|
||||
https://invidious.sethforprivacy.com/feed/channel/UCoryWpk4QVYKFCJul9KBdyw "~YT - Switched to Linux"
|
||||
https://invidious.sethforprivacy.com/feed/channel/UCgkyQiY_Q5AlrygIXGWO2Zw "~YT - Tux Traveler"
|
||||
https://invidious.sethforprivacy.com/feed/channel/UCxkw-TfCK1t1VKxfHwPzD6w "~YT - Our Walk in Christ"
|
||||
https://invidious.sethforprivacy.com/feed/channel/UCld68syR8Wi-GY_n4CaoJGA "~YT - Brodie Robertson"
|
||||
https://invidious.sethforprivacy.com/feed/channel/UCjSEJkpGbcZhvo0lr-44X_w "~YT - TechHut"
|
||||
https://invidious.sethforprivacy.com/feed/channel/UC2eYFnH61tmytImy1mTYvhA "~YT - Luke Smith"
|
||||
https://invidious.sethforprivacy.com/feed/channel/UC7YOGHUfC1Tb6E4pudI9STA "~YT - Mental Outlaw"
|
||||
https://invidious.sethforprivacy.com/feed/channel/UC3jSNmKWYA04R47fDcc1ImA "~YT - InfinitelyGalactic"
|
||||
https://invidious.sethforprivacy.com/feed/channel/UCONH73CdRXUjlh3-DdLGCPw "~YT - Nicco Loves Linux"
|
||||
https://invidious.sethforprivacy.com/feed/channel/UC1s1OsWNYDFgbROPV-q5arg "~YT - Michael Horn"
|
||||
https://invidious.sethforprivacy.com/feed/channel/UCOSSzBN8e3JHOxvltQbf_mQ "~YT - Jack Keifer"
|
||||
https://invidious.sethforprivacy.com/feed/channel/UC05XpvbHZUQOfA6xk4dlmcw "~YT - DJ Ware"
|
||||
https://invidious.sethforprivacy.com/feed/channel/UCAiiOTio8Yu69c3XnR7nQBQ "~YT - System Crafters"
|
||||
https://invidious.sethforprivacy.com/feed/channel/UCAYKj_peyESIMDp5LtHlH2A "~YT - unfa"
|
||||
https://invidious.sethforprivacy.com/feed/channel/UCmw-QGOHbHA5cDAvwwqUTKQ "~YT - Zaney"
|
||||
https://invidious.sethforprivacy.com/feed/channel/UCNvl_86ygZXRuXjxbONI5jA "~YT - 10leej"
|
||||
https://invidious.sethforprivacy.com/feed/channel/UC3yaWWA9FF9OBog5U9ml68A "~YT - SavvyNik"
|
||||
https://invidious.sethforprivacy.com/feed/channel/UCS97tchJDq17Qms3cux8wcA "~YT - chris@machine"
|
||||
https://invidious.sethforprivacy.com/feed/channel/UCl8XUDjAOLc7GNKcDp9Nepg "~YT - Locos por Linux"
|
||||
https://invidious.sethforprivacy.com/feed/channel/UClVi5MQZ6T0InZYT7oFs6wg "~YT - Mumbling Hugo"
|
||||
https://invidious.sethforprivacy.com/feed/channel/UCmyGZ0689ODyReHw3rsKLtQ "~YT - Michael Tunnell"
|
||||
https://invidious.sethforprivacy.com/feed/channel/UCv1Kcz-CuGM6mxzL3B1_Eiw "~YT - Gardiner Bryant"
|
||||
https://invidious.sethforprivacy.com/feed/channel/UCcf2Mr1qNoX51XXDUd3Rquw "~YT - ByteSeb"
|
||||
https://invidious.sethforprivacy.com/feed/channel/UCCIHOP7e271SIumQgyl6XBQ "~YT - OldTechBloke"
|
||||
https://invidious.sethforprivacy.com/feed/channel/UCIFzjAer2W9gTWVECZgtDzg "~YT - GaryH Tech"
|
||||
https://invidious.sethforprivacy.com/feed/channel/UCMiyV_Ib77XLpzHPQH_q0qQ "~YT - Veronica Explains"
|
||||
https://invidious.sethforprivacy.com/feed/channel/UCsnGwSIHyoYN0kiINAGUKxg "~YT - Wolfgang's Channel"
|
||||
https://invidious.sethforprivacy.com/feed/channel/UCnIfca4LPFVn8-FjpPVc1ow "~YT - Fedora Project"
|
||||
https://invidious.sethforprivacy.com/feed/channel/UCH5DsMZAgdx5Fkk9wwMNwCA "~YT - The New Oil"
|
||||
https://invidious.sethforprivacy.com/feed/channel/UCs6KfncB4OV6Vug4o_bzijg "~YT - Techlore"
|
||||
https://invidious.sethforprivacy.com/feed/channel/UCYVU6rModlGxvJbszCclGGw "~YT - Rob Braxman Tech"
|
||||
https://invidious.sethforprivacy.com/feed/channel/UCSuHzQ3GrHSzoBbwrIq3LLA "~YT - Naomi Brockwell: NBTV"
|
||||
https://invidious.sethforprivacy.com/feed/channel/UCvFGf8HZGZWFzpcDCqb3Lhw "~YT - All Things Secured"
|
||||
https://invidious.sethforprivacy.com/feed/channel/UCvjgXvBlbQiydffZU7m1_aw "~YT - The Coding Train"
|
||||
https://invidious.sethforprivacy.com/feed/channel/UC9-y-6csu5WGm29I7JiwpnA "~YT - Computerphile"
|
||||
https://invidious.sethforprivacy.com/feed/channel/UCbiGcwDWZjz05njNPrJU7jA "~YT - ExplainingComputers"
|
||||
https://invidious.sethforprivacy.com/feed/channel/UCy0tKL1T7wFoYcxCe0xjN6Q "~YT - Technology Connections"
|
||||
https://invidious.sethforprivacy.com/feed/channel/UC8uT9cgJorJPWu7ITLGo9Ww "~YT - The 8-Bit Guy"
|
||||
https://invidious.sethforprivacy.com/feed/channel/UCoL8olX-259lS1N6QPyP4IQ "~YT - Action Retro"
|
||||
https://invidious.sethforprivacy.com/feed/channel/UCW-HHEyt67RhZ6q21n4p2zQ "~YT - Mac84"
|
||||
https://invidious.sethforprivacy.com/feed/channel/UChT0QzAGfz_pUIbQnePV6KQ "~YT - Pendleton 115"
|
||||
https://invidious.sethforprivacy.com/feed/channel/UC-ErgHYY0_Yjhjz2MN1E1lg "~YT - RETRO Hardware"
|
||||
https://invidious.sethforprivacy.com/feed/channel/UCjgS6Uyg8ok4Jd_lH_MUKgg "~YT - Claus Kellerman"
|
||||
https://invidious.sethforprivacy.com/feed/channel/UC0W_BIuwk8D0Bv4THbVZZOQ "~YT - Surveillance Report"
|
||||
https://invidious.sethforprivacy.com/feed/channel/UCBq5p-xOla8xhnrbhu8AIAg "~YT - Tech Over Tea"
|
||||
|
|
@ -1,31 +0,0 @@
|
|||
[Appearance]
|
||||
color_scheme_path=/usr/share/qt5ct/colors/airy.conf
|
||||
custom_palette=false
|
||||
standard_dialogs=gtk2
|
||||
style=gtk2
|
||||
|
||||
[Fonts]
|
||||
fixed="Mononoki Nerd Font,10,-1,5,50,0,0,0,0,0,Regular"
|
||||
general="Cantarell,10,-1,5,50,0,0,0,0,0,Regular"
|
||||
|
||||
[Interface]
|
||||
activate_item_on_single_click=1
|
||||
buttonbox_layout=0
|
||||
cursor_flash_time=1000
|
||||
dialog_buttons_have_icons=1
|
||||
double_click_interval=400
|
||||
gui_effects=@Invalid()
|
||||
keyboard_scheme=2
|
||||
menus_have_icons=true
|
||||
show_shortcuts_in_context_menus=true
|
||||
stylesheets=@Invalid()
|
||||
toolbutton_style=4
|
||||
underline_shortcut=1
|
||||
wheel_scroll_lines=3
|
||||
|
||||
[SettingsWindow]
|
||||
geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x3\0\0\0\0\0\0\0\0\0\0\0\0\am\0\0\x3\xfc\0\0\0\0\0\0\0\0\0\0\x2\xde\0\0\x2\x84\0\0\0\0\x2\0\0\0\a\x80\0\0\0\0\0\0\0\0\0\0\am\0\0\x3\xfc)
|
||||
|
||||
[Troubleshooting]
|
||||
force_raster_widgets=1
|
||||
ignored_applications=@Invalid()
|
|
@ -1,32 +0,0 @@
|
|||
[Appearance]
|
||||
color_scheme_path=/usr/share/qt6ct/colors/airy.conf
|
||||
custom_palette=false
|
||||
icon_theme=gruvbox-dark-icons-gtk
|
||||
standard_dialogs=gtk2
|
||||
style=qt6gtk2
|
||||
|
||||
[Fonts]
|
||||
fixed="Mononoki Nerd Font,12,-1,5,400,0,0,0,0,0,0,0,0,0,0,1,Regular"
|
||||
general="Cantarell,12,-1,5,400,0,0,0,0,0,0,0,0,0,0,1,Regular"
|
||||
|
||||
[Interface]
|
||||
activate_item_on_single_click=1
|
||||
buttonbox_layout=0
|
||||
cursor_flash_time=1000
|
||||
dialog_buttons_have_icons=1
|
||||
double_click_interval=400
|
||||
gui_effects=@Invalid()
|
||||
keyboard_scheme=2
|
||||
menus_have_icons=true
|
||||
show_shortcuts_in_context_menus=true
|
||||
stylesheets=@Invalid()
|
||||
toolbutton_style=4
|
||||
underline_shortcut=1
|
||||
wheel_scroll_lines=3
|
||||
|
||||
[SettingsWindow]
|
||||
geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x3\0\0\0\0\0\0\0\0\0\0\0\0\am\0\0\x3\xfc\0\0\0\0\0\0\0\0\0\0\am\0\0\x3\xfc\0\0\0\0\0\0\0\0\a\x80\0\0\0\0\0\0\0\0\0\0\am\0\0\x3\xfc)
|
||||
|
||||
[Troubleshooting]
|
||||
force_raster_widgets=1
|
||||
ignored_applications=@Invalid()
|
|
@ -1,104 +0,0 @@
|
|||
configuration{
|
||||
modi: "run,drun,window";
|
||||
lines: 10;
|
||||
font: "mononoki Nerd Font 14";
|
||||
show-icons: true;
|
||||
icon-theme: "gruvbox-dark-icons-gtk";
|
||||
terminal: "alacritty";
|
||||
drun-display-format: "{icon} {name}";
|
||||
location: 0;
|
||||
disable-history: false;
|
||||
hide-scrollbar: true;
|
||||
display-drun: " Apps ";
|
||||
display-run: " Run ";
|
||||
display-window: " Window ";
|
||||
display-Network: " Network ";
|
||||
sidebar-mode: true;
|
||||
dpi: 100;
|
||||
}
|
||||
|
||||
@theme "gruvbox-dark"
|
||||
|
||||
element-text, element-icon , mode-switcher {
|
||||
background-color: inherit;
|
||||
text-color: inherit;
|
||||
}
|
||||
|
||||
window {
|
||||
height: 380;
|
||||
width: 1000;
|
||||
border: 3px;
|
||||
border-color: @border-col;
|
||||
background-color: @bg-col;
|
||||
}
|
||||
|
||||
mainbox {
|
||||
background-color: @bg-col;
|
||||
}
|
||||
|
||||
inputbar {
|
||||
children: [prompt,entry];
|
||||
background-color: @bg-col;
|
||||
border-radius: 5px;
|
||||
padding: 2px;
|
||||
}
|
||||
|
||||
prompt {
|
||||
background-color: @red;
|
||||
padding: 3px;
|
||||
text-color: @bg-col;
|
||||
border-radius: 3px;
|
||||
margin: 20px 0px 0px 20px;
|
||||
}
|
||||
|
||||
textbox-prompt-colon {
|
||||
expand: false;
|
||||
str: ":";
|
||||
}
|
||||
|
||||
entry {
|
||||
padding: 6px;
|
||||
margin: 20px 0px 0px 10px;
|
||||
text-color: @fg-col;
|
||||
background-color: @bg-col;
|
||||
}
|
||||
|
||||
listview {
|
||||
border: 0px 0px 0px;
|
||||
padding: 2px 2px 2px;
|
||||
margin: 10px 20px 0px 20px;
|
||||
columns: 1;
|
||||
background-color: @bg-col;
|
||||
}
|
||||
|
||||
element {
|
||||
padding: 5px;
|
||||
background-color: @bg-col;
|
||||
text-color: @grey;
|
||||
}
|
||||
|
||||
element-icon {
|
||||
size: 28px;
|
||||
}
|
||||
|
||||
element selected {
|
||||
background-color: @selected-col;
|
||||
text-color: @fg-col2;
|
||||
}
|
||||
|
||||
mode-switcher {
|
||||
spacing: 0;
|
||||
}
|
||||
|
||||
button {
|
||||
padding: 10px;
|
||||
background-color: @bg-col;
|
||||
text-color: @inactive;
|
||||
vertical-align: 0.5;
|
||||
horizontal-align: 0.5;
|
||||
}
|
||||
|
||||
button selected {
|
||||
background-color: @selected-col;
|
||||
text-color: @red;
|
||||
}
|
File diff suppressed because it is too large
Load diff
|
@ -1,68 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# ***This script was made by Clay Gomera (Drake)***
|
||||
# - Description: A simple power menu rofi script
|
||||
# - Dependencies: rofi, power-profiles-daemon, swaylock
|
||||
#
|
||||
|
||||
## MENU PROMPT ##
|
||||
menu="rofi -dmenu -i -p"
|
||||
|
||||
## CURRENT WALLPAPER FOR LOCKSCREEN ##
|
||||
currwall=$(tail --l 1 "$HOME/.wbg" | awk '{print $3}')
|
||||
|
||||
## OPTIONS ##
|
||||
option1=" Logout"
|
||||
option2=" Reboot"
|
||||
option3=" Power off"
|
||||
option4=" Suspend"
|
||||
option5=" Lock"
|
||||
option6=" Change power profile"
|
||||
option7=" Cancel"
|
||||
options="$option1\n$option2\n$option3\n$option4\n$option5\n$option6\n$option7"
|
||||
|
||||
## POWER PROFILE OPTIONS ##
|
||||
pwr1=" Performance"
|
||||
pwr2=" Balanced"
|
||||
pwr3=" Power Saver"
|
||||
pwr4=" Cancel"
|
||||
pwrs="$pwr1\n$pwr2\n$pwr3\n$pwr4"
|
||||
|
||||
## MAIN ACTION COMMAND ##
|
||||
action=$(echo -e "$options" | $menu " Power Options ")
|
||||
case "$action" in
|
||||
$option1)
|
||||
pkill Hyprland;;
|
||||
$option2)
|
||||
systemctl reboot || loginctl reboot;;
|
||||
$option3)
|
||||
systemctl poweroff || loginctl poweroff;;
|
||||
$option4)
|
||||
swaylock -i "$currwall" &
|
||||
sleep 0.1
|
||||
systemctl suspend;;
|
||||
$option5)
|
||||
swaylock -i "$currwall";;
|
||||
$option6)
|
||||
currentpwr=$(powerprofilesctl get)
|
||||
if [ "$currentpwr" = "performance" ]; then
|
||||
currentpwr="$pwr1"
|
||||
elif [ "$currentpwr" = "balanced" ]; then
|
||||
currentpwr="$pwr2"
|
||||
elif [ "$currentpwr" = "power-saver" ]; then
|
||||
currentpwr="$pwr3"
|
||||
fi
|
||||
pwraction=$(echo -e "$pwrs" | $menu " Power Profile Menu - Currently set to: ${currentpwr} ")
|
||||
case "$pwraction" in
|
||||
$pwr1*)
|
||||
powerprofilesctl set performance && notify-send "Power profile switched to performance";;
|
||||
$pwr2*)
|
||||
powerprofilesctl set balanced && notify-send "Power profile switched to balanced";;
|
||||
$pwr3*)
|
||||
powerprofilesctl set power-saver && notify-send "Power profile switched to power saver";;
|
||||
$pwr4*)
|
||||
exit 0
|
||||
esac;;
|
||||
$option7)
|
||||
exit 0
|
||||
esac
|
|
@ -1,93 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# ***This script was made by Clay Gomera (Drake)***
|
||||
# - Description: A simple screenshot menu rofi script
|
||||
# - Dependencies: rofi, grim, slurp, wf-recorder
|
||||
#
|
||||
|
||||
# screenshot directory
|
||||
scrdir="$HOME/Pictures/Screenshots"
|
||||
mkdir -p "$scrdir"
|
||||
cd "$scrdir" || exit 1
|
||||
filename=$(date "+%d-%m-%Y_%H:%M:%S")
|
||||
|
||||
# options array
|
||||
option1=" Capture the screen"
|
||||
option2=" Capture region"
|
||||
option3=" Record the screen"
|
||||
option4=" Record region"
|
||||
option5=" Record the screen and audio"
|
||||
option6="Exit"
|
||||
options="$option1\n$option2\n$option3\n$option4\n$option5\n$option6"
|
||||
|
||||
# countdown function
|
||||
countdown() {
|
||||
notify-send "Screenshot" "Executing in 3 seconds" -t 1000
|
||||
sleep 1
|
||||
notify-send "Screenshot" "Executing in 2 seconds" -t 1000
|
||||
sleep 1
|
||||
notify-send "Screenshot" "Executing in 1 seconds" -t 1000
|
||||
sleep 2
|
||||
}
|
||||
|
||||
# show the help output with --help or -h arguments
|
||||
if [[ $1 == '--help' ]] || [[ $1 = '-h' ]]
|
||||
then
|
||||
echo ### rofi-screenshot
|
||||
echo USAGE: rofi-screenshot [OPTION]
|
||||
echo \(no option\)
|
||||
echo " show the screenshot menu"
|
||||
echo -s, --stop
|
||||
echo " stop recording"
|
||||
echo -h, --help
|
||||
echo " this screen"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# stop recording with -s or --stop arguments
|
||||
if [[ $1 = '--stop' ]] || [[ $1 = '-s' ]]
|
||||
then
|
||||
killall -s SIGINT wf-recorder
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# run the selected command
|
||||
choice=$(echo -e "$options" | rofi -dmenu -p " Screenshot " )
|
||||
case $choice in
|
||||
$option1)
|
||||
countdown
|
||||
grim "$filename.jpg"
|
||||
notify-send "Screenshot" "Screenshot saved to $scrdir"
|
||||
;;
|
||||
$option2)
|
||||
notify-send "Screenshot" "Select a region to capture"
|
||||
grim -g "$(slurp)" "$filename.jpg"
|
||||
notify-send "Screenshot" "Region saved to $scrdir"
|
||||
;;
|
||||
$option3)
|
||||
countdown
|
||||
wf-recorder --codec=h264_vaapi -d /dev/dri/renderD128 -f "$filename.mp4"
|
||||
notify-send "Screenshot" "Recording saved to $scrdir"
|
||||
;;
|
||||
$option4)
|
||||
notify-send "Screenshot" "Select a region to record"
|
||||
wf-recorder --codec=h264_vaapi -d /dev/dri/renderD128 -g "$(slurp)" -f "$filename.mp4"
|
||||
notify-send "Screenshot" "Recording saved to $scrdir"
|
||||
;;
|
||||
$option5)
|
||||
devices=$(pactl list sources | grep "Name" | awk '{print $2}')
|
||||
chosendevice=$(echo -e "$devices" | rofi -dmenu -p " Select audio input ")
|
||||
if [ "$chosendevice" ]; then
|
||||
device="$chosendevice"
|
||||
countdown
|
||||
wf-recorder --audio="$device" --codec=h264_vaapi -d /dev/dri/renderD128 -f "$filename.mp4"
|
||||
else
|
||||
notify-send "Please select an audio input device"
|
||||
exit 1
|
||||
fi
|
||||
notify-send "Screenshot" "Recording saved to $scrdir"
|
||||
;;
|
||||
$option6)
|
||||
exit 0
|
||||
;;
|
||||
esac
|
|
@ -1,24 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# ***This script was made by Clay Gomera (Drake)***
|
||||
# - Description: A simple wallpaper changer script
|
||||
# - Dependencies: rofi, fd, swaybg
|
||||
|
||||
## MENU PROMPT ##
|
||||
menu="rofi -dmenu -i -p"
|
||||
|
||||
## WALLPAPER DIRECTORY ##
|
||||
walldir="$HOME/Pictures/Wallpapers" # wallpapers folder, change it to yours
|
||||
|
||||
## SELECT PICTURE ##
|
||||
cd "$walldir" || exit 1
|
||||
wallpaper=$(fd -p "$walldir" | $menu " Wallpaper Selector ")
|
||||
if [ "$wallpaper" ]; then
|
||||
chosenwall=$wallpaper
|
||||
else
|
||||
exit 0
|
||||
fi
|
||||
|
||||
swww img "$chosenwall"
|
||||
echo -e "#!/bin/sh\nswww img $walldir/$chosenwall" > "$HOME/.wbg"
|
||||
exit 0
|
|
@ -1,91 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# ***This script was made by Clay Gomera (Drake)***
|
||||
# - Description: A simple wifi rofi script
|
||||
# - Dependencies: rofi, NetworkManager, io.elementary.capnet-assist
|
||||
|
||||
## MENU PROMPT ##
|
||||
menu="rofi -dmenu -i -p"
|
||||
|
||||
## MAIN OPTIONS ##
|
||||
option1=" Turn on WiFi"
|
||||
option2=" Turn off WiFi"
|
||||
option3=" Disconnect WiFi"
|
||||
option4=" Connect WiFi"
|
||||
option5=" Setup captive portal"
|
||||
option6=" Exit"
|
||||
options="$option1\n$option2\n$option3\n$option4\n$option5\n$option6"
|
||||
|
||||
## GRAB WIFI INTERFACE ##
|
||||
wlan=$(nmcli dev | grep wifi | sed 's/ \{2,\}/|/g' | cut -d '|' -f1 | head -1)
|
||||
|
||||
## TURN OFF WIFI FUNCTION ##
|
||||
turnoff() {
|
||||
nmcli radio wifi off
|
||||
notify-send "WiFi has been turned off"
|
||||
}
|
||||
|
||||
## TURN ON WIFI FUNCTION ##
|
||||
turnon() {
|
||||
nmcli radio wifi on
|
||||
notify-send "WiFi has been turned on"
|
||||
}
|
||||
|
||||
## DISCONNECT WIFI FUNCTION ##
|
||||
disconnect() {
|
||||
nmcli device disconnect "$wlan"
|
||||
sleep 1
|
||||
constate=$(nmcli dev | grep wifi | sed 's/ \{2,\}/|/g' | cut -d '|' -f3 | head -1)
|
||||
if [ "$constate" = "disconnected" ]; then
|
||||
notify-send "WiFi has been disconnected"
|
||||
fi
|
||||
}
|
||||
|
||||
## CONNECT FUNCTION ##
|
||||
connect() {
|
||||
notify-send "Scannig networks, please wait"
|
||||
sleep 1
|
||||
bssid=$(nmcli device wifi list | sed -n '1!p' | cut -b 9- | $menu " Select a Wifi Network " | cut -d' ' -f1)
|
||||
}
|
||||
|
||||
## SELECT PASSWORD FUNCTION ##
|
||||
password() {
|
||||
pass=$(echo " " | $menu " Enter Password " -password)
|
||||
}
|
||||
|
||||
## MAIN CONNECTION COMMAND ##
|
||||
action() {
|
||||
nmcli device wifi connect "$bssid" password "$pass" || nmcli device wifi connect "$bssid"
|
||||
}
|
||||
|
||||
## CHECKING IF WIFI IS WORKING
|
||||
check() {
|
||||
notify-send "Checking if connection was successful"
|
||||
sleep 1
|
||||
currentwfi=$(nmcli dev | grep wifi | sed 's/ \{2,\}/|/g' | cut -d '|' -f4 | head -1)
|
||||
if ping -q -c 2 -W 2 google.com >/dev/null; then
|
||||
notify-send "You are now connected to $currentwfi and internet is working properly"
|
||||
else
|
||||
notify-send "Your internet is not working :("
|
||||
fi
|
||||
}
|
||||
|
||||
## MAIN ACTION COMMANDS ##
|
||||
cases=$(echo -e "$options" | $menu " Wifi Settings " )
|
||||
case "$cases" in
|
||||
$option1*)
|
||||
turnon;;
|
||||
$option2*)
|
||||
turnoff;;
|
||||
$option3*)
|
||||
disconnect;;
|
||||
$option4*)
|
||||
connect;
|
||||
password;
|
||||
action;
|
||||
check;;
|
||||
$option5*)
|
||||
io.elementary.capnet-assist;;
|
||||
$option6*)
|
||||
exit 0
|
||||
esac
|
|
@ -1,16 +0,0 @@
|
|||
* {
|
||||
bg-col: #1d2021;
|
||||
bg-col-light: #282828;
|
||||
border-col: #504945;
|
||||
selected-col: #3c3836;
|
||||
blue: #458588;
|
||||
fg-col: #ebdbb2;
|
||||
fg-col2: #ebdbb2;
|
||||
grey: #928374;
|
||||
width: 600;
|
||||
selected: #ebdbb2;
|
||||
red: #fb4934;
|
||||
green: #98971a;
|
||||
empty: #3c3836;
|
||||
inactive: #928374;
|
||||
}
|
|
@ -1,33 +0,0 @@
|
|||
## ____ __
|
||||
## / __ \_________ _/ /_____
|
||||
## / / / / ___/ __ `/ //_/ _ \
|
||||
## / /_/ / / / /_/ / ,< / __/ Clay Gomera (Drake)
|
||||
## /_____/_/ \__,_/_/|_|\___/ My custom starship prompt config
|
||||
##
|
||||
|
||||
add_newline = false
|
||||
|
||||
[line_break]
|
||||
disabled = true
|
||||
|
||||
[character]
|
||||
error_symbol = "[](bold red) "
|
||||
success_symbol = "[](bold green)"
|
||||
|
||||
[directory]
|
||||
truncation_length = 5
|
||||
home_symbol = " "
|
||||
format = "[$path](bold italic yellow) "
|
||||
|
||||
[hostname]
|
||||
ssh_only = false
|
||||
disabled = false
|
||||
style = "italic #87A752"
|
||||
|
||||
[package]
|
||||
disabled = true
|
||||
|
||||
[username]
|
||||
show_always = true
|
||||
style_user = "bold red"
|
||||
format = "[$user]($style)[ in ](white)"
|
File diff suppressed because it is too large
Load diff
|
@ -1,487 +0,0 @@
|
|||
" ____ __
|
||||
" / __ \_________ _/ /_____
|
||||
" / / / / ___/ __ `/ //_/ _ \
|
||||
" / /_/ / / / /_/ / ,< / __/ Clay Gomera (Drake)
|
||||
" /_____/_/ \__,_/_/|_|\___/ My custom vifm config
|
||||
|
||||
" vim: filetype=vifm :
|
||||
" My config file for the vifm terminal file manager.
|
||||
" ------------------------------------------------------------------------------
|
||||
|
||||
" This is the actual command used to start vi. The default is vim.
|
||||
" If you would like to use emacs or emacsclient, you can use them.
|
||||
" Since emacs is a GUI app and not a terminal app like vim, append the command
|
||||
" with an ampersand (&).
|
||||
|
||||
set vicmd=~/.local/bin/lvim
|
||||
|
||||
" This makes vifm perform file operations on its own instead of relying on
|
||||
" standard utilities like `cp`. While using `cp` and alike is a more universal
|
||||
" solution, it's also much slower when processing large amounts of files and
|
||||
" doesn't support progress measuring.
|
||||
|
||||
set syscalls
|
||||
|
||||
" Trash Directory
|
||||
" The default is to move files that are deleted with dd or :d to
|
||||
" the trash directory. If you change this you will not be able to move
|
||||
" files by deleting them and then using p to put the file in the new location.
|
||||
" I recommend not changing this until you are familiar with vifm.
|
||||
" This probably shouldn't be an option.
|
||||
|
||||
set trash
|
||||
|
||||
" This is how many directories to store in the directory history.
|
||||
|
||||
set history=100
|
||||
|
||||
" Automatically resolve symbolic links on l or Enter.
|
||||
|
||||
set nofollowlinks
|
||||
|
||||
" With this option turned on you can run partially entered commands with
|
||||
" unambiguous beginning using :! (e.g. :!Te instead of :!Terminal or :!Te<tab>).
|
||||
|
||||
" set fastrun
|
||||
|
||||
" Natural sort of (version) numbers within text.
|
||||
|
||||
set sortnumbers
|
||||
|
||||
" Maximum number of changes that can be undone.
|
||||
|
||||
set undolevels=100
|
||||
|
||||
" If you installed the vim.txt help file set vimhelp.
|
||||
" If would rather use a plain text help file set novimhelp.
|
||||
|
||||
set novimhelp
|
||||
|
||||
" If you would like to run an executable file when you
|
||||
" press return on the file name set this.
|
||||
|
||||
set norunexec
|
||||
|
||||
" Selected color scheme
|
||||
" The following line will cause issues if using vifm.vim with regular vim.
|
||||
" Either use neovim or comment out the following line.
|
||||
colorscheme gruvbox-dark
|
||||
|
||||
" Format for displaying time in file list. For example:
|
||||
" TIME_STAMP_FORMAT=%m/%d-%H:%M
|
||||
" See man date or man strftime for details.
|
||||
|
||||
set timefmt=%m/%d\ %H:%M
|
||||
|
||||
" Show list of matches on tab completion in command-line mode
|
||||
|
||||
set wildmenu
|
||||
|
||||
" Display completions in a form of popup with descriptions of the matches
|
||||
|
||||
set wildstyle=popup
|
||||
|
||||
" Display suggestions in normal, visual and view modes for keys, marks and
|
||||
" registers (at most 5 files). In other view, when available.
|
||||
|
||||
set suggestoptions=normal,visual,view,otherpane,keys,marks,registers
|
||||
|
||||
" Ignore case in search patterns unless it contains at least one uppercase
|
||||
" letter
|
||||
|
||||
set ignorecase
|
||||
set smartcase
|
||||
|
||||
" Don't highlight search results automatically
|
||||
|
||||
set nohlsearch
|
||||
|
||||
" Use increment searching (search while typing)
|
||||
set incsearch
|
||||
|
||||
" Try to leave some space from cursor to upper/lower border in lists
|
||||
|
||||
set scrolloff=4
|
||||
|
||||
" Don't do too many requests to slow file systems
|
||||
|
||||
if !has('win')
|
||||
set slowfs=curlftpfs
|
||||
endif
|
||||
|
||||
" Set custom status line look
|
||||
|
||||
set statusline=" Hint: %z%= %A %10u:%-7g %15s %20d "
|
||||
|
||||
" Set line numbers to show
|
||||
|
||||
" ------------------------------------------------------------------------------
|
||||
|
||||
" :mark mark /full/directory/path [filename]
|
||||
|
||||
mark h ~/
|
||||
|
||||
" ------------------------------------------------------------------------------
|
||||
|
||||
" :com[mand][!] command_name action
|
||||
" The following macros can be used in a command
|
||||
" %a is replaced with the user arguments.
|
||||
" %c the current file under the cursor.
|
||||
" %C the current file under the cursor in the other directory.
|
||||
" %f the current selected file, or files.
|
||||
" %F the current selected file, or files in the other directory.
|
||||
" %b same as %f %F.
|
||||
" %d the current directory name.
|
||||
" %D the other window directory name.
|
||||
" %m run the command in a menu window
|
||||
|
||||
command! df df -h %m 2> /dev/null
|
||||
command! diff vim -d %f %F
|
||||
command! zip zip -r %f.zip %f
|
||||
command! run !! ./%f
|
||||
command! make !!make %a
|
||||
command! mkcd :mkdir %a | cd %a
|
||||
command! vgrep vim "+grep %a"
|
||||
command! reload :write | restart
|
||||
|
||||
" ------------------------------------------------------------------------------
|
||||
|
||||
" The file type is for the default programs to be used with
|
||||
" a file extension.
|
||||
" :filetype pattern1,pattern2 defaultprogram,program2
|
||||
" :fileviewer pattern1,pattern2 consoleviewer
|
||||
" The other programs for the file type can be accessed with the :file command
|
||||
" The command macros %f, %F, %d, %F may be used in the commands.
|
||||
" The %a macro is ignored. To use a % you must put %%.
|
||||
|
||||
" For automated FUSE mounts, you must register an extension with :file[x]type
|
||||
" in one of following formats:
|
||||
"
|
||||
" :filetype extensions FUSE_MOUNT|some_mount_command using %SOURCE_FILE and %DESTINATION_DIR variables
|
||||
" %SOURCE_FILE and %DESTINATION_DIR are filled in by vifm at runtime.
|
||||
" A sample line might look like this:
|
||||
" :filetype *.zip,*.jar,*.war,*.ear FUSE_MOUNT|fuse-zip %SOURCE_FILE %DESTINATION_DIR
|
||||
"
|
||||
" :filetype extensions FUSE_MOUNT2|some_mount_command using %PARAM and %DESTINATION_DIR variables
|
||||
" %PARAM and %DESTINATION_DIR are filled in by vifm at runtime.
|
||||
" A sample line might look like this:
|
||||
" :filetype *.ssh FUSE_MOUNT2|sshfs %PARAM %DESTINATION_DIR
|
||||
" %PARAM value is filled from the first line of file (whole line).
|
||||
" Example first line for SshMount filetype: root@127.0.0.1:/
|
||||
"
|
||||
" You can also add %CLEAR if you want to clear screen before running FUSE
|
||||
" program.
|
||||
|
||||
" Pdf
|
||||
filextype *.pdf zathura %c %i &, apvlv %c, xpdf %c
|
||||
fileviewer *.pdf
|
||||
\ pdftotext -nopgbrk %c -
|
||||
|
||||
" PostScript
|
||||
filextype *.ps,*.eps,*.ps.gz
|
||||
\ {View in zathura}
|
||||
\ zathura %f,
|
||||
\ {View in gv}
|
||||
\ gv %c %i &,
|
||||
|
||||
" Djvu
|
||||
filextype *.djvu
|
||||
\ {View in zathura}
|
||||
\ zathura %f,
|
||||
\ {View in apvlv}
|
||||
\ apvlv %f,
|
||||
|
||||
" Audio
|
||||
filetype *.wav,*.mp3,*.flac,*.m4a,*.wma,*.ape,*.ac3,*.og[agx],*.spx,*.opus
|
||||
\ {Play using mpv}
|
||||
\ mpv %f,
|
||||
fileviewer *.mp3 mp3info
|
||||
fileviewer *.flac soxi
|
||||
|
||||
" Video
|
||||
filextype *.avi,*.mp4,*.wmv,*.dat,*.3gp,*.ogv,*.mkv,*.mpg,*.mpeg,*.vob,
|
||||
\*.fl[icv],*.m2v,*.mov,*.webm,*.ts,*.mts,*.m4v,*.r[am],*.qt,*.divx,
|
||||
\*.as[fx]
|
||||
\ {View using mplayer}
|
||||
\ mpv %f,
|
||||
fileviewer *.avi,*.mp4,*.wmv,*.dat,*.3gp,*.ogv,*.mkv,*.mpg,*.mpeg,*.vob,
|
||||
\*.fl[icv],*.m2v,*.mov,*.webm,*.ts,*.mts,*.m4v,*.r[am],*.qt,*.divx,
|
||||
\*.as[fx]
|
||||
\ ffprobe -pretty %c 2>&1
|
||||
|
||||
" Web
|
||||
filextype *.html,*.htm
|
||||
\ {Open with emacs}
|
||||
\ emacsclient -c %c &,
|
||||
\ {Open with vim}
|
||||
\ vim %c &,
|
||||
\ {Open with dwb}
|
||||
\ dwb %f %i &,
|
||||
\ {Open with firefox}
|
||||
\ firefox %f &,
|
||||
\ {Open with uzbl}
|
||||
\ uzbl-browser %f %i &,
|
||||
filetype *.html,*.htm links, lynx
|
||||
|
||||
" Object
|
||||
filetype *.o nm %f | less
|
||||
|
||||
" Man page
|
||||
filetype *.[1-8] man ./%c
|
||||
fileviewer *.[1-8] man ./%c | col -b
|
||||
|
||||
" Images
|
||||
filextype *.bmp,*.jpg,*.jpeg,*.png,*.gif,*.xpm
|
||||
\ {View in imv}
|
||||
\ imv %f &,
|
||||
fileviewer *.bmp,*.jpg,*.jpeg,*.png,*.xpm,*.gif
|
||||
\ wezterm imgcat --width %pw --height %ph %c:p %pd
|
||||
|
||||
" OpenRaster
|
||||
filextype *.ora
|
||||
\ {Edit in MyPaint}
|
||||
\ mypaint %f,
|
||||
|
||||
" Mindmap
|
||||
filextype *.vym
|
||||
\ {Open with VYM}
|
||||
\ vym %f &,
|
||||
|
||||
" MD5
|
||||
filetype *.md5
|
||||
\ {Check MD5 hash sum}
|
||||
\ md5sum -c %f %S,
|
||||
|
||||
" SHA1
|
||||
filetype *.sha1
|
||||
\ {Check SHA1 hash sum}
|
||||
\ sha1sum -c %f %S,
|
||||
|
||||
" SHA256
|
||||
filetype *.sha256
|
||||
\ {Check SHA256 hash sum}
|
||||
\ sha256sum -c %f %S,
|
||||
|
||||
" SHA512
|
||||
filetype *.sha512
|
||||
\ {Check SHA512 hash sum}
|
||||
\ sha512sum -c %f %S,
|
||||
|
||||
" GPG signature
|
||||
filetype *.asc
|
||||
\ {Check signature}
|
||||
\ !!gpg --verify %c,
|
||||
|
||||
" Torrent
|
||||
filetype *.torrent ktorrent %f &
|
||||
fileviewer *.torrent dumptorrent -v %c
|
||||
|
||||
" FuseZipMount
|
||||
filetype *.zip,*.jar,*.war,*.ear,*.oxt,*.apkg
|
||||
\ {Mount with fuse-zip}
|
||||
\ FUSE_MOUNT|fuse-zip %SOURCE_FILE %DESTINATION_DIR,
|
||||
\ {View contents}
|
||||
\ zip -sf %c | less,
|
||||
\ {Extract here}
|
||||
\ tar -xf %c,
|
||||
fileviewer *.zip,*.jar,*.war,*.ear,*.oxt zip -sf %c
|
||||
|
||||
" ArchiveMount
|
||||
filetype *.tar,*.tar.bz2,*.tbz2,*.tgz,*.tar.gz,*.tar.xz,*.txz
|
||||
\ {Mount with archivemount}
|
||||
\ FUSE_MOUNT|archivemount %SOURCE_FILE %DESTINATION_DIR,
|
||||
fileviewer *.tgz,*.tar.gz tar -tzf %c
|
||||
fileviewer *.tar.bz2,*.tbz2 tar -tjf %c
|
||||
fileviewer *.tar.txz,*.txz xz --list %c
|
||||
fileviewer *.tar tar -tf %c
|
||||
|
||||
" Rar2FsMount and rar archives
|
||||
filetype *.rar
|
||||
\ {Mount with rar2fs}
|
||||
\ FUSE_MOUNT|rar2fs %SOURCE_FILE %DESTINATION_DIR,
|
||||
fileviewer *.rar unrar v %c
|
||||
|
||||
" IsoMount
|
||||
filetype *.iso
|
||||
\ {Mount with fuseiso}
|
||||
\ FUSE_MOUNT|fuseiso %SOURCE_FILE %DESTINATION_DIR,
|
||||
|
||||
" SshMount
|
||||
filetype *.ssh
|
||||
\ {Mount with sshfs}
|
||||
\ FUSE_MOUNT2|sshfs %PARAM %DESTINATION_DIR %FOREGROUND,
|
||||
|
||||
" FtpMount
|
||||
filetype *.ftp
|
||||
\ {Mount with curlftpfs}
|
||||
\ FUSE_MOUNT2|curlftpfs -o ftp_port=-,,disable_eprt %PARAM %DESTINATION_DIR %FOREGROUND,
|
||||
|
||||
" Fuse7z and 7z archives
|
||||
filetype *.7z
|
||||
\ {Mount with fuse-7z}
|
||||
\ FUSE_MOUNT|fuse-7z %SOURCE_FILE %DESTINATION_DIR,
|
||||
fileviewer *.7z 7z l %c
|
||||
|
||||
" Office files
|
||||
filextype *.odt,*.doc,*.docx,*.xls,*.xlsx,*.odp,*.pptx libreoffice %f &
|
||||
fileviewer *.doc catdoc %c
|
||||
fileviewer *.docx docx2txt.pl %f -
|
||||
|
||||
" TuDu files
|
||||
filetype *.tudu tudu -f %c
|
||||
|
||||
" Qt projects
|
||||
filextype *.pro qtcreator %f &
|
||||
|
||||
" Directories
|
||||
filextype */
|
||||
\ {View in thunar}
|
||||
\ Thunar %f &,
|
||||
|
||||
" Syntax highlighting in preview
|
||||
"
|
||||
" Explicitly set highlight type for some extensions
|
||||
"
|
||||
" 256-color terminal
|
||||
" fileviewer *.[ch],*.[ch]pp highlight -O xterm256 -s dante --syntax c %c
|
||||
" fileviewer Makefile,Makefile.* highlight -O xterm256 -s dante --syntax make %c
|
||||
"
|
||||
" 16-color terminal
|
||||
" fileviewer *.c,*.h highlight -O ansi -s dante %c
|
||||
"
|
||||
" Or leave it for automatic detection
|
||||
"
|
||||
" fileviewer *[^/] pygmentize -O style=monokai -f console256 -g
|
||||
|
||||
" Displaying pictures in terminal
|
||||
"
|
||||
" fileviewer *.jpg,*.png shellpic %c
|
||||
|
||||
" Open all other files with default system programs (you can also remove all
|
||||
" :file[x]type commands above to ensure they don't interfere with system-wide
|
||||
" settings). By default all unknown files are opened with 'vi[x]cmd'
|
||||
" uncommenting one of lines below will result in ignoring 'vi[x]cmd' option
|
||||
" for unknown file types.
|
||||
" For *nix:
|
||||
" filetype * xdg-open
|
||||
" For OS X:
|
||||
" filetype * open
|
||||
" For Windows:
|
||||
" filetype * start, explorer
|
||||
|
||||
" GETTING ICONS TO DISPLAY IN VIFM
|
||||
" You need the next 14 lines!
|
||||
|
||||
" file types
|
||||
set classify=' :dir:/, :exe:, :reg:, :link:'
|
||||
" various file names
|
||||
set classify+=' ::../::, ::*.sh::, ::*.[hc]pp::, ::*.[hc]::, ::/^copying|license$/::, ::.git/,,*.git/::, ::*.epub,,*.fb2,,*.djvu::, ::*.pdf::, ::*.htm,,*.html,,**.[sx]html,,*.xml::'
|
||||
" archives
|
||||
set classify+=' ::*.7z,,*.ace,,*.arj,,*.bz2,,*.cpio,,*.deb,,*.dz,,*.gz,,*.jar,,*.lzh,,*.lzma,,*.rar,,*.rpm,,*.rz,,*.tar,,*.taz,,*.tb2,,*.tbz,,*.tbz2,,*.tgz,,*.tlz,,*.trz,,*.txz,,*.tz,,*.tz2,,*.xz,,*.z,,*.zip,,*.zoo::'
|
||||
" images
|
||||
set classify+=' ::*.bmp,,*.gif,,*.jpeg,,*.jpg,,*.ico,,*.png,,*.ppm,,*.svg,,*.svgz,,*.tga,,*.tif,,*.tiff,,*.xbm,,*.xcf,,*.xpm,,*.xspf,,*.xwd::'
|
||||
" audio
|
||||
set classify+=' ::*.aac,,*.anx,,*.asf,,*.au,,*.axa,,*.flac,,*.m2a,,*.m4a,,*.mid,,*.midi,,*.mp3,,*.mpc,,*.oga,,*.ogg,,*.ogx,,*.ra,,*.ram,,*.rm,,*.spx,,*.wav,,*.wma,,*.ac3::'
|
||||
" media
|
||||
set classify+=' ::*.avi,,*.ts,,*.axv,,*.divx,,*.m2v,,*.m4p,,*.m4v,,.mka,,*.mkv,,*.mov,,*.mp4,,*.flv,,*.mp4v,,*.mpeg,,*.mpg,,*.nuv,,*.ogv,,*.pbm,,*.pgm,,*.qt,,*.vob,,*.wmv,,*.xvid::'
|
||||
" office files
|
||||
set classify+=' ::*.doc,,*.docx::, ::*.xls,,*.xls[mx]::, ::*.pptx,,*.ppt::'
|
||||
|
||||
" ------------------------------------------------------------------------------
|
||||
|
||||
" What should be saved automatically between vifm runs
|
||||
" Like in previous versions of vifm
|
||||
" set vifminfo=options,filetypes,commands,bookmarks,dhistory,state,cs
|
||||
" Like in vi
|
||||
set vifminfo=dhistory,savedirs,chistory,state,tui,shistory,
|
||||
\phistory,fhistory,dirstack,registers,bookmarks,bmarks
|
||||
|
||||
" ------------------------------------------------------------------------------
|
||||
|
||||
" Examples of configuring both panels
|
||||
|
||||
" Customize view columns a bit (enable ellipsis for truncated file names)
|
||||
"
|
||||
" set viewcolumns=-{name}..,6{}.
|
||||
|
||||
" Filter-out build and temporary files
|
||||
"
|
||||
" filter! /^.*\.(lo|o|d|class|py[co])$|.*~$/
|
||||
|
||||
" ------------------------------------------------------------------------------
|
||||
|
||||
" Sample mappings
|
||||
|
||||
"Open all images in current directory in sxiv thumbnail mode
|
||||
nnoremap sx :!sxiv -t %d & <cr>
|
||||
|
||||
"Open selected images in gimp
|
||||
nnoremap gp :!gimp %f & <cr>
|
||||
|
||||
" Start shell in current directory
|
||||
nnoremap s :shell<cr>
|
||||
|
||||
" Display sorting dialog
|
||||
nnoremap S :sort<cr>
|
||||
|
||||
" Toggle visibility of preview window
|
||||
nnoremap w :view<cr>
|
||||
vnoremap w :view<cr>gv
|
||||
|
||||
" Open file in the background using its default program
|
||||
nnoremap gb :file &<cr>l
|
||||
|
||||
" Yank current directory path into the clipboard
|
||||
nnoremap yd :!echo %d | xclip %i<cr>
|
||||
|
||||
" Yank current file path into the clipboard
|
||||
nnoremap yf :!echo %c:p | xclip %i<cr>
|
||||
|
||||
" Mappings for faster renaming
|
||||
nnoremap I cw<c-a>
|
||||
nnoremap cc cw<c-u>
|
||||
nnoremap A cw
|
||||
|
||||
" Open console in current directory
|
||||
nnoremap ,t :!xterm &<cr>
|
||||
|
||||
" Open editor to edit vifmrc and apply settings after returning to vifm
|
||||
nnoremap ,c :write | edit $MYVIFMRC | restart<cr>
|
||||
" Open gvim to edit vifmrc
|
||||
nnoremap ,C :!gvim --remote-tab-silent $MYVIFMRC &<cr>
|
||||
|
||||
" Toggle wrap setting on ,w key
|
||||
nnoremap ,w :set wrap!<cr>
|
||||
|
||||
" Example of standard two-panel file managers mappings
|
||||
nnoremap <f3> :!less %f<cr>
|
||||
nnoremap <f4> :edit<cr>
|
||||
nnoremap <f5> :copy<cr>
|
||||
nnoremap <f6> :move<cr>
|
||||
nnoremap <f7> :mkdir<space>
|
||||
nnoremap <f8> :delete<cr>
|
||||
|
||||
" ------------------------------------------------------------------------------
|
||||
|
||||
" Various customization examples
|
||||
|
||||
" Use ag (the silver searcher) instead of grep
|
||||
"
|
||||
" set grepprg='ag --line-numbers %i %a %s'
|
||||
|
||||
" Add additional place to look for executables
|
||||
"
|
||||
" let $PATH = $HOME.'/bin/fuse:'.$PATH
|
||||
|
||||
" Block particular shortcut
|
||||
"
|
||||
" nnoremap <left> <nop>
|
||||
|
||||
" Export IPC name of current instance as environment variable and use it to
|
||||
" communicate with the instance later.
|
||||
"
|
||||
" It can be used in some shell script that gets run from inside vifm, for
|
||||
" example, like this:
|
||||
" vifm --server-name "$VIFM_SERVER_NAME" --remote +"cd '$PWD'"
|
||||
"
|
||||
" let $VIFM_SERVER_NAME = v:servername
|
|
@ -1,108 +0,0 @@
|
|||
{
|
||||
"position": "top",
|
||||
"height": 41,
|
||||
"spacing": 3,
|
||||
"layer": "top",
|
||||
|
||||
// Choose the order of the modules
|
||||
"modules-left": ["wlr/workspaces"],
|
||||
// "modules-center": ["clock"],
|
||||
"modules-right": ["idle_inhibitor", "hyprland/language", "pulseaudio", "backlight", "battery", "custom/powerprofiles", "network", "clock"],
|
||||
|
||||
"wlr/workspaces": {
|
||||
"on-click": "activate",
|
||||
"sort-by-number": true,
|
||||
"on-scroll-up": "hyprctl dispatch workspace e+1",
|
||||
"on-scroll-down": "hyprctl dispatch workspace e-1",
|
||||
"format": "{icon}",
|
||||
"format-icons": {
|
||||
"1": "\uf269",
|
||||
"2": "\uf07b",
|
||||
"3": "\ue7c5",
|
||||
"4": "\uf075",
|
||||
"5": "\uf001",
|
||||
"6": "\uf03d",
|
||||
"7": "\ue22b",
|
||||
"8": "\uf15c",
|
||||
"9": "\udb80\ude96",
|
||||
"10": "\ue20f",
|
||||
"urgent": "\uf12a",
|
||||
"focused": "\uf192",
|
||||
"default": "\uf10c"
|
||||
}
|
||||
},
|
||||
|
||||
"hyprland/language": {
|
||||
"format": "{} \udb80\udf0c",
|
||||
"format-en": "US",
|
||||
"format-es": "ES",
|
||||
},
|
||||
|
||||
"idle_inhibitor": {
|
||||
"format": "{icon}",
|
||||
"format-icons": {
|
||||
"activated": "\udb83\udf62",
|
||||
"deactivated": "\udb83\udf64"
|
||||
}
|
||||
},
|
||||
|
||||
"clock": {
|
||||
"tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>",
|
||||
"format": "\udb82\udd54 {:%H:%M}",
|
||||
"format-alt": "\udb80\udcf5 {:%Y-%m-%d}"
|
||||
},
|
||||
|
||||
"backlight": {
|
||||
"format": "{percent}% {icon}",
|
||||
"format-icons": ["\udb86\ude4e", "\udb86\ude4f", "\udb86\ude50", "\udb86\ude51", "\udb86\ude52", "\udb86\ude53", "\udb86\ude54", "\udb86\ude55", "\udb81\udee8"]
|
||||
},
|
||||
|
||||
"battery": {
|
||||
"states": {
|
||||
"warning": 30,
|
||||
"critical": 15
|
||||
},
|
||||
"format": "{capacity}% {icon}",
|
||||
"format-charging": "{capacity}% {icon}\udb81\udea5",
|
||||
"format-plugged": "{capacity}% {icon}\udb81\udea5",
|
||||
"format-alt": "{time} {icon}",
|
||||
"format-critical": "{capacity}% {icon}\udb84\ude38",
|
||||
"format-warning": "{capacity}% {icon}\udb84\ude38",
|
||||
"format-icons": ["\udb80\udc7a", "\udb80\udc7c", "\udb80\udc7e", "\udb80\udc80", "\udb80\udc79"]
|
||||
},
|
||||
|
||||
"custom/powerprofiles": {
|
||||
"exec": "bash $HOME/.config/waybar/power-profiles",
|
||||
"restart-interval": 5,
|
||||
"format": "{}",
|
||||
},
|
||||
|
||||
"pulseaudio": {
|
||||
"scroll-step": 1, // %, can be a float
|
||||
"format": "{volume}% {icon} {format_source}",
|
||||
"format-bluetooth": "{volume}% {icon}\udb80\udcaf {format_source}",
|
||||
"format-bluetooth-muted": "\udb81\udd81 {icon}\udb80\udcaf {format_source}",
|
||||
"format-muted": "\udb81\udd81 {format_source}",
|
||||
"format-source": "{volume}% \udb80\udf6c",
|
||||
"format-source-muted": "\udb80\udf6d",
|
||||
"format-icons": {
|
||||
"headphone": "\udb80\udecb",
|
||||
"hands-free": "\udb86\udc4f",
|
||||
"headset": "\udb80\udece",
|
||||
"phone": "\udb80\udff2",
|
||||
"portable": "\udb80\udff2",
|
||||
"car": "\udb80\udd0b",
|
||||
"default": ["\udb81\udd7f", "\udb81\udd80", "\udb81\udd7e"]
|
||||
},
|
||||
"on-click": "wezterm start --class pulsemixer -- pulsemixer"
|
||||
},
|
||||
|
||||
"network": {
|
||||
// "interface": "wlp2*", // (Optional) To force the use of this interface
|
||||
"format-wifi": "{essid} \udb81\udda9",
|
||||
"format-ethernet": "{ipaddr}/{cidr} \udb80\ude00",
|
||||
"format-disconnected": "Disconnected \udb81\uddaa",
|
||||
"format-alt": "{ifname}: {ipaddr}/{cidr}"
|
||||
},
|
||||
}
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
#!/bin/bash
|
||||
currntpwr=$(powerprofilesctl get)
|
||||
if [ "${currntpwr}" = "performance" ]; then
|
||||
pwr="Performance "
|
||||
elif [ "${currntpwr}" = "balanced" ]; then
|
||||
pwr="Balanced "
|
||||
elif [ "${currntpwr}" = "power-saver" ]; then
|
||||
pwr="PowerSaver "
|
||||
fi
|
||||
echo "$pwr"
|
|
@ -1,169 +0,0 @@
|
|||
* {
|
||||
margin-top: 2px;
|
||||
margin-bottom: 2px;
|
||||
margin-right: 2px;
|
||||
margin-left: 2px;
|
||||
}
|
||||
|
||||
window#waybar {
|
||||
background-color: rgb(29, 32, 33);
|
||||
color: #ebdbb2;
|
||||
transition-property: background-color;
|
||||
transition-duration: .5s;
|
||||
}
|
||||
|
||||
window#waybar.hidden {
|
||||
opacity: 0.2;
|
||||
}
|
||||
|
||||
window#waybar.termite {
|
||||
background-color: #3F3F3F;
|
||||
}
|
||||
|
||||
window#waybar.chromium {
|
||||
background-color: #000000;
|
||||
border: none;
|
||||
}
|
||||
|
||||
button {
|
||||
/* Use box-shadow instead of border so the text isn't offset */
|
||||
box-shadow: inset 0 -3px transparent;
|
||||
/* Avoid rounded borders under each button name */
|
||||
border: none;
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
/* https://github.com/Alexays/Waybar/wiki/FAQ#the-workspace-buttons-have-a-strange-hover-effect */
|
||||
button:hover {
|
||||
background: inherit;
|
||||
}
|
||||
|
||||
#workspaces {
|
||||
font-family: Symbols Nerd Font Mono;
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
#workspaces button {
|
||||
padding: 0 3px;
|
||||
background-color: transparent;
|
||||
color: #ebdbb2;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
#workspaces button.active {
|
||||
color: #8ec07c;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
#workspaces button:hover {
|
||||
color: #fb4934;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
#workspaces button.urgent {
|
||||
background-color: #eb4d4b;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
#mode {
|
||||
background-color: #64727D;
|
||||
border-bottom: 3px solid #ffffff;
|
||||
}
|
||||
|
||||
#clock,
|
||||
#custom-powerprofiles,
|
||||
#battery,
|
||||
#backlight,
|
||||
#network,
|
||||
#pulseaudio,
|
||||
#language,
|
||||
#mode,
|
||||
#idle_inhibitor {
|
||||
font-family: Symbols Nerd Font Mono, mononoki Nerd Font;
|
||||
font-size: 16px;
|
||||
padding: 0 8px;
|
||||
color: #ebdbb2;
|
||||
}
|
||||
|
||||
#window,
|
||||
#workspaces {
|
||||
margin: 0 4px;
|
||||
}
|
||||
|
||||
/* If workspaces is the leftmost module, omit left margin */
|
||||
.modules-left > widget:first-child > #workspaces {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
/* If workspaces is the rightmost module, omit right margin */
|
||||
.modules-right > widget:last-child > #workspaces {
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
#clock {
|
||||
background-color: #504945;
|
||||
}
|
||||
|
||||
#battery {
|
||||
background-color: #79740e;
|
||||
}
|
||||
|
||||
#battery.charging, #battery.plugged {
|
||||
background-color: #98971a;
|
||||
}
|
||||
|
||||
@keyframes blink {
|
||||
to {
|
||||
background-color: #ffffff;
|
||||
color: #000000;
|
||||
}
|
||||
}
|
||||
|
||||
#battery.critical:not(.charging) {
|
||||
background-color: #9d0006;
|
||||
animation-name: blink;
|
||||
animation-duration: 0.5s;
|
||||
animation-timing-function: linear;
|
||||
animation-iteration-count: infinite;
|
||||
animation-direction: alternate;
|
||||
}
|
||||
|
||||
label:focus {
|
||||
background-color: #ebdbb2;
|
||||
}
|
||||
|
||||
#backlight {
|
||||
background-color: #b57614;
|
||||
}
|
||||
|
||||
#network {
|
||||
background-color: #9d0006;
|
||||
}
|
||||
|
||||
#network.disconnected {
|
||||
background-color: #9d0006;
|
||||
}
|
||||
|
||||
#pulseaudio {
|
||||
background-color: #076678;
|
||||
}
|
||||
|
||||
#pulseaudio.muted {
|
||||
background-color: #076678;
|
||||
}
|
||||
|
||||
#idle_inhibitor {
|
||||
background-color: #af3a03;
|
||||
}
|
||||
|
||||
#idle_inhibitor.activated {
|
||||
background-color: #d55d09;
|
||||
}
|
||||
|
||||
#language {
|
||||
background-color: #8f3f71;
|
||||
}
|
||||
|
||||
#custom-powerprofiles {
|
||||
background-color: #427b58;
|
||||
}
|
|
@ -1,33 +0,0 @@
|
|||
local wezterm = require 'wezterm'
|
||||
local gpus = wezterm.gui.enumerate_gpus()
|
||||
|
||||
return {
|
||||
enable_wayland = true,
|
||||
font = wezterm.font {
|
||||
family = 'mononoki Nerd Font',
|
||||
weight = 'Medium'
|
||||
},
|
||||
color_scheme = 'Gruvbox dark, hard (base16)',
|
||||
default_prog = { '/usr/bin/fish' },
|
||||
default_cursor_style = "BlinkingUnderline",
|
||||
font_size = 12,
|
||||
check_for_updates = false,
|
||||
use_dead_keys = false,
|
||||
warn_about_missing_glyphs = false,
|
||||
enable_kitty_graphics = true,
|
||||
animation_fps = 1,
|
||||
cursor_blink_rate = 175,
|
||||
hide_tab_bar_if_only_one_tab = true,
|
||||
adjust_window_size_when_changing_font_size = false,
|
||||
window_padding = {
|
||||
left = 10,
|
||||
right = 10,
|
||||
top = 10,
|
||||
bottom = 10,
|
||||
},
|
||||
use_fancy_tab_bar = false,
|
||||
exit_behavior = "Close",
|
||||
window_close_confirmation = 'NeverPrompt',
|
||||
tab_bar_at_bottom = false,
|
||||
window_background_opacity = 0.9,
|
||||
}
|
|
@ -1,54 +0,0 @@
|
|||
## ____ __
|
||||
## / __ \_________ _/ /_____
|
||||
## / / / / ___/ __ `/ //_/ _ \
|
||||
## / /_/ / / / /_/ / ,< / __/ Clay Gomera (Drake)
|
||||
## /_____/_/ \__,_/_/|_|\___/ My custom zathura config
|
||||
##
|
||||
|
||||
set font "mononoki Nerd Font 9"
|
||||
set default-bg "#262626" #00
|
||||
set default-fg "#ebdbb2" #01
|
||||
|
||||
set statusbar-fg "#ebdbb2" #04
|
||||
set statusbar-bg "#262626" #01
|
||||
|
||||
set inputbar-bg "#262626" #00 currently not used
|
||||
set inputbar-fg "#ebdbb2" #02
|
||||
|
||||
set notification-error-bg "#262626" #08
|
||||
set notification-error-fg "#cc241d" #00
|
||||
|
||||
set notification-warning-bg "#262626" #08
|
||||
set notification-warning-fg "#d79921" #00
|
||||
|
||||
set highlight-color "#262626" #0A
|
||||
set highlight-active-color "#ebdbb2" #0D
|
||||
|
||||
set completion-highlight-fg "#4e4e4e" #02
|
||||
set completion-highlight-bg "#87afaf" #0C
|
||||
|
||||
set completion-bg "#4e4e4e" #02
|
||||
set completion-fg "#ebdbb2" #0C
|
||||
|
||||
set notification-bg "#262626" #0B
|
||||
set notification-fg "#458588" #00
|
||||
|
||||
set recolor-lightcolor "#262626" #00
|
||||
set recolor-darkcolor "#ebdbb2" #06
|
||||
set recolor "false"
|
||||
|
||||
# setting recolor-keep true will keep any color your pdf has.
|
||||
# if it is false, it'll just be black and white
|
||||
set recolor-keephue "false"
|
||||
|
||||
set selection-clipboard "clipboard"
|
||||
|
||||
# keybindings
|
||||
map [fullscreen] a adjust_window best-fit
|
||||
map [fullscreen] s adjust_window width
|
||||
map [fullscreen] f follow
|
||||
map [fullscreen] <Tab> toggle_index
|
||||
map [fullscreen] j scroll down
|
||||
map [fullscreen] k scroll up
|
||||
map [fullscreen] h navigate previous
|
||||
map [fullscreen] l navigate next
|
|
@ -1,5 +0,0 @@
|
|||
# This file is written by nwg-look. Do not edit.
|
||||
[Icon Theme]
|
||||
Name=Default
|
||||
Comment=Default Cursor Theme
|
||||
Inherits=Simp1e-Gruvbox-Dark
|
|
@ -1,48 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
cd ~
|
||||
|
||||
# Log WLR errors and logs to the hyprland log. Recommended
|
||||
export HYPRLAND_LOG_WLR=1
|
||||
|
||||
# GTK shit
|
||||
gsettings set org.gnome.desktop.interface gtk-theme 'gruvbox-dark-gtk'
|
||||
gsettings set org.gnome.desktop.interface icon-theme 'gruvbox-dark-icons-gtk'
|
||||
gsettings set org.gnome.desktop.interface cursor-theme 'Simp1e-Gruvbox-Dark'
|
||||
gsettings set org.gnome.desktop.interface font-name 'Cantarell 10'
|
||||
export XCURSOR_THEME=Simp1e-Gruvbox-Dark
|
||||
export XCURSOR_SIZE=16
|
||||
|
||||
# session settings
|
||||
export GTK_IM_MODULE=fcitx
|
||||
export QT_IM_MODULE=fcitx
|
||||
export XMODIFIERS=@im=fcitx
|
||||
export SDL_IM_MODULE=fcitx
|
||||
export GLFW_IM_MODULE=ibus
|
||||
export XDG_CURRENT_DESKTOP=Hyprland
|
||||
export XDG_SESSION_TYPE=wayland
|
||||
export QT_QPA_PLATFORMTHEME=qt5ct
|
||||
export MOZ_ENABLE_WAYLAND=1
|
||||
export GDK_BACKEND=wayland
|
||||
export WM=Hyprland
|
||||
export SDL_VIDEODRIVER=wayland
|
||||
export QT_WAYLAND_DISABLE_WINDOWDECORATION=1
|
||||
export XKB_DEFAULT_LAYOUT="us"
|
||||
|
||||
# clean home
|
||||
export XDG_DATA_HOME="$HOME/.local/share"
|
||||
export XDG_CACHE_HOME="$HOME/.cache"
|
||||
export XDG_CONFIG_HOME="$HOME/.config"
|
||||
export W3M_DIR="$XDG_DATA_HOME/w3m"
|
||||
export GTK2_RC_FILES="$HOME/.config/gtk-2.0/gtkrc-2.0"
|
||||
export WGETRC="$HOME/.config/wget/wgetrc"
|
||||
export INPUTRC="$HOME/.config/inputrc"
|
||||
export GNUPGHOME="$HOME/.local/share/gnupg"
|
||||
|
||||
# default apps
|
||||
export EDITOR="$HOME/.local/bin/lvim" # $EDITOR use lunarvim in terminal
|
||||
export VISUAL="wezterm start --class editor -- $HOME/.local/bin/lvim" # $VISUAL use lunarvim in new terminal window
|
||||
export BROWSER="firefox"
|
||||
export VIEWER="zathura"
|
||||
|
||||
exec Hyprland
|
|
@ -1,53 +0,0 @@
|
|||
# Dependencies
|
||||
- ttf-mononoki-nerd
|
||||
- rofi-lboon-wayland-git
|
||||
- waybar-hyprland
|
||||
- swww-git
|
||||
- dunst
|
||||
- xdg-desktop-portal
|
||||
- xdg-desktop-portal-gtk
|
||||
- xdg-desktop-portal-hyprland
|
||||
- polkit-gnome
|
||||
- qt5-wayland
|
||||
- qt6-wayland
|
||||
- swaylock
|
||||
- slurp
|
||||
- grim
|
||||
- wl-clipboard
|
||||
- wf-recorder
|
||||
- wezterm
|
||||
- hyprland-git
|
||||
- hyprpicker-git
|
||||
- cmus
|
||||
- tut-bin
|
||||
- ani-cli-git
|
||||
- ytfzf-git
|
||||
- mpv
|
||||
- newsboat
|
||||
- pulsemixer
|
||||
- alsamixer
|
||||
- vifm
|
||||
- power-profiles-daemon
|
||||
- gruvbox-dark-gtk
|
||||
- gruvbox-dark-icons-gtk
|
||||
- xcursor-simp1e-gruvbox-dark
|
||||
- pipewire
|
||||
- pipewire-v4l2
|
||||
- pipewire-alsa
|
||||
- pipewire-pulse
|
||||
- pipewire-jack
|
||||
- pipewire-audio
|
||||
- wireplumber
|
||||
- imv
|
||||
- wdisplays
|
||||
- bluez
|
||||
- bluez-utils
|
||||
- btop
|
||||
- htop
|
||||
- brightnessctl
|
||||
- cliphist
|
||||
- ttf-nerd-fonts-symbols-mono
|
||||
|
||||
# not managed by the package manager
|
||||
- lunarvim
|
||||
- flix-cli
|
|
@ -1,3 +0,0 @@
|
|||
# ~/.bash_logout
|
||||
clear
|
||||
|
|
@ -15,10 +15,16 @@ fi
|
|||
|
||||
### ENVIRONMENT VARIABLES
|
||||
export EDITOR="lvim" # $EDITOR use lunarvim in terminal
|
||||
export VISUAL="neovide --neovim-bin ./.local/bin/lvim" # $VISUAL use neovide for lunarvim in GUI
|
||||
export XDG_DATA_HOME="${XDG_DATA_HOME:="$HOME/.local/share"}"
|
||||
export XDG_CACHE_HOME="${XDG_CACHE_HOME:="$HOME/.cache"}"
|
||||
export XDG_CONFIG_HOME="${XDG_CONFIG_HOME:="$HOME/.config"}"
|
||||
|
||||
# clean home
|
||||
export XDG_DATA_HOME="$HOME/.local/share"
|
||||
export XDG_CACHE_HOME="$HOME/.cache"
|
||||
export XDG_CONFIG_HOME="$HOME/.config"
|
||||
export W3M_DIR="$XDG_DATA_HOME/w3m"
|
||||
export GTK2_RC_FILES="$HOME/.config/gtk-2.0/gtkrc-2.0"
|
||||
export WGETRC="$HOME/.config/wget/wgetrc"
|
||||
export INPUTRC="$HOME/.config/inputrc"
|
||||
export GNUPGHOME="$HOME/.local/share/gnupg"
|
||||
|
||||
### BASHRC
|
||||
source "$HOME"/.bashrc # Load the bashrc
|
||||
|
|
56
user/.bashrc
56
user/.bashrc
|
@ -8,6 +8,11 @@
|
|||
### EXPORT ###
|
||||
export TERM="xterm-256color" # getting proper colors
|
||||
export HISTCONTROL=ignoredups:erasedups # no duplicate entries
|
||||
export EDITOR="$HOME/.local/bin/lvim"
|
||||
export VISUAL="wezterm start --class editor -- $HOME/.local/bin/lvim"
|
||||
|
||||
### "bat" as manpager
|
||||
export MANPAGER="sh -c 'col -bx | bat -l man -p'"
|
||||
|
||||
# use bash-completion, if available
|
||||
[[ $PS1 && -f /usr/share/bash-completion/bash_completion ]] && \
|
||||
|
@ -17,10 +22,7 @@ export HISTCONTROL=ignoredups:erasedups # no duplicate entries
|
|||
[[ $- != *i* ]] && return
|
||||
|
||||
# use neovim for vim if present.
|
||||
[ -x "$(command -v lvim)" ] && alias vim="lvim" vimdiff="lvim -d"
|
||||
|
||||
# use $XINITRC variable if file exists.
|
||||
[ -f "$XINITRC" ] && alias startx="startx $XINITRC"
|
||||
[ -x "$(command -v $HOME/.local/bin/lvim)" ] && alias vim="lvim"
|
||||
|
||||
### SET VI MODE ###
|
||||
# Comment this line out to enable default emacs-like bindings
|
||||
|
@ -38,9 +40,6 @@ fi
|
|||
if [ -d "$HOME/Applications" ] ;
|
||||
then PATH="$HOME/Applications:$PATH"
|
||||
fi
|
||||
if [ -d "$HOME/.config/emacs/bin" ] ;
|
||||
then PATH="$HOME/.config/emacs/bin:$PATH"
|
||||
fi
|
||||
|
||||
### CHANGE TITLE OF TERMINALS ###
|
||||
case ${TERM} in
|
||||
|
@ -128,6 +127,9 @@ alias \
|
|||
# bat as cat
|
||||
[ -x "$(command -v bat)" ] && alias cat="bat"
|
||||
|
||||
# pfetch as neofetch
|
||||
[ -x "$(command -v pfetch)" ] && alias neofetch="pfetch"
|
||||
|
||||
# Changing "ls" to "exa"
|
||||
alias \
|
||||
ls="exa -al --icons --color=always --group-directories-first" \
|
||||
|
@ -136,14 +138,14 @@ alias \
|
|||
lt="exa -aT --icons --color=always --group-directories-first" \
|
||||
l.='exa -a | grep -E "^\."'
|
||||
|
||||
# function to detect os and assign aliases to package managers
|
||||
# pacman
|
||||
alias \
|
||||
pac-up="paru -Syyu" \
|
||||
pac-up="paru -Syu" \
|
||||
pac-get="paru -S" \
|
||||
pac-rmv="paru -Rcns" \
|
||||
pac-rmv-sec="paru -R" \
|
||||
pac-qry="paru -Ss" \
|
||||
pac-cln="paru -Scc"
|
||||
pac-cln="paru -Scc && sudo pacman -Rns $(pacman -Qtdq)"
|
||||
|
||||
# colorize grep output (good for log files)
|
||||
alias \
|
||||
|
@ -153,27 +155,24 @@ alias \
|
|||
|
||||
# git
|
||||
alias \
|
||||
addup="git add -u" \
|
||||
addall="git add ." \
|
||||
branch="git branch" \
|
||||
checkout="git checkout" \
|
||||
clone="git clone" \
|
||||
commit="git commit -m" \
|
||||
fetch="git fetch" \
|
||||
pull="git pull origin" \
|
||||
push="git push origin" \
|
||||
stat="git status" \
|
||||
tag="git tag" \
|
||||
newtag="git tag -a"
|
||||
git-adu="git add -u" \
|
||||
git-adl="git add ." \
|
||||
git-brn="git branch" \
|
||||
git-chk="git checkout" \
|
||||
git-cln="git clone" \
|
||||
git-cmt="git commit -m" \
|
||||
git-fth="git fetch" \
|
||||
git-pll="git pull origin" \
|
||||
git-psh="git push origin" \
|
||||
git-sts="git status" \
|
||||
git-tag="git tag" \
|
||||
git-ntg="git tag -a"
|
||||
|
||||
# adding flags
|
||||
alias \
|
||||
df="df -h" \
|
||||
free="free -m"
|
||||
|
||||
# newsboat
|
||||
[ -x "$(command -v newsboat)" ] && alias newsboat="newsboat -u ~/.config/newsboat/urls"
|
||||
|
||||
# multimedia scripts
|
||||
alias \
|
||||
fli="flix-cli" \
|
||||
|
@ -196,10 +195,9 @@ alias \
|
|||
|
||||
# file management
|
||||
alias \
|
||||
fm="$HOME/.config/vifm/scripts/vifmrun" \
|
||||
file="$HOME/.config/vifm/scripts/vifmrun" \
|
||||
flm="$HOME/.config/vifm/scripts/vifmrun" \
|
||||
vifm="$HOME/.config/vifm/scripts/vifmrun" \
|
||||
fm="vifm" \
|
||||
file="vifm" \
|
||||
flm="vifm" \
|
||||
rm="rm -vI" \
|
||||
mv="mv -iv" \
|
||||
cp="cp -iv" \
|
||||
|
|
|
@ -209,4 +209,4 @@ selected_battery = "Auto"
|
|||
|
||||
#* Set loglevel for "~/.config/btop/btop.log" levels are: "ERROR" "WARNING" "INFO" "DEBUG".
|
||||
#* The level set includes all lower levels, i.e. "DEBUG" will show all logging info.
|
||||
log_level = "WARNING"
|
||||
log_level = "WARNING"
|
||||
|
|
|
@ -163,7 +163,7 @@
|
|||
dmenu = /usr/bin/dmenu -p dunst:
|
||||
|
||||
# Browser for opening urls in context menu.
|
||||
browser = /usr/bin/qutebrowser
|
||||
browser = /usr/bin/firefox
|
||||
|
||||
# Always run rule-defined scripts, even if the notification is suppressed
|
||||
always_run_script = true
|
||||
|
@ -356,3 +356,4 @@
|
|||
# set_stack_tag = "volume"
|
||||
#
|
||||
# vim: ft=cfg
|
||||
|
||||
|
|
|
@ -12,10 +12,10 @@ set -e fish_user_paths
|
|||
set -U fish_user_paths $HOME/.bin $HOME/.local/bin $HOME/.config/emacs/bin $HOME/Applications /var/lib/flatpak/exports/bin/ $fish_user_paths
|
||||
|
||||
### EXPORT ###
|
||||
set fish_greeting # Supresses fish's intro message
|
||||
set TERM "xterm-256color" # Sets the terminal type
|
||||
set EDITOR "lvim" # $EDITOR use lvim in terminal
|
||||
set VISUAL "neovide --neovim-bin ./.local/bin/lvim" # $VISUAL use neovide for lvim in GUI mode
|
||||
set fish_greeting # Supresses fish's intro message
|
||||
set TERM "xterm-256color" # Sets the terminal type
|
||||
set EDITOR "$HOME/.local/bin/lvim"
|
||||
set VISUAL "wezterm start --class editor -- $HOME/.local/bin/lvim"
|
||||
|
||||
### SET BAT AS MANPAGER
|
||||
set -x MANPAGER "sh -c 'col -bx | bat -l man -p'"
|
||||
|
@ -125,9 +125,8 @@ alias .3='cd ../../..'
|
|||
alias .4='cd ../../../..'
|
||||
alias .5='cd ../../../../..'
|
||||
|
||||
# vim and emacs
|
||||
alias vim='lvim'
|
||||
alias vimdiff='lvim -d'
|
||||
# neovim as vim
|
||||
alias vim="$HOME/.local/bin/lvim"
|
||||
|
||||
# newsboat
|
||||
alias newsboat='newsboat -u ~/.config/newsboat/urls'
|
||||
|
@ -135,6 +134,9 @@ alias newsboat='newsboat -u ~/.config/newsboat/urls'
|
|||
# bat as cat
|
||||
alias cat='bat'
|
||||
|
||||
# pfetch as neofetch
|
||||
alias neofetch='pfetch'
|
||||
|
||||
# Changing "ls" to "exa"
|
||||
alias ls='exa -al --color=always --group-directories-first' # my preferred listing
|
||||
alias la='exa -a --color=always --group-directories-first' # all files and dirs
|
||||
|
@ -142,16 +144,13 @@ alias ll='exa -l --color=always --group-directories-first' # long format
|
|||
alias lt='exa -aT --color=always --group-directories-first' # tree listing
|
||||
alias l.='exa -a | egrep "^\."'
|
||||
|
||||
# pacman and yay
|
||||
alias pac-up='paru' # update the system
|
||||
alias pac-get='paru -S' # install a program
|
||||
alias pac-rmv='paru -Rcns' # remove a program
|
||||
alias pac-rmv-sec='paru -R' # remove a program (secure way)
|
||||
alias pac-qry='paru -Ss' # search for a program
|
||||
alias pac-cln='paru -Scc && paru -Rns (pacman -Qtdq)' # clean cache & remove orphaned packages
|
||||
|
||||
# neofetch is f***** slow
|
||||
alias neofetch="pfetch"
|
||||
# package management
|
||||
alias pac-up='paru -Syu'
|
||||
alias pac-get='paru -S'
|
||||
alias pac-rmv='paru -Rcns'
|
||||
alias pac-rmv-sec='paru -R'
|
||||
alias pac-qry='paru -Ss'
|
||||
alias pac-cln='paru -Scc && paru -Rns (pacman -Qtdq)'
|
||||
|
||||
# Colorize grep output (good for log files)
|
||||
alias grep='grep --color=auto'
|
||||
|
@ -159,15 +158,14 @@ alias egrep='egrep --color=auto'
|
|||
alias fgrep='fgrep --color=auto'
|
||||
|
||||
# file management
|
||||
alias fm="vifm"
|
||||
alias file="vifm"
|
||||
alias flm="vifm"
|
||||
alias cp='cp -iv'
|
||||
alias mv='mv -iv'
|
||||
alias rm='rm -vI'
|
||||
alias mkd='mkdir -pv'
|
||||
alias mkdir='mkdir -pv'
|
||||
alias fm='./.config/vifm/scripts/vifmrun'
|
||||
alias vifm='./.config/vifm/scripts/vifmrun'
|
||||
alias file='./.config/vifm/scripts/vifmrun'
|
||||
alias flm='./.config/vifm/scripts/vifmrun'
|
||||
|
||||
# audio
|
||||
alias mx='pulsemixer'
|
||||
|
|
|
@ -4,8 +4,8 @@ ShowHidden=false
|
|||
ShowSizeColumn=true
|
||||
GeometryX=0
|
||||
GeometryY=0
|
||||
GeometryWidth=780
|
||||
GeometryHeight=585
|
||||
GeometryWidth=772
|
||||
GeometryHeight=560
|
||||
SortColumn=name
|
||||
SortOrder=ascending
|
||||
StartupMode=recent
|
||||
|
|
|
@ -1,15 +1,17 @@
|
|||
[Settings]
|
||||
gtk-theme-name=gruvbox-dark-gtk
|
||||
gtk-icon-theme-name=gruvbox-dark-icons-gtk
|
||||
gtk-font-name=mononoki Nerd Font 10
|
||||
gtk-font-name=Cantarell 10
|
||||
gtk-cursor-theme-name=Simp1e-Gruvbox-Dark
|
||||
gtk-cursor-theme-size=0
|
||||
gtk-cursor-theme-size=24
|
||||
gtk-toolbar-style=GTK_TOOLBAR_BOTH
|
||||
gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR
|
||||
gtk-button-images=1
|
||||
gtk-menu-images=1
|
||||
gtk-enable-event-sounds=1
|
||||
gtk-enable-input-feedback-sounds=1
|
||||
gtk-enable-input-feedback-sounds=0
|
||||
gtk-xft-antialias=1
|
||||
gtk-xft-hinting=1
|
||||
gtk-xft-hintstyle=hintfull
|
||||
gtk-xft-hintstyle=hintslight
|
||||
gtk-xft-rgba=rgb
|
||||
gtk-application-prefer-dark-theme=1
|
||||
|
|
|
@ -1,186 +1,75 @@
|
|||
--[[
|
||||
lvim is the global options object
|
||||
|
||||
Linters should be
|
||||
filled in as strings with either
|
||||
a global executable or a path to
|
||||
an executable
|
||||
]]
|
||||
-- THESE ARE EXAMPLE CONFIGS FEEL FREE TO CHANGE TO WHATEVER YOU WANT
|
||||
-- nvim options
|
||||
vim.opt.shiftwidth = 2
|
||||
vim.opt.tabstop = 2
|
||||
vim.opt.relativenumber = true
|
||||
vim.cmd('autocmd FileType markdown setlocal nospell')
|
||||
vim.opt.wrap = true -- wrap lines
|
||||
vim.opt.spell = false
|
||||
vim.o.shell = '/usr/bin/bash'
|
||||
|
||||
-- general
|
||||
vim.opt.guifont = { "mononoki Nerd Font", ":h7" }
|
||||
lvim.log.level = "warn"
|
||||
lvim.format_on_save.enabled = false
|
||||
lvim.use_icons = false
|
||||
lvim.log.level = "info"
|
||||
lvim.format_on_save = {
|
||||
enabled = true,
|
||||
pattern = "*.lua",
|
||||
timeout = 1000,
|
||||
}
|
||||
|
||||
-- change theme settings
|
||||
lvim.colorscheme = "gruvbox"
|
||||
lvim.transparent_window = false
|
||||
-- to disable icons and use a minimalist setup, uncomment the following
|
||||
-- lvim.use_icons = false
|
||||
|
||||
-- keymappings [view all the defaults by pressing <leader>Lk]
|
||||
lvim.leader = "space"
|
||||
-- add your own keymapping
|
||||
lvim.keys.normal_mode["<C-s>"] = ":w<cr>"
|
||||
-- lvim.keys.normal_mode["<S-l>"] = ":BufferLineCycleNext<CR>"
|
||||
-- lvim.keys.normal_mode["<S-h>"] = ":BufferLineCyclePrev<CR>"
|
||||
-- unmap a default keymapping
|
||||
-- vim.keymap.del("n", "<C-Up>")
|
||||
-- override a default keymapping
|
||||
-- lvim.keys.normal_mode["<C-q>"] = ":q<cr>" -- or vim.keymap.set("n", "<C-q>", ":q<cr>" )
|
||||
|
||||
-- Change Telescope navigation to use j and k for navigation and n and p for history in both input and normal mode.
|
||||
-- we use protected-mode (pcall) just in case the plugin wasn't loaded yet.
|
||||
-- local _, actions = pcall(require, "telescope.actions")
|
||||
-- lvim.builtin.telescope.defaults.mappings = {
|
||||
-- -- for input mode
|
||||
-- i = {
|
||||
-- ["<C-j>"] = actions.move_selection_next,
|
||||
-- ["<C-k>"] = actions.move_selection_previous,
|
||||
-- ["<C-n>"] = actions.cycle_history_next,
|
||||
-- ["<C-p>"] = actions.cycle_history_prev,
|
||||
-- },
|
||||
-- -- for normal mode
|
||||
-- n = {
|
||||
-- ["<C-j>"] = actions.move_selection_next,
|
||||
-- ["<C-k>"] = actions.move_selection_previous,
|
||||
-- },
|
||||
-- }
|
||||
|
||||
-- Change theme settings
|
||||
-- lvim.builtin.theme.options.dim_inactive = true
|
||||
-- lvim.builtin.theme.options.style = "storm"
|
||||
|
||||
-- Use which-key to add extra bindings with the leader-key prefix
|
||||
-- lvim.builtin.which_key.mappings["P"] = { "<cmd>Telescope projects<CR>", "Projects" }
|
||||
-- lvim.builtin.which_key.mappings["t"] = {
|
||||
-- name = "+Trouble",
|
||||
-- r = { "<cmd>Trouble lsp_references<cr>", "References" },
|
||||
-- f = { "<cmd>Trouble lsp_definitions<cr>", "Definitions" },
|
||||
-- d = { "<cmd>Trouble document_diagnostics<cr>", "Diagnostics" },
|
||||
-- q = { "<cmd>Trouble quickfix<cr>", "QuickFix" },
|
||||
-- l = { "<cmd>Trouble loclist<cr>", "LocationList" },
|
||||
-- w = { "<cmd>Trouble workspace_diagnostics<cr>", "Workspace Diagnostics" },
|
||||
-- }
|
||||
|
||||
-- TODO: User Config for predefined plugins
|
||||
-- After changing plugin config exit and reopen LunarVim, Run :PackerInstall :PackerCompile
|
||||
lvim.transparent_window = true
|
||||
lvim.builtin.alpha.active = true
|
||||
lvim.builtin.alpha.mode = "dashboard"
|
||||
lvim.builtin.terminal.active = true
|
||||
lvim.builtin.nvimtree.setup.view.side = "left"
|
||||
lvim.builtin.nvimtree.setup.renderer.icons.show.git = false
|
||||
|
||||
-- if you don't want all the parsers change this to a table of the ones you want
|
||||
lvim.builtin.treesitter.ensure_installed = {
|
||||
"bash",
|
||||
"c",
|
||||
"javascript",
|
||||
"json",
|
||||
"lua",
|
||||
"python",
|
||||
"typescript",
|
||||
"tsx",
|
||||
"css",
|
||||
"rust",
|
||||
"java",
|
||||
"yaml",
|
||||
"toml",
|
||||
}
|
||||
-- automatically install missing parsers when entering buffer
|
||||
lvim.builtin.treesitter.auto_install = true
|
||||
|
||||
lvim.builtin.treesitter.ignore_install = { "haskell" }
|
||||
lvim.builtin.treesitter.highlight.enable = true
|
||||
|
||||
-- generic LSP settings
|
||||
|
||||
-- -- make sure server will always be installed even if the server is in skipped_servers list
|
||||
-- lvim.lsp.installer.setup.ensure_installed = {
|
||||
-- "sumneko_lua",
|
||||
-- "jsonls",
|
||||
-- }
|
||||
-- -- change UI setting of `LspInstallInfo`
|
||||
-- -- see <https://github.com/williamboman/nvim-lsp-installer#default-configuration>
|
||||
-- lvim.lsp.installer.setup.ui.check_outdated_servers_on_open = false
|
||||
-- lvim.lsp.installer.setup.ui.border = "rounded"
|
||||
-- lvim.lsp.installer.setup.ui.keymaps = {
|
||||
-- uninstall_server = "d",
|
||||
-- toggle_server_expand = "o",
|
||||
-- }
|
||||
|
||||
-- ---@usage disable automatic installation of servers
|
||||
-- lvim.lsp.installer.setup.automatic_installation = false
|
||||
|
||||
-- ---configure a server manually. !!Requires `:LvimCacheReset` to take effect!!
|
||||
-- ---see the full default list `:lua print(vim.inspect(lvim.lsp.automatic_configuration.skipped_servers))`
|
||||
-- vim.list_extend(lvim.lsp.automatic_configuration.skipped_servers, { "pyright" })
|
||||
-- local opts = {} -- check the lspconfig documentation for a list of all possible options
|
||||
-- require("lvim.lsp.manager").setup("pyright", opts)
|
||||
|
||||
-- ---remove a server from the skipped list, e.g. eslint, or emmet_ls. !!Requires `:LvimCacheReset` to take effect!!
|
||||
-- ---`:LvimInfo` lists which server(s) are skipped for the current filetype
|
||||
-- lvim.lsp.automatic_configuration.skipped_servers = vim.tbl_filter(function(server)
|
||||
-- return server ~= "emmet_ls"
|
||||
-- end, lvim.lsp.automatic_configuration.skipped_servers)
|
||||
|
||||
-- -- you can set a custom on_attach function that will be used for all the language servers
|
||||
-- -- See <https://github.com/neovim/nvim-lspconfig#keybindings-and-completion>
|
||||
-- lvim.lsp.on_attach_callback = function(client, bufnr)
|
||||
-- local function buf_set_option(...)
|
||||
-- vim.api.nvim_buf_set_option(bufnr, ...)
|
||||
-- end
|
||||
-- --Enable completion triggered by <c-x><c-o>
|
||||
-- buf_set_option("omnifunc", "v:lua.vim.lsp.omnifunc")
|
||||
-- end
|
||||
|
||||
-- -- set a formatter, this will override the language server formatting capabilities (if it exists)
|
||||
-- local formatters = require "lvim.lsp.null-ls.formatters"
|
||||
-- formatters.setup {
|
||||
-- { command = "black", filetypes = { "python" } },
|
||||
-- { command = "isort", filetypes = { "python" } },
|
||||
-- {
|
||||
-- -- each formatter accepts a list of options identical to https://github.com/jose-elias-alvarez/null-ls.nvim/blob/main/doc/BUILTINS.md#Configuration
|
||||
-- command = "prettier",
|
||||
-- ---@usage arguments to pass to the formatter
|
||||
-- -- these cannot contain whitespaces, options such as `--line-width 80` become either `{'--line-width', '80'}` or `{'--line-width=80'}`
|
||||
-- extra_args = { "--print-with", "100" },
|
||||
-- ---@usage specify which filetypes to enable. By default a providers will attach to all the filetypes it supports.
|
||||
-- filetypes = { "typescript", "typescriptreact" },
|
||||
-- },
|
||||
-- }
|
||||
|
||||
-- -- set additional linters
|
||||
-- local linters = require "lvim.lsp.null-ls.linters"
|
||||
-- linters.setup {
|
||||
-- { command = "flake8", filetypes = { "python" } },
|
||||
-- {
|
||||
-- -- each linter accepts a list of options identical to https://github.com/jose-elias-alvarez/null-ls.nvim/blob/main/doc/BUILTINS.md#Configuration
|
||||
-- command = "shellcheck",
|
||||
-- ---@usage arguments to pass to the formatter
|
||||
-- -- these cannot contain whitespaces, options such as `--line-width 80` become either `{'--line-width', '80'}` or `{'--line-width=80'}`
|
||||
-- extra_args = { "--severity", "warning" },
|
||||
-- },
|
||||
-- {
|
||||
-- command = "codespell",
|
||||
-- ---@usage specify which filetypes to enable. By default a providers will attach to all the filetypes it supports.
|
||||
-- filetypes = { "javascript", "python" },
|
||||
-- },
|
||||
-- }
|
||||
|
||||
-- Additional Plugins
|
||||
-- additional Plugins
|
||||
lvim.plugins = {
|
||||
{"lunarvim/colorschemes"},
|
||||
{"ellisonleao/gruvbox.nvim"},
|
||||
{ "lunarvim/colorschemes" },
|
||||
{ "ellisonleao/gruvbox.nvim" },
|
||||
{ "puremourning/vimspector" },
|
||||
{ "OmniSharp/omnisharp-vim" },
|
||||
{ "SirVer/ultisnips" },
|
||||
{ "CRAG666/code_runner.nvim" },
|
||||
}
|
||||
|
||||
-- Autocommands (https://neovim.io/doc/user/autocmd.html)
|
||||
-- vim.api.nvim_create_autocmd("BufEnter", {
|
||||
-- pattern = { "*.json", "*.jsonc" },
|
||||
-- -- enable wrap mode for json files only
|
||||
-- command = "setlocal wrap",
|
||||
-- })
|
||||
-- vim.api.nvim_create_autocmd("FileType", {
|
||||
-- pattern = "zsh",
|
||||
-- callback = function()
|
||||
-- -- let treesitter use bash highlight for zsh files as well
|
||||
-- require("nvim-treesitter.highlight").attach(0, "bash")
|
||||
-- end,
|
||||
-- })
|
||||
-- vimspector options
|
||||
vim.g.vimspector_enable_mappings = 'HUMAN'
|
||||
vim.g.vimspector_enable_mappings_for_mode = {
|
||||
['<leader><leader>'] = { 'n', 'v' },
|
||||
}
|
||||
|
||||
-- code runner options
|
||||
require('code_runner').setup({
|
||||
filetype = {
|
||||
java = {
|
||||
"cd $dir &&",
|
||||
"javac $fileName &&",
|
||||
"java $fileNameWithoutExt"
|
||||
},
|
||||
python = "python3 -u",
|
||||
typescript = "deno run",
|
||||
rust = {
|
||||
"cd $dir &&",
|
||||
"rustc $fileName &&",
|
||||
"$dir/$fileNameWithoutExt"
|
||||
},
|
||||
cs = function(...)
|
||||
local root_dir = require("lspconfig").util.root_pattern "*.csproj" (vim.loop.cwd())
|
||||
return "cd " .. root_dir .. " && dotnet run$end"
|
||||
end,
|
||||
},
|
||||
})
|
||||
|
||||
vim.keymap.set('n', '<leader>r', ':RunCode<CR>', { noremap = true, silent = false })
|
||||
vim.keymap.set('n', '<leader>rf', ':RunFile<CR>', { noremap = true, silent = false })
|
||||
vim.keymap.set('n', '<leader>rft', ':RunFile tab<CR>', { noremap = true, silent = false })
|
||||
vim.keymap.set('n', '<leader>rp', ':RunProject<CR>', { noremap = true, silent = false })
|
||||
vim.keymap.set('n', '<leader>rc', ':RunClose<CR>', { noremap = true, silent = false })
|
||||
vim.keymap.set('n', '<leader>crf', ':CRFiletype<CR>', { noremap = true, silent = false })
|
||||
vim.keymap.set('n', '<leader>crp', ':CRProjects<CR>', { noremap = true, silent = false })
|
||||
|
|
|
@ -1,445 +0,0 @@
|
|||
-- Automatically generated packer.nvim plugin loader code
|
||||
|
||||
if vim.api.nvim_call_function('has', {'nvim-0.5'}) ~= 1 then
|
||||
vim.api.nvim_command('echohl WarningMsg | echom "Invalid Neovim version for packer.nvim! | echohl None"')
|
||||
return
|
||||
end
|
||||
|
||||
vim.api.nvim_command('packadd packer.nvim')
|
||||
|
||||
local no_errors, error_msg = pcall(function()
|
||||
|
||||
_G._packer = _G._packer or {}
|
||||
_G._packer.inside_compile = true
|
||||
|
||||
local time
|
||||
local profile_info
|
||||
local should_profile = false
|
||||
if should_profile then
|
||||
local hrtime = vim.loop.hrtime
|
||||
profile_info = {}
|
||||
time = function(chunk, start)
|
||||
if start then
|
||||
profile_info[chunk] = hrtime()
|
||||
else
|
||||
profile_info[chunk] = (hrtime() - profile_info[chunk]) / 1e6
|
||||
end
|
||||
end
|
||||
else
|
||||
time = function(chunk, start) end
|
||||
end
|
||||
|
||||
local function save_profiles(threshold)
|
||||
local sorted_times = {}
|
||||
for chunk_name, time_taken in pairs(profile_info) do
|
||||
sorted_times[#sorted_times + 1] = {chunk_name, time_taken}
|
||||
end
|
||||
table.sort(sorted_times, function(a, b) return a[2] > b[2] end)
|
||||
local results = {}
|
||||
for i, elem in ipairs(sorted_times) do
|
||||
if not threshold or threshold and elem[2] > threshold then
|
||||
results[i] = elem[1] .. ' took ' .. elem[2] .. 'ms'
|
||||
end
|
||||
end
|
||||
if threshold then
|
||||
table.insert(results, '(Only showing plugins that took longer than ' .. threshold .. ' ms ' .. 'to load)')
|
||||
end
|
||||
|
||||
_G._packer.profile_output = results
|
||||
end
|
||||
|
||||
time([[Luarocks path setup]], true)
|
||||
local package_path_str = "/home/drk/.cache/lvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/?.lua;/home/drk/.cache/lvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/?/init.lua;/home/drk/.cache/lvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/?.lua;/home/drk/.cache/lvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/?/init.lua"
|
||||
local install_cpath_pattern = "/home/drk/.cache/lvim/packer_hererocks/2.1.0-beta3/lib/lua/5.1/?.so"
|
||||
if not string.find(package.path, package_path_str, 1, true) then
|
||||
package.path = package.path .. ';' .. package_path_str
|
||||
end
|
||||
|
||||
if not string.find(package.cpath, install_cpath_pattern, 1, true) then
|
||||
package.cpath = package.cpath .. ';' .. install_cpath_pattern
|
||||
end
|
||||
|
||||
time([[Luarocks path setup]], false)
|
||||
time([[try_loadstring definition]], true)
|
||||
local function try_loadstring(s, component, name)
|
||||
local success, result = pcall(loadstring(s), name, _G.packer_plugins[name])
|
||||
if not success then
|
||||
vim.schedule(function()
|
||||
vim.api.nvim_notify('packer.nvim: Error running ' .. component .. ' for ' .. name .. ': ' .. result, vim.log.levels.ERROR, {})
|
||||
end)
|
||||
end
|
||||
return result
|
||||
end
|
||||
|
||||
time([[try_loadstring definition]], false)
|
||||
time([[Defining packer_plugins]], true)
|
||||
_G.packer_plugins = {
|
||||
["Comment.nvim"] = {
|
||||
config = { "\27LJ\2\n?\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\22lvim.core.comment\frequire\0" },
|
||||
loaded = false,
|
||||
needs_bufread = false,
|
||||
only_cond = false,
|
||||
path = "/home/drk/.local/share/lunarvim/site/pack/packer/opt/Comment.nvim",
|
||||
url = "https://github.com/numToStr/Comment.nvim"
|
||||
},
|
||||
LuaSnip = {
|
||||
config = { "\27LJ\2\nñ\3\0\0\v\0\23\00166\0\0\0'\2\1\0B\0\2\0024\1\0\0006\2\2\0009\2\3\0029\2\4\0029\2\5\0029\2\6\2\15\0\2\0X\3\f€\21\2\1\0\22\2\0\0029\3\a\0006\5\b\0B\5\1\2'\6\t\0'\a\n\0'\b\v\0'\t\f\0'\n\r\0B\3\a\2<\3\2\0019\2\a\0006\4\14\0B\4\1\2'\5\15\0B\2\3\0029\3\16\0\18\5\2\0B\3\2\2\15\0\3\0X\4\3€\21\3\1\0\22\3\0\3<\2\3\0016\3\0\0'\5\17\0B\3\2\0029\3\18\3B\3\1\0016\3\0\0'\5\19\0B\3\2\0029\3\18\0035\5\20\0=\1\21\5B\3\2\0016\3\0\0'\5\22\0B\3\2\0029\3\18\3B\3\1\1K\0\1\0\"luasnip.loaders.from_snipmate\npaths\1\0\0 luasnip.loaders.from_vscode\14lazy_load\29luasnip.loaders.from_lua\17is_directory\rsnippets\19get_config_dir\22friendly-snippets\nstart\vpacker\tpack\tsite\20get_runtime_dir\15join_paths\22friendly_snippets\fsources\fluasnip\fbuiltin\tlvim\15lvim.utils\frequire\2\0" },
|
||||
loaded = true,
|
||||
path = "/home/drk/.local/share/lunarvim/site/pack/packer/start/LuaSnip",
|
||||
url = "https://github.com/L3MON4D3/LuaSnip"
|
||||
},
|
||||
["alpha-nvim"] = {
|
||||
config = { "\27LJ\2\n=\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\20lvim.core.alpha\frequire\0" },
|
||||
loaded = true,
|
||||
path = "/home/drk/.local/share/lunarvim/site/pack/packer/start/alpha-nvim",
|
||||
url = "https://github.com/goolord/alpha-nvim"
|
||||
},
|
||||
["bufferline.nvim"] = {
|
||||
config = { "\27LJ\2\nB\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\25lvim.core.bufferline\frequire\0" },
|
||||
loaded = false,
|
||||
needs_bufread = false,
|
||||
only_cond = false,
|
||||
path = "/home/drk/.local/share/lunarvim/site/pack/packer/opt/bufferline.nvim",
|
||||
url = "https://github.com/akinsho/bufferline.nvim"
|
||||
},
|
||||
["cmp-buffer"] = {
|
||||
loaded = true,
|
||||
path = "/home/drk/.local/share/lunarvim/site/pack/packer/start/cmp-buffer",
|
||||
url = "https://github.com/hrsh7th/cmp-buffer"
|
||||
},
|
||||
["cmp-nvim-lsp"] = {
|
||||
loaded = true,
|
||||
path = "/home/drk/.local/share/lunarvim/site/pack/packer/start/cmp-nvim-lsp",
|
||||
url = "https://github.com/hrsh7th/cmp-nvim-lsp"
|
||||
},
|
||||
["cmp-path"] = {
|
||||
loaded = true,
|
||||
path = "/home/drk/.local/share/lunarvim/site/pack/packer/start/cmp-path",
|
||||
url = "https://github.com/hrsh7th/cmp-path"
|
||||
},
|
||||
cmp_luasnip = {
|
||||
loaded = true,
|
||||
path = "/home/drk/.local/share/lunarvim/site/pack/packer/start/cmp_luasnip",
|
||||
url = "https://github.com/saadparwaiz1/cmp_luasnip"
|
||||
},
|
||||
colorschemes = {
|
||||
loaded = true,
|
||||
path = "/home/drk/.local/share/lunarvim/site/pack/packer/start/colorschemes",
|
||||
url = "https://github.com/lunarvim/colorschemes"
|
||||
},
|
||||
["friendly-snippets"] = {
|
||||
loaded = true,
|
||||
path = "/home/drk/.local/share/lunarvim/site/pack/packer/start/friendly-snippets",
|
||||
url = "https://github.com/rafamadriz/friendly-snippets"
|
||||
},
|
||||
["gitsigns.nvim"] = {
|
||||
config = { "\27LJ\2\n@\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\23lvim.core.gitsigns\frequire\0" },
|
||||
loaded = false,
|
||||
needs_bufread = false,
|
||||
only_cond = false,
|
||||
path = "/home/drk/.local/share/lunarvim/site/pack/packer/opt/gitsigns.nvim",
|
||||
url = "https://github.com/lewis6991/gitsigns.nvim"
|
||||
},
|
||||
["gruvbox.nvim"] = {
|
||||
loaded = true,
|
||||
path = "/home/drk/.local/share/lunarvim/site/pack/packer/start/gruvbox.nvim",
|
||||
url = "https://github.com/ellisonleao/gruvbox.nvim"
|
||||
},
|
||||
["indent-blankline.nvim"] = {
|
||||
config = { "\27LJ\2\nC\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\26lvim.core.indentlines\frequire\0" },
|
||||
loaded = true,
|
||||
path = "/home/drk/.local/share/lunarvim/site/pack/packer/start/indent-blankline.nvim",
|
||||
url = "https://github.com/lukas-reineke/indent-blankline.nvim"
|
||||
},
|
||||
["lir.nvim"] = {
|
||||
config = { "\27LJ\2\n;\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\18lvim.core.lir\frequire\0" },
|
||||
loaded = true,
|
||||
path = "/home/drk/.local/share/lunarvim/site/pack/packer/start/lir.nvim",
|
||||
url = "https://github.com/christianchiarulli/lir.nvim"
|
||||
},
|
||||
["lualine.nvim"] = {
|
||||
config = { "\27LJ\2\n?\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\22lvim.core.lualine\frequire\0" },
|
||||
loaded = true,
|
||||
path = "/home/drk/.local/share/lunarvim/site/pack/packer/start/lualine.nvim",
|
||||
url = "https://github.com/nvim-lualine/lualine.nvim"
|
||||
},
|
||||
["lunar.nvim"] = {
|
||||
loaded = true,
|
||||
path = "/home/drk/.local/share/lunarvim/site/pack/packer/start/lunar.nvim",
|
||||
url = "https://github.com/lunarvim/lunar.nvim"
|
||||
},
|
||||
["mason-lspconfig.nvim"] = {
|
||||
loaded = true,
|
||||
path = "/home/drk/.local/share/lunarvim/site/pack/packer/start/mason-lspconfig.nvim",
|
||||
url = "https://github.com/williamboman/mason-lspconfig.nvim"
|
||||
},
|
||||
["mason.nvim"] = {
|
||||
config = { "\27LJ\2\n=\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\20lvim.core.mason\frequire\0" },
|
||||
loaded = true,
|
||||
path = "/home/drk/.local/share/lunarvim/site/pack/packer/start/mason.nvim",
|
||||
url = "https://github.com/williamboman/mason.nvim"
|
||||
},
|
||||
["neodev.nvim"] = {
|
||||
loaded = false,
|
||||
needs_bufread = false,
|
||||
only_cond = false,
|
||||
path = "/home/drk/.local/share/lunarvim/site/pack/packer/opt/neodev.nvim",
|
||||
url = "https://github.com/folke/neodev.nvim"
|
||||
},
|
||||
["nlsp-settings.nvim"] = {
|
||||
loaded = true,
|
||||
path = "/home/drk/.local/share/lunarvim/site/pack/packer/start/nlsp-settings.nvim",
|
||||
url = "https://github.com/tamago324/nlsp-settings.nvim"
|
||||
},
|
||||
["null-ls.nvim"] = {
|
||||
loaded = true,
|
||||
path = "/home/drk/.local/share/lunarvim/site/pack/packer/start/null-ls.nvim",
|
||||
url = "https://github.com/jose-elias-alvarez/null-ls.nvim"
|
||||
},
|
||||
["nvim-autopairs"] = {
|
||||
config = { "\27LJ\2\nA\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\24lvim.core.autopairs\frequire\0" },
|
||||
loaded = true,
|
||||
path = "/home/drk/.local/share/lunarvim/site/pack/packer/start/nvim-autopairs",
|
||||
url = "https://github.com/windwp/nvim-autopairs"
|
||||
},
|
||||
["nvim-cmp"] = {
|
||||
config = { "\27LJ\2\n`\0\0\3\0\6\0\v6\0\0\0009\0\1\0009\0\2\0\15\0\0\0X\1\5€6\0\3\0'\2\4\0B\0\2\0029\0\5\0B\0\1\1K\0\1\0\nsetup\18lvim.core.cmp\frequire\bcmp\fbuiltin\tlvim\0" },
|
||||
loaded = true,
|
||||
path = "/home/drk/.local/share/lunarvim/site/pack/packer/start/nvim-cmp",
|
||||
url = "https://github.com/hrsh7th/nvim-cmp"
|
||||
},
|
||||
["nvim-dap"] = {
|
||||
config = { "\27LJ\2\n;\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\18lvim.core.dap\frequire\0" },
|
||||
loaded = true,
|
||||
path = "/home/drk/.local/share/lunarvim/site/pack/packer/start/nvim-dap",
|
||||
url = "https://github.com/mfussenegger/nvim-dap"
|
||||
},
|
||||
["nvim-dap-ui"] = {
|
||||
config = { "\27LJ\2\n>\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\rsetup_ui\18lvim.core.dap\frequire\0" },
|
||||
loaded = true,
|
||||
path = "/home/drk/.local/share/lunarvim/site/pack/packer/start/nvim-dap-ui",
|
||||
url = "https://github.com/rcarriga/nvim-dap-ui"
|
||||
},
|
||||
["nvim-lspconfig"] = {
|
||||
loaded = true,
|
||||
path = "/home/drk/.local/share/lunarvim/site/pack/packer/start/nvim-lspconfig",
|
||||
url = "https://github.com/neovim/nvim-lspconfig"
|
||||
},
|
||||
["nvim-navic"] = {
|
||||
config = { "\27LJ\2\nC\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\26lvim.core.breadcrumbs\frequire\0" },
|
||||
loaded = true,
|
||||
path = "/home/drk/.local/share/lunarvim/site/pack/packer/start/nvim-navic",
|
||||
url = "https://github.com/SmiteshP/nvim-navic"
|
||||
},
|
||||
["nvim-tree.lua"] = {
|
||||
config = { "\27LJ\2\n@\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\23lvim.core.nvimtree\frequire\0" },
|
||||
loaded = true,
|
||||
path = "/home/drk/.local/share/lunarvim/site/pack/packer/start/nvim-tree.lua",
|
||||
url = "https://github.com/kyazdani42/nvim-tree.lua"
|
||||
},
|
||||
["nvim-treesitter"] = {
|
||||
config = { "\27LJ\2\nB\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\25lvim.core.treesitter\frequire\0" },
|
||||
loaded = true,
|
||||
path = "/home/drk/.local/share/lunarvim/site/pack/packer/start/nvim-treesitter",
|
||||
url = "https://github.com/nvim-treesitter/nvim-treesitter"
|
||||
},
|
||||
["nvim-ts-context-commentstring"] = {
|
||||
loaded = false,
|
||||
needs_bufread = false,
|
||||
only_cond = false,
|
||||
path = "/home/drk/.local/share/lunarvim/site/pack/packer/opt/nvim-ts-context-commentstring",
|
||||
url = "https://github.com/JoosepAlviste/nvim-ts-context-commentstring"
|
||||
},
|
||||
["nvim-web-devicons"] = {
|
||||
loaded = true,
|
||||
path = "/home/drk/.local/share/lunarvim/site/pack/packer/start/nvim-web-devicons",
|
||||
url = "https://github.com/kyazdani42/nvim-web-devicons"
|
||||
},
|
||||
["packer.nvim"] = {
|
||||
loaded = true,
|
||||
path = "/home/drk/.local/share/lunarvim/site/pack/packer/start/packer.nvim",
|
||||
url = "https://github.com/wbthomason/packer.nvim"
|
||||
},
|
||||
["plenary.nvim"] = {
|
||||
loaded = true,
|
||||
path = "/home/drk/.local/share/lunarvim/site/pack/packer/start/plenary.nvim",
|
||||
url = "https://github.com/nvim-lua/plenary.nvim"
|
||||
},
|
||||
["popup.nvim"] = {
|
||||
loaded = true,
|
||||
path = "/home/drk/.local/share/lunarvim/site/pack/packer/start/popup.nvim",
|
||||
url = "https://github.com/nvim-lua/popup.nvim"
|
||||
},
|
||||
["project.nvim"] = {
|
||||
config = { "\27LJ\2\n?\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\22lvim.core.project\frequire\0" },
|
||||
loaded = true,
|
||||
path = "/home/drk/.local/share/lunarvim/site/pack/packer/start/project.nvim",
|
||||
url = "https://github.com/ahmedkhalf/project.nvim"
|
||||
},
|
||||
["schemastore.nvim"] = {
|
||||
loaded = true,
|
||||
path = "/home/drk/.local/share/lunarvim/site/pack/packer/start/schemastore.nvim",
|
||||
url = "https://github.com/b0o/schemastore.nvim"
|
||||
},
|
||||
["structlog.nvim"] = {
|
||||
loaded = true,
|
||||
path = "/home/drk/.local/share/lunarvim/site/pack/packer/start/structlog.nvim",
|
||||
url = "https://github.com/Tastyep/structlog.nvim"
|
||||
},
|
||||
["telescope-fzf-native.nvim"] = {
|
||||
loaded = true,
|
||||
path = "/home/drk/.local/share/lunarvim/site/pack/packer/start/telescope-fzf-native.nvim",
|
||||
url = "https://github.com/nvim-telescope/telescope-fzf-native.nvim"
|
||||
},
|
||||
["telescope.nvim"] = {
|
||||
config = { "\27LJ\2\nA\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\24lvim.core.telescope\frequire\0" },
|
||||
loaded = true,
|
||||
path = "/home/drk/.local/share/lunarvim/site/pack/packer/start/telescope.nvim",
|
||||
url = "https://github.com/nvim-telescope/telescope.nvim"
|
||||
},
|
||||
["toggleterm.nvim"] = {
|
||||
config = { "\27LJ\2\n@\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\23lvim.core.terminal\frequire\0" },
|
||||
loaded = false,
|
||||
needs_bufread = false,
|
||||
only_cond = false,
|
||||
path = "/home/drk/.local/share/lunarvim/site/pack/packer/opt/toggleterm.nvim",
|
||||
url = "https://github.com/akinsho/toggleterm.nvim"
|
||||
},
|
||||
["tokyonight.nvim"] = {
|
||||
loaded = true,
|
||||
path = "/home/drk/.local/share/lunarvim/site/pack/packer/start/tokyonight.nvim",
|
||||
url = "https://github.com/folke/tokyonight.nvim"
|
||||
},
|
||||
["vim-illuminate"] = {
|
||||
config = { "\27LJ\2\nB\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\25lvim.core.illuminate\frequire\0" },
|
||||
loaded = true,
|
||||
path = "/home/drk/.local/share/lunarvim/site/pack/packer/start/vim-illuminate",
|
||||
url = "https://github.com/RRethy/vim-illuminate"
|
||||
},
|
||||
["which-key.nvim"] = {
|
||||
config = { "\27LJ\2\nA\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\24lvim.core.which-key\frequire\0" },
|
||||
loaded = false,
|
||||
needs_bufread = false,
|
||||
only_cond = false,
|
||||
path = "/home/drk/.local/share/lunarvim/site/pack/packer/opt/which-key.nvim",
|
||||
url = "https://github.com/folke/which-key.nvim"
|
||||
}
|
||||
}
|
||||
|
||||
time([[Defining packer_plugins]], false)
|
||||
local module_lazy_loads = {
|
||||
["^neodev"] = "neodev.nvim"
|
||||
}
|
||||
local lazy_load_called = {['packer.load'] = true}
|
||||
local function lazy_load_module(module_name)
|
||||
local to_load = {}
|
||||
if lazy_load_called[module_name] then return nil end
|
||||
lazy_load_called[module_name] = true
|
||||
for module_pat, plugin_name in pairs(module_lazy_loads) do
|
||||
if not _G.packer_plugins[plugin_name].loaded and string.match(module_name, module_pat) then
|
||||
to_load[#to_load + 1] = plugin_name
|
||||
end
|
||||
end
|
||||
|
||||
if #to_load > 0 then
|
||||
require('packer.load')(to_load, {module = module_name}, _G.packer_plugins)
|
||||
local loaded_mod = package.loaded[module_name]
|
||||
if loaded_mod then
|
||||
return function(modname) return loaded_mod end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if not vim.g.packer_custom_loader_enabled then
|
||||
table.insert(package.loaders, 1, lazy_load_module)
|
||||
vim.g.packer_custom_loader_enabled = true
|
||||
end
|
||||
|
||||
-- Config for: vim-illuminate
|
||||
time([[Config for vim-illuminate]], true)
|
||||
try_loadstring("\27LJ\2\nB\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\25lvim.core.illuminate\frequire\0", "config", "vim-illuminate")
|
||||
time([[Config for vim-illuminate]], false)
|
||||
-- Config for: nvim-tree.lua
|
||||
time([[Config for nvim-tree.lua]], true)
|
||||
try_loadstring("\27LJ\2\n@\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\23lvim.core.nvimtree\frequire\0", "config", "nvim-tree.lua")
|
||||
time([[Config for nvim-tree.lua]], false)
|
||||
-- Config for: nvim-navic
|
||||
time([[Config for nvim-navic]], true)
|
||||
try_loadstring("\27LJ\2\nC\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\26lvim.core.breadcrumbs\frequire\0", "config", "nvim-navic")
|
||||
time([[Config for nvim-navic]], false)
|
||||
-- Config for: nvim-cmp
|
||||
time([[Config for nvim-cmp]], true)
|
||||
try_loadstring("\27LJ\2\n`\0\0\3\0\6\0\v6\0\0\0009\0\1\0009\0\2\0\15\0\0\0X\1\5€6\0\3\0'\2\4\0B\0\2\0029\0\5\0B\0\1\1K\0\1\0\nsetup\18lvim.core.cmp\frequire\bcmp\fbuiltin\tlvim\0", "config", "nvim-cmp")
|
||||
time([[Config for nvim-cmp]], false)
|
||||
-- Config for: nvim-autopairs
|
||||
time([[Config for nvim-autopairs]], true)
|
||||
try_loadstring("\27LJ\2\nA\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\24lvim.core.autopairs\frequire\0", "config", "nvim-autopairs")
|
||||
time([[Config for nvim-autopairs]], false)
|
||||
-- Config for: nvim-treesitter
|
||||
time([[Config for nvim-treesitter]], true)
|
||||
try_loadstring("\27LJ\2\nB\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\25lvim.core.treesitter\frequire\0", "config", "nvim-treesitter")
|
||||
time([[Config for nvim-treesitter]], false)
|
||||
-- Config for: alpha-nvim
|
||||
time([[Config for alpha-nvim]], true)
|
||||
try_loadstring("\27LJ\2\n=\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\20lvim.core.alpha\frequire\0", "config", "alpha-nvim")
|
||||
time([[Config for alpha-nvim]], false)
|
||||
-- Config for: lir.nvim
|
||||
time([[Config for lir.nvim]], true)
|
||||
try_loadstring("\27LJ\2\n;\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\18lvim.core.lir\frequire\0", "config", "lir.nvim")
|
||||
time([[Config for lir.nvim]], false)
|
||||
-- Config for: lualine.nvim
|
||||
time([[Config for lualine.nvim]], true)
|
||||
try_loadstring("\27LJ\2\n?\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\22lvim.core.lualine\frequire\0", "config", "lualine.nvim")
|
||||
time([[Config for lualine.nvim]], false)
|
||||
-- Config for: telescope.nvim
|
||||
time([[Config for telescope.nvim]], true)
|
||||
try_loadstring("\27LJ\2\nA\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\24lvim.core.telescope\frequire\0", "config", "telescope.nvim")
|
||||
time([[Config for telescope.nvim]], false)
|
||||
-- Config for: nvim-dap-ui
|
||||
time([[Config for nvim-dap-ui]], true)
|
||||
try_loadstring("\27LJ\2\n>\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\rsetup_ui\18lvim.core.dap\frequire\0", "config", "nvim-dap-ui")
|
||||
time([[Config for nvim-dap-ui]], false)
|
||||
-- Config for: nvim-dap
|
||||
time([[Config for nvim-dap]], true)
|
||||
try_loadstring("\27LJ\2\n;\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\18lvim.core.dap\frequire\0", "config", "nvim-dap")
|
||||
time([[Config for nvim-dap]], false)
|
||||
-- Config for: project.nvim
|
||||
time([[Config for project.nvim]], true)
|
||||
try_loadstring("\27LJ\2\n?\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\22lvim.core.project\frequire\0", "config", "project.nvim")
|
||||
time([[Config for project.nvim]], false)
|
||||
-- Config for: indent-blankline.nvim
|
||||
time([[Config for indent-blankline.nvim]], true)
|
||||
try_loadstring("\27LJ\2\nC\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\26lvim.core.indentlines\frequire\0", "config", "indent-blankline.nvim")
|
||||
time([[Config for indent-blankline.nvim]], false)
|
||||
-- Config for: LuaSnip
|
||||
time([[Config for LuaSnip]], true)
|
||||
try_loadstring("\27LJ\2\nñ\3\0\0\v\0\23\00166\0\0\0'\2\1\0B\0\2\0024\1\0\0006\2\2\0009\2\3\0029\2\4\0029\2\5\0029\2\6\2\15\0\2\0X\3\f€\21\2\1\0\22\2\0\0029\3\a\0006\5\b\0B\5\1\2'\6\t\0'\a\n\0'\b\v\0'\t\f\0'\n\r\0B\3\a\2<\3\2\0019\2\a\0006\4\14\0B\4\1\2'\5\15\0B\2\3\0029\3\16\0\18\5\2\0B\3\2\2\15\0\3\0X\4\3€\21\3\1\0\22\3\0\3<\2\3\0016\3\0\0'\5\17\0B\3\2\0029\3\18\3B\3\1\0016\3\0\0'\5\19\0B\3\2\0029\3\18\0035\5\20\0=\1\21\5B\3\2\0016\3\0\0'\5\22\0B\3\2\0029\3\18\3B\3\1\1K\0\1\0\"luasnip.loaders.from_snipmate\npaths\1\0\0 luasnip.loaders.from_vscode\14lazy_load\29luasnip.loaders.from_lua\17is_directory\rsnippets\19get_config_dir\22friendly-snippets\nstart\vpacker\tpack\tsite\20get_runtime_dir\15join_paths\22friendly_snippets\fsources\fluasnip\fbuiltin\tlvim\15lvim.utils\frequire\2\0", "config", "LuaSnip")
|
||||
time([[Config for LuaSnip]], false)
|
||||
-- Config for: mason.nvim
|
||||
time([[Config for mason.nvim]], true)
|
||||
try_loadstring("\27LJ\2\n=\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\20lvim.core.mason\frequire\0", "config", "mason.nvim")
|
||||
time([[Config for mason.nvim]], false)
|
||||
vim.cmd [[augroup packer_load_aucmds]]
|
||||
vim.cmd [[au!]]
|
||||
-- Event lazy-loads
|
||||
time([[Defining lazy-load event autocommands]], true)
|
||||
vim.cmd [[au BufRead * ++once lua require("packer.load")({'gitsigns.nvim', 'Comment.nvim'}, { event = "BufRead *" }, _G.packer_plugins)]]
|
||||
vim.cmd [[au BufReadPost * ++once lua require("packer.load")({'nvim-ts-context-commentstring'}, { event = "BufReadPost *" }, _G.packer_plugins)]]
|
||||
vim.cmd [[au BufWinEnter * ++once lua require("packer.load")({'which-key.nvim', 'toggleterm.nvim', 'bufferline.nvim'}, { event = "BufWinEnter *" }, _G.packer_plugins)]]
|
||||
time([[Defining lazy-load event autocommands]], false)
|
||||
vim.cmd("augroup END")
|
||||
|
||||
_G._packer.inside_compile = false
|
||||
if _G._packer.needs_bufread == true then
|
||||
vim.cmd("doautocmd BufRead")
|
||||
end
|
||||
_G._packer.needs_bufread = false
|
||||
|
||||
if should_profile then save_profiles() end
|
||||
|
||||
end)
|
||||
|
||||
if not no_errors then
|
||||
error_msg = error_msg:gsub('"', '\\"')
|
||||
vim.api.nvim_command('echohl ErrorMsg | echom "Error in packer_compiled: '..error_msg..'" | echom "Please check your config for correctness" | echohl None')
|
||||
end
|
|
@ -1,68 +0,0 @@
|
|||
{
|
||||
"browse_category_filter": "^F",
|
||||
"browse_playlists_delete": "KEY_DC",
|
||||
"browse_playlists_new": "M-n",
|
||||
"browse_playlists_rename": "M-r",
|
||||
"browse_playlists_save": "M-s",
|
||||
"context_menu": "M-enter",
|
||||
"hotkeys_backup": "M-b",
|
||||
"hotkeys_reset_to_default": "M-r",
|
||||
"key_down": "j",
|
||||
"key_end": "KEY_END",
|
||||
"key_home": "KEY_HOME",
|
||||
"key_left": "h",
|
||||
"key_page_down": "KEY_NPAGE",
|
||||
"key_page_up": "KEY_PPAGE",
|
||||
"key_right": "l",
|
||||
"key_up": "k",
|
||||
"lyrics_retry": "r",
|
||||
"metadata_rescan": "^R",
|
||||
"navigate_console": "`",
|
||||
"navigate_hotkeys": "?",
|
||||
"navigate_jump_to_playing": "x",
|
||||
"navigate_library": "a",
|
||||
"navigate_library_album_artists": "4",
|
||||
"navigate_library_browse": "b",
|
||||
"navigate_library_browse_albums": "2",
|
||||
"navigate_library_browse_artists": "1",
|
||||
"navigate_library_browse_directories": "d",
|
||||
"navigate_library_browse_genres": "3",
|
||||
"navigate_library_choose_category": "6",
|
||||
"navigate_library_filter": "f",
|
||||
"navigate_library_play_queue": "n",
|
||||
"navigate_library_playlists": "5",
|
||||
"navigate_library_tracks": "t",
|
||||
"navigate_lyrics": "^L",
|
||||
"navigate_settings": "s",
|
||||
"play_queue_clear": "X",
|
||||
"play_queue_delete": "KEY_DC",
|
||||
"play_queue_hot_swap": "M-a",
|
||||
"play_queue_move_down": "M-down",
|
||||
"play_queue_move_up": "M-up",
|
||||
"play_queue_playlist_delete": "M-x",
|
||||
"play_queue_playlist_load": "M-l",
|
||||
"play_queue_playlist_rename": "M-r",
|
||||
"play_queue_playlist_save": "M-s",
|
||||
"playback_next": "M-l",
|
||||
"playback_previous": "M-j",
|
||||
"playback_seek_back": "u",
|
||||
"playback_seek_back_proportional": "y",
|
||||
"playback_seek_forward": "o",
|
||||
"playback_seek_forward_proportional": "p",
|
||||
"playback_stop": "^X",
|
||||
"playback_toggle_mute": "m",
|
||||
"playback_toggle_pause": "^P",
|
||||
"playback_toggle_repeat": ".",
|
||||
"playback_toggle_shuffle": ",",
|
||||
"playback_volume_down": "M-k",
|
||||
"playback_volume_up": "M-i",
|
||||
"search_input_toggle_match_type": "M-m",
|
||||
"show_equalizer": "^E",
|
||||
"toggle_visualizer": "v",
|
||||
"track_list_change_sort_order": "M-s",
|
||||
"track_list_next_group": "]",
|
||||
"track_list_play_from_top": "M-P",
|
||||
"track_list_previous_group": "[",
|
||||
"track_list_rate_track": "r",
|
||||
"view_refresh": "KEY_F(5)"
|
||||
}
|
|
@ -48,3 +48,4 @@ highlight article ":.*\\(image\\)$" blue default
|
|||
highlight article ":.*\\(embedded flash\\)$" magenta default
|
||||
|
||||
browser w3m
|
||||
macro v set browser "mpv %u" ; open-in-browser ; set browser "elinks %u"
|
||||
|
|
|
@ -1,42 +1,99 @@
|
|||
http://static.fsf.org/fsforg/rss/news.xml "~FSF News"
|
||||
http://static.fsf.org/fsforg/rss/blogs.xml "~FSF Blogs"
|
||||
https://fsfe.org/news/news.en.rss "~FSFE News"
|
||||
https://dot.kde.org/rss.xml "~KDE Dot News"
|
||||
https://planet.kde.org/global/atom.xml "~Planet KDE"
|
||||
https://pointieststick.com/feed/ "~This Week on KDE"
|
||||
https://www.kdeblog.com/rss "~KDE Blog"
|
||||
https://thisweek.gnome.org/index.xml "~This Week on GNOME"
|
||||
https://www.omgubuntu.co.uk/feed "~OMG Ubuntu!"
|
||||
https://www.omglinux.com/feed "~OMG!Linux"
|
||||
https://blog.thunderbird.net/feed/ "~The Thunderbird Blog"
|
||||
https://thelinuxexp.com/feed.xml "~The Linux Experiment"
|
||||
https://techhut.tv/feed/ "~Techhut Media"
|
||||
https://techhut.tv/feed/ "~TechHut Media"
|
||||
https://itsfoss.com/rss/ "~Its FOSS!"
|
||||
https://thelinuxcast.org/feed/feed.xml "~The Linux Cast"
|
||||
https://9to5linux.com/feed/atom "~9to5Linux"
|
||||
https://blog.elementary.io/feed.xml "~elementary OS Blog"
|
||||
https://blog.zorin.com/index.xml "~Zorin OS Blog"
|
||||
http://blog.linuxmint.com/?feed=rss2 "~Linux Mint Blog"
|
||||
https://lukesmith.xyz/rss.xml "~Luke Smith"
|
||||
https://notrelated.xyz/rss "~Not Related"
|
||||
https://landchad.net/rss.xml "~Landchad"
|
||||
https://based.cooking/rss.xml "~Based Cooking"
|
||||
https://artixlinux.org/feed.php "~Artix Linux"
|
||||
https://www.archlinux.org/feeds/news/ "~Arch Linux"
|
||||
https://switchedtolinux.com/tutorials?format=feed&type=rss "~Switched to Linux - Tutorials"
|
||||
https://switchedtolinux.com/tin-foil-hat-time?format=feed&type=rss "~Switched to Linux - Tin Foil Hat Time"
|
||||
https://switchedtolinux.com/news?format=feed&type=rss "~Switched to Linux - Weekly News Roundup"
|
||||
https://switchedtolinux.com/linux/distros?format=feed&type=rss "~Switched to Linux - Distros"
|
||||
https://switchedtolinux.com/linux/software/?format=feed&type=rss "~Switched to Linux - Software"
|
||||
https://switchedtolinux.com/linux/desktop-environments/?format=feed&type=rss "~Switched to Linux - Desktop Environments"
|
||||
https://www.gamingonlinux.com/article_rss.php "~Gaming on linux"
|
||||
https://hackaday.com/blog/feed/ "~Hackaday"
|
||||
https://opensource.com/feed "~Opensource"
|
||||
https://linux.softpedia.com/backend.xml "~Softpedia Linux"
|
||||
https://www.zdnet.com/topic/linux/rss.xml "~Zdnet Linux"
|
||||
https://www.phoronix.com/rss.php "~Phoronix"
|
||||
https://www.computerworld.com/index.rss "~Computerworld"
|
||||
https://www.networkworld.com/category/linux/index.rss "~Networkworld Linux"
|
||||
https://betanews.com/feed "~Betanews Linux"
|
||||
http://lxer.com/module/newswire/headlines.rss "~Lxer"
|
||||
https://distrowatch.com/news/dwd.xml "~Distrowatch"
|
||||
https://odysee.com/$/rss/@blenderdumbass:f "~Blender Dumbass"
|
||||
https://theevilskeleton.gitlab.io/feed.xml "~TheEvilSkeleton"
|
||||
https://tutanota.com/blog/feed.xml "~Tutanota Blogs"
|
||||
https://vanillaos.org/feed.xml "~Vanilla OS"
|
||||
https://techcrunch.com/feed/ "~TechCrunch"
|
||||
http://www.techradar.com/rss "~TechRadar"
|
||||
https://www.zdnet.com/news/rss.xml "~ZDNET - News"
|
||||
https://c3po.website/rss/ "~Blog de C3PO"
|
||||
http://yro.slashdot.org/yro.rss "~Slashdot: Your Rights Online"
|
||||
https://freedom-to-tinker.com/feed/rss/ "~Freedom to Tinker"
|
||||
https://act.eff.org/action.atom "~EFF - Action Center"
|
||||
https://www.eff.org/rss/updates.xml "~EFF - Updates"
|
||||
https://victorhckinthefreeworld.com/feed/ "~Victorhck in the free world"
|
||||
https://invidious.sethforprivacy.com/feed/channel/UCHnyfMqiRRG1u-2MsSQLbXA "~YT - Veritasium"
|
||||
https://invidious.sethforprivacy.com/feed/channel/UCtMVHI3AJD4Qk4hcbZnI9ZQ "~YT - SomeOrdinaryGamers"
|
||||
https://invidious.sethforprivacy.com/feed/channel/UCl2mFZoRqjw_ELax4Yisf6w "~YT - Louis Rossmann"
|
||||
https://invidious.sethforprivacy.com/feed/channel/UChI0q9a-ZcbZh7dAu_-J-hg "~YT - Upper Echelon"
|
||||
https://invidious.sethforprivacy.com/feed/channel/UCj8orMezFWVcoN-4S545Wtw "~YT - Max Derrat"
|
||||
https://invidious.sethforprivacy.com/feed/channel/UCkmMACUKpQeIxN9D9ARli1Q "~YT - Shadiversity"
|
||||
https://invidious.sethforprivacy.com/feed/channel/UCNYW2vfGrUE6R5mIJYzkRyQ "~YT - DrossRotzank"
|
||||
https://invidious.sethforprivacy.com/feed/channel/UC36xmz34q02JYaZYKrMwXng "~YT - Nate Gentile"
|
||||
https://invidious.sethforprivacy.com/feed/channel/UCg6gPGh8HU2U01vaFCAsvmQ "~YT - Chris Titus Tech"
|
||||
https://invidious.sethforprivacy.com/feed/channel/UCVls1GmFKf6WlTraIb_IaJg "~YT - DistroTube"
|
||||
https://invidious.sethforprivacy.com/feed/channel/UCxQKHvKbmSzGMvUrVtJYnUA "~YT - Learn Linux TV"
|
||||
https://invidious.sethforprivacy.com/feed/channel/UC5UAwBUum7CPN5buc-_N1Fw "~YT - The Linux Experiment"
|
||||
https://invidious.sethforprivacy.com/feed/channel/UCylGUf9BvQooEFjgdNudoQg "~YT - The Linux Cast"
|
||||
https://invidious.sethforprivacy.com/feed/channel/UCoryWpk4QVYKFCJul9KBdyw "~YT - Switched to Linux"
|
||||
https://invidious.sethforprivacy.com/feed/channel/UCgkyQiY_Q5AlrygIXGWO2Zw "~YT - Tux Traveler"
|
||||
https://invidious.sethforprivacy.com/feed/channel/UCxkw-TfCK1t1VKxfHwPzD6w "~YT - Our Walk in Christ"
|
||||
https://invidious.sethforprivacy.com/feed/channel/UCld68syR8Wi-GY_n4CaoJGA "~YT - Brodie Robertson"
|
||||
https://invidious.sethforprivacy.com/feed/channel/UCjSEJkpGbcZhvo0lr-44X_w "~YT - TechHut"
|
||||
https://invidious.sethforprivacy.com/feed/channel/UC2eYFnH61tmytImy1mTYvhA "~YT - Luke Smith"
|
||||
https://invidious.sethforprivacy.com/feed/channel/UC7YOGHUfC1Tb6E4pudI9STA "~YT - Mental Outlaw"
|
||||
https://invidious.sethforprivacy.com/feed/channel/UC3jSNmKWYA04R47fDcc1ImA "~YT - InfinitelyGalactic"
|
||||
https://invidious.sethforprivacy.com/feed/channel/UCONH73CdRXUjlh3-DdLGCPw "~YT - Nicco Loves Linux"
|
||||
https://invidious.sethforprivacy.com/feed/channel/UC1s1OsWNYDFgbROPV-q5arg "~YT - Michael Horn"
|
||||
https://invidious.sethforprivacy.com/feed/channel/UCOSSzBN8e3JHOxvltQbf_mQ "~YT - Jack Keifer"
|
||||
https://invidious.sethforprivacy.com/feed/channel/UC05XpvbHZUQOfA6xk4dlmcw "~YT - DJ Ware"
|
||||
https://invidious.sethforprivacy.com/feed/channel/UCAiiOTio8Yu69c3XnR7nQBQ "~YT - System Crafters"
|
||||
https://invidious.sethforprivacy.com/feed/channel/UCAYKj_peyESIMDp5LtHlH2A "~YT - unfa"
|
||||
https://invidious.sethforprivacy.com/feed/channel/UCmw-QGOHbHA5cDAvwwqUTKQ "~YT - Zaney"
|
||||
https://invidious.sethforprivacy.com/feed/channel/UCNvl_86ygZXRuXjxbONI5jA "~YT - 10leej"
|
||||
https://invidious.sethforprivacy.com/feed/channel/UC3yaWWA9FF9OBog5U9ml68A "~YT - SavvyNik"
|
||||
https://invidious.sethforprivacy.com/feed/channel/UCS97tchJDq17Qms3cux8wcA "~YT - chris@machine"
|
||||
https://invidious.sethforprivacy.com/feed/channel/UCl8XUDjAOLc7GNKcDp9Nepg "~YT - Locos por Linux"
|
||||
https://invidious.sethforprivacy.com/feed/channel/UClVi5MQZ6T0InZYT7oFs6wg "~YT - Mumbling Hugo"
|
||||
https://invidious.sethforprivacy.com/feed/channel/UCmyGZ0689ODyReHw3rsKLtQ "~YT - Michael Tunnell"
|
||||
https://invidious.sethforprivacy.com/feed/channel/UCv1Kcz-CuGM6mxzL3B1_Eiw "~YT - Gardiner Bryant"
|
||||
https://invidious.sethforprivacy.com/feed/channel/UCcf2Mr1qNoX51XXDUd3Rquw "~YT - ByteSeb"
|
||||
https://invidious.sethforprivacy.com/feed/channel/UCCIHOP7e271SIumQgyl6XBQ "~YT - OldTechBloke"
|
||||
https://invidious.sethforprivacy.com/feed/channel/UCIFzjAer2W9gTWVECZgtDzg "~YT - GaryH Tech"
|
||||
https://invidious.sethforprivacy.com/feed/channel/UCMiyV_Ib77XLpzHPQH_q0qQ "~YT - Veronica Explains"
|
||||
https://invidious.sethforprivacy.com/feed/channel/UCsnGwSIHyoYN0kiINAGUKxg "~YT - Wolfgang's Channel"
|
||||
https://invidious.sethforprivacy.com/feed/channel/UCnIfca4LPFVn8-FjpPVc1ow "~YT - Fedora Project"
|
||||
https://invidious.sethforprivacy.com/feed/channel/UCH5DsMZAgdx5Fkk9wwMNwCA "~YT - The New Oil"
|
||||
https://invidious.sethforprivacy.com/feed/channel/UCs6KfncB4OV6Vug4o_bzijg "~YT - Techlore"
|
||||
https://invidious.sethforprivacy.com/feed/channel/UCYVU6rModlGxvJbszCclGGw "~YT - Rob Braxman Tech"
|
||||
https://invidious.sethforprivacy.com/feed/channel/UCSuHzQ3GrHSzoBbwrIq3LLA "~YT - Naomi Brockwell: NBTV"
|
||||
https://invidious.sethforprivacy.com/feed/channel/UCvFGf8HZGZWFzpcDCqb3Lhw "~YT - All Things Secured"
|
||||
https://invidious.sethforprivacy.com/feed/channel/UCvjgXvBlbQiydffZU7m1_aw "~YT - The Coding Train"
|
||||
https://invidious.sethforprivacy.com/feed/channel/UC9-y-6csu5WGm29I7JiwpnA "~YT - Computerphile"
|
||||
https://invidious.sethforprivacy.com/feed/channel/UCbiGcwDWZjz05njNPrJU7jA "~YT - ExplainingComputers"
|
||||
https://invidious.sethforprivacy.com/feed/channel/UCy0tKL1T7wFoYcxCe0xjN6Q "~YT - Technology Connections"
|
||||
https://invidious.sethforprivacy.com/feed/channel/UC8uT9cgJorJPWu7ITLGo9Ww "~YT - The 8-Bit Guy"
|
||||
https://invidious.sethforprivacy.com/feed/channel/UCoL8olX-259lS1N6QPyP4IQ "~YT - Action Retro"
|
||||
https://invidious.sethforprivacy.com/feed/channel/UCW-HHEyt67RhZ6q21n4p2zQ "~YT - Mac84"
|
||||
https://invidious.sethforprivacy.com/feed/channel/UChT0QzAGfz_pUIbQnePV6KQ "~YT - Pendleton 115"
|
||||
https://invidious.sethforprivacy.com/feed/channel/UC-ErgHYY0_Yjhjz2MN1E1lg "~YT - RETRO Hardware"
|
||||
https://invidious.sethforprivacy.com/feed/channel/UCjgS6Uyg8ok4Jd_lH_MUKgg "~YT - Claus Kellerman"
|
||||
https://invidious.sethforprivacy.com/feed/channel/UC0W_BIuwk8D0Bv4THbVZZOQ "~YT - Surveillance Report"
|
||||
https://invidious.sethforprivacy.com/feed/channel/UCBq5p-xOla8xhnrbhu8AIAg "~YT - Tech Over Tea"
|
||||
|
||||
|
|
|
@ -1,13 +1,12 @@
|
|||
[Appearance]
|
||||
color_scheme_path=/usr/share/qt5ct/colors/airy.conf
|
||||
custom_palette=false
|
||||
icon_theme=Papirus-Dark
|
||||
standard_dialogs=gtk2
|
||||
style=gtk2
|
||||
|
||||
[Fonts]
|
||||
fixed=@Variant(\0\0\0@\0\0\0$\0m\0o\0n\0o\0n\0o\0k\0i\0 \0N\0\x65\0r\0\x64\0 \0\x46\0o\0n\0t@$\0\0\0\0\0\0\xff\xff\xff\xff\x5\x1\0K\x10)
|
||||
general=@Variant(\0\0\0@\0\0\0$\0m\0o\0n\0o\0n\0o\0k\0i\0 \0N\0\x65\0r\0\x64\0 \0\x46\0o\0n\0t@$\0\0\0\0\0\0\xff\xff\xff\xff\x5\x1\0K\x10)
|
||||
fixed="Mononoki Nerd Font,10,-1,5,50,0,0,0,0,0,Regular"
|
||||
general="Cantarell,10,-1,5,50,0,0,0,0,0,Regular"
|
||||
|
||||
[Interface]
|
||||
activate_item_on_single_click=1
|
||||
|
@ -25,7 +24,7 @@ underline_shortcut=1
|
|||
wheel_scroll_lines=3
|
||||
|
||||
[SettingsWindow]
|
||||
geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x3\0\0\0\0\x3\xc0\0\0\0\x32\0\0\a\x7f\0\0\x4\x37\0\0\x3\xc1\0\0\0\x33\0\0\a~\0\0\x4\x36\0\0\0\0\0\0\0\0\a\x80\0\0\x3\xc1\0\0\0\x33\0\0\a~\0\0\x4\x36)
|
||||
geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x3\0\0\0\0\0\0\0\0\0\0\0\0\am\0\0\x3\xfc\0\0\0\0\0\0\0\0\0\0\x2\xde\0\0\x2\x84\0\0\0\0\x2\0\0\0\a\x80\0\0\0\0\0\0\0\0\0\0\am\0\0\x3\xfc)
|
||||
|
||||
[Troubleshooting]
|
||||
force_raster_widgets=1
|
||||
|
|
|
@ -1,12 +1,13 @@
|
|||
[Appearance]
|
||||
color_scheme_path=/usr/share/qt6ct/colors/airy.conf
|
||||
custom_palette=false
|
||||
icon_theme=gruvbox-dark-icons-gtk
|
||||
standard_dialogs=gtk2
|
||||
style=qt6gtk2
|
||||
|
||||
[Fonts]
|
||||
fixed="mononoki Nerd Font,10,-1,5,700,0,0,0,0,0,0,0,0,0,0,1,Bold"
|
||||
general="mononoki Nerd Font,10,-1,5,700,0,0,0,0,0,0,0,0,0,0,1,Bold"
|
||||
fixed="Mononoki Nerd Font,12,-1,5,400,0,0,0,0,0,0,0,0,0,0,1,Regular"
|
||||
general="Cantarell,12,-1,5,400,0,0,0,0,0,0,0,0,0,0,1,Regular"
|
||||
|
||||
[Interface]
|
||||
activate_item_on_single_click=1
|
||||
|
@ -24,7 +25,7 @@ underline_shortcut=1
|
|||
wheel_scroll_lines=3
|
||||
|
||||
[SettingsWindow]
|
||||
geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x3\0\0\0\0\0\0\0\0\0\x32\0\0\a\x7f\0\0\x4\x37\0\0\0\0\0\0\0\x32\0\0\a\x7f\0\0\x4\x37\0\0\0\0\0\0\0\0\a\x80\0\0\0\0\0\0\0\x32\0\0\a\x7f\0\0\x4\x37)
|
||||
geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x3\0\0\0\0\0\0\0\0\0\0\0\0\am\0\0\x3\xfc\0\0\0\0\0\0\0\0\0\0\am\0\0\x3\xfc\0\0\0\0\0\0\0\0\a\x80\0\0\0\0\0\0\0\0\0\0\am\0\0\x3\xfc)
|
||||
|
||||
[Troubleshooting]
|
||||
force_raster_widgets=1
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
https://mail.google.com/ gmail
|
||||
https://mail.tutanota.com/ tutanota
|
||||
https://next.tuxcloud.top/ nextcloud
|
||||
https://cloud.linode.com/ linode
|
||||
https://odysee.com/ odysee
|
||||
https://youtube.com/ youtube
|
||||
https://fosstodon.org/ mastodon
|
||||
|
@ -9,6 +7,5 @@ https://gitlab.com/ gitlab
|
|||
https://app.element.io/ element
|
||||
https://web.whatsapp.com/ whatsapp
|
||||
https://outlook.office.com/ intec-correo
|
||||
https://lms.intec.edu.do/ intec-aula-virtual
|
||||
https://campusvirtual.intec.edu.do/ intec-aula-virtual
|
||||
https://procesos.intec.edu.do/ intec-procesos
|
||||
https://dev.azure.com/INTEC-IDS323L-01-2022-04-Equipo-2/ intec-azure
|
||||
|
|
|
@ -3,14 +3,15 @@ configuration{
|
|||
lines: 10;
|
||||
font: "mononoki Nerd Font 14";
|
||||
show-icons: true;
|
||||
icon-theme: "gruvbox-dark-icons-gtk";
|
||||
terminal: "alacritty";
|
||||
drun-display-format: "{icon} {name}";
|
||||
location: 0;
|
||||
disable-history: false;
|
||||
hide-scrollbar: true;
|
||||
display-drun: " Apps ";
|
||||
display-drun: " Apps ";
|
||||
display-run: " Run ";
|
||||
display-window: " Window ";
|
||||
display-window: " Window ";
|
||||
display-Network: " Network ";
|
||||
sidebar-mode: true;
|
||||
dpi: 100;
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -2,52 +2,57 @@
|
|||
|
||||
# ***This script was made by Clay Gomera (Drake)***
|
||||
# - Description: A simple power menu rofi script
|
||||
# - Dependencies: rofi, power-profiles-daemon
|
||||
# - Dependencies: rofi, power-profiles-daemon, swaylock
|
||||
#
|
||||
|
||||
## MENU PROMPT ##
|
||||
menu="rofi -dmenu -i -p"
|
||||
|
||||
## CURRENT WALLPAPER FOR LOCKSCREEN ##
|
||||
currwall=$(tail --l 1 "$HOME/.wbg" | awk '{print $3}')
|
||||
|
||||
## OPTIONS ##
|
||||
option1=" Logout"
|
||||
option2=" Reboot"
|
||||
option1=" Logout"
|
||||
option2=" Reboot"
|
||||
option3=" Power off"
|
||||
option4="鈴 Suspend"
|
||||
option5=" Lock"
|
||||
option6=" Change power profile"
|
||||
option4=" Suspend"
|
||||
option5=" Lock"
|
||||
option6=" Change power profile"
|
||||
option7=" Cancel"
|
||||
|
||||
## OPTIONS ARRAY ##
|
||||
options="$option1\n$option2\n$option3\n$option4\n$option5\n$option6\n$option7"
|
||||
|
||||
## POWER PROFILE OPTIONS ##
|
||||
pwr1=" Performance"
|
||||
pwr2=" Balanced"
|
||||
pwr3=" Power Saver"
|
||||
pwr1=" Performance"
|
||||
pwr2=" Balanced"
|
||||
pwr3=" Power Saver"
|
||||
pwr4=" Cancel"
|
||||
|
||||
## POWER PROFILES ARRAY ##
|
||||
pwrs="$pwr1\n$pwr2\n$pwr3\n$pwr4"
|
||||
|
||||
## MAIN ACTION COMMAND ##
|
||||
action=$(echo -e "$options" | rofi -dmenu -i -p " Power Options ")
|
||||
action=$(echo -e "$options" | $menu " Power Options ")
|
||||
case "$action" in
|
||||
$option1*)
|
||||
pkill X;;
|
||||
$option2*)
|
||||
$option1)
|
||||
pkill Hyprland;;
|
||||
$option2)
|
||||
systemctl reboot || loginctl reboot;;
|
||||
$option3*)
|
||||
$option3)
|
||||
systemctl poweroff || loginctl poweroff;;
|
||||
$option4*)
|
||||
betterlockscreen --suspend;;
|
||||
$option5*)
|
||||
betterlockscreen -l;;
|
||||
$option6*)
|
||||
$option4)
|
||||
swaylock -i "$currwall" &
|
||||
sleep 0.1
|
||||
systemctl suspend;;
|
||||
$option5)
|
||||
swaylock -i "$currwall";;
|
||||
$option6)
|
||||
currentpwr=$(powerprofilesctl get)
|
||||
if [ "$currentpwr" = "performance" ]; then
|
||||
currentpwr=" Performance"
|
||||
elif [ "$currentpwr" = "power-saver" ]; then
|
||||
currentpwr=" Power Saver"
|
||||
currentpwr="$pwr1"
|
||||
elif [ "$currentpwr" = "balanced" ]; then
|
||||
currentpwr=" Balanced"
|
||||
currentpwr="$pwr2"
|
||||
elif [ "$currentpwr" = "power-saver" ]; then
|
||||
currentpwr="$pwr3"
|
||||
fi
|
||||
pwraction=$(echo -e "$pwrs" | rofi -dmenu -i -p " Power Profile Menu - Currently set to: ${currentpwr} ")
|
||||
pwraction=$(echo -e "$pwrs" | $menu " Power Profile Menu - Currently set to: ${currentpwr} ")
|
||||
case "$pwraction" in
|
||||
$pwr1*)
|
||||
powerprofilesctl set performance && notify-send "Power profile switched to performance";;
|
||||
|
@ -58,7 +63,6 @@ case "$action" in
|
|||
$pwr4*)
|
||||
exit 0
|
||||
esac;;
|
||||
$option7*)
|
||||
$option7)
|
||||
exit 0
|
||||
esac
|
||||
|
||||
|
|
|
@ -2,21 +2,23 @@
|
|||
|
||||
# ***This script was made by Clay Gomera (Drake)***
|
||||
# - Description: A simple wifi rofi script
|
||||
# - Dependencies: rofi, NetworkManager
|
||||
# - Dependencies: rofi, NetworkManager, io.elementary.capnet-assist
|
||||
|
||||
## ROFI VARIABLES ##
|
||||
ROFI="rofi -dmenu -i -p"
|
||||
## MENU PROMPT ##
|
||||
menu="rofi -dmenu -i -p"
|
||||
|
||||
## MAIN OPTIONS ##
|
||||
option1=" Turn on WiFi"
|
||||
option2=" Turn off WiFi"
|
||||
option3="睊 Disconnect WiFi"
|
||||
option4="直 Connect WiFi"
|
||||
option5=" Setup captive portal"
|
||||
option6=" Cancel"
|
||||
option3=" Disconnect WiFi"
|
||||
option4=" Connect WiFi"
|
||||
option5=" Setup captive portal"
|
||||
option6=" Exit"
|
||||
options="$option1\n$option2\n$option3\n$option4\n$option5\n$option6"
|
||||
|
||||
## GRAB WIFI INTERFACE ##
|
||||
wlan=$(nmcli dev | grep wifi | sed 's/ \{2,\}/|/g' | cut -d '|' -f1 | head -1)
|
||||
|
||||
## TURN OFF WIFI FUNCTION ##
|
||||
turnoff() {
|
||||
nmcli radio wifi off
|
||||
|
@ -43,18 +45,18 @@ disconnect() {
|
|||
connect() {
|
||||
notify-send "Scannig networks, please wait"
|
||||
sleep 1
|
||||
bssid=$(nmcli device wifi list | sed -n '1!p' | cut -b 9- | $ROFI "Select Wifi :" | cut -d' ' -f1)
|
||||
}
|
||||
bssid=$(nmcli device wifi list | sed -n '1!p' | cut -b 9- | $menu " Select a Wifi Network " | cut -d' ' -f1)
|
||||
}
|
||||
|
||||
## SELECT PASSWORD FUNCTION ##
|
||||
password() {
|
||||
pass=$(echo " " | $ROFI "Enter Password :")
|
||||
}
|
||||
pass=$(echo " " | $menu " Enter Password " -password)
|
||||
}
|
||||
|
||||
## MAIN CONNECTION COMMAND ##
|
||||
action() {
|
||||
nmcli device wifi connect "$bssid" password "$pass" || nmcli device wifi connect "$bssid"
|
||||
}
|
||||
}
|
||||
|
||||
## CHECKING IF WIFI IS WORKING
|
||||
check() {
|
||||
|
@ -69,21 +71,29 @@ check() {
|
|||
}
|
||||
|
||||
## MAIN ACTION COMMANDS ##
|
||||
cases=$(echo -e "$options" | $ROFI " Wifi Settings " )
|
||||
case "$cases" in
|
||||
$option1*)
|
||||
turnon;;
|
||||
$option2*)
|
||||
turnoff;;
|
||||
$option3*)
|
||||
disconnect;;
|
||||
$option4*)
|
||||
connect;
|
||||
password;
|
||||
action;
|
||||
check;;
|
||||
$option5*)
|
||||
io.elementary.capnet-assist;;
|
||||
$option6*)
|
||||
exit 0
|
||||
esac
|
||||
cases=$(echo -e "$options" | $menu " Wifi Settings " )
|
||||
if [ -n "$cases" ]; then
|
||||
case "$cases" in
|
||||
$option1)
|
||||
turnon;;
|
||||
$option2)
|
||||
turnoff;;
|
||||
$option3)
|
||||
disconnect;;
|
||||
$option4)
|
||||
connect;
|
||||
if [ -n "$bssid" ]; then
|
||||
password;
|
||||
action;
|
||||
check;
|
||||
else
|
||||
exit 0;
|
||||
fi;;
|
||||
$option5)
|
||||
io.elementary.capnet-assist;;
|
||||
$option6)
|
||||
exit 0;
|
||||
esac
|
||||
else
|
||||
exit 0;
|
||||
fi
|
||||
|
|
|
@ -1,64 +0,0 @@
|
|||
# dmenu - dynamic menu
|
||||
# See LICENSE file for copyright and license details.
|
||||
|
||||
include config.mk
|
||||
|
||||
SRC = drw.c dmenu.c stest.c util.c
|
||||
OBJ = $(SRC:.c=.o)
|
||||
|
||||
all: options dmenu stest
|
||||
|
||||
options:
|
||||
@echo dmenu build options:
|
||||
@echo "CFLAGS = $(CFLAGS)"
|
||||
@echo "LDFLAGS = $(LDFLAGS)"
|
||||
@echo "CC = $(CC)"
|
||||
|
||||
.c.o:
|
||||
$(CC) -c $(CFLAGS) $<
|
||||
|
||||
config.h:
|
||||
cp config.def.h $@
|
||||
|
||||
$(OBJ): arg.h config.h config.mk drw.h
|
||||
|
||||
dmenu: dmenu.o drw.o util.o
|
||||
$(CC) -o $@ dmenu.o drw.o util.o $(LDFLAGS)
|
||||
|
||||
stest: stest.o
|
||||
$(CC) -o $@ stest.o $(LDFLAGS)
|
||||
|
||||
clean:
|
||||
rm -f dmenu stest $(OBJ) dmenu-$(VERSION).tar.gz
|
||||
|
||||
dist: clean
|
||||
mkdir -p dmenu-$(VERSION)
|
||||
cp LICENSE Makefile README arg.h config.def.h config.mk dmenu.1\
|
||||
drw.h util.h dmenu_path dmenu_run stest.1 $(SRC)\
|
||||
dmenu-$(VERSION)
|
||||
tar -cf dmenu-$(VERSION).tar dmenu-$(VERSION)
|
||||
gzip dmenu-$(VERSION).tar
|
||||
rm -rf dmenu-$(VERSION)
|
||||
|
||||
install: all
|
||||
mkdir -p $(DESTDIR)$(PREFIX)/bin
|
||||
cp -f dmenu dmenu_path dmenu_run stest $(DESTDIR)$(PREFIX)/bin
|
||||
chmod 755 $(DESTDIR)$(PREFIX)/bin/dmenu
|
||||
chmod 755 $(DESTDIR)$(PREFIX)/bin/dmenu_path
|
||||
chmod 755 $(DESTDIR)$(PREFIX)/bin/dmenu_run
|
||||
chmod 755 $(DESTDIR)$(PREFIX)/bin/stest
|
||||
mkdir -p $(DESTDIR)$(MANPREFIX)/man1
|
||||
sed "s/VERSION/$(VERSION)/g" < dmenu.1 > $(DESTDIR)$(MANPREFIX)/man1/dmenu.1
|
||||
sed "s/VERSION/$(VERSION)/g" < stest.1 > $(DESTDIR)$(MANPREFIX)/man1/stest.1
|
||||
chmod 644 $(DESTDIR)$(MANPREFIX)/man1/dmenu.1
|
||||
chmod 644 $(DESTDIR)$(MANPREFIX)/man1/stest.1
|
||||
|
||||
uninstall:
|
||||
rm -f $(DESTDIR)$(PREFIX)/bin/dmenu\
|
||||
$(DESTDIR)$(PREFIX)/bin/dmenu_path\
|
||||
$(DESTDIR)$(PREFIX)/bin/dmenu_run\
|
||||
$(DESTDIR)$(PREFIX)/bin/stest\
|
||||
$(DESTDIR)$(MANPREFIX)/man1/dmenu.1\
|
||||
$(DESTDIR)$(MANPREFIX)/man1/stest.1
|
||||
|
||||
.PHONY: all options clean dist install uninstall
|
|
@ -1,49 +0,0 @@
|
|||
/*
|
||||
* Copy me if you can.
|
||||
* by 20h
|
||||
*/
|
||||
|
||||
#ifndef ARG_H__
|
||||
#define ARG_H__
|
||||
|
||||
extern char *argv0;
|
||||
|
||||
/* use main(int argc, char *argv[]) */
|
||||
#define ARGBEGIN for (argv0 = *argv, argv++, argc--;\
|
||||
argv[0] && argv[0][0] == '-'\
|
||||
&& argv[0][1];\
|
||||
argc--, argv++) {\
|
||||
char argc_;\
|
||||
char **argv_;\
|
||||
int brk_;\
|
||||
if (argv[0][1] == '-' && argv[0][2] == '\0') {\
|
||||
argv++;\
|
||||
argc--;\
|
||||
break;\
|
||||
}\
|
||||
for (brk_ = 0, argv[0]++, argv_ = argv;\
|
||||
argv[0][0] && !brk_;\
|
||||
argv[0]++) {\
|
||||
if (argv_ != argv)\
|
||||
break;\
|
||||
argc_ = argv[0][0];\
|
||||
switch (argc_)
|
||||
|
||||
#define ARGEND }\
|
||||
}
|
||||
|
||||
#define ARGC() argc_
|
||||
|
||||
#define EARGF(x) ((argv[0][1] == '\0' && argv[1] == NULL)?\
|
||||
((x), abort(), (char *)0) :\
|
||||
(brk_ = 1, (argv[0][1] != '\0')?\
|
||||
(&argv[0][1]) :\
|
||||
(argc--, argv++, argv[0])))
|
||||
|
||||
#define ARGF() ((argv[0][1] == '\0' && argv[1] == NULL)?\
|
||||
(char *)0 :\
|
||||
(brk_ = 1, (argv[0][1] != '\0')?\
|
||||
(&argv[0][1]) :\
|
||||
(argc--, argv++, argv[0])))
|
||||
|
||||
#endif
|
|
@ -1,27 +0,0 @@
|
|||
/* See LICENSE file for copyright and license details. */
|
||||
/* Default settings; can be overriden by command line. */
|
||||
|
||||
static int topbar = 1; /* -b option; if 0, dmenu appears at bottom */
|
||||
static int fuzzy = 1; /* -F option; if 0, dmenu doesn't use fuzzy matching */
|
||||
/* -fn option overrides fonts[0]; default X11 font or font set */
|
||||
static const char *fonts[] = {
|
||||
"mononoki Nerd Font Mono: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] = { "#ebdbb2", "#1d2021" },
|
||||
[SchemeSel] = { "#ebdbb2", "#cc241d" },
|
||||
[SchemeSelHighlight] = { "#fbf1c7", "#282828" },
|
||||
[SchemeNormHighlight] = { "#fbf1c7", "#282828" },
|
||||
[SchemeOut] = { "#ebdbb2", "#8ec07c" },
|
||||
[SchemeOutHighlight] = { "#fabd2f", "#83a598" },
|
||||
};
|
||||
/* -l option; if nonzero, dmenu uses vertical list with given number of lines */
|
||||
static unsigned int lines = 0;
|
||||
|
||||
/*
|
||||
* Characters not considered part of a word while deleting words
|
||||
* for example: " /?\"&[]"
|
||||
*/
|
||||
static const char worddelimiters[] = " ";
|
|
@ -1,32 +0,0 @@
|
|||
# dmenu version
|
||||
VERSION = 5.2
|
||||
|
||||
# paths
|
||||
PREFIX = /usr/local
|
||||
MANPREFIX = $(PREFIX)/share/man
|
||||
|
||||
X11INC = /usr/X11R6/include
|
||||
X11LIB = /usr/X11R6/lib
|
||||
|
||||
# Xinerama, comment if you don't want it
|
||||
XINERAMALIBS = -lXinerama
|
||||
XINERAMAFLAGS = -DXINERAMA
|
||||
|
||||
# freetype
|
||||
FREETYPELIBS = -lfontconfig -lXft
|
||||
FREETYPEINC = /usr/include/freetype2
|
||||
# OpenBSD (uncomment)
|
||||
#FREETYPEINC = $(X11INC)/freetype2
|
||||
#MANPREFIX = ${PREFIX}/man
|
||||
|
||||
# includes and libs
|
||||
INCS = -I$(X11INC) -I$(FREETYPEINC)
|
||||
LIBS = -L$(X11LIB) -lX11 $(XINERAMALIBS) $(FREETYPELIBS) -lm
|
||||
|
||||
# flags
|
||||
CPPFLAGS = -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_XOPEN_SOURCE=700 -D_POSIX_C_SOURCE=200809L -DVERSION=\"$(VERSION)\" $(XINERAMAFLAGS)
|
||||
CFLAGS = -std=c99 -pedantic -Wall -Os $(INCS) $(CPPFLAGS)
|
||||
LDFLAGS = $(LIBS)
|
||||
|
||||
# compiler and linker
|
||||
CC = cc
|
|
@ -1,197 +0,0 @@
|
|||
.TH DMENU 1 dmenu\-VERSION
|
||||
.SH NAME
|
||||
dmenu \- dynamic menu
|
||||
.SH SYNOPSIS
|
||||
.B dmenu
|
||||
.RB [ \-bfivP ]
|
||||
.RB [ \-l
|
||||
.IR lines ]
|
||||
.RB [ \-m
|
||||
.IR monitor ]
|
||||
.RB [ \-p
|
||||
.IR prompt ]
|
||||
.RB [ \-fn
|
||||
.IR font ]
|
||||
.RB [ \-nb
|
||||
.IR color ]
|
||||
.RB [ \-nf
|
||||
.IR color ]
|
||||
.RB [ \-sb
|
||||
.IR color ]
|
||||
.RB [ \-sf
|
||||
.IR color ]
|
||||
.RB [ \-w
|
||||
.IR windowid ]
|
||||
.P
|
||||
.BR dmenu_run " ..."
|
||||
.SH DESCRIPTION
|
||||
.B dmenu
|
||||
is a dynamic menu for X, which reads a list of newline\-separated items from
|
||||
stdin. When the user selects an item and presses Return, their choice is printed
|
||||
to stdout and dmenu terminates. Entering text will narrow the items to those
|
||||
matching the tokens in the input.
|
||||
.P
|
||||
.B dmenu_run
|
||||
is a script used by
|
||||
.IR dwm (1)
|
||||
which lists programs in the user's $PATH and runs the result in their $SHELL.
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
.B \-b
|
||||
dmenu appears at the bottom of the screen.
|
||||
.TP
|
||||
.B \-f
|
||||
dmenu grabs the keyboard before reading stdin if not reading from a tty. This
|
||||
is faster, but will lock up X until stdin reaches end\-of\-file.
|
||||
.TP
|
||||
.B \-i
|
||||
dmenu matches menu items case insensitively.
|
||||
.TP
|
||||
.B \-P
|
||||
dmenu will not directly display the keyboard input, but instead replace it with dots. All data from stdin will be ignored.
|
||||
.TP
|
||||
.BI \-l " lines"
|
||||
dmenu lists items vertically, with the given number of lines.
|
||||
.TP
|
||||
.BI \-m " monitor"
|
||||
dmenu is displayed on the monitor number supplied. Monitor numbers are starting
|
||||
from 0.
|
||||
.TP
|
||||
.BI \-p " prompt"
|
||||
defines the prompt to be displayed to the left of the input field.
|
||||
.TP
|
||||
.BI \-fn " font"
|
||||
defines the font or font set used.
|
||||
.TP
|
||||
.BI \-nb " color"
|
||||
defines the normal background color.
|
||||
.IR #RGB ,
|
||||
.IR #RRGGBB ,
|
||||
and X color names are supported.
|
||||
.TP
|
||||
.BI \-nf " color"
|
||||
defines the normal foreground color.
|
||||
.TP
|
||||
.BI \-sb " color"
|
||||
defines the selected background color.
|
||||
.TP
|
||||
.BI \-sf " color"
|
||||
defines the selected foreground color.
|
||||
.TP
|
||||
.B \-v
|
||||
prints version information to stdout, then exits.
|
||||
.TP
|
||||
.BI \-w " windowid"
|
||||
embed into windowid.
|
||||
.SH USAGE
|
||||
dmenu is completely controlled by the keyboard. Items are selected using the
|
||||
arrow keys, page up, page down, home, and end.
|
||||
.TP
|
||||
.B Tab
|
||||
Copy the selected item to the input field.
|
||||
.TP
|
||||
.B Return
|
||||
Confirm selection. Prints the selected item to stdout and exits, returning
|
||||
success.
|
||||
.TP
|
||||
.B Ctrl-Return
|
||||
Confirm selection. Prints the selected item to stdout and continues.
|
||||
.TP
|
||||
.B Shift\-Return
|
||||
Confirm input. Prints the input text to stdout and exits, returning success.
|
||||
.TP
|
||||
.B Escape
|
||||
Exit without selecting an item, returning failure.
|
||||
.TP
|
||||
.B Ctrl-Left
|
||||
Move cursor to the start of the current word
|
||||
.TP
|
||||
.B Ctrl-Right
|
||||
Move cursor to the end of the current word
|
||||
.TP
|
||||
.B C\-a
|
||||
Home
|
||||
.TP
|
||||
.B C\-b
|
||||
Left
|
||||
.TP
|
||||
.B C\-c
|
||||
Escape
|
||||
.TP
|
||||
.B C\-d
|
||||
Delete
|
||||
.TP
|
||||
.B C\-e
|
||||
End
|
||||
.TP
|
||||
.B C\-f
|
||||
Right
|
||||
.TP
|
||||
.B C\-g
|
||||
Escape
|
||||
.TP
|
||||
.B C\-h
|
||||
Backspace
|
||||
.TP
|
||||
.B C\-i
|
||||
Tab
|
||||
.TP
|
||||
.B C\-j
|
||||
Return
|
||||
.TP
|
||||
.B C\-J
|
||||
Shift-Return
|
||||
.TP
|
||||
.B C\-k
|
||||
Delete line right
|
||||
.TP
|
||||
.B C\-m
|
||||
Return
|
||||
.TP
|
||||
.B C\-M
|
||||
Shift-Return
|
||||
.TP
|
||||
.B C\-n
|
||||
Down
|
||||
.TP
|
||||
.B C\-p
|
||||
Up
|
||||
.TP
|
||||
.B C\-u
|
||||
Delete line left
|
||||
.TP
|
||||
.B C\-w
|
||||
Delete word left
|
||||
.TP
|
||||
.B C\-y
|
||||
Paste from primary X selection
|
||||
.TP
|
||||
.B C\-Y
|
||||
Paste from X clipboard
|
||||
.TP
|
||||
.B M\-b
|
||||
Move cursor to the start of the current word
|
||||
.TP
|
||||
.B M\-f
|
||||
Move cursor to the end of the current word
|
||||
.TP
|
||||
.B M\-g
|
||||
Home
|
||||
.TP
|
||||
.B M\-G
|
||||
End
|
||||
.TP
|
||||
.B M\-h
|
||||
Up
|
||||
.TP
|
||||
.B M\-j
|
||||
Page down
|
||||
.TP
|
||||
.B M\-k
|
||||
Page up
|
||||
.TP
|
||||
.B M\-l
|
||||
Down
|
||||
.SH SEE ALSO
|
||||
.IR dwm (1),
|
||||
.IR stest (1)
|
File diff suppressed because it is too large
Load diff
|
@ -1,13 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
cachedir="${XDG_CACHE_HOME:-"$HOME/.cache"}"
|
||||
cache="$cachedir/dmenu_run"
|
||||
|
||||
[ ! -e "$cachedir" ] && mkdir -p "$cachedir"
|
||||
|
||||
IFS=:
|
||||
if stest -dqr -n "$cache" $PATH; then
|
||||
stest -flx $PATH | sort -u | tee "$cache"
|
||||
else
|
||||
cat "$cache"
|
||||
fi
|
|
@ -1,2 +0,0 @@
|
|||
#!/bin/sh
|
||||
dmenu_path | dmenu "$@" | ${SHELL:-"/bin/sh"} &
|
|
@ -1,450 +0,0 @@
|
|||
/* See LICENSE file for copyright and license details. */
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/Xft/Xft.h>
|
||||
|
||||
#include "drw.h"
|
||||
#include "util.h"
|
||||
|
||||
#define UTF_INVALID 0xFFFD
|
||||
#define UTF_SIZ 4
|
||||
|
||||
static const unsigned char utfbyte[UTF_SIZ + 1] = {0x80, 0, 0xC0, 0xE0, 0xF0};
|
||||
static const unsigned char utfmask[UTF_SIZ + 1] = {0xC0, 0x80, 0xE0, 0xF0, 0xF8};
|
||||
static const long utfmin[UTF_SIZ + 1] = { 0, 0, 0x80, 0x800, 0x10000};
|
||||
static const long utfmax[UTF_SIZ + 1] = {0x10FFFF, 0x7F, 0x7FF, 0xFFFF, 0x10FFFF};
|
||||
|
||||
static long
|
||||
utf8decodebyte(const char c, size_t *i)
|
||||
{
|
||||
for (*i = 0; *i < (UTF_SIZ + 1); ++(*i))
|
||||
if (((unsigned char)c & utfmask[*i]) == utfbyte[*i])
|
||||
return (unsigned char)c & ~utfmask[*i];
|
||||
return 0;
|
||||
}
|
||||
|
||||
static size_t
|
||||
utf8validate(long *u, size_t i)
|
||||
{
|
||||
if (!BETWEEN(*u, utfmin[i], utfmax[i]) || BETWEEN(*u, 0xD800, 0xDFFF))
|
||||
*u = UTF_INVALID;
|
||||
for (i = 1; *u > utfmax[i]; ++i)
|
||||
;
|
||||
return i;
|
||||
}
|
||||
|
||||
static size_t
|
||||
utf8decode(const char *c, long *u, size_t clen)
|
||||
{
|
||||
size_t i, j, len, type;
|
||||
long udecoded;
|
||||
|
||||
*u = UTF_INVALID;
|
||||
if (!clen)
|
||||
return 0;
|
||||
udecoded = utf8decodebyte(c[0], &len);
|
||||
if (!BETWEEN(len, 1, UTF_SIZ))
|
||||
return 1;
|
||||
for (i = 1, j = 1; i < clen && j < len; ++i, ++j) {
|
||||
udecoded = (udecoded << 6) | utf8decodebyte(c[i], &type);
|
||||
if (type)
|
||||
return j;
|
||||
}
|
||||
if (j < len)
|
||||
return 0;
|
||||
*u = udecoded;
|
||||
utf8validate(u, len);
|
||||
|
||||
return len;
|
||||
}
|
||||
|
||||
Drw *
|
||||
drw_create(Display *dpy, int screen, Window root, unsigned int w, unsigned int h)
|
||||
{
|
||||
Drw *drw = ecalloc(1, sizeof(Drw));
|
||||
|
||||
drw->dpy = dpy;
|
||||
drw->screen = screen;
|
||||
drw->root = root;
|
||||
drw->w = w;
|
||||
drw->h = h;
|
||||
drw->drawable = XCreatePixmap(dpy, root, w, h, DefaultDepth(dpy, screen));
|
||||
drw->gc = XCreateGC(dpy, root, 0, NULL);
|
||||
XSetLineAttributes(dpy, drw->gc, 1, LineSolid, CapButt, JoinMiter);
|
||||
|
||||
return drw;
|
||||
}
|
||||
|
||||
void
|
||||
drw_resize(Drw *drw, unsigned int w, unsigned int h)
|
||||
{
|
||||
if (!drw)
|
||||
return;
|
||||
|
||||
drw->w = w;
|
||||
drw->h = h;
|
||||
if (drw->drawable)
|
||||
XFreePixmap(drw->dpy, drw->drawable);
|
||||
drw->drawable = XCreatePixmap(drw->dpy, drw->root, w, h, DefaultDepth(drw->dpy, drw->screen));
|
||||
}
|
||||
|
||||
void
|
||||
drw_free(Drw *drw)
|
||||
{
|
||||
XFreePixmap(drw->dpy, drw->drawable);
|
||||
XFreeGC(drw->dpy, drw->gc);
|
||||
drw_fontset_free(drw->fonts);
|
||||
free(drw);
|
||||
}
|
||||
|
||||
/* This function is an implementation detail. Library users should use
|
||||
* drw_fontset_create instead.
|
||||
*/
|
||||
static Fnt *
|
||||
xfont_create(Drw *drw, const char *fontname, FcPattern *fontpattern)
|
||||
{
|
||||
Fnt *font;
|
||||
XftFont *xfont = NULL;
|
||||
FcPattern *pattern = NULL;
|
||||
|
||||
if (fontname) {
|
||||
/* Using the pattern found at font->xfont->pattern does not yield the
|
||||
* same substitution results as using the pattern returned by
|
||||
* FcNameParse; using the latter results in the desired fallback
|
||||
* behaviour whereas the former just results in missing-character
|
||||
* rectangles being drawn, at least with some fonts. */
|
||||
if (!(xfont = XftFontOpenName(drw->dpy, drw->screen, fontname))) {
|
||||
fprintf(stderr, "error, cannot load font from name: '%s'\n", fontname);
|
||||
return NULL;
|
||||
}
|
||||
if (!(pattern = FcNameParse((FcChar8 *) fontname))) {
|
||||
fprintf(stderr, "error, cannot parse font name to pattern: '%s'\n", fontname);
|
||||
XftFontClose(drw->dpy, xfont);
|
||||
return NULL;
|
||||
}
|
||||
} else if (fontpattern) {
|
||||
if (!(xfont = XftFontOpenPattern(drw->dpy, fontpattern))) {
|
||||
fprintf(stderr, "error, cannot load font from pattern.\n");
|
||||
return NULL;
|
||||
}
|
||||
} else {
|
||||
die("no font specified.");
|
||||
}
|
||||
|
||||
font = ecalloc(1, sizeof(Fnt));
|
||||
font->xfont = xfont;
|
||||
font->pattern = pattern;
|
||||
font->h = xfont->ascent + xfont->descent;
|
||||
font->dpy = drw->dpy;
|
||||
|
||||
return font;
|
||||
}
|
||||
|
||||
static void
|
||||
xfont_free(Fnt *font)
|
||||
{
|
||||
if (!font)
|
||||
return;
|
||||
if (font->pattern)
|
||||
FcPatternDestroy(font->pattern);
|
||||
XftFontClose(font->dpy, font->xfont);
|
||||
free(font);
|
||||
}
|
||||
|
||||
Fnt*
|
||||
drw_fontset_create(Drw* drw, const char *fonts[], size_t fontcount)
|
||||
{
|
||||
Fnt *cur, *ret = NULL;
|
||||
size_t i;
|
||||
|
||||
if (!drw || !fonts)
|
||||
return NULL;
|
||||
|
||||
for (i = 1; i <= fontcount; i++) {
|
||||
if ((cur = xfont_create(drw, fonts[fontcount - i], NULL))) {
|
||||
cur->next = ret;
|
||||
ret = cur;
|
||||
}
|
||||
}
|
||||
return (drw->fonts = ret);
|
||||
}
|
||||
|
||||
void
|
||||
drw_fontset_free(Fnt *font)
|
||||
{
|
||||
if (font) {
|
||||
drw_fontset_free(font->next);
|
||||
xfont_free(font);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
drw_clr_create(Drw *drw, Clr *dest, const char *clrname)
|
||||
{
|
||||
if (!drw || !dest || !clrname)
|
||||
return;
|
||||
|
||||
if (!XftColorAllocName(drw->dpy, DefaultVisual(drw->dpy, drw->screen),
|
||||
DefaultColormap(drw->dpy, drw->screen),
|
||||
clrname, dest))
|
||||
die("error, cannot allocate color '%s'", clrname);
|
||||
}
|
||||
|
||||
/* Wrapper to create color schemes. The caller has to call free(3) on the
|
||||
* returned color scheme when done using it. */
|
||||
Clr *
|
||||
drw_scm_create(Drw *drw, const char *clrnames[], size_t clrcount)
|
||||
{
|
||||
size_t i;
|
||||
Clr *ret;
|
||||
|
||||
/* need at least two colors for a scheme */
|
||||
if (!drw || !clrnames || clrcount < 2 || !(ret = ecalloc(clrcount, sizeof(XftColor))))
|
||||
return NULL;
|
||||
|
||||
for (i = 0; i < clrcount; i++)
|
||||
drw_clr_create(drw, &ret[i], clrnames[i]);
|
||||
return ret;
|
||||
}
|
||||
|
||||
void
|
||||
drw_setfontset(Drw *drw, Fnt *set)
|
||||
{
|
||||
if (drw)
|
||||
drw->fonts = set;
|
||||
}
|
||||
|
||||
void
|
||||
drw_setscheme(Drw *drw, Clr *scm)
|
||||
{
|
||||
if (drw)
|
||||
drw->scheme = scm;
|
||||
}
|
||||
|
||||
void
|
||||
drw_rect(Drw *drw, int x, int y, unsigned int w, unsigned int h, int filled, int invert)
|
||||
{
|
||||
if (!drw || !drw->scheme)
|
||||
return;
|
||||
XSetForeground(drw->dpy, drw->gc, invert ? drw->scheme[ColBg].pixel : drw->scheme[ColFg].pixel);
|
||||
if (filled)
|
||||
XFillRectangle(drw->dpy, drw->drawable, drw->gc, x, y, w, h);
|
||||
else
|
||||
XDrawRectangle(drw->dpy, drw->drawable, drw->gc, x, y, w - 1, h - 1);
|
||||
}
|
||||
|
||||
int
|
||||
drw_text(Drw *drw, int x, int y, unsigned int w, unsigned int h, unsigned int lpad, const char *text, int invert)
|
||||
{
|
||||
int i, ty, ellipsis_x = 0;
|
||||
unsigned int tmpw, ew, ellipsis_w = 0, ellipsis_len;
|
||||
XftDraw *d = NULL;
|
||||
Fnt *usedfont, *curfont, *nextfont;
|
||||
int utf8strlen, utf8charlen, render = x || y || w || h;
|
||||
long utf8codepoint = 0;
|
||||
const char *utf8str;
|
||||
FcCharSet *fccharset;
|
||||
FcPattern *fcpattern;
|
||||
FcPattern *match;
|
||||
XftResult result;
|
||||
int charexists = 0, overflow = 0;
|
||||
/* keep track of a couple codepoints for which we have no match. */
|
||||
enum { nomatches_len = 64 };
|
||||
static struct { long codepoint[nomatches_len]; unsigned int idx; } nomatches;
|
||||
static unsigned int ellipsis_width = 0;
|
||||
|
||||
if (!drw || (render && (!drw->scheme || !w)) || !text || !drw->fonts)
|
||||
return 0;
|
||||
|
||||
if (!render) {
|
||||
w = invert ? invert : ~invert;
|
||||
} else {
|
||||
XSetForeground(drw->dpy, drw->gc, drw->scheme[invert ? ColFg : ColBg].pixel);
|
||||
XFillRectangle(drw->dpy, drw->drawable, drw->gc, x, y, w, h);
|
||||
d = XftDrawCreate(drw->dpy, drw->drawable,
|
||||
DefaultVisual(drw->dpy, drw->screen),
|
||||
DefaultColormap(drw->dpy, drw->screen));
|
||||
x += lpad;
|
||||
w -= lpad;
|
||||
}
|
||||
|
||||
usedfont = drw->fonts;
|
||||
if (!ellipsis_width && render)
|
||||
ellipsis_width = drw_fontset_getwidth(drw, "...");
|
||||
while (1) {
|
||||
ew = ellipsis_len = utf8strlen = 0;
|
||||
utf8str = text;
|
||||
nextfont = NULL;
|
||||
while (*text) {
|
||||
utf8charlen = utf8decode(text, &utf8codepoint, UTF_SIZ);
|
||||
for (curfont = drw->fonts; curfont; curfont = curfont->next) {
|
||||
charexists = charexists || XftCharExists(drw->dpy, curfont->xfont, utf8codepoint);
|
||||
if (charexists) {
|
||||
drw_font_getexts(curfont, text, utf8charlen, &tmpw, NULL);
|
||||
if (ew + ellipsis_width <= w) {
|
||||
/* keep track where the ellipsis still fits */
|
||||
ellipsis_x = x + ew;
|
||||
ellipsis_w = w - ew;
|
||||
ellipsis_len = utf8strlen;
|
||||
}
|
||||
|
||||
if (ew + tmpw > w) {
|
||||
overflow = 1;
|
||||
/* called from drw_fontset_getwidth_clamp():
|
||||
* it wants the width AFTER the overflow
|
||||
*/
|
||||
if (!render)
|
||||
x += tmpw;
|
||||
else
|
||||
utf8strlen = ellipsis_len;
|
||||
} else if (curfont == usedfont) {
|
||||
utf8strlen += utf8charlen;
|
||||
text += utf8charlen;
|
||||
ew += tmpw;
|
||||
} else {
|
||||
nextfont = curfont;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (overflow || !charexists || nextfont)
|
||||
break;
|
||||
else
|
||||
charexists = 0;
|
||||
}
|
||||
|
||||
if (utf8strlen) {
|
||||
if (render) {
|
||||
ty = y + (h - usedfont->h) / 2 + usedfont->xfont->ascent;
|
||||
XftDrawStringUtf8(d, &drw->scheme[invert ? ColBg : ColFg],
|
||||
usedfont->xfont, x, ty, (XftChar8 *)utf8str, utf8strlen);
|
||||
}
|
||||
x += ew;
|
||||
w -= ew;
|
||||
}
|
||||
if (render && overflow)
|
||||
drw_text(drw, ellipsis_x, y, ellipsis_w, h, 0, "...", invert);
|
||||
|
||||
if (!*text || overflow) {
|
||||
break;
|
||||
} else if (nextfont) {
|
||||
charexists = 0;
|
||||
usedfont = nextfont;
|
||||
} else {
|
||||
/* Regardless of whether or not a fallback font is found, the
|
||||
* character must be drawn. */
|
||||
charexists = 1;
|
||||
|
||||
for (i = 0; i < nomatches_len; ++i) {
|
||||
/* avoid calling XftFontMatch if we know we won't find a match */
|
||||
if (utf8codepoint == nomatches.codepoint[i])
|
||||
goto no_match;
|
||||
}
|
||||
|
||||
fccharset = FcCharSetCreate();
|
||||
FcCharSetAddChar(fccharset, utf8codepoint);
|
||||
|
||||
if (!drw->fonts->pattern) {
|
||||
/* Refer to the comment in xfont_create for more information. */
|
||||
die("the first font in the cache must be loaded from a font string.");
|
||||
}
|
||||
|
||||
fcpattern = FcPatternDuplicate(drw->fonts->pattern);
|
||||
FcPatternAddCharSet(fcpattern, FC_CHARSET, fccharset);
|
||||
FcPatternAddBool(fcpattern, FC_SCALABLE, FcTrue);
|
||||
|
||||
FcConfigSubstitute(NULL, fcpattern, FcMatchPattern);
|
||||
FcDefaultSubstitute(fcpattern);
|
||||
match = XftFontMatch(drw->dpy, drw->screen, fcpattern, &result);
|
||||
|
||||
FcCharSetDestroy(fccharset);
|
||||
FcPatternDestroy(fcpattern);
|
||||
|
||||
if (match) {
|
||||
usedfont = xfont_create(drw, NULL, match);
|
||||
if (usedfont && XftCharExists(drw->dpy, usedfont->xfont, utf8codepoint)) {
|
||||
for (curfont = drw->fonts; curfont->next; curfont = curfont->next)
|
||||
; /* NOP */
|
||||
curfont->next = usedfont;
|
||||
} else {
|
||||
xfont_free(usedfont);
|
||||
nomatches.codepoint[++nomatches.idx % nomatches_len] = utf8codepoint;
|
||||
no_match:
|
||||
usedfont = drw->fonts;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (d)
|
||||
XftDrawDestroy(d);
|
||||
|
||||
return x + (render ? w : 0);
|
||||
}
|
||||
|
||||
void
|
||||
drw_map(Drw *drw, Window win, int x, int y, unsigned int w, unsigned int h)
|
||||
{
|
||||
if (!drw)
|
||||
return;
|
||||
|
||||
XCopyArea(drw->dpy, drw->drawable, win, drw->gc, x, y, w, h, x, y);
|
||||
XSync(drw->dpy, False);
|
||||
}
|
||||
|
||||
unsigned int
|
||||
drw_fontset_getwidth(Drw *drw, const char *text)
|
||||
{
|
||||
if (!drw || !drw->fonts || !text)
|
||||
return 0;
|
||||
return drw_text(drw, 0, 0, 0, 0, 0, text, 0);
|
||||
}
|
||||
|
||||
unsigned int
|
||||
drw_fontset_getwidth_clamp(Drw *drw, const char *text, unsigned int n)
|
||||
{
|
||||
unsigned int tmp = 0;
|
||||
if (drw && drw->fonts && text && n)
|
||||
tmp = drw_text(drw, 0, 0, 0, 0, 0, text, n);
|
||||
return MIN(n, tmp);
|
||||
}
|
||||
|
||||
void
|
||||
drw_font_getexts(Fnt *font, const char *text, unsigned int len, unsigned int *w, unsigned int *h)
|
||||
{
|
||||
XGlyphInfo ext;
|
||||
|
||||
if (!font || !text)
|
||||
return;
|
||||
|
||||
XftTextExtentsUtf8(font->dpy, font->xfont, (XftChar8 *)text, len, &ext);
|
||||
if (w)
|
||||
*w = ext.xOff;
|
||||
if (h)
|
||||
*h = font->h;
|
||||
}
|
||||
|
||||
Cur *
|
||||
drw_cur_create(Drw *drw, int shape)
|
||||
{
|
||||
Cur *cur;
|
||||
|
||||
if (!drw || !(cur = ecalloc(1, sizeof(Cur))))
|
||||
return NULL;
|
||||
|
||||
cur->cursor = XCreateFontCursor(drw->dpy, shape);
|
||||
|
||||
return cur;
|
||||
}
|
||||
|
||||
void
|
||||
drw_cur_free(Drw *drw, Cur *cursor)
|
||||
{
|
||||
if (!cursor)
|
||||
return;
|
||||
|
||||
XFreeCursor(drw->dpy, cursor->cursor);
|
||||
free(cursor);
|
||||
}
|
|
@ -1,58 +0,0 @@
|
|||
/* See LICENSE file for copyright and license details. */
|
||||
|
||||
typedef struct {
|
||||
Cursor cursor;
|
||||
} Cur;
|
||||
|
||||
typedef struct Fnt {
|
||||
Display *dpy;
|
||||
unsigned int h;
|
||||
XftFont *xfont;
|
||||
FcPattern *pattern;
|
||||
struct Fnt *next;
|
||||
} Fnt;
|
||||
|
||||
enum { ColFg, ColBg }; /* Clr scheme index */
|
||||
typedef XftColor Clr;
|
||||
|
||||
typedef struct {
|
||||
unsigned int w, h;
|
||||
Display *dpy;
|
||||
int screen;
|
||||
Window root;
|
||||
Drawable drawable;
|
||||
GC gc;
|
||||
Clr *scheme;
|
||||
Fnt *fonts;
|
||||
} Drw;
|
||||
|
||||
/* Drawable abstraction */
|
||||
Drw *drw_create(Display *dpy, int screen, Window win, unsigned int w, unsigned int h);
|
||||
void drw_resize(Drw *drw, unsigned int w, unsigned int h);
|
||||
void drw_free(Drw *drw);
|
||||
|
||||
/* Fnt abstraction */
|
||||
Fnt *drw_fontset_create(Drw* drw, const char *fonts[], size_t fontcount);
|
||||
void drw_fontset_free(Fnt* set);
|
||||
unsigned int drw_fontset_getwidth(Drw *drw, const char *text);
|
||||
unsigned int drw_fontset_getwidth_clamp(Drw *drw, const char *text, unsigned int n);
|
||||
void drw_font_getexts(Fnt *font, const char *text, unsigned int len, unsigned int *w, unsigned int *h);
|
||||
|
||||
/* Colorscheme abstraction */
|
||||
void drw_clr_create(Drw *drw, Clr *dest, const char *clrname);
|
||||
Clr *drw_scm_create(Drw *drw, const char *clrnames[], size_t clrcount);
|
||||
|
||||
/* Cursor abstraction */
|
||||
Cur *drw_cur_create(Drw *drw, int shape);
|
||||
void drw_cur_free(Drw *drw, Cur *cursor);
|
||||
|
||||
/* Drawing context manipulation */
|
||||
void drw_setfontset(Drw *drw, Fnt *set);
|
||||
void drw_setscheme(Drw *drw, Clr *scm);
|
||||
|
||||
/* Drawing functions */
|
||||
void drw_rect(Drw *drw, int x, int y, unsigned int w, unsigned int h, int filled, int invert);
|
||||
int drw_text(Drw *drw, int x, int y, unsigned int w, unsigned int h, unsigned int lpad, const char *text, int invert);
|
||||
|
||||
/* Map functions */
|
||||
void drw_map(Drw *drw, Window win, int x, int y, unsigned int w, unsigned int h);
|
|
@ -1,163 +0,0 @@
|
|||
From 94353eb52055927d9079f3d9e33da1c954abf386 Mon Sep 17 00:00:00 2001
|
||||
From: aleks <aleks.stier@icloud.com>
|
||||
Date: Wed, 26 Jun 2019 13:25:10 +0200
|
||||
Subject: [PATCH] Add support for fuzzy-matching
|
||||
|
||||
---
|
||||
config.def.h | 1 +
|
||||
config.mk | 2 +-
|
||||
dmenu.c | 89 ++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
3 files changed, 91 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/config.def.h b/config.def.h
|
||||
index 1edb647..51612b9 100644
|
||||
--- a/config.def.h
|
||||
+++ b/config.def.h
|
||||
@@ -2,6 +2,7 @@
|
||||
/* Default settings; can be overriden by command line. */
|
||||
|
||||
static int topbar = 1; /* -b option; if 0, dmenu appears at bottom */
|
||||
+static int fuzzy = 1; /* -F option; if 0, dmenu doesn't use fuzzy matching */
|
||||
/* -fn option overrides fonts[0]; default X11 font or font set */
|
||||
static const char *fonts[] = {
|
||||
"monospace:size=10"
|
||||
diff --git a/config.mk b/config.mk
|
||||
index 0929b4a..d14309a 100644
|
||||
--- a/config.mk
|
||||
+++ b/config.mk
|
||||
@@ -20,7 +20,7 @@ FREETYPEINC = /usr/include/freetype2
|
||||
|
||||
# includes and libs
|
||||
INCS = -I$(X11INC) -I$(FREETYPEINC)
|
||||
-LIBS = -L$(X11LIB) -lX11 $(XINERAMALIBS) $(FREETYPELIBS)
|
||||
+LIBS = -L$(X11LIB) -lX11 $(XINERAMALIBS) $(FREETYPELIBS) -lm
|
||||
|
||||
# flags
|
||||
CPPFLAGS = -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_XOPEN_SOURCE=700 -D_POSIX_C_SOURCE=200809L -DVERSION=\"$(VERSION)\" $(XINERAMAFLAGS)
|
||||
diff --git a/dmenu.c b/dmenu.c
|
||||
index 6b8f51b..96ddc98 100644
|
||||
--- a/dmenu.c
|
||||
+++ b/dmenu.c
|
||||
@@ -1,6 +1,7 @@
|
||||
/* See LICENSE file for copyright and license details. */
|
||||
#include <ctype.h>
|
||||
#include <locale.h>
|
||||
+#include <math.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
@@ -32,6 +33,7 @@ struct item {
|
||||
char *text;
|
||||
struct item *left, *right;
|
||||
int out;
|
||||
+ double distance;
|
||||
};
|
||||
|
||||
static char text[BUFSIZ] = "";
|
||||
@@ -210,9 +212,94 @@ grabkeyboard(void)
|
||||
die("cannot grab keyboard");
|
||||
}
|
||||
|
||||
+int
|
||||
+compare_distance(const void *a, const void *b)
|
||||
+{
|
||||
+ struct item *da = *(struct item **) a;
|
||||
+ struct item *db = *(struct item **) b;
|
||||
+
|
||||
+ if (!db)
|
||||
+ return 1;
|
||||
+ if (!da)
|
||||
+ return -1;
|
||||
+
|
||||
+ return da->distance == db->distance ? 0 : da->distance < db->distance ? -1 : 1;
|
||||
+}
|
||||
+
|
||||
+void
|
||||
+fuzzymatch(void)
|
||||
+{
|
||||
+ /* bang - we have so much memory */
|
||||
+ struct item *it;
|
||||
+ struct item **fuzzymatches = NULL;
|
||||
+ char c;
|
||||
+ int number_of_matches = 0, i, pidx, sidx, eidx;
|
||||
+ int text_len = strlen(text), itext_len;
|
||||
+
|
||||
+ matches = matchend = NULL;
|
||||
+
|
||||
+ /* walk through all items */
|
||||
+ for (it = items; it && it->text; it++) {
|
||||
+ if (text_len) {
|
||||
+ itext_len = strlen(it->text);
|
||||
+ pidx = 0; /* pointer */
|
||||
+ sidx = eidx = -1; /* start of match, end of match */
|
||||
+ /* walk through item text */
|
||||
+ for (i = 0; i < itext_len && (c = it->text[i]); i++) {
|
||||
+ /* fuzzy match pattern */
|
||||
+ if (!fstrncmp(&text[pidx], &c, 1)) {
|
||||
+ if(sidx == -1)
|
||||
+ sidx = i;
|
||||
+ pidx++;
|
||||
+ if (pidx == text_len) {
|
||||
+ eidx = i;
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ /* build list of matches */
|
||||
+ if (eidx != -1) {
|
||||
+ /* compute distance */
|
||||
+ /* add penalty if match starts late (log(sidx+2))
|
||||
+ * add penalty for long a match without many matching characters */
|
||||
+ it->distance = log(sidx + 2) + (double)(eidx - sidx - text_len);
|
||||
+ /* fprintf(stderr, "distance %s %f\n", it->text, it->distance); */
|
||||
+ appenditem(it, &matches, &matchend);
|
||||
+ number_of_matches++;
|
||||
+ }
|
||||
+ } else {
|
||||
+ appenditem(it, &matches, &matchend);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ if (number_of_matches) {
|
||||
+ /* initialize array with matches */
|
||||
+ if (!(fuzzymatches = realloc(fuzzymatches, number_of_matches * sizeof(struct item*))))
|
||||
+ die("cannot realloc %u bytes:", number_of_matches * sizeof(struct item*));
|
||||
+ for (i = 0, it = matches; it && i < number_of_matches; i++, it = it->right) {
|
||||
+ fuzzymatches[i] = it;
|
||||
+ }
|
||||
+ /* sort matches according to distance */
|
||||
+ qsort(fuzzymatches, number_of_matches, sizeof(struct item*), compare_distance);
|
||||
+ /* rebuild list of matches */
|
||||
+ matches = matchend = NULL;
|
||||
+ for (i = 0, it = fuzzymatches[i]; i < number_of_matches && it && \
|
||||
+ it->text; i++, it = fuzzymatches[i]) {
|
||||
+ appenditem(it, &matches, &matchend);
|
||||
+ }
|
||||
+ free(fuzzymatches);
|
||||
+ }
|
||||
+ curr = sel = matches;
|
||||
+ calcoffsets();
|
||||
+}
|
||||
+
|
||||
static void
|
||||
match(void)
|
||||
{
|
||||
+ if (fuzzy) {
|
||||
+ fuzzymatch();
|
||||
+ return;
|
||||
+ }
|
||||
static char **tokv = NULL;
|
||||
static int tokn = 0;
|
||||
|
||||
@@ -702,6 +789,8 @@ main(int argc, char *argv[])
|
||||
topbar = 0;
|
||||
else if (!strcmp(argv[i], "-f")) /* grabs keyboard before reading stdin */
|
||||
fast = 1;
|
||||
+ else if (!strcmp(argv[i], "-F")) /* grabs keyboard before reading stdin */
|
||||
+ fuzzy = 0;
|
||||
else if (!strcmp(argv[i], "-i")) { /* case-insensitive item matching */
|
||||
fstrncmp = strncasecmp;
|
||||
fstrstr = cistrstr;
|
||||
--
|
||||
2.22.0
|
||||
|
|
@ -1,97 +0,0 @@
|
|||
From fcdc1593ed418166f20b7e691a49b1e6eefc116e Mon Sep 17 00:00:00 2001
|
||||
From: Nathaniel Evan <nathanielevan@zohomail.com>
|
||||
Date: Fri, 11 Dec 2020 11:08:12 +0700
|
||||
Subject: [PATCH] Highlight matched text in a different color scheme
|
||||
|
||||
---
|
||||
config.def.h | 3 +++
|
||||
dmenu.c | 44 +++++++++++++++++++++++++++++++++++++++++---
|
||||
2 files changed, 44 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/config.def.h b/config.def.h
|
||||
index 1edb647..79be73a 100644
|
||||
--- a/config.def.h
|
||||
+++ b/config.def.h
|
||||
@@ -11,7 +11,10 @@ static const char *colors[SchemeLast][2] = {
|
||||
/* fg bg */
|
||||
[SchemeNorm] = { "#bbbbbb", "#222222" },
|
||||
[SchemeSel] = { "#eeeeee", "#005577" },
|
||||
+ [SchemeSelHighlight] = { "#ffc978", "#005577" },
|
||||
+ [SchemeNormHighlight] = { "#ffc978", "#222222" },
|
||||
[SchemeOut] = { "#000000", "#00ffff" },
|
||||
+ [SchemeOutHighlight] = { "#ffc978", "#00ffff" },
|
||||
};
|
||||
/* -l option; if nonzero, dmenu uses vertical list with given number of lines */
|
||||
static unsigned int lines = 0;
|
||||
diff --git a/dmenu.c b/dmenu.c
|
||||
index 65f25ce..cce1ad1 100644
|
||||
--- a/dmenu.c
|
||||
+++ b/dmenu.c
|
||||
@@ -26,8 +26,7 @@
|
||||
#define TEXTW(X) (drw_fontset_getwidth(drw, (X)) + lrpad)
|
||||
|
||||
/* enums */
|
||||
-enum { SchemeNorm, SchemeSel, SchemeOut, SchemeLast }; /* color schemes */
|
||||
-
|
||||
+enum { SchemeNorm, SchemeSel, SchemeOut, SchemeNormHighlight, SchemeSelHighlight, SchemeOutHighlight, SchemeLast }; /* color schemes */
|
||||
struct item {
|
||||
char *text;
|
||||
struct item *left, *right;
|
||||
@@ -113,6 +112,43 @@ cistrstr(const char *s, const char *sub)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
+static void
|
||||
+drawhighlights(struct item *item, int x, int y, int maxw)
|
||||
+{
|
||||
+ char restorechar, tokens[sizeof text], *highlight, *token;
|
||||
+ int indentx, highlightlen;
|
||||
+
|
||||
+ drw_setscheme(drw, scheme[item == sel ? SchemeSelHighlight : item->out ? SchemeOutHighlight : SchemeNormHighlight]);
|
||||
+ strcpy(tokens, text);
|
||||
+ for (token = strtok(tokens, " "); token; token = strtok(NULL, " ")) {
|
||||
+ highlight = fstrstr(item->text, token);
|
||||
+ while (highlight) {
|
||||
+ // Move item str end, calc width for highlight indent, & restore
|
||||
+ highlightlen = highlight - item->text;
|
||||
+ restorechar = *highlight;
|
||||
+ item->text[highlightlen] = '\0';
|
||||
+ indentx = TEXTW(item->text);
|
||||
+ item->text[highlightlen] = restorechar;
|
||||
+
|
||||
+ // Move highlight str end, draw highlight, & restore
|
||||
+ restorechar = highlight[strlen(token)];
|
||||
+ highlight[strlen(token)] = '\0';
|
||||
+ if (indentx - (lrpad / 2) - 1 < maxw)
|
||||
+ drw_text(
|
||||
+ drw,
|
||||
+ x + indentx - (lrpad / 2) - 1,
|
||||
+ y,
|
||||
+ MIN(maxw - indentx, TEXTW(highlight) - lrpad),
|
||||
+ bh, 0, highlight, 0
|
||||
+ );
|
||||
+ highlight[strlen(token)] = restorechar;
|
||||
+
|
||||
+ if (strlen(highlight) - strlen(token) < strlen(token)) break;
|
||||
+ highlight = fstrstr(highlight + strlen(token), token);
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
static int
|
||||
drawitem(struct item *item, int x, int y, int w)
|
||||
{
|
||||
@@ -123,7 +159,9 @@ drawitem(struct item *item, int x, int y, int w)
|
||||
else
|
||||
drw_setscheme(drw, scheme[SchemeNorm]);
|
||||
|
||||
- return drw_text(drw, x, y, w, bh, lrpad / 2, item->text, 0);
|
||||
+ int r = drw_text(drw, x, y, w, bh, lrpad / 2, item->text, 0);
|
||||
+ drawhighlights(item, x, y, w);
|
||||
+ return r;
|
||||
}
|
||||
|
||||
static void
|
||||
--
|
||||
2.29.2
|
||||
|
|
@ -1,144 +0,0 @@
|
|||
diff --git a/dmenu.c b/dmenu.c
|
||||
index 7cf253b..d276a94 100644
|
||||
--- a/dmenu.c
|
||||
+++ b/dmenu.c
|
||||
@@ -528,6 +528,119 @@ draw:
|
||||
drawmenu();
|
||||
}
|
||||
|
||||
+static void
|
||||
+buttonpress(XEvent *e)
|
||||
+{
|
||||
+ struct item *item;
|
||||
+ XButtonPressedEvent *ev = &e->xbutton;
|
||||
+ int x = 0, y = 0, h = bh, w;
|
||||
+
|
||||
+ if (ev->window != win)
|
||||
+ return;
|
||||
+
|
||||
+ /* right-click: exit */
|
||||
+ if (ev->button == Button3)
|
||||
+ exit(1);
|
||||
+
|
||||
+ if (prompt && *prompt)
|
||||
+ x += promptw;
|
||||
+
|
||||
+ /* input field */
|
||||
+ w = (lines > 0 || !matches) ? mw - x : inputw;
|
||||
+
|
||||
+ /* left-click on input: clear input,
|
||||
+ * NOTE: if there is no left-arrow the space for < is reserved so
|
||||
+ * add that to the input width */
|
||||
+ if (ev->button == Button1 &&
|
||||
+ ((lines <= 0 && ev->x >= 0 && ev->x <= x + w +
|
||||
+ ((!prev || !curr->left) ? TEXTW("<") : 0)) ||
|
||||
+ (lines > 0 && ev->y >= y && ev->y <= y + h))) {
|
||||
+ insert(NULL, -cursor);
|
||||
+ drawmenu();
|
||||
+ return;
|
||||
+ }
|
||||
+ /* middle-mouse click: paste selection */
|
||||
+ if (ev->button == Button2) {
|
||||
+ XConvertSelection(dpy, (ev->state & ShiftMask) ? clip : XA_PRIMARY,
|
||||
+ utf8, utf8, win, CurrentTime);
|
||||
+ drawmenu();
|
||||
+ return;
|
||||
+ }
|
||||
+ /* scroll up */
|
||||
+ if (ev->button == Button4 && prev) {
|
||||
+ sel = curr = prev;
|
||||
+ calcoffsets();
|
||||
+ drawmenu();
|
||||
+ return;
|
||||
+ }
|
||||
+ /* scroll down */
|
||||
+ if (ev->button == Button5 && next) {
|
||||
+ sel = curr = next;
|
||||
+ calcoffsets();
|
||||
+ drawmenu();
|
||||
+ return;
|
||||
+ }
|
||||
+ if (ev->button != Button1)
|
||||
+ return;
|
||||
+ if (ev->state & ~ControlMask)
|
||||
+ return;
|
||||
+ if (lines > 0) {
|
||||
+ /* vertical list: (ctrl)left-click on item */
|
||||
+ w = mw - x;
|
||||
+ for (item = curr; item != next; item = item->right) {
|
||||
+ y += h;
|
||||
+ if (ev->y >= y && ev->y <= (y + h)) {
|
||||
+ puts(item->text);
|
||||
+ if (!(ev->state & ControlMask))
|
||||
+ exit(0);
|
||||
+ sel = item;
|
||||
+ if (sel) {
|
||||
+ sel->out = 1;
|
||||
+ drawmenu();
|
||||
+ }
|
||||
+ return;
|
||||
+ }
|
||||
+ }
|
||||
+ } else if (matches) {
|
||||
+ /* left-click on left arrow */
|
||||
+ x += inputw;
|
||||
+ w = TEXTW("<");
|
||||
+ if (prev && curr->left) {
|
||||
+ if (ev->x >= x && ev->x <= x + w) {
|
||||
+ sel = curr = prev;
|
||||
+ calcoffsets();
|
||||
+ drawmenu();
|
||||
+ return;
|
||||
+ }
|
||||
+ }
|
||||
+ /* horizontal list: (ctrl)left-click on item */
|
||||
+ for (item = curr; item != next; item = item->right) {
|
||||
+ x += w;
|
||||
+ w = MIN(TEXTW(item->text), mw - x - TEXTW(">"));
|
||||
+ if (ev->x >= x && ev->x <= x + w) {
|
||||
+ puts(item->text);
|
||||
+ if (!(ev->state & ControlMask))
|
||||
+ exit(0);
|
||||
+ sel = item;
|
||||
+ if (sel) {
|
||||
+ sel->out = 1;
|
||||
+ drawmenu();
|
||||
+ }
|
||||
+ return;
|
||||
+ }
|
||||
+ }
|
||||
+ /* left-click on right arrow */
|
||||
+ w = TEXTW(">");
|
||||
+ x = mw - w;
|
||||
+ if (next && ev->x >= x && ev->x <= x + w) {
|
||||
+ sel = curr = next;
|
||||
+ calcoffsets();
|
||||
+ drawmenu();
|
||||
+ return;
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
static void
|
||||
paste(void)
|
||||
{
|
||||
@@ -582,6 +695,9 @@ run(void)
|
||||
break;
|
||||
cleanup();
|
||||
exit(1);
|
||||
+ case ButtonPress:
|
||||
+ buttonpress(&ev);
|
||||
+ break;
|
||||
case Expose:
|
||||
if (ev.xexpose.count == 0)
|
||||
drw_map(drw, win, 0, 0, mw, mh);
|
||||
@@ -679,7 +795,8 @@ setup(void)
|
||||
/* create menu window */
|
||||
swa.override_redirect = True;
|
||||
swa.background_pixel = scheme[SchemeNorm][ColBg].pixel;
|
||||
- swa.event_mask = ExposureMask | KeyPressMask | VisibilityChangeMask;
|
||||
+ swa.event_mask = ExposureMask | KeyPressMask | VisibilityChangeMask |
|
||||
+ ButtonPressMask;
|
||||
win = XCreateWindow(dpy, parentwin, x, y, mw, mh, 0,
|
||||
CopyFromParent, CopyFromParent, CopyFromParent,
|
||||
CWOverrideRedirect | CWBackPixel | CWEventMask, &swa);
|
|
@ -1,53 +0,0 @@
|
|||
diff --git a/dmenu.c b/dmenu.c
|
||||
index 48d4980..7677401 100644
|
||||
--- a/dmenu.c
|
||||
+++ b/dmenu.c
|
||||
@@ -641,6 +641,29 @@ buttonpress(XEvent *e)
|
||||
}
|
||||
}
|
||||
|
||||
+static void
|
||||
+motionevent(XButtonEvent *ev)
|
||||
+{
|
||||
+ struct item *it;
|
||||
+ int xy, ev_xy;
|
||||
+
|
||||
+ if (ev->window != win || matches == 0)
|
||||
+ return;
|
||||
+
|
||||
+ xy = lines > 0 ? bh : inputw + promptw + TEXTW("<");
|
||||
+ ev_xy = lines > 0 ? ev->y : ev->x;
|
||||
+ for (it = curr; it && it != next; it = it->right) {
|
||||
+ int wh = lines > 0 ? bh : textw_clamp(it->text, mw - xy - TEXTW(">"));
|
||||
+ if (ev_xy >= xy && ev_xy < (xy + wh)) {
|
||||
+ sel = it;
|
||||
+ calcoffsets();
|
||||
+ drawmenu();
|
||||
+ break;
|
||||
+ }
|
||||
+ xy += wh;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
static void
|
||||
paste(void)
|
||||
{
|
||||
@@ -702,6 +725,9 @@ run(void)
|
||||
case ButtonPress:
|
||||
buttonpress(&ev);
|
||||
break;
|
||||
+ case MotionNotify:
|
||||
+ motionevent(&ev.xbutton);
|
||||
+ break;
|
||||
case Expose:
|
||||
if (ev.xexpose.count == 0)
|
||||
drw_map(drw, win, 0, 0, mw, mh);
|
||||
@@ -800,7 +826,7 @@ setup(void)
|
||||
swa.override_redirect = True;
|
||||
swa.background_pixel = scheme[SchemeNorm][ColBg].pixel;
|
||||
swa.event_mask = ExposureMask | KeyPressMask | VisibilityChangeMask |
|
||||
- ButtonPressMask;
|
||||
+ ButtonPressMask | PointerMotionMask;
|
||||
win = XCreateWindow(dpy, parentwin, x, y, mw, mh, 0,
|
||||
CopyFromParent, CopyFromParent, CopyFromParent,
|
||||
CWOverrideRedirect | CWBackPixel | CWEventMask, &swa);
|
|
@ -1,103 +0,0 @@
|
|||
From c4de1032bd4c247bc20b6ab92a10a8d778966679 Mon Sep 17 00:00:00 2001
|
||||
From: Mehrad Mahmoudian <m.mahmoudian@gmail.com>
|
||||
Date: Tue, 4 May 2021 12:05:09 +0300
|
||||
Subject: [PATCH] patched with password patch
|
||||
|
||||
---
|
||||
dmenu.1 | 5 ++++-
|
||||
dmenu.c | 21 +++++++++++++++++----
|
||||
2 files changed, 21 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/dmenu.1 b/dmenu.1
|
||||
index 323f93c..762f707 100644
|
||||
--- a/dmenu.1
|
||||
+++ b/dmenu.1
|
||||
@@ -3,7 +3,7 @@
|
||||
dmenu \- dynamic menu
|
||||
.SH SYNOPSIS
|
||||
.B dmenu
|
||||
-.RB [ \-bfiv ]
|
||||
+.RB [ \-bfivP ]
|
||||
.RB [ \-l
|
||||
.IR lines ]
|
||||
.RB [ \-m
|
||||
@@ -47,6 +47,9 @@ is faster, but will lock up X until stdin reaches end\-of\-file.
|
||||
.B \-i
|
||||
dmenu matches menu items case insensitively.
|
||||
.TP
|
||||
+.B \-P
|
||||
+dmenu will not directly display the keyboard input, but instead replace it with dots. All data from stdin will be ignored.
|
||||
+.TP
|
||||
.BI \-l " lines"
|
||||
dmenu lists items vertically, with the given number of lines.
|
||||
.TP
|
||||
diff --git a/dmenu.c b/dmenu.c
|
||||
index 65f25ce..ad8f63b 100644
|
||||
--- a/dmenu.c
|
||||
+++ b/dmenu.c
|
||||
@@ -37,7 +37,7 @@ struct item {
|
||||
static char text[BUFSIZ] = "";
|
||||
static char *embed;
|
||||
static int bh, mw, mh;
|
||||
-static int inputw = 0, promptw;
|
||||
+static int inputw = 0, promptw, passwd = 0;
|
||||
static int lrpad; /* sum of left and right padding */
|
||||
static size_t cursor;
|
||||
static struct item *items = NULL;
|
||||
@@ -132,6 +132,7 @@ drawmenu(void)
|
||||
unsigned int curpos;
|
||||
struct item *item;
|
||||
int x = 0, y = 0, w;
|
||||
+ char *censort;
|
||||
|
||||
drw_setscheme(drw, scheme[SchemeNorm]);
|
||||
drw_rect(drw, 0, 0, mw, mh, 1, 1);
|
||||
@@ -143,7 +144,12 @@ drawmenu(void)
|
||||
/* draw input field */
|
||||
w = (lines > 0 || !matches) ? mw - x : inputw;
|
||||
drw_setscheme(drw, scheme[SchemeNorm]);
|
||||
- drw_text(drw, x, 0, w, bh, lrpad / 2, text, 0);
|
||||
+ if (passwd) {
|
||||
+ censort = ecalloc(1, sizeof(text));
|
||||
+ memset(censort, '.', strlen(text));
|
||||
+ drw_text(drw, x, 0, w, bh, lrpad / 2, censort, 0);
|
||||
+ free(censort);
|
||||
+ } else drw_text(drw, x, 0, w, bh, lrpad / 2, text, 0);
|
||||
|
||||
curpos = TEXTW(text) - TEXTW(&text[cursor]);
|
||||
if ((curpos += lrpad / 2 - 1) < w) {
|
||||
@@ -524,6 +530,11 @@ readstdin(void)
|
||||
char buf[sizeof text], *p;
|
||||
size_t i, imax = 0, size = 0;
|
||||
unsigned int tmpmax = 0;
|
||||
+ if(passwd){
|
||||
+ inputw = lines = 0;
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
|
||||
/* read each line from stdin and add it to the item list */
|
||||
for (i = 0; fgets(buf, sizeof buf, stdin); i++) {
|
||||
@@ -689,7 +700,7 @@ setup(void)
|
||||
static void
|
||||
usage(void)
|
||||
{
|
||||
- fputs("usage: dmenu [-bfiv] [-l lines] [-p prompt] [-fn font] [-m monitor]\n"
|
||||
+ fputs("usage: dmenu [-bfivP] [-l lines] [-p prompt] [-fn font] [-m monitor]\n"
|
||||
" [-nb color] [-nf color] [-sb color] [-sf color] [-w windowid]\n", stderr);
|
||||
exit(1);
|
||||
}
|
||||
@@ -712,7 +723,9 @@ main(int argc, char *argv[])
|
||||
else if (!strcmp(argv[i], "-i")) { /* case-insensitive item matching */
|
||||
fstrncmp = strncasecmp;
|
||||
fstrstr = cistrstr;
|
||||
- } else if (i + 1 == argc)
|
||||
+ } else if (!strcmp(argv[i], "-P")) /* is the input a password */
|
||||
+ passwd = 1;
|
||||
+ else if (i + 1 == argc)
|
||||
usage();
|
||||
/* these options take one argument */
|
||||
else if (!strcmp(argv[i], "-l")) /* number of lines in vertical list */
|
||||
--
|
||||
2.31.1
|
||||
|
|
@ -1,317 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
# _ _ _ _ _ _
|
||||
# __| |_ __ ___ ___ _ __ _ _ | |__ | |_ _ ___| |_ ___ ___ | |_ | |__
|
||||
# / _` | '_ ` _ \ / _ \ '_ \| | | |_____| '_ \| | | | |/ _ \ __/ _ \ / _ \| __|| '_ \
|
||||
# | (_| | | | | | | __/ | | | |_| |_____| |_) | | |_| | __/ || (_) | (_) | |_ | | | |
|
||||
# \__,_|_| |_| |_|\___|_| |_|\__,_| |_.__/|_|\__,_|\___|\__\___/ \___/ \__||_| |_|
|
||||
#
|
||||
# Author: Nick Clyde (clydedroid)
|
||||
# dmenu support by: Layerex
|
||||
#
|
||||
# A script that generates a dmenu menu that uses bluetoothctl to
|
||||
# connect to bluetooth devices and display status info.
|
||||
#
|
||||
# Inspired by networkmanager-dmenu (https://github.com/firecat53/networkmanager-dmenu)
|
||||
# Thanks to x70b1 (https://github.com/polybar/polybar-scripts/tree/master/polybar-scripts/system-bluetooth-bluetoothctl)
|
||||
#
|
||||
# Depends on:
|
||||
# Arch repositories: dmenu, bluez-utils (contains bluetoothctl)
|
||||
|
||||
# Constants
|
||||
divider="---------"
|
||||
goback="Back"
|
||||
|
||||
# Checks if bluetooth controller is powered on
|
||||
power_on() {
|
||||
if bluetoothctl show | grep -F -q "Powered: yes"; then
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
# Toggles power state
|
||||
toggle_power() {
|
||||
if power_on; then
|
||||
bluetoothctl power off
|
||||
show_menu
|
||||
else
|
||||
if rfkill list bluetooth | grep -F -q 'blocked: yes'; then
|
||||
rfkill unblock bluetooth && sleep 3
|
||||
fi
|
||||
bluetoothctl power on
|
||||
show_menu
|
||||
fi
|
||||
}
|
||||
|
||||
# Checks if controller is scanning for new devices
|
||||
scan_on() {
|
||||
if bluetoothctl show | grep -F -q "Discovering: yes"; then
|
||||
echo "Scan: on"
|
||||
return 0
|
||||
else
|
||||
echo "Scan: off"
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
# Toggles scanning state
|
||||
toggle_scan() {
|
||||
if scan_on; then
|
||||
kill "$(pgrep -F -f "bluetoothctl scan on")"
|
||||
bluetoothctl scan off
|
||||
show_menu
|
||||
else
|
||||
bluetoothctl scan on &
|
||||
echo "Scanning..."
|
||||
sleep 5
|
||||
show_menu
|
||||
fi
|
||||
}
|
||||
|
||||
# Checks if controller is able to pair to devices
|
||||
pairable_on() {
|
||||
if bluetoothctl show | grep -F -q "Pairable: yes"; then
|
||||
echo "Pairable: on"
|
||||
return 0
|
||||
else
|
||||
echo "Pairable: off"
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
# Toggles pairable state
|
||||
toggle_pairable() {
|
||||
if pairable_on; then
|
||||
bluetoothctl pairable off
|
||||
show_menu
|
||||
else
|
||||
bluetoothctl pairable on
|
||||
show_menu
|
||||
fi
|
||||
}
|
||||
|
||||
# Checks if controller is discoverable by other devices
|
||||
discoverable_on() {
|
||||
if bluetoothctl show | grep -F -q "Discoverable: yes"; then
|
||||
echo "Discoverable: on"
|
||||
return 0
|
||||
else
|
||||
echo "Discoverable: off"
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
# Toggles discoverable state
|
||||
toggle_discoverable() {
|
||||
if discoverable_on; then
|
||||
bluetoothctl discoverable off
|
||||
show_menu
|
||||
else
|
||||
bluetoothctl discoverable on
|
||||
show_menu
|
||||
fi
|
||||
}
|
||||
|
||||
# Checks if a device is connected
|
||||
device_connected() {
|
||||
device_info=$(bluetoothctl info "$1")
|
||||
if echo "$device_info" | grep -F -q "Connected: yes"; then
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
# Toggles device connection
|
||||
toggle_connection() {
|
||||
if device_connected "$1"; then
|
||||
bluetoothctl disconnect "$1"
|
||||
# device_menu "$device"
|
||||
else
|
||||
bluetoothctl connect "$1"
|
||||
# device_menu "$device"
|
||||
fi
|
||||
}
|
||||
|
||||
# Checks if a device is paired
|
||||
device_paired() {
|
||||
device_info=$(bluetoothctl info "$1")
|
||||
if echo "$device_info" | grep -F -q "Paired: yes"; then
|
||||
echo "Paired: yes"
|
||||
return 0
|
||||
else
|
||||
echo "Paired: no"
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
# Toggles device paired state
|
||||
toggle_paired() {
|
||||
if device_paired "$1"; then
|
||||
bluetoothctl remove "$1"
|
||||
device_menu "$device"
|
||||
else
|
||||
bluetoothctl pair "$1"
|
||||
device_menu "$device"
|
||||
fi
|
||||
}
|
||||
|
||||
# Checks if a device is trusted
|
||||
device_trusted() {
|
||||
device_info=$(bluetoothctl info "$1")
|
||||
if echo "$device_info" | grep -F -q "Trusted: yes"; then
|
||||
echo "Trusted: yes"
|
||||
return 0
|
||||
else
|
||||
echo "Trusted: no"
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
# Toggles device connection
|
||||
toggle_trust() {
|
||||
if device_trusted "$1"; then
|
||||
bluetoothctl untrust "$1"
|
||||
device_menu "$device"
|
||||
else
|
||||
bluetoothctl trust "$1"
|
||||
device_menu "$device"
|
||||
fi
|
||||
}
|
||||
|
||||
# Prints a short string with the current bluetooth status
|
||||
# Useful for status bars like polybar, etc.
|
||||
print_status() {
|
||||
if power_on; then
|
||||
printf ''
|
||||
|
||||
mapfile -t paired_devices < <(bluetoothctl paired-devices | grep -F Device | cut -d ' ' -f 2)
|
||||
counter=0
|
||||
|
||||
for device in "${paired_devices[@]}"; do
|
||||
if device_connected "$device"; then
|
||||
device_alias="$(bluetoothctl info "$device" | grep -F "Alias" | cut -d ' ' -f 2-)"
|
||||
|
||||
if [ $counter -gt 0 ]; then
|
||||
printf ", %s" "$device_alias"
|
||||
else
|
||||
printf " %s" "$device_alias"
|
||||
fi
|
||||
|
||||
((counter++))
|
||||
fi
|
||||
done
|
||||
printf "\n"
|
||||
else
|
||||
echo ""
|
||||
fi
|
||||
}
|
||||
|
||||
# A submenu for a specific device that allows connecting, pairing, and trusting
|
||||
device_menu() {
|
||||
device=$1
|
||||
|
||||
# Get device name and mac address
|
||||
device_name="$(echo "$device" | cut -d ' ' -f 3-)"
|
||||
mac="$(echo "$device" | cut -d ' ' -f 2)"
|
||||
|
||||
# Build options
|
||||
if device_connected "$mac"; then
|
||||
connected="Connected: yes"
|
||||
else
|
||||
connected="Connected: no"
|
||||
fi
|
||||
paired=$(device_paired "$mac")
|
||||
trusted=$(device_trusted "$mac")
|
||||
options="$connected\n$paired\n$trusted\n$divider\n$goback\nExit"
|
||||
|
||||
# Open dmenu menu, read chosen option
|
||||
chosen="$(echo -e "$options" | run_dmenu "$device_name")"
|
||||
|
||||
# Match chosen option to command
|
||||
case $chosen in
|
||||
"" | "$divider")
|
||||
echo "No option chosen."
|
||||
;;
|
||||
"$connected")
|
||||
toggle_connection "$mac"
|
||||
;;
|
||||
"$paired")
|
||||
toggle_paired "$mac"
|
||||
;;
|
||||
"$trusted")
|
||||
toggle_trust "$mac"
|
||||
;;
|
||||
"$goback")
|
||||
show_menu
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
# Opens a dmenu menu with current bluetooth status and options to connect
|
||||
show_menu() {
|
||||
# Get menu options
|
||||
if power_on; then
|
||||
power="Power: on"
|
||||
|
||||
# Human-readable names of devices, one per line
|
||||
# If scan is off, will only list paired devices
|
||||
devices=$(bluetoothctl devices | grep -F Device | cut -d ' ' -f 3-)
|
||||
|
||||
# Get controller flags
|
||||
scan=$(scan_on)
|
||||
pairable=$(pairable_on)
|
||||
discoverable=$(discoverable_on)
|
||||
|
||||
# Options passed to dmenu
|
||||
options="$devices\n$divider\n$power\n$scan\n$pairable\n$discoverable\nExit"
|
||||
else
|
||||
power="Power: off"
|
||||
options="$power\nExit"
|
||||
fi
|
||||
|
||||
# Open dmenu menu, read chosen option
|
||||
chosen="$(echo -e "$options" | run_dmenu "Bluetooth")"
|
||||
|
||||
# Match chosen option to command
|
||||
case $chosen in
|
||||
"" | "$divider")
|
||||
echo "No option chosen."
|
||||
;;
|
||||
"$power")
|
||||
toggle_power
|
||||
;;
|
||||
"$scan")
|
||||
toggle_scan
|
||||
;;
|
||||
"$discoverable")
|
||||
toggle_discoverable
|
||||
;;
|
||||
"$pairable")
|
||||
toggle_pairable
|
||||
;;
|
||||
*)
|
||||
device=$(bluetoothctl devices | grep -F "$chosen")
|
||||
# Open a submenu if a device is selected
|
||||
if [[ $device ]]; then device_menu "$device"; fi
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
original_args=("$@")
|
||||
|
||||
# dmenu command to pipe into. Extra arguments to dmenu-bluetooth are passed through to dmenu. This
|
||||
# allows the user to set fonts, sizes, colours, etc.
|
||||
run_dmenu() {
|
||||
dmenu "${original_args[@]}" -b -l 5 -i -p "$1"
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
--status)
|
||||
print_status
|
||||
;;
|
||||
*)
|
||||
show_menu
|
||||
;;
|
||||
esac
|
|
@ -1,12 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# ***This script was made by Clay Gomera (Drake)***
|
||||
# - Description: A simple desktop dmenu script
|
||||
# - Dependencies: dmenu, j4-dmenu-desktop
|
||||
|
||||
prompt="-p launch:"
|
||||
colors="-nb \#1d2021 -nf \#fbf1c7 -sb \#cc241d -sf \#fbf1c7"
|
||||
font="-fn 'mononoki Nerd Font-10'"
|
||||
|
||||
DMENU="dmenu -i -l 10 $font $colors $prompt"
|
||||
j4-dmenu-desktop --dmenu "$DMENU" --no-generic
|
|
@ -1,26 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# ***This script was made by Clay Gomera (Drake)***
|
||||
# - Description: A simple script for file editing in dmenu
|
||||
# - Dependencies: dmenu (Everything else can be changed)
|
||||
|
||||
# Show list of options
|
||||
EDITOR="emacsclient -c -a emacs"
|
||||
cd "$HOME" || exit 0
|
||||
file=1
|
||||
while [ "$file" ]; do
|
||||
file=$(fd -LHpd 1 | dmenu -i -l 10 -fn "mononoki Nerd Font-10" -nb \#1d2021 -nf \#fbf1c7 -sb \#cc241d -sf \#fbf1c7 -p "file to edit: $(basename "$(pwd)")")
|
||||
if [ -e "$file" ]; then
|
||||
owd=$(pwd)
|
||||
if [ -d "$file" ]; then
|
||||
cd "$file" || exit 0
|
||||
else [ -f "$file" ]
|
||||
if [ "$file" ]; then
|
||||
$EDITOR "$owd/$file" &
|
||||
exit 0
|
||||
else
|
||||
exit 0
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
done
|
File diff suppressed because it is too large
Load diff
|
@ -1,56 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# ***This script was made by Clay Gomera (Drake)***
|
||||
# - Description: A simple power menu dmenu script
|
||||
# - Dependencies: dmenu, power-profiles-daemon
|
||||
|
||||
## OPTIONS ##
|
||||
option1="logout"
|
||||
option2="reboot"
|
||||
option3="power off"
|
||||
option4="suspend"
|
||||
option5="lock"
|
||||
option6="change power profile"
|
||||
option7="cancel"
|
||||
|
||||
## OPTIONS ARRAY ##
|
||||
options="$option1\n$option2\n$option3\n$option4\n$option5\n$option6\n$option7"
|
||||
|
||||
## POWER PROFILE OPTIONS ##
|
||||
pwr1="performance"
|
||||
pwr2="balanced"
|
||||
pwr3="powersaver"
|
||||
pwr4="cancel"
|
||||
|
||||
## POWER PROFILES ARRAY ##
|
||||
pwrs="$pwr1\n$pwr2\n$pwr3\n$pwr4"
|
||||
|
||||
## MAIN ACTION COMMAND ##
|
||||
action=$(echo -e "$options" | dmenu -i -fn "mononoki Nerd Font-10" -nb \#1d2021 -nf \#fbf1c7 -sb \#cc241d -sf \#fbf1c7 -p "power options:")
|
||||
case "$action" in
|
||||
$option1*)
|
||||
pkill X;;
|
||||
$option2*)
|
||||
systemctl reboot;;
|
||||
$option3*)
|
||||
systemctl poweroff;;
|
||||
$option4*)
|
||||
slock systemctl suspend;;
|
||||
$option5*)
|
||||
slock;;
|
||||
$option6*)
|
||||
currentpwr=$(powerprofilesctl get)
|
||||
pwraction=$(echo -e "$pwrs" | dmenu -i -fn "mononoki Nerd Font-10" -nb \#1d2021 -nf \#fbf1c7 -sb \#cc241d -sf \#fbf1c7 -p "current profile is: ${currentpwr} | select profile:")
|
||||
case "$pwraction" in
|
||||
$pwr1*)
|
||||
powerprofilesctl set performance && notify-send "power profile switched to performance";;
|
||||
$pwr2*)
|
||||
powerprofilesctl set balanced && notify-send "power profile switched to balanced";;
|
||||
$pwr3*)
|
||||
powerprofilesctl set power-saver && notify-send "power profile switched to power saver";;
|
||||
$pwr4*)
|
||||
exit 0
|
||||
esac;;
|
||||
$option7*)
|
||||
exit 0
|
||||
esac
|
|
@ -1,63 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# ***This script was made by Clay Gomera (Drake)***
|
||||
# - Description: A simple screenshot dmenu script
|
||||
# - Dependencies: scrot, dmenu, notify-send
|
||||
|
||||
## CREATING SCREENSHOT FOLDER ##
|
||||
mkdir -p "$HOME/Pictures/Screenshots"
|
||||
cd "$HOME/Pictures/Screenshots" || exit 0
|
||||
|
||||
## CHOICES ##
|
||||
cho1="entire screen"
|
||||
cho2="entire screen with delay"
|
||||
cho3="focused window"
|
||||
cho4="select area"
|
||||
chos="$cho1\n$cho2\n$cho3\n$cho4"
|
||||
|
||||
## DELAY OPTIONS ##
|
||||
del1="3 sec delay"
|
||||
del2="5 sec delay"
|
||||
del3="10 sec delay"
|
||||
dels="$del1\n$del2\n$del3"
|
||||
|
||||
## DELAY FUNCTION ##
|
||||
delays() {
|
||||
del=$(echo -e "$dels" | dmenu -i -fn "mononoki Nerd Font-10" -nb \#1d2021 -nf \#fbf1c7 -sb \#cc241d -sf \#fbf1c7 -p "Select: ");
|
||||
case $del in
|
||||
$del1)
|
||||
scrot -d 3 && notify-send "screenshot saved";;
|
||||
$del2)
|
||||
scrot -d 5 && notify-send "screenshot saved";;
|
||||
$del3)
|
||||
scrot -d 10 && notify-send "screenshot saved"
|
||||
esac
|
||||
}
|
||||
|
||||
## ENTIRE SCREEN FUNCTION ##
|
||||
screen() {
|
||||
scrot && notify-send "screenshot saved"
|
||||
}
|
||||
|
||||
## FOCUSED WINDOW FUNCTION
|
||||
window() {
|
||||
scrot -u -b && notify-send "screenshot saved."
|
||||
}
|
||||
|
||||
## SELECTED AREA FUNCTION ##
|
||||
area() {
|
||||
scrot -s && notify-send "screenshot saved."
|
||||
}
|
||||
|
||||
## MAIN ACTION ##
|
||||
choice=$(echo -e "$chos" | dmenu -i -fn "mononoki Nerd Font-10" -nb \#1d2021 -nf \#fbf1c7 -sb \#cc241d -sf \#fbf1c7 -p "Select: ")
|
||||
case $choice in
|
||||
$cho1*)
|
||||
screen;;
|
||||
$cho2*)
|
||||
delays;;
|
||||
$cho3*)
|
||||
window;;
|
||||
$cho4*)
|
||||
area
|
||||
esac
|
|
@ -1,44 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# ***This script was made by Clay Gomera (Drake)***
|
||||
# - Description: A simple wallpaper changer script
|
||||
# - Dependencies: dmenu, fd, feh
|
||||
|
||||
## MAIN VARIABLES AND COMMANDS ##
|
||||
walldir="Pictures/Wallpapers/" # wallpapers folder, change it to yours, make sure that it ends with a /
|
||||
cd "$walldir" || exit
|
||||
|
||||
## SELECT PICTURE FUNCTION ##
|
||||
selectpic() {
|
||||
wallpaper=$(fd -p "$walldir" | dmenu -i -l 10 -fn "mononoki Nerd Font-10" -nb \#1d2021 -nf \#fbf1c7 -sb \#cc241d -sf \#fbf1c7 -p "select a wallpaper:")
|
||||
if [ "$wallpaper" ]; then
|
||||
chosenwall=$wallpaper
|
||||
else
|
||||
exit 0
|
||||
fi
|
||||
}
|
||||
selectpic
|
||||
|
||||
## WALLPAPER SETTING OPTIONS ##
|
||||
option1="fill"
|
||||
option2="center"
|
||||
option3="tile"
|
||||
option4="max"
|
||||
option5="scale"
|
||||
options="$option1\n$option2\n$option3\n$option4\n$option5"
|
||||
|
||||
## MAIN ACTION ##
|
||||
action=$(echo -e "$options" | dmenu -i -l 5 -fn "mononoki Nerd Font-10" -nb \#1d2021 -nf \#fbf1c7 -sb \#cc241d -sf \#fbf1c7 -p "chose the format:")
|
||||
case "$action" in
|
||||
$option1*)
|
||||
feh --bg-fill "$chosenwall";;
|
||||
$option2*)
|
||||
feh --bg-center "$chosenwall";;
|
||||
$option3*)
|
||||
feh --bg-tile "$chosenwall";;
|
||||
$option4*)
|
||||
feh --bg-max "$chosenwall";;
|
||||
$option5*)
|
||||
feh --bg-scale "$chosenwall";;
|
||||
esac
|
||||
exit 0
|
|
@ -1,86 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# ***This script was made by Clay Gomera (Drake)***
|
||||
# - Description: A simple wifi dmenu script
|
||||
# - Dependencies: dmenu, NetworkManager
|
||||
|
||||
## MAIN OPTIONS ##
|
||||
option1="turn on wifi"
|
||||
option2="turn off wifi"
|
||||
option3="disconnect wifi"
|
||||
option4="connect wifi"
|
||||
option5="setup captive portal"
|
||||
option6="exit"
|
||||
options="$option1\n$option2\n$option3\n$option4\n$option5\n$option6"
|
||||
|
||||
wlan=$(nmcli dev | grep wifi | sed 's/ \{2,\}/|/g' | cut -d '|' -f1 | head -1)
|
||||
## TURN OFF WIFI FUNCTION ##
|
||||
turnoff() {
|
||||
nmcli radio wifi off
|
||||
notify-send "WiFi has been turned off"
|
||||
}
|
||||
|
||||
## TURN ON WIFI FUNCTION ##
|
||||
turnon() {
|
||||
nmcli radio wifi on
|
||||
notify-send "WiFi has been turned on"
|
||||
}
|
||||
|
||||
## DISCONNECT WIFI FUNCTION ##
|
||||
disconnect() {
|
||||
nmcli device disconnect "$wlan"
|
||||
sleep 1
|
||||
constate=$(nmcli dev | grep wifi | sed 's/ \{2,\}/|/g' | cut -d '|' -f3 | head -1)
|
||||
if [ "$constate" = "disconnected" ]; then
|
||||
notify-send "WiFi has been disconnected"
|
||||
fi
|
||||
}
|
||||
|
||||
## CONNECT FUNCTION ##
|
||||
connect() {
|
||||
notify-send "Scannig networks, please wait"
|
||||
sleep 1
|
||||
bssid=$(nmcli device wifi list | sed -n '1!p' | cut -b 9- | dmenu -i -l 10 -fn "mononoki Nerd Font-10" -nb \#1d2021 -nf \#fbf1c7 -sb \#cc241d -sf \#fbf1c7 -p "select wifi:" | cut -d' ' -f1)
|
||||
}
|
||||
|
||||
## SELECT PASSWORD FUNCTION ##
|
||||
password() {
|
||||
pass=$(echo " " | dmenu -P -i -fn "mononoki Nerd Font-10" -nb \#1d2021 -nf \#fbf1c7 -sb \#cc241d -sf \#fbf1c7 -p "enter password:")
|
||||
}
|
||||
|
||||
## MAIN CONNECTION COMMAND ##
|
||||
action() {
|
||||
nmcli device wifi connect "$bssid" password "$pass" || nmcli device wifi connect "$bssid"
|
||||
}
|
||||
|
||||
## CHECKING IF WIFI IS WORKING
|
||||
check() {
|
||||
notify-send "Checking if connection was successful"
|
||||
sleep 1
|
||||
currentwfi=$(nmcli dev | grep wifi | sed 's/ \{2,\}/|/g' | cut -d '|' -f4 | head -1)
|
||||
if ping -q -c 2 -W 2 google.com >/dev/null; then
|
||||
notify-send "You are now connected to $currentwfi and internet is working properly"
|
||||
else
|
||||
notify-send "Your internet is not working :("
|
||||
fi
|
||||
}
|
||||
|
||||
## MAIN ACTION COMMANDS ##
|
||||
cases=$(echo -e "$options" | dmenu -i -fn "mononoki Nerd Font-10" -nb \#1d2021 -nf \#fbf1c7 -sb \#cc241d -sf \#fbf1c7 -p "wifi options:" )
|
||||
case "$cases" in
|
||||
$option1*)
|
||||
turnon;;
|
||||
$option2*)
|
||||
turnoff;;
|
||||
$option3*)
|
||||
disconnect;;
|
||||
$option4*)
|
||||
connect;
|
||||
password;
|
||||
action;
|
||||
check;;
|
||||
$option5*)
|
||||
io.elementary.capnet-assist;;
|
||||
$option6*)
|
||||
exit 0
|
||||
esac
|
|
@ -1,90 +0,0 @@
|
|||
.TH STEST 1 dmenu\-VERSION
|
||||
.SH NAME
|
||||
stest \- filter a list of files by properties
|
||||
.SH SYNOPSIS
|
||||
.B stest
|
||||
.RB [ -abcdefghlpqrsuwx ]
|
||||
.RB [ -n
|
||||
.IR file ]
|
||||
.RB [ -o
|
||||
.IR file ]
|
||||
.RI [ file ...]
|
||||
.SH DESCRIPTION
|
||||
.B stest
|
||||
takes a list of files and filters by the files' properties, analogous to
|
||||
.IR test (1).
|
||||
Files which pass all tests are printed to stdout. If no files are given, stest
|
||||
reads files from stdin.
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
.B \-a
|
||||
Test hidden files.
|
||||
.TP
|
||||
.B \-b
|
||||
Test that files are block specials.
|
||||
.TP
|
||||
.B \-c
|
||||
Test that files are character specials.
|
||||
.TP
|
||||
.B \-d
|
||||
Test that files are directories.
|
||||
.TP
|
||||
.B \-e
|
||||
Test that files exist.
|
||||
.TP
|
||||
.B \-f
|
||||
Test that files are regular files.
|
||||
.TP
|
||||
.B \-g
|
||||
Test that files have their set-group-ID flag set.
|
||||
.TP
|
||||
.B \-h
|
||||
Test that files are symbolic links.
|
||||
.TP
|
||||
.B \-l
|
||||
Test the contents of a directory given as an argument.
|
||||
.TP
|
||||
.BI \-n " file"
|
||||
Test that files are newer than
|
||||
.IR file .
|
||||
.TP
|
||||
.BI \-o " file"
|
||||
Test that files are older than
|
||||
.IR file .
|
||||
.TP
|
||||
.B \-p
|
||||
Test that files are named pipes.
|
||||
.TP
|
||||
.B \-q
|
||||
No files are printed, only the exit status is returned.
|
||||
.TP
|
||||
.B \-r
|
||||
Test that files are readable.
|
||||
.TP
|
||||
.B \-s
|
||||
Test that files are not empty.
|
||||
.TP
|
||||
.B \-u
|
||||
Test that files have their set-user-ID flag set.
|
||||
.TP
|
||||
.B \-v
|
||||
Invert the sense of tests, only failing files pass.
|
||||
.TP
|
||||
.B \-w
|
||||
Test that files are writable.
|
||||
.TP
|
||||
.B \-x
|
||||
Test that files are executable.
|
||||
.SH EXIT STATUS
|
||||
.TP
|
||||
.B 0
|
||||
At least one file passed all tests.
|
||||
.TP
|
||||
.B 1
|
||||
No files passed all tests.
|
||||
.TP
|
||||
.B 2
|
||||
An error occurred.
|
||||
.SH SEE ALSO
|
||||
.IR dmenu (1),
|
||||
.IR test (1)
|
|
@ -1,109 +0,0 @@
|
|||
/* See LICENSE file for copyright and license details. */
|
||||
#include <sys/stat.h>
|
||||
|
||||
#include <dirent.h>
|
||||
#include <limits.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "arg.h"
|
||||
char *argv0;
|
||||
|
||||
#define FLAG(x) (flag[(x)-'a'])
|
||||
|
||||
static void test(const char *, const char *);
|
||||
static void usage(void);
|
||||
|
||||
static int match = 0;
|
||||
static int flag[26];
|
||||
static struct stat old, new;
|
||||
|
||||
static void
|
||||
test(const char *path, const char *name)
|
||||
{
|
||||
struct stat st, ln;
|
||||
|
||||
if ((!stat(path, &st) && (FLAG('a') || name[0] != '.') /* hidden files */
|
||||
&& (!FLAG('b') || S_ISBLK(st.st_mode)) /* block special */
|
||||
&& (!FLAG('c') || S_ISCHR(st.st_mode)) /* character special */
|
||||
&& (!FLAG('d') || S_ISDIR(st.st_mode)) /* directory */
|
||||
&& (!FLAG('e') || access(path, F_OK) == 0) /* exists */
|
||||
&& (!FLAG('f') || S_ISREG(st.st_mode)) /* regular file */
|
||||
&& (!FLAG('g') || st.st_mode & S_ISGID) /* set-group-id flag */
|
||||
&& (!FLAG('h') || (!lstat(path, &ln) && S_ISLNK(ln.st_mode))) /* symbolic link */
|
||||
&& (!FLAG('n') || st.st_mtime > new.st_mtime) /* newer than file */
|
||||
&& (!FLAG('o') || st.st_mtime < old.st_mtime) /* older than file */
|
||||
&& (!FLAG('p') || S_ISFIFO(st.st_mode)) /* named pipe */
|
||||
&& (!FLAG('r') || access(path, R_OK) == 0) /* readable */
|
||||
&& (!FLAG('s') || st.st_size > 0) /* not empty */
|
||||
&& (!FLAG('u') || st.st_mode & S_ISUID) /* set-user-id flag */
|
||||
&& (!FLAG('w') || access(path, W_OK) == 0) /* writable */
|
||||
&& (!FLAG('x') || access(path, X_OK) == 0)) != FLAG('v')) { /* executable */
|
||||
if (FLAG('q'))
|
||||
exit(0);
|
||||
match = 1;
|
||||
puts(name);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
usage(void)
|
||||
{
|
||||
fprintf(stderr, "usage: %s [-abcdefghlpqrsuvwx] "
|
||||
"[-n file] [-o file] [file...]\n", argv0);
|
||||
exit(2); /* like test(1) return > 1 on error */
|
||||
}
|
||||
|
||||
int
|
||||
main(int argc, char *argv[])
|
||||
{
|
||||
struct dirent *d;
|
||||
char path[PATH_MAX], *line = NULL, *file;
|
||||
size_t linesiz = 0;
|
||||
ssize_t n;
|
||||
DIR *dir;
|
||||
int r;
|
||||
|
||||
ARGBEGIN {
|
||||
case 'n': /* newer than file */
|
||||
case 'o': /* older than file */
|
||||
file = EARGF(usage());
|
||||
if (!(FLAG(ARGC()) = !stat(file, (ARGC() == 'n' ? &new : &old))))
|
||||
perror(file);
|
||||
break;
|
||||
default:
|
||||
/* miscellaneous operators */
|
||||
if (strchr("abcdefghlpqrsuvwx", ARGC()))
|
||||
FLAG(ARGC()) = 1;
|
||||
else
|
||||
usage(); /* unknown flag */
|
||||
} ARGEND;
|
||||
|
||||
if (!argc) {
|
||||
/* read list from stdin */
|
||||
while ((n = getline(&line, &linesiz, stdin)) > 0) {
|
||||
if (line[n - 1] == '\n')
|
||||
line[n - 1] = '\0';
|
||||
test(line, line);
|
||||
}
|
||||
free(line);
|
||||
} else {
|
||||
for (; argc; argc--, argv++) {
|
||||
if (FLAG('l') && (dir = opendir(*argv))) {
|
||||
/* test directory contents */
|
||||
while ((d = readdir(dir))) {
|
||||
r = snprintf(path, sizeof path, "%s/%s",
|
||||
*argv, d->d_name);
|
||||
if (r >= 0 && (size_t)r < sizeof path)
|
||||
test(path, d->d_name);
|
||||
}
|
||||
closedir(dir);
|
||||
} else {
|
||||
test(*argv, *argv);
|
||||
}
|
||||
}
|
||||
}
|
||||
return match ? 0 : 1;
|
||||
}
|
|
@ -1,36 +0,0 @@
|
|||
/* See LICENSE file for copyright and license details. */
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "util.h"
|
||||
|
||||
void
|
||||
die(const char *fmt, ...)
|
||||
{
|
||||
va_list ap;
|
||||
|
||||
va_start(ap, fmt);
|
||||
vfprintf(stderr, fmt, ap);
|
||||
va_end(ap);
|
||||
|
||||
if (fmt[0] && fmt[strlen(fmt)-1] == ':') {
|
||||
fputc(' ', stderr);
|
||||
perror(NULL);
|
||||
} else {
|
||||
fputc('\n', stderr);
|
||||
}
|
||||
|
||||
exit(1);
|
||||
}
|
||||
|
||||
void *
|
||||
ecalloc(size_t nmemb, size_t size)
|
||||
{
|
||||
void *p;
|
||||
|
||||
if (!(p = calloc(nmemb, size)))
|
||||
die("calloc:");
|
||||
return p;
|
||||
}
|
|
@ -1,8 +0,0 @@
|
|||
/* See LICENSE file for copyright and license details. */
|
||||
|
||||
#define MAX(A, B) ((A) > (B) ? (A) : (B))
|
||||
#define MIN(A, B) ((A) < (B) ? (A) : (B))
|
||||
#define BETWEEN(X, A, B) ((A) <= (X) && (X) <= (B))
|
||||
|
||||
void die(const char *fmt, ...);
|
||||
void *ecalloc(size_t nmemb, size_t size);
|
|
@ -1,51 +0,0 @@
|
|||
# dwm - dynamic window manager
|
||||
# See LICENSE file for copyright and license details.
|
||||
|
||||
include config.mk
|
||||
|
||||
SRC = drw.c dwm.c util.c
|
||||
OBJ = ${SRC:.c=.o}
|
||||
|
||||
all: options dwm
|
||||
|
||||
options:
|
||||
@echo dwm build options:
|
||||
@echo "CFLAGS = ${CFLAGS}"
|
||||
@echo "LDFLAGS = ${LDFLAGS}"
|
||||
@echo "CC = ${CC}"
|
||||
|
||||
.c.o:
|
||||
${CC} -c ${CFLAGS} $<
|
||||
|
||||
${OBJ}: config.h config.mk
|
||||
|
||||
config.h:
|
||||
cp config.def.h $@
|
||||
|
||||
dwm: ${OBJ}
|
||||
${CC} -o $@ ${OBJ} ${LDFLAGS}
|
||||
|
||||
clean:
|
||||
rm -f dwm ${OBJ} dwm-${VERSION}.tar.gz
|
||||
|
||||
dist: clean
|
||||
mkdir -p dwm-${VERSION}
|
||||
cp -R LICENSE Makefile README config.def.h config.mk\
|
||||
dwm.1 drw.h util.h ${SRC} dwm.png transient.c dwm-${VERSION}
|
||||
tar -cf dwm-${VERSION}.tar dwm-${VERSION}
|
||||
gzip dwm-${VERSION}.tar
|
||||
rm -rf dwm-${VERSION}
|
||||
|
||||
install: all
|
||||
mkdir -p ${DESTDIR}${PREFIX}/bin
|
||||
cp -f dwm ${DESTDIR}${PREFIX}/bin
|
||||
chmod 755 ${DESTDIR}${PREFIX}/bin/dwm
|
||||
mkdir -p ${DESTDIR}${MANPREFIX}/man1
|
||||
sed "s/VERSION/${VERSION}/g" < dwm.1 > ${DESTDIR}${MANPREFIX}/man1/dwm.1
|
||||
chmod 644 ${DESTDIR}${MANPREFIX}/man1/dwm.1
|
||||
|
||||
uninstall:
|
||||
rm -f ${DESTDIR}${PREFIX}/bin/dwm\
|
||||
${DESTDIR}${MANPREFIX}/man1/dwm.1
|
||||
|
||||
.PHONY: all options clean dist install uninstall
|
|
@ -1,12 +0,0 @@
|
|||
#!/bin/sh
|
||||
## ____ __ ##
|
||||
## / __ \_________ _/ /_____ ##
|
||||
## / / / / ___/ __ `/ //_/ _ \ ##
|
||||
## / /_/ / / / /_/ / ,< / __/ Clay Gomera (Drake) ##
|
||||
## /_____/_/ \__,_/_/|_|\___/ My custom dwm build ##
|
||||
|
||||
lxpolkit &
|
||||
dwmblocks &
|
||||
sh "$HOME"/.fehbg &
|
||||
unclutter --hide-on-touch &
|
||||
picom --no-fading-openclose --config "$HOME/.config/picom/picom.conf" &
|
|
@ -1,297 +0,0 @@
|
|||
/* See LICENSE file for copyright and license details. */
|
||||
/* 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 int horizpadbar = 2; /* horizontal padding for statusbar */
|
||||
static const int vertpadbar = 1; /* vertical padding for statusbar */
|
||||
static const char *fonts[] = {"mononoki Nerd Font Mono:size=10"};
|
||||
static const char dmenufont[] = "mononoki Nerd Font Mono:size=10";
|
||||
static const char col_gray1[] = "#1d2021";
|
||||
static const char col_gray2[] = "#32302f";
|
||||
static const char col_gray3[] = "#d5c4a1";
|
||||
static const char col_gray4[] = "#fbf1c7";
|
||||
static const char col_cyan[] = "#cc241d";
|
||||
static const char *colors[][3] = {
|
||||
/* fg bg border */
|
||||
[SchemeNorm] = { col_gray3, col_gray1, col_gray2 },
|
||||
[SchemeSel] = { col_gray4, col_cyan, col_cyan },
|
||||
};
|
||||
|
||||
// SCRATCHPADS
|
||||
typedef struct {
|
||||
const char *name;
|
||||
const void *cmd;
|
||||
} Sp;
|
||||
const char *spcmd1[] = {"alacritty", "-t", "sptrm", "--class", "sptrm,sptrm", NULL };
|
||||
const char *spcmd2[] = {"alacritty", "-t", "sptop", "--class", "sptop,sptop", "-e", "btop", NULL };
|
||||
const char *spcmd3[] = {"alacritty", "-t", "spfli", "--class", "spfli,spfli", "-e", "flix-cli", NULL };
|
||||
const char *spcmd4[] = {"alacritty", "-t", "spani", "--class", "spani,spani", "-e", "ani-cli", NULL };
|
||||
const char *spcmd5[] = {"alacritty", "-t", "spytf", "--class", "spytf,spytf", "-e", "ytfzf", "-flst", NULL };
|
||||
const char *spcmd6[] = {"alacritty", "-t", "spamx", "--class", "spamx,spamx", "-e", "alsamixer", NULL };
|
||||
const char *spcmd7[] = {"alacritty", "-t", "sppmx", "--class", "sppmx,sppmx", "-e", "pulsemixer", NULL };
|
||||
const char *spcmd8[] = {"alacritty", "-t", "spmsc", "--class", "spmsc,spmsc", "-e", "cmus", NULL };
|
||||
const char *spcmd9[] = {"alacritty", "-t", "spflm", "--class", "spflm,spflm", "-e", "./.config/vifm/scripts/vifmrun", NULL };
|
||||
const char *spcmd10[] = {"alacritty", "-t", "sptot", "--class", "sptot,sptot", "-e", "tut", NULL };
|
||||
const char *spcmd11[] = {"alacritty", "-t", "spytm", "--class", "spytm,spytm", "-e", "ytfzf", "-mlst", NULL };
|
||||
const char *spcmd12[] = {"alacritty", "-t", "sprss", "--class", "sprss,sprss", "-e", "newsboat", "-u", "~/.config/newsboat/urls", NULL };
|
||||
static Sp scratchpads[] = {
|
||||
/* name cmd */
|
||||
{"sptrm", spcmd1},
|
||||
{"sptop", spcmd2},
|
||||
{"spfli", spcmd3},
|
||||
{"spani", spcmd4},
|
||||
{"spytf", spcmd5},
|
||||
{"spamx", spcmd6},
|
||||
{"sppmx", spcmd7},
|
||||
{"spmsc", spcmd8},
|
||||
{"spflm", spcmd9},
|
||||
{"sptot", spcmd10},
|
||||
{"spytm", spcmd11},
|
||||
{"sprss", spcmd12},
|
||||
};
|
||||
|
||||
/* tagging */
|
||||
static const char *tags[] = {
|
||||
"cde", // EDITOR
|
||||
"tst", // FILE MANAGER
|
||||
"web", // WEB BROWSER
|
||||
"aud", // CHAT
|
||||
"tls", // MUSIC
|
||||
"vid", // VIDEO
|
||||
"gfx", // IMAGE/EDIT TOOLS
|
||||
"off", // OFFICE
|
||||
"gme" // GAMES
|
||||
};
|
||||
|
||||
// RULES
|
||||
static const Rule rules[] = {
|
||||
/* xprop(1):
|
||||
* WM_CLASS(STRING) = instance, class
|
||||
* WM_NAME(STRING) = title
|
||||
*/
|
||||
// class instance title tags mask isfloating monitor
|
||||
// no workspace
|
||||
{ "Galculator", NULL, NULL, 0, 1, -1 },
|
||||
// code tag
|
||||
{ "Emacs", NULL, NULL, 1, 0, -1 },
|
||||
{ "Godot", NULL, NULL, 1, 0, -1 },
|
||||
{ "neovim", NULL, NULL, 1, 0, -1 },
|
||||
{ "neovide", NULL, NULL, 1, 0, -1 },
|
||||
// test tag
|
||||
{ "Virt-manager", NULL, NULL, 1, 0, -1 },
|
||||
// web tag
|
||||
{ "LibreWolf", NULL, NULL, 1 << 2, 0, -1 },
|
||||
{ "firefox", NULL, NULL, 1 << 2, 0, -1 },
|
||||
{ "qutebrowser", NULL, NULL, 1 << 2, 0, -1 },
|
||||
{ "Chromium", NULL, NULL, 1 << 2, 0, -1 },
|
||||
{ "Brave-browser", NULL, NULL, 1 << 2, 0, -1 },
|
||||
{ "Bitwarden", NULL, NULL, 1 << 2, 0, -1 },
|
||||
// audio tag
|
||||
{ "Audacity", NULL, NULL, 1 << 3, 0, -1 },
|
||||
{ "Ardour", NULL, NULL, 1 << 3, 0, -1 },
|
||||
{ "Carla2", NULL, NULL, 1 << 3, 0, -1 },
|
||||
{ "Carla2-Control", NULL, NULL, 1 << 3, 0, -1 },
|
||||
// audio tools tag
|
||||
{ "QjackCtl", NULL, NULL, 1 << 4, 1, -1 },
|
||||
{ "lsp-plugins", NULL, NULL, 1 << 4, 1, -1 },
|
||||
{ "qpwgraph", NULL, NULL, 1 << 4, 0, -1 },
|
||||
{ "Cadence", NULL, NULL, 1 << 4, 0, -1 },
|
||||
// video tag
|
||||
{ "kdenlive", NULL, NULL, 1 << 5, 0, -1 },
|
||||
{ "Pitivi", NULL, NULL, 1 << 5, 0, -1 },
|
||||
{ "Blender", NULL, NULL, 1 << 5, 0, -1 },
|
||||
{ "Natron", NULL, NULL, 1 << 5, 0, -1 },
|
||||
{ "SimpleScreenRecorder", NULL, NULL, 1 << 5, 0, -1 },
|
||||
{ "Ghb", NULL, NULL, 1 << 5, 0, -1 },
|
||||
{ "obs", NULL, NULL, 1 << 5, 0, -1 },
|
||||
// graphics/extra tools tag
|
||||
{ "Gimp-2.10", NULL, NULL, 1 << 6, 0, -1 },
|
||||
{ "krita", NULL, NULL, 1 << 6, 0, -1 },
|
||||
{ "Inkscape", NULL, NULL, 1 << 6, 0, -1 },
|
||||
{ "Xournalpp", NULL, NULL, 1 << 6, 0, -1 },
|
||||
// office tag
|
||||
{ "DesktopEditors", NULL, NULL, 1 << 7, 0, -1 },
|
||||
{ "Soffice", "soffice", NULL, 1 << 7, 0, -1 },
|
||||
{ "libreoffice-startcenter", NULL, NULL, 1 << 7, 0, -1 },
|
||||
{ "Joplin", NULL, NULL, 1 << 7, 0, -1 },
|
||||
// games tag
|
||||
{ "retroarch", NULL, NULL, 1 << 8, 0, -1 },
|
||||
{ "steam", NULL, NULL, 1 << 8, 0, -1 },
|
||||
// scratchpads
|
||||
{ NULL, "sptrm", NULL, SPTAG(0), 1, -1 },
|
||||
{ NULL, "sptop", NULL, SPTAG(1), 1, -1 },
|
||||
{ NULL, "spfli", NULL, SPTAG(2), 1, -1 },
|
||||
{ NULL, "spani", NULL, SPTAG(3), 1, -1 },
|
||||
{ NULL, "spytf", NULL, SPTAG(4), 1, -1 },
|
||||
{ NULL, "spamx", NULL, SPTAG(5), 1, -1 },
|
||||
{ NULL, "sppmx", NULL, SPTAG(6), 1, -1 },
|
||||
{ NULL, "spmsc", NULL, SPTAG(7), 1, -1 },
|
||||
{ NULL, "spflm", NULL, SPTAG(8), 1, -1 },
|
||||
{ NULL, "sptot", NULL, SPTAG(9), 1, -1 },
|
||||
{ NULL, "spytm", NULL, SPTAG(10), 1, -1 },
|
||||
{ NULL, "sprss", NULL, SPTAG(11), 1, -1 },
|
||||
};
|
||||
|
||||
// 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 = 1; /* 1 means respect size hints in tiled resizals */
|
||||
static const int lockfullscreen = 1; /* 1 will force focus on the fullscreen window */
|
||||
|
||||
#include "tcl.c"
|
||||
static const Layout layouts[] = {
|
||||
/* symbol arrange function */
|
||||
{ "[]=", tile }, /* first entry is default */
|
||||
{ "><>", NULL }, /* no layout function means floating behavior */
|
||||
{ "[M]", monocle },
|
||||
{ "|||", tcl },
|
||||
};
|
||||
|
||||
//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 */
|
||||
// dmenu
|
||||
static const char *dmenucmd[] = { "dmenu_run", "-fn", dmenufont, "-nb", col_gray1, "-nf", col_gray3, "-sb", col_cyan, "-sf", col_gray4, NULL };
|
||||
// terminal
|
||||
static const char *termcmd[] = { "alacritty", NULL };
|
||||
|
||||
#include "movestack.c"
|
||||
|
||||
static const Key keys[] = {
|
||||
/* modifier key function argument */
|
||||
// text editor
|
||||
{ MODKEY, XK_e, spawn, SHCMD("emacsclient -c -a 'emacs'")},
|
||||
// web browser
|
||||
{ MODKEY, XK_w, spawn, SHCMD("librewolf")},
|
||||
// set keyboard layout to es
|
||||
{ MODKEY|ControlMask, XK_e, spawn, SHCMD("setxkbmap -layout es")},
|
||||
// set keyboard layout to us
|
||||
{ MODKEY|ControlMask, XK_u, spawn, SHCMD("setxkbmap -layout us")},
|
||||
// increase volume
|
||||
{ 0, XF86XK_AudioRaiseVolume, spawn, SHCMD("pamixer -i 5")},
|
||||
// decrease volume
|
||||
{ 0, XF86XK_AudioLowerVolume, spawn, SHCMD("pamixer -d 5")},
|
||||
// mute volume
|
||||
{ 0, XF86XK_AudioMute, spawn, SHCMD("pamixer -t")},
|
||||
// mute microphone
|
||||
{ 0, XF86XK_AudioMicMute, spawn, SHCMD("pamixer --default-source -t")},
|
||||
// increase brightness
|
||||
{ 0, XF86XK_MonBrightnessUp, spawn, SHCMD("xbacklight -inc 10")},
|
||||
// decrease brightness
|
||||
{ 0, XF86XK_MonBrightnessDown, spawn, SHCMD("xbacklight -dec 10")},
|
||||
// decrease brightness
|
||||
{ 0, XF86XK_Display, spawn, SHCMD("arandr")},
|
||||
// launcher
|
||||
{ MODKEY|ControlMask, XK_p, spawn, {.v = dmenucmd } },
|
||||
// desktop launcher
|
||||
{ MODKEY, XK_p, spawn, SHCMD("$HOME/.config/suckless/dmenu/scripts/dmenu_drun") },
|
||||
// wifi config
|
||||
{ MODKEY|Mod1Mask, XK_i, spawn, SHCMD("$HOME/.config/suckless/dmenu/scripts/dmenu_wifi") },
|
||||
// screenshots
|
||||
{ MODKEY|Mod1Mask, XK_s, spawn, SHCMD("$HOME/.config/suckless/dmenu/scripts/dmenu_scrot") },
|
||||
// screenshots
|
||||
{ MODKEY|Mod1Mask, XK_w, spawn, SHCMD("$HOME/.config/suckless/dmenu/scripts/dmenu_wall") },
|
||||
// edit
|
||||
{ MODKEY|Mod1Mask, XK_e, spawn, SHCMD("$HOME/.config/suckless/dmenu/scripts/dmenu_edit") },
|
||||
// terminal
|
||||
{ MODKEY, XK_Return, spawn, {.v = termcmd } },
|
||||
// toogle the bar
|
||||
{ MODKEY, XK_b, togglebar, {0} },
|
||||
// window focusing
|
||||
{ MODKEY, XK_j, focusstack, {.i = +1 } },
|
||||
{ MODKEY, XK_k, focusstack, {.i = -1 } },
|
||||
// increase and decrease master clients count
|
||||
{ MODKEY, XK_i, incnmaster, {.i = +1 } },
|
||||
{ MODKEY, XK_d, incnmaster, {.i = -1 } },
|
||||
// increase and decrease master client size
|
||||
{ MODKEY, XK_h, setmfact, {.f = -0.05} },
|
||||
{ MODKEY, XK_l, setmfact, {.f = +0.05} },
|
||||
// move windows on stack
|
||||
{ MODKEY|ShiftMask, XK_j, movestack, {.i = +1 } },
|
||||
{ MODKEY|ShiftMask, XK_k, movestack, {.i = -1 } },
|
||||
// switch master window
|
||||
{ MODKEY|ControlMask, XK_Return, zoom, {0} },
|
||||
// switch to latest tag
|
||||
{ MODKEY, XK_Tab, view, {0} },
|
||||
// close focused client
|
||||
{ MODKEY, XK_q, killclient, {0} },
|
||||
// switch to tiling layout
|
||||
{ MODKEY, XK_t, setlayout, {.v = &layouts[0]} },
|
||||
// switch to floating layout
|
||||
{ MODKEY, XK_f, setlayout, {.v = &layouts[1]} },
|
||||
// switch to monocle layout
|
||||
{ MODKEY, XK_m, setlayout, {.v = &layouts[2]} },
|
||||
// switch to three-column layout
|
||||
{ MODKEY, XK_c, setlayout, {.v = &layouts[3]} },
|
||||
// switch to latest layout
|
||||
{ MODKEY, XK_space, setlayout, {0} },
|
||||
// toggle floating mode on focused window
|
||||
{ MODKEY|ControlMask, XK_space, togglefloating, {0} },
|
||||
// view all opened clients on current tag
|
||||
{ MODKEY, XK_0, view, {.ui = ~0 } },
|
||||
{ MODKEY|ShiftMask, XK_0, tag, {.ui = ~0 } },
|
||||
// focus next or previous screen
|
||||
{ MODKEY, XK_comma, focusmon, {.i = -1 } },
|
||||
{ MODKEY, XK_period, focusmon, {.i = +1 } },
|
||||
// move focused client to next or previous screen
|
||||
{ MODKEY|ShiftMask, XK_comma, tagmon, {.i = -1 } },
|
||||
{ MODKEY|ShiftMask, XK_period, tagmon, {.i = +1 } },
|
||||
// scratchpads
|
||||
{ MODKEY|ShiftMask, XK_Return, togglescratch, {.ui = 0 } },
|
||||
{ MODKEY|ShiftMask, XK_b, togglescratch, {.ui = 1 } },
|
||||
{ MODKEY|ShiftMask, XK_f, togglescratch, {.ui = 2 } },
|
||||
{ MODKEY|ShiftMask, XK_a, togglescratch, {.ui = 3 } },
|
||||
{ MODKEY|ShiftMask, XK_y, togglescratch, {.ui = 4 } },
|
||||
{ MODKEY|ShiftMask, XK_o, togglescratch, {.ui = 5 } },
|
||||
{ MODKEY|ShiftMask, XK_p, togglescratch, {.ui = 6 } },
|
||||
{ MODKEY|ShiftMask, XK_m, togglescratch, {.ui = 7 } },
|
||||
{ MODKEY|ShiftMask, XK_v, togglescratch, {.ui = 8 } },
|
||||
{ MODKEY|ShiftMask, XK_t, togglescratch, {.ui = 9 } },
|
||||
{ MODKEY|ShiftMask, XK_n, togglescratch, {.ui = 10 } },
|
||||
{ MODKEY|ShiftMask, XK_r, togglescratch, {.ui = 11 } },
|
||||
// tag bindings
|
||||
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)
|
||||
// logout
|
||||
//{ MODKEY|ShiftMask, XK_q, quit, {0} },
|
||||
{ MODKEY|ShiftMask, XK_q, spawn, SHCMD("$HOME/.config/suckless/dmenu/scripts/dmenu_power")},
|
||||
// restart dwm
|
||||
{ MODKEY|ControlMask, XK_r, quit, {1} },
|
||||
};
|
||||
|
||||
/* button definitions */
|
||||
/* click can be ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */
|
||||
// mouse bindings
|
||||
static const 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} },
|
||||
};
|
||||
|
|
@ -1,39 +0,0 @@
|
|||
# dwm version
|
||||
VERSION = 6.4
|
||||
|
||||
# Customize below to fit your system
|
||||
|
||||
# paths
|
||||
PREFIX = /usr/local
|
||||
MANPREFIX = ${PREFIX}/share/man
|
||||
|
||||
X11INC = /usr/X11R6/include
|
||||
X11LIB = /usr/X11R6/lib
|
||||
|
||||
# Xinerama, comment if you don't want it
|
||||
XINERAMALIBS = -lXinerama
|
||||
XINERAMAFLAGS = -DXINERAMA
|
||||
|
||||
# freetype
|
||||
FREETYPELIBS = -lfontconfig -lXft
|
||||
FREETYPEINC = /usr/include/freetype2
|
||||
# OpenBSD (uncomment)
|
||||
#FREETYPEINC = ${X11INC}/freetype2
|
||||
#MANPREFIX = ${PREFIX}/man
|
||||
|
||||
# includes and libs
|
||||
INCS = -I${X11INC} -I${FREETYPEINC}
|
||||
LIBS = -L${X11LIB} -lX11 ${XINERAMALIBS} ${FREETYPELIBS}
|
||||
|
||||
# flags
|
||||
CPPFLAGS = -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_POSIX_C_SOURCE=200809L -DVERSION=\"${VERSION}\" ${XINERAMAFLAGS}
|
||||
#CFLAGS = -g -std=c99 -pedantic -Wall -O0 ${INCS} ${CPPFLAGS}
|
||||
CFLAGS = -std=c99 -pedantic -Wall -Wno-deprecated-declarations -Os ${INCS} ${CPPFLAGS}
|
||||
LDFLAGS = ${LIBS}
|
||||
|
||||
# Solaris
|
||||
#CFLAGS = -fast ${INCS} -DVERSION=\"${VERSION}\"
|
||||
#LDFLAGS = ${LIBS}
|
||||
|
||||
# compiler and linker
|
||||
CC = cc
|
|
@ -1,24 +0,0 @@
|
|||
# core dependencies
|
||||
xorg-server
|
||||
libx11
|
||||
libxft
|
||||
libxinerama
|
||||
|
||||
# extra dependencies
|
||||
xbacklight # brightness control
|
||||
pamixer # volume control
|
||||
arandr # display config
|
||||
alacritty # terminal
|
||||
dmenu # run launcher
|
||||
dwmblocks # status bar scripts
|
||||
slock # lockscreen
|
||||
herbe # notifications
|
||||
neovim & neovide # text editor
|
||||
|
||||
# scratchpads
|
||||
ani-cli # watch anime
|
||||
flix-cli # watch movies
|
||||
ytfzf # watch/listen to youtube
|
||||
vifm # file manager
|
||||
gomuks # matrix client
|
||||
toot # tui mastodon client
|
|
@ -1,451 +0,0 @@
|
|||
/* See LICENSE file for copyright and license details. */
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/Xft/Xft.h>
|
||||
|
||||
#include "drw.h"
|
||||
#include "util.h"
|
||||
|
||||
#define UTF_INVALID 0xFFFD
|
||||
#define UTF_SIZ 4
|
||||
|
||||
static const unsigned char utfbyte[UTF_SIZ + 1] = {0x80, 0, 0xC0, 0xE0, 0xF0};
|
||||
static const unsigned char utfmask[UTF_SIZ + 1] = {0xC0, 0x80, 0xE0, 0xF0, 0xF8};
|
||||
static const long utfmin[UTF_SIZ + 1] = { 0, 0, 0x80, 0x800, 0x10000};
|
||||
static const long utfmax[UTF_SIZ + 1] = {0x10FFFF, 0x7F, 0x7FF, 0xFFFF, 0x10FFFF};
|
||||
|
||||
static long
|
||||
utf8decodebyte(const char c, size_t *i)
|
||||
{
|
||||
for (*i = 0; *i < (UTF_SIZ + 1); ++(*i))
|
||||
if (((unsigned char)c & utfmask[*i]) == utfbyte[*i])
|
||||
return (unsigned char)c & ~utfmask[*i];
|
||||
return 0;
|
||||
}
|
||||
|
||||
static size_t
|
||||
utf8validate(long *u, size_t i)
|
||||
{
|
||||
if (!BETWEEN(*u, utfmin[i], utfmax[i]) || BETWEEN(*u, 0xD800, 0xDFFF))
|
||||
*u = UTF_INVALID;
|
||||
for (i = 1; *u > utfmax[i]; ++i)
|
||||
;
|
||||
return i;
|
||||
}
|
||||
|
||||
static size_t
|
||||
utf8decode(const char *c, long *u, size_t clen)
|
||||
{
|
||||
size_t i, j, len, type;
|
||||
long udecoded;
|
||||
|
||||
*u = UTF_INVALID;
|
||||
if (!clen)
|
||||
return 0;
|
||||
udecoded = utf8decodebyte(c[0], &len);
|
||||
if (!BETWEEN(len, 1, UTF_SIZ))
|
||||
return 1;
|
||||
for (i = 1, j = 1; i < clen && j < len; ++i, ++j) {
|
||||
udecoded = (udecoded << 6) | utf8decodebyte(c[i], &type);
|
||||
if (type)
|
||||
return j;
|
||||
}
|
||||
if (j < len)
|
||||
return 0;
|
||||
*u = udecoded;
|
||||
utf8validate(u, len);
|
||||
|
||||
return len;
|
||||
}
|
||||
|
||||
Drw *
|
||||
drw_create(Display *dpy, int screen, Window root, unsigned int w, unsigned int h)
|
||||
{
|
||||
Drw *drw = ecalloc(1, sizeof(Drw));
|
||||
|
||||
drw->dpy = dpy;
|
||||
drw->screen = screen;
|
||||
drw->root = root;
|
||||
drw->w = w;
|
||||
drw->h = h;
|
||||
drw->drawable = XCreatePixmap(dpy, root, w, h, DefaultDepth(dpy, screen));
|
||||
drw->gc = XCreateGC(dpy, root, 0, NULL);
|
||||
XSetLineAttributes(dpy, drw->gc, 1, LineSolid, CapButt, JoinMiter);
|
||||
|
||||
return drw;
|
||||
}
|
||||
|
||||
void
|
||||
drw_resize(Drw *drw, unsigned int w, unsigned int h)
|
||||
{
|
||||
if (!drw)
|
||||
return;
|
||||
|
||||
drw->w = w;
|
||||
drw->h = h;
|
||||
if (drw->drawable)
|
||||
XFreePixmap(drw->dpy, drw->drawable);
|
||||
drw->drawable = XCreatePixmap(drw->dpy, drw->root, w, h, DefaultDepth(drw->dpy, drw->screen));
|
||||
}
|
||||
|
||||
void
|
||||
drw_free(Drw *drw)
|
||||
{
|
||||
XFreePixmap(drw->dpy, drw->drawable);
|
||||
XFreeGC(drw->dpy, drw->gc);
|
||||
drw_fontset_free(drw->fonts);
|
||||
free(drw);
|
||||
}
|
||||
|
||||
/* This function is an implementation detail. Library users should use
|
||||
* drw_fontset_create instead.
|
||||
*/
|
||||
static Fnt *
|
||||
xfont_create(Drw *drw, const char *fontname, FcPattern *fontpattern)
|
||||
{
|
||||
Fnt *font;
|
||||
XftFont *xfont = NULL;
|
||||
FcPattern *pattern = NULL;
|
||||
|
||||
if (fontname) {
|
||||
/* Using the pattern found at font->xfont->pattern does not yield the
|
||||
* same substitution results as using the pattern returned by
|
||||
* FcNameParse; using the latter results in the desired fallback
|
||||
* behaviour whereas the former just results in missing-character
|
||||
* rectangles being drawn, at least with some fonts. */
|
||||
if (!(xfont = XftFontOpenName(drw->dpy, drw->screen, fontname))) {
|
||||
fprintf(stderr, "error, cannot load font from name: '%s'\n", fontname);
|
||||
return NULL;
|
||||
}
|
||||
if (!(pattern = FcNameParse((FcChar8 *) fontname))) {
|
||||
fprintf(stderr, "error, cannot parse font name to pattern: '%s'\n", fontname);
|
||||
XftFontClose(drw->dpy, xfont);
|
||||
return NULL;
|
||||
}
|
||||
} else if (fontpattern) {
|
||||
if (!(xfont = XftFontOpenPattern(drw->dpy, fontpattern))) {
|
||||
fprintf(stderr, "error, cannot load font from pattern.\n");
|
||||
return NULL;
|
||||
}
|
||||
} else {
|
||||
die("no font specified.");
|
||||
}
|
||||
|
||||
font = ecalloc(1, sizeof(Fnt));
|
||||
font->xfont = xfont;
|
||||
font->pattern = pattern;
|
||||
font->h = xfont->ascent + xfont->descent;
|
||||
font->dpy = drw->dpy;
|
||||
|
||||
return font;
|
||||
}
|
||||
|
||||
static void
|
||||
xfont_free(Fnt *font)
|
||||
{
|
||||
if (!font)
|
||||
return;
|
||||
if (font->pattern)
|
||||
FcPatternDestroy(font->pattern);
|
||||
XftFontClose(font->dpy, font->xfont);
|
||||
free(font);
|
||||
}
|
||||
|
||||
Fnt*
|
||||
drw_fontset_create(Drw* drw, const char *fonts[], size_t fontcount)
|
||||
{
|
||||
Fnt *cur, *ret = NULL;
|
||||
size_t i;
|
||||
|
||||
if (!drw || !fonts)
|
||||
return NULL;
|
||||
|
||||
for (i = 1; i <= fontcount; i++) {
|
||||
if ((cur = xfont_create(drw, fonts[fontcount - i], NULL))) {
|
||||
cur->next = ret;
|
||||
ret = cur;
|
||||
}
|
||||
}
|
||||
return (drw->fonts = ret);
|
||||
}
|
||||
|
||||
void
|
||||
drw_fontset_free(Fnt *font)
|
||||
{
|
||||
if (font) {
|
||||
drw_fontset_free(font->next);
|
||||
xfont_free(font);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
drw_clr_create(Drw *drw, Clr *dest, const char *clrname)
|
||||
{
|
||||
if (!drw || !dest || !clrname)
|
||||
return;
|
||||
|
||||
if (!XftColorAllocName(drw->dpy, DefaultVisual(drw->dpy, drw->screen),
|
||||
DefaultColormap(drw->dpy, drw->screen),
|
||||
clrname, dest))
|
||||
die("error, cannot allocate color '%s'", clrname);
|
||||
dest->pixel |= 0xff << 24;
|
||||
}
|
||||
|
||||
/* Wrapper to create color schemes. The caller has to call free(3) on the
|
||||
* returned color scheme when done using it. */
|
||||
Clr *
|
||||
drw_scm_create(Drw *drw, const char *clrnames[], size_t clrcount)
|
||||
{
|
||||
size_t i;
|
||||
Clr *ret;
|
||||
|
||||
/* need at least two colors for a scheme */
|
||||
if (!drw || !clrnames || clrcount < 2 || !(ret = ecalloc(clrcount, sizeof(XftColor))))
|
||||
return NULL;
|
||||
|
||||
for (i = 0; i < clrcount; i++)
|
||||
drw_clr_create(drw, &ret[i], clrnames[i]);
|
||||
return ret;
|
||||
}
|
||||
|
||||
void
|
||||
drw_setfontset(Drw *drw, Fnt *set)
|
||||
{
|
||||
if (drw)
|
||||
drw->fonts = set;
|
||||
}
|
||||
|
||||
void
|
||||
drw_setscheme(Drw *drw, Clr *scm)
|
||||
{
|
||||
if (drw)
|
||||
drw->scheme = scm;
|
||||
}
|
||||
|
||||
void
|
||||
drw_rect(Drw *drw, int x, int y, unsigned int w, unsigned int h, int filled, int invert)
|
||||
{
|
||||
if (!drw || !drw->scheme)
|
||||
return;
|
||||
XSetForeground(drw->dpy, drw->gc, invert ? drw->scheme[ColBg].pixel : drw->scheme[ColFg].pixel);
|
||||
if (filled)
|
||||
XFillRectangle(drw->dpy, drw->drawable, drw->gc, x, y, w, h);
|
||||
else
|
||||
XDrawRectangle(drw->dpy, drw->drawable, drw->gc, x, y, w - 1, h - 1);
|
||||
}
|
||||
|
||||
int
|
||||
drw_text(Drw *drw, int x, int y, unsigned int w, unsigned int h, unsigned int lpad, const char *text, int invert)
|
||||
{
|
||||
int i, ty, ellipsis_x = 0;
|
||||
unsigned int tmpw, ew, ellipsis_w = 0, ellipsis_len;
|
||||
XftDraw *d = NULL;
|
||||
Fnt *usedfont, *curfont, *nextfont;
|
||||
int utf8strlen, utf8charlen, render = x || y || w || h;
|
||||
long utf8codepoint = 0;
|
||||
const char *utf8str;
|
||||
FcCharSet *fccharset;
|
||||
FcPattern *fcpattern;
|
||||
FcPattern *match;
|
||||
XftResult result;
|
||||
int charexists = 0, overflow = 0;
|
||||
/* keep track of a couple codepoints for which we have no match. */
|
||||
enum { nomatches_len = 64 };
|
||||
static struct { long codepoint[nomatches_len]; unsigned int idx; } nomatches;
|
||||
static unsigned int ellipsis_width = 0;
|
||||
|
||||
if (!drw || (render && (!drw->scheme || !w)) || !text || !drw->fonts)
|
||||
return 0;
|
||||
|
||||
if (!render) {
|
||||
w = invert ? invert : ~invert;
|
||||
} else {
|
||||
XSetForeground(drw->dpy, drw->gc, drw->scheme[invert ? ColFg : ColBg].pixel);
|
||||
XFillRectangle(drw->dpy, drw->drawable, drw->gc, x, y, w, h);
|
||||
d = XftDrawCreate(drw->dpy, drw->drawable,
|
||||
DefaultVisual(drw->dpy, drw->screen),
|
||||
DefaultColormap(drw->dpy, drw->screen));
|
||||
x += lpad;
|
||||
w -= lpad;
|
||||
}
|
||||
|
||||
usedfont = drw->fonts;
|
||||
if (!ellipsis_width && render)
|
||||
ellipsis_width = drw_fontset_getwidth(drw, "...");
|
||||
while (1) {
|
||||
ew = ellipsis_len = utf8strlen = 0;
|
||||
utf8str = text;
|
||||
nextfont = NULL;
|
||||
while (*text) {
|
||||
utf8charlen = utf8decode(text, &utf8codepoint, UTF_SIZ);
|
||||
for (curfont = drw->fonts; curfont; curfont = curfont->next) {
|
||||
charexists = charexists || XftCharExists(drw->dpy, curfont->xfont, utf8codepoint);
|
||||
if (charexists) {
|
||||
drw_font_getexts(curfont, text, utf8charlen, &tmpw, NULL);
|
||||
if (ew + ellipsis_width <= w) {
|
||||
/* keep track where the ellipsis still fits */
|
||||
ellipsis_x = x + ew;
|
||||
ellipsis_w = w - ew;
|
||||
ellipsis_len = utf8strlen;
|
||||
}
|
||||
|
||||
if (ew + tmpw > w) {
|
||||
overflow = 1;
|
||||
/* called from drw_fontset_getwidth_clamp():
|
||||
* it wants the width AFTER the overflow
|
||||
*/
|
||||
if (!render)
|
||||
x += tmpw;
|
||||
else
|
||||
utf8strlen = ellipsis_len;
|
||||
} else if (curfont == usedfont) {
|
||||
utf8strlen += utf8charlen;
|
||||
text += utf8charlen;
|
||||
ew += tmpw;
|
||||
} else {
|
||||
nextfont = curfont;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (overflow || !charexists || nextfont)
|
||||
break;
|
||||
else
|
||||
charexists = 0;
|
||||
}
|
||||
|
||||
if (utf8strlen) {
|
||||
if (render) {
|
||||
ty = y + (h - usedfont->h) / 2 + usedfont->xfont->ascent;
|
||||
XftDrawStringUtf8(d, &drw->scheme[invert ? ColBg : ColFg],
|
||||
usedfont->xfont, x, ty, (XftChar8 *)utf8str, utf8strlen);
|
||||
}
|
||||
x += ew;
|
||||
w -= ew;
|
||||
}
|
||||
if (render && overflow)
|
||||
drw_text(drw, ellipsis_x, y, ellipsis_w, h, 0, "...", invert);
|
||||
|
||||
if (!*text || overflow) {
|
||||
break;
|
||||
} else if (nextfont) {
|
||||
charexists = 0;
|
||||
usedfont = nextfont;
|
||||
} else {
|
||||
/* Regardless of whether or not a fallback font is found, the
|
||||
* character must be drawn. */
|
||||
charexists = 1;
|
||||
|
||||
for (i = 0; i < nomatches_len; ++i) {
|
||||
/* avoid calling XftFontMatch if we know we won't find a match */
|
||||
if (utf8codepoint == nomatches.codepoint[i])
|
||||
goto no_match;
|
||||
}
|
||||
|
||||
fccharset = FcCharSetCreate();
|
||||
FcCharSetAddChar(fccharset, utf8codepoint);
|
||||
|
||||
if (!drw->fonts->pattern) {
|
||||
/* Refer to the comment in xfont_create for more information. */
|
||||
die("the first font in the cache must be loaded from a font string.");
|
||||
}
|
||||
|
||||
fcpattern = FcPatternDuplicate(drw->fonts->pattern);
|
||||
FcPatternAddCharSet(fcpattern, FC_CHARSET, fccharset);
|
||||
FcPatternAddBool(fcpattern, FC_SCALABLE, FcTrue);
|
||||
|
||||
FcConfigSubstitute(NULL, fcpattern, FcMatchPattern);
|
||||
FcDefaultSubstitute(fcpattern);
|
||||
match = XftFontMatch(drw->dpy, drw->screen, fcpattern, &result);
|
||||
|
||||
FcCharSetDestroy(fccharset);
|
||||
FcPatternDestroy(fcpattern);
|
||||
|
||||
if (match) {
|
||||
usedfont = xfont_create(drw, NULL, match);
|
||||
if (usedfont && XftCharExists(drw->dpy, usedfont->xfont, utf8codepoint)) {
|
||||
for (curfont = drw->fonts; curfont->next; curfont = curfont->next)
|
||||
; /* NOP */
|
||||
curfont->next = usedfont;
|
||||
} else {
|
||||
xfont_free(usedfont);
|
||||
nomatches.codepoint[++nomatches.idx % nomatches_len] = utf8codepoint;
|
||||
no_match:
|
||||
usedfont = drw->fonts;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (d)
|
||||
XftDrawDestroy(d);
|
||||
|
||||
return x + (render ? w : 0);
|
||||
}
|
||||
|
||||
void
|
||||
drw_map(Drw *drw, Window win, int x, int y, unsigned int w, unsigned int h)
|
||||
{
|
||||
if (!drw)
|
||||
return;
|
||||
|
||||
XCopyArea(drw->dpy, drw->drawable, win, drw->gc, x, y, w, h, x, y);
|
||||
XSync(drw->dpy, False);
|
||||
}
|
||||
|
||||
unsigned int
|
||||
drw_fontset_getwidth(Drw *drw, const char *text)
|
||||
{
|
||||
if (!drw || !drw->fonts || !text)
|
||||
return 0;
|
||||
return drw_text(drw, 0, 0, 0, 0, 0, text, 0);
|
||||
}
|
||||
|
||||
unsigned int
|
||||
drw_fontset_getwidth_clamp(Drw *drw, const char *text, unsigned int n)
|
||||
{
|
||||
unsigned int tmp = 0;
|
||||
if (drw && drw->fonts && text && n)
|
||||
tmp = drw_text(drw, 0, 0, 0, 0, 0, text, n);
|
||||
return MIN(n, tmp);
|
||||
}
|
||||
|
||||
void
|
||||
drw_font_getexts(Fnt *font, const char *text, unsigned int len, unsigned int *w, unsigned int *h)
|
||||
{
|
||||
XGlyphInfo ext;
|
||||
|
||||
if (!font || !text)
|
||||
return;
|
||||
|
||||
XftTextExtentsUtf8(font->dpy, font->xfont, (XftChar8 *)text, len, &ext);
|
||||
if (w)
|
||||
*w = ext.xOff;
|
||||
if (h)
|
||||
*h = font->h;
|
||||
}
|
||||
|
||||
Cur *
|
||||
drw_cur_create(Drw *drw, int shape)
|
||||
{
|
||||
Cur *cur;
|
||||
|
||||
if (!drw || !(cur = ecalloc(1, sizeof(Cur))))
|
||||
return NULL;
|
||||
|
||||
cur->cursor = XCreateFontCursor(drw->dpy, shape);
|
||||
|
||||
return cur;
|
||||
}
|
||||
|
||||
void
|
||||
drw_cur_free(Drw *drw, Cur *cursor)
|
||||
{
|
||||
if (!cursor)
|
||||
return;
|
||||
|
||||
XFreeCursor(drw->dpy, cursor->cursor);
|
||||
free(cursor);
|
||||
}
|
|
@ -1,58 +0,0 @@
|
|||
/* See LICENSE file for copyright and license details. */
|
||||
|
||||
typedef struct {
|
||||
Cursor cursor;
|
||||
} Cur;
|
||||
|
||||
typedef struct Fnt {
|
||||
Display *dpy;
|
||||
unsigned int h;
|
||||
XftFont *xfont;
|
||||
FcPattern *pattern;
|
||||
struct Fnt *next;
|
||||
} Fnt;
|
||||
|
||||
enum { ColFg, ColBg, ColBorder }; /* Clr scheme index */
|
||||
typedef XftColor Clr;
|
||||
|
||||
typedef struct {
|
||||
unsigned int w, h;
|
||||
Display *dpy;
|
||||
int screen;
|
||||
Window root;
|
||||
Drawable drawable;
|
||||
GC gc;
|
||||
Clr *scheme;
|
||||
Fnt *fonts;
|
||||
} Drw;
|
||||
|
||||
/* Drawable abstraction */
|
||||
Drw *drw_create(Display *dpy, int screen, Window win, unsigned int w, unsigned int h);
|
||||
void drw_resize(Drw *drw, unsigned int w, unsigned int h);
|
||||
void drw_free(Drw *drw);
|
||||
|
||||
/* Fnt abstraction */
|
||||
Fnt *drw_fontset_create(Drw* drw, const char *fonts[], size_t fontcount);
|
||||
void drw_fontset_free(Fnt* set);
|
||||
unsigned int drw_fontset_getwidth(Drw *drw, const char *text);
|
||||
unsigned int drw_fontset_getwidth_clamp(Drw *drw, const char *text, unsigned int n);
|
||||
void drw_font_getexts(Fnt *font, const char *text, unsigned int len, unsigned int *w, unsigned int *h);
|
||||
|
||||
/* Colorscheme abstraction */
|
||||
void drw_clr_create(Drw *drw, Clr *dest, const char *clrname);
|
||||
Clr *drw_scm_create(Drw *drw, const char *clrnames[], size_t clrcount);
|
||||
|
||||
/* Cursor abstraction */
|
||||
Cur *drw_cur_create(Drw *drw, int shape);
|
||||
void drw_cur_free(Drw *drw, Cur *cursor);
|
||||
|
||||
/* Drawing context manipulation */
|
||||
void drw_setfontset(Drw *drw, Fnt *set);
|
||||
void drw_setscheme(Drw *drw, Clr *scm);
|
||||
|
||||
/* Drawing functions */
|
||||
void drw_rect(Drw *drw, int x, int y, unsigned int w, unsigned int h, int filled, int invert);
|
||||
int drw_text(Drw *drw, int x, int y, unsigned int w, unsigned int h, unsigned int lpad, const char *text, int invert);
|
||||
|
||||
/* Map functions */
|
||||
void drw_map(Drw *drw, Window win, int x, int y, unsigned int w, unsigned int h);
|
|
@ -1,209 +0,0 @@
|
|||
.TH DWM 1 dwm\-VERSION
|
||||
.SH NAME
|
||||
dwm \- dynamic window manager
|
||||
.SH SYNOPSIS
|
||||
.B dwm
|
||||
.RB [ \-v ]
|
||||
.SH DESCRIPTION
|
||||
dwm is a dynamic window manager for X. It manages windows in tiled, monocle
|
||||
and floating layouts. Either layout can be applied dynamically, optimising the
|
||||
environment for the application in use and the task performed.
|
||||
.P
|
||||
In tiled layouts windows are managed in a master and stacking area. The master
|
||||
area on the left contains one window by default, and the stacking area on the
|
||||
right contains all other windows. The number of master area windows can be
|
||||
adjusted from zero to an arbitrary number. In monocle layout all windows are
|
||||
maximised to the screen size. In floating layout windows can be resized and
|
||||
moved freely. Dialog windows are always managed floating, regardless of the
|
||||
layout applied.
|
||||
.P
|
||||
Windows are grouped by tags. Each window can be tagged with one or multiple
|
||||
tags. Selecting certain tags displays all windows with these tags.
|
||||
.P
|
||||
Each screen contains a small status bar which displays all available tags, the
|
||||
layout, the title of the focused window, and the text read from the root window
|
||||
name property, if the screen is focused. A floating window is indicated with an
|
||||
empty square and a maximised floating window is indicated with a filled square
|
||||
before the windows title. The selected tags are indicated with a different
|
||||
color. The tags of the focused window are indicated with a filled square in the
|
||||
top left corner. The tags which are applied to one or more windows are
|
||||
indicated with an empty square in the top left corner.
|
||||
.P
|
||||
dwm draws a small border around windows to indicate the focus state.
|
||||
.P
|
||||
On start, dwm can start additional programs that may be specified in two special
|
||||
shell scripts (see the FILES section below), autostart_blocking.sh and
|
||||
autostart.sh. The former is executed first and dwm will wait for its
|
||||
termination before starting. The latter is executed in the background before
|
||||
dwm enters its handler loop.
|
||||
.P
|
||||
Either of these files may be omitted.
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
.B \-v
|
||||
prints version information to stderr, then exits.
|
||||
.SH USAGE
|
||||
.SS Status bar
|
||||
.TP
|
||||
.B X root window name
|
||||
is read and displayed in the status text area. It can be set with the
|
||||
.BR xsetroot (1)
|
||||
command.
|
||||
.TP
|
||||
.B Button1
|
||||
click on a tag label to display all windows with that tag, click on the layout
|
||||
label toggles between tiled and floating layout.
|
||||
.TP
|
||||
.B Button3
|
||||
click on a tag label adds/removes all windows with that tag to/from the view.
|
||||
.TP
|
||||
.B Mod1\-Button1
|
||||
click on a tag label applies that tag to the focused window.
|
||||
.TP
|
||||
.B Mod1\-Button3
|
||||
click on a tag label adds/removes that tag to/from the focused window.
|
||||
.SS Keyboard commands
|
||||
.TP
|
||||
.B Mod1\-Shift\-Return
|
||||
Start
|
||||
.BR st(1).
|
||||
.TP
|
||||
.B Mod1\-p
|
||||
Spawn
|
||||
.BR dmenu(1)
|
||||
for launching other programs.
|
||||
.TP
|
||||
.B Mod1\-,
|
||||
Focus previous screen, if any.
|
||||
.TP
|
||||
.B Mod1\-.
|
||||
Focus next screen, if any.
|
||||
.TP
|
||||
.B Mod1\-Shift\-,
|
||||
Send focused window to previous screen, if any.
|
||||
.TP
|
||||
.B Mod1\-Shift\-.
|
||||
Send focused window to next screen, if any.
|
||||
.TP
|
||||
.B Mod1\-b
|
||||
Toggles bar on and off.
|
||||
.TP
|
||||
.B Mod1\-t
|
||||
Sets tiled layout.
|
||||
.TP
|
||||
.B Mod1\-f
|
||||
Sets floating layout.
|
||||
.TP
|
||||
.B Mod1\-m
|
||||
Sets monocle layout.
|
||||
.TP
|
||||
.B Mod1\-space
|
||||
Toggles between current and previous layout.
|
||||
.TP
|
||||
.B Mod1\-j
|
||||
Focus next window.
|
||||
.TP
|
||||
.B Mod1\-k
|
||||
Focus previous window.
|
||||
.TP
|
||||
.B Mod1\-i
|
||||
Increase number of windows in master area.
|
||||
.TP
|
||||
.B Mod1\-d
|
||||
Decrease number of windows in master area.
|
||||
.TP
|
||||
.B Mod1\-l
|
||||
Increase master area size.
|
||||
.TP
|
||||
.B Mod1\-h
|
||||
Decrease master area size.
|
||||
.TP
|
||||
.B Mod1\-Return
|
||||
Zooms/cycles focused window to/from master area (tiled layouts only).
|
||||
.TP
|
||||
.B Mod1\-Shift\-c
|
||||
Close focused window.
|
||||
.TP
|
||||
.B Mod1\-Shift\-space
|
||||
Toggle focused window between tiled and floating state.
|
||||
.TP
|
||||
.B Mod1\-Tab
|
||||
Toggles to the previously selected tags.
|
||||
.TP
|
||||
.B Mod1\-Shift\-[1..n]
|
||||
Apply nth tag to focused window.
|
||||
.TP
|
||||
.B Mod1\-Shift\-0
|
||||
Apply all tags to focused window.
|
||||
.TP
|
||||
.B Mod1\-Control\-Shift\-[1..n]
|
||||
Add/remove nth tag to/from focused window.
|
||||
.TP
|
||||
.B Mod1\-[1..n]
|
||||
View all windows with nth tag.
|
||||
.TP
|
||||
.B Mod1\-0
|
||||
View all windows with any tag.
|
||||
.TP
|
||||
.B Mod1\-Control\-[1..n]
|
||||
Add/remove all windows with nth tag to/from the view.
|
||||
.TP
|
||||
.B Mod1\-Shift\-q
|
||||
Quit dwm.
|
||||
.TP
|
||||
.B Mod1\-Control\-Shift\-q
|
||||
Restart dwm.
|
||||
.SS Mouse commands
|
||||
.TP
|
||||
.B Mod1\-Button1
|
||||
Move focused window while dragging. Tiled windows will be toggled to the floating state.
|
||||
.TP
|
||||
.B Mod1\-Button2
|
||||
Toggles focused window between floating and tiled state.
|
||||
.TP
|
||||
.B Mod1\-Button3
|
||||
Resize focused window while dragging. Tiled windows will be toggled to the floating state.
|
||||
.SH FILES
|
||||
The files containing programs to be started along with dwm are searched for in
|
||||
the following directories:
|
||||
.IP "1. $XDG_DATA_HOME/dwm"
|
||||
.IP "2. $HOME/.local/share/dwm"
|
||||
.IP "3. $HOME/.dwm"
|
||||
.P
|
||||
The first existing directory is scanned for any of the autostart files below.
|
||||
.TP 15
|
||||
autostart.sh
|
||||
This file is started as a shell background process before dwm enters its handler
|
||||
loop.
|
||||
.TP 15
|
||||
autostart_blocking.sh
|
||||
This file is started before any autostart.sh; dwm waits for its termination.
|
||||
.SH CUSTOMIZATION
|
||||
dwm is customized by creating a custom config.h and (re)compiling the source
|
||||
code. This keeps it fast, secure and simple.
|
||||
.SH SIGNALS
|
||||
.TP
|
||||
.B SIGHUP - 1
|
||||
Restart the dwm process.
|
||||
.TP
|
||||
.B SIGTERM - 15
|
||||
Cleanly terminate the dwm process.
|
||||
.SH SEE ALSO
|
||||
.BR dmenu (1),
|
||||
.BR st (1)
|
||||
.SH ISSUES
|
||||
Java applications which use the XToolkit/XAWT backend may draw grey windows
|
||||
only. The XToolkit/XAWT backend breaks ICCCM-compliance in recent JDK 1.5 and early
|
||||
JDK 1.6 versions, because it assumes a reparenting window manager. Possible workarounds
|
||||
are using JDK 1.4 (which doesn't contain the XToolkit/XAWT backend) or setting the
|
||||
environment variable
|
||||
.BR AWT_TOOLKIT=MToolkit
|
||||
(to use the older Motif backend instead) or running
|
||||
.B xprop -root -f _NET_WM_NAME 32a -set _NET_WM_NAME LG3D
|
||||
or
|
||||
.B wmname LG3D
|
||||
(to pretend that a non-reparenting window manager is running that the
|
||||
XToolkit/XAWT backend can recognize) or when using OpenJDK setting the environment variable
|
||||
.BR _JAVA_AWT_WM_NONREPARENTING=1 .
|
||||
.SH BUGS
|
||||
Send all bug reports with a patch to hackers@suckless.org.
|
File diff suppressed because it is too large
Load diff
Binary file not shown.
Before Width: | Height: | Size: 373 B |
|
@ -1,48 +0,0 @@
|
|||
void
|
||||
movestack(const Arg *arg) {
|
||||
Client *c = NULL, *p = NULL, *pc = NULL, *i;
|
||||
|
||||
if(arg->i > 0) {
|
||||
/* find the client after selmon->sel */
|
||||
for(c = selmon->sel->next; c && (!ISVISIBLE(c) || c->isfloating); c = c->next);
|
||||
if(!c)
|
||||
for(c = selmon->clients; c && (!ISVISIBLE(c) || c->isfloating); c = c->next);
|
||||
|
||||
}
|
||||
else {
|
||||
/* find the client before selmon->sel */
|
||||
for(i = selmon->clients; i != selmon->sel; i = i->next)
|
||||
if(ISVISIBLE(i) && !i->isfloating)
|
||||
c = i;
|
||||
if(!c)
|
||||
for(; i; i = i->next)
|
||||
if(ISVISIBLE(i) && !i->isfloating)
|
||||
c = i;
|
||||
}
|
||||
/* find the client before selmon->sel and c */
|
||||
for(i = selmon->clients; i && (!p || !pc); i = i->next) {
|
||||
if(i->next == selmon->sel)
|
||||
p = i;
|
||||
if(i->next == c)
|
||||
pc = i;
|
||||
}
|
||||
|
||||
/* swap c and selmon->sel selmon->clients in the selmon->clients list */
|
||||
if(c && c != selmon->sel) {
|
||||
Client *temp = selmon->sel->next==c?selmon->sel:selmon->sel->next;
|
||||
selmon->sel->next = c->next==selmon->sel?c:c->next;
|
||||
c->next = temp;
|
||||
|
||||
if(p && p != c)
|
||||
p->next = c;
|
||||
if(pc && pc != selmon->sel)
|
||||
pc->next = selmon->sel;
|
||||
|
||||
if(selmon->sel == selmon->clients)
|
||||
selmon->clients = c;
|
||||
else if(c == selmon->clients)
|
||||
selmon->clients = selmon->sel;
|
||||
|
||||
arrange(selmon);
|
||||
}
|
||||
}
|
|
@ -1,12 +0,0 @@
|
|||
diff -up dwm/dwm.c dwmmod/dwm.c
|
||||
--- dwm/dwm.c 2020-06-25 00:21:30.383692180 -0300
|
||||
+++ dwmmod/dwm.c 2020-06-25 00:20:35.643692330 -0300
|
||||
@@ -1057,6 +1057,8 @@ manage(Window w, XWindowAttributes *wa)
|
||||
updatewindowtype(c);
|
||||
updatesizehints(c);
|
||||
updatewmhints(c);
|
||||
+ c->x = c->mon->mx + (c->mon->mw - WIDTH(c)) / 2;
|
||||
+ c->y = c->mon->my + (c->mon->mh - HEIGHT(c)) / 2;
|
||||
XSelectInput(dpy, w, EnterWindowMask|FocusChangeMask|PropertyChangeMask|StructureNotifyMask);
|
||||
grabbuttons(c, 0);
|
||||
if (!c->isfloating)
|
|
@ -1,54 +0,0 @@
|
|||
diff -up dwm-6.3/dwm.c dwm-6.3-attachbottom/dwm.c
|
||||
--- dwm-6.3/dwm.c 2022-01-07 12:42:18.000000000 +0100
|
||||
+++ dwm-6.3-attachbottom/dwm.c 2022-08-17 22:14:41.813809073 +0200
|
||||
@@ -147,6 +147,7 @@ static int applysizehints(Client *c, int
|
||||
static void arrange(Monitor *m);
|
||||
static void arrangemon(Monitor *m);
|
||||
static void attach(Client *c);
|
||||
+static void attachbottom(Client *c);
|
||||
static void attachstack(Client *c);
|
||||
static void buttonpress(XEvent *e);
|
||||
static void checkotherwm(void);
|
||||
@@ -408,6 +409,15 @@ attach(Client *c)
|
||||
}
|
||||
|
||||
void
|
||||
+attachbottom(Client *c)
|
||||
+{
|
||||
+ Client **tc;
|
||||
+ c->next = NULL;
|
||||
+ for (tc = &c->mon->clients; *tc; tc = &(*tc)->next);
|
||||
+ *tc = c;
|
||||
+}
|
||||
+
|
||||
+void
|
||||
attachstack(Client *c)
|
||||
{
|
||||
c->snext = c->mon->stack;
|
||||
@@ -1066,7 +1076,7 @@ manage(Window w, XWindowAttributes *wa)
|
||||
c->isfloating = c->oldstate = trans != None || c->isfixed;
|
||||
if (c->isfloating)
|
||||
XRaiseWindow(dpy, c->win);
|
||||
- attach(c);
|
||||
+ attachbottom(c);
|
||||
attachstack(c);
|
||||
XChangeProperty(dpy, root, netatom[NetClientList], XA_WINDOW, 32, PropModeAppend,
|
||||
(unsigned char *) &(c->win), 1);
|
||||
@@ -1421,7 +1431,7 @@ sendmon(Client *c, Monitor *m)
|
||||
detachstack(c);
|
||||
c->mon = m;
|
||||
c->tags = m->tagset[m->seltags]; /* assign tags of target monitor */
|
||||
- attach(c);
|
||||
+ attachbottom(c);
|
||||
attachstack(c);
|
||||
focus(NULL);
|
||||
arrange(NULL);
|
||||
@@ -1903,7 +1913,7 @@ updategeom(void)
|
||||
m->clients = c->next;
|
||||
detachstack(c);
|
||||
c->mon = mons;
|
||||
- attach(c);
|
||||
+ attachbottom(c);
|
||||
attachstack(c);
|
||||
}
|
||||
if (m == selmon)
|
|
@ -1,39 +0,0 @@
|
|||
commit 5918623c5bd7fda155bf9dc3d33890c4ae1722d0
|
||||
Author: Simon Bremer <simon.bremer@tum.de>
|
||||
Date: Thu Dec 22 17:31:07 2016 +0100
|
||||
|
||||
Applied and fixed autostart patch for previous version;
|
||||
|
||||
diff --git a/dwm.c b/dwm.c
|
||||
index d27cb67..066ed71 100644
|
||||
--- a/dwm.c
|
||||
+++ b/dwm.c
|
||||
@@ -194,6 +194,7 @@ 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 run(void);
|
||||
+static void runAutostart(void);
|
||||
static void scan(void);
|
||||
static int sendevent(Client *c, Atom proto);
|
||||
static void sendmon(Client *c, Monitor *m);
|
||||
@@ -1386,6 +1387,12 @@ run(void)
|
||||
}
|
||||
|
||||
void
|
||||
+runAutostart(void) {
|
||||
+ system("cd ~/.dwm; ./autostart_blocking.sh");
|
||||
+ system("cd ~/.dwm; ./autostart.sh &");
|
||||
+}
|
||||
+
|
||||
+void
|
||||
scan(void)
|
||||
{
|
||||
unsigned int i, num;
|
||||
@@ -2145,6 +2152,7 @@ main(int argc, char *argv[])
|
||||
checkotherwm();
|
||||
setup();
|
||||
scan();
|
||||
+ runAutostart();
|
||||
run();
|
||||
cleanup();
|
||||
XCloseDisplay(dpy);
|
|
@ -1,95 +0,0 @@
|
|||
From 9a4037dc0ef56f91c009317e78e9e3790dafbb58 Mon Sep 17 00:00:00 2001
|
||||
From: BrunoCooper17 <BrunoCooper17@outlook.com>
|
||||
Date: Mon, 15 Nov 2021 14:04:53 -0600
|
||||
Subject: [PATCH] MoveStack patch
|
||||
|
||||
This plugin allows you to move clients around in the stack and swap them
|
||||
with the master. It emulates the behavior off mod+shift+j and mod+shift+k
|
||||
in Xmonad. movestack(+1) will swap the client with the current focus with
|
||||
the next client. movestack(-1) will swap the client with the current focus
|
||||
with the previous client.
|
||||
---
|
||||
config.def.h | 3 +++
|
||||
movestack.c | 48 ++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
2 files changed, 51 insertions(+)
|
||||
create mode 100644 movestack.c
|
||||
|
||||
diff --git a/config.def.h b/config.def.h
|
||||
index a2ac963..33efa5b 100644
|
||||
--- a/config.def.h
|
||||
+++ b/config.def.h
|
||||
@@ -60,6 +60,7 @@ 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 };
|
||||
|
||||
+#include "movestack.c"
|
||||
static Key keys[] = {
|
||||
/* modifier key function argument */
|
||||
{ MODKEY, XK_p, spawn, {.v = dmenucmd } },
|
||||
@@ -71,6 +72,8 @@ static Key keys[] = {
|
||||
{ MODKEY, XK_d, incnmaster, {.i = -1 } },
|
||||
{ MODKEY, XK_h, setmfact, {.f = -0.05} },
|
||||
{ MODKEY, XK_l, setmfact, {.f = +0.05} },
|
||||
+ { MODKEY|ShiftMask, XK_j, movestack, {.i = +1 } },
|
||||
+ { MODKEY|ShiftMask, XK_k, movestack, {.i = -1 } },
|
||||
{ MODKEY, XK_Return, zoom, {0} },
|
||||
{ MODKEY, XK_Tab, view, {0} },
|
||||
{ MODKEY|ShiftMask, XK_c, killclient, {0} },
|
||||
diff --git a/movestack.c b/movestack.c
|
||||
new file mode 100644
|
||||
index 0000000..520f4ae
|
||||
--- /dev/null
|
||||
+++ b/movestack.c
|
||||
@@ -0,0 +1,48 @@
|
||||
+void
|
||||
+movestack(const Arg *arg) {
|
||||
+ Client *c = NULL, *p = NULL, *pc = NULL, *i;
|
||||
+
|
||||
+ if(arg->i > 0) {
|
||||
+ /* find the client after selmon->sel */
|
||||
+ for(c = selmon->sel->next; c && (!ISVISIBLE(c) || c->isfloating); c = c->next);
|
||||
+ if(!c)
|
||||
+ for(c = selmon->clients; c && (!ISVISIBLE(c) || c->isfloating); c = c->next);
|
||||
+
|
||||
+ }
|
||||
+ else {
|
||||
+ /* find the client before selmon->sel */
|
||||
+ for(i = selmon->clients; i != selmon->sel; i = i->next)
|
||||
+ if(ISVISIBLE(i) && !i->isfloating)
|
||||
+ c = i;
|
||||
+ if(!c)
|
||||
+ for(; i; i = i->next)
|
||||
+ if(ISVISIBLE(i) && !i->isfloating)
|
||||
+ c = i;
|
||||
+ }
|
||||
+ /* find the client before selmon->sel and c */
|
||||
+ for(i = selmon->clients; i && (!p || !pc); i = i->next) {
|
||||
+ if(i->next == selmon->sel)
|
||||
+ p = i;
|
||||
+ if(i->next == c)
|
||||
+ pc = i;
|
||||
+ }
|
||||
+
|
||||
+ /* swap c and selmon->sel selmon->clients in the selmon->clients list */
|
||||
+ if(c && c != selmon->sel) {
|
||||
+ Client *temp = selmon->sel->next==c?selmon->sel:selmon->sel->next;
|
||||
+ selmon->sel->next = c->next==selmon->sel?c:c->next;
|
||||
+ c->next = temp;
|
||||
+
|
||||
+ if(p && p != c)
|
||||
+ p->next = c;
|
||||
+ if(pc && pc != selmon->sel)
|
||||
+ pc->next = selmon->sel;
|
||||
+
|
||||
+ if(selmon->sel == selmon->clients)
|
||||
+ selmon->clients = c;
|
||||
+ else if(c == selmon->clients)
|
||||
+ selmon->clients = selmon->sel;
|
||||
+
|
||||
+ arrange(selmon);
|
||||
+ }
|
||||
+}
|
||||
\ No newline at end of file
|
||||
--
|
||||
2.33.1
|
||||
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue