initial commit
This commit is contained in:
18
.config/sx/sxrc
Executable file
18
.config/sx/sxrc
Executable file
@@ -0,0 +1,18 @@
|
||||
#!/bin/sh
|
||||
|
||||
# configure monitors
|
||||
xrandr --output DisplayPort-1 --mode 1920x1080 --rate 144 --primary --left-of HDMI-A-0 --output HDMI-A-0 --mode 1920x1080 --rate 60
|
||||
# increase key repeat rate
|
||||
xset r rate 300 50
|
||||
# set the wallpaper
|
||||
xwallpaper --zoom ~/.local/share/bg.jpg
|
||||
# load xresources
|
||||
xrdb ~/.config/sx/xresources &
|
||||
xrdbpid=$!
|
||||
|
||||
export _JAVA_AWT_WM_NONREPARENTING=1 # Fix for Java applications in dwm
|
||||
|
||||
# Ensure that xrdb has finished running before moving on to start the WM/DE.
|
||||
[ -n "$xrdbpid" ] && wait "$xrdbpid"
|
||||
|
||||
dbus-launch --exit-with-session dwm
|
||||
35
.config/sx/xresources
Normal file
35
.config/sx/xresources
Normal file
@@ -0,0 +1,35 @@
|
||||
!! Transparency (0-1)
|
||||
*.alpha: 0.7
|
||||
|
||||
/* name dark light */
|
||||
/* black 0 8 */
|
||||
/* red 1 9 */
|
||||
/* green 2 10 */
|
||||
/* yellow 3 11 */
|
||||
/* blue 4 12 */
|
||||
/* purple 5 13 */
|
||||
/* cyan 6 14 */
|
||||
/* white 7 15 */
|
||||
|
||||
*.foreground: #c8ccd4
|
||||
*.background: #1e222a
|
||||
*.cursorColor: #c8ccd4
|
||||
*.color0: #1e222a
|
||||
*.color1: #e06c75
|
||||
*.color2: #98c379
|
||||
*.color3: #e5c07b
|
||||
*.color4: #61afef
|
||||
*.color5: #c678dd
|
||||
*.color6: #56b6c2
|
||||
*.color7: #abb2bf
|
||||
*.color8: #545862
|
||||
*.color9: #e06c75
|
||||
*.color10: #98c379
|
||||
*.color11: #e5c07b
|
||||
*.color12: #61afef
|
||||
*.color13: #c678dd
|
||||
*.color14: #56b6c2
|
||||
*.color15: #c8ccd4
|
||||
|
||||
*.font: mono:size=14
|
||||
*.blinktimeout: 600
|
||||
42
.config/yash/aliasrc
Normal file
42
.config/yash/aliasrc
Normal file
@@ -0,0 +1,42 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Use neovim for vim if present.
|
||||
[ -x "$(command -v nvim)" ] && alias vim="nvim" vimdiff="nvim -d"
|
||||
|
||||
# some useful shortcuts
|
||||
alias -- -='cd -'
|
||||
alias la='ls -a' ll='ls -l' lla='ll -a'
|
||||
alias h='fc -l'
|
||||
alias j='jobs'
|
||||
alias r='fc -s'
|
||||
|
||||
# Verbosity and interactive actions
|
||||
alias \
|
||||
cp="cp -iv" \
|
||||
mv="mv -iv" \
|
||||
rm="rm -vI" \
|
||||
bc="bc -ql" \
|
||||
mkdir="mkdir -pv" \
|
||||
ffmpeg="ffmpeg -hide_banner"
|
||||
|
||||
# Colorize commands when possible.
|
||||
alias \
|
||||
ls="ls -hN --color=auto --group-directories-first" \
|
||||
grep="grep --color=auto" \
|
||||
diff="diff --color=auto" \
|
||||
ip="ip -color=auto"
|
||||
|
||||
# Shorthands
|
||||
alias \
|
||||
sudo="doas" \
|
||||
ka="killall" \
|
||||
g="git" \
|
||||
sdn="shutdown -h now" \
|
||||
e="$EDITOR" \
|
||||
o="xdg-open" \
|
||||
se="sudo $EDITOR" \
|
||||
ei="sudo emerge --ask" \
|
||||
er="sudo emerge -cv" \
|
||||
es="sudo emerge -q n -s" \
|
||||
eu="sudo emerge -avuDN @world" \
|
||||
z="zathura"
|
||||
38
.config/yash/profile
Normal file
38
.config/yash/profile
Normal file
@@ -0,0 +1,38 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Adds `~/.local/bin` to $PATH
|
||||
export PATH="$PATH:$(find ~/.local/bin -type d -printf %p:)"
|
||||
|
||||
# Default programs:
|
||||
export EDITOR="nvim"
|
||||
export TERMINAL="st"
|
||||
export BROWSER="chromium"
|
||||
|
||||
# ~/ Clean-up:
|
||||
export XDG_CONFIG_HOME="$HOME/.config"
|
||||
export XDG_DATA_HOME="$HOME/.local/share"
|
||||
export XDG_CACHE_HOME="$HOME/.cache"
|
||||
export GTK2_RC_FILES="$XDG_CONFIG_HOME/gtk-2.0/gtkrc"
|
||||
export ZDOTDIR="$XDG_CONFIG_HOME/zsh"
|
||||
# export GNUPGHOME="$XDG_DATA_HOME/gnupg"
|
||||
export XINITRC="$XDG_CONFIG_HOME/x11/xinitrc"
|
||||
# export XAUTHORITY="$XDG_RUNTIME_DIR/Xauthority" # This line will break some DMs.
|
||||
export WINEPREFIX="$XDG_DATA_HOME/wineprefixes/default"
|
||||
export GOPATH="$XDG_DATA_HOME/go"
|
||||
export HISTFILE="$XDG_DATA_HOME/history"
|
||||
export _JAVA_AWT_WM_NONREPARENTING=1 # Fix for Java applications in dwm
|
||||
|
||||
# Wayland
|
||||
# export MOZ_ENABLE_WAYLAND=1
|
||||
# export SDL_VIDEODRIVEVER=wayland
|
||||
# export ELECTRON_OZONE_PLATFORM_HINT=auto
|
||||
# export QT_QPA_PLATFORM=wayland-egl
|
||||
# export GDK_BACKEND=wayland,x11
|
||||
|
||||
# Other program settings:
|
||||
export QT_QPA_PLATFORMTHEME="gtk2" # Have QT use gtk2 theme.
|
||||
eval "$(ssh-agent -s)" >~/.ssh/agent.env
|
||||
export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
|
||||
|
||||
# Start graphical server on user's current tty if not already running.
|
||||
[ "$(tty)" = "/dev/tty1" ] && ! pidof -s Xorg >/dev/null 2>&1 && exec sx
|
||||
59
.config/yash/rc
Normal file
59
.config/yash/rc
Normal file
@@ -0,0 +1,59 @@
|
||||
# enable bash-like extended expansion
|
||||
set --brace-expand
|
||||
|
||||
# enable completion of hidden files
|
||||
set --dot-glob
|
||||
|
||||
# enable recursive pathname expansion
|
||||
set --extended-glob
|
||||
|
||||
# don't implicitly expand non-existent variables to empty strings
|
||||
set --no-unset
|
||||
|
||||
# don't save commands starting with a space in history
|
||||
set --hist-space
|
||||
|
||||
# emacs bindings
|
||||
set --emacs
|
||||
|
||||
# Load aliases
|
||||
[ -f "$HOME/.config/yash/aliasrc" ] && . "$HOME/.config/yash/aliasrc"
|
||||
|
||||
# define some basic variables if missing
|
||||
SHELL=$(command -v yash)
|
||||
: ${PAGER:=less} ${EDITOR:=nvim}
|
||||
: ${LOGNAME:=$(logname)} ${HOSTNAME:=$(uname -n)}
|
||||
|
||||
# variables needed for command history
|
||||
if ! [ "${HISTFILE-}" ]; then
|
||||
HISTFILE=$HOME/.local/state/yash/history
|
||||
fi
|
||||
|
||||
# create HISTFILE parent directory if missing
|
||||
! [ -d "${HISTFILE%/*}" ] && mkdir -p "${HISTFILE%/*}"
|
||||
|
||||
HISTSIZE=5000
|
||||
|
||||
# initialize event handlers
|
||||
COMMAND_NOT_FOUND_HANDLER=()
|
||||
PROMPT_COMMAND=()
|
||||
POST_PROMPT_COMMAND=()
|
||||
YASH_AFTER_CD=()
|
||||
|
||||
YASH_PS1='\fg.$(whoami)\fc. ${PWD/#$HOME/\~} \fD.\$ '
|
||||
|
||||
# when a directory name is entered as a command, treat as "cd"
|
||||
_autocd()
|
||||
if [ -d "$1" ]; then
|
||||
HANDLED=true
|
||||
cd -- "$@"
|
||||
break -i
|
||||
fi
|
||||
COMMAND_NOT_FOUND_HANDLER=("$COMMAND_NOT_FOUND_HANDLER" '_autocd "$@"')
|
||||
|
||||
# print file type when executing non-executable files
|
||||
_file_type()
|
||||
if [ -e "$1" ] && ! [ -d "$1" ]; then
|
||||
file -- "$1"
|
||||
fi
|
||||
COMMAND_NOT_FOUND_HANDLER=("$COMMAND_NOT_FOUND_HANDLER" '_file_type "$@"')
|
||||
1
.config/zathura/zathurarc
Normal file
1
.config/zathura/zathurarc
Normal file
@@ -0,0 +1 @@
|
||||
set selection-clipboard clipboard
|
||||
21
.local/bin/screenshare
Executable file
21
.local/bin/screenshare
Executable file
@@ -0,0 +1,21 @@
|
||||
#!/bin/bash
|
||||
|
||||
if ! lsmod | grep -q v4l2loopback; then
|
||||
echo "Loading v4l2loopback kernel module..."
|
||||
sudo modprobe v4l2loopback devices=1 video_nr=10 card_label="Virtual Video Feed" exclusive_caps=1
|
||||
else
|
||||
echo "v4l2loopback is already loaded."
|
||||
fi
|
||||
|
||||
if [ ! -e /dev/video10 ]; then
|
||||
echo "/dev/video10 not found. Ensure the module loaded correctly."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Setting permissions for /dev/video10..."
|
||||
sudo chmod 666 /dev/video10
|
||||
|
||||
echo "Starting FFmpeg..."
|
||||
ffmpeg -f x11grab -video_size 1920x1080 -framerate 60 -i :0.0+0,0 \
|
||||
-vf "scale=1280:720,format=yuv420p" \
|
||||
-f v4l2 /dev/video10
|
||||
Reference in New Issue
Block a user