feat: switch from rofi to wofi
This commit is contained in:
parent
c990dffd96
commit
66585f6d20
@ -25,6 +25,7 @@ return require("packer").startup(function()
|
|||||||
|
|
||||||
use "tpope/vim-fugitive"
|
use "tpope/vim-fugitive"
|
||||||
use "tpope/vim-surround"
|
use "tpope/vim-surround"
|
||||||
|
use "lambdalisue/suda.vim"
|
||||||
use "editorconfig/editorconfig-vim"
|
use "editorconfig/editorconfig-vim"
|
||||||
|
|
||||||
-- Code Navigation
|
-- Code Navigation
|
||||||
@ -55,6 +56,7 @@ return require("packer").startup(function()
|
|||||||
}
|
}
|
||||||
|
|
||||||
-- Syntax / Autocomplete
|
-- Syntax / Autocomplete
|
||||||
|
use "terminalnode/sway-vim-syntax"
|
||||||
use "neovim/nvim-lspconfig"
|
use "neovim/nvim-lspconfig"
|
||||||
use "github/copilot.vim"
|
use "github/copilot.vim"
|
||||||
use "hrsh7th/nvim-cmp"
|
use "hrsh7th/nvim-cmp"
|
||||||
|
39
configs/rofi/rofi-audio-menu
Executable file
39
configs/rofi/rofi-audio-menu
Executable file
@ -0,0 +1,39 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# FEATURES
|
||||||
|
# - Doesn't show the sink that is already the default
|
||||||
|
# - Automatically switches all running input sinks when switching the default sink
|
||||||
|
|
||||||
|
# Get the current default sink
|
||||||
|
SINK_DEFAULT=$(pactl info | ag "Default Sink" | ag -o "(?!.*:)[^\s].*")
|
||||||
|
# Get the audio sink names
|
||||||
|
SINK_NAMES=$(pactl list sinks | ag Name | cut --complement -c 1-7)
|
||||||
|
|
||||||
|
# Get the index of the default sink
|
||||||
|
DEFAULT_INDEX=$(printf "%s" "$SINK_NAMES" | ag --number "$SINK_DEFAULT" | sed 's/:.*//' )
|
||||||
|
|
||||||
|
# Get the audio sink descriptions
|
||||||
|
SINK_DESCRIPTIONS=$(pactl list sinks | ag Description | cut --complement -c 1-13 | sed 's/^ \+//' | sed 's/ \+$//')
|
||||||
|
# Get all the programs that revieve the audio from the sinks
|
||||||
|
SINK_INPUTS=$(pactl list sink-inputs | ag "Sink Input #")
|
||||||
|
|
||||||
|
# Get the descriptions from the sinks without the default sink to display to the user and have the user pick a sink
|
||||||
|
SINK_DESCRIPTION=$(printf "%s" "$SINK_DESCRIPTIONS" | sed "${DEFAULT_INDEX}d" | dmenu -i -fn "Roboto Mono for Powerline-11" -p "Select sink:")
|
||||||
|
SINK_DESCRIPTION=$(printf "%s" "$SINK_DESCRIPTION" | sed 's/(/\\(/' | sed 's/)/\\)/')
|
||||||
|
|
||||||
|
# Get the index for the answer that the user wrote
|
||||||
|
DESCRIPTION_INDEX=$(printf "%s\n" "$SINK_DESCRIPTIONS" | ag --number "$SINK_DESCRIPTION" | sed 's/:.*//')
|
||||||
|
DESCRIPTION_INDEX=$((DESCRIPTION_INDEX - 1)) # Correct the index hihi
|
||||||
|
|
||||||
|
# Set the default sink
|
||||||
|
pactl set-default-sink $DESCRIPTION_INDEX
|
||||||
|
|
||||||
|
# Change all the ouputs for the programs that are using the default sink
|
||||||
|
printf "%s\n" "$SINK_INPUTS" | while read -r SINK_INPUT
|
||||||
|
do
|
||||||
|
# Get the index for the program
|
||||||
|
SINK_INPUT_INDEX=$(printf "%s" "$SINK_INPUT" | ag -o "(?!Sink Input#)[0-9]+")
|
||||||
|
pactl move-sink-input "$SINK_INPUT_INDEX" "$DESCRIPTION_INDEX"
|
||||||
|
done
|
@ -1,3 +1,5 @@
|
|||||||
|
# vi: ft=conf
|
||||||
|
|
||||||
# Default config for sway
|
# Default config for sway
|
||||||
#
|
#
|
||||||
# Copy this to ~/.config/sway/config and edit it to your liking.
|
# Copy this to ~/.config/sway/config and edit it to your liking.
|
||||||
@ -8,19 +10,27 @@
|
|||||||
#
|
#
|
||||||
# Logo key. Use Mod1 for Alt.
|
# Logo key. Use Mod1 for Alt.
|
||||||
set $mod Mod4
|
set $mod Mod4
|
||||||
|
|
||||||
# Home row direction keys, like vim
|
# Home row direction keys, like vim
|
||||||
set $left h
|
set $left h
|
||||||
set $down j
|
set $down j
|
||||||
set $up k
|
set $up k
|
||||||
set $right l
|
set $right l
|
||||||
# Your preferred terminal emulator
|
# Your preferred terminal emulator
|
||||||
set $term alacritty
|
|
||||||
|
|
||||||
set $menu "rofi -combi-modi window,drun,ssh,run -show combi -show-icons"
|
# Some menus
|
||||||
set $powermenu "rofi -show p -modi p:~/.dotfiles/configs/rofi/rofi-power-menu -lines 6"
|
set $wofi_scripts ~/.config/wofi
|
||||||
|
set $quickmenu wofi --show drun
|
||||||
|
|
||||||
|
# Screenshot section
|
||||||
set $screenclip slurp | grim -g - ~/Pictures/Screenshots/scrn-$(date +"%Y-%m-%d-%H-%M-%S").png
|
set $screenclip slurp | grim -g - ~/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 $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
|
||||||
|
|
||||||
|
# Default Programs
|
||||||
|
set $term alacritty
|
||||||
|
set $explorer nautilus
|
||||||
|
set $config_editor ~/.config/sway/config_editor.sh
|
||||||
set $settings gnome-control-center
|
set $settings gnome-control-center
|
||||||
set $toggle_layout ~/.config/sway/toggle_layout.sh
|
set $toggle_layout ~/.config/sway/toggle_layout.sh
|
||||||
set $toggle_gaps ~/.config/sway/toggle_gaps.sh
|
set $toggle_gaps ~/.config/sway/toggle_gaps.sh
|
||||||
@ -80,11 +90,13 @@ output * bg `find ~/.customization/background -type f | shuf -n 1` fill
|
|||||||
#
|
#
|
||||||
# Basics:
|
# Basics:
|
||||||
#
|
#
|
||||||
bindsym $mod+q exec $powermenu
|
bindsym $mod+d exec $quickmenu
|
||||||
|
bindsym $mod+q kill
|
||||||
|
bindsym $mod+Shift+q exec $wofi_scripts/wofi-power-menu.sh
|
||||||
bindsym $mod+Return exec $term
|
bindsym $mod+Return exec $term
|
||||||
bindsym $mod+Shift+q kill
|
bindsym $mod+e exec $explorer
|
||||||
bindsym $mod+d exec $menu
|
bindsym $mod+Comma exec $settings
|
||||||
bindsym $mod+e exec nautilus
|
bindsym $mod+Shift+Comma exec $config_editor
|
||||||
|
|
||||||
# Drag and resize floating windows with mouse right/left drag
|
# Drag and resize floating windows with mouse right/left drag
|
||||||
floating_modifier $mod normal
|
floating_modifier $mod normal
|
||||||
@ -181,7 +193,6 @@ 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
|
bindsym $mod+g exec $toggle_gaps
|
||||||
bindsym $mod+Comma exec $settings
|
|
||||||
|
|
||||||
# Make the current focus fullscreen
|
# Make the current focus fullscreen
|
||||||
bindsym $mod+f fullscreen
|
bindsym $mod+f fullscreen
|
||||||
@ -204,7 +215,7 @@ output * bg `find ~/.customization/background -type f | shuf -n 1` fill
|
|||||||
bindsym $mod+s exec $screenshot
|
bindsym $mod+s exec $screenshot
|
||||||
|
|
||||||
|
|
||||||
bindsym Alt+Tab exec rofi -show window -modi window
|
bindsym $mod+Tab exec $wofi_scripts/sway-select-window.sh
|
||||||
#
|
#
|
||||||
# Scratchpad:
|
# Scratchpad:
|
||||||
#
|
#
|
||||||
|
2
configs/sway/config_editor.sh
Executable file
2
configs/sway/config_editor.sh
Executable file
@ -0,0 +1,2 @@
|
|||||||
|
#!/bin/zsh
|
||||||
|
alacritty -e zsh -c "/home/jim/.asdf/shims/nvim ~/.dotfiles"
|
@ -77,7 +77,8 @@
|
|||||||
},
|
},
|
||||||
"custom/clock": {
|
"custom/clock": {
|
||||||
"exec": "date +'%H:%M'",
|
"exec": "date +'%H:%M'",
|
||||||
"interval": 10
|
"interval": 10,
|
||||||
|
"on-click": "nm-applet"
|
||||||
},
|
},
|
||||||
"cpu": {
|
"cpu": {
|
||||||
"format": "{usage}% ",
|
"format": "{usage}% ",
|
||||||
|
@ -1133,3 +1133,552 @@ __main__ DEBUG Arguments received {'verbose': 0, 'player': None}
|
|||||||
__main__ DEBUG Received signal to stop, exiting
|
__main__ DEBUG Received signal to stop, exiting
|
||||||
__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 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 Received signal to stop, exiting
|
||||||
|
__main__ DEBUG Received signal to stop, exiting
|
||||||
|
__main__ DEBUG Received signal to stop, exiting
|
||||||
|
__main__ DEBUG Received signal to stop, exiting
|
||||||
|
__main__ DEBUG Received signal to stop, exiting
|
||||||
|
__main__ DEBUG Received signal to stop, exiting
|
||||||
|
__main__ DEBUG Received signal to stop, exiting
|
||||||
|
__main__ DEBUG Received signal to stop, exiting
|
||||||
|
__main__ DEBUG Received signal to stop, exiting
|
||||||
|
__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 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 Initialize player: chromium
|
||||||
|
__main__ DEBUG Initialize player: chromium
|
||||||
|
__main__ DEBUG Initialize player: chromium
|
||||||
|
__main__ DEBUG Initialize player: chromium
|
||||||
|
__main__ DEBUG Initialize player: chromium
|
||||||
|
__main__ DEBUG Initialize player: chromium
|
||||||
|
__main__ DEBUG Initialize player: chromium
|
||||||
|
__main__ DEBUG Initialize player: chromium
|
||||||
|
__main__ DEBUG Initialize player: chromium
|
||||||
|
__main__ DEBUG Initialize player: chromium
|
||||||
|
__main__ INFO Received new metadata
|
||||||
|
__main__ DEBUG Initialize player: chromium
|
||||||
|
__main__ INFO Writing output
|
||||||
|
__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 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 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 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 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 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 metadata
|
||||||
|
__main__ INFO Writing output
|
||||||
|
__main__ INFO Writing output
|
||||||
|
__main__ INFO Received new metadata
|
||||||
|
__main__ INFO Received new metadata
|
||||||
|
__main__ INFO Writing output
|
||||||
|
__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 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 playback status
|
||||||
|
__main__ INFO Received new metadata
|
||||||
|
__main__ INFO Received new metadata
|
||||||
|
__main__ INFO Writing output
|
||||||
|
__main__ INFO Received new playback status
|
||||||
|
__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 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 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 playback status
|
||||||
|
__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 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 playback status
|
||||||
|
__main__ INFO Received new playback status
|
||||||
|
__main__ INFO Received new metadata
|
||||||
|
__main__ INFO Writing output
|
||||||
|
__main__ INFO Received new metadata
|
||||||
|
__main__ INFO Received new playback status
|
||||||
|
__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 playback status
|
||||||
|
__main__ INFO Received new metadata
|
||||||
|
__main__ INFO Writing output
|
||||||
|
__main__ INFO Received new playback status
|
||||||
|
__main__ INFO Received new metadata
|
||||||
|
__main__ INFO Received new playback status
|
||||||
|
__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 playback status
|
||||||
|
__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 playback status
|
||||||
|
__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 playback status
|
||||||
|
__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 playback status
|
||||||
|
__main__ INFO Received new metadata
|
||||||
|
__main__ INFO Writing output
|
||||||
|
__main__ INFO Received new playback status
|
||||||
|
__main__ INFO Received new metadata
|
||||||
|
__main__ INFO Received new playback status
|
||||||
|
__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 Received new playback status
|
||||||
|
__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 Received new playback status
|
||||||
|
__main__ INFO Received new playback status
|
||||||
|
__main__ INFO Received new metadata
|
||||||
|
__main__ INFO Received new metadata
|
||||||
|
__main__ INFO Received new playback status
|
||||||
|
__main__ INFO Writing output
|
||||||
|
__main__ INFO Received new metadata
|
||||||
|
__main__ INFO Writing output
|
||||||
|
__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 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 Received new playback status
|
||||||
|
__main__ INFO Writing output
|
||||||
|
__main__ INFO Writing output
|
||||||
|
__main__ INFO Received new metadata
|
||||||
|
__main__ INFO Writing output
|
||||||
|
__main__ DEBUG Received signal to stop, exiting
|
||||||
|
__main__ DEBUG Received signal to stop, exiting
|
||||||
|
__main__ DEBUG Received signal to stop, exiting
|
||||||
|
__main__ DEBUG Received signal to stop, exiting
|
||||||
|
__main__ DEBUG Received signal to stop, exiting
|
||||||
|
__main__ DEBUG Received signal to stop, exiting
|
||||||
|
__main__ DEBUG Received signal to stop, exiting
|
||||||
|
__main__ DEBUG Received signal to stop, exiting
|
||||||
|
__main__ DEBUG Received signal to stop, exiting
|
||||||
|
__main__ DEBUG Received signal to stop, exiting
|
||||||
|
__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__ INFO Received new metadata
|
||||||
|
__main__ INFO Writing output
|
||||||
|
__main__ DEBUG Initialize player: chromium
|
||||||
|
__main__ INFO Received new metadata
|
||||||
|
__main__ INFO Writing output
|
||||||
|
__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__ DEBUG Arguments received {'verbose': 0, 'player': None}
|
||||||
|
__main__ DEBUG Initialize player: chromium
|
||||||
|
__main__ DEBUG Arguments received {'verbose': 0, 'player': None}
|
||||||
|
__main__ DEBUG Initialize player: chromium
|
||||||
|
__main__ INFO Received new metadata
|
||||||
|
__main__ INFO Received new metadata
|
||||||
|
__main__ INFO Writing output
|
||||||
|
__main__ INFO Writing output
|
||||||
|
__main__ DEBUG Arguments received {'verbose': 0, 'player': None}
|
||||||
|
__main__ DEBUG Initialize player: chromium
|
||||||
|
__main__ DEBUG Arguments received {'verbose': 0, 'player': None}
|
||||||
|
__main__ DEBUG Initialize player: chromium
|
||||||
|
__main__ INFO Received new metadata
|
||||||
|
__main__ INFO Received new metadata
|
||||||
|
__main__ INFO Writing output
|
||||||
|
__main__ INFO Writing output
|
||||||
|
__main__ DEBUG Arguments received {'verbose': 0, 'player': None}
|
||||||
|
__main__ DEBUG Initialize player: chromium
|
||||||
|
__main__ DEBUG Arguments received {'verbose': 0, 'player': None}
|
||||||
|
__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 playback status
|
||||||
|
__main__ INFO Received new metadata
|
||||||
|
__main__ INFO Received new metadata
|
||||||
|
__main__ INFO Writing output
|
||||||
|
__main__ INFO Writing output
|
||||||
|
__main__ INFO Received new playback status
|
||||||
|
__main__ INFO Received new metadata
|
||||||
|
__main__ INFO Received new playback status
|
||||||
|
__main__ INFO Received new metadata
|
||||||
|
__main__ INFO Writing output
|
||||||
|
__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 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 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 playback status
|
||||||
|
__main__ INFO Received new metadata
|
||||||
|
__main__ INFO Received new playback status
|
||||||
|
__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 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 playback status
|
||||||
|
__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 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 metadata
|
||||||
|
__main__ INFO Writing output
|
||||||
|
__main__ INFO Received new metadata
|
||||||
|
__main__ INFO Received new metadata
|
||||||
|
__main__ INFO Writing output
|
||||||
|
__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 metadata
|
||||||
|
__main__ INFO Writing output
|
||||||
|
__main__ INFO Received new metadata
|
||||||
|
__main__ INFO Writing output
|
||||||
|
__main__ DEBUG Received signal to stop, exiting
|
||||||
|
__main__ DEBUG Received signal to stop, exiting
|
||||||
|
__main__ DEBUG Received signal to stop, exiting
|
||||||
|
__main__ DEBUG Received signal to stop, exiting
|
||||||
|
__main__ DEBUG Received signal to stop, exiting
|
||||||
|
__main__ DEBUG Received signal to stop, exiting
|
||||||
|
__main__ DEBUG Received signal to stop, exiting
|
||||||
|
__main__ DEBUG Received signal to stop, exiting
|
||||||
|
__main__ DEBUG Received signal to stop, exiting
|
||||||
|
__main__ DEBUG Received signal to stop, exiting
|
||||||
|
__main__ INFO Player has vanished
|
||||||
|
__main__ INFO Player has vanished
|
||||||
|
__main__ INFO Player has vanished
|
||||||
|
__main__ INFO Player has vanished
|
||||||
|
__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 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 Received signal to stop, exiting
|
||||||
|
__main__ DEBUG Received signal to stop, exiting
|
||||||
|
__main__ DEBUG Received signal to stop, exiting
|
||||||
|
__main__ DEBUG Received signal to stop, exiting
|
||||||
|
__main__ DEBUG Received signal to stop, exiting
|
||||||
|
__main__ DEBUG Received signal to stop, exiting
|
||||||
|
__main__ DEBUG Received signal to stop, exiting
|
||||||
|
__main__ DEBUG Received signal to stop, exiting
|
||||||
|
__main__ DEBUG Received signal to stop, exiting
|
||||||
|
__main__ DEBUG Received signal to stop, exiting
|
||||||
|
__main__ DEBUG Received signal to stop, exiting
|
||||||
|
__main__ DEBUG Received signal to stop, exiting
|
||||||
|
__main__ DEBUG Received signal to stop, exiting
|
||||||
|
__main__ DEBUG Received signal to stop, exiting
|
||||||
|
__main__ DEBUG Received signal to stop, exiting
|
||||||
|
__main__ DEBUG Received signal to stop, exiting
|
||||||
|
__main__ DEBUG Received signal to stop, exiting
|
||||||
|
__main__ DEBUG Received signal to stop, exiting
|
||||||
|
__main__ DEBUG Received signal to stop, exiting
|
||||||
|
__main__ DEBUG Received signal to stop, exiting
|
||||||
|
__main__ DEBUG Received signal to stop, exiting
|
||||||
|
__main__ DEBUG Received signal to stop, exiting
|
||||||
|
__main__ DEBUG Received signal to stop, exiting
|
||||||
|
__main__ DEBUG Received signal to stop, exiting
|
||||||
|
__main__ DEBUG Received signal to stop, exiting
|
||||||
|
__main__ DEBUG Received signal to stop, exiting
|
||||||
|
__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 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 Received signal to stop, exiting
|
||||||
|
__main__ DEBUG Received signal to stop, exiting
|
||||||
|
__main__ DEBUG Received signal to stop, exiting
|
||||||
|
__main__ DEBUG Received signal to stop, exiting
|
||||||
|
__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 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}
|
||||||
|
__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}
|
||||||
|
6
configs/wofi/config
Normal file
6
configs/wofi/config
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
allow_images=true
|
||||||
|
allow_markup=true
|
||||||
|
width=500
|
||||||
|
dynamic_lines=true
|
||||||
|
term=allacritty
|
||||||
|
insensitive=true
|
57
configs/wofi/select-vpn.sh
Executable file
57
configs/wofi/select-vpn.sh
Executable file
@ -0,0 +1,57 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Connect to VPN connections
|
||||||
|
|
||||||
|
# Starts a scan of available broadcasting SSIDs
|
||||||
|
# nmcli dev wifi rescan
|
||||||
|
export LC_ALL="en_US.UTF-8"
|
||||||
|
export LANG="en_US.UTF-8"
|
||||||
|
export LANGUAGE="en_US:en"
|
||||||
|
|
||||||
|
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||||
|
|
||||||
|
FIELDS=NAME,TYPE,STATE
|
||||||
|
POSITION=0
|
||||||
|
XOFF=-30
|
||||||
|
LOC=3
|
||||||
|
CACHE=~/.local/tmp/vpn-wofi
|
||||||
|
WWIDTH=340
|
||||||
|
|
||||||
|
LIST=$(nmcli --fields "$FIELDS" connection show | awk \
|
||||||
|
-F "[ ]{2,}" \
|
||||||
|
'$2 ~ /vpn/ {
|
||||||
|
sub(/activated/, "");
|
||||||
|
sub(/activating/, "");
|
||||||
|
sub(/--/, "");
|
||||||
|
printf "<tt>%-30s\t</tt>%s\n", $1,$3 }')
|
||||||
|
|
||||||
|
# Dynamically change the height of the rofi menu
|
||||||
|
LINENUM=$(echo "$LIST" | wc -l)
|
||||||
|
|
||||||
|
WHEIGHT=$((30*$LINENUM))
|
||||||
|
|
||||||
|
CHENTRY=$(echo -e "$LIST" | uniq -u | \
|
||||||
|
wofi -i \
|
||||||
|
--dmenu \
|
||||||
|
-p "Choose a VPN connection: " \
|
||||||
|
--width "$WWIDTH" \
|
||||||
|
--height $WHEIGHT \
|
||||||
|
--cache-file ${CACHE} \
|
||||||
|
--location $LOC \
|
||||||
|
--xoffset $XOFF | \
|
||||||
|
sed -e 's/<[^>]*>//g')
|
||||||
|
|
||||||
|
rm ${CACHE}
|
||||||
|
|
||||||
|
ACTIVE=$(echo $CHENTRY | awk -F "[ ]{2,}" '{print //}')
|
||||||
|
|
||||||
|
VPNID=$(echo "$CHENTRY" | awk -F "[ ]{2,}" '{print $1}')
|
||||||
|
|
||||||
|
# It is assumed that if the connection is in active, then
|
||||||
|
# the user wants to deactivate it
|
||||||
|
if [[ $ACTIVE =~ 1 ]]; then
|
||||||
|
nmcli connection down "$VPNID"
|
||||||
|
else
|
||||||
|
nmcli connection up "$VPNID"
|
||||||
|
fi
|
||||||
|
|
||||||
|
pkill -SIGRTMIN+2 waybar
|
105
configs/wofi/select-wifi.sh
Executable file
105
configs/wofi/select-wifi.sh
Executable file
@ -0,0 +1,105 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Connect to WIFI
|
||||||
|
# Modified from https://github.com/zbaylin/rofi-wifi-menu/blob/master/rofi-wifi-menu.sh
|
||||||
|
|
||||||
|
# export LC_ALL="en_US.UTF-8"
|
||||||
|
export LANG="en_US.UTF-8"
|
||||||
|
export LANGUAGE="en_US:en"
|
||||||
|
# Starts a scan of available broadcasting SSIDs
|
||||||
|
# nmcli dev wifi rescan
|
||||||
|
|
||||||
|
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||||
|
|
||||||
|
# FIELDS=SSID,SECURITY,BARS,ACTIVE
|
||||||
|
FIELDS=SSID,BARS,ACTIVE,SECURITY
|
||||||
|
POSITION=0
|
||||||
|
XOFF=-30
|
||||||
|
LOC=3
|
||||||
|
CACHE=~/.local/tmp/wifi-wofi
|
||||||
|
WWIDTH=370
|
||||||
|
MAXHEIGHT=1000
|
||||||
|
|
||||||
|
LIST=$(nmcli --fields "$FIELDS" device wifi list | sed '/^--/d' | \
|
||||||
|
awk -F "[ ]{2,}" '/SSID/ {next} {;
|
||||||
|
sub(/yes/, "", $3);
|
||||||
|
sub(/no/, "", $3);
|
||||||
|
if ($4 == "--") $4=""; else $4="";
|
||||||
|
printf "<tt>%-4s %-26s </tt>%s %s\n", $2,$1,$3,$4 }')
|
||||||
|
|
||||||
|
# Bluetooth connections
|
||||||
|
LISTB=$(nmcli --fields NAME,TYPE,ACTIVE con show | \
|
||||||
|
awk -F "[ ]{2,}" '/bluetooth/ {;
|
||||||
|
sub(/yes/, "", $3);
|
||||||
|
sub(/no/, "", $3);
|
||||||
|
printf "<tt> %-26s </tt>%s \n", $1,$3 }')
|
||||||
|
|
||||||
|
# Gives a list of known connections so we can parse it later
|
||||||
|
KNOWNCON=$(nmcli connection show | awk -F '[[:space:]][[:space:]]+' '{printf "%s\n", $1}')
|
||||||
|
|
||||||
|
# Really janky way of telling if there is currently a connection
|
||||||
|
CONSTATE=$(nmcli -fields WIFI g | awk '/enabled|disabled/ { print $0}')
|
||||||
|
|
||||||
|
CURRSSID=$(LANGUAGE=C nmcli -t -f active,ssid dev wifi | awk -F: '$1 ~ /^yes/ {print $2}')
|
||||||
|
|
||||||
|
if [[ ! -z $CURRSSID ]]; then
|
||||||
|
HIGHLINE=$(echo "$(echo "$LIST" | awk -F "[ ]{2,}" '{print $2}' | grep -Fxn -m 1 "$CURRSSID" | awk -F ":" '{print $1}') + 1" | bc )
|
||||||
|
fi
|
||||||
|
|
||||||
|
LINENUM=$(echo -e "toggle\nmanual\n${LISTB}\n${LIST}" | wc -l)
|
||||||
|
|
||||||
|
# If there are more than 20 SSIDs, the menu will still only have 20 lines
|
||||||
|
if [ "$LINENUM" -gt 20 ] && [[ "$CONSTATE" =~ "enabled" ]]; then
|
||||||
|
LINENUM=20
|
||||||
|
elif [[ "$CONSTATE" =~ "disabled" ]]; then
|
||||||
|
LINENUM=1
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
if [[ "$CONSTATE" =~ "enabled" ]]; then
|
||||||
|
TOGGLE="toggle off"
|
||||||
|
elif [[ "$CONSTATE" =~ "disabled" ]]; then
|
||||||
|
TOGGLE="toggle on"
|
||||||
|
fi
|
||||||
|
|
||||||
|
CHENTRY=$(echo -e "$TOGGLE\nmanual\n$LISTB\n$LIST" | uniq -u | \
|
||||||
|
wofi -i --dmenu -p "Wi-Fi SSID: " --width "$WWIDTH" --lines ${LINENUM} --cache-file /dev/null --location $LOC --xoffset $XOFF | awk -F "[ ]{2,}" '{gsub(/<[^>]*>/, ""); print $0}')
|
||||||
|
|
||||||
|
|
||||||
|
CHSSID=$(echo "$CHENTRY" | awk -F "[ ]{2,}" '{print $2}')
|
||||||
|
|
||||||
|
# If the user inputs "manual" as their SSID in the start window, it will bring them to this screen
|
||||||
|
if [ "$CHENTRY" = "manual" ] ; then
|
||||||
|
# Manual entry of the SSID and password (if appplicable)
|
||||||
|
MSSID=$(echo "enter the SSID of the network (SSID,password)" | wofi --dmenu -p "Manual Entry: ")
|
||||||
|
# Separating the password from the entered string
|
||||||
|
MPASS=$(echo "$MSSID" | awk -F "," '{print $2}')
|
||||||
|
|
||||||
|
# If the user entered a manual password, then use the password nmcli command
|
||||||
|
if [ "$MPASS" = "" ]; then
|
||||||
|
nmcli dev wifi con "$MSSID"
|
||||||
|
else
|
||||||
|
nmcli dev wifi con "$MSSID" password "$MPASS"
|
||||||
|
fi
|
||||||
|
|
||||||
|
elif [ "$CHENTRY" = "toggle on" ]; then
|
||||||
|
nmcli radio wifi on
|
||||||
|
|
||||||
|
elif [ "$CHENTRY" = "toggle off" ]; then
|
||||||
|
nmcli radio wifi off
|
||||||
|
|
||||||
|
else
|
||||||
|
|
||||||
|
# If the connection is already in use, then this will still be able to get the SSID
|
||||||
|
if [ "$CHSSID" = "*" ]; then
|
||||||
|
CHSSID=$(echo "$CHENTRY" | sed 's/\s\{2,\}/\|/g' | awk -F "|" '{print $3}')
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Parses the list of preconfigured connections to see if it already contains the chosen SSID. This speeds up the connection process
|
||||||
|
|
||||||
|
if [[ $(echo "$KNOWNCON" | grep -w "$CHSSID") = "$CHSSID" ]]; then
|
||||||
|
nmcli con up "$CHSSID"
|
||||||
|
else
|
||||||
|
nmcli dev wifi con "$CHSSID"
|
||||||
|
fi
|
||||||
|
|
||||||
|
fi
|
41
configs/wofi/style.css
Normal file
41
configs/wofi/style.css
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
/* https://cloudninja.pw/docs/wofi.html */
|
||||||
|
window {
|
||||||
|
/* border: solid 1px white; */
|
||||||
|
background-color: black;
|
||||||
|
}
|
||||||
|
|
||||||
|
#input {
|
||||||
|
border: none;
|
||||||
|
border-radius: 0px;
|
||||||
|
background-color: white;
|
||||||
|
color: black;
|
||||||
|
font-size: 18px;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#img {
|
||||||
|
margin-right: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#outer-box {
|
||||||
|
margin: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#scroll {
|
||||||
|
margin: 5px 0px;
|
||||||
|
font-size: 16px;
|
||||||
|
color: #ccc;
|
||||||
|
}
|
||||||
|
|
||||||
|
#scroll label {
|
||||||
|
margin: 2px 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#entry:selected{
|
||||||
|
background-color: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
#text:selected{
|
||||||
|
color: black;
|
||||||
|
}
|
25
configs/wofi/sway-select-window.sh
Executable file
25
configs/wofi/sway-select-window.sh
Executable file
@ -0,0 +1,25 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
swaymsg -t get_tree | jq -r '
|
||||||
|
# descend to workspace or scratchpad
|
||||||
|
.nodes[].nodes[]
|
||||||
|
# save workspace name as .w
|
||||||
|
| {"w": .name} + (
|
||||||
|
if .nodes then # workspace
|
||||||
|
[recurse(.nodes[])]
|
||||||
|
else # scratchpad
|
||||||
|
[]
|
||||||
|
end
|
||||||
|
+ .floating_nodes
|
||||||
|
| .[]
|
||||||
|
# select nodes with no children (windows)
|
||||||
|
| select(.nodes==[])
|
||||||
|
)
|
||||||
|
| ((.id | tostring) + "\t "
|
||||||
|
# remove markup and index from workspace name, replace scratch with "[S]"
|
||||||
|
+ (.w | gsub("^[^:]*:|<[^>]*>"; "") | sub("__i3_scratch"; "[S]"))
|
||||||
|
+ "\t " + .name)
|
||||||
|
' | wofi --show dmenu -Ddynamic-lines=true --prompt=0 | {
|
||||||
|
read -r id name
|
||||||
|
swaymsg "[con_id=$id]" focus
|
||||||
|
}
|
@ -30,7 +30,6 @@ else
|
|||||||
command_=$1
|
command_=$1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
# Obtain the avaliable windows' workspaces, names and IDs as strings
|
# Obtain the avaliable windows' workspaces, names and IDs as strings
|
||||||
mapfile -t windows < <(
|
mapfile -t windows < <(
|
||||||
swaymsg -t get_tree | jq -r '[
|
swaymsg -t get_tree | jq -r '[
|
||||||
@ -39,26 +38,12 @@ swaymsg -t get_tree | jq -r '[
|
|||||||
|select(.type=="workspace")
|
|select(.type=="workspace")
|
||||||
| . as $workspace | recurse(.nodes[]?)
|
| . as $workspace | recurse(.nodes[]?)
|
||||||
|select(.type=="con" and .name!=null)
|
|select(.type=="con" and .name!=null)
|
||||||
|{workspace: $workspace.name, name: .name, id: .id, focused: .focused, app_id: .app_id, class: .window_properties.class}]
|
|{workspace: $workspace.name, name: .name, id: .id, focused: .focused, app_id: .app_id}]
|
||||||
|sort_by(.workspace, .name)[]
|
|sort_by(.workspace, .name)[]
|
||||||
|.workspace + if .focused then "* " else " " end + if .app_id then .app_id else .class end + " - " + .name + " " + (.id|tostring)'
|
|.workspace + if .focused then "* " else " " end + .app_id + " - " + .name + " " + (.id|tostring)'
|
||||||
)
|
)
|
||||||
|
rm $HOME/.cache/wofi-dmenu
|
||||||
|
|
||||||
# Obtain window list index of last active window
|
|
||||||
# todo
|
|
||||||
index_window_last_active=0
|
|
||||||
for index_window in "${!windows[@]}"
|
|
||||||
do
|
|
||||||
window="${windows[$index_window]}"
|
|
||||||
# obtain index of the active window
|
|
||||||
if [ "${window:1:1}" == "*" ]
|
|
||||||
then
|
|
||||||
index_window_last_active=$(($index_window))
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
# get window list to display
|
|
||||||
windows_separators=()
|
windows_separators=()
|
||||||
colors=(blue green orange red magenta)
|
colors=(blue green orange red magenta)
|
||||||
workspace_previous=''
|
workspace_previous=''
|
||||||
@ -96,36 +81,11 @@ do
|
|||||||
workspace_previous=$workspace
|
workspace_previous=$workspace
|
||||||
done
|
done
|
||||||
|
|
||||||
# TODO: this breaks when using i3. Comment out for now. Should only execute if running sway.
|
HEIGHT=$(( $(printf '%s\n' "${windows_separators[@]}" | wc -l) * 30 ))
|
||||||
|
|
||||||
|
echo $HEIGHT
|
||||||
# Select window with rofi, obtaining ID of selected window
|
# Select window with rofi, obtaining ID of selected window
|
||||||
#screen_pos=$(swaymsg -t get_outputs \
|
idx_selected=$(printf '%s\n' "${windows_separators[@]}" | wofi -d -p "$command_" -m -H $HEIGHT )
|
||||||
# | jq -r \
|
|
||||||
# '.[] | select(.focused).rect | "\(.width)x\(.height)\\+\(.x)\\+\(.y)"')
|
|
||||||
|
|
||||||
# ripgrep
|
|
||||||
#xwayland_output=$(xrandr | rg -oP "[A-Z]+[0-9]+(?= [a-z]+ $screen_pos)")
|
|
||||||
|
|
||||||
#monitor_id=$(rofi --help | rg $xwayland_output -B1 \
|
|
||||||
# | sed -sr '/ID/!d;s/[^:]*:\s([0-9])/\1/')
|
|
||||||
|
|
||||||
|
|
||||||
# Select window with rofi, obtaining ID of selected window
|
|
||||||
# TODO: Use multiple columns while inserting appropriate empty lines
|
|
||||||
# and adjusting line number accordingly in order to visually
|
|
||||||
# separate the list by workspace
|
|
||||||
|
|
||||||
if [ -z "$monitor_id" ]
|
|
||||||
then
|
|
||||||
idx_selected=$printf '%s\n' "${windows_separators[@]}" | rofi -dmenu -i -p "$command_" -a "$index_workspace_active" -format i -selected-row "$index_window_last_active" -no-custom -s -width 80 -lines 30 -markup-rows)
|
|
||||||
else
|
|
||||||
idx_selected=$(printf '%s\n' "${windows_separators[@]}" | rofi -monitor $monitor_id -dmenu -i -p "$command_" -a "$index_workspace_active" -format i -selected-row "$index_window_last_active" -no-custom -s -width 80 -lines 30 -markup-rows)
|
|
||||||
fi
|
|
||||||
|
|
||||||
# if no entry selected (e.g. user exitted with escape), end
|
|
||||||
if [ -z "$idx_selected" ]
|
|
||||||
then
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
selected=${windows[$idx_selected]}
|
selected=${windows[$idx_selected]}
|
||||||
id_selected=$(echo $selected | awk '{print $NF}')
|
id_selected=$(echo $selected | awk '{print $NF}')
|
||||||
workspace_selected=${selected:0:1}
|
workspace_selected=${selected:0:1}
|
||||||
@ -155,7 +115,8 @@ do
|
|||||||
done
|
done
|
||||||
|
|
||||||
# Tell sway to focus said window
|
# Tell sway to focus said window
|
||||||
|
# todo: do not execute if selected is the separator
|
||||||
if [ ! -z "$id_selected" ]
|
if [ ! -z "$id_selected" ]
|
||||||
then
|
then
|
||||||
swaymsg "[con_id=$id_selected] $command_"
|
swaymsg "[con_id=$id_selected] $command_"
|
||||||
fi(
|
fi
|
33
configs/wofi/web-search.sh
Executable file
33
configs/wofi/web-search.sh
Executable file
@ -0,0 +1,33 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# -----------------------------------------------------------------------------
|
||||||
|
# Info:
|
||||||
|
# author: Miroslav Vidovic
|
||||||
|
# file: web-search.sh
|
||||||
|
# created: 24.02.2017.-08:59:54
|
||||||
|
# revision: ---
|
||||||
|
# version: 1.0
|
||||||
|
# -----------------------------------------------------------------------------
|
||||||
|
# Requirements:
|
||||||
|
# rofi
|
||||||
|
# Description:
|
||||||
|
# Use rofi to search the web.
|
||||||
|
# Usage:
|
||||||
|
# web-search.sh
|
||||||
|
# -----------------------------------------------------------------------------
|
||||||
|
# Script:
|
||||||
|
|
||||||
|
|
||||||
|
searx="https://searx.tiekoetter.com/search?language=en&time_range=None&safesearch=0&categories=general&q="
|
||||||
|
startpage="https://www.startpage.com/sp/search?q="
|
||||||
|
|
||||||
|
query=$( wofi -d -p "Search: " -W 600 -H 100 -k ~/.cache/wofi-web)
|
||||||
|
|
||||||
|
if [[ -n "$query" ]]; then
|
||||||
|
url="$startpage$query"
|
||||||
|
xdg-open "$url"
|
||||||
|
else
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
|
exit 0
|
16
configs/wofi/wofi-power-menu.sh
Executable file
16
configs/wofi/wofi-power-menu.sh
Executable file
@ -0,0 +1,16 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
entries="⏻ Shutdown\n⭮ Reboot\n⇠ Logout\n⏾ Suspend"
|
||||||
|
|
||||||
|
selected=$(echo -e $entries|wofi --width 250 --height 210 --dmenu --cache-file /dev/null | awk '{print tolower($2)}')
|
||||||
|
|
||||||
|
case $selected in
|
||||||
|
logout)
|
||||||
|
swaymsg exit;;
|
||||||
|
suspend)
|
||||||
|
exec systemctl suspend;;
|
||||||
|
reboot)
|
||||||
|
exec systemctl reboot;;
|
||||||
|
shutdown)
|
||||||
|
exec systemctl poweroff -i;;
|
||||||
|
esac
|
Loading…
Reference in New Issue
Block a user