feat(sway): add toggle gaps script
This commit is contained in:
parent
f0b2030246
commit
3bea84ce68
@ -74,3 +74,9 @@ fi
|
|||||||
export PNPM_HOME="$HOME/.local/share/pnpm"
|
export PNPM_HOME="$HOME/.local/share/pnpm"
|
||||||
export PATH="$PNPM_HOME:$PATH"
|
export PATH="$PNPM_HOME:$PATH"
|
||||||
if [ -e /home/jim/.nix-profile/etc/profile.d/nix.sh ]; then . /home/jim/.nix-profile/etc/profile.d/nix.sh; fi # added by Nix installer
|
if [ -e /home/jim/.nix-profile/etc/profile.d/nix.sh ]; then . /home/jim/.nix-profile/etc/profile.d/nix.sh; fi # added by Nix installer
|
||||||
|
|
||||||
|
PATH="/home/jim/perl5/bin${PATH:+:${PATH}}"; export PATH;
|
||||||
|
PERL5LIB="/home/jim/perl5/lib/perl5${PERL5LIB:+:${PERL5LIB}}"; export PERL5LIB;
|
||||||
|
PERL_LOCAL_LIB_ROOT="/home/jim/perl5${PERL_LOCAL_LIB_ROOT:+:${PERL_LOCAL_LIB_ROOT}}"; export PERL_LOCAL_LIB_ROOT;
|
||||||
|
PERL_MB_OPT="--install_base \"/home/jim/perl5\""; export PERL_MB_OPT;
|
||||||
|
PERL_MM_OPT="INSTALL_BASE=/home/jim/perl5"; export PERL_MM_OPT;
|
||||||
|
@ -8,9 +8,11 @@ return require("packer").startup(function()
|
|||||||
|
|
||||||
-- Faster Filetype Detection
|
-- Faster Filetype Detection
|
||||||
use "nathom/filetype.nvim"
|
use "nathom/filetype.nvim"
|
||||||
|
|
||||||
use "alexghergh/nvim-tmux-navigation"
|
use "alexghergh/nvim-tmux-navigation"
|
||||||
|
|
||||||
|
use 'lervag/vimtex'
|
||||||
|
use 'xuhdev/vim-latex-live-preview'
|
||||||
|
|
||||||
-- Theming Section
|
-- Theming Section
|
||||||
use 'folke/tokyonight.nvim'
|
use 'folke/tokyonight.nvim'
|
||||||
use "xiyaowong/nvim-transparent"
|
use "xiyaowong/nvim-transparent"
|
||||||
|
1
configs/sway/.gitignore
vendored
Normal file
1
configs/sway/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
nohup.out
|
@ -24,6 +24,7 @@ set $screenclip slurp | grim -g - ~/Pictures/Screenshots/scrn-$(date +"%Y-%m-%d-
|
|||||||
set $screenshot grim ~/Pictures/screenshots/scrn-$(date +"%Y-%m-%d-%H-%M-%S").png
|
set $screenshot grim ~/Pictures/screenshots/scrn-$(date +"%Y-%m-%d-%H-%M-%S").png
|
||||||
set $windowshot swaymsg -t get_tree | jq -r '.. | select(.pid? and .visible?) | .rect | "\(.x),\(.y) \(.width)x\(.height)"' | $screenclip
|
set $windowshot swaymsg -t get_tree | jq -r '.. | select(.pid? and .visible?) | .rect | "\(.x),\(.y) \(.width)x\(.height)"' | $screenclip
|
||||||
set $toggle_layout ~/.config/sway/toggle_layout.sh
|
set $toggle_layout ~/.config/sway/toggle_layout.sh
|
||||||
|
set $toggle_gaps ~/.config/sway/toggle_gaps.sh
|
||||||
|
|
||||||
|
|
||||||
# Input configuration
|
# Input configuration
|
||||||
@ -180,6 +181,7 @@ output * bg `find ~/.customization/background -type f | shuf -n 1` fill
|
|||||||
|
|
||||||
# Switch the current container between different layout styles
|
# Switch the current container between different layout styles
|
||||||
bindsym $mod+w exec $toggle_layout
|
bindsym $mod+w exec $toggle_layout
|
||||||
|
bindsym $mod+g exec $toggle_gaps
|
||||||
|
|
||||||
# Make the current focus fullscreen
|
# Make the current focus fullscreen
|
||||||
bindsym $mod+f fullscreen
|
bindsym $mod+f fullscreen
|
||||||
|
14
configs/sway/toggle_gaps.sh
Executable file
14
configs/sway/toggle_gaps.sh
Executable file
@ -0,0 +1,14 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
GAPS_OUTER=5
|
||||||
|
GAPS_INNER=1
|
||||||
|
|
||||||
|
if [ "$(pgrep waybar)" != "" ]; then
|
||||||
|
killall waybar;
|
||||||
|
swaymsg gaps outer all set 0;
|
||||||
|
swaymsg gaps inner all set 0;
|
||||||
|
else
|
||||||
|
swaymsg gaps outer all set $GAPS_OUTER;
|
||||||
|
swaymsg gaps inner all set $GAPS_INNER;
|
||||||
|
nohup waybar & 2&> /dev/null;
|
||||||
|
fi
|
@ -86,3 +86,154 @@ __main__ INFO Received new metadata
|
|||||||
__main__ INFO Writing output
|
__main__ INFO Writing output
|
||||||
__main__ DEBUG Received signal to stop, exiting
|
__main__ DEBUG Received signal to stop, exiting
|
||||||
__main__ DEBUG Arguments received {'verbose': 0, 'player': None}
|
__main__ DEBUG Arguments received {'verbose': 0, 'player': None}
|
||||||
|
__main__ DEBUG Received signal to stop, exiting
|
||||||
|
__main__ DEBUG Arguments received {'verbose': 0, 'player': None}
|
||||||
|
__main__ DEBUG Arguments received {'verbose': 0, 'player': None}
|
||||||
|
__main__ DEBUG Received signal to stop, exiting
|
||||||
|
__main__ DEBUG Received signal to stop, exiting
|
||||||
|
__main__ DEBUG Arguments received {'verbose': 0, 'player': None}
|
||||||
|
__main__ DEBUG Arguments received {'verbose': 0, 'player': None}
|
||||||
|
__main__ DEBUG Received signal to stop, exiting
|
||||||
|
__main__ DEBUG Received signal to stop, exiting
|
||||||
|
__main__ DEBUG Arguments received {'verbose': 0, 'player': None}
|
||||||
|
__main__ DEBUG Arguments received {'verbose': 0, 'player': None}
|
||||||
|
__main__ DEBUG Initialize player: chromium
|
||||||
|
__main__ DEBUG Initialize player: chromium
|
||||||
|
__main__ INFO Received new metadata
|
||||||
|
__main__ INFO Writing output
|
||||||
|
__main__ INFO Received new metadata
|
||||||
|
__main__ INFO Writing output
|
||||||
|
__main__ INFO Received new playback status
|
||||||
|
__main__ INFO Received new metadata
|
||||||
|
__main__ INFO Writing output
|
||||||
|
__main__ INFO Received new playback status
|
||||||
|
__main__ INFO Received new metadata
|
||||||
|
__main__ INFO Writing output
|
||||||
|
__main__ INFO Received new metadata
|
||||||
|
__main__ INFO Writing output
|
||||||
|
__main__ INFO Received new metadata
|
||||||
|
__main__ INFO Writing output
|
||||||
|
__main__ INFO Received new playback status
|
||||||
|
__main__ INFO Received new metadata
|
||||||
|
__main__ INFO Writing output
|
||||||
|
__main__ INFO Received new metadata
|
||||||
|
__main__ INFO Writing output
|
||||||
|
__main__ INFO Received new metadata
|
||||||
|
__main__ INFO Writing output
|
||||||
|
__main__ INFO Received new playback status
|
||||||
|
__main__ INFO Received new metadata
|
||||||
|
__main__ INFO Writing output
|
||||||
|
__main__ INFO Received new metadata
|
||||||
|
__main__ INFO Writing output
|
||||||
|
__main__ INFO Received new metadata
|
||||||
|
__main__ INFO Writing output
|
||||||
|
__main__ INFO Received new playback status
|
||||||
|
__main__ INFO Received new playback status
|
||||||
|
__main__ INFO Received new metadata
|
||||||
|
__main__ INFO Received new metadata
|
||||||
|
__main__ INFO Writing output
|
||||||
|
__main__ INFO Writing output
|
||||||
|
__main__ INFO Received new metadata
|
||||||
|
__main__ INFO Writing output
|
||||||
|
__main__ INFO Received new metadata
|
||||||
|
__main__ INFO Writing output
|
||||||
|
__main__ INFO Received new metadata
|
||||||
|
__main__ INFO Writing output
|
||||||
|
__main__ INFO Received new metadata
|
||||||
|
__main__ INFO Writing output
|
||||||
|
__main__ INFO Received new playback status
|
||||||
|
__main__ INFO Received new metadata
|
||||||
|
__main__ INFO Writing output
|
||||||
|
__main__ INFO Received new metadata
|
||||||
|
__main__ INFO Writing output
|
||||||
|
__main__ INFO Received new metadata
|
||||||
|
__main__ INFO Writing output
|
||||||
|
__main__ INFO Received new playback status
|
||||||
|
__main__ INFO Received new metadata
|
||||||
|
__main__ INFO Writing output
|
||||||
|
__main__ INFO Received new metadata
|
||||||
|
__main__ INFO Writing output
|
||||||
|
__main__ INFO Received new metadata
|
||||||
|
__main__ INFO Writing output
|
||||||
|
__main__ INFO Received new playback status
|
||||||
|
__main__ INFO Received new playback status
|
||||||
|
__main__ INFO Received new metadata
|
||||||
|
__main__ INFO Writing output
|
||||||
|
__main__ INFO Received new metadata
|
||||||
|
__main__ INFO Writing output
|
||||||
|
__main__ INFO Received new metadata
|
||||||
|
__main__ INFO Writing output
|
||||||
|
__main__ INFO Received new metadata
|
||||||
|
__main__ INFO Received new metadata
|
||||||
|
__main__ INFO Writing output
|
||||||
|
__main__ INFO Writing output
|
||||||
|
__main__ INFO Received new metadata
|
||||||
|
__main__ INFO Writing output
|
||||||
|
__main__ INFO Received new playback status
|
||||||
|
__main__ INFO Received new metadata
|
||||||
|
__main__ INFO Writing output
|
||||||
|
__main__ INFO Received new metadata
|
||||||
|
__main__ INFO Writing output
|
||||||
|
__main__ INFO Received new metadata
|
||||||
|
__main__ INFO Writing output
|
||||||
|
__main__ INFO Received new playback status
|
||||||
|
__main__ INFO Received new metadata
|
||||||
|
__main__ INFO Writing output
|
||||||
|
__main__ INFO Received new metadata
|
||||||
|
__main__ INFO Writing output
|
||||||
|
__main__ INFO Received new metadata
|
||||||
|
__main__ INFO Writing output
|
||||||
|
__main__ DEBUG Received signal to stop, exiting
|
||||||
|
__main__ INFO Player has vanished
|
||||||
|
__main__ DEBUG Initialize player: chromium
|
||||||
|
__main__ INFO Received new metadata
|
||||||
|
__main__ INFO Writing output
|
||||||
|
__main__ INFO Received new metadata
|
||||||
|
__main__ INFO Writing output
|
||||||
|
__main__ INFO Received new metadata
|
||||||
|
__main__ INFO Writing output
|
||||||
|
__main__ INFO Received new playback status
|
||||||
|
__main__ INFO Received new metadata
|
||||||
|
__main__ INFO Writing output
|
||||||
|
__main__ INFO Received new metadata
|
||||||
|
__main__ INFO Writing output
|
||||||
|
__main__ INFO Received new metadata
|
||||||
|
__main__ INFO Writing output
|
||||||
|
__main__ INFO Received new playback status
|
||||||
|
__main__ INFO Received new metadata
|
||||||
|
__main__ INFO Writing output
|
||||||
|
__main__ INFO Received new metadata
|
||||||
|
__main__ INFO Writing output
|
||||||
|
__main__ INFO Received new metadata
|
||||||
|
__main__ INFO Writing output
|
||||||
|
__main__ INFO Player has vanished
|
||||||
|
__main__ DEBUG Received signal to stop, exiting
|
||||||
|
__main__ DEBUG Arguments received {'verbose': 0, 'player': None}
|
||||||
|
__main__ DEBUG Arguments received {'verbose': 0, 'player': None}
|
||||||
|
__main__ DEBUG Arguments received {'verbose': 0, 'player': None}
|
||||||
|
__main__ DEBUG Arguments received {'verbose': 0, 'player': None}
|
||||||
|
__main__ DEBUG Arguments received {'verbose': 0, 'player': None}
|
||||||
|
__main__ DEBUG Arguments received {'verbose': 0, 'player': None}
|
||||||
|
__main__ DEBUG Arguments received {'verbose': 0, 'player': None}
|
||||||
|
__main__ DEBUG Arguments received {'verbose': 0, 'player': None}
|
||||||
|
__main__ DEBUG Arguments received {'verbose': 0, 'player': None}
|
||||||
|
__main__ DEBUG Arguments received {'verbose': 0, 'player': None}
|
||||||
|
__main__ DEBUG Arguments received {'verbose': 0, 'player': None}
|
||||||
|
__main__ DEBUG Arguments received {'verbose': 0, 'player': None}
|
||||||
|
__main__ DEBUG Arguments received {'verbose': 0, 'player': None}
|
||||||
|
__main__ DEBUG Arguments received {'verbose': 0, 'player': None}
|
||||||
|
__main__ DEBUG Arguments received {'verbose': 0, 'player': None}
|
||||||
|
__main__ DEBUG Arguments received {'verbose': 0, 'player': None}
|
||||||
|
__main__ DEBUG Arguments received {'verbose': 0, 'player': None}
|
||||||
|
__main__ DEBUG Arguments received {'verbose': 0, 'player': None}
|
||||||
|
__main__ DEBUG Arguments received {'verbose': 0, 'player': None}
|
||||||
|
__main__ DEBUG Arguments received {'verbose': 0, 'player': None}
|
||||||
|
__main__ DEBUG Arguments received {'verbose': 0, 'player': None}
|
||||||
|
__main__ DEBUG Arguments received {'verbose': 0, 'player': None}
|
||||||
|
__main__ DEBUG Arguments received {'verbose': 0, 'player': None}
|
||||||
|
__main__ DEBUG Arguments received {'verbose': 0, 'player': None}
|
||||||
|
__main__ DEBUG Arguments received {'verbose': 0, 'player': None}
|
||||||
|
__main__ DEBUG Arguments received {'verbose': 0, 'player': None}
|
||||||
|
__main__ DEBUG Arguments received {'verbose': 0, 'player': None}
|
||||||
|
__main__ DEBUG Arguments received {'verbose': 0, 'player': None}
|
||||||
|
__main__ DEBUG Arguments received {'verbose': 0, 'player': None}
|
||||||
|
@ -23,12 +23,12 @@ def write_output(text, player):
|
|||||||
sys.stdout.flush()
|
sys.stdout.flush()
|
||||||
|
|
||||||
|
|
||||||
def on_play(player, status, manager):
|
def on_play(player, _, manager):
|
||||||
logger.info('Received new playback status')
|
logger.info('Received new playback status')
|
||||||
on_metadata(player, player.props.metadata, manager)
|
on_metadata(player, player.props.metadata, manager)
|
||||||
|
|
||||||
|
|
||||||
def on_metadata(player, metadata, manager):
|
def on_metadata(player, metadata, _):
|
||||||
logger.info('Received new metadata')
|
logger.info('Received new metadata')
|
||||||
track_info = ''
|
track_info = ''
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user