mirror of
https://github.com/agresdominik/dotfiles.git
synced 2026-04-21 18:05:50 +00:00
fixed some i3 config and zshrc bluetooth alias
This commit is contained in:
@@ -0,0 +1,9 @@
|
|||||||
|
Xft.dpi: 144
|
||||||
|
Xft.autohint: 0
|
||||||
|
Xft.lcdfilter: lcddefault
|
||||||
|
Xft.hintstyle: hintslight
|
||||||
|
Xft.hinting: 1
|
||||||
|
Xft.antialias: 1
|
||||||
|
Xft.rgba: rgb
|
||||||
|
Xcursor.theme: Adwaita
|
||||||
|
Xcursor.size: 24
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
i3
|
||||||
|
export GTK_THEME=Adwaita-dark
|
||||||
|
export QT_QPA_PLATFORMTHEME=gtk2
|
||||||
+11
-26
@@ -1,22 +1,22 @@
|
|||||||
# i3blocks configuration file
|
|
||||||
#
|
|
||||||
# The i3blocks man page describes the usage of the binary,
|
|
||||||
# and its website describes the configuration:
|
|
||||||
#
|
|
||||||
# https://vivien.github.io/i3blocks
|
|
||||||
|
|
||||||
|
|
||||||
# Global properties
|
# Global properties
|
||||||
separator=true
|
separator=true
|
||||||
separator_block_width=20
|
separator_block_width=20
|
||||||
|
|
||||||
[greetings]
|
[greetings]
|
||||||
color=#f5af19
|
color=#00b894
|
||||||
command=echo "$USER"
|
command=echo "[$USER@$HOSTNAME ~]"
|
||||||
interval=once
|
interval=once
|
||||||
|
|
||||||
|
[batteries_mouse]
|
||||||
|
command=/home/agres/.config/i3/scripts/mouse_battery.sh
|
||||||
|
interval=60
|
||||||
|
|
||||||
|
[batteries_keyboard]
|
||||||
|
command=/home/agres/.config/i3/scripts/keyboard_battery.sh
|
||||||
|
interval=60
|
||||||
|
|
||||||
[cpu]
|
[cpu]
|
||||||
command=mpstat 1 1 | awk '/Average/ {print 100 - $NF"%"}'
|
command=sh -c 'usage=$(mpstat 1 1 | awk "/Average/ {print 100 - \$NF}"); temp=$(sensors | awk "/^Tctl:/ {gsub(/[+°]C/, \"\", \$2); print \$2; exit}"); temp=${temp#+}; printf "%s%% %s°C\n" "$usage" "$temp"'
|
||||||
interval=5
|
interval=5
|
||||||
label=CPU:
|
label=CPU:
|
||||||
|
|
||||||
@@ -30,21 +30,6 @@ command=free -h | awk '/^Mem/ {print $3 "/" $2}'
|
|||||||
interval=10
|
interval=10
|
||||||
label=MEM:
|
label=MEM:
|
||||||
|
|
||||||
#[down]
|
|
||||||
#command=vnstat -tr 2 | tail -n 3 | awk '/rx/ {print $2}'
|
|
||||||
#interval=5
|
|
||||||
#label=DOWN:
|
|
||||||
|
|
||||||
#[up]
|
|
||||||
#command=vnstat -tr 2 | tail -n 3 | awk '/tx/ {print $2}'
|
|
||||||
#interval=5
|
|
||||||
#label=UP:
|
|
||||||
|
|
||||||
[time]
|
[time]
|
||||||
command=date '+%d.%m %H:%M:%S'
|
command=date '+%d.%m %H:%M:%S'
|
||||||
interval=1
|
interval=1
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,13 +1,10 @@
|
|||||||
set $mod Mod4
|
set $mod Mod4
|
||||||
|
|
||||||
#font pango:monospace 8
|
# Set i3 font
|
||||||
#font pango:DejaVu Sans Mono 8
|
|
||||||
#font pango:JetBrains Mono 8
|
|
||||||
font pango:MesloLGL Nerd Font Mono 8
|
font pango:MesloLGL Nerd Font Mono 8
|
||||||
|
|
||||||
|
# Start basic functionality apps
|
||||||
exec --no-startup-id dex --autostart --environment i3
|
exec --no-startup-id dex --autostart --environment i3
|
||||||
#exec --no-startup-id xss-lock --transfer-sleep-lock -- i3lock --nofork
|
|
||||||
exec --no-startup-id nm-applet
|
exec --no-startup-id nm-applet
|
||||||
exec --no-startup-id xautolock -time 30 -locker "/home/agres/.config/i3/scripts/lock.sh"
|
exec --no-startup-id xautolock -time 30 -locker "/home/agres/.config/i3/scripts/lock.sh"
|
||||||
|
|
||||||
@@ -20,8 +17,6 @@ bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOU
|
|||||||
bindsym --release $mod+Shift+S exec --no-startup-id sh -c '/home/agres/.config/i3/scripts/focused-monitor.sh | xclip -selection clipboard -t image/png'
|
bindsym --release $mod+Shift+S exec --no-startup-id sh -c '/home/agres/.config/i3/scripts/focused-monitor.sh | xclip -selection clipboard -t image/png'
|
||||||
bindsym --release $mod+Shift+Ctrl+S exec --no-startup-id sh -c '/home/agres/.config/i3/scripts/focused-monitor.sh ~/pictures/$(date +%Y-%m-%d_%H-%M-%S).png'
|
bindsym --release $mod+Shift+Ctrl+S exec --no-startup-id sh -c '/home/agres/.config/i3/scripts/focused-monitor.sh ~/pictures/$(date +%Y-%m-%d_%H-%M-%S).png'
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
floating_modifier $mod
|
floating_modifier $mod
|
||||||
tiling_drag modifier titlebar
|
tiling_drag modifier titlebar
|
||||||
|
|
||||||
@@ -32,10 +27,10 @@ bindsym $mod+Shift+q kill
|
|||||||
bindsym $mod+d exec --no-startup-id rofi -show run -theme solarized
|
bindsym $mod+d exec --no-startup-id rofi -show run -theme solarized
|
||||||
|
|
||||||
# change focus
|
# change focus
|
||||||
bindsym $mod+j focus left
|
bindsym $mod+j focus down
|
||||||
bindsym $mod+k focus down
|
bindsym $mod+k focus up
|
||||||
bindsym $mod+l focus up
|
bindsym $mod+l focus right
|
||||||
bindsym $mod+semicolon focus right
|
bindsym $mod+h focus left
|
||||||
|
|
||||||
bindsym $mod+Left focus left
|
bindsym $mod+Left focus left
|
||||||
bindsym $mod+Down focus down
|
bindsym $mod+Down focus down
|
||||||
@@ -43,10 +38,10 @@ bindsym $mod+Up focus up
|
|||||||
bindsym $mod+Right focus right
|
bindsym $mod+Right focus right
|
||||||
|
|
||||||
# move focused window
|
# move focused window
|
||||||
bindsym $mod+Shift+j move left
|
bindsym $mod+Shift+j move down
|
||||||
bindsym $mod+Shift+k move down
|
bindsym $mod+Shift+k move up
|
||||||
bindsym $mod+Shift+l move up
|
bindsym $mod+Shift+l move right
|
||||||
bindsym $mod+Shift+semicolon move right
|
bindsym $mod+Shift+h move left
|
||||||
|
|
||||||
bindsym $mod+Shift+Left move left
|
bindsym $mod+Shift+Left move left
|
||||||
bindsym $mod+Shift+Down move down
|
bindsym $mod+Shift+Down move down
|
||||||
@@ -54,8 +49,7 @@ bindsym $mod+Shift+Up move up
|
|||||||
bindsym $mod+Shift+Right move right
|
bindsym $mod+Shift+Right move right
|
||||||
|
|
||||||
# split in horizontal orientation
|
# split in horizontal orientation
|
||||||
bindsym $mod+h split h
|
bindsym $mod+b split h
|
||||||
|
|
||||||
# split in vertical orientation
|
# split in vertical orientation
|
||||||
bindsym $mod+v split v
|
bindsym $mod+v split v
|
||||||
|
|
||||||
@@ -63,8 +57,8 @@ bindsym $mod+v split v
|
|||||||
bindsym $mod+f fullscreen toggle
|
bindsym $mod+f fullscreen toggle
|
||||||
|
|
||||||
# change container layout (stacked, tabbed, toggle split)
|
# change container layout (stacked, tabbed, toggle split)
|
||||||
bindsym $mod+s layout stacking
|
#bindsym $mod+s layout stacking
|
||||||
bindsym $mod+w layout tabbed
|
#bindsym $mod+w layout tabbed
|
||||||
bindsym $mod+e layout toggle split
|
bindsym $mod+e layout toggle split
|
||||||
|
|
||||||
# toggle tiling / floating
|
# toggle tiling / floating
|
||||||
@@ -74,21 +68,20 @@ bindsym $mod+Shift+space floating toggle
|
|||||||
bindsym $mod+space focus mode_toggle
|
bindsym $mod+space focus mode_toggle
|
||||||
|
|
||||||
# focus the parent container
|
# focus the parent container
|
||||||
bindsym $mod+a focus parent
|
#bindsym $mod+a focus parent
|
||||||
|
|
||||||
# focus the child container
|
# focus the child container
|
||||||
#bindsym $mod+d focus child
|
#bindsym $mod+d focus child
|
||||||
|
|
||||||
# Define names for default workspaces for which we configure key bindings later on.
|
# Define names for default workspaces for which we configure key bindings later on.
|
||||||
# We use variables to avoid repeating the names in multiple places.
|
# We use variables to avoid repeating the names in multiple places.
|
||||||
set $ws1 "1"
|
set $ws1 "1:Code"
|
||||||
set $ws2 "2"
|
set $ws2 "2:Term"
|
||||||
set $ws3 "3"
|
set $ws3 "3"
|
||||||
set $ws4 "4"
|
set $ws4 "4"
|
||||||
set $ws5 "5"
|
set $ws5 "5:Web"
|
||||||
set $ws6 "6"
|
set $ws6 "6:Mail"
|
||||||
set $ws7 "7"
|
set $ws7 "7:Music"
|
||||||
set $ws8 "8"
|
set $ws8 "8:Chat"
|
||||||
set $ws9 "9"
|
set $ws9 "9"
|
||||||
set $ws10 "10"
|
set $ws10 "10"
|
||||||
|
|
||||||
@@ -147,16 +140,56 @@ mode "resize" {
|
|||||||
|
|
||||||
bindsym $mod+r mode "resize"
|
bindsym $mod+r mode "resize"
|
||||||
|
|
||||||
gaps inner 5
|
gaps inner 3
|
||||||
#gaps outer 2
|
gaps outer 0
|
||||||
|
|
||||||
# Start i3bar to display a workspace bar (plus the system information i3status
|
# Separate bars for dual screen setup
|
||||||
# finds out, if available)
|
|
||||||
bar {
|
bar {
|
||||||
|
output DisplayPort-0
|
||||||
status_command i3blocks
|
status_command i3blocks
|
||||||
position top
|
position top
|
||||||
|
tray_output none
|
||||||
|
workspace_buttons yes
|
||||||
|
colors {
|
||||||
|
background #000000
|
||||||
|
statusline #ffffff
|
||||||
|
separator #333333
|
||||||
|
|
||||||
|
focused_workspace #00675a #00675a #ffffff
|
||||||
|
active_workspace #1c1c1c #1c1c1c #cccccc
|
||||||
|
inactive_workspace #000000 #000000 #777777
|
||||||
|
urgent_workspace #870000 #870000 #ffffff
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bar {
|
||||||
|
output HDMI-A-0
|
||||||
|
status_command i3blocks
|
||||||
|
position top
|
||||||
|
tray_output none
|
||||||
|
workspace_buttons yes
|
||||||
|
colors {
|
||||||
|
background #000000
|
||||||
|
statusline #ffffff
|
||||||
|
separator #333333
|
||||||
|
|
||||||
|
focused_workspace #00675a #00675a #ffffff
|
||||||
|
active_workspace #1c1c1c #1c1c1c #cccccc
|
||||||
|
inactive_workspace #000000 #000000 #777777
|
||||||
|
urgent_workspace #870000 #870000 #ffffff
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# Hard defined workspace placement
|
||||||
|
workspace 1 output DisplayPort-0
|
||||||
|
workspace 2 output DisplayPort-0
|
||||||
|
workspace 3 output DisplayPort-0
|
||||||
|
workspace 4 output DisplayPort-0
|
||||||
|
workspace 5 output HDMI-A-0
|
||||||
|
workspace 6 output HDMI-A-0
|
||||||
|
workspace 7 output HDMI-A-0
|
||||||
|
workspace 8 output HDMI-A-1
|
||||||
|
|
||||||
# Load Xresources file
|
# Load Xresources file
|
||||||
exec --no-startup-id xrdb -merge ~/.Xresources
|
exec --no-startup-id xrdb -merge ~/.Xresources
|
||||||
# Keyboard to German
|
# Keyboard to German
|
||||||
@@ -172,8 +205,9 @@ exec --no-startup-id xset s 7200 7200
|
|||||||
exec --no-startup-id xset dpms 7200 7200 7200
|
exec --no-startup-id xset dpms 7200 7200 7200
|
||||||
|
|
||||||
# Window overlay theme
|
# Window overlay theme
|
||||||
client.focused #00b5af #00b5af #fdf6e3 #073642
|
client.focused #00b894 #00675a #ffffff #00b894 #00675a
|
||||||
client.focused_inactive #073642 #073642 #fdf6e3 #073642
|
client.focused_inactive #303030 #1c1c1c #cccccc #303030 #1c1c1c
|
||||||
client.unfocused #073642 #073642 #fdf6e3 #073642
|
client.unfocused #1c1c1c #000000 #999999 #1c1c1c #000000
|
||||||
|
client.urgent #ff5f5f #870000 #ffffff #ff5f5f #870000
|
||||||
|
client.placeholder #000000 #000000 #ffffff #000000 #000000
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,12 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
# ~/.config/i3/scripts/gpu_usage.sh
|
||||||
|
|
||||||
if [ -f /sys/module/amdgpu/drivers/pci:amdgpu/0000:2b:00.0/gpu_busy_percent ]; then
|
if command -v rocm-smi &>/dev/null; then
|
||||||
usage=$(awk '{print $1}' /sys/module/amdgpu/drivers/pci:amdgpu/0000:2b:00.0/gpu_busy_percent)
|
output=$(rocm-smi --showtemp --showuse)
|
||||||
echo "${usage}%"
|
temp=$(echo "$output" | awk -F': ' '/Sensor edge/ {print $3; exit}')
|
||||||
|
usage=$(echo "$output" | awk -F': ' '/GPU use/ {print $3; exit}')
|
||||||
|
echo "${usage}% ${temp}°C"
|
||||||
else
|
else
|
||||||
echo "N/A"
|
echo "N/A"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
KBD_PATH="/org/freedesktop/UPower/devices/keyboard_dev_D7_E8_29_FA_0F_CF"
|
KBD_PATH="/org/freedesktop/UPower/devices/keyboard_dev_D7_E8_29_FA_0F_D0"
|
||||||
|
|
||||||
if upower -i "$KBD_PATH" 2>/dev/null | grep -q "present:.*yes"; then
|
if upower -i "$KBD_PATH" 2>/dev/null | grep -q "present:.*yes"; then
|
||||||
perc=$(upower -i "$KBD_PATH" | awk '/percentage:/ {print $2}')
|
perc=$(upower -i "$KBD_PATH" | awk '/percentage:/ {print $2}')
|
||||||
|
|||||||
+77
@@ -0,0 +1,77 @@
|
|||||||
|
# Oh my zsh
|
||||||
|
export ZSH="$HOME/.oh-my-zsh"
|
||||||
|
ZSH_THEME="eastwood"
|
||||||
|
HIST_STAMPS="dd.mm.yyyy"
|
||||||
|
plugins=(git sudo)
|
||||||
|
source $ZSH/oh-my-zsh.sh
|
||||||
|
|
||||||
|
# -- Linux Specific --
|
||||||
|
|
||||||
|
if [[ -z $DISPLAY ]] && [[ $(tty) == /dev/tty1 ]]; then
|
||||||
|
startx
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# -- Local Setup ---
|
||||||
|
|
||||||
|
# Preferred editor for local and remote sessions
|
||||||
|
if [[ -n $SSH_CONNECTION ]]; then
|
||||||
|
export EDITOR='nvim'
|
||||||
|
else
|
||||||
|
export EDITOR='nvim'
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
# -- Env Paths ---
|
||||||
|
|
||||||
|
# go
|
||||||
|
#export PATH=/usr/local/go/bin:$PATH
|
||||||
|
|
||||||
|
# pyenv
|
||||||
|
#export PYENV_ROOT="$HOME/.pyenv"
|
||||||
|
#export PATH="$PYENV_ROOT/bin:$PATH"
|
||||||
|
#eval "$(pyenv init --path)"
|
||||||
|
#eval "$(pyenv init -)"
|
||||||
|
|
||||||
|
# pipx
|
||||||
|
#export PATH="$PATH:/Users/agres/.local/bin"
|
||||||
|
#export PATH="$HOME/.local/bin:$PATH"
|
||||||
|
# pipx Linux
|
||||||
|
export PATH="$HOME/.local/bin:$PATH"
|
||||||
|
|
||||||
|
|
||||||
|
# bun
|
||||||
|
#[ -s "/Users/agres/.bun/_bun" ] && source "/Users/agres/.bun/_bun"
|
||||||
|
#export BUN_INSTALL="$HOME/.bun"
|
||||||
|
#export PATH="$BUN_INSTALL/bin:$PATH"
|
||||||
|
|
||||||
|
# -- Customization --
|
||||||
|
|
||||||
|
# Alais: ls to run tree (without any flags)
|
||||||
|
unalias ls 2>/dev/null
|
||||||
|
ls() {
|
||||||
|
if [[ $# -eq 0 ]]; then
|
||||||
|
tree -L 1
|
||||||
|
else
|
||||||
|
command ls -G "$@"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# Alias: list all modified and new files in current directory
|
||||||
|
alias lsgit='git status --porcelain | cut -c 4- | xargs ls -l'
|
||||||
|
|
||||||
|
# Alias: wifi to print qr code in terminal from file (device adjustable)
|
||||||
|
alias wifi='cat /Users/agres/Projects/python_lang/wifi_qr/wifi_password.txt | qr --asci'
|
||||||
|
|
||||||
|
# Alias: connect and disconnect bluetooth headphones
|
||||||
|
alias airpods-connect='echo -e "connect 80:95:3A:DC:8E:41" | bluetoothctl >> /dev/null'
|
||||||
|
alias airpods-disconnect='echo -e "disconnect 80:95:3A:DC:8E:41" | bluetoothctl >> /dev/null'
|
||||||
|
alias airpods='echo -e "select 12:34:56:78:9A:BC\ninfo 80:95:3A:DC:8E:41" | bluetoothctl | grep "Connected: "'
|
||||||
|
|
||||||
|
# Alias: avoid nano
|
||||||
|
alias nano=nvim
|
||||||
|
|
||||||
|
# Alias quick mount network smdb drive
|
||||||
|
alias md0='sudo mount --mkdir -t cifs //192.168.0.200/MD0 /mnt/md0 -o username=agres'
|
||||||
|
|
||||||
Reference in New Issue
Block a user