Compare commits

...

27 commits
0.1 ... main

Author SHA1 Message Date
Penelope Gwen
39b844c850 wofi menus use static order to display options 2025-04-17 19:46:19 +00:00
Penelope Gwen
492bd9b0e1 3.14 2025-03-14 16:03:47 -07:00
Penelope Gwen
984bff1c74 original 3.13 2025-03-14 16:01:12 -07:00
Penelope Gwen
e19fdbe368 0.3.13 2025-03-14 15:53:53 -07:00
Penelope Gwen
1882b58821 fix variable substitution in configs 2025-02-28 10:32:11 +00:00
Penelope Gwen
c73f984982 proper array implementation, browser-newtab added 2025-02-28 00:05:16 -08:00
Penelope Gwen
4075d29444 0.3.11 2025-02-28 07:31:19 +00:00
Penelope Gwen
f2fb841deb implement get_profile_name functionality 2025-02-28 07:31:01 +00:00
Penelope Gwen
41d0a72bbd merge 0.3.9 original commits 2025-02-28 07:27:48 +00:00
Penelope Gwen
7279d4685c 0.3.9 2025-02-28 07:26:01 +00:00
Penelope Gwen
1357d1ca01 version 0.3.9, 0.3.10 2025-02-28 00:50:52 +00:00
Penelope Gwen
f65b512bfc 0.3.8 2025-01-04 18:38:57 -08:00
Penelope Gwen
18a199cf11 revised locking for version 0.3.8 2025-01-04 18:38:46 -08:00
Penelope Gwen
3f86dd0848 clean build files 2025-01-04 18:22:37 -08:00
Penelope Gwen
3493dfb909 v0.3.7 2024-10-29 14:21:32 -07:00
Penelope Gwen
491fd04437 made clipboard length customizable 2024-07-26 13:31:05 -06:00
Penelope Gwen
b9e56f8cd4 disable unnecessary waybar reload 2024-06-25 02:33:27 -06:00
Penelope Gwen
39208e1eec remove waybar reload 2024-06-25 02:32:23 -06:00
Penelope Gwen
3be80d68b4 correct sp-lock gtklock arguments 2024-06-15 22:55:05 -06:00
Penelope Gwen
e8bed249df use gtklock instead of swaylock 2024-06-15 12:25:22 -06:00
Penelope Gwen
f6c10a7c5c added some waybar support 2024-06-11 13:13:43 -06:00
Penelope Gwen
ddb53a836e added some waybar support 2024-06-11 13:06:21 -06:00
Penelope Gwen
5282d13176 added sp-lock lock script 2024-06-05 15:45:07 -06:00
Penelope Gwen
74d77b3fb4 added sp-lock unlock script 2024-06-05 15:34:34 -06:00
Penelope Gwen
955995c3ad added sp-lock unlock script 2024-06-05 15:31:32 -06:00
d8cbb2c138 Update sp-powermenu 2024-06-04 04:09:43 -06:00
5082c25dc6 Update changelog 2024-06-04 04:09:20 -06:00
14 changed files with 168 additions and 26 deletions

View file

@ -1,13 +1,15 @@
#!/bin/bash #!/bin/bash
source "/usr/lib/sp-functions"
source "${conf_dir}/config"
cb_count=$(copyq count) cb_count=$(copyq count)
cb_count=10 cb_count="${clipboard_length}"
wofilist="" wofilist=""
for i in $(seq $cb_count);do for i in $(seq $cb_count);do
cb_line="$( copyq read $((${i}-1)) | tr '\n' ' ' )" cb_line="$( copyq read $((${i}-1)) | tr '\n' ' ' )"
echo "${cb_line}"
if [[ "${cb_line}" == "" ]];then if [[ "${cb_line}" == "" ]];then
cb_line=$( copyq read ? "$((${i}-1))" | head -n 1 ) cb_line=$( copyq read ? "$((${i}-1))" | head -n 1 )
fi fi

View file

@ -3,6 +3,6 @@
source "/usr/lib/sp-functions" source "/usr/lib/sp-functions"
options=$( ls "${conf_dir}/global-shortcuts/" ) options=$( ls "${conf_dir}/global-shortcuts/" )
op=$( echo -e "${options}" | wofi -i --dmenu | awk '{print}' ) op=$( echo -e "${options}" | wofi -i --dmenu -k /dev/null | awk '{print}' )
"${conf_dir}/global-shortcuts/${op}" "${conf_dir}/global-shortcuts/${op}"

View file

@ -1,17 +1,22 @@
#!/bin/bash #!/bin/bash
source "/usr/lib/sp-functions" source "/usr/lib/sp-functions"
source "${conf_dir}/config"
case $1 in case $1 in
file_manager ) file_manager )
launch_exec=${filemanager_cmd} launch_exec=${filemanager_cmd}
launch_arg=$( jq -r .[].home_directory "${conf_dir}/profiles/$( get_profile_id )/vars.json" ) launch_arg=($( jq -r .[].home_directory "${conf_dir}/profiles/$( get_profile_id )/vars.json" | envsubst ))
;; ;;
browser ) browser )
launch_exec=${browser_cmd} launch_exec=${browser_cmd}
launch_arg=$( jq -r .[].browser_profile "${conf_dir}/profiles/$( get_profile_id )/vars.json" ) launch_arg=($( jq -r .[].browser_profile "${conf_dir}/profiles/$( get_profile_id )/vars.json" ))
;;
browser-newtab )
launch_exec=${browser_cmd}
launch_arg=($( jq -r .[].browser_profile "${conf_dir}/profiles/$( get_profile_id )/vars.json" ))
launch_arg+=( "--new-tab" )
launch_arg+=($( jq -r .[].browser_newtab_url "${conf_dir}/profiles/$( get_profile_id )/vars.json" ))
;; ;;
esac esac
bash -c "${launch_exec} ${launch_arg}" ${launch_exec} "${launch_arg[@]}"

View file

@ -1,16 +1,22 @@
#!/bin/bash #!/bin/bash
source "/usr/lib/sp-functions" source "/usr/lib/sp-functions"
lock_script="${conf_dir}/lockscript"
unlock_script="${conf_dir}/unlockscript"
outputs=( $(swaymsg -t get_outputs | jq -r '.[] | {name} | "\(.name)"') ) if [ -f "${lock_script}" ]; then
bash -c "${lock_script}"
for o in ${outputs[@]};do fi
workspace=$(swaymsg -t get_workspaces | jq -r '.[] | select(.output) | {name} | "\(.name)"') lock_args=()
wpno=$(cat "${cache_dir}/displays/${o}") for s in "/usr/lib/$(uname -m)-linux-gnu/gtklock/"*"-module.so";do
wp_imgpath="${conf_dir}/wallpaper/${o}/${wpno}.jpg" lock_args+=("-m")
sl_imgpath="${cache_dir}/lock/${o}.jpg" lock_args+=("${s}")
convert -scale 10% -blur 0x3 -resize 500% "${wp_imgpath}" "${sl_imgpath}"
sl_args="${sl_args}--image ${o}:${sl_imgpath} "
done done
if [ ! -z "${lock_monitor}" ];then
swaylock ${sl_args} lock_args+=("-M")
lock_args+=("${lock_monitor}")
fi
gtklock -s "${HOME}/.config/gtklock/style.css" "${lock_args[@]}"
if [ -f "${unlock_script}" ]; then
bash -c "${unlock_script}"
fi

View file

@ -1,6 +1,6 @@
#!/usr/bin/env bash #!/usr/bin/env bash
op=$( echo -e " Reload\n⏻ Poweroff\n Reboot\n Suspend\n🔒 Lock\n Logout" | wofi -i --dmenu -a | awk '{print tolower($2)}' ) op=$( echo -e "⏻ Poweroff\n Reboot\n Suspend\n Lock\n Logout" | wofi -i --dmenu -a -k /dev/null | awk '{print tolower($2)}' )
case $op in case $op in
poweroff) poweroff)
;& ;&

5
bin/sp-profile Executable file
View file

@ -0,0 +1,5 @@
#!/bin/bash
source "/usr/lib/sp-functions"
get_profile_name `cat ~/.cache/sway-profiles/active_profile`

5
bin/sp-profile-icon Executable file
View file

@ -0,0 +1,5 @@
#!/bin/bash
source "/usr/lib/sp-functions"
get_profile_icon `cat ~/.cache/sway-profiles/active_profile`

View file

@ -5,7 +5,7 @@ source "/usr/lib/sp-functions"
get_profile_list get_profile_list
case $1 in case $1 in
next|prev) next|prev|reload)
current_profile=$(cat "${cache_dir}/active_profile") current_profile=$(cat "${cache_dir}/active_profile")
echo ${current_profile} echo ${current_profile}
;;& ;;&
@ -17,7 +17,10 @@ case $1 in
new_profile=$(( ${current_profile}-1 )) new_profile=$(( ${current_profile}-1 ))
[[ "$new_profile" -eq "-1" ]] && new_profile=3 [[ "$new_profile" -eq "-1" ]] && new_profile=3
;;& ;;&
prev|next) reload)
new_profile=${current_profile}
;;&
prev|next|reload)
op=$(printf "%01d\n" ${new_profile}) op=$(printf "%01d\n" ${new_profile})
;; ;;
*) *)

View file

@ -3,7 +3,7 @@
source "/usr/lib/sp-functions" source "/usr/lib/sp-functions"
source "${conf_dir}/config" source "${conf_dir}/config"
op=$( echo -e "Output\nWindow\nRegion" | wofi -i --dmenu --width 250 --height 260 | awk '{print tolower($1)}' ) op=$( echo -e "Output\nWindow\nRegion" | wofi -i --dmenu --width 250 --height 260 -k /dev/null | awk '{print tolower($1)}' )
echo "$op" echo "$op"

View file

@ -5,6 +5,6 @@ source "/usr/lib/sp-functions"
current_profile=$( get_profile_id ) current_profile=$( get_profile_id )
profile_scripts=$( ls "${conf_dir}/profiles/${current_profile}/shortcuts/" ) profile_scripts=$( ls "${conf_dir}/profiles/${current_profile}/shortcuts/" )
op=$( echo -e "${profile_scripts}" | wofi -w 2 -i --dmenu | awk '{print}' ) op=$( echo -e "${profile_scripts}" | wofi -w 2 -i --dmenu -k /dev/null | awk '{print}' )
"${conf_dir}/profiles/${current_profile}/shortcuts/${op}" "${conf_dir}/profiles/${current_profile}/shortcuts/${op}"

View file

@ -11,6 +11,9 @@ setbg() {
for d in ${outputs[@]};do for d in ${outputs[@]};do
d_wpno=$(cat "${cache_dir}/displays/${d}") d_wpno=$(cat "${cache_dir}/displays/${d}")
swaymsg output "${d}" bg "${conf_dir}/wallpaper/${d}/${d_wpno}.jpg" fill swaymsg output "${d}" bg "${conf_dir}/wallpaper/${d}/${d_wpno}.jpg" fill
wp_imgpath="${conf_dir}/wallpaper/${d}/${d_wpno}.jpg"
sl_imgpath="${cache_dir}/lock/${d}.jpg"
convert -scale 10% -blur 0x3 -resize 500% "${wp_imgpath}" "${sl_imgpath}" &
done done
} }

106
debian/changelog vendored
View file

@ -1,3 +1,109 @@
sway-profiles (0.3.15) unstable; urgency=medium
* all wofi menus now output cache to /dev/null to remain ordered statically
-- Penelope Gwen <support@pogmom.me> Thu, 17 Apr 2025 19:44:29 +0000
sway-profiles (0.3.14) unstable; urgency=medium
* added sp-profiles reload
-- Penelope Gwen <support@pogmom.me> Fri, 14 Mar 2025 22:52:33 +0000
sway-profiles (0.3.13) unstable; urgency=medium
* corrected lock character in sp-powermenu
-- Penelope Gwen <penelope@pogmom.me> Tue, 04 Mar 2025 22:00:00 +0000
sway-profiles (0.3.12) unstable; urgency=medium
* fix variable substitution in configs
-- Penelope Gwen <penelope@pogmom.me> Fri, 28 Feb 2025 10:30:49 +0000
sway-profiles (0.3.11) unstable; urgency=medium
* add sp-profile command which returns profile name
* add browser-newtab command to sp-launcher
-- Penelope Gwen <penelope@pogmom.me> Fri, 28 Feb 2025 07:27:58 +0000
sway-profiles (0.3.10) unstable; urgency=medium
* better support for gtklock modules
-- Penelope Gwen <penelope@pogmom.me> Fri, 28 Feb 2025 00:47:10 +0000
sway-profiles (0.3.9) unstable; urgency=medium
* support for gtklock modules
* support for gtklock preferred monitor by setting 'lock_monitor' variable in config
* support for config.d
-- Penelope Gwen <support@pogmom.me> Wed, 26 Feb 2025 18:24:28 +0000
sway-profiles (0.3.8) unstable; urgency=medium
* sp-wallpaper now handles creation of lockscreen wallpapers for faster locking
* removed legacy swaylock code from sp-lock
-- Penelope Gwen <support@pogmom.me> Sun, 05 Jan 2025 02:36:39 +0000
sway-profiles (0.3.7) unstable; urgency=medium
* sp-profile-icon now returns active profile rather than active workspace profile
-- Penelope Gwen <support@pogmom.me> Tue, 29 Oct 2024 14:17:59 -0700
sway-profiles (0.3.6) unstable; urgency=medium
* make clipboard length customizable
-- Penelope Gwen <support@pogmom.me> Fri, 26 Jul 2024 13:29:45 -0600
sway-profiles (0.3.5) unstable; urgency=medium
* disable unnecessary waybar reload
-- Penelope Gwen <support@pogmom.me> Tue, 25 Jun 2024 02:32:59 -0600
sway-profiles (0.3.4) unstable; urgency=medium
* ensure that gtklock uses css file
-- Penelope Gwen <support@pogmom.me> Sat, 15 Jun 2024 22:53:59 -0600
sway-profiles (0.3.3) unstable; urgency=medium
* use gtklock instead of swaylock
-- Penelope Gwen <support@pogmom.me> Sat, 15 Jun 2024 12:15:42 -0600
sway-profiles (0.3.2) unstable; urgency=medium
* added some basic waybar integration
-- Penelope Gwen <support@pogmom.me> Tue, 11 Jun 2024 13:12:58 -0600
sway-profiles (0.3.1) unstable; urgency=medium
* added sp-lock lock scripts
-- Penelope Gwen <support@pogmom.me> Wed, 05 Jun 2024 15:44:39 -0600
sway-profiles (0.3) unstable; urgency=medium
* added sp-lock unlock scripts
-- Penelope Gwen <support@pogmom.me> Wed, 05 Jun 2024 15:29:28 -0600
sway-profiles (0.2) unstable; urgency=medium
* Remove dangling option from sp-powermenu.
-- Penelope Gwen <support@pogmom.me> Thu, 4 Jun 2024 04:08:33 -0600
sway-profiles (0.1) unstable; urgency=medium sway-profiles (0.1) unstable; urgency=medium
* Initial release. * Initial release.

2
debian/control vendored
View file

@ -16,7 +16,7 @@ Depends:
Recommends: Recommends:
wofi, wofi,
fonts-font-awesome, fonts-font-awesome,
swaylock, gtklock,
imagemagick imagemagick
Suggests: Suggests:
copyq, copyq,

View file

@ -3,6 +3,10 @@
conf_dir="$HOME/.config/sway-profiles" conf_dir="$HOME/.config/sway-profiles"
cache_dir="$HOME/.cache/sway-profiles" cache_dir="$HOME/.cache/sway-profiles"
source "${conf_dir}/config"
for c in "${conf_dir}/config.d/"*;do
source "${c}"
done
mkdir -p "${cache_dir}/"{displays,lock,screenshots} mkdir -p "${cache_dir}/"{displays,lock,screenshots}
@ -32,7 +36,9 @@ get_profile_id(){
} }
get_profile_name(){ get_profile_name(){
echo "test" get_profile_list
[ -z "${1}" ] && p=`get_active_profile` || p="${1}"
echo "${p_names[ ${p} ]}"
} }
get_profile_list(){ get_profile_list(){
@ -47,5 +53,6 @@ get_profile_list(){
get_profile_icon(){ get_profile_icon(){
get_profile_list get_profile_list
echo "${p_icons[ $( get_profile_id ) ]}" [ -z "${1}" ] && p=`get_active_profile` || p="${1}"
echo "${p_icons[ ${p} ]}"
} }