Giter Club home page Giter Club logo

Comments (6)

cdown avatar cdown commented on May 23, 2024

clipmenu doesn't hold the selection unless you have CM_OWN_SELECTIONS=1. Are you running with that? Can you show me the output of /proc/$(pgrep clipmenud)/environ?

from clipmenu.

benibilme avatar benibilme commented on May 23, 2024

Hello,

I am sorry to respond you late. I have installed clipmenud via arch aur package. It installs a systemd user service. The service file is as follows.

[Unit]
Description=Clipmenu daemon

[Service]
ExecStart=/usr/bin/clipmenud
Restart=always
RestartSec=500ms

MemoryDenyWriteExecute=yes
NoNewPrivileges=yes
ProtectControlGroups=yes
ProtectKernelTunables=yes
RestrictAddressFamilies=
RestrictRealtime=yes

# We don't need to do any clean up, so if something hangs (borked xclip, etc),
# it's going to stay that way. Just forcefully kill and get it over with.
TimeoutStopSec=2

[Install]
WantedBy=default.target

I am using i3wm. I open up menu via following command.

bindsym $mod+c exec CM_LAUNCHER=rofi clipmenu -i -fn Terminus:size=8 -nb '#002b36' -nf '#839496' -sb '#073642' -sf '#93a1a1'

/proc/$(pgrep clipmenud)/environ returned nothing in my system. I am using arch. The service is installed as user service.

systemctl --user status clipmenud
● clipmenud.service - Clipmenu daemon
     Loaded: loaded (/usr/lib/systemd/user/clipmenud.service; enabled; preset: enabled)
     Active: active (running) since Wed 2023-03-15 02:41:10 +03; 1h 24min ago
   Main PID: 7503 (bash)
      Tasks: 2 (limit: 38323)
     Memory: 2.3M
        CPU: 4.568s
     CGroup: /user.slice/user-id.slice/[email protected]/app.slice/clipmenud.service
             ├─ 7503 bash /usr/bin/clipmenud
             └─18492 clipnotify

I did not do any other configuration. I believe I am NOT running with CM_OWN_SELECTIONS=1 unless it is default setting to the best of my knowledge.

However I want clipmenu to record primary selection in addition to secondary as it does now. I just want to understand, is there a way to prevent it not to track passwords from special applications etc without disabling it.

from clipmenu.

cdown avatar cdown commented on May 23, 2024

You can also use CM_IGNORE_WINDOW, see clipmenud --help.

from clipmenu.

benibilme avatar benibilme commented on May 23, 2024

Hello,

I have checked window name with xprop. xprop output is as follows. (I put XX in place of database name)

_NET_WM_USER_TIME(CARDINAL) = 80290238
_NET_WM_STATE(ATOM) =
WM_STATE(WM_STATE):
		window state: Normal
		icon window: 0x0
_NET_WM_DESKTOP(CARDINAL) = 7
_NET_WM_ICON(CARDINAL) =
_NET_WM_ICON_NAME(UTF8_STRING) =
XdndAware(ATOM) = BITMAP
WM_NAME(STRING) = "xx - KeePassXC"
_NET_WM_NAME(UTF8_STRING) = "xx - KeePassXC"
_MOTIF_WM_HINTS(_MOTIF_WM_HINTS) = 0x3, 0x3e, 0x7e, 0x0, 0x0
_NET_WM_WINDOW_TYPE(ATOM) = _NET_WM_WINDOW_TYPE_NORMAL
_XEMBED_INFO(_XEMBED_INFO) = 0x0, 0x1
WM_CLIENT_LEADER(WINDOW): window id # 0x3000008
WM_HINTS(WM_HINTS):
		Client accepts input or input focus: True
		window id # of group leader: 0x3000008
WM_CLIENT_MACHINE(STRING) = "xxxxxx"
_NET_WM_PID(CARDINAL) = 929
_NET_WM_SYNC_REQUEST_COUNTER(CARDINAL) = 50331655
WM_CLASS(STRING) = "keepassxc", "KeePassXC"
WM_PROTOCOLS(ATOM): protocols  WM_DELETE_WINDOW, WM_TAKE_FOCUS, _NET_WM_PING, _NET_WM_SYNC_REQUEST
WM_NORMAL_HINTS(WM_SIZE_HINTS):
		user specified location: 2562, 53
		user specified size: 1196 by 1865
		program specified minimum size: 800 by 500
		window gravity: Static

Based on that I have added following directive to systemd unit file under service section

Environment=CM_IGNORE_WINDOW=".*KeePassXC.*"

This is supposed to work based on your input. I have made sure daemons are reloaded. I restarted the service. However clipmenud captures everthing from Keepassxc.

I also would like to point out, that help messages are just very terse. There are no examples. There is no man page. Github page is also has not much information. For example, what type of regular expressions are valid, basic, extended, perl etc. It will be very helpful if you can improve the help messages along with github page.

from clipmenu.

al23212321 avatar al23212321 commented on May 23, 2024

@benibilme Its working for me.
I added this line in the shell environment file which in my case is zshenv
export CM_IGNORE_WINDOW="KeePassXC"

from clipmenu.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.