Make gnome keyring work
This commit is contained in:
parent
01362f145f
commit
1a096662e1
|
@ -4,7 +4,7 @@
|
||||||
qbittorrent
|
qbittorrent
|
||||||
libreoffice-fresh
|
libreoffice-fresh
|
||||||
vesktop
|
vesktop
|
||||||
element-desktop
|
fractal
|
||||||
ffmpegthumbnailer
|
ffmpegthumbnailer
|
||||||
thunderbird
|
thunderbird
|
||||||
protonvpn-cli_2
|
protonvpn-cli_2
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
# Foreground apps
|
# Foreground apps
|
||||||
{command = "librewolf -P Misc --name=MiscBrowser";}
|
{command = "librewolf -P Misc --name=MiscBrowser";}
|
||||||
{command = "vesktop";}
|
{command = "vesktop";}
|
||||||
{command = "element-desktop";}
|
{command = "fractal";}
|
||||||
{command = "thunderbird";}
|
{command = "thunderbird";}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
|
@ -139,8 +139,7 @@
|
||||||
# Screenshots
|
# Screenshots
|
||||||
"Print" = ''exec swayshot --swappy'';
|
"Print" = ''exec swayshot --swappy'';
|
||||||
"${primeMod}+Shift+f" = ''exec swayshot --swappy'';
|
"${primeMod}+Shift+f" = ''exec swayshot --swappy'';
|
||||||
"Shift+Print" = ''exec swayshot --current'';
|
"Shift+Print" = ''exec swayshot --screen'';
|
||||||
"Ctrl+Print" = ''exec swayshot --all'';
|
|
||||||
|
|
||||||
# Server SSH
|
# Server SSH
|
||||||
"${primeMod}+Ctrl+Return" = ''exec foot ssh ${outputs.ips.server} -p 2222'';
|
"${primeMod}+Ctrl+Return" = ''exec foot ssh ${outputs.ips.server} -p 2222'';
|
||||||
|
|
|
@ -118,7 +118,7 @@
|
||||||
# Communication
|
# Communication
|
||||||
"${outputs.ws.w3a}" = [{class = "zoom";}];
|
"${outputs.ws.w3a}" = [{class = "zoom";}];
|
||||||
"${outputs.ws.w7}" = [{app_id = "MiscBrowser";} {app_id = "vesktop";} {class = "vesktop";}];
|
"${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";}];
|
"${outputs.ws.w9}" = [{app_id = "thunderbird";}];
|
||||||
|
|
||||||
# Else
|
# Else
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
# Swappy
|
# Swappy
|
||||||
handle_swappy() {
|
handle_swappy() {
|
||||||
# Create an imv window to act as a static screen
|
# 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
|
# 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)"'\
|
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"
|
rm "$temp_file"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Current
|
# Screen
|
||||||
handle_current() {
|
handle_screen() {
|
||||||
# Take a screenshot and save it to the temporary file
|
# Take a screenshot and save it to the temporary file
|
||||||
temp_file=$(mktemp -u).png
|
temp_file=$(mktemp -u).png
|
||||||
grim -o $(swaymsg -t get_outputs | jq -r '.[] | select(.focused) | .name') "$temp_file"
|
grim -o $(swaymsg -t get_outputs | jq -r '.[] | select(.focused) | .name') "$temp_file"
|
||||||
|
@ -45,37 +45,13 @@
|
||||||
fi
|
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
|
# Check for command-line arguments
|
||||||
if [ "$1" == "--swappy" ]; then
|
if [ "$1" == "--swappy" ]; then
|
||||||
handle_swappy
|
handle_swappy
|
||||||
elif [ "$1" == "--current" ]; then
|
elif [ "$1" == "--screen" ]; then
|
||||||
handle_current
|
handle_screen
|
||||||
elif [ "$1" == "--all" ]; then
|
|
||||||
handle_all
|
|
||||||
else
|
else
|
||||||
echo "Please use the arguments swappy, current, or all."
|
echo "Please use the arguments --swappy or --screen."
|
||||||
fi
|
fi
|
||||||
'';
|
'';
|
||||||
in with pkgs; [
|
in with pkgs; [
|
||||||
|
|
|
@ -33,6 +33,7 @@
|
||||||
|
|
||||||
# Services
|
# Services
|
||||||
./services/openssh.nix
|
./services/openssh.nix
|
||||||
|
./services/gnome-keyring.nix
|
||||||
./services/qemukvm.nix
|
./services/qemukvm.nix
|
||||||
#./services/waydroid.nix
|
#./services/waydroid.nix
|
||||||
./services/udev.nix
|
./services/udev.nix
|
||||||
|
|
|
@ -33,6 +33,7 @@
|
||||||
|
|
||||||
# Services
|
# Services
|
||||||
./services/openssh.nix
|
./services/openssh.nix
|
||||||
|
./services/gnome-keyring.nix
|
||||||
./services/udev.nix
|
./services/udev.nix
|
||||||
./services/mpd.nix
|
./services/mpd.nix
|
||||||
];
|
];
|
||||||
|
|
|
@ -34,7 +34,7 @@
|
||||||
|
|
||||||
# Services
|
# Services
|
||||||
./services/openssh.nix
|
./services/openssh.nix
|
||||||
./services/udev.nix
|
./services/gnome-keyring.nix
|
||||||
./services/mpd.nix
|
./services/mpd.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
3
system/services/gnome-keyring.nix
Normal file
3
system/services/gnome-keyring.nix
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
services.gnome.gnome-keyring.enable = true;
|
||||||
|
}
|
Loading…
Reference in a new issue