Add sway
This commit is contained in:
13
README.org
13
README.org
@@ -7,10 +7,6 @@ It will link all dotfiles to their correct place.
|
||||
|
||||
* dotfiles
|
||||
All files in =files/= are currently being used and =stow='ed.
|
||||
Configuration for my =i3= are found in =tiling-wm=.
|
||||
|
||||
* theme
|
||||
Currently using =Flat Remix= theme
|
||||
|
||||
* fonts
|
||||
Should be installed manually or via system package manager.
|
||||
@@ -19,5 +15,14 @@ Fallsback are provided in =fallback-fonts/=
|
||||
+ Noto Sans CJK JP
|
||||
+ Noto Color Emoji
|
||||
|
||||
* notable deps
|
||||
- =ripgrep=
|
||||
- =ripgrep-all=
|
||||
- =wlogout=
|
||||
- =bemenu=
|
||||
- =wayshot=
|
||||
- =slurp=
|
||||
- =SwayNotificationCenter=
|
||||
|
||||
* legacy packages
|
||||
+ fcitx5 (=fcitx5 fcitx5-configtool fcitx5-gtk fcitx5-mozc fcitx5-qt=)
|
||||
|
||||
@@ -409,7 +409,6 @@ Sometimes I want to see all of my files.
|
||||
:straight t)
|
||||
#+end_src
|
||||
|
||||
*** Mini buffers
|
||||
*** ivy
|
||||
Ivy - a generic completion frontend for Emacs.
|
||||
Swiper - isearch with an overview, and more. Oh, man!
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
PATH=$PATH:$HOME/.dots/scripts:$HOME/.cargo/bin:$HOME/.ghcup/bin:$HOME/.local/bin:$HOME/.cabal/bin
|
||||
EDITOR=vim
|
||||
VISUAL=vim
|
||||
_JAVA_AWT_WM_NONREPARENTING=1
|
||||
SSH_AUTH_SOCK="${XDG_RUNTIME_DIR}/ssh-agent.socket
|
||||
7
files/sway/.config/sway/bar.sh
Executable file
7
files/sway/.config/sway/bar.sh
Executable file
@@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
date=$(date +'%A, %d.%m %R')
|
||||
battery=$(cat /sys/class/power_supply/BAT1/capacity)
|
||||
|
||||
echo $battery"% <> "$date" <>"
|
||||
|
||||
197
files/sway/.config/sway/config
Normal file
197
files/sway/.config/sway/config
Normal file
@@ -0,0 +1,197 @@
|
||||
# config for sway
|
||||
# Read `man 5 sway` for a complete reference.
|
||||
|
||||
# Font in sway
|
||||
font pango: JuliaMono 9
|
||||
|
||||
# Variables
|
||||
set $mod Mod4
|
||||
set $left h
|
||||
set $down j
|
||||
set $up k
|
||||
set $right l
|
||||
|
||||
# Color
|
||||
set $yellow #b58900
|
||||
set $orange #cb4b16
|
||||
set $red #dc322f
|
||||
set $magenta #d33682
|
||||
set $violet #6c71c4
|
||||
set $blue #268bd2
|
||||
set $cyan #2aa198
|
||||
set $green #859900
|
||||
|
||||
set $baseA3 #fdf6e3
|
||||
set $baseA2 #eee8d5
|
||||
set $baseA1 #93a1a1
|
||||
set $baseA0 #839496
|
||||
set $baseB0 #657b83
|
||||
set $baseB1 #586e75
|
||||
set $baseB2 #073642
|
||||
set $baseB3 #002b36
|
||||
set $custom #e1cab3
|
||||
|
||||
# clientclass border backgr. text indicator
|
||||
client.focused $green $green $baseB3 $blue
|
||||
client.focused_inactive $baseA2 $baseA2 $baseB2 $violet
|
||||
client.unfocused $baseA2 $baseA2 $baseB1 $baseA1
|
||||
client.urgent $yellow $yellow $baseB3 $orange
|
||||
|
||||
# Terminal
|
||||
set $term gnome-terminal
|
||||
|
||||
# Application Launcer
|
||||
set $menu dmenu_path | bemenu -l 5 --tf "#859900" --hf "#859900" --nb "#002b36" --hb "#002b36" --tb "#002b36" --fb "#002b36" --fn "JuliaMono 13" | xargs swaymsg exec --
|
||||
|
||||
# Output configuration
|
||||
set $laptop eDP-1
|
||||
|
||||
output * bg ~/images/wallpaper/wallpaper.png fill
|
||||
|
||||
bindswitch --reload --locked lid:on output $laptop disable
|
||||
bindswitch --reload --locked lid:off output $laptop enable
|
||||
|
||||
# Idle configuration
|
||||
# exec swayidle -w \
|
||||
# timeout 300 'swaylock -f -c 000000' \
|
||||
# timeout 600 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' \
|
||||
# before-sleep 'swaylock -f -c 000000'
|
||||
|
||||
# Input configuration
|
||||
input type:pointer {
|
||||
accel_profile "flat"
|
||||
}
|
||||
|
||||
input type:keyboard {
|
||||
xkb_layout eu
|
||||
xkb_options caps:escape
|
||||
}
|
||||
|
||||
# Key bindings
|
||||
# Basics:
|
||||
# Start a terminal
|
||||
bindsym $mod+Return exec $term
|
||||
|
||||
# Kill focused window
|
||||
bindsym $mod+Shift+Backspace kill
|
||||
|
||||
# Start your launcher
|
||||
bindsym $mod+d exec $menu
|
||||
|
||||
# Floating
|
||||
floating_modifier $mod normal
|
||||
|
||||
# Screenshot
|
||||
bindsym $mod+Shift+s exec wayshot -s "$(slurp -f '%x %y %w %h')" --stdout | wl-copy
|
||||
|
||||
# Reload the configuration file
|
||||
bindsym $mod+Shift+r reload
|
||||
|
||||
# Logout etc
|
||||
bindsym $mod+Backspace exec wlogout
|
||||
|
||||
# Show notifications
|
||||
bindsym $mod+v exec swaync-client -t -sw
|
||||
|
||||
# Brightness
|
||||
bindsym XF86MonBrightnessUp exec light -A 10
|
||||
bindsym XF86MonBrightnessDown exec light -U 10
|
||||
|
||||
# Audio
|
||||
bindsym XF86AudioPlay exec pactl set-sink-mute @DEFAULT_SINK@ toggle
|
||||
bindsym XF86AudioRaiseVolume exec pactl set-sink-volume @DEFAULT_SINK@ +5%
|
||||
bindsym XF86AudioLowerVolume exec pactl set-sink-volume @DEFAULT_SINK@ -5%
|
||||
|
||||
# Moving around:
|
||||
# Move your focus around
|
||||
bindsym $mod+$left focus left
|
||||
bindsym $mod+$down focus down
|
||||
bindsym $mod+$up focus up
|
||||
bindsym $mod+$right focus right
|
||||
# Or use $mod+[up|down|left|right]
|
||||
bindsym $mod+Left focus left
|
||||
bindsym $mod+Down focus down
|
||||
bindsym $mod+Up focus up
|
||||
bindsym $mod+Right focus right
|
||||
|
||||
# Move the focused window with the same, but add Shift
|
||||
bindsym $mod+Shift+$left move left
|
||||
bindsym $mod+Shift+$down move down
|
||||
bindsym $mod+Shift+$up move up
|
||||
bindsym $mod+Shift+$right move right
|
||||
# Ditto, with arrow keys
|
||||
bindsym $mod+Shift+Left move left
|
||||
bindsym $mod+Shift+Down move down
|
||||
bindsym $mod+Shift+Up move up
|
||||
bindsym $mod+Shift+Right move right
|
||||
|
||||
# Workspaces:
|
||||
# Switch to workspace
|
||||
bindsym $mod+1 workspace number 1
|
||||
bindsym $mod+2 workspace number 2
|
||||
bindsym $mod+3 workspace number 3
|
||||
bindsym $mod+4 workspace number 4
|
||||
bindsym $mod+5 workspace number 5
|
||||
bindsym $mod+6 workspace number 6
|
||||
bindsym $mod+7 workspace number 7
|
||||
bindsym $mod+8 workspace number 8
|
||||
bindsym $mod+9 workspace number 9
|
||||
bindsym $mod+0 workspace number 10
|
||||
# Move focused container to workspace
|
||||
bindsym $mod+Shift+1 move container to workspace number 1
|
||||
bindsym $mod+Shift+2 move container to workspace number 2
|
||||
bindsym $mod+Shift+3 move container to workspace number 3
|
||||
bindsym $mod+Shift+4 move container to workspace number 4
|
||||
bindsym $mod+Shift+5 move container to workspace number 5
|
||||
bindsym $mod+Shift+6 move container to workspace number 6
|
||||
bindsym $mod+Shift+7 move container to workspace number 7
|
||||
bindsym $mod+Shift+8 move container to workspace number 8
|
||||
bindsym $mod+Shift+9 move container to workspace number 9
|
||||
bindsym $mod+Shift+0 move container to workspace number 10
|
||||
# Note: workspaces can have any name you want, not just numbers.
|
||||
# We just use 1-10 as the default.
|
||||
|
||||
# Layout stuff:
|
||||
workspace_layout stacking
|
||||
|
||||
# Make the current focus fullscreen
|
||||
bindsym $mod+f fullscreen
|
||||
|
||||
# Toggle the current focus between tiling and floating mode
|
||||
bindsym $mod+Shift+space floating toggle
|
||||
|
||||
# Swap focus between the tiling area and the floating area
|
||||
bindsym $mod+space focus mode_toggle
|
||||
|
||||
for_window [title="shotman"] move position 30 30, floating enable
|
||||
|
||||
# Status Bar
|
||||
# man 5 sway-bar
|
||||
bar {
|
||||
position top
|
||||
|
||||
# When the status_command prints a new line to stdout, swaybar updates.
|
||||
# The default just shows the current date and time.
|
||||
status_command while ~/.config/sway/bar.sh; do sleep 1; done
|
||||
|
||||
colors {
|
||||
separator $blue
|
||||
background $baseA3
|
||||
statusline $baseB2
|
||||
|
||||
# workclass border backgr. text
|
||||
focused_workspace $green $green $baseB3
|
||||
active_workspace $baseA3 $baseA3 $baseB1
|
||||
inactive_workspace $baseA3 $baseA3 $baseB1
|
||||
urgent_workspace $orange $orange $baseB3
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
# Startup programs
|
||||
exec syncthing
|
||||
exec keepassxc
|
||||
exec swaync
|
||||
|
||||
# Include some defaults
|
||||
include /etc/sway/config.d/*
|
||||
@@ -1,10 +1,5 @@
|
||||
" __ _
|
||||
" / / (_)
|
||||
" / /_ ___ _ __ ___ _ __ ___
|
||||
" / /\ \ / / | '_ ` _ \| '__/ __|
|
||||
" _ / / \ V /| | | | | | | | | (__
|
||||
" (_)_/ \_/ |_|_| |_| |_|_| \___|
|
||||
"
|
||||
" ~/.vimrc
|
||||
"
|
||||
" ~ M. Thomas
|
||||
|
||||
let mapleader = "\<Space>"
|
||||
|
||||
@@ -1,9 +1,4 @@
|
||||
# __ _
|
||||
# / / | |
|
||||
# / /______| |__ _ __ ___
|
||||
# / /_ / __| '_ \| '__/ __|
|
||||
# _ / / / /\__ \ | | | | | (__
|
||||
# (_)_/ /___|___/_| |_|_| \___|
|
||||
# ~/.zshrc
|
||||
#
|
||||
# ~ M. Thomas
|
||||
|
||||
@@ -14,21 +9,17 @@ precmd_vcs_info() { vcs_info }
|
||||
precmd_functions+=( precmd_vcs_info )
|
||||
setopt prompt_subst
|
||||
|
||||
LN=$'\n'
|
||||
ICON="%(?.%{$fg[green]%}.%{$fg[red]%})λ"
|
||||
DIR="%{$fg[blue]%}%~"
|
||||
GIT="%{$fg[red]%}\$vcs_info_msg_0_"
|
||||
HOSTN="%{$fg[yellow]%}%m "
|
||||
|
||||
# if [[ -n "$SSH_CONNECTION" ]]; then
|
||||
PC="%{$fg[yellow]%}%m "
|
||||
# fi
|
||||
|
||||
export PROMPT="${PC}${DIR}${GIT} ${ICON}%{$reset_color%} "
|
||||
export PROMPT="${HOSTN}${DIR}${GIT} ${ICON}%{$reset_color%} "
|
||||
zstyle ':vcs_info:git:*' formats ' %b '
|
||||
|
||||
# show info in bar
|
||||
case $TERM in
|
||||
(*xterm* | rxvt | alacritty)
|
||||
|
||||
# This is seen when the shell prompts for input.
|
||||
function precmd {
|
||||
print -Pn "\e]0;%m: %(1j,%j job%(2j|s|) - ,)%~\a"
|
||||
@@ -52,7 +43,7 @@ alias cp='cp -i' # Ask before removal
|
||||
alias mv='mv -i' # Ask before removal
|
||||
|
||||
# tools
|
||||
ocr () {
|
||||
ocr() {
|
||||
if [ -z $1 ]; then
|
||||
echo "Please input a file."
|
||||
return
|
||||
@@ -60,11 +51,29 @@ ocr () {
|
||||
ocrmypdf -l deu+eng+jpn --output-type pdf $1 OCR_$1
|
||||
}
|
||||
|
||||
alias conservation='cat /sys/bus/platform/drivers/ideapad_acpi/VPC2004:00/conservation_mode'
|
||||
conservation() {
|
||||
location='/sys/bus/platform/drivers/ideapad_acpi/VPC2004:00/conservation_mode'
|
||||
if [ -z $1 ]; then
|
||||
cat $location
|
||||
elif [ $1 = '0' ] || [ $1 = '1' ]; then
|
||||
echo $1 | sudo tee $location
|
||||
fi
|
||||
}
|
||||
|
||||
powermode() {
|
||||
location='/sys/firmware/acpi/platform_profile'
|
||||
if [ -z $1 ]; then
|
||||
echo "Current:" $(cat $location)
|
||||
echo "Can be one of:" $(cat /sys/firmware/acpi/platform_profile_choices)
|
||||
elif [ $1 = 'low-power' ] || [ $1 = 'balanced' ] || [ $1 = 'performance' ]; then
|
||||
echo $1 | sudo tee $location
|
||||
fi
|
||||
}
|
||||
alias truecolor='curl -s https://raw.githubusercontent.com/JohnMorales/dotfiles/master/colors/24-bit-color.sh | bash'
|
||||
alias nssh='SSH_AUTH_SOCK= ssh'
|
||||
alias cpu='watch -n.1 "grep \"^[c]pu MHz\" /proc/cpuinfo"'
|
||||
#
|
||||
alias suspend='systemctl suspend'
|
||||
|
||||
# troll
|
||||
alias powershell='clear && PS1="windowsadm@powershell$ " bash'
|
||||
alias mucdai='rm -rf'
|
||||
@@ -162,22 +171,6 @@ bindkey '^G' "rga-fzf"
|
||||
## fzf Bindings in zsh (C-r and C-t)
|
||||
if [[ -x $(which fzf 2> /dev/null) ]]
|
||||
then
|
||||
# ____ ____
|
||||
# / __/___ / __/
|
||||
# / /_/_ / / /_
|
||||
# / __/ / /_/ __/
|
||||
# /_/ /___/_/ key-bindings.zsh
|
||||
#
|
||||
# - $FZF_TMUX_OPTS
|
||||
# - $FZF_CTRL_T_COMMAND
|
||||
# - $FZF_CTRL_T_OPTS
|
||||
# - $FZF_CTRL_R_OPTS
|
||||
# - $FZF_ALT_C_COMMAND
|
||||
# - $FZF_ALT_C_OPTS
|
||||
|
||||
# Key bindings
|
||||
# ------------
|
||||
|
||||
# The code at the top and the bottom of this file is the same as in completion.zsh.
|
||||
# Refer to that file for explanation.
|
||||
if 'zmodload' 'zsh/parameter' 2>'/dev/null' && (( ${+options} )); then
|
||||
@@ -202,7 +195,7 @@ then
|
||||
|
||||
[[ -o interactive ]] || return 0
|
||||
|
||||
# CTRL-T - Paste the selected file path(s) into the command line
|
||||
# CTRL-F - Paste the selected file path(s) into the command line
|
||||
__fsel() {
|
||||
local cmd="${FZF_CTRL_T_COMMAND:-"command find -L . -mindepth 1 \\( -path '*/\\.*' -o -fstype 'sysfs' -o -fstype 'devfs' -o -fstype 'devtmpfs' -o -fstype 'proc' \\) -prune \
|
||||
-o -type f -print \
|
||||
@@ -241,31 +234,6 @@ then
|
||||
}
|
||||
zle -N fzf-redraw-prompt
|
||||
|
||||
# ALT-C - cd into the selected directory
|
||||
fzf-cd-widget() {
|
||||
local cmd="${FZF_ALT_C_COMMAND:-"command find -L . -mindepth 1 \\( -path '*/\\.*' -o -fstype 'sysfs' -o -fstype 'devfs' -o -fstype 'devtmpfs' -o -fstype 'proc' \\) -prune \
|
||||
-o -type d -print 2> /dev/null | cut -b3-"}"
|
||||
setopt localoptions pipefail no_aliases 2> /dev/null
|
||||
local dir="$(eval "$cmd" | FZF_DEFAULT_OPTS="--height ${FZF_TMUX_HEIGHT:-40%} --reverse $FZF_DEFAULT_OPTS $FZF_ALT_C_OPTS" $(__fzfcmd) +m)"
|
||||
if [[ -z "$dir" ]]; then
|
||||
zle redisplay
|
||||
return 0
|
||||
fi
|
||||
if [ -z "$BUFFER" ]; then
|
||||
BUFFER="cd ${(q)dir}"
|
||||
zle accept-line
|
||||
else
|
||||
print -sr "cd ${(q)dir}"
|
||||
cd "$dir"
|
||||
fi
|
||||
local ret=$?
|
||||
unset dir # ensure this doesn't end up appearing in prompt expansion
|
||||
zle fzf-redraw-prompt
|
||||
return $ret
|
||||
}
|
||||
zle -N fzf-cd-widget
|
||||
bindkey '\ec' fzf-cd-widget
|
||||
|
||||
# CTRL-R - Paste the selected command from history into the command line
|
||||
fzf-history-widget() {
|
||||
local selected num
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
#!/bin/bash
|
||||
status=`cat /sys/bus/platform/drivers/ideapad_acpi/VPC2004:00/conservation_mode`
|
||||
|
||||
if [[ $status == 1 ]]; then
|
||||
notify-send -i /usr/share/icons/Papirus/48x48/devices/battery.svg "Conservation Mode" "Disabling conservation mode"
|
||||
echo 0 | sudo tee /sys/bus/platform/drivers/ideapad_acpi/VPC2004:00/conservation_mode >/dev/null
|
||||
|
||||
elif [[ $status == 0 ]]; then
|
||||
notify-send -i /usr/share/icons/Papirus/48x48/devices/battery.svg "Conservation Mode" "Enabling conservation mode"
|
||||
echo 1 | sudo tee /sys/bus/platform/drivers/ideapad_acpi/VPC2004:00/conservation_mode >/dev/null
|
||||
fi
|
||||
@@ -1,27 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
mon=$1
|
||||
|
||||
# when using a laptop, i want to easily switch screens
|
||||
if [ "$(hostname)" = "itomori" ]; then
|
||||
if [ ${mon} == "external" ]; then
|
||||
notify-send -i /usr/share/icons/Papirus/48x48/status/notification-display-brightness-high.svg "Screen update" "Switching to external monitor..."
|
||||
sleep 2
|
||||
# set layout for external monitor
|
||||
$HOME/.screenlayout/external.sh
|
||||
|
||||
# built in screen has higher dpi, so scale the bigger one
|
||||
xrandr --output DP-1 --scale 1.4
|
||||
xrandr --output DP-2 --scale 1.4
|
||||
xrandr --output DP-3 --scale 1.4
|
||||
xrandr --output DP-4 --scale 1.4
|
||||
elif [ ${mon} == "single" ]; then
|
||||
notify-send -i /usr/share/icons/Papirus/48x48/status/notification-display-brightness-high.svg "Screen update" "Switching to single monitor..."
|
||||
sleep 2
|
||||
# set layout for built in display
|
||||
xrandr --output eDP-1 --mode 2880x1800 --pos 0x0 --rotate normal --output DP-1 --off --output DP-2 --off --output DP-3 --off --output DP-4 --off
|
||||
fi
|
||||
fi
|
||||
|
||||
# reload wallpaper etc
|
||||
$HOME/.dots/scripts/reload_desktop.sh
|
||||
@@ -1,12 +0,0 @@
|
||||
if type "xrandr"; then
|
||||
for m in $(xrandr --query | grep " connected" | cut -d" " -f1); do
|
||||
# only show on internal display
|
||||
if [ "$m" == "eDP-1" ]; then
|
||||
pos="right"
|
||||
fi
|
||||
MON=$m TRAYPOS=$pos polybar --reload bar &
|
||||
pos=
|
||||
done
|
||||
else
|
||||
polybar --reload bar &
|
||||
fi
|
||||
@@ -1,242 +0,0 @@
|
||||
#!/bin/sh
|
||||
# POLYWINS
|
||||
|
||||
# SETTINGS {{{ ---
|
||||
|
||||
active_text_color="#ffffff"
|
||||
active_bg=
|
||||
active_underline=
|
||||
|
||||
inactive_text_color="#cccccc"
|
||||
inactive_bg=
|
||||
inactive_underline=
|
||||
|
||||
separator="·"
|
||||
show="window_class" # options: window_title, window_class, window_classname
|
||||
forbidden_classes="Polybar Conky Gmrun"
|
||||
empty_desktop_message="i3"
|
||||
|
||||
char_limit=15
|
||||
max_windows=15
|
||||
char_case="normal" # normal, upper, lower
|
||||
add_spaces="true"
|
||||
resize_increment=16
|
||||
wm_border_width=1 # setting this might be required for accurate resize position
|
||||
|
||||
# --- }}}
|
||||
|
||||
|
||||
main() {
|
||||
# If no argument passed...
|
||||
if [ -z "$2" ]; then
|
||||
# ...print new window list every time
|
||||
# the active window changes or
|
||||
# a window is opened or closed
|
||||
xprop -root -spy _NET_CLIENT_LIST _NET_ACTIVE_WINDOW |
|
||||
while IFS= read -r _; do
|
||||
generate_window_list
|
||||
done
|
||||
|
||||
# If arguments are passed, run requested on-click function
|
||||
else
|
||||
"$@"
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
|
||||
# ON-CLICK FUNCTIONS {{{ ---
|
||||
|
||||
raise_or_minimize() {
|
||||
if [ "$(get_active_wid)" = "$1" ]; then
|
||||
wmctrl -ir "$1" -b toggle,hidden
|
||||
else
|
||||
wmctrl -ir "$1" -b remove,hidden; wmctrl -ia "$1"
|
||||
fi
|
||||
}
|
||||
|
||||
close() {
|
||||
wmctrl -ic "$1"
|
||||
}
|
||||
|
||||
slop_resize() {
|
||||
wmctrl -ia "$1"
|
||||
wmctrl -ir "$1" -e "$(slop -f 0,%x,%y,%w,%h)"
|
||||
}
|
||||
|
||||
increment_size() {
|
||||
while IFS="[ .]" read -r wid ws wx wy ww wh _; do
|
||||
test "$wid" != "$1" && continue
|
||||
x=$(( wx - wm_border_width * 2 - resize_increment / 2 ))
|
||||
y=$(( wy - wm_border_width * 2 - resize_increment / 2 ))
|
||||
w=$(( ww + resize_increment ))
|
||||
h=$(( wh + resize_increment ))
|
||||
done <<-EOF
|
||||
$(wmctrl -lG)
|
||||
EOF
|
||||
|
||||
wmctrl -ir "$1" -e "0,$x,$y,$w,$h"
|
||||
}
|
||||
|
||||
decrement_size() {
|
||||
while IFS="[ .]" read -r wid ws wx wy ww wh _; do
|
||||
test "$wid" != "$1" && continue
|
||||
x=$(( wx - wm_border_width * 2 + resize_increment / 2 ))
|
||||
y=$(( wy - wm_border_width * 2 + resize_increment / 2 ))
|
||||
w=$(( ww - resize_increment ))
|
||||
h=$(( wh - resize_increment ))
|
||||
done <<-EOF
|
||||
$(wmctrl -lG)
|
||||
EOF
|
||||
|
||||
wmctrl -ir "$1" -e "0,$x,$y,$w,$h"
|
||||
}
|
||||
|
||||
# --- }}}
|
||||
|
||||
|
||||
|
||||
# WINDOW LIST SETUP {{{ ---
|
||||
|
||||
active_left="%{F$active_text_color}"
|
||||
active_right="%{F-}"
|
||||
inactive_left="%{F$inactive_text_color}"
|
||||
inactive_right="%{F-}"
|
||||
separator="%{F$inactive_text_color}$separator%{F-}"
|
||||
|
||||
if [ -n "$active_underline" ]; then
|
||||
active_left="${active_left}%{+u}%{u$active_underline}"
|
||||
active_right="%{-u}${active_right}"
|
||||
fi
|
||||
|
||||
if [ -n "$active_bg" ]; then
|
||||
active_left="${active_left}%{B$active_bg}"
|
||||
active_right="%{B-}${active_right}"
|
||||
fi
|
||||
|
||||
if [ -n "$inactive_underline" ]; then
|
||||
inactive_left="${inactive_left}%{+u}%{u$inactive_underline}"
|
||||
inactive_right="%{-u}${inactive_right}"
|
||||
fi
|
||||
|
||||
if [ -n "$inactive_bg" ]; then
|
||||
inactive_left="${inactive_left}%{B$inactive_bg}"
|
||||
inactive_right="%{B-}${inactive_right}"
|
||||
fi
|
||||
|
||||
get_active_wid() {
|
||||
active_wid=$(xprop -root _NET_ACTIVE_WINDOW)
|
||||
active_wid="${active_wid#*\# }"
|
||||
active_wid="${active_wid%,*}" # Necessary for XFCE
|
||||
while [ ${#active_wid} -lt 10 ]; do
|
||||
active_wid="0x0${active_wid#*x}"
|
||||
done
|
||||
echo "$active_wid"
|
||||
}
|
||||
|
||||
get_active_workspace() {
|
||||
wmctrl -d |
|
||||
while IFS="[ .]" read -r number active_status _; do
|
||||
test "$active_status" = "*" && echo "$number" && break
|
||||
done
|
||||
}
|
||||
|
||||
generate_window_list() {
|
||||
active_workspace=$(get_active_workspace)
|
||||
active_wid=$(get_active_wid)
|
||||
window_count=0
|
||||
on_click="$0"
|
||||
|
||||
# Format each window name one by one
|
||||
# Space and . are both used as IFS,
|
||||
# because classname and class are separated by '.'
|
||||
while IFS="[ .\.]" read -r wid ws cname cls host title; do
|
||||
# Don't show the window if on another workspace (-1 = sticky)
|
||||
if [ "$ws" != "$active_workspace" ] && [ "$ws" != "-1" ]; then
|
||||
continue
|
||||
fi
|
||||
|
||||
# Don't show the window if its class is forbidden
|
||||
case "$forbidden_classes" in
|
||||
*$cls*) continue ;;
|
||||
esac
|
||||
|
||||
# If max number of windows reached, just increment
|
||||
# the windows counter
|
||||
if [ "$window_count" -ge "$max_windows" ]; then
|
||||
window_count=$(( window_count + 1 ))
|
||||
continue
|
||||
fi
|
||||
|
||||
# Show the user-selected window property
|
||||
case "$show" in
|
||||
"window_class") w_name="$cls" ;;
|
||||
"window_classname") w_name="$cname" ;;
|
||||
"window_title") w_name="$title" ;;
|
||||
esac
|
||||
|
||||
# Use user-selected character case
|
||||
case "$char_case" in
|
||||
"lower") w_name=$(
|
||||
echo "$w_name" | tr '[:upper:]' '[:lower:]'
|
||||
) ;;
|
||||
"upper") w_name=$(
|
||||
echo "$w_name" | tr '[:lower:]' '[:upper:]'
|
||||
) ;;
|
||||
esac
|
||||
|
||||
# Truncate displayed name to user-selected limit
|
||||
if [ "${#w_name}" -gt "$char_limit" ]; then
|
||||
w_name="$(echo "$w_name" | cut -c1-$((char_limit-1)))…"
|
||||
fi
|
||||
|
||||
# Apply add-spaces setting
|
||||
if [ "$add_spaces" = "true" ]; then
|
||||
w_name=" $w_name "
|
||||
fi
|
||||
|
||||
# Add left and right formatting to displayed name
|
||||
if [ "$wid" = "$active_wid" ]; then
|
||||
w_name="${active_left}${w_name}${active_right}"
|
||||
else
|
||||
w_name="${inactive_left}${w_name}${inactive_right}"
|
||||
fi
|
||||
|
||||
# Add separator unless the window is first in list
|
||||
if [ "$window_count" != 0 ]; then
|
||||
printf "%s" "$separator"
|
||||
fi
|
||||
|
||||
# Add on-click action Polybar formatting
|
||||
printf "%s" "%{A1:$on_click raise_or_minimize $wid:}"
|
||||
printf "%s" "%{A2:$on_click close $wid:}"
|
||||
printf "%s" "%{A3:$on_click slop_resize $wid:}"
|
||||
printf "%s" "%{A4:$on_click increment_size $wid:}"
|
||||
printf "%s" "%{A5:$on_click decrement_size $wid:}"
|
||||
# Print the final window name
|
||||
printf "%s" "$w_name"
|
||||
printf "%s" "%{A}%{A}%{A}%{A}%{A}"
|
||||
|
||||
window_count=$(( window_count + 1 ))
|
||||
done <<-EOF
|
||||
$(wmctrl -lx)
|
||||
EOF
|
||||
|
||||
# After printing all the windows,
|
||||
# print number of hidden windows
|
||||
if [ "$window_count" -gt "$max_windows" ]; then
|
||||
printf "%s" "+$(( window_count - max_windows ))"
|
||||
fi
|
||||
|
||||
# Print empty desktop message if no windows are open
|
||||
if [ "$window_count" = 0 ]; then
|
||||
printf "%s" "$empty_desktop_message"
|
||||
fi
|
||||
|
||||
# Print newline
|
||||
echo ""
|
||||
}
|
||||
|
||||
# --- }}}
|
||||
|
||||
main "$@"
|
||||
@@ -1,142 +0,0 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
import sys
|
||||
import dbus
|
||||
import argparse
|
||||
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument(
|
||||
'-t',
|
||||
'--trunclen',
|
||||
type=int,
|
||||
metavar='trunclen'
|
||||
)
|
||||
parser.add_argument(
|
||||
'-f',
|
||||
'--format',
|
||||
type=str,
|
||||
metavar='custom format',
|
||||
dest='custom_format'
|
||||
)
|
||||
parser.add_argument(
|
||||
'-p',
|
||||
'--playpause',
|
||||
type=str,
|
||||
metavar='play-pause indicator',
|
||||
dest='play_pause'
|
||||
)
|
||||
parser.add_argument(
|
||||
'--font',
|
||||
type=str,
|
||||
metavar='the index of the font to use for the main label',
|
||||
dest='font'
|
||||
)
|
||||
parser.add_argument(
|
||||
'--playpause-font',
|
||||
type=str,
|
||||
metavar='the index of the font to use to display the playpause indicator',
|
||||
dest='play_pause_font'
|
||||
)
|
||||
parser.add_argument(
|
||||
'-q',
|
||||
'--quiet',
|
||||
action='store_true',
|
||||
help="if set, don't show any output when the current song is paused",
|
||||
dest='quiet',
|
||||
)
|
||||
|
||||
args = parser.parse_args()
|
||||
|
||||
|
||||
def fix_string(string):
|
||||
# corrects encoding for the python version used
|
||||
if sys.version_info.major == 3:
|
||||
return string
|
||||
else:
|
||||
return string.encode('utf-8')
|
||||
|
||||
|
||||
def truncate(name, trunclen):
|
||||
if len(name) > trunclen:
|
||||
name = name[:trunclen]
|
||||
name += '...'
|
||||
if ('(' in name) and (')' not in name):
|
||||
name += ')'
|
||||
return name
|
||||
|
||||
|
||||
|
||||
# Default parameters
|
||||
output = fix_string(u'{play_pause} {artist}: {song}')
|
||||
trunclen = 35
|
||||
play_pause = fix_string(u'\u25B6,\u23F8') # first character is play, second is paused
|
||||
|
||||
label_with_font = '%{{T{font}}}{label}%{{T-}}'
|
||||
font = args.font
|
||||
play_pause_font = args.play_pause_font
|
||||
|
||||
quiet = args.quiet
|
||||
|
||||
# parameters can be overwritten by args
|
||||
if args.trunclen is not None:
|
||||
trunclen = args.trunclen
|
||||
if args.custom_format is not None:
|
||||
output = args.custom_format
|
||||
if args.play_pause is not None:
|
||||
play_pause = args.play_pause
|
||||
|
||||
try:
|
||||
session_bus = dbus.SessionBus()
|
||||
spotify_bus = session_bus.get_object(
|
||||
'org.mpris.MediaPlayer2.spotify',
|
||||
'/org/mpris/MediaPlayer2'
|
||||
)
|
||||
|
||||
spotify_properties = dbus.Interface(
|
||||
spotify_bus,
|
||||
'org.freedesktop.DBus.Properties'
|
||||
)
|
||||
|
||||
metadata = spotify_properties.Get('org.mpris.MediaPlayer2.Player', 'Metadata')
|
||||
status = spotify_properties.Get('org.mpris.MediaPlayer2.Player', 'PlaybackStatus')
|
||||
|
||||
# Handle play/pause label
|
||||
|
||||
play_pause = play_pause.split(',')
|
||||
|
||||
if status == 'Playing':
|
||||
play_pause = play_pause[0]
|
||||
elif status == 'Paused':
|
||||
play_pause = play_pause[1]
|
||||
else:
|
||||
play_pause = str()
|
||||
|
||||
if play_pause_font:
|
||||
play_pause = label_with_font.format(font=play_pause_font, label=play_pause)
|
||||
|
||||
# Handle main label
|
||||
|
||||
artist = fix_string(metadata['xesam:artist'][0]) if metadata['xesam:artist'] else ''
|
||||
song = fix_string(metadata['xesam:title']) if metadata['xesam:title'] else ''
|
||||
album = fix_string(metadata['xesam:album']) if metadata['xesam:album'] else ''
|
||||
|
||||
if (quiet and status == 'Paused') or (not artist and not song and not album):
|
||||
print('')
|
||||
else:
|
||||
if font:
|
||||
artist = label_with_font.format(font=font, label=artist)
|
||||
song = label_with_font.format(font=font, label=song)
|
||||
album = label_with_font.format(font=font, label=album)
|
||||
|
||||
# Add 4 to trunclen to account for status symbol, spaces, and other padding characters
|
||||
print(truncate(output.format(artist=artist,
|
||||
song=song,
|
||||
play_pause=play_pause,
|
||||
album=album), trunclen + 4))
|
||||
|
||||
except Exception as e:
|
||||
if isinstance(e, dbus.exceptions.DBusException):
|
||||
print('')
|
||||
else:
|
||||
# i dont want long exceptions strings in my bar
|
||||
print('')
|
||||
@@ -1,64 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
|
||||
dir="$HOME/.config/rofi"
|
||||
rofi_command="rofi"
|
||||
lock_command="xlock -mode maze -font variable -messagefont variable -fpsfont variable -planfont variable"
|
||||
|
||||
# Options
|
||||
shutdown="shutdown"
|
||||
reboot="reboot"
|
||||
lock="lock"
|
||||
suspend="suspend"
|
||||
logout="logout"
|
||||
|
||||
# Confirmation
|
||||
confirm_exit() {
|
||||
rofi -dmenu\
|
||||
-i\
|
||||
-no-fixed-num-lines\
|
||||
-p "Are You Sure? : "\
|
||||
-theme $dir/confirm.rasi
|
||||
}
|
||||
|
||||
# Variable passed to rofi
|
||||
options="$lock\n$shutdown\n$reboot\n$suspend\n$logout"
|
||||
|
||||
chosen="$(echo -e "$options" | $rofi_command -p "🔌 Powermenu" -dmenu)"
|
||||
case $chosen in
|
||||
$shutdown)
|
||||
ans=$(confirm_exit &)
|
||||
if [[ $ans == "yes" || $ans == "YES" || $ans == "y" || $ans == "Y" ]]; then
|
||||
systemctl poweroff
|
||||
elif [[ $ans == "no" || $ans == "NO" || $ans == "n" || $ans == "N" ]]; then
|
||||
exit 0
|
||||
fi
|
||||
;;
|
||||
$reboot)
|
||||
ans=$(confirm_exit &)
|
||||
if [[ $ans == "yes" || $ans == "YES" || $ans == "y" || $ans == "Y" ]]; then
|
||||
systemctl reboot
|
||||
elif [[ $ans == "no" || $ans == "NO" || $ans == "n" || $ans == "N" ]]; then
|
||||
exit 0
|
||||
fi
|
||||
;;
|
||||
$lock)
|
||||
$lock_command
|
||||
;;
|
||||
$suspend)
|
||||
ans=$(confirm_exit &)
|
||||
if [[ $ans == "yes" || $ans == "YES" || $ans == "y" || $ans == "Y" ]]; then
|
||||
systemctl suspend
|
||||
elif [[ $ans == "no" || $ans == "NO" || $ans == "n" || $ans == "N" ]]; then
|
||||
exit 0
|
||||
fi
|
||||
;;
|
||||
$logout)
|
||||
ans=$(confirm_exit &)
|
||||
if [[ $ans == "yes" || $ans == "YES" || $ans == "y" || $ans == "Y" ]]; then
|
||||
i3-msg exit
|
||||
elif [[ $ans == "no" || $ans == "NO" || $ans == "n" || $ans == "N" ]]; then
|
||||
exit 0
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
@@ -1,18 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
# dunst
|
||||
systemctl restart --user dunst
|
||||
|
||||
# bar
|
||||
killall -q polybar
|
||||
while pgrep -u $UID -x polybar > /dev/null; do sleep 1; done
|
||||
$HOME/.dots/scripts/polybar/polybar.sh
|
||||
|
||||
# wallpaper
|
||||
feh --bg-fill $HOME/data/Seafile/images/wallpaper/wallpaper.png
|
||||
|
||||
# for some reason xmodmap and xset settings reset sometimes
|
||||
source $HOME/.profile
|
||||
|
||||
# notification
|
||||
notify-send -i /usr/share/icons/Papirus/48x48/status/state_running.svg "i3wm" "Reloaded desktop"
|
||||
@@ -1,102 +0,0 @@
|
||||
# __ _ _ _ _
|
||||
# / /_ _| | __ _ ___ _ __(_) |_| |_ _ _
|
||||
# / / _` | |/ _` |/ __| '__| | __| __| | | |
|
||||
# _ / / (_| | | (_| | (__| | | | |_| |_| |_| |
|
||||
# (_)_/ \__,_|_|\__,_|\___|_| |_|\__|\__|\__, |
|
||||
# |___/
|
||||
#
|
||||
# ~ M. Thomas
|
||||
|
||||
env:
|
||||
TERM: alacritty
|
||||
|
||||
window:
|
||||
title: alacritty
|
||||
dynamic_title: true
|
||||
padding:
|
||||
x: 20
|
||||
y: 20
|
||||
dynamic_padding: false
|
||||
|
||||
font:
|
||||
size: 10
|
||||
normal:
|
||||
family: JuliaMono
|
||||
style: Regular
|
||||
|
||||
# # Ayu light
|
||||
# colors:
|
||||
# primary:
|
||||
# background: '#ffffff'
|
||||
# foreground: '#5c6773'
|
||||
#
|
||||
# normal:
|
||||
# black: '#000000'
|
||||
# red: '#FF3333'
|
||||
# green: '#A6CC70'
|
||||
# yellow: '#e7c547'
|
||||
# blue: '#55b4d4'
|
||||
# magenta: '#A37ACC'
|
||||
# cyan: '#95E6CB'
|
||||
# white: '#C7C7C7'
|
||||
#
|
||||
# bright:
|
||||
# black: '#686868'
|
||||
# red: '#F27983'
|
||||
# green: '#BAE67E'
|
||||
# yellow: '#FFCC66'
|
||||
# blue: '#5CCFE6'
|
||||
# magenta: '#D4BFFF'
|
||||
# cyan: '#95E6CB'
|
||||
# white: '#FFFFFF'
|
||||
|
||||
colors:
|
||||
primary:
|
||||
background: '0xfdf6e3'
|
||||
foreground: '0x586e75'
|
||||
|
||||
normal:
|
||||
black: '0x073642'
|
||||
red: '0xdc322f'
|
||||
green: '0x859900'
|
||||
yellow: '0xb58900'
|
||||
blue: '0x268bd2'
|
||||
magenta: '0xd33682'
|
||||
cyan: '0x2aa198'
|
||||
white: '0xeee8d5'
|
||||
|
||||
bright:
|
||||
black: '0x002b36'
|
||||
red: '0xcb4b16'
|
||||
green: '0x586e75'
|
||||
yellow: '0x657b83'
|
||||
blue: '0x839496'
|
||||
magenta: '0x6c71c4'
|
||||
cyan: '0x93a1a1'
|
||||
white: '0xfdf6e3'
|
||||
|
||||
background_opacity: 1
|
||||
|
||||
selection:
|
||||
save_to_clipboard: true
|
||||
|
||||
cursor:
|
||||
# Values for `style`:
|
||||
# - ▇ Block
|
||||
# - _ Underline
|
||||
# - | Beam
|
||||
style: Block
|
||||
|
||||
unfocused_hollow: true
|
||||
|
||||
live_config_reload: true
|
||||
|
||||
mouse:
|
||||
hide_when_typing: true
|
||||
|
||||
key_bindings:
|
||||
- { key: V, mods: Control|Shift, action: Paste }
|
||||
- { key: C, mods: Control|Shift, action: Copy }
|
||||
- { key: Key0, mods: Control, action: ResetFontSize }
|
||||
- { key: Equals, mods: Control, action: IncreaseFontSize }
|
||||
- { key: Minus, mods: Control, action: DecreaseFontSize }
|
||||
@@ -1,72 +0,0 @@
|
||||
[global]
|
||||
|
||||
# Window
|
||||
|
||||
monitor = 0
|
||||
follow = mouse
|
||||
width = 400
|
||||
origin = "top-center"
|
||||
offset = "0x55"
|
||||
indicate_hidden = yes
|
||||
shrink = no
|
||||
separator_height = 1
|
||||
transparency = 0
|
||||
padding = 10
|
||||
horizontal_padding = 10
|
||||
frame_width = 2
|
||||
frame_color = "#eeeeee"
|
||||
separator_color = frame
|
||||
sort = yes
|
||||
idle_threshold = 120
|
||||
|
||||
# Text
|
||||
|
||||
font = Roboto 13
|
||||
line_height = 04
|
||||
markup = full
|
||||
format = "<span><b>%s %p</b></span>\n%b"
|
||||
alignment = left
|
||||
show_age_threshold = 60
|
||||
word_wrap = yes
|
||||
ellipsize = middle
|
||||
ignore_newline = no
|
||||
stack_duplicates = true
|
||||
hide_duplicate_count = false
|
||||
show_indicators = yes
|
||||
|
||||
# Icons
|
||||
|
||||
icon_position = left
|
||||
min_icon_size = 16
|
||||
max_icon_size = 48
|
||||
icon_path = /usr/share/icons/Papirus/48x48/status/:/usr/share/icons/Papirus/48x48/devices/:/usr/share/icons/Papirus/48x48/apps/
|
||||
|
||||
# History
|
||||
|
||||
sticky_history = yes
|
||||
history_length = 20
|
||||
|
||||
# Misc
|
||||
|
||||
always_run_script = true
|
||||
corner_radius = 10
|
||||
force_xinerama = false
|
||||
mouse_left_click = do_action
|
||||
mouse_middle_click = close_all
|
||||
mouse_right_click = close_current
|
||||
|
||||
|
||||
[urgency_low]
|
||||
background="#222222"
|
||||
foreground="#ffffff"
|
||||
timeout = 5
|
||||
|
||||
[urgency_normal]
|
||||
background="#222222"
|
||||
foreground="#ffffff"
|
||||
timeout = 5
|
||||
|
||||
[urgency_critical]
|
||||
background="#222222"
|
||||
foreground="#ffffff"
|
||||
timeout = 0
|
||||
@@ -1,162 +0,0 @@
|
||||
set $mod Mod4
|
||||
font pango:Roboto 10
|
||||
floating_modifier $mod
|
||||
|
||||
# bindings idea: mod + KEY = open sth mod + shift = move sth mod + ctrl = manipulate display
|
||||
|
||||
# applications
|
||||
bindsym $mod+Return exec --no-startup-id alacritty
|
||||
bindsym $mod+Shift+s exec --no-startup-id flameshot gui
|
||||
bindsym XF86Calculator exec --no-startup-id emacs
|
||||
|
||||
# rofi
|
||||
bindsym $mod+d exec --no-startup-id rofi -show drun
|
||||
bindsym $mod+s exec --no-startup-id rofi -show window # 's'witch window
|
||||
bindsym $mod+a exec --no-startup-id rofi -show filebrowser
|
||||
|
||||
# audio and brightness
|
||||
bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle; exec --no-startup-id notify-send -i /usr/share/icons/Papirus/48x48/devices/audio-input-microphone.svg -u critical "Audio" "Mic Mute toggled"
|
||||
bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle
|
||||
bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -5%
|
||||
bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +5%
|
||||
bindsym XF86AudioPlay exec --no-startup-id playerctl -p spotify play-pause
|
||||
bindsym XF86AudioNext exec --no-startup-id playerctl -p spotify next
|
||||
bindsym XF86AudioPrev exec --no-startup-id playerctl -p spotify previous
|
||||
bindsym XF86MonBrightnessUp exec --no-startup-id light -A 5
|
||||
bindsym XF86MonBrightnessDown exec --no-startup-id light -U 5
|
||||
|
||||
# notifications
|
||||
bindsym Ctrl+space exec --no-startup-id dunstctl close
|
||||
bindsym Ctrl+Shift+space exec --no-startup-id dunstctl history-pop
|
||||
|
||||
# kill focused window
|
||||
bindsym $mod+Shift+BackSpace kill
|
||||
|
||||
# lock etc
|
||||
bindsym $mod+Control+BackSpace exec --no-startup-id ~/dots/scripts/powermenu.sh
|
||||
|
||||
# change monitor layout
|
||||
bindsym $mod+Control+e exec --no-startup-id ~/dots/scripts/laptop/monitor.sh external
|
||||
bindsym $mod+Control+s exec --no-startup-id ~/dots/scripts/laptop/monitor.sh single
|
||||
|
||||
# change focus
|
||||
bindsym $mod+h focus left
|
||||
bindsym $mod+j focus down
|
||||
bindsym $mod+k focus up
|
||||
bindsym $mod+l focus right
|
||||
|
||||
# move focused window
|
||||
bindsym $mod+Shift+h move left
|
||||
bindsym $mod+Shift+j move down
|
||||
bindsym $mod+Shift+k move up
|
||||
bindsym $mod+Shift+l move right
|
||||
|
||||
# split in horizontal orientation
|
||||
# bindsym $mod+v split h
|
||||
|
||||
# split in vertical orientation
|
||||
# bindsym $mod+s split v
|
||||
|
||||
# enable stacked
|
||||
# bindsym $mod+a layout stacking
|
||||
|
||||
# enter fullscreen mode for the focused container
|
||||
bindsym $mod+f fullscreen toggle
|
||||
|
||||
# toggle tiling / floating
|
||||
bindsym $mod+Shift+space floating toggle
|
||||
|
||||
# workspace layout
|
||||
workspace_layout stacked
|
||||
|
||||
# workspaces
|
||||
set $ws1 "1"
|
||||
set $ws2 "2"
|
||||
set $ws3 "3"
|
||||
set $ws4 "4"
|
||||
set $ws5 "5"
|
||||
set $ws6 "6"
|
||||
set $ws7 "7"
|
||||
set $ws8 "8"
|
||||
set $ws9 "9"
|
||||
set $ws10 "10"
|
||||
|
||||
# switch to workspace
|
||||
bindsym $mod+1 workspace $ws1
|
||||
bindsym $mod+2 workspace $ws2
|
||||
bindsym $mod+3 workspace $ws3
|
||||
bindsym $mod+4 workspace $ws4
|
||||
bindsym $mod+5 workspace $ws5
|
||||
bindsym $mod+6 workspace $ws6
|
||||
bindsym $mod+7 workspace $ws7
|
||||
bindsym $mod+8 workspace $ws8
|
||||
bindsym $mod+9 workspace $ws9
|
||||
bindsym $mod+0 workspace $ws10
|
||||
|
||||
# move focused container to workspace
|
||||
bindsym $mod+Shift+1 move container to workspace $ws1
|
||||
bindsym $mod+Shift+2 move container to workspace $ws2
|
||||
bindsym $mod+Shift+3 move container to workspace $ws3
|
||||
bindsym $mod+Shift+4 move container to workspace $ws4
|
||||
bindsym $mod+Shift+5 move container to workspace $ws5
|
||||
bindsym $mod+Shift+6 move container to workspace $ws6
|
||||
bindsym $mod+Shift+7 move container to workspace $ws7
|
||||
bindsym $mod+Shift+8 move container to workspace $ws8
|
||||
bindsym $mod+Shift+9 move container to workspace $ws9
|
||||
bindsym $mod+Shift+0 move container to workspace $ws10
|
||||
|
||||
bindsym $mod+Left workspace prev
|
||||
bindsym $mod+Right workspace next
|
||||
|
||||
bindsym $mod+Ctrl+h move workspace to output left
|
||||
bindsym $mod+Ctrl+l move workspace to output right
|
||||
|
||||
# reload the configuration file
|
||||
bindsym $mod+Shift+c reload; exec --no-startup-id notify-send 'i3wm' 'Reloaded i3 configuration'
|
||||
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
|
||||
bindsym $mod+Shift+r restart
|
||||
|
||||
# titlebar
|
||||
title_align center
|
||||
|
||||
# colors
|
||||
set $white "#ffffff"
|
||||
set $fg "#5c6773"
|
||||
set $black "#222222"
|
||||
set $grey "#eeeeee"
|
||||
set $red "#ff3333"
|
||||
|
||||
# class border backgr. text indicator child_border
|
||||
client.focused $black $black $white $grey $grey
|
||||
client.focused_inactive $grey $grey $fg $grey $grey
|
||||
client.unfocused $grey $grey $fg $grey $grey
|
||||
client.urgent $red $red $white $red $grey
|
||||
|
||||
# floating on start
|
||||
for_window [title="Event Tester"] floating enable
|
||||
for_window [class="flameshot"] floating enable
|
||||
|
||||
# auto assign
|
||||
for_window [class="Firefox"] move to workspace $ws2
|
||||
for_window [class="discord"] move to workspace $ws3
|
||||
for_window [class="TelegramDesktop"] move to workspace $ws3
|
||||
for_window [class="Spotify"] move to workspace $ws4
|
||||
for_window [class="Thunderbird"] move to workspace $ws9
|
||||
|
||||
# borders
|
||||
smart_borders on
|
||||
|
||||
# gaps
|
||||
gaps inner 0
|
||||
|
||||
# desktop (wallpaper, bar, ...)
|
||||
exec_always --no-startup-id ~/dots/scripts/reload_desktop.sh
|
||||
|
||||
# startup
|
||||
exec --no-startup-id nm-applet
|
||||
exec --no-startup-id pasystray
|
||||
exec --no-startup-id keepassxc
|
||||
exec --no-startup-id seafile-applet
|
||||
exec --no-startup-id fcitx5
|
||||
exec --no-startup-id libinput-gestures-setup start
|
||||
exec --no-startup-id redshift-gtk -l 48.13333:11.56667
|
||||
@@ -1,7 +0,0 @@
|
||||
gesture: swipe left 3 xdotool key super+Left
|
||||
gesture: swipe right 3 xdotool key super+Right
|
||||
gesture: swipe up 3 xdotool key super+f
|
||||
gesture: swipe down 3 xdotool key super+f
|
||||
|
||||
gesture: swipe left 4 xdotool key alt+Left
|
||||
gesture: swipe right 4 xdotool key alt+Right
|
||||
@@ -1,206 +0,0 @@
|
||||
[colors]
|
||||
white = #ffffff
|
||||
black = #222222
|
||||
green = #a6cc70
|
||||
red = #ff3333
|
||||
yellow = #e7c547
|
||||
|
||||
[bar/bar]
|
||||
|
||||
font-0 = "Roboto:pixelsize=10:weight=bold;4"
|
||||
font-1 = "Noto Sans Mono CJK JP:pixelsize=10:weight=bold;3"
|
||||
font-2 = "FontAwesome:pixelsize=10;4"
|
||||
|
||||
monitor = ${env:MON}
|
||||
|
||||
scroll-up = i3wm-wsprev
|
||||
scroll-down = i3wm-wsnext
|
||||
|
||||
fixed-center = true
|
||||
|
||||
width = 100%
|
||||
height = 50px
|
||||
|
||||
dpi = ${xrdb:Xft.dpi:-1}
|
||||
|
||||
background = ${colors.black}
|
||||
foreground = ${colors.white}
|
||||
|
||||
bottom = false
|
||||
|
||||
screenchange-reload = true
|
||||
|
||||
tray-position = ${env:TRAYPOS:none}
|
||||
tray-scale = 1.0
|
||||
tray-maxsize = 25
|
||||
|
||||
line-size = 4
|
||||
|
||||
# keep these two the same
|
||||
padding = 3
|
||||
module-margin = 3
|
||||
|
||||
modules-left = logo i3 polywins
|
||||
modules-center = date
|
||||
modules-right = spotify backlight conservation battery
|
||||
|
||||
[module/i3]
|
||||
strip-wsnumbers = true
|
||||
pin-workspaces = true
|
||||
index-sort = true
|
||||
wrapping-scroll = false
|
||||
type = internal/i3
|
||||
format = <label-state> <label-mode>
|
||||
|
||||
ws-icon-0 = 1;一
|
||||
ws-icon-1 = 2;二
|
||||
ws-icon-2 = 3;三
|
||||
ws-icon-3 = 4;四
|
||||
ws-icon-4 = 5;五
|
||||
ws-icon-5 = 6;六
|
||||
ws-icon-6 = 7;七
|
||||
ws-icon-7 = 8;八
|
||||
ws-icon-8 = 9;九
|
||||
ws-icon-9 = 10;十
|
||||
|
||||
label-focused = %icon%
|
||||
label-focused-padding = 2
|
||||
label-focused-overline = ${colors.green}
|
||||
|
||||
label-unfocused = %icon%
|
||||
label-unfocused-padding = 2
|
||||
|
||||
label-visible = %icon%
|
||||
label-visible-padding = 2
|
||||
|
||||
label-urgent = %icon%
|
||||
label-urgent-overline = ${colors.red}
|
||||
label-urgent-padding = 2
|
||||
|
||||
[module/date]
|
||||
type = internal/date
|
||||
interval = 1.0
|
||||
date = %a, %d %b
|
||||
time = %H:%M
|
||||
label = %date% %time%
|
||||
|
||||
[module/pulseaudio]
|
||||
type = internal/pulseaudio
|
||||
sink = master
|
||||
use-ui-max = true
|
||||
interval = 5
|
||||
|
||||
format-volume = <label-volume>
|
||||
|
||||
format-muted-foreground = ${colors.red}
|
||||
label-muted = Muted
|
||||
click-right = pavucontrol
|
||||
|
||||
[module/title]
|
||||
type = internal/xwindow
|
||||
format-padding = 1
|
||||
label-maxlen = 100
|
||||
|
||||
[module/logo]
|
||||
type = custom/text
|
||||
content = "花"
|
||||
content-padding = 1
|
||||
|
||||
[module/battery]
|
||||
type = internal/battery
|
||||
battery = BAT1
|
||||
adapter = ADP1
|
||||
time-format = %H:%M
|
||||
|
||||
# charging
|
||||
format-charging = <ramp-capacity> <label-charging>
|
||||
label-charging = %percentage%%
|
||||
format-charging-foreground = ${colors.green}
|
||||
|
||||
# discharging
|
||||
format-discharging = <ramp-capacity> <label-discharging>
|
||||
label-discharging = %percentage%% - %time%
|
||||
format-discharging-foreground = ${colors.yellow}
|
||||
ramp-capacity-0 =
|
||||
ramp-capacity-1 =
|
||||
ramp-capacity-2 =
|
||||
ramp-capacity-3 =
|
||||
ramp-capacity-4 =
|
||||
|
||||
# full
|
||||
label-full = 100%
|
||||
|
||||
[module/conservation]
|
||||
type = custom/script
|
||||
exec = if [ "$(cat /sys/bus/platform/drivers/ideapad_acpi/VPC2004:00/conservation_mode)" == "1" ]; then echo "On"; else echo "Off"; fi
|
||||
click-left = alacritty --command ~/dots/scripts/laptop/conservation_mode.sh
|
||||
format = <label>
|
||||
label = %output%
|
||||
tail = true
|
||||
|
||||
[module/backlight]
|
||||
type = internal/backlight
|
||||
card = intel_backlight
|
||||
|
||||
format = <ramp> <label>
|
||||
label = %percentage%%
|
||||
|
||||
# ramp-0 =
|
||||
# ramp-1 =
|
||||
ramp-0 =
|
||||
|
||||
enable-scroll = true
|
||||
|
||||
[module/polywins]
|
||||
type = custom/script
|
||||
exec = ~/dots/scripts/polybar/polywins.sh 2>/dev/null
|
||||
format = <label>
|
||||
label = %output%
|
||||
tail = true
|
||||
|
||||
[module/spotify]
|
||||
type = custom/script
|
||||
interval = 1
|
||||
format = <label>
|
||||
exec = python3 ~/dots/scripts/polybar/spotify.py -f '{artist}: {song}' -t 50 -q
|
||||
|
||||
click-left = playerctl -p spotify play-pause
|
||||
click-right = playerctl -p spotify next
|
||||
click-middle = playerctl -p spotify previous
|
||||
|
||||
[module/sep]
|
||||
type = custom/text
|
||||
content = ""
|
||||
|
||||
[module/temp]
|
||||
type = internal/temperature
|
||||
interval = 5
|
||||
format = <label>
|
||||
|
||||
[module/cpu_temp]
|
||||
type = internal/temperature
|
||||
interval = 5
|
||||
# 10 is inside the cpu
|
||||
thermal-zone = 10
|
||||
format = <label>
|
||||
|
||||
[module/cpu]
|
||||
type = internal/cpu
|
||||
interval = 5
|
||||
label = %percentage%%
|
||||
format = <label>
|
||||
|
||||
[module/ram]
|
||||
type = internal/memory
|
||||
interval = 5
|
||||
label = %gb_used%
|
||||
format = <label>
|
||||
|
||||
[module/mic]
|
||||
type = custom/script
|
||||
exec = if [ "$(pactl get-source-mute @DEFAULT_SOURCE@)" == "Mute: no" ]; then echo "On"; else echo "Muted"; fi
|
||||
tail = true
|
||||
interval = 1
|
||||
format = <label>
|
||||
click-left = pactl set-source-mute @DEFAULT_SOURCE@ toggle && notify-send -i /usr/share/icons/Papirus/48x48/devices/audio-input-microphone.svg -u critical "Audio" "Mic Mute toggled"
|
||||
|
||||
@@ -1,62 +0,0 @@
|
||||
configuration {
|
||||
filebrowser {
|
||||
directory: "/home/marc";
|
||||
directories-first: true;
|
||||
}
|
||||
show-icons: true;
|
||||
display-drun: "🔎 Launch";
|
||||
display-filebrowser: "💾 Files";
|
||||
display-window: "🖥️ Switch to";
|
||||
location: 0;
|
||||
terminal: "alacritty";
|
||||
sidebar-mode: false;
|
||||
window-format: " {c}";
|
||||
}
|
||||
|
||||
@theme "Arc"
|
||||
|
||||
* {
|
||||
font: "Roboto 25";
|
||||
alternate-normal-background: @background;
|
||||
width: 30%;
|
||||
height: 40%;
|
||||
}
|
||||
|
||||
element-icon { size: 2ch ; }
|
||||
|
||||
element.selected.active {
|
||||
background-color: #A6CC70;
|
||||
text-color: rgba ( 255, 255, 255, 100 % );
|
||||
}
|
||||
|
||||
element.selected.normal {
|
||||
background-color: #A6CC70;
|
||||
text-color: rgba ( 255, 255, 255, 100 % );
|
||||
}
|
||||
|
||||
inputbar {
|
||||
children: [prompt,entry];
|
||||
}
|
||||
|
||||
prompt {
|
||||
padding: 16px;
|
||||
border: 0 1px 0 0;
|
||||
}
|
||||
|
||||
textbox {
|
||||
padding: 8px 16px;
|
||||
}
|
||||
|
||||
entry {
|
||||
padding: 16px;
|
||||
}
|
||||
|
||||
listview {
|
||||
cycle: false;
|
||||
margin: 0 0 -1px 0;
|
||||
scrollbar: false;
|
||||
}
|
||||
|
||||
element {
|
||||
padding: 16px;
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
window {
|
||||
width: 250;
|
||||
padding: 1%;
|
||||
location: center;
|
||||
y-offset: -2em;
|
||||
}
|
||||
@@ -1,69 +0,0 @@
|
||||
! Font
|
||||
XTerm.vt100.faceName: xft:JuliaMono:antialias=true
|
||||
XTerm.vt100.faceSize: 10
|
||||
|
||||
! Remove Scrollbar
|
||||
XTerm.vt100.scrollBar: false
|
||||
|
||||
! Resize Term Font
|
||||
XTerm.vt100.translations: #override \n\
|
||||
Ctrl <Key> minus: smaller-vt-font() \n\
|
||||
Ctrl <Key> plus: larger-vt-font()
|
||||
|
||||
! solarized light colors
|
||||
#define S_base03 #002b36
|
||||
#define S_base02 #073642
|
||||
#define S_base01 #586e75
|
||||
#define S_base00 #657b83
|
||||
#define S_base0 #839496
|
||||
#define S_base1 #93a1a1
|
||||
#define S_base2 #eee8d5
|
||||
#define S_base3 #fdf6e3
|
||||
|
||||
*background: S_base3
|
||||
*foreground: S_base00
|
||||
*fadeColor: S_base3
|
||||
*cursorColor: S_base01
|
||||
*pointerColorBackground:S_base1
|
||||
*pointerColorForeground:S_base01
|
||||
|
||||
#define S_yellow #b58900
|
||||
#define S_orange #cb4b16
|
||||
#define S_red #dc322f
|
||||
#define S_magenta #d33682
|
||||
#define S_violet #6c71c4
|
||||
#define S_blue #268bd2
|
||||
#define S_cyan #2aa198
|
||||
#define S_green #859900
|
||||
|
||||
!! black dark/light
|
||||
*color0: S_base02
|
||||
*color8: S_base03
|
||||
|
||||
!! red dark/light
|
||||
*color1: S_red
|
||||
*color9: S_orange
|
||||
|
||||
!! green dark/light
|
||||
*color2: S_green
|
||||
*color10: S_base01
|
||||
|
||||
!! yellow dark/light
|
||||
*color3: S_yellow
|
||||
*color11: S_base00
|
||||
|
||||
!! blue dark/light
|
||||
*color4: S_blue
|
||||
*color12: S_base0
|
||||
|
||||
!! magenta dark/light
|
||||
*color5: S_magenta
|
||||
*color13: S_violet
|
||||
|
||||
!! cyan dark/light
|
||||
*color6: S_cyan
|
||||
*color14: S_base1
|
||||
|
||||
!! white dark/light
|
||||
*color7: S_base2
|
||||
*color15: S_base3
|
||||
@@ -1,35 +0,0 @@
|
||||
# executed on login
|
||||
|
||||
# set xresources
|
||||
xrdb -merge $HOME/.Xresources
|
||||
|
||||
# keyboard
|
||||
setxkbmap eu
|
||||
# setxkbmap -option caps:none
|
||||
# xmodmap -e "keycode 66 = grave asciitilde"
|
||||
setxkbmap -option caps:swapescape
|
||||
|
||||
# energy options
|
||||
xset s off
|
||||
xset -dpms
|
||||
xset s noblank
|
||||
|
||||
# keyboard repeat
|
||||
xset r rate 300 50
|
||||
|
||||
# no mouse accel
|
||||
xset m 1
|
||||
|
||||
# path
|
||||
export PATH=$PATH:$HOME/.dots/scripts:$HOME/.cargo/bin:$HOME/.cabal/bin:$HOME/.ghcup/bin:$HOME/.local/bin
|
||||
|
||||
# editor
|
||||
export EDITOR="vim"
|
||||
export VISIAL=${EDITOR}
|
||||
|
||||
# fcitx
|
||||
export GTK_IM_MODULE='xim'
|
||||
export QT_IM_MODULE='ibus'
|
||||
export SDL_IM_MODULE='ibus'
|
||||
export XMODIFIERS='@im=ibus'
|
||||
export WINIT_UNIX_BACKEND=x11
|
||||
Reference in New Issue
Block a user