Tell me please, how to hide Top Bar and show it when the mouse hover (e.g. like Windows)?
I found only this solution https://extensions.gnome.org/extension/545/hide-top-bar/, but i don`t know how it install.
On extension page (https://github.com/mlutfy/hidetopbar) exist install guide, but on this step
gnome-extensions enable hidetopbar#mathieu.bidon.ca
i got error
Extension “hidetopbar#mathieu.bidon.ca” does not exist
This is solver my problems: https://manjaro.ru/gnome/kak-skryt-top-bar.html#comment29220
Launch pamac (win / super => enter pamac, press enter)
Open the menu (3 vertical dots) => settings, find the AUR there and turn it on
Now look for 'hidetopbar' in pamac
Click on the found package and there click the Build Files tab, find the PKGBUILD code
We carry out the fix described here: aur.archlinux.org/packages/gnome-shell-extension-hidetopbar-git/comment-768596
That is, in this PKGBUILD we replace the line
package_10_locale () {
msg2 'Installing translations ...'
(
cd locale
for locale in * /
do
install -Dm644 -t "$ pkgdir / usr / share / locale / $ locale / LC_MESSAGES" "$ locale / LC_MESSAGES" / *. mo
done
)
}
on the
package_10_locale () {
msg2 'Installing translations ...'
(
cd locale
for locale in * /
do
install -Dm644 -t "$ pkgdir / usr / share / locale / $ locale / LC_MESSAGES" "$ locale / LC_MESSAGES" / *. po
done
)
}
Install the package itself
Find the Extensions application (where, for example, User Thems was included) and in it we find the Hide Top Bar
Turn on the extension, configure it as we want
Related
I used to be able to install and use Sass with NetBeans 8 as described in the top answer on How to use SASS with Netbeans 8.0.1
Now, with the current version of Sass (1.14.1), installing is different. Basically just download and untar. That's done and I've pointed NetBeans to the correct location. But this current version of Sass won't run correctly from NetBeans:
"/opt/dart-sass/sass" "--cache-location"
"/home/jasper/.cache/netbeans/8.2/sass-compiler"
"path_to_my.scss" "path_to_my.css"
Could not find an option named "cache-location".
This error is also covered by Sass output error in Netbeans 8.2 where they are using Windows.
I tried to add the cache location parameter (similar to the solution for Windows) to this line in the sass file:
exec "$path/src/dart" --no-preview-dart-2 "-Dversion=1.14.1" "$path/src/sass.dart.snapshot" "$#"
but I could not get it working (same error keeps appearing).
Anybody any ideas on how to get Sass 1.14.1 working from NetBeans 8.2 on Linux (Ubuntu)?
The issue is that --cache-location is no longer supported and should be removed. All of the original parameters are used by "$#". To remove the first two parameters, you should be able to use "${#:3}" (see Process all arguments except the first one (in a bash script)), but somehow that resulted into a "Bad substitution" error for me. So I opted to use shift 2 to remove them:
#!/bin/sh
# Copyright 2016 Google Inc. Use of this source code is governed by an MIT-style
# license that can be found in the LICENSE file or at
# https://opensource.org/licenses/MIT.
# This script drives the standalone Sass package, which bundles together a Dart
# executable and a snapshot of Sass. It can be created with `pub run grinder
# package`.
follow_links() {
file="$1"
while [ -h "$file" ]; do
# On Mac OS, readlink -f doesn't work.
file="$(readlink "$file")"
done
echo "$file"
}
# Unlike $0, $BASH_SOURCE points to the absolute path of this file.
path=`dirname "$(follow_links "$0")"`
shift 2
exec "$path/src/dart" --no-preview-dart-2 "-Dversion=1.14.1" "$path/src/sass.dart.snapshot" "${#}"
Make sure to keep the original file and create a copy to only be used with NetBeans and make the change there.
macOS (Home Brew)
If you are looking for the Dart Sass install location (after installing it with Home Brew), it is located here:
/usr/local/Cellar/sass/{version}/bin
macOS (node.js)
When using node.js, you will run into the "env: node: No such file or directory" issue.
To work around that I created (make sure you make it executable (chmod a+x)):
/usr/local/lib/node_modules/sass/sass_nb.sh
and added:
#!/bin/zsh
export PATH="$PATH:"/usr/local/bin/
shift 3
sass ${#}
NetBeans 11+
On NetBeans 11 and 12 I had to use shift 3 instead of shift 2.
My response is based heavily on Jasper de Vries'one:
It seems that Netbeans simply adds some additional parameters that are no longer supported by sass compiler.
In my case the complete command issued by Netbeans was:
"/home/alex/tools/dart-sass/sass" "--cache-location" "/home/alex/snap/netbeans/common/cache/12.0/sass-compiler" "--debug-info" "/home/alex/projects/alexgheorghiu.com/web/aaa.scss" "/home/alex/projects/alexgheorghiu.com/web/aaa.css"
So the first 3 parameters
"--cache-location" "/home/alex/snap/netbeans/common/cache/12.0/sass-compiler" "--debug-info"
must be "deleted" or ignored.
So you need to either alter the sass file or make a copy of it (safest way)
and add
shift 3
instruction.
So if you start from original version like:
#!/bin/sh
# This script drives the standalone dart-sass package, which bundles together a
# Dart executable and a snapshot of dart-sass.
follow_links() {
file="$1"
while [ -h "$file" ]; do
# On Mac OS, readlink -f doesn't work.
file="$(readlink "$file")"
done
echo "$file"
}
# Unlike $0, $BASH_SOURCE points to the absolute path of this file.
path=`dirname "$(follow_links "$0")"`
exec "$path/src/dart" "$path/src/sass.snapshot" "$#"
You need to end up with something like:
#!/bin/sh
# This script drives the standalone dart-sass package, which bundles together a
# Dart executable and a snapshot of dart-sass.
follow_links() {
file="$1"
while [ -h "$file" ]; do
# On Mac OS, readlink -f doesn't work.
file="$(readlink "$file")"
done
echo "$file"
}
# Unlike $0, $BASH_SOURCE points to the absolute path of this file.
path=`dirname "$(follow_links "$0")"`
shift 3
exec "$path/src/dart" "$path/src/sass.snapshot" "$#"
An interesting aspect is that this bug is known by Netbeans developers (See: Could not find an option named "cache-location") but I was not able to achieve that because under my Xubuntu 18 the Netbeans is a "snap" and therefore it's netbeans.conf file is read only.
But in case you CAN modify that file it might be a cleaner solution.
Usually I get an excel spreadsheet with dozens of filenames, for which I then need to go and search individually.
Spreadhseet
Is there a way that I could simply:
Select All filenames in e.g. row A of Excel,
then Search for all these files on "This Mac"
then Copy all found files into the New Folder on the Desktop
So far I've tried the first part of searching and this is what i get :a)
Automator with Variable. But the problem is, it only searches for 1 file from selection
b)
Automator with Shell Script (Copy to Clipboard > Open Finder > CMD+F (to highlight Search dialog) > CMD+V). It opens a new Finder window, but it doesn't paste the clipboard into search dialog
c) /usr/bin/pbcopy
on run {input, parameters}
tell application "System Events"
keystroke "f" using {command down}
keystroke "v" using {command down}
end tell
return input
end run`
End result, is same as option b). I was planning to run this in Automator as a 'Service', which I could later assign to Keyboard Shortcut.
I am pretty sure there should be a simple shell option for this - any advice would be much appreciated.
I made a bash script that does what you want. You would basically select a bunch of filenames in Excel, or any other app, and copy them to the clipboard with ⌘C. After that you need to run the script and it will take items from the clipboard and search for TIFF or JPEG images that match that name and copy them to a directory on your Desktop called Selected Files:
#!/bin/bash
# Get contents of clipboard into bash array
files=( $(pbpaste) )
# Create output directory - no checks for already existing or already containing files
OUTDIR="$HOME/Desktop/Selected Files"
mkdir -p "$OUTDIR"
# Iterate through fetching files
for ((i=0;i<${#files[#]};i++)) ; do
name=${files[i]}
result=$( mdfind "kMDItemDisplayName == \"${name}.*\" && (kMDItemKind==\"TIFF image\" || kMDItemKind==\"JPEG image\")" )
if [ -f "$result" ]; then
echo $name: $result
cp "$result" "$OUTDIR"
else
echo ERROR: Searched for: $name, found $result
fi
done
I am not sure of your level of familiarity with bash, so you may be able to ignore the following...
Make a new directory for your own scripts:
mkdir -p $HOME/scripts
Save the above script in that directory with filename:
$HOME/scripts/gather
Make the script executable by typing this into Terminal:
chmod +x $HOME/scripts/gather
Edit your login profile ($HOME/.profile) and add your $HOME/scripts directory to your PATH:
export PATH="$PATH":$HOME/scripts
Then start a new Terminal and you can use any script that you have saved in $HOME/scripts without needing to specify the full path to it, e.g.:
gather
Following information kindly contributed by #user3439894 in comments section, as I am out of my depth on this aspect...
To use a keyboard shortcut, you'd have to create an Automator "Service workflow" with a "Run Shell Script" action, which you can assign a keyboard shortcut to under: System Preferences > Keyboard > Shortcuts > Services
How to export a glyph (from its unicode) to SVG with Fontforge command line ?
I also need to specify the font size and keep the original margins it has in the font.
You may have found your answer already, but I just had to do this with the latest build of FontForge. The old answer of this command:
fontforge -lang=ff -c 'Open($1); SelectWorthOutputting(); foreach Export("svg"); endloop;' font.ttf
From a command prompt didn't want to work on Windows10 (I assume a permission issue), but you could give it a try. A quick work-around is to do it via the GUI Execute Script.
Run FontForge (For Windows10 installed in the Program Files (x86) directory, you may need to right-click "run_fontforge.exe" --> Run As Administrator).
Open the font you want to export.
Go to File > Execute Script
Paste: SelectWorthOutputting(); foreach Export("svg"); endloop;
Select "FF" radial button.
Hit OK
It'll save to the FontForge folder (where run_fontforge.exe is located).
On Windows os (Tested on win10)
this is from inside a BATCH file:
c:\Programs\FontForge\bin\fontforge.exe -lang=ff -c "Open($1); SelectWorthOutputting(); foreach Export('%%e_%%f_%%n_%%u.eps'); endloop;" %1
this is directly on the command line:
c:\Programs\FontForge\bin\fontforge.exe -lang=ff -c "Open($1); SelectWorthOutputting(); foreach Export('%e_%f_%n_%u.eps'); endloop;" font-file.ttf
note - the color is not exported. And I don't know if it's unimplemented, or a bug.
I'm running Centos 7, Perl 5 and X11. In running a first time perl program copied from an online tutorial -
#!/usr/bin/perl
use strict;
use Tk;
my $mw = new MainWindow;
my $label = $mw -> Label(-text=>"Hello World") -> pack();
my $button = $mw -> Button(-text => "Quit",
-command => sub { exit })
-> pack();
MainLoop;
And then invoking from the command line -
./test.pl
I receive the following error -
[foo#localhost Desktop]$ ./test.pl
1132148 is not a hash at /usr/lib64/perl5/vendor_perl/Tk/MainWindow.pm line 53.
Aborted (core dumped)
After commenting out lines it seems the error is generated by the "my $mw = " line
Googling the error message I'm finding references indicating it might be an X11 known issue but not sure. Also not sure where to begin looking for an answer.
I have (using yum) double checked to make sure tk, perl-tk and tcl are up to date. I've attempted to check the status of the X installation but am a little fearful of reinstalling lest I make things worse.
The comment from mbethke leads to what is the real problem with this specific error.
In fact, on Linux, you can quickly check if Tk is properly working or not by using the wish command (that should open a small window).
When you have the problem, wish does not open and outputs the following
unknown color name 'BACKGROUND'
And since wish and this error are more common than some Perl & Tk scripts, you can find more answers, such this one, in which one you find a way to clear the color defined :
xrdb -load /dev/null
xrdb -query
(xrdb -query is used to check the current color configuration.)
Then, everything should be fixed.
I'm looking for a postage scale that already has linux support (drivers, etc) for a shipping system that I'm working on. I'm planning to use Ubuntu 9.04, but I am willing to switch distro's for compatibility.
Does anybody know of any scales that currently work? Is there an open source project that's working on scale drivers or similar?
Thanks!
I use the 5lb stamps.com scale. You can pick it up for $10 if you sign up for an account with them and then cancel it.
To read from it in linux, get this script: http://gist.github.com/503896
Edit the script file to set the proper hidraw device path. You can find the path by running dmesg after you've plugged the scale in. You will see something like "/dev/hidraw2".
After setting the hidraw path in the script, add execute permission and then run it as root:
chmod +x usbscale.pl
sudo ./usbscale.pl
Place an object on the scale and it will print the weight.
Update:
I've created a newer version of my earlier script that mattismyname linked. It's written in C, and you can find it at https://github.com/erjiang/usbscale
To use it, just download the source code and run (inside its directory):
sudo aptitude install libusb-1.0-0-dev
make
./usbscale
You might need to copy the 50-usb-scales.rules to your /etc/udev/rules.d (or run as root, haha) if you run into a permissions error.
Exponent value is passed as signed integer, and weight is passed in little endian byte order. Other answers do not properly account for these factors. See a more comprehensive example here.
<?php
$binary = fread(fopen('/dev/hidraw3', 'r'), 7);
$data = (object) unpack('Creport/Cstatus/Cunit/cexponent/vweight', $binary);
if ($data->report == 0x03 && $data->status == 0x04) {
$data->weight = $data->weight * pow(10, $data->exponent);
if ($data->unit == 0x0B) {
// convert ounces to grams
$data->weight *= 28.349523125;
// and unit to grams
$data->unit = 0x02;
}
if ($data->unit == 0x02) {
echo "{$data->weight} g\n";
} else {
echo "{$data->weight} in other unit\n";
}
}