Comments (8)
Hey there, @RAVENz46, I appreciate that someone does the nix package!
I don't have experience with nix packages, but can see the error in modifiying the
.desktop
file: Please change--replace 'Exec=€ExecCommand€' 'Exec=${pname}'
to
--replace '€ExecCommand€' '${pname} %u'
The
%u
is part of .desktop specification, and is actually placeholder for url that desktop environment substitutes.
Yes! Now, link correctly passed.
Another issue I can see from the video is that none of the browsers are identified as specific browser types, i.e no browser profiles are shown.
There can be two reasons for that:
1. `<app-binary-dir>/resources/lib/application-repository.toml` is not found (be aware that the "lib" here does not refer to standard linux lib folders, and is just a subdirectory for resource files - I might need to rename it to remove confusion). 2. `.desktop` files are not found/named in a standard way for the other browsers
I'm still beginner of nix, so IDK how/able to fix these.
Anyway, I'm fine with it so I close this issue. Thank you!
from browsers.
Hey there, @RAVENz46, I appreciate that someone does the nix package!
I don't have experience with nix packages, but can see the error in modifiying the .desktop
file:
Please change
--replace 'Exec=€ExecCommand€' 'Exec=${pname}'
to
--replace '€ExecCommand€' '${pname} %u'
The %u
is part of .desktop specification, and is actually placeholder for url that desktop environment substitutes.
from browsers.
Another issue I can see from the video is that none of the browsers are identified as specific browser types, i.e no browser profiles are shown.
There can be two reasons for that:
<app-binary-dir>/../resources/lib/application-repository.toml
is not found (be aware that the "lib" here does not refer to standard linux lib folders, and is just a subdirectory for resource files - I might need to rename it to remove confusion)..desktop
files are not found/named in a standard way for the other browsers
from browsers.
I changed $out/lib
to $out/resources/lib
then, it seems work cause chromium and firefox's name placed bit higher.
Final result
{ stdenv
, lib
, fetchzip
, autoPatchelfHook
, cairo
, gdk-pixbuf
, gtk3
}:
stdenv.mkDerivation rec {
pname = "browsers";
version = "0.5.0";
src = fetchzip {
url = "https://github.com/Browsers-software/browsers/releases/download/${version}/browsers_linux.tar.gz";
hash = "sha256-5BiJ8G77kLlLZr7Ut0jY/hp4zncWsWO55vyCSp6NPqk=";
stripRoot=false;
};
nativeBuildInputs = [
autoPatchelfHook
];
buildInputs = [
stdenv.cc.cc.lib
cairo
gdk-pixbuf
gtk3
];
installPhase = ''
mkdir -p $out/{bin,share/applications,resources}
mv x86_64/${pname} $out/bin
install -m 444 \
-D software.Browsers.template.desktop \
-t $out/share/applications
substituteInPlace \
$out/share/applications/software.Browsers.template.desktop \
--replace 'Exec=€ExecCommand€' 'Exec=${pname} %u'
cp -r lib $out/resources
for size in 16 32 128 256 512; do
mkdir -p $out/share/icons/hicolor/"$size"x"$size"/apps
cp icons/"$size"x"$size"/software.Browsers.png $out/share/icons/hicolor/"$size"x"$size"/apps/software.Browsers.png
done
'';
meta = with lib; {
description = "Open the right browser at the right time";
homepage = "https://github.com/Browsers-software/browsers";
changelog = "https://github.com/Browsers-software/browsers/blob/${src.rev}/CHANGELOG.md";
license = with licenses; [ asl20 mit ];
maintainers = with maintainers; [ ];
mainProgram = "browsers";
};
}
from browsers.
I corrected my previous comment about resources location. So the tree should be basically like this:
/usr/share/software.Browsers/
├─ bin/
│ └─ browsers
└─ resources/
├─ i18n/en-US/builtin.ftl
├─ icons/512x512/software.Browsers.png
└─ lib/application-repository.toml
It's also safe to add symlink to the binary if you need it somewhere else.
I can see in your screenshot, that profile names are still not shown, so likely something is still missing (also need to refresh apps from the 3-dot menu).
from browsers.
Thanks again for all your help.
I add i18n directory, now settings and browser profile seems fine.
Icon directory may be unnecessary under resourses dir, this is because nix specific thing.
But I found something should fix, so let me ask you.
- launching browsers from .desktop, dock icon work however, from command line, launcher like rofi and clicking link, dock icon not display( You can see in video).
- Browsers appear inside of Browsers(you can also see it in video). However, there are no settings to hide options. This option is not available on linux or my fault?
Kooha-2024-01-31-11-41-41.webm
from browsers.
Thanks again for all your help. I add i18n directory, now settings and browser profile seems fine. Icon directory may be unnecessary under resourses dir, this is because nix specific thing. But I found something should fix, so let me ask you.
Awesome! Only the 512x512 icon is used under resources dir actually, to be shown in About dialog.
FYI, be aware, that in next release resources/lib/
will be renamed to resources/repository/
- launching browsers from .desktop, dock icon work however, from command line, launcher like rofi and clicking link, dock icon not display( You can see in video).
Actually, it's designed that dock icon would never be shown (like when you right click or alt+tab, you don't see icons for those dialogs), hopefully the fact that it is shown is small enough to ignore for now ;)
- Browsers appear inside of Browsers(you can also see it in video).
There's a very simple filter right now - if the .desktop file is named as software.Browsers.desktop
, then it will skip it from the list.
However, there are no settings to hide options. This option is not available on linux or my fault?
Bad design from my side - you need to right click with your mouse on the browser and click "Hide"
from browsers.
Okay, now almost everything fine.
Thanks!!!
from browsers.
Related Issues (20)
- Documentation for config.json or an example HOT 2
- Window appearing beneath Snap application HOT 6
- Rules in config.json do not work HOT 10
- Icon-related crash on Linux regression of #12 HOT 4
- Donating to Browsers HOT 1
- Browsers seems to cause Arc to crash HOT 5
- Enabling quit_on_lost_focus makes the "About" dialog not functional 😄 HOT 1
- Windows false positive match for `Trojan:Win32/Bearfoos.A!ml` HOT 1
- %THIS_DIR% not always set correctly. Uncaught error. HOT 5
- Browsers still shows uninstalled apps/profiles, even after a refresh HOT 2
- Since updating to 0.5.2, Arc does not open automatically based on rules in config.json HOT 2
- Mullvad support HOT 6
- iCloud Sync HOT 1
- Match google oauth client_id HOT 2
- Trying to create a rule that opens all links from Mail in Safari HOT 4
- Window too small on HiDPI screens HOT 2
- Popup isnt shown in Intellj Idea HOT 2
- Safari doesn't "open" automatically anymore HOT 4
- Flatpak browser all end up with the same executable_path HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from browsers.