some new tweaks
This commit is contained in:
parent
f541e725d9
commit
01df064f68
9 changed files with 85 additions and 9 deletions
|
|
@ -8,3 +8,8 @@ dynamic_padding = true
|
||||||
|
|
||||||
[font.normal]
|
[font.normal]
|
||||||
family = "Adwaita Mono"
|
family = "Adwaita Mono"
|
||||||
|
|
||||||
|
[keyboard]
|
||||||
|
bindings = [
|
||||||
|
{ key = "Enter", mods = "Super|Shift", action = "CreateNewWindow" }
|
||||||
|
]
|
||||||
|
|
|
||||||
Binary file not shown.
|
|
@ -7,10 +7,26 @@ abbr --add adl album-dl.fish
|
||||||
abbr --add vv nvim
|
abbr --add vv nvim
|
||||||
abbr --add tr gio trash
|
abbr --add tr gio trash
|
||||||
|
|
||||||
function mvi
|
function alacritty
|
||||||
|
command alacritty msg create-window $argv
|
||||||
|
end
|
||||||
|
|
||||||
|
function mvi --description 'Launches mpv with mvi configuration'
|
||||||
mpv --config-dir=$HOME/.config/mvi/ $argv
|
mpv --config-dir=$HOME/.config/mvi/ $argv
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function open --description 'Opens a file in its default application'
|
||||||
|
argparse h/help -- $argv
|
||||||
|
or return
|
||||||
|
|
||||||
|
if set -ql _flag_help
|
||||||
|
echo "open [-h|--help] [STRING]"
|
||||||
|
return 0
|
||||||
|
end
|
||||||
|
|
||||||
|
niri msg action spawn -- xdg-open $argv
|
||||||
|
end
|
||||||
|
|
||||||
# BEGIN opam configuration
|
# BEGIN opam configuration
|
||||||
# This is useful if you're using opam as it adds:
|
# This is useful if you're using opam as it adds:
|
||||||
# - the correct directories to the PATH
|
# - the correct directories to the PATH
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,25 @@
|
||||||
function menu --description 'Opens a menu of a list of Strings and writes the result to stdout'
|
function menu --description 'Opens a menu of a list of Strings and writes the result to stdout'
|
||||||
argparse h/help -- $argv
|
argparse h/help p/prompt=? index -- $argv
|
||||||
or return
|
or return
|
||||||
|
|
||||||
if set -ql _flag_help
|
if set -ql _flag_help
|
||||||
echo "menu [-h|--help] [STRING ...]"
|
echo "menu [-h|--help] [-p|--prompt=?] [--placeholder] [--index] [STRING ...]"
|
||||||
return 0
|
return 0
|
||||||
end
|
end
|
||||||
|
|
||||||
string join -- \n $argv | fuzzel --dmenu -l (count $argv) || exit 0
|
set fuzzel_args
|
||||||
|
|
||||||
|
if set -ql _flag_prompt
|
||||||
|
set -a fuzzel_args "--prompt=$_flag_prompt"
|
||||||
|
end
|
||||||
|
|
||||||
|
if set -ql _flag_placeholder
|
||||||
|
set -a fuzzel_args "--placeholder=$_flag_placeholder"
|
||||||
|
end
|
||||||
|
|
||||||
|
if set -ql _flag_index
|
||||||
|
set -a fuzzel_args "--index"
|
||||||
|
end
|
||||||
|
|
||||||
|
string join -- \n $argv | fuzzel --dmenu -l (count $argv) $fuzzel_args || exit 0
|
||||||
end
|
end
|
||||||
|
|
|
||||||
25
.config/fish/functions/prompt.fish
Normal file
25
.config/fish/functions/prompt.fish
Normal file
|
|
@ -0,0 +1,25 @@
|
||||||
|
function prompt --description 'Opens a menu of a list of Strings and writes the result to stdout'
|
||||||
|
argparse h/help p/prompt=? placeholder=? password -- $argv
|
||||||
|
or return
|
||||||
|
|
||||||
|
if set -ql _flag_help
|
||||||
|
echo "menu [-h|--help] [-p|--prompt=?] [--placeholder=?] [--password] [STRING ...]"
|
||||||
|
return 0
|
||||||
|
end
|
||||||
|
|
||||||
|
set fuzzel_args
|
||||||
|
|
||||||
|
if set -ql _flag_prompt
|
||||||
|
set -a fuzzel_args "--prompt=$_flag_prompt"
|
||||||
|
end
|
||||||
|
|
||||||
|
if set -ql _flag_placeholder
|
||||||
|
set -a fuzzel_args "--placeholder=$_flag_placeholder"
|
||||||
|
end
|
||||||
|
|
||||||
|
if set -ql _flag_password
|
||||||
|
set -a fuzzel_args "--password=●"
|
||||||
|
end
|
||||||
|
|
||||||
|
string join -- \n $argv | fuzzel --dmenu --prompt-only='' $fuzzel_args || exit 0
|
||||||
|
end
|
||||||
|
|
@ -379,7 +379,7 @@ binds {
|
||||||
Mod+Shift+0 { show-hotkey-overlay; }
|
Mod+Shift+0 { show-hotkey-overlay; }
|
||||||
|
|
||||||
// Suggested binds for running programs: terminal, app launcher, screen locker.
|
// Suggested binds for running programs: terminal, app launcher, screen locker.
|
||||||
Mod+Return hotkey-overlay-title="Open a Terminal: alacritty" { spawn "alacritty"; }
|
Mod+Return hotkey-overlay-title="Open a Terminal: alacritty" { spawn-sh "alacritty msg create-window"; }
|
||||||
Mod+D hotkey-overlay-title="Run an Application: fuzzel" { spawn "fuzzel"; }
|
Mod+D hotkey-overlay-title="Run an Application: fuzzel" { spawn "fuzzel"; }
|
||||||
Mod+B hotkey-overlay-title="Open a Browser: qutebrowser" { spawn "qutebrowser"; }
|
Mod+B hotkey-overlay-title="Open a Browser: qutebrowser" { spawn "qutebrowser"; }
|
||||||
Super+Alt+L hotkey-overlay-title="Lock the Screen: swaylock" { spawn "swaylock"; }
|
Super+Alt+L hotkey-overlay-title="Lock the Screen: swaylock" { spawn "swaylock"; }
|
||||||
|
|
|
||||||
15
.config/systemd/user/alacritty.service
Normal file
15
.config/systemd/user/alacritty.service
Normal file
|
|
@ -0,0 +1,15 @@
|
||||||
|
[Unit]
|
||||||
|
Description=Alacritty Daemon
|
||||||
|
Before=graphical-session.target
|
||||||
|
After=graphical-session-pre.target
|
||||||
|
PartOf=graphical-session.target
|
||||||
|
StartLimitIntervalSec=30
|
||||||
|
StartLimitBurst=3
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
ExecStart=alacritty --daemon --socket %t/alacritty.sock
|
||||||
|
Restart=on-failure
|
||||||
|
RestartSec=5s
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=graphical-session-pre.target
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
/home/never/.config/systemd/user/alacritty.service
|
||||||
|
|
@ -42,9 +42,9 @@ function audio_source
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
set input (menu $names)
|
set input (math (menu --index $names) + 1)
|
||||||
|
|
||||||
wpctl set-default $ids[(contains -i $input $names)]
|
wpctl set-default $ids[$input]
|
||||||
end
|
end
|
||||||
|
|
||||||
function audio_sink
|
function audio_sink
|
||||||
|
|
@ -61,9 +61,9 @@ function audio_sink
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
set input (menu $names)
|
set input (math (menu --index $names) + 1)
|
||||||
|
|
||||||
wpctl set-default $ids[(contains -i $input $names)]
|
wpctl set-default $ids[$input]
|
||||||
end
|
end
|
||||||
|
|
||||||
set options " Open Location" " Select Audio Source" " Select Audio Sink"
|
set options " Open Location" " Select Audio Source" " Select Audio Sink"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue