Update
This commit is contained in:
@@ -1,3 +1,2 @@
|
|||||||
--enable-features=WebUIDarkMode,UseOzonePlatform
|
--enable-features=VaapiVideoDecoder,VaapiVideoEncoder,WebUIDarkMode
|
||||||
--ozone-platform=wayland
|
|
||||||
--force-dark-mode
|
--force-dark-mode
|
||||||
|
|||||||
@@ -261,7 +261,7 @@ font_family DejaVuSansMono
|
|||||||
|
|
||||||
#: Terminal bell {{{
|
#: Terminal bell {{{
|
||||||
|
|
||||||
# enable_audio_bell yes
|
enable_audio_bell no
|
||||||
|
|
||||||
#: Enable/disable the audio bell. Useful in environments that require
|
#: Enable/disable the audio bell. Useful in environments that require
|
||||||
#: silence.
|
#: silence.
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ ctrl+r cycle-values video-rotate 0 90 180 270
|
|||||||
ctrl+b cycle deband
|
ctrl+b cycle deband
|
||||||
b cycle-values scale "bilinear" "spline64"; cycle-values dscale "bilinear" "mitchell"; cycle-values cscale "bilinear" "sinc"
|
b cycle-values scale "bilinear" "spline64"; cycle-values dscale "bilinear" "mitchell"; cycle-values cscale "bilinear" "sinc"
|
||||||
ctrl+s sub-reload
|
ctrl+s sub-reload
|
||||||
|
ctrl+S cycle shuffle
|
||||||
S screenshot-to-file /tmp/mpv-screenshot.png ; run sh -c "cat /tmp/mpv-screenshot.png | wl-copy -t image/png"
|
S screenshot-to-file /tmp/mpv-screenshot.png ; run sh -c "cat /tmp/mpv-screenshot.png | wl-copy -t image/png"
|
||||||
|
|
||||||
x add sub-delay -0.04
|
x add sub-delay -0.04
|
||||||
|
|||||||
@@ -340,7 +340,7 @@ map i display_file
|
|||||||
map ? help
|
map ? help
|
||||||
map W display_log
|
map W display_log
|
||||||
map w taskview_open
|
map w taskview_open
|
||||||
map S shell $SHELL
|
map S shell zsh
|
||||||
|
|
||||||
map : console
|
map : console
|
||||||
map ; console
|
map ; console
|
||||||
|
|||||||
@@ -139,6 +139,8 @@ input "9653:84:Samsung_electronics_inc._Samsung_HID_Multi-Touch"\
|
|||||||
|
|
||||||
# Screenshot
|
# Screenshot
|
||||||
bindsym Print exec grim -g "$(slurp -d)" - | wl-copy -t image/png
|
bindsym Print exec grim -g "$(slurp -d)" - | wl-copy -t image/png
|
||||||
|
bindsym Ctrl+Print exec swaymsg -t get_tree | jq -r 'recurse(.nodes[], .floating_nodes[]) | select(.focused and .pid).rect | "\(.x),\(.y) \(.width)x\(.height)"' | grim -g - - | wl-copy -t image/png
|
||||||
|
bindsym Shift+Print exec grim -o $(swaymsg -t get_outputs | jq -r '.[] | select(.focused) | .name') - | wl-copy -t image/png
|
||||||
#
|
#
|
||||||
# Moving around:
|
# Moving around:
|
||||||
#
|
#
|
||||||
@@ -208,6 +210,9 @@ input "9653:84:Samsung_electronics_inc._Samsung_HID_Multi-Touch"\
|
|||||||
# Make the current focus fullscreen
|
# Make the current focus fullscreen
|
||||||
bindsym $mod+f fullscreen
|
bindsym $mod+f fullscreen
|
||||||
|
|
||||||
|
# Maximize current focus
|
||||||
|
bindsym $mod+m exec swaymsg floating true && swaymsg resize set $(swaymsg -t get_workspaces | jq -r '.[] | select(.focused) | .rect | "\(.width)px \(.height)px"')
|
||||||
|
|
||||||
# Toggle the current focus between tiling and floating mode
|
# Toggle the current focus between tiling and floating mode
|
||||||
bindsym $mod+Shift+space floating toggle
|
bindsym $mod+Shift+space floating toggle
|
||||||
|
|
||||||
@@ -262,7 +267,7 @@ bindsym Ctrl+Alt+l exec $srclocker
|
|||||||
bar {
|
bar {
|
||||||
position top
|
position top
|
||||||
pango_markup enabled
|
pango_markup enabled
|
||||||
font pango:DejaVu Sans Mono, FontAwesome 10
|
font pango:DejaVu Sans Mono, devicons, FontAwesome 10
|
||||||
|
|
||||||
# When the status_command prints a new line to stdout, swaybar updates.
|
# When the status_command prints a new line to stdout, swaybar updates.
|
||||||
# The default just shows the current date and time.
|
# The default just shows the current date and time.
|
||||||
@@ -289,28 +294,20 @@ bindsym Ctrl+m exec mpv "$(wl-paste -t text)"
|
|||||||
hide_edge_borders both
|
hide_edge_borders both
|
||||||
default_border none
|
default_border none
|
||||||
gaps inner 6
|
gaps inner 6
|
||||||
#smart_gaps on
|
|
||||||
|
|
||||||
include /etc/sway/config.d/*
|
include /etc/sway/config.d/*
|
||||||
|
|
||||||
# Assignments
|
# Assignments
|
||||||
assign [class="discord"] workspace 3
|
assign [class="discord"] workspace 3
|
||||||
assign [class="Spotify"] workspace 3
|
assign [class="Spotify"] workspace 3
|
||||||
#for_window [class="Spotify"] opacity 0.8
|
|
||||||
#for_window [class="Chromium"] opacity 0.9
|
|
||||||
|
|
||||||
exec redshift -O 4500 -m wayland
|
exec redshift -O 4500 -m wayland
|
||||||
exec megasync
|
|
||||||
exec nm-applet --indicator
|
|
||||||
|
|
||||||
#exec cadence
|
exec ~/.config/sway/workspace_rename.py > ~/.cache/workspace_rename.log 2> ~/.cache/workspace_rename_error.log
|
||||||
#exec ~/.local/start_jack.sh
|
|
||||||
|
|
||||||
exec ~/.config/sway/workspace_rename.py
|
|
||||||
|
|
||||||
for_window [class="Tor Browser"] floating enable
|
for_window [class="Tor Browser"] floating enable
|
||||||
|
|
||||||
for_window [app_id="kitty-scratch"] {
|
for_window [app_id="kitty-scratch|pavucontrol"] {
|
||||||
move to scratchpad
|
move to scratchpad
|
||||||
scratchpad show
|
scratchpad show
|
||||||
}
|
}
|
||||||
@@ -321,8 +318,6 @@ exec $term
|
|||||||
workspace 2 output eDP-1
|
workspace 2 output eDP-1
|
||||||
|
|
||||||
workspace 3 output eDP-1
|
workspace 3 output eDP-1
|
||||||
exec discord
|
|
||||||
exec spotify
|
|
||||||
|
|
||||||
workspace 4 output "Dell Inc. DELL U2410 F525M0A1082L"
|
workspace 4 output "Dell Inc. DELL U2410 F525M0A1082L"
|
||||||
|
|
||||||
@@ -337,3 +332,7 @@ workspace 8 output "Dell Inc. DELL U2717D JXRPT83GAHKS"
|
|||||||
workspace 9 output "Dell Inc. DELL U2717D JXRPT83GAHKS"
|
workspace 9 output "Dell Inc. DELL U2717D JXRPT83GAHKS"
|
||||||
|
|
||||||
exec xrdb -load ~/.Xresources
|
exec xrdb -load ~/.Xresources
|
||||||
|
|
||||||
|
exec autotiling
|
||||||
|
|
||||||
|
exec "systemctl --user import-environment; systemctl --user start sway-session.target"
|
||||||
|
|||||||
@@ -19,10 +19,9 @@ separator = "<span font='14'>\ue0b2</span>"
|
|||||||
[[block]]
|
[[block]]
|
||||||
block = "music"
|
block = "music"
|
||||||
player = "spotify"
|
player = "spotify"
|
||||||
buttons = ["play", "next"]
|
buttons = ["prev", "play", "next"]
|
||||||
on_collapsed_click = "spotify"
|
on_collapsed_click = "spotify"
|
||||||
max_width = 21
|
max_width = 0
|
||||||
marquee = true
|
|
||||||
|
|
||||||
[[block]]
|
[[block]]
|
||||||
block = "sound"
|
block = "sound"
|
||||||
@@ -30,6 +29,7 @@ driver = "auto"
|
|||||||
show_volume_when_muted = true
|
show_volume_when_muted = true
|
||||||
headphones_indicator = true
|
headphones_indicator = true
|
||||||
step_width = 3
|
step_width = 3
|
||||||
|
on_click = "pavucontrol"
|
||||||
|
|
||||||
[[block]]
|
[[block]]
|
||||||
block = "memory"
|
block = "memory"
|
||||||
@@ -63,7 +63,7 @@ on_click = "kitty --class kitty-scratch -c ~/.config/kitty/kitty-scratch.conf zs
|
|||||||
|
|
||||||
[[block]]
|
[[block]]
|
||||||
block = "networkmanager"
|
block = "networkmanager"
|
||||||
on_click = "networkmanager_dmenu"
|
on_click = "kitty --class kitty-scratch -c ~/.config/kitty/kitty-scratch.conf nmtui"
|
||||||
device_format = "{icon}{ap}"
|
device_format = "{icon}{ap}"
|
||||||
interface_name_exclude = ["br\\-[0-9a-f]{12}", "docker\\d+"]
|
interface_name_exclude = ["br\\-[0-9a-f]{12}", "docker\\d+"]
|
||||||
|
|
||||||
|
|||||||
@@ -9,40 +9,53 @@ from i3ipc.aio import Connection
|
|||||||
async def main():
|
async def main():
|
||||||
sway = await Connection().connect()
|
sway = await Connection().connect()
|
||||||
|
|
||||||
@sway.on(Event.WINDOW_FOCUS)
|
@sway.on(Event.WINDOW_NEW)
|
||||||
async def on_window_focus(sway, e):
|
@sway.on(Event.WINDOW_CLOSE)
|
||||||
focused_window = (await sway.get_tree()).find_focused()
|
@sway.on(Event.WINDOW_MOVE)
|
||||||
focused_workspace = focused_window.workspace()
|
@sway.on(Event.WINDOW_TITLE)
|
||||||
|
async def on_window_change(sway, _):
|
||||||
|
for w in (await sway.get_tree()).workspaces():
|
||||||
|
new_name = f'{w.num}:'
|
||||||
|
|
||||||
new_name = f'{focused_workspace.num}:'
|
first_descendant = True
|
||||||
|
for d in w.descendants():
|
||||||
app_name = e.container.app_id
|
app_name = d.app_id
|
||||||
if not app_name:
|
if not app_name:
|
||||||
app_name = e.container.window_instance
|
app_name = d.window_instance
|
||||||
|
|
||||||
if app_name:
|
if app_name:
|
||||||
|
if not first_descendant:
|
||||||
|
new_name += ' '
|
||||||
|
first_descendant = False
|
||||||
|
|
||||||
if 'kitty' in app_name:
|
if 'kitty' in app_name:
|
||||||
|
if 'vim' in d.name:
|
||||||
|
new_name += '<span font=\'12\' rise=\'-2500\'>\ue6c5</span>'
|
||||||
|
else:
|
||||||
new_name += ''
|
new_name += ''
|
||||||
elif app_name in ['Chromium', 'google-chrome']:
|
elif app_name in ['Chromium', 'google-chrome', 'google-chrome-unstable']:
|
||||||
if 'YouTube' in e.container.name:
|
if 'YouTube' in d.name:
|
||||||
new_name += ''
|
new_name += ''
|
||||||
else:
|
else:
|
||||||
new_name += ''
|
new_name += ''
|
||||||
|
elif app_name == 'Navigator':
|
||||||
|
new_name += ''
|
||||||
elif app_name == 'discord':
|
elif app_name == 'discord':
|
||||||
new_name += ''
|
new_name += ''
|
||||||
elif app_name == 'spotify':
|
elif app_name == 'spotify':
|
||||||
new_name += ''
|
new_name += '<span font=\'11\' rise=\'-400\'></span>'
|
||||||
elif app_name in ['GEMOC Studio', 'code-oss']:
|
elif app_name in ['GEMOC Studio', 'code-oss']:
|
||||||
new_name += ''
|
new_name += ''
|
||||||
elif 'okular' in app_name:
|
elif 'okular' in app_name or 'zathura' in app_name:
|
||||||
new_name += '<span font=\'FontAwesome 5 Free Solid\'></span>'
|
new_name += '<span font=\'FontAwesome 5 Free Solid\'></span>'
|
||||||
elif app_name == 'pavucontrol':
|
elif app_name == 'pavucontrol':
|
||||||
new_name += ''
|
new_name += ''
|
||||||
else:
|
else:
|
||||||
new_name += app_name
|
new_name += app_name
|
||||||
|
|
||||||
await sway.command(f'rename workspace to "{new_name}"')
|
await sway.command(f'rename workspace "{w.name}" to "{new_name}"')
|
||||||
|
|
||||||
|
|
||||||
await sway.main()
|
await sway.main()
|
||||||
|
|
||||||
asyncio.get_event_loop().run_until_complete(main())
|
asyncio.run(main())
|
||||||
|
|||||||
27
.zshrc
27
.zshrc
@@ -19,6 +19,7 @@ plugins=(
|
|||||||
archlinux
|
archlinux
|
||||||
docker
|
docker
|
||||||
docker-compose
|
docker-compose
|
||||||
|
fzf
|
||||||
git
|
git
|
||||||
systemd
|
systemd
|
||||||
vagrant
|
vagrant
|
||||||
@@ -27,11 +28,35 @@ plugins=(
|
|||||||
)
|
)
|
||||||
|
|
||||||
source $ZSH/oh-my-zsh.sh
|
source $ZSH/oh-my-zsh.sh
|
||||||
bindkey '^R' history-incremental-pattern-search-backward
|
|
||||||
|
|
||||||
if [ -f ~/.bash_aliases ]; then
|
if [ -f ~/.bash_aliases ]; then
|
||||||
source ~/.bash_aliases
|
source ~/.bash_aliases
|
||||||
fi
|
fi
|
||||||
eval $(thefuck --alias)
|
eval $(thefuck --alias)
|
||||||
|
|
||||||
|
ranger() {
|
||||||
|
if [ -z "$RANGER_LEVEL" ]; then
|
||||||
|
/usr/bin/ranger "$@"
|
||||||
|
else
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
alias start_gnome='XDG_SESSION_TYPE=wayland exec dbus-run-session gnome-session'
|
alias start_gnome='XDG_SESSION_TYPE=wayland exec dbus-run-session gnome-session'
|
||||||
|
|
||||||
|
# >>> mamba initialize >>>
|
||||||
|
# !! Contents within this block are managed by 'mamba init' !!
|
||||||
|
export MAMBA_EXE="/usr/bin/micromamba";
|
||||||
|
export MAMBA_ROOT_PREFIX="/home/rhiobet/micromamba";
|
||||||
|
__mamba_setup="$('/usr/bin/micromamba' shell hook --shell zsh --prefix '/home/rhiobet/micromamba' 2> /dev/null)"
|
||||||
|
if [ $? -eq 0 ]; then
|
||||||
|
eval "$__mamba_setup"
|
||||||
|
else
|
||||||
|
if [ -f "/home/rhiobet/micromamba/etc/profile.d/micromamba.sh" ]; then
|
||||||
|
. "/home/rhiobet/micromamba/etc/profile.d/micromamba.sh"
|
||||||
|
else
|
||||||
|
export PATH="/home/rhiobet/micromamba/bin:$PATH" # extra space after export prevents interference from conda init
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
unset __mamba_setup
|
||||||
|
# <<< mamba initialize <<<
|
||||||
|
|||||||
Reference in New Issue
Block a user