xorg_buffer 1.1.4
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of xorg_buffer might be problematic. Click here for more details.
- checksums.yaml +7 -0
- data/lib/xorg_buffer/constants/constants.rb +17 -0
- data/lib/xorg_buffer/module.rb +46 -0
- data/lib/xorg_buffer/version/version.rb +19 -0
- data/lib/xorg_buffer/xorg_buffer.rb +18 -0
- data/lib/xorg_buffer.rb +1 -0
- data/test/testing_xorg_buffer.rb +2 -0
- data/xorg_buffer.gemspec +36 -0
- metadata +53 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: d71a9b13ae78863bb5ab28e6d97ad2e2c7a6829f1f8afb92d8167793da139166
|
4
|
+
data.tar.gz: 4a5820885031fd60f0acc2566c2154b0c329602eb085f581bf049b426cb872b0
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 6fd15ab8cc5c0dd60bcf7febb5326062f395009a98819a7a600d995150697276426cc86ee522bac53f5fd86216b83569c26b6f8ab384c7d69e74a34e4a0ff6c9
|
7
|
+
data.tar.gz: 947bc8fa164197052891e279c75b83c035bbf5a331b7bc0c5f2c6a5938b5ee56a1df4aae5676b5310e472bf74c092bfcf1feedcfc5c440bc6ab86a927eafa0c2
|
@@ -0,0 +1,17 @@
|
|
1
|
+
#!/usr/bin/ruby -w
|
2
|
+
# Encoding: UTF-8
|
3
|
+
# frozen_string_literal: true
|
4
|
+
# =========================================================================== #
|
5
|
+
# require 'xorg_buffer/constants/constants.rb'
|
6
|
+
# =========================================================================== #
|
7
|
+
module XorgBuffer
|
8
|
+
|
9
|
+
# ========================================================================= #
|
10
|
+
# === USE_THIS_XORG_COMMAND
|
11
|
+
#
|
12
|
+
# We need to keep in mind that xsel may be unavailable on a user's
|
13
|
+
# machine.
|
14
|
+
# ========================================================================= #
|
15
|
+
USE_THIS_XORG_COMMAND = 'xsel --input'
|
16
|
+
|
17
|
+
end
|
@@ -0,0 +1,46 @@
|
|
1
|
+
#!/usr/bin/ruby -w
|
2
|
+
# Encoding: UTF-8
|
3
|
+
# frozen_string_literal: true
|
4
|
+
# =========================================================================== #
|
5
|
+
# This module can be included.
|
6
|
+
#
|
7
|
+
# require 'xorg_buffer/module'; include XorgBuffer
|
8
|
+
# =========================================================================== #
|
9
|
+
# require 'xorg_buffer/module.rb'
|
10
|
+
# =========================================================================== #
|
11
|
+
module XorgBuffer
|
12
|
+
|
13
|
+
require 'xorg_buffer/constants/constants.rb'
|
14
|
+
|
15
|
+
# ========================================================================= #
|
16
|
+
# === XorgBuffer.set_xorg_buffer
|
17
|
+
#
|
18
|
+
# Use this method to set to the Xorg Buffer, on Linux.
|
19
|
+
#
|
20
|
+
# Complete usage example for this method here:
|
21
|
+
# require 'xorg_buffer/module'; XorgBuffer.set_xorg_buffer('test')
|
22
|
+
#
|
23
|
+
# Now, the xorg buffer contains the word 'test'.
|
24
|
+
# ========================================================================= #
|
25
|
+
def self.set_xorg_buffer(
|
26
|
+
data = nil
|
27
|
+
)
|
28
|
+
if data
|
29
|
+
data = data.join('|') if data.is_a? Array
|
30
|
+
# ===================================================================== #
|
31
|
+
# We must get rid of '""' because this may confuse the xsel command.
|
32
|
+
# ===================================================================== #
|
33
|
+
if data.include? '"'
|
34
|
+
data = data.delete('"')
|
35
|
+
end
|
36
|
+
cmd = 'echo "'+data+'" | '+USE_THIS_XORG_COMMAND
|
37
|
+
system cmd
|
38
|
+
end
|
39
|
+
end; self.instance_eval { alias set_buffer set_xorg_buffer } # === XorgBuffer.set_buffer
|
40
|
+
self.instance_eval { alias copy_this_text_to_the_clipboard set_xorg_buffer } # === XorgBuffer.copy_this_text_to_the_clipboard
|
41
|
+
self.instance_eval { alias copy set_xorg_buffer } # === XorgBuffer.copy
|
42
|
+
self.instance_eval { alias assign_xorg_buffer set_xorg_buffer } # === XorgBuffer.assign_xorg_buffer
|
43
|
+
self.instance_eval { alias set set_xorg_buffer } # === XorgBuffer.set
|
44
|
+
self.instance_eval { alias [] set_xorg_buffer } # === XorgBuffer[]
|
45
|
+
|
46
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
#!/usr/bin/ruby -w
|
2
|
+
# Encoding: UTF-8
|
3
|
+
# frozen_string_literal: true
|
4
|
+
# =========================================================================== #
|
5
|
+
# require 'xorg_buffer/version/version.rb'
|
6
|
+
# =========================================================================== #
|
7
|
+
module XorgBuffer
|
8
|
+
|
9
|
+
# ========================================================================= #
|
10
|
+
# === XorgBuffer::VERSION
|
11
|
+
# ========================================================================= #
|
12
|
+
VERSION = '1.1.4'
|
13
|
+
|
14
|
+
# ========================================================================= #
|
15
|
+
# === XorgBuffer::LAST_UPDATE
|
16
|
+
# ========================================================================= #
|
17
|
+
LAST_UPDATE = '26.11.2020'
|
18
|
+
|
19
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
#!/usr/bin/ruby -w
|
2
|
+
# Encoding: UTF-8
|
3
|
+
# frozen_string_literal: true
|
4
|
+
# =========================================================================== #
|
5
|
+
# require 'xorg_buffer'
|
6
|
+
# =========================================================================== #
|
7
|
+
require 'xorg_buffer/module.rb'
|
8
|
+
|
9
|
+
# =========================================================================== #
|
10
|
+
# === set_xorg_buffer
|
11
|
+
#
|
12
|
+
# Use this method to set to the Xorg Buffer, on Linux. The reason why this
|
13
|
+
# method exists is so that we can quickly use a toplevel method, without
|
14
|
+
# having to further include any other module.
|
15
|
+
# =========================================================================== #
|
16
|
+
def set_xorg_buffer(data = nil)
|
17
|
+
XorgBuffer.set_buffer(data) if data
|
18
|
+
end
|
data/lib/xorg_buffer.rb
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require 'xorg_buffer/xorg_buffer.rb'
|
data/xorg_buffer.gemspec
ADDED
@@ -0,0 +1,36 @@
|
|
1
|
+
# =========================================================================== #
|
2
|
+
# Gemspec for Project XorgBuffer.
|
3
|
+
# =========================================================================== #
|
4
|
+
require 'xorg_buffer/version/version.rb'
|
5
|
+
|
6
|
+
Gem::Specification.new { |s|
|
7
|
+
|
8
|
+
s.name = 'xorg_buffer'
|
9
|
+
s.version = XorgBuffer::VERSION
|
10
|
+
s.date = Time.now.strftime('%Y-%m-%d')
|
11
|
+
|
12
|
+
s.summary = <<-EOF
|
13
|
+
This library is called xorg_buffer. It allows
|
14
|
+
us to set to the xorg-buffer, if "xsel" is
|
15
|
+
available.
|
16
|
+
EOF
|
17
|
+
|
18
|
+
s.description = <<-EOF
|
19
|
+
This library is called xorg_buffer. It allows
|
20
|
+
us to set to the xorg-buffer, if "xsel" is
|
21
|
+
available.
|
22
|
+
EOF
|
23
|
+
|
24
|
+
s.extra_rdoc_files = %w()
|
25
|
+
|
26
|
+
s.authors = ['Robert A. Heiler']
|
27
|
+
s.email = 'shevegen@gmail.com'
|
28
|
+
s.files = Dir['**/*']
|
29
|
+
s.license = 'GPL-2.0'
|
30
|
+
s.homepage = 'http://rubygems.org/gems/xorg_buffer'
|
31
|
+
|
32
|
+
s.required_ruby_version = '>= '+RUBY_VERSION
|
33
|
+
s.required_rubygems_version = '>= '+Gem::VERSION
|
34
|
+
s.rubygems_version = '>= '+Gem::VERSION
|
35
|
+
|
36
|
+
}
|
metadata
ADDED
@@ -0,0 +1,53 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: xorg_buffer
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.1.4
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Robert A. Heiler
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2020-11-27 00:00:00.000000000 Z
|
12
|
+
dependencies: []
|
13
|
+
description: |2
|
14
|
+
This library is called xorg_buffer. It allows
|
15
|
+
us to set to the xorg-buffer, if "xsel" is
|
16
|
+
available.
|
17
|
+
email: shevegen@gmail.com
|
18
|
+
executables: []
|
19
|
+
extensions: []
|
20
|
+
extra_rdoc_files: []
|
21
|
+
files:
|
22
|
+
- lib/xorg_buffer.rb
|
23
|
+
- lib/xorg_buffer/constants/constants.rb
|
24
|
+
- lib/xorg_buffer/module.rb
|
25
|
+
- lib/xorg_buffer/version/version.rb
|
26
|
+
- lib/xorg_buffer/xorg_buffer.rb
|
27
|
+
- test/testing_xorg_buffer.rb
|
28
|
+
- xorg_buffer.gemspec
|
29
|
+
homepage: http://rubygems.org/gems/xorg_buffer
|
30
|
+
licenses:
|
31
|
+
- GPL-2.0
|
32
|
+
metadata: {}
|
33
|
+
post_install_message:
|
34
|
+
rdoc_options: []
|
35
|
+
require_paths:
|
36
|
+
- lib
|
37
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
38
|
+
requirements:
|
39
|
+
- - ">="
|
40
|
+
- !ruby/object:Gem::Version
|
41
|
+
version: 2.7.2
|
42
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
43
|
+
requirements:
|
44
|
+
- - ">="
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: 3.1.4
|
47
|
+
requirements: []
|
48
|
+
rubygems_version: 3.1.4
|
49
|
+
signing_key:
|
50
|
+
specification_version: 4
|
51
|
+
summary: This library is called xorg_buffer. It allows us to set to the xorg-buffer,
|
52
|
+
if "xsel" is available.
|
53
|
+
test_files: []
|