update: xinit + bashrc

This commit is contained in:
2026-09-27 11:26:23 +02:00
parent 02432c3fa1
commit 7f51118de2
4 changed files with 196 additions and 1 deletions
+146
View File
@@ -0,0 +1,146 @@
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
esac
# don't put duplicate lines or lines starting with space in the history.
# See bash(1) for more options
HISTCONTROL=ignoreboth
# append to the history file, don't overwrite it
shopt -s histappend
# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
HISTSIZE=1000
HISTFILESIZE=2000
# check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.
shopt -s checkwinsize
# enable color support of ls and also add handy aliases
if [ -x /usr/bin/dircolors ]; then
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
alias ls='ls --color=auto'
#alias dir='dir --color=auto'
#alias vdir='vdir --color=auto'
#alias grep='grep --color=auto'
#alias fgrep='fgrep --color=auto'
#alias egrep='egrep --color=auto'
fi
# colored GCC warnings and errors
#export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'
# some more ls aliases
#alias ll='ls -l'
#alias la='ls -A'
#alias l='ls -CF'
# Alias definitions.
# You may want to put all your additions into a separate file like
# ~/.bash_aliases, instead of adding them here directly.
# See /usr/share/doc/bash-doc/examples in the bash-doc package.
if [ -f ~/.bash_aliases ]; then
. ~/.bash_aliases
fi
# enable programmable completion features (you don't need to enable
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
# sources /etc/bash.bashrc).
if ! shopt -oq posix; then
if [ -f /usr/share/bash-completion/bash_completion ]; then
. /usr/share/bash-completion/bash_completion
elif [ -f /etc/bash_completion ]; then
. /etc/bash_completion
fi
fi
# ============================================================
# Tokyo Night Bash prompt
# ============================================================
# Raw colors for command substitutions and shell functions
TN_BLUE=$'\e[38;2;122;162;247m'
TN_CYAN=$'\e[38;2;125;207;255m'
TN_GREEN=$'\e[38;2;158;206;106m'
TN_YELLOW=$'\e[38;2;224;175;104m'
TN_RED=$'\e[38;2;247;118;142m'
TN_PURPLE=$'\e[38;2;187;154;247m'
TN_MUTED=$'\e[38;2;86;95;137m'
TN_FG=$'\e[38;2;169;177;214m'
TN_RESET=$'\e[0m'
__tokyo_git_prompt() {
local branch
local changes
branch=$(git symbolic-ref --quiet --short HEAD 2>/dev/null) ||
branch=$(git rev-parse --short HEAD 2>/dev/null) ||
return 0
changes=$(git status --porcelain 2>/dev/null)
if [[ -n "$changes" ]]; then
printf '%s %s %s●%s' \
"$TN_PURPLE" "$branch" "$TN_YELLOW" "$TN_RESET"
else
printf '%s %s %s✓%s' \
"$TN_PURPLE" "$branch" "$TN_GREEN" "$TN_RESET"
fi
}
__tokyo_exit_status() {
local status=$1
if (( status != 0 )); then
printf '%s ✘ %d%s' "$TN_RED" "$status" "$TN_RESET"
fi
}
__tokyo_prompt() {
local exit_code=$?
PS1=""
# First line
PS1+="${TN_MUTED}╭─${TN_BLUE}["
PS1+="${TN_CYAN}\u${TN_MUTED}@${TN_CYAN}\h"
PS1+="${TN_BLUE}]${TN_MUTED}─"
if [[ -n ${IN_NIX_SHELL:-} ]]; then
PS1+="${TN_YELLOW}[nix:${IN_NIX_SHELL}]${TN_MUTED}─"
fi
PS1+="${TN_GREEN}[\w]"
# The \[...\] markers tell Bash that the command substitution
# contains non-printing terminal color sequences.
PS1+="\[\$(__tokyo_git_prompt)\]"
if (( exit_code != 0 )); then
PS1+="\[\$(__tokyo_exit_status ${exit_code})\]"
fi
# Second line
PS1+="${TN_MUTED}\n╰─"
if (( EUID == 0 )); then
PS1+="${TN_RED}#${TN_RESET} "
else
PS1+="${TN_BLUE}❯${TN_RESET} "
fi
}
PROMPT_COMMAND=__tokyo_prompt
export PATH=$PATH:$HOME/containers/bin
clear
ofetch
+23
View File
@@ -0,0 +1,23 @@
# ~/.xbindkeysrc
# Volume mute
"wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"
XF86AudioMute
# Volume down
"wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-"
XF86AudioLowerVolume
# Volume up
"wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+"
XF86AudioRaiseVolume
# Brightness down
"brightnessctl set 5%-"
XF86MonBrightnessDown
# Brightness up
"brightnessctl set 5%+"
XF86MonBrightnessUp
+20
View File
@@ -4,6 +4,26 @@ picom &
xss-lock -l slock & xss-lock -l slock &
feh --bg-scale $HOME/Pictures/wallpapers/glados.jpg & feh --bg-scale $HOME/Pictures/wallpapers/glados.jpg &
export DISPLAY=:0
export XAUTHORITY=/home/imp/.Xauthority
xrandr --output DP-2-1 --off
sleep 2
xrandr \
--output eDP-1 \
--mode 1920x1080 \
--rate 60 \
--pos 0x0 \
--primary \
--output DP-2-1 \
--mode 1920x1080 \
--rate 60 \
--pos 0x0 \
--same-as eDP-1
xset dpms force on
exec dwm exec dwm
systemctl --user restart wireplumber pipewire pipewire-pulse; pkill -RTMIN+2 dwmblocks systemctl --user restart wireplumber pipewire pipewire-pulse; pkill -RTMIN+2 dwmblocks
+7 -1
View File
@@ -17,4 +17,10 @@ install_module slock
install_module st install_module st
echo "linking .xinitrc into ~/" echo "linking .xinitrc into ~/"
ln -s ./.xinitrc ~/.xinitrc ln -sf $PWD/.xinitrc ~/.xinitrc
echo "linking .xbindkeysrc into ~/"
ln -sf $PWD/.xbindkeysrc ~/.xbindkeysrc
echo "linking .bashrc into ~/"
ln -sf $PWD/.bashrc ~/.bashrc