Icons and other fancy shit \o/
This commit is contained in:
@@ -48,7 +48,7 @@
|
||||
# Misc
|
||||
|
||||
always_run_script = true
|
||||
startup_notification = true
|
||||
startup_notification = false
|
||||
verbosity = mesg
|
||||
corner_radius = 2
|
||||
force_xinerama = false
|
||||
@@ -58,8 +58,8 @@
|
||||
|
||||
|
||||
[shortcuts]
|
||||
close = ctrl+space
|
||||
history = ctrl+shift+space
|
||||
close = ctrl+Escape
|
||||
history = ctrl+shift+Escape
|
||||
context = ctrl+shift+period
|
||||
|
||||
|
||||
|
||||
@@ -14,8 +14,8 @@ bindsym XF86AudioRaiseVolume exec --no-startup-id amixer set Master 1%+
|
||||
bindsym XF86AudioPlay exec --no-startup-id playerctl play-pause
|
||||
bindsym XF86AudioNext exec --no-startup-id playerctl next
|
||||
bindsym XF86AudioPrev exec --no-startup-id playerctl previous
|
||||
bindsym XF86MonBrightnessUp exec --no-startup-id light -A 10
|
||||
bindsym XF86MonBrightnessDown exec --no-startup-id light -U 10
|
||||
bindsym XF86MonBrightnessUp exec --no-startup-id light -A 5
|
||||
bindsym XF86MonBrightnessDown exec --no-startup-id light -U 5
|
||||
|
||||
# kill focused window
|
||||
bindsym $mod+Shift+BackSpace kill
|
||||
@@ -120,19 +120,20 @@ client.urgent $red $red $white $red $black
|
||||
# flaoting on start
|
||||
for_window [class="Nautilus"] floating enable
|
||||
for_window [class="Pavucontrol"] floating enable
|
||||
for_window [title="Event Tester"] floating enable
|
||||
|
||||
# border
|
||||
hide_edge_borders smart
|
||||
for_window [class="^.*"] border pixel 0
|
||||
|
||||
# bar
|
||||
exec --no-startup-id polybar -r bar
|
||||
exec_always --no-startup-id /home/marc/dots/scripts/polybar.sh
|
||||
|
||||
# gaps
|
||||
gaps inner 10
|
||||
|
||||
# wallpaper and screen
|
||||
exec --no-startup-id /home/marc/.local/bin/screen.sh
|
||||
# wallpaper
|
||||
exec_always --no-startup-id feh --bg-fill /home/marc/data/Seafile/images/wallpaper/life_and_death.png
|
||||
|
||||
# startup
|
||||
exec --no-startup-id nm-applet
|
||||
@@ -140,3 +141,6 @@ exec --no-startup-id keepassxc
|
||||
exec --no-startup-id seafile-applet
|
||||
exec --no-startup-id fcitx5
|
||||
exec --no-startup-id picom --backend glx --no-vsync
|
||||
exec --no-startup-id enact --watch --pos top
|
||||
|
||||
exec_always --no-startup-id notify-send -i ~/.emacs.d/dashboard.png "よろしくマルコさん!" "「i3」へようこそ。"
|
||||
|
||||
@@ -1,7 +1,16 @@
|
||||
[colors]
|
||||
white = #ffffff
|
||||
black = #5c6773
|
||||
green = #a6cc70
|
||||
red = #ff3333
|
||||
|
||||
[bar/bar]
|
||||
|
||||
font-0 = "JuliaMono:pixelsize=10;3"
|
||||
font-1 = "Noto Sans Mono CJK JP:pixelsize=10;1"
|
||||
font-2 = "FontAwesome:pixelsize=10;3"
|
||||
|
||||
monitor = ${env:MON}
|
||||
|
||||
scroll-up = i3wm-wsprev
|
||||
scroll-down = i3wm-wsnext
|
||||
@@ -11,8 +20,8 @@ fixed-center = true
|
||||
width = 100%
|
||||
height = 30
|
||||
|
||||
background = #ffffff
|
||||
foreground = #5c6773
|
||||
background = ${colors.white}
|
||||
foreground = ${colors.black}
|
||||
|
||||
bottom = false
|
||||
|
||||
@@ -30,12 +39,14 @@ modules-right = backlight pulseaudio battery
|
||||
|
||||
[module/i3]
|
||||
strip-wsnumbers = true
|
||||
pin-workspaces = true
|
||||
index-sort = true
|
||||
wrapping-scroll = false
|
||||
type = internal/i3
|
||||
format = <label-state> <label-mode>
|
||||
|
||||
label-focused = %index%
|
||||
label-focused-background = #a6cc70
|
||||
label-focused-background = ${colors.green}
|
||||
label-focused-padding = 1
|
||||
|
||||
label-unfocused = %index%
|
||||
@@ -45,26 +56,29 @@ label-visible = %index%
|
||||
label-visible-padding = 1
|
||||
|
||||
label-urgent = %index%
|
||||
label-urgent-overline = #ff3333
|
||||
label-urgent-overline = ${colors.red}
|
||||
label-urgent-padding = 1
|
||||
|
||||
[module/date]
|
||||
type = internal/date
|
||||
interval = 1.0
|
||||
date = %A, %B %d, %Y
|
||||
date = %a, %d %b
|
||||
|
||||
[module/time]
|
||||
type = internal/date
|
||||
interval = 1.0
|
||||
date = %H:%M:%S
|
||||
date = %I:%M %p
|
||||
|
||||
[module/pulseaudio]
|
||||
type = internal/pulseaudio
|
||||
sink = master
|
||||
use-ui-max = true
|
||||
interval = 5
|
||||
format-volume = 音 「<label-volume>」
|
||||
label-muted = muted
|
||||
|
||||
format-volume = <label-volume>
|
||||
|
||||
format-muted-foreground = ${colors.red}
|
||||
label-muted = Muted
|
||||
click-right = pavucontrol
|
||||
|
||||
[module/title]
|
||||
@@ -84,19 +98,42 @@ battery = BAT0
|
||||
adapter = ADP1
|
||||
time-format = %H:%M
|
||||
|
||||
label-charging = 電池 「charging %percentage%% - %time%」
|
||||
label-discharging = 電池 「%percentage%%」
|
||||
label-full = 電池 「full」
|
||||
# charging
|
||||
format-charging = <animation-charging> <label-charging>
|
||||
label-charging = %percentage% - %time%
|
||||
animation-charging-0 =
|
||||
animation-charging-1 =
|
||||
animation-charging-2 =
|
||||
animation-charging-3 =
|
||||
animation-charging-4 =
|
||||
animation-charging-framerate = 750
|
||||
|
||||
# discharging
|
||||
format-discharging = <ramp-capacity> <label-discharging>
|
||||
label-discharging = %percentage%
|
||||
ramp-capacity-0 =
|
||||
ramp-capacity-1 =
|
||||
ramp-capacity-2 =
|
||||
ramp-capacity-3 =
|
||||
ramp-capacity-4 =
|
||||
|
||||
# full
|
||||
label-full = 100
|
||||
|
||||
[module/backlight]
|
||||
type = internal/backlight
|
||||
card = amdgpu_bl0
|
||||
label = 電気 「%percentage%%」
|
||||
|
||||
format = <ramp> <label>
|
||||
label = %percentage%
|
||||
|
||||
ramp-0 =
|
||||
ramp-1 =
|
||||
|
||||
[module/polywins]
|
||||
type = custom/script
|
||||
exec = /home/marc/dots/files/polywins.sh 2>/dev/null
|
||||
exec = /home/marc/dots/scripts/polywins.sh 2>/dev/null
|
||||
format = <label>
|
||||
label = %output%
|
||||
label-padding = 1
|
||||
tail = true
|
||||
tail = true
|
||||
|
||||
@@ -6,6 +6,7 @@ xrdb -merge $HOME/.Xresources
|
||||
# map CAPS to ~
|
||||
setxkbmap -option caps:none
|
||||
xmodmap -e "keycode 66 = grave asciitilde"
|
||||
xmodmap -e "keycode 49 = Escape"
|
||||
setxkbmap eu
|
||||
|
||||
# energy options
|
||||
|
||||
@@ -1,242 +0,0 @@
|
||||
#!/bin/sh
|
||||
# POLYWINS
|
||||
|
||||
# SETTINGS {{{ ---
|
||||
|
||||
active_text_color="#5c6773"
|
||||
active_bg=
|
||||
active_underline="#a6cc70"
|
||||
|
||||
inactive_text_color="#5c6773"
|
||||
inactive_bg=
|
||||
inactive_underline=
|
||||
|
||||
separator="·"
|
||||
show="window_class" # options: window_title, window_class, window_classname
|
||||
forbidden_classes="Polybar Conky Gmrun"
|
||||
empty_desktop_message="Desktop"
|
||||
|
||||
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 "$@"
|
||||
Reference in New Issue
Block a user