Make gnome keyring work

This commit is contained in:
Jimbo 2024-10-01 18:18:26 -04:00
parent 01362f145f
commit 1a096662e1
9 changed files with 16 additions and 36 deletions

View file

@ -4,7 +4,7 @@
qbittorrent
libreoffice-fresh
vesktop
element-desktop
fractal
ffmpegthumbnailer
thunderbird
protonvpn-cli_2

View file

@ -25,7 +25,7 @@
# Foreground apps
{command = "librewolf -P Misc --name=MiscBrowser";}
{command = "vesktop";}
{command = "element-desktop";}
{command = "fractal";}
{command = "thunderbird";}
];
};

View file

@ -139,8 +139,7 @@
# Screenshots
"Print" = ''exec swayshot --swappy'';
"${primeMod}+Shift+f" = ''exec swayshot --swappy'';
"Shift+Print" = ''exec swayshot --current'';
"Ctrl+Print" = ''exec swayshot --all'';
"Shift+Print" = ''exec swayshot --screen'';
# Server SSH
"${primeMod}+Ctrl+Return" = ''exec foot ssh ${outputs.ips.server} -p 2222'';

View file

@ -118,7 +118,7 @@
# Communication
"${outputs.ws.w3a}" = [{class = "zoom";}];
"${outputs.ws.w7}" = [{app_id = "MiscBrowser";} {app_id = "vesktop";} {class = "vesktop";}];
"${outputs.ws.w8}" = [{app_id = "Element";} {class = "Element";}];
"${outputs.ws.w8}" = [{app_id = "org.gnome.Fractal";}];
"${outputs.ws.w9}" = [{app_id = "thunderbird";}];
# Else

View file

@ -5,7 +5,7 @@
# Swappy
handle_swappy() {
# Create an imv window to act as a static screen
grim -t jpeg - | imv -w "GlobalShot" - & imv_pid=$!
grim -t jpeg -q 90 - | imv -w "GlobalShot" - & imv_pid=$!
# Capture the screenshot of the selected area and save to a temporary file
selected_area=$(swaymsg -t get_tree | jq -r '.. | select(.pid? and .visible?) | .rect | "\(.x),\(.y) \(.width)x\(.height)"'\
@ -23,8 +23,8 @@
rm "$temp_file"
}
# Current
handle_current() {
# Screen
handle_screen() {
# Take a screenshot and save it to the temporary file
temp_file=$(mktemp -u).png
grim -o $(swaymsg -t get_outputs | jq -r '.[] | select(.focused) | .name') "$temp_file"
@ -45,37 +45,13 @@
fi
}
# All screens
handle_all() {
# Take a screenshot and save it to the temporary file
temp_file=$(mktemp -u).png
grim -t jpeg "$temp_file"
# Check if the screenshot was successfully taken
if [ $? -eq 0 ]; then
# Copy the screenshot to the clipboard
wl-copy < "$temp_file"
# Show a notification with the screenshot
notify-send -i "$temp_file" "All screen copied."
# Remove the temporary file
rm "$temp_file"
else
# If the screenshot capture failed, show an error notification
notify-send "Error: Unable to capture screenshot."
fi
}
# Check for command-line arguments
if [ "$1" == "--swappy" ]; then
handle_swappy
elif [ "$1" == "--current" ]; then
handle_current
elif [ "$1" == "--all" ]; then
handle_all
elif [ "$1" == "--screen" ]; then
handle_screen
else
echo "Please use the arguments swappy, current, or all."
echo "Please use the arguments --swappy or --screen."
fi
'';
in with pkgs; [

View file

@ -33,6 +33,7 @@
# Services
./services/openssh.nix
./services/gnome-keyring.nix
./services/qemukvm.nix
#./services/waydroid.nix
./services/udev.nix

View file

@ -33,6 +33,7 @@
# Services
./services/openssh.nix
./services/gnome-keyring.nix
./services/udev.nix
./services/mpd.nix
];

View file

@ -34,7 +34,7 @@
# Services
./services/openssh.nix
./services/udev.nix
./services/gnome-keyring.nix
./services/mpd.nix
];

View file

@ -0,0 +1,3 @@
{
services.gnome.gnome-keyring.enable = true;
}