feat: use grim, slurp and satty for screenshots
This commit is contained in:
@@ -109,9 +109,6 @@ if status is-interactive
|
|||||||
echo -n $white'─'$__fish_prompt_char $normal
|
echo -n $white'─'$__fish_prompt_char $normal
|
||||||
end
|
end
|
||||||
|
|
||||||
# NOTE: disable `VIRTUAL_ENV_DISABLE_PROMPT` in `config.fish`
|
|
||||||
# see: https://virtualenv.pypa.io/en/latest/reference/#envvar-VIRTUAL_ENV_DISABLE_PROMPT
|
|
||||||
# support for virtual env name
|
|
||||||
if set -q VIRTUAL_ENV
|
if set -q VIRTUAL_ENV
|
||||||
echo -n "($turquoise"(basename "$VIRTUAL_ENV")"$white)"
|
echo -n "($turquoise"(basename "$VIRTUAL_ENV")"$white)"
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -3,13 +3,12 @@ local function exit_submap()
|
|||||||
end
|
end
|
||||||
|
|
||||||
-- TODO: Update this for laptop
|
-- TODO: Update this for laptop
|
||||||
hl.bind("code:232", hl.dsp.exec_cmd("brightnessctl -S"), { description = "Doesn't do anything yet" })
|
hl.bind("code:232", hl.dsp.exec_cmd("brightnessctl set 5%-"), { description = "Decrease screen brightness" })
|
||||||
-- bind = ,code:232, exec, light -U 5 && notify-send 'Display brightness decreased by 5%'
|
hl.bind("code:233", hl.dsp.exec_cmd("brightnessctl set +5%"), { description = "Increase screen brightness" })
|
||||||
-- bind = ,code:233, exec, light -A 5 && notify-send 'Display brightness increased by 5%'
|
|
||||||
|
|
||||||
hl.bind("code:123", hl.dsp.exec_cmd("pamixer -i 5"), { description = "Increase volume by 5%" })
|
hl.bind("code:123", hl.dsp.exec_cmd("wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+"), { description = "Increase volume by 5%" })
|
||||||
hl.bind("code:122", hl.dsp.exec_cmd("pamixer -d 5"), { description = "Decrease volume by 5%" })
|
hl.bind("code:122", hl.dsp.exec_cmd("wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-"), { description = "Decrease volume by 5%" })
|
||||||
hl.bind("code:121", hl.dsp.exec_cmd("pamixer t"), { description = "Open mixer" })
|
hl.bind("code:121", hl.dsp.exec_cmd("hyprpwcenter"), { description = "Open mixer" })
|
||||||
|
|
||||||
hl.define_submap("device", function()
|
hl.define_submap("device", function()
|
||||||
hl.bind("m", function()
|
hl.bind("m", function()
|
||||||
|
|||||||
@@ -5,8 +5,6 @@ end
|
|||||||
hl.bind("SUPER + SHIFT + H", hl.dsp.group.prev(), { description = "Go to previous group member" })
|
hl.bind("SUPER + SHIFT + H", hl.dsp.group.prev(), { description = "Go to previous group member" })
|
||||||
hl.bind("SUPER + SHIFT + L", hl.dsp.group.next(), { description = "Go to next group member" })
|
hl.bind("SUPER + SHIFT + L", hl.dsp.group.next(), { description = "Go to next group member" })
|
||||||
|
|
||||||
-- TODO: Improve mapping (also global mapping, for moving between els if to use regularly)
|
|
||||||
-- Improve colours
|
|
||||||
hl.define_submap("groups", function()
|
hl.define_submap("groups", function()
|
||||||
hl.bind("c", function()
|
hl.bind("c", function()
|
||||||
hl.dispatch(hl.dsp.group.toggle())
|
hl.dispatch(hl.dsp.group.toggle())
|
||||||
|
|||||||
@@ -4,32 +4,40 @@ end
|
|||||||
|
|
||||||
hl.define_submap("screenshot", function()
|
hl.define_submap("screenshot", function()
|
||||||
hl.bind("y", function()
|
hl.bind("y", function()
|
||||||
hl.dispatch(hl.dsp.exec_cmd("dms screenshot --no-file"))
|
hl.dispatch(hl.dsp.exec_cmd('grim -g "$(slurp -d)" - | wl-copy'))
|
||||||
exit_submap()
|
exit_submap()
|
||||||
end, { description = "Take sceenshot of are and Yank" })
|
end, { description = "Take sceenshot of area and Yank" })
|
||||||
|
|
||||||
hl.bind("c", function()
|
hl.bind("c", function()
|
||||||
hl.dispatch(hl.dsp.exec_cmd("dms screenshot"))
|
hl.dispatch(
|
||||||
|
hl.dsp.exec_cmd(
|
||||||
|
'grim -g "$(slurp -d)" - | satty -f - --copy-command wl-copy -o "~/Pictures/Screenshots/%Y-%m-%dT%H:%M:%SZ%z.png"'
|
||||||
|
)
|
||||||
|
)
|
||||||
exit_submap()
|
exit_submap()
|
||||||
end, { description = "Take screenshot of area, yank and save" })
|
end, { description = "Take screenshot of area, yank and save" })
|
||||||
|
|
||||||
hl.bind("s", function()
|
hl.bind("s", function()
|
||||||
hl.dispatch(hl.dsp.exec_cmd("dms screenshot --no-clipboard"))
|
hl.dispatch(hl.dsp.exec_cmd("grim -g '$(slurp -d)' $(xdg-user-dir PICTURES)/Screenshots/$(date +'%Y-%m-%dT%H:%M:%SZ%z.png')"))
|
||||||
exit_submap()
|
exit_submap()
|
||||||
end, { description = "Take screenshot of area and Save" })
|
end, { description = "Take screenshot of area and Save" })
|
||||||
|
|
||||||
hl.bind("SHIFT + y", function()
|
hl.bind("SHIFT + y", function()
|
||||||
hl.dispatch(hl.dsp.exec_cmd("dms screenshot full --no-file"))
|
hl.dispatch(hl.dsp.exec_cmd("grim - | wl-copy"))
|
||||||
exit_submap()
|
exit_submap()
|
||||||
end, { description = "Take screenshot and Yank" })
|
end, { description = "Take screenshot and Yank" })
|
||||||
|
|
||||||
hl.bind("SHIFT + c", function()
|
hl.bind("SHIFT + c", function()
|
||||||
hl.dispatch(hl.dsp.exec_cmd("dms screenshot full"))
|
hl.dispatch(
|
||||||
|
hl.dsp.exec_cmd(
|
||||||
|
'grim - | satty -f - --copy-command wl-copy -o "~/Pictures/Screenshots/%Y-%m-%dT%H:%M:%SZ%z.png"'
|
||||||
|
)
|
||||||
|
)
|
||||||
exit_submap()
|
exit_submap()
|
||||||
end, { description = "Take sceenshot, yank and save" })
|
end, { description = "Take sceenshot, yank and save" })
|
||||||
|
|
||||||
hl.bind("SHIFT + s", function()
|
hl.bind("SHIFT + s", function()
|
||||||
hl.dispatch(hl.dsp.exec_cmd("dms screenshot full --no-clipboard"))
|
hl.dispatch(hl.dsp.exec_cmd("grim $(xdg-user-dir PICTURES)/Screenshots/$(date +'%Y-%m-%dT%H:%M:%SZ%z.png')"))
|
||||||
exit_submap()
|
exit_submap()
|
||||||
end, { description = "Take screenshot and Save" })
|
end, { description = "Take screenshot and Save" })
|
||||||
|
|
||||||
|
|||||||
@@ -18,7 +18,6 @@ hl.config({
|
|||||||
|
|
||||||
dim_inactive = true,
|
dim_inactive = true,
|
||||||
dim_strength = 0.1,
|
dim_strength = 0.1,
|
||||||
-- TODO: Consider adding glow?
|
|
||||||
},
|
},
|
||||||
animations = {
|
animations = {
|
||||||
enabled = true,
|
enabled = true,
|
||||||
|
|||||||
@@ -21,3 +21,6 @@ rga
|
|||||||
resvg
|
resvg
|
||||||
wl-clipboard
|
wl-clipboard
|
||||||
nextcloud-client
|
nextcloud-client
|
||||||
|
slurp
|
||||||
|
grim
|
||||||
|
satty
|
||||||
|
|||||||
Reference in New Issue
Block a user