diff options
author | xAlpharax <42233094+xAlpharax@users.noreply.github.com> | 2023-09-24 20:36:04 +0300 |
---|---|---|
committer | xAlpharax <42233094+xAlpharax@users.noreply.github.com> | 2023-09-24 20:36:04 +0300 |
commit | 805c951522bc5063849b51a729b08bfdf16168df (patch) | |
tree | 302b1842142b6b451a7b0a2124e0e1769dbc4816 | |
parent | c702b3c1d5420be981f67cdc40d62052df87563c (diff) |
Adding X11, zsh, nvtop, dmenu and some other tools for wallpapers,
power menus, uploading simple text/binary files.
Changes to be committed:
new file: X11/Xresources
new file: X11/xinit
new file: bmenu
new file: dmenu.conf
new file: nvtop/interface.ini
new file: pmenu
new file: upload
new file: zsh/aliases
new file: zsh/env
new file: zsh/zshrc
-rw-r--r-- | X11/Xresources | 41 | ||||
-rwxr-xr-x | X11/xinit | 54 | ||||
-rwxr-xr-x | bmenu | 16 | ||||
-rwxr-xr-x | dmenu.conf | 11 | ||||
-rw-r--r-- | nvtop/interface.ini | 44 | ||||
-rwxr-xr-x | pmenu | 21 | ||||
-rwxr-xr-x | upload | 12 | ||||
-rw-r--r-- | zsh/aliases | 58 | ||||
-rw-r--r-- | zsh/env | 56 | ||||
-rw-r--r-- | zsh/zshrc | 24 |
10 files changed, 337 insertions, 0 deletions
diff --git a/X11/Xresources b/X11/Xresources new file mode 100644 index 0000000..da301ce --- /dev/null +++ b/X11/Xresources @@ -0,0 +1,41 @@ +! .Xresources + +Xcursor.theme: SpaceKCursors + +! special +*.foreground: #d9d6e3 +*.background: #0f0a1c + +*.cursorColor: #d9d5e6 + +! black +*.color0: #828ff9 +*.color8: #828ff9 + +! red +*.color1: #655395 +*.color9: #655395 + +! green +*.color2: #828ff9 +*.color10: #828ff9 + +! yellow +*.color3: #ac96dc +*.color11: #ac96dc + +! blue +*.color4: #e94c80 +*.color12: #e94c80 + +! magenta +*.color5: #ace6f0 +*.color13: #ace6f0 + +! cyan +*.color6: #655395 +*.color14: #655395 + +! white +*.color7: #eebea4 +*.color15: #ace6f0 diff --git a/X11/xinit b/X11/xinit new file mode 100755 index 0000000..463a5a4 --- /dev/null +++ b/X11/xinit @@ -0,0 +1,54 @@ +#!/bin/sh + +# # +# ## ~/.xinitrc ## # +# # + +xrandr -s 1920x1080 -r 144 & # target screen resolution +xset r rate 300 30 & # key repeat delay and speed + +xrdb merge ~/.Xresources # resources +picom & # compositor + +# # +# ## more stuff ## # +# # + +feh --bg-fill --no-fehbg ~/.config/backgrounds/darkflowers.jpg & # wallpaper + +synclient ClickPad=1 # buttonless pad + +synclient VertTwoFingerScroll=1 # enable vert scroll +synclient HorizTwoFingerScroll=1 # enable horiz scroll + +synclient EmulateTwoFingerMinZ=300 # precision of scroll +synclient EmulateTwoFingerMinW=300 # precision of scroll + +synclient PalmDetect=1 # palm rejection +synclient PalmMinWidth=10 # size parameter +synclient PalmMinZ=200 # pressure param + +synclient VertScrollDelta=-200 # natural vert +synclient HorizScrollDelta=-200 # natural horiz + +synclient CornerCoasting=0 # eliminate coasting +synclient CoastingSpeed=0 # eliminate coasting + +synclient TapButton1=1 TapButton2=3 ClickFinger3=0 # tap to click +synclient MinSpeed=1.25 MaxSpeed=2.5 # pointer speed +synclient AccelFactor=0.025 # acceleration + +amixer --card 0 set 'Master' 100 & +amixer --card 0 set 'Capture' 39 & + +sxhkd -c $HOME/.config/keybinds & # keybindings + +eval $(dbus-dbus-launch --sh-syntax --exit-with-x11) # dbus session +dbus-run-session pipewire & + +exec slstatus & # statusbar + +while :; +do + ssh-agent dwm +done @@ -0,0 +1,16 @@ +#!/bin/bash + +set -e + +backgrounds=/home/$USER/.config/backgrounds +config=$(bash ~/.config/dmenu.conf) + +n_files=$(($(ls -l $backgrounds | wc -l) - 1)) + +# Use dmenu to prompt the user to select a file +selected_file=$(find $backgrounds -maxdepth 1 -type f -printf '%f\n' | $config -i -l $n_files) + +# If the user selected a file, execute it +if [ -n "$selected_file" ]; then + feh --bg-fill --no-fehbg "${backgrounds}/${selected_file}" +fi diff --git a/dmenu.conf b/dmenu.conf new file mode 100755 index 0000000..1749c19 --- /dev/null +++ b/dmenu.conf @@ -0,0 +1,11 @@ +#!/bin/bash + +dwmdir=$HOME/.config/suckless/dwm + +colCOL=( $(cat $dwmdir/config.h | grep -E col | awk 'NR==2,NR==4' | awk '{print($6)}' | sed -r 's/[";]//g' ) ) # | sed -r 's/"//g' ) ) +DFONT=$(cat $dwmdir/config.h | grep -E dmenufont | awk 'NR==1' | awk '{print($6)}' | sed -r 's/[";]//g' ) # | sed -r 's/"//g' ) +CGRAY1=${colCOL[0]} +CGRAY2=${colCOL[1]} +CCYANN=${colCOL[2]} + +echo "dmenu -fn $DFONT -nb $CGRAY1 -nf $CCYANN -sb $CGRAY2 -sf $CGRAY1" diff --git a/nvtop/interface.ini b/nvtop/interface.ini new file mode 100644 index 0000000..7752ed6 --- /dev/null +++ b/nvtop/interface.ini @@ -0,0 +1,44 @@ +; Please do not edit this file. +; The file is automatically generated and modified by nvtop by pressing F12. +; If you wish to modify an option, use nvtop's setup window (F2) and follow up by saving the preference (F12). +[GeneralOption] +UseColor = true +UpdateInterval = 500 +ShowInfoMessages = false + +[HeaderOption] +UseFahrenheit = false +EncodeHideTimer = 3.000000e+01 + +[ChartOption] +ReverseChart = false + +[ProcessListOption] +HideNvtopProcess = true +SortOrder = descending +SortBy = memory +DisplayField = gpuId +DisplayField = type +DisplayField = gpuRate +DisplayField = memory +DisplayField = cpuUsage +DisplayField = cpuMem +DisplayField = cmdline + +[Device] +Pdev = 0000:06:00.0 +Monitor = true +ShownInfo = gpuMemRate +ShownInfo = temperature +ShownInfo = powerDrawRate +ShownInfo = gpuClockRate + + +[Device] +Pdev = 0000:01:00.0 +Monitor = true +ShownInfo = gpuMemRate +ShownInfo = temperature +ShownInfo = powerDrawRate +ShownInfo = gpuClockRate + @@ -0,0 +1,21 @@ +#!/bin/bash + +set -e + +config=$(bash ~/.config/dmenu.conf) + +doVAR=$(echo -e "dwmkill\npicomkill\nsleeeeeeep\nrebooooooot\npoweroff" | $config -i -l 5 ) + +case $doVAR in + "");; + "dwmkill") + pkill xinit;; + "picomkill") + pkill picom;; + "sleeeeeeep") + sudo zzz;; + "rebooooooot") + sudo reboot;; + "poweroff") + sudo poweroff;; +esac @@ -0,0 +1,12 @@ +#!/bin/bash + +set -e + +if [ "$1" = "" ];then echo "No args"; exit; fi + +TO_UPLOAD_FILE="$1" + +RETURN_LINK=$(curl -F "file=@$TO_UPLOAD_FILE" https://0x0.st) + +echo $RETURN_LINK | xsel -b +echo $RETURN_LINK diff --git a/zsh/aliases b/zsh/aliases new file mode 100644 index 0000000..df353e8 --- /dev/null +++ b/zsh/aliases @@ -0,0 +1,58 @@ +#!/bin/sh + +## # zsh / aliases # ## + +alias ls='ls --color=auto' + +# shorthands +alias ll='ls -lGh' +alias la='ls -lGAh' +alias lf='ranger' +alias du='du -sh' +alias df='df -h' +alias cl='clear' + +alias am='alsamixer --card 0' +alias x='cd ~ ; startx' +alias v='nvim' + +# secure shells +alias spi='ssh -X pi@192.168.0.130' + +# directories +configdir=$HOME/.config +alias cds='cd $configdir/suckless/' +alias zal='vim $configdir/zsh/aliases' +alias zrc='vim $configdir/zsh/zshrc' +alias zen='vim $configdir/zsh/env' + +# packages +alias xbpi='sudo xbps-install' +alias xbpr='sudo xbps-remove' +alias xbpq='xbps-query -Rs' + +# scripts +scriptdir=$HOME/.scripts +alias rgbhex='python $scriptdir/rgbhex.py' +alias sched='python $scriptdir/sched.py' +alias vis='python $scriptdir/vis.py' + +# aesthetic +alias filmelematrix='cmatrix -C red -a' +alias colorfetch='neofetch --block_range 0 15' +alias change-bg='feh --bg-fill --no-fehbg' +alias clock='tty-clock -Dc -C 4' +alias sens='watch -n 0.1 sensors' +alias htopr='htop -C -U' +alias sxiv='sxiv -bpqra' + +# tools +alias newsboat='newsboat -C ~/.config/newsboat/newsboat.conf -c ~/.config/newsboat/cache.db -u ~/.config/newsboat/urls' +alias proton='~/.local/share/Steam/steamapps/common/Proton\ -\ Experimental/proton run' +alias ytdlpa='yt-dlp --extract-audio --audio-quality 0 --audio-format mp3' +alias ytdlp='yt-dlp' + +# envycontrol for nvidia optimus +alias dedicated='sudo envycontrol -s nvidia --coolbits 28 --verbose' # --force-comp +alias hybrid='sudo envycontrol -s hybrid --rtd3 3 --verbose' +alias integrated='sudo envycontrol -s integrated --verbose' @@ -0,0 +1,56 @@ +#!/bin/sh + +### ENVIRONMENT VARIABLES ### + +### apps to open stuff ### + +export EDITOR=nvim +export BROWSER=brave + +################## + +### gpg ### +export GPG_TTY=$(tty) + +### dotnet disable telemetry ### +export DOTNET_CLI_TELEMETRY_OPTOUT=1 + +### dbus stuff ### +export NO_AT_BRIDGE=1 + +### paths ### +export PATH=/bin:/sbin/:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/home/alphara/.local/bin:/home/alphara/exfatssd/IEUCYS/flutter2/bin + +### XDG ### +export XDG_CONFIG_HOME=/home/alphara/.config + +### steam ### +export STEAM_COMPAT_DATA_PATH=~/.local/share/Steam/steamapps/compatdata +export STEAM_COMPAT_CLIENT_INSTALL_PATH=~/.local/share/Steam/ + +### gaming stuff ### +#export mesa_glthread=true # AMD OPENGL shader caching +export RADV_PERFTEST=aco # AMD faster shader compiler by Valve + +export __GL_THREADED_OPTIMIZATION=1 # NVIDIA OPENGL +export __GL_SHADER_DISK_CACHE=1 # to enable shader cache + +### ray tracing support and nvidia stuff ### +export PROTON_HIDE_NVIDIA_GPU=0 +export PROTON_ENABLE_NVAPI=1 +export VKD3D_CONFIG=dxr,dxr11 +#export PROTON_ENABLE_NGX_UPDATER=1 + +### QT and GTK ### +export GTK_THEME=Arc:dark +export GTK2_RC_FILES=/usr/share/themes/Arc-Dark/gtk-2.0/gtkrc +export QT_STYLE_OVERRIDE=adwaita-dark + +### pipewire ### +# export PIPEWIRE_LATENCY=256/48000 # IF NEEDED 16/48000 ~ 0.33 ms latency + +### cuda & ML ### +export PATH=$PATH:/usr/local/cuda-11.7/bin +export LD_LIBRARY_PATH=/lib:/usr/lib:/usr/local/lib:/usr/local/cuda-11.7/lib64 + +TORCH_CUDA_ARCH_LIST="8.6" diff --git a/zsh/zshrc b/zsh/zshrc new file mode 100644 index 0000000..3e7eca4 --- /dev/null +++ b/zsh/zshrc @@ -0,0 +1,24 @@ +zstyle ':completion:*' menu select +zstyle :compinstall filename '/home/alphara/.zshrc' + +HISTFILE=~/.histfile +HISTSIZE=1000000 +SAVEHIST=1000000 + +setopt extendedglob +unsetopt beep + +bindkey -v + +source $HOME/.config/zsh/aliases +source $HOME/.config/zsh/env + +autoload -Uz compinit +zmodload zsh/complist + +PROMPT='%B%F{3}%n@%m %~>%b%f ' +autoload -Uz promptinit +PROMPT_EOL_MARK="" + +promptinit +compinit |