bingwallpaper 0.6.1 → 0.6.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: cbe0ff2f5121c0ed61a1409c03032217f3dcd9c1
4
- data.tar.gz: 7e93502c56083636d162b1bbdf99150991edb065
2
+ SHA256:
3
+ metadata.gz: 1d31d28b254e936532fadc146f1acd52e3336bdfedd2a3d3d5a2a6afedc2bd32
4
+ data.tar.gz: 32ed10c91931692fd40e7bf0cef8566e29aa826310598a5b55d947ab1980700e
5
5
  SHA512:
6
- metadata.gz: c159dee737b17aa458bcb3106a95e5e8fb0c224ef62729abb59fb8a1a77e557901e40e748336b1e1c108278e74d66378633ba96f47c37631518a95c5150a4421
7
- data.tar.gz: 84be0238face2db9f554d6c3f3dcd579b7b7f257e767859c8578b149d2ad1ec297deff4a41bcdfed6287b1c804fe315c6e3fe8abf8141614d92f844102057643
6
+ metadata.gz: 96c6acfd1e4b2253e7f03fed662539ae4a0a152859986ea3f9071cf7d4de59f7edd81da18642f7fa07a95c52d303813291f9fec8edd0c4ec896b58deb316042b
7
+ data.tar.gz: 7ccc0ef902b539f33fc0aaa4d442d0a6d4938baa0b920b806d7d21db7753bc34f017d2a361a34a6b6e230e7be7b25e3ad4bf185a3c363c2dafe616ed527e13f9
data/README.md CHANGED
@@ -7,6 +7,11 @@ This project provides a simple Ruby script that will download the
7
7
  "Image of the Day" from [Bing][0] and then sets it as your current
8
8
  wallpaper.
9
9
 
10
+ If you find this code useful in any way, please feel free to...
11
+
12
+ <a href="https://www.buymeacoffee.com/cmiles74" target="_blank"><img src="https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png" alt="Buy Me A Coffee" style="height: 41px !important;width: 174px !important;box-shadow: 0px 3px 2px 0px rgba(190, 190, 190, 0.5) !important;-webkit-box-shadow: 0px 3px 2px 0px rgba(190, 190, 190, 0.5) !important;" ></a>
13
+
14
+
10
15
  ## How It Works
11
16
 
12
17
  I wrote this script with my own environment in mind, so it's pretty
@@ -34,6 +34,10 @@ OptionParser.new do |opts|
34
34
  options[:feh] = f
35
35
  end
36
36
 
37
+ opts.on("-s", "--sway", "Use swaymsg to set the background, overwrite ~/.config/sway/config.d/wallpaper") do |s|
38
+ options[:sway] = s
39
+ end
40
+
37
41
  opts.on("-h", "--help", "Prints this help") do
38
42
  puts opts
39
43
  exit
@@ -121,6 +125,10 @@ begin
121
125
  if options[:gnome]
122
126
  logger.info "Setting background with Gnome"
123
127
  `gsettings set org.gnome.desktop.background picture-uri "file:///#{image_path}"`
128
+ elsif options[:sway]
129
+ logger.info "Setting background with swaymsg"
130
+ `swaymsg output "*" background #{image_path} fill`
131
+ `echo 'swaysmg output "*" background #{image_path} fill' > ~/.config/sway/config.d/wallpaper`
124
132
  else
125
133
  logger.info "Setting background with feh"
126
134
  `feh --bg-fill #{image_path}`
@@ -139,6 +147,10 @@ begin
139
147
  if options[:gnome]
140
148
  logger.info "Setting background with Gnome"
141
149
  `gsettings set org.gnome.desktop.background picture-uri "file:///#{fallback_image_path}"`
150
+ elsif options[:sway]
151
+ logger.info "Setting background with swaymsg"
152
+ `swaymsg output "*" background #{fallback_image_path} fill`
153
+ `echo 'swaysmg output "*" background #{fallback_image_path} fill' > ~/.config/sway/config.d/wallpaper`
142
154
  else
143
155
  logger.info "Setting background with feh"
144
156
  `feh --bg-fill #{fallback_image_path}`
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
10
10
  spec.email = ["twitch@nervestaple.com"]
11
11
  spec.summary = %q{Sets your wallpaper to Bing's "Image of the Day"}
12
12
  spec.description = %q{This script downloads the "Image of the Day" and then uses Feh or Gnome to set your desktop wallpaper. More information available at https://github.com/cmiles74/bingwallpaper/.}
13
- spec.homepage = ""
13
+ spec.homepage = "https://github.com/cmiles74/bingwallpaper"
14
14
  spec.license = "MIT"
15
15
 
16
16
  spec.files = `git ls-files -z`.split("\x0")
@@ -18,6 +18,7 @@ Gem::Specification.new do |spec|
18
18
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
19
  spec.require_paths = ["lib"]
20
20
 
21
+ spec.required_ruby_version = '~> 2.5.0'
21
22
  spec.add_dependency "nokogiri", "~> 1.8.2"
22
23
  spec.add_dependency "OptionParser", "~> 0.5.1"
23
24
  spec.add_development_dependency "bundler", "~> 1.6"
@@ -1,3 +1,3 @@
1
1
  module Bingwallpaper
2
- VERSION ||= "0.6.1"
2
+ VERSION ||= "0.6.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bingwallpaper
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.1
4
+ version: 0.6.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - cmiles74
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-03-12 00:00:00.000000000 Z
11
+ date: 2019-03-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri
@@ -128,7 +128,7 @@ files:
128
128
  - lib/bingwallpaper.rb
129
129
  - lib/bingwallpaper/image.rb
130
130
  - lib/bingwallpaper/version.rb
131
- homepage: ''
131
+ homepage: https://github.com/cmiles74/bingwallpaper
132
132
  licenses:
133
133
  - MIT
134
134
  metadata: {}
@@ -138,9 +138,9 @@ require_paths:
138
138
  - lib
139
139
  required_ruby_version: !ruby/object:Gem::Requirement
140
140
  requirements:
141
- - - ">="
141
+ - - "~>"
142
142
  - !ruby/object:Gem::Version
143
- version: '0'
143
+ version: 2.5.0
144
144
  required_rubygems_version: !ruby/object:Gem::Requirement
145
145
  requirements:
146
146
  - - ">="
@@ -148,7 +148,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
148
148
  version: '0'
149
149
  requirements: []
150
150
  rubyforge_project:
151
- rubygems_version: 2.4.8
151
+ rubygems_version: 2.7.9
152
152
  signing_key:
153
153
  specification_version: 4
154
154
  summary: Sets your wallpaper to Bing's "Image of the Day"