this post was submitted on 02 Sep 2023
75 points (97.5% liked)

Linux

48329 readers
785 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
 

Edit: Everything seems too complicated, so I just went with this https://odysee.com/simplescreenrecorder-2023-09-03_11.02.17:a When you try to copy something, you copy something and then you paste it. This is fine, but I wish there was an app which would help me copy multiple items at different times and seamlessly help me paste it.

i.e., copy two things, press ctrl + v to paste the last thing you copied and press ctrl + shift + v to paste the last second thing you copied and so on.

I am pretty sure there are better ways to do this than what I am asking. So, I would be interested in those ways too.

you can’t only install kclipper that’s the app?

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 2 points 1 year ago (2 children)

It would be a hell of a reason to switch DE, but KDE has a clipboard taskbar item. It remembers all your copies (until you clear the list), and you can click on an item to bring it back.

this is a robbery, give me your command and tell me how you bound it :')

I don't know

[–] [email protected] 3 points 1 year ago* (last edited 1 year ago) (1 children)

First I have this systemd user service at ~/.config/systemd/user/copyq.service:

[Install]
WantedBy=graphical-session.target

[Service]
ExecStart=/nix/store/9qni1by8lzjccm5pc4hqpm70f3wllfqg-CopyQ-unstable-2023-04-14/bin/copyq
KillMode=process
KillSignal=SIGINT
Type=simple

[Unit]
After=graphical-session.target
Description=CopyQ, a clipboard manager
Documentation=man:copyq(5)
Requires=graphical-session.target
Wants=graphical-session.target

Replace the /nix/store/9qni1by8lzjccm5pc4hqpm70f3wllfqg-CopyQ-unstable-2023-04-14/bin/copyq with /usr/bin/copyq or wherever your copyq is installed. Then you probably need to reload the systemd daemon or something, not sure (try systemctl --user daemon-reload and then systemctl --user enable copyq.service and then systemctl --user start copyq.service - you only need to do this once).

This service needs to be running for CopyQ to work. Alternatively use any other way you're familiar with to automatically start copyq server after you log in. Trust me, there's nothing more frustrating then suddenly needing it and realizing you haven't started the server so it doesn't have the content you're looking for.

Afterwards you need to configure your desktop environment to assign a global shortcut for the command copyq menu. For example in Cinnamon it's System Settings -> Keyboard -> Shortcuts -> Add custom shortcut. Then you add the name (e.g. CopyQ), the command (copyq menu) and after pressing Add you assign the shortcut, for example Super+V. This step is different for every desktop environment, but googling "[your DE name] global shortcuts" should help.

If by any chance you have NixOS and Cinnamon, you may configure it like this:

{ config, pkgs, ... }:
{
  home-manager.users.your-username = { # installs copyq as a user package
    home.packages = with pkgs; [
      copyq
    ];
  };
  dconf.settings = { # this is for creating the global Super+V shortcut
    "org/cinnamon/desktop/keybindings" = {
      "custom-list" = ["__dummy__" "custom0"];
    };
    "org/cinnamon/desktop/keybindings/custom-keybindings/custom0" = {
      binding = ["v"];
      command = "copyq menu";
      name = "CopyQ";
    };
  };
  systemd.user.services.copyq = { # creates the systemd service
    Unit = {
      Description = "CopyQ, a clipboard manager";
      Documentation = [ "man:copyq(5)" ];
      Wants = [ "graphical-session.target" ];
      Requires = [ "graphical-session.target" ];
      After = [ "graphical-session.target" ];
    };

    Service = {
      Type = "simple";
      ExecStart = "${pkgs.copyq}/bin/copyq";
      KillMode = "process";
      KillSignal = "SIGINT";
    };

    Install = {
      WantedBy = [
        "graphical-session.target"
      ];
    };
  };
}
[–] [email protected] 1 points 1 year ago (3 children)

Doesn't CopyQ have a shortcuts menu in its settings?

[–] [email protected] 1 points 1 year ago

it didn't work for some reason

[–] [email protected] 1 points 1 year ago

Yes, but it didn't work reliably for me. Having the DE handle it should always work.